From cce7eab87f5c1f566c2392f46241a19aaba53753 Mon Sep 17 00:00:00 2001 From: Sangwon Oh Date: Thu, 30 Jun 2022 00:01:00 +0900 Subject: [PATCH] Commit transpiled scripts --- dist/ovenplayer.js | 2 +- dist/ovenplayer.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/ovenplayer.js b/dist/ovenplayer.js index 5eab9885..d0114f47 100644 --- a/dist/ovenplayer.js +++ b/dist/ovenplayer.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.OvenPlayer=t():e.OvenPlayer=t()}(self,(function(){return function(){var e={6757:function(e,t,n){"use strict";n.d(t,{default:function(){return Ar}});var r="0.10.22-beta.0",o=n(741),i=n.n(o);function a(e){return e?e.replace(/^\s+|\s+$/g,""):""}var A=function(e){if(!e||"rtmp"==e.substr(0,4))return"";var t=function(e){var t="";return/[(,]format=mpd-/i.test(e)?t="mpd":/[(,]format=m3u8-/i.test(e)&&(t="m3u8"),t}(e);return t||((e=e.split("?")[0].split("#")[0]).lastIndexOf(".")>-1?e.substr(e.lastIndexOf(".")+1,e.length).toLowerCase():"")};function s(e){var t=parseInt(e,10);if(!e)return"00:00";var n=Math.floor(t/3600),r=Math.floor((t-3600*n)/60),o=t-3600*n-60*r;return r<10&&(r="0"+r),o<10&&(o="0"+o),n>0?n+":"+r+":"+o:r+":"+o}function c(e,t){if(!e)return 0;if(i().isNumber(e)&&!i().isNaN(e))return e;var n=(e=e.replace(",",".")).split(":"),r=n.length,o=0;if("s"===e.slice(-1))o=parseFloat(e);else if("m"===e.slice(-1))o=60*parseFloat(e);else if("h"===e.slice(-1))o=3600*parseFloat(e);else if(r>1){var a=r-1;4===r&&(t&&(o=parseFloat(n[a])/t),a-=1),o+=parseFloat(n[a]),o+=60*parseFloat(n[a-1]),r>=3&&(o+=3600*parseFloat(n[a-2]))}else o=parseFloat(e);return i().isNaN(o)?0:o}function u(e){var t={},n=e.split("\r\n");1===n.length&&(n=e.split("\n"));var r=1;if(n[0].indexOf(" --\x3e ")>0&&(r=0),n.length>r+1&&n[r+1]){var o=n[r],i=o.indexOf(" --\x3e ");i>0&&(t.start=c(o.substr(0,i)),t.end=c(o.substr(i+5)),t.text=n.slice(r+1).join("\r\n"))}return t}var l=window.VTTCue,f={"":!0,lr:!0,rl:!0},p={start:!0,middle:!0,end:!0,left:!0,right:!0};function d(e){return"string"==typeof e&&!!p[e.toLowerCase()]&&e.toLowerCase()}function g(e){for(var t=1;t100)throw new Error("Position must be between 0 and 100.");C=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"positionAlign",g({},i,{get:function(){return y},set:function(e){var t=d(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"size",g({},i,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"align",g({},i,{get:function(){return w},set:function(e){var t=d(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");w=t,this.hasBeenReset=!0}})),r.displayState=void 0,o)return r}).prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)});var h=l,v={"":!0,up:!0};function m(e){return"number"==typeof e&&e>=0&&e<=100}var C=function(){var e=100,t=3,n=0,r=100,o=0,i=100,a="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!m(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!m(e))throw new Error("RegionAnchorX must be between 0 and 100.");r=e}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!m(e))throw new Error("RegionAnchorY must be between 0 and 100.");n=e}},viewportAnchorY:{enumerable:!0,get:function(){return i},set:function(e){if(!m(e))throw new Error("ViewportAnchorY must be between 0 and 100.");i=e}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(e){if(!m(e))throw new Error("ViewportAnchorX must be between 0 and 100.");o=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return"string"==typeof e&&!!v[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");a=t}}})},y=function(){};function b(e,t){return void 0===t&&(t=1),"rgba("+[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16),t].join(",")+")"}var w=1;function E(e,t,n){switch(n){case"webvtt.font.color":case"webvtt.font.opacity":var r=Services.prefs.getCharPref("webvtt.font.color"),o=Services.prefs.getIntPref("webvtt.font.opacity")/100;B.fontSet=b(r,o);break;case"webvtt.font.scale":w=Services.prefs.getIntPref("webvtt.font.scale")/100;break;case"webvtt.bg.color":case"webvtt.bg.opacity":var i=Services.prefs.getCharPref("webvtt.bg.color"),a=Services.prefs.getIntPref("webvtt.bg.opacity")/100;B.backgroundSet=b(i,a);break;case"webvtt.edge.color":case"webvtt.edge.type":var A=Services.prefs.getIntPref("webvtt.edge.type"),s=Services.prefs.getCharPref("webvtt.edge.color");B.edgeSet=["","0px 0px ","4px 4px 4px ","-2px -2px ","2px 2px "][A]+b(s)}}if("undefined"!=typeof Services){var B={};["webvtt.font.color","webvtt.font.opacity","webvtt.font.scale","webvtt.bg.color","webvtt.bg.opacity","webvtt.edge.color","webvtt.edge.type"].forEach((function(e){E(0,0,e),Services.prefs.addObserver(e,E,!1)}))}var x=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function k(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function I(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function S(){this.values=x(null)}function T(e,t,n,r){var o=r?e.split(r):[e];for(var i in o)if("string"==typeof o[i]){var a=o[i].split(n);2===a.length&&t(a[0],a[1])}}function L(e,t,n){var r=e;function o(){var t=I(e);if(null===t)throw new k(k.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function i(){e=e.replace(/^\s+/,"")}if(i(),t.startTime=o(),i(),"--\x3e"!==e.substr(0,3))throw new k(k.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),i(),t.endTime=o(),i(),function(e,t){var r=new S;T(e,(function(e,t){switch(e){case"region":for(var o=n.length-1;o>=0;o--)if(n[o].id===t){r.set(e,n[o].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var i=t.split(","),a=i[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start","middle","end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start","middle","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","middle","end","left","right"])}}),/:/,/\s/)}(e)}k.prototype=x(Error.prototype),k.prototype.constructor=k,k.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},S.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r=0&&t<=100)&&(this.set(e,t),!0)}};var R={"&":"&","<":"<",">":">","‎":"‎","‏":"‏"," ":" "},Q={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},O={v:"title",lang:"lang"},M={rt:"ruby"};function D(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]+>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e){return R[e]}function o(e){for(;p=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(p[0],r);return e}function i(e,t){return!M[t.localName]||M[t.localName]===e.localName}function a(t,n){var r=Q[t];if(!r)return null;var o=e.document.createElement(r);o.localName=r;var i=O[t];return i&&n&&(o[i]=n.trim()),o}for(var A,s=e.document.createElement("div"),c=s,u=[];null!==(A=n());)if("<"!==A[0])c.appendChild(e.document.createTextNode(o(A)));else{if("/"===A[1]){u.length&&u[u.length-1]===A.substr(2).replace(">","")&&(u.pop(),c=c.parentNode);continue}var l,f=I(A.substr(1,A.length-2));if(f){l=e.document.createProcessingInstruction("timestamp",f),c.appendChild(l);continue}var p=A.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!p)continue;if(!(l=a(p[1],p[3])))continue;if(!i(c,l))continue;p[2]&&(l.className=p[2].substr(1).replace("."," ")),u.push(p[1]),c.appendChild(l),c=l}return s}var F=[1470,1472,1475,1478,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1544,1547,1549,1563,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1645,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1765,1766,1774,1775,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1807,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2142,2208,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,8207,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64434,64435,64436,64437,64438,64439,64440,64441,64442,64443,64444,64445,64446,64447,64448,64449,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65020,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,67584,67585,67586,67587,67588,67589,67592,67594,67595,67596,67597,67598,67599,67600,67601,67602,67603,67604,67605,67606,67607,67608,67609,67610,67611,67612,67613,67614,67615,67616,67617,67618,67619,67620,67621,67622,67623,67624,67625,67626,67627,67628,67629,67630,67631,67632,67633,67634,67635,67636,67637,67639,67640,67644,67647,67648,67649,67650,67651,67652,67653,67654,67655,67656,67657,67658,67659,67660,67661,67662,67663,67664,67665,67666,67667,67668,67669,67671,67672,67673,67674,67675,67676,67677,67678,67679,67840,67841,67842,67843,67844,67845,67846,67847,67848,67849,67850,67851,67852,67853,67854,67855,67856,67857,67858,67859,67860,67861,67862,67863,67864,67865,67866,67867,67872,67873,67874,67875,67876,67877,67878,67879,67880,67881,67882,67883,67884,67885,67886,67887,67888,67889,67890,67891,67892,67893,67894,67895,67896,67897,67903,67968,67969,67970,67971,67972,67973,67974,67975,67976,67977,67978,67979,67980,67981,67982,67983,67984,67985,67986,67987,67988,67989,67990,67991,67992,67993,67994,67995,67996,67997,67998,67999,68e3,68001,68002,68003,68004,68005,68006,68007,68008,68009,68010,68011,68012,68013,68014,68015,68016,68017,68018,68019,68020,68021,68022,68023,68030,68031,68096,68112,68113,68114,68115,68117,68118,68119,68121,68122,68123,68124,68125,68126,68127,68128,68129,68130,68131,68132,68133,68134,68135,68136,68137,68138,68139,68140,68141,68142,68143,68144,68145,68146,68147,68160,68161,68162,68163,68164,68165,68166,68167,68176,68177,68178,68179,68180,68181,68182,68183,68184,68192,68193,68194,68195,68196,68197,68198,68199,68200,68201,68202,68203,68204,68205,68206,68207,68208,68209,68210,68211,68212,68213,68214,68215,68216,68217,68218,68219,68220,68221,68222,68223,68352,68353,68354,68355,68356,68357,68358,68359,68360,68361,68362,68363,68364,68365,68366,68367,68368,68369,68370,68371,68372,68373,68374,68375,68376,68377,68378,68379,68380,68381,68382,68383,68384,68385,68386,68387,68388,68389,68390,68391,68392,68393,68394,68395,68396,68397,68398,68399,68400,68401,68402,68403,68404,68405,68416,68417,68418,68419,68420,68421,68422,68423,68424,68425,68426,68427,68428,68429,68430,68431,68432,68433,68434,68435,68436,68437,68440,68441,68442,68443,68444,68445,68446,68447,68448,68449,68450,68451,68452,68453,68454,68455,68456,68457,68458,68459,68460,68461,68462,68463,68464,68465,68466,68472,68473,68474,68475,68476,68477,68478,68479,68608,68609,68610,68611,68612,68613,68614,68615,68616,68617,68618,68619,68620,68621,68622,68623,68624,68625,68626,68627,68628,68629,68630,68631,68632,68633,68634,68635,68636,68637,68638,68639,68640,68641,68642,68643,68644,68645,68646,68647,68648,68649,68650,68651,68652,68653,68654,68655,68656,68657,68658,68659,68660,68661,68662,68663,68664,68665,68666,68667,68668,68669,68670,68671,68672,68673,68674,68675,68676,68677,68678,68679,68680,126464,126465,126466,126467,126469,126470,126471,126472,126473,126474,126475,126476,126477,126478,126479,126480,126481,126482,126483,126484,126485,126486,126487,126488,126489,126490,126491,126492,126493,126494,126495,126497,126498,126500,126503,126505,126506,126507,126508,126509,126510,126511,126512,126513,126514,126516,126517,126518,126519,126521,126523,126530,126535,126537,126539,126541,126542,126543,126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,126567,126568,126569,126570,126572,126573,126574,126575,126576,126577,126578,126580,126581,126582,126583,126585,126586,126587,126588,126590,126592,126593,126594,126595,126596,126597,126598,126599,126600,126601,126603,126604,126605,126606,126607,126608,126609,126610,126611,126612,126613,126614,126615,126616,126617,126618,126619,126625,126626,126627,126629,126630,126631,126632,126633,126635,126636,126637,126638,126639,126640,126641,126642,126643,126644,126645,126646,126647,126648,126649,126650,126651,1114109];function P(){}function U(e,t,n){var r="undefined"!=typeof navigator&&/MSIE\s8\.0/.test(navigator.userAgent),o="rgba(255, 255, 255, 1)",i="rgba(0, 0, 0, 0.8)",a="";void 0!==B&&(o=B.fontSet,i=B.backgroundSet,a=B.edgeSet),r&&(o="rgb(255, 255, 255)",i="rgb(0, 0, 0)"),P.call(this),this.cue=t,this.cueDiv=D(e,t.text);var A={color:o,backgroundColor:i,textShadow:a,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};r||(A.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",A.unicodeBidi="plaintext"),this.applyStyles(A,this.cueDiv),this.div=e.document.createElement("div"),A={textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},r||(A.direction=function(e){var t,n=[],r="";if(!e||!e.childNodes)return"ltr";function o(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var r=n.match(/^.*(\n|\r)/);return r?(e.length=0,r[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(o(e,t),i(e)):void 0}for(o(n,e);r=i(n);)for(var a=0;a=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,o=0;ol&&(u=u<0?-1:1,u*=Math.ceil(l/c)*c),a<0&&(u+=""===i.vertical?n.height:n.width,A=A.reverse()),o.move(f,u)}else{var p=o.lineHeight/n.height*100;switch(i.lineAlign){case"middle":a-=p/2;break;case"end":a-=p}switch(i.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}A=["+y","-x","+x","-y"],o=new N(t)}var d=function(e,t){for(var o,i=new N(e),a=1,A=0;As&&(o=new N(e),a=s),e=new N(i)}return o||i}(o,A);t.move(d.toCSSCompatValues(n))}P.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},P.prototype.formatStyle=function(e,t){return 0===e?0:e+t},U.prototype=x(P.prototype),U.prototype.constructor=U,N.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},N.prototype.overlaps=function(e){return this.lefte.left&&this.tope.top},N.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},N.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},N.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},N.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},N.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},y.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},y.convertCueToDOMTree=function(e,t){return e&&t?D(e,t):null},y.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t]*<[a-z]*/g,V=/]+?start[^=]*=[^0-9]*([0-9]*)["^0-9"]*/i,H=/]*>/gi,J=function(e,t){return t=(((t||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join(""),e.replace(/|<\?(?:php)?[\s\S]*?\?>/gi,"").replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,(function(e,n){return t.indexOf("<"+n.toLowerCase()+">")>-1?e:""}))},Z=function(e){return e.sort((function(e,t){var n;return 0==(n=e.start-t.start)?e.end-t.end:n}))},K=function(){var e={},t=function(e){return e.map((function(e){return new h(e.start,e.end,e.text)}))};return e.load=function(e,n,r,o){fetch(e.file).then((function(e){e.ok?e.text().then((function(e){var o=[],i=[];if(e.indexOf("WEBVTT")>=0){OvenPlayerConsole.log("WEBVTT LOADED");var A=new j.Parser(window,j.StringDecoder());i=[],A.oncue=function(e){i.push(e)},A.onflush=function(){r(i)},A.parse(e)}else if(e.indexOf("SAMI")>=0){OvenPlayerConsole.log("SAMI LOADED");var s=function(e,t){var n,r,o,i,a,A,s,c,u,l;if(s=function(){var t,n,r,a,s,c,u,f,p,d,g,h,v,m,C,y;for(n=function(e){var n;return(n=new Error(e)).line=u,n.context=t,o.push(n)},u=1,p=[],v={},h=e;d=h.search(),!(f<=0||d<0);)f=h.slice(d+1).search(G)+1,t=f>0?h.slice(d,d+f):h.slice(d),u+=(null!=(m=h.slice(0,d).match(z))?m.length:void 0)||0,_.test(t)&&n("ERROR_BROKEN_TAGS"),h=h.slice(d+f),(null===(g=+(null!=(C=t.match(V))?parseFloat(C[1]/1e3):void 0))||g<0)&&n("ERROR_INVALID_TIME"),(s=i(t))||n("ERROR_INVALID_LANGUAGE"),u+=(null!=(y=t.match(z))?y.length:void 0)||0,t=(t=t.replace(z,"")).replace(H,"\n"),a={start:g,text:"",contents:r=J(t).trim()},s&&(a.text=r),v[s]||(v[s]=[]),a.start&&v[s].push(a);l=l||function(){var e,t,n=window.navigator,r=["language","browserLanguage","systemLanguage","userLanguage"];if(Array.isArray(n.languages))for(e=0;e0&&(c=b.indexOf(l)>-1?v[l]:v[b.filter((function(e){return"undefined"!==e}))[0]],c=Z(c),c=A(c),p=p.concat(c)),Z(p)},i=function(e){var t,r;if(e)for(t in n)if((r=n[t]).reClassName.test(e))return r.lang},A=function(e){var t,n,o;for(t=e.length;t--;)n=e[t],null!=(o=e[t-1])&&(o.end=n.start),n.contents&&" "!==n.contents?(delete e[t].contents,n.end||(n.end=n.start+r)):e.splice(t,1);return e},o=[],n={KRCC:{lang:"ko",reClassName:new RegExp("class[^=]*?=[\"'S]*(KRCC)['\"S]?","i")},KOCC:{lang:"ko",reClassName:new RegExp("class[^=]*?=[\"'S]*(KOCC)['\"S]?","i")},KR:{lang:"ko",reClassName:new RegExp("class[^=]*?=[\"'S]*(KR)['\"S]?","i")},ENCC:{lang:"en",reClassName:new RegExp("class[^=]*?=[\"'S]*(ENCC)['\"S]?","i")},EGCC:{lang:"en",reClassName:new RegExp("class[^=]*?=[\"'S]*(EGCC)['\"S]?","i")},EN:{lang:"en",reClassName:new RegExp("class[^=]*?=[\"'S]*(EN)['\"S]?","i")},JPCC:{lang:"ja",reClassName:new RegExp("class[^=]*?=[\"'S]*(JPCC)['\"S]?","i")}},null!=t?t.definedLangs:void 0)for(a in u=t.definedLangs)c=u[a],n[a]=c;return r=(null!=t?t.duration:void 0)||10,l=t.fixedLang,e=e.trim(),{result:s(),errors:o}}(e,{fixedLang:n});i=t(s.result),r(i)}else OvenPlayerConsole.log("SRT LOADED"),o=function(e){var t=[],n=(e=a(e)).split("\r\n\r\n");1===n.length&&(n=e.split("\n\n"));for(var r=0;rGet Adobe Flash player",reason:"It looks like not found swf or your environment is localhost."},103:{code:103,message:"Can not load due to dash.js. Please use the latest dash.js.",reason:"dash.js version is old."},104:{code:104,message:"Can not load due to google ima for Ads. ",reason:"Please check the google ima library."},105:{code:105,message:"Error initializing DASH.",reason:"Error initializing DASH."},106:{code:106,message:"Error initializing HLS.",reason:"Error initializing HLS."},300:{code:300,message:"Can not play due to unknown reasons.",reason:"Can not play due to unknown reasons."},301:{code:301,message:"Fetching process aborted by user.",reason:"Fetching process aborted by user."},302:{code:302,message:"Some of the media could not be downloaded due to a network error.",reason:"Error occurred when downloading."},303:{code:303,message:"Unable to load media. This may be due to a server or network error, or due to an unsupported format.",reason:"Error occurred when decoding."},304:{code:304,message:"Media playback has been canceled. It looks like your media is corrupted or your browser does not support the features your media uses.",reason:"Media playback not supported."},305:{code:305,message:"Can not load captions due to unknown reasons.",reason:"Can not load captions due to unknown reasons."},306:{code:306,message:"Unable to load media. This may be due to a server or network error, or due to an unsupported format.",reason:"The server cannot or will not process the request."},307:{code:307,message:"Unable to load media. This may be due to a server or network error, or due to an unsupported format.",reason:"The server refused the request."},308:{code:308,message:"Unable to load media. This may be due to a server or network error, or due to an unsupported format.",reason:"The server do not accept the request."},501:{code:501,message:"Connection with low-latency(OME) server failed.",reason:"WebSocket connection failed."},502:{code:502,message:"Connection with low-latency(OME) server failed.",reason:"WebRTC addIceCandidate failed."},503:{code:503,message:"Connection with low-latency(OME) server failed.",reason:"WebRTC setRemoteDescription failed."},504:{code:504,message:"Connection with low-latency(OME) server failed.",reason:"WebRTC peer createOffer failed."},505:{code:505,message:"Connection with low-latency(OME) server failed.",reason:"WebRTC setLocalDescription failed."},506:{code:506,message:"Connection with low-latency(OME) server failed.",reason:"WebRTC internal error."},510:{code:510,message:"Network connection is unstable. Check the network connection.",reason:"Network is slow."},511:{code:511,message:"Connection with low-latency(OME) terminated unexpectedly.",reason:"Unexpected end of connection."},512:{code:512,message:"Connection with low-latency(OME) server failed.",reason:"Connection timeout."}}}},{lang:"ko",ui:{context:"오븐플레이어에 관하여",controls:{live:"라이브",low_latency_live:"초저지연 라이브",low_latency_p2p:"초저지연 P2P"},playlist:"플레이리스트",setting:{title:"설정",speed:"재생 속도",speedUnit:"x",source:"소스",quality:"품질",caption:"자막",display:"표시"}},api:{message:{muted_play:"눌러서 소리 켜기"},error:{100:{code:100,message:"알 수 없는 이유로 로드 할 수 없습니다.",reason:"알 수 없는 이유로 로드 할 수 없습니다."},101:{code:101,message:"지원되는 미디어를 찾지 못해 로드 할 수 없습니다.",reason:"Can not load due to playable media not found."},102:{code:102,message:"플레시 로드가 중단 되었습니다.
Get Adobe Flash player",reason:"It looks like not found swf or your environment is localhost."},103:{code:103,message:"DashJS로 인해 로드 할 수 없습니다. 최신 dash.js를 사용해 주세요.",reason:"dash.js version is old."},104:{code:104,message:"Google IMA 라이브러리가 없어 로드 할 수 없습니다.",reason:"Please check the google ima library."},105:{code:105,message:"DASH 초기화 중 오류가 발생했습니다.",reason:"Error initializing DASH."},106:{code:106,message:"HLS 초기화 중 오류가 발생했습니다.",reason:"Error initializing HLS."},300:{code:300,message:"알 수 없는 이유로 재생할 수 없습니다.",reason:"Can not play due to unknown reasons."},301:{code:301,message:"사용자에 의한 프로세스 중단.",reason:"Fetching process aborted by user."},302:{code:302,message:"네트워크 오류로 인해 일부 미디어를 다운로드 할 수 없습니다.",reason:"Error occurred when downloading."},303:{code:303,message:"미디어를 로드 할 수 없습니다. 서버 또는 네트워크 오류 또는 지원되지 않는 형식으로 인해 발생할 수 있습니다.",reason:"Error occurred when decoding."},304:{code:304,message:"미디어 재생이 취소되었습니다. 미디어가 손상되었거나 브라우저가 미디어에서 사용하는 기능을 지원하지 않는 것 같습니다.",reason:"Media playback not supported."},305:{code:305,message:"알 수 없는 이유로 자막을 로드 할 수 없습니다.",reason:"Can not load captions due to unknown reasons."},306:{code:306,message:"미디어를 로드 할 수 없습니다. 서버 또는 네트워크 오류 또는 지원되지 않는 형식으로 인해 발생할 수 있습니다.",reason:"The server cannot or will not process the request."},307:{code:307,message:"미디어를 로드 할 수 없습니다. 서버 또는 네트워크 오류 또는 지원되지 않는 형식으로 인해 발생할 수 있습니다.",reason:"The server refused the request."},308:{code:308,message:"미디어를 로드 할 수 없습니다. 서버 또는 네트워크 오류 또는 지원되지 않는 형식으로 인해 발생할 수 있습니다.",reason:"The server do not accept the request."},501:{code:501,message:"웹소켓 연결 실패",reason:"WebSocket connection failed."},502:{code:502,message:"저지연(OME) 서버와 연결에 실패했습니다.",reason:"WebRTC addIceCandidate failed."},503:{code:503,message:"저지연(OME) 서버와 연결에 실패했습니다.",reason:"WebRTC setRemoteDescription failed."},504:{code:504,message:"저지연(OME) 서버와 연결에 실패했습니다.",reason:"WebRTC peer createOffer failed."},505:{code:505,message:"저지연(OME) 서버와 연결에 실패했습니다.",reason:"WebRTC setLocalDescription failed."},506:{code:506,message:"저지연(OME) 서버와 연결에 실패했습니다.",reason:"WebRTC internal error."},510:{code:510,message:"네트워크 연결이 불안정합니다. 네트워크 연결을 확인하십시오.",reason:"Network is slow."},511:{code:511,message:"저지연(OME) 서버와 연결에 실패했습니다.",reason:"Unexpected end of connection."},512:{code:512,message:"저지연(OME) 서버와 연결에 실패했습니다.",reason:"Connection timeout."}}}},{lang:"pl",ui:{context:"O OvenPlayer",controls:{live:"Transmisja na żywo",low_latency_live:"Transmisja z niskim opóźnieniem",low_latency_p2p:"Transmisja z niskim opóźnieniem P2P"},playlist:"Playlista",setting:{title:"Ustawienia",speed:"Prędkość",speedUnit:"x",source:"Źrodło",quality:"Jakość",caption:"Podtytuł",display:"Wyświetlacz"}},api:{message:{muted_play:"Naciśnij tutaj, aby aktywować dźwięk"},error:{100:{code:100,message:"Nie można załadować z nieznanego powodu.",reason:"Can not load due to unknown reasons."},101:{code:101,message:"Nie można załadować, ponieważ nie znaleziono multimediów, który można odtworzyć.",reason:"Can not load due to playable media not found."},102:{code:102,message:"Flash fetching process aborted.
Get Adobe Flash player",reason:"It looks like not found swf or your environment is localhost."},103:{code:103,message:"Nie można załadować, ponieważ wersja dash.js jest za stara.",reason:"dash.js version is old."},104:{code:104,message:"Can not load due to google ima for Ads. ",reason:"Please check the google ima library."},105:{code:105,message:"Nie można załadować, nie znaleziono DASH.",reason:"Error initializing DASH."},106:{code:106,message:"Nie można załadować, nie znaleziono hlsjs.",reason:"Error initializing HLS"},300:{code:300,message:"Nie można odtworzyć z nieznanego powodu.",reason:"Can not play due to unknown reasons."},301:{code:301,message:"Proces pobierania przerwany przez użytkownika.",reason:"Fetching process aborted by user."},302:{code:302,message:"Nie udało się pobrać niektórych multimediów z powodu błędu sieci.",reason:"Error occurred when downloading."},303:{code:303,message:"Nie udało się załadować niektórych multimediów. Może być to spowodowane problemem z serwerem, siecią lub niewspieranym formatem.",reason:"Error occurred when decoding."},304:{code:304,message:"Odtwarzanie zostało anulowane. Wygląda na to, że plik jest uszkodzony lub Twoja przeglądarka nie obsługuje tego pliku.",reason:"Media playback not supported."},305:{code:305,message:"Nie można wczytać napisów z nieznanego powodu.",reason:"Can not load captions due to unknown reasons."},306:{code:306,message:"Nie udało się załadować niektórych multimediów. Może być to spowodowane problemem z serwerem, siecią lub niewspieranym formatem.",reason:"The server cannot or will not process the request."},307:{code:307,message:"Nie udało się załadować niektórych multimediów. Może być to spowodowane problemem z serwerem, siecią lub niewspieranym formatem.",reason:"The server refused the request."},308:{code:308,message:"Nie udało się załadować niektórych multimediów. Może być to spowodowane problemem z serwerem, siecią lub niewspieranym formatem.",reason:"The server do not accept the request."},501:{code:501,message:"Połączenie z serwerem niskiego opóźnienia (OME) nie powiodło się.",reason:"WebSocket connection failed."},502:{code:502,message:"Połączenie z serwerem niskiego opóźnienia (OME) nie powiodło się.",reason:"WebRTC addIceCandidate failed."},503:{code:503,message:"Połączenie z serwerem niskiego opóźnienia (OME) nie powiodło się.",reason:"WebRTC setRemoteDescription failed."},504:{code:504,message:"Połączenie z serwerem niskiego opóźnienia (OME) nie powiodło się.",reason:"WebRTC peer createOffer failed."},505:{code:505,message:"Połączenie z serwerem niskiego opóźnienia (OME) nie powiodło się.",reason:"WebRTC setLocalDescription failed."},506:{code:506,message:"Połączenie z serwerem niskiego opóźnienia (OME) nie powiodło się.",reason:"WebRTC internal error."},510:{code:510,message:"Połączenie sieciowe jest niestabilne. Sprawdź swoją sieć.",reason:"Network is slow."},511:{code:511,message:"Połączenie z serwerem niskiego opóźnienia (OME) nieoczekiwanie zakończone.",reason:"Unexpected end of connection."},512:{code:512,message:"Połączenie z serwerem niskiego opóźnienia (OME) nie powiodło się.",reason:"Connection timeout."}}}}],Ye=function(e){return"subtitles"===e||"captions"===e},Ge=function(e){var t=e,n=[],r=function(e,t,n){var r=0,o=e.length;for(r=0;r1?n:n[0]};return(r=i().isElement(t)||i().every(t,(function(e){return i().isElement(e)}))?t:"document"===t?document:"window"===t?window:o(document,t))?(n.show=function(){r.style.display="block"},n.hide=function(){r.style.display="none"},n.addClass=function(e){r.classList?r.classList.add(e):-1===r.className.split(" ").indexOf(e)&&(r.className+=" "+e)},n.after=function(e){r.insertAdjacentHTML("afterend",e)},n.append=function(e){r.appendChild(e)},n.before=function(e){r.insertAdjacentHTML("beforebegin",e)},n.children=function(){return r.children||[]},n.contains=function(e){return r!==e&&r.contains(e)},n.empty=function(){r.innerHTML=""},n.find=function(t){return e(o(r,t))},n.css=function(e,t){if(!t)return r.style[e];r.length>0?r.forEach((function(n){n.style[e]=t})):r.style[e]=t},n.removeClass=function(e){r.classList?r.classList.remove(e):r.className=r.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")},n.removeAttribute=function(e){r.removeAttribute(e)},n.text=function(e){if(void 0===e)return r.textContent;r.textContent=e},n.html=function(e){r.innerHTML=e},n.hasClass=function(e){return r.classList?r.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(r.name)},n.is=function(e){return r===e},n.offset=function(){var e=r.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},n.width=function(){return r.clientWidth},n.height=function(){return r.clientHeight},n.attr=function(e){return r.getAttribute(e)},n.replace=function(e){r.replaceWith(e)},n.remove=function(){r.length>1?r.parentElement.removeChild(r):r.remove()},n.removeChild=function(e){if(e)r.removeChild(e);else for(;r.hasChildNodes();)r.removeChild(r.firstChild)},n.get=function(){return r},n.closest=function(t){r.closest=function(e){var t=r;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null};var n=r.closest(t);return n?e(n):null},n):null}),_e=function(e,t){if(e)return 0==e.indexOf("rtmp:")||"rtmp"==t},Ve=function(e,t){return!!e&&(0===e.indexOf("ws:")||0===e.indexOf("wss:")||"webrtc"===t)},He=function(e,t){if(e)return"hls"===t||"m3u8"===t||"application/vnd.apple.mpegurl"===t||"m3u8"==A(e)},Je=function(e,t){if(e)return"mpd"===t||"dash"===t||"application/dash+xml"===t||"mpd"==A(e)},Ze=function(e){if(!e)return null;var t=null;if("string"==typeof e)t=document.getElementById(e);else{if(!e.nodeType)return null;t=e}return t},Ke=function(){var e={};OvenPlayerConsole.log("SupportChecker loaded.");var t=Y(),n=[{name:"html5",checkSupport:function(e){var n=document.createElement("video");if(!n.canPlayType)return!1;var r=e.file,o=e.type;if(!o)return!1;var i=e.mimeType||{aac:"audio/mp4",mp4:"video/mp4",f4v:"video/mp4",m4v:"video/mp4",mov:"video/mp4",mp3:"audio/mpeg",mpeg:"audio/mpeg",ogv:"video/ogg",ogg:"video/ogg",oga:"video/ogg",vorbis:"video/ogg",webm:"video/webm",f4a:"video/aac",m3u8:"application/vnd.apple.mpegurl",m3u:"application/vnd.apple.mpegurl",hls:"application/vnd.apple.mpegurl"}[o];return!(He(r,o)&&("Microsoft Edge"===t.browser||"Android"===t.os)||_e(r,o)||Ve(r,o)||!i||!n.canPlayType(i))}},{name:"webrtc",checkSupport:function(e){if(!document.createElement("video").canPlayType)return!1;if(_e(t,n))return!1;var t=e.file,n=e.type;return!!Ve(t,n)}},{name:"dash",checkSupport:function(e){var t=e.file,n=e.type;return!_e(t,n)&&!("function"!=typeof(window.MediaSource||window.WebKitMediaSource)||!Je(t,n))}},{name:"hls",checkSupport:function(e){document.createElement("video");var t,n,r,o,i=e.file,a=e.type;return!_e(i,a)&&(t=function(){if("undefined"!=typeof window)return window.MediaSource||window.WebKitMediaSource}(),n=window.SourceBuffer||window.WebKitSourceBuffer,r=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),o=!n||n.prototype&&"function"==typeof n.prototype.appendBuffer&&"function"==typeof n.prototype.remove,!!r&&!!o)}},{name:"rtmp",checkSupport:function(e){var n=e.file,r=e.type;return!(!_e(n,r)||!function(){var e=!1;if("ActiveXObject"in window)try{e=!!new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(t){e=!1}else e=!!navigator.mimeTypes["application/x-shockwave-flash"];return e}()||"Microsoft Edge"===t.browser||"Android"===t.os||"iOS"===t.os||"Safari"===t.browser)}}];return e.findProviderNameBySource=function(e){OvenPlayerConsole.log("SupportChecker : findProviderNameBySource()",e);for(var t=e===Object(e)?e:{},r=0;r0&&void 0!==arguments[0]?arguments[0]:{};ct(this,e),this.id=t.id||null,this.adId=t.adId||null,this.sequence=t.sequence||null,this.apiFramework=t.apiFramework||null,this.trackingEvents={}})),gt=function(e){nt(n,e);var t=ot(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ct(this,n),(e=t.call(this,r)).type="companion",e.variations=[],e}return st(n)}(dt);function ht(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];for(var r in t.ASSETURI&&(t.ASSETURI=vt(t.ASSETURI)),t.CONTENTPLAYHEAD&&(t.CONTENTPLAYHEAD=vt(t.CONTENTPLAYHEAD)),t.ERRORCODE&&!/^[0-9]{3}$/.test(t.ERRORCODE)&&(t.ERRORCODE=900),t.CACHEBUSTING=mt(Math.round(1e8*Math.random()).toString()),t.TIMESTAMP=vt((new Date).toISOString()),t.RANDOM=t.random=t.CACHEBUSTING,e){var o=e[r];if("string"==typeof o){for(var i in t){var a=t[i],A="[".concat(i,"]"),s="%%".concat(i,"%%");o=(o=o.replace(A,a)).replace(s,a)}n.push(o)}}return n}function vt(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%".concat(e.charCodeAt(0).toString(16))}))}function mt(e){return e.length<8?Ct(0,8-e.length,!1).map((function(e){return"0"})).join("")+e:e}function Ct(e,t,n){for(var r=[],o=ei;o?a++:a--)r.push(a);return r}var yt={track:function(e,t){ht(e,t).forEach((function(e){"undefined"!=typeof window&&null!==window&&((new Image).src=e)}))},resolveURLTemplates:ht,encodeURIComponentRFC3986:vt,leftpad:mt,range:Ct,isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},flatten:function e(t){return t.reduce((function(t,n){return t.concat(Array.isArray(n)?e(n):n)}),[])}},bt=function(e,t){var n=e.childNodes;for(var r in n){var o=n[r];if(o.nodeName===t)return o}},wt=function(e,t){var n=[],r=e.childNodes;for(var o in r){var i=r[o];i.nodeName===t&&n.push(i)}return n},Et=function(e,t){if(!t)return e;if(0===e.indexOf("//")){var n=location.protocol;return"".concat(n).concat(e)}return-1===e.indexOf("://")?"".concat(t.slice(0,t.lastIndexOf("/")),"/").concat(e):e},Bt=function(e){return-1!==["true","TRUE","1"].indexOf(e)},xt=function(e){return e&&(e.textContent||e.text||"").trim()},kt=function(e,t,n){var r=t.getAttribute(e);r&&n.setAttribute(e,r)},It=function(e){if(null==e)return-1;if(yt.isNumeric(e))return parseInt(e);var t=e.split(":");if(3!==t.length)return-1;var n=t[2].split("."),r=parseInt(n[0]);2===n.length&&(r+=parseFloat("0.".concat(n[1])));var o=parseInt(60*t[1]),i=parseInt(60*t[0]*60);return isNaN(i)||isNaN(o)||isNaN(r)||o>3600||r>60?-1:i+o+r},St=function(e){var t=[],n=null;return e.forEach((function(r,o){if(r.sequence&&(r.sequence=parseInt(r.sequence,10)),r.sequence>1){var i=e[o-1];if(i&&i.sequence===r.sequence-1)return void(n&&n.push(r));delete r.sequence}n=[r],t.push(n)})),t},Tt=function(e,t){e.errorURLTemplates=t.errorURLTemplates.concat(e.errorURLTemplates),e.impressionURLTemplates=t.impressionURLTemplates.concat(e.impressionURLTemplates),e.extensions=t.extensions.concat(e.extensions),e.creatives.forEach((function(e){if(t.trackingEvents&&t.trackingEvents[e.type])for(var n in t.trackingEvents[e.type]){var r=t.trackingEvents[e.type][n];e.trackingEvents[n]||(e.trackingEvents[n]=[]),e.trackingEvents[n]=e.trackingEvents[n].concat(r)}})),t.videoClickTrackingURLTemplates&&t.videoClickTrackingURLTemplates.length&&e.creatives.forEach((function(e){"linear"===e.type&&(e.videoClickTrackingURLTemplates=e.videoClickTrackingURLTemplates.concat(t.videoClickTrackingURLTemplates))})),t.videoCustomClickURLTemplates&&t.videoCustomClickURLTemplates.length&&e.creatives.forEach((function(e){"linear"===e.type&&(e.videoCustomClickURLTemplates=e.videoCustomClickURLTemplates.concat(t.videoCustomClickURLTemplates))})),t.videoClickThroughURLTemplate&&e.creatives.forEach((function(e){"linear"===e.type&&null==e.videoClickThroughURLTemplate&&(e.videoClickThroughURLTemplate=t.videoClickThroughURLTemplate)}))};function Lt(e,t){var n=new gt(t);return wt(e,"Companion").forEach((function(e){var t=new pt;t.id=e.getAttribute("id")||null,t.width=e.getAttribute("width"),t.height=e.getAttribute("height"),t.companionClickTrackingURLTemplates=[],wt(e,"HTMLResource").forEach((function(e){t.type=e.getAttribute("creativeType")||"text/html",t.htmlResource=xt(e)})),wt(e,"IFrameResource").forEach((function(e){t.type=e.getAttribute("creativeType")||0,t.iframeResource=xt(e)})),wt(e,"StaticResource").forEach((function(n){t.type=n.getAttribute("creativeType")||0,wt(e,"AltText").forEach((function(e){t.altText=xt(e)})),t.staticResource=xt(n)})),wt(e,"TrackingEvents").forEach((function(e){wt(e,"Tracking").forEach((function(e){var n=e.getAttribute("event"),r=xt(e);n&&r&&(null==t.trackingEvents[n]&&(t.trackingEvents[n]=[]),t.trackingEvents[n].push(r))}))})),wt(e,"CompanionClickTracking").forEach((function(e){t.companionClickTrackingURLTemplates.push(xt(e))})),t.companionClickThroughURLTemplate=xt(bt(e,"CompanionClickThrough")),t.companionClickTrackingURLTemplate=xt(bt(e,"CompanionClickTracking")),n.variations.push(t)})),n}var Rt=function(e){nt(n,e);var t=ot(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ct(this,n),(e=t.call(this,r)).type="linear",e.duration=0,e.skipDelay=null,e.mediaFiles=[],e.videoClickThroughURLTemplate=null,e.videoClickTrackingURLTemplates=[],e.videoCustomClickURLTemplates=[],e.adParameters=null,e.icons=[],e}return st(n)}(dt),Qt=st((function e(){ct(this,e),this.program=null,this.height=0,this.width=0,this.xPosition=0,this.yPosition=0,this.apiFramework=null,this.offset=null,this.duration=0,this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.iconClickThroughURLTemplate=null,this.iconClickTrackingURLTemplates=[],this.iconViewTrackingURLTemplate=null})),Ot=st((function e(){ct(this,e),this.id=null,this.fileURL=null,this.deliveryType="progressive",this.mimeType=null,this.codec=null,this.bitrate=0,this.minBitrate=0,this.maxBitrate=0,this.width=0,this.height=0,this.apiFramework=null,this.scalable=null,this.maintainAspectRatio=null}));function Mt(e,t){var n,r=new Rt(t);r.duration=It(xt(bt(e,"Duration")));var o=e.getAttribute("skipoffset");if(null==o)r.skipDelay=null;else if("%"===o.charAt(o.length-1)&&-1!==r.duration){var i=parseInt(o,10);r.skipDelay=r.duration*(i/100)}else r.skipDelay=It(o);var a=bt(e,"VideoClicks");a&&(r.videoClickThroughURLTemplate=xt(bt(a,"ClickThrough")),wt(a,"ClickTracking").forEach((function(e){r.videoClickTrackingURLTemplates.push(xt(e))})),wt(a,"CustomClick").forEach((function(e){r.videoCustomClickURLTemplates.push(xt(e))})));var A=bt(e,"AdParameters");A&&(r.adParameters=xt(A)),wt(e,"TrackingEvents").forEach((function(e){wt(e,"Tracking").forEach((function(e){var t=e.getAttribute("event"),o=xt(e);if(t&&o){if("progress"===t){if(!(n=e.getAttribute("offset")))return;t="%"===n.charAt(n.length-1)?"progress-".concat(n):"progress-".concat(Math.round(It(n)))}null==r.trackingEvents[t]&&(r.trackingEvents[t]=[]),r.trackingEvents[t].push(o)}}))})),wt(e,"MediaFiles").forEach((function(e){wt(e,"MediaFile").forEach((function(e){var t=new Ot;t.id=e.getAttribute("id"),t.fileURL=xt(e),t.deliveryType=e.getAttribute("delivery"),t.codec=e.getAttribute("codec"),t.mimeType=e.getAttribute("type"),t.apiFramework=e.getAttribute("apiFramework"),t.bitrate=parseInt(e.getAttribute("bitrate")||0),t.minBitrate=parseInt(e.getAttribute("minBitrate")||0),t.maxBitrate=parseInt(e.getAttribute("maxBitrate")||0),t.width=parseInt(e.getAttribute("width")||0),t.height=parseInt(e.getAttribute("height")||0);var n=e.getAttribute("scalable");n&&"string"==typeof n&&("true"===(n=n.toLowerCase())?t.scalable=!0:"false"===n&&(t.scalable=!1));var o=e.getAttribute("maintainAspectRatio");o&&"string"==typeof o&&("true"===(o=o.toLowerCase())?t.maintainAspectRatio=!0:"false"===o&&(t.maintainAspectRatio=!1)),r.mediaFiles.push(t)}))}));var s=bt(e,"Icons");return s&&wt(s,"Icon").forEach((function(e){var t=new Qt;t.program=e.getAttribute("program"),t.height=parseInt(e.getAttribute("height")||0),t.width=parseInt(e.getAttribute("width")||0),t.xPosition=function(e){return-1!==["left","right"].indexOf(e)?e:parseInt(e||0)}(e.getAttribute("xPosition")),t.yPosition=function(e){return-1!==["top","bottom"].indexOf(e)?e:parseInt(e||0)}(e.getAttribute("yPosition")),t.apiFramework=e.getAttribute("apiFramework"),t.offset=It(e.getAttribute("offset")),t.duration=It(e.getAttribute("duration")),wt(e,"HTMLResource").forEach((function(e){t.type=e.getAttribute("creativeType")||"text/html",t.htmlResource=xt(e)})),wt(e,"IFrameResource").forEach((function(e){t.type=e.getAttribute("creativeType")||0,t.iframeResource=xt(e)})),wt(e,"StaticResource").forEach((function(e){t.type=e.getAttribute("creativeType")||0,t.staticResource=xt(e)}));var n=bt(e,"IconClicks");n&&(t.iconClickThroughURLTemplate=xt(bt(n,"IconClickThrough")),wt(n,"IconClickTracking").forEach((function(e){t.iconClickTrackingURLTemplates.push(xt(e))}))),t.iconViewTrackingURLTemplate=xt(bt(e,"IconViewTracking")),r.icons.push(t)})),r}var Dt,Ft=function(e){nt(n,e);var t=ot(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ct(this,n),(e=t.call(this,r)).type="nonlinear",e.variations=[],e}return st(n)}(dt),Pt=st((function e(){ct(this,e),this.id=null,this.width=0,this.height=0,this.expandedWidth=0,this.expandedHeight=0,this.scalable=!0,this.maintainAspectRatio=!0,this.minSuggestedDuration=0,this.apiFramework="static",this.type=null,this.staticResource=null,this.htmlResource=null,this.iframeResource=null,this.nonlinearClickThroughURLTemplate=null,this.nonlinearClickTrackingURLTemplates=[],this.adParameters=null}));function Ut(e,t){var n=new Ft(t);return wt(e,"TrackingEvents").forEach((function(e){var t,r;wt(e,"Tracking").forEach((function(e){t=e.getAttribute("event"),r=xt(e),t&&r&&(null==n.trackingEvents[t]&&(n.trackingEvents[t]=[]),n.trackingEvents[t].push(r))}))})),wt(e,"NonLinear").forEach((function(e){var t=new Pt;t.id=e.getAttribute("id")||null,t.width=e.getAttribute("width"),t.height=e.getAttribute("height"),t.expandedWidth=e.getAttribute("expandedWidth"),t.expandedHeight=e.getAttribute("expandedHeight"),t.scalable=Bt(e.getAttribute("scalable")),t.maintainAspectRatio=Bt(e.getAttribute("maintainAspectRatio")),t.minSuggestedDuration=It(e.getAttribute("minSuggestedDuration")),t.apiFramework=e.getAttribute("apiFramework"),wt(e,"HTMLResource").forEach((function(e){t.type=e.getAttribute("creativeType")||"text/html",t.htmlResource=xt(e)})),wt(e,"IFrameResource").forEach((function(e){t.type=e.getAttribute("creativeType")||0,t.iframeResource=xt(e)})),wt(e,"StaticResource").forEach((function(e){t.type=e.getAttribute("creativeType")||0,t.staticResource=xt(e)}));var r=bt(e,"AdParameters");r&&(t.adParameters=xt(r)),t.nonlinearClickThroughURLTemplate=xt(bt(e,"NonLinearClickThrough")),wt(e,"NonLinearClickTracking").forEach((function(e){t.nonlinearClickTrackingURLTemplates.push(xt(e))})),n.variations.push(t)})),n}function Nt(e){var t=e.childNodes;for(var n in t){var r=t[n];if(-1!==["Wrapper","InLine"].indexOf(r.nodeName)){if(kt("id",e,r),kt("sequence",e,r),"Wrapper"===r.nodeName)return jt(r);if("InLine"===r.nodeName)return Wt(r)}}}function Wt(e){var t=e.childNodes,n=new ut;for(var r in n.id=e.getAttribute("id")||null,n.sequence=e.getAttribute("sequence")||null,t){var o=t[r];switch(o.nodeName){case"Error":n.errorURLTemplates.push(xt(o));break;case"Impression":n.impressionURLTemplates.push(xt(o));break;case"Creatives":wt(o,"Creative").forEach((function(e){var t={id:e.getAttribute("id")||null,adId:Gt(e),sequence:e.getAttribute("sequence")||null,apiFramework:e.getAttribute("apiFramework")||null};for(var r in e.childNodes){var o=e.childNodes[r];switch(o.nodeName){case"Linear":var i=Mt(o,t);i&&n.creatives.push(i);break;case"NonLinearAds":var a=Ut(o,t);a&&n.creatives.push(a);break;case"CompanionAds":var A=Lt(o,t);A&&n.creatives.push(A)}}}));break;case"Extensions":Yt(n.extensions,wt(o,"Extension"));break;case"AdSystem":n.system={value:xt(o),version:o.getAttribute("version")||null};break;case"AdTitle":n.title=xt(o);break;case"Description":n.description=xt(o);break;case"Advertiser":n.advertiser=xt(o);break;case"Pricing":n.pricing={value:xt(o),model:o.getAttribute("model")||null,currency:o.getAttribute("currency")||null};break;case"Survey":n.survey=xt(o)}}return n}function jt(e){var t=Wt(e),n=bt(e,"VASTAdTagURI");if(n?t.nextWrapperURL=xt(n):(n=bt(e,"VASTAdTagURL"))&&(t.nextWrapperURL=xt(bt(n,"URL"))),t.creatives.forEach((function(e){if(-1!==["linear","nonlinear"].indexOf(e.type)){if(e.trackingEvents){t.trackingEvents||(t.trackingEvents={}),t.trackingEvents[e.type]||(t.trackingEvents[e.type]={});var n=function(n){var r=e.trackingEvents[n];t.trackingEvents[e.type][n]||(t.trackingEvents[e.type][n]=[]),r.forEach((function(r){t.trackingEvents[e.type][n].push(r)}))};for(var r in e.trackingEvents)n(r)}e.videoClickTrackingURLTemplates&&(t.videoClickTrackingURLTemplates||(t.videoClickTrackingURLTemplates=[]),e.videoClickTrackingURLTemplates.forEach((function(e){t.videoClickTrackingURLTemplates.push(e)}))),e.videoClickThroughURLTemplate&&(t.videoClickThroughURLTemplate=e.videoClickThroughURLTemplate),e.videoCustomClickURLTemplates&&(t.videoCustomClickURLTemplates||(t.videoCustomClickURLTemplates=[]),e.videoCustomClickURLTemplates.forEach((function(e){t.videoCustomClickURLTemplates.push(e)})))}})),t.nextWrapperURL)return t}function Yt(e,t){t.forEach((function(t){var n=new lt,r=t.attributes,o=t.childNodes;if(t.attributes)for(var i in r){var a=r[i];a.nodeName&&a.nodeValue&&(n.attributes[a.nodeName]=a.nodeValue)}for(var A in o){var s=o[A],c=xt(s);if("#comment"!==s.nodeName&&""!==c){var u=new ft;if(u.name=s.nodeName,u.value=c,s.attributes){var l=s.attributes;for(var f in l){var p=l[f];u.attributes[p.nodeName]=p.nodeValue}}n.children.push(u)}}e.push(n)}))}function Gt(e){return e.getAttribute("AdID")||e.getAttribute("adID")||e.getAttribute("adId")||null}function zt(){}function _t(){_t.init.call(this)}function Vt(e){return void 0===e._maxListeners?_t.defaultMaxListeners:e._maxListeners}function Ht(e,t,n){if(t)e.call(n);else for(var r=e.length,o=tn(e,r),i=0;i0&&a.length>o){a.warned=!0;var A=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");A.name="MaxListenersExceededWarning",A.emitter=e,A.type=t,A.count=a.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(A)}}else a=i[t]=n,++e._eventsCount;return e}function $t(e,t,n){var r=!1;function o(){e.removeListener(t,o),r||(r=!0,n.apply(e,arguments))}return o.listener=n,o}function en(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function tn(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}zt.prototype=Object.create(null),_t.EventEmitter=_t,_t.usingDomains=!1,_t.prototype.domain=void 0,_t.prototype._events=void 0,_t.prototype._maxListeners=void 0,_t.defaultMaxListeners=10,_t.init=function(){this.domain=null,_t.usingDomains&&(!Dt.active||this instanceof Dt.Domain||(this.domain=Dt.active)),this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new zt,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},_t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},_t.prototype.getMaxListeners=function(){return Vt(this)},_t.prototype.emit=function(e){var t,n,r,o,i,a,A,s="error"===e;if(a=this._events)s=s&&null==a.error;else if(!s)return!1;if(A=this.domain,s){if(t=arguments[1],!A){if(t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=A,t.domainThrown=!1,A.emit("error",t),!1}if(!(n=a[e]))return!1;var u="function"==typeof n;switch(r=arguments.length){case 1:Ht(n,u,this);break;case 2:Jt(n,u,this,arguments[1]);break;case 3:Zt(n,u,this,arguments[1],arguments[2]);break;case 4:Kt(n,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(r-1),i=1;i0;)if(n[i]===t||n[i].listener&&n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new zt,this;delete r[e]}else!function(e,t){for(var n=t,r=n+1,o=e.length;r0?Reflect.ownKeys(this._events):[]};var nn=function(e,t,n){var r="function"==typeof window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLDOM"):void 0;if(!r)return n(new Error("FlashURLHandler: Microsoft.XMLDOM format not supported"));r.async=!1,request.open("GET",e),request.timeout=t.timeout||0,request.withCredentials=t.withCredentials||!1,request.send(),request.onprogress=function(){},request.onload=function(){r.loadXML(request.responseText),n(null,r)}},rn=function(){return window.XDomainRequest&&(e=new XDomainRequest),!!e;var e},on=function(e,t,n){n(new Error("Please bundle the library for node to use the node urlHandler"))};function an(){try{var e=new window.XMLHttpRequest;return"withCredentials"in e?e:null}catch(e){return console.log("Error in XHRURLHandler support check:",e),null}}var An,sn,cn=function(e,t,n){if("https:"===window.location.protocol&&0===e.indexOf("http://"))return n(new Error("XHRURLHandler: Cannot go from HTTPS to HTTP."));try{var r=an();r.open("GET",e),r.timeout=t.timeout||0,r.withCredentials=t.withCredentials||!1,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(null,r.responseXML):n(new Error("XHRURLHandler: ".concat(r.statusText))))},r.send()}catch(e){n(new Error("XHRURLHandler: Unexpected error"))}},un=function(){return!!an()},ln={get:function(e,t,n){return n||("function"==typeof t&&(n=t),t={}),"undefined"==typeof window||null===window?on(e,t,n):un()?cn(e,t,n):rn()?nn(e,t,n):n(new Error("Current context is not supported by any of the default URLHandlers. Please provide a custom URLHandler"))}},fn=st((function e(){ct(this,e),this.ads=[],this.errorURLTemplates=[]})),pn={ERRORCODE:900,extensions:[]},dn=function(e){nt(n,e);var t=ot(n);function n(){var e;return ct(this,n),(e=t.call(this)).remainingAds=[],e.parentURLs=[],e.errorURLTemplates=[],e.rootErrorURLTemplates=[],e.maxWrapperDepth=null,e.URLTemplateFilters=[],e.fetchingOptions={},e}return st(n,[{key:"addURLTemplateFilter",value:function(e){"function"==typeof e&&this.URLTemplateFilters.push(e)}},{key:"removeURLTemplateFilter",value:function(){this.URLTemplateFilters.pop()}},{key:"countURLTemplateFilters",value:function(){return this.URLTemplateFilters.length}},{key:"clearURLTemplateFilters",value:function(){this.URLTemplateFilters=[]}},{key:"trackVastError",value:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o0&&void 0!==arguments[0]?arguments[0]:{};this.rootURL="",this.remainingAds=[],this.parentURLs=[],this.errorURLTemplates=[],this.rootErrorURLTemplates=[],this.maxWrapperDepth=e.wrapperLimit||10,this.fetchingOptions={timeout:e.timeout,withCredentials:e.withCredentials},this.urlHandler=e.urlhandler||ln}},{key:"getRemainingAds",value:function(e){var t=this;if(0===this.remainingAds.length)return Promise.reject(new Error("No more ads are available for the given VAST"));var n=e?yt.flatten(this.remainingAds):this.remainingAds.shift();return this.errorURLTemplates=[],this.parentURLs=[],this.resolveAds(n,{wrapperDepth:0,originalUrl:this.rootURL}).then((function(e){return t.buildVASTResponse(e)}))}},{key:"getAndParseVAST",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.initParsingStatus(n),this.rootURL=e,this.fetchVAST(e).then((function(r){return n.originalUrl=e,n.isRootVAST=!0,t.parse(r,n).then((function(e){return t.buildVASTResponse(e)}))}))}},{key:"parseVAST",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.initParsingStatus(n),n.isRootVAST=!0,this.parse(e,n).then((function(e){return t.buildVASTResponse(e)}))}},{key:"buildVASTResponse",value:function(e){var t=new fn;return t.ads=e,t.errorURLTemplates=this.getErrorURLTemplates(),this.completeWrapperResolving(t),t}},{key:"parse",value:function(e,t){var n=t.resolveAll,r=void 0===n||n,o=t.wrapperSequence,i=void 0===o?null:o,a=t.originalUrl,A=void 0===a?null:a,s=t.wrapperDepth,c=void 0===s?0:s,u=t.isRootVAST,l=void 0!==u&&u;if(!e||!e.documentElement||"VAST"!==e.documentElement.nodeName)return Promise.reject(new Error("Invalid VAST XMLDocument"));var f=[],p=e.documentElement.childNodes;for(var d in p){var g=p[d];if("Error"===g.nodeName){var h=xt(g);l?this.rootErrorURLTemplates.push(h):this.errorURLTemplates.push(h)}if("Ad"===g.nodeName){var v=Nt(g);v?f.push(v):this.trackVastError(this.getErrorURLTemplates(),{ERRORCODE:101})}}var m=f.length,C=f[m-1];return 1===m&&null!=i&&C&&!C.sequence&&(C.sequence=i),!1===r&&(this.remainingAds=St(f),f=this.remainingAds.shift()),this.resolveAds(f,{wrapperDepth:c,originalUrl:A})}},{key:"resolveAds",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=n.wrapperDepth,o=n.originalUrl,i=[];return t.forEach((function(t){var n=e.resolveWrappers(t,r,o);i.push(n)})),Promise.all(i).then((function(t){var n=yt.flatten(t);if(!n&&e.remainingAds.length>0){var i=e.remainingAds.shift();return e.resolveAds(i,{wrapperDepth:r,originalUrl:o})}return n}))}},{key:"resolveWrappers",value:function(e,t,n){var r=this;return new Promise((function(o,i){if(t++,!e.nextWrapperURL)return delete e.nextWrapperURL,o(e);if(t>=r.maxWrapperDepth||-1!==r.parentURLs.indexOf(e.nextWrapperURL))return e.errorCode=302,delete e.nextWrapperURL,o(e);e.nextWrapperURL=Et(e.nextWrapperURL,n);var a=e.sequence;n=e.nextWrapperURL,r.fetchVAST(e.nextWrapperURL,t,n).then((function(i){return r.parse(i,{originalUrl:n,wrapperSequence:a,wrapperDepth:t}).then((function(t){if(delete e.nextWrapperURL,0===t.length)return e.creatives=[],o(e);t.forEach((function(t){t&&Tt(t,e)})),o(t)}))})).catch((function(t){e.errorCode=301,e.errorMessage=t.message,o(e)}))}))}},{key:"completeWrapperResolving",value:function(e){if(0===e.ads.length)this.trackVastError(e.errorURLTemplates,{ERRORCODE:303});else for(var t=e.ads.length-1;t>=0;t--){var n=e.ads[t];(n.errorCode||0===n.creatives.length)&&(this.trackVastError(n.errorURLTemplates.concat(e.errorURLTemplates),{ERRORCODE:n.errorCode||303},{ERRORMESSAGE:n.errorMessage||""},{extensions:n.extensions},{system:n.system}),e.ads.splice(t,1))}}}]),n}(_t),gn=null,hn={data:{},length:0,getItem:function(e){return this.data[e]},setItem:function(e,t){this.data[e]=t,this.length=Object.keys(this.data).length},removeItem:function(e){delete data[e],this.length=Object.keys(this.data).length},clear:function(){this.data={},this.length=0}},vn=function(){function e(){ct(this,e),this.storage=this.initStorage()}return st(e,[{key:"initStorage",value:function(){if(gn)return gn;try{gn="undefined"!=typeof window&&null!==window?window.localStorage||window.sessionStorage:null}catch(e){gn=null}return gn&&!this.isStorageDisabled(gn)||(gn=hn).clear(),gn}},{key:"isStorageDisabled",value:function(e){var t="__VASTStorage__";try{if(e.setItem(t,t),e.getItem(t)!==t)return e.removeItem(t),!0}catch(e){return!0}return e.removeItem(t),!1}},{key:"getItem",value:function(e){return this.storage.getItem(e)}},{key:"setItem",value:function(e,t){return this.storage.setItem(e,t)}},{key:"removeItem",value:function(e){return this.storage.removeItem(e)}},{key:"clear",value:function(){return this.storage.clear()}}]),e}(),mn=function(){function e(t,n,r){ct(this,e),this.cappingFreeLunch=t||0,this.cappingMinimumTimeInterval=n||0,this.defaultOptions={withCredentials:!1,timeout:0},this.vastParser=new dn,this.storage=r||new vn,void 0===this.lastSuccessfulAd&&(this.lastSuccessfulAd=0),void 0===this.totalCalls&&(this.totalCalls=0),void 0===this.totalCallsTimeout&&(this.totalCallsTimeout=0)}return st(e,[{key:"getParser",value:function(){return this.vastParser}},{key:"lastSuccessfulAd",get:function(){return this.storage.getItem("vast-client-last-successful-ad")},set:function(e){this.storage.setItem("vast-client-last-successful-ad",e)}},{key:"totalCalls",get:function(){return this.storage.getItem("vast-client-total-calls")},set:function(e){this.storage.setItem("vast-client-total-calls",e)}},{key:"totalCallsTimeout",get:function(){return this.storage.getItem("vast-client-total-calls-timeout")},set:function(e){this.storage.setItem("vast-client-total-calls-timeout",e)}},{key:"hasRemainingAds",value:function(){return this.vastParser.remainingAds.length>0}},{key:"getNextAds",value:function(e){return this.vastParser.getRemainingAds(e)}},{key:"get",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Date.now();return(n=Object.assign(this.defaultOptions,n)).hasOwnProperty("resolveAll")||(n.resolveAll=!1),this.totalCallsTimeout=t.totalCalls)return i(new Error("VAST call canceled – FreeLunch capping not reached yet ".concat(t.totalCalls,"/").concat(t.cappingFreeLunch)));var a=r-t.lastSuccessfulAd;if(a<0)t.lastSuccessfulAd=0;else if(a3&&void 0!==arguments[3]?arguments[3]:null;for(var A in ct(this,n),(i=t.call(this)).ad=r,i.creative=o,i.variation=a,i.muted=!1,i.impressed=!1,i.skippable=!1,i.trackingEvents={},i._alreadyTriggeredQuartiles={},i.emitAlwaysEvents=["creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","resume","pause","rewind","skip","closeLinear","close"],i.creative.trackingEvents){var s=i.creative.trackingEvents[A];i.trackingEvents[A]=s.slice(0)}return i.creative instanceof Rt?i._initLinearTracking():i._initVariationTracking(),e&&i.on("start",(function(){e.lastSuccessfulAd=Date.now()})),i}return st(n,[{key:"_initLinearTracking",value:function(){this.linear=!0,this.skipDelay=this.creative.skipDelay,this.setDuration(this.creative.duration),this.clickThroughURLTemplate=this.creative.videoClickThroughURLTemplate,this.clickTrackingURLTemplates=this.creative.videoClickTrackingURLTemplates}},{key:"_initVariationTracking",value:function(){if(this.linear=!1,this.skipDelay=-1,this.variation){for(var e in this.variation.trackingEvents){var t=this.variation.trackingEvents[e];this.trackingEvents[e]?this.trackingEvents[e]=this.trackingEvents[e].concat(t.slice(0)):this.trackingEvents[e]=t.slice(0)}this.variation instanceof Pt?(this.clickThroughURLTemplate=this.variation.nonlinearClickThroughURLTemplate,this.clickTrackingURLTemplates=this.variation.nonlinearClickTrackingURLTemplates,this.setDuration(this.variation.minSuggestedDuration)):this.variation instanceof pt&&(this.clickThroughURLTemplate=this.variation.companionClickThroughURLTemplate,this.clickTrackingURLTemplates=this.variation.companionClickTrackingURLTemplates)}}},{key:"setDuration",value:function(e){this.assetDuration=e,this.quartiles={firstQuartile:Math.round(25*this.assetDuration)/100,midpoint:Math.round(50*this.assetDuration)/100,thirdQuartile:Math.round(75*this.assetDuration)/100}}},{key:"setProgress",value:function(e){var t=this,n=this.skipDelay||-1;if(-1===n||this.skippable||(n>e?this.emit("skip-countdown",n-e):(this.skippable=!0,this.emit("skip-countdown",0))),this.assetDuration>0){var r=[];if(e>0){var o=Math.round(e/this.assetDuration*100);for(var i in r.push("start"),r.push("progress-".concat(o,"%")),r.push("progress-".concat(Math.round(e))),this.quartiles)this.isQuartileReached(i,this.quartiles[i],e)&&(r.push(i),this._alreadyTriggeredQuartiles[i]=!0)}r.forEach((function(e){t.track(e,!0)})),e0&&void 0!==arguments[0]?arguments[0]:null;this.clickTrackingURLTemplates&&this.clickTrackingURLTemplates.length&&this.trackURLs(this.clickTrackingURLTemplates);var t=this.clickThroughURLTemplate||e;if(t){var n=this.linear?{CONTENTPLAYHEAD:this.progressFormatted()}:{},r=yt.resolveURLTemplates([t],n)[0];this.emit("clickthrough",r)}}},{key:"track",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"closeLinear"===e&&!this.trackingEvents[e]&&this.trackingEvents.close&&(e="close");var n=this.trackingEvents[e],r=this.emitAlwaysEvents.indexOf(e)>-1;n?(this.emit(e,""),this.trackURLs(n)):r&&this.emit(e,""),t&&(delete this.trackingEvents[e],r&&this.emitAlwaysEvents.splice(this.emitAlwaysEvents.indexOf(e),1))}},{key:"trackURLs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.linear&&(this.creative&&this.creative.mediaFiles&&this.creative.mediaFiles[0]&&this.creative.mediaFiles[0].fileURL&&(t.ASSETURI=this.creative.mediaFiles[0].fileURL),t.CONTENTPLAYHEAD=this.progressFormatted()),yt.track(e,t)}},{key:"progressFormatted",value:function(){var e=parseInt(this.progress),t=e/3600;t.length<2&&(t="0".concat(t));var n=e/60%60;n.length<2&&(n="0".concat(n));var r=e%60;return r.length<2&&(r="0".concat(n)),"".concat(t,":").concat(n,":").concat(r,".").concat(parseInt(100*(this.progress-e)))}}]),n}(_t),yn=function(e,t,n,r){var o,i={},a={started:!1,active:!1,isVideoEnded:!1,lang:n.getLanguage()},A=null,s="",c=null,u="",l="",f=!1,p=n.getBrowser(),d="Android"===p.os||"iOS"===p.os;(o=document.createElement("div")).setAttribute("class","op-ads"),o.setAttribute("id","op-ads"),n.getContainer().append(o),(c=document.createElement("video")).setAttribute("playsinline","true"),c.setAttribute("title","Advertisement"),c.setAttribute("class","op-ads-vast-video"),(l=document.createElement("div")).setAttribute("class","op-ads-button"),(u=document.createElement("div")).setAttribute("class","op-ads-textview"),l.append(u),o.append(c),o.append(l),s=o;var g=new mn,h=null,v=null,m=function(e){console.log(e),c.style.display="none",t.trigger(se,{code:e.code,message:e.message}),a.active=!1,a.started=!0,t.play()};return i.isActive=function(){return a.active},i.started=function(){return a.started},i.play=function(){return a.started?c.play():new Promise((function(o,i){!function s(){t.metaLoaded()?(OvenPlayerConsole.log("VAST : main contents meta loaded."),function(){OvenPlayerConsole.log("VAST : checkAutoplaySupport() ");var n=document.createElement("video");n.setAttribute("playsinline","true"),n.src=Xe,n.load(),c.load(),d&&t.getName()!==le&&e.load();var r=function(e,t){f=e,n.pause(),n.remove()};return new Promise((function(e,t){if(n.play){var o=n.play();void 0!==o?o.then((function(){OvenPlayerConsole.log("VAST : auto play allowed."),r(!0),e()})).catch((function(t){OvenPlayerConsole.log("VAST : auto play failed",t.message),r(!1),e()})):(OvenPlayerConsole.log("VAST : promise not support"),r(!0),e())}else OvenPlayerConsole.log("VAST : !temporarySupportCheckVideo.play"),r(!0),e()}))}().then((function(){n.isAutoStart()&&!f?(OvenPlayerConsole.log("VAST : autoplayAllowed : false"),a.started=!1,i(new Error("autoplayNotAllowed"))):(g.get(r).then((function(n){if(OvenPlayerConsole.log("VAST : initRequest()"),!(v=n.ads[0]))throw{code:401,message:"File not found. Unable to find Linear/MediaFile from URI."};h=new Cn(g,v,v.creatives[0]),OvenPlayerConsole.log("VAST : created ad tracker."),A=function(e,t,n,r,o,i,a){var A={},s={},c=ze(i),u=ze(o),l=ze(e);n.on(Re,(function(t){t.mute?e.muted=!0:(e.muted=!1,e.volume=t.volume/100)}),s);var f=function(){r.active=!1,u.hide(),!r.started||0!==n.getPosition()&&r.isVideoEnded||(l.hide(),n.play()),n.trigger(Ae)},p=function(n){c.hasClass("videoAdUiAction")&&(t.skip(),e.pause(),f())};return i.addEventListener("click",p,!1),A.error=function(){OvenPlayerConsole.log("VAST : listener : error.",e.error),console.log("VAST : listener : error.",e.error);var n={},r=e.error&&e.error.code||0;2===r?(n.code=402,n.message="Timeout of MediaFile URI."):3===r?(n.code=405,n.message="Problem displaying MediaFile. Video player found a MediaFile with supported type but couldn’t display it. MediaFile may include: unsupported codecs, different MIME type than MediaFile@type, unsupported delivery method, etc."):4===r?(n.code=403,n.message="Couldn’t find MediaFile that is supported by this video player, based on the attributes of the MediaFile element."):(n.code=400,n.message="General Linear error. Video player is unable to display the Linear Ad."),t.errorWithCode(n.code),a("405")},A.canplay=function(){},A.ended=function(){t.complete(),f()},A.click=function(e){t.click()},A.play=function(){t.setPaused(!1)},A.pause=function(){t.setPaused(!0)},A.timeupdate=function(r){t.setProgress(r.target.currentTime),n.trigger(Se,{duration:e.duration,position:e.currentTime})},A.volumechange=function(e){OvenPlayerConsole.log("VAST : listener : Ad Video Volumechange."),t.setMuted(e.target.muted)},A.loadedmetadata=function(){OvenPlayerConsole.log("VAST : listener : Ad CONTENT LOADED ."),ee===n.getState()&&n.pause(),t.trackImpression(),n.trigger(oe,{remaining:e.duration,isLinear:!0}),e.play()},t.on("skip",(function(){OvenPlayerConsole.log("VAST : listener : skipped")})),t.on("mute",(function(){OvenPlayerConsole.log("VAST : listener : muted")})),t.on("unmute",(function(){OvenPlayerConsole.log("VAST : listener : unmuted")})),t.on("resume",(function(){OvenPlayerConsole.log("VAST : listener : vastTracker resumed."),r.started&&n.setState(ie)})),t.on("pause",(function(){OvenPlayerConsole.log("VAST : listener : vastTracker paused."),n.setState(ae)})),t.on("clickthrough",(function(e){OvenPlayerConsole.log("VAST : listener : clickthrough :",e),window.open(e,"_blank")})),t.on("skip-countdown",(function(e){0===e?("ko"===r.lang?c.html("광고 건너뛰기"):c.html("Ad Skip"),c.addClass("videoAdUiAction")):"ko"===r.lang?c.html(parseInt(e)+1+"초 후에 이 광고를 건너뛸 수 있습니다."):c.html("You can skip this ad in "+(parseInt(e)+1))})),t.on("rewind",(function(){OvenPlayerConsole.log("VAST : listener : rewind")})),t.on("start",(function(){OvenPlayerConsole.log("VAST : listener : started"),r.started=!0,r.active=!0,l.show(),u.show(),n.trigger(Ie,{isLinear:!0}),n.setState(ie)})),t.on("firstQuartile",(function(){OvenPlayerConsole.log("VAST : listener : firstQuartile")})),t.on("midpoint",(function(){OvenPlayerConsole.log("VAST : listener : midpoint")})),t.on("thirdQuartile",(function(){OvenPlayerConsole.log("VAST : listener : thirdQuartile")})),t.on("creativeView",(function(){OvenPlayerConsole.log("VAST : listener : creativeView")})),Object.keys(A).forEach((function(t){e.removeEventListener(t,A[t]),e.addEventListener(t,A[t])})),s.destroy=function(){OvenPlayerConsole.log("EventListener : destroy()"),i.removeEventListener("click",p,!1),Object.keys(A).forEach((function(t){e.removeEventListener(t,A[t])}))},s}(c,h,t,a,l,u,m);var r="";v.creatives&&v.creatives.length>0&&v.creatives[0].mediaFiles&&v.creatives[0].mediaFiles.length>0&&v.creatives[0].mediaFiles[0].fileURL&&(r=v.creatives[0].mediaFiles[0].fileURL,OvenPlayerConsole.log("VAST : media url : ",r)),c.src=r,c.volume=e.volume,c.muted=e.muted})).catch((function(e){m(e)})),o())}))):setTimeout(s,100)}()}))},i.pause=function(){c.pause()},i.videoEndedCallback=function(e){e(),a.isVideoEnded=!0},i.destroy=function(){A&&(A.destroy(),A=null),h=null,g=null,s.remove()},i},bn=function(e,t,n){OvenPlayerConsole.log("[Provider] loaded. ");var r={};Ge(r);var o=e.element,i=null,a=null;e.adTagUrl&&(OvenPlayerConsole.log("[Provider] Ad Client - ",t.getAdClient()),(i="vast"===t.getAdClient()?yn(o,r,t,e.adTagUrl):et(o,r,t,e.adTagUrl))||console.log("Can not load due to google ima for Ads.")),a=function(e,t,n,r){var o={};OvenPlayerConsole.log("EventListener loaded.",e,t);var i={},a=-1,A=e;return o.canplay=function(){t.setCanSeek(!0),t.trigger("bufferFull"),OvenPlayerConsole.log("EventListener : on canplay")},o.durationchange=function(){o.progress(),OvenPlayerConsole.log("EventListener : on durationchange"),t.trigger("durationChanged")},o.ended=function(){OvenPlayerConsole.log("EventListener : on ended"),A.pause(),t.getState()!==X&&t.getState()!==q&&t.getState()!==te&&(n?n((function(){t.setState(q)})):t.setState(q))},o.loadeddata=function(){},o.loadedmetadata=function(){var e=t.getSources(),n=t.getCurrentSource(),r=n>-1?e[n].type:"",o={duration:t.isLive()?1/0:A.duration,type:r};t.setMetaLoaded(),OvenPlayerConsole.log("EventListener : on loadedmetadata",o),t.trigger(Oe,o)},o.pause=function(){return t.getState()!==q&&t.getState()!==te&&!A.ended&&!A.error&&A.currentTime!==A.duration&&(OvenPlayerConsole.log("EventListener : on pause"),void t.setState($))},o.loadstart=function(){r&&!r.getConfig().showBigPlayButton&&r.getConfig().autoStart&&t.setState(ne)},o.play=function(){a=-1,A.paused||t.getState()===ee||t.setState(ne)},o.playing=function(){OvenPlayerConsole.log("EventListener : on playing"),a<0&&t.setState(ee)},o.progress=function(){var e=A.buffered;if(!e)return!1;var n,r=A.duration,o=A.currentTime,i=(n=(e.length>0?e.end(e.length-1):0)/r,Math.max(Math.min(n,1),0));t.setBuffer(100*i),t.trigger(Te,{bufferPercent:100*i,position:o,duration:r}),OvenPlayerConsole.log("EventListener : on progress",100*i)},o.timeupdate=function(){var e=A.currentTime,n=A.duration;if(!isNaN(n)){if(e>n)return A.pause(),void t.setState(q);var r=t.getSources()[t.getCurrentSource()].sectionStart;r&&eo&&t.getState()===ee)return t.stop(),void t.setState(q);n>9e15&&(n=1/0),t.isSeeking()||A.paused||t.getState()!==re&&t.getState()!==ne&&t.getState()!==ie||function(e,t){return e.toFixed(2)===t.toFixed(2)}(a,e)||(a=-1,t.setState(ee)),r&&r>0&&(e-=r)<0&&(e=0),o&&(n=o),r&&(n-=r),(t.getState()===ee||t.isSeeking())&&t.trigger(Le,{position:e,duration:n})}},o.seeking=function(){t.setSeeking(!0),OvenPlayerConsole.log("EventListener : on seeking",A.currentTime),t.trigger("seek",{position:A.currentTime})},o.seeked=function(){t.isSeeking()&&(OvenPlayerConsole.log("EventListener : on seeked"),t.setSeeking(!1),t.trigger("seeked"))},o.stalled=function(){OvenPlayerConsole.log("EventListener : on stalled")},o.waiting=function(){OvenPlayerConsole.log("EventListener : on waiting",t.getState()),t.isSeeking()?t.setState(ne):t.getState()===ee&&(a=A.currentTime,t.setState(re))},o.volumechange=function(){OvenPlayerConsole.log("EventListener : on volumechange",Math.round(100*A.volume)),t.trigger(Re,{volume:Math.round(100*A.volume),mute:A.muted})},o.error=function(){var e={0:300,1:301,2:302,3:303,4:304}[A.error&&A.error.code||0]||0;OvenPlayerConsole.log("EventListener : on error",e),qe(We.codes[e],t)},Object.keys(o).forEach((function(e){A.removeEventListener(e,o[e]),A.addEventListener(e,o[e])})),i.destroy=function(){OvenPlayerConsole.log("EventListener : destroy()"),Object.keys(o).forEach((function(e){A.removeEventListener(e,o[e])}))},i}(o,r,i?i.videoEndedCallback:null,t),o.playbackRate=o.defaultPlaybackRate=t.getPlaybackRate();var A=function(i){var a=e.sources[e.currentSource];if(e.framerate=a.framerate,r.setVolume(t.getVolume()),e.framerate||t.setTimecodeMode(!0),n)n(a,i);else{OvenPlayerConsole.log("source loaded : ",a,"lastPlayPosition : "+i);var A=o.src;a.file!==A&&(o.src=a.file,(A||""===A)&&o.load()),r.on(Oe,(function(){i>0&&r.seek(i)}))}};return r.getName=function(){return e.name},r.getMse=function(){return e.mse},r.getMediaElement=function(){return e.element},r.canSeek=function(){return e.canSeek},r.setCanSeek=function(t){e.canSeek=t},r.isSeeking=function(){return e.seeking},r.setSeeking=function(t){e.seeking=t},r.setMetaLoaded=function(){e.isLoaded=!0},r.metaLoaded=function(){return e.isLoaded},r.setState=function(t){if(e.state!==t){var n=e.state;if(OvenPlayerConsole.log("Provider : setState()",t),n===ie&&(t===te||t===X))return!1;switch(OvenPlayerConsole.log("Provider : triggerSatatus",t),t){case q:r.trigger("complete");break;case $:r.trigger(be,{prevState:e.state,newstate:$});break;case ae:r.trigger(be,{prevState:e.state,newstate:ae});break;case ee:r.trigger(we,{prevState:e.state,newstate:ee});break;case ie:r.trigger(we,{prevState:e.state,newstate:ie})}e.state=t,r.trigger(ye,{prevstate:n,newstate:e.state})}},r.getState=function(){return e.state},r.setBuffer=function(t){e.buffer=t},r.getBuffer=function(){return e.buffer},r.isLive=function(){return!!e.isLive||o.duration===1/0},r.getDuration=function(){return r.isLive()?1/0:o.duration},r.getPosition=function(){return o?o.currentTime:0},r.setVolume=function(e){if(!o)return!1;o.volume=e/100,t.setVolume(e)},r.getVolume=function(){return t.getVolume()},r.setMute=function(e){if(!o)return!1;if(void 0===e){var n=t.isMute();o.muted=!n,t.setMute(!n),r.trigger(Qe,{mute:t.isMute()})}else o.muted=e,t.setMute(e),r.trigger(Qe,{mute:t.isMute()});return o.muted},r.getMute=function(){return t.isMute()},r.preload=function(n,o){return e.sources=n,e.currentSource=$e(n,t),A(o||0),new Promise((function(e,n){t.isMute()&&r.setMute(!0),t.getVolume()&&r.setVolume(t.getVolume()),e()}))},r.load=function(n){e.sources=n,e.currentSource=$e(n,t),A(0)},r.play=function(){if(OvenPlayerConsole.log("Provider : play()"),!o)return!1;if(r.getState()!==ee)if(i&&i.isActive()||i&&!i.started())i.play().then((function(e){OvenPlayerConsole.log("Provider : ads play success")})).catch((function(e){OvenPlayerConsole.log("Provider : ads play fail",e)}));else{var e=o.play();void 0!==e?e.then((function(){OvenPlayerConsole.log("Provider : video play success")})).catch((function(e){OvenPlayerConsole.log("Provider : video play error",e.message)})):OvenPlayerConsole.log("Provider : video play success (ie)")}},r.pause=function(){if(OvenPlayerConsole.log("Provider : pause()"),!o)return!1;r.getState()===ee?o.pause():r.getState()===ie&&i.pause()},r.seek=function(e){if(!o)return!1;o.currentTime=e},r.setPlaybackRate=function(e){return!!o&&(r.trigger("playbackRateChanged",{playbackRate:e}),o.playbackRate=o.defaultPlaybackRate=e)},r.getPlaybackRate=function(){return o?o.playbackRate:0},r.getSources=function(){return o?e.sources.map((function(e,t){var n={file:e.file,type:e.type,label:e.label,index:t,sectionStart:e.sectionStart,sectionEnd:e.sectionEnd,gridThumbnail:e.gridThumbnail};return e.lowLatency&&(n.lowLatency=e.lowLatency),n})):[]},r.getCurrentSource=function(){return e.currentSource},r.setCurrentSource=function(n,i){if(n>-1&&e.sources&&e.sources.length>n)return OvenPlayerConsole.log("source changed : "+n),e.currentSource=n,r.trigger(Me,{currentSource:n}),t.setSourceIndex(n),r.setState(X),i&&A(o.currentTime||0),e.currentSource},r.getQualityLevels=function(){return o?e.qualityLevels:[]},r.getCurrentQuality=function(){return o?e.currentQuality:null},r.setCurrentQuality=function(e){},r.isAutoQuality=function(){},r.setAutoQuality=function(e){},r.getFramerate=function(){return e.framerate},r.setFramerate=function(t){return e.framerate=t},r.seekFrame=function(t){var n=e.framerate,i=(o.currentTime*n+t)/n;i+=1e-5,r.pause(),r.seek(i)},r.stop=function(){if(!o)return!1;for(OvenPlayerConsole.log("CORE : stop() "),o.removeAttribute("preload"),o.removeAttribute("src");o.firstChild;)o.removeChild(o.firstChild);r.pause(),r.setState(X)},r.destroy=function(){if(!o)return!1;r.stop(),a.destroy(),i&&(i.destroy(),i=null),r.off(),OvenPlayerConsole.log("CORE : destroy() player stop, listener, event destroied")},r.super=function(e){var t=r[e];return function(){return t.apply(r,arguments)}},r},wn=function(e,t,n){var r=bn({name:ce,element:e,mse:null,listener:null,isLoaded:!1,canSeek:!1,isLive:!1,seeking:!1,state:X,buffer:0,framerate:0,currentQuality:-1,currentSource:-1,qualityLevels:[],sources:[],adTagUrl:n},t,null),o=r.super("destroy");return OvenPlayerConsole.log("HTML5 PROVIDER LOADED."),r.destroy=function(){OvenPlayerConsole.log("HTML5 : PROVIDER DESTROYED."),o()},r},En=function(e,t,n,r,o,a,A,s){var c={},u={},l=null,f=!1,p=null,d=null,g={},h=!1,v=!1,m=null,C=!1;A.getConfig().webrtcConfig&&!0===A.getConfig().webrtcConfig.recoverPacketLoss&&(v=!0);var y=!0;A.getConfig().webrtcConfig&&!1===A.getConfig().webrtcConfig.generatePublicCandidate&&(y=A.getConfig().webrtcConfig.generatePublicCandidate);var b,w=Y();function E(e){var t=null;return d&&e===d.id?t=d.peerConnection:g[e]&&(t=g[e].peerConnection),t}function B(e){e.statisticsTimer&&clearTimeout(e.statisticsTimer),e.status||(e.status={},e.status.lostPacketsArr=[],e.status.slotLength=8,e.status.prevPacketsLost=0,e.status.avg8Losses=0,e.status.avgMoreThanThresholdCount=0,e.status.threshold=40);var t=e.status.lostPacketsArr,n=e.status.slotLength,r=e.status.prevPacketsLost,o=e.status.avg8Losses,a=e.status.threshold;e.statisticsTimer=setTimeout((function(){if(!e.peerConnection)return!1;e.peerConnection.getStats().then((function(s){s&&A.getConfig().autoFallback&&s&&(s.forEach((function(A){if("inbound-rtp"===A.type&&"video"===A.kind&&!A.isRemote){var s=parseInt(A.packetsLost)-parseInt(r);t.push(parseInt(A.packetsLost)-parseInt(r)),t.length>n&&t.shift(),t.length===n&&(o=i().reduce(t,(function(e,t){return e+t}),0)/n,OvenPlayerConsole.log("Last8 LOST PACKET AVG : "+o,"Current Packet LOST: "+s,"Total Packet Lost: "+A.packetsLost,t),o>a?(e.status.avgMoreThanThresholdCount=e.status.avgMoreThanThresholdCount+1,e.status.avgMoreThanThresholdCount>=60&&(OvenPlayerConsole.log("NETWORK UNSTABLED!!! "),Q(We.codes[510]))):e.status.avgMoreThanThresholdCount=0),e.status.prevPacketsLost=A.packetsLost}})),B(e))}))}),2e3)}function x(e,o,a,s,u){var f={};if(A.getConfig().webrtcConfig&&A.getConfig().webrtcConfig.iceServers)f.iceServers=A.getConfig().webrtcConfig.iceServers,A.getConfig().webrtcConfig.iceTransportPolicy&&(f.iceTransportPolicy=A.getConfig().webrtcConfig.iceTransportPolicy);else if(u){f.iceServers=[];for(var g=0;g-1){y=!0;break}if(!y&&C.urls.length>0){var E=i().clone(C.urls[0]),x=S(E);b&&x&&C.urls.push(E.replace(x,b))}C.username=m.username||m.user_name,C.credential=m.credential,f.iceServers.push(C)}f.iceTransportPolicy="relay"}else f=c;OvenPlayerConsole.log("Main Peer Connection Config : ",f);var k=null;try{k=new RTCPeerConnection(f)}catch(e){var T=We.codes[506];return T.error=e,void Q(T)}d={id:e,peerId:o,peerConnection:k},k.setRemoteDescription(new RTCSessionDescription(a)).then((function(){k.createAnswer().then((function(t){var n=function(e){for(var t=e.split("\r\n"),n=-1,r=0;r-1&&t[r].indexOf("opus")>-1){n=t[r].split(" ")[0].split(":")[1];break}return n}(a.sdp);n>-1&&function(e,t){for(var n=e.split("\r\n"),r=!1,o=0;o-1){n[o].indexOf("stereo=1")>-1&&(r=!0);break}return r}(a.sdp,n)&&(t.sdp=function(e,t){for(var n=e.split("\r\n"),r=0;r-1){-1===n[r].indexOf("stereo=1")&&(n[r]=n[r]+";stereo=1");break}return n.join("\r\n")}(t.sdp,n)),OvenPlayerConsole.log("Local SDP",t),O(l,{id:e,peer_id:o,command:"answer",sdp:t}),OvenPlayerConsole.log("create Host Answer : success"),k.setLocalDescription(t).then((function(){})).catch((function(e){var t=We.codes[505];t.error=e,Q(t)}))})).catch((function(e){var t=We.codes[504];t.error=e,Q(t)}))})).catch((function(e){var t=We.codes[503];t.error=e,Q(t)})),s&&L(k,s),k.onicecandidate=function(t){t.candidate&&(OvenPlayerConsole.log("WebRTCLoader send candidate to server : ",t.candidate),O(l,{id:e,peer_id:o,command:"candidate",candidates:[t.candidate]}))},k.onconnectionstatechange=function(e){OvenPlayerConsole.log("[on connection state change]",k.connectionState,e),"connected"===k.connectionState&&r&&r()},k.onicecandidateerror=function(e){},k.onicegatheringstatechange=function(e){},k.oniceconnectionstatechange=function(e){OvenPlayerConsole.log("[on ice connection state change]",k.iceConnectionState,e),"connected"===k.iceConnectionState&&r&&r(),("disconnected"===k.iceConnectionState||"closed"===k.iceConnectionState)&&(h||d&&Q(We.codes[511]))},k.ontrack=function(e){if(OvenPlayerConsole.log("stream received."),OvenPlayerConsole.log("Recovery On Packet Loss :",v),v&&B(d),p=e.streams[0],n(e.streams[0]),A.getConfig().webrtcConfig&&A.getConfig().webrtcConfig.playoutDelayHint)for(var t=A.getConfig().webrtcConfig.playoutDelayHint,r=d.peerConnection.getReceivers(),o=0;o0){for(var n in g){var r=g[n].peerConnection;r&&(OvenPlayerConsole.log("Closing client peer connection..."),r.close(),r=null)}g={}}l?(OvenPlayerConsole.log("Closing websocket connection..."),OvenPlayerConsole.log("Send Signaling : Stop."),1===l.readyState&&(h=!0,d&&O(l,{command:"stop",id:d.id}),l.close())):h=!1,l=null,t&&(o&&o(t),a(t,e))}function O(e,t){e&&e.send(JSON.stringify(t))}return b=window.onbeforeunload,window.onbeforeunload=function(e){b&&b(e),OvenPlayerConsole.log("This calls auto when browser closed."),Q()},e.setCurrentQuality=function(e){var t=m.renditions[e];return O(l,{command:"change_rendition",id:d.id,rendition_name:t.name,auto:!1}),C=!1,s.currentQuality=e,s.currentQuality},e.isAutoQuality=function(){return C},e.setAutoQuality=function(e){O(l,{command:"change_rendition",id:d.id,auto:e}),C=e},u.connect=function(){OvenPlayerConsole.log("WebRTCLoader connecting..."),OvenPlayerConsole.log("WebRTCLoader url : "+t),R()},u.destroy=function(){h=!0,Q()},u},Bn=function(e,t,n){var r={},o=null,i=null,a=null,A=null,s=null,c={name:ue,element:e,mse:null,listener:null,isLoaded:!1,canSeek:!1,isLive:!1,seeking:!1,state:X,buffer:0,framerate:0,currentQuality:-1,currentSource:-1,qualityLevels:[],sources:[],adTagUrl:n},u=1e4,l=0,f=null,p=!1;function d(){if(Ve(A.file,A.type)){clearTimeout(f),OvenPlayerConsole.log("WEBRTC : onBeforeLoad : ",A),o&&(o.destroy(),o=null);var n=null,i=null;l>0&&(n=function(){clearTimeout(f)},i=function(){clearTimeout(f),performance.now(),p=!0}),o=En(r,A.file,(function(t){if(e.srcObject&&(e.srcObject=null),s&&(s.close(),s=null),e.srcObject=t,t.getAudioTracks().length>0){var n=window.AudioContext||window.webkitAudioContext;(function(e){var t=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent),n=(/iPhone|iPad|iPod/i.test(navigator.userAgent),!1);t&&"suspended"===e.state&&document.addEventListener("touchend",(function(){n||"running"===e.state||(e.resume(),n=!0)}))})(s=new n),s.createMediaStreamSource(t)}}),i,n,qe,t,c),performance.now(),o.connect(),l>0&&(r.once(ye,(function(e){p||e.newstate===X&&(clearTimeout(f),g())})),r.once(Ce,(function(){p=!1})),f=setTimeout((function(){if(l>0)p||(g(),d());else{g();var e=We.codes[512];qe(e,r)}l--}),u))}}function g(){o&&(o.destroy(),o=null,e.srcObject=null)}return r=bn(c,t,(function(e){var n=t.getConfig();n.webrtcConfig&&("number"==typeof n.webrtcConfig.connectionTimeout&&n.webrtcConfig.connectionTimeout>0&&(u=n.webrtcConfig.connectionTimeout),"number"==typeof n.webrtcConfig.timeoutMaxRetry&&n.webrtcConfig.timeoutMaxRetry>0&&(l=n.webrtcConfig.timeoutMaxRetry)),A=e,d()})),i=r.super("destroy"),a=r.super("play"),OvenPlayerConsole.log("WEBRTC PROVIDER LOADED."),r.destroy=function(){clearTimeout(f),g(),OvenPlayerConsole.log("WEBRTC : PROVIDER DESTROYED."),i()},r.play=function(){l>0&&!p&&d(),a()},r},xn=function(e,t,n){var r=t?1e3:1024;if(Math.abs(e)=r&&a=0&&r.seek(t)})),o.on(Hls.Events.LEVEL_SWITCHED,(function(e,t){f.currentQuality=t.level,r.trigger(De,{isAuto:o.autoLevelEnabled,currentQuality:f.currentQuality,type:"render"})})),o.on(Hls.Events.ERROR,(function(t,n){if(n&&n.networkDetails&&202===n.networkDetails.status)return A&&(clearTimeout(A),A=null),r.setState(ne),void(A=setTimeout((function(){o&&(r.stop(),o.stopLoad(),o.loadSource(e.file))}),1e3));if(n.fatal){var i=302;n&&n.networkDetails&&400===n.networkDetails.status?i=306:n&&n.networkDetails&&403===n.networkDetails.status?i=307:n&&n.networkDetails&&406===n.networkDetails.status&&(i=308);var a=We.codes[i];a.error=n.details,qe(a,r)}})),r.on(ye,(function(e){s||e.prevstate!==ne||e.newstate!==X||(A&&(clearTimeout(A),A=null),o&&o.stopLoad())}))})),r.setCurrentQuality=function(e){return o.currentLevel=e,f.currentQuality=e,f.currentQuality},r.isAutoQuality=function(){return o.autoLevelEnabled},r.setAutoQuality=function(e){o.currentLevel=-1},i=r.super("stop"),r.stop=function(){A&&(clearTimeout(A),A=null),o&&o.stopLoad(),i()},a=r.super("destroy"),r.destroy=function(){A&&(clearTimeout(A),A=null),o&&(o.destroy(),r.trigger("hlsDestroyed")),o=null,OvenPlayerConsole.log("HLS : PROVIDER DESTROYED."),a()},OvenPlayerConsole.log("HLS PROVIDER LOADED.")}catch(e){var p=We.codes[106];throw p.error=e,p}return r},Sn=function(e){var t={};Ge(t),OvenPlayerConsole.log("API loaded.");var n=function(e){var t={},n={playlist:[],currentIndex:0},r=Ke();OvenPlayerConsole.log("PlaylistManager loaded.");var o=function(e){if(e&&(e.file||e.host||e.application||e.stream)){var t=Object.assign({},{default:!1},e);t.file=a(""+t.file),t.host&&t.application&&t.stream&&(t.file=t.host+"/"+t.application+"/stream/"+t.stream,delete t.host,delete t.application,delete t.stream);var n=/^[^/]+\/(?:x-)?([^/]+)$/;if(n.test(t.type)&&(t.mimeType=t.type,t.type=t.type.replace(n,"$1")),_e(t.file)?t.type="rtmp":Ve(t.file)?t.type="webrtc":He(t.file,t.type)?t.type="hls":Je(t.file,t.type)?t.type="dash":t.type||(t.type=A(t.file)),t.lowLatency&&(t.lowLatency=t.lowLatency),t.type){switch(t.type){case"m3u8":case"vnd.apple.mpegurl":t.type="hls";break;case"m4a":t.type="aac";break;case"smil":t.type="rtmp"}return Object.keys(t).forEach((function(e){""===t[e]&&delete t[e]})),t}}};return t.initPlaylist=function(e,t){OvenPlayerConsole.log("PlaylistManager setPlaylist() ",e);var a=(i().isArray(e)?e:[e]).map((function(e){i().isArray(e.tracks)||delete e.tracks;var n=Object.assign({},{sources:[],tracks:[],title:""},e);n.sources!==Object(n.sources)||i().isArray(n.sources)||(n.sources=[o(n.sources)]),i().isArray(n.sources)&&0!==n.sources.length||(n.sources=[o(n)]),i().isArray(n.sources)&&0!==n.sources.length||(e.levels?n.sources=e.levels:n.sources=[o(e)]);for(var a=0;a0}))||[];return n.playlist=a,a},t.getPlaylist=function(){return OvenPlayerConsole.log("PlaylistManager getPlaylist() ",n.playlist),n.playlist},t.getCurrentPlayList=function(){return n.playlist[n.currentIndex]?n.playlist[n.currentIndex]:[]},t.getCurrentPlaylistIndex=function(){return n.currentIndex},t.setCurrentPlaylist=function(t){return n.playlist[t]&&(n.currentIndex=t,e.trigger(he,n.currentIndex)),n.currentIndex},t.getCurrentSources=function(){return n.playlist[n.currentIndex]?(OvenPlayerConsole.log("PlaylistManager getCurrentSources() ",n.playlist[n.currentIndex].sources),n.playlist[n.currentIndex].sources):null},t.getCurrentAdTag=function(){if(n.playlist[n.currentIndex])return n.playlist[n.currentIndex].adTagUrl||""},t}(t),o=function(){var e=Ke(),t={},n={};OvenPlayerConsole.log("ProviderController loaded.");var r=function(e,n){t[e]||(OvenPlayerConsole.log("ProviderController _registerProvider() ",e),t[e]=n)},o={html5:function(){var e=wn;return r(ce,e),{name:ce,provider:e}},webrtc:function(){var e=Bn;return r(ue,e),{name:ue,provider:e}},dash:function(){var e=kn;return r(le,e),{name:le,provider:e}},hls:function(){var e=In;return r(fe,e),{name:fe,provider:e}}};return n.loadProviders=function(t){var n=e.findProviderNamesByPlaylist(t);return OvenPlayerConsole.log("ProviderController loadProviders() ",n),n?Promise.all(n.filter((function(e){return!!o[e]})).map((function(e){return o[e]()}))):Promise.reject(We.codes[101])},n.findByName=function(e){return OvenPlayerConsole.log("ProviderController findByName() ",e),t[e]},n.getProviderBySource=function(t){var r=e.findProviderNameBySource(t);return OvenPlayerConsole.log("ProviderController getProviderBySource() ",r),n.findByName(r)},n.isSameProvider=function(t,n){return OvenPlayerConsole.log("ProviderController isSameProvider() ",e.findProviderNameBySource(t),e.findProviderNameBySource(n)),e.findProviderNameBySource(t)===e.findProviderNameBySource(n)},n}(),s=Y(),c=function(e,t){var n={},r=ze(e),o="";return OvenPlayerConsole.log("MediaManager loaded. browser : ",t),n.createMedia=function(e,t){return n.empty(),i=t.isLoop(),a=t.isAutoStart(),(o=document.createElement("video")).setAttribute("disableremoteplayback",""),o.setAttribute("webkit-playsinline","true"),o.setAttribute("playsinline","true"),i&&o.setAttribute("loop",""),a&&o.setAttribute("autoplay",""),r.append(o),o;var i,a},n.createAdContainer=function(){var e=document.createElement("div");return e.setAttribute("class","op-ads"),r.append(e),e},n.empty=function(){OvenPlayerConsole.log("MediaManager removeElement()"),r.removeChild(o),o=null},n.destroy=function(){r.removeChild(),r=null,o=null},n}(e,s),u="",l="",f="",p=function(e){OvenPlayerConsole.log("runNextPlaylist");var r=e,o=!!n.getPlaylist()[r];l.setSourceIndex(0),l.setVolume(u.getVolume()),o?(n.setCurrentPlaylist(r),d()):t.trigger(ve,null)},d=function(e){return o.loadProviders(n.getCurrentPlayList()).then((function(e){if(e.length<1)throw We.codes[101];u&&(u.destroy(),u=null),f&&(f.destroy(),f=null),f=function(e,t){var n={},r=[],o=-1,a=K(),A=!0;OvenPlayerConsole.log("Caption Manager >> ",t);var s=function(e,t){return e.data=t||[],e.name=e.label||e.name||e.language,e.id=function(e,t){var n,o=e.kind||"cc";return n=e.default||e.defaulttrack?"default":e.id||o+t,A&&(c(r.length||0),A=!1),n}(e,r.length),r.push(e),e.id},c=function(t){o=t,e.trigger(Pe,o)};if(e.getConfig().playlist&&e.getConfig().playlist.length>0){var u=e.getConfig().playlist[t];if(u&&u.tracks&&u.tracks.length>0)for(var l=function(t){var n=u.tracks[t];Ye(n.kind)&&!i().findWhere(n,{file:n.file})&&a.load(n,n.lang,(function(e){e&&e.length>0&&s(n,e)}),(function(t){var n=We.codes[305];n.error=t,e.trigger(Ce,n)}))},f=0;f-1&&r[o]){var a=i().filter(r[o].data,(function(e){return n>=e.startTime&&(!e.endTime||n)<=e.endTime}));a&&a.length>0&&e.trigger(Fe,a[0])}})),n.flushCaptionList=function(e){r=[],c(e)},n.getCaptionList=function(){return r||[]},n.getCurrentCaption=function(){return o},n.setCurrentCaption=function(e){if(!(e>-2&&e0&&s(t,e)}),(function(t){var n=errors[305];n.error=t,e.trigger(Ce,n)}))},n.removeCaption=function(e){return e>-1&&e=.25&&e<=4})).map((function(e){return Math.round(4*e)/4}))).indexOf(1)<0&&a.push(1),a.sort(),t.playbackRates=a,t.rtmpBufferTime=t.rtmpBufferTime>10?10:t.rtmpBufferTime,t.rtmpBufferTimeMax=t.rtmpBufferTimeMax>50?50:t.rtmpBufferTimeMax,t.playbackRates.indexOf(t.playbackRate)<0&&(t.playbackRate=1);var A=t.playlist;if(A)i().isArray(A.playlist)&&(t.feedData=A,t.playlist=A.playlist);else{var s=i().pick(t,["title","description","type","image","file","sources","tracks","host","application","stream","adTagUrl"]);t.playlist=[s]}return delete t.duration,t}(e);return{getConfig:function(){return n},getAdClient:function(){return n.adClient},setConfig:function(e,t){n[e]=t},getContainer:function(){return n.mediaContainer},getPlaybackRate:function(){return n.playbackRate},setPlaybackRate:function(e){return n.playbackRate=e,e},getQualityLabel:function(){return n.qualityLabel},setQualityLabel:function(e){n.qualityLabel=e},isCurrentProtocolOnly:function(){return n.currentProtocolOnly},getSourceIndex:function(){return n.sourceIndex},setSourceIndex:function(e){n.sourceIndex=e},setTimecodeMode:function(e){n.timecode!==e&&(n.timecode=e,t.trigger(Ue,e))},isTimecodeMode:function(){return n.timecode},getRtmpBufferTime:function(){return n.rtmpBufferTime},getRtmpBufferTimeMax:function(){return n.rtmpBufferTimeMax},setMute:function(e){n.mute=e},isMute:function(){return n.mute},getVolume:function(){return n.volume},setVolume:function(e){n.volume=e},isLoop:function(){return n.loop},isAutoStart:function(){return n.autoStart},isControls:function(){return n.controls},getPlaybackRates:function(){return n.playbackRates},getBrowser:function(){return n.browser},getSystemText:function(){return n.systemText},getLanguage:function(){return n.lang},getPlaylist:function(){return n.playlist},setPlaylist:function(e){return i().isArray(e)?n.playlist=e:n.playlist=[e],n.playlist}}}(r,t),OvenPlayerConsole.log("API : init()"),OvenPlayerConsole.log("API : init() config : ",l),We.codes=l.getSystemText().api.error,n.initPlaylist(l.getPlaylist(),l),OvenPlayerConsole.log("API : init() sources : ",n.getCurrentSources()),d(),setTimeout((function(){t.trigger(de)}))},t.getProviderName=function(){return u?u.getName():null},t.getMseInstance=function(){return u?u.getMse():null},t.getConfig=function(){return OvenPlayerConsole.log("API : getConfig()",l.getConfig()),l.getConfig()},t.getBrowser=function(){return l.getBrowser()},t.setTimecodeMode=function(e){OvenPlayerConsole.log("API : setTimecodeMode()",e),l.setTimecodeMode(e)},t.isTimecodeMode=function(){return OvenPlayerConsole.log("API : isTimecodeMode()"),l.isTimecodeMode()},t.getFramerate=function(){if(OvenPlayerConsole.log("API : getFramerate()"),u)return u.getFramerate()},t.seekFrame=function(e){return u?(OvenPlayerConsole.log("API : seekFrame()",e),u.seekFrame(e)):null},t.getDuration=function(){return u?(OvenPlayerConsole.log("API : getDuration()",u.getDuration()),u.getDuration()):null},t.getPosition=function(){return u?(OvenPlayerConsole.log("API : getPosition()",u.getPosition()),u.getPosition()):null},t.getVolume=function(){return u?(OvenPlayerConsole.log("API : getVolume()",u.getVolume()),u.getVolume()):null},t.setVolume=function(e){if(!u)return null;OvenPlayerConsole.log("API : setVolume() "+e),u.setVolume(e)},t.setMute=function(e){return u?(OvenPlayerConsole.log("API : setMute() "+e),u.setMute(e)):null},t.getMute=function(){return u?(OvenPlayerConsole.log("API : getMute() "+u.getMute()),u.getMute()):null},t.load=function(e){return OvenPlayerConsole.log("API : load() ",e),e&&(l.setSourceIndex(0),u&&u.setCurrentQuality(0),"sources"in e?l.setPlaylist(e):l.setPlaylist({sources:e}),n.initPlaylist(l.getPlaylist(),l)),d()},t.play=function(){if(!u)return null;OvenPlayerConsole.log("API : play() "),u.metaLoaded()||l.isAutoStart()?u.play():t.once(Oe,(function(){u.play()}))},t.pause=function(){if(!u)return null;OvenPlayerConsole.log("API : pause() "),u.pause()},t.seek=function(e){if(!u)return null;OvenPlayerConsole.log("API : seek() "+e),u.seek(e)},t.setPlaybackRate=function(e){return u?(OvenPlayerConsole.log("API : setPlaybackRate() ",e),u.setPlaybackRate(l.setPlaybackRate(e))):null},t.getPlaybackRate=function(){return u?(OvenPlayerConsole.log("API : getPlaybackRate() ",u.getPlaybackRate()),u.getPlaybackRate()):null},t.getPlaylist=function(){return OvenPlayerConsole.log("API : getPlaylist() ",n.getPlaylist()),n.getPlaylist()},t.getCurrentPlaylist=function(){return OvenPlayerConsole.log("API : getCurrentPlaylist() ",n.getCurrentPlaylistIndex()),n.getCurrentPlaylistIndex()},t.setCurrentPlaylist=function(e){OvenPlayerConsole.log("API : setCurrentPlaylist() ",e),p(e)},t.getSources=function(){return u?(OvenPlayerConsole.log("API : getSources() ",u.getSources()),u.getSources()):null},t.getCurrentSource=function(){return u?(OvenPlayerConsole.log("API : getCurrentSource() ",u.getCurrentSource()),u.getCurrentSource()):null},t.setCurrentSource=function(e){if(!u)return null;OvenPlayerConsole.log("API : setCurrentSource() ",e);var n=u.getPosition();return l.setSourceIndex(e),d(n).then((function(){t.trigger(Me,{currentSource:e})})),e},t.getQualityLevels=function(){return u?(OvenPlayerConsole.log("API : getQualityLevels() ",u.getQualityLevels()),u.getQualityLevels()):null},t.getCurrentQuality=function(){return u?(OvenPlayerConsole.log("API : getCurrentQuality() ",u.getCurrentQuality()),u.getCurrentQuality()):null},t.setCurrentQuality=function(e){return u?(OvenPlayerConsole.log("API : setCurrentQuality() ",e),u.setCurrentQuality(e)):null},t.isAutoQuality=function(){return u?(OvenPlayerConsole.log("API : isAutoQuality()"),u.isAutoQuality()):null},t.setAutoQuality=function(e){return u?(OvenPlayerConsole.log("API : setAutoQuality() ",e),u.setAutoQuality(e)):null},t.getCaptionList=function(){return f?(OvenPlayerConsole.log("API : getCaptionList() ",f.getCaptionList()),f.getCaptionList()):null},t.getCurrentCaption=function(){return f?(OvenPlayerConsole.log("API : getCurrentCaption() ",f.getCurrentCaption()),f.getCurrentCaption()):null},t.setCurrentCaption=function(e){if(!f)return null;OvenPlayerConsole.log("API : setCurrentCaption() ",e),f.setCurrentCaption(e)},t.addCaption=function(e){return f?(OvenPlayerConsole.log("API : addCaption() "),f.addCaption(e)):null},t.removeCaption=function(e){return f?(OvenPlayerConsole.log("API : removeCaption() ",e),f.removeCaption(e)):null},t.getBuffer=function(){if(!u)return null;OvenPlayerConsole.log("API : getBuffer() ",u.getBuffer()),u.getBuffer()},t.getState=function(){return u?(OvenPlayerConsole.log("API : getState() ",u.getState()),u.getState()):null},t.stop=function(){if(!u)return null;OvenPlayerConsole.log("API : stop() "),u.stop()},t.remove=function(){OvenPlayerConsole.log("API : remove() "),f&&(f.destroy(),f=null),u&&(u.destroy(),u=null),c&&(c.destroy(),c=null),t.trigger(ge),t.off(),o=null,n=null,l=null,OvenPlayerConsole.log("API : remove() - currentProvider, providerController, playlistManager, playerConfig, api event destroed. "),Tn.removePlayer(t)},t.getMediaElement=function(){return u.getMediaElement()},t.getVersion=function(){return r},t},Tn=(sn=(An={}).playerList=[],An.create=function(e,t){window.OvenPlayerConsole&&0!==Object.keys(window.OvenPlayerConsole).length||(window.OvenPlayerConsole={},OvenPlayerConsole.log=function(){});var n=Ze(e),r=Sn(n);return r.init(t),sn.push(r),r},An.getPlayerList=function(){return sn},An.getPlayerByContainerId=function(e){for(var t=0;t
'+(t.isRoot?"":'<')+''+t.title+'
';return i().forEach(t.body,(function(e){n+=Rn(e,t.useCheck)})),n+="
"},Rn=function(e,t){return'
'+(t?'':"")+''+e.title+""+(e.hasNext?'>'+e.description+"":"")+"
"},Qn=function(e,t){return'
')+'
').concat(e.image?""):''," ").concat(e.duration?''.concat(s(e.duration),""):"","
")+'
'.concat(e.title,"
")+"
"},On={TextViewTemplate:function(e){return'
'+"

".concat(e,"

")+'
'},ViewTemplate:function(e,t){return'
")+'
'},HelpersTemplate:function(e,t){return'
'},BigButtonTemplate:function(e,t){return'
'+"".concat(t===ee?'':"")+"".concat(t===$?'':"")+"".concat(t===X?'':"")+"".concat(t===q?'':"")+"
"},ThumbnailTemplate:function(e,t){return'
'+"".concat(t.title?'
'.concat(t.title,"
"):"")+"
"},WaterMarkTemplate:function(e,t){return'
'+"".concat(t.waterMark.image?''):"")+"".concat(t.waterMark.text?''.concat(t.waterMark.text,""):"")+"
"},MessageBoxTemplate:function(e,t){return'
')+'
'+'
'.concat(t.message)+"".concat(t.description?'
'.concat(t.description,"
"):"")+"
"+"".concat(t.iconClass?'
'):"")+"
"},SpinnerTemplate:function(e){return'
'},ContextPanelTemplate:function(e){return'
'+''.concat(e.context," ").concat(r,"")+"
"},CaptionViewerTemplate:function(e){return'
      
'},ControlsTemplate:function(e,t){return'
'+'
'.concat(t?'':"","
")+'
'},VolumeButtonTemplate:function(e){return'
'},ProgressBarTemplate:function(e){return'
00:00
'},PlayButtonTemplate:function(e){return'
'},SettingButtonTemplate:function(e){return''},FrameButtonsTemplate:function(e){return'
'},TimeDisplayTemplate:function(e,t){return'
'+(t.duration===1/0?''+("webrtc"===t.type?t.isP2P?''.concat(e.controls.low_latency_p2p,""):''.concat(e.controls.low_latency_live,""):"".concat(e.controls.live,""))+"":'00:00 / 00:00')+"
"},FullScreenButtonTemplate:function(e){return''},PanelsTemplate:Ln,SpeedPanelTemplate:Ln,SourcePanelTemplate:Ln,QualityPanelTemplate:Ln,CaptionPanelTemplate:Ln,TimeDisplayPanelTemplate:Ln,PlaylistPanelTemplate:function(e,t){return'
'+'
'.concat(e.playlist,'
')+'
'}},Mn=function(e,t,n,r,o,a,A,s){var c,u=i().isElement(e)?ze(e):e,l={},f=null,p={};p.data=r;var d=function(e){var t=document.createElement("div");return t.innerHTML=e,c=ze(t.firstChild),t.firstChild};return n&&n.systemText&&(f=n.systemText.ui),s?u.replace(d(On[t+"Template"](f,r))):u.append(d(On[t+"Template"](f,r))),a&&a(c,p),Object.keys(o).forEach((function(e){var t=e.split(" "),n=t[0].replace(/ /gi,""),r=t[1].replace(/ /gi,""),i="";if(i="document"===r||"window"===r||"body"===r?ze(r):c.find(r)||(c.hasClass(r.replace(".",""))?c:null),!(n&&r&&i))return!1;var a=Object.keys(l).length++,A=function(t){return o[e](t,c,p)};l[a]={name:n,target:r,callback:A};var s=null;n.indexOf("touch")>-1&&(s={passive:!0});var u=i.get().length;if(u>1)for(var f=i.get(),d=0;d1)for(var o=n.get(),i=0;i-1?o=!1:(o=!0,e.find(".op-caption-text").text(""))}),r),t.on(Fe,(function(t){if(!o&&t&&t.text){var n=t.endTime-t.startTime;i&&clearTimeout(i),e.find(".op-caption-text").html(t.text),n&&(i=setTimeout((function(){e.find(".op-caption-text").text("")}),1e3*n))}}),r)}),(function(n){e.find(".op-caption-text").text(""),t.off(Pe,null,n),t.off(Fe,null,n)}))}(e,t),t.on(de,(function(){u&&v(),l&&(r&&r.destroy(),r=function(e,t,n){var r=null,o=null;return Mn(e,"WaterMark",t.getConfig(),n,{},(function(e,n){r=e.find(".op-watermark"),o=e.find(".op-watermark-text");var a=t.getConfig().waterMark,A=a.position||"top-right",s=a.y||"5%",c=a.x||"2.8125%";r.css(A.split("-")[0],s),r.css(A.split("-")[1],c);var u=a.width||"auto",l=a.height||"auto";r.css("width",u),r.css("height",l);var f=a.opacity||.7;r.css("opacity",f),a.text&&a.font&&i().each(a.font,(function(e,t){o.css(t,e)}))}),(function(){}))}(e,t,t.getConfig())),o||(h($),o=!0)}),p),t.on(ke,(function(n){n.message&&(a&&a.destroy(),A&&A.destroy(),c=Dn(e,t,n.message,null,n.timer,n.iconClass,n.onClickCallback,!1),t.once(Qe,(function(e){!e.mute&&c&&c.destroy()}),p))}),p),t.on(ye,(function(e){e&&e.newstate&&(e.newstate===X&&A&&A.destroy(),e.newstate===ee||e.newstate===ie?(f=!1,A&&A.destroy(),a&&a.destroy(),n&&n.destroy(),d||s.show(!1)):e.newstate===q?(s.show(!1),h(e.newstate)):e.newstate===re||e.newstate===ne||"adLoading"===e.newstate?(f=!1,A&&A.destroy(),a&&a.destroy(),s.show(!0)):d||s.show(!1))}),p),t.on(Me,(function(){u&&v()})),t.on(De,(function(e){if(e.currentQuality<0)return!1;e.isAuto?(d=!1,s.show(!1)):"request"===e.type?(g=e.currentQuality,d=!0,s.show(!0)):"render"===e.type&&g===e.currentQuality&&(d=!1,s.show(!1))}),p),t.on(Ce,(function(n){if(510===n.code&&(f=!0),101===n.code&&0===t.getPlaylist().length&&(f=!0),!f){var r="",o="";a&&a.destroy(),n&&n.code&&n.code>=100&&n.code<1e3?(r=n.message,100===n.code&&(o=n.error.toString())):r="Can not play due to unknown reasons.",OvenPlayerConsole.log("error occured : ",n),function(n,r,o,i,s,c){a&&a.destroy(),A&&A.destroy(),A=Dn(e,t,n,r,null,"op-warning",null,!0)}(r,o)}}),p),t.on(me,(function(e){var n="Because the network connection is unstable, the following media source will be played.";t.getCurrentSource()+1===t.getQualityLevels().length&&(n="Network connection is unstable. Check the network connection."),OvenPlayerConsole.log(n)}),p),t.on(ve,(function(){u&&v()}),p)}),(function(e){t.off(de,null,e),t.off(ye,null,e),t.off(ke,null,e),t.off(Ce,null,e),t.off(me,null,e),t.off(ve,null,e),t.off(he,null,e)}))},Pn=[],Un=function(){var e={},t=function(){for(var e=0;e1,!0===t.getConfig().hidePlaylistIcon&&(u=!1);var m={"mouseleave .op-controls":function(e,t,n){e.preventDefault(),r.setMouseDown(!1),t.find(".op-volume-slider-container").removeClass("active")},"click .op-playlist-button":function(e,n,r){e.preventDefault(),function(e,t){var n=ze(t.getContainerElement()),r="",o=t.getPlaylist(),i=o.length,a=6,A=0,s=[];function c(e){var n,A,c=Math.ceil(i/a),u=t.getCurrentPlaylist();s=o.slice(e*a,e*a+a),r.find(".op-playlist-body-row").removeChild(),r.find(".op-arrow-left").removeClass("disable"),r.find(".op-arrow-right").removeClass("disable");for(var l=0;l576?a=6:n.width()<=576&&(a=1);var l={"click .btn-close":function(e,t,n){e.preventDefault(),n.destroy()},"click .op-arrow-left":function(e,t,n){e.preventDefault(),ze(e.target).hasClass("disable")||c(--A)},"click .op-arrow-right":function(e,t,n){e.preventDefault(),ze(e.target).hasClass("disable")||c(++A)}};Mn(e,"PlaylistPanel",t.getConfig(),o,l,(function(e,n){r=e,c(A=u()),t.on(Be,(function(e){"xsmall"===e&&6===a?(a=1,c(A=u())):"small"!==e&&"medium"!==e&&"large"!==e||1!==a||(a=6,c(A=u()))}),n),t.on(he,(function(e){c(A=u())}),n),e.get().addEventListener("click",(function(e){for(var n=e.target;n;){if(ze(n).hasClass("op-playlist-card"))return void t.setCurrentPlaylist(parseInt(ze(n).attr("data-index")));n=n.parentElement}}),!0)}),(function(e){t.off(Be,null,e),t.off(he,null,e)}))}(n,t)}};return Mn(e,"Controls",t.getConfig(),u,m,(function(e,u){function p(n){a&&a.destroy(),a=function(e,t,n){var r=ze(t.getContainerElement());t.getConfig().disableSeekUI&&e.addClass("op-progressbar-container-disabled");var o=0,i=!1,a=Un(),A="",c=0,u="",l="",f="",p="",d="",g="",h=0,v="",m="",C=t.getBrowser().mobile;function y(e){var t=u.width(),n=t*e;f.css("width",n+"px"),p.css("left",n+"px");var r=(t-h)*e;d.css("left",r+"px"),o=n}function b(e){var t=u.width()*e;p.css("width",(0===e?e:t-o)+"px")}function w(e){var t=u.width(),n=u.offset().left,r=e.pageX;e.touches&&(r=e.pageX||e.touches[0].clientX);var o=(r-n)/t;return o<0?0:o>1?1:o}function E(e,n){if(a.size()>0||-1===e)return v.hide(),void m.hide();v.show(),m.show();var r=t.getDuration()*e;t.isTimecodeMode()?v.text(s(r)):v.text(Math.round(r*t.getFramerate()));var o=v.width(),i=u.width(),c=i*e,l=n.pageX-u.offset().left;n.touches&&(l=(n.pageX||n.touches[0].clientX)-u.offset().left);var f=function(e){return l0&&(n+=r),t.seek(n)}var x={"touchstart .op-progressbar":function(e){if(n)return!1;i=!0;var t=w(e);if(-1===t)return!1;y(t),b(0),B(t)},"touchmove .op-progressbar":function(e){if(i){var t=w(e);if(-1===t)return!1;y(t),b(0),B(t),E(t,e)}},"touchend .op-progressbar":function(e){i&&(i=!1),r.removeClass("op-progressbar-hover"),v.hide(),m.hide()},"mouseenter .op-progressbar":function(e,t,o){e.preventDefault(),C||(n||v.show(),r.addClass("op-progressbar-hover"))},"mouseleave .op-progressbar":function(e,t,n){e.preventDefault(),r.removeClass("op-progressbar-hover"),v.hide(),m.hide(),b(0)},"mousedown .op-progressbar":function(e,t,r){if(e.preventDefault(),n||C)return!1;i=!0;var o=w(e);if(-1===o)return!1;y(o),b(0),B(o)},"mousemove .op-progressbar":function(e,t,r){if(e.preventDefault(),!i&&!n&&!C){var o=w(e);b(o),E(o,e)}if(i&&!C){var a=w(e);if(-1===a)return!1;y(a),b(0),B(a),E(a,e)}},"mouseup .op-progressbar":function(e,t,n){e.preventDefault(),i&&!C&&(i=!1,r.removeClass("op-progressbar-hover"))}};return t.getConfig().disableSeekUI&&(x={}),Mn(e,"ProgressBar",t.getConfig(),null,x,(function(e,r){u=e,l=e.find(".op-load-progress"),f=e.find(".op-play-progress"),p=e.find(".op-hover-progress"),d=e.find(".op-progressbar-knob-container"),g=e.find(".op-progressbar-knob"),h=g.width(),v=e.find(".op-progressbar-time"),m=e.find(".op-progressbar-preview"),n?t.on(Se,(function(e){e&&e.duration&&e.position&&(y(e.position/e.duration),e.duration)}),r):(t.on(Le,(function(e){e&&e.duration&&e.position&&(c=e.duration,y(e.position/e.duration))}),r),t.on(Te,(function(e){var t,n;e&&e.bufferPercent&&(t=e.bufferPercent/100,n=u.width()*t,l.css("width",n+"px"))}),r))}),(function(e){n?t.off(Se,null,e):(t.off(Le,null,e),t.off(Te,null,e))}))}(e.find(".op-progressbar-container"),t,n)}function m(){i&&i.destroy(),i=function(e,t){var n=Un(),r={"click .op-setting-button":function(e,r,o){e.preventDefault();var i=r.closest(".op-controls-container");if(n.size()>0)n.clear();else{var a=function(e){var t={id:"panel-"+(new Date).getTime(),title:"Settings",body:[],isRoot:!0,panelType:""},n=e.getConfig();n&&n.systemText&&(Object.keys(jn).forEach((function(e){jn[e]=n.systemText.ui.setting[e]})),t.title=n.systemText.ui.setting.title);var r=e.getSources(),o=r&&r.length>0?r[e.getCurrentSource()]:null,i=e.getQualityLevels(),a=i&&i.length>0?i[e.getCurrentQuality()]:null,A=e.getCaptionList(),s=e.getCurrentCaption(),c=e.getFramerate();if(e.getDuration()!==1/0&&o&&o.type!==pe){var u={title:jn.speed,value:e.getPlaybackRate()+jn.speedUnit,description:e.getPlaybackRate()+jn.speedUnit,panelType:"speed",hasNext:!0};t.body.push(u)}if(r&&r.length>0){var l={title:jn.source,value:o?o.label:"Default",description:o?o.label:"Default",panelType:"source",hasNext:!0};t.body.push(l)}if(i&&i.length>0){var f={title:jn.quality,value:a?a.label:"Default",description:a?a.label:"Default",panelType:"quality",hasNext:!0};t.body.push(f)}if(A&&A.length>0){var p={title:jn.caption,value:A[s]?A[s].label:"OFF",description:A[s]?A[s].label:"OFF",panelType:"caption",hasNext:!0};t.body.push(p)}if(c>0){var d={title:jn.display,value:e.isTimecodeMode()?"Play time":"Framecode",description:e.isTimecodeMode()?"Play time":"Framecode",panelType:"display",hasNext:!0};t.body.push(d)}return t}(t);n.add(Wn(i,t,a))}}};return Mn(e,"SettingButton",t.getConfig(),null,r,(function(e,t){}),(function(e){}))}(e.find(".setting-holder"),t)}function C(){c||(c=function(e,t){var n=ze(t.getContainerElement()),r="",o="",i=!1,a=(t.getConfig(),t.getBrowser()),A="iOS"===a.os,s=(a.os,""),c=!1,u={onfullscreenchange:"fullscreenchange",onmozfullscreenchange:"mozfullscreenchange",onwebkitfullscreenchange:"webkitfullscreenchange",MSFullscreenChange:"MSFullscreenChange"};function l(){var e=!1,t=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;return t&&n.get()===t&&(e=!0),e}function f(){OvenPlayerConsole.log("FULLSCREEN STATE : ",l()),l()?(n.addClass("op-fullscreen"),i=!0,r.hide(),o.show()):(n.removeClass("op-fullscreen"),i=!1,r.show(),o.hide())}function p(){OvenPlayerConsole.log("afterFullScreenChangedCallback () "),f(),t.trigger(xe,i)}function d(){i?(n.removeClass("op-fullscreen"),i=!1,r.show(),o.hide()):(n.addClass("op-fullscreen"),i=!0,r.hide(),o.show()),t.trigger(xe,i)}function g(){var e;!i||A&&!l()?function(){var e,r="",o=n.get(),a=n.find("video")?n.find("video").get():o,s=null;if(A){if(a.length>1)for(var u=0;u1)for(var o=0;o9e15&&(n.duration=1/0);var r=t.getSources()[t.getCurrentSource()].sectionStart,o=t.getSources()[t.getCurrentSource()].sectionEnd;o&&(n.duration=o),r&&(n.duration=n.duration-r),function(n){A&&A.destroy(),A=function(e,t,n){var r="",o="";function i(e){return s(e)}return Mn(e,"TimeDisplay",t.getConfig(),n,{},(function(e,a){var A=t.isTimecodeMode();r=e.find(".op-time-current"),o=e.find(".op-time-duration"),n.duration!==1/0&&(A?o.text(i(n.duration)):o.text(Math.round(n.duration*t.getFramerate())+" ("+t.getFramerate()+"fps)"),t.on(Ue,(function(e){(A=e)?o.text(i(n.duration)):o.text(Math.round(n.duration*t.getFramerate())+" ("+t.getFramerate()+"fps)")}),a),t.on(Le,(function(e){A?r.text(i(e.position)):r.text(Math.round(e.position*t.getFramerate()))}),a))}),(function(e){t.off(Ue,null,e),t.off(Le,null,e)}))}(e.find(".op-left-controls"),t,n)}(n),C(),t.getFramerate&&t.getFramerate(),n.duration===1/0?(OvenPlayerConsole.log("[[[[LIVE MODE]]]]"),a&&a.destroy()):p(!1),l=!0}function b(){A&&A.destroy(),a&&a.destroy(),m(),C(),h.removeClass("linear-ad")}o=function(e,t){var n="",r="",o="",i="",a="",A="",s="",c={"click .op-play-button":function(e,n,r){e.preventDefault();var o=t.getState(),i=t.getPlaylist(),a=t.getCurrentPlaylist();o===X?t.play():o===ee||o===ie?t.pause():o===ne||o===re?t.stop():o===$||o===ae?t.play():o===te?t.setCurrentSource(t.getCurrentSource()):o===q&&i.length===a+1&&(t.seek(0),t.play())},"click .op-seek-button-back":function(e,n,r){var o=t.getConfig().seekControlInterval;o||(o=10);var i=t.getPosition()-o;i<0&&(i=0),t.seek(i)},"click .op-seek-button-forward":function(e,n,r){var o=t.getConfig().seekControlInterval;o||(o=10);var i=t.getPosition()+o;i>t.getDuration()&&(i=t.getDuration()),t.seek(i)}};return Mn(e,"PlayButton",t.getConfig(),null,c,(function(e,c){n=e.find(".op-play-button .op-play"),r=e.find(".op-play-button .op-pause"),o=e.find(".op-play-button .op-replay"),i=e.find(".op-seek-button-back"),a=e.find(".op-seek-button-forward"),A=e.find(".op-seek-back-text"),s=e.find(".op-seek-forward-text"),t.on(ye,(function(e){var t;e&&e.newstate&&(t=e.newstate,n.hide(),r.hide(),o.hide(),t===ee||t===ie||t===ne||t===re?r.show():t===$||t===ae?n.show():t===q?o.show():n.show())}),c),t.getConfig().showSeekControl||(i.hide(),a.hide());var u=t.getConfig().seekControlInterval;u?(A.text(u),s.text(u)):(A.text(10),s.text(10))}),(function(e){t.off(ye,null,e)}))}(e.find(".op-left-controls"),t),r=function(e,t){var n="",r="",o="",i="",a="",A="",s="",c=!1,u=0,l="iOS"===t.getBrowser().os||"Android"===t.getBrowser().os;function f(e){t.getMute()&&(e=0),function(e){a.hide(),A.hide(),s.hide(),e>=70?a.show():e<70&&e>0?A.show():0==e?s.show():a.show()}(e);var n=u*e/100;o.css("left",n+"px"),i.css("width",n+"px")}function p(e){var t=((e.pageX||e.touches[0].clientX)-r.offset().left)/70*100;return t<0&&(t=0),t>100&&(t=100),t}var d={"click .op-volume-button":function(e,n,r){e.preventDefault(),l||(0===t.getVolume()?(t.setMute(!1),t.setVolume(100)):t.setMute())},"mouseenter .op-volume-button":function(e,t,r){e.preventDefault(),l||n.addClass("active")},"mouseleave .op-volume-silder":function(e,t,n){e.preventDefault(),c=!1},"mousedown .op-volume-silder":function(e,n,r){e.preventDefault(),c=!0,t.setMute(!1),t.setVolume(p(e))},"mouseup .op-volume-silder":function(e,t,n){e.preventDefault(),c=!1},"mousemove .op-volume-silder":function(e,n,r){if(e.preventDefault(),!c)return!1;t.setVolume(p(e))},"touchstart .op-volume-button":function(e){l&&(t.getMute()?t.setMute(!1):t.setMute(!0))}},g=Mn(e,"VolumeButton",t.getConfig(),null,d,(function(e,c){n=e.find(".op-volume-slider-container"),t.getBrowser().mobile&&n.hide(),r=e.find(".op-volume-silder"),o=e.find(".op-volume-slider-handle"),i=e.find(".op-volume-slider-value"),a=e.find(".op-volume-max"),A=e.find(".op-volume-small"),s=e.find(".op-volume-mute"),u=64,o.css("left",u+"px"),f(t.getVolume()),t.on(de,(function(){f(t.getVolume())}),c),t.on(Re,(function(e){f(e.volume)}),c),t.on(Qe,(function(e){e.mute?f(0):f(t.getVolume())}),c)}),(function(e){t.off(de,null,e),t.off(Re,null,e),t.off(Qe,null,e)}));return g.setMouseDown=function(e){c=e},g}(e.find(".op-left-controls"),t);var w=t.getPlaylist(),E=t.getCurrentPlaylist();w&&w[E]&&w[E].adTagUrl||m(),C(),t.on(de,(function(){e.show()}),u),t.on(Oe,(function(e){n=e.duration,v=e,e.isP2P=f,y(e)}),u),t.on(Le,(function(e){(d||t&&t.getProviderName&&"rtmp"===t.getProviderName())&&!n&&v&&v.duration!==e.duration&&(v=e,y(e))}),u),t.on(Be,(function(e){h.find(".op-setting-panel")&&h.find(".op-setting-panel").css("max-height",h.height()-h.find(".op-bottom-panel").height()+"px")}),u),t.on(Ne,(function(e){f=e}),u),t.on(we,(function(){if(!l){var n="";t.getSources().length>0&&t.getSources()[t.getCurrentSource()]&&t.getSources()[t.getCurrentSource()].type&&(n=t.getSources()[t.getCurrentSource()].type),y({isP2P:f,duration:t.getDuration(),type:n})}e.show()}),u),t.on(Ce,(function(t){e.show()}),u),t.on(Ie,(function(e){e.isLinear?(h.addClass("linear-ad"),p(!0),A&&A.destroy(),i&&i.destroy(),g&&c&&c.destroy()):h.removeClass("linear-ad")}),u),t.on(Ae,(function(){b()}),u),t.on(se,(function(){b()}),u),t.on(Me,(function(){b()}),u)}),(function(e){t.off(Oe,null,e),t.off(Le,null,e),t.off(Ae,null,e),t.off(Ie,null,e),t.off(Ne,null,e),t.off(se,null,e),t.off(Be,null,e),t.off(Me,null,e),A&&A.destroy(),o&&o.destroy(),a&&a.destroy(),c&&c.destroy(),r&&r.destroy()}))},Gn=n(5655),zn=n.n(Gn),_n=n(3379),Vn=n.n(_n),Hn=n(7795),Jn=n.n(Hn),Zn=n(569),Kn=n.n(Zn),Xn=n(3565),qn=n.n(Xn),$n=n(9216),er=n.n($n),tr=n(4589),nr=n.n(tr),rr=n(2021),or={};or.styleTagTransform=nr(),or.setAttributes=qn(),or.insert=Kn().bind(null,"head"),or.domAPI=Jn(),or.insertStyleElement=er(),Vn()(rr.Z,or),rr.Z&&rr.Z.locals&&rr.Z.locals;var ir,ar=function(e){var t,n="",r="",o="",i="",a=null,A="",s=X,c=!1,u=Un(),l="",f="",p={};function d(e,n){if(A&&(clearTimeout(A),A=null),e){if(u.size()>0)return!1;t.addClass("op-autohide")}else t.removeClass("op-autohide"),n&&(A=setTimeout((function(){if(u.size()>0)return!1;t.addClass("op-autohide")}),3e3))}function g(){var e=s;e===X||e===$||e===q?(e===q&&a.seek(0),a.play()):e===ee&&a.pause()}function h(e,t){var n,r=a.getDuration(),o=a.getPosition();n=t?Math.max(o-e,0):Math.min(o+e,r),a.seek(n)}function v(e){var t,n=a.getVolume();t=e?Math.min(n+5,100):Math.max(n-5,0),a.setVolume(t)}function m(){var e=t.width();e<576?(l="xsmall",t.addClass("xsmall"),e<490&&t.addClass("xxsmall")):e<768?(l="small",t.addClass("small")):e<992?(l="medium",t.addClass("medium")):(l="large",t.addClass("large"))}var C={"click .ovenplayer":function(e,t,n){if(a&&a.trigger(Ee,e),i)return e.preventDefault(),i.destroy(),i=null,!1;if(!ze(e.target).closest(".op-controls-container")&&!ze(e.target).closest(".op-setting-panel")){if(u.size()>0)return e.preventDefault(),u.clear(),!1;a.getDuration()===1/0||a.getBrowser().mobile||g()}},"dblclick .ovenplayer":function(e,t,n){a&&a.getConfig().expandFullScreenUI&&a.toggleFullScreen&&(ze(e.target).closest(".op-controls-container")||ze(e.target).closest(".op-setting-panel")||a.toggleFullScreen())},"touchstart .ovenplayer":function(e,t,n){s===ee||s===X||s===ne||s===ie&&"xsmall"===l?d(!1,!0):d(!1)},"mouseenter .ovenplayer":function(e,t,n){e.preventDefault(),s===ee||s===X||s===ne||s===ie&&"xsmall"===l?d(!1,!0):d(!1)},"mousemove .ovenplayer":function(e,t,n){e.preventDefault(),s===ee||s===X||s===ne||s===ie&&"xsmall"===l?d(!1,!0):d(!1)},"mouseleave .ovenplayer":function(e,t,n){e.preventDefault(),(s===ee||s===X||s===ne||s===ie&&"xsmall"===l)&&d(!0)},"keydown .ovenplayer":function(e,t,n){var r=a.getFramerate();switch(e.keyCode){case 16:e.preventDefault(),c=!0;break;case 32:e.preventDefault(),g();break;case 37:e.preventDefault(),a.getConfig().disableSeekUI||(c&&r?a.seekFrame(-1):h(5,!0));break;case 39:e.preventDefault(),a.getConfig().disableSeekUI||(c&&r?a.seekFrame(1):h(5,!1));break;case 38:e.preventDefault(),v(!0);break;case 40:e.preventDefault(),v(!1)}},"keyup .ovenplayer":function(e,t,n){16===e.keyCode&&(e.preventDefault(),c=!1)},"contextmenu .ovenplayer":function(e,n,r){if(e.stopPropagation(),!ze(e.currentTarget).find("object"))return e.preventDefault(),o=e.pageX,A=e.pageY,i&&(i.destroy(),i=null),i=function(e,t,n){var r=ze(t.getContainerElement()),o={"click .op-context-item":function(e,t,n){e.preventDefault(),window.open("https://github.com/AirenSoft/OvenPlayer","_blank")}};return Mn(e,"ContextPanel",t.getConfig(),n,o,(function(e,t){var o=e.width(),i=e.height(),a=Math.min(n.pageX-r.offset().left,r.width()-o),A=Math.min(n.pageY-r.offset().top,r.height()-i);e.css("left",a+"px"),e.css("top",A+"px")}),(function(){}))}(t,a,{pageX:o,pageY:A}),!1;var o,A}};return(p=Mn(e,"View",null,e.id,C,(function(e,r){t=e,n=r,m(),f=l,new(zn())(t.get(),(function(){t.removeClass("large"),t.removeClass("medium"),t.removeClass("small"),t.removeClass("xsmall"),t.removeClass("xxsmall"),m(),l!==f&&(f=l,a&&a.trigger(Be,f))}))}),(function(){o&&(o.destroy(),o=null),r&&(r.destroy(),r=null)}),!0)).getMediaElementContainer=function(){return t.find(".op-media-element-container").get()},p.setApi=function(e){(a=e).getContainerElement=function(){return t.get()},a.getContainerId=function(){return t.get().id},a.on(de,(function(n){r||(r=Yn(t.find(".op-ui"),e)),i||t.addClass("op-no-controls")})),a.on(Ce,(function(e){if(a){var t=a.getSources()||[];r&&t.length}})),a.on(ge,(function(e){n.destroy()})),a.on(we,(function(n){!r&&i&&(r=Yn(t.find(".op-ui"),e))})),a.on(ye,(function(e){e&&e.newstate&&(s=e.newstate,e.newstate===ee||e.newstate===ie&&"xsmall"===l?d(!1,!0):d(!1))}));var i=a.getConfig()&&a.getConfig().controls;o=Fn(t.find(".op-ui"),e),r=Yn(t.find(".op-ui"),e);var A=a.getConfig().aspectRatio;if(A&&2===A.split(":").length){var c=1*A.split(":")[0],u=1*A.split(":")[1]/c*100;t.find(".op-ratio").css("padding-bottom",u+"%")}a.showControls=function(e){e?(t.removeClass("op-no-controls"),d(!1,!0)):t.addClass("op-no-controls")}},p},Ar=(ir={},Object.assign(ir,Tn),ir.create=function(e,t){console.log("[OvenPlayer] v."+r);var n=Ze(e),o=ar(n),i=Tn.create(o.getMediaElementContainer(),t);return o.setApi(i),i},ir)},1001:function(){!function(e){"use strict";if("window"in e&&"document"in e){document.querySelectorAll||(document.querySelectorAll=function(e){var t,n=document.createElement("style"),r=[];for(document.documentElement.firstChild.appendChild(n),document._qsa=[],n.styleSheet.cssText=e+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),n.parentNode.removeChild(n);document._qsa.length;)(t=document._qsa.shift()).style.removeAttribute("x-qsa"),r.push(t);return document._qsa=null,r}),document.querySelector||(document.querySelector=function(e){var t=document.querySelectorAll(e);return t.length?t[0]:null}),document.getElementsByClassName||(document.getElementsByClassName=function(e){return e=String(e).replace(/^|\s+/g,"."),document.querySelectorAll(e)}),e.Node=e.Node||function(){throw TypeError("Illegal constructor")},[["ELEMENT_NODE",1],["ATTRIBUTE_NODE",2],["TEXT_NODE",3],["CDATA_SECTION_NODE",4],["ENTITY_REFERENCE_NODE",5],["ENTITY_NODE",6],["PROCESSING_INSTRUCTION_NODE",7],["COMMENT_NODE",8],["DOCUMENT_NODE",9],["DOCUMENT_TYPE_NODE",10],["DOCUMENT_FRAGMENT_NODE",11],["NOTATION_NODE",12]].forEach((function(t){t[0]in e.Node||(e.Node[t[0]]=t[1])})),e.DOMException=e.DOMException||function(){throw TypeError("Illegal constructor")},[["INDEX_SIZE_ERR",1],["DOMSTRING_SIZE_ERR",2],["HIERARCHY_REQUEST_ERR",3],["WRONG_DOCUMENT_ERR",4],["INVALID_CHARACTER_ERR",5],["NO_DATA_ALLOWED_ERR",6],["NO_MODIFICATION_ALLOWED_ERR",7],["NOT_FOUND_ERR",8],["NOT_SUPPORTED_ERR",9],["INUSE_ATTRIBUTE_ERR",10],["INVALID_STATE_ERR",11],["SYNTAX_ERR",12],["INVALID_MODIFICATION_ERR",13],["NAMESPACE_ERR",14],["INVALID_ACCESS_ERR",15]].forEach((function(t){t[0]in e.DOMException||(e.DOMException[t[0]]=t[1])})),function(){function t(e,t,n){if("function"==typeof t){"DOMContentLoaded"===e&&(e="load");var r=this,o=function(e){e._timeStamp=Date.now(),e._currentTarget=r,t.call(this,e),e._currentTarget=null};this["_"+e+t]=o,this.attachEvent("on"+e,o)}}function n(e,t,n){if("function"==typeof t){"DOMContentLoaded"===e&&(e="load");var r=this["_"+e+t];r&&(this.detachEvent("on"+e,r),this["_"+e+t]=null)}}"Element"in e&&!Element.prototype.addEventListener&&Object.defineProperty&&(Event.CAPTURING_PHASE=1,Event.AT_TARGET=2,Event.BUBBLING_PHASE=3,Object.defineProperties(Event.prototype,{CAPTURING_PHASE:{get:function(){return 1}},AT_TARGET:{get:function(){return 2}},BUBBLING_PHASE:{get:function(){return 3}},target:{get:function(){return this.srcElement}},currentTarget:{get:function(){return this._currentTarget}},eventPhase:{get:function(){return this.srcElement===this.currentTarget?Event.AT_TARGET:Event.BUBBLING_PHASE}},bubbles:{get:function(){switch(this.type){case"click":case"dblclick":case"mousedown":case"mouseup":case"mouseover":case"mousemove":case"mouseout":case"mousewheel":case"keydown":case"keypress":case"keyup":case"resize":case"scroll":case"select":case"change":case"submit":case"reset":return!0}return!1}},cancelable:{get:function(){switch(this.type){case"click":case"dblclick":case"mousedown":case"mouseup":case"mouseover":case"mouseout":case"mousewheel":case"keydown":case"keypress":case"keyup":case"submit":return!0}return!1}},timeStamp:{get:function(){return this._timeStamp}},stopPropagation:{value:function(){this.cancelBubble=!0}},preventDefault:{value:function(){this.returnValue=!1}},defaultPrevented:{get:function(){return!1===this.returnValue}}}),[Window,HTMLDocument,Element].forEach((function(e){e.prototype.addEventListener=t,e.prototype.removeEventListener=n})))}(),function(){function t(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}"CustomEvent"in e&&"function"==typeof e.CustomEvent||(t.prototype=e.Event.prototype,e.CustomEvent=t)}(),window.addEvent=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&(e["e"+t+n]=n,e[t+n]=function(){var r=window.event;r.currentTarget=e,r.preventDefault=function(){r.returnValue=!1},r.stopPropagation=function(){r.cancelBubble=!0},r.target=r.srcElement,r.timeStamp=Date.now(),e["e"+t+n].call(this,r)},e.attachEvent("on"+t,e[t+n]))},window.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&(e.detachEvent("on"+t,e[t+n]),e[t+n]=null,e["e"+t+n]=null)},function(){function t(e,t){function n(e){return e.length?e.split(/\s+/g):[]}function r(e,t){var r=n(t),o=r.indexOf(e);return-1!==o&&r.splice(o,1),r.join(" ")}if(Object.defineProperties(this,{length:{get:function(){return n(e[t]).length}},item:{value:function(r){var o=n(e[t]);return 0<=r&&r=0&&t.item(n)!==this;);return n>-1})),window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t,n=(this.document||this.ownerDocument).querySelectorAll(e),r=this;do{for(t=n.length;--t>=0&&n.item(t)!==r;);}while(t<0&&(r=r.parentElement));return r});var t={prepend:function(){var e=[].slice.call(arguments);e=o(e),this.insertBefore(e,this.firstChild)},append:function(){var e=[].slice.call(arguments);e=o(e),this.appendChild(e)}};r(e.Document||e.HTMLDocument,t),r(e.DocumentFragment,t),r(e.Element,t);var n={before:function(){var e=[].slice.call(arguments),t=this.parentNode;if(t){for(var n=this.previousSibling;-1!==e.indexOf(n);)n=n.previousSibling;var r=o(e);t.insertBefore(r,n?n.nextSibling:t.firstChild)}},after:function(){var e=[].slice.call(arguments),t=this.parentNode;if(t){for(var n=this.nextSibling;-1!==e.indexOf(n);)n=n.nextSibling;var r=o(e);t.insertBefore(r,n)}},replaceWith:function(){var e=[].slice.call(arguments),t=this.parentNode;if(t){for(var n=this.nextSibling;-1!==e.indexOf(n);)n=n.nextSibling;var r=o(e);this.parentNode===t?t.replaceChild(r,this):t.insertBefore(r,n)}},remove:function(){this.parentNode&&this.parentNode.removeChild(this)}};r(e.DocumentType,n),r(e.Element,n),r(e.CharacterData,n)}function r(e,t){e&&Object.keys(t).forEach((function(n){if(!(n in e)&&!(n in e.prototype))try{Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t,n))}catch(r){e[n]=t[n]}}))}function o(e){var t=null;return e=e.map((function(e){return e instanceof Node?e:document.createTextNode(e)})),1===e.length?t=e[0]:(t=document.createDocumentFragment(),e.forEach((function(e){t.appendChild(e)}))),t}}(self)},5655:function(e,t){var n,r;r=this,void 0===(n=function(){return r.returnExportsGlobal=function(){"use strict";function e(){var e,t;this.q=[],this.add=function(e){this.q.push(e)},this.call=function(){for(e=0,t=this.q.length;t>e;e++)this.q[e].call()}}function t(t,r){if(t.resizedAttached){if(t.resizedAttached)return void t.resizedAttached.add(r)}else t.resizedAttached=new e,t.resizedAttached.add(r);t.resizeSensor=document.createElement("div"),t.resizeSensor.className="resize-sensor";var o="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden; opacity: 0;",i="position: absolute; left: 0; top: 0; transition: 0s;";t.resizeSensor.style.cssText=o,t.resizeSensor.innerHTML='
',t.appendChild(t.resizeSensor),"static"==function(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):e.style[t]}(t,"position")&&(t.style.position="relative");var a=t.resizeSensor.childNodes[0],A=a.childNodes[0],s=t.resizeSensor.childNodes[1],c=function(){A.style.width="100000px",A.style.height="100000px",a.scrollLeft=1e5,a.scrollTop=1e5,s.scrollLeft=1e5,s.scrollTop=1e5};c();var u=!1;n((function e(){t.resizedAttached&&(u&&(t.resizedAttached.call(),u=!1),n(e))}));var l,f,p,d,g=function(){((p=t.offsetWidth)!=l||(d=t.offsetHeight)!=f)&&(u=!0,l=p,f=d),c()},h=function(e,t,n){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener(t,n)};h(a,"scroll",g),h(s,"scroll",g)}var n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return window.setTimeout(e,20)},r=function(e,n){var r=Object.prototype.toString.call(e),o=this._isCollectionTyped="[object Array]"===r||"[object NodeList]"===r||"[object HTMLCollection]"===r||"undefined"!=typeof jQuery&&e instanceof window.jQuery||"undefined"!=typeof Elements&&e instanceof window.Elements;if(this._element=e,o)for(var i=0,a=e.length;a>i;i++)t(e[i],n);else t(e,n)};return r.prototype.detach=function(){var e=this._isCollectionTyped,t=this._element;if(e)for(var n=0,o=t.length;o>n;n++)r.detach(t[n]);else r.detach(t)},r.detach=function(e){e.resizeSensor&&(e.removeChild(e.resizeSensor),delete e.resizeSensor,delete e.resizedAttached)},r}()}.apply(t,[]))||(e.exports=n)},741:function(e,t,n){var r,o,i;function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}i=function(){var e="1.13.1",t="object"==("undefined"==typeof self?"undefined":a(self))&&self.self===self&&self||"object"==(void 0===n.g?"undefined":a(n.g))&&n.g.global===n.g&&n.g||Function("return this")()||{},r=Array.prototype,o=Object.prototype,i="undefined"!=typeof Symbol?Symbol.prototype:null,A=r.push,s=r.slice,c=o.toString,u=o.hasOwnProperty,l="undefined"!=typeof ArrayBuffer,f="undefined"!=typeof DataView,p=Array.isArray,d=Object.keys,g=Object.create,h=l&&ArrayBuffer.isView,v=isNaN,m=isFinite,C=!{toString:null}.propertyIsEnumerable("toString"),y=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],b=Math.pow(2,53)-1;function w(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),o=0;o=0&&n<=b}}function Z(e){return function(t){return null==t?void 0:t[e]}}var K=Z("byteLength"),X=J(K),q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/,$=l?function(e){return h?h(e)&&!j(e):X(e)&&q.test(c.call(e))}:H(!1),ee=Z("length");function te(e,t){t=function(e){for(var t={},n=e.length,r=0;r":">",'"':""","'":"'","`":"`"},_e=Ge(ze),Ve=Ge(be(ze)),He=oe.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Je=/(.)^/,Ze={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Ke=/\\|'|\r|\n|\u2028|\u2029/g;function Xe(e){return"\\"+Ze[e]}var qe=/^\s*(\w|\$)+\s*$/,$e=0;function et(e,t,n,r,o){if(!(r instanceof t))return e.apply(n,o);var i=Ie(e.prototype),a=e.apply(i,o);return E(a)?a:i}var tt=w((function(e,t){var n=tt.placeholder;return function r(){for(var o=0,i=t.length,a=Array(i),A=0;A1)ot(A,t-1,n,r),o=r.length;else for(var s=0,c=A.length;s0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}var ut=tt(ct,2);function lt(e,t,n){t=Ne(t,n);for(var r,o=ne(e),i=0,a=o.length;i0?0:o-1;i>=0&&i0?a=i>=0?i:Math.max(i+A,a):A=i>=0?Math.min(i+1,A):i+A+1;else if(n&&i&&A)return r[i=n(r,o)]===o?i:-1;if(o!=o)return(i=t(s.call(r,a,A),V))>=0?i+a:-1;for(i=e>0?a:A-1;i>=0&&i0?0:a-1;for(o||(r=t[i?i[A]:A],A+=e);A>=0&&A=3;return t(e,Fe(n,o,4),r,i)}}var Et=wt(1),Bt=wt(-1);function xt(e,t,n){var r=[];return t=Ne(t,n),yt(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r}function kt(e,t,n){t=Ne(t,n);for(var r=!rt(e)&&ne(e),o=(r||e).length,i=0;i=0}var Tt=w((function(e,t,n){var r,o;return F(t)?o=t:(t=Le(t),r=t.slice(0,-1),t=t[t.length-1]),bt(e,(function(e){var i=o;if(!i){if(r&&r.length&&(e=Re(e,r)),null==e)return;i=e[t]}return null==i?i:i.apply(e,n)}))}));function Lt(e,t){return bt(e,De(t))}function Rt(e,t,n){var r,o,i=-1/0,A=-1/0;if(null==t||"number"==typeof t&&"object"!=a(e[0])&&null!=e)for(var s=0,c=(e=rt(e)?e:ye(e)).length;si&&(i=r);else t=Ne(t,n),yt(e,(function(e,n,r){((o=t(e,n,r))>A||o===-1/0&&i===-1/0)&&(i=e,A=o)}));return i}function Qt(e,t,n){if(null==t||n)return rt(e)||(e=ye(e)),e[je(e.length-1)];var r=rt(e)?Se(e):ye(e),o=ee(r);t=Math.max(Math.min(t,o),0);for(var i=o-1,a=0;a1&&(r=Fe(r,t[1])),t=se(e)):(r=Nt,t=ot(t,!1,!1),e=Object(e));for(var o=0,i=t.length;o1&&(n=t[1])):(t=bt(ot(t,!1,!1),String),r=function(e,n){return!St(t,n)}),Wt(e,r,n)}));function Yt(e,t,n){return s.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}function Gt(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:Yt(e,e.length-t)}function zt(e,t,n){return s.call(e,null==t||n?1:t)}var _t=w((function(e,t){return t=ot(t,!0,!0),xt(e,(function(e){return!St(t,e)}))})),Vt=w((function(e,t){return _t(e,t)}));function Ht(e,t,n,r){x(t)||(r=n,n=t,t=!1),null!=n&&(n=Ne(n,r));for(var o=[],i=[],a=0,A=ee(e);at?(r&&(clearTimeout(r),r=null),A=c,a=e.apply(o,i),r||(o=i=null)):r||!1===n.trailing||(r=setTimeout(s,u)),a};return c.cancel=function(){clearTimeout(r),A=0,r=o=i=null},c},debounce:function(e,t,n){var r,o,i,a,A,s=function s(){var c=Ye()-o;t>c?r=setTimeout(s,t-c):(r=null,n||(a=e.apply(A,i)),r||(i=A=null))},c=w((function(c){return A=this,i=c,o=Ye(),r||(r=setTimeout(s,t),n&&(a=e.apply(A,i))),a}));return c.cancel=function(){clearTimeout(r),r=i=A=null},c},wrap:function(e,t){return tt(t,e)},negate:st,compose:function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},after:function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},before:ct,once:ut,findKey:lt,findIndex:pt,findLastIndex:dt,sortedIndex:gt,indexOf:vt,lastIndexOf:mt,find:Ct,detect:Ct,findWhere:function(e,t){return Ct(e,Me(t))},each:yt,forEach:yt,map:bt,collect:bt,reduce:Et,foldl:Et,inject:Et,reduceRight:Bt,foldr:Bt,filter:xt,select:xt,reject:function(e,t,n){return xt(e,st(Ne(t)),n)},every:kt,all:kt,some:It,any:It,contains:St,includes:St,include:St,invoke:Tt,pluck:Lt,where:function(e,t){return xt(e,Me(t))},max:Rt,min:function(e,t,n){var r,o,i=1/0,A=1/0;if(null==t||"number"==typeof t&&"object"!=a(e[0])&&null!=e)for(var s=0,c=(e=rt(e)?e:ye(e)).length;sr||void 0===n)return 1;if(n>8&255]},z=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},_=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},V=function(e){return W(e,23,4)},H=function(e){return W(e,52,8)},J=function(e,t){C(e.prototype,t,{get:function(){return k(this)[t]}})},Z=function(e,t,n,r){var o=d(n),i=k(e);if(o+t>i.byteLength)throw P(T);var a=k(i.buffer).bytes,A=o+i.byteOffset,s=b(a,A,A+t);return r?s:N(s)},K=function(e,t,n,r,o,i){var a=d(n),A=k(e);if(a+t>A.byteLength)throw P(T);for(var s=k(A.buffer).bytes,c=a+A.byteOffset,u=r(+o),l=0;lee;)(q=$[ee++])in R||s(R,q,L[q]);Q.constructor=R}v&&h(M)!==D&&v(M,D);var te=new O(new R(2)),ne=o(M.setInt8);te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||c(M,{setInt8:function(e,t){ne(this,e,t<<24>>24)},setUint8:function(e,t){ne(this,e,t<<24>>24)}},{unsafe:!0})}else Q=(R=function(e){l(this,Q);var t=d(e);I(this,{bytes:U(F(t),0),byteLength:t}),i||(this.byteLength=t)}).prototype,M=(O=function(e,t,n){l(this,M),l(e,Q);var r=k(e).byteLength,o=f(t);if(o<0||o>r)throw P("Wrong offset");if(o+(n=void 0===n?r-o:p(n))>r)throw P("Wrong length");I(this,{buffer:e,byteLength:n,byteOffset:o}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=o)}).prototype,i&&(J(R,"byteLength"),J(O,"buffer"),J(O,"byteLength"),J(O,"byteOffset")),c(M,{getInt8:function(e){return Z(this,1,e)[0]<<24>>24},getUint8:function(e){return Z(this,1,e)[0]},getInt16:function(e){var t=Z(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Z(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return _(Z(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return _(Z(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return j(Z(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return j(Z(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){K(this,1,e,Y,t)},setUint8:function(e,t){K(this,1,e,Y,t)},setInt16:function(e,t){K(this,2,e,G,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){K(this,2,e,G,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){K(this,4,e,z,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){K(this,4,e,z,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){K(this,4,e,V,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){K(this,8,e,H,t,arguments.length>2?arguments[2]:void 0)}});w(R,S),w(O,"DataView"),e.exports={ArrayBuffer:R,DataView:O}},1048:function(e,t,n){"use strict";var r=n(7908),o=n(1400),i=n(6244),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),A=i(n),s=o(e,A),c=o(t,A),u=arguments.length>2?arguments[2]:void 0,l=a((void 0===u?A:o(u,A))-c,A-s),f=1;for(c0;)c in n?n[s]=n[c]:delete n[s],s+=f,c+=f;return n}},1285:function(e,t,n){"use strict";var r=n(7908),o=n(1400),i=n(6244);e.exports=function(e){for(var t=r(this),n=i(t),a=arguments.length,A=o(a>1?arguments[1]:void 0,n),s=a>2?arguments[2]:void 0,c=void 0===s?n:o(s,n);c>A;)t[A++]=e;return t}},8533:function(e,t,n){"use strict";var r=n(2092).forEach,o=n(2133)("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},7745:function(e,t,n){var r=n(6244);e.exports=function(e,t){for(var n=0,o=r(t),i=new e(o);o>n;)i[n]=t[n++];return i}},8457:function(e,t,n){"use strict";var r=n(7854),o=n(9974),i=n(6916),a=n(7908),A=n(3411),s=n(7659),c=n(4411),u=n(6244),l=n(6135),f=n(8554),p=n(1246),d=r.Array;e.exports=function(e){var t=a(e),n=c(this),r=arguments.length,g=r>1?arguments[1]:void 0,h=void 0!==g;h&&(g=o(g,r>2?arguments[2]:void 0));var v,m,C,y,b,w,E=p(t),B=0;if(!E||this==d&&s(E))for(v=u(t),m=n?new this(v):d(v);v>B;B++)w=h?g(t[B],B):t[B],l(m,B,w);else for(b=(y=f(t,E)).next,m=n?new this:[];!(C=i(b,y)).done;B++)w=h?A(y,g,[C.value,B],!0):C.value,l(m,B,w);return m.length=B,m}},1318:function(e,t,n){var r=n(5656),o=n(1400),i=n(6244),a=function(e){return function(t,n,a){var A,s=r(t),c=i(s),u=o(a,c);if(e&&n!=n){for(;c>u;)if((A=s[u++])!=A)return!0}else for(;c>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:function(e,t,n){var r=n(9974),o=n(1702),i=n(8361),a=n(7908),A=n(6244),s=n(5417),c=o([].push),u=function(e){var t=1==e,n=2==e,o=3==e,u=4==e,l=6==e,f=7==e,p=5==e||l;return function(d,g,h,v){for(var m,C,y=a(d),b=i(y),w=r(g,h),E=A(b),B=0,x=v||s,k=t?x(d,E):n||f?x(d,0):void 0;E>B;B++)if((p||B in b)&&(C=w(m=b[B],B,y),e))if(t)k[B]=C;else if(C)switch(e){case 3:return!0;case 5:return m;case 6:return B;case 2:c(k,m)}else switch(e){case 4:return!1;case 7:c(k,m)}return l?-1:o||u?u:k}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},6583:function(e,t,n){"use strict";var r=n(2104),o=n(5656),i=n(9303),a=n(6244),A=n(2133),s=Math.min,c=[].lastIndexOf,u=!!c&&1/[1].lastIndexOf(1,-0)<0,l=A("lastIndexOf"),f=u||!l;e.exports=f?function(e){if(u)return r(c,this,arguments)||0;var t=o(this),n=a(t),A=n-1;for(arguments.length>1&&(A=s(A,i(arguments[1]))),A<0&&(A=n+A);A>=0;A--)if(A in t&&t[A]===e)return A||0;return-1}:c},1194:function(e,t,n){var r=n(7293),o=n(5112),i=n(7392),a=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},2133:function(e,t,n){"use strict";var r=n(7293);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},3671:function(e,t,n){var r=n(7854),o=n(9662),i=n(7908),a=n(8361),A=n(6244),s=r.TypeError,c=function(e){return function(t,n,r,c){o(n);var u=i(t),l=a(u),f=A(u),p=e?f-1:0,d=e?-1:1;if(r<2)for(;;){if(p in l){c=l[p],p+=d;break}if(p+=d,e?p<0:f<=p)throw s("Reduce of empty array with no initial value")}for(;e?p>=0:f>p;p+=d)p in l&&(c=n(c,l[p],p,u));return c}};e.exports={left:c(!1),right:c(!0)}},1589:function(e,t,n){var r=n(7854),o=n(1400),i=n(6244),a=n(6135),A=r.Array,s=Math.max;e.exports=function(e,t,n){for(var r=i(e),c=o(t,r),u=o(void 0===n?r:n,r),l=A(s(u-c,0)),f=0;c0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},A=function(e,t,n,r){for(var o=t.length,i=n.length,a=0,A=0;a1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!m(this,e)}}),i(p,n?{get:function(e){var t=m(this,e);return t&&t.value},set:function(e,t){return v(this,0===e?0:e,t)}}:{add:function(e){return v(this,e=0===e?0:e,e)}}),l&&r(p,"size",{get:function(){return h(this).size}}),u},setStrong:function(e,t,n){var r=t+" Iterator",o=g(t),i=g(r);c(e,t,(function(e,t){d(this,{type:r,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),u(t)}}},9320:function(e,t,n){"use strict";var r=n(1702),o=n(2248),i=n(2423).getWeakData,a=n(9670),A=n(111),s=n(5787),c=n(408),u=n(2092),l=n(2597),f=n(9909),p=f.set,d=f.getterFor,g=u.find,h=u.findIndex,v=r([].splice),m=0,C=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},b=function(e,t){return g(e.entries,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=h(this.entries,(function(t){return t[0]===e}));return~t&&v(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,n,r){var u=e((function(e,o){s(e,f),p(e,{type:t,id:m++,frozen:void 0}),null!=o&&c(o,e[r],{that:e,AS_ENTRIES:n})})),f=u.prototype,g=d(t),h=function(e,t,n){var r=g(e),o=i(a(t),!0);return!0===o?C(r).set(t,n):o[r.id]=n,e};return o(f,{delete:function(e){var t=g(this);if(!A(e))return!1;var n=i(e);return!0===n?C(t).delete(e):n&&l(n,t.id)&&delete n[t.id]},has:function(e){var t=g(this);if(!A(e))return!1;var n=i(e);return!0===n?C(t).has(e):n&&l(n,t.id)}}),o(f,n?{get:function(e){var t=g(this);if(A(e)){var n=i(e);return!0===n?C(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return h(this,e,t)}}:{add:function(e){return h(this,e,!0)}}),u}}},7710:function(e,t,n){"use strict";var r=n(2109),o=n(7854),i=n(1702),a=n(4705),A=n(1320),s=n(2423),c=n(408),u=n(5787),l=n(614),f=n(111),p=n(7293),d=n(7072),g=n(8003),h=n(9587);e.exports=function(e,t,n){var v=-1!==e.indexOf("Map"),m=-1!==e.indexOf("Weak"),C=v?"set":"add",y=o[e],b=y&&y.prototype,w=y,E={},B=function(e){var t=i(b[e]);A(b,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(m&&!f(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return m&&!f(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!f(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(a(e,!l(y)||!(m||b.forEach&&!p((function(){(new y).entries().next()})))))w=n.getConstructor(t,e,v,C),s.enable();else if(a(e,!0)){var x=new w,k=x[C](m?{}:-0,1)!=x,I=p((function(){x.has(1)})),S=d((function(e){new y(e)})),T=!m&&p((function(){for(var e=new y,t=5;t--;)e[C](t,t);return!e.has(-0)}));S||((w=t((function(e,t){u(e,b);var n=h(new y,e,w);return null!=t&&c(t,n[C],{that:n,AS_ENTRIES:v}),n}))).prototype=b,b.constructor=w),(I||T)&&(B("delete"),B("has"),v&&B("get")),(T||k)&&B(C),m&&b.clear&&delete b.clear}return E[e]=w,r({global:!0,forced:w!=y},E),g(w,e),m||n.setStrong(w,e,v),w}},9920:function(e,t,n){var r=n(2597),o=n(3887),i=n(1236),a=n(3070);e.exports=function(e,t,n){for(var A=o(t),s=a.f,c=i.f,u=0;u"+s+""}},4994:function(e,t,n){"use strict";var r=n(3383).IteratorPrototype,o=n(30),i=n(9114),a=n(8003),A=n(7497),s=function(){return this};e.exports=function(e,t,n,c){var u=t+" Iterator";return e.prototype=o(r,{next:i(+!c,n)}),a(e,u,!1,!0),A[u]=s,e}},8880:function(e,t,n){var r=n(9781),o=n(3070),i=n(9114);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},9114:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:function(e,t,n){"use strict";var r=n(4948),o=n(3070),i=n(9114);e.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},5573:function(e,t,n){"use strict";var r=n(7854),o=n(1702),i=n(7293),a=n(6650).start,A=r.RangeError,s=Math.abs,c=Date.prototype,u=c.toISOString,l=o(c.getTime),f=o(c.getUTCDate),p=o(c.getUTCFullYear),d=o(c.getUTCHours),g=o(c.getUTCMilliseconds),h=o(c.getUTCMinutes),v=o(c.getUTCMonth),m=o(c.getUTCSeconds);e.exports=i((function(){return"0385-07-25T07:06:39.999Z"!=u.call(new Date(-50000000000001))}))||!i((function(){u.call(new Date(NaN))}))?function(){if(!isFinite(l(this)))throw A("Invalid time value");var e=this,t=p(e),n=g(e),r=t<0?"-":t>9999?"+":"";return r+a(s(t),r?6:4,0)+"-"+a(v(e)+1,2,0)+"-"+a(f(e),2,0)+"T"+a(d(e),2,0)+":"+a(h(e),2,0)+":"+a(m(e),2,0)+"."+a(n,3,0)+"Z"}:u},8709:function(e,t,n){"use strict";var r=n(7854),o=n(9670),i=n(2140),a=r.TypeError;e.exports=function(e){if(o(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw a("Incorrect hint");return i(this,e)}},654:function(e,t,n){"use strict";var r=n(2109),o=n(6916),i=n(1913),a=n(6530),A=n(614),s=n(4994),c=n(9518),u=n(7674),l=n(8003),f=n(8880),p=n(1320),d=n(5112),g=n(7497),h=n(3383),v=a.PROPER,m=a.CONFIGURABLE,C=h.IteratorPrototype,y=h.BUGGY_SAFARI_ITERATORS,b=d("iterator"),w="keys",E="values",B="entries",x=function(){return this};e.exports=function(e,t,n,a,d,h,k){s(n,t,a);var I,S,T,L=function(e){if(e===d&&D)return D;if(!y&&e in O)return O[e];switch(e){case w:case E:case B:return function(){return new n(this,e)}}return function(){return new n(this)}},R=t+" Iterator",Q=!1,O=e.prototype,M=O[b]||O["@@iterator"]||d&&O[d],D=!y&&M||L(d),F="Array"==t&&O.entries||M;if(F&&(I=c(F.call(new e)))!==Object.prototype&&I.next&&(i||c(I)===C||(u?u(I,C):A(I[b])||p(I,b,x)),l(I,R,!0,!0),i&&(g[R]=x)),v&&d==E&&M&&M.name!==E&&(!i&&m?f(O,"name",E):(Q=!0,D=function(){return o(M,this)})),d)if(S={values:L(E),keys:h?D:L(w),entries:L(B)},k)for(T in S)(y||Q||!(T in O))&&p(O,T,S[T]);else r({target:t,proto:!0,forced:y||Q},S);return i&&!k||O[b]===D||p(O,b,D,{name:d}),g[t]=D,S}},7235:function(e,t,n){var r=n(857),o=n(2597),i=n(6061),a=n(3070).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},9781:function(e,t,n){var r=n(7293);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:function(e,t,n){var r=n(7854),o=n(111),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},3678:function(e){e.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},8324:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:function(e,t,n){var r=n(317)("span").classList,o=r&&r.constructor&&r.constructor.prototype;e.exports=o===Object.prototype?void 0:o},8886:function(e,t,n){var r=n(8113).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},7871:function(e){e.exports="object"==typeof window},256:function(e,t,n){var r=n(8113);e.exports=/MSIE|Trident/.test(r)},1528:function(e,t,n){var r=n(8113),o=n(7854);e.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},8334:function(e,t,n){var r=n(8113);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},5268:function(e,t,n){var r=n(4326),o=n(7854);e.exports="process"==r(o.process)},1036:function(e,t,n){var r=n(8113);e.exports=/web0s(?!.*chrome)/i.test(r)},8113:function(e,t,n){var r=n(5005);e.exports=r("navigator","userAgent")||""},7392:function(e,t,n){var r,o,i=n(7854),a=n(8113),A=i.process,s=i.Deno,c=A&&A.versions||s&&s.version,u=c&&c.v8;u&&(o=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},8008:function(e,t,n){var r=n(8113).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2914:function(e,t,n){var r=n(7293),o=n(9114);e.exports=!r((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)}))},7762:function(e,t,n){"use strict";var r=n(9781),o=n(7293),i=n(9670),a=n(30),A=n(6277),s=Error.prototype.toString,c=o((function(){if(r){var e=a(Object.defineProperty({},"name",{get:function(){return this===e}}));if("true"!==s.call(e))return!0}return"2: 1"!==s.call({message:1,name:2})||"Error"!==s.call({})}));e.exports=c?function(){var e=i(this),t=A(e.name,"Error"),n=A(e.message);return t?n?t+": "+n:t:n}:s},2109:function(e,t,n){var r=n(7854),o=n(1236).f,i=n(8880),a=n(1320),A=n(3505),s=n(9920),c=n(4705);e.exports=function(e,t){var n,u,l,f,p,d=e.target,g=e.global,h=e.stat;if(n=g?r:h?r[d]||A(d,{}):(r[d]||{}).prototype)for(u in t){if(f=t[u],l=e.noTargetGet?(p=o(n,u))&&p.value:n[u],!c(g?u:d+(h?".":"#")+u,e.forced)&&void 0!==l){if(typeof f==typeof l)continue;s(f,l)}(e.sham||l&&l.sham)&&i(f,"sham",!0),a(n,u,f,e)}}},7293:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:function(e,t,n){"use strict";n(4916);var r=n(1702),o=n(1320),i=n(2261),a=n(7293),A=n(5112),s=n(8880),c=A("species"),u=RegExp.prototype;e.exports=function(e,t,n,l){var f=A(e),p=!a((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),d=p&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return t=!0,null},n[f](""),!t}));if(!p||!d||n){var g=r(/./[f]),h=t(f,""[e],(function(e,t,n,o,a){var A=r(e),s=t.exec;return s===i||s===u.exec?p&&!a?{done:!0,value:g(t,n,o)}:{done:!0,value:A(n,t,o)}:{done:!1}}));o(String.prototype,e,h[0]),o(u,f,h[1])}l&&s(u[f],"sham",!0)}},6790:function(e,t,n){"use strict";var r=n(7854),o=n(3157),i=n(6244),a=n(9974),A=r.TypeError,s=function(e,t,n,r,c,u,l,f){for(var p,d,g=c,h=0,v=!!l&&a(l,f);h0&&o(p))d=i(p),g=s(e,t,p,d,g,u-1)-1;else{if(g>=9007199254740991)throw A("Exceed the acceptable array length");e[g]=p}g++}h++}return g};e.exports=s},6677:function(e,t,n){var r=n(7293);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},2104:function(e,t,n){var r=n(4374),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},9974:function(e,t,n){var r=n(1702),o=n(9662),i=n(4374),a=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},4374:function(e,t,n){var r=n(7293);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},7065:function(e,t,n){"use strict";var r=n(7854),o=n(1702),i=n(9662),a=n(111),A=n(2597),s=n(206),c=n(4374),u=r.Function,l=o([].concat),f=o([].join),p={},d=function(e,t,n){if(!A(p,t)){for(var r=[],o=0;o]*>)/g,u=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,l,f){var p=n+e.length,d=r.length,g=u;return void 0!==l&&(l=o(l),g=c),A(f,g,(function(o,A){var c;switch(a(A,0)){case"$":return"$";case"&":return e;case"`":return s(t,0,n);case"'":return s(t,p);case"<":c=l[s(A,1,-1)];break;default:var u=+A;if(0===u)return o;if(u>d){var f=i(u/10);return 0===f?o:f<=d?void 0===r[f-1]?a(A,1):r[f-1]+a(A,1):o}c=r[u-1]}return void 0===c?"":c}))}},7854:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},2597:function(e,t,n){var r=n(1702),o=n(7908),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},3501:function(e){e.exports={}},842:function(e,t,n){var r=n(7854);e.exports=function(e,t){var n=r.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}},490:function(e,t,n){var r=n(5005);e.exports=r("document","documentElement")},4664:function(e,t,n){var r=n(9781),o=n(7293),i=n(317);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},1179:function(e,t,n){var r=n(7854).Array,o=Math.abs,i=Math.pow,a=Math.floor,A=Math.log,s=Math.LN2;e.exports={pack:function(e,t,n){var c,u,l,f=r(n),p=8*n-t-1,d=(1<>1,h=23===t?i(2,-24)-i(2,-77):0,v=e<0||0===e&&1/e<0?1:0,m=0;for((e=o(e))!=e||e===1/0?(u=e!=e?1:0,c=d):(c=a(A(e)/s),e*(l=i(2,-c))<1&&(c--,l*=2),(e+=c+g>=1?h/l:h*i(2,1-g))*l>=2&&(c++,l/=2),c+g>=d?(u=0,c=d):c+g>=1?(u=(e*l-1)*i(2,t),c+=g):(u=e*i(2,g-1)*i(2,t),c=0));t>=8;)f[m++]=255&u,u/=256,t-=8;for(c=c<0;)f[m++]=255&c,c/=256,p-=8;return f[--m]|=128*v,f},unpack:function(e,t){var n,r=e.length,o=8*r-t-1,a=(1<>1,s=o-7,c=r-1,u=e[c--],l=127&u;for(u>>=7;s>0;)l=256*l+e[c--],s-=8;for(n=l&(1<<-s)-1,l>>=-s,s+=t;s>0;)n=256*n+e[c--],s-=8;if(0===l)l=1-A;else{if(l===a)return n?NaN:u?-1/0:1/0;n+=i(2,t),l-=A}return(u?-1:1)*n*i(2,l-t)}}},8361:function(e,t,n){var r=n(7854),o=n(1702),i=n(7293),a=n(4326),A=r.Object,s=o("".split);e.exports=i((function(){return!A("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?s(e,""):A(e)}:A},9587:function(e,t,n){var r=n(614),o=n(111),i=n(7674);e.exports=function(e,t,n){var a,A;return i&&r(a=t.constructor)&&a!==n&&o(A=a.prototype)&&A!==n.prototype&&i(e,A),e}},2788:function(e,t,n){var r=n(1702),o=n(614),i=n(5465),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},8340:function(e,t,n){var r=n(111),o=n(8880);e.exports=function(e,t){r(t)&&"cause"in t&&o(e,"cause",t.cause)}},2423:function(e,t,n){var r=n(2109),o=n(1702),i=n(3501),a=n(111),A=n(2597),s=n(3070).f,c=n(8006),u=n(1156),l=n(2050),f=n(9711),p=n(6677),d=!1,g=f("meta"),h=0,v=function(e){s(e,g,{value:{objectID:"O"+h++,weakData:{}}})},m=e.exports={enable:function(){m.enable=function(){},d=!0;var e=c.f,t=o([].splice),n={};n[g]=1,e(n).length&&(c.f=function(n){for(var r=e(n),o=0,i=r.length;om;m++)if((y=T(e[m]))&&u(h,y))return y;return new g(!1)}r=l(e,v)}for(b=r.next;!(w=i(b,r)).done;){try{y=T(w.value)}catch(e){p(r,"throw",e)}if("object"==typeof y&&y&&u(h,y))return y}return new g(!1)}},9212:function(e,t,n){var r=n(6916),o=n(9670),i=n(8173);e.exports=function(e,t,n){var a,A;o(e);try{if(!(a=i(e,"return"))){if("throw"===t)throw n;return n}a=r(a,e)}catch(e){A=!0,a=e}if("throw"===t)throw n;if(A)throw a;return o(a),n}},3383:function(e,t,n){"use strict";var r,o,i,a=n(7293),A=n(614),s=n(30),c=n(9518),u=n(1320),l=n(5112),f=n(1913),p=l("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=c(c(i)))!==Object.prototype&&(r=o):d=!0),null==r||a((function(){var e={};return r[p].call(e)!==e}))?r={}:f&&(r=s(r)),A(r[p])||u(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},7497:function(e){e.exports={}},6244:function(e,t,n){var r=n(7466);e.exports=function(e){return r(e.length)}},6736:function(e){var t=Math.expm1,n=Math.exp;e.exports=!t||t(10)>22025.465794806718||t(10)<22025.465794806718||-2e-17!=t(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:n(e)-1}:t},6130:function(e,t,n){var r=n(4310),o=Math.abs,i=Math.pow,a=i(2,-52),A=i(2,-23),s=i(2,127)*(2-A),c=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=o(e),u=r(e);return is||n!=n?u*(1/0):u*n}},202:function(e){var t=Math.log,n=Math.LOG10E;e.exports=Math.log10||function(e){return t(e)*n}},6513:function(e){var t=Math.log;e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:t(1+e)}},4310:function(e){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},5948:function(e,t,n){var r,o,i,a,A,s,c,u,l=n(7854),f=n(9974),p=n(1236).f,d=n(261).set,g=n(8334),h=n(1528),v=n(1036),m=n(5268),C=l.MutationObserver||l.WebKitMutationObserver,y=l.document,b=l.process,w=l.Promise,E=p(l,"queueMicrotask"),B=E&&E.value;B||(r=function(){var e,t;for(m&&(e=b.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(e){throw o?a():i=void 0,e}}i=void 0,e&&e.enter()},g||m||v||!C||!y?!h&&w&&w.resolve?((c=w.resolve(void 0)).constructor=w,u=f(c.then,c),a=function(){u(r)}):m?a=function(){b.nextTick(r)}:(d=f(d,l),a=function(){d(r)}):(A=!0,s=y.createTextNode(""),new C(r).observe(s,{characterData:!0}),a=function(){s.data=A=!A})),e.exports=B||function(e){var t={fn:e,next:void 0};i&&(i.next=t),o||(o=t,a()),i=t}},3366:function(e,t,n){var r=n(7854);e.exports=r.Promise},133:function(e,t,n){var r=n(7392),o=n(7293);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},590:function(e,t,n){var r=n(7293),o=n(5112),i=n(1913),a=o("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),i&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},8536:function(e,t,n){var r=n(7854),o=n(614),i=n(2788),a=r.WeakMap;e.exports=o(a)&&/native code/.test(i(a))},8523:function(e,t,n){"use strict";var r=n(9662),o=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new o(e)}},6277:function(e,t,n){var r=n(1340);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},3929:function(e,t,n){var r=n(7854),o=n(7850),i=r.TypeError;e.exports=function(e){if(o(e))throw i("The method doesn't accept regular expressions");return e}},7023:function(e,t,n){var r=n(7854).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&r(e)}},2814:function(e,t,n){var r=n(7854),o=n(7293),i=n(1702),a=n(1340),A=n(3111).trim,s=n(1361),c=i("".charAt),u=r.parseFloat,l=r.Symbol,f=l&&l.iterator,p=1/u(s+"-0")!=-1/0||f&&!o((function(){u(Object(f))}));e.exports=p?function(e){var t=A(a(e)),n=u(t);return 0===n&&"-"==c(t,0)?-0:n}:u},3009:function(e,t,n){var r=n(7854),o=n(7293),i=n(1702),a=n(1340),A=n(3111).trim,s=n(1361),c=r.parseInt,u=r.Symbol,l=u&&u.iterator,f=/^[+-]?0x/i,p=i(f.exec),d=8!==c(s+"08")||22!==c(s+"0x16")||l&&!o((function(){c(Object(l))}));e.exports=d?function(e,t){var n=A(a(e));return c(n,t>>>0||(p(f,n)?16:10))}:c},1574:function(e,t,n){"use strict";var r=n(9781),o=n(1702),i=n(6916),a=n(7293),A=n(1956),s=n(5181),c=n(5296),u=n(7908),l=n(8361),f=Object.assign,p=Object.defineProperty,d=o([].concat);e.exports=!f||a((function(){if(r&&1!==f({b:1},f(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=f({},e)[n]||A(f({},t)).join("")!=o}))?function(e,t){for(var n=u(e),o=arguments.length,a=1,f=s.f,p=c.f;o>a;)for(var g,h=l(arguments[a++]),v=f?d(A(h),f(h)):A(h),m=v.length,C=0;m>C;)g=v[C++],r&&!i(p,h,g)||(n[g]=h[g]);return n}:f},30:function(e,t,n){var r,o=n(9670),i=n(6048),a=n(748),A=n(3501),s=n(490),c=n(317),u=n(6200)("IE_PROTO"),l=function(){},f=function(e){return"