From 7059714109ac75d4ffe260b4a45fa7a8263a0c0f Mon Sep 17 00:00:00 2001 From: SashaXser <24498484+SashaXser@users.noreply.github.com> Date: Sat, 22 Jun 2024 19:28:14 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20#674?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/vot-cloudflare-min.user.js | 2 +- dist/vot-cloudflare.user.js | 10 +++++++--- dist/vot-min.user.js | 2 +- dist/vot.user.js | 10 +++++++--- src/getUUID.js | 10 +++++++--- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/dist/vot-cloudflare-min.user.js b/dist/vot-cloudflare-min.user.js index 9e9d52bf..c26aef69 100644 --- a/dist/vot-cloudflare-min.user.js +++ b/dist/vot-cloudflare-min.user.js @@ -138,4 +138,4 @@ // @supportURL https://github.com/ilyhalight/voice-over-translation/issues // ==/UserScript== -(()=>{var t={"./node_modules/bowser/es5.js":function(t){t.exports=function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=90)}({17:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n=o(18),i=function(){function t(){}return t.getFirstMatch=function(t,e){var o=e.match(t);return o&&o.length>0&&o[1]||""},t.getSecondMatch=function(t,e){var o=e.match(t);return o&&o.length>1&&o[2]||""},t.matchAndReturnConst=function(t,e,o){if(t.test(e))return o},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,o,n){void 0===n&&(n=!1);var i=t.getVersionPrecision(e),a=t.getVersionPrecision(o),r=Math.max(i,a),s=0,l=t.map([e,o],(function(e){var o=r-t.getVersionPrecision(e),n=e+new Array(o+1).join(".0");return t.map(n.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(n&&(s=r-Math.min(i,a)),r-=1;r>=s;){if(l[0][r]>l[1][r])return 1;if(l[0][r]===l[1][r]){if(r===s)return 0;r-=1}else if(l[0][r]1?i-1:0),r=1;r0){var r=Object.keys(o),l=s.default.find(r,(function(t){return e.isOS(t)}));if(l){var d=this.satisfies(o[l]);if(void 0!==d)return d}var c=s.default.find(r,(function(t){return e.isPlatform(t)}));if(c){var u=this.satisfies(o[c]);if(void 0!==u)return u}}if(a>0){var h=Object.keys(i),p=s.default.find(h,(function(t){return e.isBrowser(t,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var o=this.getBrowserName().toLowerCase(),n=t.toLowerCase(),i=s.default.getBrowserTypeByAlias(n);return e&&i&&(n=i.toLowerCase()),n===o},e.compareVersion=function(t){var e=[0],o=t,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(o=t.substr(1),"="===t[1]?(n=!0,o=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?o=t.substr(1):"~"===t[0]&&(n=!0,o=t.substr(1)),e.indexOf(s.default.compareVersions(i,o,n))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=d,t.exports=e.default},92:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=/version\/(\d+(\.?_?\d+)+)/i,r=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},o=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},o=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},o=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},o=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},o=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},o=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},o=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},o=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},o=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},o=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},o=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},o=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return o&&(e.version=o),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},o=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},o=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},o=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},o=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},o=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},o=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},o=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},o=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},o=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},o=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},o=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},o=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e={name:"Android Browser"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(e,t),version:i.default.getSecondMatch(e,t)}}}];e.default=r,t.exports=e.default},93:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/Roku\/DVP/],describe:function(t){var e=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:a.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),o=i.default.getWindowsVersionName(e);return{name:a.OS_MAP.Windows,version:e,versionName:o}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:a.OS_MAP.iOS},o=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return o&&(e.version=o),e}},{test:[/macintosh/i],describe:function(t){var e=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),o=i.default.getMacOSVersionName(e),n={name:a.OS_MAP.MacOS,version:e};return o&&(n.versionName=o),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),o=i.default.getAndroidVersionName(e),n={name:a.OS_MAP.Android,version:e};return o&&(n.versionName=o),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),o={name:a.OS_MAP.WebOS};return e&&e.length&&(o.version=e),o}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:a.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.PlayStation4,version:e}}}];e.default=r,t.exports=e.default},94:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",o={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(o.model=e),o}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),o=t.test(/like (ipod|iphone)/i);return e&&!o},describe:function(t){var e=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];e.default=r,t.exports=e.default},95:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:a.ENGINE_MAP.Blink};var e=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:a.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:a.ENGINE_MAP.Trident},o=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:a.ENGINE_MAP.Presto},o=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=t.test(/gecko/i),o=t.test(/like gecko/i);return e&&!o},describe:function(t){var e={name:a.ENGINE_MAP.Gecko},o=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:a.ENGINE_MAP.WebKit},o=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}}];e.default=r,t.exports=e.default}})},"./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss":(t,e,o)=>{"use strict";o.d(e,{A:()=>s});var n=o("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),i=o.n(n),a=o("./node_modules/css-loader/dist/runtime/api.js"),r=o.n(a)()(i());r.push([t.id,'.vot-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:none;border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-ontheme));background-color:rgb(var(--vot-helper-theme));box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer;transition:box-shadow .2s}.vot-button[hidden]{display:none !important}.vot-button::-moz-focus-inner{border:none}.vot-button::before,.vot-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-button::before{background-color:rgb(var(--vot-helper-ontheme));transition:opacity .2s}.vot-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-button:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.vot-button:hover::before{opacity:.08}.vot-button:active{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.vot-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s}.vot-button:disabled{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.12);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);box-shadow:none;cursor:initial}.vot-button:disabled::before,.vot-button:disabled::after{opacity:0}.vot-outlined-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:solid 1px;border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.24);border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:34px;outline:none;cursor:pointer}.vot-outlined-button[hidden]{display:none !important}.vot-outlined-button::-moz-focus-inner{border:none}.vot-outlined-button::before,.vot-outlined-button::after{content:"";position:absolute;border-radius:3px;top:0;right:0;bottom:0;left:0;opacity:0}.vot-outlined-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-outlined-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-outlined-button:hover::before{opacity:.04}.vot-outlined-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-outlined-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-outlined-button:disabled::before,.vot-outlined-button:disabled::after{opacity:0}.vot-text-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:4px;padding:0 8px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-text-button[hidden]{display:none !important}.vot-text-button::-moz-focus-inner{border:none}.vot-text-button::before,.vot-text-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-text-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-text-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-text-button:hover::before{opacity:.04}.vot-text-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-text-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-text-button:disabled::before,.vot-text-button:disabled::after{opacity:0}.vot-icon-button{--vot-helper-onsurface: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:50%;padding:0;width:36px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;fill:var(--vot-helper-onsurface);color:var(--vot-helper-onsurface);background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-icon-button[hidden]{display:none !important}.vot-icon-button::-moz-focus-inner{border:none}.vot-icon-button::before,.vot-icon-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-icon-button::before{background-color:var(--vot-helper-onsurface);transition:opacity .2s}.vot-icon-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity .3s,background-size .4s}.vot-icon-button:hover::before{opacity:.04}.vot-icon-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s,opacity 0s}.vot-icon-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);fill:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-icon-button:disabled::before,.vot-icon-button:disabled::after{opacity:0}.vot-textfield{--vot-helper-theme: rgb( var(--vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243)) ) !important;--vot-helper-safari1: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.38 ) !important;--vot-helper-safari2: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari3: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;position:relative !important;display:inline-block;padding-top:6px !important;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-textfield[hidden]{display:none !important}.vot-textfield>input,.vot-textfield>textarea{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:0 !important;border-style:solid !important;border-width:1px !important;border-color:rgba(0,0,0,0) var(--vot-helper-safari2) var(--vot-helper-safari2) !important;border-radius:4px !important;padding:15px 13px 15px !important;width:100% !important;height:inherit !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;-webkit-text-fill-color:currentColor !important;background-color:rgba(0,0,0,0) !important;box-shadow:inset 1px 0 rgba(0,0,0,0),inset -1px 0 rgba(0,0,0,0),inset 0 -1px rgba(0,0,0,0) !important;font-family:inherit !important;font-size:inherit !important;line-height:inherit !important;caret-color:var(--vot-helper-theme) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input:not(:focus):placeholder-shown,.vot-textfield>textarea:not(:focus):placeholder-shown{border-top-color:var(--vot-helper-safari2) !important}.vot-textfield>input+span,.vot-textfield>textarea+span{position:absolute !important;top:0 !important;left:0 !important;display:flex !important;width:100% !important;max-height:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;font-size:75% !important;line-height:15px !important;cursor:text !important;transition:color .2s,font-size .2s,line-height .2s !important;pointer-events:none !important}.vot-textfield>input:not(:focus):placeholder-shown+span,.vot-textfield>textarea:not(:focus):placeholder-shown+span{font-size:inherit !important;line-height:68px !important}.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{content:"" !important;display:block !important;-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin-top:6px !important;border-top:solid 1px var(--vot-helper-safari2) !important;min-width:10px !important;height:8px !important;pointer-events:none !important;box-shadow:inset 0 1px rgba(0,0,0,0) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input+span::before,.vot-textfield>textarea+span::before{margin-right:4px !important;border-left:solid 1px rgba(0,0,0,0) !important;border-radius:4px 0 !important}.vot-textfield>input+span::after,.vot-textfield>textarea+span::after{flex-grow:1 !important;margin-left:4px !important;border-right:solid 1px rgba(0,0,0,0) !important;border-radius:0 4px !important}.vot-textfield>input:not(:focus):placeholder-shown+span::before,.vot-textfield>input:not(:focus):placeholder-shown+span::after,.vot-textfield>textarea:not(:focus):placeholder-shown+span::before,.vot-textfield>textarea:not(:focus):placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}.vot-textfield:hover>input,.vot-textfield:hover>textarea{border-color:rgba(0,0,0,0) var(--vot-helper-safari3) var(--vot-helper-safari3) !important}.vot-textfield:hover>input+span::before,.vot-textfield:hover>input+span::after,.vot-textfield:hover>textarea+span::before,.vot-textfield:hover>textarea+span::after{border-top-color:var(--vot-helper-safari3) !important}.vot-textfield:hover>input:not(:focus):placeholder-shown,.vot-textfield:hover>textarea:not(:focus):placeholder-shown{border-color:var(--vot-helper-safari3) !important}.vot-textfield>input:focus,.vot-textfield>textarea:focus{border-color:rgba(0,0,0,0) var(--vot-helper-theme) var(--vot-helper-theme) !important;box-shadow:inset 1px 0 var(--vot-helper-theme),inset -1px 0 var(--vot-helper-theme),inset 0 -1px var(--vot-helper-theme) !important;outline:none !important}.vot-textfield>input:focus+span,.vot-textfield>textarea:focus+span{color:var(--vot-helper-theme) !important}.vot-textfield>input:focus+span::before,.vot-textfield>input:focus+span::after,.vot-textfield>textarea:focus+span::before,.vot-textfield>textarea:focus+span::after{border-top-color:var(--vot-helper-theme) !important;box-shadow:inset 0 1px var(--vot-helper-theme) !important}.vot-textfield>input:disabled,.vot-textfield>input:disabled+span,.vot-textfield>textarea:disabled,.vot-textfield>textarea:disabled+span{border-color:rgba(0,0,0,0) var(--vot-helper-safari1) var(--vot-helper-safari1) !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;pointer-events:none !important}.vot-textfield>input:disabled+span::before,.vot-textfield>input:disabled+span::after,.vot-textfield>textarea:disabled+span::before,.vot-textfield>textarea:disabled+span::after{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown,.vot-textfield>input:disabled:placeholder-shown+span,.vot-textfield>textarea:disabled:placeholder-shown,.vot-textfield>textarea:disabled:placeholder-shown+span{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown+span::before,.vot-textfield>input:disabled:placeholder-shown+span::after,.vot-textfield>textarea:disabled:placeholder-shown+span::before,.vot-textfield>textarea:disabled:placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}@media not all and (min-resolution: 0.001dpcm){@supports(-webkit-appearance: none){.vot-textfield>input,.vot-textfield>input+span,.vot-textfield>textarea,.vot-textfield>textarea+span,.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{transition-duration:.1s !important}}}.vot-checkbox{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );z-index:0;position:relative;display:inline-block;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-checkbox[hidden]{display:none !important}.vot-checkbox>input{appearance:none;-moz-appearance:none;-webkit-appearance:none;z-index:10000;position:absolute;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:3px 1px;border:solid 2px;background:rgba(0,0,0,0);border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6);border-radius:2px;width:18px;height:18px;outline:none;cursor:pointer;transition:border-color .2s,background-color .2s}.vot-checkbox>input+span{display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding-left:30px;width:inherit;cursor:pointer;font-weight:normal}.vot-checkbox>input+span::before{content:"";position:absolute;left:-10px;top:-8px;display:block;border-radius:50%;width:40px;height:40px;background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0));opacity:0;transform:scale(1);pointer-events:none;transition:opacity .3s,transform .2s}.vot-checkbox>input+span::after{content:"";z-index:10000;display:block;position:absolute;top:3px;left:1px;-webkit-box-sizing:content-box !important;-moz-box-sizing:content-box !important;box-sizing:content-box !important;width:10px;height:5px;border:solid 2px rgba(0,0,0,0);border-right-width:0;border-top-width:0;pointer-events:none;transform:translate(3px, 4px) rotate(-45deg);transition:border-color .2s}.vot-checkbox>input:checked,.vot-checkbox>input:indeterminate{border-color:rgb(var(--vot-helper-theme));background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::before,.vot-checkbox>input:indeterminate+span::before{background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::after,.vot-checkbox>input:indeterminate+span::after{border-color:rgb(var(--vot-helper-ontheme, 255, 255, 255))}.vot-checkbox>input:indeterminate+span::after{border-left-width:0;transform:translate(4px, 3px)}.vot-checkbox:hover>input+span::before{opacity:.04}.vot-checkbox:active>input,.vot-checkbox:active:hover>input{border-color:rgb(var(--vot-helper-theme))}.vot-checkbox:active>input:checked{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6)}.vot-checkbox:active>input+span::before{opacity:1;transform:scale(0);transition:transform 0s,opacity 0s}.vot-checkbox>input:disabled{border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled:checked,.vot-checkbox>input:disabled:indeterminate{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38)}.vot-checkbox>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled+span::before{opacity:0;transform:scale(0)}.vot-slider{--vot-safari-helper1: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.04 ) !important;--vot-safari-helper2: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.12 ) !important;--vot-safari-helper3: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.16 ) !important;--vot-safari-helper4: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.24 ) !important;display:inline-block;width:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;font-family:var(--vot-font, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-slider[hidden]{display:none !important}.vot-slider>input{-webkit-appearance:none !important;appearance:none !important;position:relative !important;top:24px !important;display:block !important;margin:0 0 -36px !important;width:100% !important;height:36px !important;background-color:rgba(0,0,0,0) !important;cursor:pointer !important}.vot-slider>input:last-child{position:static !important;margin:0 !important}.vot-slider>span{display:inline-block !important;margin-bottom:36px !important}.vot-slider>input:disabled{cursor:default !important;opacity:.38 !important}.vot-slider>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input::-webkit-slider-runnable-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-webkit-slider-thumb{margin:0 !important;appearance:none !important;-webkit-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper1) !important}.vot-slider>input:active::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper4) !important}.vot-slider>input:disabled::-webkit-slider-runnable-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-webkit-slider-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;color:rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-range-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-moz-range-thumb{appearance:none !important;-moz-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider>input::-moz-range-progress{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider:hover>input:hover::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-moz-range-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-moz-range-progress{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important}.vot-slider>input:disabled::-moz-range-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-focus-outer{border:none !important}.vot-slider>input:focus{outline:none !important}.vot-slider>input::-ms-track{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:17px 0 !important;border:none !important;border-radius:1px !important;padding:0 17px !important;width:100% !important;height:2px !important;background-color:rgba(0,0,0,0) !important}.vot-slider>input::-ms-fill-lower{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider>input::-ms-fill-upper{border-radius:1px !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-ms-thumb{appearance:none !important;margin:0 17px !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-ms-fill-lower{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-ms-fill-upper{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;opacity:.38 !important}.vot-slider>input:disabled::-ms-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::before{content:"" !important;display:block !important;position:absolute !important;width:calc(100%*var(--vot-progress, 0)) !important;height:2px !important;top:calc(50% - 1px) !important;background:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0) !important;--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87) !important;--vot-helper-safari1: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari2: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;display:flex;align-items:center;justify-content:space-between;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;line-height:1.5;text-align:start;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-select[hidden]{display:none !important}.vot-select-label{font-size:16px}.vot-select-outer{display:flex;align-items:center;justify-content:space-between;max-width:120px;width:120px;padding:0 5px;border-style:solid !important;border-width:1px !important;border-color:var(--vot-helper-safari1) !important;border-radius:4px !important;cursor:pointer;transition:border .2s !important}.vot-select-outer:hover{border-color:var(--vot-helper-safari2) !important}.vot-select-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vot-select-arrow-icon{width:20px;height:32px;display:flex;justify-content:center;align-items:center}.vot-select-content-list{display:flex;flex-direction:column}.vot-select-content-list .vot-select-content-item{padding:5px 10px;border-radius:8px;cursor:pointer}.vot-select-content-list .vot-select-content-item:not([inert]):hover{background-color:#2a2c31}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]{color:rgb(var(--vot-primary-rgb, 33, 150, 243));background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.2)}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]:hover{background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.1) !important}.vot-select-content-list .vot-select-content-item[data-vot-disabled=true]{cursor:default}.vot-select-content-list .vot-select-content-item[hidden]{display:none !important}.vot-header{color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-weight:bold;line-height:1.5;text-align:start}.vot-header[hidden]{display:none !important}.vot-header:not(:first-child){padding-top:8px}.vot-header-level-1{font-size:2em}.vot-header-level-2{font-size:1.5em}.vot-header-level-3{font-size:1.17em}.vot-header-level-4{font-size:1em}.vot-header-level-5{font-size:.83em}.vot-header-level-6{font-size:.67em}.vot-info{display:flex;color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-info[hidden]{display:none !important}.vot-info>:not(:first-child){color:rgba(var(--vot-helper-onsurface-rgb), 0.5);flex:1;margin-left:8px}.vot-lang-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);display:flex;align-items:center;justify-content:space-between;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-lang-select[hidden]{display:none !important}.vot-lang-select-icon{width:32px;height:32px;display:flex;justify-content:center;align-items:center}.vot-segmented-button{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:5rem;transform:translate(-50%);user-select:none;display:flex;align-items:center;height:32px;max-width:100vw;background:rgb(var(--vot-surface-rgb, 255, 255, 255));color:var(--vot-helper-theme);fill:var(--vot-helper-theme);border-radius:4px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;cursor:default;transition:opacity .5s;z-index:10000}.vot-segmented-button[hidden]{display:none !important}.vot-segmented-button *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-segmented-button .vot-separator{width:1px;height:50%;background:rgba(var(--vot-helper-theme-rgb), 0.1)}.vot-segmented-button .vot-separator[hidden]{display:none !important}.vot-segmented-button .vot-segment,.vot-segmented-button .vot-segment-only-icon{position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;height:100%;padding:0 8px;background-color:rgba(0,0,0,0);color:inherit;transition:background-color 100ms ease-in-out;border:none}.vot-segmented-button .vot-segment[hidden],.vot-segmented-button [hidden].vot-segment-only-icon{display:none !important}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before,.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before{background-color:rgb(var(--vot-helper-theme-rgb));transition:opacity .2s}.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-segmented-button .vot-segment:hover::before,.vot-segmented-button .vot-segment-only-icon:hover::before{opacity:.04}.vot-segmented-button .vot-segment:active::after,.vot-segmented-button .vot-segment-only-icon:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-segmented-button .vot-segment-only-icon{min-width:32px;padding:0}.vot-segmented-button .vot-segment-label{margin-left:8px;white-space:nowrap}.vot-segmented-button[data-status=success] .vot-translate-button{color:rgb(var(--vot-primary-rgb, 33, 150, 243));fill:rgb(var(--vot-primary-rgb, 33, 150, 243))}.vot-segmented-button[data-status=error] .vot-translate-button{color:#f28b82;fill:#f28b82}.vot-segmented-button[data-translating=true] #vot-translating-icon{display:block !important}.vot-segmented-button[data-translating=true] #vot-translate-icon{display:none !important}.vot-segmented-button[data-direction=column]{flex-direction:column;height:fit-content}.vot-segmented-button[data-direction=column] .vot-segment-label{display:none}.vot-segmented-button[data-direction=column]>.vot-segment-only-icon,.vot-segmented-button[data-direction=column]>.vot-segment{padding:8px}.vot-segmented-button[data-direction=column] .vot-separator{height:1px;width:50%}.vot-segmented-button[data-position=left]{left:50px;top:12.5vh}.vot-segmented-button[data-position=right]{left:auto;right:0;top:12.5vh}.vot-segmented-button svg{width:fit-content}.vot-menu{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:calc(5rem + 32px + 16px);user-select:none;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);border-radius:8px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;min-width:300px;cursor:default;z-index:10000;visibility:visible;opacity:1;transform-origin:top;transform:translate(-50%) scale(1);transition:opacity .3s,transform .1s}.vot-menu *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-menu[hidden]{pointer-events:none;display:block !important;visibility:hidden;opacity:0;transform:translate(-50%) scale(0)}.vot-menu-content-wrapper{display:flex;flex-direction:column;min-height:100px;max-height:calc(var(--vot-container-height, 75vh) - (5rem + 32px + 16px)*2);overflow:auto}.vot-menu-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-menu-header-container:empty{padding:0 0 16px 0}.vot-menu-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-menu-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0;text-align:start}.vot-menu-title{flex:1;font-size:16px;line-height:1;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 16px;gap:8px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar,.vot-menu-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-menu-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-footer-container:empty{padding:16px 0 0 0}.vot-menu[data-position=left]{left:240px;top:12.5vh}.vot-menu[data-position=right]{right:-80px;left:auto;top:12.5vh}.vot-dialog-container{visibility:visible;position:absolute;z-index:10000}.vot-dialog-container[hidden]{display:block !important;pointer-events:none;visibility:hidden}.vot-dialog-container *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-dialog-backdrop{background-color:rgba(0,0,0,.6);position:fixed;top:0;right:0;bottom:0;left:0;opacity:1;transition:opacity .3s}[hidden]>.vot-dialog-backdrop{pointer-events:none;opacity:0}.vot-dialog{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);display:block;position:fixed;top:50%;bottom:50%;max-width:initial;max-height:initial;width:min(var(--vot-dialog-width, 512px),100%);height:fit-content;inset-inline-start:0px;inset-inline-end:0px;inset-block-start:0px;inset-block-end:0px;border-radius:8px;margin:auto;padding:0;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);box-shadow:0 0 16px rgba(0,0,0,.12),0 16px 16px rgba(0,0,0,.24);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;user-select:none;visibility:visible;overflow:auto;overflow-y:hidden;opacity:1;transform-origin:center;transform:scale(1);transition:opacity .3s,transform .1s}[hidden]>.vot-dialog{pointer-events:none;opacity:0;transform:scale(0.5);transition:opacity .1s,transform .2s}.vot-dialog-content-wrapper{display:flex;flex-direction:column;max-height:75vh;overflow:auto}.vot-dialog-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-dialog-header-container:empty{padding:0 0 20px 0}.vot-dialog-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-dialog-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0}.vot-dialog-title{flex:1;font-size:115.3846153846%;font-weight:bold;line-height:1;padding-bottom:16px;padding-inline-end:20px;padding-inline-start:20px;padding-top:20px}.vot-dialog-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 20px;gap:16px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar,.vot-dialog-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-dialog-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-dialog-footer-container:empty{padding:20px 0 0 0}.vot-subtitles-widget{display:flex;justify-content:center;align-items:center;position:absolute;width:50%;max-height:100%;min-height:20%;z-index:10000;left:25%;top:75%;pointer-events:none}.vot-subtitles{position:relative;max-width:100%;max-height:100%;width:max-content;background:var(--vot-subtitles-background, rgba(46, 47, 52, 0.8));color:var(--vot-subtitles-color, rgb(227, 227, 227));border-radius:1rem;pointer-events:all;padding:1rem;font-size:2rem;line-height:normal;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vot-subtitles span{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.vot-subtitles .passed{color:var(--vot-subtitles-passed-color, rgb(33, 150, 243))}:root{--vot-font-family: "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system;--vot-primary-rgb: 139, 180, 245;--vot-onprimary-rgb: 32, 33, 36;--vot-surface-rgb: 32, 33, 36;--vot-onsurface-rgb: 227, 227, 227;--vot-subtitles-background: rgba(var(--vot-surface-rgb, 46, 47, 52), 0.8);--vot-subtitles-color: rgb(var(--vot-onsurface-rgb, 227, 227, 227));--vot-subtitles-passed-color: rgb(var(--vot-primary-rgb, 33, 150, 243))}vot-block{display:block}',""]);const s=r},"./node_modules/css-loader/dist/runtime/api.js":t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,i,a){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var s=0;s0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js":t=>{"use strict";t.exports=function(t){return t[1]}},"./node_modules/requestidlecallback-polyfill/index.js":()=>{window.requestIdleCallback=window.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)},window.cancelIdleCallback=window.cancelIdleCallback||function(t){clearTimeout(t)}},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":(t,e,o)=>{"use strict";t.exports=function(t){var e=o.nc;e&&t.setAttribute("nonce",e)}},"./node_modules/style-loader/dist/runtime/styleDomAPI.js":t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(o){!function(t,e,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,i&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var a=o.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,o)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},"./node_modules/style-loader/dist/runtime/styleTagTransform.js":t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},"./node_modules/webpack-monkey/lib/node/deps/style-loader-insertStyleElement.js":t=>{t.exports=function(){return function(t){return t.styleTagTransform=function(t,e){e?.remove(),GM_addStyle(t)},document.createElement("style")}.apply(null,arguments)}},"./src/config/config.js":(t,e,o)=>{"use strict";o.d(e,{Cc:()=>r,JD:()=>s,K2:()=>d,Pm:()=>i,QL:()=>c,S7:()=>a,mE:()=>l,rw:()=>u,se:()=>n});const n="m3u8-proxy.toil.cc",i="vot.toil.cc",a="bt8xH3VOlb4mqf0nqAibnDOoiPlXsisf",r="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 YaBrowser/24.4.0.0 Safari/537.36",s=.15,l="yandex",d="yandex",c={yandex:"https://translate.toil.cc/detect",rustServer:"https://rust-server-531j.onrender.com/detect"},u={yandex:"https://translate.toil.cc/translate",deepl:"https://translate-deepl.toil.cc/translate"}},"./src/config/constants.js":(t,e,o)=>{"use strict";o.d(e,{Ww:()=>i,xm:()=>n});const n=["ru","en","zh","ko","lt","lv","ar","fr","it","es","de","ja"],i=["ru","en","kk"]},"./src/localization/localizationProvider.js":(t,e,o)=>{"use strict";o.d(e,{z:()=>s,j:()=>l});const n=JSON.parse('{"__version__":4,"recommended":"recommended","translateVideo":"Translate video","disableTranslate":"Turn off","translationSettings":"Translation settings","subtitlesSettings":"Subtitles settings","about":"About extension","resetSettings":"Reset settings","videoBeingTranslated":"The video is being translated","videoLanguage":"Video language","translationLanguage":"Translation language","translationTake":"The translation will take","translationTakeMoreThanHour":"The translation will take more than an hour","translationTakeAboutMinute":"The translation will take about a minute","translationTakeFewMinutes":"The translation will take a few minutes","translationTakeApproximatelyMinutes":"The translation will take approximately {0} minutes","translationTakeApproximatelyMinute":"The translation will take approximately {0} minutes","unSupportedExtensionError":"Error! {0} is not supported by this version of the extension!\\n\\nPlease use the cloudflare version of the VOT extension.","requestTranslationFailed":"Failed to request video translation","audioNotReceived":"Audio link not received","grantPermissionToAutoPlay":"Grant permission to autoplay","neededAdditionalExtension":"An additional extension is needed to support this site","audioFormatNotSupported":"The audio format is not supported","VOTAutoTranslate":"Translate on open","VOTDontTranslateYourLang":"Do not translate from my language","VOTVolume":"Video volume","VOTVolumeTranslation":"Translation Volume","VOTAutoSetVolume":"Reduce video volume to ","VOTShowVideoSlider":"Video volume slider","VOTSyncVolume":"Link translation and video volume","VOTAudioProxy":"Proxy received audio","VOTDisableFromYourLang":"You have disabled the translation of the video in your language","VOTLiveNotSupported":"Translation of live streams is not supported","VOTPremiere":"Wait for the premiere to end before translating","VOTVideoIsTooLong":"Video is too long","VOTNoVideoIDFound":"No video ID found","VOTSubtitles":"Subtitles","VOTSubtitlesDisabled":"Disabled","VOTSubtitlesMaxLength":"Subtitles max length","VOTHighlightWords":"Highlight words","VOTTranslatedFrom":"translated from","VOTAutogenerated":"autogenerated","VOTSettings":"VOT Settings","VOTMenuLanguage":"Menu language","VOTAuthors":"Authors","VOTVersion":"Version","VOTLoader":"Loader","VOTBrowser":"Browser","VOTShowPiPButton":"Show PiP button","langs":{"auto":"Auto","af":"Afrikaans","ak":"Akan","sq":"Albanian","am":"Amharic","ar":"Arabic","hy":"Armenian","as":"Assamese","ay":"Aymara","az":"Azerbaijani","bn":"Bangla","eu":"Basque","be":"Belarusian","bho":"Bhojpuri","bs":"Bosnian","bg":"Bulgarian","my":"Burmese","ca":"Catalan","ceb":"Cebuano","zh":"Chinese","zh-Hans":"Chinese (Simplified)","zh-Hant":"Chinese (Traditional)","co":"Corsican","hr":"Croatian","cs":"Czech","da":"Danish","dv":"Divehi","nl":"Dutch","en":"English","eo":"Esperanto","et":"Estonian","ee":"Ewe","fil":"Filipino","fi":"Finnish","fr":"French","gl":"Galician","lg":"Ganda","ka":"Georgian","de":"German","el":"Greek","gn":"Guarani","gu":"Gujarati","ht":"Haitian Creole","ha":"Hausa","haw":"Hawaiian","iw":"Hebrew","hi":"Hindi","hmn":"Hmong","hu":"Hungarian","is":"Icelandic","ig":"Igbo","id":"Indonesian","ga":"Irish","it":"Italian","ja":"Japanese","jv":"Javanese","kn":"Kannada","kk":"Kazakh","km":"Khmer","rw":"Kinyarwanda","ko":"Korean","kri":"Krio","ku":"Kurdish","ky":"Kyrgyz","lo":"Lao","la":"Latin","lv":"Latvian","ln":"Lingala","lt":"Lithuanian","lb":"Luxembourgish","mk":"Macedonian","mg":"Malagasy","ms":"Malay","ml":"Malayalam","mt":"Maltese","mi":"Māori","mr":"Marathi","mn":"Mongolian","ne":"Nepali","nso":"Northern Sotho","no":"Norwegian","ny":"Nyanja","or":"Odia","om":"Oromo","ps":"Pashto","fa":"Persian","pl":"Polish","pt":"Portuguese","pa":"Punjabi","qu":"Quechua","ro":"Romanian","ru":"Russian","sm":"Samoan","sa":"Sanskrit","gd":"Scottish Gaelic","sr":"Serbian","sn":"Shona","sd":"Sindhi","si":"Sinhala","sk":"Slovak","sl":"Slovenian","so":"Somali","st":"Southern Sotho","es":"Spanish","su":"Sundanese","sw":"Swahili","sv":"Swedish","tg":"Tajik","ta":"Tamil","tt":"Tatar","te":"Telugu","th":"Thai","ti":"Tigrinya","ts":"Tsonga","tr":"Turkish","tk":"Turkmen","uk":"Ukrainian","ur":"Urdu","ug":"Uyghur","uz":"Uzbek","vi":"Vietnamese","cy":"Welsh","fy":"Western Frisian","xh":"Xhosa","yi":"Yiddish","yo":"Yoruba","zu":"Zulu"},"udemyAccessTokenExpired":"Your entered Udemy Access Token has expired","udemyModuleArgsNotFound":"Could not get udemy module data due to the fact that ModuleArgs was not found","VOTTranslationHelpNull":"Could not get the data required for the translate","enterUdemyAccessToken":"Enter Udemy Access Token","VOTUdemyData":"Udemy Data","streamNoConnectionToServer":"There is no connection to the server","searchField":"Search...","VOTTranslateAPIErrors":"Translate errors from the API","VOTTranslationService":"Translation Service","VOTDetectService":"Detect Service","VOTTranslatingError":"Translating the error","VOTProxyWorkerHost":"Enter the proxy worker address","VOTM3u8ProxyHost":"Enter the address of the m3u8 proxy worker","proxySettings":"Proxy Settings","translationTakeApproximatelyMinute2":"The translation will take approximately {0} minutes"}');var i=o("./src/utils/debug.js"),a=o("./src/utils/storage.js"),r=o("./src/utils/utils.js");const s=["auto","en","ru","af","am","ar","az","bg","bn","bs","ca","cs","cy","da","de","el","es","et","eu","fa","fi","fr","gl","hi","hr","hu","hy","id","it","ja","jv","kk","km","kn","ko","lo","mk","ml","mn","ms","mt","my","ne","nl","pa","pl","pt","ro","si","sk","sl","sq","sr","su","sv","sw","tr","uk","ur","uz","vi","zh","zu"],l=new class{lang="en";locale={};gmValues=["locale-phrases","locale-lang","locale-version","locale-lang-override"];constructor(){const t=a.d.syncGet("locale-lang-override","auto");this.lang=t&&"auto"!==t?t:(navigator.language||navigator.userLanguage)?.substr(0,2)?.toLowerCase()??"en",this.setLocaleFromJsonString(a.d.syncGet("locale-phrases",""))}reset(){for(let t=0;t{if("object"==typeof t&&t)return t[e]}),t);return void 0===o&&console.warn("[VOT] [localizationProvider] locale",t,"doesn't contain key",e),o}getDefault(t){return this.getFromLocale(n,t)??t}get(t){return this.getFromLocale(this.locale,t)??this.getFromLocale(n,t)??t}}},"./src/utils/debug.js":(t,e,o)=>{"use strict";o.d(e,{A:()=>i});const n={log:(...t)=>{}},i=n},"./src/utils/storage.js":(t,e,o)=>{"use strict";o.d(e,{d:()=>i});var n=o("./src/utils/debug.js");const i=new class{constructor(){this.gmSupport="function"==typeof GM_getValue,n.A.log(`GM Storage Status: ${this.gmSupport}`)}syncGet(t,e=void 0,o=!1){if(this.gmSupport)return GM_getValue(t,e);let n=window.localStorage.getItem(t);if("udemyData"===t&&"string"==typeof n)try{n=JSON.parse(n)}catch{n=e}return o?Number(n)??Number(e):n??e}async get(t,e=void 0,o=!1){return this.gmSupport?await GM_getValue(t,e):Promise.resolve(this.syncGet(t,e,o))}syncSet(t,e){return this.gmSupport?GM_setValue(t,e):("udemyData"===t&&(e=JSON.stringify(e)),window.localStorage.setItem(t,e))}async set(t,e){return this.gmSupport?await GM_setValue(t,e):Promise.resolve(this.syncSet(t,e))}syncDelete(t){return this.gmSupport?GM_deleteValue(t):window.localStorage.removeItem(t)}async delete(t){return this.gmSupport?await GM_deleteValue(t):Promise.resolve(this.syncDelete(t))}syncList(){return this.gmSupport?GM_listValues():["autoTranslate","dontTranslateLanguage","dontTranslateYourLang","autoSetVolumeYandexStyle","showVideoSlider","syncVolume","subtitlesMaxLength","highlightWords","responseLanguage","defaultVolume","udemyData","audioProxy","showPiPButton","locale-version","locale-lang","locale-phrases"]}async list(){return this.gmSupport?await GM_listValues():Promise.resolve(this.syncList())}}},"./src/utils/translateApis.js":(t,e,o)=>{"use strict";o.d(e,{Tl:()=>d,o0:()=>c,qh:()=>h,vN:()=>u});var n=o("./src/config/config.js"),i=o("./src/utils/storage.js");async function a(t,e={}){const o=new AbortController,n=setTimeout((()=>o.abort()),3e3);try{return await fetch(t,{...e,signal:o.signal})}catch(t){return console.error("Fetch timed-out. Error:",t),t}finally{clearTimeout(n)}}const r={async translate(t,e){try{const o=await a(`${n.rw.yandex}?${new URLSearchParams({text:t,lang:e})}`);if(o instanceof Error)throw o;const i=await o.json();if(200!==i.code)throw i.message;return i.text[0]}catch(e){return console.error("Error translating text:",e),t}},async detect(t){try{const e=await a(`${n.QL.yandex}?${new URLSearchParams({text:t})}`);if(e instanceof Error)throw e;const o=await e.json();if(200!==o.code)throw o.message;return o.lang??"en"}catch(t){return console.error("Error getting lang from text:",t),"en"}}},s={async detect(t){try{const e=await fetch(n.QL.rustServer,{method:"POST",body:t});if(e instanceof Error)throw e;return await e.text()}catch(t){return console.error("Error getting lang from text:",t),"en"}}},l={async translate(t,e="auto",o="ru"){try{const i=await a(n.rw.deepl,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({text:t,source_lang:e,target_lang:o})});if(i instanceof Error)throw i;const r=await i.json();if(200!==r.code)throw r.message;return r.data}catch(e){return console.error("Error translating text:",e),t}}};async function d(t,e="",o="ru"){switch(await i.d.get("translationService",n.mE)){case"yandex":{const n=e&&o?`${e}-${o}`:o;return await r.translate(t,n)}case"deepl":return await l.translate(t,e,o);default:return t}}async function c(t){switch(await i.d.get("detectService",n.K2)){case"yandex":return await r.detect(t);case"rust-server":return await s.detect(t);default:return"en"}}const u=Object.keys(n.rw),h=Object.keys(n.QL).map((t=>"rustServer"===t?"rust-server":t))},"./src/utils/utils.js":(t,e,o)=>{"use strict";o.d(e,{Bs:()=>c,CK:()=>u,G3:()=>g,R4:()=>d,X5:()=>p,jI:()=>s,ox:()=>l,vV:()=>r});var n=o("./src/localization/localizationProvider.js"),i=o("./src/utils/youtubeUtils.js");const a=navigator.language||navigator.userLanguage,r=a?.substr(0,2)?.toLowerCase()??"en",s=(t,e)=>{let o=new URL(window.location.href);switch(t){case"piped":case"invidious":case"youtube":if(o.searchParams.has("enablejsapi")){const t=i.A.getPlayer().getVideoUrl();o=new URL(t)}return o.pathname.match(/(?:watch|embed|shorts|live)\/([^/]+)/)?.[1]||o.searchParams.get("v");case"vk":{const t=o.pathname.match(/^\/(video|clip)-?[0-9]{8,9}_[0-9]{9}$/),e=o.searchParams.get("z"),n=o.searchParams.get("oid"),i=o.searchParams.get("id");return t?t[0].slice(1):e?e.split("/")[0]:n&&i?`video-${Math.abs(parseInt(n))}_${i}`:null}case"nine_gag":case"9gag":case"gag":return o.pathname.match(/gag\/([^/]+)/)?.[1];case"twitch":{const t=o.pathname.match(/([^/]+)\/(?:clip)\/([^/]+)/);if(/^m\.twitch\.tv$/.test(o.hostname))return o.href.match(/videos\/([^/]+)/)?.[0]||o.pathname.slice(1);if(/^player\.twitch\.tv$/.test(o.hostname))return`videos/${o.searchParams.get("video")}`;if(/^clips\.twitch\.tv$/.test(o.hostname)){const t=document.querySelector("script[type='application/ld+json']"),e=o.pathname.slice(1);if(!t){const t="embed"===e,n=document.querySelector(t?".tw-link[data-test-selector='stream-info-card-component__stream-avatar-link']":".clips-player a:not([class])");if(!n)return;return`${n.href.replace("https://www.twitch.tv/","")}/clip/${t?o.searchParams.get("clip"):e}`}const n=JSON.parse(t.innerText),i=n["@graph"].find((t=>"VideoObject"===t["@type"]))?.creator.url;return`${i.replace("https://www.twitch.tv/","")}/clip/${e}`}return t?t[0]:o.pathname.match(/(?:videos)\/([^/]+)/)?.[0]}case"proxitok":return o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];case"tiktok":{let t=o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];if(!t){const o=e.closest(".xgplayer-playing, .tiktok-web-player"),n=o?.closest('div[data-e2e="recommend-list-item-container"]'),i=n?.querySelector('a[data-e2e="video-author-avatar"]');if(o&&i){const e=o.id?.match(/^xgwrapper-[0-9]+-(.*)$/)?.at(1),n=i.href?.match(/.*(@.*)$/)?.at(1);e&&n&&(t=`${n}/video/${e}`)}}return t}case"vimeo":{const t=o.searchParams.get("app_id"),e=o.pathname.match(/[^/]+\/[^/]+$/)?.[0]||o.pathname.match(/[^/]+$/)?.[0];return t?`${e}?app_id=${t}`:e}case"xvideos":return o.pathname.match(/[^/]+\/[^/]+$/)?.[0];case"pornhub":return o.searchParams.get("viewkey")||o.pathname.match(/embed\/([^/]+)/)?.[1];case"twitter":return o.pathname.match(/status\/([^/]+)/)?.[1];case"udemy":case"rumble":case"facebook":return o.pathname.slice(1);case"rutube":return o.pathname.match(/(?:video|embed)\/([^/]+)/)?.[1];case"coub":return o.pathname.match(/(?:view|embed)\/([^/]+)/)?.[1]||document.querySelector(".coub.active")?.dataset?.permalink;case"bilibili":{const t=o.searchParams.get("bvid");if(t)return t;let e=o.pathname.match(/video\/([^/]+)/)?.[1];return e&&null!==o.searchParams.get("p")&&(e+=`/?p=${o.searchParams.get("p")}`),e}case"mail_ru":{const t=o.pathname;if(t.startsWith("/v/")||t.startsWith("/mail/"))return t.slice(1);const e=t.match(/video\/embed\/([^/]+)/)?.[1];if(!e)return null;const n=document.querySelector(".b-video-controls__mymail-link");return!!n&&n?.href.split("my.mail.ru")?.[1]}case"bitchute":return o.pathname.match(/(video|embed)\/([^/]+)/)?.[2];case"coursera":return o.pathname.match(/learn\/([^/]+)\/lecture\/([^/]+)/)?.[0];case"eporner":return o.pathname.match(/video-([^/]+)\/([^/]+)/)?.[0];case"peertube":return o.pathname.match(/\/w\/([^/]+)/)?.[0];case"dailymotion":{const t=Array.from(document.querySelectorAll("*")).filter((t=>t.innerHTML.trim().includes(".m3u8")));try{let e=t[1].lastChild.src;return e.match(/\/video\/(\w+)\.m3u8/)?.[1]}catch(t){return console.error("[VOT]",t),!1}}case"trovo":{const t=o.searchParams.get("vid");if(!t)return null;const e=o.pathname.match(/([^/]+)\/([\d]+)/)?.[0];return e?`${e}?vid=${t}`:null}case"yandexdisk":return o.pathname.match(/\/i\/([^/]+)/)?.[1];case"coursehunter":{const t=o.pathname.match(/\/course\/([^/]+)/)?.[1];return!!t&&t+o.search}case"ok.ru":return o.pathname.match(/\/video\/(\d+)/)?.[1];case"googledrive":return o.searchParams.get("docid");case"bannedvideo":return o.searchParams.get("id");case"weverse":return o.pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[0];case"newgrounds":return o.pathname.match(/([^/]+)\/(view)\/([^/]+)/)?.[0];case"egghead":return o.pathname.slice(1);case"youku":return o.pathname.match(/v_show\/id_[\w=]+/)?.[0];case"directlink":return o.pathname+o.search;default:return!1}};function l(t){const e=Math.floor(t/60),o=Math.floor(t%60);return e>=60?n.j.get("translationTakeMoreThanHour"):1===e||0===e&&o>0?n.j.get("translationTakeAboutMinute"):11!==e&&e%10==1?n.j.get("translationTakeApproximatelyMinute2").replace("{0}",e):![12,13,14].includes(e)&&[2,3,4].includes(e%10)?n.j.get("translationTakeApproximatelyMinute").replace("{0}",e):n.j.get("translationTakeApproximatelyMinutes").replace("{0}",e)}function d(t){return t.toLowerCase().split(/[_;-]/)[0].trim()}function c(){return"pictureInPictureEnabled"in document&&document.pictureInPictureEnabled}function u(){return"undefined"!=typeof Hls&&Hls?.isSupported()?new Hls({debug:!1,lowLatencyMode:!0,backBufferLength:90}):void 0}const h=new RegExp([/(?:https?|ftp):\/\/[\S]+/g,/https?:\/\/\S+|www\.\S+/gm,/\b\S+\.\S+/gm,/#[^\s#]+/g,/Auto-generated by YouTube/g,/Provided to YouTube by/g,/Released on/g,/0x[a-fA-F0-9]{40}/g,/[13][a-km-zA-HJ-NP-Z1-9]{25,34}/g,/4[0-9AB][1-9A-HJ-NP-Za-km-z]{93}/g,/Paypal/g].map((t=>t.source)).join("|"));function p(t,e){return`${t} ${e?e.split("\n").filter((t=>!h.test(t))).join(" "):""}`.slice(0,450).replace(/[^\p{L}\s]+|\s+/gu," ").trim()}async function g(t,e={}){try{return await fetch(t,e)}catch(o){return new Promise(((o,n)=>{GM_xmlhttpRequest({method:e.method||"GET",url:t,responseType:"blob",onload:t=>{o(new Response(t.response,{status:t.status,headers:Object.fromEntries(t.responseHeaders.trim().split("\r\n").map((t=>{let e=t.split(": ");if("set-cookie"!==e?.[0])return[e.shift(),e.join(": ")]})).filter((t=>t)))}))},ontimeout:()=>n(new Error("fetch timeout")),onerror:t=>n(t),onabort:()=>n(new Error("fetch abort"))})}))}}},"./src/utils/youtubeUtils.js":(t,e,o)=>{"use strict";o.d(e,{A:()=>u});var n=o("./src/utils/debug.js"),i=o("./src/config/constants.js"),a=o("./src/utils/utils.js"),r=o("./src/utils/translateApis.js");function s(){return/^m\.youtube\.com$/.test(window.location.hostname)}function l(){return window.location.pathname.startsWith("/shorts/")?s()?document.querySelector("#movie_player"):document.querySelector("#shorts-player"):document.querySelector("#movie_player")}function d(){const t=l();return t?.getPlayerResponse?t?.getPlayerResponse?.call()??null:t?.data?.playerResponse??null}function c(){const t=l();return t?.getVideoData?t?.getVideoData?.call()??null:t?.data?.playerResponse?.videoDetails??null}const u={isMobile:s,getPlayer:l,getPlayerResponse:d,getPlayerData:c,getVideoVolume:function(){const t=l();return t?.getVolume?t.getVolume.call()/100:1},getSubtitles:function(){const t=d();let e=t?.captions?.playerCaptionsTracklistRenderer?.captionTracks??[];return e=e.reduce(((t,e)=>{if("languageCode"in e){const o=e?.languageCode?(0,a.R4)(e?.languageCode):void 0,n=e?.url||e?.baseUrl;o&&n&&t.push({source:"youtube",language:o,isAutoGenerated:"asr"===e?.kind,url:`${n.startsWith("http")?n:`${window.location.origin}/${n}`}&fmt=json3`})}return t}),[]),n.A.log("youtube subtitles:",e),e},getVideoData:async function(){const t=l(),e=d(),o=c(),{title:s}=o??{},{shortDescription:u,isLive:h}=e?.videoDetails??{};let p=s?await async function(t,e,o,i){if(!window.location.hostname.includes("m.youtube.com")&&t?.getAudioTrack){const e=t.getAudioTrack(),o=e?.getLanguageInfo();if("und"!==o?.id)return(0,a.R4)(o.id.split(".")[0])}const s=e?.captions?.playerCaptionsTracklistRenderer?.captionTracks;if(s?.length){const t=s.find((t=>"asr"===t.kind));if(t&&t.languageCode)return(0,a.R4)(t.languageCode)}const l=(0,a.X5)(o,i);return n.A.log(`Detecting language text: ${l}`),(0,r.o0)(l)}(t,e,s,u):"en";p=i.xm.includes(p)?p:"en";const g={isLive:!!h,title:s,description:u,detectedLanguage:p};return n.A.log("youtube video data:",g),console.log("[VOT] Detected language: ",g.detectedLanguage),g},setVideoVolume:function(t){const e=l();if(e?.setVolume)return e.setVolume(Math.round(100*t)),!0},videoSeek:function(t,e){n.A.log("videoSeek",e);const o=(l()?.getProgressState()?.seekableEnd||t.currentTime)-e;t.currentTime=o},isMuted:function(){const t=l();return!!t?.isMuted&&t.isMuted.call()},isMusic:function(){const t=c().author,e=c().title.toUpperCase(),o=e.match(/\w+/g),n=document.body.querySelector("ytd-watch-flexy")?.playerData;return[e,document.URL,t,n?.microformat?.playerMicroformatRenderer.category,n?.title].some((t=>t?.toUpperCase().includes("MUSIC")))||document.body.querySelector("#upload-info #channel-name .badge-style-type-verified-artist")||t&&/(VEVO|Topic|Records|RECORDS|Recordings|AMV)$/.test(t)||t&&/(MUSIC|ROCK|SOUNDS|SONGS)/.test(t.toUpperCase())||o?.length&&["🎵","♫","SONG","SONGS","SOUNDTRACK","LYRIC","LYRICS","AMBIENT","MIX","VEVO","CLIP","KARAOKE","OPENING","COVER","COVERED","VOCAL","INSTRUMENTAL","ORCHESTRAL","DUBSTEP","DJ","DNB","BASS","BEAT","ALBUM","PLAYLIST","DUBSTEP","CHILL","RELAX","CLASSIC","CINEMATIC"].some((t=>o.includes(t)))||["OFFICIAL VIDEO","OFFICIAL AUDIO","FEAT.","FT.","LIVE RADIO","DANCE VER","HIP HOP","ROCK N ROLL","HOUR VER","HOURS VER","INTRO THEME"].some((t=>e.includes(t)))||o?.length&&["OP","ED","MV","OST","NCS","BGM","EDM","GMV","AMV","MMD","MAD"].some((t=>o.includes(t)))}}},"./src/yandexRequest-cloudflare.js":(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>s});var n=o("./src/config/config.js"),i=o("./src/utils/debug.js"),a=o("./src/utils/storage.js"),r=o("./src/utils/utils.js");const s=async function(t,e,o,s){let l,d;try{i.A.log("yandexRequest:",t);const s={method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify({headers:{Accept:"application/x-protobuf","Accept-Language":"en","Content-Type":"application/x-protobuf","User-Agent":n.Cc,Pragma:"no-cache","Cache-Control":"no-cache","Sec-Fetch-Mode":"no-cors",...o},body:Array.from(e)})},c=await a.d.get("proxyWorkerHost",n.Pm);l=await(0,r.G3)(`https://${c}${t}`,s),i.A.log("yandexRequest:",l.status,l),d=await l.arrayBuffer()}catch(t){console.error("[VOT]",t),l={status:-1},d=t}s(200==l.status,d)}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={id:n,exports:{}};return t[n].call(a.exports,a,a.exports,o),a.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nc=void 0,(()=>{"use strict";const t=["invidious.snopyta.org","yewtu.be","invidious.kavin.rocks","vid.puffyan.us","invidious.namazso.eu","inv.riverside.rocks","yt.artemislena.eu","invidious.flokinet.to","invidious.esmailelbob.xyz","y.com.sb","invidious.nerdvpn.de","inv.vern.cc","invidious.slipfox.xyz","invidio.xamh.de","invidious.dhusch.de"],e=["piped.video","piped.tokhmi.xyz","piped.moomoo.me","piped.syncpundit.io","piped.mha.fi","watch.whatever.social","piped.garudalinux.org","efy.piped.pages.dev","watch.leptons.xyz","piped.lunar.icu","yt.dc09.ru","piped.mint.lgbt","il.ax","piped.privacy.com.de","piped.esmailelbob.xyz","piped.projectsegfau.lt","piped.in.projectsegfau.lt","piped.us.projectsegfau.lt","piped.privacydev.net","piped.palveluntarjoaja.eu","piped.smnz.de","piped.adminforge.de","piped.qdi.fi","piped.hostux.net","piped.chauvet.pro","piped.jotoma.de","piped.pfcd.me","piped.frontendfriendly.xyz"],n=["proxitok.pabloferreiro.es","proxitok.pussthecat.org","tok.habedieeh.re","proxitok.esmailelbob.xyz","proxitok.privacydev.net","tok.artemislena.eu","tok.adminforge.de","tik.hostux.net","tt.vern.cc","cringe.whatever.social","proxitok.lunar.icu","proxitok.privacy.com.de"],i=["peertube.1312.media","tube.shanti.cafe","bee-tube.fr","video.sadmin.io","dalek.zone","review.peertube.biz","peervideo.club","tube.la-dina.net","peertube.tmp.rcp.tf","peertube.su"];var a=o("./src/config/config.js"),r=o("./src/config/constants.js"),s=o("./src/localization/localizationProvider.js"),l=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),d=o.n(l),c=o("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),u=o.n(c),h=o("./node_modules/style-loader/dist/runtime/insertBySelector.js"),p=o.n(h),g=o("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),v=o.n(g),m=o("./node_modules/webpack-monkey/lib/node/deps/style-loader-insertStyleElement.js"),b=o.n(m),f=o("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),y=o.n(f),w=o("./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss"),x={};x.styleTagTransform=y(),x.setAttributes=v(),x.insert=p().bind(null,"head"),x.domAPI=u(),x.insertStyleElement=b();d()(w.A,x);w.A&&w.A.locals&&w.A.locals;function S(t){const e=document.createElement("vot-block");return e.classList.add("vot-icon-button"),e.innerHTML=t,e}function k(t){const e=parseFloat(t.value),o=""===t.min?0:parseFloat(t.min),n=(e-o)/((""===t.max?100:parseFloat(t.max))-o);t.parentElement.setAttribute("style",`--vot-progress: ${n}`)}function T(t,e="",o=" ",n=!1){const i=document.createElement("vot-block");i.classList.add("vot-textfield");const a=document.createElement(n?"textarea":"input");a.placeholder=o,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),{container:i,input:a,label:r}}function M(t){const e=document.createElement("vot-block");e.classList.add("vot-dialog-container"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-dialog-backdrop");const n=document.createElement("vot-block");n.classList.add("vot-dialog");const i=document.createElement("vot-block");i.classList.add("vot-dialog-content-wrapper");const a=document.createElement("vot-block");a.classList.add("vot-dialog-header-container");const r=document.createElement("vot-block");r.classList.add("vot-dialog-body-container");const s=document.createElement("vot-block");s.classList.add("vot-dialog-footer-container");const l=document.createElement("vot-block");l.classList.add("vot-dialog-title-container");const d=S('');d.classList.add("vot-dialog-close-button"),o.onclick=d.onclick=()=>{e.hidden=!0};const c=document.createElement("vot-block");return c.classList.add("vot-dialog-title"),c.innerHTML=t,e.appendChild(o),e.appendChild(n),n.appendChild(i),i.appendChild(a),i.appendChild(r),i.appendChild(s),a.appendChild(l),a.appendChild(d),l.appendChild(c),{container:e,backdrop:o,dialog:n,contentWrapper:i,headerContainer:a,bodyContainer:r,footerContainer:s,titleContainer:l,closeButton:d,title:c}}function V(t,e,o,n={}){const i=n.onSelectCb||function(){},a=n.labelElement||"";let r=[];const l=document.createElement("vot-block");l.classList.add("vot-select"),a&&l.appendChild(a);const d=document.createElement("vot-block");d.classList.add("vot-select-outer");const c=document.createElement("span");c.classList.add("vot-select-title"),c.innerText=t,void 0===t&&(c.innerText=o.find((t=>!0===t.selected))?.label);const u=document.createElement("vot-block");u.classList.add("vot-select-arrow-icon"),u.innerHTML='',d.append(c,u),d.onclick=()=>{const t=M(e);t.container.classList.add("vot-dialog-temp"),t.container.hidden=!1,document.documentElement.appendChild(t.container);const n=document.createElement("vot-block");n.classList.add("vot-select-content-list");for(const t of o){const e=document.createElement("vot-block");e.classList.add("vot-select-content-item"),e.innerText=t.label,e.dataset.votSelected=t.selected,e.dataset.votValue=t.value,t.disabled&&(e.inert=!0),e.onclick=async a=>{if(a.target.inert)return;const r=n.childNodes;for(let t of r)t.dataset.votSelected=!1;for(let e of o)e.selected=e.value===t.value;e.dataset.votSelected=!0,c.innerText=t.label,await i(a)},n.appendChild(e)}const a=T(s.j.get("searchField"));a.input.oninput=t=>{const e=t.target.value.toLowerCase();for(let t=0;t{t.container.remove(),r=[]}},l.append(d);return{container:l,title:c,arrowIcon:u,labelElement:a,setTitle:t=>{c.innerText=t},setSelected:t=>{const e=Array.from(r).filter((t=>!t.inert));for(let o=0;o{o=t}}}const L={createHeader:function(t,e=4){const o=document.createElement("vot-block");return o.classList.add("vot-header"),o.classList.add(`vot-header-level-${e}`),o.innerHTML=t,o},createInformation:function(t,e){const o=document.createElement("vot-block");o.classList.add("vot-info");const n=document.createElement("vot-block");n.innerHTML=t;const i=document.createElement("vot-block");return i.innerHTML=e,o.appendChild(n),o.appendChild(i),{container:o,header:n,value:i}},createButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-button"),e.innerHTML=t,e},createTextButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-text-button"),e.innerHTML=t,e},createOutlinedButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-outlined-button"),e.innerHTML=t,e},createIconButton:S,createCheckbox:function(t,e=!1){const o=document.createElement("label");o.classList.add("vot-checkbox");const n=document.createElement("input");n.type="checkbox",n.checked=Boolean(e);const i=document.createElement("span");return i.innerHTML=t,o.appendChild(n),o.appendChild(i),{container:o,input:n,label:i}},createSlider:function(t,e=50,o=0,n=100){const i=document.createElement("vot-block");i.classList.add("vot-slider");const a=document.createElement("input");a.type="range",a.min=o,a.max=n,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),a.addEventListener("input",(t=>k(t.target))),k(a),{container:i,input:a,label:r}},createTextfield:T,createDialog:M,createVOTButton:function(t){const e=document.createElement("vot-block");e.classList.add("vot-segmented-button");const o=document.createElement("vot-block");o.classList.add("vot-segment"),o.classList.add("vot-translate-button"),o.innerHTML='';const n=document.createElement("vot-block");n.classList.add("vot-separator");const i=document.createElement("vot-block");i.classList.add("vot-segment-only-icon"),i.innerHTML='';const a=document.createElement("vot-block");a.classList.add("vot-separator");const r=document.createElement("vot-block");r.classList.add("vot-segment-only-icon"),r.innerHTML='';const s=document.createElement("span");return s.classList.add("vot-segment-label"),s.innerHTML=t,e.appendChild(o),e.appendChild(n),e.appendChild(i),e.appendChild(a),e.appendChild(r),o.appendChild(s),{container:e,translateButton:o,separator:n,pipButton:i,separator2:a,menuButton:r,label:s}},createVOTMenu:function(t){const e=document.createElement("vot-block");e.classList.add("vot-menu"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-menu-content-wrapper");const n=document.createElement("vot-block");n.classList.add("vot-menu-header-container");const i=document.createElement("vot-block");i.classList.add("vot-menu-body-container");const a=document.createElement("vot-block");a.classList.add("vot-menu-footer-container");const r=document.createElement("vot-block");r.classList.add("vot-menu-title-container");const s=document.createElement("vot-block");return s.classList.add("vot-menu-title"),s.innerHTML=t,e.appendChild(o),o.appendChild(n),o.appendChild(i),o.appendChild(a),n.appendChild(r),r.appendChild(s),{container:e,contentWrapper:o,headerContainer:n,bodyContainer:i,footerContainer:a,titleContainer:r,title:s}},createVOTSelectLabel:function(t){const e=document.createElement("span");return e.classList.add("vot-select-label"),e.innerText=t,e},createVOTSelect:V,createVOTLanguageSelect:function(t){const e=t.fromTitle||"#UNDEFINED",o=t.fromDialogTitle||"#UNDEFINED",n=t.fromItems||[],i=t.fromOnSelectCB||function(){},a=t.toTitle||"#UNDEFINED",r=t.toDialogTitle||"#UNDEFINED",s=t.toItems||[],l=t.toOnSelectCB||function(){},d=document.createElement("vot-block");d.classList.add("vot-lang-select");const c=V(e,o,n,{onSelectCb:i}),u=document.createElement("vot-block");u.classList.add("vot-lang-select-icon"),u.innerHTML='';const h=V(a,r,s,{onSelectCb:l});return d.append(c.container,u,h.container),{container:d,fromSelect:c,icon:u,toSelect:h}},updateSlider:k};class A extends Error{constructor(t){super(s.j.getDefault(t)),this.name="VOTLocalizedError",this.unlocalizedMessage=t,this.localizedMessage=s.j.get(t)}}var C=o("./src/utils/debug.js"),P=o("./src/utils/utils.js");const O=new protobuf.Type("VideoTranslationHelpObject").add(new protobuf.Field("target",1,"string")).add(new protobuf.Field("targetUrl",2,"string")),E=new protobuf.Type("VideoTranslationRequest").add(new protobuf.Field("url",3,"string")).add(new protobuf.Field("deviceId",4,"string")).add(new protobuf.Field("firstRequest",5,"bool")).add(new protobuf.Field("duration",6,"double")).add(new protobuf.Field("unknown2",7,"int32")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("forceSourceLang",9,"bool")).add(new protobuf.Field("unknown4",10,"int32")).add(new protobuf.Field("translationHelp",11,"VideoTranslationHelpObject","repeated")).add(new protobuf.Field("responseLanguage",14,"string")).add(new protobuf.Field("unknown5",15,"int32")).add(new protobuf.Field("unknown6",16,"int32")).add(new protobuf.Field("bypassCache",17,"bool")),R=new protobuf.Type("VideoSubtitlesRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")),B=new protobuf.Type("VideoStreamRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")).add(new protobuf.Field("responseLanguage",3,"string")),F=new protobuf.Type("VideoStreamPingRequest").add(new protobuf.Field("pingId",1,"int32")),j=new protobuf.Type("VideoTranslationResponse").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("duration",2,"double")).add(new protobuf.Field("status",4,"int32")).add(new protobuf.Field("remainingTime",5,"int32")).add(new protobuf.Field("unknown0",6,"int32")).add(new protobuf.Field("translationId",7,"string")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("message",9,"string")),D=new protobuf.Type("VideoSubtitlesObject").add(new protobuf.Field("language",1,"string")).add(new protobuf.Field("url",2,"string")).add(new protobuf.Field("unknown2",3,"int32")).add(new protobuf.Field("translatedLanguage",4,"string")).add(new protobuf.Field("translatedUrl",5,"string")).add(new protobuf.Field("unknown5",6,"int32")).add(new protobuf.Field("unknown6",7,"int32")),_=new protobuf.Type("VideoSubtitlesResponse").add(new protobuf.Field("waiting",1,"int32")).add(new protobuf.Field("subtitles",2,"VideoSubtitlesObject","repeated")),q=new protobuf.Type("VideoStreamObject").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("timestamp",2,"int64")),z=new protobuf.Type("VideoStreamResponse").add(new protobuf.Field("interval",1,"int32")).add(new protobuf.Field("translatedInfo",2,"VideoStreamObject")).add(new protobuf.Field("pingId",3,"int32")),I=new protobuf.Type("YandexSessionRequest").add(new protobuf.Field("uuid",1,"string")).add(new protobuf.Field("module",2,"string")),$=new protobuf.Type("YandexSessionResponse").add(new protobuf.Field("sign",1,"string")).add(new protobuf.Field("expires",2,"int32")),N=(new protobuf.Root).define("yandex").add(O).add(E).add(j).add(R).add(D).add(_).add(F).add(B).add(q).add(z).add(I).add($),H={encodeTranslationRequest:(t,e,o,n,i)=>N.VideoTranslationRequest.encode({url:t,firstRequest:!0,duration:e,unknown2:1,language:o,forceSourceLang:!1,unknown4:0,translationHelp:i,responseLanguage:n,unknown5:0,unknown6:1,bypassCache:!1}).finish(),decodeTranslationResponse:t=>N.VideoTranslationResponse.decode(new Uint8Array(t)),encodeSubtitlesRequest:(t,e)=>N.VideoSubtitlesRequest.encode({url:t,language:e}).finish(),decodeSubtitlesResponse:t=>N.VideoSubtitlesResponse.decode(new Uint8Array(t)),encodeStreamPingRequest:t=>N.VideoStreamPingRequest.encode({pingId:t}).finish(),encodeStreamRequest:(t,e,o)=>N.VideoStreamRequest.encode({url:t,language:e,responseLanguage:o}).finish(),decodeStreamResponse:t=>N.VideoStreamResponse.decode(new Uint8Array(t)),encodeYandexSessionRequest:(t,e)=>N.YandexSessionRequest.encode({uuid:t,module:e}).finish(),decodeYandexSessionResponse:t=>N.YandexSessionResponse.decode(new Uint8Array(t))};var U=o("./node_modules/bowser/es5.js");function W(){return"xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,((t,e)=>("x"===t?16*Math.random()|0:3&e|8).toString(16)))}async function G(t){const e=new TextEncoder,o=await window.crypto.subtle.importKey("raw",e.encode(a.S7),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),n=await window.crypto.subtle.sign("HMAC",o,t);return new Uint8Array(n).reduce(((t,e)=>t+e.toString(16).padStart(2,"0")),"")}const Y=async function(t,e){try{C.A.log("requestStreamPing");const n=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;C.A.log("Inited yandexRequest...");const i=H.encodeStreamPingRequest(t);await n("/stream-translation/ping-stream",i,{"Vtrans-Signature":await G(i),"Sec-Vtrans-Token":W()},e)}catch(t){console.error("[VOT]",t),e(!1)}};const Z=async function(t,e,n,i){try{C.A.log("requestStreamTranslation");const a=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;C.A.log("Inited yandexRequest...");const r=H.encodeStreamRequest(t,e,n);await a("/stream-translation/translate-stream",r,{"Vtrans-Signature":await G(r),"Sec-Vtrans-Token":W()},i)}catch(t){console.error("[VOT]",t),i(!1)}};const K=async function(t,e,n,i,a,r){try{C.A.log("requestVideoTranslation");const s=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;C.A.log("Inited yandexRequest...");const l=H.encodeTranslationRequest(t,e,n,i,a);await s("/video-translation/translate",l,{"Vtrans-Signature":await G(l),"Sec-Vtrans-Token":W()},r)}catch(t){console.error("[VOT]",t),r(!1)}};var J=o("./src/utils/youtubeUtils.js");const Q=async function(t,e,n){try{C.A.log("requestVideoSubtitles");const i=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;C.A.log("Inited yandexRequest...");const a=H.encodeSubtitlesRequest(t,e);await i("/video-subtitles/get-subtitles",a,{"Vsubs-Signature":await G(a),"Sec-Vsubs-Token":W()},n)}catch(t){console.error("[VOT]",t),n(!1)}};function X(t){const e=t.startMs+t.durationMs;return t.tokens.reduce(((o,n,i)=>{const a=t.tokens[i+1];let r;o.length>0&&(r=o[o.length-1]);const s=r?.alignRange?.end??0,l=s+n.text.length;if(n.alignRange={start:s,end:l},o.push(n),a){const t=n.startMs+n.durationMs,i=a.startMs?a.startMs-t:e-t;o.push({text:" ",startMs:t,durationMs:i,alignRange:{start:l,end:l+1}})}return o}),[])}function tt(t,e){const o=t.text.split(/([\n \t])/).reduce(((t,o)=>{if(o.length){const n=t[t.length-1]??e,i=n?.alignRange?.end??0,a=i+o.length;t.push({text:o,alignRange:{start:i,end:a}})}return t}),[]),n=Math.floor(t.durationMs/o.length),i=t.startMs+t.durationMs;return o.map(((e,a)=>{const r=a===o.length-1,s=t.startMs+n*a;return{...e,startMs:s,durationMs:r?i-s:n}}))}function et(t){let e=Math.floor(t/3600),o=Math.floor(t%3600/60),n=Math.floor(t%60),i=Math.floor(t%1*1e3);return`${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")},${i.toString().padStart(3,"0")}`}async function ot(t){const e=new Promise((t=>setTimeout((()=>t({containsTokens:!1,subtitles:[]})),5e3))),o=(async()=>{try{const e=await(0,P.G3)(t.url);return await e.json()}catch(t){return console.error("[VOT] Failed to fetch subtitles. Reason:",t),{containsTokens:!1,subtitles:[]}}})();let n=await Promise.race([e,o]);return"youtube"===t.source&&(n=function(t){const e={containsTokens:!1,subtitles:[]};if("object"!=typeof t||!("events"in t)||!Array.isArray(t.events))return console.error("[VOT] Failed to format youtube subtitles",t),e;for(let o=0;ot.utf8.replace(/^( +| +)$/g,""))).join(" ");let i=t.events[o].dDurationMs;t.events[o+1]&&t.events[o].tStartMs+t.events[o].dDurationMs>t.events[o+1].tStartMs&&(i=t.events[o+1].tStartMs-t.events[o].tStartMs),"\n"!==n&&e.subtitles.push({text:n,startMs:t.events[o].tStartMs,durationMs:i})}return e}(n)),n.subtitles=function(t,e){const o=[];let n;for(let i=0;i{setTimeout((()=>{i||(console.error("[VOT] Failed get yandex subtitles. Reason: timeout"),t([]))}),5e3)})),new Promise((n=>{Q(`${t.url}${e}`,o,((t,o)=>{C.A.log("[exec callback] Requesting video subtitles",e),t||(console.error("[VOT] Failed get yandex subtitles"),i=!0,n([]));const a=H.decodeSubtitlesResponse(o);console.log("[VOT] Subtitles response: ",a);let r=a.subtitles??[];r=r.reduce(((t,e)=>(e.language&&!t.find((t=>{if("yandex"===t.source&&t.language===e.language&&!t.translatedFromLanguage)return t}))&&t.push({source:"yandex",language:e.language,url:e.url}),e.translatedLanguage&&t.push({source:"yandex",language:e.translatedLanguage,translatedFromLanguage:e.language,url:e.translatedUrl}),t)),[]),i=!0,n(r)}))}))]),r=[...a,...n].sort(((t,e)=>{if(t.source!==e.source)return"yandex"===t.source?-1:1;if(t.language!==e.language&&(t.language===P.vV||e.language===P.vV))return t.language===P.vV?-1:1;if("yandex"===t.source){if(t.translatedFromLanguage!==e.translatedFromLanguage)return t.translatedFromLanguage&&e.translatedFromLanguage?t.translatedFromLanguage===o?-1:1:t.language===e.language?t.translatedFromLanguage?1:-1:t.translatedFromLanguage?-1:1;if(!t.translatedFromLanguage)return t.language===o?-1:1}return"youtube"===t.source&&t.isAutoGenerated!==e.isAutoGenerated?t.isAutoGenerated?1:-1:0}));return console.log("[VOT] subtitles list",r),r}class it{dragging=!1;subtitlesContainerRect=null;containerRect=null;offsetX=null;offsetY=null;lastContent=null;highlightWords=!1;subtitles=null;maxLength=300;maxLengthRegexp=/.{1,300}(?:\s|$)/g;constructor(t,e,o){this.site=o,this.video=t,"youtube"===this.site.host&&"mobile"!==this.site.additionalData?this.container=e.parentElement:this.container=e,this.votSubtitlesContainer=document.createElement("vot-block"),this.votSubtitlesContainer.classList.add("vot-subtitles-widget"),this.container.appendChild(this.votSubtitlesContainer),this.onMouseDownBound=this.onMouseDown.bind(this),this.onMouseUpBound=this.onMouseUp.bind(this),this.onMouseMoveBound=this.onMouseMove.bind(this),this.onTimeUpdateBound=this.onTimeUpdate.bind(this),document.addEventListener("mousedown",this.onMouseDownBound),document.addEventListener("mouseup",this.onMouseUpBound),document.addEventListener("mousemove",this.onMouseMoveBound),this.video?.addEventListener("timeupdate",this.onTimeUpdateBound)}release(){this.video?.removeEventListener("timeupdate",this.onTimeUpdateBound),document.removeEventListener("mousedown",this.onMouseDownBound),document.removeEventListener("mouseup",this.onMouseUpBound),document.removeEventListener("mousemove",this.onMouseMoveBound),this.votSubtitlesContainer.remove()}onMouseDown(t){this.votSubtitlesContainer.contains(t.target)&&(this.subtitlesContainerRect=this.votSubtitlesContainer.getBoundingClientRect(),this.containerRect=this.container.getBoundingClientRect(),this.offsetX=t.clientX-this.subtitlesContainerRect.x,this.offsetY=t.clientY-this.subtitlesContainerRect.y,this.dragging=!0)}onMouseUp(){this.dragging=!1}onMouseMove(t){if(this.dragging){t.preventDefault();const e=t.clientX-this.offsetX,o=t.clientY-this.offsetY,n=o>=this.containerRect.top,i=o+this.subtitlesContainerRect.height<=this.containerRect.bottom,a=e>=this.containerRect.left,r=e+this.subtitlesContainerRect.width<=this.containerRect.right;this.votSubtitlesContainer.style.top=n&&i?o-this.containerRect.y+"px":n?this.containerRect.height-this.subtitlesContainerRect.height+"px":"0px",this.votSubtitlesContainer.style.left=a&&r?e-this.containerRect.x+"px":a?this.containerRect.width-this.subtitlesContainerRect.width+"px":"0px"}}onTimeUpdate(){this.update()}setContent(t){t&&this.video?(this.subtitles=t,this.update()):(this.subtitles=null,this.votSubtitlesContainer.innerHTML="")}setMaxLength(t){"number"==typeof t&&t&&(this.maxLength=t,this.maxLengthRegexp=new RegExp(`.{1,${t}}(?:\\s|$)`,"g"),this.update())}setHighlightWords(t){this.highlightWords!==!!t&&(this.highlightWords=!!t,this.update())}update(){if(!this.video)return;let t="",e=this.highlightWords&&this.subtitles?.containsTokens;const o=1e3*this.video.currentTime,n=this.subtitles?.subtitles?.findLast((t=>t.startMsthis.maxLength){let t=[],e=0,n=0,a=0;for(let o=0;othis.maxLength){let r=i.slice(e,n+1);r.at(0)&&" "===r.at(0).text&&(r=r.slice(1)),r.at(-1)&&" "===r.at(-1).text&&(r=r.slice(0,r.length-1)),t.push({startMs:i[e].startMs,durationMs:i[n].startMs+i[n].durationMs-i[e].startMs,tokens:r}),e=o,a=0}n=o}for(let e=0;er||o>a.startMs-100&&r-o<275)?'class="passed"':""}>${a.text}`}}t!==this.lastContent&&(this.lastContent=t,this.votSubtitlesContainer.innerHTML=t?`${t.replace("\\n","
")}
`:"")}}const at={getVideoData:async function(){const t=window.course_id??document.querySelector('input[name="course_id"]')?.value,e=window.lessons??await async function(t){const e=await fetch(`https://coursehunter.net/api/v1/course/${t}/lessons`);return await e.json()}(t),o=parseInt(document.querySelector(".lessons-item_active")?.dataset?.index??1),n=e?.[o-1],{file:i,duration:a}=n;return C.A.log("coursehunter course data:",e),{url:i,duration:a}}};function rt(){return st()?.player}function st(){return document.querySelector(".vjs-v6")}const lt={getPlayer:st,getPlayerData:rt,getVideoData:async function(t="en"){let e=null;const o=rt(),{duration:n}=o?.cache_||{},{courseId:i,tracks:a,sources:s}=o?.options_||{},l=function(t){const e=t?.find((t=>"video/mp4"===t.type));return e?.src}(s),d=await async function(t){const e=await fetch(`https://www.coursera.org/api/onDemandCourses.v1/${t}`),o=await e.json();return o?.elements?.[0]}(i);let c=d?.primaryLanguageCodes?.[0];c=c?(0,P.R4)(c):"en",r.xm.includes(c)||(c="en");const u=function(t,e,o){let n=t?.find((t=>(0,P.R4)(t.srclang)===e));return n||(n=t?.find((t=>(0,P.R4)(t.srclang)===o))||t?.[0]),n?.src}(a,c,t);console.log(`videoURL: ${l}, subtitlesURL: ${u}`),u&&l?e=[{target:"video_file_url",targetUrl:l},{target:"subtitles_file_url",targetUrl:`https://www.coursera.org${u}`}]:l&&!u?(console.warn("[VOT] Subtitles files not found. Using the link only to the video file."),e={url:l}):console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${l}, subtitlesURL: ${u}`);const h={duration:n,detectedLanguage:c,translationHelp:e};return C.A.log("coursera video data:",h),console.log("[VOT] Detected language: ",h.detectedLanguage),h}},dt="https://www.udemy.com/api-2.0",ct=2592e6;async function ut(t){const e=await fetch(`${dt}/courses/${t}/?`+new URLSearchParams({"fields[course]":"locale",use_remote_version:"true",caching_intent:"true"}));return await e.json()}async function ht(t,e,o){if(!(n=t.expires,n+ct>(new Date).getTime()&&t.accessToken))return void console.error(s.j.get("udemyAccessTokenExpired"));var n;const i=`Bearer ${t.accessToken}`,a=await fetch(`${dt}/users/me/subscribed-courses/${e}/lectures/${o}/?`+new URLSearchParams({"fields[lecture]":"asset","fields[asset]":"length,media_sources,captions"}),{headers:{"x-udemy-authorization":i,authorization:i}});return await a.json()}function pt(){return vt()?.player}function gt(){const t=document.querySelector(".ud-app-loader[data-module-id='course-taking']")?.dataset?.moduleArgs;return t?JSON.parse(t):(console.error(s.j.get("udemyModuleArgsNotFound")),{})}function vt(){return document.querySelector(".vjs-v7")}const mt={getPlayer:vt,getPlayerData:pt,getVideoData:async function(t,e="en"){let o=null;const n=pt();C.A.log("udemyData",t);const i=gt();C.A.log("moduleData: ",i);const a=i.courseId,s=window.location.pathname.match(/learn\/lecture\/([^/]+)/)?.[1];C.A.log(`CourseId: ${a}, lectureId: ${s}`);const l=await ut(a);C.A.log("courseLang Data:",l);const d=await ht(t,a,s);console.log("lecture Data:",d);let c=l?.locale?.locale;c=c?(0,P.R4)(c):"en",r.xm.includes(c)||(c="en");const u=d?.asset?.length||n?.cache_?.duration,h=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(d?.asset?.media_sources)||function(){const t=vt()?.querySelector("video")?.src;return!t?.startsWith("blob:")&&t}(),p=function(t,e,o){let n=t?.find((t=>(0,P.R4)(t.locale_id)===e));return n||(n=t?.find((t=>(0,P.R4)(t.locale_id)===o))||t?.[0]),n?.url}(d?.asset?.captions,c,e);console.log(`videoURL: ${h}, subtitlesURL: ${p}`),p&&h?o=[{target:"video_file_url",targetUrl:h},{target:"subtitles_file_url",targetUrl:p}]:h&&!p?(console.warn("[VOT] Subtitles files not found. Using the link only to the video file."),o={url:h}):console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${h}, subtitlesURL: ${p}`);const g={duration:u,detectedLanguage:c,translationHelp:o};return C.A.log("udemy video data:",g),console.log("[VOT] Detected language: ",g.detectedLanguage),g},getModuleData:gt,getCourseLang:ut,getLectureData:ht};const bt={getVideoData:async function(t){const e=await async function(t){return await fetch("https://api.banned.video/graphql",{method:"POST",body:JSON.stringify({operationName:"GetVideo",query:"query GetVideo($id: String!) {\n getVideo(id: $id) {\n ...DisplayVideoFields\n videoUrl: directUrl\n live\n }\n }\n\n fragment DisplayVideoFields on Video {\n title\n description: summary\n duration: videoDuration\n }",variables:{id:t}}),headers:{"User-Agent":"bannedVideoFrontEnd","apollographql-client-name":"banned-web","apollographql-client-version":"1.3","content-type":"application/json"}}).then((t=>t.json())).catch((t=>(console.error(t),{data:{getVideo:{}}})))}(t);C.A.log("banned.video video data:",e);const{videoUrl:o,duration:n,live:i,description:a,title:r}=e.data.getVideo;return{url:o,duration:n,live:i,title:r,description:a}}};const ft="https://global.apis.naver.com/weverse/wevweb",yt="be4d79eb8fc7bd008ee82c8ec4ff6fd4",wt="1b9cb6378d959b45714bec49971ade22e6e24e42";async function xt(t){const e=Date.now();let o=t.substring(0,Math.min(255,t.length))+e;const n=await async function(t,e){try{const o=new TextEncoder("utf-8");e=o.encode(e);const n=await window.crypto.subtle.importKey("raw",o.encode(t),{name:"HMAC",hash:{name:"SHA-1"}},!1,["sign","verify"]),i=await window.crypto.subtle.sign("HMAC",n,e);return btoa(String.fromCharCode(...new Uint8Array(i)))}catch(t){return console.error(t),!1}}(wt,o);return{wmsgpad:e,wmd:n}}function St(){return{appId:yt,language:"en",os:"WEB",platform:"WEB",wpf:"pc"}}const kt={getVideoData:async function(){const t=new URL(window.location).pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[3],e=await async function(t){const e=`/post/v1.0/post-${t}/preview?`+new URLSearchParams({fieldSet:"postForPreview",...St()}),o=await xt(e);try{const t=await fetch(ft+e+"&"+new URLSearchParams(o));return await t.json()}catch(t){return console.error(t),!1}}(t);if(!e)return;C.A.log("weverse video preview data:",e);const{videoId:o,serviceId:n,infraVideoId:i}=e.extension.video;if(!(o&&n&&i))return!1;const a=await async function(t){const e=`/video/v1.1/vod/${t}/inKey?`+new URLSearchParams({gcc:"RU",...St()}),o=await xt(e);try{const t=await fetch(ft+e+"&"+new URLSearchParams(o),{method:"POST"});return await t.json()}catch(t){return console.error(t),!1}}(o);if(C.A.log("weverse video inKey data:",e),!a)return!1;const r=await async function(t,e,o){const n=Date.now();try{const i=await fetch(`https://global.apis.naver.com/rmcnmv/rmcnmv/vod/play/v2.0/${t}?`+new URLSearchParams({key:e,sid:o,nonce:n,devt:"html5_pc",prv:"N",aup:"N",stpb:"N",cpl:"en",env:"prod",lc:"en",adi:JSON.stringify([{adSystem:null}]),adu:"/"}));return await i.json()}catch(t){return console.error(t),!1}}(i,a.inKey,n);C.A.log("weverse video info:",r);const s=r.videos.list.find((t=>!1===t.useP2P&&t.source.includes(".mp4")));return!!s&&{url:s.source,duration:s.duration}}},Tt=[{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube.com$/,selector:"shorts-video #player"},{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube.com$/,selector:".player-container"},{host:"youtube",url:"https://youtu.be/",match:/^(www.)?youtube(-nocookie|kids)?.com$/,selector:".html5-video-container:not(#inline-player *)"},{host:"tiktok",url:"https://www.tiktok.com/",match:/^(www.)?tiktok.com$/,selector:null},{host:"proxitok",url:"https://www.tiktok.com/",match:n,selector:".column.has-text-centered"},{host:"twitch",url:"https://twitch.tv/",match:[/^m.twitch.tv$/,/^www.twitch.tv$/,/^clips.twitch.tv$/,/^player.twitch.tv$/],selector:".video-ref, main > div > section > div > div > div"},{host:"xvideos",url:"https://www.xvideos.com/",match:/^www.xvideos.com$/,selector:".video-bg-pic"},{host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:/^[a-z]+.pornhub.com$/,selector:".mainPlayerDiv > .video-element-wrapper-js > div"},{additionalData:"embed",host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:t=>t.host.includes("pornhub.com")&&t.pathname.startsWith("/embed/"),selector:"#player"},{additionalData:"mobile",host:"vk",url:"https://vk.com/video?z=",match:/^m.vk.(com|ru)$/,selector:"vk-video-player",shadowRoot:!0},{additionalData:"clips",host:"vk",url:"https://vk.com/video?z=",match:/^(www.|m.)?vk.(com|ru)$/,selector:'div[data-testid="clipcontainer-video"]'},{host:"vk",url:"https://vk.com/video?z=",match:/^(www.|m.)?vk.(com|ru)$/,selector:".videoplayer_media"},{host:"vimeo",url:"https://vimeo.com/",match:/^vimeo.com$/,selector:".player"},{additionalData:"embed",host:"vimeo",url:"https://player.vimeo.com/",match:/^player.vimeo.com$/,selector:".player"},{host:"ok.ru",url:"https://ok.ru/video/",match:/^ok.ru$/,selector:".html5-vpl_vid"},{host:"nine_gag",url:"https://9gag.com/gag/",match:/^9gag.com$/,selector:".video-post"},{host:"bitchute",url:"https://www.bitchute.com/video/",match:/^(www.)?bitchute.com$/,selector:"div#player"},{host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:".video-player > div > div > div:nth-child(2)"},{additionalData:"embed",host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:"#app > div > div"},{host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m|player).bilibili.com$/,selector:".bpx-player-video-wrap"},{additionalData:"old",host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m).bilibili.com$/,selector:null},{host:"twitter",url:"https://twitter.com/i/status/",match:/^twitter.com$/,selector:'div[data-testid="videoComponent"] > div:nth-child(1) > div'},{host:"mail_ru",url:"https://my.mail.ru/",match:/^my.mail.ru$/,selector:"#b-video-wrapper"},{host:"coursera",url:"https://www.coursera.org/",match:/coursera.org$/,selector:".vjs-v6"},{host:"udemy",url:"https://www.udemy.com/",match:/udemy.com$/,selector:'div[data-purpose="curriculum-item-viewer-content"] > section > div > div > div > div:nth-of-type(2)'},{host:"invidious",url:"https://youtu.be/",match:t,selector:"#player"},{host:"piped",url:"https://youtu.be/",match:e,selector:".shaka-video-container"},{host:"rumble",url:"https://rumble.com/",match:/^rumble.com$/,selector:"#videoPlayer > .videoPlayer-Rumble-cls > div"},{host:"eporner",url:"https://www.eporner.com/",match:/^(www.)?eporner.com$/,selector:".vjs-v7"},{host:"peertube",url:"stub",match:i,selector:".vjs-v7"},{host:"dailymotion",url:"https://dai.ly/",match:/^geo.dailymotion.com$/,selector:".player"},{host:"trovo",url:"https://trovo.live/s/",match:/^trovo.live$/,selector:".player-video"},{host:"yandexdisk",url:"https://yadi.sk/i/",match:/^disk.yandex.ru$/,selector:".video-player__player > div:nth-child(1)"},{host:"coursehunter",url:"https://coursehunter.net/course/",match:/^coursehunter.net$/,selector:"#oframeplayer > pjsdiv:nth-of-type(1)"},{host:"googledrive",url:"https://drive.google.com/file/d/",match:/^youtube.googleapis.com$/,selector:".html5-video-container"},{host:"bannedvideo",url:"https://banned.video/watch?id=",match:/^(www.)?banned.video$/,selector:".vjs-v7"},{host:"facebook",url:"https://facebook.com/",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/videos/"),selector:'div[role="main"] div[data-pagelet$="video" i]'},{additionalData:"reels",host:"facebook",url:"https://facebook.com/",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/reel/"),selector:'div[role="main"]'},{host:"weverse",url:"https://weverse.io/",match:/^weverse.io$/,selector:".webplayer-internal-source-wrapper"},{host:"newgrounds",url:"https://www.newgrounds.com/",match:/^www.newgrounds.com$/,selector:".ng-video-player"},{host:"egghead",url:"https://egghead.io/",match:/^egghead.io$/,selector:".cueplayer-react-video-holder"},{host:"youku",url:"https://v.youku.com/",match:/^v.youku.com$/,selector:"#ykPlayer"},{host:"directlink",url:"stub",match:t=>/([^.]+).mp4/.test(t.pathname),selector:null}];o("./node_modules/requestidlecallback-polyfill/index.js");class Mt{constructor(){this.listeners=new Set}hasListener(t){return this.listeners.has(t)}dispatchToListener(t,...e){try{t(...e)}catch(t){console.error("[VOT]",t)}}addListener(t){if(this.hasListener(t))throw new Error("[VOT] The listener has already been added.");this.listeners.add(t)}removeListener(t){if(!this.hasListener(t))throw new Error("[VOT] The listener has not been added yet.");this.listeners.delete(t)}dispatch(...t){for(const e of Array.from(this.listeners))this.dispatchToListener(e,...t)}}function Vt(t){return Array.from(t).flatMap((t=>t instanceof HTMLVideoElement?[t]:t instanceof HTMLElement?Array.from(t.querySelectorAll("video")):t.shadowRoot?Array.from(t.shadowRoot.querySelectorAll("video")):[]))}const Lt=/advertise|promo|sponsor|banner|commercial|preroll|midroll|postroll|ad-container|sponsored/i;var At=o("./src/utils/storage.js"),Ct=o("./src/utils/translateApis.js");const Pt=U.getParser(window.navigator.userAgent).getResult(),Ot=[...t,...e],Et=["playing","ratechange","play","waiting","pause"];function Rt(t,e){return t.map((t=>({label:s.j.get("langs")[t]??t.toUpperCase(),value:t,selected:e===t})))}var Bt=!1;class Ft{translateFromLang="en";translateToLang=P.vV;timer;ytData="";videoData="";firstPlay=!0;audio=new Audio;hls=(0,P.CK)();videoTranslations=[];videoTranslationTTL=7200;downloadTranslationUrl=null;downloadSubtitlesUrl=null;autoRetry;streamPing;volumeOnStart;tempOriginalVolume;tempVolume;firstSyncVolume=!0;subtitlesList=[];subtitlesListVideoId=null;videoLastSrcObject=null;dragging;constructor(t,e,o){C.A.log("[VideoHandler] add video:",t,"container:",e,this),this.video=t,this.container=e,this.site=o,this.stopTranslationBound=this.stopTranslation.bind(this),this.handleVideoEventBound=this.handleVideoEvent.bind(this),this.changeOpacityOnEventBound=this.changeOpacityOnEvent.bind(this),this.resetTimerBound=this.resetTimer.bind(this),this.init()}async autoTranslate(){if(this.site.host,this.firstPlay&&1===this.data.autoTranslate&&this.videoData.videoId){this.firstPlay=!1;try{await this.translateExecutor(this.videoData.videoId)}catch(t){console.error("[VOT]",t),this.transformBtn("error","VOTLocalizedError"===t?.name?t.localizedMessage:t)}}}async init(){if(this.initialized)return;const t="uk"===P.vV?1:0,e={autoTranslate:At.d.get("autoTranslate",0,!0),dontTranslateLanguage:At.d.get("dontTranslateLanguage",P.vV),dontTranslateYourLang:At.d.get("dontTranslateYourLang",1,!0),autoSetVolumeYandexStyle:At.d.get("autoSetVolumeYandexStyle",1,!0),autoVolume:At.d.get("autoVolume",a.JD,!0),buttonPos:At.d.get("buttonPos","default"),showVideoSlider:At.d.get("showVideoSlider",1,!0),syncVolume:At.d.get("syncVolume",0,!0),subtitlesMaxLength:At.d.get("subtitlesMaxLength",300,!0),highlightWords:At.d.get("highlightWords",0,!0),responseLanguage:At.d.get("responseLanguage",P.vV),defaultVolume:At.d.get("defaultVolume",100,!0),udemyData:At.d.get("udemyData",{accessToken:"",expires:0}),audioProxy:At.d.get("audioProxy",t,!0),showPiPButton:At.d.get("showPiPButton",0,!0),translateAPIErrors:At.d.get("translateAPIErrors",1,!0),translationService:At.d.get("translationService",a.mE),detectService:At.d.get("detectService",a.K2),m3u8ProxyHost:At.d.get("m3u8ProxyHost",a.se),proxyWorkerHost:At.d.get("proxyWorkerHost",a.Pm)};this.data=Object.fromEntries(await Promise.all(Object.entries(e).map((async([t,e])=>[t,await e])))),console.log("[db] data from db: ",this.data),this.subtitlesWidget=new it(this.video,this.container,this.site),this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength),this.subtitlesWidget.setHighlightWords(this.data.highlightWords),this.initUI(),this.initUIEvents();const o=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=o,o?this.votMenu.container.hidden=!0:(this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage??"ru")),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),await this.autoTranslate(),this.translateToLang=this.data.responseLanguage??"ru",this.initExtraEvents(),this.initialized=!0}transformBtn(t="none",e){this.votButton.container.dataset.status=t,this.votButton.container.dataset.translating="error"===t&&e.includes(s.j.get("translationTake")),this.votButton.label.innerHTML=e,this.votButton.container.title="error"===t?e:""}initUI(){this.votButton=L.createVOTButton(s.j.get("translateVideo")),this.data?.buttonPos&&"default"!==this.data?.buttonPos&&this.video.clientWidth&&this.video.clientWidth>550?(this.votButton.container.dataset.direction="column",this.votButton.container.dataset.position=this.data?.buttonPos):(this.votButton.container.dataset.direction="row",this.votButton.container.dataset.position="default"),this.container.appendChild(this.votButton.container),this.votButton.pipButton.hidden=!(0,P.Bs)()||!this.data?.showPiPButton,this.votButton.separator2.hidden=!(0,P.Bs)()||!this.data?.showPiPButton,this.votButton.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votMenu=L.createVOTMenu(s.j.get("VOTSettings")),this.votMenu.container.dataset.position=this.video.clientWidth&&this.video.clientWidth>550?this.data?.buttonPos:"default",this.container.appendChild(this.votMenu.container),this.votDownloadButton=L.createIconButton(''),this.votDownloadButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadButton),this.votDownloadSubtitlesButton=L.createIconButton(''),this.votDownloadSubtitlesButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadSubtitlesButton),this.votSettingsButton=L.createIconButton(''),this.votMenu.headerContainer.appendChild(this.votSettingsButton),this.votTranslationLanguageSelect=L.createVOTLanguageSelect({fromTitle:s.j.get("langs")[this.video.detectedLanguage],fromDialogTitle:s.j.get("videoLanguage"),fromItems:[{label:s.j.get("langs").auto,value:"auto",selected:""},...Rt(r.xm,this.videoData.detectedLanguage)],fromOnSelectCB:async t=>{C.A.log("[fromOnSelectCB] select from language",t.target.dataset.votValue),this.videoData=await this.getVideoData(),this.setSelectMenuValues(t.target.dataset.votValue,this.videoData.responseLanguage)},toTitle:s.j.get("langs")[this.video.responseLanguage],toDialogTitle:s.j.get("translationLanguage"),toItems:Rt(r.Ww,this.videoData.responseLanguage),toOnSelectCB:async t=>{const e=t.target.dataset.votValue;C.A.log("[toOnSelectCB] select to language",e),this.data.responseLanguage=this.translateToLang=e,await At.d.set("responseLanguage",this.data.responseLanguage),C.A.log("Response Language value changed. New value: ",this.data.responseLanguage),this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage)}}),this.votMenu.bodyContainer.appendChild(this.votTranslationLanguageSelect.container),this.votSubtitlesSelect=L.createVOTSelect(s.j.get("VOTSubtitlesDisabled"),s.j.get("VOTSubtitles"),[{label:s.j.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1}],{onSelectCb:async t=>{await this.changeSubtitlesLang(t.target.dataset.votValue)},labelElement:L.createVOTSelectLabel(s.j.get("VOTSubtitles"))}),this.votMenu.bodyContainer.appendChild(this.votSubtitlesSelect.container),this.votVideoVolumeSlider=L.createSlider(`${s.j.get("VOTVolume")}: ${100*this.getVideoVolume()}%`,100*this.getVideoVolume()),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoVolumeSlider.container),this.votVideoTranslationVolumeSlider=L.createSlider(`${s.j.get("VOTVolumeTranslation")}: ${this.data?.defaultVolume??100}%`,this.data?.defaultVolume??100),this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoTranslationVolumeSlider.container),this.votMenu.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votSettingsDialog=L.createDialog(s.j.get("VOTSettings")),document.documentElement.appendChild(this.votSettingsDialog.container),this.votTranslationHeader=L.createHeader(s.j.get("translationSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationHeader),this.votAutoTranslateCheckbox=L.createCheckbox(s.j.get("VOTAutoTranslate"),this.data?.autoTranslate??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoTranslateCheckbox.container),this.votDontTranslateYourLangSelect=L.createVOTSelect(s.j.get("langs")[At.d.syncGet("dontTranslateLanguage",P.vV)],s.j.get("VOTDontTranslateYourLang"),Rt(r.xm,At.d.syncGet("dontTranslateLanguage",P.vV)),{onSelectCb:async t=>{this.data.dontTranslateLanguage=t.target.dataset.votValue,await At.d.set("dontTranslateLanguage",this.data.dontTranslateLanguage)},labelElement:L.createCheckbox(s.j.get("VOTDontTranslateYourLang"),this.data?.dontTranslateYourLang??!0).container}),this.votSettingsDialog.bodyContainer.appendChild(this.votDontTranslateYourLangSelect.container),this.votAutoSetVolumeCheckbox=L.createCheckbox(`${s.j.get("VOTAutoSetVolume")}`,this.data?.autoSetVolumeYandexStyle??!0),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeCheckbox.container),this.votAutoSetVolumeSlider=L.createSlider(`${100*(this.data?.autoVolume??a.JD)}%`,100*(this.data?.autoVolume??a.JD),0,100),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeSlider.container),this.votShowVideoSliderCheckbox=L.createCheckbox(s.j.get("VOTShowVideoSlider"),this.data?.showVideoSlider??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votShowVideoSliderCheckbox.container),this.votUdemyDataTextfield=L.createTextfield(s.j.get("VOTUdemyData"),this.data?.udemyData?.accessToken??""),this.votUdemyDataTextfield.container.hidden="udemy"!==this.site.host,this.votSettingsDialog.bodyContainer.appendChild(this.votUdemyDataTextfield.container),this.votSyncVolumeCheckbox=L.createCheckbox(s.j.get("VOTSyncVolume"),this.data?.syncVolume??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSyncVolumeCheckbox.container),this.votTranslationServiceSelect=L.createVOTSelect(At.d.syncGet("translationService",a.mE).toUpperCase(),s.j.get("VOTTranslationService"),Rt(Ct.vN,At.d.syncGet("translationService",a.mE)),{onSelectCb:async t=>{this.data.translationService=t.target.dataset.votValue,await At.d.set("translationService",this.data.translationService)},labelElement:L.createCheckbox(s.j.get("VOTTranslateAPIErrors"),this.data.translateAPIErrors??!0).container}),this.votTranslationServiceSelect.container.hidden="ru"===s.j.lang,this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationServiceSelect.container),this.votDetectServiceSelect=L.createVOTSelect(At.d.syncGet("detectService",a.K2).toUpperCase(),s.j.get("VOTDetectService"),Rt(Ct.qh,At.d.syncGet("detectService",a.K2)),{onSelectCb:async t=>{this.data.detectService=t.target.dataset.votValue,await At.d.set("detectService",this.data.detectService)},labelElement:L.createVOTSelectLabel(s.j.get("VOTDetectService"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votDetectServiceSelect.container),this.votSubtitlesHeader=L.createHeader(s.j.get("subtitlesSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHeader),this.votSubtitlesMaxLengthSlider=L.createSlider(`${s.j.get("VOTSubtitlesMaxLength")}: ${this.data?.subtitlesMaxLength??300}`,this.data?.subtitlesMaxLength??300,50,300),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesMaxLengthSlider.container),this.votSubtitlesHighlightWordsCheckbox=L.createCheckbox(s.j.get("VOTHighlightWords"),this.data?.highlightWords??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHighlightWordsCheckbox.container),this.votProxyHeader=L.createHeader(s.j.get("proxySettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votProxyHeader),this.votM3u8ProxyHostTextfield=L.createTextfield(s.j.get("VOTM3u8ProxyHost"),this.data?.m3u8ProxyHost,a.se),this.votSettingsDialog.bodyContainer.appendChild(this.votM3u8ProxyHostTextfield.container),this.votProxyWorkerHostTextfield=L.createTextfield(s.j.get("VOTProxyWorkerHost"),this.data?.proxyWorkerHost,a.Pm),this.votProxyWorkerHostTextfield.container.hidden=!1,this.votSettingsDialog.bodyContainer.appendChild(this.votProxyWorkerHostTextfield.container),this.votAudioProxyCheckbox=L.createCheckbox(s.j.get("VOTAudioProxy"),this.data?.audioProxy??!1),this.votAudioProxyCheckbox.container.hidden=!1,this.votSettingsDialog.bodyContainer.appendChild(this.votAudioProxyCheckbox.container),this.votAboutHeader=L.createHeader(s.j.get("about")),this.votSettingsDialog.bodyContainer.appendChild(this.votAboutHeader),this.votLanguageSelect=L.createVOTSelect(s.j.get("langs")[At.d.syncGet("locale-lang-override","auto")],s.j.get("VOTMenuLanguage"),Rt(s.z,At.d.syncGet("locale-lang-override","auto")),{onSelectCb:async t=>{await At.d.set("locale-lang-override",t.target.dataset.votValue)},labelElement:L.createVOTSelectLabel(s.j.get("VOTMenuLanguage"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votLanguageSelect.container),this.votShowPiPButtonCheckbox=L.createCheckbox(s.j.get("VOTShowPiPButton"),this.data?.showPiPButton??!1),this.votShowPiPButtonCheckbox.container.hidden=!(0,P.Bs)(),this.votSettingsDialog.bodyContainer.appendChild(this.votShowPiPButtonCheckbox.container),this.votVersionInfo=L.createInformation(`${s.j.get("VOTVersion")}:`,`cloudflare ${GM_info.script.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votVersionInfo.container),this.votAuthorsInfo=L.createInformation(`${s.j.get("VOTAuthors")}:`,GM_info.script.author),this.votSettingsDialog.bodyContainer.appendChild(this.votAuthorsInfo.container),this.votLoaderInfo=L.createInformation(`${s.j.get("VOTLoader")}:`,`${GM_info.scriptHandler} v${GM_info.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votLoaderInfo.container),this.votBrowserInfo=L.createInformation(`${s.j.get("VOTBrowser")}:`,`${Pt.browser.name} ${Pt.browser.version} (${Pt.os.name} ${Pt.os.version})`),this.votSettingsDialog.bodyContainer.appendChild(this.votBrowserInfo.container),this.votResetSettingsButton=L.createButton(s.j.get("resetSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votResetSettingsButton)}initUIEvents(){this.votButton.translateButton.addEventListener("click",(()=>{(async()=>{if(this.audio.src)return C.A.log("[click translationBtn] audio.src is not empty"),void this.stopTranslate();if(this.hls.url)return C.A.log("[click translationBtn] hls is not empty"),void this.stopTranslate();try{if(C.A.log("[click translationBtn] trying execute translation"),!this.videoData.videoId)throw new A("VOTNoVideoIDFound");"vk"===this.site.host&&"clips"===this.site.additionalData&&(this.videoData=await this.getVideoData()),await this.translateExecutor(this.videoData.videoId)}catch(t){console.error("[VOT]",t),"VOTLocalizedError"===t?.name?this.transformBtn("error",t.localizedMessage):this.transformBtn("error",t)}})()})),this.votButton.pipButton.addEventListener("click",(()=>{(async()=>{this.video!==document.pictureInPictureElement?await this.video.requestPictureInPicture():await document.exitPictureInPicture()})()})),this.votButton.menuButton.addEventListener("click",(()=>{this.votMenu.container.hidden=!this.votMenu.container.hidden})),this.votButton.container.addEventListener("mousedown",(()=>{this.dragging=!0})),this.container.addEventListener("mouseup",(()=>{this.dragging=!1})),this.container.addEventListener("mousemove",(async t=>{if(this.dragging){t.preventDefault();const e=t.clientX/this.container.clientWidth*100;this.data.buttonPos=this.container.clientWidth&&this.container.clientWidth>550?e<=33?"left":e>=66?"right":"default":"default",this.votButton.container.dataset.direction="default"===this.data.buttonPos?"row":"column",this.votButton.container.dataset.position=this.data.buttonPos,this.votMenu.container.dataset.position=this.data.buttonPos,this.container.clientWidth&&this.container.clientWidth>550&&await At.d.set("buttonPos",this.data.buttonPos)}})),this.votDownloadButton.addEventListener("click",(()=>{this.downloadTranslationUrl&&window.open(this.downloadTranslationUrl,"_blank").focus()})),this.votDownloadSubtitlesButton.addEventListener("click",(async()=>{const t=function(t){let e="",o=1;for(const n of t.subtitles){let t=n.startMs/1e3,i=(n.startMs+n.durationMs)/1e3;e+=`${o}\n`,e+=`${et(t)} --\x3e ${et(i)}\n`,e+=`${n.text}\n\n`,o++}return e.trim()}(this.YandexSubtitles),e=new Blob([t],{type:"text/plain"}),o=URL.createObjectURL(e),n=document.createElement("a");n.href=o,n.download=`subtitles_${this.videoData.videoId}.srt`,n.click(),URL.revokeObjectURL(o)})),this.votSettingsButton.addEventListener("click",(()=>{this.votSettingsDialog.container.hidden=!this.votSettingsDialog.container.hidden,(document.fullscreenElement||document.webkitFullscreenElement)&&(document.webkitExitFullscreen&&document.webkitExitFullscreen(),document.exitFullscreen&&document.exitFullscreen())})),this.votVideoVolumeSlider.input.addEventListener("input",(t=>{const e=Number(t.target.value);this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`,this.setVideoVolume(e/100),this.data.syncVolume&&this.syncVolumeWrapper("video",e)})),this.votVideoTranslationVolumeSlider.input.addEventListener("input",(t=>{(async()=>{this.data.defaultVolume=Number(t.target.value),await At.d.set("defaultVolume",this.data.defaultVolume),this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${this.data.defaultVolume}%`,this.audio.volume=this.data.defaultVolume/100,this.data.syncVolume&&(this.syncVolumeWrapper("translation",this.data.defaultVolume),["youtube","googledrive"].includes(this.site.host)&&"mobile"!==this.site.additionalData&&this.setVideoVolume(this.tempOriginalVolume/100))})()})),this.votAutoTranslateCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.autoTranslate=Number(t.target.checked),await At.d.set("autoTranslate",this.data.autoTranslate),await this.autoTranslate(),C.A.log("autoTranslate value changed. New value: ",this.data.autoTranslate)})()})),this.votDontTranslateYourLangSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.dontTranslateYourLang=Number(t.target.checked),await At.d.set("dontTranslateYourLang",this.data.dontTranslateYourLang),C.A.log("dontTranslateYourLang value changed. New value: ",this.data.dontTranslateYourLang)})()})),this.votAutoSetVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.autoSetVolumeYandexStyle=Number(t.target.checked),await At.d.set("autoSetVolumeYandexStyle",this.data.autoSetVolumeYandexStyle),C.A.log("autoSetVolumeYandexStyle value changed. New value: ",this.data.autoSetVolumeYandexStyle)})()})),this.votAutoSetVolumeSlider.input.addEventListener("input",(t=>{(async()=>{const e=Number(t.target.value);this.data.autoVolume=(e/100).toFixed(2),await At.d.set("autoVolume",this.data.autoVolume),this.votAutoSetVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`})()})),this.votShowVideoSliderCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showVideoSlider=Number(t.target.checked),await At.d.set("showVideoSlider",this.data.showVideoSlider),C.A.log("showVideoSlider value changed. New value: ",this.data.showVideoSlider),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status})()})),this.votUdemyDataTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.udemyData={accessToken:t.target.value,expires:(new Date).getTime()},await At.d.set("udemyData",this.data.udemyData),C.A.log("udemyData value changed. New value: ",this.data.udemyData),window.location.reload()})()})),this.votSyncVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.syncVolume=Number(t.target.checked),await At.d.set("syncVolume",this.data.syncVolume),C.A.log("syncVolume value changed. New value: ",this.data.syncVolume)})()})),this.votTranslationServiceSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.translateAPIErrors=Number(t.target.checked),await At.d.set("translateAPIErrors",this.data.translateAPIErrors),C.A.log("translateAPIErrors value changed. New value: ",this.data.translateAPIErrors)})()})),this.votSubtitlesMaxLengthSlider.input.addEventListener("input",(t=>{(async()=>{this.data.subtitlesMaxLength=Number(t.target.value),await At.d.set("subtitlesMaxLength",this.data.subtitlesMaxLength),this.votSubtitlesMaxLengthSlider.label.querySelector("strong").innerHTML=`${this.data.subtitlesMaxLength}`,this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength)})()})),this.votSubtitlesHighlightWordsCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.highlightWords=Number(t.target.checked),await At.d.set("highlightWords",this.data.highlightWords),C.A.log("highlightWords value changed. New value: ",this.data.highlightWords),this.subtitlesWidget.setHighlightWords(this.data.highlightWords)})()})),this.votShowPiPButtonCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showPiPButton=Number(t.target.checked),await At.d.set("showPiPButton",this.data.showPiPButton),C.A.log("showPiPButton value changed. New value: ",this.data.showPiPButton),this.votButton.pipButton.hidden=!(0,P.Bs)()||!this.data.showPiPButton,this.votButton.separator2.hidden=!(0,P.Bs)()||!this.data.showPiPButton})()})),this.votM3u8ProxyHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.m3u8ProxyHost=t.target.value||a.se,await At.d.set("m3u8ProxyHost",this.data.m3u8ProxyHost),C.A.log("m3u8ProxyHost value changed. New value: ",this.data.m3u8ProxyHost)})()})),this.votProxyWorkerHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.proxyWorkerHost=t.target.value||a.Pm,await At.d.set("proxyWorkerHost",this.data.proxyWorkerHost),C.A.log("proxyWorkerHost value changed. New value: ",this.data.proxyWorkerHost),window.location.reload()})()})),this.votAudioProxyCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.audioProxy=Number(t.target.checked),await At.d.set("audioProxy",this.data.audioProxy),C.A.log("audioProxy value changed. New value: ",this.data.audioProxy)})()})),this.votResetSettingsButton.addEventListener("click",(()=>{(async()=>{s.j.reset();const t=await At.d.list();for(let e=0;e{this.extraEvents.push({element:t,event:e,handler:o}),t.addEventListener(e,o)},e=(e,o,n)=>{for(const i of o)t(e,i,n)};if(this.resizeObserver=new ResizeObserver((t=>{for(let e=0;e550;this.votButton.container.dataset.position=this.votMenu.container.dataset.position=e?this.data?.buttonPos:"default",this.votButton.container.dataset.direction=this.data?.buttonPos&&"default"!==this.data?.buttonPos&&e?"column":"row"})),this.resizeObserver.observe(this.video),this.votMenu.container.setAttribute("style",`--vot-container-height: ${this.video.getBoundingClientRect().height}px`),["youtube","googledrive"].includes(this.site.host)&&"mobile"!==this.site.additionalData){this.syncVolumeObserver=new MutationObserver((t=>{if(this.audio.src&&this.data.syncVolume)for(let e=0;e{const e=t.target,o=this.votButton.container,n=this.votMenu.container,i=this.container,a=this.votSettingsDialog.container,r=document.querySelector(".vot-dialog-temp"),s=o.contains(e),l=n.contains(e),d=i.contains(e),c=a.contains(e),u=r?.contains(e)??!1;C.A.log(`[document click] ${s} ${l} ${d} ${c} ${u}`),s||l||c||u||(d||this.logout(0),this.votMenu.container.hidden=!0)})),o="pornhub"===this.site.host?"embed"===this.site.additionalData?document.querySelector("#player"):this.container.querySelector(".video-element-wrapper-js > div"):"twitter"===this.site.host?document.querySelector('div[data-testid="videoPlayer"]'):"yandexdisk"===this.site.host?document.querySelector(".video-player__player"):this.container,o&&e(o,["mousemove","mouseout"],this.resetTimerBound),t(this.votButton.container,"mousemove",this.changeOpacityOnEventBound),t(this.votMenu.container,"mousemove",this.changeOpacityOnEventBound),e(document,["touchstart","touchmove","touchend"],this.changeOpacityOnEventBound),t(this.votButton.container,"mousedown",(t=>{t.stopImmediatePropagation()})),t(this.votMenu.container,"mousedown",(t=>{t.stopImmediatePropagation()})),"youtube"===this.site.host&&(this.container.draggable=!1),"googledrive"===this.site.host&&(this.container.style.height="100%"),t(this.video,"canplaythrough",(async()=>{"rutube"===this.site.host&&this.video.src||(0,P.jI)(this.site.host,this.video)!==this.videoData.videoId&&(await this.handleSrcChanged(),C.A.log("lipsync mode is loadeddata"),await this.autoTranslate())})),t(this.video,"emptied",(()=>{this.video.src&&(0,P.jI)(this.site.host,this.video)===this.videoData.videoId||(C.A.log("lipsync mode is emptied"),this.videoData="",this.stopTranslation())})),["rutube","ok"].includes(this.site.host)||t(this.video,"volumechange",(()=>{this.syncVideoVolumeSlider()}))}logout(t){this.votMenu.container.hidden&&(this.votButton.container.style.opacity=t)}resetTimer(){clearTimeout(this.timer),this.logout(1),this.timer=setTimeout((()=>{this.logout(0)}),1e3)}changeOpacityOnEvent(t){clearTimeout(this.timer),this.logout(1),t.stopPropagation()}async changeSubtitlesLang(t){if(C.A.log("[onchange] subtitles",t),this.votSubtitlesSelect.setSelected(t),"disabled"===t)this.votSubtitlesSelect.setTitle(s.j.get("VOTSubtitlesDisabled")),this.subtitlesWidget.setContent(null),this.votDownloadSubtitlesButton.hidden=!0,this.YandexSubtitles=null;else{const e=await ot(this.subtitlesList.at(parseInt(t)));this.subtitlesWidget.setContent(e),this.votDownloadSubtitlesButton.hidden=!1,this.YandexSubtitles=e}}async updateSubtitlesLangSelect(){const t=[{label:s.j.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1},...this.subtitlesList.map(((t,e)=>({label:(s.j.get("langs")[t.language]??t.language.toUpperCase())+(t.translatedFromLanguage?` ${s.j.get("VOTTranslatedFrom")} ${s.j.get("langs")[t.translatedFromLanguage]??t.translatedFromLanguage.toUpperCase()}`:"")+("yandex"!==t.source?` ${t.source}`:"")+(t.isAutoGenerated?` (${s.j.get("VOTAutogenerated")})`:""),value:e,selected:!1,disabled:!1})))];this.votSubtitlesSelect.updateItems(t),await this.changeSubtitlesLang(t[0].value)}async updateSubtitles(){if(await this.changeSubtitlesLang("disabled"),!this.videoData.videoId)return console.error(`[VOT] ${s.j.getDefault("VOTNoVideoIDFound")}`),this.subtitlesList=[],this.subtitlesListVideoId=null,this.votButton.container.hidden=!0,void await this.updateSubtitlesLangSelect();this.votButton.container.hidden=!1,this.subtitlesListVideoId!==this.videoData.videoId&&(this.subtitlesList=await nt(this.site,this.videoData.videoId,this.videoData.detectedLanguage),this.subtitlesList?this.subtitlesListVideoId=this.videoData.videoId:await this.changeSubtitlesLang("disabled"),await this.updateSubtitlesLangSelect())}getVideoVolume(){let t=this.video?.volume;return["youtube","googledrive"].includes(this.site.host)&&(t=J.A.getVideoVolume()??t),t}setVideoVolume(t){if(["youtube","googledrive"].includes(this.site.host)){if(J.A.setVideoVolume(t))return}this.video.volume=t}isMuted(){return["youtube","googledrive"].includes(this.site.host)?J.A.isMuted():this.video?.muted}syncVideoVolumeSlider(){const t=this.isMuted()?0:100*this.getVideoVolume(),e=Math.round(t);this.votVideoVolumeSlider.input.value=e,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`,L.updateSlider(this.votVideoVolumeSlider.input),1===this.data.syncVolume&&(this.tempOriginalVolume=Number(e))}setSelectMenuValues(t,e){this.votTranslationLanguageSelect.fromSelect.setTitle(s.j.get("langs")[t]),this.votTranslationLanguageSelect.toSelect.setTitle(s.j.get("langs")[e]),this.votTranslationLanguageSelect.fromSelect.setSelected(t),this.votTranslationLanguageSelect.toSelect.setSelected(e),console.log(`[VOT] Set translation from ${t} to ${e}`),this.videoData.detectedLanguage=t,this.videoData.responseLanguage=e}syncVolumeWrapper(t,e){const o="translation"===t?this.votVideoVolumeSlider:this.votVideoTranslationVolumeSlider,n=Number(o.input.value),i=function(t,e,o,n){let i=e;return e>n?(i=o+(e-n),i=i>100?100:Math.max(i,0),t.volume=i/100):e100?100:Math.max(i,0),t.volume=i/100),i}("translation"===t?this.video:this.audio,e,n,"translation"===t?this.tempVolume:this.tempOriginalVolume);o.input.value=i,o.label.querySelector("strong").innerHTML=`${i}%`,L.updateSlider(o.input),this.tempOriginalVolume="translation"===t?i:e,this.tempVolume="translation"===t?e:i}async getVideoData(){const t={translationHelp:null,isStream:!1,duration:this.video?.duration||343,videoId:(0,P.jI)(this.site.host,this.video),detectedLanguage:this.translateFromLang,responseLanguage:this.translateToLang};if(!t.videoId)return this.ytData={},t;if(window.location.hostname.includes("youtube.com"))this.ytData=await J.A.getVideoData(),t.isStream=this.ytData.isLive,this.ytData.title&&(t.detectedLanguage=this.ytData.detectedLanguage,t.responseLanguage=this.translateToLang);else if(window.location.hostname.includes("rutube")||window.location.hostname.includes("ok.ru")||window.location.hostname.includes("my.mail.ru"))t.detectedLanguage="ru";else if(["youku"].includes(this.site.host))t.detectedLanguage="zh";else if(["vk"].includes(this.site.host)){const e=document.getElementsByTagName("track")?.[0]?.srclang;t.detectedLanguage=e||"auto"}else if(window.location.hostname.includes("coursera.org")){const e=await lt.getVideoData(this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else if(window.location.hostname.includes("coursehunter.net")){const e=await at.getVideoData();t.translationHelp={url:e.url},t.duration=e.duration||t.duration}else if(window.location.hostname.includes("banned.video")){const e=await bt.getVideoData(t.videoId);t.translationHelp={url:e.url},t.duration=e.duration||t.duration,t.isStream=e.live}else if(window.location.hostname.includes("weverse.io")){const e=await kt.getVideoData();t.detectedLanguage="ko",e&&(t.translationHelp={url:e.url},t.duration=e.duration||t.duration)}else if(window.location.hostname.includes("udemy.com")){const e=await mt.getVideoData(this.data.udemyData,this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else["bilibili","piped","invidious","bitchute","rumble","peertube","dailymotion","trovo","yandexdisk","coursehunter","directlink"].includes(this.site.host)&&(t.detectedLanguage="auto");return t}videoValidator(){if(["youtube","ok.ru","vk"].includes(this.site.host)&&(C.A.log("VideoValidator videoData: ",this.videoData),1===this.data.dontTranslateYourLang&&this.videoData.detectedLanguage===this.data.dontTranslateLanguage))throw new A("VOTDisableFromYourLang");if(!this.videoData.isStream&&this.videoData.duration>14400)throw new A("VOTVideoIsTooLong");return!0}lipSync(t=!1){if(C.A.log("lipsync video",this.video),this.video)if(this.audio.currentTime=this.video.currentTime,this.audio.playbackRate=this.video.playbackRate,t)if("play"!=t)["pause","stop","waiting"].includes(t)&&(C.A.log(`lipsync mode is ${t}`),this.audio.pause()),"playing"==t&&(C.A.log("lipsync mode is playing"),this.audio.play());else{C.A.log("lipsync mode is play");const t=this.audio.play();void 0!==t&&t.catch((t=>{if(console.error("[VOT]",t),"NotAllowedError"===t.name)throw this.transformBtn("error",s.j.get("grantPermissionToAutoPlay")),new A("grantPermissionToAutoPlay");if("NotSupportedError"===t.name)throw this.transformBtn("error",Ot.includes(window.location.hostname)?s.j.get("neededAdditionalExtension"):s.j.get("audioFormatNotSupported")),Ot.includes(window.location.hostname)?new A("neededAdditionalExtension"):new A("audioFormatNotSupported")}))}else C.A.log("lipsync mode is not set")}handleVideoEvent(t){C.A.log(`video ${t.type}`),this.lipSync(t.type)}stopTranslate(){for(const t of Et)this.video.removeEventListener(t,this.handleVideoEventBound);this.audio.pause(),this.audio.src="",this.audio.removeAttribute("src"),this.votVideoVolumeSlider.container.hidden=!0,this.votVideoTranslationVolumeSlider.container.hidden=!0,this.votDownloadButton.hidden=!0,this.downloadTranslationUrl=null,this.transformBtn("none",s.j.get("translateVideo")),C.A.log(`Volume on start: ${this.volumeOnStart}`),this.volumeOnStart&&this.setVideoVolume(this.volumeOnStart),this.volumeOnStart="",clearInterval(this.streamPing),clearTimeout(this.autoRetry),this.hls?.destroy(),this.hls=(0,P.CK)(),this.firstSyncVolume=!0}async translateExecutor(t){C.A.log("Run translateFunc",t),this.translateFunc(t,this.videoData.isStream,this.videoData.detectedLanguage,this.videoData.responseLanguage,this.videoData.translationHelp)}async updateTranslationErrorMsg(t){const e=s.j.get("translationTake"),o=s.j.get("VOTTranslatingError"),n=s.j.lang;if("VOTLocalizedError"===t?.name)this.transformBtn("error",t.localizedMessage);else if(1!==this.data.translateAPIErrors||t.includes(e)||"ru"===n)this.transformBtn("error",t);else{const e=await(0,Ct.Tl)(t,"ru",n);this.transformBtn("error",o),this.transformBtn("error",e)}}afterUpdateTranslation(t){this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,1===this.data.autoSetVolumeYandexStyle&&(this.votVideoVolumeSlider.input.value=100*this.data.autoVolume,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=100*this.data.autoVolume+"%",L.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=t}updateTranslation(t){if(this.audio.src=t,1===this.data.audioProxy&&t.startsWith("https://vtrans.s3-private.mds.yandex.net/tts/prod/")){const e=t.replace("https://vtrans.s3-private.mds.yandex.net/tts/prod/",""),o=`https://${this.data.proxyWorkerHost}/video-translation/audio-proxy/${e}`;console.log(`[VOT] Audio proxied via ${o}`),this.audio.src=o}if(this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),"twitter"===this.site.host)document.querySelector('button[data-testid="app-bar-back"][role="button"]').addEventListener("click",this.stopTranslationBound);this.video&&!this.video.paused&&this.lipSync("play");for(const t of Et)this.video.addEventListener(t,this.handleVideoEventBound);this.transformBtn("success",s.j.get("disableTranslate")),this.afterUpdateTranslation(t)}translateFunc(t,e,o,n,i){console.log("[VOT] Video Data: ",this.videoData);const a=i?.url?i.url:`${this.site.url}${t}`;if(C.A.log("Run videoValidator"),this.videoValidator(),e)return C.A.log("Executed stream translation"),void function(t,e,o,n){C.A.log(`Translate stream (url: ${t}, requestLang: ${e}, responseLang: ${o})`),Z(t,e,o,((t,e)=>{if(C.A.log("[exec callback] Requesting stream translation"),!t)return void n(!1,s.j.get("requestTranslationFailed"));const o=H.decodeStreamResponse(e);switch(console.log("[VOT] Stream Translation response: ",o),o.interval){case 10:n(!1,o.interval,s.j.get("translationTakeFewMinutes"));break;case 20:n(!0,o.interval,o||s.j.get("audioNotReceived"));break;case 0:n(!1,o.interval,s.j.get("streamNoConnectionToServer"))}}))}(a,o,n,(async(a,r,l)=>{if(C.A.log("[exec callback] translateStream callback"),(0,P.jI)(this.site.host,this.video)!==t)return;if(!a||!l.translatedInfo)return await this.updateTranslationErrorMsg(l),void(10===r&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,o,n,i)),1e3*r)));this.transformBtn("success",s.j.get("disableTranslate")),console.log(l);const d=l.pingId;C.A.log(`Stream pingId: ${d}`),this.streamPing=setInterval((async()=>await Y(d,(t=>C.A.log("Stream ping result: ",t)))),1e3*r),C.A.log(l.translatedInfo.url);const c=`https://${this.data.m3u8ProxyHost}/?all=yes&origin=${encodeURIComponent("https://strm.yandex.ru")}&referer=${encodeURIComponent("https://strm.yandex.ru")}&url=${encodeURIComponent(l.translatedInfo.url)}`;if(C.A.log(c),this.hls)this.hls.on(Hls.Events.MEDIA_ATTACHED,(function(){C.A.log("audio and hls.js are now bound together !")})),this.hls.on(Hls.Events.MANIFEST_PARSED,(function(t){C.A.log("manifest loaded, found "+t?.levels?.length+" quality level")})),this.hls.loadSource(c),this.hls.attachMedia(this.audio),this.hls.on(Hls.Events.ERROR,(function(t){if(t.fatal)switch(t.type){case Hls.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover"),this.hls.recoverMediaError();break;case Hls.ErrorTypes.NETWORK_ERROR:console.error("fatal network error encountered",t);break;default:this.hls.destroy()}})),C.A.log(this.hls);else{if(!this.audio.canPlayType("application/vnd.apple.mpegurl"))throw new A("audioFormatNotSupported");this.audio.src=c}if("youtube"===this.site.host&&J.A.videoSeek(this.video,10),this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),this.video.src||this.video.currentSrc||this.video.srcObject){this.video&&!this.video.paused&&this.lipSync("play");for(const t of Et)this.video.addEventListener(t,this.handleVideoEventBound);this.afterUpdateTranslation(c)}else this.stopTranslation()}));if(["udemy","coursera"].includes(this.site.host)&&!i)throw new A("VOTTranslationHelpNull");const r=this.videoTranslations.find((e=>e.videoId===t&&e.expires>Date.now()/1e3&&e.from===o&&e.to===n));if(r)return this.updateTranslation(r.url),void C.A.log("[translateFunc] A cached translate was received");const l=this.subtitlesList.some((t=>"yandex"===t.source))?2e4:3e4;!function(t,e,o,n,i,a){C.A.log(`Translate video (url: ${t}, duration: ${e}, requestLang: ${o}, responseLang: ${n})`),C.A.log("translationHelp:",i),Bt?C.A.log("translationPanding return"):(Bt=!0,K(t,e,o,n,i,((t,e)=>{if(Bt=!1,C.A.log("[exec callback] Requesting video translation"),!t)return void a(!1,s.j.get("requestTranslationFailed"));const o=H.decodeTranslationResponse(e);switch(console.log("[VOT] Translation response: ",o),o.status){case 0:a(!1,o.message);break;case 1:case 5:a(!!o.url,o.url||s.j.get("audioNotReceived"));break;case 2:a(!1,o.remainingTime?(0,P.ox)(o.remainingTime):s.j.get("translationTakeFewMinutes"));break;case 3:case 6:a(!1,s.j.get("videoBeingTranslated"))}})))}(a,this.videoData.duration,o,n,i,(async(a,r)=>{if(C.A.log("[exec callback] translateVideo callback"),(0,P.jI)(this.site.host,this.video)===t){if(!a)return await this.updateTranslationErrorMsg(r),r.includes(s.j.get("translationTake"))&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,o,n,i)),l)),void console.error("[VOT]",r);this.updateTranslation(r),this.subtitlesList.some((t=>"yandex"===t.source&&t.language===this.videoData.responseLanguage))||(this.subtitlesList=await nt(this.site,this.videoData.videoId,this.videoData.detectedLanguage),await this.updateSubtitlesLangSelect()),this.videoTranslations.push({videoId:t,from:o,to:n,url:r,expires:Date.now()/1e3+this.videoTranslationTTL})}}))}stopTranslation(){this.stopTranslate(),this.syncVideoVolumeSlider()}async handleSrcChanged(){C.A.log("[VideoHandler] src changed",this),this.firstPlay=!0,this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage);const t=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=t,t&&(this.votMenu.container.hidden=t),this.site.selector||(this.container=this.video.parentElement),this.container.contains(this.votButton.container)||(this.container.appendChild(this.votButton.container),this.container.appendChild(this.votMenu.container)),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),this.translateToLang=this.data.responseLanguage??"ru"}async release(){C.A.log("[VideoHandler] release"),this.initialized=!1,this.releaseExtraEvents(),this.subtitlesWidget.release(),this.votButton.container.remove(),this.votMenu.container.remove()}}const jt=new class{constructor(){this.videoCache=new Set,this.onVideoAdded=new Mt,this.onVideoRemoved=new Mt,this.observer=new MutationObserver((t=>{window.requestIdleCallback((()=>{for(let e=0;e{for(let e=0;e=3}(t)?requestAnimationFrame(o):e(t)}()}(t,(t=>{this.handleVideoAdded(t)}))}handleVideoAdded=t=>{this.onVideoAdded.dispatch(t)};handleVideoRemoved=t=>{document.contains(t)||(this.videoCache.delete(t),this.onVideoRemoved.dispatch(t))}},Dt=new WeakMap;function _t(t,e){if(t.shadowRoot){let o=t.selector?Array.from(document.querySelectorAll(t.selector)).find((t=>t.shadowRoot.contains(e))):e.parentElement;return o&&o.shadowRoot?o.parentElement:o}{const o=Pt.browser.version.split(".")[0];if(t.selector?.includes(":not")&&t.selector?.includes("*")&&o&&("Chrome"===Pt.browser.name&&Number(o)<88||"Firefox"===Pt.browser.name&&Number(o)<84)){const o=t.selector.split(" *")[0];return o?Array.from(document.querySelectorAll(o)).find((t=>t.contains(e))):e.parentElement}return t.selector?Array.from(document.querySelectorAll(t.selector)).find((t=>t.contains(e))):e.parentElement}}(async function(){C.A.log("Loading extension..."),await s.j.update(),C.A.log(`Selected menu language: ${s.j.lang}`),C.A.log("Extension compatibility passed..."),jt.onVideoAdded.addListener((t=>{for(const e of function(){const t=window.location.hostname,e=new URL(window.location),o=o=>o instanceof RegExp?o.test(t):"string"==typeof o?t.includes(o):"function"==typeof o&&o(e);return Tt.filter((t=>(Array.isArray(t.match)?t.match.some(o):o(t.match))&&t.host&&t.url))}()){if(!e)continue;let o=_t(e,t);if(o&&(("rumble"!==e.host||t.style.display)&&(["peertube","directlink"].includes(e.host)&&(e.url=window.location.origin),!Dt.has(t)))){Dt.set(t,new Ft(t,o,e));break}}})),jt.onVideoRemoved.addListener((async t=>{Dt.has(t)&&(await Dt.get(t).release(),Dt.delete(t))})),jt.enable()})().catch((t=>{console.error("[VOT]",t)}))})()})(); \ No newline at end of file +(()=>{var t={"./node_modules/bowser/es5.js":function(t){t.exports=function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=90)}({17:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n=o(18),i=function(){function t(){}return t.getFirstMatch=function(t,e){var o=e.match(t);return o&&o.length>0&&o[1]||""},t.getSecondMatch=function(t,e){var o=e.match(t);return o&&o.length>1&&o[2]||""},t.matchAndReturnConst=function(t,e,o){if(t.test(e))return o},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,o,n){void 0===n&&(n=!1);var i=t.getVersionPrecision(e),a=t.getVersionPrecision(o),r=Math.max(i,a),s=0,l=t.map([e,o],(function(e){var o=r-t.getVersionPrecision(e),n=e+new Array(o+1).join(".0");return t.map(n.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(n&&(s=r-Math.min(i,a)),r-=1;r>=s;){if(l[0][r]>l[1][r])return 1;if(l[0][r]===l[1][r]){if(r===s)return 0;r-=1}else if(l[0][r]1?i-1:0),r=1;r0){var r=Object.keys(o),l=s.default.find(r,(function(t){return e.isOS(t)}));if(l){var d=this.satisfies(o[l]);if(void 0!==d)return d}var c=s.default.find(r,(function(t){return e.isPlatform(t)}));if(c){var u=this.satisfies(o[c]);if(void 0!==u)return u}}if(a>0){var h=Object.keys(i),p=s.default.find(h,(function(t){return e.isBrowser(t,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var o=this.getBrowserName().toLowerCase(),n=t.toLowerCase(),i=s.default.getBrowserTypeByAlias(n);return e&&i&&(n=i.toLowerCase()),n===o},e.compareVersion=function(t){var e=[0],o=t,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(o=t.substr(1),"="===t[1]?(n=!0,o=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?o=t.substr(1):"~"===t[0]&&(n=!0,o=t.substr(1)),e.indexOf(s.default.compareVersions(i,o,n))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=d,t.exports=e.default},92:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=/version\/(\d+(\.?_?\d+)+)/i,r=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},o=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},o=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},o=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},o=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},o=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},o=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},o=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},o=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},o=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},o=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},o=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},o=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return o&&(e.version=o),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},o=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},o=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},o=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},o=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},o=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},o=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},o=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},o=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},o=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},o=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},o=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},o=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e={name:"Android Browser"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(e,t),version:i.default.getSecondMatch(e,t)}}}];e.default=r,t.exports=e.default},93:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/Roku\/DVP/],describe:function(t){var e=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:a.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),o=i.default.getWindowsVersionName(e);return{name:a.OS_MAP.Windows,version:e,versionName:o}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:a.OS_MAP.iOS},o=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return o&&(e.version=o),e}},{test:[/macintosh/i],describe:function(t){var e=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),o=i.default.getMacOSVersionName(e),n={name:a.OS_MAP.MacOS,version:e};return o&&(n.versionName=o),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),o=i.default.getAndroidVersionName(e),n={name:a.OS_MAP.Android,version:e};return o&&(n.versionName=o),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),o={name:a.OS_MAP.WebOS};return e&&e.length&&(o.version=e),o}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:a.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.PlayStation4,version:e}}}];e.default=r,t.exports=e.default},94:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",o={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(o.model=e),o}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),o=t.test(/like (ipod|iphone)/i);return e&&!o},describe:function(t){var e=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];e.default=r,t.exports=e.default},95:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:a.ENGINE_MAP.Blink};var e=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:a.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:a.ENGINE_MAP.Trident},o=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:a.ENGINE_MAP.Presto},o=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=t.test(/gecko/i),o=t.test(/like gecko/i);return e&&!o},describe:function(t){var e={name:a.ENGINE_MAP.Gecko},o=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:a.ENGINE_MAP.WebKit},o=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}}];e.default=r,t.exports=e.default}})},"./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss":(t,e,o)=>{"use strict";o.d(e,{A:()=>s});var n=o("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),i=o.n(n),a=o("./node_modules/css-loader/dist/runtime/api.js"),r=o.n(a)()(i());r.push([t.id,'.vot-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:none;border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-ontheme));background-color:rgb(var(--vot-helper-theme));box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer;transition:box-shadow .2s}.vot-button[hidden]{display:none !important}.vot-button::-moz-focus-inner{border:none}.vot-button::before,.vot-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-button::before{background-color:rgb(var(--vot-helper-ontheme));transition:opacity .2s}.vot-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-button:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.vot-button:hover::before{opacity:.08}.vot-button:active{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.vot-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s}.vot-button:disabled{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.12);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);box-shadow:none;cursor:initial}.vot-button:disabled::before,.vot-button:disabled::after{opacity:0}.vot-outlined-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:solid 1px;border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.24);border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:34px;outline:none;cursor:pointer}.vot-outlined-button[hidden]{display:none !important}.vot-outlined-button::-moz-focus-inner{border:none}.vot-outlined-button::before,.vot-outlined-button::after{content:"";position:absolute;border-radius:3px;top:0;right:0;bottom:0;left:0;opacity:0}.vot-outlined-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-outlined-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-outlined-button:hover::before{opacity:.04}.vot-outlined-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-outlined-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-outlined-button:disabled::before,.vot-outlined-button:disabled::after{opacity:0}.vot-text-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:4px;padding:0 8px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-text-button[hidden]{display:none !important}.vot-text-button::-moz-focus-inner{border:none}.vot-text-button::before,.vot-text-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-text-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-text-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-text-button:hover::before{opacity:.04}.vot-text-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-text-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-text-button:disabled::before,.vot-text-button:disabled::after{opacity:0}.vot-icon-button{--vot-helper-onsurface: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:50%;padding:0;width:36px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;fill:var(--vot-helper-onsurface);color:var(--vot-helper-onsurface);background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-icon-button[hidden]{display:none !important}.vot-icon-button::-moz-focus-inner{border:none}.vot-icon-button::before,.vot-icon-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-icon-button::before{background-color:var(--vot-helper-onsurface);transition:opacity .2s}.vot-icon-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity .3s,background-size .4s}.vot-icon-button:hover::before{opacity:.04}.vot-icon-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s,opacity 0s}.vot-icon-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);fill:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-icon-button:disabled::before,.vot-icon-button:disabled::after{opacity:0}.vot-textfield{--vot-helper-theme: rgb( var(--vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243)) ) !important;--vot-helper-safari1: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.38 ) !important;--vot-helper-safari2: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari3: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;position:relative !important;display:inline-block;padding-top:6px !important;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-textfield[hidden]{display:none !important}.vot-textfield>input,.vot-textfield>textarea{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:0 !important;border-style:solid !important;border-width:1px !important;border-color:rgba(0,0,0,0) var(--vot-helper-safari2) var(--vot-helper-safari2) !important;border-radius:4px !important;padding:15px 13px 15px !important;width:100% !important;height:inherit !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;-webkit-text-fill-color:currentColor !important;background-color:rgba(0,0,0,0) !important;box-shadow:inset 1px 0 rgba(0,0,0,0),inset -1px 0 rgba(0,0,0,0),inset 0 -1px rgba(0,0,0,0) !important;font-family:inherit !important;font-size:inherit !important;line-height:inherit !important;caret-color:var(--vot-helper-theme) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input:not(:focus):placeholder-shown,.vot-textfield>textarea:not(:focus):placeholder-shown{border-top-color:var(--vot-helper-safari2) !important}.vot-textfield>input+span,.vot-textfield>textarea+span{position:absolute !important;top:0 !important;left:0 !important;display:flex !important;width:100% !important;max-height:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;font-size:75% !important;line-height:15px !important;cursor:text !important;transition:color .2s,font-size .2s,line-height .2s !important;pointer-events:none !important}.vot-textfield>input:not(:focus):placeholder-shown+span,.vot-textfield>textarea:not(:focus):placeholder-shown+span{font-size:inherit !important;line-height:68px !important}.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{content:"" !important;display:block !important;-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin-top:6px !important;border-top:solid 1px var(--vot-helper-safari2) !important;min-width:10px !important;height:8px !important;pointer-events:none !important;box-shadow:inset 0 1px rgba(0,0,0,0) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input+span::before,.vot-textfield>textarea+span::before{margin-right:4px !important;border-left:solid 1px rgba(0,0,0,0) !important;border-radius:4px 0 !important}.vot-textfield>input+span::after,.vot-textfield>textarea+span::after{flex-grow:1 !important;margin-left:4px !important;border-right:solid 1px rgba(0,0,0,0) !important;border-radius:0 4px !important}.vot-textfield>input:not(:focus):placeholder-shown+span::before,.vot-textfield>input:not(:focus):placeholder-shown+span::after,.vot-textfield>textarea:not(:focus):placeholder-shown+span::before,.vot-textfield>textarea:not(:focus):placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}.vot-textfield:hover>input,.vot-textfield:hover>textarea{border-color:rgba(0,0,0,0) var(--vot-helper-safari3) var(--vot-helper-safari3) !important}.vot-textfield:hover>input+span::before,.vot-textfield:hover>input+span::after,.vot-textfield:hover>textarea+span::before,.vot-textfield:hover>textarea+span::after{border-top-color:var(--vot-helper-safari3) !important}.vot-textfield:hover>input:not(:focus):placeholder-shown,.vot-textfield:hover>textarea:not(:focus):placeholder-shown{border-color:var(--vot-helper-safari3) !important}.vot-textfield>input:focus,.vot-textfield>textarea:focus{border-color:rgba(0,0,0,0) var(--vot-helper-theme) var(--vot-helper-theme) !important;box-shadow:inset 1px 0 var(--vot-helper-theme),inset -1px 0 var(--vot-helper-theme),inset 0 -1px var(--vot-helper-theme) !important;outline:none !important}.vot-textfield>input:focus+span,.vot-textfield>textarea:focus+span{color:var(--vot-helper-theme) !important}.vot-textfield>input:focus+span::before,.vot-textfield>input:focus+span::after,.vot-textfield>textarea:focus+span::before,.vot-textfield>textarea:focus+span::after{border-top-color:var(--vot-helper-theme) !important;box-shadow:inset 0 1px var(--vot-helper-theme) !important}.vot-textfield>input:disabled,.vot-textfield>input:disabled+span,.vot-textfield>textarea:disabled,.vot-textfield>textarea:disabled+span{border-color:rgba(0,0,0,0) var(--vot-helper-safari1) var(--vot-helper-safari1) !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;pointer-events:none !important}.vot-textfield>input:disabled+span::before,.vot-textfield>input:disabled+span::after,.vot-textfield>textarea:disabled+span::before,.vot-textfield>textarea:disabled+span::after{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown,.vot-textfield>input:disabled:placeholder-shown+span,.vot-textfield>textarea:disabled:placeholder-shown,.vot-textfield>textarea:disabled:placeholder-shown+span{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown+span::before,.vot-textfield>input:disabled:placeholder-shown+span::after,.vot-textfield>textarea:disabled:placeholder-shown+span::before,.vot-textfield>textarea:disabled:placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}@media not all and (min-resolution: 0.001dpcm){@supports(-webkit-appearance: none){.vot-textfield>input,.vot-textfield>input+span,.vot-textfield>textarea,.vot-textfield>textarea+span,.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{transition-duration:.1s !important}}}.vot-checkbox{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );z-index:0;position:relative;display:inline-block;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-checkbox[hidden]{display:none !important}.vot-checkbox>input{appearance:none;-moz-appearance:none;-webkit-appearance:none;z-index:10000;position:absolute;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:3px 1px;border:solid 2px;background:rgba(0,0,0,0);border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6);border-radius:2px;width:18px;height:18px;outline:none;cursor:pointer;transition:border-color .2s,background-color .2s}.vot-checkbox>input+span{display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding-left:30px;width:inherit;cursor:pointer;font-weight:normal}.vot-checkbox>input+span::before{content:"";position:absolute;left:-10px;top:-8px;display:block;border-radius:50%;width:40px;height:40px;background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0));opacity:0;transform:scale(1);pointer-events:none;transition:opacity .3s,transform .2s}.vot-checkbox>input+span::after{content:"";z-index:10000;display:block;position:absolute;top:3px;left:1px;-webkit-box-sizing:content-box !important;-moz-box-sizing:content-box !important;box-sizing:content-box !important;width:10px;height:5px;border:solid 2px rgba(0,0,0,0);border-right-width:0;border-top-width:0;pointer-events:none;transform:translate(3px, 4px) rotate(-45deg);transition:border-color .2s}.vot-checkbox>input:checked,.vot-checkbox>input:indeterminate{border-color:rgb(var(--vot-helper-theme));background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::before,.vot-checkbox>input:indeterminate+span::before{background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::after,.vot-checkbox>input:indeterminate+span::after{border-color:rgb(var(--vot-helper-ontheme, 255, 255, 255))}.vot-checkbox>input:indeterminate+span::after{border-left-width:0;transform:translate(4px, 3px)}.vot-checkbox:hover>input+span::before{opacity:.04}.vot-checkbox:active>input,.vot-checkbox:active:hover>input{border-color:rgb(var(--vot-helper-theme))}.vot-checkbox:active>input:checked{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6)}.vot-checkbox:active>input+span::before{opacity:1;transform:scale(0);transition:transform 0s,opacity 0s}.vot-checkbox>input:disabled{border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled:checked,.vot-checkbox>input:disabled:indeterminate{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38)}.vot-checkbox>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled+span::before{opacity:0;transform:scale(0)}.vot-slider{--vot-safari-helper1: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.04 ) !important;--vot-safari-helper2: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.12 ) !important;--vot-safari-helper3: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.16 ) !important;--vot-safari-helper4: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.24 ) !important;display:inline-block;width:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;font-family:var(--vot-font, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-slider[hidden]{display:none !important}.vot-slider>input{-webkit-appearance:none !important;appearance:none !important;position:relative !important;top:24px !important;display:block !important;margin:0 0 -36px !important;width:100% !important;height:36px !important;background-color:rgba(0,0,0,0) !important;cursor:pointer !important}.vot-slider>input:last-child{position:static !important;margin:0 !important}.vot-slider>span{display:inline-block !important;margin-bottom:36px !important}.vot-slider>input:disabled{cursor:default !important;opacity:.38 !important}.vot-slider>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input::-webkit-slider-runnable-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-webkit-slider-thumb{margin:0 !important;appearance:none !important;-webkit-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper1) !important}.vot-slider>input:active::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper4) !important}.vot-slider>input:disabled::-webkit-slider-runnable-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-webkit-slider-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;color:rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-range-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-moz-range-thumb{appearance:none !important;-moz-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider>input::-moz-range-progress{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider:hover>input:hover::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-moz-range-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-moz-range-progress{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important}.vot-slider>input:disabled::-moz-range-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-focus-outer{border:none !important}.vot-slider>input:focus{outline:none !important}.vot-slider>input::-ms-track{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:17px 0 !important;border:none !important;border-radius:1px !important;padding:0 17px !important;width:100% !important;height:2px !important;background-color:rgba(0,0,0,0) !important}.vot-slider>input::-ms-fill-lower{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider>input::-ms-fill-upper{border-radius:1px !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-ms-thumb{appearance:none !important;margin:0 17px !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-ms-fill-lower{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-ms-fill-upper{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;opacity:.38 !important}.vot-slider>input:disabled::-ms-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::before{content:"" !important;display:block !important;position:absolute !important;width:calc(100%*var(--vot-progress, 0)) !important;height:2px !important;top:calc(50% - 1px) !important;background:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0) !important;--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87) !important;--vot-helper-safari1: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari2: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;display:flex;align-items:center;justify-content:space-between;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;line-height:1.5;text-align:start;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-select[hidden]{display:none !important}.vot-select-label{font-size:16px}.vot-select-outer{display:flex;align-items:center;justify-content:space-between;max-width:120px;width:120px;padding:0 5px;border-style:solid !important;border-width:1px !important;border-color:var(--vot-helper-safari1) !important;border-radius:4px !important;cursor:pointer;transition:border .2s !important}.vot-select-outer:hover{border-color:var(--vot-helper-safari2) !important}.vot-select-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vot-select-arrow-icon{width:20px;height:32px;display:flex;justify-content:center;align-items:center}.vot-select-content-list{display:flex;flex-direction:column}.vot-select-content-list .vot-select-content-item{padding:5px 10px;border-radius:8px;cursor:pointer}.vot-select-content-list .vot-select-content-item:not([inert]):hover{background-color:#2a2c31}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]{color:rgb(var(--vot-primary-rgb, 33, 150, 243));background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.2)}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]:hover{background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.1) !important}.vot-select-content-list .vot-select-content-item[data-vot-disabled=true]{cursor:default}.vot-select-content-list .vot-select-content-item[hidden]{display:none !important}.vot-header{color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-weight:bold;line-height:1.5;text-align:start}.vot-header[hidden]{display:none !important}.vot-header:not(:first-child){padding-top:8px}.vot-header-level-1{font-size:2em}.vot-header-level-2{font-size:1.5em}.vot-header-level-3{font-size:1.17em}.vot-header-level-4{font-size:1em}.vot-header-level-5{font-size:.83em}.vot-header-level-6{font-size:.67em}.vot-info{display:flex;color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-info[hidden]{display:none !important}.vot-info>:not(:first-child){color:rgba(var(--vot-helper-onsurface-rgb), 0.5);flex:1;margin-left:8px}.vot-lang-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);display:flex;align-items:center;justify-content:space-between;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-lang-select[hidden]{display:none !important}.vot-lang-select-icon{width:32px;height:32px;display:flex;justify-content:center;align-items:center}.vot-segmented-button{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:5rem;transform:translate(-50%);user-select:none;display:flex;align-items:center;height:32px;max-width:100vw;background:rgb(var(--vot-surface-rgb, 255, 255, 255));color:var(--vot-helper-theme);fill:var(--vot-helper-theme);border-radius:4px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;cursor:default;transition:opacity .5s;z-index:10000}.vot-segmented-button[hidden]{display:none !important}.vot-segmented-button *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-segmented-button .vot-separator{width:1px;height:50%;background:rgba(var(--vot-helper-theme-rgb), 0.1)}.vot-segmented-button .vot-separator[hidden]{display:none !important}.vot-segmented-button .vot-segment,.vot-segmented-button .vot-segment-only-icon{position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;height:100%;padding:0 8px;background-color:rgba(0,0,0,0);color:inherit;transition:background-color 100ms ease-in-out;border:none}.vot-segmented-button .vot-segment[hidden],.vot-segmented-button [hidden].vot-segment-only-icon{display:none !important}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before,.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before{background-color:rgb(var(--vot-helper-theme-rgb));transition:opacity .2s}.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-segmented-button .vot-segment:hover::before,.vot-segmented-button .vot-segment-only-icon:hover::before{opacity:.04}.vot-segmented-button .vot-segment:active::after,.vot-segmented-button .vot-segment-only-icon:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-segmented-button .vot-segment-only-icon{min-width:32px;padding:0}.vot-segmented-button .vot-segment-label{margin-left:8px;white-space:nowrap}.vot-segmented-button[data-status=success] .vot-translate-button{color:rgb(var(--vot-primary-rgb, 33, 150, 243));fill:rgb(var(--vot-primary-rgb, 33, 150, 243))}.vot-segmented-button[data-status=error] .vot-translate-button{color:#f28b82;fill:#f28b82}.vot-segmented-button[data-translating=true] #vot-translating-icon{display:block !important}.vot-segmented-button[data-translating=true] #vot-translate-icon{display:none !important}.vot-segmented-button[data-direction=column]{flex-direction:column;height:fit-content}.vot-segmented-button[data-direction=column] .vot-segment-label{display:none}.vot-segmented-button[data-direction=column]>.vot-segment-only-icon,.vot-segmented-button[data-direction=column]>.vot-segment{padding:8px}.vot-segmented-button[data-direction=column] .vot-separator{height:1px;width:50%}.vot-segmented-button[data-position=left]{left:50px;top:12.5vh}.vot-segmented-button[data-position=right]{left:auto;right:0;top:12.5vh}.vot-segmented-button svg{width:fit-content}.vot-menu{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:calc(5rem + 32px + 16px);user-select:none;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);border-radius:8px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;min-width:300px;cursor:default;z-index:10000;visibility:visible;opacity:1;transform-origin:top;transform:translate(-50%) scale(1);transition:opacity .3s,transform .1s}.vot-menu *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-menu[hidden]{pointer-events:none;display:block !important;visibility:hidden;opacity:0;transform:translate(-50%) scale(0)}.vot-menu-content-wrapper{display:flex;flex-direction:column;min-height:100px;max-height:calc(var(--vot-container-height, 75vh) - (5rem + 32px + 16px)*2);overflow:auto}.vot-menu-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-menu-header-container:empty{padding:0 0 16px 0}.vot-menu-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-menu-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0;text-align:start}.vot-menu-title{flex:1;font-size:16px;line-height:1;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 16px;gap:8px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar,.vot-menu-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-menu-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-footer-container:empty{padding:16px 0 0 0}.vot-menu[data-position=left]{left:240px;top:12.5vh}.vot-menu[data-position=right]{right:-80px;left:auto;top:12.5vh}.vot-dialog-container{visibility:visible;position:absolute;z-index:10000}.vot-dialog-container[hidden]{display:block !important;pointer-events:none;visibility:hidden}.vot-dialog-container *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-dialog-backdrop{background-color:rgba(0,0,0,.6);position:fixed;top:0;right:0;bottom:0;left:0;opacity:1;transition:opacity .3s}[hidden]>.vot-dialog-backdrop{pointer-events:none;opacity:0}.vot-dialog{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);display:block;position:fixed;top:50%;bottom:50%;max-width:initial;max-height:initial;width:min(var(--vot-dialog-width, 512px),100%);height:fit-content;inset-inline-start:0px;inset-inline-end:0px;inset-block-start:0px;inset-block-end:0px;border-radius:8px;margin:auto;padding:0;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);box-shadow:0 0 16px rgba(0,0,0,.12),0 16px 16px rgba(0,0,0,.24);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;user-select:none;visibility:visible;overflow:auto;overflow-y:hidden;opacity:1;transform-origin:center;transform:scale(1);transition:opacity .3s,transform .1s}[hidden]>.vot-dialog{pointer-events:none;opacity:0;transform:scale(0.5);transition:opacity .1s,transform .2s}.vot-dialog-content-wrapper{display:flex;flex-direction:column;max-height:75vh;overflow:auto}.vot-dialog-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-dialog-header-container:empty{padding:0 0 20px 0}.vot-dialog-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-dialog-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0}.vot-dialog-title{flex:1;font-size:115.3846153846%;font-weight:bold;line-height:1;padding-bottom:16px;padding-inline-end:20px;padding-inline-start:20px;padding-top:20px}.vot-dialog-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 20px;gap:16px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar,.vot-dialog-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-dialog-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-dialog-footer-container:empty{padding:20px 0 0 0}.vot-subtitles-widget{display:flex;justify-content:center;align-items:center;position:absolute;width:50%;max-height:100%;min-height:20%;z-index:10000;left:25%;top:75%;pointer-events:none}.vot-subtitles{position:relative;max-width:100%;max-height:100%;width:max-content;background:var(--vot-subtitles-background, rgba(46, 47, 52, 0.8));color:var(--vot-subtitles-color, rgb(227, 227, 227));border-radius:1rem;pointer-events:all;padding:1rem;font-size:2rem;line-height:normal;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vot-subtitles span{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.vot-subtitles .passed{color:var(--vot-subtitles-passed-color, rgb(33, 150, 243))}:root{--vot-font-family: "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system;--vot-primary-rgb: 139, 180, 245;--vot-onprimary-rgb: 32, 33, 36;--vot-surface-rgb: 32, 33, 36;--vot-onsurface-rgb: 227, 227, 227;--vot-subtitles-background: rgba(var(--vot-surface-rgb, 46, 47, 52), 0.8);--vot-subtitles-color: rgb(var(--vot-onsurface-rgb, 227, 227, 227));--vot-subtitles-passed-color: rgb(var(--vot-primary-rgb, 33, 150, 243))}vot-block{display:block}',""]);const s=r},"./node_modules/css-loader/dist/runtime/api.js":t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,i,a){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var s=0;s0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js":t=>{"use strict";t.exports=function(t){return t[1]}},"./node_modules/requestidlecallback-polyfill/index.js":()=>{window.requestIdleCallback=window.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)},window.cancelIdleCallback=window.cancelIdleCallback||function(t){clearTimeout(t)}},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":(t,e,o)=>{"use strict";t.exports=function(t){var e=o.nc;e&&t.setAttribute("nonce",e)}},"./node_modules/style-loader/dist/runtime/styleDomAPI.js":t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(o){!function(t,e,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,i&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var a=o.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,o)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},"./node_modules/style-loader/dist/runtime/styleTagTransform.js":t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},"./node_modules/webpack-monkey/lib/node/deps/style-loader-insertStyleElement.js":t=>{t.exports=function(){return function(t){return t.styleTagTransform=function(t,e){e?.remove(),GM_addStyle(t)},document.createElement("style")}.apply(null,arguments)}},"./src/config/config.js":(t,e,o)=>{"use strict";o.d(e,{Cc:()=>r,JD:()=>s,K2:()=>d,Pm:()=>i,QL:()=>c,S7:()=>a,mE:()=>l,rw:()=>u,se:()=>n});const n="m3u8-proxy.toil.cc",i="vot.toil.cc",a="bt8xH3VOlb4mqf0nqAibnDOoiPlXsisf",r="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 YaBrowser/24.4.0.0 Safari/537.36",s=.15,l="yandex",d="yandex",c={yandex:"https://translate.toil.cc/detect",rustServer:"https://rust-server-531j.onrender.com/detect"},u={yandex:"https://translate.toil.cc/translate",deepl:"https://translate-deepl.toil.cc/translate"}},"./src/config/constants.js":(t,e,o)=>{"use strict";o.d(e,{Ww:()=>i,xm:()=>n});const n=["ru","en","zh","ko","lt","lv","ar","fr","it","es","de","ja"],i=["ru","en","kk"]},"./src/localization/localizationProvider.js":(t,e,o)=>{"use strict";o.d(e,{z:()=>s,j:()=>l});const n=JSON.parse('{"__version__":4,"recommended":"recommended","translateVideo":"Translate video","disableTranslate":"Turn off","translationSettings":"Translation settings","subtitlesSettings":"Subtitles settings","about":"About extension","resetSettings":"Reset settings","videoBeingTranslated":"The video is being translated","videoLanguage":"Video language","translationLanguage":"Translation language","translationTake":"The translation will take","translationTakeMoreThanHour":"The translation will take more than an hour","translationTakeAboutMinute":"The translation will take about a minute","translationTakeFewMinutes":"The translation will take a few minutes","translationTakeApproximatelyMinutes":"The translation will take approximately {0} minutes","translationTakeApproximatelyMinute":"The translation will take approximately {0} minutes","unSupportedExtensionError":"Error! {0} is not supported by this version of the extension!\\n\\nPlease use the cloudflare version of the VOT extension.","requestTranslationFailed":"Failed to request video translation","audioNotReceived":"Audio link not received","grantPermissionToAutoPlay":"Grant permission to autoplay","neededAdditionalExtension":"An additional extension is needed to support this site","audioFormatNotSupported":"The audio format is not supported","VOTAutoTranslate":"Translate on open","VOTDontTranslateYourLang":"Do not translate from my language","VOTVolume":"Video volume","VOTVolumeTranslation":"Translation Volume","VOTAutoSetVolume":"Reduce video volume to ","VOTShowVideoSlider":"Video volume slider","VOTSyncVolume":"Link translation and video volume","VOTAudioProxy":"Proxy received audio","VOTDisableFromYourLang":"You have disabled the translation of the video in your language","VOTLiveNotSupported":"Translation of live streams is not supported","VOTPremiere":"Wait for the premiere to end before translating","VOTVideoIsTooLong":"Video is too long","VOTNoVideoIDFound":"No video ID found","VOTSubtitles":"Subtitles","VOTSubtitlesDisabled":"Disabled","VOTSubtitlesMaxLength":"Subtitles max length","VOTHighlightWords":"Highlight words","VOTTranslatedFrom":"translated from","VOTAutogenerated":"autogenerated","VOTSettings":"VOT Settings","VOTMenuLanguage":"Menu language","VOTAuthors":"Authors","VOTVersion":"Version","VOTLoader":"Loader","VOTBrowser":"Browser","VOTShowPiPButton":"Show PiP button","langs":{"auto":"Auto","af":"Afrikaans","ak":"Akan","sq":"Albanian","am":"Amharic","ar":"Arabic","hy":"Armenian","as":"Assamese","ay":"Aymara","az":"Azerbaijani","bn":"Bangla","eu":"Basque","be":"Belarusian","bho":"Bhojpuri","bs":"Bosnian","bg":"Bulgarian","my":"Burmese","ca":"Catalan","ceb":"Cebuano","zh":"Chinese","zh-Hans":"Chinese (Simplified)","zh-Hant":"Chinese (Traditional)","co":"Corsican","hr":"Croatian","cs":"Czech","da":"Danish","dv":"Divehi","nl":"Dutch","en":"English","eo":"Esperanto","et":"Estonian","ee":"Ewe","fil":"Filipino","fi":"Finnish","fr":"French","gl":"Galician","lg":"Ganda","ka":"Georgian","de":"German","el":"Greek","gn":"Guarani","gu":"Gujarati","ht":"Haitian Creole","ha":"Hausa","haw":"Hawaiian","iw":"Hebrew","hi":"Hindi","hmn":"Hmong","hu":"Hungarian","is":"Icelandic","ig":"Igbo","id":"Indonesian","ga":"Irish","it":"Italian","ja":"Japanese","jv":"Javanese","kn":"Kannada","kk":"Kazakh","km":"Khmer","rw":"Kinyarwanda","ko":"Korean","kri":"Krio","ku":"Kurdish","ky":"Kyrgyz","lo":"Lao","la":"Latin","lv":"Latvian","ln":"Lingala","lt":"Lithuanian","lb":"Luxembourgish","mk":"Macedonian","mg":"Malagasy","ms":"Malay","ml":"Malayalam","mt":"Maltese","mi":"Māori","mr":"Marathi","mn":"Mongolian","ne":"Nepali","nso":"Northern Sotho","no":"Norwegian","ny":"Nyanja","or":"Odia","om":"Oromo","ps":"Pashto","fa":"Persian","pl":"Polish","pt":"Portuguese","pa":"Punjabi","qu":"Quechua","ro":"Romanian","ru":"Russian","sm":"Samoan","sa":"Sanskrit","gd":"Scottish Gaelic","sr":"Serbian","sn":"Shona","sd":"Sindhi","si":"Sinhala","sk":"Slovak","sl":"Slovenian","so":"Somali","st":"Southern Sotho","es":"Spanish","su":"Sundanese","sw":"Swahili","sv":"Swedish","tg":"Tajik","ta":"Tamil","tt":"Tatar","te":"Telugu","th":"Thai","ti":"Tigrinya","ts":"Tsonga","tr":"Turkish","tk":"Turkmen","uk":"Ukrainian","ur":"Urdu","ug":"Uyghur","uz":"Uzbek","vi":"Vietnamese","cy":"Welsh","fy":"Western Frisian","xh":"Xhosa","yi":"Yiddish","yo":"Yoruba","zu":"Zulu"},"udemyAccessTokenExpired":"Your entered Udemy Access Token has expired","udemyModuleArgsNotFound":"Could not get udemy module data due to the fact that ModuleArgs was not found","VOTTranslationHelpNull":"Could not get the data required for the translate","enterUdemyAccessToken":"Enter Udemy Access Token","VOTUdemyData":"Udemy Data","streamNoConnectionToServer":"There is no connection to the server","searchField":"Search...","VOTTranslateAPIErrors":"Translate errors from the API","VOTTranslationService":"Translation Service","VOTDetectService":"Detect Service","VOTTranslatingError":"Translating the error","VOTProxyWorkerHost":"Enter the proxy worker address","VOTM3u8ProxyHost":"Enter the address of the m3u8 proxy worker","proxySettings":"Proxy Settings","translationTakeApproximatelyMinute2":"The translation will take approximately {0} minutes"}');var i=o("./src/utils/debug.js"),a=o("./src/utils/storage.js"),r=o("./src/utils/utils.js");const s=["auto","en","ru","af","am","ar","az","bg","bn","bs","ca","cs","cy","da","de","el","es","et","eu","fa","fi","fr","gl","hi","hr","hu","hy","id","it","ja","jv","kk","km","kn","ko","lo","mk","ml","mn","ms","mt","my","ne","nl","pa","pl","pt","ro","si","sk","sl","sq","sr","su","sv","sw","tr","uk","ur","uz","vi","zh","zu"],l=new class{lang="en";locale={};gmValues=["locale-phrases","locale-lang","locale-version","locale-lang-override"];constructor(){const t=a.d.syncGet("locale-lang-override","auto");this.lang=t&&"auto"!==t?t:(navigator.language||navigator.userLanguage)?.substr(0,2)?.toLowerCase()??"en",this.setLocaleFromJsonString(a.d.syncGet("locale-phrases",""))}reset(){for(let t=0;t{if("object"==typeof t&&t)return t[e]}),t);return void 0===o&&console.warn("[VOT] [localizationProvider] locale",t,"doesn't contain key",e),o}getDefault(t){return this.getFromLocale(n,t)??t}get(t){return this.getFromLocale(this.locale,t)??this.getFromLocale(n,t)??t}}},"./src/utils/debug.js":(t,e,o)=>{"use strict";o.d(e,{A:()=>i});const n={log:(...t)=>{}},i=n},"./src/utils/storage.js":(t,e,o)=>{"use strict";o.d(e,{d:()=>i});var n=o("./src/utils/debug.js");const i=new class{constructor(){this.gmSupport="function"==typeof GM_getValue,n.A.log(`GM Storage Status: ${this.gmSupport}`)}syncGet(t,e=void 0,o=!1){if(this.gmSupport)return GM_getValue(t,e);let n=window.localStorage.getItem(t);if("udemyData"===t&&"string"==typeof n)try{n=JSON.parse(n)}catch{n=e}return o?Number(n)??Number(e):n??e}async get(t,e=void 0,o=!1){return this.gmSupport?await GM_getValue(t,e):Promise.resolve(this.syncGet(t,e,o))}syncSet(t,e){return this.gmSupport?GM_setValue(t,e):("udemyData"===t&&(e=JSON.stringify(e)),window.localStorage.setItem(t,e))}async set(t,e){return this.gmSupport?await GM_setValue(t,e):Promise.resolve(this.syncSet(t,e))}syncDelete(t){return this.gmSupport?GM_deleteValue(t):window.localStorage.removeItem(t)}async delete(t){return this.gmSupport?await GM_deleteValue(t):Promise.resolve(this.syncDelete(t))}syncList(){return this.gmSupport?GM_listValues():["autoTranslate","dontTranslateLanguage","dontTranslateYourLang","autoSetVolumeYandexStyle","showVideoSlider","syncVolume","subtitlesMaxLength","highlightWords","responseLanguage","defaultVolume","udemyData","audioProxy","showPiPButton","locale-version","locale-lang","locale-phrases"]}async list(){return this.gmSupport?await GM_listValues():Promise.resolve(this.syncList())}}},"./src/utils/translateApis.js":(t,e,o)=>{"use strict";o.d(e,{Tl:()=>d,o0:()=>c,qh:()=>h,vN:()=>u});var n=o("./src/config/config.js"),i=o("./src/utils/storage.js");async function a(t,e={}){const o=new AbortController,n=setTimeout((()=>o.abort()),3e3);try{return await fetch(t,{...e,signal:o.signal})}catch(t){return console.error("Fetch timed-out. Error:",t),t}finally{clearTimeout(n)}}const r={async translate(t,e){try{const o=await a(`${n.rw.yandex}?${new URLSearchParams({text:t,lang:e})}`);if(o instanceof Error)throw o;const i=await o.json();if(200!==i.code)throw i.message;return i.text[0]}catch(e){return console.error("Error translating text:",e),t}},async detect(t){try{const e=await a(`${n.QL.yandex}?${new URLSearchParams({text:t})}`);if(e instanceof Error)throw e;const o=await e.json();if(200!==o.code)throw o.message;return o.lang??"en"}catch(t){return console.error("Error getting lang from text:",t),"en"}}},s={async detect(t){try{const e=await fetch(n.QL.rustServer,{method:"POST",body:t});if(e instanceof Error)throw e;return await e.text()}catch(t){return console.error("Error getting lang from text:",t),"en"}}},l={async translate(t,e="auto",o="ru"){try{const i=await a(n.rw.deepl,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({text:t,source_lang:e,target_lang:o})});if(i instanceof Error)throw i;const r=await i.json();if(200!==r.code)throw r.message;return r.data}catch(e){return console.error("Error translating text:",e),t}}};async function d(t,e="",o="ru"){switch(await i.d.get("translationService",n.mE)){case"yandex":{const n=e&&o?`${e}-${o}`:o;return await r.translate(t,n)}case"deepl":return await l.translate(t,e,o);default:return t}}async function c(t){switch(await i.d.get("detectService",n.K2)){case"yandex":return await r.detect(t);case"rust-server":return await s.detect(t);default:return"en"}}const u=Object.keys(n.rw),h=Object.keys(n.QL).map((t=>"rustServer"===t?"rust-server":t))},"./src/utils/utils.js":(t,e,o)=>{"use strict";o.d(e,{Bs:()=>c,CK:()=>u,G3:()=>g,R4:()=>d,X5:()=>p,jI:()=>s,ox:()=>l,vV:()=>r});var n=o("./src/localization/localizationProvider.js"),i=o("./src/utils/youtubeUtils.js");const a=navigator.language||navigator.userLanguage,r=a?.substr(0,2)?.toLowerCase()??"en",s=(t,e)=>{let o=new URL(window.location.href);switch(t){case"piped":case"invidious":case"youtube":if(o.searchParams.has("enablejsapi")){const t=i.A.getPlayer().getVideoUrl();o=new URL(t)}return o.pathname.match(/(?:watch|embed|shorts|live)\/([^/]+)/)?.[1]||o.searchParams.get("v");case"vk":{const t=o.pathname.match(/^\/(video|clip)-?[0-9]{8,9}_[0-9]{9}$/),e=o.searchParams.get("z"),n=o.searchParams.get("oid"),i=o.searchParams.get("id");return t?t[0].slice(1):e?e.split("/")[0]:n&&i?`video-${Math.abs(parseInt(n))}_${i}`:null}case"nine_gag":case"9gag":case"gag":return o.pathname.match(/gag\/([^/]+)/)?.[1];case"twitch":{const t=o.pathname.match(/([^/]+)\/(?:clip)\/([^/]+)/);if(/^m\.twitch\.tv$/.test(o.hostname))return o.href.match(/videos\/([^/]+)/)?.[0]||o.pathname.slice(1);if(/^player\.twitch\.tv$/.test(o.hostname))return`videos/${o.searchParams.get("video")}`;if(/^clips\.twitch\.tv$/.test(o.hostname)){const t=document.querySelector("script[type='application/ld+json']"),e=o.pathname.slice(1);if(!t){const t="embed"===e,n=document.querySelector(t?".tw-link[data-test-selector='stream-info-card-component__stream-avatar-link']":".clips-player a:not([class])");if(!n)return;return`${n.href.replace("https://www.twitch.tv/","")}/clip/${t?o.searchParams.get("clip"):e}`}const n=JSON.parse(t.innerText),i=n["@graph"].find((t=>"VideoObject"===t["@type"]))?.creator.url;return`${i.replace("https://www.twitch.tv/","")}/clip/${e}`}return t?t[0]:o.pathname.match(/(?:videos)\/([^/]+)/)?.[0]}case"proxitok":return o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];case"tiktok":{let t=o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];if(!t){const o=e.closest(".xgplayer-playing, .tiktok-web-player"),n=o?.closest('div[data-e2e="recommend-list-item-container"]'),i=n?.querySelector('a[data-e2e="video-author-avatar"]');if(o&&i){const e=o.id?.match(/^xgwrapper-[0-9]+-(.*)$/)?.at(1),n=i.href?.match(/.*(@.*)$/)?.at(1);e&&n&&(t=`${n}/video/${e}`)}}return t}case"vimeo":{const t=o.searchParams.get("app_id"),e=o.pathname.match(/[^/]+\/[^/]+$/)?.[0]||o.pathname.match(/[^/]+$/)?.[0];return t?`${e}?app_id=${t}`:e}case"xvideos":return o.pathname.match(/[^/]+\/[^/]+$/)?.[0];case"pornhub":return o.searchParams.get("viewkey")||o.pathname.match(/embed\/([^/]+)/)?.[1];case"twitter":return o.pathname.match(/status\/([^/]+)/)?.[1];case"udemy":case"rumble":case"facebook":return o.pathname.slice(1);case"rutube":return o.pathname.match(/(?:video|embed)\/([^/]+)/)?.[1];case"coub":return o.pathname.match(/(?:view|embed)\/([^/]+)/)?.[1]||document.querySelector(".coub.active")?.dataset?.permalink;case"bilibili":{const t=o.searchParams.get("bvid");if(t)return t;let e=o.pathname.match(/video\/([^/]+)/)?.[1];return e&&null!==o.searchParams.get("p")&&(e+=`/?p=${o.searchParams.get("p")}`),e}case"mail_ru":{const t=o.pathname;if(t.startsWith("/v/")||t.startsWith("/mail/"))return t.slice(1);const e=t.match(/video\/embed\/([^/]+)/)?.[1];if(!e)return null;const n=document.querySelector(".b-video-controls__mymail-link");return!!n&&n?.href.split("my.mail.ru")?.[1]}case"bitchute":return o.pathname.match(/(video|embed)\/([^/]+)/)?.[2];case"coursera":return o.pathname.match(/learn\/([^/]+)\/lecture\/([^/]+)/)?.[0];case"eporner":return o.pathname.match(/video-([^/]+)\/([^/]+)/)?.[0];case"peertube":return o.pathname.match(/\/w\/([^/]+)/)?.[0];case"dailymotion":{const t=Array.from(document.querySelectorAll("*")).filter((t=>t.innerHTML.trim().includes(".m3u8")));try{let e=t[1].lastChild.src;return e.match(/\/video\/(\w+)\.m3u8/)?.[1]}catch(t){return console.error("[VOT]",t),!1}}case"trovo":{const t=o.searchParams.get("vid");if(!t)return null;const e=o.pathname.match(/([^/]+)\/([\d]+)/)?.[0];return e?`${e}?vid=${t}`:null}case"yandexdisk":return o.pathname.match(/\/i\/([^/]+)/)?.[1];case"coursehunter":{const t=o.pathname.match(/\/course\/([^/]+)/)?.[1];return!!t&&t+o.search}case"ok.ru":return o.pathname.match(/\/video\/(\d+)/)?.[1];case"googledrive":return o.searchParams.get("docid");case"bannedvideo":return o.searchParams.get("id");case"weverse":return o.pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[0];case"newgrounds":return o.pathname.match(/([^/]+)\/(view)\/([^/]+)/)?.[0];case"egghead":return o.pathname.slice(1);case"youku":return o.pathname.match(/v_show\/id_[\w=]+/)?.[0];case"directlink":return o.pathname+o.search;default:return!1}};function l(t){const e=Math.floor(t/60),o=Math.floor(t%60);return e>=60?n.j.get("translationTakeMoreThanHour"):1===e||0===e&&o>0?n.j.get("translationTakeAboutMinute"):11!==e&&e%10==1?n.j.get("translationTakeApproximatelyMinute2").replace("{0}",e):![12,13,14].includes(e)&&[2,3,4].includes(e%10)?n.j.get("translationTakeApproximatelyMinute").replace("{0}",e):n.j.get("translationTakeApproximatelyMinutes").replace("{0}",e)}function d(t){return t.toLowerCase().split(/[_;-]/)[0].trim()}function c(){return"pictureInPictureEnabled"in document&&document.pictureInPictureEnabled}function u(){return"undefined"!=typeof Hls&&Hls?.isSupported()?new Hls({debug:!1,lowLatencyMode:!0,backBufferLength:90}):void 0}const h=new RegExp([/(?:https?|ftp):\/\/[\S]+/g,/https?:\/\/\S+|www\.\S+/gm,/\b\S+\.\S+/gm,/#[^\s#]+/g,/Auto-generated by YouTube/g,/Provided to YouTube by/g,/Released on/g,/0x[a-fA-F0-9]{40}/g,/[13][a-km-zA-HJ-NP-Z1-9]{25,34}/g,/4[0-9AB][1-9A-HJ-NP-Za-km-z]{93}/g,/Paypal/g].map((t=>t.source)).join("|"));function p(t,e){return`${t} ${e?e.split("\n").filter((t=>!h.test(t))).join(" "):""}`.slice(0,450).replace(/[^\p{L}\s]+|\s+/gu," ").trim()}async function g(t,e={}){try{return await fetch(t,e)}catch(o){return new Promise(((o,n)=>{GM_xmlhttpRequest({method:e.method||"GET",url:t,responseType:"blob",onload:t=>{o(new Response(t.response,{status:t.status,headers:Object.fromEntries(t.responseHeaders.trim().split("\r\n").map((t=>{let e=t.split(": ");if("set-cookie"!==e?.[0])return[e.shift(),e.join(": ")]})).filter((t=>t)))}))},ontimeout:()=>n(new Error("fetch timeout")),onerror:t=>n(t),onabort:()=>n(new Error("fetch abort"))})}))}}},"./src/utils/youtubeUtils.js":(t,e,o)=>{"use strict";o.d(e,{A:()=>u});var n=o("./src/utils/debug.js"),i=o("./src/config/constants.js"),a=o("./src/utils/utils.js"),r=o("./src/utils/translateApis.js");function s(){return/^m\.youtube\.com$/.test(window.location.hostname)}function l(){return window.location.pathname.startsWith("/shorts/")?s()?document.querySelector("#movie_player"):document.querySelector("#shorts-player"):document.querySelector("#movie_player")}function d(){const t=l();return t?.getPlayerResponse?t?.getPlayerResponse?.call()??null:t?.data?.playerResponse??null}function c(){const t=l();return t?.getVideoData?t?.getVideoData?.call()??null:t?.data?.playerResponse?.videoDetails??null}const u={isMobile:s,getPlayer:l,getPlayerResponse:d,getPlayerData:c,getVideoVolume:function(){const t=l();return t?.getVolume?t.getVolume.call()/100:1},getSubtitles:function(){const t=d();let e=t?.captions?.playerCaptionsTracklistRenderer?.captionTracks??[];return e=e.reduce(((t,e)=>{if("languageCode"in e){const o=e?.languageCode?(0,a.R4)(e?.languageCode):void 0,n=e?.url||e?.baseUrl;o&&n&&t.push({source:"youtube",language:o,isAutoGenerated:"asr"===e?.kind,url:`${n.startsWith("http")?n:`${window.location.origin}/${n}`}&fmt=json3`})}return t}),[]),n.A.log("youtube subtitles:",e),e},getVideoData:async function(){const t=l(),e=d(),o=c(),{title:s}=o??{},{shortDescription:u,isLive:h}=e?.videoDetails??{};let p=s?await async function(t,e,o,i){if(!window.location.hostname.includes("m.youtube.com")&&t?.getAudioTrack){const e=t.getAudioTrack(),o=e?.getLanguageInfo();if("und"!==o?.id)return(0,a.R4)(o.id.split(".")[0])}const s=e?.captions?.playerCaptionsTracklistRenderer?.captionTracks;if(s?.length){const t=s.find((t=>"asr"===t.kind));if(t&&t.languageCode)return(0,a.R4)(t.languageCode)}const l=(0,a.X5)(o,i);return n.A.log(`Detecting language text: ${l}`),(0,r.o0)(l)}(t,e,s,u):"en";p=i.xm.includes(p)?p:"en";const g={isLive:!!h,title:s,description:u,detectedLanguage:p};return n.A.log("youtube video data:",g),console.log("[VOT] Detected language: ",g.detectedLanguage),g},setVideoVolume:function(t){const e=l();if(e?.setVolume)return e.setVolume(Math.round(100*t)),!0},videoSeek:function(t,e){n.A.log("videoSeek",e);const o=(l()?.getProgressState()?.seekableEnd||t.currentTime)-e;t.currentTime=o},isMuted:function(){const t=l();return!!t?.isMuted&&t.isMuted.call()},isMusic:function(){const t=c().author,e=c().title.toUpperCase(),o=e.match(/\w+/g),n=document.body.querySelector("ytd-watch-flexy")?.playerData;return[e,document.URL,t,n?.microformat?.playerMicroformatRenderer.category,n?.title].some((t=>t?.toUpperCase().includes("MUSIC")))||document.body.querySelector("#upload-info #channel-name .badge-style-type-verified-artist")||t&&/(VEVO|Topic|Records|RECORDS|Recordings|AMV)$/.test(t)||t&&/(MUSIC|ROCK|SOUNDS|SONGS)/.test(t.toUpperCase())||o?.length&&["🎵","♫","SONG","SONGS","SOUNDTRACK","LYRIC","LYRICS","AMBIENT","MIX","VEVO","CLIP","KARAOKE","OPENING","COVER","COVERED","VOCAL","INSTRUMENTAL","ORCHESTRAL","DUBSTEP","DJ","DNB","BASS","BEAT","ALBUM","PLAYLIST","DUBSTEP","CHILL","RELAX","CLASSIC","CINEMATIC"].some((t=>o.includes(t)))||["OFFICIAL VIDEO","OFFICIAL AUDIO","FEAT.","FT.","LIVE RADIO","DANCE VER","HIP HOP","ROCK N ROLL","HOUR VER","HOURS VER","INTRO THEME"].some((t=>e.includes(t)))||o?.length&&["OP","ED","MV","OST","NCS","BGM","EDM","GMV","AMV","MMD","MAD"].some((t=>o.includes(t)))}}},"./src/yandexRequest-cloudflare.js":(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>s});var n=o("./src/config/config.js"),i=o("./src/utils/debug.js"),a=o("./src/utils/storage.js"),r=o("./src/utils/utils.js");const s=async function(t,e,o,s){let l,d;try{i.A.log("yandexRequest:",t);const s={method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify({headers:{Accept:"application/x-protobuf","Accept-Language":"en","Content-Type":"application/x-protobuf","User-Agent":n.Cc,Pragma:"no-cache","Cache-Control":"no-cache","Sec-Fetch-Mode":"no-cors",...o},body:Array.from(e)})},c=await a.d.get("proxyWorkerHost",n.Pm);l=await(0,r.G3)(`https://${c}${t}`,s),i.A.log("yandexRequest:",l.status,l),d=await l.arrayBuffer()}catch(t){console.error("[VOT]",t),l={status:-1},d=t}s(200==l.status,d)}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={id:n,exports:{}};return t[n].call(a.exports,a,a.exports,o),a.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nc=void 0,(()=>{"use strict";const t=["invidious.snopyta.org","yewtu.be","invidious.kavin.rocks","vid.puffyan.us","invidious.namazso.eu","inv.riverside.rocks","yt.artemislena.eu","invidious.flokinet.to","invidious.esmailelbob.xyz","y.com.sb","invidious.nerdvpn.de","inv.vern.cc","invidious.slipfox.xyz","invidio.xamh.de","invidious.dhusch.de"],e=["piped.video","piped.tokhmi.xyz","piped.moomoo.me","piped.syncpundit.io","piped.mha.fi","watch.whatever.social","piped.garudalinux.org","efy.piped.pages.dev","watch.leptons.xyz","piped.lunar.icu","yt.dc09.ru","piped.mint.lgbt","il.ax","piped.privacy.com.de","piped.esmailelbob.xyz","piped.projectsegfau.lt","piped.in.projectsegfau.lt","piped.us.projectsegfau.lt","piped.privacydev.net","piped.palveluntarjoaja.eu","piped.smnz.de","piped.adminforge.de","piped.qdi.fi","piped.hostux.net","piped.chauvet.pro","piped.jotoma.de","piped.pfcd.me","piped.frontendfriendly.xyz"],n=["proxitok.pabloferreiro.es","proxitok.pussthecat.org","tok.habedieeh.re","proxitok.esmailelbob.xyz","proxitok.privacydev.net","tok.artemislena.eu","tok.adminforge.de","tik.hostux.net","tt.vern.cc","cringe.whatever.social","proxitok.lunar.icu","proxitok.privacy.com.de"],i=["peertube.1312.media","tube.shanti.cafe","bee-tube.fr","video.sadmin.io","dalek.zone","review.peertube.biz","peervideo.club","tube.la-dina.net","peertube.tmp.rcp.tf","peertube.su"];var a=o("./src/config/config.js"),r=o("./src/config/constants.js"),s=o("./src/localization/localizationProvider.js"),l=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),d=o.n(l),c=o("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),u=o.n(c),h=o("./node_modules/style-loader/dist/runtime/insertBySelector.js"),p=o.n(h),g=o("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),v=o.n(g),m=o("./node_modules/webpack-monkey/lib/node/deps/style-loader-insertStyleElement.js"),b=o.n(m),f=o("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),y=o.n(f),w=o("./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss"),x={};x.styleTagTransform=y(),x.setAttributes=v(),x.insert=p().bind(null,"head"),x.domAPI=u(),x.insertStyleElement=b();d()(w.A,x);w.A&&w.A.locals&&w.A.locals;function S(t){const e=document.createElement("vot-block");return e.classList.add("vot-icon-button"),e.innerHTML=t,e}function k(t){const e=parseFloat(t.value),o=""===t.min?0:parseFloat(t.min),n=(e-o)/((""===t.max?100:parseFloat(t.max))-o);t.parentElement.setAttribute("style",`--vot-progress: ${n}`)}function T(t,e="",o=" ",n=!1){const i=document.createElement("vot-block");i.classList.add("vot-textfield");const a=document.createElement(n?"textarea":"input");a.placeholder=o,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),{container:i,input:a,label:r}}function M(t){const e=document.createElement("vot-block");e.classList.add("vot-dialog-container"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-dialog-backdrop");const n=document.createElement("vot-block");n.classList.add("vot-dialog");const i=document.createElement("vot-block");i.classList.add("vot-dialog-content-wrapper");const a=document.createElement("vot-block");a.classList.add("vot-dialog-header-container");const r=document.createElement("vot-block");r.classList.add("vot-dialog-body-container");const s=document.createElement("vot-block");s.classList.add("vot-dialog-footer-container");const l=document.createElement("vot-block");l.classList.add("vot-dialog-title-container");const d=S('');d.classList.add("vot-dialog-close-button"),o.onclick=d.onclick=()=>{e.hidden=!0};const c=document.createElement("vot-block");return c.classList.add("vot-dialog-title"),c.innerHTML=t,e.appendChild(o),e.appendChild(n),n.appendChild(i),i.appendChild(a),i.appendChild(r),i.appendChild(s),a.appendChild(l),a.appendChild(d),l.appendChild(c),{container:e,backdrop:o,dialog:n,contentWrapper:i,headerContainer:a,bodyContainer:r,footerContainer:s,titleContainer:l,closeButton:d,title:c}}function V(t,e,o,n={}){const i=n.onSelectCb||function(){},a=n.labelElement||"";let r=[];const l=document.createElement("vot-block");l.classList.add("vot-select"),a&&l.appendChild(a);const d=document.createElement("vot-block");d.classList.add("vot-select-outer");const c=document.createElement("span");c.classList.add("vot-select-title"),c.innerText=t,void 0===t&&(c.innerText=o.find((t=>!0===t.selected))?.label);const u=document.createElement("vot-block");u.classList.add("vot-select-arrow-icon"),u.innerHTML='',d.append(c,u),d.onclick=()=>{const t=M(e);t.container.classList.add("vot-dialog-temp"),t.container.hidden=!1,document.documentElement.appendChild(t.container);const n=document.createElement("vot-block");n.classList.add("vot-select-content-list");for(const t of o){const e=document.createElement("vot-block");e.classList.add("vot-select-content-item"),e.innerText=t.label,e.dataset.votSelected=t.selected,e.dataset.votValue=t.value,t.disabled&&(e.inert=!0),e.onclick=async a=>{if(a.target.inert)return;const r=n.childNodes;for(let t of r)t.dataset.votSelected=!1;for(let e of o)e.selected=e.value===t.value;e.dataset.votSelected=!0,c.innerText=t.label,await i(a)},n.appendChild(e)}const a=T(s.j.get("searchField"));a.input.oninput=t=>{const e=t.target.value.toLowerCase();for(let t=0;t{t.container.remove(),r=[]}},l.append(d);return{container:l,title:c,arrowIcon:u,labelElement:a,setTitle:t=>{c.innerText=t},setSelected:t=>{const e=Array.from(r).filter((t=>!t.inert));for(let o=0;o{o=t}}}const L={createHeader:function(t,e=4){const o=document.createElement("vot-block");return o.classList.add("vot-header"),o.classList.add(`vot-header-level-${e}`),o.innerHTML=t,o},createInformation:function(t,e){const o=document.createElement("vot-block");o.classList.add("vot-info");const n=document.createElement("vot-block");n.innerHTML=t;const i=document.createElement("vot-block");return i.innerHTML=e,o.appendChild(n),o.appendChild(i),{container:o,header:n,value:i}},createButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-button"),e.innerHTML=t,e},createTextButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-text-button"),e.innerHTML=t,e},createOutlinedButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-outlined-button"),e.innerHTML=t,e},createIconButton:S,createCheckbox:function(t,e=!1){const o=document.createElement("label");o.classList.add("vot-checkbox");const n=document.createElement("input");n.type="checkbox",n.checked=Boolean(e);const i=document.createElement("span");return i.innerHTML=t,o.appendChild(n),o.appendChild(i),{container:o,input:n,label:i}},createSlider:function(t,e=50,o=0,n=100){const i=document.createElement("vot-block");i.classList.add("vot-slider");const a=document.createElement("input");a.type="range",a.min=o,a.max=n,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),a.addEventListener("input",(t=>k(t.target))),k(a),{container:i,input:a,label:r}},createTextfield:T,createDialog:M,createVOTButton:function(t){const e=document.createElement("vot-block");e.classList.add("vot-segmented-button");const o=document.createElement("vot-block");o.classList.add("vot-segment"),o.classList.add("vot-translate-button"),o.innerHTML='';const n=document.createElement("vot-block");n.classList.add("vot-separator");const i=document.createElement("vot-block");i.classList.add("vot-segment-only-icon"),i.innerHTML='';const a=document.createElement("vot-block");a.classList.add("vot-separator");const r=document.createElement("vot-block");r.classList.add("vot-segment-only-icon"),r.innerHTML='';const s=document.createElement("span");return s.classList.add("vot-segment-label"),s.innerHTML=t,e.appendChild(o),e.appendChild(n),e.appendChild(i),e.appendChild(a),e.appendChild(r),o.appendChild(s),{container:e,translateButton:o,separator:n,pipButton:i,separator2:a,menuButton:r,label:s}},createVOTMenu:function(t){const e=document.createElement("vot-block");e.classList.add("vot-menu"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-menu-content-wrapper");const n=document.createElement("vot-block");n.classList.add("vot-menu-header-container");const i=document.createElement("vot-block");i.classList.add("vot-menu-body-container");const a=document.createElement("vot-block");a.classList.add("vot-menu-footer-container");const r=document.createElement("vot-block");r.classList.add("vot-menu-title-container");const s=document.createElement("vot-block");return s.classList.add("vot-menu-title"),s.innerHTML=t,e.appendChild(o),o.appendChild(n),o.appendChild(i),o.appendChild(a),n.appendChild(r),r.appendChild(s),{container:e,contentWrapper:o,headerContainer:n,bodyContainer:i,footerContainer:a,titleContainer:r,title:s}},createVOTSelectLabel:function(t){const e=document.createElement("span");return e.classList.add("vot-select-label"),e.innerText=t,e},createVOTSelect:V,createVOTLanguageSelect:function(t){const e=t.fromTitle||"#UNDEFINED",o=t.fromDialogTitle||"#UNDEFINED",n=t.fromItems||[],i=t.fromOnSelectCB||function(){},a=t.toTitle||"#UNDEFINED",r=t.toDialogTitle||"#UNDEFINED",s=t.toItems||[],l=t.toOnSelectCB||function(){},d=document.createElement("vot-block");d.classList.add("vot-lang-select");const c=V(e,o,n,{onSelectCb:i}),u=document.createElement("vot-block");u.classList.add("vot-lang-select-icon"),u.innerHTML='';const h=V(a,r,s,{onSelectCb:l});return d.append(c.container,u,h.container),{container:d,fromSelect:c,icon:u,toSelect:h}},updateSlider:k};class A extends Error{constructor(t){super(s.j.getDefault(t)),this.name="VOTLocalizedError",this.unlocalizedMessage=t,this.localizedMessage=s.j.get(t)}}var C=o("./src/utils/debug.js"),P=o("./src/utils/utils.js");const O=new protobuf.Type("VideoTranslationHelpObject").add(new protobuf.Field("target",1,"string")).add(new protobuf.Field("targetUrl",2,"string")),E=new protobuf.Type("VideoTranslationRequest").add(new protobuf.Field("url",3,"string")).add(new protobuf.Field("deviceId",4,"string")).add(new protobuf.Field("firstRequest",5,"bool")).add(new protobuf.Field("duration",6,"double")).add(new protobuf.Field("unknown2",7,"int32")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("forceSourceLang",9,"bool")).add(new protobuf.Field("unknown4",10,"int32")).add(new protobuf.Field("translationHelp",11,"VideoTranslationHelpObject","repeated")).add(new protobuf.Field("responseLanguage",14,"string")).add(new protobuf.Field("unknown5",15,"int32")).add(new protobuf.Field("unknown6",16,"int32")).add(new protobuf.Field("bypassCache",17,"bool")),R=new protobuf.Type("VideoSubtitlesRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")),B=new protobuf.Type("VideoStreamRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")).add(new protobuf.Field("responseLanguage",3,"string")),F=new protobuf.Type("VideoStreamPingRequest").add(new protobuf.Field("pingId",1,"int32")),j=new protobuf.Type("VideoTranslationResponse").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("duration",2,"double")).add(new protobuf.Field("status",4,"int32")).add(new protobuf.Field("remainingTime",5,"int32")).add(new protobuf.Field("unknown0",6,"int32")).add(new protobuf.Field("translationId",7,"string")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("message",9,"string")),D=new protobuf.Type("VideoSubtitlesObject").add(new protobuf.Field("language",1,"string")).add(new protobuf.Field("url",2,"string")).add(new protobuf.Field("unknown2",3,"int32")).add(new protobuf.Field("translatedLanguage",4,"string")).add(new protobuf.Field("translatedUrl",5,"string")).add(new protobuf.Field("unknown5",6,"int32")).add(new protobuf.Field("unknown6",7,"int32")),_=new protobuf.Type("VideoSubtitlesResponse").add(new protobuf.Field("waiting",1,"int32")).add(new protobuf.Field("subtitles",2,"VideoSubtitlesObject","repeated")),q=new protobuf.Type("VideoStreamObject").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("timestamp",2,"int64")),z=new protobuf.Type("VideoStreamResponse").add(new protobuf.Field("interval",1,"int32")).add(new protobuf.Field("translatedInfo",2,"VideoStreamObject")).add(new protobuf.Field("pingId",3,"int32")),I=new protobuf.Type("YandexSessionRequest").add(new protobuf.Field("uuid",1,"string")).add(new protobuf.Field("module",2,"string")),$=new protobuf.Type("YandexSessionResponse").add(new protobuf.Field("sign",1,"string")).add(new protobuf.Field("expires",2,"int32")),N=(new protobuf.Root).define("yandex").add(O).add(E).add(j).add(R).add(D).add(_).add(F).add(B).add(q).add(z).add(I).add($),H={encodeTranslationRequest:(t,e,o,n,i)=>N.VideoTranslationRequest.encode({url:t,firstRequest:!0,duration:e,unknown2:1,language:o,forceSourceLang:!1,unknown4:0,translationHelp:i,responseLanguage:n,unknown5:0,unknown6:1,bypassCache:!1}).finish(),decodeTranslationResponse:t=>N.VideoTranslationResponse.decode(new Uint8Array(t)),encodeSubtitlesRequest:(t,e)=>N.VideoSubtitlesRequest.encode({url:t,language:e}).finish(),decodeSubtitlesResponse:t=>N.VideoSubtitlesResponse.decode(new Uint8Array(t)),encodeStreamPingRequest:t=>N.VideoStreamPingRequest.encode({pingId:t}).finish(),encodeStreamRequest:(t,e,o)=>N.VideoStreamRequest.encode({url:t,language:e,responseLanguage:o}).finish(),decodeStreamResponse:t=>N.VideoStreamResponse.decode(new Uint8Array(t)),encodeYandexSessionRequest:(t,e)=>N.YandexSessionRequest.encode({uuid:t,module:e}).finish(),decodeYandexSessionResponse:t=>N.YandexSessionResponse.decode(new Uint8Array(t))};var U=o("./node_modules/bowser/es5.js");function W(){let t="";for(let e=0;e<32;e++){t+="0123456789ABCDEF"[Math.floor(16*Math.random())]}return t}async function G(t){const e=new TextEncoder,o=await window.crypto.subtle.importKey("raw",e.encode(a.S7),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),n=await window.crypto.subtle.sign("HMAC",o,t);return new Uint8Array(n).reduce(((t,e)=>t+e.toString(16).padStart(2,"0")),"")}const Y=async function(t,e){try{C.A.log("requestStreamPing");const n=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;C.A.log("Inited yandexRequest...");const i=H.encodeStreamPingRequest(t);await n("/stream-translation/ping-stream",i,{"Vtrans-Signature":await G(i),"Sec-Vtrans-Token":W()},e)}catch(t){console.error("[VOT]",t),e(!1)}};const Z=async function(t,e,n,i){try{C.A.log("requestStreamTranslation");const a=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;C.A.log("Inited yandexRequest...");const r=H.encodeStreamRequest(t,e,n);await a("/stream-translation/translate-stream",r,{"Vtrans-Signature":await G(r),"Sec-Vtrans-Token":W()},i)}catch(t){console.error("[VOT]",t),i(!1)}};const K=async function(t,e,n,i,a,r){try{C.A.log("requestVideoTranslation");const s=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;C.A.log("Inited yandexRequest...");const l=H.encodeTranslationRequest(t,e,n,i,a);await s("/video-translation/translate",l,{"Vtrans-Signature":await G(l),"Sec-Vtrans-Token":W()},r)}catch(t){console.error("[VOT]",t),r(!1)}};var J=o("./src/utils/youtubeUtils.js");const Q=async function(t,e,n){try{C.A.log("requestVideoSubtitles");const i=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest-cloudflare.js"))).default;C.A.log("Inited yandexRequest...");const a=H.encodeSubtitlesRequest(t,e);await i("/video-subtitles/get-subtitles",a,{"Vsubs-Signature":await G(a),"Sec-Vsubs-Token":W()},n)}catch(t){console.error("[VOT]",t),n(!1)}};function X(t){const e=t.startMs+t.durationMs;return t.tokens.reduce(((o,n,i)=>{const a=t.tokens[i+1];let r;o.length>0&&(r=o[o.length-1]);const s=r?.alignRange?.end??0,l=s+n.text.length;if(n.alignRange={start:s,end:l},o.push(n),a){const t=n.startMs+n.durationMs,i=a.startMs?a.startMs-t:e-t;o.push({text:" ",startMs:t,durationMs:i,alignRange:{start:l,end:l+1}})}return o}),[])}function tt(t,e){const o=t.text.split(/([\n \t])/).reduce(((t,o)=>{if(o.length){const n=t[t.length-1]??e,i=n?.alignRange?.end??0,a=i+o.length;t.push({text:o,alignRange:{start:i,end:a}})}return t}),[]),n=Math.floor(t.durationMs/o.length),i=t.startMs+t.durationMs;return o.map(((e,a)=>{const r=a===o.length-1,s=t.startMs+n*a;return{...e,startMs:s,durationMs:r?i-s:n}}))}function et(t){let e=Math.floor(t/3600),o=Math.floor(t%3600/60),n=Math.floor(t%60),i=Math.floor(t%1*1e3);return`${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")},${i.toString().padStart(3,"0")}`}async function ot(t){const e=new Promise((t=>setTimeout((()=>t({containsTokens:!1,subtitles:[]})),5e3))),o=(async()=>{try{const e=await(0,P.G3)(t.url);return await e.json()}catch(t){return console.error("[VOT] Failed to fetch subtitles. Reason:",t),{containsTokens:!1,subtitles:[]}}})();let n=await Promise.race([e,o]);return"youtube"===t.source&&(n=function(t){const e={containsTokens:!1,subtitles:[]};if("object"!=typeof t||!("events"in t)||!Array.isArray(t.events))return console.error("[VOT] Failed to format youtube subtitles",t),e;for(let o=0;ot.utf8.replace(/^( +| +)$/g,""))).join(" ");let i=t.events[o].dDurationMs;t.events[o+1]&&t.events[o].tStartMs+t.events[o].dDurationMs>t.events[o+1].tStartMs&&(i=t.events[o+1].tStartMs-t.events[o].tStartMs),"\n"!==n&&e.subtitles.push({text:n,startMs:t.events[o].tStartMs,durationMs:i})}return e}(n)),n.subtitles=function(t,e){const o=[];let n;for(let i=0;i{setTimeout((()=>{i||(console.error("[VOT] Failed get yandex subtitles. Reason: timeout"),t([]))}),5e3)})),new Promise((n=>{Q(`${t.url}${e}`,o,((t,o)=>{C.A.log("[exec callback] Requesting video subtitles",e),t||(console.error("[VOT] Failed get yandex subtitles"),i=!0,n([]));const a=H.decodeSubtitlesResponse(o);console.log("[VOT] Subtitles response: ",a);let r=a.subtitles??[];r=r.reduce(((t,e)=>(e.language&&!t.find((t=>{if("yandex"===t.source&&t.language===e.language&&!t.translatedFromLanguage)return t}))&&t.push({source:"yandex",language:e.language,url:e.url}),e.translatedLanguage&&t.push({source:"yandex",language:e.translatedLanguage,translatedFromLanguage:e.language,url:e.translatedUrl}),t)),[]),i=!0,n(r)}))}))]),r=[...a,...n].sort(((t,e)=>{if(t.source!==e.source)return"yandex"===t.source?-1:1;if(t.language!==e.language&&(t.language===P.vV||e.language===P.vV))return t.language===P.vV?-1:1;if("yandex"===t.source){if(t.translatedFromLanguage!==e.translatedFromLanguage)return t.translatedFromLanguage&&e.translatedFromLanguage?t.translatedFromLanguage===o?-1:1:t.language===e.language?t.translatedFromLanguage?1:-1:t.translatedFromLanguage?-1:1;if(!t.translatedFromLanguage)return t.language===o?-1:1}return"youtube"===t.source&&t.isAutoGenerated!==e.isAutoGenerated?t.isAutoGenerated?1:-1:0}));return console.log("[VOT] subtitles list",r),r}class it{dragging=!1;subtitlesContainerRect=null;containerRect=null;offsetX=null;offsetY=null;lastContent=null;highlightWords=!1;subtitles=null;maxLength=300;maxLengthRegexp=/.{1,300}(?:\s|$)/g;constructor(t,e,o){this.site=o,this.video=t,"youtube"===this.site.host&&"mobile"!==this.site.additionalData?this.container=e.parentElement:this.container=e,this.votSubtitlesContainer=document.createElement("vot-block"),this.votSubtitlesContainer.classList.add("vot-subtitles-widget"),this.container.appendChild(this.votSubtitlesContainer),this.onMouseDownBound=this.onMouseDown.bind(this),this.onMouseUpBound=this.onMouseUp.bind(this),this.onMouseMoveBound=this.onMouseMove.bind(this),this.onTimeUpdateBound=this.onTimeUpdate.bind(this),document.addEventListener("mousedown",this.onMouseDownBound),document.addEventListener("mouseup",this.onMouseUpBound),document.addEventListener("mousemove",this.onMouseMoveBound),this.video?.addEventListener("timeupdate",this.onTimeUpdateBound)}release(){this.video?.removeEventListener("timeupdate",this.onTimeUpdateBound),document.removeEventListener("mousedown",this.onMouseDownBound),document.removeEventListener("mouseup",this.onMouseUpBound),document.removeEventListener("mousemove",this.onMouseMoveBound),this.votSubtitlesContainer.remove()}onMouseDown(t){this.votSubtitlesContainer.contains(t.target)&&(this.subtitlesContainerRect=this.votSubtitlesContainer.getBoundingClientRect(),this.containerRect=this.container.getBoundingClientRect(),this.offsetX=t.clientX-this.subtitlesContainerRect.x,this.offsetY=t.clientY-this.subtitlesContainerRect.y,this.dragging=!0)}onMouseUp(){this.dragging=!1}onMouseMove(t){if(this.dragging){t.preventDefault();const e=t.clientX-this.offsetX,o=t.clientY-this.offsetY,n=o>=this.containerRect.top,i=o+this.subtitlesContainerRect.height<=this.containerRect.bottom,a=e>=this.containerRect.left,r=e+this.subtitlesContainerRect.width<=this.containerRect.right;this.votSubtitlesContainer.style.top=n&&i?o-this.containerRect.y+"px":n?this.containerRect.height-this.subtitlesContainerRect.height+"px":"0px",this.votSubtitlesContainer.style.left=a&&r?e-this.containerRect.x+"px":a?this.containerRect.width-this.subtitlesContainerRect.width+"px":"0px"}}onTimeUpdate(){this.update()}setContent(t){t&&this.video?(this.subtitles=t,this.update()):(this.subtitles=null,this.votSubtitlesContainer.innerHTML="")}setMaxLength(t){"number"==typeof t&&t&&(this.maxLength=t,this.maxLengthRegexp=new RegExp(`.{1,${t}}(?:\\s|$)`,"g"),this.update())}setHighlightWords(t){this.highlightWords!==!!t&&(this.highlightWords=!!t,this.update())}update(){if(!this.video)return;let t="",e=this.highlightWords&&this.subtitles?.containsTokens;const o=1e3*this.video.currentTime,n=this.subtitles?.subtitles?.findLast((t=>t.startMsthis.maxLength){let t=[],e=0,n=0,a=0;for(let o=0;othis.maxLength){let r=i.slice(e,n+1);r.at(0)&&" "===r.at(0).text&&(r=r.slice(1)),r.at(-1)&&" "===r.at(-1).text&&(r=r.slice(0,r.length-1)),t.push({startMs:i[e].startMs,durationMs:i[n].startMs+i[n].durationMs-i[e].startMs,tokens:r}),e=o,a=0}n=o}for(let e=0;er||o>a.startMs-100&&r-o<275)?'class="passed"':""}>${a.text}`}}t!==this.lastContent&&(this.lastContent=t,this.votSubtitlesContainer.innerHTML=t?`${t.replace("\\n","
")}
`:"")}}const at={getVideoData:async function(){const t=window.course_id??document.querySelector('input[name="course_id"]')?.value,e=window.lessons??await async function(t){const e=await fetch(`https://coursehunter.net/api/v1/course/${t}/lessons`);return await e.json()}(t),o=parseInt(document.querySelector(".lessons-item_active")?.dataset?.index??1),n=e?.[o-1],{file:i,duration:a}=n;return C.A.log("coursehunter course data:",e),{url:i,duration:a}}};function rt(){return st()?.player}function st(){return document.querySelector(".vjs-v6")}const lt={getPlayer:st,getPlayerData:rt,getVideoData:async function(t="en"){let e=null;const o=rt(),{duration:n}=o?.cache_||{},{courseId:i,tracks:a,sources:s}=o?.options_||{},l=function(t){const e=t?.find((t=>"video/mp4"===t.type));return e?.src}(s),d=await async function(t){const e=await fetch(`https://www.coursera.org/api/onDemandCourses.v1/${t}`),o=await e.json();return o?.elements?.[0]}(i);let c=d?.primaryLanguageCodes?.[0];c=c?(0,P.R4)(c):"en",r.xm.includes(c)||(c="en");const u=function(t,e,o){let n=t?.find((t=>(0,P.R4)(t.srclang)===e));return n||(n=t?.find((t=>(0,P.R4)(t.srclang)===o))||t?.[0]),n?.src}(a,c,t);console.log(`videoURL: ${l}, subtitlesURL: ${u}`),u&&l?e=[{target:"video_file_url",targetUrl:l},{target:"subtitles_file_url",targetUrl:`https://www.coursera.org${u}`}]:l&&!u?(console.warn("[VOT] Subtitles files not found. Using the link only to the video file."),e={url:l}):console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${l}, subtitlesURL: ${u}`);const h={duration:n,detectedLanguage:c,translationHelp:e};return C.A.log("coursera video data:",h),console.log("[VOT] Detected language: ",h.detectedLanguage),h}},dt="https://www.udemy.com/api-2.0",ct=2592e6;async function ut(t){const e=await fetch(`${dt}/courses/${t}/?`+new URLSearchParams({"fields[course]":"locale",use_remote_version:"true",caching_intent:"true"}));return await e.json()}async function ht(t,e,o){if(!(n=t.expires,n+ct>(new Date).getTime()&&t.accessToken))return void console.error(s.j.get("udemyAccessTokenExpired"));var n;const i=`Bearer ${t.accessToken}`,a=await fetch(`${dt}/users/me/subscribed-courses/${e}/lectures/${o}/?`+new URLSearchParams({"fields[lecture]":"asset","fields[asset]":"length,media_sources,captions"}),{headers:{"x-udemy-authorization":i,authorization:i}});return await a.json()}function pt(){return vt()?.player}function gt(){const t=document.querySelector(".ud-app-loader[data-module-id='course-taking']")?.dataset?.moduleArgs;return t?JSON.parse(t):(console.error(s.j.get("udemyModuleArgsNotFound")),{})}function vt(){return document.querySelector(".vjs-v7")}const mt={getPlayer:vt,getPlayerData:pt,getVideoData:async function(t,e="en"){let o=null;const n=pt();C.A.log("udemyData",t);const i=gt();C.A.log("moduleData: ",i);const a=i.courseId,s=window.location.pathname.match(/learn\/lecture\/([^/]+)/)?.[1];C.A.log(`CourseId: ${a}, lectureId: ${s}`);const l=await ut(a);C.A.log("courseLang Data:",l);const d=await ht(t,a,s);console.log("lecture Data:",d);let c=l?.locale?.locale;c=c?(0,P.R4)(c):"en",r.xm.includes(c)||(c="en");const u=d?.asset?.length||n?.cache_?.duration,h=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(d?.asset?.media_sources)||function(){const t=vt()?.querySelector("video")?.src;return!t?.startsWith("blob:")&&t}(),p=function(t,e,o){let n=t?.find((t=>(0,P.R4)(t.locale_id)===e));return n||(n=t?.find((t=>(0,P.R4)(t.locale_id)===o))||t?.[0]),n?.url}(d?.asset?.captions,c,e);console.log(`videoURL: ${h}, subtitlesURL: ${p}`),p&&h?o=[{target:"video_file_url",targetUrl:h},{target:"subtitles_file_url",targetUrl:p}]:h&&!p?(console.warn("[VOT] Subtitles files not found. Using the link only to the video file."),o={url:h}):console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${h}, subtitlesURL: ${p}`);const g={duration:u,detectedLanguage:c,translationHelp:o};return C.A.log("udemy video data:",g),console.log("[VOT] Detected language: ",g.detectedLanguage),g},getModuleData:gt,getCourseLang:ut,getLectureData:ht};const bt={getVideoData:async function(t){const e=await async function(t){return await fetch("https://api.banned.video/graphql",{method:"POST",body:JSON.stringify({operationName:"GetVideo",query:"query GetVideo($id: String!) {\n getVideo(id: $id) {\n ...DisplayVideoFields\n videoUrl: directUrl\n live\n }\n }\n\n fragment DisplayVideoFields on Video {\n title\n description: summary\n duration: videoDuration\n }",variables:{id:t}}),headers:{"User-Agent":"bannedVideoFrontEnd","apollographql-client-name":"banned-web","apollographql-client-version":"1.3","content-type":"application/json"}}).then((t=>t.json())).catch((t=>(console.error(t),{data:{getVideo:{}}})))}(t);C.A.log("banned.video video data:",e);const{videoUrl:o,duration:n,live:i,description:a,title:r}=e.data.getVideo;return{url:o,duration:n,live:i,title:r,description:a}}};const ft="https://global.apis.naver.com/weverse/wevweb",yt="be4d79eb8fc7bd008ee82c8ec4ff6fd4",wt="1b9cb6378d959b45714bec49971ade22e6e24e42";async function xt(t){const e=Date.now();let o=t.substring(0,Math.min(255,t.length))+e;const n=await async function(t,e){try{const o=new TextEncoder("utf-8");e=o.encode(e);const n=await window.crypto.subtle.importKey("raw",o.encode(t),{name:"HMAC",hash:{name:"SHA-1"}},!1,["sign","verify"]),i=await window.crypto.subtle.sign("HMAC",n,e);return btoa(String.fromCharCode(...new Uint8Array(i)))}catch(t){return console.error(t),!1}}(wt,o);return{wmsgpad:e,wmd:n}}function St(){return{appId:yt,language:"en",os:"WEB",platform:"WEB",wpf:"pc"}}const kt={getVideoData:async function(){const t=new URL(window.location).pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[3],e=await async function(t){const e=`/post/v1.0/post-${t}/preview?`+new URLSearchParams({fieldSet:"postForPreview",...St()}),o=await xt(e);try{const t=await fetch(ft+e+"&"+new URLSearchParams(o));return await t.json()}catch(t){return console.error(t),!1}}(t);if(!e)return;C.A.log("weverse video preview data:",e);const{videoId:o,serviceId:n,infraVideoId:i}=e.extension.video;if(!(o&&n&&i))return!1;const a=await async function(t){const e=`/video/v1.1/vod/${t}/inKey?`+new URLSearchParams({gcc:"RU",...St()}),o=await xt(e);try{const t=await fetch(ft+e+"&"+new URLSearchParams(o),{method:"POST"});return await t.json()}catch(t){return console.error(t),!1}}(o);if(C.A.log("weverse video inKey data:",e),!a)return!1;const r=await async function(t,e,o){const n=Date.now();try{const i=await fetch(`https://global.apis.naver.com/rmcnmv/rmcnmv/vod/play/v2.0/${t}?`+new URLSearchParams({key:e,sid:o,nonce:n,devt:"html5_pc",prv:"N",aup:"N",stpb:"N",cpl:"en",env:"prod",lc:"en",adi:JSON.stringify([{adSystem:null}]),adu:"/"}));return await i.json()}catch(t){return console.error(t),!1}}(i,a.inKey,n);C.A.log("weverse video info:",r);const s=r.videos.list.find((t=>!1===t.useP2P&&t.source.includes(".mp4")));return!!s&&{url:s.source,duration:s.duration}}},Tt=[{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube.com$/,selector:"shorts-video #player"},{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube.com$/,selector:".player-container"},{host:"youtube",url:"https://youtu.be/",match:/^(www.)?youtube(-nocookie|kids)?.com$/,selector:".html5-video-container:not(#inline-player *)"},{host:"tiktok",url:"https://www.tiktok.com/",match:/^(www.)?tiktok.com$/,selector:null},{host:"proxitok",url:"https://www.tiktok.com/",match:n,selector:".column.has-text-centered"},{host:"twitch",url:"https://twitch.tv/",match:[/^m.twitch.tv$/,/^www.twitch.tv$/,/^clips.twitch.tv$/,/^player.twitch.tv$/],selector:".video-ref, main > div > section > div > div > div"},{host:"xvideos",url:"https://www.xvideos.com/",match:/^www.xvideos.com$/,selector:".video-bg-pic"},{host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:/^[a-z]+.pornhub.com$/,selector:".mainPlayerDiv > .video-element-wrapper-js > div"},{additionalData:"embed",host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:t=>t.host.includes("pornhub.com")&&t.pathname.startsWith("/embed/"),selector:"#player"},{additionalData:"mobile",host:"vk",url:"https://vk.com/video?z=",match:/^m.vk.(com|ru)$/,selector:"vk-video-player",shadowRoot:!0},{additionalData:"clips",host:"vk",url:"https://vk.com/video?z=",match:/^(www.|m.)?vk.(com|ru)$/,selector:'div[data-testid="clipcontainer-video"]'},{host:"vk",url:"https://vk.com/video?z=",match:/^(www.|m.)?vk.(com|ru)$/,selector:".videoplayer_media"},{host:"vimeo",url:"https://vimeo.com/",match:/^vimeo.com$/,selector:".player"},{additionalData:"embed",host:"vimeo",url:"https://player.vimeo.com/",match:/^player.vimeo.com$/,selector:".player"},{host:"ok.ru",url:"https://ok.ru/video/",match:/^ok.ru$/,selector:".html5-vpl_vid"},{host:"nine_gag",url:"https://9gag.com/gag/",match:/^9gag.com$/,selector:".video-post"},{host:"bitchute",url:"https://www.bitchute.com/video/",match:/^(www.)?bitchute.com$/,selector:"div#player"},{host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:".video-player > div > div > div:nth-child(2)"},{additionalData:"embed",host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:"#app > div > div"},{host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m|player).bilibili.com$/,selector:".bpx-player-video-wrap"},{additionalData:"old",host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m).bilibili.com$/,selector:null},{host:"twitter",url:"https://twitter.com/i/status/",match:/^twitter.com$/,selector:'div[data-testid="videoComponent"] > div:nth-child(1) > div'},{host:"mail_ru",url:"https://my.mail.ru/",match:/^my.mail.ru$/,selector:"#b-video-wrapper"},{host:"coursera",url:"https://www.coursera.org/",match:/coursera.org$/,selector:".vjs-v6"},{host:"udemy",url:"https://www.udemy.com/",match:/udemy.com$/,selector:'div[data-purpose="curriculum-item-viewer-content"] > section > div > div > div > div:nth-of-type(2)'},{host:"invidious",url:"https://youtu.be/",match:t,selector:"#player"},{host:"piped",url:"https://youtu.be/",match:e,selector:".shaka-video-container"},{host:"rumble",url:"https://rumble.com/",match:/^rumble.com$/,selector:"#videoPlayer > .videoPlayer-Rumble-cls > div"},{host:"eporner",url:"https://www.eporner.com/",match:/^(www.)?eporner.com$/,selector:".vjs-v7"},{host:"peertube",url:"stub",match:i,selector:".vjs-v7"},{host:"dailymotion",url:"https://dai.ly/",match:/^geo.dailymotion.com$/,selector:".player"},{host:"trovo",url:"https://trovo.live/s/",match:/^trovo.live$/,selector:".player-video"},{host:"yandexdisk",url:"https://yadi.sk/i/",match:/^disk.yandex.ru$/,selector:".video-player__player > div:nth-child(1)"},{host:"coursehunter",url:"https://coursehunter.net/course/",match:/^coursehunter.net$/,selector:"#oframeplayer > pjsdiv:nth-of-type(1)"},{host:"googledrive",url:"https://drive.google.com/file/d/",match:/^youtube.googleapis.com$/,selector:".html5-video-container"},{host:"bannedvideo",url:"https://banned.video/watch?id=",match:/^(www.)?banned.video$/,selector:".vjs-v7"},{host:"facebook",url:"https://facebook.com/",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/videos/"),selector:'div[role="main"] div[data-pagelet$="video" i]'},{additionalData:"reels",host:"facebook",url:"https://facebook.com/",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/reel/"),selector:'div[role="main"]'},{host:"weverse",url:"https://weverse.io/",match:/^weverse.io$/,selector:".webplayer-internal-source-wrapper"},{host:"newgrounds",url:"https://www.newgrounds.com/",match:/^www.newgrounds.com$/,selector:".ng-video-player"},{host:"egghead",url:"https://egghead.io/",match:/^egghead.io$/,selector:".cueplayer-react-video-holder"},{host:"youku",url:"https://v.youku.com/",match:/^v.youku.com$/,selector:"#ykPlayer"},{host:"directlink",url:"stub",match:t=>/([^.]+).mp4/.test(t.pathname),selector:null}];o("./node_modules/requestidlecallback-polyfill/index.js");class Mt{constructor(){this.listeners=new Set}hasListener(t){return this.listeners.has(t)}dispatchToListener(t,...e){try{t(...e)}catch(t){console.error("[VOT]",t)}}addListener(t){if(this.hasListener(t))throw new Error("[VOT] The listener has already been added.");this.listeners.add(t)}removeListener(t){if(!this.hasListener(t))throw new Error("[VOT] The listener has not been added yet.");this.listeners.delete(t)}dispatch(...t){for(const e of Array.from(this.listeners))this.dispatchToListener(e,...t)}}function Vt(t){return Array.from(t).flatMap((t=>t instanceof HTMLVideoElement?[t]:t instanceof HTMLElement?Array.from(t.querySelectorAll("video")):t.shadowRoot?Array.from(t.shadowRoot.querySelectorAll("video")):[]))}const Lt=/advertise|promo|sponsor|banner|commercial|preroll|midroll|postroll|ad-container|sponsored/i;var At=o("./src/utils/storage.js"),Ct=o("./src/utils/translateApis.js");const Pt=U.getParser(window.navigator.userAgent).getResult(),Ot=[...t,...e],Et=["playing","ratechange","play","waiting","pause"];function Rt(t,e){return t.map((t=>({label:s.j.get("langs")[t]??t.toUpperCase(),value:t,selected:e===t})))}var Bt=!1;class Ft{translateFromLang="en";translateToLang=P.vV;timer;ytData="";videoData="";firstPlay=!0;audio=new Audio;hls=(0,P.CK)();videoTranslations=[];videoTranslationTTL=7200;downloadTranslationUrl=null;downloadSubtitlesUrl=null;autoRetry;streamPing;volumeOnStart;tempOriginalVolume;tempVolume;firstSyncVolume=!0;subtitlesList=[];subtitlesListVideoId=null;videoLastSrcObject=null;dragging;constructor(t,e,o){C.A.log("[VideoHandler] add video:",t,"container:",e,this),this.video=t,this.container=e,this.site=o,this.stopTranslationBound=this.stopTranslation.bind(this),this.handleVideoEventBound=this.handleVideoEvent.bind(this),this.changeOpacityOnEventBound=this.changeOpacityOnEvent.bind(this),this.resetTimerBound=this.resetTimer.bind(this),this.init()}async autoTranslate(){if(this.site.host,this.firstPlay&&1===this.data.autoTranslate&&this.videoData.videoId){this.firstPlay=!1;try{await this.translateExecutor(this.videoData.videoId)}catch(t){console.error("[VOT]",t),this.transformBtn("error","VOTLocalizedError"===t?.name?t.localizedMessage:t)}}}async init(){if(this.initialized)return;const t="uk"===P.vV?1:0,e={autoTranslate:At.d.get("autoTranslate",0,!0),dontTranslateLanguage:At.d.get("dontTranslateLanguage",P.vV),dontTranslateYourLang:At.d.get("dontTranslateYourLang",1,!0),autoSetVolumeYandexStyle:At.d.get("autoSetVolumeYandexStyle",1,!0),autoVolume:At.d.get("autoVolume",a.JD,!0),buttonPos:At.d.get("buttonPos","default"),showVideoSlider:At.d.get("showVideoSlider",1,!0),syncVolume:At.d.get("syncVolume",0,!0),subtitlesMaxLength:At.d.get("subtitlesMaxLength",300,!0),highlightWords:At.d.get("highlightWords",0,!0),responseLanguage:At.d.get("responseLanguage",P.vV),defaultVolume:At.d.get("defaultVolume",100,!0),udemyData:At.d.get("udemyData",{accessToken:"",expires:0}),audioProxy:At.d.get("audioProxy",t,!0),showPiPButton:At.d.get("showPiPButton",0,!0),translateAPIErrors:At.d.get("translateAPIErrors",1,!0),translationService:At.d.get("translationService",a.mE),detectService:At.d.get("detectService",a.K2),m3u8ProxyHost:At.d.get("m3u8ProxyHost",a.se),proxyWorkerHost:At.d.get("proxyWorkerHost",a.Pm)};this.data=Object.fromEntries(await Promise.all(Object.entries(e).map((async([t,e])=>[t,await e])))),console.log("[db] data from db: ",this.data),this.subtitlesWidget=new it(this.video,this.container,this.site),this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength),this.subtitlesWidget.setHighlightWords(this.data.highlightWords),this.initUI(),this.initUIEvents();const o=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=o,o?this.votMenu.container.hidden=!0:(this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage??"ru")),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),await this.autoTranslate(),this.translateToLang=this.data.responseLanguage??"ru",this.initExtraEvents(),this.initialized=!0}transformBtn(t="none",e){this.votButton.container.dataset.status=t,this.votButton.container.dataset.translating="error"===t&&e.includes(s.j.get("translationTake")),this.votButton.label.innerHTML=e,this.votButton.container.title="error"===t?e:""}initUI(){this.votButton=L.createVOTButton(s.j.get("translateVideo")),this.data?.buttonPos&&"default"!==this.data?.buttonPos&&this.video.clientWidth&&this.video.clientWidth>550?(this.votButton.container.dataset.direction="column",this.votButton.container.dataset.position=this.data?.buttonPos):(this.votButton.container.dataset.direction="row",this.votButton.container.dataset.position="default"),this.container.appendChild(this.votButton.container),this.votButton.pipButton.hidden=!(0,P.Bs)()||!this.data?.showPiPButton,this.votButton.separator2.hidden=!(0,P.Bs)()||!this.data?.showPiPButton,this.votButton.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votMenu=L.createVOTMenu(s.j.get("VOTSettings")),this.votMenu.container.dataset.position=this.video.clientWidth&&this.video.clientWidth>550?this.data?.buttonPos:"default",this.container.appendChild(this.votMenu.container),this.votDownloadButton=L.createIconButton(''),this.votDownloadButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadButton),this.votDownloadSubtitlesButton=L.createIconButton(''),this.votDownloadSubtitlesButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadSubtitlesButton),this.votSettingsButton=L.createIconButton(''),this.votMenu.headerContainer.appendChild(this.votSettingsButton),this.votTranslationLanguageSelect=L.createVOTLanguageSelect({fromTitle:s.j.get("langs")[this.video.detectedLanguage],fromDialogTitle:s.j.get("videoLanguage"),fromItems:[{label:s.j.get("langs").auto,value:"auto",selected:""},...Rt(r.xm,this.videoData.detectedLanguage)],fromOnSelectCB:async t=>{C.A.log("[fromOnSelectCB] select from language",t.target.dataset.votValue),this.videoData=await this.getVideoData(),this.setSelectMenuValues(t.target.dataset.votValue,this.videoData.responseLanguage)},toTitle:s.j.get("langs")[this.video.responseLanguage],toDialogTitle:s.j.get("translationLanguage"),toItems:Rt(r.Ww,this.videoData.responseLanguage),toOnSelectCB:async t=>{const e=t.target.dataset.votValue;C.A.log("[toOnSelectCB] select to language",e),this.data.responseLanguage=this.translateToLang=e,await At.d.set("responseLanguage",this.data.responseLanguage),C.A.log("Response Language value changed. New value: ",this.data.responseLanguage),this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage)}}),this.votMenu.bodyContainer.appendChild(this.votTranslationLanguageSelect.container),this.votSubtitlesSelect=L.createVOTSelect(s.j.get("VOTSubtitlesDisabled"),s.j.get("VOTSubtitles"),[{label:s.j.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1}],{onSelectCb:async t=>{await this.changeSubtitlesLang(t.target.dataset.votValue)},labelElement:L.createVOTSelectLabel(s.j.get("VOTSubtitles"))}),this.votMenu.bodyContainer.appendChild(this.votSubtitlesSelect.container),this.votVideoVolumeSlider=L.createSlider(`${s.j.get("VOTVolume")}: ${100*this.getVideoVolume()}%`,100*this.getVideoVolume()),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoVolumeSlider.container),this.votVideoTranslationVolumeSlider=L.createSlider(`${s.j.get("VOTVolumeTranslation")}: ${this.data?.defaultVolume??100}%`,this.data?.defaultVolume??100),this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoTranslationVolumeSlider.container),this.votMenu.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votSettingsDialog=L.createDialog(s.j.get("VOTSettings")),document.documentElement.appendChild(this.votSettingsDialog.container),this.votTranslationHeader=L.createHeader(s.j.get("translationSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationHeader),this.votAutoTranslateCheckbox=L.createCheckbox(s.j.get("VOTAutoTranslate"),this.data?.autoTranslate??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoTranslateCheckbox.container),this.votDontTranslateYourLangSelect=L.createVOTSelect(s.j.get("langs")[At.d.syncGet("dontTranslateLanguage",P.vV)],s.j.get("VOTDontTranslateYourLang"),Rt(r.xm,At.d.syncGet("dontTranslateLanguage",P.vV)),{onSelectCb:async t=>{this.data.dontTranslateLanguage=t.target.dataset.votValue,await At.d.set("dontTranslateLanguage",this.data.dontTranslateLanguage)},labelElement:L.createCheckbox(s.j.get("VOTDontTranslateYourLang"),this.data?.dontTranslateYourLang??!0).container}),this.votSettingsDialog.bodyContainer.appendChild(this.votDontTranslateYourLangSelect.container),this.votAutoSetVolumeCheckbox=L.createCheckbox(`${s.j.get("VOTAutoSetVolume")}`,this.data?.autoSetVolumeYandexStyle??!0),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeCheckbox.container),this.votAutoSetVolumeSlider=L.createSlider(`${100*(this.data?.autoVolume??a.JD)}%`,100*(this.data?.autoVolume??a.JD),0,100),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeSlider.container),this.votShowVideoSliderCheckbox=L.createCheckbox(s.j.get("VOTShowVideoSlider"),this.data?.showVideoSlider??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votShowVideoSliderCheckbox.container),this.votUdemyDataTextfield=L.createTextfield(s.j.get("VOTUdemyData"),this.data?.udemyData?.accessToken??""),this.votUdemyDataTextfield.container.hidden="udemy"!==this.site.host,this.votSettingsDialog.bodyContainer.appendChild(this.votUdemyDataTextfield.container),this.votSyncVolumeCheckbox=L.createCheckbox(s.j.get("VOTSyncVolume"),this.data?.syncVolume??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSyncVolumeCheckbox.container),this.votTranslationServiceSelect=L.createVOTSelect(At.d.syncGet("translationService",a.mE).toUpperCase(),s.j.get("VOTTranslationService"),Rt(Ct.vN,At.d.syncGet("translationService",a.mE)),{onSelectCb:async t=>{this.data.translationService=t.target.dataset.votValue,await At.d.set("translationService",this.data.translationService)},labelElement:L.createCheckbox(s.j.get("VOTTranslateAPIErrors"),this.data.translateAPIErrors??!0).container}),this.votTranslationServiceSelect.container.hidden="ru"===s.j.lang,this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationServiceSelect.container),this.votDetectServiceSelect=L.createVOTSelect(At.d.syncGet("detectService",a.K2).toUpperCase(),s.j.get("VOTDetectService"),Rt(Ct.qh,At.d.syncGet("detectService",a.K2)),{onSelectCb:async t=>{this.data.detectService=t.target.dataset.votValue,await At.d.set("detectService",this.data.detectService)},labelElement:L.createVOTSelectLabel(s.j.get("VOTDetectService"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votDetectServiceSelect.container),this.votSubtitlesHeader=L.createHeader(s.j.get("subtitlesSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHeader),this.votSubtitlesMaxLengthSlider=L.createSlider(`${s.j.get("VOTSubtitlesMaxLength")}: ${this.data?.subtitlesMaxLength??300}`,this.data?.subtitlesMaxLength??300,50,300),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesMaxLengthSlider.container),this.votSubtitlesHighlightWordsCheckbox=L.createCheckbox(s.j.get("VOTHighlightWords"),this.data?.highlightWords??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHighlightWordsCheckbox.container),this.votProxyHeader=L.createHeader(s.j.get("proxySettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votProxyHeader),this.votM3u8ProxyHostTextfield=L.createTextfield(s.j.get("VOTM3u8ProxyHost"),this.data?.m3u8ProxyHost,a.se),this.votSettingsDialog.bodyContainer.appendChild(this.votM3u8ProxyHostTextfield.container),this.votProxyWorkerHostTextfield=L.createTextfield(s.j.get("VOTProxyWorkerHost"),this.data?.proxyWorkerHost,a.Pm),this.votProxyWorkerHostTextfield.container.hidden=!1,this.votSettingsDialog.bodyContainer.appendChild(this.votProxyWorkerHostTextfield.container),this.votAudioProxyCheckbox=L.createCheckbox(s.j.get("VOTAudioProxy"),this.data?.audioProxy??!1),this.votAudioProxyCheckbox.container.hidden=!1,this.votSettingsDialog.bodyContainer.appendChild(this.votAudioProxyCheckbox.container),this.votAboutHeader=L.createHeader(s.j.get("about")),this.votSettingsDialog.bodyContainer.appendChild(this.votAboutHeader),this.votLanguageSelect=L.createVOTSelect(s.j.get("langs")[At.d.syncGet("locale-lang-override","auto")],s.j.get("VOTMenuLanguage"),Rt(s.z,At.d.syncGet("locale-lang-override","auto")),{onSelectCb:async t=>{await At.d.set("locale-lang-override",t.target.dataset.votValue)},labelElement:L.createVOTSelectLabel(s.j.get("VOTMenuLanguage"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votLanguageSelect.container),this.votShowPiPButtonCheckbox=L.createCheckbox(s.j.get("VOTShowPiPButton"),this.data?.showPiPButton??!1),this.votShowPiPButtonCheckbox.container.hidden=!(0,P.Bs)(),this.votSettingsDialog.bodyContainer.appendChild(this.votShowPiPButtonCheckbox.container),this.votVersionInfo=L.createInformation(`${s.j.get("VOTVersion")}:`,`cloudflare ${GM_info.script.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votVersionInfo.container),this.votAuthorsInfo=L.createInformation(`${s.j.get("VOTAuthors")}:`,GM_info.script.author),this.votSettingsDialog.bodyContainer.appendChild(this.votAuthorsInfo.container),this.votLoaderInfo=L.createInformation(`${s.j.get("VOTLoader")}:`,`${GM_info.scriptHandler} v${GM_info.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votLoaderInfo.container),this.votBrowserInfo=L.createInformation(`${s.j.get("VOTBrowser")}:`,`${Pt.browser.name} ${Pt.browser.version} (${Pt.os.name} ${Pt.os.version})`),this.votSettingsDialog.bodyContainer.appendChild(this.votBrowserInfo.container),this.votResetSettingsButton=L.createButton(s.j.get("resetSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votResetSettingsButton)}initUIEvents(){this.votButton.translateButton.addEventListener("click",(()=>{(async()=>{if(this.audio.src)return C.A.log("[click translationBtn] audio.src is not empty"),void this.stopTranslate();if(this.hls.url)return C.A.log("[click translationBtn] hls is not empty"),void this.stopTranslate();try{if(C.A.log("[click translationBtn] trying execute translation"),!this.videoData.videoId)throw new A("VOTNoVideoIDFound");"vk"===this.site.host&&"clips"===this.site.additionalData&&(this.videoData=await this.getVideoData()),await this.translateExecutor(this.videoData.videoId)}catch(t){console.error("[VOT]",t),"VOTLocalizedError"===t?.name?this.transformBtn("error",t.localizedMessage):this.transformBtn("error",t)}})()})),this.votButton.pipButton.addEventListener("click",(()=>{(async()=>{this.video!==document.pictureInPictureElement?await this.video.requestPictureInPicture():await document.exitPictureInPicture()})()})),this.votButton.menuButton.addEventListener("click",(()=>{this.votMenu.container.hidden=!this.votMenu.container.hidden})),this.votButton.container.addEventListener("mousedown",(()=>{this.dragging=!0})),this.container.addEventListener("mouseup",(()=>{this.dragging=!1})),this.container.addEventListener("mousemove",(async t=>{if(this.dragging){t.preventDefault();const e=t.clientX/this.container.clientWidth*100;this.data.buttonPos=this.container.clientWidth&&this.container.clientWidth>550?e<=33?"left":e>=66?"right":"default":"default",this.votButton.container.dataset.direction="default"===this.data.buttonPos?"row":"column",this.votButton.container.dataset.position=this.data.buttonPos,this.votMenu.container.dataset.position=this.data.buttonPos,this.container.clientWidth&&this.container.clientWidth>550&&await At.d.set("buttonPos",this.data.buttonPos)}})),this.votDownloadButton.addEventListener("click",(()=>{this.downloadTranslationUrl&&window.open(this.downloadTranslationUrl,"_blank").focus()})),this.votDownloadSubtitlesButton.addEventListener("click",(async()=>{const t=function(t){let e="",o=1;for(const n of t.subtitles){let t=n.startMs/1e3,i=(n.startMs+n.durationMs)/1e3;e+=`${o}\n`,e+=`${et(t)} --\x3e ${et(i)}\n`,e+=`${n.text}\n\n`,o++}return e.trim()}(this.YandexSubtitles),e=new Blob([t],{type:"text/plain"}),o=URL.createObjectURL(e),n=document.createElement("a");n.href=o,n.download=`subtitles_${this.videoData.videoId}.srt`,n.click(),URL.revokeObjectURL(o)})),this.votSettingsButton.addEventListener("click",(()=>{this.votSettingsDialog.container.hidden=!this.votSettingsDialog.container.hidden,(document.fullscreenElement||document.webkitFullscreenElement)&&(document.webkitExitFullscreen&&document.webkitExitFullscreen(),document.exitFullscreen&&document.exitFullscreen())})),this.votVideoVolumeSlider.input.addEventListener("input",(t=>{const e=Number(t.target.value);this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`,this.setVideoVolume(e/100),this.data.syncVolume&&this.syncVolumeWrapper("video",e)})),this.votVideoTranslationVolumeSlider.input.addEventListener("input",(t=>{(async()=>{this.data.defaultVolume=Number(t.target.value),await At.d.set("defaultVolume",this.data.defaultVolume),this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${this.data.defaultVolume}%`,this.audio.volume=this.data.defaultVolume/100,this.data.syncVolume&&(this.syncVolumeWrapper("translation",this.data.defaultVolume),["youtube","googledrive"].includes(this.site.host)&&"mobile"!==this.site.additionalData&&this.setVideoVolume(this.tempOriginalVolume/100))})()})),this.votAutoTranslateCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.autoTranslate=Number(t.target.checked),await At.d.set("autoTranslate",this.data.autoTranslate),await this.autoTranslate(),C.A.log("autoTranslate value changed. New value: ",this.data.autoTranslate)})()})),this.votDontTranslateYourLangSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.dontTranslateYourLang=Number(t.target.checked),await At.d.set("dontTranslateYourLang",this.data.dontTranslateYourLang),C.A.log("dontTranslateYourLang value changed. New value: ",this.data.dontTranslateYourLang)})()})),this.votAutoSetVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.autoSetVolumeYandexStyle=Number(t.target.checked),await At.d.set("autoSetVolumeYandexStyle",this.data.autoSetVolumeYandexStyle),C.A.log("autoSetVolumeYandexStyle value changed. New value: ",this.data.autoSetVolumeYandexStyle)})()})),this.votAutoSetVolumeSlider.input.addEventListener("input",(t=>{(async()=>{const e=Number(t.target.value);this.data.autoVolume=(e/100).toFixed(2),await At.d.set("autoVolume",this.data.autoVolume),this.votAutoSetVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`})()})),this.votShowVideoSliderCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showVideoSlider=Number(t.target.checked),await At.d.set("showVideoSlider",this.data.showVideoSlider),C.A.log("showVideoSlider value changed. New value: ",this.data.showVideoSlider),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status})()})),this.votUdemyDataTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.udemyData={accessToken:t.target.value,expires:(new Date).getTime()},await At.d.set("udemyData",this.data.udemyData),C.A.log("udemyData value changed. New value: ",this.data.udemyData),window.location.reload()})()})),this.votSyncVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.syncVolume=Number(t.target.checked),await At.d.set("syncVolume",this.data.syncVolume),C.A.log("syncVolume value changed. New value: ",this.data.syncVolume)})()})),this.votTranslationServiceSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.translateAPIErrors=Number(t.target.checked),await At.d.set("translateAPIErrors",this.data.translateAPIErrors),C.A.log("translateAPIErrors value changed. New value: ",this.data.translateAPIErrors)})()})),this.votSubtitlesMaxLengthSlider.input.addEventListener("input",(t=>{(async()=>{this.data.subtitlesMaxLength=Number(t.target.value),await At.d.set("subtitlesMaxLength",this.data.subtitlesMaxLength),this.votSubtitlesMaxLengthSlider.label.querySelector("strong").innerHTML=`${this.data.subtitlesMaxLength}`,this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength)})()})),this.votSubtitlesHighlightWordsCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.highlightWords=Number(t.target.checked),await At.d.set("highlightWords",this.data.highlightWords),C.A.log("highlightWords value changed. New value: ",this.data.highlightWords),this.subtitlesWidget.setHighlightWords(this.data.highlightWords)})()})),this.votShowPiPButtonCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showPiPButton=Number(t.target.checked),await At.d.set("showPiPButton",this.data.showPiPButton),C.A.log("showPiPButton value changed. New value: ",this.data.showPiPButton),this.votButton.pipButton.hidden=!(0,P.Bs)()||!this.data.showPiPButton,this.votButton.separator2.hidden=!(0,P.Bs)()||!this.data.showPiPButton})()})),this.votM3u8ProxyHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.m3u8ProxyHost=t.target.value||a.se,await At.d.set("m3u8ProxyHost",this.data.m3u8ProxyHost),C.A.log("m3u8ProxyHost value changed. New value: ",this.data.m3u8ProxyHost)})()})),this.votProxyWorkerHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.proxyWorkerHost=t.target.value||a.Pm,await At.d.set("proxyWorkerHost",this.data.proxyWorkerHost),C.A.log("proxyWorkerHost value changed. New value: ",this.data.proxyWorkerHost),window.location.reload()})()})),this.votAudioProxyCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.audioProxy=Number(t.target.checked),await At.d.set("audioProxy",this.data.audioProxy),C.A.log("audioProxy value changed. New value: ",this.data.audioProxy)})()})),this.votResetSettingsButton.addEventListener("click",(()=>{(async()=>{s.j.reset();const t=await At.d.list();for(let e=0;e{this.extraEvents.push({element:t,event:e,handler:o}),t.addEventListener(e,o)},e=(e,o,n)=>{for(const i of o)t(e,i,n)};if(this.resizeObserver=new ResizeObserver((t=>{for(let e=0;e550;this.votButton.container.dataset.position=this.votMenu.container.dataset.position=e?this.data?.buttonPos:"default",this.votButton.container.dataset.direction=this.data?.buttonPos&&"default"!==this.data?.buttonPos&&e?"column":"row"})),this.resizeObserver.observe(this.video),this.votMenu.container.setAttribute("style",`--vot-container-height: ${this.video.getBoundingClientRect().height}px`),["youtube","googledrive"].includes(this.site.host)&&"mobile"!==this.site.additionalData){this.syncVolumeObserver=new MutationObserver((t=>{if(this.audio.src&&this.data.syncVolume)for(let e=0;e{const e=t.target,o=this.votButton.container,n=this.votMenu.container,i=this.container,a=this.votSettingsDialog.container,r=document.querySelector(".vot-dialog-temp"),s=o.contains(e),l=n.contains(e),d=i.contains(e),c=a.contains(e),u=r?.contains(e)??!1;C.A.log(`[document click] ${s} ${l} ${d} ${c} ${u}`),s||l||c||u||(d||this.logout(0),this.votMenu.container.hidden=!0)})),o="pornhub"===this.site.host?"embed"===this.site.additionalData?document.querySelector("#player"):this.container.querySelector(".video-element-wrapper-js > div"):"twitter"===this.site.host?document.querySelector('div[data-testid="videoPlayer"]'):"yandexdisk"===this.site.host?document.querySelector(".video-player__player"):this.container,o&&e(o,["mousemove","mouseout"],this.resetTimerBound),t(this.votButton.container,"mousemove",this.changeOpacityOnEventBound),t(this.votMenu.container,"mousemove",this.changeOpacityOnEventBound),e(document,["touchstart","touchmove","touchend"],this.changeOpacityOnEventBound),t(this.votButton.container,"mousedown",(t=>{t.stopImmediatePropagation()})),t(this.votMenu.container,"mousedown",(t=>{t.stopImmediatePropagation()})),"youtube"===this.site.host&&(this.container.draggable=!1),"googledrive"===this.site.host&&(this.container.style.height="100%"),t(this.video,"canplaythrough",(async()=>{"rutube"===this.site.host&&this.video.src||(0,P.jI)(this.site.host,this.video)!==this.videoData.videoId&&(await this.handleSrcChanged(),C.A.log("lipsync mode is loadeddata"),await this.autoTranslate())})),t(this.video,"emptied",(()=>{this.video.src&&(0,P.jI)(this.site.host,this.video)===this.videoData.videoId||(C.A.log("lipsync mode is emptied"),this.videoData="",this.stopTranslation())})),["rutube","ok"].includes(this.site.host)||t(this.video,"volumechange",(()=>{this.syncVideoVolumeSlider()}))}logout(t){this.votMenu.container.hidden&&(this.votButton.container.style.opacity=t)}resetTimer(){clearTimeout(this.timer),this.logout(1),this.timer=setTimeout((()=>{this.logout(0)}),1e3)}changeOpacityOnEvent(t){clearTimeout(this.timer),this.logout(1),t.stopPropagation()}async changeSubtitlesLang(t){if(C.A.log("[onchange] subtitles",t),this.votSubtitlesSelect.setSelected(t),"disabled"===t)this.votSubtitlesSelect.setTitle(s.j.get("VOTSubtitlesDisabled")),this.subtitlesWidget.setContent(null),this.votDownloadSubtitlesButton.hidden=!0,this.YandexSubtitles=null;else{const e=await ot(this.subtitlesList.at(parseInt(t)));this.subtitlesWidget.setContent(e),this.votDownloadSubtitlesButton.hidden=!1,this.YandexSubtitles=e}}async updateSubtitlesLangSelect(){const t=[{label:s.j.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1},...this.subtitlesList.map(((t,e)=>({label:(s.j.get("langs")[t.language]??t.language.toUpperCase())+(t.translatedFromLanguage?` ${s.j.get("VOTTranslatedFrom")} ${s.j.get("langs")[t.translatedFromLanguage]??t.translatedFromLanguage.toUpperCase()}`:"")+("yandex"!==t.source?` ${t.source}`:"")+(t.isAutoGenerated?` (${s.j.get("VOTAutogenerated")})`:""),value:e,selected:!1,disabled:!1})))];this.votSubtitlesSelect.updateItems(t),await this.changeSubtitlesLang(t[0].value)}async updateSubtitles(){if(await this.changeSubtitlesLang("disabled"),!this.videoData.videoId)return console.error(`[VOT] ${s.j.getDefault("VOTNoVideoIDFound")}`),this.subtitlesList=[],this.subtitlesListVideoId=null,this.votButton.container.hidden=!0,void await this.updateSubtitlesLangSelect();this.votButton.container.hidden=!1,this.subtitlesListVideoId!==this.videoData.videoId&&(this.subtitlesList=await nt(this.site,this.videoData.videoId,this.videoData.detectedLanguage),this.subtitlesList?this.subtitlesListVideoId=this.videoData.videoId:await this.changeSubtitlesLang("disabled"),await this.updateSubtitlesLangSelect())}getVideoVolume(){let t=this.video?.volume;return["youtube","googledrive"].includes(this.site.host)&&(t=J.A.getVideoVolume()??t),t}setVideoVolume(t){if(["youtube","googledrive"].includes(this.site.host)){if(J.A.setVideoVolume(t))return}this.video.volume=t}isMuted(){return["youtube","googledrive"].includes(this.site.host)?J.A.isMuted():this.video?.muted}syncVideoVolumeSlider(){const t=this.isMuted()?0:100*this.getVideoVolume(),e=Math.round(t);this.votVideoVolumeSlider.input.value=e,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`,L.updateSlider(this.votVideoVolumeSlider.input),1===this.data.syncVolume&&(this.tempOriginalVolume=Number(e))}setSelectMenuValues(t,e){this.votTranslationLanguageSelect.fromSelect.setTitle(s.j.get("langs")[t]),this.votTranslationLanguageSelect.toSelect.setTitle(s.j.get("langs")[e]),this.votTranslationLanguageSelect.fromSelect.setSelected(t),this.votTranslationLanguageSelect.toSelect.setSelected(e),console.log(`[VOT] Set translation from ${t} to ${e}`),this.videoData.detectedLanguage=t,this.videoData.responseLanguage=e}syncVolumeWrapper(t,e){const o="translation"===t?this.votVideoVolumeSlider:this.votVideoTranslationVolumeSlider,n=Number(o.input.value),i=function(t,e,o,n){let i=e;return e>n?(i=o+(e-n),i=i>100?100:Math.max(i,0),t.volume=i/100):e100?100:Math.max(i,0),t.volume=i/100),i}("translation"===t?this.video:this.audio,e,n,"translation"===t?this.tempVolume:this.tempOriginalVolume);o.input.value=i,o.label.querySelector("strong").innerHTML=`${i}%`,L.updateSlider(o.input),this.tempOriginalVolume="translation"===t?i:e,this.tempVolume="translation"===t?e:i}async getVideoData(){const t={translationHelp:null,isStream:!1,duration:this.video?.duration||343,videoId:(0,P.jI)(this.site.host,this.video),detectedLanguage:this.translateFromLang,responseLanguage:this.translateToLang};if(!t.videoId)return this.ytData={},t;if(window.location.hostname.includes("youtube.com"))this.ytData=await J.A.getVideoData(),t.isStream=this.ytData.isLive,this.ytData.title&&(t.detectedLanguage=this.ytData.detectedLanguage,t.responseLanguage=this.translateToLang);else if(window.location.hostname.includes("rutube")||window.location.hostname.includes("ok.ru")||window.location.hostname.includes("my.mail.ru"))t.detectedLanguage="ru";else if(["youku"].includes(this.site.host))t.detectedLanguage="zh";else if(["vk"].includes(this.site.host)){const e=document.getElementsByTagName("track")?.[0]?.srclang;t.detectedLanguage=e||"auto"}else if(window.location.hostname.includes("coursera.org")){const e=await lt.getVideoData(this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else if(window.location.hostname.includes("coursehunter.net")){const e=await at.getVideoData();t.translationHelp={url:e.url},t.duration=e.duration||t.duration}else if(window.location.hostname.includes("banned.video")){const e=await bt.getVideoData(t.videoId);t.translationHelp={url:e.url},t.duration=e.duration||t.duration,t.isStream=e.live}else if(window.location.hostname.includes("weverse.io")){const e=await kt.getVideoData();t.detectedLanguage="ko",e&&(t.translationHelp={url:e.url},t.duration=e.duration||t.duration)}else if(window.location.hostname.includes("udemy.com")){const e=await mt.getVideoData(this.data.udemyData,this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else["bilibili","piped","invidious","bitchute","rumble","peertube","dailymotion","trovo","yandexdisk","coursehunter","directlink"].includes(this.site.host)&&(t.detectedLanguage="auto");return t}videoValidator(){if(["youtube","ok.ru","vk"].includes(this.site.host)&&(C.A.log("VideoValidator videoData: ",this.videoData),1===this.data.dontTranslateYourLang&&this.videoData.detectedLanguage===this.data.dontTranslateLanguage))throw new A("VOTDisableFromYourLang");if(!this.videoData.isStream&&this.videoData.duration>14400)throw new A("VOTVideoIsTooLong");return!0}lipSync(t=!1){if(C.A.log("lipsync video",this.video),this.video)if(this.audio.currentTime=this.video.currentTime,this.audio.playbackRate=this.video.playbackRate,t)if("play"!=t)["pause","stop","waiting"].includes(t)&&(C.A.log(`lipsync mode is ${t}`),this.audio.pause()),"playing"==t&&(C.A.log("lipsync mode is playing"),this.audio.play());else{C.A.log("lipsync mode is play");const t=this.audio.play();void 0!==t&&t.catch((t=>{if(console.error("[VOT]",t),"NotAllowedError"===t.name)throw this.transformBtn("error",s.j.get("grantPermissionToAutoPlay")),new A("grantPermissionToAutoPlay");if("NotSupportedError"===t.name)throw this.transformBtn("error",Ot.includes(window.location.hostname)?s.j.get("neededAdditionalExtension"):s.j.get("audioFormatNotSupported")),Ot.includes(window.location.hostname)?new A("neededAdditionalExtension"):new A("audioFormatNotSupported")}))}else C.A.log("lipsync mode is not set")}handleVideoEvent(t){C.A.log(`video ${t.type}`),this.lipSync(t.type)}stopTranslate(){for(const t of Et)this.video.removeEventListener(t,this.handleVideoEventBound);this.audio.pause(),this.audio.src="",this.audio.removeAttribute("src"),this.votVideoVolumeSlider.container.hidden=!0,this.votVideoTranslationVolumeSlider.container.hidden=!0,this.votDownloadButton.hidden=!0,this.downloadTranslationUrl=null,this.transformBtn("none",s.j.get("translateVideo")),C.A.log(`Volume on start: ${this.volumeOnStart}`),this.volumeOnStart&&this.setVideoVolume(this.volumeOnStart),this.volumeOnStart="",clearInterval(this.streamPing),clearTimeout(this.autoRetry),this.hls?.destroy(),this.hls=(0,P.CK)(),this.firstSyncVolume=!0}async translateExecutor(t){C.A.log("Run translateFunc",t),this.translateFunc(t,this.videoData.isStream,this.videoData.detectedLanguage,this.videoData.responseLanguage,this.videoData.translationHelp)}async updateTranslationErrorMsg(t){const e=s.j.get("translationTake"),o=s.j.get("VOTTranslatingError"),n=s.j.lang;if("VOTLocalizedError"===t?.name)this.transformBtn("error",t.localizedMessage);else if(1!==this.data.translateAPIErrors||t.includes(e)||"ru"===n)this.transformBtn("error",t);else{const e=await(0,Ct.Tl)(t,"ru",n);this.transformBtn("error",o),this.transformBtn("error",e)}}afterUpdateTranslation(t){this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,1===this.data.autoSetVolumeYandexStyle&&(this.votVideoVolumeSlider.input.value=100*this.data.autoVolume,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=100*this.data.autoVolume+"%",L.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=t}updateTranslation(t){if(this.audio.src=t,1===this.data.audioProxy&&t.startsWith("https://vtrans.s3-private.mds.yandex.net/tts/prod/")){const e=t.replace("https://vtrans.s3-private.mds.yandex.net/tts/prod/",""),o=`https://${this.data.proxyWorkerHost}/video-translation/audio-proxy/${e}`;console.log(`[VOT] Audio proxied via ${o}`),this.audio.src=o}if(this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),"twitter"===this.site.host)document.querySelector('button[data-testid="app-bar-back"][role="button"]').addEventListener("click",this.stopTranslationBound);this.video&&!this.video.paused&&this.lipSync("play");for(const t of Et)this.video.addEventListener(t,this.handleVideoEventBound);this.transformBtn("success",s.j.get("disableTranslate")),this.afterUpdateTranslation(t)}translateFunc(t,e,o,n,i){console.log("[VOT] Video Data: ",this.videoData);const a=i?.url?i.url:`${this.site.url}${t}`;if(C.A.log("Run videoValidator"),this.videoValidator(),e)return C.A.log("Executed stream translation"),void function(t,e,o,n){C.A.log(`Translate stream (url: ${t}, requestLang: ${e}, responseLang: ${o})`),Z(t,e,o,((t,e)=>{if(C.A.log("[exec callback] Requesting stream translation"),!t)return void n(!1,s.j.get("requestTranslationFailed"));const o=H.decodeStreamResponse(e);switch(console.log("[VOT] Stream Translation response: ",o),o.interval){case 10:n(!1,o.interval,s.j.get("translationTakeFewMinutes"));break;case 20:n(!0,o.interval,o||s.j.get("audioNotReceived"));break;case 0:n(!1,o.interval,s.j.get("streamNoConnectionToServer"))}}))}(a,o,n,(async(a,r,l)=>{if(C.A.log("[exec callback] translateStream callback"),(0,P.jI)(this.site.host,this.video)!==t)return;if(!a||!l.translatedInfo)return await this.updateTranslationErrorMsg(l),void(10===r&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,o,n,i)),1e3*r)));this.transformBtn("success",s.j.get("disableTranslate")),console.log(l);const d=l.pingId;C.A.log(`Stream pingId: ${d}`),this.streamPing=setInterval((async()=>await Y(d,(t=>C.A.log("Stream ping result: ",t)))),1e3*r),C.A.log(l.translatedInfo.url);const c=`https://${this.data.m3u8ProxyHost}/?all=yes&origin=${encodeURIComponent("https://strm.yandex.ru")}&referer=${encodeURIComponent("https://strm.yandex.ru")}&url=${encodeURIComponent(l.translatedInfo.url)}`;if(C.A.log(c),this.hls)this.hls.on(Hls.Events.MEDIA_ATTACHED,(function(){C.A.log("audio and hls.js are now bound together !")})),this.hls.on(Hls.Events.MANIFEST_PARSED,(function(t){C.A.log("manifest loaded, found "+t?.levels?.length+" quality level")})),this.hls.loadSource(c),this.hls.attachMedia(this.audio),this.hls.on(Hls.Events.ERROR,(function(t){if(t.fatal)switch(t.type){case Hls.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover"),this.hls.recoverMediaError();break;case Hls.ErrorTypes.NETWORK_ERROR:console.error("fatal network error encountered",t);break;default:this.hls.destroy()}})),C.A.log(this.hls);else{if(!this.audio.canPlayType("application/vnd.apple.mpegurl"))throw new A("audioFormatNotSupported");this.audio.src=c}if("youtube"===this.site.host&&J.A.videoSeek(this.video,10),this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),this.video.src||this.video.currentSrc||this.video.srcObject){this.video&&!this.video.paused&&this.lipSync("play");for(const t of Et)this.video.addEventListener(t,this.handleVideoEventBound);this.afterUpdateTranslation(c)}else this.stopTranslation()}));if(["udemy","coursera"].includes(this.site.host)&&!i)throw new A("VOTTranslationHelpNull");const r=this.videoTranslations.find((e=>e.videoId===t&&e.expires>Date.now()/1e3&&e.from===o&&e.to===n));if(r)return this.updateTranslation(r.url),void C.A.log("[translateFunc] A cached translate was received");const l=this.subtitlesList.some((t=>"yandex"===t.source))?2e4:3e4;!function(t,e,o,n,i,a){C.A.log(`Translate video (url: ${t}, duration: ${e}, requestLang: ${o}, responseLang: ${n})`),C.A.log("translationHelp:",i),Bt?C.A.log("translationPanding return"):(Bt=!0,K(t,e,o,n,i,((t,e)=>{if(Bt=!1,C.A.log("[exec callback] Requesting video translation"),!t)return void a(!1,s.j.get("requestTranslationFailed"));const o=H.decodeTranslationResponse(e);switch(console.log("[VOT] Translation response: ",o),o.status){case 0:a(!1,o.message);break;case 1:case 5:a(!!o.url,o.url||s.j.get("audioNotReceived"));break;case 2:a(!1,o.remainingTime?(0,P.ox)(o.remainingTime):s.j.get("translationTakeFewMinutes"));break;case 3:case 6:a(!1,s.j.get("videoBeingTranslated"))}})))}(a,this.videoData.duration,o,n,i,(async(a,r)=>{if(C.A.log("[exec callback] translateVideo callback"),(0,P.jI)(this.site.host,this.video)===t){if(!a)return await this.updateTranslationErrorMsg(r),r.includes(s.j.get("translationTake"))&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,o,n,i)),l)),void console.error("[VOT]",r);this.updateTranslation(r),this.subtitlesList.some((t=>"yandex"===t.source&&t.language===this.videoData.responseLanguage))||(this.subtitlesList=await nt(this.site,this.videoData.videoId,this.videoData.detectedLanguage),await this.updateSubtitlesLangSelect()),this.videoTranslations.push({videoId:t,from:o,to:n,url:r,expires:Date.now()/1e3+this.videoTranslationTTL})}}))}stopTranslation(){this.stopTranslate(),this.syncVideoVolumeSlider()}async handleSrcChanged(){C.A.log("[VideoHandler] src changed",this),this.firstPlay=!0,this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage);const t=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=t,t&&(this.votMenu.container.hidden=t),this.site.selector||(this.container=this.video.parentElement),this.container.contains(this.votButton.container)||(this.container.appendChild(this.votButton.container),this.container.appendChild(this.votMenu.container)),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),this.translateToLang=this.data.responseLanguage??"ru"}async release(){C.A.log("[VideoHandler] release"),this.initialized=!1,this.releaseExtraEvents(),this.subtitlesWidget.release(),this.votButton.container.remove(),this.votMenu.container.remove()}}const jt=new class{constructor(){this.videoCache=new Set,this.onVideoAdded=new Mt,this.onVideoRemoved=new Mt,this.observer=new MutationObserver((t=>{window.requestIdleCallback((()=>{for(let e=0;e{for(let e=0;e=3}(t)?requestAnimationFrame(o):e(t)}()}(t,(t=>{this.handleVideoAdded(t)}))}handleVideoAdded=t=>{this.onVideoAdded.dispatch(t)};handleVideoRemoved=t=>{document.contains(t)||(this.videoCache.delete(t),this.onVideoRemoved.dispatch(t))}},Dt=new WeakMap;function _t(t,e){if(t.shadowRoot){let o=t.selector?Array.from(document.querySelectorAll(t.selector)).find((t=>t.shadowRoot.contains(e))):e.parentElement;return o&&o.shadowRoot?o.parentElement:o}{const o=Pt.browser.version.split(".")[0];if(t.selector?.includes(":not")&&t.selector?.includes("*")&&o&&("Chrome"===Pt.browser.name&&Number(o)<88||"Firefox"===Pt.browser.name&&Number(o)<84)){const o=t.selector.split(" *")[0];return o?Array.from(document.querySelectorAll(o)).find((t=>t.contains(e))):e.parentElement}return t.selector?Array.from(document.querySelectorAll(t.selector)).find((t=>t.contains(e))):e.parentElement}}(async function(){C.A.log("Loading extension..."),await s.j.update(),C.A.log(`Selected menu language: ${s.j.lang}`),C.A.log("Extension compatibility passed..."),jt.onVideoAdded.addListener((t=>{for(const e of function(){const t=window.location.hostname,e=new URL(window.location),o=o=>o instanceof RegExp?o.test(t):"string"==typeof o?t.includes(o):"function"==typeof o&&o(e);return Tt.filter((t=>(Array.isArray(t.match)?t.match.some(o):o(t.match))&&t.host&&t.url))}()){if(!e)continue;let o=_t(e,t);if(o&&(("rumble"!==e.host||t.style.display)&&(["peertube","directlink"].includes(e.host)&&(e.url=window.location.origin),!Dt.has(t)))){Dt.set(t,new Ft(t,o,e));break}}})),jt.onVideoRemoved.addListener((async t=>{Dt.has(t)&&(await Dt.get(t).release(),Dt.delete(t))})),jt.enable()})().catch((t=>{console.error("[VOT]",t)}))})()})(); \ No newline at end of file diff --git a/dist/vot-cloudflare.user.js b/dist/vot-cloudflare.user.js index e4de2a6d..3e75793d 100644 --- a/dist/vot-cloudflare.user.js +++ b/dist/vot-cloudflare.user.js @@ -2835,9 +2835,13 @@ const yandexProtobuf = { var es5 = __webpack_require__("./node_modules/bowser/es5.js"); ;// CONCATENATED MODULE: ./src/getUUID.js function getUUID() { - return "xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e, n) => { - return (e === "x" ? (16 * Math.random()) | 0 : (3 & n) | 8).toString(16); - }); + const hexDigits = "0123456789ABCDEF"; + let uuid = ""; + for (let i = 0; i < 32; i++) { + const randomDigit = Math.floor(Math.random() * 16); + uuid += hexDigits[randomDigit]; + } + return uuid; } diff --git a/dist/vot-min.user.js b/dist/vot-min.user.js index 098756df..5102a068 100644 --- a/dist/vot-min.user.js +++ b/dist/vot-min.user.js @@ -138,4 +138,4 @@ // @supportURL https://github.com/ilyhalight/voice-over-translation/issues // ==/UserScript== -(()=>{var t={"./node_modules/bowser/es5.js":function(t){t.exports=function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=90)}({17:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n=o(18),i=function(){function t(){}return t.getFirstMatch=function(t,e){var o=e.match(t);return o&&o.length>0&&o[1]||""},t.getSecondMatch=function(t,e){var o=e.match(t);return o&&o.length>1&&o[2]||""},t.matchAndReturnConst=function(t,e,o){if(t.test(e))return o},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,o,n){void 0===n&&(n=!1);var i=t.getVersionPrecision(e),a=t.getVersionPrecision(o),r=Math.max(i,a),s=0,l=t.map([e,o],(function(e){var o=r-t.getVersionPrecision(e),n=e+new Array(o+1).join(".0");return t.map(n.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(n&&(s=r-Math.min(i,a)),r-=1;r>=s;){if(l[0][r]>l[1][r])return 1;if(l[0][r]===l[1][r]){if(r===s)return 0;r-=1}else if(l[0][r]1?i-1:0),r=1;r0){var r=Object.keys(o),l=s.default.find(r,(function(t){return e.isOS(t)}));if(l){var d=this.satisfies(o[l]);if(void 0!==d)return d}var c=s.default.find(r,(function(t){return e.isPlatform(t)}));if(c){var u=this.satisfies(o[c]);if(void 0!==u)return u}}if(a>0){var h=Object.keys(i),p=s.default.find(h,(function(t){return e.isBrowser(t,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var o=this.getBrowserName().toLowerCase(),n=t.toLowerCase(),i=s.default.getBrowserTypeByAlias(n);return e&&i&&(n=i.toLowerCase()),n===o},e.compareVersion=function(t){var e=[0],o=t,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(o=t.substr(1),"="===t[1]?(n=!0,o=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?o=t.substr(1):"~"===t[0]&&(n=!0,o=t.substr(1)),e.indexOf(s.default.compareVersions(i,o,n))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=d,t.exports=e.default},92:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=/version\/(\d+(\.?_?\d+)+)/i,r=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},o=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},o=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},o=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},o=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},o=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},o=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},o=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},o=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},o=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},o=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},o=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},o=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return o&&(e.version=o),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},o=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},o=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},o=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},o=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},o=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},o=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},o=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},o=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},o=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},o=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},o=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},o=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e={name:"Android Browser"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(e,t),version:i.default.getSecondMatch(e,t)}}}];e.default=r,t.exports=e.default},93:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/Roku\/DVP/],describe:function(t){var e=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:a.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),o=i.default.getWindowsVersionName(e);return{name:a.OS_MAP.Windows,version:e,versionName:o}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:a.OS_MAP.iOS},o=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return o&&(e.version=o),e}},{test:[/macintosh/i],describe:function(t){var e=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),o=i.default.getMacOSVersionName(e),n={name:a.OS_MAP.MacOS,version:e};return o&&(n.versionName=o),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),o=i.default.getAndroidVersionName(e),n={name:a.OS_MAP.Android,version:e};return o&&(n.versionName=o),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),o={name:a.OS_MAP.WebOS};return e&&e.length&&(o.version=e),o}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:a.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.PlayStation4,version:e}}}];e.default=r,t.exports=e.default},94:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",o={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(o.model=e),o}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),o=t.test(/like (ipod|iphone)/i);return e&&!o},describe:function(t){var e=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];e.default=r,t.exports=e.default},95:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:a.ENGINE_MAP.Blink};var e=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:a.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:a.ENGINE_MAP.Trident},o=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:a.ENGINE_MAP.Presto},o=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=t.test(/gecko/i),o=t.test(/like gecko/i);return e&&!o},describe:function(t){var e={name:a.ENGINE_MAP.Gecko},o=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:a.ENGINE_MAP.WebKit},o=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}}];e.default=r,t.exports=e.default}})},"./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss":(t,e,o)=>{"use strict";o.d(e,{A:()=>s});var n=o("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),i=o.n(n),a=o("./node_modules/css-loader/dist/runtime/api.js"),r=o.n(a)()(i());r.push([t.id,'.vot-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:none;border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-ontheme));background-color:rgb(var(--vot-helper-theme));box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer;transition:box-shadow .2s}.vot-button[hidden]{display:none !important}.vot-button::-moz-focus-inner{border:none}.vot-button::before,.vot-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-button::before{background-color:rgb(var(--vot-helper-ontheme));transition:opacity .2s}.vot-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-button:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.vot-button:hover::before{opacity:.08}.vot-button:active{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.vot-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s}.vot-button:disabled{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.12);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);box-shadow:none;cursor:initial}.vot-button:disabled::before,.vot-button:disabled::after{opacity:0}.vot-outlined-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:solid 1px;border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.24);border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:34px;outline:none;cursor:pointer}.vot-outlined-button[hidden]{display:none !important}.vot-outlined-button::-moz-focus-inner{border:none}.vot-outlined-button::before,.vot-outlined-button::after{content:"";position:absolute;border-radius:3px;top:0;right:0;bottom:0;left:0;opacity:0}.vot-outlined-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-outlined-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-outlined-button:hover::before{opacity:.04}.vot-outlined-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-outlined-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-outlined-button:disabled::before,.vot-outlined-button:disabled::after{opacity:0}.vot-text-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:4px;padding:0 8px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-text-button[hidden]{display:none !important}.vot-text-button::-moz-focus-inner{border:none}.vot-text-button::before,.vot-text-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-text-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-text-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-text-button:hover::before{opacity:.04}.vot-text-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-text-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-text-button:disabled::before,.vot-text-button:disabled::after{opacity:0}.vot-icon-button{--vot-helper-onsurface: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:50%;padding:0;width:36px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;fill:var(--vot-helper-onsurface);color:var(--vot-helper-onsurface);background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-icon-button[hidden]{display:none !important}.vot-icon-button::-moz-focus-inner{border:none}.vot-icon-button::before,.vot-icon-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-icon-button::before{background-color:var(--vot-helper-onsurface);transition:opacity .2s}.vot-icon-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity .3s,background-size .4s}.vot-icon-button:hover::before{opacity:.04}.vot-icon-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s,opacity 0s}.vot-icon-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);fill:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-icon-button:disabled::before,.vot-icon-button:disabled::after{opacity:0}.vot-textfield{--vot-helper-theme: rgb( var(--vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243)) ) !important;--vot-helper-safari1: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.38 ) !important;--vot-helper-safari2: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari3: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;position:relative !important;display:inline-block;padding-top:6px !important;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-textfield[hidden]{display:none !important}.vot-textfield>input,.vot-textfield>textarea{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:0 !important;border-style:solid !important;border-width:1px !important;border-color:rgba(0,0,0,0) var(--vot-helper-safari2) var(--vot-helper-safari2) !important;border-radius:4px !important;padding:15px 13px 15px !important;width:100% !important;height:inherit !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;-webkit-text-fill-color:currentColor !important;background-color:rgba(0,0,0,0) !important;box-shadow:inset 1px 0 rgba(0,0,0,0),inset -1px 0 rgba(0,0,0,0),inset 0 -1px rgba(0,0,0,0) !important;font-family:inherit !important;font-size:inherit !important;line-height:inherit !important;caret-color:var(--vot-helper-theme) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input:not(:focus):placeholder-shown,.vot-textfield>textarea:not(:focus):placeholder-shown{border-top-color:var(--vot-helper-safari2) !important}.vot-textfield>input+span,.vot-textfield>textarea+span{position:absolute !important;top:0 !important;left:0 !important;display:flex !important;width:100% !important;max-height:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;font-size:75% !important;line-height:15px !important;cursor:text !important;transition:color .2s,font-size .2s,line-height .2s !important;pointer-events:none !important}.vot-textfield>input:not(:focus):placeholder-shown+span,.vot-textfield>textarea:not(:focus):placeholder-shown+span{font-size:inherit !important;line-height:68px !important}.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{content:"" !important;display:block !important;-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin-top:6px !important;border-top:solid 1px var(--vot-helper-safari2) !important;min-width:10px !important;height:8px !important;pointer-events:none !important;box-shadow:inset 0 1px rgba(0,0,0,0) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input+span::before,.vot-textfield>textarea+span::before{margin-right:4px !important;border-left:solid 1px rgba(0,0,0,0) !important;border-radius:4px 0 !important}.vot-textfield>input+span::after,.vot-textfield>textarea+span::after{flex-grow:1 !important;margin-left:4px !important;border-right:solid 1px rgba(0,0,0,0) !important;border-radius:0 4px !important}.vot-textfield>input:not(:focus):placeholder-shown+span::before,.vot-textfield>input:not(:focus):placeholder-shown+span::after,.vot-textfield>textarea:not(:focus):placeholder-shown+span::before,.vot-textfield>textarea:not(:focus):placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}.vot-textfield:hover>input,.vot-textfield:hover>textarea{border-color:rgba(0,0,0,0) var(--vot-helper-safari3) var(--vot-helper-safari3) !important}.vot-textfield:hover>input+span::before,.vot-textfield:hover>input+span::after,.vot-textfield:hover>textarea+span::before,.vot-textfield:hover>textarea+span::after{border-top-color:var(--vot-helper-safari3) !important}.vot-textfield:hover>input:not(:focus):placeholder-shown,.vot-textfield:hover>textarea:not(:focus):placeholder-shown{border-color:var(--vot-helper-safari3) !important}.vot-textfield>input:focus,.vot-textfield>textarea:focus{border-color:rgba(0,0,0,0) var(--vot-helper-theme) var(--vot-helper-theme) !important;box-shadow:inset 1px 0 var(--vot-helper-theme),inset -1px 0 var(--vot-helper-theme),inset 0 -1px var(--vot-helper-theme) !important;outline:none !important}.vot-textfield>input:focus+span,.vot-textfield>textarea:focus+span{color:var(--vot-helper-theme) !important}.vot-textfield>input:focus+span::before,.vot-textfield>input:focus+span::after,.vot-textfield>textarea:focus+span::before,.vot-textfield>textarea:focus+span::after{border-top-color:var(--vot-helper-theme) !important;box-shadow:inset 0 1px var(--vot-helper-theme) !important}.vot-textfield>input:disabled,.vot-textfield>input:disabled+span,.vot-textfield>textarea:disabled,.vot-textfield>textarea:disabled+span{border-color:rgba(0,0,0,0) var(--vot-helper-safari1) var(--vot-helper-safari1) !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;pointer-events:none !important}.vot-textfield>input:disabled+span::before,.vot-textfield>input:disabled+span::after,.vot-textfield>textarea:disabled+span::before,.vot-textfield>textarea:disabled+span::after{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown,.vot-textfield>input:disabled:placeholder-shown+span,.vot-textfield>textarea:disabled:placeholder-shown,.vot-textfield>textarea:disabled:placeholder-shown+span{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown+span::before,.vot-textfield>input:disabled:placeholder-shown+span::after,.vot-textfield>textarea:disabled:placeholder-shown+span::before,.vot-textfield>textarea:disabled:placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}@media not all and (min-resolution: 0.001dpcm){@supports(-webkit-appearance: none){.vot-textfield>input,.vot-textfield>input+span,.vot-textfield>textarea,.vot-textfield>textarea+span,.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{transition-duration:.1s !important}}}.vot-checkbox{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );z-index:0;position:relative;display:inline-block;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-checkbox[hidden]{display:none !important}.vot-checkbox>input{appearance:none;-moz-appearance:none;-webkit-appearance:none;z-index:10000;position:absolute;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:3px 1px;border:solid 2px;background:rgba(0,0,0,0);border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6);border-radius:2px;width:18px;height:18px;outline:none;cursor:pointer;transition:border-color .2s,background-color .2s}.vot-checkbox>input+span{display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding-left:30px;width:inherit;cursor:pointer;font-weight:normal}.vot-checkbox>input+span::before{content:"";position:absolute;left:-10px;top:-8px;display:block;border-radius:50%;width:40px;height:40px;background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0));opacity:0;transform:scale(1);pointer-events:none;transition:opacity .3s,transform .2s}.vot-checkbox>input+span::after{content:"";z-index:10000;display:block;position:absolute;top:3px;left:1px;-webkit-box-sizing:content-box !important;-moz-box-sizing:content-box !important;box-sizing:content-box !important;width:10px;height:5px;border:solid 2px rgba(0,0,0,0);border-right-width:0;border-top-width:0;pointer-events:none;transform:translate(3px, 4px) rotate(-45deg);transition:border-color .2s}.vot-checkbox>input:checked,.vot-checkbox>input:indeterminate{border-color:rgb(var(--vot-helper-theme));background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::before,.vot-checkbox>input:indeterminate+span::before{background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::after,.vot-checkbox>input:indeterminate+span::after{border-color:rgb(var(--vot-helper-ontheme, 255, 255, 255))}.vot-checkbox>input:indeterminate+span::after{border-left-width:0;transform:translate(4px, 3px)}.vot-checkbox:hover>input+span::before{opacity:.04}.vot-checkbox:active>input,.vot-checkbox:active:hover>input{border-color:rgb(var(--vot-helper-theme))}.vot-checkbox:active>input:checked{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6)}.vot-checkbox:active>input+span::before{opacity:1;transform:scale(0);transition:transform 0s,opacity 0s}.vot-checkbox>input:disabled{border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled:checked,.vot-checkbox>input:disabled:indeterminate{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38)}.vot-checkbox>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled+span::before{opacity:0;transform:scale(0)}.vot-slider{--vot-safari-helper1: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.04 ) !important;--vot-safari-helper2: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.12 ) !important;--vot-safari-helper3: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.16 ) !important;--vot-safari-helper4: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.24 ) !important;display:inline-block;width:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;font-family:var(--vot-font, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-slider[hidden]{display:none !important}.vot-slider>input{-webkit-appearance:none !important;appearance:none !important;position:relative !important;top:24px !important;display:block !important;margin:0 0 -36px !important;width:100% !important;height:36px !important;background-color:rgba(0,0,0,0) !important;cursor:pointer !important}.vot-slider>input:last-child{position:static !important;margin:0 !important}.vot-slider>span{display:inline-block !important;margin-bottom:36px !important}.vot-slider>input:disabled{cursor:default !important;opacity:.38 !important}.vot-slider>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input::-webkit-slider-runnable-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-webkit-slider-thumb{margin:0 !important;appearance:none !important;-webkit-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper1) !important}.vot-slider>input:active::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper4) !important}.vot-slider>input:disabled::-webkit-slider-runnable-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-webkit-slider-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;color:rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-range-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-moz-range-thumb{appearance:none !important;-moz-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider>input::-moz-range-progress{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider:hover>input:hover::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-moz-range-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-moz-range-progress{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important}.vot-slider>input:disabled::-moz-range-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-focus-outer{border:none !important}.vot-slider>input:focus{outline:none !important}.vot-slider>input::-ms-track{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:17px 0 !important;border:none !important;border-radius:1px !important;padding:0 17px !important;width:100% !important;height:2px !important;background-color:rgba(0,0,0,0) !important}.vot-slider>input::-ms-fill-lower{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider>input::-ms-fill-upper{border-radius:1px !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-ms-thumb{appearance:none !important;margin:0 17px !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-ms-fill-lower{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-ms-fill-upper{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;opacity:.38 !important}.vot-slider>input:disabled::-ms-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::before{content:"" !important;display:block !important;position:absolute !important;width:calc(100%*var(--vot-progress, 0)) !important;height:2px !important;top:calc(50% - 1px) !important;background:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0) !important;--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87) !important;--vot-helper-safari1: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari2: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;display:flex;align-items:center;justify-content:space-between;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;line-height:1.5;text-align:start;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-select[hidden]{display:none !important}.vot-select-label{font-size:16px}.vot-select-outer{display:flex;align-items:center;justify-content:space-between;max-width:120px;width:120px;padding:0 5px;border-style:solid !important;border-width:1px !important;border-color:var(--vot-helper-safari1) !important;border-radius:4px !important;cursor:pointer;transition:border .2s !important}.vot-select-outer:hover{border-color:var(--vot-helper-safari2) !important}.vot-select-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vot-select-arrow-icon{width:20px;height:32px;display:flex;justify-content:center;align-items:center}.vot-select-content-list{display:flex;flex-direction:column}.vot-select-content-list .vot-select-content-item{padding:5px 10px;border-radius:8px;cursor:pointer}.vot-select-content-list .vot-select-content-item:not([inert]):hover{background-color:#2a2c31}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]{color:rgb(var(--vot-primary-rgb, 33, 150, 243));background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.2)}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]:hover{background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.1) !important}.vot-select-content-list .vot-select-content-item[data-vot-disabled=true]{cursor:default}.vot-select-content-list .vot-select-content-item[hidden]{display:none !important}.vot-header{color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-weight:bold;line-height:1.5;text-align:start}.vot-header[hidden]{display:none !important}.vot-header:not(:first-child){padding-top:8px}.vot-header-level-1{font-size:2em}.vot-header-level-2{font-size:1.5em}.vot-header-level-3{font-size:1.17em}.vot-header-level-4{font-size:1em}.vot-header-level-5{font-size:.83em}.vot-header-level-6{font-size:.67em}.vot-info{display:flex;color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-info[hidden]{display:none !important}.vot-info>:not(:first-child){color:rgba(var(--vot-helper-onsurface-rgb), 0.5);flex:1;margin-left:8px}.vot-lang-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);display:flex;align-items:center;justify-content:space-between;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-lang-select[hidden]{display:none !important}.vot-lang-select-icon{width:32px;height:32px;display:flex;justify-content:center;align-items:center}.vot-segmented-button{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:5rem;transform:translate(-50%);user-select:none;display:flex;align-items:center;height:32px;max-width:100vw;background:rgb(var(--vot-surface-rgb, 255, 255, 255));color:var(--vot-helper-theme);fill:var(--vot-helper-theme);border-radius:4px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;cursor:default;transition:opacity .5s;z-index:10000}.vot-segmented-button[hidden]{display:none !important}.vot-segmented-button *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-segmented-button .vot-separator{width:1px;height:50%;background:rgba(var(--vot-helper-theme-rgb), 0.1)}.vot-segmented-button .vot-separator[hidden]{display:none !important}.vot-segmented-button .vot-segment,.vot-segmented-button .vot-segment-only-icon{position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;height:100%;padding:0 8px;background-color:rgba(0,0,0,0);color:inherit;transition:background-color 100ms ease-in-out;border:none}.vot-segmented-button .vot-segment[hidden],.vot-segmented-button [hidden].vot-segment-only-icon{display:none !important}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before,.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before{background-color:rgb(var(--vot-helper-theme-rgb));transition:opacity .2s}.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-segmented-button .vot-segment:hover::before,.vot-segmented-button .vot-segment-only-icon:hover::before{opacity:.04}.vot-segmented-button .vot-segment:active::after,.vot-segmented-button .vot-segment-only-icon:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-segmented-button .vot-segment-only-icon{min-width:32px;padding:0}.vot-segmented-button .vot-segment-label{margin-left:8px;white-space:nowrap}.vot-segmented-button[data-status=success] .vot-translate-button{color:rgb(var(--vot-primary-rgb, 33, 150, 243));fill:rgb(var(--vot-primary-rgb, 33, 150, 243))}.vot-segmented-button[data-status=error] .vot-translate-button{color:#f28b82;fill:#f28b82}.vot-segmented-button[data-translating=true] #vot-translating-icon{display:block !important}.vot-segmented-button[data-translating=true] #vot-translate-icon{display:none !important}.vot-segmented-button[data-direction=column]{flex-direction:column;height:fit-content}.vot-segmented-button[data-direction=column] .vot-segment-label{display:none}.vot-segmented-button[data-direction=column]>.vot-segment-only-icon,.vot-segmented-button[data-direction=column]>.vot-segment{padding:8px}.vot-segmented-button[data-direction=column] .vot-separator{height:1px;width:50%}.vot-segmented-button[data-position=left]{left:50px;top:12.5vh}.vot-segmented-button[data-position=right]{left:auto;right:0;top:12.5vh}.vot-segmented-button svg{width:fit-content}.vot-menu{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:calc(5rem + 32px + 16px);user-select:none;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);border-radius:8px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;min-width:300px;cursor:default;z-index:10000;visibility:visible;opacity:1;transform-origin:top;transform:translate(-50%) scale(1);transition:opacity .3s,transform .1s}.vot-menu *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-menu[hidden]{pointer-events:none;display:block !important;visibility:hidden;opacity:0;transform:translate(-50%) scale(0)}.vot-menu-content-wrapper{display:flex;flex-direction:column;min-height:100px;max-height:calc(var(--vot-container-height, 75vh) - (5rem + 32px + 16px)*2);overflow:auto}.vot-menu-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-menu-header-container:empty{padding:0 0 16px 0}.vot-menu-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-menu-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0;text-align:start}.vot-menu-title{flex:1;font-size:16px;line-height:1;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 16px;gap:8px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar,.vot-menu-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-menu-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-footer-container:empty{padding:16px 0 0 0}.vot-menu[data-position=left]{left:240px;top:12.5vh}.vot-menu[data-position=right]{right:-80px;left:auto;top:12.5vh}.vot-dialog-container{visibility:visible;position:absolute;z-index:10000}.vot-dialog-container[hidden]{display:block !important;pointer-events:none;visibility:hidden}.vot-dialog-container *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-dialog-backdrop{background-color:rgba(0,0,0,.6);position:fixed;top:0;right:0;bottom:0;left:0;opacity:1;transition:opacity .3s}[hidden]>.vot-dialog-backdrop{pointer-events:none;opacity:0}.vot-dialog{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);display:block;position:fixed;top:50%;bottom:50%;max-width:initial;max-height:initial;width:min(var(--vot-dialog-width, 512px),100%);height:fit-content;inset-inline-start:0px;inset-inline-end:0px;inset-block-start:0px;inset-block-end:0px;border-radius:8px;margin:auto;padding:0;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);box-shadow:0 0 16px rgba(0,0,0,.12),0 16px 16px rgba(0,0,0,.24);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;user-select:none;visibility:visible;overflow:auto;overflow-y:hidden;opacity:1;transform-origin:center;transform:scale(1);transition:opacity .3s,transform .1s}[hidden]>.vot-dialog{pointer-events:none;opacity:0;transform:scale(0.5);transition:opacity .1s,transform .2s}.vot-dialog-content-wrapper{display:flex;flex-direction:column;max-height:75vh;overflow:auto}.vot-dialog-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-dialog-header-container:empty{padding:0 0 20px 0}.vot-dialog-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-dialog-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0}.vot-dialog-title{flex:1;font-size:115.3846153846%;font-weight:bold;line-height:1;padding-bottom:16px;padding-inline-end:20px;padding-inline-start:20px;padding-top:20px}.vot-dialog-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 20px;gap:16px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar,.vot-dialog-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-dialog-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-dialog-footer-container:empty{padding:20px 0 0 0}.vot-subtitles-widget{display:flex;justify-content:center;align-items:center;position:absolute;width:50%;max-height:100%;min-height:20%;z-index:10000;left:25%;top:75%;pointer-events:none}.vot-subtitles{position:relative;max-width:100%;max-height:100%;width:max-content;background:var(--vot-subtitles-background, rgba(46, 47, 52, 0.8));color:var(--vot-subtitles-color, rgb(227, 227, 227));border-radius:1rem;pointer-events:all;padding:1rem;font-size:2rem;line-height:normal;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vot-subtitles span{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.vot-subtitles .passed{color:var(--vot-subtitles-passed-color, rgb(33, 150, 243))}:root{--vot-font-family: "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system;--vot-primary-rgb: 139, 180, 245;--vot-onprimary-rgb: 32, 33, 36;--vot-surface-rgb: 32, 33, 36;--vot-onsurface-rgb: 227, 227, 227;--vot-subtitles-background: rgba(var(--vot-surface-rgb, 46, 47, 52), 0.8);--vot-subtitles-color: rgb(var(--vot-onsurface-rgb, 227, 227, 227));--vot-subtitles-passed-color: rgb(var(--vot-primary-rgb, 33, 150, 243))}vot-block{display:block}',""]);const s=r},"./node_modules/css-loader/dist/runtime/api.js":t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,i,a){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var s=0;s0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js":t=>{"use strict";t.exports=function(t){return t[1]}},"./node_modules/requestidlecallback-polyfill/index.js":()=>{window.requestIdleCallback=window.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)},window.cancelIdleCallback=window.cancelIdleCallback||function(t){clearTimeout(t)}},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":(t,e,o)=>{"use strict";t.exports=function(t){var e=o.nc;e&&t.setAttribute("nonce",e)}},"./node_modules/style-loader/dist/runtime/styleDomAPI.js":t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(o){!function(t,e,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,i&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var a=o.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,o)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},"./node_modules/style-loader/dist/runtime/styleTagTransform.js":t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},"./node_modules/webpack-monkey/lib/node/deps/style-loader-insertStyleElement.js":t=>{t.exports=function(){return function(t){return t.styleTagTransform=function(t,e){e?.remove(),GM_addStyle(t)},document.createElement("style")}.apply(null,arguments)}},"./src/config/config.js":(t,e,o)=>{"use strict";o.d(e,{Cc:()=>s,JD:()=>l,K2:()=>c,Pm:()=>a,QL:()=>u,S7:()=>r,mE:()=>d,rl:()=>n,rw:()=>h,se:()=>i});const n="api.browser.yandex.ru",i="m3u8-proxy.toil.cc",a="vot.toil.cc",r="bt8xH3VOlb4mqf0nqAibnDOoiPlXsisf",s="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 YaBrowser/24.4.0.0 Safari/537.36",l=.15,d="yandex",c="yandex",u={yandex:"https://translate.toil.cc/detect",rustServer:"https://rust-server-531j.onrender.com/detect"},h={yandex:"https://translate.toil.cc/translate",deepl:"https://translate-deepl.toil.cc/translate"}},"./src/utils/debug.js":(t,e,o)=>{"use strict";o.d(e,{A:()=>i});const n={log:(...t)=>{}},i=n},"./src/yandexRequest.js":(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>a});var n=o("./src/config/config.js"),i=o("./src/utils/debug.js");const a=async function(t,e,o,a){try{i.A.log("yandexRequest:",t);const r={url:`https://${n.rl}${t}`,method:"POST",headers:{Accept:"application/x-protobuf","Accept-Language":"en","Content-Type":"application/x-protobuf","User-Agent":n.Cc,Pragma:"no-cache","Cache-Control":"no-cache","Sec-Fetch-Mode":"no-cors","sec-ch-ua":null,"sec-ch-ua-mobile":null,"sec-ch-ua-platform":null,...o},binary:!0,data:new Blob([e]),responseType:"arraybuffer"};GM_xmlhttpRequest({...r,onload:t=>{i.A.log("yandexRequest:",t.status,t),a(200===t.status,t.response)},onerror:t=>{console.error("[VOT]",t),a(!1)}})}catch(t){console.error("[VOT]",t),a(!1)}}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={id:n,exports:{}};return t[n].call(a.exports,a,a.exports,o),a.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nc=void 0,(()=>{"use strict";const t=["invidious.snopyta.org","yewtu.be","invidious.kavin.rocks","vid.puffyan.us","invidious.namazso.eu","inv.riverside.rocks","yt.artemislena.eu","invidious.flokinet.to","invidious.esmailelbob.xyz","y.com.sb","invidious.nerdvpn.de","inv.vern.cc","invidious.slipfox.xyz","invidio.xamh.de","invidious.dhusch.de"],e=["piped.video","piped.tokhmi.xyz","piped.moomoo.me","piped.syncpundit.io","piped.mha.fi","watch.whatever.social","piped.garudalinux.org","efy.piped.pages.dev","watch.leptons.xyz","piped.lunar.icu","yt.dc09.ru","piped.mint.lgbt","il.ax","piped.privacy.com.de","piped.esmailelbob.xyz","piped.projectsegfau.lt","piped.in.projectsegfau.lt","piped.us.projectsegfau.lt","piped.privacydev.net","piped.palveluntarjoaja.eu","piped.smnz.de","piped.adminforge.de","piped.qdi.fi","piped.hostux.net","piped.chauvet.pro","piped.jotoma.de","piped.pfcd.me","piped.frontendfriendly.xyz"],n=["proxitok.pabloferreiro.es","proxitok.pussthecat.org","tok.habedieeh.re","proxitok.esmailelbob.xyz","proxitok.privacydev.net","tok.artemislena.eu","tok.adminforge.de","tik.hostux.net","tt.vern.cc","cringe.whatever.social","proxitok.lunar.icu","proxitok.privacy.com.de"],i=["peertube.1312.media","tube.shanti.cafe","bee-tube.fr","video.sadmin.io","dalek.zone","review.peertube.biz","peervideo.club","tube.la-dina.net","peertube.tmp.rcp.tf","peertube.su"];var a=o("./src/config/config.js");const r=["ru","en","zh","ko","lt","lv","ar","fr","it","es","de","ja"],s=["ru","en","kk"],l=["Violentmonkey","FireMonkey","Greasemonkey","AdGuard","OrangeMonkey"],d=JSON.parse('{"__version__":4,"recommended":"recommended","translateVideo":"Translate video","disableTranslate":"Turn off","translationSettings":"Translation settings","subtitlesSettings":"Subtitles settings","about":"About extension","resetSettings":"Reset settings","videoBeingTranslated":"The video is being translated","videoLanguage":"Video language","translationLanguage":"Translation language","translationTake":"The translation will take","translationTakeMoreThanHour":"The translation will take more than an hour","translationTakeAboutMinute":"The translation will take about a minute","translationTakeFewMinutes":"The translation will take a few minutes","translationTakeApproximatelyMinutes":"The translation will take approximately {0} minutes","translationTakeApproximatelyMinute":"The translation will take approximately {0} minutes","unSupportedExtensionError":"Error! {0} is not supported by this version of the extension!\\n\\nPlease use the cloudflare version of the VOT extension.","requestTranslationFailed":"Failed to request video translation","audioNotReceived":"Audio link not received","grantPermissionToAutoPlay":"Grant permission to autoplay","neededAdditionalExtension":"An additional extension is needed to support this site","audioFormatNotSupported":"The audio format is not supported","VOTAutoTranslate":"Translate on open","VOTDontTranslateYourLang":"Do not translate from my language","VOTVolume":"Video volume","VOTVolumeTranslation":"Translation Volume","VOTAutoSetVolume":"Reduce video volume to ","VOTShowVideoSlider":"Video volume slider","VOTSyncVolume":"Link translation and video volume","VOTAudioProxy":"Proxy received audio","VOTDisableFromYourLang":"You have disabled the translation of the video in your language","VOTLiveNotSupported":"Translation of live streams is not supported","VOTPremiere":"Wait for the premiere to end before translating","VOTVideoIsTooLong":"Video is too long","VOTNoVideoIDFound":"No video ID found","VOTSubtitles":"Subtitles","VOTSubtitlesDisabled":"Disabled","VOTSubtitlesMaxLength":"Subtitles max length","VOTHighlightWords":"Highlight words","VOTTranslatedFrom":"translated from","VOTAutogenerated":"autogenerated","VOTSettings":"VOT Settings","VOTMenuLanguage":"Menu language","VOTAuthors":"Authors","VOTVersion":"Version","VOTLoader":"Loader","VOTBrowser":"Browser","VOTShowPiPButton":"Show PiP button","langs":{"auto":"Auto","af":"Afrikaans","ak":"Akan","sq":"Albanian","am":"Amharic","ar":"Arabic","hy":"Armenian","as":"Assamese","ay":"Aymara","az":"Azerbaijani","bn":"Bangla","eu":"Basque","be":"Belarusian","bho":"Bhojpuri","bs":"Bosnian","bg":"Bulgarian","my":"Burmese","ca":"Catalan","ceb":"Cebuano","zh":"Chinese","zh-Hans":"Chinese (Simplified)","zh-Hant":"Chinese (Traditional)","co":"Corsican","hr":"Croatian","cs":"Czech","da":"Danish","dv":"Divehi","nl":"Dutch","en":"English","eo":"Esperanto","et":"Estonian","ee":"Ewe","fil":"Filipino","fi":"Finnish","fr":"French","gl":"Galician","lg":"Ganda","ka":"Georgian","de":"German","el":"Greek","gn":"Guarani","gu":"Gujarati","ht":"Haitian Creole","ha":"Hausa","haw":"Hawaiian","iw":"Hebrew","hi":"Hindi","hmn":"Hmong","hu":"Hungarian","is":"Icelandic","ig":"Igbo","id":"Indonesian","ga":"Irish","it":"Italian","ja":"Japanese","jv":"Javanese","kn":"Kannada","kk":"Kazakh","km":"Khmer","rw":"Kinyarwanda","ko":"Korean","kri":"Krio","ku":"Kurdish","ky":"Kyrgyz","lo":"Lao","la":"Latin","lv":"Latvian","ln":"Lingala","lt":"Lithuanian","lb":"Luxembourgish","mk":"Macedonian","mg":"Malagasy","ms":"Malay","ml":"Malayalam","mt":"Maltese","mi":"Māori","mr":"Marathi","mn":"Mongolian","ne":"Nepali","nso":"Northern Sotho","no":"Norwegian","ny":"Nyanja","or":"Odia","om":"Oromo","ps":"Pashto","fa":"Persian","pl":"Polish","pt":"Portuguese","pa":"Punjabi","qu":"Quechua","ro":"Romanian","ru":"Russian","sm":"Samoan","sa":"Sanskrit","gd":"Scottish Gaelic","sr":"Serbian","sn":"Shona","sd":"Sindhi","si":"Sinhala","sk":"Slovak","sl":"Slovenian","so":"Somali","st":"Southern Sotho","es":"Spanish","su":"Sundanese","sw":"Swahili","sv":"Swedish","tg":"Tajik","ta":"Tamil","tt":"Tatar","te":"Telugu","th":"Thai","ti":"Tigrinya","ts":"Tsonga","tr":"Turkish","tk":"Turkmen","uk":"Ukrainian","ur":"Urdu","ug":"Uyghur","uz":"Uzbek","vi":"Vietnamese","cy":"Welsh","fy":"Western Frisian","xh":"Xhosa","yi":"Yiddish","yo":"Yoruba","zu":"Zulu"},"udemyAccessTokenExpired":"Your entered Udemy Access Token has expired","udemyModuleArgsNotFound":"Could not get udemy module data due to the fact that ModuleArgs was not found","VOTTranslationHelpNull":"Could not get the data required for the translate","enterUdemyAccessToken":"Enter Udemy Access Token","VOTUdemyData":"Udemy Data","streamNoConnectionToServer":"There is no connection to the server","searchField":"Search...","VOTTranslateAPIErrors":"Translate errors from the API","VOTTranslationService":"Translation Service","VOTDetectService":"Detect Service","VOTTranslatingError":"Translating the error","VOTProxyWorkerHost":"Enter the proxy worker address","VOTM3u8ProxyHost":"Enter the address of the m3u8 proxy worker","proxySettings":"Proxy Settings","translationTakeApproximatelyMinute2":"The translation will take approximately {0} minutes"}');var c=o("./src/utils/debug.js");const u=new class{constructor(){this.gmSupport="function"==typeof GM_getValue,c.A.log(`GM Storage Status: ${this.gmSupport}`)}syncGet(t,e=void 0,o=!1){if(this.gmSupport)return GM_getValue(t,e);let n=window.localStorage.getItem(t);if("udemyData"===t&&"string"==typeof n)try{n=JSON.parse(n)}catch{n=e}return o?Number(n)??Number(e):n??e}async get(t,e=void 0,o=!1){return this.gmSupport?await GM_getValue(t,e):Promise.resolve(this.syncGet(t,e,o))}syncSet(t,e){return this.gmSupport?GM_setValue(t,e):("udemyData"===t&&(e=JSON.stringify(e)),window.localStorage.setItem(t,e))}async set(t,e){return this.gmSupport?await GM_setValue(t,e):Promise.resolve(this.syncSet(t,e))}syncDelete(t){return this.gmSupport?GM_deleteValue(t):window.localStorage.removeItem(t)}async delete(t){return this.gmSupport?await GM_deleteValue(t):Promise.resolve(this.syncDelete(t))}syncList(){return this.gmSupport?GM_listValues():["autoTranslate","dontTranslateLanguage","dontTranslateYourLang","autoSetVolumeYandexStyle","showVideoSlider","syncVolume","subtitlesMaxLength","highlightWords","responseLanguage","defaultVolume","udemyData","audioProxy","showPiPButton","locale-version","locale-lang","locale-phrases"]}async list(){return this.gmSupport?await GM_listValues():Promise.resolve(this.syncList())}};async function h(t,e={}){const o=new AbortController,n=setTimeout((()=>o.abort()),3e3);try{return await fetch(t,{...e,signal:o.signal})}catch(t){return console.error("Fetch timed-out. Error:",t),t}finally{clearTimeout(n)}}const p={async translate(t,e){try{const o=await h(`${a.rw.yandex}?${new URLSearchParams({text:t,lang:e})}`);if(o instanceof Error)throw o;const n=await o.json();if(200!==n.code)throw n.message;return n.text[0]}catch(e){return console.error("Error translating text:",e),t}},async detect(t){try{const e=await h(`${a.QL.yandex}?${new URLSearchParams({text:t})}`);if(e instanceof Error)throw e;const o=await e.json();if(200!==o.code)throw o.message;return o.lang??"en"}catch(t){return console.error("Error getting lang from text:",t),"en"}}},g={async detect(t){try{const e=await fetch(a.QL.rustServer,{method:"POST",body:t});if(e instanceof Error)throw e;return await e.text()}catch(t){return console.error("Error getting lang from text:",t),"en"}}},v={async translate(t,e="auto",o="ru"){try{const n=await h(a.rw.deepl,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({text:t,source_lang:e,target_lang:o})});if(n instanceof Error)throw n;const i=await n.json();if(200!==i.code)throw i.message;return i.data}catch(e){return console.error("Error translating text:",e),t}}};const m=Object.keys(a.rw),b=Object.keys(a.QL).map((t=>"rustServer"===t?"rust-server":t));async function f(t,e,o,n){if(!window.location.hostname.includes("m.youtube.com")&&t?.getAudioTrack){const e=t.getAudioTrack(),o=e?.getLanguageInfo();if("und"!==o?.id)return L(o.id.split(".")[0])}const i=e?.captions?.playerCaptionsTracklistRenderer?.captionTracks;if(i?.length){const t=i.find((t=>"asr"===t.kind));if(t&&t.languageCode)return L(t.languageCode)}const r=function(t,e){const o=e?e.split("\n").filter((t=>!P.test(t))).join(" "):"",n=`${t} ${o}`.slice(0,450);return n.replace(/[^\p{L}\s]+|\s+/gu," ").trim()}(o,n);return c.A.log(`Detecting language text: ${r}`),async function(t){switch(await u.get("detectService",a.K2)){case"yandex":return await p.detect(t);case"rust-server":return await g.detect(t);default:return"en"}}(r)}function y(){return/^m\.youtube\.com$/.test(window.location.hostname)}function w(){return window.location.pathname.startsWith("/shorts/")?y()?document.querySelector("#movie_player"):document.querySelector("#shorts-player"):document.querySelector("#movie_player")}function x(){const t=w();return t?.getPlayerResponse?t?.getPlayerResponse?.call()??null:t?.data?.playerResponse??null}function S(){const t=w();return t?.getVideoData?t?.getVideoData?.call()??null:t?.data?.playerResponse?.videoDetails??null}const k={isMobile:y,getPlayer:w,getPlayerResponse:x,getPlayerData:S,getVideoVolume:function(){const t=w();return t?.getVolume?t.getVolume.call()/100:1},getSubtitles:function(){const t=x();let e=t?.captions?.playerCaptionsTracklistRenderer?.captionTracks??[];return e=e.reduce(((t,e)=>{if("languageCode"in e){const o=e?.languageCode?L(e?.languageCode):void 0,n=e?.url||e?.baseUrl;o&&n&&t.push({source:"youtube",language:o,isAutoGenerated:"asr"===e?.kind,url:`${n.startsWith("http")?n:`${window.location.origin}/${n}`}&fmt=json3`})}return t}),[]),c.A.log("youtube subtitles:",e),e},getVideoData:async function(){const t=w(),e=x(),o=S(),{title:n}=o??{},{shortDescription:i,isLive:a}=e?.videoDetails??{};let s=n?await f(t,e,n,i):"en";s=r.includes(s)?s:"en";const l={isLive:!!a,title:n,description:i,detectedLanguage:s};return c.A.log("youtube video data:",l),console.log("[VOT] Detected language: ",l.detectedLanguage),l},setVideoVolume:function(t){const e=w();if(e?.setVolume)return e.setVolume(Math.round(100*t)),!0},videoSeek:function(t,e){c.A.log("videoSeek",e);const o=(w()?.getProgressState()?.seekableEnd||t.currentTime)-e;t.currentTime=o},isMuted:function(){const t=w();return!!t?.isMuted&&t.isMuted.call()},isMusic:function(){const t=S().author,e=S().title.toUpperCase(),o=e.match(/\w+/g),n=document.body.querySelector("ytd-watch-flexy")?.playerData;return[e,document.URL,t,n?.microformat?.playerMicroformatRenderer.category,n?.title].some((t=>t?.toUpperCase().includes("MUSIC")))||document.body.querySelector("#upload-info #channel-name .badge-style-type-verified-artist")||t&&/(VEVO|Topic|Records|RECORDS|Recordings|AMV)$/.test(t)||t&&/(MUSIC|ROCK|SOUNDS|SONGS)/.test(t.toUpperCase())||o?.length&&["🎵","♫","SONG","SONGS","SOUNDTRACK","LYRIC","LYRICS","AMBIENT","MIX","VEVO","CLIP","KARAOKE","OPENING","COVER","COVERED","VOCAL","INSTRUMENTAL","ORCHESTRAL","DUBSTEP","DJ","DNB","BASS","BEAT","ALBUM","PLAYLIST","DUBSTEP","CHILL","RELAX","CLASSIC","CINEMATIC"].some((t=>o.includes(t)))||["OFFICIAL VIDEO","OFFICIAL AUDIO","FEAT.","FT.","LIVE RADIO","DANCE VER","HIP HOP","ROCK N ROLL","HOUR VER","HOURS VER","INTRO THEME"].some((t=>e.includes(t)))||o?.length&&["OP","ED","MV","OST","NCS","BGM","EDM","GMV","AMV","MMD","MAD"].some((t=>o.includes(t)))}},T=navigator.language||navigator.userLanguage,M=T?.substr(0,2)?.toLowerCase()??"en",V=(t,e)=>{let o=new URL(window.location.href);switch(t){case"piped":case"invidious":case"youtube":if(o.searchParams.has("enablejsapi")){const t=k.getPlayer().getVideoUrl();o=new URL(t)}return o.pathname.match(/(?:watch|embed|shorts|live)\/([^/]+)/)?.[1]||o.searchParams.get("v");case"vk":{const t=o.pathname.match(/^\/(video|clip)-?[0-9]{8,9}_[0-9]{9}$/),e=o.searchParams.get("z"),n=o.searchParams.get("oid"),i=o.searchParams.get("id");return t?t[0].slice(1):e?e.split("/")[0]:n&&i?`video-${Math.abs(parseInt(n))}_${i}`:null}case"nine_gag":case"9gag":case"gag":return o.pathname.match(/gag\/([^/]+)/)?.[1];case"twitch":{const t=o.pathname.match(/([^/]+)\/(?:clip)\/([^/]+)/);if(/^m\.twitch\.tv$/.test(o.hostname))return o.href.match(/videos\/([^/]+)/)?.[0]||o.pathname.slice(1);if(/^player\.twitch\.tv$/.test(o.hostname))return`videos/${o.searchParams.get("video")}`;if(/^clips\.twitch\.tv$/.test(o.hostname)){const t=document.querySelector("script[type='application/ld+json']"),e=o.pathname.slice(1);if(!t){const t="embed"===e,n=document.querySelector(t?".tw-link[data-test-selector='stream-info-card-component__stream-avatar-link']":".clips-player a:not([class])");if(!n)return;return`${n.href.replace("https://www.twitch.tv/","")}/clip/${t?o.searchParams.get("clip"):e}`}const n=JSON.parse(t.innerText),i=n["@graph"].find((t=>"VideoObject"===t["@type"]))?.creator.url;return`${i.replace("https://www.twitch.tv/","")}/clip/${e}`}return t?t[0]:o.pathname.match(/(?:videos)\/([^/]+)/)?.[0]}case"proxitok":return o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];case"tiktok":{let t=o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];if(!t){const o=e.closest(".xgplayer-playing, .tiktok-web-player"),n=o?.closest('div[data-e2e="recommend-list-item-container"]'),i=n?.querySelector('a[data-e2e="video-author-avatar"]');if(o&&i){const e=o.id?.match(/^xgwrapper-[0-9]+-(.*)$/)?.at(1),n=i.href?.match(/.*(@.*)$/)?.at(1);e&&n&&(t=`${n}/video/${e}`)}}return t}case"vimeo":{const t=o.searchParams.get("app_id"),e=o.pathname.match(/[^/]+\/[^/]+$/)?.[0]||o.pathname.match(/[^/]+$/)?.[0];return t?`${e}?app_id=${t}`:e}case"xvideos":return o.pathname.match(/[^/]+\/[^/]+$/)?.[0];case"pornhub":return o.searchParams.get("viewkey")||o.pathname.match(/embed\/([^/]+)/)?.[1];case"twitter":return o.pathname.match(/status\/([^/]+)/)?.[1];case"udemy":case"rumble":case"facebook":return o.pathname.slice(1);case"rutube":return o.pathname.match(/(?:video|embed)\/([^/]+)/)?.[1];case"coub":return o.pathname.match(/(?:view|embed)\/([^/]+)/)?.[1]||document.querySelector(".coub.active")?.dataset?.permalink;case"bilibili":{const t=o.searchParams.get("bvid");if(t)return t;let e=o.pathname.match(/video\/([^/]+)/)?.[1];return e&&null!==o.searchParams.get("p")&&(e+=`/?p=${o.searchParams.get("p")}`),e}case"mail_ru":{const t=o.pathname;if(t.startsWith("/v/")||t.startsWith("/mail/"))return t.slice(1);const e=t.match(/video\/embed\/([^/]+)/)?.[1];if(!e)return null;const n=document.querySelector(".b-video-controls__mymail-link");return!!n&&n?.href.split("my.mail.ru")?.[1]}case"bitchute":return o.pathname.match(/(video|embed)\/([^/]+)/)?.[2];case"coursera":return o.pathname.match(/learn\/([^/]+)\/lecture\/([^/]+)/)?.[0];case"eporner":return o.pathname.match(/video-([^/]+)\/([^/]+)/)?.[0];case"peertube":return o.pathname.match(/\/w\/([^/]+)/)?.[0];case"dailymotion":{const t=Array.from(document.querySelectorAll("*")).filter((t=>t.innerHTML.trim().includes(".m3u8")));try{let e=t[1].lastChild.src;return e.match(/\/video\/(\w+)\.m3u8/)?.[1]}catch(t){return console.error("[VOT]",t),!1}}case"trovo":{const t=o.searchParams.get("vid");if(!t)return null;const e=o.pathname.match(/([^/]+)\/([\d]+)/)?.[0];return e?`${e}?vid=${t}`:null}case"yandexdisk":return o.pathname.match(/\/i\/([^/]+)/)?.[1];case"coursehunter":{const t=o.pathname.match(/\/course\/([^/]+)/)?.[1];return!!t&&t+o.search}case"ok.ru":return o.pathname.match(/\/video\/(\d+)/)?.[1];case"googledrive":return o.searchParams.get("docid");case"bannedvideo":return o.searchParams.get("id");case"weverse":return o.pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[0];case"newgrounds":return o.pathname.match(/([^/]+)\/(view)\/([^/]+)/)?.[0];case"egghead":return o.pathname.slice(1);case"youku":return o.pathname.match(/v_show\/id_[\w=]+/)?.[0];case"directlink":return o.pathname+o.search;default:return!1}};function L(t){return t.toLowerCase().split(/[_;-]/)[0].trim()}function A(){return"pictureInPictureEnabled"in document&&document.pictureInPictureEnabled}function C(){return"undefined"!=typeof Hls&&Hls?.isSupported()?new Hls({debug:!1,lowLatencyMode:!0,backBufferLength:90}):void 0}const P=new RegExp([/(?:https?|ftp):\/\/[\S]+/g,/https?:\/\/\S+|www\.\S+/gm,/\b\S+\.\S+/gm,/#[^\s#]+/g,/Auto-generated by YouTube/g,/Provided to YouTube by/g,/Released on/g,/0x[a-fA-F0-9]{40}/g,/[13][a-km-zA-HJ-NP-Z1-9]{25,34}/g,/4[0-9AB][1-9A-HJ-NP-Za-km-z]{93}/g,/Paypal/g].map((t=>t.source)).join("|"));async function O(t,e={}){try{return await fetch(t,e)}catch(o){return new Promise(((o,n)=>{GM_xmlhttpRequest({method:e.method||"GET",url:t,responseType:"blob",onload:t=>{o(new Response(t.response,{status:t.status,headers:Object.fromEntries(t.responseHeaders.trim().split("\r\n").map((t=>{let e=t.split(": ");if("set-cookie"!==e?.[0])return[e.shift(),e.join(": ")]})).filter((t=>t)))}))},ontimeout:()=>n(new Error("fetch timeout")),onerror:t=>n(t),onabort:()=>n(new Error("fetch abort"))})}))}}const E=["auto","en","ru","af","am","ar","az","bg","bn","bs","ca","cs","cy","da","de","el","es","et","eu","fa","fi","fr","gl","hi","hr","hu","hy","id","it","ja","jv","kk","km","kn","ko","lo","mk","ml","mn","ms","mt","my","ne","nl","pa","pl","pt","ro","si","sk","sl","sq","sr","su","sv","sw","tr","uk","ur","uz","vi","zh","zu"],R=new class{lang="en";locale={};gmValues=["locale-phrases","locale-lang","locale-version","locale-lang-override"];constructor(){const t=u.syncGet("locale-lang-override","auto");this.lang=t&&"auto"!==t?t:(navigator.language||navigator.userLanguage)?.substr(0,2)?.toLowerCase()??"en",this.setLocaleFromJsonString(u.syncGet("locale-phrases",""))}reset(){for(let t=0;t{if("object"==typeof t&&t)return t[e]}),t);return void 0===o&&console.warn("[VOT] [localizationProvider] locale",t,"doesn't contain key",e),o}getDefault(t){return this.getFromLocale(d,t)??t}get(t){return this.getFromLocale(this.locale,t)??this.getFromLocale(d,t)??t}};var B=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),F=o.n(B),D=o("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),_=o.n(D),q=o("./node_modules/style-loader/dist/runtime/insertBySelector.js"),z=o.n(q),I=o("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),$=o.n(I),N=o("./node_modules/webpack-monkey/lib/node/deps/style-loader-insertStyleElement.js"),H=o.n(N),j=o("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),U=o.n(j),W=o("./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss"),G={};G.styleTagTransform=U(),G.setAttributes=$(),G.insert=z().bind(null,"head"),G.domAPI=_(),G.insertStyleElement=H();F()(W.A,G);W.A&&W.A.locals&&W.A.locals;function Y(t){const e=document.createElement("vot-block");return e.classList.add("vot-icon-button"),e.innerHTML=t,e}function Z(t){const e=parseFloat(t.value),o=""===t.min?0:parseFloat(t.min),n=(e-o)/((""===t.max?100:parseFloat(t.max))-o);t.parentElement.setAttribute("style",`--vot-progress: ${n}`)}function K(t,e="",o=" ",n=!1){const i=document.createElement("vot-block");i.classList.add("vot-textfield");const a=document.createElement(n?"textarea":"input");a.placeholder=o,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),{container:i,input:a,label:r}}function J(t){const e=document.createElement("vot-block");e.classList.add("vot-dialog-container"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-dialog-backdrop");const n=document.createElement("vot-block");n.classList.add("vot-dialog");const i=document.createElement("vot-block");i.classList.add("vot-dialog-content-wrapper");const a=document.createElement("vot-block");a.classList.add("vot-dialog-header-container");const r=document.createElement("vot-block");r.classList.add("vot-dialog-body-container");const s=document.createElement("vot-block");s.classList.add("vot-dialog-footer-container");const l=document.createElement("vot-block");l.classList.add("vot-dialog-title-container");const d=Y('');d.classList.add("vot-dialog-close-button"),o.onclick=d.onclick=()=>{e.hidden=!0};const c=document.createElement("vot-block");return c.classList.add("vot-dialog-title"),c.innerHTML=t,e.appendChild(o),e.appendChild(n),n.appendChild(i),i.appendChild(a),i.appendChild(r),i.appendChild(s),a.appendChild(l),a.appendChild(d),l.appendChild(c),{container:e,backdrop:o,dialog:n,contentWrapper:i,headerContainer:a,bodyContainer:r,footerContainer:s,titleContainer:l,closeButton:d,title:c}}function Q(t,e,o,n={}){const i=n.onSelectCb||function(){},a=n.labelElement||"";let r=[];const s=document.createElement("vot-block");s.classList.add("vot-select"),a&&s.appendChild(a);const l=document.createElement("vot-block");l.classList.add("vot-select-outer");const d=document.createElement("span");d.classList.add("vot-select-title"),d.innerText=t,void 0===t&&(d.innerText=o.find((t=>!0===t.selected))?.label);const c=document.createElement("vot-block");c.classList.add("vot-select-arrow-icon"),c.innerHTML='',l.append(d,c),l.onclick=()=>{const t=J(e);t.container.classList.add("vot-dialog-temp"),t.container.hidden=!1,document.documentElement.appendChild(t.container);const n=document.createElement("vot-block");n.classList.add("vot-select-content-list");for(const t of o){const e=document.createElement("vot-block");e.classList.add("vot-select-content-item"),e.innerText=t.label,e.dataset.votSelected=t.selected,e.dataset.votValue=t.value,t.disabled&&(e.inert=!0),e.onclick=async a=>{if(a.target.inert)return;const r=n.childNodes;for(let t of r)t.dataset.votSelected=!1;for(let e of o)e.selected=e.value===t.value;e.dataset.votSelected=!0,d.innerText=t.label,await i(a)},n.appendChild(e)}const a=K(R.get("searchField"));a.input.oninput=t=>{const e=t.target.value.toLowerCase();for(let t=0;t{t.container.remove(),r=[]}},s.append(l);return{container:s,title:d,arrowIcon:c,labelElement:a,setTitle:t=>{d.innerText=t},setSelected:t=>{const e=Array.from(r).filter((t=>!t.inert));for(let o=0;o{o=t}}}const X={createHeader:function(t,e=4){const o=document.createElement("vot-block");return o.classList.add("vot-header"),o.classList.add(`vot-header-level-${e}`),o.innerHTML=t,o},createInformation:function(t,e){const o=document.createElement("vot-block");o.classList.add("vot-info");const n=document.createElement("vot-block");n.innerHTML=t;const i=document.createElement("vot-block");return i.innerHTML=e,o.appendChild(n),o.appendChild(i),{container:o,header:n,value:i}},createButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-button"),e.innerHTML=t,e},createTextButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-text-button"),e.innerHTML=t,e},createOutlinedButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-outlined-button"),e.innerHTML=t,e},createIconButton:Y,createCheckbox:function(t,e=!1){const o=document.createElement("label");o.classList.add("vot-checkbox");const n=document.createElement("input");n.type="checkbox",n.checked=Boolean(e);const i=document.createElement("span");return i.innerHTML=t,o.appendChild(n),o.appendChild(i),{container:o,input:n,label:i}},createSlider:function(t,e=50,o=0,n=100){const i=document.createElement("vot-block");i.classList.add("vot-slider");const a=document.createElement("input");a.type="range",a.min=o,a.max=n,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),a.addEventListener("input",(t=>Z(t.target))),Z(a),{container:i,input:a,label:r}},createTextfield:K,createDialog:J,createVOTButton:function(t){const e=document.createElement("vot-block");e.classList.add("vot-segmented-button");const o=document.createElement("vot-block");o.classList.add("vot-segment"),o.classList.add("vot-translate-button"),o.innerHTML='';const n=document.createElement("vot-block");n.classList.add("vot-separator");const i=document.createElement("vot-block");i.classList.add("vot-segment-only-icon"),i.innerHTML='';const a=document.createElement("vot-block");a.classList.add("vot-separator");const r=document.createElement("vot-block");r.classList.add("vot-segment-only-icon"),r.innerHTML='';const s=document.createElement("span");return s.classList.add("vot-segment-label"),s.innerHTML=t,e.appendChild(o),e.appendChild(n),e.appendChild(i),e.appendChild(a),e.appendChild(r),o.appendChild(s),{container:e,translateButton:o,separator:n,pipButton:i,separator2:a,menuButton:r,label:s}},createVOTMenu:function(t){const e=document.createElement("vot-block");e.classList.add("vot-menu"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-menu-content-wrapper");const n=document.createElement("vot-block");n.classList.add("vot-menu-header-container");const i=document.createElement("vot-block");i.classList.add("vot-menu-body-container");const a=document.createElement("vot-block");a.classList.add("vot-menu-footer-container");const r=document.createElement("vot-block");r.classList.add("vot-menu-title-container");const s=document.createElement("vot-block");return s.classList.add("vot-menu-title"),s.innerHTML=t,e.appendChild(o),o.appendChild(n),o.appendChild(i),o.appendChild(a),n.appendChild(r),r.appendChild(s),{container:e,contentWrapper:o,headerContainer:n,bodyContainer:i,footerContainer:a,titleContainer:r,title:s}},createVOTSelectLabel:function(t){const e=document.createElement("span");return e.classList.add("vot-select-label"),e.innerText=t,e},createVOTSelect:Q,createVOTLanguageSelect:function(t){const e=t.fromTitle||"#UNDEFINED",o=t.fromDialogTitle||"#UNDEFINED",n=t.fromItems||[],i=t.fromOnSelectCB||function(){},a=t.toTitle||"#UNDEFINED",r=t.toDialogTitle||"#UNDEFINED",s=t.toItems||[],l=t.toOnSelectCB||function(){},d=document.createElement("vot-block");d.classList.add("vot-lang-select");const c=Q(e,o,n,{onSelectCb:i}),u=document.createElement("vot-block");u.classList.add("vot-lang-select-icon"),u.innerHTML='';const h=Q(a,r,s,{onSelectCb:l});return d.append(c.container,u,h.container),{container:d,fromSelect:c,icon:u,toSelect:h}},updateSlider:Z};class tt extends Error{constructor(t){super(R.getDefault(t)),this.name="VOTLocalizedError",this.unlocalizedMessage=t,this.localizedMessage=R.get(t)}}const et=new protobuf.Type("VideoTranslationHelpObject").add(new protobuf.Field("target",1,"string")).add(new protobuf.Field("targetUrl",2,"string")),ot=new protobuf.Type("VideoTranslationRequest").add(new protobuf.Field("url",3,"string")).add(new protobuf.Field("deviceId",4,"string")).add(new protobuf.Field("firstRequest",5,"bool")).add(new protobuf.Field("duration",6,"double")).add(new protobuf.Field("unknown2",7,"int32")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("forceSourceLang",9,"bool")).add(new protobuf.Field("unknown4",10,"int32")).add(new protobuf.Field("translationHelp",11,"VideoTranslationHelpObject","repeated")).add(new protobuf.Field("responseLanguage",14,"string")).add(new protobuf.Field("unknown5",15,"int32")).add(new protobuf.Field("unknown6",16,"int32")).add(new protobuf.Field("bypassCache",17,"bool")),nt=new protobuf.Type("VideoSubtitlesRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")),it=new protobuf.Type("VideoStreamRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")).add(new protobuf.Field("responseLanguage",3,"string")),at=new protobuf.Type("VideoStreamPingRequest").add(new protobuf.Field("pingId",1,"int32")),rt=new protobuf.Type("VideoTranslationResponse").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("duration",2,"double")).add(new protobuf.Field("status",4,"int32")).add(new protobuf.Field("remainingTime",5,"int32")).add(new protobuf.Field("unknown0",6,"int32")).add(new protobuf.Field("translationId",7,"string")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("message",9,"string")),st=new protobuf.Type("VideoSubtitlesObject").add(new protobuf.Field("language",1,"string")).add(new protobuf.Field("url",2,"string")).add(new protobuf.Field("unknown2",3,"int32")).add(new protobuf.Field("translatedLanguage",4,"string")).add(new protobuf.Field("translatedUrl",5,"string")).add(new protobuf.Field("unknown5",6,"int32")).add(new protobuf.Field("unknown6",7,"int32")),lt=new protobuf.Type("VideoSubtitlesResponse").add(new protobuf.Field("waiting",1,"int32")).add(new protobuf.Field("subtitles",2,"VideoSubtitlesObject","repeated")),dt=new protobuf.Type("VideoStreamObject").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("timestamp",2,"int64")),ct=new protobuf.Type("VideoStreamResponse").add(new protobuf.Field("interval",1,"int32")).add(new protobuf.Field("translatedInfo",2,"VideoStreamObject")).add(new protobuf.Field("pingId",3,"int32")),ut=new protobuf.Type("YandexSessionRequest").add(new protobuf.Field("uuid",1,"string")).add(new protobuf.Field("module",2,"string")),ht=new protobuf.Type("YandexSessionResponse").add(new protobuf.Field("sign",1,"string")).add(new protobuf.Field("expires",2,"int32")),pt=(new protobuf.Root).define("yandex").add(et).add(ot).add(rt).add(nt).add(st).add(lt).add(at).add(it).add(dt).add(ct).add(ut).add(ht),gt={encodeTranslationRequest:(t,e,o,n,i)=>pt.VideoTranslationRequest.encode({url:t,firstRequest:!0,duration:e,unknown2:1,language:o,forceSourceLang:!1,unknown4:0,translationHelp:i,responseLanguage:n,unknown5:0,unknown6:1,bypassCache:!1}).finish(),decodeTranslationResponse:t=>pt.VideoTranslationResponse.decode(new Uint8Array(t)),encodeSubtitlesRequest:(t,e)=>pt.VideoSubtitlesRequest.encode({url:t,language:e}).finish(),decodeSubtitlesResponse:t=>pt.VideoSubtitlesResponse.decode(new Uint8Array(t)),encodeStreamPingRequest:t=>pt.VideoStreamPingRequest.encode({pingId:t}).finish(),encodeStreamRequest:(t,e,o)=>pt.VideoStreamRequest.encode({url:t,language:e,responseLanguage:o}).finish(),decodeStreamResponse:t=>pt.VideoStreamResponse.decode(new Uint8Array(t)),encodeYandexSessionRequest:(t,e)=>pt.YandexSessionRequest.encode({uuid:t,module:e}).finish(),decodeYandexSessionResponse:t=>pt.YandexSessionResponse.decode(new Uint8Array(t))};var vt=o("./node_modules/bowser/es5.js");function mt(){return"xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,((t,e)=>("x"===t?16*Math.random()|0:3&e|8).toString(16)))}async function bt(t){const e=new TextEncoder,o=await window.crypto.subtle.importKey("raw",e.encode(a.S7),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),n=await window.crypto.subtle.sign("HMAC",o,t);return new Uint8Array(n).reduce(((t,e)=>t+e.toString(16).padStart(2,"0")),"")}const ft=async function(t,e){try{c.A.log("requestStreamPing");const n=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;c.A.log("Inited yandexRequest...");const i=gt.encodeStreamPingRequest(t);await n("/stream-translation/ping-stream",i,{"Vtrans-Signature":await bt(i),"Sec-Vtrans-Token":mt()},e)}catch(t){console.error("[VOT]",t),e(!1)}};const yt=async function(t,e,n,i){try{c.A.log("requestStreamTranslation");const a=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;c.A.log("Inited yandexRequest...");const r=gt.encodeStreamRequest(t,e,n);await a("/stream-translation/translate-stream",r,{"Vtrans-Signature":await bt(r),"Sec-Vtrans-Token":mt()},i)}catch(t){console.error("[VOT]",t),i(!1)}};const wt=async function(t,e,n,i,a,r){try{c.A.log("requestVideoTranslation");const s=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;c.A.log("Inited yandexRequest...");const l=gt.encodeTranslationRequest(t,e,n,i,a);await s("/video-translation/translate",l,{"Vtrans-Signature":await bt(l),"Sec-Vtrans-Token":mt()},r)}catch(t){console.error("[VOT]",t),r(!1)}};const xt=async function(t,e,n){try{c.A.log("requestVideoSubtitles");const i=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;c.A.log("Inited yandexRequest...");const a=gt.encodeSubtitlesRequest(t,e);await i("/video-subtitles/get-subtitles",a,{"Vsubs-Signature":await bt(a),"Sec-Vsubs-Token":mt()},n)}catch(t){console.error("[VOT]",t),n(!1)}};function St(t){const e=t.startMs+t.durationMs;return t.tokens.reduce(((o,n,i)=>{const a=t.tokens[i+1];let r;o.length>0&&(r=o[o.length-1]);const s=r?.alignRange?.end??0,l=s+n.text.length;if(n.alignRange={start:s,end:l},o.push(n),a){const t=n.startMs+n.durationMs,i=a.startMs?a.startMs-t:e-t;o.push({text:" ",startMs:t,durationMs:i,alignRange:{start:l,end:l+1}})}return o}),[])}function kt(t,e){const o=t.text.split(/([\n \t])/).reduce(((t,o)=>{if(o.length){const n=t[t.length-1]??e,i=n?.alignRange?.end??0,a=i+o.length;t.push({text:o,alignRange:{start:i,end:a}})}return t}),[]),n=Math.floor(t.durationMs/o.length),i=t.startMs+t.durationMs;return o.map(((e,a)=>{const r=a===o.length-1,s=t.startMs+n*a;return{...e,startMs:s,durationMs:r?i-s:n}}))}function Tt(t){let e=Math.floor(t/3600),o=Math.floor(t%3600/60),n=Math.floor(t%60),i=Math.floor(t%1*1e3);return`${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")},${i.toString().padStart(3,"0")}`}async function Mt(t){const e=new Promise((t=>setTimeout((()=>t({containsTokens:!1,subtitles:[]})),5e3))),o=(async()=>{try{const e=await O(t.url);return await e.json()}catch(t){return console.error("[VOT] Failed to fetch subtitles. Reason:",t),{containsTokens:!1,subtitles:[]}}})();let n=await Promise.race([e,o]);return"youtube"===t.source&&(n=function(t){const e={containsTokens:!1,subtitles:[]};if("object"!=typeof t||!("events"in t)||!Array.isArray(t.events))return console.error("[VOT] Failed to format youtube subtitles",t),e;for(let o=0;ot.utf8.replace(/^( +| +)$/g,""))).join(" ");let i=t.events[o].dDurationMs;t.events[o+1]&&t.events[o].tStartMs+t.events[o].dDurationMs>t.events[o+1].tStartMs&&(i=t.events[o+1].tStartMs-t.events[o].tStartMs),"\n"!==n&&e.subtitles.push({text:n,startMs:t.events[o].tStartMs,durationMs:i})}return e}(n)),n.subtitles=function(t,e){const o=[];let n;for(let i=0;i{setTimeout((()=>{i||(console.error("[VOT] Failed get yandex subtitles. Reason: timeout"),t([]))}),5e3)})),new Promise((n=>{xt(`${t.url}${e}`,o,((t,o)=>{c.A.log("[exec callback] Requesting video subtitles",e),t||(console.error("[VOT] Failed get yandex subtitles"),i=!0,n([]));const a=gt.decodeSubtitlesResponse(o);console.log("[VOT] Subtitles response: ",a);let r=a.subtitles??[];r=r.reduce(((t,e)=>(e.language&&!t.find((t=>{if("yandex"===t.source&&t.language===e.language&&!t.translatedFromLanguage)return t}))&&t.push({source:"yandex",language:e.language,url:e.url}),e.translatedLanguage&&t.push({source:"yandex",language:e.translatedLanguage,translatedFromLanguage:e.language,url:e.translatedUrl}),t)),[]),i=!0,n(r)}))}))]),r=[...a,...n].sort(((t,e)=>{if(t.source!==e.source)return"yandex"===t.source?-1:1;if(t.language!==e.language&&(t.language===M||e.language===M))return t.language===M?-1:1;if("yandex"===t.source){if(t.translatedFromLanguage!==e.translatedFromLanguage)return t.translatedFromLanguage&&e.translatedFromLanguage?t.translatedFromLanguage===o?-1:1:t.language===e.language?t.translatedFromLanguage?1:-1:t.translatedFromLanguage?-1:1;if(!t.translatedFromLanguage)return t.language===o?-1:1}return"youtube"===t.source&&t.isAutoGenerated!==e.isAutoGenerated?t.isAutoGenerated?1:-1:0}));return console.log("[VOT] subtitles list",r),r}class Lt{dragging=!1;subtitlesContainerRect=null;containerRect=null;offsetX=null;offsetY=null;lastContent=null;highlightWords=!1;subtitles=null;maxLength=300;maxLengthRegexp=/.{1,300}(?:\s|$)/g;constructor(t,e,o){this.site=o,this.video=t,"youtube"===this.site.host&&"mobile"!==this.site.additionalData?this.container=e.parentElement:this.container=e,this.votSubtitlesContainer=document.createElement("vot-block"),this.votSubtitlesContainer.classList.add("vot-subtitles-widget"),this.container.appendChild(this.votSubtitlesContainer),this.onMouseDownBound=this.onMouseDown.bind(this),this.onMouseUpBound=this.onMouseUp.bind(this),this.onMouseMoveBound=this.onMouseMove.bind(this),this.onTimeUpdateBound=this.onTimeUpdate.bind(this),document.addEventListener("mousedown",this.onMouseDownBound),document.addEventListener("mouseup",this.onMouseUpBound),document.addEventListener("mousemove",this.onMouseMoveBound),this.video?.addEventListener("timeupdate",this.onTimeUpdateBound)}release(){this.video?.removeEventListener("timeupdate",this.onTimeUpdateBound),document.removeEventListener("mousedown",this.onMouseDownBound),document.removeEventListener("mouseup",this.onMouseUpBound),document.removeEventListener("mousemove",this.onMouseMoveBound),this.votSubtitlesContainer.remove()}onMouseDown(t){this.votSubtitlesContainer.contains(t.target)&&(this.subtitlesContainerRect=this.votSubtitlesContainer.getBoundingClientRect(),this.containerRect=this.container.getBoundingClientRect(),this.offsetX=t.clientX-this.subtitlesContainerRect.x,this.offsetY=t.clientY-this.subtitlesContainerRect.y,this.dragging=!0)}onMouseUp(){this.dragging=!1}onMouseMove(t){if(this.dragging){t.preventDefault();const e=t.clientX-this.offsetX,o=t.clientY-this.offsetY,n=o>=this.containerRect.top,i=o+this.subtitlesContainerRect.height<=this.containerRect.bottom,a=e>=this.containerRect.left,r=e+this.subtitlesContainerRect.width<=this.containerRect.right;this.votSubtitlesContainer.style.top=n&&i?o-this.containerRect.y+"px":n?this.containerRect.height-this.subtitlesContainerRect.height+"px":"0px",this.votSubtitlesContainer.style.left=a&&r?e-this.containerRect.x+"px":a?this.containerRect.width-this.subtitlesContainerRect.width+"px":"0px"}}onTimeUpdate(){this.update()}setContent(t){t&&this.video?(this.subtitles=t,this.update()):(this.subtitles=null,this.votSubtitlesContainer.innerHTML="")}setMaxLength(t){"number"==typeof t&&t&&(this.maxLength=t,this.maxLengthRegexp=new RegExp(`.{1,${t}}(?:\\s|$)`,"g"),this.update())}setHighlightWords(t){this.highlightWords!==!!t&&(this.highlightWords=!!t,this.update())}update(){if(!this.video)return;let t="",e=this.highlightWords&&this.subtitles?.containsTokens;const o=1e3*this.video.currentTime,n=this.subtitles?.subtitles?.findLast((t=>t.startMsthis.maxLength){let t=[],e=0,n=0,a=0;for(let o=0;othis.maxLength){let r=i.slice(e,n+1);r.at(0)&&" "===r.at(0).text&&(r=r.slice(1)),r.at(-1)&&" "===r.at(-1).text&&(r=r.slice(0,r.length-1)),t.push({startMs:i[e].startMs,durationMs:i[n].startMs+i[n].durationMs-i[e].startMs,tokens:r}),e=o,a=0}n=o}for(let e=0;er||o>a.startMs-100&&r-o<275)?'class="passed"':""}>${a.text}`}}t!==this.lastContent&&(this.lastContent=t,this.votSubtitlesContainer.innerHTML=t?`${t.replace("\\n","
")}
`:"")}}const At={getVideoData:async function(){const t=window.course_id??document.querySelector('input[name="course_id"]')?.value,e=window.lessons??await async function(t){const e=await fetch(`https://coursehunter.net/api/v1/course/${t}/lessons`);return await e.json()}(t),o=parseInt(document.querySelector(".lessons-item_active")?.dataset?.index??1),n=e?.[o-1],{file:i,duration:a}=n;return c.A.log("coursehunter course data:",e),{url:i,duration:a}}};function Ct(){return Pt()?.player}function Pt(){return document.querySelector(".vjs-v6")}const Ot={getPlayer:Pt,getPlayerData:Ct,getVideoData:async function(t="en"){let e=null;const o=Ct(),{duration:n}=o?.cache_||{},{courseId:i,tracks:a,sources:s}=o?.options_||{},l=function(t){const e=t?.find((t=>"video/mp4"===t.type));return e?.src}(s),d=await async function(t){const e=await fetch(`https://www.coursera.org/api/onDemandCourses.v1/${t}`),o=await e.json();return o?.elements?.[0]}(i);let u=d?.primaryLanguageCodes?.[0];u=u?L(u):"en",r.includes(u)||(u="en");const h=function(t,e,o){let n=t?.find((t=>L(t.srclang)===e));return n||(n=t?.find((t=>L(t.srclang)===o))||t?.[0]),n?.src}(a,u,t);console.log(`videoURL: ${l}, subtitlesURL: ${h}`),h&&l?e=[{target:"video_file_url",targetUrl:l},{target:"subtitles_file_url",targetUrl:`https://www.coursera.org${h}`}]:l&&!h?(console.warn("[VOT] Subtitles files not found. Using the link only to the video file."),e={url:l}):console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${l}, subtitlesURL: ${h}`);const p={duration:n,detectedLanguage:u,translationHelp:e};return c.A.log("coursera video data:",p),console.log("[VOT] Detected language: ",p.detectedLanguage),p}},Et="https://www.udemy.com/api-2.0",Rt=2592e6;async function Bt(t){const e=await fetch(`${Et}/courses/${t}/?`+new URLSearchParams({"fields[course]":"locale",use_remote_version:"true",caching_intent:"true"}));return await e.json()}async function Ft(t,e,o){if(!(n=t.expires,n+Rt>(new Date).getTime()&&t.accessToken))return void console.error(R.get("udemyAccessTokenExpired"));var n;const i=`Bearer ${t.accessToken}`,a=await fetch(`${Et}/users/me/subscribed-courses/${e}/lectures/${o}/?`+new URLSearchParams({"fields[lecture]":"asset","fields[asset]":"length,media_sources,captions"}),{headers:{"x-udemy-authorization":i,authorization:i}});return await a.json()}function Dt(){return qt()?.player}function _t(){const t=document.querySelector(".ud-app-loader[data-module-id='course-taking']")?.dataset?.moduleArgs;return t?JSON.parse(t):(console.error(R.get("udemyModuleArgsNotFound")),{})}function qt(){return document.querySelector(".vjs-v7")}const zt={getPlayer:qt,getPlayerData:Dt,getVideoData:async function(t,e="en"){let o=null;const n=Dt();c.A.log("udemyData",t);const i=_t();c.A.log("moduleData: ",i);const a=i.courseId,s=window.location.pathname.match(/learn\/lecture\/([^/]+)/)?.[1];c.A.log(`CourseId: ${a}, lectureId: ${s}`);const l=await Bt(a);c.A.log("courseLang Data:",l);const d=await Ft(t,a,s);console.log("lecture Data:",d);let u=l?.locale?.locale;u=u?L(u):"en",r.includes(u)||(u="en");const h=d?.asset?.length||n?.cache_?.duration,p=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(d?.asset?.media_sources)||function(){const t=qt()?.querySelector("video")?.src;return!t?.startsWith("blob:")&&t}(),g=function(t,e,o){let n=t?.find((t=>L(t.locale_id)===e));return n||(n=t?.find((t=>L(t.locale_id)===o))||t?.[0]),n?.url}(d?.asset?.captions,u,e);console.log(`videoURL: ${p}, subtitlesURL: ${g}`),g&&p?o=[{target:"video_file_url",targetUrl:p},{target:"subtitles_file_url",targetUrl:g}]:p&&!g?(console.warn("[VOT] Subtitles files not found. Using the link only to the video file."),o={url:p}):console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${p}, subtitlesURL: ${g}`);const v={duration:h,detectedLanguage:u,translationHelp:o};return c.A.log("udemy video data:",v),console.log("[VOT] Detected language: ",v.detectedLanguage),v},getModuleData:_t,getCourseLang:Bt,getLectureData:Ft};const It={getVideoData:async function(t){const e=await async function(t){return await fetch("https://api.banned.video/graphql",{method:"POST",body:JSON.stringify({operationName:"GetVideo",query:"query GetVideo($id: String!) {\n getVideo(id: $id) {\n ...DisplayVideoFields\n videoUrl: directUrl\n live\n }\n }\n\n fragment DisplayVideoFields on Video {\n title\n description: summary\n duration: videoDuration\n }",variables:{id:t}}),headers:{"User-Agent":"bannedVideoFrontEnd","apollographql-client-name":"banned-web","apollographql-client-version":"1.3","content-type":"application/json"}}).then((t=>t.json())).catch((t=>(console.error(t),{data:{getVideo:{}}})))}(t);c.A.log("banned.video video data:",e);const{videoUrl:o,duration:n,live:i,description:a,title:r}=e.data.getVideo;return{url:o,duration:n,live:i,title:r,description:a}}};const $t="https://global.apis.naver.com/weverse/wevweb",Nt="be4d79eb8fc7bd008ee82c8ec4ff6fd4",Ht="1b9cb6378d959b45714bec49971ade22e6e24e42";async function jt(t){const e=Date.now();let o=t.substring(0,Math.min(255,t.length))+e;const n=await async function(t,e){try{const o=new TextEncoder("utf-8");e=o.encode(e);const n=await window.crypto.subtle.importKey("raw",o.encode(t),{name:"HMAC",hash:{name:"SHA-1"}},!1,["sign","verify"]),i=await window.crypto.subtle.sign("HMAC",n,e);return btoa(String.fromCharCode(...new Uint8Array(i)))}catch(t){return console.error(t),!1}}(Ht,o);return{wmsgpad:e,wmd:n}}function Ut(){return{appId:Nt,language:"en",os:"WEB",platform:"WEB",wpf:"pc"}}const Wt={getVideoData:async function(){const t=new URL(window.location).pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[3],e=await async function(t){const e=`/post/v1.0/post-${t}/preview?`+new URLSearchParams({fieldSet:"postForPreview",...Ut()}),o=await jt(e);try{const t=await fetch($t+e+"&"+new URLSearchParams(o));return await t.json()}catch(t){return console.error(t),!1}}(t);if(!e)return;c.A.log("weverse video preview data:",e);const{videoId:o,serviceId:n,infraVideoId:i}=e.extension.video;if(!(o&&n&&i))return!1;const a=await async function(t){const e=`/video/v1.1/vod/${t}/inKey?`+new URLSearchParams({gcc:"RU",...Ut()}),o=await jt(e);try{const t=await fetch($t+e+"&"+new URLSearchParams(o),{method:"POST"});return await t.json()}catch(t){return console.error(t),!1}}(o);if(c.A.log("weverse video inKey data:",e),!a)return!1;const r=await async function(t,e,o){const n=Date.now();try{const i=await fetch(`https://global.apis.naver.com/rmcnmv/rmcnmv/vod/play/v2.0/${t}?`+new URLSearchParams({key:e,sid:o,nonce:n,devt:"html5_pc",prv:"N",aup:"N",stpb:"N",cpl:"en",env:"prod",lc:"en",adi:JSON.stringify([{adSystem:null}]),adu:"/"}));return await i.json()}catch(t){return console.error(t),!1}}(i,a.inKey,n);c.A.log("weverse video info:",r);const s=r.videos.list.find((t=>!1===t.useP2P&&t.source.includes(".mp4")));return!!s&&{url:s.source,duration:s.duration}}},Gt=[{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube.com$/,selector:"shorts-video #player"},{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube.com$/,selector:".player-container"},{host:"youtube",url:"https://youtu.be/",match:/^(www.)?youtube(-nocookie|kids)?.com$/,selector:".html5-video-container:not(#inline-player *)"},{host:"tiktok",url:"https://www.tiktok.com/",match:/^(www.)?tiktok.com$/,selector:null},{host:"proxitok",url:"https://www.tiktok.com/",match:n,selector:".column.has-text-centered"},{host:"twitch",url:"https://twitch.tv/",match:[/^m.twitch.tv$/,/^www.twitch.tv$/,/^clips.twitch.tv$/,/^player.twitch.tv$/],selector:".video-ref, main > div > section > div > div > div"},{host:"xvideos",url:"https://www.xvideos.com/",match:/^www.xvideos.com$/,selector:".video-bg-pic"},{host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:/^[a-z]+.pornhub.com$/,selector:".mainPlayerDiv > .video-element-wrapper-js > div"},{additionalData:"embed",host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:t=>t.host.includes("pornhub.com")&&t.pathname.startsWith("/embed/"),selector:"#player"},{additionalData:"mobile",host:"vk",url:"https://vk.com/video?z=",match:/^m.vk.(com|ru)$/,selector:"vk-video-player",shadowRoot:!0},{additionalData:"clips",host:"vk",url:"https://vk.com/video?z=",match:/^(www.|m.)?vk.(com|ru)$/,selector:'div[data-testid="clipcontainer-video"]'},{host:"vk",url:"https://vk.com/video?z=",match:/^(www.|m.)?vk.(com|ru)$/,selector:".videoplayer_media"},{host:"vimeo",url:"https://vimeo.com/",match:/^vimeo.com$/,selector:".player"},{additionalData:"embed",host:"vimeo",url:"https://player.vimeo.com/",match:/^player.vimeo.com$/,selector:".player"},{host:"ok.ru",url:"https://ok.ru/video/",match:/^ok.ru$/,selector:".html5-vpl_vid"},{host:"nine_gag",url:"https://9gag.com/gag/",match:/^9gag.com$/,selector:".video-post"},{host:"bitchute",url:"https://www.bitchute.com/video/",match:/^(www.)?bitchute.com$/,selector:"div#player"},{host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:".video-player > div > div > div:nth-child(2)"},{additionalData:"embed",host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:"#app > div > div"},{host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m|player).bilibili.com$/,selector:".bpx-player-video-wrap"},{additionalData:"old",host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m).bilibili.com$/,selector:null},{host:"twitter",url:"https://twitter.com/i/status/",match:/^twitter.com$/,selector:'div[data-testid="videoComponent"] > div:nth-child(1) > div'},{host:"mail_ru",url:"https://my.mail.ru/",match:/^my.mail.ru$/,selector:"#b-video-wrapper"},{host:"coursera",url:"https://www.coursera.org/",match:/coursera.org$/,selector:".vjs-v6"},{host:"udemy",url:"https://www.udemy.com/",match:/udemy.com$/,selector:'div[data-purpose="curriculum-item-viewer-content"] > section > div > div > div > div:nth-of-type(2)'},{host:"invidious",url:"https://youtu.be/",match:t,selector:"#player"},{host:"piped",url:"https://youtu.be/",match:e,selector:".shaka-video-container"},{host:"rumble",url:"https://rumble.com/",match:/^rumble.com$/,selector:"#videoPlayer > .videoPlayer-Rumble-cls > div"},{host:"eporner",url:"https://www.eporner.com/",match:/^(www.)?eporner.com$/,selector:".vjs-v7"},{host:"peertube",url:"stub",match:i,selector:".vjs-v7"},{host:"dailymotion",url:"https://dai.ly/",match:/^geo.dailymotion.com$/,selector:".player"},{host:"trovo",url:"https://trovo.live/s/",match:/^trovo.live$/,selector:".player-video"},{host:"yandexdisk",url:"https://yadi.sk/i/",match:/^disk.yandex.ru$/,selector:".video-player__player > div:nth-child(1)"},{host:"coursehunter",url:"https://coursehunter.net/course/",match:/^coursehunter.net$/,selector:"#oframeplayer > pjsdiv:nth-of-type(1)"},{host:"googledrive",url:"https://drive.google.com/file/d/",match:/^youtube.googleapis.com$/,selector:".html5-video-container"},{host:"bannedvideo",url:"https://banned.video/watch?id=",match:/^(www.)?banned.video$/,selector:".vjs-v7"},{host:"facebook",url:"https://facebook.com/",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/videos/"),selector:'div[role="main"] div[data-pagelet$="video" i]'},{additionalData:"reels",host:"facebook",url:"https://facebook.com/",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/reel/"),selector:'div[role="main"]'},{host:"weverse",url:"https://weverse.io/",match:/^weverse.io$/,selector:".webplayer-internal-source-wrapper"},{host:"newgrounds",url:"https://www.newgrounds.com/",match:/^www.newgrounds.com$/,selector:".ng-video-player"},{host:"egghead",url:"https://egghead.io/",match:/^egghead.io$/,selector:".cueplayer-react-video-holder"},{host:"youku",url:"https://v.youku.com/",match:/^v.youku.com$/,selector:"#ykPlayer"},{host:"directlink",url:"stub",match:t=>/([^.]+).mp4/.test(t.pathname),selector:null}];o("./node_modules/requestidlecallback-polyfill/index.js");class Yt{constructor(){this.listeners=new Set}hasListener(t){return this.listeners.has(t)}dispatchToListener(t,...e){try{t(...e)}catch(t){console.error("[VOT]",t)}}addListener(t){if(this.hasListener(t))throw new Error("[VOT] The listener has already been added.");this.listeners.add(t)}removeListener(t){if(!this.hasListener(t))throw new Error("[VOT] The listener has not been added yet.");this.listeners.delete(t)}dispatch(...t){for(const e of Array.from(this.listeners))this.dispatchToListener(e,...t)}}function Zt(t){return Array.from(t).flatMap((t=>t instanceof HTMLVideoElement?[t]:t instanceof HTMLElement?Array.from(t.querySelectorAll("video")):t.shadowRoot?Array.from(t.shadowRoot.querySelectorAll("video")):[]))}const Kt=/advertise|promo|sponsor|banner|commercial|preroll|midroll|postroll|ad-container|sponsored/i;const Jt=vt.getParser(window.navigator.userAgent).getResult(),Qt=[...t,...e],Xt=["playing","ratechange","play","waiting","pause"];function te(t,e){return t.map((t=>({label:R.get("langs")[t]??t.toUpperCase(),value:t,selected:e===t})))}function ee(t,e,o,n,i,a){c.A.log(`Translate video (url: ${t}, duration: ${e}, requestLang: ${o}, responseLang: ${n})`),c.A.log("translationHelp:",i),!0,wt(t,e,o,n,i,((t,e)=>{if(!1,c.A.log("[exec callback] Requesting video translation"),!t)return void a(!1,R.get("requestTranslationFailed"));const o=gt.decodeTranslationResponse(e);switch(console.log("[VOT] Translation response: ",o),o.status){case 0:a(!1,o.message);break;case 1:case 5:a(!!o.url,o.url||R.get("audioNotReceived"));break;case 2:a(!1,o.remainingTime?function(t){const e=Math.floor(t/60),o=Math.floor(t%60);return e>=60?R.get("translationTakeMoreThanHour"):1===e||0===e&&o>0?R.get("translationTakeAboutMinute"):11!==e&&e%10==1?R.get("translationTakeApproximatelyMinute2").replace("{0}",e):![12,13,14].includes(e)&&[2,3,4].includes(e%10)?R.get("translationTakeApproximatelyMinute").replace("{0}",e):R.get("translationTakeApproximatelyMinutes").replace("{0}",e)}(o.remainingTime):R.get("translationTakeFewMinutes"));break;case 3:case 6:a(!1,R.get("videoBeingTranslated"))}}))}class oe{translateFromLang="en";translateToLang=M;timer;ytData="";videoData="";firstPlay=!0;audio=new Audio;hls=C();videoTranslations=[];videoTranslationTTL=7200;downloadTranslationUrl=null;downloadSubtitlesUrl=null;autoRetry;streamPing;volumeOnStart;tempOriginalVolume;tempVolume;firstSyncVolume=!0;subtitlesList=[];subtitlesListVideoId=null;videoLastSrcObject=null;dragging;constructor(t,e,o){c.A.log("[VideoHandler] add video:",t,"container:",e,this),this.video=t,this.container=e,this.site=o,this.stopTranslationBound=this.stopTranslation.bind(this),this.handleVideoEventBound=this.handleVideoEvent.bind(this),this.changeOpacityOnEventBound=this.changeOpacityOnEvent.bind(this),this.resetTimerBound=this.resetTimer.bind(this),this.init()}async autoTranslate(){if(this.site.host,this.firstPlay&&1===this.data.autoTranslate&&this.videoData.videoId){this.firstPlay=!1;try{await this.translateExecutor(this.videoData.videoId)}catch(t){console.error("[VOT]",t),this.transformBtn("error","VOTLocalizedError"===t?.name?t.localizedMessage:t)}}}async init(){if(this.initialized)return;const t={autoTranslate:u.get("autoTranslate",0,!0),dontTranslateLanguage:u.get("dontTranslateLanguage",M),dontTranslateYourLang:u.get("dontTranslateYourLang",1,!0),autoSetVolumeYandexStyle:u.get("autoSetVolumeYandexStyle",1,!0),autoVolume:u.get("autoVolume",a.JD,!0),buttonPos:u.get("buttonPos","default"),showVideoSlider:u.get("showVideoSlider",1,!0),syncVolume:u.get("syncVolume",0,!0),subtitlesMaxLength:u.get("subtitlesMaxLength",300,!0),highlightWords:u.get("highlightWords",0,!0),responseLanguage:u.get("responseLanguage",M),defaultVolume:u.get("defaultVolume",100,!0),udemyData:u.get("udemyData",{accessToken:"",expires:0}),audioProxy:u.get("audioProxy",0,!0),showPiPButton:u.get("showPiPButton",0,!0),translateAPIErrors:u.get("translateAPIErrors",1,!0),translationService:u.get("translationService",a.mE),detectService:u.get("detectService",a.K2),m3u8ProxyHost:u.get("m3u8ProxyHost",a.se),proxyWorkerHost:u.get("proxyWorkerHost",a.Pm)};this.data=Object.fromEntries(await Promise.all(Object.entries(t).map((async([t,e])=>[t,await e])))),console.log("[db] data from db: ",this.data),this.subtitlesWidget=new Lt(this.video,this.container,this.site),this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength),this.subtitlesWidget.setHighlightWords(this.data.highlightWords),this.initUI(),this.initUIEvents();const e=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=e,e?this.votMenu.container.hidden=!0:(this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage??"ru")),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),await this.autoTranslate(),this.translateToLang=this.data.responseLanguage??"ru",this.initExtraEvents(),this.initialized=!0}transformBtn(t="none",e){this.votButton.container.dataset.status=t,this.votButton.container.dataset.translating="error"===t&&e.includes(R.get("translationTake")),this.votButton.label.innerHTML=e,this.votButton.container.title="error"===t?e:""}initUI(){this.votButton=X.createVOTButton(R.get("translateVideo")),this.data?.buttonPos&&"default"!==this.data?.buttonPos&&this.video.clientWidth&&this.video.clientWidth>550?(this.votButton.container.dataset.direction="column",this.votButton.container.dataset.position=this.data?.buttonPos):(this.votButton.container.dataset.direction="row",this.votButton.container.dataset.position="default"),this.container.appendChild(this.votButton.container),this.votButton.pipButton.hidden=!A()||!this.data?.showPiPButton,this.votButton.separator2.hidden=!A()||!this.data?.showPiPButton,this.votButton.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votMenu=X.createVOTMenu(R.get("VOTSettings")),this.votMenu.container.dataset.position=this.video.clientWidth&&this.video.clientWidth>550?this.data?.buttonPos:"default",this.container.appendChild(this.votMenu.container),this.votDownloadButton=X.createIconButton(''),this.votDownloadButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadButton),this.votDownloadSubtitlesButton=X.createIconButton(''),this.votDownloadSubtitlesButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadSubtitlesButton),this.votSettingsButton=X.createIconButton(''),this.votMenu.headerContainer.appendChild(this.votSettingsButton),this.votTranslationLanguageSelect=X.createVOTLanguageSelect({fromTitle:R.get("langs")[this.video.detectedLanguage],fromDialogTitle:R.get("videoLanguage"),fromItems:[{label:R.get("langs").auto,value:"auto",selected:""},...te(r,this.videoData.detectedLanguage)],fromOnSelectCB:async t=>{c.A.log("[fromOnSelectCB] select from language",t.target.dataset.votValue),this.videoData=await this.getVideoData(),this.setSelectMenuValues(t.target.dataset.votValue,this.videoData.responseLanguage)},toTitle:R.get("langs")[this.video.responseLanguage],toDialogTitle:R.get("translationLanguage"),toItems:te(s,this.videoData.responseLanguage),toOnSelectCB:async t=>{const e=t.target.dataset.votValue;c.A.log("[toOnSelectCB] select to language",e),this.data.responseLanguage=this.translateToLang=e,await u.set("responseLanguage",this.data.responseLanguage),c.A.log("Response Language value changed. New value: ",this.data.responseLanguage),this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage)}}),this.votMenu.bodyContainer.appendChild(this.votTranslationLanguageSelect.container),this.votSubtitlesSelect=X.createVOTSelect(R.get("VOTSubtitlesDisabled"),R.get("VOTSubtitles"),[{label:R.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1}],{onSelectCb:async t=>{await this.changeSubtitlesLang(t.target.dataset.votValue)},labelElement:X.createVOTSelectLabel(R.get("VOTSubtitles"))}),this.votMenu.bodyContainer.appendChild(this.votSubtitlesSelect.container),this.votVideoVolumeSlider=X.createSlider(`${R.get("VOTVolume")}: ${100*this.getVideoVolume()}%`,100*this.getVideoVolume()),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoVolumeSlider.container),this.votVideoTranslationVolumeSlider=X.createSlider(`${R.get("VOTVolumeTranslation")}: ${this.data?.defaultVolume??100}%`,this.data?.defaultVolume??100),this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoTranslationVolumeSlider.container),this.votMenu.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votSettingsDialog=X.createDialog(R.get("VOTSettings")),document.documentElement.appendChild(this.votSettingsDialog.container),this.votTranslationHeader=X.createHeader(R.get("translationSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationHeader),this.votAutoTranslateCheckbox=X.createCheckbox(R.get("VOTAutoTranslate"),this.data?.autoTranslate??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoTranslateCheckbox.container),this.votDontTranslateYourLangSelect=X.createVOTSelect(R.get("langs")[u.syncGet("dontTranslateLanguage",M)],R.get("VOTDontTranslateYourLang"),te(r,u.syncGet("dontTranslateLanguage",M)),{onSelectCb:async t=>{this.data.dontTranslateLanguage=t.target.dataset.votValue,await u.set("dontTranslateLanguage",this.data.dontTranslateLanguage)},labelElement:X.createCheckbox(R.get("VOTDontTranslateYourLang"),this.data?.dontTranslateYourLang??!0).container}),this.votSettingsDialog.bodyContainer.appendChild(this.votDontTranslateYourLangSelect.container),this.votAutoSetVolumeCheckbox=X.createCheckbox(`${R.get("VOTAutoSetVolume")}`,this.data?.autoSetVolumeYandexStyle??!0),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeCheckbox.container),this.votAutoSetVolumeSlider=X.createSlider(`${100*(this.data?.autoVolume??a.JD)}%`,100*(this.data?.autoVolume??a.JD),0,100),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeSlider.container),this.votShowVideoSliderCheckbox=X.createCheckbox(R.get("VOTShowVideoSlider"),this.data?.showVideoSlider??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votShowVideoSliderCheckbox.container),this.votUdemyDataTextfield=X.createTextfield(R.get("VOTUdemyData"),this.data?.udemyData?.accessToken??""),this.votUdemyDataTextfield.container.hidden="udemy"!==this.site.host,this.votSettingsDialog.bodyContainer.appendChild(this.votUdemyDataTextfield.container),this.votSyncVolumeCheckbox=X.createCheckbox(R.get("VOTSyncVolume"),this.data?.syncVolume??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSyncVolumeCheckbox.container),this.votTranslationServiceSelect=X.createVOTSelect(u.syncGet("translationService",a.mE).toUpperCase(),R.get("VOTTranslationService"),te(m,u.syncGet("translationService",a.mE)),{onSelectCb:async t=>{this.data.translationService=t.target.dataset.votValue,await u.set("translationService",this.data.translationService)},labelElement:X.createCheckbox(R.get("VOTTranslateAPIErrors"),this.data.translateAPIErrors??!0).container}),this.votTranslationServiceSelect.container.hidden="ru"===R.lang,this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationServiceSelect.container),this.votDetectServiceSelect=X.createVOTSelect(u.syncGet("detectService",a.K2).toUpperCase(),R.get("VOTDetectService"),te(b,u.syncGet("detectService",a.K2)),{onSelectCb:async t=>{this.data.detectService=t.target.dataset.votValue,await u.set("detectService",this.data.detectService)},labelElement:X.createVOTSelectLabel(R.get("VOTDetectService"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votDetectServiceSelect.container),this.votSubtitlesHeader=X.createHeader(R.get("subtitlesSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHeader),this.votSubtitlesMaxLengthSlider=X.createSlider(`${R.get("VOTSubtitlesMaxLength")}: ${this.data?.subtitlesMaxLength??300}`,this.data?.subtitlesMaxLength??300,50,300),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesMaxLengthSlider.container),this.votSubtitlesHighlightWordsCheckbox=X.createCheckbox(R.get("VOTHighlightWords"),this.data?.highlightWords??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHighlightWordsCheckbox.container),this.votProxyHeader=X.createHeader(R.get("proxySettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votProxyHeader),this.votM3u8ProxyHostTextfield=X.createTextfield(R.get("VOTM3u8ProxyHost"),this.data?.m3u8ProxyHost,a.se),this.votSettingsDialog.bodyContainer.appendChild(this.votM3u8ProxyHostTextfield.container),this.votProxyWorkerHostTextfield=X.createTextfield(R.get("VOTProxyWorkerHost"),this.data?.proxyWorkerHost,a.Pm),this.votProxyWorkerHostTextfield.container.hidden=!0,this.votSettingsDialog.bodyContainer.appendChild(this.votProxyWorkerHostTextfield.container),this.votAudioProxyCheckbox=X.createCheckbox(R.get("VOTAudioProxy"),this.data?.audioProxy??!1),this.votAudioProxyCheckbox.container.hidden=!0,this.votSettingsDialog.bodyContainer.appendChild(this.votAudioProxyCheckbox.container),this.votAboutHeader=X.createHeader(R.get("about")),this.votSettingsDialog.bodyContainer.appendChild(this.votAboutHeader),this.votLanguageSelect=X.createVOTSelect(R.get("langs")[u.syncGet("locale-lang-override","auto")],R.get("VOTMenuLanguage"),te(E,u.syncGet("locale-lang-override","auto")),{onSelectCb:async t=>{await u.set("locale-lang-override",t.target.dataset.votValue)},labelElement:X.createVOTSelectLabel(R.get("VOTMenuLanguage"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votLanguageSelect.container),this.votShowPiPButtonCheckbox=X.createCheckbox(R.get("VOTShowPiPButton"),this.data?.showPiPButton??!1),this.votShowPiPButtonCheckbox.container.hidden=!A(),this.votSettingsDialog.bodyContainer.appendChild(this.votShowPiPButtonCheckbox.container),this.votVersionInfo=X.createInformation(`${R.get("VOTVersion")}:`,GM_info.script.version),this.votSettingsDialog.bodyContainer.appendChild(this.votVersionInfo.container),this.votAuthorsInfo=X.createInformation(`${R.get("VOTAuthors")}:`,GM_info.script.author),this.votSettingsDialog.bodyContainer.appendChild(this.votAuthorsInfo.container),this.votLoaderInfo=X.createInformation(`${R.get("VOTLoader")}:`,`${GM_info.scriptHandler} v${GM_info.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votLoaderInfo.container),this.votBrowserInfo=X.createInformation(`${R.get("VOTBrowser")}:`,`${Jt.browser.name} ${Jt.browser.version} (${Jt.os.name} ${Jt.os.version})`),this.votSettingsDialog.bodyContainer.appendChild(this.votBrowserInfo.container),this.votResetSettingsButton=X.createButton(R.get("resetSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votResetSettingsButton)}initUIEvents(){this.votButton.translateButton.addEventListener("click",(()=>{(async()=>{if(this.audio.src)return c.A.log("[click translationBtn] audio.src is not empty"),void this.stopTranslate();if(this.hls.url)return c.A.log("[click translationBtn] hls is not empty"),void this.stopTranslate();try{if(c.A.log("[click translationBtn] trying execute translation"),!this.videoData.videoId)throw new tt("VOTNoVideoIDFound");"vk"===this.site.host&&"clips"===this.site.additionalData&&(this.videoData=await this.getVideoData()),await this.translateExecutor(this.videoData.videoId)}catch(t){console.error("[VOT]",t),"VOTLocalizedError"===t?.name?this.transformBtn("error",t.localizedMessage):this.transformBtn("error",t)}})()})),this.votButton.pipButton.addEventListener("click",(()=>{(async()=>{this.video!==document.pictureInPictureElement?await this.video.requestPictureInPicture():await document.exitPictureInPicture()})()})),this.votButton.menuButton.addEventListener("click",(()=>{this.votMenu.container.hidden=!this.votMenu.container.hidden})),this.votButton.container.addEventListener("mousedown",(()=>{this.dragging=!0})),this.container.addEventListener("mouseup",(()=>{this.dragging=!1})),this.container.addEventListener("mousemove",(async t=>{if(this.dragging){t.preventDefault();const e=t.clientX/this.container.clientWidth*100;this.data.buttonPos=this.container.clientWidth&&this.container.clientWidth>550?e<=33?"left":e>=66?"right":"default":"default",this.votButton.container.dataset.direction="default"===this.data.buttonPos?"row":"column",this.votButton.container.dataset.position=this.data.buttonPos,this.votMenu.container.dataset.position=this.data.buttonPos,this.container.clientWidth&&this.container.clientWidth>550&&await u.set("buttonPos",this.data.buttonPos)}})),this.votDownloadButton.addEventListener("click",(()=>{this.downloadTranslationUrl&&window.open(this.downloadTranslationUrl,"_blank").focus()})),this.votDownloadSubtitlesButton.addEventListener("click",(async()=>{const t=function(t){let e="",o=1;for(const n of t.subtitles){let t=n.startMs/1e3,i=(n.startMs+n.durationMs)/1e3;e+=`${o}\n`,e+=`${Tt(t)} --\x3e ${Tt(i)}\n`,e+=`${n.text}\n\n`,o++}return e.trim()}(this.YandexSubtitles),e=new Blob([t],{type:"text/plain"}),o=URL.createObjectURL(e),n=document.createElement("a");n.href=o,n.download=`subtitles_${this.videoData.videoId}.srt`,n.click(),URL.revokeObjectURL(o)})),this.votSettingsButton.addEventListener("click",(()=>{this.votSettingsDialog.container.hidden=!this.votSettingsDialog.container.hidden,(document.fullscreenElement||document.webkitFullscreenElement)&&(document.webkitExitFullscreen&&document.webkitExitFullscreen(),document.exitFullscreen&&document.exitFullscreen())})),this.votVideoVolumeSlider.input.addEventListener("input",(t=>{const e=Number(t.target.value);this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`,this.setVideoVolume(e/100),this.data.syncVolume&&this.syncVolumeWrapper("video",e)})),this.votVideoTranslationVolumeSlider.input.addEventListener("input",(t=>{(async()=>{this.data.defaultVolume=Number(t.target.value),await u.set("defaultVolume",this.data.defaultVolume),this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${this.data.defaultVolume}%`,this.audio.volume=this.data.defaultVolume/100,this.data.syncVolume&&(this.syncVolumeWrapper("translation",this.data.defaultVolume),["youtube","googledrive"].includes(this.site.host)&&"mobile"!==this.site.additionalData&&this.setVideoVolume(this.tempOriginalVolume/100))})()})),this.votAutoTranslateCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.autoTranslate=Number(t.target.checked),await u.set("autoTranslate",this.data.autoTranslate),await this.autoTranslate(),c.A.log("autoTranslate value changed. New value: ",this.data.autoTranslate)})()})),this.votDontTranslateYourLangSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.dontTranslateYourLang=Number(t.target.checked),await u.set("dontTranslateYourLang",this.data.dontTranslateYourLang),c.A.log("dontTranslateYourLang value changed. New value: ",this.data.dontTranslateYourLang)})()})),this.votAutoSetVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.autoSetVolumeYandexStyle=Number(t.target.checked),await u.set("autoSetVolumeYandexStyle",this.data.autoSetVolumeYandexStyle),c.A.log("autoSetVolumeYandexStyle value changed. New value: ",this.data.autoSetVolumeYandexStyle)})()})),this.votAutoSetVolumeSlider.input.addEventListener("input",(t=>{(async()=>{const e=Number(t.target.value);this.data.autoVolume=(e/100).toFixed(2),await u.set("autoVolume",this.data.autoVolume),this.votAutoSetVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`})()})),this.votShowVideoSliderCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showVideoSlider=Number(t.target.checked),await u.set("showVideoSlider",this.data.showVideoSlider),c.A.log("showVideoSlider value changed. New value: ",this.data.showVideoSlider),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status})()})),this.votUdemyDataTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.udemyData={accessToken:t.target.value,expires:(new Date).getTime()},await u.set("udemyData",this.data.udemyData),c.A.log("udemyData value changed. New value: ",this.data.udemyData),window.location.reload()})()})),this.votSyncVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.syncVolume=Number(t.target.checked),await u.set("syncVolume",this.data.syncVolume),c.A.log("syncVolume value changed. New value: ",this.data.syncVolume)})()})),this.votTranslationServiceSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.translateAPIErrors=Number(t.target.checked),await u.set("translateAPIErrors",this.data.translateAPIErrors),c.A.log("translateAPIErrors value changed. New value: ",this.data.translateAPIErrors)})()})),this.votSubtitlesMaxLengthSlider.input.addEventListener("input",(t=>{(async()=>{this.data.subtitlesMaxLength=Number(t.target.value),await u.set("subtitlesMaxLength",this.data.subtitlesMaxLength),this.votSubtitlesMaxLengthSlider.label.querySelector("strong").innerHTML=`${this.data.subtitlesMaxLength}`,this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength)})()})),this.votSubtitlesHighlightWordsCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.highlightWords=Number(t.target.checked),await u.set("highlightWords",this.data.highlightWords),c.A.log("highlightWords value changed. New value: ",this.data.highlightWords),this.subtitlesWidget.setHighlightWords(this.data.highlightWords)})()})),this.votShowPiPButtonCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showPiPButton=Number(t.target.checked),await u.set("showPiPButton",this.data.showPiPButton),c.A.log("showPiPButton value changed. New value: ",this.data.showPiPButton),this.votButton.pipButton.hidden=!A()||!this.data.showPiPButton,this.votButton.separator2.hidden=!A()||!this.data.showPiPButton})()})),this.votM3u8ProxyHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.m3u8ProxyHost=t.target.value||a.se,await u.set("m3u8ProxyHost",this.data.m3u8ProxyHost),c.A.log("m3u8ProxyHost value changed. New value: ",this.data.m3u8ProxyHost)})()})),this.votProxyWorkerHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.proxyWorkerHost=t.target.value||a.Pm,await u.set("proxyWorkerHost",this.data.proxyWorkerHost),c.A.log("proxyWorkerHost value changed. New value: ",this.data.proxyWorkerHost),window.location.reload()})()})),this.votAudioProxyCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.audioProxy=Number(t.target.checked),await u.set("audioProxy",this.data.audioProxy),c.A.log("audioProxy value changed. New value: ",this.data.audioProxy)})()})),this.votResetSettingsButton.addEventListener("click",(()=>{(async()=>{R.reset();const t=await u.list();for(let e=0;e{this.extraEvents.push({element:t,event:e,handler:o}),t.addEventListener(e,o)},e=(e,o,n)=>{for(const i of o)t(e,i,n)};if(this.resizeObserver=new ResizeObserver((t=>{for(let e=0;e550;this.votButton.container.dataset.position=this.votMenu.container.dataset.position=e?this.data?.buttonPos:"default",this.votButton.container.dataset.direction=this.data?.buttonPos&&"default"!==this.data?.buttonPos&&e?"column":"row"})),this.resizeObserver.observe(this.video),this.votMenu.container.setAttribute("style",`--vot-container-height: ${this.video.getBoundingClientRect().height}px`),["youtube","googledrive"].includes(this.site.host)&&"mobile"!==this.site.additionalData){this.syncVolumeObserver=new MutationObserver((t=>{if(this.audio.src&&this.data.syncVolume)for(let e=0;e{const e=t.target,o=this.votButton.container,n=this.votMenu.container,i=this.container,a=this.votSettingsDialog.container,r=document.querySelector(".vot-dialog-temp"),s=o.contains(e),l=n.contains(e),d=i.contains(e),u=a.contains(e),h=r?.contains(e)??!1;c.A.log(`[document click] ${s} ${l} ${d} ${u} ${h}`),s||l||u||h||(d||this.logout(0),this.votMenu.container.hidden=!0)})),o="pornhub"===this.site.host?"embed"===this.site.additionalData?document.querySelector("#player"):this.container.querySelector(".video-element-wrapper-js > div"):"twitter"===this.site.host?document.querySelector('div[data-testid="videoPlayer"]'):"yandexdisk"===this.site.host?document.querySelector(".video-player__player"):this.container,o&&e(o,["mousemove","mouseout"],this.resetTimerBound),t(this.votButton.container,"mousemove",this.changeOpacityOnEventBound),t(this.votMenu.container,"mousemove",this.changeOpacityOnEventBound),e(document,["touchstart","touchmove","touchend"],this.changeOpacityOnEventBound),t(this.votButton.container,"mousedown",(t=>{t.stopImmediatePropagation()})),t(this.votMenu.container,"mousedown",(t=>{t.stopImmediatePropagation()})),"youtube"===this.site.host&&(this.container.draggable=!1),"googledrive"===this.site.host&&(this.container.style.height="100%"),t(this.video,"canplaythrough",(async()=>{"rutube"===this.site.host&&this.video.src||V(this.site.host,this.video)!==this.videoData.videoId&&(await this.handleSrcChanged(),c.A.log("lipsync mode is loadeddata"),await this.autoTranslate())})),t(this.video,"emptied",(()=>{this.video.src&&V(this.site.host,this.video)===this.videoData.videoId||(c.A.log("lipsync mode is emptied"),this.videoData="",this.stopTranslation())})),["rutube","ok"].includes(this.site.host)||t(this.video,"volumechange",(()=>{this.syncVideoVolumeSlider()}))}logout(t){this.votMenu.container.hidden&&(this.votButton.container.style.opacity=t)}resetTimer(){clearTimeout(this.timer),this.logout(1),this.timer=setTimeout((()=>{this.logout(0)}),1e3)}changeOpacityOnEvent(t){clearTimeout(this.timer),this.logout(1),t.stopPropagation()}async changeSubtitlesLang(t){if(c.A.log("[onchange] subtitles",t),this.votSubtitlesSelect.setSelected(t),"disabled"===t)this.votSubtitlesSelect.setTitle(R.get("VOTSubtitlesDisabled")),this.subtitlesWidget.setContent(null),this.votDownloadSubtitlesButton.hidden=!0,this.YandexSubtitles=null;else{const e=await Mt(this.subtitlesList.at(parseInt(t)));this.subtitlesWidget.setContent(e),this.votDownloadSubtitlesButton.hidden=!1,this.YandexSubtitles=e}}async updateSubtitlesLangSelect(){const t=[{label:R.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1},...this.subtitlesList.map(((t,e)=>({label:(R.get("langs")[t.language]??t.language.toUpperCase())+(t.translatedFromLanguage?` ${R.get("VOTTranslatedFrom")} ${R.get("langs")[t.translatedFromLanguage]??t.translatedFromLanguage.toUpperCase()}`:"")+("yandex"!==t.source?` ${t.source}`:"")+(t.isAutoGenerated?` (${R.get("VOTAutogenerated")})`:""),value:e,selected:!1,disabled:!1})))];this.votSubtitlesSelect.updateItems(t),await this.changeSubtitlesLang(t[0].value)}async updateSubtitles(){if(await this.changeSubtitlesLang("disabled"),!this.videoData.videoId)return console.error(`[VOT] ${R.getDefault("VOTNoVideoIDFound")}`),this.subtitlesList=[],this.subtitlesListVideoId=null,this.votButton.container.hidden=!0,void await this.updateSubtitlesLangSelect();this.votButton.container.hidden=!1,this.subtitlesListVideoId!==this.videoData.videoId&&(this.subtitlesList=await Vt(this.site,this.videoData.videoId,this.videoData.detectedLanguage),this.subtitlesList?this.subtitlesListVideoId=this.videoData.videoId:await this.changeSubtitlesLang("disabled"),await this.updateSubtitlesLangSelect())}getVideoVolume(){let t=this.video?.volume;return["youtube","googledrive"].includes(this.site.host)&&(t=k.getVideoVolume()??t),t}setVideoVolume(t){if(["youtube","googledrive"].includes(this.site.host)){if(k.setVideoVolume(t))return}this.video.volume=t}isMuted(){return["youtube","googledrive"].includes(this.site.host)?k.isMuted():this.video?.muted}syncVideoVolumeSlider(){const t=this.isMuted()?0:100*this.getVideoVolume(),e=Math.round(t);this.votVideoVolumeSlider.input.value=e,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`,X.updateSlider(this.votVideoVolumeSlider.input),1===this.data.syncVolume&&(this.tempOriginalVolume=Number(e))}setSelectMenuValues(t,e){this.votTranslationLanguageSelect.fromSelect.setTitle(R.get("langs")[t]),this.votTranslationLanguageSelect.toSelect.setTitle(R.get("langs")[e]),this.votTranslationLanguageSelect.fromSelect.setSelected(t),this.votTranslationLanguageSelect.toSelect.setSelected(e),console.log(`[VOT] Set translation from ${t} to ${e}`),this.videoData.detectedLanguage=t,this.videoData.responseLanguage=e}syncVolumeWrapper(t,e){const o="translation"===t?this.votVideoVolumeSlider:this.votVideoTranslationVolumeSlider,n=Number(o.input.value),i=function(t,e,o,n){let i=e;return e>n?(i=o+(e-n),i=i>100?100:Math.max(i,0),t.volume=i/100):e100?100:Math.max(i,0),t.volume=i/100),i}("translation"===t?this.video:this.audio,e,n,"translation"===t?this.tempVolume:this.tempOriginalVolume);o.input.value=i,o.label.querySelector("strong").innerHTML=`${i}%`,X.updateSlider(o.input),this.tempOriginalVolume="translation"===t?i:e,this.tempVolume="translation"===t?e:i}async getVideoData(){const t={translationHelp:null,isStream:!1,duration:this.video?.duration||343,videoId:V(this.site.host,this.video),detectedLanguage:this.translateFromLang,responseLanguage:this.translateToLang};if(!t.videoId)return this.ytData={},t;if(window.location.hostname.includes("youtube.com"))this.ytData=await k.getVideoData(),t.isStream=this.ytData.isLive,this.ytData.title&&(t.detectedLanguage=this.ytData.detectedLanguage,t.responseLanguage=this.translateToLang);else if(window.location.hostname.includes("rutube")||window.location.hostname.includes("ok.ru")||window.location.hostname.includes("my.mail.ru"))t.detectedLanguage="ru";else if(["youku"].includes(this.site.host))t.detectedLanguage="zh";else if(["vk"].includes(this.site.host)){const e=document.getElementsByTagName("track")?.[0]?.srclang;t.detectedLanguage=e||"auto"}else if(window.location.hostname.includes("coursera.org")){const e=await Ot.getVideoData(this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else if(window.location.hostname.includes("coursehunter.net")){const e=await At.getVideoData();t.translationHelp={url:e.url},t.duration=e.duration||t.duration}else if(window.location.hostname.includes("banned.video")){const e=await It.getVideoData(t.videoId);t.translationHelp={url:e.url},t.duration=e.duration||t.duration,t.isStream=e.live}else if(window.location.hostname.includes("weverse.io")){const e=await Wt.getVideoData();t.detectedLanguage="ko",e&&(t.translationHelp={url:e.url},t.duration=e.duration||t.duration)}else if(window.location.hostname.includes("udemy.com")){const e=await zt.getVideoData(this.data.udemyData,this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else["bilibili","piped","invidious","bitchute","rumble","peertube","dailymotion","trovo","yandexdisk","coursehunter","directlink"].includes(this.site.host)&&(t.detectedLanguage="auto");return t}videoValidator(){if(["youtube","ok.ru","vk"].includes(this.site.host)&&(c.A.log("VideoValidator videoData: ",this.videoData),1===this.data.dontTranslateYourLang&&this.videoData.detectedLanguage===this.data.dontTranslateLanguage))throw new tt("VOTDisableFromYourLang");if(!this.videoData.isStream&&this.videoData.duration>14400)throw new tt("VOTVideoIsTooLong");return!0}lipSync(t=!1){if(c.A.log("lipsync video",this.video),this.video)if(this.audio.currentTime=this.video.currentTime,this.audio.playbackRate=this.video.playbackRate,t)if("play"!=t)["pause","stop","waiting"].includes(t)&&(c.A.log(`lipsync mode is ${t}`),this.audio.pause()),"playing"==t&&(c.A.log("lipsync mode is playing"),this.audio.play());else{c.A.log("lipsync mode is play");const t=this.audio.play();void 0!==t&&t.catch((t=>{if(console.error("[VOT]",t),"NotAllowedError"===t.name)throw this.transformBtn("error",R.get("grantPermissionToAutoPlay")),new tt("grantPermissionToAutoPlay");if("NotSupportedError"===t.name)throw this.transformBtn("error",Qt.includes(window.location.hostname)?R.get("neededAdditionalExtension"):R.get("audioFormatNotSupported")),Qt.includes(window.location.hostname)?new tt("neededAdditionalExtension"):new tt("audioFormatNotSupported")}))}else c.A.log("lipsync mode is not set")}handleVideoEvent(t){c.A.log(`video ${t.type}`),this.lipSync(t.type)}stopTranslate(){for(const t of Xt)this.video.removeEventListener(t,this.handleVideoEventBound);this.audio.pause(),this.audio.src="",this.audio.removeAttribute("src"),this.votVideoVolumeSlider.container.hidden=!0,this.votVideoTranslationVolumeSlider.container.hidden=!0,this.votDownloadButton.hidden=!0,this.downloadTranslationUrl=null,this.transformBtn("none",R.get("translateVideo")),c.A.log(`Volume on start: ${this.volumeOnStart}`),this.volumeOnStart&&this.setVideoVolume(this.volumeOnStart),this.volumeOnStart="",clearInterval(this.streamPing),clearTimeout(this.autoRetry),this.hls?.destroy(),this.hls=C(),this.firstSyncVolume=!0}async translateExecutor(t){c.A.log("Run translateFunc",t),this.translateFunc(t,this.videoData.isStream,this.videoData.detectedLanguage,this.videoData.responseLanguage,this.videoData.translationHelp)}async updateTranslationErrorMsg(t){const e=R.get("translationTake"),o=R.get("VOTTranslatingError"),n=R.lang;if("VOTLocalizedError"===t?.name)this.transformBtn("error",t.localizedMessage);else if(1!==this.data.translateAPIErrors||t.includes(e)||"ru"===n)this.transformBtn("error",t);else{const e=await async function(t,e="",o="ru"){switch(await u.get("translationService",a.mE)){case"yandex":{const n=e&&o?`${e}-${o}`:o;return await p.translate(t,n)}case"deepl":return await v.translate(t,e,o);default:return t}}(t,"ru",n);this.transformBtn("error",o),this.transformBtn("error",e)}}afterUpdateTranslation(t){this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,1===this.data.autoSetVolumeYandexStyle&&(this.votVideoVolumeSlider.input.value=100*this.data.autoVolume,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=100*this.data.autoVolume+"%",X.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=t}updateTranslation(t){if(this.audio.src=t,this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),"twitter"===this.site.host)document.querySelector('button[data-testid="app-bar-back"][role="button"]').addEventListener("click",this.stopTranslationBound);this.video&&!this.video.paused&&this.lipSync("play");for(const t of Xt)this.video.addEventListener(t,this.handleVideoEventBound);this.transformBtn("success",R.get("disableTranslate")),this.afterUpdateTranslation(t)}translateFunc(t,e,o,n,i){console.log("[VOT] Video Data: ",this.videoData);const a=i?.url?i.url:`${this.site.url}${t}`;if(c.A.log("Run videoValidator"),this.videoValidator(),e)return c.A.log("Executed stream translation"),void function(t,e,o,n){c.A.log(`Translate stream (url: ${t}, requestLang: ${e}, responseLang: ${o})`),yt(t,e,o,((t,e)=>{if(c.A.log("[exec callback] Requesting stream translation"),!t)return void n(!1,R.get("requestTranslationFailed"));const o=gt.decodeStreamResponse(e);switch(console.log("[VOT] Stream Translation response: ",o),o.interval){case 10:n(!1,o.interval,R.get("translationTakeFewMinutes"));break;case 20:n(!0,o.interval,o||R.get("audioNotReceived"));break;case 0:n(!1,o.interval,R.get("streamNoConnectionToServer"))}}))}(a,o,n,(async(a,r,s)=>{if(c.A.log("[exec callback] translateStream callback"),V(this.site.host,this.video)!==t)return;if(!a||!s.translatedInfo)return await this.updateTranslationErrorMsg(s),void(10===r&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,o,n,i)),1e3*r)));this.transformBtn("success",R.get("disableTranslate")),console.log(s);const l=s.pingId;c.A.log(`Stream pingId: ${l}`),this.streamPing=setInterval((async()=>await ft(l,(t=>c.A.log("Stream ping result: ",t)))),1e3*r),c.A.log(s.translatedInfo.url);const d=`https://${this.data.m3u8ProxyHost}/?all=yes&origin=${encodeURIComponent("https://strm.yandex.ru")}&referer=${encodeURIComponent("https://strm.yandex.ru")}&url=${encodeURIComponent(s.translatedInfo.url)}`;if(c.A.log(d),this.hls)this.hls.on(Hls.Events.MEDIA_ATTACHED,(function(){c.A.log("audio and hls.js are now bound together !")})),this.hls.on(Hls.Events.MANIFEST_PARSED,(function(t){c.A.log("manifest loaded, found "+t?.levels?.length+" quality level")})),this.hls.loadSource(d),this.hls.attachMedia(this.audio),this.hls.on(Hls.Events.ERROR,(function(t){if(t.fatal)switch(t.type){case Hls.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover"),this.hls.recoverMediaError();break;case Hls.ErrorTypes.NETWORK_ERROR:console.error("fatal network error encountered",t);break;default:this.hls.destroy()}})),c.A.log(this.hls);else{if(!this.audio.canPlayType("application/vnd.apple.mpegurl"))throw new tt("audioFormatNotSupported");this.audio.src=d}if("youtube"===this.site.host&&k.videoSeek(this.video,10),this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),this.video.src||this.video.currentSrc||this.video.srcObject){this.video&&!this.video.paused&&this.lipSync("play");for(const t of Xt)this.video.addEventListener(t,this.handleVideoEventBound);this.afterUpdateTranslation(d)}else this.stopTranslation()}));if(["udemy","coursera"].includes(this.site.host)&&!i)throw new tt("VOTTranslationHelpNull");const r=this.videoTranslations.find((e=>e.videoId===t&&e.expires>Date.now()/1e3&&e.from===o&&e.to===n));if(r)return this.updateTranslation(r.url),void c.A.log("[translateFunc] A cached translate was received");const s=this.subtitlesList.some((t=>"yandex"===t.source))?2e4:3e4;ee(a,this.videoData.duration,o,n,i,(async(a,r)=>{if(c.A.log("[exec callback] translateVideo callback"),V(this.site.host,this.video)===t){if(!a)return await this.updateTranslationErrorMsg(r),r.includes(R.get("translationTake"))&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,o,n,i)),s)),void console.error("[VOT]",r);this.updateTranslation(r),this.subtitlesList.some((t=>"yandex"===t.source&&t.language===this.videoData.responseLanguage))||(this.subtitlesList=await Vt(this.site,this.videoData.videoId,this.videoData.detectedLanguage),await this.updateSubtitlesLangSelect()),this.videoTranslations.push({videoId:t,from:o,to:n,url:r,expires:Date.now()/1e3+this.videoTranslationTTL})}}))}stopTranslation(){this.stopTranslate(),this.syncVideoVolumeSlider()}async handleSrcChanged(){c.A.log("[VideoHandler] src changed",this),this.firstPlay=!0,this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage);const t=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=t,t&&(this.votMenu.container.hidden=t),this.site.selector||(this.container=this.video.parentElement),this.container.contains(this.votButton.container)||(this.container.appendChild(this.votButton.container),this.container.appendChild(this.votMenu.container)),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),this.translateToLang=this.data.responseLanguage??"ru"}async release(){c.A.log("[VideoHandler] release"),this.initialized=!1,this.releaseExtraEvents(),this.subtitlesWidget.release(),this.votButton.container.remove(),this.votMenu.container.remove()}}const ne=new class{constructor(){this.videoCache=new Set,this.onVideoAdded=new Yt,this.onVideoRemoved=new Yt,this.observer=new MutationObserver((t=>{window.requestIdleCallback((()=>{for(let e=0;e{for(let e=0;e=3}(t)?requestAnimationFrame(o):e(t)}()}(t,(t=>{this.handleVideoAdded(t)}))}handleVideoAdded=t=>{this.onVideoAdded.dispatch(t)};handleVideoRemoved=t=>{document.contains(t)||(this.videoCache.delete(t),this.onVideoRemoved.dispatch(t))}},ie=new WeakMap;function ae(t,e){if(t.shadowRoot){let o=t.selector?Array.from(document.querySelectorAll(t.selector)).find((t=>t.shadowRoot.contains(e))):e.parentElement;return o&&o.shadowRoot?o.parentElement:o}{const o=Jt.browser.version.split(".")[0];if(t.selector?.includes(":not")&&t.selector?.includes("*")&&o&&("Chrome"===Jt.browser.name&&Number(o)<88||"Firefox"===Jt.browser.name&&Number(o)<84)){const o=t.selector.split(" *")[0];return o?Array.from(document.querySelectorAll(o)).find((t=>t.contains(e))):e.parentElement}return t.selector?Array.from(document.querySelectorAll(t.selector)).find((t=>t.contains(e))):e.parentElement}}(async function(){if(c.A.log("Loading extension..."),await R.update(),c.A.log(`Selected menu language: ${R.lang}`),GM_info?.scriptHandler&&l.includes(GM_info.scriptHandler))return console.error(`[VOT] ${R.getDefault("unSupportedExtensionError").replace("{0}",GM_info.scriptHandler)}`),alert(`[VOT] ${R.get("unSupportedExtensionError").replace("{0}",GM_info.scriptHandler)}`);c.A.log("Extension compatibility passed..."),ne.onVideoAdded.addListener((t=>{for(const e of function(){const t=window.location.hostname,e=new URL(window.location),o=o=>o instanceof RegExp?o.test(t):"string"==typeof o?t.includes(o):"function"==typeof o&&o(e);return Gt.filter((t=>(Array.isArray(t.match)?t.match.some(o):o(t.match))&&t.host&&t.url))}()){if(!e)continue;let o=ae(e,t);if(o&&(("rumble"!==e.host||t.style.display)&&(["peertube","directlink"].includes(e.host)&&(e.url=window.location.origin),!ie.has(t)))){ie.set(t,new oe(t,o,e));break}}})),ne.onVideoRemoved.addListener((async t=>{ie.has(t)&&(await ie.get(t).release(),ie.delete(t))})),ne.enable()})().catch((t=>{console.error("[VOT]",t)}))})()})(); \ No newline at end of file +(()=>{var t={"./node_modules/bowser/es5.js":function(t){t.exports=function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=90)}({17:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n=o(18),i=function(){function t(){}return t.getFirstMatch=function(t,e){var o=e.match(t);return o&&o.length>0&&o[1]||""},t.getSecondMatch=function(t,e){var o=e.match(t);return o&&o.length>1&&o[2]||""},t.matchAndReturnConst=function(t,e,o){if(t.test(e))return o},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,o,n){void 0===n&&(n=!1);var i=t.getVersionPrecision(e),a=t.getVersionPrecision(o),r=Math.max(i,a),s=0,l=t.map([e,o],(function(e){var o=r-t.getVersionPrecision(e),n=e+new Array(o+1).join(".0");return t.map(n.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(n&&(s=r-Math.min(i,a)),r-=1;r>=s;){if(l[0][r]>l[1][r])return 1;if(l[0][r]===l[1][r]){if(r===s)return 0;r-=1}else if(l[0][r]1?i-1:0),r=1;r0){var r=Object.keys(o),l=s.default.find(r,(function(t){return e.isOS(t)}));if(l){var d=this.satisfies(o[l]);if(void 0!==d)return d}var c=s.default.find(r,(function(t){return e.isPlatform(t)}));if(c){var u=this.satisfies(o[c]);if(void 0!==u)return u}}if(a>0){var h=Object.keys(i),p=s.default.find(h,(function(t){return e.isBrowser(t,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var o=this.getBrowserName().toLowerCase(),n=t.toLowerCase(),i=s.default.getBrowserTypeByAlias(n);return e&&i&&(n=i.toLowerCase()),n===o},e.compareVersion=function(t){var e=[0],o=t,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(o=t.substr(1),"="===t[1]?(n=!0,o=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?o=t.substr(1):"~"===t[0]&&(n=!0,o=t.substr(1)),e.indexOf(s.default.compareVersions(i,o,n))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=d,t.exports=e.default},92:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=/version\/(\d+(\.?_?\d+)+)/i,r=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},o=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},o=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},o=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},o=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},o=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},o=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},o=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},o=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},o=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},o=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},o=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},o=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},o=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},o=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return o&&(e.version=o),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},o=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},o=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},o=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},o=i.default.getFirstMatch(a,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},o=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},o=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},o=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},o=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},o=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},o=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},o=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},o=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},o=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e={name:"Android Browser"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},o=i.default.getFirstMatch(a,t);return o&&(e.version=o),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(e,t),version:i.default.getSecondMatch(e,t)}}}];e.default=r,t.exports=e.default},93:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/Roku\/DVP/],describe:function(t){var e=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:a.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),o=i.default.getWindowsVersionName(e);return{name:a.OS_MAP.Windows,version:e,versionName:o}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:a.OS_MAP.iOS},o=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return o&&(e.version=o),e}},{test:[/macintosh/i],describe:function(t){var e=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),o=i.default.getMacOSVersionName(e),n={name:a.OS_MAP.MacOS,version:e};return o&&(n.versionName=o),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),o=t.test(/android/i);return e&&o},describe:function(t){var e=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),o=i.default.getAndroidVersionName(e),n={name:a.OS_MAP.Android,version:e};return o&&(n.versionName=o),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),o={name:a.OS_MAP.WebOS};return e&&e.length&&(o.version=e),o}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:a.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.PlayStation4,version:e}}}];e.default=r,t.exports=e.default},94:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",o={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(o.model=e),o}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),o=t.test(/like (ipod|iphone)/i);return e&&!o},describe:function(t){var e=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];e.default=r,t.exports=e.default},95:function(t,e,o){"use strict";e.__esModule=!0,e.default=void 0;var n,i=(n=o(17))&&n.__esModule?n:{default:n},a=o(18),r=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:a.ENGINE_MAP.Blink};var e=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:a.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:a.ENGINE_MAP.Trident},o=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:a.ENGINE_MAP.Presto},o=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:function(t){var e=t.test(/gecko/i),o=t.test(/like gecko/i);return e&&!o},describe:function(t){var e={name:a.ENGINE_MAP.Gecko},o=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:a.ENGINE_MAP.WebKit},o=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return o&&(e.version=o),e}}];e.default=r,t.exports=e.default}})},"./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss":(t,e,o)=>{"use strict";o.d(e,{A:()=>s});var n=o("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),i=o.n(n),a=o("./node_modules/css-loader/dist/runtime/api.js"),r=o.n(a)()(i());r.push([t.id,'.vot-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:none;border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-ontheme));background-color:rgb(var(--vot-helper-theme));box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer;transition:box-shadow .2s}.vot-button[hidden]{display:none !important}.vot-button::-moz-focus-inner{border:none}.vot-button::before,.vot-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-button::before{background-color:rgb(var(--vot-helper-ontheme));transition:opacity .2s}.vot-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-button:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.vot-button:hover::before{opacity:.08}.vot-button:active{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.vot-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s}.vot-button:disabled{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.12);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);box-shadow:none;cursor:initial}.vot-button:disabled::before,.vot-button:disabled::after{opacity:0}.vot-outlined-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:solid 1px;border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.24);border-radius:4px;padding:0 16px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:34px;outline:none;cursor:pointer}.vot-outlined-button[hidden]{display:none !important}.vot-outlined-button::-moz-focus-inner{border:none}.vot-outlined-button::before,.vot-outlined-button::after{content:"";position:absolute;border-radius:3px;top:0;right:0;bottom:0;left:0;opacity:0}.vot-outlined-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-outlined-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-outlined-button:hover::before{opacity:.04}.vot-outlined-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-outlined-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-outlined-button:disabled::before,.vot-outlined-button:disabled::after{opacity:0}.vot-text-button{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:4px;padding:0 8px;min-width:64px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;color:rgb(var(--vot-helper-theme));background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-text-button[hidden]{display:none !important}.vot-text-button::-moz-focus-inner{border:none}.vot-text-button::before,.vot-text-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-text-button::before{background-color:rgb(var(--vot-helper-theme));transition:opacity .2s}.vot-text-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-text-button:hover::before{opacity:.04}.vot-text-button:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-text-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-text-button:disabled::before,.vot-text-button:disabled::after{opacity:0}.vot-icon-button{--vot-helper-onsurface: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);position:relative;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0;border:none;border-radius:50%;padding:0;width:36px;height:36px;vertical-align:middle;text-align:center;text-overflow:ellipsis;fill:var(--vot-helper-onsurface);color:var(--vot-helper-onsurface);background-color:rgba(0,0,0,0);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;font-weight:500;line-height:36px;outline:none;cursor:pointer}.vot-icon-button[hidden]{display:none !important}.vot-icon-button::-moz-focus-inner{border:none}.vot-icon-button::before,.vot-icon-button::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-icon-button::before{background-color:var(--vot-helper-onsurface);transition:opacity .2s}.vot-icon-button::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity .3s,background-size .4s}.vot-icon-button:hover::before{opacity:.04}.vot-icon-button:active::after{opacity:.32;background-size:100% 100%;transition:background-size 0s,opacity 0s}.vot-icon-button:disabled{background-color:rgba(0,0,0,0);color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);fill:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-icon-button:disabled::before,.vot-icon-button:disabled::after{opacity:0}.vot-textfield{--vot-helper-theme: rgb( var(--vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243)) ) !important;--vot-helper-safari1: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.38 ) !important;--vot-helper-safari2: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari3: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;position:relative !important;display:inline-block;padding-top:6px !important;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-textfield[hidden]{display:none !important}.vot-textfield>input,.vot-textfield>textarea{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:0 !important;border-style:solid !important;border-width:1px !important;border-color:rgba(0,0,0,0) var(--vot-helper-safari2) var(--vot-helper-safari2) !important;border-radius:4px !important;padding:15px 13px 15px !important;width:100% !important;height:inherit !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;-webkit-text-fill-color:currentColor !important;background-color:rgba(0,0,0,0) !important;box-shadow:inset 1px 0 rgba(0,0,0,0),inset -1px 0 rgba(0,0,0,0),inset 0 -1px rgba(0,0,0,0) !important;font-family:inherit !important;font-size:inherit !important;line-height:inherit !important;caret-color:var(--vot-helper-theme) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input:not(:focus):placeholder-shown,.vot-textfield>textarea:not(:focus):placeholder-shown{border-top-color:var(--vot-helper-safari2) !important}.vot-textfield>input+span,.vot-textfield>textarea+span{position:absolute !important;top:0 !important;left:0 !important;display:flex !important;width:100% !important;max-height:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;font-size:75% !important;line-height:15px !important;cursor:text !important;transition:color .2s,font-size .2s,line-height .2s !important;pointer-events:none !important}.vot-textfield>input:not(:focus):placeholder-shown+span,.vot-textfield>textarea:not(:focus):placeholder-shown+span{font-size:inherit !important;line-height:68px !important}.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{content:"" !important;display:block !important;-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin-top:6px !important;border-top:solid 1px var(--vot-helper-safari2) !important;min-width:10px !important;height:8px !important;pointer-events:none !important;box-shadow:inset 0 1px rgba(0,0,0,0) !important;transition:border .2s,box-shadow .2s !important}.vot-textfield>input+span::before,.vot-textfield>textarea+span::before{margin-right:4px !important;border-left:solid 1px rgba(0,0,0,0) !important;border-radius:4px 0 !important}.vot-textfield>input+span::after,.vot-textfield>textarea+span::after{flex-grow:1 !important;margin-left:4px !important;border-right:solid 1px rgba(0,0,0,0) !important;border-radius:0 4px !important}.vot-textfield>input:not(:focus):placeholder-shown+span::before,.vot-textfield>input:not(:focus):placeholder-shown+span::after,.vot-textfield>textarea:not(:focus):placeholder-shown+span::before,.vot-textfield>textarea:not(:focus):placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}.vot-textfield:hover>input,.vot-textfield:hover>textarea{border-color:rgba(0,0,0,0) var(--vot-helper-safari3) var(--vot-helper-safari3) !important}.vot-textfield:hover>input+span::before,.vot-textfield:hover>input+span::after,.vot-textfield:hover>textarea+span::before,.vot-textfield:hover>textarea+span::after{border-top-color:var(--vot-helper-safari3) !important}.vot-textfield:hover>input:not(:focus):placeholder-shown,.vot-textfield:hover>textarea:not(:focus):placeholder-shown{border-color:var(--vot-helper-safari3) !important}.vot-textfield>input:focus,.vot-textfield>textarea:focus{border-color:rgba(0,0,0,0) var(--vot-helper-theme) var(--vot-helper-theme) !important;box-shadow:inset 1px 0 var(--vot-helper-theme),inset -1px 0 var(--vot-helper-theme),inset 0 -1px var(--vot-helper-theme) !important;outline:none !important}.vot-textfield>input:focus+span,.vot-textfield>textarea:focus+span{color:var(--vot-helper-theme) !important}.vot-textfield>input:focus+span::before,.vot-textfield>input:focus+span::after,.vot-textfield>textarea:focus+span::before,.vot-textfield>textarea:focus+span::after{border-top-color:var(--vot-helper-theme) !important;box-shadow:inset 0 1px var(--vot-helper-theme) !important}.vot-textfield>input:disabled,.vot-textfield>input:disabled+span,.vot-textfield>textarea:disabled,.vot-textfield>textarea:disabled+span{border-color:rgba(0,0,0,0) var(--vot-helper-safari1) var(--vot-helper-safari1) !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;pointer-events:none !important}.vot-textfield>input:disabled+span::before,.vot-textfield>input:disabled+span::after,.vot-textfield>textarea:disabled+span::before,.vot-textfield>textarea:disabled+span::after{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown,.vot-textfield>input:disabled:placeholder-shown+span,.vot-textfield>textarea:disabled:placeholder-shown,.vot-textfield>textarea:disabled:placeholder-shown+span{border-top-color:var(--vot-helper-safari1) !important}.vot-textfield>input:disabled:placeholder-shown+span::before,.vot-textfield>input:disabled:placeholder-shown+span::after,.vot-textfield>textarea:disabled:placeholder-shown+span::before,.vot-textfield>textarea:disabled:placeholder-shown+span::after{border-top-color:rgba(0,0,0,0) !important}@media not all and (min-resolution: 0.001dpcm){@supports(-webkit-appearance: none){.vot-textfield>input,.vot-textfield>input+span,.vot-textfield>textarea,.vot-textfield>textarea+span,.vot-textfield>input+span::before,.vot-textfield>input+span::after,.vot-textfield>textarea+span::before,.vot-textfield>textarea+span::after{transition-duration:.1s !important}}}.vot-checkbox{--vot-helper-theme: var( --vot-theme-rgb, var(--vot-primary-rgb, 33, 150, 243) );--vot-helper-ontheme: var( --vot-ontheme-rgb, var(--vot-onprimary-rgb, 255, 255, 255) );z-index:0;position:relative;display:inline-block;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-checkbox[hidden]{display:none !important}.vot-checkbox>input{appearance:none;-moz-appearance:none;-webkit-appearance:none;z-index:10000;position:absolute;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:3px 1px;border:solid 2px;background:rgba(0,0,0,0);border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6);border-radius:2px;width:18px;height:18px;outline:none;cursor:pointer;transition:border-color .2s,background-color .2s}.vot-checkbox>input+span{display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding-left:30px;width:inherit;cursor:pointer;font-weight:normal}.vot-checkbox>input+span::before{content:"";position:absolute;left:-10px;top:-8px;display:block;border-radius:50%;width:40px;height:40px;background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0));opacity:0;transform:scale(1);pointer-events:none;transition:opacity .3s,transform .2s}.vot-checkbox>input+span::after{content:"";z-index:10000;display:block;position:absolute;top:3px;left:1px;-webkit-box-sizing:content-box !important;-moz-box-sizing:content-box !important;box-sizing:content-box !important;width:10px;height:5px;border:solid 2px rgba(0,0,0,0);border-right-width:0;border-top-width:0;pointer-events:none;transform:translate(3px, 4px) rotate(-45deg);transition:border-color .2s}.vot-checkbox>input:checked,.vot-checkbox>input:indeterminate{border-color:rgb(var(--vot-helper-theme));background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::before,.vot-checkbox>input:indeterminate+span::before{background-color:rgb(var(--vot-helper-theme))}.vot-checkbox>input:checked+span::after,.vot-checkbox>input:indeterminate+span::after{border-color:rgb(var(--vot-helper-ontheme, 255, 255, 255))}.vot-checkbox>input:indeterminate+span::after{border-left-width:0;transform:translate(4px, 3px)}.vot-checkbox:hover>input+span::before{opacity:.04}.vot-checkbox:active>input,.vot-checkbox:active:hover>input{border-color:rgb(var(--vot-helper-theme))}.vot-checkbox:active>input:checked{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6)}.vot-checkbox:active>input+span::before{opacity:1;transform:scale(0);transition:transform 0s,opacity 0s}.vot-checkbox>input:disabled{border-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled:checked,.vot-checkbox>input:disabled:indeterminate{border-color:rgba(0,0,0,0);background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38)}.vot-checkbox>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38);cursor:initial}.vot-checkbox>input:disabled+span::before{opacity:0;transform:scale(0)}.vot-slider{--vot-safari-helper1: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.04 ) !important;--vot-safari-helper2: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.12 ) !important;--vot-safari-helper3: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.16 ) !important;--vot-safari-helper4: rgba( var(--vot-primary-rgb, 33, 150, 243), 0.24 ) !important;display:inline-block;width:100% !important;color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important;font-family:var(--vot-font, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system) !important;font-size:16px !important;line-height:1.5 !important;text-align:start !important}.vot-slider[hidden]{display:none !important}.vot-slider>input{-webkit-appearance:none !important;appearance:none !important;position:relative !important;top:24px !important;display:block !important;margin:0 0 -36px !important;width:100% !important;height:36px !important;background-color:rgba(0,0,0,0) !important;cursor:pointer !important}.vot-slider>input:last-child{position:static !important;margin:0 !important}.vot-slider>span{display:inline-block !important;margin-bottom:36px !important}.vot-slider>input:disabled{cursor:default !important;opacity:.38 !important}.vot-slider>input:disabled+span{color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input::-webkit-slider-runnable-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-webkit-slider-thumb{margin:0 !important;appearance:none !important;-webkit-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper1) !important}.vot-slider>input:active::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--vot-safari-helper4) !important}.vot-slider>input:disabled::-webkit-slider-runnable-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-webkit-slider-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;color:rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-range-track{margin:17px 0 !important;border-radius:1px !important;width:100% !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-moz-range-thumb{appearance:none !important;-moz-appearance:none !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider>input::-moz-range-progress{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider:hover>input:hover::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-moz-range-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-moz-range-track{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-moz-range-progress{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.87) !important}.vot-slider>input:disabled::-moz-range-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::-moz-focus-outer{border:none !important}.vot-slider>input:focus{outline:none !important}.vot-slider>input::-ms-track{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;margin:17px 0 !important;border:none !important;border-radius:1px !important;padding:0 17px !important;width:100% !important;height:2px !important;background-color:rgba(0,0,0,0) !important}.vot-slider>input::-ms-fill-lower{border-radius:1px !important;height:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-slider>input::-ms-fill-upper{border-radius:1px !important;height:2px !important;background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input::-ms-thumb{appearance:none !important;margin:0 17px !important;border:none !important;border-radius:50% !important;height:2px !important;width:2px !important;background-color:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important;transform:scale(6, 6) !important;transition:box-shadow .2s !important}.vot-slider:hover>input::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.04) !important}.vot-slider>input:active::-ms-thumb{box-shadow:0 0 0 2px rgba(var(--vot-primary-rgb, 33, 150, 243), 0.24) !important}.vot-slider>input:disabled::-ms-fill-lower{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important}.vot-slider>input:disabled::-ms-fill-upper{background-color:rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.38) !important;opacity:.38 !important}.vot-slider>input:disabled::-ms-thumb{background-color:rgb(var(--vot-onsurface-rgb, 0, 0, 0)) !important;box-shadow:0 0 0 1px rgb(var(--vot-surface-rgb, 255, 255, 255)) !important;transform:scale(4, 4) !important}.vot-slider>input::before{content:"" !important;display:block !important;position:absolute !important;width:calc(100%*var(--vot-progress, 0)) !important;height:2px !important;top:calc(50% - 1px) !important;background:rgb(var(--vot-primary-rgb, 33, 150, 243)) !important}.vot-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0) !important;--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87) !important;--vot-helper-safari1: rgba(var(--vot-onsurface-rgb, 0, 0, 0), 0.6) !important;--vot-helper-safari2: rgba( var(--vot-onsurface-rgb, 0, 0, 0), 0.87 ) !important;display:flex;align-items:center;justify-content:space-between;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:14px;line-height:1.5;text-align:start;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-select[hidden]{display:none !important}.vot-select-label{font-size:16px}.vot-select-outer{display:flex;align-items:center;justify-content:space-between;max-width:120px;width:120px;padding:0 5px;border-style:solid !important;border-width:1px !important;border-color:var(--vot-helper-safari1) !important;border-radius:4px !important;cursor:pointer;transition:border .2s !important}.vot-select-outer:hover{border-color:var(--vot-helper-safari2) !important}.vot-select-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vot-select-arrow-icon{width:20px;height:32px;display:flex;justify-content:center;align-items:center}.vot-select-content-list{display:flex;flex-direction:column}.vot-select-content-list .vot-select-content-item{padding:5px 10px;border-radius:8px;cursor:pointer}.vot-select-content-list .vot-select-content-item:not([inert]):hover{background-color:#2a2c31}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]{color:rgb(var(--vot-primary-rgb, 33, 150, 243));background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.2)}.vot-select-content-list .vot-select-content-item[data-vot-selected=true]:hover{background-color:rgba(var(--vot-primary-rgb, 33, 150, 243), 0.1) !important}.vot-select-content-list .vot-select-content-item[data-vot-disabled=true]{cursor:default}.vot-select-content-list .vot-select-content-item[hidden]{display:none !important}.vot-header{color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-weight:bold;line-height:1.5;text-align:start}.vot-header[hidden]{display:none !important}.vot-header:not(:first-child){padding-top:8px}.vot-header-level-1{font-size:2em}.vot-header-level-2{font-size:1.5em}.vot-header-level-3{font-size:1.17em}.vot-header-level-4{font-size:1em}.vot-header-level-5{font-size:.83em}.vot-header-level-6{font-size:.67em}.vot-info{display:flex;color:rgba(var(--vot-helper-onsurface-rgb), 0.87);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;text-align:start}.vot-info[hidden]{display:none !important}.vot-info>:not(:first-child){color:rgba(var(--vot-helper-onsurface-rgb), 0.5);flex:1;margin-left:8px}.vot-lang-select{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);display:flex;align-items:center;justify-content:space-between;color:var(--vot-helper-theme);fill:var(--vot-helper-theme)}.vot-lang-select[hidden]{display:none !important}.vot-lang-select-icon{width:32px;height:32px;display:flex;justify-content:center;align-items:center}.vot-segmented-button{--vot-helper-theme-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-theme: rgba(var(--vot-helper-theme-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:5rem;transform:translate(-50%);user-select:none;display:flex;align-items:center;height:32px;max-width:100vw;background:rgb(var(--vot-surface-rgb, 255, 255, 255));color:var(--vot-helper-theme);fill:var(--vot-helper-theme);border-radius:4px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;cursor:default;transition:opacity .5s;z-index:10000}.vot-segmented-button[hidden]{display:none !important}.vot-segmented-button *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-segmented-button .vot-separator{width:1px;height:50%;background:rgba(var(--vot-helper-theme-rgb), 0.1)}.vot-segmented-button .vot-separator[hidden]{display:none !important}.vot-segmented-button .vot-segment,.vot-segmented-button .vot-segment-only-icon{position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;height:100%;padding:0 8px;background-color:rgba(0,0,0,0);color:inherit;transition:background-color 100ms ease-in-out;border:none}.vot-segmented-button .vot-segment[hidden],.vot-segmented-button [hidden].vot-segment-only-icon{display:none !important}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before,.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{content:"";position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;opacity:0}.vot-segmented-button .vot-segment::before,.vot-segmented-button .vot-segment-only-icon::before{background-color:rgb(var(--vot-helper-theme-rgb));transition:opacity .2s}.vot-segmented-button .vot-segment::after,.vot-segmented-button .vot-segment-only-icon::after{background:radial-gradient(circle at center, currentColor 1%, transparent 1%) center/10000% 10000% no-repeat;transition:opacity 1s,background-size .5s}.vot-segmented-button .vot-segment:hover::before,.vot-segmented-button .vot-segment-only-icon:hover::before{opacity:.04}.vot-segmented-button .vot-segment:active::after,.vot-segmented-button .vot-segment-only-icon:active::after{opacity:.16;background-size:100% 100%;transition:background-size 0s}.vot-segmented-button .vot-segment-only-icon{min-width:32px;padding:0}.vot-segmented-button .vot-segment-label{margin-left:8px;white-space:nowrap}.vot-segmented-button[data-status=success] .vot-translate-button{color:rgb(var(--vot-primary-rgb, 33, 150, 243));fill:rgb(var(--vot-primary-rgb, 33, 150, 243))}.vot-segmented-button[data-status=error] .vot-translate-button{color:#f28b82;fill:#f28b82}.vot-segmented-button[data-translating=true] #vot-translating-icon{display:block !important}.vot-segmented-button[data-translating=true] #vot-translate-icon{display:none !important}.vot-segmented-button[data-direction=column]{flex-direction:column;height:fit-content}.vot-segmented-button[data-direction=column] .vot-segment-label{display:none}.vot-segmented-button[data-direction=column]>.vot-segment-only-icon,.vot-segmented-button[data-direction=column]>.vot-segment{padding:8px}.vot-segmented-button[data-direction=column] .vot-separator{height:1px;width:50%}.vot-segmented-button[data-position=left]{left:50px;top:12.5vh}.vot-segmented-button[data-position=right]{left:auto;right:0;top:12.5vh}.vot-segmented-button svg{width:fit-content}.vot-menu{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);overflow:hidden;position:absolute;left:50%;top:calc(5rem + 32px + 16px);user-select:none;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);border-radius:8px;font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;min-width:300px;cursor:default;z-index:10000;visibility:visible;opacity:1;transform-origin:top;transform:translate(-50%) scale(1);transition:opacity .3s,transform .1s}.vot-menu *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-menu[hidden]{pointer-events:none;display:block !important;visibility:hidden;opacity:0;transform:translate(-50%) scale(0)}.vot-menu-content-wrapper{display:flex;flex-direction:column;min-height:100px;max-height:calc(var(--vot-container-height, 75vh) - (5rem + 32px + 16px)*2);overflow:auto}.vot-menu-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-menu-header-container:empty{padding:0 0 16px 0}.vot-menu-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-menu-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0;text-align:start}.vot-menu-title{flex:1;font-size:16px;line-height:1;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 16px;gap:8px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar,.vot-menu-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-menu-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-menu-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-menu-footer-container:empty{padding:16px 0 0 0}.vot-menu[data-position=left]{left:240px;top:12.5vh}.vot-menu[data-position=right]{right:-80px;left:auto;top:12.5vh}.vot-dialog-container{visibility:visible;position:absolute;z-index:10000}.vot-dialog-container[hidden]{display:block !important;pointer-events:none;visibility:hidden}.vot-dialog-container *{-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important}.vot-dialog-backdrop{background-color:rgba(0,0,0,.6);position:fixed;top:0;right:0;bottom:0;left:0;opacity:1;transition:opacity .3s}[hidden]>.vot-dialog-backdrop{pointer-events:none;opacity:0}.vot-dialog{--vot-helper-surface-rgb: var(--vot-surface-rgb, 255, 255, 255);--vot-helper-surface: rgb(var(--vot-helper-surface-rgb));--vot-helper-onsurface-rgb: var(--vot-onsurface-rgb, 0, 0, 0);--vot-helper-onsurface: rgba(var(--vot-helper-onsurface-rgb), 0.87);display:block;position:fixed;top:50%;bottom:50%;max-width:initial;max-height:initial;width:min(var(--vot-dialog-width, 512px),100%);height:fit-content;inset-inline-start:0px;inset-inline-end:0px;inset-block-start:0px;inset-block-end:0px;border-radius:8px;margin:auto;padding:0;background-color:var(--vot-helper-surface);color:var(--vot-helper-onsurface);box-shadow:0 0 16px rgba(0,0,0,.12),0 16px 16px rgba(0,0,0,.24);font-family:var(--vot-font-family, "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system);font-size:16px;line-height:1.5;user-select:none;visibility:visible;overflow:auto;overflow-y:hidden;opacity:1;transform-origin:center;transform:scale(1);transition:opacity .3s,transform .1s}[hidden]>.vot-dialog{pointer-events:none;opacity:0;transform:scale(0.5);transition:opacity .1s,transform .2s}.vot-dialog-content-wrapper{display:flex;flex-direction:column;max-height:75vh;overflow:auto}.vot-dialog-header-container{flex-shrink:0;align-items:flex-start;display:flex;min-height:31px}.vot-dialog-header-container:empty{padding:0 0 20px 0}.vot-dialog-header-container>.vot-icon-button{margin-inline-end:4px;margin-top:4px}.vot-dialog-title-container{display:flex;flex:1;font-size:inherit;font-weight:inherit;margin:0;outline:0}.vot-dialog-title{flex:1;font-size:115.3846153846%;font-weight:bold;line-height:1;padding-bottom:16px;padding-inline-end:20px;padding-inline-start:20px;padding-top:20px}.vot-dialog-body-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;flex-direction:column;min-height:1.375rem;overflow:auto;padding:0 20px;gap:16px;overscroll-behavior:contain;scrollbar-color:rgba(var(--vot-helper-onsurface-rgb), 0.1) var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar,.vot-dialog-body-container::-webkit-scrollbar-track{height:12px !important;width:12px !important;background:var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb{background:rgba(var(--vot-helper-onsurface-rgb), 0.1) !important;-webkit-border-radius:1ex !important;border:5px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-thumb:hover{border:3px solid var(--vot-helper-surface) !important}.vot-dialog-body-container::-webkit-scrollbar-corner{background:var(--vot-helper-surface) !important}.vot-dialog-footer-container{flex-shrink:0;display:flex;justify-content:flex-end;padding-bottom:16px;padding-inline-end:16px;padding-inline-start:16px;padding-top:16px}.vot-dialog-footer-container:empty{padding:20px 0 0 0}.vot-subtitles-widget{display:flex;justify-content:center;align-items:center;position:absolute;width:50%;max-height:100%;min-height:20%;z-index:10000;left:25%;top:75%;pointer-events:none}.vot-subtitles{position:relative;max-width:100%;max-height:100%;width:max-content;background:var(--vot-subtitles-background, rgba(46, 47, 52, 0.8));color:var(--vot-subtitles-color, rgb(227, 227, 227));border-radius:1rem;pointer-events:all;padding:1rem;font-size:2rem;line-height:normal;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vot-subtitles span{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.vot-subtitles .passed{color:var(--vot-subtitles-passed-color, rgb(33, 150, 243))}:root{--vot-font-family: "Roboto", "Segoe UI", BlinkMacSystemFont, system-ui, -apple-system;--vot-primary-rgb: 139, 180, 245;--vot-onprimary-rgb: 32, 33, 36;--vot-surface-rgb: 32, 33, 36;--vot-onsurface-rgb: 227, 227, 227;--vot-subtitles-background: rgba(var(--vot-surface-rgb, 46, 47, 52), 0.8);--vot-subtitles-color: rgb(var(--vot-onsurface-rgb, 227, 227, 227));--vot-subtitles-passed-color: rgb(var(--vot-primary-rgb, 33, 150, 243))}vot-block{display:block}',""]);const s=r},"./node_modules/css-loader/dist/runtime/api.js":t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,i,a){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var s=0;s0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js":t=>{"use strict";t.exports=function(t){return t[1]}},"./node_modules/requestidlecallback-polyfill/index.js":()=>{window.requestIdleCallback=window.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)},window.cancelIdleCallback=window.cancelIdleCallback||function(t){clearTimeout(t)}},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":(t,e,o)=>{"use strict";t.exports=function(t){var e=o.nc;e&&t.setAttribute("nonce",e)}},"./node_modules/style-loader/dist/runtime/styleDomAPI.js":t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(o){!function(t,e,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var i=void 0!==o.layer;i&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,i&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var a=o.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,o)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},"./node_modules/style-loader/dist/runtime/styleTagTransform.js":t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},"./node_modules/webpack-monkey/lib/node/deps/style-loader-insertStyleElement.js":t=>{t.exports=function(){return function(t){return t.styleTagTransform=function(t,e){e?.remove(),GM_addStyle(t)},document.createElement("style")}.apply(null,arguments)}},"./src/config/config.js":(t,e,o)=>{"use strict";o.d(e,{Cc:()=>s,JD:()=>l,K2:()=>c,Pm:()=>a,QL:()=>u,S7:()=>r,mE:()=>d,rl:()=>n,rw:()=>h,se:()=>i});const n="api.browser.yandex.ru",i="m3u8-proxy.toil.cc",a="vot.toil.cc",r="bt8xH3VOlb4mqf0nqAibnDOoiPlXsisf",s="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 YaBrowser/24.4.0.0 Safari/537.36",l=.15,d="yandex",c="yandex",u={yandex:"https://translate.toil.cc/detect",rustServer:"https://rust-server-531j.onrender.com/detect"},h={yandex:"https://translate.toil.cc/translate",deepl:"https://translate-deepl.toil.cc/translate"}},"./src/utils/debug.js":(t,e,o)=>{"use strict";o.d(e,{A:()=>i});const n={log:(...t)=>{}},i=n},"./src/yandexRequest.js":(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>a});var n=o("./src/config/config.js"),i=o("./src/utils/debug.js");const a=async function(t,e,o,a){try{i.A.log("yandexRequest:",t);const r={url:`https://${n.rl}${t}`,method:"POST",headers:{Accept:"application/x-protobuf","Accept-Language":"en","Content-Type":"application/x-protobuf","User-Agent":n.Cc,Pragma:"no-cache","Cache-Control":"no-cache","Sec-Fetch-Mode":"no-cors","sec-ch-ua":null,"sec-ch-ua-mobile":null,"sec-ch-ua-platform":null,...o},binary:!0,data:new Blob([e]),responseType:"arraybuffer"};GM_xmlhttpRequest({...r,onload:t=>{i.A.log("yandexRequest:",t.status,t),a(200===t.status,t.response)},onerror:t=>{console.error("[VOT]",t),a(!1)}})}catch(t){console.error("[VOT]",t),a(!1)}}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={id:n,exports:{}};return t[n].call(a.exports,a,a.exports,o),a.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nc=void 0,(()=>{"use strict";const t=["invidious.snopyta.org","yewtu.be","invidious.kavin.rocks","vid.puffyan.us","invidious.namazso.eu","inv.riverside.rocks","yt.artemislena.eu","invidious.flokinet.to","invidious.esmailelbob.xyz","y.com.sb","invidious.nerdvpn.de","inv.vern.cc","invidious.slipfox.xyz","invidio.xamh.de","invidious.dhusch.de"],e=["piped.video","piped.tokhmi.xyz","piped.moomoo.me","piped.syncpundit.io","piped.mha.fi","watch.whatever.social","piped.garudalinux.org","efy.piped.pages.dev","watch.leptons.xyz","piped.lunar.icu","yt.dc09.ru","piped.mint.lgbt","il.ax","piped.privacy.com.de","piped.esmailelbob.xyz","piped.projectsegfau.lt","piped.in.projectsegfau.lt","piped.us.projectsegfau.lt","piped.privacydev.net","piped.palveluntarjoaja.eu","piped.smnz.de","piped.adminforge.de","piped.qdi.fi","piped.hostux.net","piped.chauvet.pro","piped.jotoma.de","piped.pfcd.me","piped.frontendfriendly.xyz"],n=["proxitok.pabloferreiro.es","proxitok.pussthecat.org","tok.habedieeh.re","proxitok.esmailelbob.xyz","proxitok.privacydev.net","tok.artemislena.eu","tok.adminforge.de","tik.hostux.net","tt.vern.cc","cringe.whatever.social","proxitok.lunar.icu","proxitok.privacy.com.de"],i=["peertube.1312.media","tube.shanti.cafe","bee-tube.fr","video.sadmin.io","dalek.zone","review.peertube.biz","peervideo.club","tube.la-dina.net","peertube.tmp.rcp.tf","peertube.su"];var a=o("./src/config/config.js");const r=["ru","en","zh","ko","lt","lv","ar","fr","it","es","de","ja"],s=["ru","en","kk"],l=["Violentmonkey","FireMonkey","Greasemonkey","AdGuard","OrangeMonkey"],d=JSON.parse('{"__version__":4,"recommended":"recommended","translateVideo":"Translate video","disableTranslate":"Turn off","translationSettings":"Translation settings","subtitlesSettings":"Subtitles settings","about":"About extension","resetSettings":"Reset settings","videoBeingTranslated":"The video is being translated","videoLanguage":"Video language","translationLanguage":"Translation language","translationTake":"The translation will take","translationTakeMoreThanHour":"The translation will take more than an hour","translationTakeAboutMinute":"The translation will take about a minute","translationTakeFewMinutes":"The translation will take a few minutes","translationTakeApproximatelyMinutes":"The translation will take approximately {0} minutes","translationTakeApproximatelyMinute":"The translation will take approximately {0} minutes","unSupportedExtensionError":"Error! {0} is not supported by this version of the extension!\\n\\nPlease use the cloudflare version of the VOT extension.","requestTranslationFailed":"Failed to request video translation","audioNotReceived":"Audio link not received","grantPermissionToAutoPlay":"Grant permission to autoplay","neededAdditionalExtension":"An additional extension is needed to support this site","audioFormatNotSupported":"The audio format is not supported","VOTAutoTranslate":"Translate on open","VOTDontTranslateYourLang":"Do not translate from my language","VOTVolume":"Video volume","VOTVolumeTranslation":"Translation Volume","VOTAutoSetVolume":"Reduce video volume to ","VOTShowVideoSlider":"Video volume slider","VOTSyncVolume":"Link translation and video volume","VOTAudioProxy":"Proxy received audio","VOTDisableFromYourLang":"You have disabled the translation of the video in your language","VOTLiveNotSupported":"Translation of live streams is not supported","VOTPremiere":"Wait for the premiere to end before translating","VOTVideoIsTooLong":"Video is too long","VOTNoVideoIDFound":"No video ID found","VOTSubtitles":"Subtitles","VOTSubtitlesDisabled":"Disabled","VOTSubtitlesMaxLength":"Subtitles max length","VOTHighlightWords":"Highlight words","VOTTranslatedFrom":"translated from","VOTAutogenerated":"autogenerated","VOTSettings":"VOT Settings","VOTMenuLanguage":"Menu language","VOTAuthors":"Authors","VOTVersion":"Version","VOTLoader":"Loader","VOTBrowser":"Browser","VOTShowPiPButton":"Show PiP button","langs":{"auto":"Auto","af":"Afrikaans","ak":"Akan","sq":"Albanian","am":"Amharic","ar":"Arabic","hy":"Armenian","as":"Assamese","ay":"Aymara","az":"Azerbaijani","bn":"Bangla","eu":"Basque","be":"Belarusian","bho":"Bhojpuri","bs":"Bosnian","bg":"Bulgarian","my":"Burmese","ca":"Catalan","ceb":"Cebuano","zh":"Chinese","zh-Hans":"Chinese (Simplified)","zh-Hant":"Chinese (Traditional)","co":"Corsican","hr":"Croatian","cs":"Czech","da":"Danish","dv":"Divehi","nl":"Dutch","en":"English","eo":"Esperanto","et":"Estonian","ee":"Ewe","fil":"Filipino","fi":"Finnish","fr":"French","gl":"Galician","lg":"Ganda","ka":"Georgian","de":"German","el":"Greek","gn":"Guarani","gu":"Gujarati","ht":"Haitian Creole","ha":"Hausa","haw":"Hawaiian","iw":"Hebrew","hi":"Hindi","hmn":"Hmong","hu":"Hungarian","is":"Icelandic","ig":"Igbo","id":"Indonesian","ga":"Irish","it":"Italian","ja":"Japanese","jv":"Javanese","kn":"Kannada","kk":"Kazakh","km":"Khmer","rw":"Kinyarwanda","ko":"Korean","kri":"Krio","ku":"Kurdish","ky":"Kyrgyz","lo":"Lao","la":"Latin","lv":"Latvian","ln":"Lingala","lt":"Lithuanian","lb":"Luxembourgish","mk":"Macedonian","mg":"Malagasy","ms":"Malay","ml":"Malayalam","mt":"Maltese","mi":"Māori","mr":"Marathi","mn":"Mongolian","ne":"Nepali","nso":"Northern Sotho","no":"Norwegian","ny":"Nyanja","or":"Odia","om":"Oromo","ps":"Pashto","fa":"Persian","pl":"Polish","pt":"Portuguese","pa":"Punjabi","qu":"Quechua","ro":"Romanian","ru":"Russian","sm":"Samoan","sa":"Sanskrit","gd":"Scottish Gaelic","sr":"Serbian","sn":"Shona","sd":"Sindhi","si":"Sinhala","sk":"Slovak","sl":"Slovenian","so":"Somali","st":"Southern Sotho","es":"Spanish","su":"Sundanese","sw":"Swahili","sv":"Swedish","tg":"Tajik","ta":"Tamil","tt":"Tatar","te":"Telugu","th":"Thai","ti":"Tigrinya","ts":"Tsonga","tr":"Turkish","tk":"Turkmen","uk":"Ukrainian","ur":"Urdu","ug":"Uyghur","uz":"Uzbek","vi":"Vietnamese","cy":"Welsh","fy":"Western Frisian","xh":"Xhosa","yi":"Yiddish","yo":"Yoruba","zu":"Zulu"},"udemyAccessTokenExpired":"Your entered Udemy Access Token has expired","udemyModuleArgsNotFound":"Could not get udemy module data due to the fact that ModuleArgs was not found","VOTTranslationHelpNull":"Could not get the data required for the translate","enterUdemyAccessToken":"Enter Udemy Access Token","VOTUdemyData":"Udemy Data","streamNoConnectionToServer":"There is no connection to the server","searchField":"Search...","VOTTranslateAPIErrors":"Translate errors from the API","VOTTranslationService":"Translation Service","VOTDetectService":"Detect Service","VOTTranslatingError":"Translating the error","VOTProxyWorkerHost":"Enter the proxy worker address","VOTM3u8ProxyHost":"Enter the address of the m3u8 proxy worker","proxySettings":"Proxy Settings","translationTakeApproximatelyMinute2":"The translation will take approximately {0} minutes"}');var c=o("./src/utils/debug.js");const u=new class{constructor(){this.gmSupport="function"==typeof GM_getValue,c.A.log(`GM Storage Status: ${this.gmSupport}`)}syncGet(t,e=void 0,o=!1){if(this.gmSupport)return GM_getValue(t,e);let n=window.localStorage.getItem(t);if("udemyData"===t&&"string"==typeof n)try{n=JSON.parse(n)}catch{n=e}return o?Number(n)??Number(e):n??e}async get(t,e=void 0,o=!1){return this.gmSupport?await GM_getValue(t,e):Promise.resolve(this.syncGet(t,e,o))}syncSet(t,e){return this.gmSupport?GM_setValue(t,e):("udemyData"===t&&(e=JSON.stringify(e)),window.localStorage.setItem(t,e))}async set(t,e){return this.gmSupport?await GM_setValue(t,e):Promise.resolve(this.syncSet(t,e))}syncDelete(t){return this.gmSupport?GM_deleteValue(t):window.localStorage.removeItem(t)}async delete(t){return this.gmSupport?await GM_deleteValue(t):Promise.resolve(this.syncDelete(t))}syncList(){return this.gmSupport?GM_listValues():["autoTranslate","dontTranslateLanguage","dontTranslateYourLang","autoSetVolumeYandexStyle","showVideoSlider","syncVolume","subtitlesMaxLength","highlightWords","responseLanguage","defaultVolume","udemyData","audioProxy","showPiPButton","locale-version","locale-lang","locale-phrases"]}async list(){return this.gmSupport?await GM_listValues():Promise.resolve(this.syncList())}};async function h(t,e={}){const o=new AbortController,n=setTimeout((()=>o.abort()),3e3);try{return await fetch(t,{...e,signal:o.signal})}catch(t){return console.error("Fetch timed-out. Error:",t),t}finally{clearTimeout(n)}}const p={async translate(t,e){try{const o=await h(`${a.rw.yandex}?${new URLSearchParams({text:t,lang:e})}`);if(o instanceof Error)throw o;const n=await o.json();if(200!==n.code)throw n.message;return n.text[0]}catch(e){return console.error("Error translating text:",e),t}},async detect(t){try{const e=await h(`${a.QL.yandex}?${new URLSearchParams({text:t})}`);if(e instanceof Error)throw e;const o=await e.json();if(200!==o.code)throw o.message;return o.lang??"en"}catch(t){return console.error("Error getting lang from text:",t),"en"}}},g={async detect(t){try{const e=await fetch(a.QL.rustServer,{method:"POST",body:t});if(e instanceof Error)throw e;return await e.text()}catch(t){return console.error("Error getting lang from text:",t),"en"}}},v={async translate(t,e="auto",o="ru"){try{const n=await h(a.rw.deepl,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({text:t,source_lang:e,target_lang:o})});if(n instanceof Error)throw n;const i=await n.json();if(200!==i.code)throw i.message;return i.data}catch(e){return console.error("Error translating text:",e),t}}};const m=Object.keys(a.rw),b=Object.keys(a.QL).map((t=>"rustServer"===t?"rust-server":t));async function f(t,e,o,n){if(!window.location.hostname.includes("m.youtube.com")&&t?.getAudioTrack){const e=t.getAudioTrack(),o=e?.getLanguageInfo();if("und"!==o?.id)return L(o.id.split(".")[0])}const i=e?.captions?.playerCaptionsTracklistRenderer?.captionTracks;if(i?.length){const t=i.find((t=>"asr"===t.kind));if(t&&t.languageCode)return L(t.languageCode)}const r=function(t,e){const o=e?e.split("\n").filter((t=>!P.test(t))).join(" "):"",n=`${t} ${o}`.slice(0,450);return n.replace(/[^\p{L}\s]+|\s+/gu," ").trim()}(o,n);return c.A.log(`Detecting language text: ${r}`),async function(t){switch(await u.get("detectService",a.K2)){case"yandex":return await p.detect(t);case"rust-server":return await g.detect(t);default:return"en"}}(r)}function y(){return/^m\.youtube\.com$/.test(window.location.hostname)}function w(){return window.location.pathname.startsWith("/shorts/")?y()?document.querySelector("#movie_player"):document.querySelector("#shorts-player"):document.querySelector("#movie_player")}function x(){const t=w();return t?.getPlayerResponse?t?.getPlayerResponse?.call()??null:t?.data?.playerResponse??null}function S(){const t=w();return t?.getVideoData?t?.getVideoData?.call()??null:t?.data?.playerResponse?.videoDetails??null}const k={isMobile:y,getPlayer:w,getPlayerResponse:x,getPlayerData:S,getVideoVolume:function(){const t=w();return t?.getVolume?t.getVolume.call()/100:1},getSubtitles:function(){const t=x();let e=t?.captions?.playerCaptionsTracklistRenderer?.captionTracks??[];return e=e.reduce(((t,e)=>{if("languageCode"in e){const o=e?.languageCode?L(e?.languageCode):void 0,n=e?.url||e?.baseUrl;o&&n&&t.push({source:"youtube",language:o,isAutoGenerated:"asr"===e?.kind,url:`${n.startsWith("http")?n:`${window.location.origin}/${n}`}&fmt=json3`})}return t}),[]),c.A.log("youtube subtitles:",e),e},getVideoData:async function(){const t=w(),e=x(),o=S(),{title:n}=o??{},{shortDescription:i,isLive:a}=e?.videoDetails??{};let s=n?await f(t,e,n,i):"en";s=r.includes(s)?s:"en";const l={isLive:!!a,title:n,description:i,detectedLanguage:s};return c.A.log("youtube video data:",l),console.log("[VOT] Detected language: ",l.detectedLanguage),l},setVideoVolume:function(t){const e=w();if(e?.setVolume)return e.setVolume(Math.round(100*t)),!0},videoSeek:function(t,e){c.A.log("videoSeek",e);const o=(w()?.getProgressState()?.seekableEnd||t.currentTime)-e;t.currentTime=o},isMuted:function(){const t=w();return!!t?.isMuted&&t.isMuted.call()},isMusic:function(){const t=S().author,e=S().title.toUpperCase(),o=e.match(/\w+/g),n=document.body.querySelector("ytd-watch-flexy")?.playerData;return[e,document.URL,t,n?.microformat?.playerMicroformatRenderer.category,n?.title].some((t=>t?.toUpperCase().includes("MUSIC")))||document.body.querySelector("#upload-info #channel-name .badge-style-type-verified-artist")||t&&/(VEVO|Topic|Records|RECORDS|Recordings|AMV)$/.test(t)||t&&/(MUSIC|ROCK|SOUNDS|SONGS)/.test(t.toUpperCase())||o?.length&&["🎵","♫","SONG","SONGS","SOUNDTRACK","LYRIC","LYRICS","AMBIENT","MIX","VEVO","CLIP","KARAOKE","OPENING","COVER","COVERED","VOCAL","INSTRUMENTAL","ORCHESTRAL","DUBSTEP","DJ","DNB","BASS","BEAT","ALBUM","PLAYLIST","DUBSTEP","CHILL","RELAX","CLASSIC","CINEMATIC"].some((t=>o.includes(t)))||["OFFICIAL VIDEO","OFFICIAL AUDIO","FEAT.","FT.","LIVE RADIO","DANCE VER","HIP HOP","ROCK N ROLL","HOUR VER","HOURS VER","INTRO THEME"].some((t=>e.includes(t)))||o?.length&&["OP","ED","MV","OST","NCS","BGM","EDM","GMV","AMV","MMD","MAD"].some((t=>o.includes(t)))}},T=navigator.language||navigator.userLanguage,M=T?.substr(0,2)?.toLowerCase()??"en",V=(t,e)=>{let o=new URL(window.location.href);switch(t){case"piped":case"invidious":case"youtube":if(o.searchParams.has("enablejsapi")){const t=k.getPlayer().getVideoUrl();o=new URL(t)}return o.pathname.match(/(?:watch|embed|shorts|live)\/([^/]+)/)?.[1]||o.searchParams.get("v");case"vk":{const t=o.pathname.match(/^\/(video|clip)-?[0-9]{8,9}_[0-9]{9}$/),e=o.searchParams.get("z"),n=o.searchParams.get("oid"),i=o.searchParams.get("id");return t?t[0].slice(1):e?e.split("/")[0]:n&&i?`video-${Math.abs(parseInt(n))}_${i}`:null}case"nine_gag":case"9gag":case"gag":return o.pathname.match(/gag\/([^/]+)/)?.[1];case"twitch":{const t=o.pathname.match(/([^/]+)\/(?:clip)\/([^/]+)/);if(/^m\.twitch\.tv$/.test(o.hostname))return o.href.match(/videos\/([^/]+)/)?.[0]||o.pathname.slice(1);if(/^player\.twitch\.tv$/.test(o.hostname))return`videos/${o.searchParams.get("video")}`;if(/^clips\.twitch\.tv$/.test(o.hostname)){const t=document.querySelector("script[type='application/ld+json']"),e=o.pathname.slice(1);if(!t){const t="embed"===e,n=document.querySelector(t?".tw-link[data-test-selector='stream-info-card-component__stream-avatar-link']":".clips-player a:not([class])");if(!n)return;return`${n.href.replace("https://www.twitch.tv/","")}/clip/${t?o.searchParams.get("clip"):e}`}const n=JSON.parse(t.innerText),i=n["@graph"].find((t=>"VideoObject"===t["@type"]))?.creator.url;return`${i.replace("https://www.twitch.tv/","")}/clip/${e}`}return t?t[0]:o.pathname.match(/(?:videos)\/([^/]+)/)?.[0]}case"proxitok":return o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];case"tiktok":{let t=o.pathname.match(/([^/]+)\/video\/([^/]+)/)?.[0];if(!t){const o=e.closest(".xgplayer-playing, .tiktok-web-player"),n=o?.closest('div[data-e2e="recommend-list-item-container"]'),i=n?.querySelector('a[data-e2e="video-author-avatar"]');if(o&&i){const e=o.id?.match(/^xgwrapper-[0-9]+-(.*)$/)?.at(1),n=i.href?.match(/.*(@.*)$/)?.at(1);e&&n&&(t=`${n}/video/${e}`)}}return t}case"vimeo":{const t=o.searchParams.get("app_id"),e=o.pathname.match(/[^/]+\/[^/]+$/)?.[0]||o.pathname.match(/[^/]+$/)?.[0];return t?`${e}?app_id=${t}`:e}case"xvideos":return o.pathname.match(/[^/]+\/[^/]+$/)?.[0];case"pornhub":return o.searchParams.get("viewkey")||o.pathname.match(/embed\/([^/]+)/)?.[1];case"twitter":return o.pathname.match(/status\/([^/]+)/)?.[1];case"udemy":case"rumble":case"facebook":return o.pathname.slice(1);case"rutube":return o.pathname.match(/(?:video|embed)\/([^/]+)/)?.[1];case"coub":return o.pathname.match(/(?:view|embed)\/([^/]+)/)?.[1]||document.querySelector(".coub.active")?.dataset?.permalink;case"bilibili":{const t=o.searchParams.get("bvid");if(t)return t;let e=o.pathname.match(/video\/([^/]+)/)?.[1];return e&&null!==o.searchParams.get("p")&&(e+=`/?p=${o.searchParams.get("p")}`),e}case"mail_ru":{const t=o.pathname;if(t.startsWith("/v/")||t.startsWith("/mail/"))return t.slice(1);const e=t.match(/video\/embed\/([^/]+)/)?.[1];if(!e)return null;const n=document.querySelector(".b-video-controls__mymail-link");return!!n&&n?.href.split("my.mail.ru")?.[1]}case"bitchute":return o.pathname.match(/(video|embed)\/([^/]+)/)?.[2];case"coursera":return o.pathname.match(/learn\/([^/]+)\/lecture\/([^/]+)/)?.[0];case"eporner":return o.pathname.match(/video-([^/]+)\/([^/]+)/)?.[0];case"peertube":return o.pathname.match(/\/w\/([^/]+)/)?.[0];case"dailymotion":{const t=Array.from(document.querySelectorAll("*")).filter((t=>t.innerHTML.trim().includes(".m3u8")));try{let e=t[1].lastChild.src;return e.match(/\/video\/(\w+)\.m3u8/)?.[1]}catch(t){return console.error("[VOT]",t),!1}}case"trovo":{const t=o.searchParams.get("vid");if(!t)return null;const e=o.pathname.match(/([^/]+)\/([\d]+)/)?.[0];return e?`${e}?vid=${t}`:null}case"yandexdisk":return o.pathname.match(/\/i\/([^/]+)/)?.[1];case"coursehunter":{const t=o.pathname.match(/\/course\/([^/]+)/)?.[1];return!!t&&t+o.search}case"ok.ru":return o.pathname.match(/\/video\/(\d+)/)?.[1];case"googledrive":return o.searchParams.get("docid");case"bannedvideo":return o.searchParams.get("id");case"weverse":return o.pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[0];case"newgrounds":return o.pathname.match(/([^/]+)\/(view)\/([^/]+)/)?.[0];case"egghead":return o.pathname.slice(1);case"youku":return o.pathname.match(/v_show\/id_[\w=]+/)?.[0];case"directlink":return o.pathname+o.search;default:return!1}};function L(t){return t.toLowerCase().split(/[_;-]/)[0].trim()}function A(){return"pictureInPictureEnabled"in document&&document.pictureInPictureEnabled}function C(){return"undefined"!=typeof Hls&&Hls?.isSupported()?new Hls({debug:!1,lowLatencyMode:!0,backBufferLength:90}):void 0}const P=new RegExp([/(?:https?|ftp):\/\/[\S]+/g,/https?:\/\/\S+|www\.\S+/gm,/\b\S+\.\S+/gm,/#[^\s#]+/g,/Auto-generated by YouTube/g,/Provided to YouTube by/g,/Released on/g,/0x[a-fA-F0-9]{40}/g,/[13][a-km-zA-HJ-NP-Z1-9]{25,34}/g,/4[0-9AB][1-9A-HJ-NP-Za-km-z]{93}/g,/Paypal/g].map((t=>t.source)).join("|"));async function O(t,e={}){try{return await fetch(t,e)}catch(o){return new Promise(((o,n)=>{GM_xmlhttpRequest({method:e.method||"GET",url:t,responseType:"blob",onload:t=>{o(new Response(t.response,{status:t.status,headers:Object.fromEntries(t.responseHeaders.trim().split("\r\n").map((t=>{let e=t.split(": ");if("set-cookie"!==e?.[0])return[e.shift(),e.join(": ")]})).filter((t=>t)))}))},ontimeout:()=>n(new Error("fetch timeout")),onerror:t=>n(t),onabort:()=>n(new Error("fetch abort"))})}))}}const E=["auto","en","ru","af","am","ar","az","bg","bn","bs","ca","cs","cy","da","de","el","es","et","eu","fa","fi","fr","gl","hi","hr","hu","hy","id","it","ja","jv","kk","km","kn","ko","lo","mk","ml","mn","ms","mt","my","ne","nl","pa","pl","pt","ro","si","sk","sl","sq","sr","su","sv","sw","tr","uk","ur","uz","vi","zh","zu"],R=new class{lang="en";locale={};gmValues=["locale-phrases","locale-lang","locale-version","locale-lang-override"];constructor(){const t=u.syncGet("locale-lang-override","auto");this.lang=t&&"auto"!==t?t:(navigator.language||navigator.userLanguage)?.substr(0,2)?.toLowerCase()??"en",this.setLocaleFromJsonString(u.syncGet("locale-phrases",""))}reset(){for(let t=0;t{if("object"==typeof t&&t)return t[e]}),t);return void 0===o&&console.warn("[VOT] [localizationProvider] locale",t,"doesn't contain key",e),o}getDefault(t){return this.getFromLocale(d,t)??t}get(t){return this.getFromLocale(this.locale,t)??this.getFromLocale(d,t)??t}};var B=o("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),F=o.n(B),D=o("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),_=o.n(D),q=o("./node_modules/style-loader/dist/runtime/insertBySelector.js"),z=o.n(q),I=o("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),$=o.n(I),N=o("./node_modules/webpack-monkey/lib/node/deps/style-loader-insertStyleElement.js"),H=o.n(N),j=o("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),U=o.n(j),W=o("./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/styles/main.scss"),G={};G.styleTagTransform=U(),G.setAttributes=$(),G.insert=z().bind(null,"head"),G.domAPI=_(),G.insertStyleElement=H();F()(W.A,G);W.A&&W.A.locals&&W.A.locals;function Y(t){const e=document.createElement("vot-block");return e.classList.add("vot-icon-button"),e.innerHTML=t,e}function Z(t){const e=parseFloat(t.value),o=""===t.min?0:parseFloat(t.min),n=(e-o)/((""===t.max?100:parseFloat(t.max))-o);t.parentElement.setAttribute("style",`--vot-progress: ${n}`)}function K(t,e="",o=" ",n=!1){const i=document.createElement("vot-block");i.classList.add("vot-textfield");const a=document.createElement(n?"textarea":"input");a.placeholder=o,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),{container:i,input:a,label:r}}function J(t){const e=document.createElement("vot-block");e.classList.add("vot-dialog-container"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-dialog-backdrop");const n=document.createElement("vot-block");n.classList.add("vot-dialog");const i=document.createElement("vot-block");i.classList.add("vot-dialog-content-wrapper");const a=document.createElement("vot-block");a.classList.add("vot-dialog-header-container");const r=document.createElement("vot-block");r.classList.add("vot-dialog-body-container");const s=document.createElement("vot-block");s.classList.add("vot-dialog-footer-container");const l=document.createElement("vot-block");l.classList.add("vot-dialog-title-container");const d=Y('');d.classList.add("vot-dialog-close-button"),o.onclick=d.onclick=()=>{e.hidden=!0};const c=document.createElement("vot-block");return c.classList.add("vot-dialog-title"),c.innerHTML=t,e.appendChild(o),e.appendChild(n),n.appendChild(i),i.appendChild(a),i.appendChild(r),i.appendChild(s),a.appendChild(l),a.appendChild(d),l.appendChild(c),{container:e,backdrop:o,dialog:n,contentWrapper:i,headerContainer:a,bodyContainer:r,footerContainer:s,titleContainer:l,closeButton:d,title:c}}function Q(t,e,o,n={}){const i=n.onSelectCb||function(){},a=n.labelElement||"";let r=[];const s=document.createElement("vot-block");s.classList.add("vot-select"),a&&s.appendChild(a);const l=document.createElement("vot-block");l.classList.add("vot-select-outer");const d=document.createElement("span");d.classList.add("vot-select-title"),d.innerText=t,void 0===t&&(d.innerText=o.find((t=>!0===t.selected))?.label);const c=document.createElement("vot-block");c.classList.add("vot-select-arrow-icon"),c.innerHTML='',l.append(d,c),l.onclick=()=>{const t=J(e);t.container.classList.add("vot-dialog-temp"),t.container.hidden=!1,document.documentElement.appendChild(t.container);const n=document.createElement("vot-block");n.classList.add("vot-select-content-list");for(const t of o){const e=document.createElement("vot-block");e.classList.add("vot-select-content-item"),e.innerText=t.label,e.dataset.votSelected=t.selected,e.dataset.votValue=t.value,t.disabled&&(e.inert=!0),e.onclick=async a=>{if(a.target.inert)return;const r=n.childNodes;for(let t of r)t.dataset.votSelected=!1;for(let e of o)e.selected=e.value===t.value;e.dataset.votSelected=!0,d.innerText=t.label,await i(a)},n.appendChild(e)}const a=K(R.get("searchField"));a.input.oninput=t=>{const e=t.target.value.toLowerCase();for(let t=0;t{t.container.remove(),r=[]}},s.append(l);return{container:s,title:d,arrowIcon:c,labelElement:a,setTitle:t=>{d.innerText=t},setSelected:t=>{const e=Array.from(r).filter((t=>!t.inert));for(let o=0;o{o=t}}}const X={createHeader:function(t,e=4){const o=document.createElement("vot-block");return o.classList.add("vot-header"),o.classList.add(`vot-header-level-${e}`),o.innerHTML=t,o},createInformation:function(t,e){const o=document.createElement("vot-block");o.classList.add("vot-info");const n=document.createElement("vot-block");n.innerHTML=t;const i=document.createElement("vot-block");return i.innerHTML=e,o.appendChild(n),o.appendChild(i),{container:o,header:n,value:i}},createButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-button"),e.innerHTML=t,e},createTextButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-text-button"),e.innerHTML=t,e},createOutlinedButton:function(t){const e=document.createElement("vot-block");return e.classList.add("vot-outlined-button"),e.innerHTML=t,e},createIconButton:Y,createCheckbox:function(t,e=!1){const o=document.createElement("label");o.classList.add("vot-checkbox");const n=document.createElement("input");n.type="checkbox",n.checked=Boolean(e);const i=document.createElement("span");return i.innerHTML=t,o.appendChild(n),o.appendChild(i),{container:o,input:n,label:i}},createSlider:function(t,e=50,o=0,n=100){const i=document.createElement("vot-block");i.classList.add("vot-slider");const a=document.createElement("input");a.type="range",a.min=o,a.max=n,a.value=e;const r=document.createElement("span");return r.innerHTML=t,i.appendChild(a),i.appendChild(r),a.addEventListener("input",(t=>Z(t.target))),Z(a),{container:i,input:a,label:r}},createTextfield:K,createDialog:J,createVOTButton:function(t){const e=document.createElement("vot-block");e.classList.add("vot-segmented-button");const o=document.createElement("vot-block");o.classList.add("vot-segment"),o.classList.add("vot-translate-button"),o.innerHTML='';const n=document.createElement("vot-block");n.classList.add("vot-separator");const i=document.createElement("vot-block");i.classList.add("vot-segment-only-icon"),i.innerHTML='';const a=document.createElement("vot-block");a.classList.add("vot-separator");const r=document.createElement("vot-block");r.classList.add("vot-segment-only-icon"),r.innerHTML='';const s=document.createElement("span");return s.classList.add("vot-segment-label"),s.innerHTML=t,e.appendChild(o),e.appendChild(n),e.appendChild(i),e.appendChild(a),e.appendChild(r),o.appendChild(s),{container:e,translateButton:o,separator:n,pipButton:i,separator2:a,menuButton:r,label:s}},createVOTMenu:function(t){const e=document.createElement("vot-block");e.classList.add("vot-menu"),e.hidden=!0;const o=document.createElement("vot-block");o.classList.add("vot-menu-content-wrapper");const n=document.createElement("vot-block");n.classList.add("vot-menu-header-container");const i=document.createElement("vot-block");i.classList.add("vot-menu-body-container");const a=document.createElement("vot-block");a.classList.add("vot-menu-footer-container");const r=document.createElement("vot-block");r.classList.add("vot-menu-title-container");const s=document.createElement("vot-block");return s.classList.add("vot-menu-title"),s.innerHTML=t,e.appendChild(o),o.appendChild(n),o.appendChild(i),o.appendChild(a),n.appendChild(r),r.appendChild(s),{container:e,contentWrapper:o,headerContainer:n,bodyContainer:i,footerContainer:a,titleContainer:r,title:s}},createVOTSelectLabel:function(t){const e=document.createElement("span");return e.classList.add("vot-select-label"),e.innerText=t,e},createVOTSelect:Q,createVOTLanguageSelect:function(t){const e=t.fromTitle||"#UNDEFINED",o=t.fromDialogTitle||"#UNDEFINED",n=t.fromItems||[],i=t.fromOnSelectCB||function(){},a=t.toTitle||"#UNDEFINED",r=t.toDialogTitle||"#UNDEFINED",s=t.toItems||[],l=t.toOnSelectCB||function(){},d=document.createElement("vot-block");d.classList.add("vot-lang-select");const c=Q(e,o,n,{onSelectCb:i}),u=document.createElement("vot-block");u.classList.add("vot-lang-select-icon"),u.innerHTML='';const h=Q(a,r,s,{onSelectCb:l});return d.append(c.container,u,h.container),{container:d,fromSelect:c,icon:u,toSelect:h}},updateSlider:Z};class tt extends Error{constructor(t){super(R.getDefault(t)),this.name="VOTLocalizedError",this.unlocalizedMessage=t,this.localizedMessage=R.get(t)}}const et=new protobuf.Type("VideoTranslationHelpObject").add(new protobuf.Field("target",1,"string")).add(new protobuf.Field("targetUrl",2,"string")),ot=new protobuf.Type("VideoTranslationRequest").add(new protobuf.Field("url",3,"string")).add(new protobuf.Field("deviceId",4,"string")).add(new protobuf.Field("firstRequest",5,"bool")).add(new protobuf.Field("duration",6,"double")).add(new protobuf.Field("unknown2",7,"int32")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("forceSourceLang",9,"bool")).add(new protobuf.Field("unknown4",10,"int32")).add(new protobuf.Field("translationHelp",11,"VideoTranslationHelpObject","repeated")).add(new protobuf.Field("responseLanguage",14,"string")).add(new protobuf.Field("unknown5",15,"int32")).add(new protobuf.Field("unknown6",16,"int32")).add(new protobuf.Field("bypassCache",17,"bool")),nt=new protobuf.Type("VideoSubtitlesRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")),it=new protobuf.Type("VideoStreamRequest").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("language",2,"string")).add(new protobuf.Field("responseLanguage",3,"string")),at=new protobuf.Type("VideoStreamPingRequest").add(new protobuf.Field("pingId",1,"int32")),rt=new protobuf.Type("VideoTranslationResponse").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("duration",2,"double")).add(new protobuf.Field("status",4,"int32")).add(new protobuf.Field("remainingTime",5,"int32")).add(new protobuf.Field("unknown0",6,"int32")).add(new protobuf.Field("translationId",7,"string")).add(new protobuf.Field("language",8,"string")).add(new protobuf.Field("message",9,"string")),st=new protobuf.Type("VideoSubtitlesObject").add(new protobuf.Field("language",1,"string")).add(new protobuf.Field("url",2,"string")).add(new protobuf.Field("unknown2",3,"int32")).add(new protobuf.Field("translatedLanguage",4,"string")).add(new protobuf.Field("translatedUrl",5,"string")).add(new protobuf.Field("unknown5",6,"int32")).add(new protobuf.Field("unknown6",7,"int32")),lt=new protobuf.Type("VideoSubtitlesResponse").add(new protobuf.Field("waiting",1,"int32")).add(new protobuf.Field("subtitles",2,"VideoSubtitlesObject","repeated")),dt=new protobuf.Type("VideoStreamObject").add(new protobuf.Field("url",1,"string")).add(new protobuf.Field("timestamp",2,"int64")),ct=new protobuf.Type("VideoStreamResponse").add(new protobuf.Field("interval",1,"int32")).add(new protobuf.Field("translatedInfo",2,"VideoStreamObject")).add(new protobuf.Field("pingId",3,"int32")),ut=new protobuf.Type("YandexSessionRequest").add(new protobuf.Field("uuid",1,"string")).add(new protobuf.Field("module",2,"string")),ht=new protobuf.Type("YandexSessionResponse").add(new protobuf.Field("sign",1,"string")).add(new protobuf.Field("expires",2,"int32")),pt=(new protobuf.Root).define("yandex").add(et).add(ot).add(rt).add(nt).add(st).add(lt).add(at).add(it).add(dt).add(ct).add(ut).add(ht),gt={encodeTranslationRequest:(t,e,o,n,i)=>pt.VideoTranslationRequest.encode({url:t,firstRequest:!0,duration:e,unknown2:1,language:o,forceSourceLang:!1,unknown4:0,translationHelp:i,responseLanguage:n,unknown5:0,unknown6:1,bypassCache:!1}).finish(),decodeTranslationResponse:t=>pt.VideoTranslationResponse.decode(new Uint8Array(t)),encodeSubtitlesRequest:(t,e)=>pt.VideoSubtitlesRequest.encode({url:t,language:e}).finish(),decodeSubtitlesResponse:t=>pt.VideoSubtitlesResponse.decode(new Uint8Array(t)),encodeStreamPingRequest:t=>pt.VideoStreamPingRequest.encode({pingId:t}).finish(),encodeStreamRequest:(t,e,o)=>pt.VideoStreamRequest.encode({url:t,language:e,responseLanguage:o}).finish(),decodeStreamResponse:t=>pt.VideoStreamResponse.decode(new Uint8Array(t)),encodeYandexSessionRequest:(t,e)=>pt.YandexSessionRequest.encode({uuid:t,module:e}).finish(),decodeYandexSessionResponse:t=>pt.YandexSessionResponse.decode(new Uint8Array(t))};var vt=o("./node_modules/bowser/es5.js");function mt(){let t="";for(let e=0;e<32;e++){t+="0123456789ABCDEF"[Math.floor(16*Math.random())]}return t}async function bt(t){const e=new TextEncoder,o=await window.crypto.subtle.importKey("raw",e.encode(a.S7),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),n=await window.crypto.subtle.sign("HMAC",o,t);return new Uint8Array(n).reduce(((t,e)=>t+e.toString(16).padStart(2,"0")),"")}const ft=async function(t,e){try{c.A.log("requestStreamPing");const n=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;c.A.log("Inited yandexRequest...");const i=gt.encodeStreamPingRequest(t);await n("/stream-translation/ping-stream",i,{"Vtrans-Signature":await bt(i),"Sec-Vtrans-Token":mt()},e)}catch(t){console.error("[VOT]",t),e(!1)}};const yt=async function(t,e,n,i){try{c.A.log("requestStreamTranslation");const a=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;c.A.log("Inited yandexRequest...");const r=gt.encodeStreamRequest(t,e,n);await a("/stream-translation/translate-stream",r,{"Vtrans-Signature":await bt(r),"Sec-Vtrans-Token":mt()},i)}catch(t){console.error("[VOT]",t),i(!1)}};const wt=async function(t,e,n,i,a,r){try{c.A.log("requestVideoTranslation");const s=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;c.A.log("Inited yandexRequest...");const l=gt.encodeTranslationRequest(t,e,n,i,a);await s("/video-translation/translate",l,{"Vtrans-Signature":await bt(l),"Sec-Vtrans-Token":mt()},r)}catch(t){console.error("[VOT]",t),r(!1)}};const xt=async function(t,e,n){try{c.A.log("requestVideoSubtitles");const i=(await Promise.resolve().then(o.bind(o,"./src/yandexRequest.js"))).default;c.A.log("Inited yandexRequest...");const a=gt.encodeSubtitlesRequest(t,e);await i("/video-subtitles/get-subtitles",a,{"Vsubs-Signature":await bt(a),"Sec-Vsubs-Token":mt()},n)}catch(t){console.error("[VOT]",t),n(!1)}};function St(t){const e=t.startMs+t.durationMs;return t.tokens.reduce(((o,n,i)=>{const a=t.tokens[i+1];let r;o.length>0&&(r=o[o.length-1]);const s=r?.alignRange?.end??0,l=s+n.text.length;if(n.alignRange={start:s,end:l},o.push(n),a){const t=n.startMs+n.durationMs,i=a.startMs?a.startMs-t:e-t;o.push({text:" ",startMs:t,durationMs:i,alignRange:{start:l,end:l+1}})}return o}),[])}function kt(t,e){const o=t.text.split(/([\n \t])/).reduce(((t,o)=>{if(o.length){const n=t[t.length-1]??e,i=n?.alignRange?.end??0,a=i+o.length;t.push({text:o,alignRange:{start:i,end:a}})}return t}),[]),n=Math.floor(t.durationMs/o.length),i=t.startMs+t.durationMs;return o.map(((e,a)=>{const r=a===o.length-1,s=t.startMs+n*a;return{...e,startMs:s,durationMs:r?i-s:n}}))}function Tt(t){let e=Math.floor(t/3600),o=Math.floor(t%3600/60),n=Math.floor(t%60),i=Math.floor(t%1*1e3);return`${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")},${i.toString().padStart(3,"0")}`}async function Mt(t){const e=new Promise((t=>setTimeout((()=>t({containsTokens:!1,subtitles:[]})),5e3))),o=(async()=>{try{const e=await O(t.url);return await e.json()}catch(t){return console.error("[VOT] Failed to fetch subtitles. Reason:",t),{containsTokens:!1,subtitles:[]}}})();let n=await Promise.race([e,o]);return"youtube"===t.source&&(n=function(t){const e={containsTokens:!1,subtitles:[]};if("object"!=typeof t||!("events"in t)||!Array.isArray(t.events))return console.error("[VOT] Failed to format youtube subtitles",t),e;for(let o=0;ot.utf8.replace(/^( +| +)$/g,""))).join(" ");let i=t.events[o].dDurationMs;t.events[o+1]&&t.events[o].tStartMs+t.events[o].dDurationMs>t.events[o+1].tStartMs&&(i=t.events[o+1].tStartMs-t.events[o].tStartMs),"\n"!==n&&e.subtitles.push({text:n,startMs:t.events[o].tStartMs,durationMs:i})}return e}(n)),n.subtitles=function(t,e){const o=[];let n;for(let i=0;i{setTimeout((()=>{i||(console.error("[VOT] Failed get yandex subtitles. Reason: timeout"),t([]))}),5e3)})),new Promise((n=>{xt(`${t.url}${e}`,o,((t,o)=>{c.A.log("[exec callback] Requesting video subtitles",e),t||(console.error("[VOT] Failed get yandex subtitles"),i=!0,n([]));const a=gt.decodeSubtitlesResponse(o);console.log("[VOT] Subtitles response: ",a);let r=a.subtitles??[];r=r.reduce(((t,e)=>(e.language&&!t.find((t=>{if("yandex"===t.source&&t.language===e.language&&!t.translatedFromLanguage)return t}))&&t.push({source:"yandex",language:e.language,url:e.url}),e.translatedLanguage&&t.push({source:"yandex",language:e.translatedLanguage,translatedFromLanguage:e.language,url:e.translatedUrl}),t)),[]),i=!0,n(r)}))}))]),r=[...a,...n].sort(((t,e)=>{if(t.source!==e.source)return"yandex"===t.source?-1:1;if(t.language!==e.language&&(t.language===M||e.language===M))return t.language===M?-1:1;if("yandex"===t.source){if(t.translatedFromLanguage!==e.translatedFromLanguage)return t.translatedFromLanguage&&e.translatedFromLanguage?t.translatedFromLanguage===o?-1:1:t.language===e.language?t.translatedFromLanguage?1:-1:t.translatedFromLanguage?-1:1;if(!t.translatedFromLanguage)return t.language===o?-1:1}return"youtube"===t.source&&t.isAutoGenerated!==e.isAutoGenerated?t.isAutoGenerated?1:-1:0}));return console.log("[VOT] subtitles list",r),r}class Lt{dragging=!1;subtitlesContainerRect=null;containerRect=null;offsetX=null;offsetY=null;lastContent=null;highlightWords=!1;subtitles=null;maxLength=300;maxLengthRegexp=/.{1,300}(?:\s|$)/g;constructor(t,e,o){this.site=o,this.video=t,"youtube"===this.site.host&&"mobile"!==this.site.additionalData?this.container=e.parentElement:this.container=e,this.votSubtitlesContainer=document.createElement("vot-block"),this.votSubtitlesContainer.classList.add("vot-subtitles-widget"),this.container.appendChild(this.votSubtitlesContainer),this.onMouseDownBound=this.onMouseDown.bind(this),this.onMouseUpBound=this.onMouseUp.bind(this),this.onMouseMoveBound=this.onMouseMove.bind(this),this.onTimeUpdateBound=this.onTimeUpdate.bind(this),document.addEventListener("mousedown",this.onMouseDownBound),document.addEventListener("mouseup",this.onMouseUpBound),document.addEventListener("mousemove",this.onMouseMoveBound),this.video?.addEventListener("timeupdate",this.onTimeUpdateBound)}release(){this.video?.removeEventListener("timeupdate",this.onTimeUpdateBound),document.removeEventListener("mousedown",this.onMouseDownBound),document.removeEventListener("mouseup",this.onMouseUpBound),document.removeEventListener("mousemove",this.onMouseMoveBound),this.votSubtitlesContainer.remove()}onMouseDown(t){this.votSubtitlesContainer.contains(t.target)&&(this.subtitlesContainerRect=this.votSubtitlesContainer.getBoundingClientRect(),this.containerRect=this.container.getBoundingClientRect(),this.offsetX=t.clientX-this.subtitlesContainerRect.x,this.offsetY=t.clientY-this.subtitlesContainerRect.y,this.dragging=!0)}onMouseUp(){this.dragging=!1}onMouseMove(t){if(this.dragging){t.preventDefault();const e=t.clientX-this.offsetX,o=t.clientY-this.offsetY,n=o>=this.containerRect.top,i=o+this.subtitlesContainerRect.height<=this.containerRect.bottom,a=e>=this.containerRect.left,r=e+this.subtitlesContainerRect.width<=this.containerRect.right;this.votSubtitlesContainer.style.top=n&&i?o-this.containerRect.y+"px":n?this.containerRect.height-this.subtitlesContainerRect.height+"px":"0px",this.votSubtitlesContainer.style.left=a&&r?e-this.containerRect.x+"px":a?this.containerRect.width-this.subtitlesContainerRect.width+"px":"0px"}}onTimeUpdate(){this.update()}setContent(t){t&&this.video?(this.subtitles=t,this.update()):(this.subtitles=null,this.votSubtitlesContainer.innerHTML="")}setMaxLength(t){"number"==typeof t&&t&&(this.maxLength=t,this.maxLengthRegexp=new RegExp(`.{1,${t}}(?:\\s|$)`,"g"),this.update())}setHighlightWords(t){this.highlightWords!==!!t&&(this.highlightWords=!!t,this.update())}update(){if(!this.video)return;let t="",e=this.highlightWords&&this.subtitles?.containsTokens;const o=1e3*this.video.currentTime,n=this.subtitles?.subtitles?.findLast((t=>t.startMsthis.maxLength){let t=[],e=0,n=0,a=0;for(let o=0;othis.maxLength){let r=i.slice(e,n+1);r.at(0)&&" "===r.at(0).text&&(r=r.slice(1)),r.at(-1)&&" "===r.at(-1).text&&(r=r.slice(0,r.length-1)),t.push({startMs:i[e].startMs,durationMs:i[n].startMs+i[n].durationMs-i[e].startMs,tokens:r}),e=o,a=0}n=o}for(let e=0;er||o>a.startMs-100&&r-o<275)?'class="passed"':""}>${a.text}`}}t!==this.lastContent&&(this.lastContent=t,this.votSubtitlesContainer.innerHTML=t?`${t.replace("\\n","
")}
`:"")}}const At={getVideoData:async function(){const t=window.course_id??document.querySelector('input[name="course_id"]')?.value,e=window.lessons??await async function(t){const e=await fetch(`https://coursehunter.net/api/v1/course/${t}/lessons`);return await e.json()}(t),o=parseInt(document.querySelector(".lessons-item_active")?.dataset?.index??1),n=e?.[o-1],{file:i,duration:a}=n;return c.A.log("coursehunter course data:",e),{url:i,duration:a}}};function Ct(){return Pt()?.player}function Pt(){return document.querySelector(".vjs-v6")}const Ot={getPlayer:Pt,getPlayerData:Ct,getVideoData:async function(t="en"){let e=null;const o=Ct(),{duration:n}=o?.cache_||{},{courseId:i,tracks:a,sources:s}=o?.options_||{},l=function(t){const e=t?.find((t=>"video/mp4"===t.type));return e?.src}(s),d=await async function(t){const e=await fetch(`https://www.coursera.org/api/onDemandCourses.v1/${t}`),o=await e.json();return o?.elements?.[0]}(i);let u=d?.primaryLanguageCodes?.[0];u=u?L(u):"en",r.includes(u)||(u="en");const h=function(t,e,o){let n=t?.find((t=>L(t.srclang)===e));return n||(n=t?.find((t=>L(t.srclang)===o))||t?.[0]),n?.src}(a,u,t);console.log(`videoURL: ${l}, subtitlesURL: ${h}`),h&&l?e=[{target:"video_file_url",targetUrl:l},{target:"subtitles_file_url",targetUrl:`https://www.coursera.org${h}`}]:l&&!h?(console.warn("[VOT] Subtitles files not found. Using the link only to the video file."),e={url:l}):console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${l}, subtitlesURL: ${h}`);const p={duration:n,detectedLanguage:u,translationHelp:e};return c.A.log("coursera video data:",p),console.log("[VOT] Detected language: ",p.detectedLanguage),p}},Et="https://www.udemy.com/api-2.0",Rt=2592e6;async function Bt(t){const e=await fetch(`${Et}/courses/${t}/?`+new URLSearchParams({"fields[course]":"locale",use_remote_version:"true",caching_intent:"true"}));return await e.json()}async function Ft(t,e,o){if(!(n=t.expires,n+Rt>(new Date).getTime()&&t.accessToken))return void console.error(R.get("udemyAccessTokenExpired"));var n;const i=`Bearer ${t.accessToken}`,a=await fetch(`${Et}/users/me/subscribed-courses/${e}/lectures/${o}/?`+new URLSearchParams({"fields[lecture]":"asset","fields[asset]":"length,media_sources,captions"}),{headers:{"x-udemy-authorization":i,authorization:i}});return await a.json()}function Dt(){return qt()?.player}function _t(){const t=document.querySelector(".ud-app-loader[data-module-id='course-taking']")?.dataset?.moduleArgs;return t?JSON.parse(t):(console.error(R.get("udemyModuleArgsNotFound")),{})}function qt(){return document.querySelector(".vjs-v7")}const zt={getPlayer:qt,getPlayerData:Dt,getVideoData:async function(t,e="en"){let o=null;const n=Dt();c.A.log("udemyData",t);const i=_t();c.A.log("moduleData: ",i);const a=i.courseId,s=window.location.pathname.match(/learn\/lecture\/([^/]+)/)?.[1];c.A.log(`CourseId: ${a}, lectureId: ${s}`);const l=await Bt(a);c.A.log("courseLang Data:",l);const d=await Ft(t,a,s);console.log("lecture Data:",d);let u=l?.locale?.locale;u=u?L(u):"en",r.includes(u)||(u="en");const h=d?.asset?.length||n?.cache_?.duration,p=function(t){const e=t?.find((t=>"video/webm"===t.type||"video/mp4"===t.type));return e?.src}(d?.asset?.media_sources)||function(){const t=qt()?.querySelector("video")?.src;return!t?.startsWith("blob:")&&t}(),g=function(t,e,o){let n=t?.find((t=>L(t.locale_id)===e));return n||(n=t?.find((t=>L(t.locale_id)===o))||t?.[0]),n?.url}(d?.asset?.captions,u,e);console.log(`videoURL: ${p}, subtitlesURL: ${g}`),g&&p?o=[{target:"video_file_url",targetUrl:p},{target:"subtitles_file_url",targetUrl:g}]:p&&!g?(console.warn("[VOT] Subtitles files not found. Using the link only to the video file."),o={url:p}):console.error(`Failed to find subtitlesURL or videoURL. videoURL: ${p}, subtitlesURL: ${g}`);const v={duration:h,detectedLanguage:u,translationHelp:o};return c.A.log("udemy video data:",v),console.log("[VOT] Detected language: ",v.detectedLanguage),v},getModuleData:_t,getCourseLang:Bt,getLectureData:Ft};const It={getVideoData:async function(t){const e=await async function(t){return await fetch("https://api.banned.video/graphql",{method:"POST",body:JSON.stringify({operationName:"GetVideo",query:"query GetVideo($id: String!) {\n getVideo(id: $id) {\n ...DisplayVideoFields\n videoUrl: directUrl\n live\n }\n }\n\n fragment DisplayVideoFields on Video {\n title\n description: summary\n duration: videoDuration\n }",variables:{id:t}}),headers:{"User-Agent":"bannedVideoFrontEnd","apollographql-client-name":"banned-web","apollographql-client-version":"1.3","content-type":"application/json"}}).then((t=>t.json())).catch((t=>(console.error(t),{data:{getVideo:{}}})))}(t);c.A.log("banned.video video data:",e);const{videoUrl:o,duration:n,live:i,description:a,title:r}=e.data.getVideo;return{url:o,duration:n,live:i,title:r,description:a}}};const $t="https://global.apis.naver.com/weverse/wevweb",Nt="be4d79eb8fc7bd008ee82c8ec4ff6fd4",Ht="1b9cb6378d959b45714bec49971ade22e6e24e42";async function jt(t){const e=Date.now();let o=t.substring(0,Math.min(255,t.length))+e;const n=await async function(t,e){try{const o=new TextEncoder("utf-8");e=o.encode(e);const n=await window.crypto.subtle.importKey("raw",o.encode(t),{name:"HMAC",hash:{name:"SHA-1"}},!1,["sign","verify"]),i=await window.crypto.subtle.sign("HMAC",n,e);return btoa(String.fromCharCode(...new Uint8Array(i)))}catch(t){return console.error(t),!1}}(Ht,o);return{wmsgpad:e,wmd:n}}function Ut(){return{appId:Nt,language:"en",os:"WEB",platform:"WEB",wpf:"pc"}}const Wt={getVideoData:async function(){const t=new URL(window.location).pathname.match(/([^/]+)\/(live|media)\/([^/]+)/)?.[3],e=await async function(t){const e=`/post/v1.0/post-${t}/preview?`+new URLSearchParams({fieldSet:"postForPreview",...Ut()}),o=await jt(e);try{const t=await fetch($t+e+"&"+new URLSearchParams(o));return await t.json()}catch(t){return console.error(t),!1}}(t);if(!e)return;c.A.log("weverse video preview data:",e);const{videoId:o,serviceId:n,infraVideoId:i}=e.extension.video;if(!(o&&n&&i))return!1;const a=await async function(t){const e=`/video/v1.1/vod/${t}/inKey?`+new URLSearchParams({gcc:"RU",...Ut()}),o=await jt(e);try{const t=await fetch($t+e+"&"+new URLSearchParams(o),{method:"POST"});return await t.json()}catch(t){return console.error(t),!1}}(o);if(c.A.log("weverse video inKey data:",e),!a)return!1;const r=await async function(t,e,o){const n=Date.now();try{const i=await fetch(`https://global.apis.naver.com/rmcnmv/rmcnmv/vod/play/v2.0/${t}?`+new URLSearchParams({key:e,sid:o,nonce:n,devt:"html5_pc",prv:"N",aup:"N",stpb:"N",cpl:"en",env:"prod",lc:"en",adi:JSON.stringify([{adSystem:null}]),adu:"/"}));return await i.json()}catch(t){return console.error(t),!1}}(i,a.inKey,n);c.A.log("weverse video info:",r);const s=r.videos.list.find((t=>!1===t.useP2P&&t.source.includes(".mp4")));return!!s&&{url:s.source,duration:s.duration}}},Gt=[{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube.com$/,selector:"shorts-video #player"},{additionalData:"mobile",host:"youtube",url:"https://youtu.be/",match:/^m.youtube.com$/,selector:".player-container"},{host:"youtube",url:"https://youtu.be/",match:/^(www.)?youtube(-nocookie|kids)?.com$/,selector:".html5-video-container:not(#inline-player *)"},{host:"tiktok",url:"https://www.tiktok.com/",match:/^(www.)?tiktok.com$/,selector:null},{host:"proxitok",url:"https://www.tiktok.com/",match:n,selector:".column.has-text-centered"},{host:"twitch",url:"https://twitch.tv/",match:[/^m.twitch.tv$/,/^www.twitch.tv$/,/^clips.twitch.tv$/,/^player.twitch.tv$/],selector:".video-ref, main > div > section > div > div > div"},{host:"xvideos",url:"https://www.xvideos.com/",match:/^www.xvideos.com$/,selector:".video-bg-pic"},{host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:/^[a-z]+.pornhub.com$/,selector:".mainPlayerDiv > .video-element-wrapper-js > div"},{additionalData:"embed",host:"pornhub",url:"https://rt.pornhub.com/view_video.php?viewkey=",match:t=>t.host.includes("pornhub.com")&&t.pathname.startsWith("/embed/"),selector:"#player"},{additionalData:"mobile",host:"vk",url:"https://vk.com/video?z=",match:/^m.vk.(com|ru)$/,selector:"vk-video-player",shadowRoot:!0},{additionalData:"clips",host:"vk",url:"https://vk.com/video?z=",match:/^(www.|m.)?vk.(com|ru)$/,selector:'div[data-testid="clipcontainer-video"]'},{host:"vk",url:"https://vk.com/video?z=",match:/^(www.|m.)?vk.(com|ru)$/,selector:".videoplayer_media"},{host:"vimeo",url:"https://vimeo.com/",match:/^vimeo.com$/,selector:".player"},{additionalData:"embed",host:"vimeo",url:"https://player.vimeo.com/",match:/^player.vimeo.com$/,selector:".player"},{host:"ok.ru",url:"https://ok.ru/video/",match:/^ok.ru$/,selector:".html5-vpl_vid"},{host:"nine_gag",url:"https://9gag.com/gag/",match:/^9gag.com$/,selector:".video-post"},{host:"bitchute",url:"https://www.bitchute.com/video/",match:/^(www.)?bitchute.com$/,selector:"div#player"},{host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:".video-player > div > div > div:nth-child(2)"},{additionalData:"embed",host:"rutube",url:"https://rutube.ru/video/",match:/^rutube.ru$/,selector:"#app > div > div"},{host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m|player).bilibili.com$/,selector:".bpx-player-video-wrap"},{additionalData:"old",host:"bilibili",url:"https://www.bilibili.com/video/",match:/^(www|m).bilibili.com$/,selector:null},{host:"twitter",url:"https://twitter.com/i/status/",match:/^twitter.com$/,selector:'div[data-testid="videoComponent"] > div:nth-child(1) > div'},{host:"mail_ru",url:"https://my.mail.ru/",match:/^my.mail.ru$/,selector:"#b-video-wrapper"},{host:"coursera",url:"https://www.coursera.org/",match:/coursera.org$/,selector:".vjs-v6"},{host:"udemy",url:"https://www.udemy.com/",match:/udemy.com$/,selector:'div[data-purpose="curriculum-item-viewer-content"] > section > div > div > div > div:nth-of-type(2)'},{host:"invidious",url:"https://youtu.be/",match:t,selector:"#player"},{host:"piped",url:"https://youtu.be/",match:e,selector:".shaka-video-container"},{host:"rumble",url:"https://rumble.com/",match:/^rumble.com$/,selector:"#videoPlayer > .videoPlayer-Rumble-cls > div"},{host:"eporner",url:"https://www.eporner.com/",match:/^(www.)?eporner.com$/,selector:".vjs-v7"},{host:"peertube",url:"stub",match:i,selector:".vjs-v7"},{host:"dailymotion",url:"https://dai.ly/",match:/^geo.dailymotion.com$/,selector:".player"},{host:"trovo",url:"https://trovo.live/s/",match:/^trovo.live$/,selector:".player-video"},{host:"yandexdisk",url:"https://yadi.sk/i/",match:/^disk.yandex.ru$/,selector:".video-player__player > div:nth-child(1)"},{host:"coursehunter",url:"https://coursehunter.net/course/",match:/^coursehunter.net$/,selector:"#oframeplayer > pjsdiv:nth-of-type(1)"},{host:"googledrive",url:"https://drive.google.com/file/d/",match:/^youtube.googleapis.com$/,selector:".html5-video-container"},{host:"bannedvideo",url:"https://banned.video/watch?id=",match:/^(www.)?banned.video$/,selector:".vjs-v7"},{host:"facebook",url:"https://facebook.com/",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/videos/"),selector:'div[role="main"] div[data-pagelet$="video" i]'},{additionalData:"reels",host:"facebook",url:"https://facebook.com/",match:t=>t.host.includes("facebook.com")&&t.pathname.includes("/reel/"),selector:'div[role="main"]'},{host:"weverse",url:"https://weverse.io/",match:/^weverse.io$/,selector:".webplayer-internal-source-wrapper"},{host:"newgrounds",url:"https://www.newgrounds.com/",match:/^www.newgrounds.com$/,selector:".ng-video-player"},{host:"egghead",url:"https://egghead.io/",match:/^egghead.io$/,selector:".cueplayer-react-video-holder"},{host:"youku",url:"https://v.youku.com/",match:/^v.youku.com$/,selector:"#ykPlayer"},{host:"directlink",url:"stub",match:t=>/([^.]+).mp4/.test(t.pathname),selector:null}];o("./node_modules/requestidlecallback-polyfill/index.js");class Yt{constructor(){this.listeners=new Set}hasListener(t){return this.listeners.has(t)}dispatchToListener(t,...e){try{t(...e)}catch(t){console.error("[VOT]",t)}}addListener(t){if(this.hasListener(t))throw new Error("[VOT] The listener has already been added.");this.listeners.add(t)}removeListener(t){if(!this.hasListener(t))throw new Error("[VOT] The listener has not been added yet.");this.listeners.delete(t)}dispatch(...t){for(const e of Array.from(this.listeners))this.dispatchToListener(e,...t)}}function Zt(t){return Array.from(t).flatMap((t=>t instanceof HTMLVideoElement?[t]:t instanceof HTMLElement?Array.from(t.querySelectorAll("video")):t.shadowRoot?Array.from(t.shadowRoot.querySelectorAll("video")):[]))}const Kt=/advertise|promo|sponsor|banner|commercial|preroll|midroll|postroll|ad-container|sponsored/i;const Jt=vt.getParser(window.navigator.userAgent).getResult(),Qt=[...t,...e],Xt=["playing","ratechange","play","waiting","pause"];function te(t,e){return t.map((t=>({label:R.get("langs")[t]??t.toUpperCase(),value:t,selected:e===t})))}function ee(t,e,o,n,i,a){c.A.log(`Translate video (url: ${t}, duration: ${e}, requestLang: ${o}, responseLang: ${n})`),c.A.log("translationHelp:",i),!0,wt(t,e,o,n,i,((t,e)=>{if(!1,c.A.log("[exec callback] Requesting video translation"),!t)return void a(!1,R.get("requestTranslationFailed"));const o=gt.decodeTranslationResponse(e);switch(console.log("[VOT] Translation response: ",o),o.status){case 0:a(!1,o.message);break;case 1:case 5:a(!!o.url,o.url||R.get("audioNotReceived"));break;case 2:a(!1,o.remainingTime?function(t){const e=Math.floor(t/60),o=Math.floor(t%60);return e>=60?R.get("translationTakeMoreThanHour"):1===e||0===e&&o>0?R.get("translationTakeAboutMinute"):11!==e&&e%10==1?R.get("translationTakeApproximatelyMinute2").replace("{0}",e):![12,13,14].includes(e)&&[2,3,4].includes(e%10)?R.get("translationTakeApproximatelyMinute").replace("{0}",e):R.get("translationTakeApproximatelyMinutes").replace("{0}",e)}(o.remainingTime):R.get("translationTakeFewMinutes"));break;case 3:case 6:a(!1,R.get("videoBeingTranslated"))}}))}class oe{translateFromLang="en";translateToLang=M;timer;ytData="";videoData="";firstPlay=!0;audio=new Audio;hls=C();videoTranslations=[];videoTranslationTTL=7200;downloadTranslationUrl=null;downloadSubtitlesUrl=null;autoRetry;streamPing;volumeOnStart;tempOriginalVolume;tempVolume;firstSyncVolume=!0;subtitlesList=[];subtitlesListVideoId=null;videoLastSrcObject=null;dragging;constructor(t,e,o){c.A.log("[VideoHandler] add video:",t,"container:",e,this),this.video=t,this.container=e,this.site=o,this.stopTranslationBound=this.stopTranslation.bind(this),this.handleVideoEventBound=this.handleVideoEvent.bind(this),this.changeOpacityOnEventBound=this.changeOpacityOnEvent.bind(this),this.resetTimerBound=this.resetTimer.bind(this),this.init()}async autoTranslate(){if(this.site.host,this.firstPlay&&1===this.data.autoTranslate&&this.videoData.videoId){this.firstPlay=!1;try{await this.translateExecutor(this.videoData.videoId)}catch(t){console.error("[VOT]",t),this.transformBtn("error","VOTLocalizedError"===t?.name?t.localizedMessage:t)}}}async init(){if(this.initialized)return;const t={autoTranslate:u.get("autoTranslate",0,!0),dontTranslateLanguage:u.get("dontTranslateLanguage",M),dontTranslateYourLang:u.get("dontTranslateYourLang",1,!0),autoSetVolumeYandexStyle:u.get("autoSetVolumeYandexStyle",1,!0),autoVolume:u.get("autoVolume",a.JD,!0),buttonPos:u.get("buttonPos","default"),showVideoSlider:u.get("showVideoSlider",1,!0),syncVolume:u.get("syncVolume",0,!0),subtitlesMaxLength:u.get("subtitlesMaxLength",300,!0),highlightWords:u.get("highlightWords",0,!0),responseLanguage:u.get("responseLanguage",M),defaultVolume:u.get("defaultVolume",100,!0),udemyData:u.get("udemyData",{accessToken:"",expires:0}),audioProxy:u.get("audioProxy",0,!0),showPiPButton:u.get("showPiPButton",0,!0),translateAPIErrors:u.get("translateAPIErrors",1,!0),translationService:u.get("translationService",a.mE),detectService:u.get("detectService",a.K2),m3u8ProxyHost:u.get("m3u8ProxyHost",a.se),proxyWorkerHost:u.get("proxyWorkerHost",a.Pm)};this.data=Object.fromEntries(await Promise.all(Object.entries(t).map((async([t,e])=>[t,await e])))),console.log("[db] data from db: ",this.data),this.subtitlesWidget=new Lt(this.video,this.container,this.site),this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength),this.subtitlesWidget.setHighlightWords(this.data.highlightWords),this.initUI(),this.initUIEvents();const e=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=e,e?this.votMenu.container.hidden=!0:(this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage??"ru")),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),await this.autoTranslate(),this.translateToLang=this.data.responseLanguage??"ru",this.initExtraEvents(),this.initialized=!0}transformBtn(t="none",e){this.votButton.container.dataset.status=t,this.votButton.container.dataset.translating="error"===t&&e.includes(R.get("translationTake")),this.votButton.label.innerHTML=e,this.votButton.container.title="error"===t?e:""}initUI(){this.votButton=X.createVOTButton(R.get("translateVideo")),this.data?.buttonPos&&"default"!==this.data?.buttonPos&&this.video.clientWidth&&this.video.clientWidth>550?(this.votButton.container.dataset.direction="column",this.votButton.container.dataset.position=this.data?.buttonPos):(this.votButton.container.dataset.direction="row",this.votButton.container.dataset.position="default"),this.container.appendChild(this.votButton.container),this.votButton.pipButton.hidden=!A()||!this.data?.showPiPButton,this.votButton.separator2.hidden=!A()||!this.data?.showPiPButton,this.votButton.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votMenu=X.createVOTMenu(R.get("VOTSettings")),this.votMenu.container.dataset.position=this.video.clientWidth&&this.video.clientWidth>550?this.data?.buttonPos:"default",this.container.appendChild(this.votMenu.container),this.votDownloadButton=X.createIconButton(''),this.votDownloadButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadButton),this.votDownloadSubtitlesButton=X.createIconButton(''),this.votDownloadSubtitlesButton.hidden=!0,this.votMenu.headerContainer.appendChild(this.votDownloadSubtitlesButton),this.votSettingsButton=X.createIconButton(''),this.votMenu.headerContainer.appendChild(this.votSettingsButton),this.votTranslationLanguageSelect=X.createVOTLanguageSelect({fromTitle:R.get("langs")[this.video.detectedLanguage],fromDialogTitle:R.get("videoLanguage"),fromItems:[{label:R.get("langs").auto,value:"auto",selected:""},...te(r,this.videoData.detectedLanguage)],fromOnSelectCB:async t=>{c.A.log("[fromOnSelectCB] select from language",t.target.dataset.votValue),this.videoData=await this.getVideoData(),this.setSelectMenuValues(t.target.dataset.votValue,this.videoData.responseLanguage)},toTitle:R.get("langs")[this.video.responseLanguage],toDialogTitle:R.get("translationLanguage"),toItems:te(s,this.videoData.responseLanguage),toOnSelectCB:async t=>{const e=t.target.dataset.votValue;c.A.log("[toOnSelectCB] select to language",e),this.data.responseLanguage=this.translateToLang=e,await u.set("responseLanguage",this.data.responseLanguage),c.A.log("Response Language value changed. New value: ",this.data.responseLanguage),this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.data.responseLanguage)}}),this.votMenu.bodyContainer.appendChild(this.votTranslationLanguageSelect.container),this.votSubtitlesSelect=X.createVOTSelect(R.get("VOTSubtitlesDisabled"),R.get("VOTSubtitles"),[{label:R.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1}],{onSelectCb:async t=>{await this.changeSubtitlesLang(t.target.dataset.votValue)},labelElement:X.createVOTSelectLabel(R.get("VOTSubtitles"))}),this.votMenu.bodyContainer.appendChild(this.votSubtitlesSelect.container),this.votVideoVolumeSlider=X.createSlider(`${R.get("VOTVolume")}: ${100*this.getVideoVolume()}%`,100*this.getVideoVolume()),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoVolumeSlider.container),this.votVideoTranslationVolumeSlider=X.createSlider(`${R.get("VOTVolumeTranslation")}: ${this.data?.defaultVolume??100}%`,this.data?.defaultVolume??100),this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,this.votMenu.bodyContainer.appendChild(this.votVideoTranslationVolumeSlider.container),this.votMenu.container.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()})),this.votSettingsDialog=X.createDialog(R.get("VOTSettings")),document.documentElement.appendChild(this.votSettingsDialog.container),this.votTranslationHeader=X.createHeader(R.get("translationSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationHeader),this.votAutoTranslateCheckbox=X.createCheckbox(R.get("VOTAutoTranslate"),this.data?.autoTranslate??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoTranslateCheckbox.container),this.votDontTranslateYourLangSelect=X.createVOTSelect(R.get("langs")[u.syncGet("dontTranslateLanguage",M)],R.get("VOTDontTranslateYourLang"),te(r,u.syncGet("dontTranslateLanguage",M)),{onSelectCb:async t=>{this.data.dontTranslateLanguage=t.target.dataset.votValue,await u.set("dontTranslateLanguage",this.data.dontTranslateLanguage)},labelElement:X.createCheckbox(R.get("VOTDontTranslateYourLang"),this.data?.dontTranslateYourLang??!0).container}),this.votSettingsDialog.bodyContainer.appendChild(this.votDontTranslateYourLangSelect.container),this.votAutoSetVolumeCheckbox=X.createCheckbox(`${R.get("VOTAutoSetVolume")}`,this.data?.autoSetVolumeYandexStyle??!0),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeCheckbox.container),this.votAutoSetVolumeSlider=X.createSlider(`${100*(this.data?.autoVolume??a.JD)}%`,100*(this.data?.autoVolume??a.JD),0,100),this.votSettingsDialog.bodyContainer.appendChild(this.votAutoSetVolumeSlider.container),this.votShowVideoSliderCheckbox=X.createCheckbox(R.get("VOTShowVideoSlider"),this.data?.showVideoSlider??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votShowVideoSliderCheckbox.container),this.votUdemyDataTextfield=X.createTextfield(R.get("VOTUdemyData"),this.data?.udemyData?.accessToken??""),this.votUdemyDataTextfield.container.hidden="udemy"!==this.site.host,this.votSettingsDialog.bodyContainer.appendChild(this.votUdemyDataTextfield.container),this.votSyncVolumeCheckbox=X.createCheckbox(R.get("VOTSyncVolume"),this.data?.syncVolume??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSyncVolumeCheckbox.container),this.votTranslationServiceSelect=X.createVOTSelect(u.syncGet("translationService",a.mE).toUpperCase(),R.get("VOTTranslationService"),te(m,u.syncGet("translationService",a.mE)),{onSelectCb:async t=>{this.data.translationService=t.target.dataset.votValue,await u.set("translationService",this.data.translationService)},labelElement:X.createCheckbox(R.get("VOTTranslateAPIErrors"),this.data.translateAPIErrors??!0).container}),this.votTranslationServiceSelect.container.hidden="ru"===R.lang,this.votSettingsDialog.bodyContainer.appendChild(this.votTranslationServiceSelect.container),this.votDetectServiceSelect=X.createVOTSelect(u.syncGet("detectService",a.K2).toUpperCase(),R.get("VOTDetectService"),te(b,u.syncGet("detectService",a.K2)),{onSelectCb:async t=>{this.data.detectService=t.target.dataset.votValue,await u.set("detectService",this.data.detectService)},labelElement:X.createVOTSelectLabel(R.get("VOTDetectService"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votDetectServiceSelect.container),this.votSubtitlesHeader=X.createHeader(R.get("subtitlesSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHeader),this.votSubtitlesMaxLengthSlider=X.createSlider(`${R.get("VOTSubtitlesMaxLength")}: ${this.data?.subtitlesMaxLength??300}`,this.data?.subtitlesMaxLength??300,50,300),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesMaxLengthSlider.container),this.votSubtitlesHighlightWordsCheckbox=X.createCheckbox(R.get("VOTHighlightWords"),this.data?.highlightWords??!1),this.votSettingsDialog.bodyContainer.appendChild(this.votSubtitlesHighlightWordsCheckbox.container),this.votProxyHeader=X.createHeader(R.get("proxySettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votProxyHeader),this.votM3u8ProxyHostTextfield=X.createTextfield(R.get("VOTM3u8ProxyHost"),this.data?.m3u8ProxyHost,a.se),this.votSettingsDialog.bodyContainer.appendChild(this.votM3u8ProxyHostTextfield.container),this.votProxyWorkerHostTextfield=X.createTextfield(R.get("VOTProxyWorkerHost"),this.data?.proxyWorkerHost,a.Pm),this.votProxyWorkerHostTextfield.container.hidden=!0,this.votSettingsDialog.bodyContainer.appendChild(this.votProxyWorkerHostTextfield.container),this.votAudioProxyCheckbox=X.createCheckbox(R.get("VOTAudioProxy"),this.data?.audioProxy??!1),this.votAudioProxyCheckbox.container.hidden=!0,this.votSettingsDialog.bodyContainer.appendChild(this.votAudioProxyCheckbox.container),this.votAboutHeader=X.createHeader(R.get("about")),this.votSettingsDialog.bodyContainer.appendChild(this.votAboutHeader),this.votLanguageSelect=X.createVOTSelect(R.get("langs")[u.syncGet("locale-lang-override","auto")],R.get("VOTMenuLanguage"),te(E,u.syncGet("locale-lang-override","auto")),{onSelectCb:async t=>{await u.set("locale-lang-override",t.target.dataset.votValue)},labelElement:X.createVOTSelectLabel(R.get("VOTMenuLanguage"))}),this.votSettingsDialog.bodyContainer.appendChild(this.votLanguageSelect.container),this.votShowPiPButtonCheckbox=X.createCheckbox(R.get("VOTShowPiPButton"),this.data?.showPiPButton??!1),this.votShowPiPButtonCheckbox.container.hidden=!A(),this.votSettingsDialog.bodyContainer.appendChild(this.votShowPiPButtonCheckbox.container),this.votVersionInfo=X.createInformation(`${R.get("VOTVersion")}:`,GM_info.script.version),this.votSettingsDialog.bodyContainer.appendChild(this.votVersionInfo.container),this.votAuthorsInfo=X.createInformation(`${R.get("VOTAuthors")}:`,GM_info.script.author),this.votSettingsDialog.bodyContainer.appendChild(this.votAuthorsInfo.container),this.votLoaderInfo=X.createInformation(`${R.get("VOTLoader")}:`,`${GM_info.scriptHandler} v${GM_info.version}`),this.votSettingsDialog.bodyContainer.appendChild(this.votLoaderInfo.container),this.votBrowserInfo=X.createInformation(`${R.get("VOTBrowser")}:`,`${Jt.browser.name} ${Jt.browser.version} (${Jt.os.name} ${Jt.os.version})`),this.votSettingsDialog.bodyContainer.appendChild(this.votBrowserInfo.container),this.votResetSettingsButton=X.createButton(R.get("resetSettings")),this.votSettingsDialog.bodyContainer.appendChild(this.votResetSettingsButton)}initUIEvents(){this.votButton.translateButton.addEventListener("click",(()=>{(async()=>{if(this.audio.src)return c.A.log("[click translationBtn] audio.src is not empty"),void this.stopTranslate();if(this.hls.url)return c.A.log("[click translationBtn] hls is not empty"),void this.stopTranslate();try{if(c.A.log("[click translationBtn] trying execute translation"),!this.videoData.videoId)throw new tt("VOTNoVideoIDFound");"vk"===this.site.host&&"clips"===this.site.additionalData&&(this.videoData=await this.getVideoData()),await this.translateExecutor(this.videoData.videoId)}catch(t){console.error("[VOT]",t),"VOTLocalizedError"===t?.name?this.transformBtn("error",t.localizedMessage):this.transformBtn("error",t)}})()})),this.votButton.pipButton.addEventListener("click",(()=>{(async()=>{this.video!==document.pictureInPictureElement?await this.video.requestPictureInPicture():await document.exitPictureInPicture()})()})),this.votButton.menuButton.addEventListener("click",(()=>{this.votMenu.container.hidden=!this.votMenu.container.hidden})),this.votButton.container.addEventListener("mousedown",(()=>{this.dragging=!0})),this.container.addEventListener("mouseup",(()=>{this.dragging=!1})),this.container.addEventListener("mousemove",(async t=>{if(this.dragging){t.preventDefault();const e=t.clientX/this.container.clientWidth*100;this.data.buttonPos=this.container.clientWidth&&this.container.clientWidth>550?e<=33?"left":e>=66?"right":"default":"default",this.votButton.container.dataset.direction="default"===this.data.buttonPos?"row":"column",this.votButton.container.dataset.position=this.data.buttonPos,this.votMenu.container.dataset.position=this.data.buttonPos,this.container.clientWidth&&this.container.clientWidth>550&&await u.set("buttonPos",this.data.buttonPos)}})),this.votDownloadButton.addEventListener("click",(()=>{this.downloadTranslationUrl&&window.open(this.downloadTranslationUrl,"_blank").focus()})),this.votDownloadSubtitlesButton.addEventListener("click",(async()=>{const t=function(t){let e="",o=1;for(const n of t.subtitles){let t=n.startMs/1e3,i=(n.startMs+n.durationMs)/1e3;e+=`${o}\n`,e+=`${Tt(t)} --\x3e ${Tt(i)}\n`,e+=`${n.text}\n\n`,o++}return e.trim()}(this.YandexSubtitles),e=new Blob([t],{type:"text/plain"}),o=URL.createObjectURL(e),n=document.createElement("a");n.href=o,n.download=`subtitles_${this.videoData.videoId}.srt`,n.click(),URL.revokeObjectURL(o)})),this.votSettingsButton.addEventListener("click",(()=>{this.votSettingsDialog.container.hidden=!this.votSettingsDialog.container.hidden,(document.fullscreenElement||document.webkitFullscreenElement)&&(document.webkitExitFullscreen&&document.webkitExitFullscreen(),document.exitFullscreen&&document.exitFullscreen())})),this.votVideoVolumeSlider.input.addEventListener("input",(t=>{const e=Number(t.target.value);this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`,this.setVideoVolume(e/100),this.data.syncVolume&&this.syncVolumeWrapper("video",e)})),this.votVideoTranslationVolumeSlider.input.addEventListener("input",(t=>{(async()=>{this.data.defaultVolume=Number(t.target.value),await u.set("defaultVolume",this.data.defaultVolume),this.votVideoTranslationVolumeSlider.label.querySelector("strong").innerHTML=`${this.data.defaultVolume}%`,this.audio.volume=this.data.defaultVolume/100,this.data.syncVolume&&(this.syncVolumeWrapper("translation",this.data.defaultVolume),["youtube","googledrive"].includes(this.site.host)&&"mobile"!==this.site.additionalData&&this.setVideoVolume(this.tempOriginalVolume/100))})()})),this.votAutoTranslateCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.autoTranslate=Number(t.target.checked),await u.set("autoTranslate",this.data.autoTranslate),await this.autoTranslate(),c.A.log("autoTranslate value changed. New value: ",this.data.autoTranslate)})()})),this.votDontTranslateYourLangSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.dontTranslateYourLang=Number(t.target.checked),await u.set("dontTranslateYourLang",this.data.dontTranslateYourLang),c.A.log("dontTranslateYourLang value changed. New value: ",this.data.dontTranslateYourLang)})()})),this.votAutoSetVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.autoSetVolumeYandexStyle=Number(t.target.checked),await u.set("autoSetVolumeYandexStyle",this.data.autoSetVolumeYandexStyle),c.A.log("autoSetVolumeYandexStyle value changed. New value: ",this.data.autoSetVolumeYandexStyle)})()})),this.votAutoSetVolumeSlider.input.addEventListener("input",(t=>{(async()=>{const e=Number(t.target.value);this.data.autoVolume=(e/100).toFixed(2),await u.set("autoVolume",this.data.autoVolume),this.votAutoSetVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`})()})),this.votShowVideoSliderCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showVideoSlider=Number(t.target.checked),await u.set("showVideoSlider",this.data.showVideoSlider),c.A.log("showVideoSlider value changed. New value: ",this.data.showVideoSlider),this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status})()})),this.votUdemyDataTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.udemyData={accessToken:t.target.value,expires:(new Date).getTime()},await u.set("udemyData",this.data.udemyData),c.A.log("udemyData value changed. New value: ",this.data.udemyData),window.location.reload()})()})),this.votSyncVolumeCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.syncVolume=Number(t.target.checked),await u.set("syncVolume",this.data.syncVolume),c.A.log("syncVolume value changed. New value: ",this.data.syncVolume)})()})),this.votTranslationServiceSelect.labelElement.addEventListener("change",(t=>{(async()=>{this.data.translateAPIErrors=Number(t.target.checked),await u.set("translateAPIErrors",this.data.translateAPIErrors),c.A.log("translateAPIErrors value changed. New value: ",this.data.translateAPIErrors)})()})),this.votSubtitlesMaxLengthSlider.input.addEventListener("input",(t=>{(async()=>{this.data.subtitlesMaxLength=Number(t.target.value),await u.set("subtitlesMaxLength",this.data.subtitlesMaxLength),this.votSubtitlesMaxLengthSlider.label.querySelector("strong").innerHTML=`${this.data.subtitlesMaxLength}`,this.subtitlesWidget.setMaxLength(this.data.subtitlesMaxLength)})()})),this.votSubtitlesHighlightWordsCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.highlightWords=Number(t.target.checked),await u.set("highlightWords",this.data.highlightWords),c.A.log("highlightWords value changed. New value: ",this.data.highlightWords),this.subtitlesWidget.setHighlightWords(this.data.highlightWords)})()})),this.votShowPiPButtonCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.showPiPButton=Number(t.target.checked),await u.set("showPiPButton",this.data.showPiPButton),c.A.log("showPiPButton value changed. New value: ",this.data.showPiPButton),this.votButton.pipButton.hidden=!A()||!this.data.showPiPButton,this.votButton.separator2.hidden=!A()||!this.data.showPiPButton})()})),this.votM3u8ProxyHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.m3u8ProxyHost=t.target.value||a.se,await u.set("m3u8ProxyHost",this.data.m3u8ProxyHost),c.A.log("m3u8ProxyHost value changed. New value: ",this.data.m3u8ProxyHost)})()})),this.votProxyWorkerHostTextfield.input.addEventListener("change",(t=>{(async()=>{this.data.proxyWorkerHost=t.target.value||a.Pm,await u.set("proxyWorkerHost",this.data.proxyWorkerHost),c.A.log("proxyWorkerHost value changed. New value: ",this.data.proxyWorkerHost),window.location.reload()})()})),this.votAudioProxyCheckbox.input.addEventListener("change",(t=>{(async()=>{this.data.audioProxy=Number(t.target.checked),await u.set("audioProxy",this.data.audioProxy),c.A.log("audioProxy value changed. New value: ",this.data.audioProxy)})()})),this.votResetSettingsButton.addEventListener("click",(()=>{(async()=>{R.reset();const t=await u.list();for(let e=0;e{this.extraEvents.push({element:t,event:e,handler:o}),t.addEventListener(e,o)},e=(e,o,n)=>{for(const i of o)t(e,i,n)};if(this.resizeObserver=new ResizeObserver((t=>{for(let e=0;e550;this.votButton.container.dataset.position=this.votMenu.container.dataset.position=e?this.data?.buttonPos:"default",this.votButton.container.dataset.direction=this.data?.buttonPos&&"default"!==this.data?.buttonPos&&e?"column":"row"})),this.resizeObserver.observe(this.video),this.votMenu.container.setAttribute("style",`--vot-container-height: ${this.video.getBoundingClientRect().height}px`),["youtube","googledrive"].includes(this.site.host)&&"mobile"!==this.site.additionalData){this.syncVolumeObserver=new MutationObserver((t=>{if(this.audio.src&&this.data.syncVolume)for(let e=0;e{const e=t.target,o=this.votButton.container,n=this.votMenu.container,i=this.container,a=this.votSettingsDialog.container,r=document.querySelector(".vot-dialog-temp"),s=o.contains(e),l=n.contains(e),d=i.contains(e),u=a.contains(e),h=r?.contains(e)??!1;c.A.log(`[document click] ${s} ${l} ${d} ${u} ${h}`),s||l||u||h||(d||this.logout(0),this.votMenu.container.hidden=!0)})),o="pornhub"===this.site.host?"embed"===this.site.additionalData?document.querySelector("#player"):this.container.querySelector(".video-element-wrapper-js > div"):"twitter"===this.site.host?document.querySelector('div[data-testid="videoPlayer"]'):"yandexdisk"===this.site.host?document.querySelector(".video-player__player"):this.container,o&&e(o,["mousemove","mouseout"],this.resetTimerBound),t(this.votButton.container,"mousemove",this.changeOpacityOnEventBound),t(this.votMenu.container,"mousemove",this.changeOpacityOnEventBound),e(document,["touchstart","touchmove","touchend"],this.changeOpacityOnEventBound),t(this.votButton.container,"mousedown",(t=>{t.stopImmediatePropagation()})),t(this.votMenu.container,"mousedown",(t=>{t.stopImmediatePropagation()})),"youtube"===this.site.host&&(this.container.draggable=!1),"googledrive"===this.site.host&&(this.container.style.height="100%"),t(this.video,"canplaythrough",(async()=>{"rutube"===this.site.host&&this.video.src||V(this.site.host,this.video)!==this.videoData.videoId&&(await this.handleSrcChanged(),c.A.log("lipsync mode is loadeddata"),await this.autoTranslate())})),t(this.video,"emptied",(()=>{this.video.src&&V(this.site.host,this.video)===this.videoData.videoId||(c.A.log("lipsync mode is emptied"),this.videoData="",this.stopTranslation())})),["rutube","ok"].includes(this.site.host)||t(this.video,"volumechange",(()=>{this.syncVideoVolumeSlider()}))}logout(t){this.votMenu.container.hidden&&(this.votButton.container.style.opacity=t)}resetTimer(){clearTimeout(this.timer),this.logout(1),this.timer=setTimeout((()=>{this.logout(0)}),1e3)}changeOpacityOnEvent(t){clearTimeout(this.timer),this.logout(1),t.stopPropagation()}async changeSubtitlesLang(t){if(c.A.log("[onchange] subtitles",t),this.votSubtitlesSelect.setSelected(t),"disabled"===t)this.votSubtitlesSelect.setTitle(R.get("VOTSubtitlesDisabled")),this.subtitlesWidget.setContent(null),this.votDownloadSubtitlesButton.hidden=!0,this.YandexSubtitles=null;else{const e=await Mt(this.subtitlesList.at(parseInt(t)));this.subtitlesWidget.setContent(e),this.votDownloadSubtitlesButton.hidden=!1,this.YandexSubtitles=e}}async updateSubtitlesLangSelect(){const t=[{label:R.get("VOTSubtitlesDisabled"),value:"disabled",selected:!0,disabled:!1},...this.subtitlesList.map(((t,e)=>({label:(R.get("langs")[t.language]??t.language.toUpperCase())+(t.translatedFromLanguage?` ${R.get("VOTTranslatedFrom")} ${R.get("langs")[t.translatedFromLanguage]??t.translatedFromLanguage.toUpperCase()}`:"")+("yandex"!==t.source?` ${t.source}`:"")+(t.isAutoGenerated?` (${R.get("VOTAutogenerated")})`:""),value:e,selected:!1,disabled:!1})))];this.votSubtitlesSelect.updateItems(t),await this.changeSubtitlesLang(t[0].value)}async updateSubtitles(){if(await this.changeSubtitlesLang("disabled"),!this.videoData.videoId)return console.error(`[VOT] ${R.getDefault("VOTNoVideoIDFound")}`),this.subtitlesList=[],this.subtitlesListVideoId=null,this.votButton.container.hidden=!0,void await this.updateSubtitlesLangSelect();this.votButton.container.hidden=!1,this.subtitlesListVideoId!==this.videoData.videoId&&(this.subtitlesList=await Vt(this.site,this.videoData.videoId,this.videoData.detectedLanguage),this.subtitlesList?this.subtitlesListVideoId=this.videoData.videoId:await this.changeSubtitlesLang("disabled"),await this.updateSubtitlesLangSelect())}getVideoVolume(){let t=this.video?.volume;return["youtube","googledrive"].includes(this.site.host)&&(t=k.getVideoVolume()??t),t}setVideoVolume(t){if(["youtube","googledrive"].includes(this.site.host)){if(k.setVideoVolume(t))return}this.video.volume=t}isMuted(){return["youtube","googledrive"].includes(this.site.host)?k.isMuted():this.video?.muted}syncVideoVolumeSlider(){const t=this.isMuted()?0:100*this.getVideoVolume(),e=Math.round(t);this.votVideoVolumeSlider.input.value=e,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=`${e}%`,X.updateSlider(this.votVideoVolumeSlider.input),1===this.data.syncVolume&&(this.tempOriginalVolume=Number(e))}setSelectMenuValues(t,e){this.votTranslationLanguageSelect.fromSelect.setTitle(R.get("langs")[t]),this.votTranslationLanguageSelect.toSelect.setTitle(R.get("langs")[e]),this.votTranslationLanguageSelect.fromSelect.setSelected(t),this.votTranslationLanguageSelect.toSelect.setSelected(e),console.log(`[VOT] Set translation from ${t} to ${e}`),this.videoData.detectedLanguage=t,this.videoData.responseLanguage=e}syncVolumeWrapper(t,e){const o="translation"===t?this.votVideoVolumeSlider:this.votVideoTranslationVolumeSlider,n=Number(o.input.value),i=function(t,e,o,n){let i=e;return e>n?(i=o+(e-n),i=i>100?100:Math.max(i,0),t.volume=i/100):e100?100:Math.max(i,0),t.volume=i/100),i}("translation"===t?this.video:this.audio,e,n,"translation"===t?this.tempVolume:this.tempOriginalVolume);o.input.value=i,o.label.querySelector("strong").innerHTML=`${i}%`,X.updateSlider(o.input),this.tempOriginalVolume="translation"===t?i:e,this.tempVolume="translation"===t?e:i}async getVideoData(){const t={translationHelp:null,isStream:!1,duration:this.video?.duration||343,videoId:V(this.site.host,this.video),detectedLanguage:this.translateFromLang,responseLanguage:this.translateToLang};if(!t.videoId)return this.ytData={},t;if(window.location.hostname.includes("youtube.com"))this.ytData=await k.getVideoData(),t.isStream=this.ytData.isLive,this.ytData.title&&(t.detectedLanguage=this.ytData.detectedLanguage,t.responseLanguage=this.translateToLang);else if(window.location.hostname.includes("rutube")||window.location.hostname.includes("ok.ru")||window.location.hostname.includes("my.mail.ru"))t.detectedLanguage="ru";else if(["youku"].includes(this.site.host))t.detectedLanguage="zh";else if(["vk"].includes(this.site.host)){const e=document.getElementsByTagName("track")?.[0]?.srclang;t.detectedLanguage=e||"auto"}else if(window.location.hostname.includes("coursera.org")){const e=await Ot.getVideoData(this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else if(window.location.hostname.includes("coursehunter.net")){const e=await At.getVideoData();t.translationHelp={url:e.url},t.duration=e.duration||t.duration}else if(window.location.hostname.includes("banned.video")){const e=await It.getVideoData(t.videoId);t.translationHelp={url:e.url},t.duration=e.duration||t.duration,t.isStream=e.live}else if(window.location.hostname.includes("weverse.io")){const e=await Wt.getVideoData();t.detectedLanguage="ko",e&&(t.translationHelp={url:e.url},t.duration=e.duration||t.duration)}else if(window.location.hostname.includes("udemy.com")){const e=await zt.getVideoData(this.data.udemyData,this.translateToLang);t.duration=e.duration||t.duration,t.detectedLanguage=e.detectedLanguage,t.translationHelp=e.translationHelp}else["bilibili","piped","invidious","bitchute","rumble","peertube","dailymotion","trovo","yandexdisk","coursehunter","directlink"].includes(this.site.host)&&(t.detectedLanguage="auto");return t}videoValidator(){if(["youtube","ok.ru","vk"].includes(this.site.host)&&(c.A.log("VideoValidator videoData: ",this.videoData),1===this.data.dontTranslateYourLang&&this.videoData.detectedLanguage===this.data.dontTranslateLanguage))throw new tt("VOTDisableFromYourLang");if(!this.videoData.isStream&&this.videoData.duration>14400)throw new tt("VOTVideoIsTooLong");return!0}lipSync(t=!1){if(c.A.log("lipsync video",this.video),this.video)if(this.audio.currentTime=this.video.currentTime,this.audio.playbackRate=this.video.playbackRate,t)if("play"!=t)["pause","stop","waiting"].includes(t)&&(c.A.log(`lipsync mode is ${t}`),this.audio.pause()),"playing"==t&&(c.A.log("lipsync mode is playing"),this.audio.play());else{c.A.log("lipsync mode is play");const t=this.audio.play();void 0!==t&&t.catch((t=>{if(console.error("[VOT]",t),"NotAllowedError"===t.name)throw this.transformBtn("error",R.get("grantPermissionToAutoPlay")),new tt("grantPermissionToAutoPlay");if("NotSupportedError"===t.name)throw this.transformBtn("error",Qt.includes(window.location.hostname)?R.get("neededAdditionalExtension"):R.get("audioFormatNotSupported")),Qt.includes(window.location.hostname)?new tt("neededAdditionalExtension"):new tt("audioFormatNotSupported")}))}else c.A.log("lipsync mode is not set")}handleVideoEvent(t){c.A.log(`video ${t.type}`),this.lipSync(t.type)}stopTranslate(){for(const t of Xt)this.video.removeEventListener(t,this.handleVideoEventBound);this.audio.pause(),this.audio.src="",this.audio.removeAttribute("src"),this.votVideoVolumeSlider.container.hidden=!0,this.votVideoTranslationVolumeSlider.container.hidden=!0,this.votDownloadButton.hidden=!0,this.downloadTranslationUrl=null,this.transformBtn("none",R.get("translateVideo")),c.A.log(`Volume on start: ${this.volumeOnStart}`),this.volumeOnStart&&this.setVideoVolume(this.volumeOnStart),this.volumeOnStart="",clearInterval(this.streamPing),clearTimeout(this.autoRetry),this.hls?.destroy(),this.hls=C(),this.firstSyncVolume=!0}async translateExecutor(t){c.A.log("Run translateFunc",t),this.translateFunc(t,this.videoData.isStream,this.videoData.detectedLanguage,this.videoData.responseLanguage,this.videoData.translationHelp)}async updateTranslationErrorMsg(t){const e=R.get("translationTake"),o=R.get("VOTTranslatingError"),n=R.lang;if("VOTLocalizedError"===t?.name)this.transformBtn("error",t.localizedMessage);else if(1!==this.data.translateAPIErrors||t.includes(e)||"ru"===n)this.transformBtn("error",t);else{const e=await async function(t,e="",o="ru"){switch(await u.get("translationService",a.mE)){case"yandex":{const n=e&&o?`${e}-${o}`:o;return await p.translate(t,n)}case"deepl":return await v.translate(t,e,o);default:return t}}(t,"ru",n);this.transformBtn("error",o),this.transformBtn("error",e)}}afterUpdateTranslation(t){this.votVideoVolumeSlider.container.hidden=1!==this.data.showVideoSlider||"success"!==this.votButton.container.dataset.status,this.votVideoTranslationVolumeSlider.container.hidden="success"!==this.votButton.container.dataset.status,1===this.data.autoSetVolumeYandexStyle&&(this.votVideoVolumeSlider.input.value=100*this.data.autoVolume,this.votVideoVolumeSlider.label.querySelector("strong").innerHTML=100*this.data.autoVolume+"%",X.updateSlider(this.votVideoVolumeSlider.input)),this.votDownloadButton.hidden=!1,this.downloadTranslationUrl=t}updateTranslation(t){if(this.audio.src=t,this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),"twitter"===this.site.host)document.querySelector('button[data-testid="app-bar-back"][role="button"]').addEventListener("click",this.stopTranslationBound);this.video&&!this.video.paused&&this.lipSync("play");for(const t of Xt)this.video.addEventListener(t,this.handleVideoEventBound);this.transformBtn("success",R.get("disableTranslate")),this.afterUpdateTranslation(t)}translateFunc(t,e,o,n,i){console.log("[VOT] Video Data: ",this.videoData);const a=i?.url?i.url:`${this.site.url}${t}`;if(c.A.log("Run videoValidator"),this.videoValidator(),e)return c.A.log("Executed stream translation"),void function(t,e,o,n){c.A.log(`Translate stream (url: ${t}, requestLang: ${e}, responseLang: ${o})`),yt(t,e,o,((t,e)=>{if(c.A.log("[exec callback] Requesting stream translation"),!t)return void n(!1,R.get("requestTranslationFailed"));const o=gt.decodeStreamResponse(e);switch(console.log("[VOT] Stream Translation response: ",o),o.interval){case 10:n(!1,o.interval,R.get("translationTakeFewMinutes"));break;case 20:n(!0,o.interval,o||R.get("audioNotReceived"));break;case 0:n(!1,o.interval,R.get("streamNoConnectionToServer"))}}))}(a,o,n,(async(a,r,s)=>{if(c.A.log("[exec callback] translateStream callback"),V(this.site.host,this.video)!==t)return;if(!a||!s.translatedInfo)return await this.updateTranslationErrorMsg(s),void(10===r&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,o,n,i)),1e3*r)));this.transformBtn("success",R.get("disableTranslate")),console.log(s);const l=s.pingId;c.A.log(`Stream pingId: ${l}`),this.streamPing=setInterval((async()=>await ft(l,(t=>c.A.log("Stream ping result: ",t)))),1e3*r),c.A.log(s.translatedInfo.url);const d=`https://${this.data.m3u8ProxyHost}/?all=yes&origin=${encodeURIComponent("https://strm.yandex.ru")}&referer=${encodeURIComponent("https://strm.yandex.ru")}&url=${encodeURIComponent(s.translatedInfo.url)}`;if(c.A.log(d),this.hls)this.hls.on(Hls.Events.MEDIA_ATTACHED,(function(){c.A.log("audio and hls.js are now bound together !")})),this.hls.on(Hls.Events.MANIFEST_PARSED,(function(t){c.A.log("manifest loaded, found "+t?.levels?.length+" quality level")})),this.hls.loadSource(d),this.hls.attachMedia(this.audio),this.hls.on(Hls.Events.ERROR,(function(t){if(t.fatal)switch(t.type){case Hls.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover"),this.hls.recoverMediaError();break;case Hls.ErrorTypes.NETWORK_ERROR:console.error("fatal network error encountered",t);break;default:this.hls.destroy()}})),c.A.log(this.hls);else{if(!this.audio.canPlayType("application/vnd.apple.mpegurl"))throw new tt("audioFormatNotSupported");this.audio.src=d}if("youtube"===this.site.host&&k.videoSeek(this.video,10),this.volumeOnStart=this.getVideoVolume(),"number"==typeof this.data.defaultVolume&&(this.audio.volume=this.data.defaultVolume/100),"number"==typeof this.data.autoSetVolumeYandexStyle&&this.data.autoSetVolumeYandexStyle&&this.setVideoVolume(this.data.autoVolume),this.video.src||this.video.currentSrc||this.video.srcObject){this.video&&!this.video.paused&&this.lipSync("play");for(const t of Xt)this.video.addEventListener(t,this.handleVideoEventBound);this.afterUpdateTranslation(d)}else this.stopTranslation()}));if(["udemy","coursera"].includes(this.site.host)&&!i)throw new tt("VOTTranslationHelpNull");const r=this.videoTranslations.find((e=>e.videoId===t&&e.expires>Date.now()/1e3&&e.from===o&&e.to===n));if(r)return this.updateTranslation(r.url),void c.A.log("[translateFunc] A cached translate was received");const s=this.subtitlesList.some((t=>"yandex"===t.source))?2e4:3e4;ee(a,this.videoData.duration,o,n,i,(async(a,r)=>{if(c.A.log("[exec callback] translateVideo callback"),V(this.site.host,this.video)===t){if(!a)return await this.updateTranslationErrorMsg(r),r.includes(R.get("translationTake"))&&(clearTimeout(this.autoRetry),this.autoRetry=setTimeout((()=>this.translateFunc(t,e,o,n,i)),s)),void console.error("[VOT]",r);this.updateTranslation(r),this.subtitlesList.some((t=>"yandex"===t.source&&t.language===this.videoData.responseLanguage))||(this.subtitlesList=await Vt(this.site,this.videoData.videoId,this.videoData.detectedLanguage),await this.updateSubtitlesLangSelect()),this.videoTranslations.push({videoId:t,from:o,to:n,url:r,expires:Date.now()/1e3+this.videoTranslationTTL})}}))}stopTranslation(){this.stopTranslate(),this.syncVideoVolumeSlider()}async handleSrcChanged(){c.A.log("[VideoHandler] src changed",this),this.firstPlay=!0,this.videoData=await this.getVideoData(),this.setSelectMenuValues(this.videoData.detectedLanguage,this.videoData.responseLanguage);const t=!this.video.src&&!this.video.currentSrc&&!this.video.srcObject;this.votButton.container.hidden=t,t&&(this.votMenu.container.hidden=t),this.site.selector||(this.container=this.video.parentElement),this.container.contains(this.votButton.container)||(this.container.appendChild(this.votButton.container),this.container.appendChild(this.votMenu.container)),await this.updateSubtitles(),await this.changeSubtitlesLang("disabled"),this.translateToLang=this.data.responseLanguage??"ru"}async release(){c.A.log("[VideoHandler] release"),this.initialized=!1,this.releaseExtraEvents(),this.subtitlesWidget.release(),this.votButton.container.remove(),this.votMenu.container.remove()}}const ne=new class{constructor(){this.videoCache=new Set,this.onVideoAdded=new Yt,this.onVideoRemoved=new Yt,this.observer=new MutationObserver((t=>{window.requestIdleCallback((()=>{for(let e=0;e{for(let e=0;e=3}(t)?requestAnimationFrame(o):e(t)}()}(t,(t=>{this.handleVideoAdded(t)}))}handleVideoAdded=t=>{this.onVideoAdded.dispatch(t)};handleVideoRemoved=t=>{document.contains(t)||(this.videoCache.delete(t),this.onVideoRemoved.dispatch(t))}},ie=new WeakMap;function ae(t,e){if(t.shadowRoot){let o=t.selector?Array.from(document.querySelectorAll(t.selector)).find((t=>t.shadowRoot.contains(e))):e.parentElement;return o&&o.shadowRoot?o.parentElement:o}{const o=Jt.browser.version.split(".")[0];if(t.selector?.includes(":not")&&t.selector?.includes("*")&&o&&("Chrome"===Jt.browser.name&&Number(o)<88||"Firefox"===Jt.browser.name&&Number(o)<84)){const o=t.selector.split(" *")[0];return o?Array.from(document.querySelectorAll(o)).find((t=>t.contains(e))):e.parentElement}return t.selector?Array.from(document.querySelectorAll(t.selector)).find((t=>t.contains(e))):e.parentElement}}(async function(){if(c.A.log("Loading extension..."),await R.update(),c.A.log(`Selected menu language: ${R.lang}`),GM_info?.scriptHandler&&l.includes(GM_info.scriptHandler))return console.error(`[VOT] ${R.getDefault("unSupportedExtensionError").replace("{0}",GM_info.scriptHandler)}`),alert(`[VOT] ${R.get("unSupportedExtensionError").replace("{0}",GM_info.scriptHandler)}`);c.A.log("Extension compatibility passed..."),ne.onVideoAdded.addListener((t=>{for(const e of function(){const t=window.location.hostname,e=new URL(window.location),o=o=>o instanceof RegExp?o.test(t):"string"==typeof o?t.includes(o):"function"==typeof o&&o(e);return Gt.filter((t=>(Array.isArray(t.match)?t.match.some(o):o(t.match))&&t.host&&t.url))}()){if(!e)continue;let o=ae(e,t);if(o&&(("rumble"!==e.host||t.style.display)&&(["peertube","directlink"].includes(e.host)&&(e.url=window.location.origin),!ie.has(t)))){ie.set(t,new oe(t,o,e));break}}})),ne.onVideoRemoved.addListener((async t=>{ie.has(t)&&(await ie.get(t).release(),ie.delete(t))})),ne.enable()})().catch((t=>{console.error("[VOT]",t)}))})()})(); \ No newline at end of file diff --git a/dist/vot.user.js b/dist/vot.user.js index dd28e9de..311767eb 100644 --- a/dist/vot.user.js +++ b/dist/vot.user.js @@ -2736,9 +2736,13 @@ const yandexProtobuf = { var es5 = __webpack_require__("./node_modules/bowser/es5.js"); ;// CONCATENATED MODULE: ./src/getUUID.js function getUUID() { - return "xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e, n) => { - return (e === "x" ? (16 * Math.random()) | 0 : (3 & n) | 8).toString(16); - }); + const hexDigits = "0123456789ABCDEF"; + let uuid = ""; + for (let i = 0; i < 32; i++) { + const randomDigit = Math.floor(Math.random() * 16); + uuid += hexDigits[randomDigit]; + } + return uuid; } diff --git a/src/getUUID.js b/src/getUUID.js index 9390fe34..ec71ba78 100644 --- a/src/getUUID.js +++ b/src/getUUID.js @@ -1,7 +1,11 @@ function getUUID() { - return "xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e, n) => { - return (e === "x" ? (16 * Math.random()) | 0 : (3 & n) | 8).toString(16); - }); + const hexDigits = "0123456789ABCDEF"; + let uuid = ""; + for (let i = 0; i < 32; i++) { + const randomDigit = Math.floor(Math.random() * 16); + uuid += hexDigits[randomDigit]; + } + return uuid; } export { getUUID };