@oxymoron.13/tizentube-s95b 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/S95B-CHANGES.txt +6 -4
- package/dist/service.js +3 -0
- package/dist/userScript.js +1 -1
- package/mods/features/s95bI18n.js +4 -4
- package/mods/features/s95bMenu.js +15 -20
- package/mods/features/s95bOptions.js +30 -0
- package/mods/features/s95bPlayback.js +29 -0
- package/mods/resolveCommand.js +5 -0
- package/package.json +1 -1
- package/service/service.js +3 -0
package/dist/userScript.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
!function(){"use strict";function e(e){if(!e)return e;try{"string"==typeof e&&e.startsWith("//")&&(e=e.replace("//","https://"));var t=new URL(e,window.location.origin),n=t.hostname;if("youtube.com"===n||"www.youtube.com"===n)return t.protocol="http:",t.host="localhost:8099",t.toString();if(n.endsWith("googlevideo.com")||n.endsWith("youtube.com")||n.endsWith("gstatic.com")||n.endsWith(".google.com")||n.endsWith(".googleapis.com")||n.endsWith("googleusercontent.com")||n.endsWith(".ggpht.com"))return"http://localhost:8099/cors-bypass/"+t.toString()}catch(e){console.error("Failed to parse URL during interception:",e)}return e}var t,n=[{architecture:"Linux arm64-v8a",os:"Android 10",rasterizer:"gles",manufacturer:"Sony",deviceType:"ATV",chipsetModel:"sdm845",modelYear:13140765,firmwareVersion:"52.1.C.0.268",brand:"KDDI",model:"SOV38"},{architecture:"Linux armeabi-v7a",os:"Android 14",rasterizer:"gles",manufacturer:"Google",deviceType:"ATV",chipsetModel:"sabrina",modelYear:2020,firmwareVersion:"UTTC.250917.004",brand:"google",model:"Chromecast"},{architecture:"Linux armeabi-v7a",os:"Android 12",rasterizer:"gles",manufacturer:"TCL",deviceType:"ATV",chipsetModel:"merak",modelYear:2023,firmwareVersion:"STT2.221228.001",brand:"TCL",model:"Smart TV Pro"},{architecture:"Linux armeabi-v7a",os:"Android 7.1.2",rasterizer:"gles",manufacturer:"Amazon",deviceType:"ATV",chipsetModel:"mt8695",modelYear:0,firmwareVersion:"NS6294",brand:"Amazon",model:"AFTMM"}];if(document.querySelector(".content-container")&&window.h5vcc&&window.h5vcc.tizentube&&window.h5vcc.tizentube.SetUserAgent){var i=localStorage.getItem("userAgent");i&&(window.h5vcc.tizentube.SetUserAgent(i),location.reload());var r=n[Math.floor(Math.random()*n.length)],o=`Mozilla/5.0 (${(t=r).architecture}; ${t.os}) Cobalt/25.lts.30.1034958-gold (unlike Gecko) v8/8.8.278.17-jit ${t.rasterizer} Starboard/15, ${t.manufacturer}_${t.deviceType}_${t.chipsetModel}_${t.modelYear}/${t.firmwareVersion} (${t.brand}, ${t.model}) com.google.android.youtube.tv/5.30.301`;localStorage.setItem("userAgent",o),window.h5vcc.tizentube.SetUserAgent(o),location.reload()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function s(e){if(Array.isArray(e))return e}function l(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function u(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(i,r)}function c(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(e){u(o,i,r,a,s,"next",e)}function s(e){u(o,i,r,a,s,"throw",e)}a(void 0)})}}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function d(e,t){return e.get(l(e,t))}function p(e,t,n){h(e,t),t.set(e,n)}function m(e,t,n){return e.set(l(e,t),n),n}function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=C(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function g(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function S(){
|
|
2
2
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
3
|
-
var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var l=i&&i.prototype instanceof s?i:s,u=Object.create(l.prototype);return x(u,"_invoke",function(n,i,r){var o,s,l,u=0,c=r||[],h=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,d.n=n,a}};function p(n,i){for(s=n,l=i,t=0;!h&&u&&!r&&t<c.length;t++){var r,o=c[t],p=d.p,m=o[2];n>3?(r=m===i)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((r=n<2&&p<o[1])?(s=0,d.v=i,d.n=o[1]):p<m&&(r=n<3||o[0]>i||i>m)&&(o[4]=n,o[5]=i,d.n=m,s=0))}if(r||n>1)return a;throw h=!0,i}return function(r,c,m){if(u>1)throw TypeError("Generator is already running");for(h&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!h;){o||(s?s<3?(s>1&&(d.n=-1),p(s,l)):d.n=l:d.v=l);try{if(u=2,o){if(s||(r="next"),t=o[r]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),s=1);o=e}else if((t=(h=d.n<0)?l:n.call(i,d))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:h}}}(n,r,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][i]?t(t([][i]())):(x(t={},i,function(){return this}),t),h=u.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,x(e,r,"GeneratorFunction")),e.prototype=Object.create(h),e}return l.prototype=u,x(h,"constructor",u),x(u,"constructor",l),l.displayName="GeneratorFunction",x(u,r,"GeneratorFunction"),x(h),x(h,r,"Generator"),x(h,i,function(){return this}),x(h,"toString",function(){return"[object Generator]"}),(S=function(){return{w:o,m:d}})()}function x(e,t,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}x=function(e,t,n,i){if(t)r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n;else{function o(t,n){x(e,t,function(e){return this._invoke(t,n,e)})}o("next",0),o("throw",1),o("return",2)}},x(e,t,n,i)}function E(e,t){return s(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){u=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(e,t)||C(e,t)||v()}function w(e){return s(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(e)||v()}function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function C(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}var k="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},A="URLSearchParams"in k,T="Symbol"in k&&"iterator"in Symbol,F="FileReader"in k&&"Blob"in k&&function(){try{return new Blob,!0}catch(e){return!1}}(),P="FormData"in k,B="ArrayBuffer"in k;if(B)var I=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],O=ArrayBuffer.isView||function(e){return e&&I.indexOf(Object.prototype.toString.call(e))>-1};function N(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function R(e){return"string"!=typeof e&&(e=String(e)),e}function L(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return T&&(t[Symbol.iterator]=function(){return t}),t}function M(e){this.map={},e instanceof M?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function _(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function U(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function z(e){var t=new FileReader,n=U(t);return t.readAsArrayBuffer(e),n}function V(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function H(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:F&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:P&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:A&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():B&&F&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=V(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):B&&(ArrayBuffer.prototype.isPrototypeOf(e)||O(e))?this._bodyArrayBuffer=V(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):A&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},F&&(this.blob=function(){var e=_(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=_(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(F)return this.blob().then(z);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,i,r,o=_(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=U(t),i=/charset=([A-Za-z0-9_-]+)/.exec(e.type),r=i?i[1]:"utf-8",t.readAsText(e,r),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),i=0;i<t.length;i++)n[i]=String.fromCharCode(t[i]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},P&&(this.formData=function(){return this.text().then(K)}),this.json=function(){return this.text().then(JSON.parse)},this}M.prototype.append=function(e,t){e=N(e),t=R(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},M.prototype.delete=function(e){delete this.map[N(e)]},M.prototype.get=function(e){return e=N(e),this.has(e)?this.map[e]:null},M.prototype.has=function(e){return this.map.hasOwnProperty(N(e))},M.prototype.set=function(e,t){this.map[N(e)]=R(t)},M.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},M.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),L(e)},M.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),L(e)},M.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),L(e)},T&&(M.prototype[Symbol.iterator]=M.prototype.entries);var j=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function W(e,t){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,i,r=(t=t||{}).body;if(e instanceof W){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new M(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new M(t.headers)),this.method=(n=t.method||this.method||"GET",i=n.toUpperCase(),j.indexOf(i)>-1?i:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in k)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function K(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}}),t}function J(e,t){if(!(this instanceof J))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new M(t.headers),this.url=t.url||"",this._initBody(e)}W.prototype.clone=function(){return new W(this,{body:this._bodyInit})},H.call(W.prototype),H.call(J.prototype),J.prototype.clone=function(){return new J(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new M(this.headers),url:this.url})},J.error=function(){var e=new J(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var G=[301,302,303,307,308];J.redirect=function(e,t){if(-1===G.indexOf(t))throw new RangeError("Invalid status code");return new J(null,{status:t,headers:{location:e}})};var X=k.DOMException;try{new X}catch(e){(X=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),X.prototype.constructor=X}function q(e,t){return new Promise(function(n,i){var r=new W(e,t);if(r.signal&&r.signal.aborted)return i(new X("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}if(o.onload=function(){var e,t,i={statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new M,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(":"),i=n.shift().trim();if(i){var r=n.join(":").trim();try{t.append(i,r)}catch(e){console.warn("Response "+e.message)}}}),t)};0===r.url.indexOf("file://")&&(o.status<200||o.status>599)?i.status=200:i.status=o.status,i.url="responseURL"in o?o.responseURL:i.headers.get("X-Request-URL");var a="response"in o?o.response:o.responseText;setTimeout(function(){n(new J(a,i))},0)},o.onerror=function(){setTimeout(function(){i(new TypeError("Network request failed"))},0)},o.ontimeout=function(){setTimeout(function(){i(new TypeError("Network request timed out"))},0)},o.onabort=function(){setTimeout(function(){i(new X("Aborted","AbortError"))},0)},o.open(r.method,function(e){try{return""===e&&k.location.href?k.location.href:e}catch(t){return e}}(r.url),!0),"include"===r.credentials?o.withCredentials=!0:"omit"===r.credentials&&(o.withCredentials=!1),"responseType"in o&&(F?o.responseType="blob":B&&(o.responseType="arraybuffer")),t&&"object"===D(t.headers)&&!(t.headers instanceof M||k.Headers&&t.headers instanceof k.Headers)){var s=[];Object.getOwnPropertyNames(t.headers).forEach(function(e){s.push(N(e)),o.setRequestHeader(e,R(t.headers[e]))}),r.headers.forEach(function(e,t){-1===s.indexOf(t)&&o.setRequestHeader(t,e)})}else r.headers.forEach(function(e,t){o.setRequestHeader(t,e)});r.signal&&(r.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&r.signal.removeEventListener("abort",a)}),o.send(void 0===r._bodyInit?null:r._bodyInit)})}q.polyfill=!0,k.fetch||(k.fetch=q,k.Headers=M,k.Request=W,k.Response=J);var Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function $(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Q,Z,ee={};function te(){if(Z)return Q;Z=1;var e=function(e){return e&&e.Math===Math&&e};return Q=e("object"==("undefined"==typeof globalThis?"undefined":D(globalThis))&&globalThis)||e("object"==("undefined"==typeof window?"undefined":D(window))&&window)||e("object"==("undefined"==typeof self?"undefined":D(self))&&self)||e("object"==D(Y)&&Y)||e("object"==D(Q)&&Q)||function(){return this}()||Function("return this")()}var ne,ie,re,oe,ae,se,le,ue,ce={};function he(){return ie?ne:(ie=1,ne=function(e){try{return!!e()}catch(e){return!0}})}function de(){if(oe)return re;oe=1;var e=he();return re=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function pe(){if(se)return ae;se=1;var e=he();return ae=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function me(){if(ue)return le;ue=1;var e=pe(),t=Function.prototype.call;return le=e?t.bind(t):function(){return t.apply(t,arguments)},le}var fe,ge,ve,ye,be,Se,xe,Ee,we,De,Ce,ke,Ae,Te,Fe,Pe,Be,Ie,Oe,Ne,Re,Le,Me,_e,Ue,ze,Ve,He,je,We,Ke,Je,Ge,Xe,qe,Ye,$e,Qe,Ze,et,tt,nt={};function it(){return ve?ge:(ve=1,ge=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function rt(){if(be)return ye;be=1;var e=pe(),t=Function.prototype,n=t.call,i=e&&t.bind.bind(n,n);return ye=e?i:function(e){return function(){return n.apply(e,arguments)}},ye}function ot(){if(we)return Ee;we=1;var e=rt(),t=he(),n=function(){if(xe)return Se;xe=1;var e=rt(),t=e({}.toString),n=e("".slice);return Se=function(e){return n(t(e),8,-1)}}(),i=Object,r=e("".split);return Ee=t(function(){return!i("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?r(e,""):i(e)}:i}function at(){return Ce?De:(Ce=1,De=function(e){return null==e})}function st(){if(Ae)return ke;Ae=1;var e=at(),t=TypeError;return ke=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function lt(){if(Fe)return Te;Fe=1;var e=ot(),t=st();return Te=function(n){return e(t(n))}}function ut(){if(Be)return Pe;Be=1;var e="object"==("undefined"==typeof document?"undefined":D(document))&&document.all;return Pe=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function ct(){if(Oe)return Ie;Oe=1;var e=ut();return Ie=function(t){return"object"==D(t)?null!==t:e(t)}}function ht(){if(Re)return Ne;Re=1;var e=te(),t=ut();return Ne=function(n,i){return arguments.length<2?(r=e[n],t(r)?r:void 0):e[n]&&e[n][i];var r},Ne}function dt(){if(Ve)return ze;Ve=1;var e,t,n=te(),i=function(){if(Ue)return _e;Ue=1;var e=te().navigator,t=e&&e.userAgent;return _e=t?String(t):""}(),r=n.process,o=n.Deno,a=r&&r.versions||o&&o.version,s=a&&a.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&i&&(!(e=i.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=i.match(/Chrome\/(\d+)/))&&(t=+e[1]),ze=t}function pt(){if(je)return He;je=1;var e=dt(),t=he(),n=te().String;return He=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41})}function mt(){if(Ke)return We;Ke=1;var e=pt();return We=e&&!Symbol.sham&&"symbol"==D(Symbol.iterator)}function ft(){if(Ge)return Je;Ge=1;var e=ht(),t=ut(),n=function(){if(Me)return Le;Me=1;var e=rt();return Le=e({}.isPrototypeOf)}(),i=mt(),r=Object;return Je=i?function(e){return"symbol"==D(e)}:function(i){var o=e("Symbol");return t(o)&&n(o.prototype,r(i))}}function gt(){if(qe)return Xe;qe=1;var e=String;return Xe=function(t){try{return e(t)}catch(e){return"Object"}}}function vt(){if($e)return Ye;$e=1;var e=ut(),t=gt(),n=TypeError;return Ye=function(i){if(e(i))return i;throw new n(t(i)+" is not a function")}}function yt(){if(Ze)return Qe;Ze=1;var e=vt(),t=at();return Qe=function(n,i){var r=n[i];return t(r)?void 0:e(r)}}function bt(){if(tt)return et;tt=1;var e=me(),t=ut(),n=ct(),i=TypeError;return et=function(r,o){var a,s;if("string"===o&&t(a=r.toString)&&!n(s=e(a,r)))return s;if(t(a=r.valueOf)&&!n(s=e(a,r)))return s;if("string"!==o&&t(a=r.toString)&&!n(s=e(a,r)))return s;throw new i("Can't convert object to primitive value")}}var St,xt,Et,wt,Dt,Ct,kt,At,Tt,Ft,Pt,Bt,It,Ot,Nt,Rt,Lt,Mt,_t,Ut,zt,Vt,Ht,jt,Wt={exports:{}};function Kt(){if(wt)return Et;wt=1;var e=te(),t=Object.defineProperty;return Et=function(n,i){try{t(e,n,{value:i,configurable:!0,writable:!0})}catch(t){e[n]=i}return i},Et}function Jt(){if(Dt)return Wt.exports;Dt=1;var e=xt?St:(xt=1,St=!1),t=te(),n=Kt(),i="__core-js_shared__",r=Wt.exports=t[i]||n(i,{});return(r.versions||(r.versions=[])).push({version:"3.46.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Wt.exports}function Gt(){if(kt)return Ct;kt=1;var e=Jt();return Ct=function(t,n){return e[t]||(e[t]=n||{})},Ct}function Xt(){if(Tt)return At;Tt=1;var e=st(),t=Object;return At=function(n){return t(e(n))}}function qt(){if(Pt)return Ft;Pt=1;var e=rt(),t=Xt(),n=e({}.hasOwnProperty);return Ft=Object.hasOwn||function(e,i){return n(t(e),i)},Ft}function Yt(){if(It)return Bt;It=1;var e=rt(),t=0,n=Math.random(),i=e(1.1.toString);return Bt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++t+n,36)},Bt}function $t(){if(Nt)return Ot;Nt=1;var e=te(),t=Gt(),n=qt(),i=Yt(),r=pt(),o=mt(),a=e.Symbol,s=t("wks"),l=o?a.for||a:a&&a.withoutSetter||i;return Ot=function(e){return n(s,e)||(s[e]=r&&n(a,e)?a[e]:l("Symbol."+e)),s[e]}}function Qt(){if(Lt)return Rt;Lt=1;var e=me(),t=ct(),n=ft(),i=yt(),r=bt(),o=$t(),a=TypeError,s=o("toPrimitive");return Rt=function(o,l){if(!t(o)||n(o))return o;var u,c=i(o,s);if(c){if(void 0===l&&(l="default"),u=e(c,o,l),!t(u)||n(u))return u;throw new a("Can't convert object to primitive value")}return void 0===l&&(l="number"),r(o,l)}}function Zt(){if(_t)return Mt;_t=1;var e=Qt(),t=ft();return Mt=function(n){var i=e(n,"string");return t(i)?i:i+""},Mt}function en(){if(Ht)return Vt;Ht=1;var e=de(),t=he(),n=function(){if(zt)return Ut;zt=1;var e=te(),t=ct(),n=e.document,i=t(n)&&t(n.createElement);return Ut=function(e){return i?n.createElement(e):{}}}();return Vt=!e&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function tn(){if(jt)return ce;jt=1;var e=de(),t=me(),n=function(){if(fe)return nt;fe=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return nt.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,nt}(),i=it(),r=lt(),o=Zt(),a=qt(),s=en(),l=Object.getOwnPropertyDescriptor;return ce.f=e?l:function(e,u){if(e=r(e),u=o(u),s)try{return l(e,u)}catch(e){}if(a(e,u))return i(!t(n.f,e,u),e[u])},ce}var nn,rn,on,an,sn,ln,un,cn={};function hn(){if(an)return on;an=1;var e=ct(),t=String,n=TypeError;return on=function(i){if(e(i))return i;throw new n(t(i)+" is not an object")}}function dn(){if(sn)return cn;sn=1;var e=de(),t=en(),n=function(){if(rn)return nn;rn=1;var e=de(),t=he();return nn=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}(),i=hn(),r=Zt(),o=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l="enumerable",u="configurable",c="writable";return cn.f=e?n?function(e,t,n){if(i(e),t=r(t),i(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var o=s(e,t);o&&o[c]&&(e[t]=n.value,n={configurable:u in n?n[u]:o[u],enumerable:l in n?n[l]:o[l],writable:!1})}return a(e,t,n)}:a:function(e,n,s){if(i(e),n=r(n),i(s),t)try{return a(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new o("Accessors not supported");return"value"in s&&(e[n]=s.value),e},cn}function pn(){if(un)return ln;un=1;var e=de(),t=dn(),n=it();return ln=e?function(e,i,r){return t.f(e,i,n(1,r))}:function(e,t,n){return e[t]=n,e},ln}var mn,fn,gn,vn,yn,bn,Sn,xn,En,wn,Dn,Cn,kn,An,Tn,Fn={exports:{}};function Pn(){if(vn)return gn;vn=1;var e=rt(),t=ut(),n=Jt(),i=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return i(e)}),gn=n.inspectSource}function Bn(){if(xn)return Sn;xn=1;var e=Gt(),t=Yt(),n=e("keys");return Sn=function(e){return n[e]||(n[e]=t(e))},Sn}function In(){return wn?En:(wn=1,En={})}function On(){if(Cn)return Dn;Cn=1;var e,t,n,i=function(){if(bn)return yn;bn=1;var e=te(),t=ut(),n=e.WeakMap;return yn=t(n)&&/native code/.test(String(n))}(),r=te(),o=ct(),a=pn(),s=qt(),l=Jt(),u=Bn(),c=In(),h="Object already initialized",d=r.TypeError,p=r.WeakMap;if(i||l.state){var m=l.state||(l.state=new p);m.get=m.get,m.has=m.has,m.set=m.set,e=function(e,t){if(m.has(e))throw new d(h);return t.facade=e,m.set(e,t),t},t=function(e){return m.get(e)||{}},n=function(e){return m.has(e)}}else{var f=u("state");c[f]=!0,e=function(e,t){if(s(e,f))throw new d(h);return t.facade=e,a(e,f,t),t},t=function(e){return s(e,f)?e[f]:{}},n=function(e){return s(e,f)}}return Dn={set:e,get:t,has:n,enforce:function(i){return n(i)?t(i):e(i,{})},getterFor:function(e){return function(n){var i;if(!o(n)||(i=t(n)).type!==e)throw new d("Incompatible receiver, "+e+" required");return i}}},Dn}function Nn(){if(kn)return Fn.exports;kn=1;var e=rt(),t=he(),n=ut(),i=qt(),r=de(),o=function(){if(fn)return mn;fn=1;var e=de(),t=qt(),n=Function.prototype,i=e&&Object.getOwnPropertyDescriptor,r=t(n,"name"),o=r&&"something"===function(){}.name,a=r&&(!e||e&&i(n,"name").configurable);return mn={EXISTS:r,PROPER:o,CONFIGURABLE:a}}().CONFIGURABLE,a=Pn(),s=On(),l=s.enforce,u=s.get,c=String,h=Object.defineProperty,d=e("".slice),p=e("".replace),m=e([].join),f=r&&!t(function(){return 8!==h(function(){},"length",{value:8}).length}),g=String(String).split("String"),v=Fn.exports=function(e,t,n){"Symbol("===d(c(t),0,7)&&(t="["+p(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!i(e,"name")||o&&e.name!==t)&&(r?h(e,"name",{value:t,configurable:!0}):e.name=t),f&&n&&i(n,"arity")&&e.length!==n.arity&&h(e,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?r&&h(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var a=l(e);return i(a,"source")||(a.source=m(g,"string"==typeof t?t:"")),e};return Function.prototype.toString=v(function(){return n(this)&&u(this).source||a(this)},"toString"),Fn.exports}function Rn(){if(Tn)return An;Tn=1;var e=ut(),t=dn(),n=Nn(),i=Kt();return An=function(r,o,a,s){s||(s={});var l=s.enumerable,u=void 0!==s.name?s.name:o;if(e(a)&&n(a,u,s),s.global)l?r[o]=a:i(o,a);else{try{s.unsafe?r[o]&&(l=!0):delete r[o]}catch(e){}l?r[o]=a:t.f(r,o,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return r},An}var Ln,Mn,_n,Un,zn,Vn,Hn,jn,Wn,Kn,Jn,Gn,Xn,qn,Yn,$n,Qn,Zn={};function ei(){if(Un)return _n;Un=1;var e=function(){if(Mn)return Ln;Mn=1;var e=Math.ceil,t=Math.floor;return Ln=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)}}();return _n=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function ti(){if(Vn)return zn;Vn=1;var e=ei(),t=Math.max,n=Math.min;return zn=function(i,r){var o=e(i);return o<0?t(o+r,0):n(o,r)}}function ni(){if(jn)return Hn;jn=1;var e=ei(),t=Math.min;return Hn=function(n){var i=e(n);return i>0?t(i,9007199254740991):0}}function ii(){if(Kn)return Wn;Kn=1;var e=ni();return Wn=function(t){return e(t.length)}}function ri(){if(qn)return Xn;qn=1;var e=rt(),t=qt(),n=lt(),i=function(){if(Gn)return Jn;Gn=1;var e=lt(),t=ti(),n=ii(),i=function(i){return function(r,o,a){var s=e(r),l=n(s);if(0===l)return!i&&-1;var u,c=t(a,l);if(i&&o!=o){for(;l>c;)if((u=s[c++])!=u)return!0}else for(;l>c;c++)if((i||c in s)&&s[c]===o)return i||c||0;return!i&&-1}};return Jn={includes:i(!0),indexOf:i(!1)}}().indexOf,r=In(),o=e([].push);return Xn=function(e,a){var s,l=n(e),u=0,c=[];for(s in l)!t(r,s)&&t(l,s)&&o(c,s);for(;a.length>u;)t(l,s=a[u++])&&(~i(c,s)||o(c,s));return c},Xn}var oi,ai,si,li,ui,ci,hi,di,pi,mi,fi,gi,vi,yi={};function bi(){if(si)return ai;si=1;var e=ht(),t=rt(),n=function(){if(Qn)return Zn;Qn=1;var e=ri(),t=($n?Yn:($n=1,Yn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])).concat("length","prototype");return Zn.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Zn}(),i=(oi||(oi=1,yi.f=Object.getOwnPropertySymbols),yi),r=hn(),o=t([].concat);return ai=e("Reflect","ownKeys")||function(e){var t=n.f(r(e)),a=i.f;return a?o(t,a(e)):t},ai}function Si(){if(ui)return li;ui=1;var e=qt(),t=bi(),n=tn(),i=dn();return li=function(r,o,a){for(var s=t(o),l=i.f,u=n.f,c=0;c<s.length;c++){var h=s[c];e(r,h)||a&&e(a,h)||l(r,h,u(o,h))}},li}function xi(){if(pi)return di;pi=1;var e=te(),t=tn().f,n=pn(),i=Rn(),r=Kt(),o=Si(),a=function(){if(hi)return ci;hi=1;var e=he(),t=ut(),n=/#|\.prototype\./,i=function(n,i){var l=o[r(n)];return l===s||l!==a&&(t(i)?e(i):!!i)},r=i.normalize=function(e){return String(e).replace(n,".").toLowerCase()},o=i.data={},a=i.NATIVE="N",s=i.POLYFILL="P";return ci=i}();return di=function(s,l){var u,c,h,d,p,m=s.target,f=s.global,g=s.stat;if(u=f?e:g?e[m]||r(m,{}):e[m]&&e[m].prototype)for(c in l){if(d=l[c],h=s.dontCallGetSet?(p=t(u,c))&&p.value:u[c],!a(f?c:m+(g?".":"#")+c,s.forced)&&void 0!==h){if(D(d)==D(h))continue;o(d,h)}(s.sham||h&&h.sham)&&n(d,"sham",!0),i(u,c,d,s)}},di}function Ei(){if(fi)return mi;fi=1;var e=de(),t=dn(),n=it();return mi=function(i,r,o){e?t.f(i,r,n(0,o)):i[r]=o},mi}vi||(vi=1,function(){if(gi)return ee;gi=1;var e=xi(),t=de(),n=bi(),i=lt(),r=tn(),o=Ei();e({target:"Object",stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t,a,s=i(e),l=r.f,u=n(s),c={},h=0;u.length>h;)void 0!==(a=l(s,t=u[h++]))&&o(c,t,a);return c}})}());var wi=e=>"string"==typeof e,Di=()=>{var e,t,n=new Promise((n,i)=>{e=n,t=i});return n.resolve=e,n.reject=t,n},Ci=e=>null==e?"":""+e,ki=/###/g,Ai=e=>e&&e.indexOf("###")>-1?e.replace(ki,"."):e,Ti=e=>!e||wi(e),Fi=(e,t,n)=>{for(var i=wi(t)?t.split("."):t,r=0;r<i.length-1;){if(Ti(e))return{};var o=Ai(i[r]);!e[o]&&n&&(e[o]=new n),e=Object.prototype.hasOwnProperty.call(e,o)?e[o]:{},++r}return Ti(e)?{}:{obj:e,k:Ai(i[r])}},Pi=(e,t,n)=>{var i=Fi(e,t,Object),r=i.obj,o=i.k;if(void 0===r&&1!==t.length){for(var a=t[t.length-1],s=t.slice(0,t.length-1),l=Fi(e,s,Object);void 0===l.obj&&s.length;){var u;a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),null!==(u=l=Fi(e,s,Object))&&void 0!==u&&u.obj&&void 0!==l.obj[`${l.k}.${a}`]&&(l.obj=void 0)}l.obj[`${l.k}.${a}`]=n}else r[o]=n},Bi=(e,t)=>{var n=Fi(e,t),i=n.obj,r=n.k;if(i&&Object.prototype.hasOwnProperty.call(i,r))return i[r]},Ii=(e,t,n)=>{for(var i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?wi(e[i])||e[i]instanceof String||wi(t[i])||t[i]instanceof String?n&&(e[i]=t[i]):Ii(e[i],t[i],n):e[i]=t[i]);return e},Oi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Ni={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Ri=e=>wi(e)?e.replace(/[&<>"'\/]/g,e=>Ni[e]):e;var Li=[" ",",","?","!",";"],Mi=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){var t=this.regExpMap.get(e);if(void 0!==t)return t;var n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),_i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}for(var i=t.split(n),r=e,o=0;o<i.length;){if(!r||"object"!==D(r))return;for(var a=void 0,s="",l=o;l<i.length;++l)if(l!==o&&(s+=n),void 0!==(a=r[s+=i[l]])){if(["string","number","boolean"].indexOf(D(a))>-1&&l<i.length-1)continue;o+=l-o+1;break}r=a}return r}},Ui=e=>null==e?void 0:e.replace(/_/g,"-"),zi={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,i;null===(n=console)||void 0===n||null===(n=n[e])||void 0===n||null===(i=n.apply)||void 0===i||i.call(n,console,t)}};class Vi{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||zi,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(wi(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Vi(this.logger,b(b({},{prefix:`${this.prefix}:${e}:`}),this.options))}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Vi(this.logger,e)}}var Hi=new Vi;class ji{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);var n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{for(var t=E(e,2),i=t[0],r=t[1],o=0;o<r;o++)i(...n)});this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(t=>{for(var i=E(t,2),r=i[0],o=i[1],a=0;a<o;a++)r.apply(r,[e,...n])})}}class Wi extends ji{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){var i,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,s=void 0!==o.ignoreJSONStructure?o.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?r=e.split("."):(r=[e,t],n&&(Array.isArray(n)?r.push(...n):wi(n)&&a?r.push(...n.split(a)):r.push(n)));var l=Bi(this.data,r);return!l&&!t&&!n&&e.indexOf(".")>-1&&(e=r[0],t=r[1],n=r.slice(2).join(".")),!l&&s&&wi(n)?_i(null===(i=this.data)||void 0===i||null===(i=i[e])||void 0===i?void 0:i[t],n,a):l}addResource(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=t,t=(a=e.split("."))[1]),this.addNamespaces(t),Pi(this.data,a,i),r.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var r in n)(wi(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(i=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=Bi(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Ii(s,n,r):s=b(b({},s),n),Pi(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Ki={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,i,r){return e.forEach(e=>{var o,a;t=null!==(o=null===(a=this.processors[e])||void 0===a?void 0:a.process(t,n,i,r))&&void 0!==o?o:t}),t}},Ji=Symbol("i18next/PATH_KEY");function Gi(e,t){var n,i,r=e(function(){var e,t=[],n=Object.create(null);return n.get=(i,r)=>{var o,a;return null===(o=e)||void 0===o||null===(a=o.revoke)||void 0===a||a.call(o),r===Ji?t:(t.push(r),(e=Proxy.revocable(i,n)).proxy)},Proxy.revocable(Object.create(null),n).proxy}()),o=r[Ji],a=null!==(n=null==t?void 0:t.keySeparator)&&void 0!==n?n:".",s=null!==(i=null==t?void 0:t.nsSeparator)&&void 0!==i?i:":";if(o.length>1&&s){var l=null==t?void 0:t.ns;if((l?Array.isArray(l)?l:[l]:[]).includes(o[0]))return`${o[0]}${s}${o.slice(1).join(a)}`}return o.join(a)}var Xi={},qi=e=>!wi(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Yi extends ji{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Hi.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){var t=b({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});if(null==e)return!1;var n=this.resolve(e,t);if(void 0===(null==n?void 0:n.res))return!1;var i=qi(n.res);return!1!==t.returnObjects||!i}extractFromKey(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";var i=Li.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===i.length)return!0;var r=Mi.getRegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`),o=!r.test(e);if(!o){var a=e.indexOf(n);a>0&&!r.test(e.substring(0,a))&&(o=!0)}return o})(e,n,i));if(o&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:wi(r)?[r]:r};var l=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(l[0])>-1)&&(r=l.shift()),e=l.join(i)}return{key:e,namespaces:wi(r)?[r]:r}}translate(e,t,n){var i="object"===D(t)?b({},t):t;if("object"!==D(i)&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),"object"===D(i)&&(i=b({},i)),i||(i={}),null==e)return"";"function"==typeof e&&(e=Gi(e,b(b({},this.options),i))),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?Gi(e,b(b({},this.options),i)):String(e));var r=void 0!==i.returnDetails?i.returnDetails:this.options.returnDetails,o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],i),s=a.key,l=a.namespaces,u=l[l.length-1],c=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");var h=i.lng||this.language,d=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===(null==h?void 0:h.toLowerCase()))return d?r?{res:`${u}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${c}${s}`:r?{res:s,usedKey:s,exactUsedKey:s,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:s;var p=this.resolve(e,i),m=null==p?void 0:p.res,f=(null==p?void 0:p.usedKey)||s,g=(null==p?void 0:p.exactUsedKey)||s,v=void 0!==i.joinArrays?i.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,S=void 0!==i.count&&!wi(i.count),x=Yi.hasDefaultValue(i),E=S?this.pluralResolver.getSuffix(h,i.count,i):"",w=i.ordinal&&S?this.pluralResolver.getSuffix(h,i.count,{ordinal:!1}):"",C=S&&!i.ordinal&&0===i.count,k=C&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${E}`]||i[`defaultValue${w}`]||i.defaultValue,A=m;y&&!m&&x&&(A=k);var T=qi(A),F=Object.prototype.toString.apply(A);if(!(y&&A&&T&&["[object Number]","[object Function]","[object RegExp]"].indexOf(F)<0)||wi(v)&&Array.isArray(A))if(y&&wi(v)&&Array.isArray(m))(m=m.join(v))&&(m=this.extendTranslation(m,e,i,n));else{var P=!1,B=!1;!this.isValidLookup(m)&&x&&(P=!0,m=k),this.isValidLookup(m)||(B=!0,m=s);var I=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:m,O=x&&k!==m&&this.options.updateMissing;if(B||P||O){if(this.logger.log(O?"updateKey":"missingKey",h,u,s,O?k:m),o){var N=this.resolve(s,b(b({},i),{},{keySeparator:!1}));N&&N.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var R=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var M=0;M<L.length;M++)R.push(L[M]);else"all"===this.options.saveMissingTo?R=this.languageUtils.toResolveHierarchy(i.lng||this.language):R.push(i.lng||this.language);var _=(e,t,n)=>{var r,o=x&&n!==m?n:I;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,t,o,O,i):null!==(r=this.backendConnector)&&void 0!==r&&r.saveMissing&&this.backendConnector.saveMissing(e,u,t,o,O,i),this.emit("missingKey",e,u,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?R.forEach(e=>{var t=this.pluralResolver.getSuffixes(e,i);C&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{_([e],s+t,i[`defaultValue${t}`]||k)})}):_(R,s,k))}m=this.extendTranslation(m,e,i,p,n),B&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${u}${c}${s}`),(B||P)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${s}`:s,P?m:void 0,i))}else{if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var U=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,A,b(b({},i),{},{ns:l})):`key '${s} (${this.language})' returned an object instead of string.`;return r?(p.res=U,p.usedParams=this.getUsedParamsDetails(i),p):U}if(o){var z=Array.isArray(A),V=z?[]:{},H=z?g:f;for(var j in A)if(Object.prototype.hasOwnProperty.call(A,j)){var W=`${H}${o}${j}`;V[j]=x&&!m?this.translate(W,b(b({},i),{},{defaultValue:qi(k)?k[j]:void 0},{joinArrays:!1,ns:l})):this.translate(W,b(b({},i),{joinArrays:!1,ns:l})),V[j]===W&&(V[j]=A[j])}m=V}}return r?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,i,r){var o,a=this;if(null!==(o=this.i18nFormat)&&void 0!==o&&o.parse)e=this.i18nFormat.parse(e,b(b({},this.options.interpolation.defaultVariables),n),n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){var s;n.interpolation&&this.interpolator.init(b(b({},n),{interpolation:b(b({},this.options.interpolation),n.interpolation)}));var l,u=wi(e)&&(void 0!==(null==n||null===(s=n.interpolation)||void 0===s?void 0:s.skipOnVariables)?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(u){var c=e.match(this.interpolator.nestingRegexp);l=c&&c.length}var h=n.replace&&!wi(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(h=b(b({},this.options.interpolation.defaultVariables),h)),e=this.interpolator.interpolate(e,h,n.lng||this.language||i.usedLng,n),u){var d=e.match(this.interpolator.nestingRegexp);l<(d&&d.length)&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];return(null==r?void 0:r[0])!==i[0]||n.context?a.translate(...i,t):(a.logger.warn(`It seems you are nesting recursively key: ${i[0]} in key: ${t[0]}`),null)},n)),n.interpolation&&this.interpolator.reset()}var p=n.postProcess||this.options.postProcess,m=wi(p)?[p]:p;return null!=e&&null!=m&&m.length&&!1!==n.applyPostProcessor&&(e=Ki.handle(m,e,t,this.options&&this.options.postProcessPassResolved?b({i18nResolved:b(b({},i),{},{usedParams:this.getUsedParamsDetails(n)})},n):n,this)),e}resolve(e){var t,n,i,r,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return wi(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?Gi(e,b(b({},this.options),a)):e)),e.forEach(e=>{if(!this.isValidLookup(t)){var s=this.extractFromKey(e,a),l=s.key;n=l;var u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));var c=void 0!==a.count&&!wi(a.count),h=c&&!a.ordinal&&0===a.count,d=void 0!==a.context&&(wi(a.context)||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);u.forEach(e=>{var s,u;this.isValidLookup(t)||(o=e,Xi[`${p[0]}-${e}`]||null===(s=this.utils)||void 0===s||!s.hasLoadedNamespace||null!==(u=this.utils)&&void 0!==u&&u.hasLoadedNamespace(o)||(Xi[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(n=>{var o;if(!this.isValidLookup(t)){r=n;var s,u=[l];if(null!==(o=this.i18nFormat)&&void 0!==o&&o.addLookupKeys)this.i18nFormat.addLookupKeys(u,l,n,e,a);else{var p;c&&(p=this.pluralResolver.getSuffix(n,a.count,a));var m=`${this.options.pluralSeparator}zero`,f=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(a.ordinal&&0===p.indexOf(f)&&u.push(l+p.replace(f,this.options.pluralSeparator)),u.push(l+p),h&&u.push(l+m)),d){var g=`${l}${this.options.contextSeparator||"_"}${a.context}`;u.push(g),c&&(a.ordinal&&0===p.indexOf(f)&&u.push(g+p.replace(f,this.options.pluralSeparator)),u.push(g+p),h&&u.push(g+m))}}for(;s=u.pop();)this.isValidLookup(t)||(i=s,t=this.getResource(n,e,s,a))}}))})}}),{res:t,usedKey:n,exactUsedKey:i,usedLng:r,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){var i,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return null!==(i=this.i18nFormat)&&void 0!==i&&i.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&!wi(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n=b(b({},this.options.interpolation.defaultVariables),n)),!t){n=b({},n);var i,r=f(["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]);try{for(r.s();!(i=r.n()).done;){delete n[i.value]}}catch(e){r.e(e)}finally{r.f()}}return n}static hasDefaultValue(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class $i{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Hi.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Ui(e))||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Ui(e))||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(wi(e)&&e.indexOf("-")>-1){var t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){return e?(e.forEach(e=>{if(!t){var n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(!t){var n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;var i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>e===i?e:e.indexOf("-")<0&&i.indexOf("-")<0?void 0:e.indexOf("-")>0&&i.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===i||0===e.indexOf(i)&&i.length>1?e:void 0)}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null;var t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),wi(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){var n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),i=[],r=e=>{e&&(this.isSupportedCode(e)?i.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return wi(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):wi(e)&&r(this.formatLanguageCode(e)),n.forEach(e=>{i.indexOf(e)<0&&r(this.formatLanguageCode(e))}),i}}var Qi={zero:0,one:1,two:2,few:3,many:4,other:5},Zi={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class er{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Hi.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Ui("dev"===e?"en":e),r=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:i,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];try{t=new Intl.PluralRules(i,{type:r})}catch(i){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Zi;if(!e.match(/-|_/))return Zi;var a=this.languageUtils.getLanguagePartFromCode(e);t=this.getRule(a,n)}return this.pluralRulesCache[o]=t,t}needsPlural(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),(null===(t=i)||void 0===t?void 0:t.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Qi[e]-Qi[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}var tr=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=((e,t,n)=>{var i=Bi(e,n);return void 0!==i?i:Bi(t,n)})(e,t,n);return!o&&r&&wi(n)&&void 0===(o=_i(e,n,i))&&(o=_i(t,n,i)),o},nr=e=>e.replace(/\$/g,"$$$$");class ir{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Hi.create("interpolator"),this.options=t,this.format=(null==t||null===(e=t.interpolation)||void 0===e?void 0:e.format)||(e=>e),this.init(t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation,n=t.escape,i=t.escapeValue,r=t.useRawValueToEscape,o=t.prefix,a=t.prefixEscaped,s=t.suffix,l=t.suffixEscaped,u=t.formatSeparator,c=t.unescapeSuffix,h=t.unescapePrefix,d=t.nestingPrefix,p=t.nestingPrefixEscaped,m=t.nestingSuffix,f=t.nestingSuffixEscaped,g=t.nestingOptionsSeparator,v=t.maxReplaces,y=t.alwaysFormat;this.escape=void 0!==n?n:Ri,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Oi(o):a||"{{",this.suffix=s?Oi(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?Oi(d):p||Oi("$t("),this.nestingSuffix=m?Oi(m):f||Oi(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){var e=(e,t)=>(null==e?void 0:e.source)===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,i){var r,o,a,s,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){var r=tr(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,n,b(b(b({},i),t),{},{interpolationkey:e})):r}var o=e.split(this.formatSeparator),a=o.shift().trim(),s=o.join(this.formatSeparator).trim();return this.format(tr(t,l,a,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,b(b(b({},i),t),{},{interpolationkey:a}))};this.resetRegExp();var c=(null==i?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,h=void 0!==(null==i||null===(r=i.interpolation)||void 0===r?void 0:r.skipOnVariables)?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>nr(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?nr(this.escape(e)):nr(e)}].forEach(t=>{for(s=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(a=u(n)))if("function"==typeof c){var r=c(e,o,i);a=wi(r)?r:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n))a="";else{if(h){a=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=""}else wi(a)||this.useRawValueToEscape||(a=Ci(a));var l=t.safeValue(a);if(e=e.replace(o[0],l),h?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++s>=this.maxReplaces)break}}),e}nest(e,t){for(var n,i,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=(e,t)=>{var n,i,o=this.nestingOptionsSeparator;if(e.indexOf(o)<0)return e;var a=e.split(new RegExp(`${Oi(o)}[ ]*{`)),s=`{${a[1]}`;e=a[0];var l=(s=this.interpolate(s,r)).match(/'/g),u=s.match(/"/g);((null!==(n=null==l?void 0:l.length)&&void 0!==n?n:0)%2==0&&!u||(null!==(i=null==u?void 0:u.length)&&void 0!==i?i:0)%2!=0)&&(s=s.replace(/'/g,'"'));try{r=JSON.parse(s),t&&(r=b(b({},t),r))}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${o}${s}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,e};n=this.nestingRegexp.exec(e);){var s=[];(r=(r=b({},o)).replace&&!wi(r.replace)?r.replace:r).applyPostProcessor=!1,delete r.defaultValue;var l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(s=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),(i=t(a.call(this,n[1].trim(),r),r))&&n[0]===e&&!wi(i))return i;wi(i)||(i=Ci(i)),i||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),i=""),s.length&&(i=s.reduce((e,t)=>this.format(e,t,o.lng,b(b({},o),{},{interpolationkey:n[1].trim()})),i.trim())),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}var rr=e=>{var t={};return(n,i,r)=>{var o=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(o=b(b({},o),{},{[r.interpolationkey]:void 0}));var a=i+JSON.stringify(o),s=t[a];return s||(s=e(Ui(i),r),t[a]=s),s(n)}},or=e=>(t,n,i)=>e(Ui(n),i)(t);class ar{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Hi.create("formatter"),this.options=e,this.init(e)}init(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";var n=t.cacheInBuiltFormats?rr:or;this.formats={number:n((e,t)=>{var n=new Intl.NumberFormat(e,b({},t));return e=>n.format(e)}),currency:n((e,t)=>{var n=new Intl.NumberFormat(e,b(b({},t),{},{style:"currency"}));return e=>n.format(e)}),datetime:n((e,t)=>{var n=new Intl.DateTimeFormat(e,b({},t));return e=>n.format(e)}),relativetime:n((e,t)=>{var n=new Intl.RelativeTimeFormat(e,b({},t));return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{var n=new Intl.ListFormat(e,b({},t));return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=rr(t)}format(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(e=>e.indexOf(")")>-1)){var o=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,o)].join(this.formatSeparator)}var a=r.reduce((e,t)=>{var r=(e=>{var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var i=e.split("(");t=i[0].toLowerCase().trim();var r=i[1].substring(0,i[1].length-1);"currency"===t&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):"relativetime"===t&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(e=>{if(e){var t=w(e.split(":")),i=t[0],r=t.slice(1).join(":").trim().replace(/^'+|'+$/g,""),o=i.trim();n[o]||(n[o]=r),"false"===r&&(n[o]=!1),"true"===r&&(n[o]=!0),isNaN(r)||(n[o]=parseInt(r,10))}})}return{formatName:t,formatOptions:n}})(t),o=r.formatName,a=r.formatOptions;if(this.formats[o]){var s=e;try{var l,u=(null==i||null===(l=i.formatParams)||void 0===l?void 0:l[i.interpolationkey])||{},c=u.locale||u.lng||i.locale||i.lng||n;s=this.formats[o](e,c,b(b(b({},a),i),u))}catch(e){this.logger.warn(e)}return s}return this.logger.warn(`there was no format function for ${o}`),e},e);return a}}class sr extends ji{constructor(e,t,n){var i,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=o,this.logger=Hi.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],null===(i=this.backend)||void 0===i||null===(r=i.init)||void 0===r||r.call(i,n,o.backend,o)}queueLoad(e,t,n,i){var r={},o={},a={},s={};return e.forEach(e=>{var i=!0;t.forEach(t=>{var a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,i=!1,void 0===o[a]&&(o[a]=!0),void 0===r[a]&&(r[a]=!0),void 0===s[t]&&(s[t]=!0)))}),i||(a[e]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){var i=e.split("|"),r=i[0],o=i[1];t&&this.emit("failedLoading",r,o,t),!t&&n&&this.store.addResourceBundle(r,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);var a={};this.queue.forEach(n=>{var i,s,l,u,c;i=n.loaded,s=o,l=Fi(i,[r],Object),u=l.obj,c=l.k,u[c]=u[c]||[],u[c].push(s),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:r,callback:o});else{this.readingCalls++;var a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){var l=this.waitingReads.shift();this.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}a&&s&&i<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,i+1,2*r,o)},r):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{var l=s(e,t);l&&"function"==typeof l.then?l.then(e=>a(null,e)).catch(a):a(null,l)}catch(e){a(e)}}}prepareLoading(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();wi(e)&&(e=this.languageUtils.toResolveHierarchy(e)),wi(t)&&(t=[t]);var r=this.queueLoad(e,t,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,i,r){var o,a,s,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(null===(o=this.services)||void 0===o||null===(o=o.utils)||void 0===o||!o.hasLoadedNamespace||null!==(a=this.services)&&void 0!==a&&null!==(a=a.utils)&&void 0!==a&&a.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(null!==(s=this.backend)&&void 0!==s&&s.create){var c=b(b({},l),{},{isUpdate:r}),h=this.backend.create.bind(this.backend);if(h.length<6)try{var d;(d=5===h.length?h(e,t,n,i,c):h(e,t,n,i))&&"function"==typeof d.then?d.then(e=>u(null,e)).catch(u):u(null,d)}catch(e){u(e)}else h(e,t,n,i,u,c)}e&&e[0]&&this.store.addResource(e[0],t,n,i)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}var lr=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{var t={};if("object"===D(e[1])&&(t=e[1]),wi(e[1])&&(t.defaultValue=e[1]),wi(e[2])&&(t.tDescription=e[2]),"object"===D(e[2])||"object"===D(e[3])){var n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ur=e=>{var t,n;return wi(e.ns)&&(e.ns=[e.ns]),wi(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),wi(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),(null===(t=e.supportedLngs)||void 0===t||null===(n=t.indexOf)||void 0===n?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e},cr=()=>{},hr="__i18next_supportNoticeShown";class dr extends ji{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ur(t),this.services={},this.logger=Hi,this.modules={external:[]},e=this,Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),null==t.defaultNS&&t.ns&&(wi(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var i,r,o,a,s,l,u=lr();this.options=b(b(b({},u),this.options),ur(t)),this.options.interpolation=b(b({},u.interpolation),this.options.interpolation),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=u.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||((null==(i=this)||null===(r=i.modules)||void 0===r||null===(r=r.backend)||void 0===r||null===(r=r.name)||void 0===r?void 0:r.indexOf("Locize"))>0||(null==i||null===(o=i.modules)||void 0===o||null===(o=o.backend)||void 0===o||null===(o=o.constructor)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.indexOf("Locize"))>0||null!=i&&null!==(a=i.options)&&void 0!==a&&null!==(a=a.backend)&&void 0!==a&&a.backends&&i.options.backend.backends.some(e=>{var t,n;return(null==e||null===(t=e.name)||void 0===t?void 0:t.indexOf("Locize"))>0||(null==e||null===(n=e.constructor)||void 0===n||null===(n=n.name)||void 0===n?void 0:n.indexOf("Locize"))>0})||null!=i&&null!==(s=i.options)&&void 0!==s&&null!==(s=s.backend)&&void 0!==s&&s.projectId||null!=i&&null!==(l=i.options)&&void 0!==l&&null!==(l=l.backend)&&void 0!==l&&l.backendOptions&&i.options.backend.backendOptions.some(e=>null==e?void 0:e.projectId))||"undefined"!=typeof globalThis&&globalThis[hr]||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[hr]=!0));var c=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){var h;this.modules.logger?Hi.init(c(this.modules.logger),this.options):Hi.init(null,this.options),h=this.modules.formatter?this.modules.formatter:ar;var d=new $i(this.options);this.store=new Wi(this.options.resources,this.options);var p=this.services;p.logger=Hi,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new er(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==u.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!h||this.options.interpolation.format&&this.options.interpolation.format!==u.interpolation.format||(p.formatter=c(h),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new ir(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new sr(c(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit(t,...i)}),this.modules.languageDetector&&(p.languageDetector=c(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=c(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new Yi(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit(t,...i)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=cr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&"dev"!==m[0]&&(this.options.lng=m[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});var f=Di(),g=()=>{var e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),f.resolve(t),n(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),f}loadResources(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cr,n=wi(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){var i,r;if("cimode"===(null==n?void 0:n.toLowerCase())&&(!this.options.preload||0===this.options.preload.length))return t();var o=[],a=e=>{e&&("cimode"!==e&&this.services.languageUtils.toResolveHierarchy(e).forEach(e=>{"cimode"!==e&&o.indexOf(e)<0&&o.push(e)}))};if(n)a(n);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>a(e));null===(i=this.options.preload)||void 0===i||null===(r=i.forEach)||void 0===r||r.call(i,e=>a(e)),this.services.backendConnector.load(o,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){var i=Di();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=cr),this.services.backendConnector.reload(e,t,e=>{i.resolve(),n(e)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Ki.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;var i=Di();this.emit("languageChanging",e);var r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),t&&t(o,function(){return n.t(...arguments)})},a=t=>{e||t||!this.services.languageDetector||(t=[]);var n,i,a=wi(t)?t:t&&t[0],s=this.store.hasLanguageSomeTranslations(a)?a:this.services.languageUtils.getBestMatchFromCodes(wi(t)?[t]:t);s&&(this.language||r(s),this.translator.language||this.translator.changeLanguage(s),null===(n=this.services.languageDetector)||void 0===n||null===(i=n.cacheUserLanguage)||void 0===i||i.call(n,s));this.loadResources(s,e=>{o(e,s)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),i}getFixedT(e,t,n){var i=this,r=function(e,t){var o;if("object"!==D(t)){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];o=i.options.overloadTranslationOptionHandler([e,t].concat(s))}else o=b({},t);o.lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||r.keyPrefix);var u,c=i.options.keySeparator||".";return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>("function"==typeof e&&(e=Gi(e,b(b({},i.options),t))),`${o.keyPrefix}${c}${e}`)):("function"==typeof e&&(e=Gi(e,b(b({},i.options),t))),u=o.keyPrefix?`${o.keyPrefix}${c}${e}`:e),i.t(u,o)};return wi(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return null===(e=this.translator)||void 0===e?void 0:e.translate(...n)}exists(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return null===(e=this.translator)||void 0===e?void 0:e.exists(...n)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var o=(e,t)=>{var n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){var a=t.precheck(this,o);if(void 0!==a)return a}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||i&&!o(r,e)))}loadNamespaces(e,t){var n=Di();return this.options.ns?(wi(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){var n=Di();wi(e)&&(e=[e]);var i=this.options.preload||[],r=e.filter(e=>i.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return r.length?(this.options.preload=i.concat(r),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){var t,n;if(e||(e=this.resolvedLanguage||((null===(t=this.languages)||void 0===t?void 0:t.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{var i=new Intl.Locale(e);if(i&&i.getTextInfo){var r=i.getTextInfo();if(r&&r.direction)return r.direction}}catch(e){}var o=(null===(n=this.services)||void 0===n?void 0:n.languageUtils)||new $i(lr());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(o.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){var e=new dr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0);return e.createInstance=dr.createInstance,e}cloneInstance(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cr,n=e.forkResourceStore;n&&delete e.forkResourceStore;var i=b(b(b({},this.options),e),{isClone:!0}),r=new dr(i);void 0===e.debug&&void 0===e.prefix||(r.logger=r.logger.clone(e));if(["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services=b({},this.services),r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n){var o=Object.keys(this.store.data).reduce((e,t)=>(e[t]=b({},this.store.data[t]),e[t]=Object.keys(e[t]).reduce((n,i)=>(n[i]=b({},e[t][i]),n),e[t]),e),{});r.store=new Wi(o,i),r.services.resourceStore=r.store}if(e.interpolation){var a=b(b(b({},lr().interpolation),this.options.interpolation),e.interpolation),s=b(b({},i),{},{interpolation:a});r.services.interpolator=new ir(s)}return r.translator=new Yi(r.services,i),r.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r.emit(e,...n)}),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}var pr=dr.createInstance();pr.createInstance,pr.dir,pr.init,pr.loadResources,pr.reloadResources,pr.use,pr.changeLanguage,pr.getFixedT;var mr=pr.t;pr.exists,pr.setDefaultNamespace,pr.hasLoadedNamespace,pr.loadNamespaces,pr.loadLanguages;var fr,gr,vr={en:{translation:{__contributors:["reisxd"],settings:{options:{socialMedia:{title:"Social Media Links",qrCodeScanMessage:"You can visit the {{name}} page by scanning the QR code below.",announcements:"Announcements",group:"Group",website:"Website",githubSponsors:"GitHub Sponsors"},adBlock:"Ad Block",sponsorblock:{title:"SponsorBlock Settings",options:{enableSB:"Enable SponsorBlock",manualSkip:"Manual SponsorBlock Segment Skip",segments:"Segments",categories:{sponsor:"Skip Sponsor Segments",intro:"Skip Intro Segments",outro:"Skip Outro Segments",interaction:"Skip Interaction Reminder Segments",selfpromo:"Skip Self-Promotion Segments",preview:"Skip Preview/Recap Segments",filler:"Skip Tangents/Jokes Segments",music_offtopic:"Skip Off-Topic Music Segments",highlights:"Enable Highlights"},showSBToasts:"Show SponsorBlock Toasts"}},dearrow:{title:"DeArrow Settings",options:{enableDA:"Enable DeArrow",enableDAThumbnails:"Enable DeArrow Thumbnails"}},misc:{title:"Miscellaneous Settings",options:{endScreenCards:"Hide End Screen Cards",youThereRenderer:"Enable 'Are you still watching?' Renderer",paidPromoOverlay:"Enable 'Includes paid promotion' Overlay",whosWatching:{title:"Who's Watching Menu",options:{enableWW:"Enable Who's Watching Menu",permaEnableWW:"Permanently Enable Who's Watching Menu",enableWWOnExit:"Enable Who's Watching Menu on App Exit"}},fixUI:"Fix UI",hqThumbnails:"Enable High Quality Thumbnails",longPress:"Enable Long Press Actions",shorts:"Enable Shorts",videoPreviews:"Enable Video Previews",ttWelcomeMsg:"Show TT Welcome Message",guestSignInReminder:"Show Guest Sign In Reminder",reloadHomeOnStartup:"Reload Home on Startup"}},subtitles:{title:"Subtitle Settings",options:{showLocalSubtitle:"Show Local Subtitle",showHiddenSubtitles:"Show Hidden Subtitles"}},videoPlayer:{title:"Video Player Settings",subtitle:"Customize video player features",options:{patching:{title:"Patch Video Player UI",options:{enableVPUIPatching:"Enable Video Player UI Patching",previousNextBtns:"Enable Previous and Next Buttons",showSuperThxBtn:"Show Super Thanks Button",showAIAskBtn:"Show Ask Button",showSpeedCtrlBtn:"Show Speed Controls Button",addMPBtn:"Show Mini Player Button",swapMPWithPIP:"Swap Mini Player Button with PiP Button"}},preferredVideoQuality:{title:"Preferred Video Quality",subtitle:"Choose the preferred or next best video quality applied when playback starts"},speedSettings:{title:"Speed Settings Increments",subtitle:"Set the speed increments for video playback speed adjustments"},preferredVideoCodec:{title:"Preferred Video Codec",subtitle:"Choose the preferred video codec for playback"},afr:"Auto Frame Rate",afrPauseDuration:{title:"Auto Frame Rate Pause Duration",subtitle:"Set the duration (in seconds) to pause video playback when adjusting frame rate"},codecAny:"Any",qualityAuto:"Auto",hideRelatedVideosPlayer:"Hide Related Videos"}},time:{second:"{{count}} second",seconds:"{{count}} seconds",minute:"{{count}} minute",minutes:"{{count}} minutes"},uiSettings:{title:"User Interface Settings",subtitle:"Customize the UI to your liking",options:{hideWatchedVideos:{title:"Hide Watched Videos",options:{enableHideWatchedVideos:"Enable Hide Watched Videos",watchedVideosThreshold:{title:"Watched Videos Threshold",subtitle:"Set the percentage threshold for hiding watched videos"},setPagesToHideWatchedVideos:"Set Pages to Hide Watched Videos"}},screenDimming:{title:"Screen Dimming",options:{enableScreenDimming:"Enable Screen Dimming",dimmingTimeout:{title:"Dimming Timeout",subtitle:"Set the inactivity timeout (in seconds) before the screen dims"},dimmingOpacity:{title:"Dimming Opacity",subtitle:"Set the opacity level for screen dimming"}}},disableSidebarContents:{title:"Disable Sidebar Contents",subtitle:"Select sidebar contents to disable"},sortSidebarContents:{title:"Sort Sidebar Contents",subtitle:"Reorder sidebar contents to your preference",moveUp:{title:"Move Up",subtitle:"Move this item up in the sidebar"},moveDown:{title:"Move Down",subtitle:"Move this item down in the sidebar"},addToSidebar:"Add Channel to Sidebar",removeFromSidebar:"Remove Channel from Sidebar"},launchToOnStartup:{title:"Launch To on Startup",subtitle:"Choose the default page TizenTube opens to on startup"},categories:{search:"Search",home:"Home",sports:"Sports",news:"News",music:"Music",podcasts:"Podcasts",moviesAndTv:"Movies & TV",live:"Live",gaming:"Gaming",subscriptions:"Subscriptions",library:"Library",more:"More",shorts:"Shorts",searchResults:"Search Results"},sortSubscriptionsByAlphabet:"Sort Subscriptions Alphabetically",disableChannelsOnSidebar:"Disable Channels on Sidebar",clock:{title:"Clock",subtitle:"Display a clock on the screen",options:{enableClock:"Enable Clock",isClock12HourFormat:"Use 12-Hour Format for Clock",clockShowSeconds:"Show Seconds on Clock",clockHideWhenVideoPlaying:"Hide Clock While Video is Playing"}},disableEnlargingThumbnails:"Disable Enlarged Thumbnails",enableShrinkingThumbnails:"Enable Shrinked Thumbnails"}},updater:{title:"TizenTube Cobalt Updater",menuSubtitle:"Manage TizenTube Cobalt updates",versionSubtitle:"Current version: {{version}}",options:{checkForUpdates:"Check for updates",checkForUpdatesOnStartup:"Check for updates on startup"},updateAvailable:{title:"Update Available",subtitle:"A new version of TizenTube Cobalt is available: {{latestVersion}}, current: {{currentVersion}}"},releaseDate:"Release Date: {{date}}",updateNow:{title:"Update Now",subtitle:"Click to download the latest version."},remindLater:{title:"Remind Me Later",subtitle:"Check for updates later."},upToDate:{title:"TizenTube is up to date",subtitle:"You are using the latest version ({{version}}) of TizenTube Cobalt."},checkFailed:{title:"TizenTube update check failed",subtitle:"Could not check for updates."},downloading:{title:"TizenTube Update",subtitle:"Downloading update, please wait..."}}},ttSettings:{title:"TizenTube Settings",madeByText:"Made by Reis Can (reisxd) with ❤️",summary:"Open TizenTube Settings"},supportTT:{title:"Support TizenTube",subtitle:"❤️ Show support for TizenTube and its development",content:{1:"If you enjoy using TizenTube and would like to support its development, consider the following:",2:"1. Star the GitHub repository to help increase its visibility.",3:"2. Share TizenTube with others.",4:"If you would like to contribute financially, consider donating:",5:"- Buy Me A Coffee: https://www.buymeacoffee.com/reisxd (preferably)",6:"- GitHub Sponsors: https://github.com/sponsors/reisxd"}}},welcomeMsg:{title:"Welcome to TizenTube",subtitle:"Go to settings and click on TizenTube Settings for settings."},sponsorblock:{segments:{sponsor:"sponsored segment",intro:"intro",outro:"outro",interaction:"interaction reminder",selfpromo:"self-promotion",preview:"recap or preview",filler:"tangents",music_offtopic:"non-music part",poi_highlight:"highlight"},toasts:{skipping:"Skipping {{segment}}",notSkipping:"Not skipping {{segment}} (was skipped {{count}} times)",skip:"Skip {{segment}}",skipToHighlight:"Skip to highlight"}},player:{playbackSpeed:{title:"Playback Speed",button:"Speed Controls",fixStuttering:"Fix stuttering (1.0001x)"},miniPlayer:"Mini Player",pictureInPicture:"Picture in Picture",previous:"Previous",next:"Next",withTizenTube:"with TizenTube",share:{title:"Share",button:"Share",qrCodeScanMessage:"Scan the QR code below to share this video."},screenOff:"Turn off screen"},videoMenu:{notInterested:"Not interested",dontRecommendChannel:"Don't recommend channel"},toasts:{videoAddedToQueue:"Video added to queue.",videoQueueCleared:"Video queue cleared.",feedbackSent:"Feedback sent.",sidebarContentsUpdated:{title:"Sidebar Contents Updated",subtitle:"The sidebar contents have been updated."}}}},de:{translation:{__contributors:["CrazyWolf13"],settings:{options:{socialMedia:{title:"Social-Media-Links",qrCodeScanMessage:"Du kannst die {{name}}-Seite besuchen, indem du den untenstehenden QR-Code scannst.",announcements:"Anzeigen",group:"Gruppe",website:"Website",githubSponsors:"GitHub Sponsoren"},adBlock:"Werbeblocker",sponsorblock:{title:"SponsorBlock-Einstellungen",options:{enableSB:"SponsorBlock aktivieren",manualSkip:"Manuelles Überspringen von SponsorBlock-Segmenten",segments:"Segmente",categories:{sponsor:"Sponsor-Segmente überspringen",intro:"Intro-Segmente überspringen",outro:"Outro-Segmente überspringen",interaction:"Interaktionsaufforderungen überspringen",selfpromo:"Eigenwerbung überspringen",preview:"Vorschau-/Zusammenfassungs-Segmente überspringen",filler:"Abschweifungen/Witze überspringen",music_offtopic:"Off-Topic-Musiksegmente überspringen",highlights:"Highlights aktivieren"},showSBToasts:"SponsorBlock-Pop-Ups anzeigen"}},dearrow:{title:"DeArrow-Einstellungen",options:{enableDA:"DeArrow aktivieren",enableDAThumbnails:"DeArrow-Thumbnails aktivieren"}},misc:{title:"Sonstige Einstellungen",options:{endScreenCards:"Endbildschirm-Karten ausblenden",youThereRenderer:"'Schaust du noch?' anzeigen",paidPromoOverlay:"'Enthält bezahlte Werbung'-Overlay anzeigen",whosWatching:{title:"„Wer schaut?“ Menü",options:{enableWW:"„Wer schaut?“ Menü aktivieren",permaEnableWW:"„Wer schaut?“ Menü dauerhaft aktivieren",enableWWOnExit:"„Wer schaut?“ Menü beim Beenden der App anzeigen"}},fixUI:"UI korrigieren",hqThumbnails:"Hochqualitative Thumbnails aktivieren",longPress:"Aktionen bei langem Drücken aktivieren",shorts:"Shorts aktivieren",videoPreviews:"Videovorschauen aktivieren",ttWelcomeMsg:"TT-Begrüßungsnachricht anzeigen",guestSignInReminder:"Gast-Anmeldeerinnerung anzeigen",reloadHomeOnStartup:"Startseite beim Start neu laden"}},subtitles:{title:"Untertitel-Einstellungen",options:{showLocalSubtitle:"Lokale Untertitel anzeigen",showHiddenSubtitles:"Versteckte Untertitel anzeigen"}},videoPlayer:{title:"Videoplayer-Einstellungen",subtitle:"Videoplayer-Funktionen anpassen",options:{patching:{title:"Videoplayer-UI patchen",options:{enableVPUIPatching:"Videoplayer-UI-Patching aktivieren",previousNextBtns:"Zurück-/Weiter-Buttons aktivieren",showSuperThxBtn:"Super-Thanks-Button anzeigen",showAIAskBtn:"KI-Frage-Button anzeigen",showSpeedCtrlBtn:"Geschwindigkeitssteuerungs-Button anzeigen",addMPBtn:"Miniplayer-Schaltfläche anzeigen",swapMPWithPIP:"Miniplayer-Schaltfläche durch PiP ersetzen"}},preferredVideoQuality:{title:"Bevorzugte Videoqualität",subtitle:"Wähle die bevorzugte oder nächstbeste Videoqualität, die beim Start der Wiedergabe verwendet wird"},speedSettings:{title:"Geschwindigkeitsstufen",subtitle:"Lege die Schritte für Anpassungen der Wiedergabegeschwindigkeit fest"},preferredVideoCodec:{title:"Bevorzugter Videocodec",subtitle:"Wähle den bevorzugten Videocodec für die Wiedergabe"},afr:"Automatische Bildrate",afrPauseDuration:{title:"Pause bei automatischer Bildrate",subtitle:"Lege fest, wie lange (in Sekunden) das Video pausiert wird, wenn die Bildrate angepasst wird"},codecAny:"Beliebig",qualityAuto:"Automatisch",hideRelatedVideosPlayer:"Hide Related Videos"}},time:{second:"{{count}} Sekunde",seconds:"{{count}} Sekunden",minute:"{{count}} Minute",minutes:"{{count}} Minuten"},uiSettings:{title:"Benutzeroberflächen-Einstellungen",subtitle:"Passe die Oberfläche nach deinen Wünschen an",options:{hideWatchedVideos:{title:"Angesehene Videos ausblenden",options:{enableHideWatchedVideos:"Ausblenden angesehener Videos aktivieren",watchedVideosThreshold:{title:"Schwellenwert für angesehene Videos",subtitle:"Lege den Prozentsatz fest, ab dem Videos als angesehen gelten und ausgeblendet werden"},setPagesToHideWatchedVideos:"Seiten festlegen, auf denen angesehene Videos ausgeblendet werden"}},screenDimming:{title:"Bildschirmabdunklung",options:{enableScreenDimming:"Bildschirmabdunklung aktivieren",dimmingTimeout:{title:"Timeout für Abdunklung",subtitle:"Lege die Inaktivitätszeit (in Sekunden) fest, bevor der Bildschirm abgedunkelt wird"},dimmingOpacity:{title:"Abdunklungs-Deckkraft",subtitle:"Lege die Deckkraft der Bildschirmabdunklung fest"}}},disableSidebarContents:{title:"Seitenleisten-Inhalte deaktivieren",subtitle:"Wähle Seitenleisten-Inhalte aus, die deaktiviert werden sollen"},launchToOnStartup:{title:"Startseite beim Start",subtitle:"Wähle die Standardseite, die TizenTube beim Start öffnet"},categories:{search:"Suchen",home:"Startseite",sports:"Sport",news:"Nachrichten",music:"Musik",podcasts:"Podcasts",moviesAndTv:"Filme",live:"Live",gaming:"Gaming",subscriptions:"Abos",library:"Mediathek",more:"Mehr",shorts:"Shorts",searchResults:"Suchergebnisse"},sortSubscriptionsByAlphabet:"Abonnements alphabetisch sortieren",disableChannelsOnSidebar:"Kanäle in der Seitenleiste deaktivieren",clock:{title:"Uhr",subtitle:"Die Uhr auf dem Bildschirm anzeigen",options:{enableClock:"Uhr aktivieren",isClock12HourFormat:"12-Stunden-Format",clockShowSeconds:"Sekunden anzeigen",clockHideWhenVideoPlaying:"Hide Clock While Video is Playing"}},disableEnlargingThumbnails:"Disable Enlarged Thumbnails",enableShrinkingThumbnails:"Enable Shrinked Thumbnails",sortSidebarContents:{title:"Sort Sidebar Contents",subtitle:"Reorder sidebar contents to your preference",moveUp:{title:"Move Up",subtitle:"Move this item up in the sidebar"},moveDown:{title:"Move Down",subtitle:"Move this item down in the sidebar"},addToSidebar:"Add Channel to Sidebar",removeFromSidebar:"Remove Channel from Sidebar"}}},updater:{title:"TizenTube Cobalt Updater",menuSubtitle:"TizenTube Cobalt Updates verwalten",versionSubtitle:"Aktuelle Version: {{version}}",options:{checkForUpdates:"Nach Updates suchen",checkForUpdatesOnStartup:"Beim Start nach Updates suchen"},updateAvailable:{title:"Update verfügbar",subtitle:"Eine neue Version von TizenTube Cobalt ist verfügbar: {{latestVersion}}, installiert: {{currentVersion}}"},releaseDate:"Veröffentlichungsdatum: {{date}}",updateNow:{title:"Jetzt aktualisieren",subtitle:"Klicken Sie hier, um die neueste Version herunterzuladen"},remindLater:{title:"Später daran erinnern",subtitle:"Später nach Updates suchen."},upToDate:{title:"TizenTube ist auf dem neuesten Stand",subtitle:"Sie verwenden die neueste Version ({{version}}) von TizenTube Cobalt."},checkFailed:{title:"Überprüfung auf TizenTube-Updates fehlgeschlagen",subtitle:"Es konnten keine Updates gefunden werden."},downloading:{title:"TizenTube-Update",subtitle:"Update wird heruntergeladen, bitte warten..."}}},ttSettings:{title:"TizenTube-Einstellungen",madeByText:"Erstellt von Reis Can (reisxd) mit ❤️",summary:"TizenTube-Einstellungen öffnen"},supportTT:{title:"TizenTube unterstützen",subtitle:"❤️ Unterstütze TizenTube und seine Entwicklung",content:{1:"Wenn dir TizenTube gefällt und du seine Entwicklung unterstützen möchtest, ziehe Folgendes in Betracht:",2:"1. Markiere das GitHub-Repository mit einem Stern, um seine Sichtbarkeit zu erhöhen.",3:"2. Teile TizenTube mit anderen.",4:"Wenn du finanziell beitragen möchtest, kannst du spenden:",5:"- Buy Me A Coffee: https://www.buymeacoffee.com/reisxd (bevorzugt)",6:"- GitHub Sponsoren: https://github.com/sponsors/reisxd"}}},welcomeMsg:{title:"Willkommen bei TizenTube",subtitle:"Gehe zu den Einstellungen und klicke auf TizenTube-Einstellungen."},sponsorblock:{segments:{sponsor:"Sponsor-Segment",intro:"Intro",outro:"Outro",interaction:"Interaktionshinweis",selfpromo:"Eigenwerbung",preview:"Zusammenfassung oder Vorschau",filler:"Abschweifung",music_offtopic:"Nicht-Musik-Teil",poi_highlight:"Highlight"},toasts:{skipping:"{{segment}} wird übersprungen",notSkipping:"{{segment}} wird nicht übersprungen (wurde {{count}} mal übersprungen)",skip:"{{segment}} überspringen",skipToHighlight:"Zum Highlight springen"}},player:{playbackSpeed:{title:"Wiedergabegeschwindigkeit",button:"Geschwindigkeit",fixStuttering:"Ruckeln beheben (1.0001x)"},miniPlayer:"MiniPlayer",pictureInPicture:"Bild-in-Bild",previous:"Zurück",next:"Weiter",withTizenTube:"mit TizenTube",share:{title:"Share",button:"Share",qrCodeScanMessage:"Scan the QR code below to share this video."},screenOff:"Turn off screen"},toasts:{videoAddedToQueue:"Video wurde zur Warteschlange hinzugefügt",videoQueueCleared:"Die Warteschlange wurde geleert.",sidebarContentsUpdated:{title:"Sidebar Contents Updated",subtitle:"The sidebar contents have been updated."},feedbackSent:"Feedback sent."},videoMenu:{notInterested:"Not interested",dontRecommendChannel:"Don't recommend channel"}}}};gr=(null===(fr=window)||void 0===fr||null===(fr=fr.yt)||void 0===fr||null===(fr=fr.config_)||void 0===fr?void 0:fr.HL)||navigator.language.replace(/(\-.*)/g,""),pr.init({lng:gr,fallbackLng:"en",resources:vr,debug:!1,interpolation:{escapeValue:!1}});var yr;yr||(yr=1,function(){function e(e){return void 0===e?0:Number(e)}function t(e,t){return e!==t&&!(isNaN(e)&&isNaN(t))}self.DOMRect=function(n,i,r,o){var a,s,l,u,c,h,d,p;a=e(n),s=e(i),l=e(r),u=e(o),Object.defineProperties(this,{x:{get:function(){return a},set:function(e){t(a,e)&&(a=e,c=h=void 0)},enumerable:!0},y:{get:function(){return s},set:function(e){t(s,e)&&(s=e,d=p=void 0)},enumerable:!0},width:{get:function(){return l},set:function(e){t(l,e)&&(l=e,c=h=void 0)},enumerable:!0},height:{get:function(){return u},set:function(e){t(u,e)&&(u=e,d=p=void 0)},enumerable:!0},left:{get:function(){return void 0===c&&(c=a+Math.min(0,l)),c},enumerable:!0},right:{get:function(){return void 0===h&&(h=a+Math.max(0,l)),h},enumerable:!0},top:{get:function(){return void 0===d&&(d=s+Math.min(0,u)),d},enumerable:!0},bottom:{get:function(){return void 0===p&&(p=s+Math.max(0,u)),p},enumerable:!0}})}}());var br,Sr="ytaf-configuration",xr={enableAdBlock:!0,enableSponsorBlock:!0,enableSponsorBlockToasts:!0,sponsorBlockManualSkips:["intro","outro","filler"],enableSponsorBlockSponsor:!0,enableSponsorBlockIntro:!0,enableSponsorBlockOutro:!0,enableSponsorBlockInteraction:!0,enableSponsorBlockSelfPromo:!0,enableSponsorBlockPreview:!0,enableSponsorBlockMusicOfftopic:!0,enableSponsorBlockFiller:!1,enableSponsorBlockHighlight:!0,videoSpeed:1,preferredVideoQuality:"auto",enableDeArrow:!0,enableDeArrowThumbnails:!1,focusContainerColor:"#0f0f0f",routeColor:"#0f0f0f",enableFixedUI:!window.h5vcc,enableHqThumbnails:!1,enableChapters:!0,enableLongPress:!0,enableShorts:!0,dontCheckUpdateUntil:0,enableWhoIsWatchingMenu:!1,permanentlyEnableWhoIsWatchingMenu:!1,enableWhosWatchingMenuOnAppExit:!1,enableShowUserLanguage:!0,enableShowOtherLanguages:!1,showWelcomeToast:!0,enablePreviousNextButtons:!0,enableSuperThanksButton:!1,enableAIAskButton:!1,enableSpeedControlsButton:!0,enablePatchingVideoPlayer:!0,enableMPButton:!0,enableSwapMPWithPIP:!1,enablePreviews:!0,enableHideWatchedVideos:!1,hideWatchedVideosThreshold:80,hideWatchedVideosPages:[],enableHideEndScreenCards:!1,enableYouThereRenderer:!0,lastAnnouncementCheck:0,enableScreenDimming:!1,dimmingTimeout:60,dimmingOpacity:.5,enablePaidPromotionOverlay:!0,speedSettingsIncrement:.25,preferredVideoCodec:"any",launchToOnStartup:null,reloadHomeOnStartup:!0,disabledSidebarContents:[],sidebarContentsOrder:[],disableChannelsOnSidebar:!1,enableUpdater:!0,autoFrameRate:!1,autoFrameRatePauseVideoFor:0,enableSigninReminder:!1,sortSubscriptionsByAlphabet:!1,enableClock:!1,isClock12HourFormat:!1,clockShowSeconds:!1,clockHideWhenVideoPlaying:!1,disableEnlargingThumbnails:!1,enableShrinkingThumbnails:!1,hideRelatedVideosPlayer:!1};try{br=JSON.parse(window.localStorage[Sr])}catch(e){console.warn("Config read failed:",e),br=xr}function Er(e){return void 0===br[e]&&(console.warn("Populating key",e,"with default value",xr[e]),br[e]=xr[e]),br[e]}function wr(e,t){console.info("Setting key",e,"to",t),br[e]=t,window.localStorage[Sr]=JSON.stringify(br),Dr.dispatchEvent(new CustomEvent("configChange",{detail:{key:e,value:t}}))}var Dr={listeners:{},addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},removeEventListener(e,t){this.listeners[e]&&(this.listeners[e]=this.listeners[e].filter(e=>e!==t))},dispatchEvent(e){var t=e.type;this.listeners[t]&&this.listeners[t].forEach(t=>{try{t.call(this,e)}catch(e){}})}};window.isPipPlaying=!1;var Cr=null;function kr(){var e=Object.values(window._yttv).find(e=>e&&e.mappings);Cr=e.get("PlayerService");var t=e.get("PlaybackPreviewService"),n=t.start,i=t.stop;t.start=function(){if(!window.isPipPlaying){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n.apply(this,t)}},t.stop=function(){if(!window.isPipPlaying){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.apply(this,t)}}}"complete"===document.readyState?kr():window.addEventListener("load",kr);var Ar={ytlrSearchVoice:{length:0,classes:[]},ytlrSearchVoiceMicButton:{length:0,classes:[]}};function Tr(e,t,n){var i={openPopupAction:{popupType:"TOAST",popup:{overlayToastRenderer:{title:{simpleText:e},subtitle:{simpleText:t}}}}};n&&(i.openPopupAction.popup.overlayToastRenderer.image.thumbnails=n),to(i)}function Fr(e,t,n,i){var r=function(e,t,n,i){var r="string"==typeof e?{title:e,subtitle:""}:e,o={openPopupAction:{popupType:"MODAL",popup:{overlaySectionRenderer:{overlay:{overlayTwoPanelRenderer:{actionPanel:{overlayPanelRenderer:{header:{overlayPanelHeaderRenderer:e.overlayPanelHeaderRenderer||{title:{simpleText:r.title}}},content:t}},backButton:{buttonRenderer:{accessibilityData:{accessibilityData:{label:"Back"}},command:{signalAction:{signal:"POPUP_BACK"}}}}}},dismissalCommand:{signalAction:{signal:"POPUP_BACK"}}}},uniqueId:n}};return r.subtitle&&(o.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.header.overlayPanelHeaderRenderer.subtitle={simpleText:r.subtitle}),i&&(o.openPopupAction.shouldMatchUniqueId=!0,o.openPopupAction.updateAction=!0),o}(e,t,n,i);to(r)}function Pr(e,t){return{overlayPanelItemListRenderer:{items:e,selectedIndex:t}}}function Br(e,t,n){var i={compactLinkRenderer:{serviceEndpoint:{commandExecutorCommand:{commands:n}}}};return e&&(i.compactLinkRenderer.title={simpleText:e.title}),e.subtitle&&(i.compactLinkRenderer.subtitle={simpleText:e.subtitle}),t&&(i.compactLinkRenderer.icon={iconType:t.icon}),t&&t.secondaryIcon&&(i.compactLinkRenderer.secondaryIcon={iconType:t.secondaryIcon}),i}function Ir(e,t,n,i,r){return{timelyActionRenderer:{actionButtons:[{buttonRenderer:{isDisabled:!1,text:{runs:[{text:e}]},icon:{iconType:t},trackingParams:null,command:n}}],triggerTimeMs:i,timeoutMs:r,type:""}}}function Or(e){var t="WL"===e.watchEndpointData.playlistId,n=t?{removedVideoId:e.videoId,action:"ACTION_REMOVE_VIDEO_BY_VIDEO_ID"}:{addedVideoId:e.videoId,action:"ACTION_ADD_VIDEO"};return{clickTrackingParams:null,showMenuCommand:{contentId:e.videoId,thumbnail:{thumbnails:e.thumbnails},title:{simpleText:e.title},subtitle:{simpleText:e.subtitle},menu:{menuRenderer:{items:[Rr("Play",{clickTrackingParams:null,watchEndpoint:e.watchEndpointData}),Nr(t?"Remove from Watch Later":"Save to Watch Later",{clickTrackingParams:null,commandMetadata:{webCommandMetadata:{sendPost:!0,apiUrl:"/youtubei/v1/browse/edit_playlist"}},playlistEditEndpoint:{playlistId:"WL",actions:[n]}}),Rr("Save to Playlist",{clickTrackingParams:null,addToPlaylistEndpoint:{videoId:e.videoId}}),Nr("Add to Queue",{clickTrackingParams:null,playlistEditEndpoint:{customAction:{action:"ADD_TO_QUEUE",parameters:e.item}}}),Nr("Go To Channel",{clickTrackingParams:null,playlistEditEndpoint:{customAction:{action:"GO_TO_CHANNEL",parameters:e.item}}})],trackingParams:null,accessibility:{accessibilityData:{label:"Video options"}}}}}}}function Nr(e,t){return{menuServiceItemRenderer:{text:{runs:[{text:e}]},serviceEndpoint:t,trackingParams:null}}}function Rr(e,t){return{menuNavigationItemRenderer:{text:{runs:[{text:e}]},navigationEndpoint:t,trackingParams:null}}}function Lr(e){return{scrollPaneItemListRenderer:{items:e}}}function Mr(e){return{overlayMessageRenderer:{title:{simpleText:e}}}}function _r(e){return{qrCodeRenderer:{qrCodeImage:{thumbnails:[{url:e}]},style:"QR_CODE_RENDERER_STYLE_ATA_SIDESHEET",trackingParams:null}}}function Ur(e,t,n,i){return{isDisabled:e,text:{runs:[{text:t}]},icon:{iconType:n},command:i,trackingParams:null}}function zr(e,t,n,i){var r={guideEntryRenderer:{navigationEndpoint:t,trackingParams:null,formattedTitle:{simpleText:e}}};return n&&(r.guideEntryRenderer.icon={iconType:n}),i&&(r.guideEntryRenderer.thumbnail={thumbnails:[{url:i}]}),r}new MutationObserver(()=>{if(window.isPipPlaying){var e=document.querySelector("ytlr-search-bar");if(e)if(!document.querySelector("#tt-pip-button")){var t=e.querySelector("ytlr-search-voice");if(t){for(var n=Object.values(window._yttv).find(e=>e instanceof Map&&e.has("CLEAR_COOKIES")),i=n.get("MICROPHONE_ON"),r=n.get("CLEAR_COOKIES"),o=document.createElement("ytlr-search-voice"),a=0;a<t.classList.length;a++){if(0===Ar.ytlrSearchVoice.length&&(Ar.ytlrSearchVoice.length=t.classList.length),Ar.ytlrSearchVoice.length!==t.classList.length){var s,l=f(Ar.ytlrSearchVoice.classes);try{for(l.s();!(s=l.n()).done;){var u=s.value;o.classList.add(u)}}catch(e){l.e(e)}finally{l.f()}break}Ar.ytlrSearchVoice.classes.includes(t.classList[a])||Ar.ytlrSearchVoice.classes.push(t.classList[a]),o.classList.add(t.classList[a])}o.style.left="10.25em",o.id="tt-pip-button";for(var c=document.createElement("ytlr-search-voice-mic-button"),h=0;h<t.children[0].classList.length;h++){if(0===Ar.ytlrSearchVoiceMicButton.length&&(Ar.ytlrSearchVoiceMicButton.length=t.children[0].classList.length),Ar.ytlrSearchVoiceMicButton.length!==t.children[0].classList.length){var d,p=f(Ar.ytlrSearchVoiceMicButton.classes);try{for(p.s();!(d=p.n()).done;){var m=d.value;c.classList.add(m)}}catch(e){p.e(e)}finally{p.f()}break}Ar.ytlrSearchVoiceMicButton.classes.includes(t.children[0].classList[h])||Ar.ytlrSearchVoiceMicButton.classes.push(t.children[0].classList[h]),c.classList.add(t.children[0].classList[h])}for(var g=document.createElement("yt-icon"),v=0;v<t.children[0].children[0].classList.length;v++)g.classList.add(t.children[0].children[0].classList[v]);g.classList.remove(i),g.classList.add(r),c.appendChild(g),o.appendChild(c),e.appendChild(o)}else{var y=document.createElement("ytlr-search-voice");y.style.left="10.25em",y.id="tt-pip-button",y.setAttribute("idomkey","ytLrSearchBarSearchVoice"),y.setAttribute("tabindex","0"),y.classList.add("ytLrSearchVoiceHost","ytLrSearchBarSearchVoice");var b=document.createElement("ytlr-search-voice-mic-button");b.setAttribute("hybridnavfocusable","true"),b.setAttribute("tabindex","-1"),b.classList.add("ytLrSearchVoiceMicButtonHost","zylon-ve");var S=document.createElement("yt-icon");S.setAttribute("tabindex","-1"),S.classList.add("ytContribIconTvArrowLeft","ytContribIconHost","ytLrSearchVoiceMicButtonIcon"),b.appendChild(S),y.appendChild(b),e.appendChild(y)}}}}).observe(document.body,{childList:!0,subtree:!0});var Vr,Hr={};var jr=(Vr||(Vr=1,Hr.qrcode=function(){var e=function(e,t){var n=e,i=c[t],r=null,o=0,a=null,s=new Array,l={},u=function(e,t){r=function(e){for(var t=new Array(e),n=0;n<e;n+=1){t[n]=new Array(e);for(var i=0;i<e;i+=1)t[n][i]=null}return t}(o=4*n+17),h(0,0),h(o-7,0),h(0,o-7),p(),d(),f(e,t),n>=7&&m(e),null==a&&(a=v(n,i,s)),g(a,t)},h=function(e,t){for(var n=-1;n<=7;n+=1)if(!(e+n<=-1||o<=e+n))for(var i=-1;i<=7;i+=1)t+i<=-1||o<=t+i||(r[e+n][t+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},d=function(){for(var e=8;e<o-8;e+=1)null==r[e][6]&&(r[e][6]=e%2==0);for(var t=8;t<o-8;t+=1)null==r[6][t]&&(r[6][t]=t%2==0)},p=function(){for(var e=b.getPatternPosition(n),t=0;t<e.length;t+=1)for(var i=0;i<e.length;i+=1){var o=e[t],a=e[i];if(null==r[o][a])for(var s=-2;s<=2;s+=1)for(var l=-2;l<=2;l+=1)r[o+s][a+l]=-2==s||2==s||-2==l||2==l||0==s&&0==l}},m=function(e){for(var t=b.getBCHTypeNumber(n),i=0;i<18;i+=1){var a=!e&&1==(t>>i&1);r[Math.floor(i/3)][i%3+o-8-3]=a}for(i=0;i<18;i+=1)a=!e&&1==(t>>i&1),r[i%3+o-8-3][Math.floor(i/3)]=a},f=function(e,t){for(var n=i<<3|t,a=b.getBCHTypeInfo(n),s=0;s<15;s+=1){var l=!e&&1==(a>>s&1);s<6?r[s][8]=l:s<8?r[s+1][8]=l:r[o-15+s][8]=l}for(s=0;s<15;s+=1)l=!e&&1==(a>>s&1),s<8?r[8][o-s-1]=l:s<9?r[8][15-s-1+1]=l:r[8][15-s-1]=l;r[o-8][8]=!e},g=function(e,t){for(var n=-1,i=o-1,a=7,s=0,l=b.getMaskFunction(t),u=o-1;u>0;u-=2)for(6==u&&(u-=1);;){for(var c=0;c<2;c+=1)if(null==r[i][u-c]){var h=!1;s<e.length&&(h=1==(e[s]>>>a&1)),l(i,u-c)&&(h=!h),r[i][u-c]=h,-1==(a-=1)&&(s+=1,a=7)}if((i+=n)<0||o<=i){i-=n,n=-n;break}}},v=function(e,t,n){for(var i=E.getRSBlocks(e,t),r=w(),o=0;o<n.length;o+=1){var a=n[o];r.put(a.getMode(),4),r.put(a.getLength(),b.getLengthInBits(a.getMode(),e)),a.write(r)}var s=0;for(o=0;o<i.length;o+=1)s+=i[o].dataCount;if(r.getLengthInBits()>8*s)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+8*s+")");for(r.getLengthInBits()+4<=8*s&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=8*s||(r.put(236,8),r.getLengthInBits()>=8*s));)r.put(17,8);return function(e,t){for(var n=0,i=0,r=0,o=new Array(t.length),a=new Array(t.length),s=0;s<t.length;s+=1){var l=t[s].dataCount,u=t[s].totalCount-l;i=Math.max(i,l),r=Math.max(r,u),o[s]=new Array(l);for(var c=0;c<o[s].length;c+=1)o[s][c]=255&e.getBuffer()[c+n];n+=l;var h=b.getErrorCorrectPolynomial(u),d=x(o[s],h.getLength()-1).mod(h);for(a[s]=new Array(h.getLength()-1),c=0;c<a[s].length;c+=1){var p=c+d.getLength()-a[s].length;a[s][c]=p>=0?d.get(p):0}}var m=0;for(c=0;c<t.length;c+=1)m+=t[c].totalCount;var f=new Array(m),g=0;for(c=0;c<i;c+=1)for(s=0;s<t.length;s+=1)c<o[s].length&&(f[g]=o[s][c],g+=1);for(c=0;c<r;c+=1)for(s=0;s<t.length;s+=1)c<a[s].length&&(f[g]=a[s][c],g+=1);return f}(r,i)};return l.addData=function(e){var t=D(e);s.push(t),a=null},l.isDark=function(e,t){if(e<0||o<=e||t<0||o<=t)throw new Error(e+","+t);return r[e][t]},l.getModuleCount=function(){return o},l.make=function(){u(!1,function(){for(var e=0,t=0,n=0;n<8;n+=1){u(!0,n);var i=b.getLostPoint(l);(0==n||e>i)&&(e=i,t=n)}return t}())},l.createTableTag=function(e,t){e=e||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(t=void 0===t?4*e:t)+"px;",n+='">',n+="<tbody>";for(var i=0;i<l.getModuleCount();i+=1){n+="<tr>";for(var r=0;r<l.getModuleCount();r+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+e+"px;",n+=" height: "+e+"px;",n+=" background-color: ",n+=l.isDark(i,r)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return n+="</tbody>",n+="</table>"},l.createImgTag=function(e,t){e=e||2,t=void 0===t?4*e:t;var n=l.getModuleCount()*e+2*t,i=t,r=n-t;return T(n,n,function(t,n){if(i<=t&&t<r&&i<=n&&n<r){var o=Math.floor((t-i)/e),a=Math.floor((n-i)/e);return l.isDark(a,o)?0:1}return 1})},l};e.stringToBytes=function(e){for(var t=new Array,n=0;n<e.length;n+=1){var i=e.charCodeAt(n);t.push(255&i)}return t},e.createStringToBytes=function(e,t){var n=function(){for(var n=k(e),i=function(){var e=n.read();if(-1==e)throw new Error;return e},r=0,o={};;){var a=n.read();if(-1==a)break;var s=i(),l=i()<<8|i();o[String.fromCharCode(a<<8|s)]=l,r+=1}if(r!=t)throw new Error(r+" != "+t);return o}(),i="?".charCodeAt(0);return function(e){for(var t=new Array,r=0;r<e.length;r+=1){var o=e.charCodeAt(r);if(o<128)t.push(o);else{var a=n[e.charAt(r)];"number"==typeof a?(255&a)==a?t.push(a):(t.push(a>>>8),t.push(255&a)):t.push(i)}}return t}};var t,n,i,r,o,a=1,s=2,l=4,u=8,c={L:1,M:0,Q:3,H:2},h=0,d=1,p=2,m=3,f=4,g=5,v=6,y=7,b=(t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,o=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(r={}).getBCHTypeInfo=function(e){for(var t=e<<10;o(t)-o(n)>=0;)t^=n<<o(t)-o(n);return 21522^(e<<10|t)},r.getBCHTypeNumber=function(e){for(var t=e<<12;o(t)-o(i)>=0;)t^=i<<o(t)-o(i);return e<<12|t},r.getPatternPosition=function(e){return t[e-1]},r.getMaskFunction=function(e){switch(e){case h:return function(e,t){return(e+t)%2==0};case d:return function(e,t){return e%2==0};case p:return function(e,t){return t%3==0};case m:return function(e,t){return(e+t)%3==0};case f:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case g:return function(e,t){return e*t%2+e*t%3==0};case v:return function(e,t){return(e*t%2+e*t%3)%2==0};case y:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw new Error("bad maskPattern:"+e)}},r.getErrorCorrectPolynomial=function(e){for(var t=x([1],0),n=0;n<e;n+=1)t=t.multiply(x([1,S.gexp(n)],0));return t},r.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case a:return 10;case s:return 9;case l:case u:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case a:return 12;case s:return 11;case l:return 16;case u:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case a:return 14;case s:return 13;case l:return 16;case u:return 12;default:throw new Error("mode:"+e)}}},r.getLostPoint=function(e){for(var t=e.getModuleCount(),n=0,i=0;i<t;i+=1)for(var r=0;r<t;r+=1){for(var o=0,a=e.isDark(i,r),s=-1;s<=1;s+=1)if(!(i+s<0||t<=i+s))for(var l=-1;l<=1;l+=1)r+l<0||t<=r+l||0==s&&0==l||a==e.isDark(i+s,r+l)&&(o+=1);o>5&&(n+=3+o-5)}for(i=0;i<t-1;i+=1)for(r=0;r<t-1;r+=1){var u=0;e.isDark(i,r)&&(u+=1),e.isDark(i+1,r)&&(u+=1),e.isDark(i,r+1)&&(u+=1),e.isDark(i+1,r+1)&&(u+=1),0!=u&&4!=u||(n+=3)}for(i=0;i<t;i+=1)for(r=0;r<t-6;r+=1)e.isDark(i,r)&&!e.isDark(i,r+1)&&e.isDark(i,r+2)&&e.isDark(i,r+3)&&e.isDark(i,r+4)&&!e.isDark(i,r+5)&&e.isDark(i,r+6)&&(n+=40);for(r=0;r<t;r+=1)for(i=0;i<t-6;i+=1)e.isDark(i,r)&&!e.isDark(i+1,r)&&e.isDark(i+2,r)&&e.isDark(i+3,r)&&e.isDark(i+4,r)&&!e.isDark(i+5,r)&&e.isDark(i+6,r)&&(n+=40);var c=0;for(r=0;r<t;r+=1)for(i=0;i<t;i+=1)e.isDark(i,r)&&(c+=1);return n+=Math.abs(100*c/t/t-50)/5*10},r),S=function(){for(var e=new Array(256),t=new Array(256),n=0;n<8;n+=1)e[n]=1<<n;for(n=8;n<256;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;n<255;n+=1)t[e[n]]=n;var i={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t[e]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e[t]}};return i}();function x(e,t){if(void 0===e.length)throw new Error(e.length+"/"+t);var n=function(){for(var n=0;n<e.length&&0==e[n];)n+=1;for(var i=new Array(e.length-n+t),r=0;r<e.length-n;r+=1)i[r]=e[r+n];return i}(),i={get:function(e){return n[e]},getLength:function(){return n.length},multiply:function(e){for(var t=new Array(i.getLength()+e.getLength()-1),n=0;n<i.getLength();n+=1)for(var r=0;r<e.getLength();r+=1)t[n+r]^=S.gexp(S.glog(i.get(n))+S.glog(e.get(r)));return x(t,0)},mod:function(e){if(i.getLength()-e.getLength()<0)return i;for(var t=S.glog(i.get(0))-S.glog(e.get(0)),n=new Array(i.getLength()),r=0;r<i.getLength();r+=1)n[r]=i.get(r);for(r=0;r<e.getLength();r+=1)n[r]^=S.gexp(S.glog(e.get(r))+t);return x(n,0).mod(e)}};return i}var E=function(){var e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16]],t=function(e,t){var n={};return n.totalCount=e,n.dataCount=t,n},n={getRSBlocks:function(n,i){var r=function(t,n){switch(n){case c.L:return e[4*(t-1)+0];case c.M:return e[4*(t-1)+1];case c.Q:return e[4*(t-1)+2];case c.H:return e[4*(t-1)+3];default:return}}(n,i);if(void 0===r)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+i);for(var o=r.length/3,a=new Array,s=0;s<o;s+=1)for(var l=r[3*s+0],u=r[3*s+1],h=r[3*s+2],d=0;d<l;d+=1)a.push(t(u,h));return a}};return n}(),w=function(){var e=new Array,t=0,n={getBuffer:function(){return e},get:function(t){var n=Math.floor(t/8);return 1==(e[n]>>>7-t%8&1)},put:function(e,t){for(var i=0;i<t;i+=1)n.putBit(1==(e>>>t-i-1&1))},getLengthInBits:function(){return t},putBit:function(n){var i=Math.floor(t/8);e.length<=i&&e.push(0),n&&(e[i]|=128>>>t%8),t+=1}};return n},D=function(t){var n=l,i=e.stringToBytes(t),r={getMode:function(){return n},getLength:function(e){return i.length},write:function(e){for(var t=0;t<i.length;t+=1)e.put(i[t],8)}};return r},C=function(){var e=new Array,t={writeByte:function(t){e.push(255&t)},writeShort:function(e){t.writeByte(e),t.writeByte(e>>>8)},writeBytes:function(e,n,i){n=n||0,i=i||e.length;for(var r=0;r<i;r+=1)t.writeByte(e[r+n])},writeString:function(e){for(var n=0;n<e.length;n+=1)t.writeByte(e.charCodeAt(n))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var n=0;n<e.length;n+=1)n>0&&(t+=","),t+=e[n];return t+="]"}};return t},k=function(e){var t=e,n=0,i=0,r=0,o={read:function(){for(;r<8;){if(n>=t.length){if(0==r)return-1;throw new Error("unexpected end of file./"+r)}var e=t.charAt(n);if(n+=1,"="==e)return r=0,-1;e.match(/^\s$/)||(i=i<<6|a(e.charCodeAt(0)),r+=6)}var o=i>>>r-8&255;return r-=8,o}},a=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw new Error("c:"+e)};return o},A=function(e,t){var n=e,i=t,r=new Array(e*t),o={setPixel:function(e,t,i){r[t*n+e]=i},write:function(e){e.writeString("GIF87a"),e.writeShort(n),e.writeShort(i),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(i),e.writeByte(0);var t=a(2);e.writeByte(2);for(var r=0;t.length-r>255;)e.writeByte(255),e.writeBytes(t,r,255),r+=255;e.writeByte(t.length-r),e.writeBytes(t,r,t.length-r),e.writeByte(0),e.writeString(";")}},a=function(e){for(var t=1<<e,n=1+(1<<e),i=e+1,o=s(),a=0;a<t;a+=1)o.add(String.fromCharCode(a));o.add(String.fromCharCode(t)),o.add(String.fromCharCode(n));var l=C(),u=function(e){var t=e,n=0,i=0,r={write:function(e,r){if(e>>>r!=0)throw new Error("length over");for(;n+r>=8;)t.writeByte(255&(e<<n|i)),r-=8-n,e>>>=8-n,i=0,n=0;i|=e<<n,n+=r},flush:function(){n>0&&t.writeByte(i)}};return r}(l);u.write(t,i);var c=0,h=String.fromCharCode(r[c]);for(c+=1;c<r.length;){var d=String.fromCharCode(r[c]);c+=1,o.contains(h+d)?h+=d:(u.write(o.indexOf(h),i),o.size()<4095&&(o.size()==1<<i&&(i+=1),o.add(h+d)),h=d)}return u.write(o.indexOf(h),i),u.write(n,i),u.flush(),l.toByteArray()},s=function(){var e={},t=0,n={add:function(i){if(n.contains(i))throw new Error("dup key:"+i);e[i]=t,t+=1},size:function(){return t},indexOf:function(t){return e[t]},contains:function(t){return void 0!==e[t]}};return n};return o},T=function(e,t,n,i){for(var r=A(e,t),o=0;o<t;o+=1)for(var a=0;a<e;a+=1)r.setPixel(a,o,n(a,o));var s=C();r.write(s);for(var l=function(){var e=0,t=0,n=0,i="",r={},o=function(e){i+=String.fromCharCode(a(63&e))},a=function(e){if(e<0);else{if(e<26)return 65+e;if(e<52)return e-26+97;if(e<62)return e-52+48;if(62==e)return 43;if(63==e)return 47}throw new Error("n:"+e)};return r.writeByte=function(i){for(e=e<<8|255&i,t+=8,n+=1;t>=6;)o(e>>>t-6),t-=6},r.flush=function(){if(t>0&&(o(e<<6-t),e=0,t=0),n%3!=0)for(var r=3-n%3,a=0;a<r;a+=1)i+="="},r.toString=function(){return i},r}(),u=s.toByteArray(),c=0;c<u.length;c+=1)l.writeByte(u[c]);l.flush();var h="";return h+="<img",h+=' src="',h+="data:image/gif;base64,",h+=l,h+='"',h+=' width="',h+=e,h+='"',h+=' height="',h+=t,h+='"',i&&(h+=' alt="',h+=i,h+='"'),h+="/>"};return e}()),Hr),Wr=$(jr),Kr={};function Jr(e,t){for(var n,i=[],r=0,o=0,a=[{name:mr("settings.supportTT.title"),icon:"MONEY_HEART",value:null,options:{title:mr("settings.supportTT.title"),subtitle:mr("settings.supportTT.subtitle"),content:(n=[Mr(mr("settings.supportTT.content.1")),Mr(mr("settings.supportTT.content.2")),Mr(mr("settings.supportTT.content.3")),Mr(mr("settings.supportTT.content.4")),Mr(mr("settings.supportTT.content.5")),Mr(mr("settings.supportTT.content.6"))],{scrollPaneRenderer:{content:Lr(n)}})}},{name:mr("settings.options.socialMedia.title"),icon:"PRIVACY_UNLISTED",value:null,options:[{name:"GitHub",link:"https://github.com/reisxd/TizenTube"},{name:"YouTube",link:"https://www.youtube.com/@tizenbrew"},{name:"Discord",link:"https://discord.gg/m2P7v8Y2qR"},{name:`Telegram (${mr("settings.options.socialMedia.announcements")})`,link:"https://t.me/tizentubecobaltofficial"},{name:`Telegram (${mr("settings.options.socialMedia.group")})`,link:"https://t.me/tizentubeofficial"},{name:mr("settings.options.socialMedia.website"),link:"https://tizentube.6513006.xyz"},{name:"Buy Me A Coffee",link:"https://www.buymeacoffee.com/reisxd"},{name:mr("settings.options.socialMedia.githubSponsors"),link:"https://github.com/sponsors/reisxd"}].map(e=>{if(!Kr[e.name]){var t=Wr.qrcode(6,"H");t.addData(e.link),t.make();var n=t.createImgTag(8,8).match(/src="([^"]+)"/)[1];Kr[e.name]=n}return{name:e.name,icon:"OPEN_IN_NEW",value:null,options:{title:e.name,subtitle:e.link,content:Pr([Mr(mr("settings.options.socialMedia.qrCodeScanMessage",{name:e.name})),_r(Kr[e.name])])}}})},{name:mr("settings.options.adBlock"),icon:"DOLLAR_SIGN",value:"enableAdBlock"},{name:mr("settings.options.sponsorblock.title"),icon:"MONEY_HAND",value:null,menuId:"tt-sponsorblock-settings",menuHeader:{title:mr("settings.options.sponsorblock.title"),subtitle:"https://sponsor.ajay.app/"},options:[{name:mr("settings.options.sponsorblock.options.enableSB"),icon:"MONEY_HAND",value:"enableSponsorBlock"},{name:mr("settings.options.sponsorblock.options.manualSkip"),icon:"DOLLAR_SIGN",value:null,arrayToEdit:"sponsorBlockManualSkips",menuId:"tt-sponsorblock-manual-segment-skip",options:[{name:mr("settings.options.sponsorblock.options.categories.sponsor"),icon:"MONEY_HEART",value:"sponsor"},{name:mr("settings.options.sponsorblock.options.categories.intro"),icon:"PLAY_CIRCLE",value:"intro"},{name:mr("settings.options.sponsorblock.options.categories.outro"),value:"outro"},{name:mr("settings.options.sponsorblock.options.categories.interaction"),value:"interaction"},{name:mr("settings.options.sponsorblock.options.categories.selfpromo"),value:"selfpromo"},{name:mr("settings.options.sponsorblock.options.categories.preview"),value:"preview"},{name:mr("settings.options.sponsorblock.options.categories.filler"),value:"filler"},{name:mr("settings.options.sponsorblock.options.categories.music_offtopic"),value:"music_offtopic"}]},{name:mr("settings.options.sponsorblock.options.segments"),icon:"SETTINGS",value:null,menuId:"tt-sponsorblock-segments",options:[{name:mr("settings.options.sponsorblock.options.categories.sponsor"),icon:"MONEY_HEART",value:"enableSponsorBlockSponsor"},{name:mr("settings.options.sponsorblock.options.categories.intro"),icon:"PLAY_CIRCLE",value:"enableSponsorBlockIntro"},{name:mr("settings.options.sponsorblock.options.categories.outro"),value:"enableSponsorBlockOutro"},{name:mr("settings.options.sponsorblock.options.categories.interaction"),value:"enableSponsorBlockInteraction"},{name:mr("settings.options.sponsorblock.options.categories.selfpromo"),value:"enableSponsorBlockSelfPromo"},{name:mr("settings.options.sponsorblock.options.categories.preview"),value:"enableSponsorBlockPreview"},{name:mr("settings.options.sponsorblock.options.categories.filler"),value:"enableSponsorBlockFiller"},{name:mr("settings.options.sponsorblock.options.categories.music_offtopic"),value:"enableSponsorBlockMusicOfftopic"},{name:mr("settings.options.sponsorblock.options.categories.highlights"),icon:"LOCATION_POINT",value:"enableSponsorBlockHighlight"}]},{name:mr("settings.options.sponsorblock.options.showSBToasts"),value:"enableSponsorBlockToasts"}]},{name:mr("settings.options.dearrow.title"),icon:"VISIBILITY_OFF",value:null,menuHeader:{title:mr("settings.options.dearrow.title"),subtitle:"https://dearrow.ajay.app/"},options:[{name:mr("settings.options.dearrow.options.enableDA"),icon:"VISIBILITY_OFF",value:"enableDeArrow"},{name:mr("settings.options.dearrow.options.enableDAThumbnails"),icon:"TV",value:"enableDeArrowThumbnails"}]},{name:mr("settings.options.misc.title"),icon:"SETTINGS",value:null,options:[{name:mr("settings.options.misc.options.endScreenCards"),icon:"VISIBILITY_OFF",value:"enableHideEndScreenCards"},{name:mr("settings.options.misc.options.youThereRenderer"),icon:"HELP",value:"enableYouThereRenderer"},{name:mr("settings.options.misc.options.paidPromoOverlay"),icon:"MONEY_HAND",value:"enablePaidPromotionOverlay"},{name:mr("settings.options.misc.options.whosWatching.title"),icon:"ACCOUNT_CIRCLE",menuId:"tt-whos-watching-menu-settings",value:null,options:[{name:mr("settings.options.misc.options.whosWatching.options.enableWW"),value:"enableWhoIsWatchingMenu"},{name:mr("settings.options.misc.options.whosWatching.options.permaEnableWW"),value:"permanentlyEnableWhoIsWatchingMenu"},{name:mr("settings.options.misc.options.whosWatching.options.enableWWOnExit"),value:"enableWhosWatchingMenuOnAppExit"}]},{name:mr("settings.options.misc.options.fixUI"),icon:"STAR",value:"enableFixedUI"},{name:mr("settings.options.misc.options.hqThumbnails"),icon:"VIDEO_QUALITY",value:"enableHqThumbnails"},{name:mr("settings.options.misc.options.longPress"),value:"enableLongPress"},{name:mr("settings.options.misc.options.shorts"),icon:"YOUTUBE_SHORTS_FILL_24",value:"enableShorts"},{name:mr("settings.options.misc.options.videoPreviews"),value:"enablePreviews"},{name:mr("settings.options.misc.options.ttWelcomeMsg"),value:"showWelcomeToast"},{name:mr("settings.options.misc.options.guestSignInReminder"),value:"enableSigninReminder"},{name:mr("settings.options.misc.options.reloadHomeOnStartup"),value:"reloadHomeOnStartup"}]},{name:mr("settings.options.subtitles.title"),icon:"TRANSLATE",value:null,options:[{name:mr("settings.options.subtitles.options.showLocalSubtitle"),value:"enableShowUserLanguage"},{name:mr("settings.options.subtitles.options.showHiddenSubtitles"),value:"enableShowOtherLanguages"}]},{name:mr("settings.options.videoPlayer.title"),icon:"VIDEO_YOUTUBE",value:null,menuHeader:{title:mr("settings.options.videoPlayer.title"),subtitle:mr("settings.options.videoPlayer.subtitle")},options:[{name:mr("settings.options.videoPlayer.options.patching.title"),icon:"SETTINGS",value:null,menuId:"tt-video-player-ui-patching",options:[{name:mr("settings.options.videoPlayer.options.patching.options.enableVPUIPatching"),icon:"SETTINGS",value:"enablePatchingVideoPlayer"},{name:mr("settings.options.videoPlayer.options.patching.options.previousNextBtns"),icon:"SKIP_NEXT",value:"enablePreviousNextButtons"},{name:mr("settings.options.videoPlayer.options.patching.options.showSuperThxBtn"),icon:"MONEY_HEART",value:"enableSuperThanksButton"},{name:mr("settings.options.videoPlayer.options.patching.options.showAIAskBtn"),icon:"SPARK",value:"enableAIAskButton"},{name:mr("settings.options.videoPlayer.options.patching.options.showSpeedCtrlBtn"),icon:"SLOW_MOTION_VIDEO",value:"enableSpeedControlsButton"},{name:mr("settings.options.videoPlayer.options.patching.options.addMPBtn"),icon:"CLEAR_COOKIES",value:"enableMPButton"},{name:mr("settings.options.videoPlayer.options.patching.options.swapMPWithPIP"),icon:"CLEAR_COOKIES",value:"enableSwapMPWithPIP"}]},{name:mr("settings.options.videoPlayer.options.preferredVideoQuality.title"),icon:"VIDEO_QUALITY",value:null,menuId:"tt-preferred-video-quality",menuHeader:{title:mr("settings.options.videoPlayer.options.preferredVideoQuality.title"),subtitle:mr("settings.options.videoPlayer.options.preferredVideoQuality.subtitle")},options:["Auto","2160p","1440p","1080p","720p","480p","360p","240p","144p"].map(e=>({name:"Auto"===e?mr("settings.options.videoPlayer.options.qualityAuto"):e,key:"preferredVideoQuality",value:e.toLowerCase()}))},{name:mr("settings.options.videoPlayer.options.speedSettings.title"),icon:"SLOW_MOTION_VIDEO",value:null,menuId:"tt-speed-settings-increments",menuHeader:{title:mr("settings.options.videoPlayer.options.speedSettings.title"),subtitle:mr("settings.options.videoPlayer.options.speedSettings.subtitle")},options:[.05,.1,.15,.2,.25,.3,.35,.4,.45,.5].map(e=>({name:`${e}x`,key:"speedSettingsIncrement",value:e}))},{name:mr("settings.options.videoPlayer.options.hideRelatedVideosPlayer"),icon:"VISIBILITY_OFF",value:"hideRelatedVideosPlayer"},{name:mr("settings.options.videoPlayer.options.preferredVideoCodec.title"),icon:"VIDEO_QUALITY",value:null,menuId:"tt-preferred-video-codec",menuHeader:{title:mr("settings.options.videoPlayer.options.preferredVideoCodec.title"),subtitle:mr("settings.options.videoPlayer.options.preferredVideoCodec.subtitle")},options:["any","vp9","av01","avc1"].map(e=>({name:"any"===e?mr("settings.options.videoPlayer.options.codecAny"):e.toUpperCase(),key:"preferredVideoCodec",value:e}))},window.h5vcc&&window.h5vcc.tizentube&&window.h5vcc.tizentube.SetFrameRate?{name:mr("settings.options.videoPlayer.options.afr"),icon:"SLOW_MOTION_VIDEO",value:"autoFrameRate"}:null,window.h5vcc&&window.h5vcc.tizentube&&window.h5vcc.tizentube.SetFrameRate?{name:mr("settings.options.videoPlayer.options.afrPauseDuration.title"),icon:"TIMER",value:null,menuId:"tt-auto-frame-rate-pause-duration",menuHeader:{title:mr("settings.options.videoPlayer.options.afrPauseDuration.title"),subtitle:mr("settings.options.videoPlayer.options.afrPauseDuration.subtitle")},options:[0,.5,1,1.5,2,2.5,3,3.5,4,4.5,5].map(e=>({name:mr(1===e?"settings.options.time.second":"settings.options.time.seconds",{count:e}),key:"autoFrameRatePauseVideoFor",value:1e3*e}))}:null]},{name:mr("settings.options.uiSettings.title"),icon:"SETTINGS",value:null,menuHeader:{title:mr("settings.options.uiSettings.title"),subtitle:mr("settings.options.uiSettings.subtitle")},options:[{name:mr("settings.options.uiSettings.options.hideWatchedVideos.title"),icon:"VISIBILITY_OFF",value:null,menuId:"tt-hide-watched-videos-settings",options:[{name:mr("settings.options.uiSettings.options.hideWatchedVideos.options.enableHideWatchedVideos"),icon:"VISIBILITY_OFF",value:"enableHideWatchedVideos"},{name:mr("settings.options.uiSettings.options.hideWatchedVideos.options.watchedVideosThreshold.title"),value:null,menuId:"tt-hide-watched-videos-threshold",menuHeader:{title:mr("settings.options.uiSettings.options.hideWatchedVideos.options.watchedVideosThreshold.title"),subtitle:mr("settings.options.uiSettings.options.hideWatchedVideos.options.watchedVideosThreshold.subtitle")},options:[0,10,20,30,40,50,60,70,80,90,100].map(e=>({name:`${e}%`,key:"hideWatchedVideosThreshold",value:e}))},{name:mr("settings.options.uiSettings.options.hideWatchedVideos.options.setPagesToHideWatchedVideos"),value:null,arrayToEdit:"hideWatchedVideosPages",menuId:"tt-hide-watched-videos-pages",options:[{name:mr("settings.options.uiSettings.options.categories.searchResults"),value:"search"},{name:mr("settings.options.uiSettings.options.categories.home"),value:"home"},{name:mr("settings.options.uiSettings.options.categories.music"),value:"music"},{name:mr("settings.options.uiSettings.options.categories.gaming"),value:"gaming"},{name:mr("settings.options.uiSettings.options.categories.subscriptions"),value:"subscriptions"},{name:mr("settings.options.uiSettings.options.categories.library"),value:"library"},{name:mr("settings.options.uiSettings.options.categories.more"),value:"more"}]}]},{name:mr("settings.options.uiSettings.options.screenDimming.title"),icon:"EYE_OFF",value:null,menuId:"tt-screen-dimming-settings",options:[{name:mr("settings.options.uiSettings.options.screenDimming.options.enableScreenDimming"),icon:"EYE_OFF",value:"enableScreenDimming"},{name:mr("settings.options.uiSettings.options.screenDimming.options.dimmingTimeout.title"),icon:"TIMER",value:null,menuId:"tt-dimming-timeout",menuHeader:{title:mr("settings.options.uiSettings.options.screenDimming.options.dimmingTimeout.title"),subtitle:mr("settings.options.uiSettings.options.screenDimming.options.dimmingTimeout.subtitle")},options:[10,20,30,60,120,180,240,300].map(e=>({name:e>=60?mr("settings.options.time.minute"+(e/60>1?"s":""),{count:e/60}):mr("settings.options.time.seconds",{count:e}),key:"dimmingTimeout",value:e}))},{name:mr("settings.options.uiSettings.options.screenDimming.options.dimmingOpacity.title"),icon:"LENS_BLUE",value:null,menuId:"tt-dimming-opacity",menuHeader:{title:mr("settings.options.uiSettings.options.screenDimming.options.dimmingOpacity.title"),subtitle:mr("settings.options.uiSettings.options.screenDimming.options.dimmingOpacity.subtitle")},options:[.1,.2,.3,.4,.5,.6,.7,.8,.9,1].map(e=>({name:`${Math.round(100*e)}%`,key:"dimmingOpacity",value:e}))}]},{name:mr("settings.options.uiSettings.options.disableSidebarContents.title"),icon:"MENU",value:null,action:{customAction:{action:"SHOW_GUIDE_SETTINGS",parameters:"disabledSidebarContents"}}},{name:mr("settings.options.uiSettings.options.sortSidebarContents.title"),icon:"MENU",value:null,action:{customAction:{action:"SHOW_GUIDE_SETTINGS",parameters:"sortSidebarContents"}}},{name:mr("settings.options.uiSettings.options.launchToOnStartup.title"),icon:"TV",value:null,menuId:"tt-launch-to-on-startup",menuHeader:{title:mr("settings.options.uiSettings.options.launchToOnStartup.title"),subtitle:mr("settings.options.uiSettings.options.launchToOnStartup.subtitle")},options:[{name:mr("settings.options.uiSettings.options.categories.search"),icon:"SEARCH",key:"launchToOnStartup",value:JSON.stringify({searchEndpoint:{query:""}})},{name:mr("settings.options.uiSettings.options.categories.home"),icon:"WHAT_TO_WATCH",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics"}})},{name:mr("settings.options.uiSettings.options.categories.sports"),icon:"TROPHY",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_sports"}})},{name:mr("settings.options.uiSettings.options.categories.news"),icon:"NEWS",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_news"}})},{name:mr("settings.options.uiSettings.options.categories.music"),icon:"YOUTUBE_MUSIC",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_music"}})},{name:mr("settings.options.uiSettings.options.categories.podcasts"),icon:"BROADCAST",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_podcasts"}})},{name:mr("settings.options.uiSettings.options.categories.moviesAndTv"),icon:"CLAPPERBOARD",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_movies"}})},{name:mr("settings.options.uiSettings.options.categories.gaming"),icon:"GAMING",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_gaming"}})},{name:mr("settings.options.uiSettings.options.categories.live"),icon:"LIVE",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_live"}})},{name:mr("settings.options.uiSettings.options.categories.subscriptions"),icon:"SUBSCRIPTIONS",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEsubscriptions"}})},{name:mr("settings.options.uiSettings.options.categories.library"),icon:"TAB_LIBRARY",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FElibrary"}})},{name:mr("settings.options.uiSettings.options.categories.more"),icon:"TAB_MORE",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_more"}})}]},{name:mr("settings.options.uiSettings.options.sortSubscriptionsByAlphabet"),icon:"SUBSCRIPTIONS",value:"sortSubscriptionsByAlphabet"},{name:mr("settings.options.uiSettings.options.disableChannelsOnSidebar"),value:"disableChannelsOnSidebar"},{name:mr("settings.options.uiSettings.options.clock.title"),value:null,icon:"TIMER",menuId:"tt-clock-settings",menuHeader:{title:mr("settings.options.uiSettings.options.clock.title"),subtitle:mr("settings.options.uiSettings.options.clock.subtitle")},options:[{name:mr("settings.options.uiSettings.options.clock.options.enableClock"),icon:"TIMER",value:"enableClock"},{name:mr("settings.options.uiSettings.options.clock.options.isClock12HourFormat"),icon:"TIMER",value:"isClock12HourFormat"},{name:mr("settings.options.uiSettings.options.clock.options.clockShowSeconds"),icon:"TIMER",value:"clockShowSeconds"},{name:mr("settings.options.uiSettings.options.clock.options.clockHideWhenVideoPlaying"),icon:"EYE_OFF",value:"clockHideWhenVideoPlaying"}]},{name:mr("settings.options.uiSettings.options.disableEnlargingThumbnails"),value:"disableEnlargingThumbnails",icon:null},{name:mr("settings.options.uiSettings.options.enableShrinkingThumbnails"),value:"enableShrinkingThumbnails",icon:null}]},window.h5vcc&&window.h5vcc.tizentube?{name:mr("settings.options.updater.title"),icon:"SYSTEM_UPDATE",value:null,menuHeader:{title:mr("settings.options.updater.title"),subtitle:mr("settings.options.updater.menuSubtitle")},subtitle:mr("settings.options.updater.versionSubtitle",{version:window.h5vcc.tizentube.GetVersion()}),options:[Br({title:mr("settings.options.updater.options.checkForUpdates")},{icon:"SYSTEM_UPDATE"},[{customAction:{action:"CHECK_FOR_UPDATES"}}]),{name:mr("settings.options.updater.options.checkForUpdatesOnStartup"),icon:"SYSTEM_UPDATE",value:"enableUpdater"}]}:null];o<a.length;o++){var s,l=a[o];if(l){var u=l.value?Er(l.value):null;i.push(Br({title:l.name,subtitle:l.subtitle},{icon:l.icon?l.icon:"CHEVRON_DOWN",secondaryIcon:null===u?"CHEVRON_RIGHT":u?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK"},null!==u?[{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:l.value},boolValue:!Er(l.value)}]}},{customAction:{action:"SETTINGS_UPDATE",parameters:[r]}}]:[{customAction:{action:"OPTIONS_SHOW",parameters:{options:l.options,selectedIndex:0,update:!(null===(s=l.options)||void 0===s||!s.title)&&"customUI",menuId:l.menuId,arrayToEdit:l.arrayToEdit,menuHeader:l.menuHeader,action:l.action}}}])),r++}}Fr({title:mr("settings.ttSettings.title"),subtitle:mr("settings.ttSettings.madeByText")},Pr(i,t&&t.length>0?t[0]:0),"tt-settings",e)}function Gr(e,t){if("customUI"!==t){var n=[],i=void 0!==e.arrayToEdit;if(e.action)return to(e.action);if(i){var r,o=Er(e.arrayToEdit),a=f(e.options);try{for(a.s();!(r=a.n()).done;){var s=r.value;n.push(Br({title:s.name,subtitle:s.subtitle},{icon:s.icon?s.icon:"CHEVRON_DOWN",secondaryIcon:o.includes(s.value)?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK"},[{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:e.arrayToEdit},arrayValue:s.value}]}},{customAction:{action:"OPTIONS_SHOW",parameters:{options:e.options,selectedIndex:e.options.indexOf(s),update:!0,menuId:e.menuId,arrayToEdit:e.arrayToEdit,menuHeader:e.menuHeader,action:e.action}}}]))}}catch(e){a.e(e)}finally{a.f()}}else{var l,u=0,c=f(e.options);try{for(c.s();!(l=c.n()).done;){var h,d,p,m=l.value;if(m)if(m.compactLinkRenderer)n.push(m),u++;else{var g=null!==m.key&&void 0!==m.key,v=null===m.value?void 0:Er(g?m.key:m.value);n.push(Br({title:m.name,subtitle:m.subtitle},{icon:m.icon?m.icon:"CHEVRON_DOWN",secondaryIcon:g?v===m.value?"RADIO_BUTTON_CHECKED":"RADIO_BUTTON_UNCHECKED":null===m.value?"CHEVRON_RIGHT":v?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK"},null===m.value?[{customAction:{action:"OPTIONS_SHOW",parameters:{options:m.options,selectedIndex:0,update:!(null===(h=m.options)||void 0===h||!h.title)&&"customUI",menuId:m.menuId,arrayToEdit:m.arrayToEdit,menuHeader:m.menuHeader,action:m.action}}}]:null!==m.key&&void 0!==m.key?[{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:m.key},stringValue:m.value}]}},{customAction:{action:"OPTIONS_SHOW",parameters:{options:e.options,selectedIndex:u,update:null===(d=e.options)||void 0===d||!d.title||"customUI",menuId:e.menuId,arrayToEdit:e.arrayToEdit,menuHeader:e.menuHeader,action:e.action}}}]:[{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:m.value},boolValue:!v}]}},{customAction:{action:"OPTIONS_SHOW",parameters:{options:e.options,selectedIndex:u,update:null===(p=e.options)||void 0===p||!p.title||"customUI",menuId:e.menuId,arrayToEdit:e.arrayToEdit,menuHeader:e.menuHeader,action:e.action}}}])),u++}}}catch(e){c.e(e)}finally{c.f()}}Fr(e.menuHeader?e.menuHeader:mr("settings.ttSettings.title"),Pr(n,e.selectedIndex),e.menuId||"tt-settings-options",t)}else{var y=e.options;Fr({title:y.title,subtitle:y.subtitle},y.content,"tt-settings-support",!1)}}var Xr=setInterval(()=>{document.querySelector("video")&&(!function(){document.querySelector("video").addEventListener("canplay",()=>{document.getElementsByTagName("video")[0].playbackRate=Er("videoSpeed")});var e=e=>{if(406==e.keyCode||191==e.keyCode)return e.preventDefault(),e.stopPropagation(),"keydown"!==e.type||(qr(),!1)};document.addEventListener("keydown",e,!0),document.addEventListener("keypress",e,!0),document.addEventListener("keyup",e,!0)}(),clearInterval(Xr))},1e3);function qr(){for(var e=Er("videoSpeed"),t=0,n=Er("speedSettingsIncrement")||.25,i=[],r=n;r<=5;r+=n){var o=Math.round(100*r)/100;i.push(Br({title:`${o}x`},null,[{signalAction:{signal:"POPUP_BACK"}},{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:"videoSpeed"},intValue:o.toString()}]}},{customAction:{action:"SET_PLAYER_SPEED",parameters:o.toString()}}])),e===o&&(t=i.length-1)}i.push(Br({title:mr("player.playbackSpeed.fixStuttering")},null,[{signalAction:{signal:"POPUP_BACK"}},{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:"videoSpeed"},intValue:"1.0001"}]}},{customAction:{action:"SET_PLAYER_SPEED",parameters:"1.0001"}}])),Fr(mr("player.playbackSpeed.title"),Pr(i,t),"tt-speed")}function Yr(e){var t=window.h5vcc.tizentube.GetVersion(),n=Math.floor(Date.now()/1e3);fetch("https://api.github.com/repos/reisxd/TizenTubeCobalt/releases/latest").then(e=>{if(!e.ok)throw new Error("Network response was not ok");return e.json()}).then(i=>{var r,o,a=i.tag_name.replace("v",""),s=new Date(i.published_at).getTime()/1e3;if(window.h5vcc.tizentube.GetArchitecture&&(r=window.h5vcc.tizentube.GetArchitecture()),o=r?"arm64-v8a"===r?i.assets.find(e=>e.name.includes("arm64.apk")).browser_download_url:i.assets.find(e=>e.name.includes("arm.apk")).browser_download_url:i.assets[0].browser_download_url,a!==t){console.info(`New version available: ${a} (current: ${t})`);var l=`${mr("settings.options.updater.releaseDate",{date:new Date(1e3*s).toLocaleString()})}\n${i.body}`.replace(/#/g,"").replace(/\*/g,"").trim(),u=[Br({title:mr("settings.options.updater.updateNow.title"),subtitle:mr("settings.options.updater.updateNow.subtitle")},{icon:"DOWN_ARROW"},[{customAction:{action:"UPDATE_DOWNLOAD",parameters:o}},{signalAction:{signal:"POPUP_BACK"}}]),Br({title:mr("settings.options.updater.remindLater.title"),subtitle:mr("settings.options.updater.remindLater.subtitle")},{icon:"SEARCH_HISTORY"},[{customAction:{action:"UPDATE_REMIND_LATER",parameters:n+86400}},{signalAction:{signal:"POPUP_BACK"}}])];u.push(Mr(" ")),u.push(Mr(l)),Fr({title:mr("settings.options.updater.updateAvailable.title"),subtitle:mr("settings.options.updater.updateAvailable.subtitle",{latestVersion:a,currentVersion:t})},Pr(u),"tt-update-modal",!1)}else console.info("You are using the latest version of TizenTube."),e&&Tr(mr("settings.options.updater.upToDate.title"),mr("settings.options.updater.upToDate.subtitle",{version:t}),null)}).catch(e=>{console.error("Error fetching the latest release:",e),Tr(mr("settings.options.updater.checkFailed.title"),mr("settings.options.updater.checkFailed.subtitle"),null)})}function $r(e){if(!e||"object"!==D(e))return null;if("string"==typeof e.feedbackToken)return e.feedbackToken;for(var t=0,n=Object.values(e);t<n.length;t++){var i=$r(n[t]);if(i)return i}return null}function Qr(e,t){var n=Object.values(window._yttv).find(e=>e&&e.mappings).get("KabukiInnerTubeClient"),i={path:"/youtubei/v1/get_panel",payload:{panelId:e,params:t}};return new Promise((e,t)=>{n.fetch(i).subscribe(t=>{var n,i=null==t||null===(n=t.content)||void 0===n||null===(n=n.engagementPanelSectionListRenderer)||void 0===n||null===(n=n.content)||void 0===n||null===(n=n.listViewModel)||void 0===n?void 0:n.listItems;Array.isArray(i)?e(i.map(e=>$r(null==e?void 0:e.listItemViewModel)).filter(Boolean)):e([])},t)})}function Zr(e){var t=Object.values(window._yttv).find(e=>e&&e.mappings).get("KabukiInnerTubeClient"),n={path:"/youtubei/v1/feedback",payload:{feedbackTokens:[e]}};return new Promise((e,i)=>{t.fetch(n).subscribe(t=>{e(t)},i)})}function eo(e,t){if("MOVE_GUIDE_BUTTON"===e){var n,i,r=Er("sidebarContentsOrder"),o=(null===(n=t.item.guideEntryRenderer.navigationEndpoint)||void 0===n||null===(n=n.browseEndpoint)||void 0===n?void 0:n.browseId)||(null===(i=t.item.guideEntryRenderer.navigationEndpoint)||void 0===i?void 0:i.searchEndpoint)&&"search",a=r.findIndex(e=>"object"===D(e)&&null!==e?e.browseId===o:e===o);if(-1===a)return eo("",!0);if("up"===t.direction&&a>0){var s=r[a-1];r[a-1]=r[a],r[a]=s}else if("down"===t.direction&&a<r.length-1){var l=r[a+1];r[a+1]=r[a],r[a]=l}return wr("sidebarContentsOrder",r),eo("",!0)}if("SHOW_GUIDE_BUTTONS"===e){var u=t.item.guideEntryRenderer.formattedTitle.simpleText,c=[];return c.push(Br({title:mr("settings.options.uiSettings.options.sortSidebarContents.moveUp.title"),subtitle:mr("settings.options.uiSettings.options.sortSidebarContents.moveUp.subtitle")},{icon:"UP_ARROW"},[{customAction:{action:"MOVE_GUIDE_BUTTON",parameters:{settingType:e,direction:"up",item:t.item}}},{signalAction:{signal:"POPUP_BACK"}}])),c.push(Br({title:mr("settings.options.uiSettings.options.sortSidebarContents.moveDown.title"),subtitle:mr("settings.options.uiSettings.options.sortSidebarContents.moveDown.subtitle")},{icon:"DOWN_ARROW"},[{customAction:{action:"MOVE_GUIDE_BUTTON",parameters:{settingType:e,direction:"down",item:t.item}}},{signalAction:{signal:"POPUP_BACK"}}])),Fr(u,Pr(c),"tt-move-guide-button-modal")}var h,d;(h=Object.values(window._yttv).find(e=>e&&e.mappings).get("KabukiInnerTubeClient"),d={path:"/youtubei/v1/guide"},new Promise((e,t)=>{h.fetch(d).subscribe(t=>{e(t)})})).then(n=>{var i,r=[],o=0,a=f(n.items[0].guideSectionRenderer.originalItems||n.items[0].guideSectionRenderer.items);try{for(a.s();!(i=a.n()).done;){var s,l,u,c=i.value,h=c.guideEntryRenderer.formattedTitle.simpleText,d=null===(s=c.guideEntryRenderer.icon)||void 0===s?void 0:s.iconType,p=null!==(l=c.guideEntryRenderer.navigationEndpoint)&&void 0!==l&&l.browseEndpoint?c.guideEntryRenderer.navigationEndpoint.browseEndpoint.browseId:"search";r.push(Br({title:h},{icon:d,secondaryIcon:"disabledSidebarContents"===e?null!==(u=Er(e))&&void 0!==u&&u.includes(p)?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK":null},["disabledSidebarContents"===e?{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:"disabledSidebarContents"},arrayValue:p}]}}:{customAction:{action:"SHOW_GUIDE_BUTTONS",parameters:{settingType:e,idx:o,item:c}}},..."disabledSidebarContents"===e?[{customAction:{action:"RELOAD_GUIDE_OPTIONS",parameters:{settingType:e,idx:o,item:c}}}]:[]])),o++}}catch(e){a.e(e)}finally{a.f()}Fr({title:mr("disabledSidebarContents"===e?"settings.options.uiSettings.options.disableSidebarContents.title":"settings.options.uiSettings.options.sortSidebarContents.title"),subtitle:mr("disabledSidebarContents"===e?"settings.options.uiSettings.options.disableSidebarContents.subtitle":"settings.options.uiSettings.options.sortSidebarContents.subtitle")},Pr(r),"tt-sidebar-settings",!0===t)})}function to(e,t){for(var n in window._yttv)if(window._yttv[n]&&window._yttv[n].instance&&window._yttv[n].instance.resolveCommand)return window._yttv[n].instance.resolveCommand(e,t)}function no(e,t){switch(e){case"SETTINGS_UPDATE":Jr(!0,t);break;case"OPTIONS_SHOW":Gr(t,t.update);break;case"SKIP":var n=document.createEvent("Event");n.initEvent("keydown",!0,!0),n.keyCode=27,n.which=27,document.dispatchEvent(n),document.querySelector("video").currentTime=t.time;break;case"TT_SETTINGS_SHOW":Jr();break;case"TT_SPEED_SETTINGS_SHOW":qr();break;case"UPDATE_REMIND_LATER":wr("dontCheckUpdateUntil",t);break;case"UPDATE_DOWNLOAD":window.h5vcc.tizentube.InstallAppFromURL(t),Tr(mr("settings.options.updater.downloading.title"),mr("settings.options.updater.downloading.subtitle"));break;case"SET_PLAYER_SPEED":var i=Number(t);document.querySelector("video").playbackRate=i;break;case"ENTER_MP":!function(){if(Cr){var e=Math.floor(document.querySelector("video").currentTime),t=document.querySelector("video"),n=document.querySelector("ytlr-player"),i=document.querySelector("ytlr-player-container"),r=new MutationObserver(o=>{o.forEach(o=>{if("class"===o.attributeName&&!n.classList.contains("ytLrPlayerEnabled")){function a(){i.style.zIndex="10",n.style.display="block",n.style.backgroundColor="rgba(0,0,0,0)"}function s(){t.style.removeProperty("inset");var e=window.innerWidth/3.5,n=window.innerHeight/3.5;t.style.width=`${e}px`,t.style.height=`${n}px`,t.style.top="68vh",t.style.left="68vw",window.isPipPlaying=!0,t.removeEventListener("play",s)}a(),setTimeout(a,500),t.addEventListener("play",s),r.disconnect(),setTimeout(()=>{Cr.loadedPlaybackConfig.watchEndpoint.startTimeSeconds=e,Cr.loadVideo(Cr.loadedPlaybackConfig)},1e3)}})});r.observe(n,{attributes:!0}),to({signalAction:{signal:"HISTORY_BACK"}})}}();break;case"ENTER_PIP":window.h5vcc.tizentube.EnterPIP();break;case"SHOW_TOAST":Tr("TizenTube",t);break;case"ADD_TO_QUEUE":window.queuedVideos.videos.push(t),Tr("TizenTube",mr("toasts.videoAddedToQueue"));break;case"CLEAR_QUEUE":window.queuedVideos.videos=[],Tr("TizenTube",mr("toasts.videoQueueCleared"));break;case"CHECK_FOR_UPDATES":Yr(!0);break;case"GO_TO_CHANNEL":!function(e){var t=Object.values(window._yttv).find(e=>e&&e.mappings),n=t.get("CurrentIdentityService"),i=t.get("KabukiInnerTubeClient"),r=e.tileRenderer?e.tileRenderer.contentId:e.lockupViewModel.contentId,o=e.tileRenderer?e.tileRenderer.onSelectCommand.watchEndpoint.params:e.lockupViewModel.rendererContext.commandContext.onTap.innertubeCommand.watchEndpoint.params,a=Math.floor(2e3*Math.random());n.get().then(e=>{var t={identity:e,isPrefetch:!1,path:"/youtubei/v1/next",payload:{videoId:r,params:o,racyCheckOk:!0,contentCheckOk:!0,playbackContext:{lactMilliseconds:a,isLyricsMode:!1},autonavState:"STATE_NONE",mdxContext:{mdxReceiverContext:{mdxConnectedDevices:[]}}},clickTracking:{clickTrackingParams:null}};i.fetch(t).subscribe(e=>{var t,n=null==e||null===(t=e.contents)||void 0===t||null===(t=t.singleColumnWatchNextResults)||void 0===t||null===(t=t.results)||void 0===t||null===(t=t.results)||void 0===t?void 0:t.contents;if(n){var i,r=n.find(e=>e.itemSectionRenderer),o=null==r||null===(i=r.itemSectionRenderer)||void 0===i||null===(i=i.contents)||void 0===i?void 0:i.find(e=>e.videoMetadataRenderer);if(o){var a,s=null===(a=o.videoMetadataRenderer)||void 0===a||null===(a=a.owner)||void 0===a||null===(a=a.videoOwnerRenderer)||void 0===a?void 0:a.navigationEndpoint;s&&to(s)}}})})}(t);break;case"NOT_INTERESTED":io(t,0,!0);break;case"DONT_RECOMMEND_CHANNEL":io(t,1,!1);break;case"FEEDBACK_REASON":Zr(t.token).then(()=>{to({signalAction:{signal:"POPUP_BACK"}}),Tr("TizenTube",mr("toasts.feedbackSent"))}).catch(e=>console.error("TizenTube: failed to send feedback:",e));break;case"SHARE":var r=`https://www.youtube.com/watch?v=${document.querySelector(".html5-video-player").getVideoData().video_id}`,o=Wr.qrcode(6,"H");o.addData(r),o.make();var a=o.createImgTag(8,8).match(/src="([^"]+)"/)[1];Fr({title:mr("player.share.title")},Pr([Mr(mr("player.share.qrCodeScanMessage")),_r(a)]),"tt-share-modal");break;case"SHOW_GUIDE_BUTTONS":eo("SHOW_GUIDE_BUTTONS",t);break;case"RELOAD_GUIDE_OPTIONS":eo(t.settingType,!0);break;case"MOVE_GUIDE_BUTTON":eo("MOVE_GUIDE_BUTTON",t);break;case"SHOW_GUIDE_SETTINGS":eo(t);break;case"ADD_OR_REMOVE_CHANNEL_TO_SIDEBAR":var s=Er("sidebarContentsOrder");s.find(e=>e.browseId===t.browseId)?s.splice(s.findIndex(e=>e.browseId===t.browseId),1):s.push({browseId:t.browseId,title:t.title}),wr("sidebarContentsOrder",s),Tr(mr("toasts.sidebarContentsUpdated.title"),mr("toasts.sidebarContentsUpdated.subtitle"));break;case"SCREEN_OFF":var l,u=f(document.body.children);try{for(u.s();!(l=u.n()).done;){var c=l.value;"script"!==c.tagName.toLowerCase()&&"svg"!==c.tagName.toLowerCase()&&c.style.setProperty("display","none","important")}}catch(e){u.e(e)}finally{u.f()}window.screenTurnedOffAt=Date.now()}}function io(e,t,n){return ro.apply(this,arguments)}function ro(){return(ro=c(S().m(function e(t,n,i){var r,o,a,s,l,u,c,h;return S().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,Qr(t.panelId,t.params);case 1:if(o=e.v,a=o[n]){e.n=2;break}return e.a(2);case 2:return e.n=3,Zr(a);case 3:if(s=e.v,i){e.n=4;break}return e.a(2);case 4:if(l=null==s||null===(r=s.feedbackResponses)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.followUpDialog)||void 0===r?void 0:r.dismissalFollowUpRenderer,u=null==l?void 0:l.reasons,Array.isArray(u)&&u.length){e.n=5;break}return e.a(2);case 5:c=u.map(e=>Br({title:oo(e.title)},null,[{signalAction:{signal:"POPUP_BACK"}},{customAction:{action:"FEEDBACK_REASON",parameters:{token:e.token}}}])),Fr(oo(l.dismissalReasonsPrompt),Pr(c),"tt-feedback-reasons"),e.n=7;break;case 6:e.p=6,h=e.v,console.error("TizenTube: failed to mark feedback:",h);case 7:return e.a(2)}},e,null,[[0,6]])}))).apply(this,arguments)}function oo(e){return e?e.simpleText?e.simpleText:e.content?e.content:Array.isArray(e.runs)?e.runs.map(e=>{var t;return null!==(t=null==e?void 0:e.text)&&void 0!==t?t:""}).join(""):String(e):""}setTimeout(()=>{if(window.h5vcc&&window.h5vcc.tizentube&&Er("enableUpdater")){var e=Math.floor(Date.now()/1e3);Er("dontCheckUpdateUntil")>e?console.info("Skipping update check until",new Date(1e3*Er("dontCheckUpdateUntil")).toLocaleString()):Yr()}},2500);var ao=JSON.parse;JSON.parse=function(){var e=ao.apply(this,arguments);try{var t,n,i,r,o,a,s,l,u,c,h,d,p,m,g,v=Er("enableAdBlock"),y=Er("enableSigninReminder");if(null!=e&&null!==(t=e.playbackContext)&&void 0!==t&&t.contentPlaybackContext,e.adPlacements&&v&&(e.adPlacements=[]),e.playerAds&&v&&(e.playerAds=!1),e.adSlots&&v&&(e.adSlots=[]),e.paidContentOverlay&&!Er("enablePaidPromotionOverlay")&&(e.paidContentOverlay=null),function(e,t){if(!e||!e.streamingData||!Array.isArray(e.streamingData.adaptiveFormats))return{changed:!1,reason:"no-formats"};if("vp9"!==t&&"av01"!==t&&"avc1"!==t)return{changed:!1,reason:"automatic"};var n=e.streamingData.adaptiveFormats,i=n.filter(e=>e&&"string"==typeof e.mimeType&&/^video\//i.test(e.mimeType)),r=e=>{var n=e.mimeType.toLowerCase();return"vp9"===t?/(?:vp9|vp09)/.test(n):"av01"===t?/av01/.test(n):/avc1/.test(n)},o=i.filter(r);if(!o.length)return{changed:!1,reason:"codec-unavailable"};if(o.length===i.length)return{changed:!1,reason:"already-selected"};var a=e=>Number.isFinite(e.height)&&e.height>0&&Number.isFinite(e.fps)&&e.fps>0;if(!i.every(a)||!o.every(a))return{changed:!1,reason:"quality-unknown"};var s=Math.max(...i.map(e=>e.height)),l=Math.max(...i.filter(e=>e.height===s).map(e=>e.fps));if(!o.some(e=>e.height>=s&&e.fps>=l))return{changed:!1,reason:"quality-fallback"};var u=n.filter(e=>!e||"string"!=typeof e.mimeType||!/^video\//i.test(e.mimeType)||r(e));u.some(e=>e&&/^audio\//i.test(e.mimeType||""))&&(e.streamingData.adaptiveFormats=u)}(e,Er("preferredVideoCodec")),null!=e&&null!==(n=e.contents)&&void 0!==n&&null!==(n=n.tvBrowseRenderer)&&void 0!==n&&null!==(n=n.content)&&void 0!==n&&null!==(n=n.tvSurfaceContentRenderer)&&void 0!==n&&null!==(n=n.content)&&void 0!==n&&null!==(n=n.sectionListRenderer)&&void 0!==n&&n.contents){if(y||(e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents=e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents.filter(e=>!e.feedNudgeRenderer)),v){e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents=e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents.filter(e=>!e.adSlotRenderer);var b,S=f(e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents);try{for(S.s();!(b=S.n()).done;){var x,E=b.value;E.shelfRenderer&&null!==(x=E.shelfRenderer.content)&&void 0!==x&&null!==(x=x.horizontalListRenderer)&&void 0!==x&&x.items&&(E.shelfRenderer.content.horizontalListRenderer.items=E.shelfRenderer.content.horizontalListRenderer.items.filter(e=>!e.adSlotRenderer))}}catch(e){S.e(e)}finally{S.f()}}uo(e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents)}if(null!=e&&null!==(i=e.contents)&&void 0!==i&&null!==(i=i.tvBrowseRenderer)&&void 0!==i&&null!==(i=i.content)&&void 0!==i&&null!==(i=i.tvSurfaceContentRenderer)&&void 0!==i&&null!==(i=i.content)&&void 0!==i&&null!==(i=i.gridRenderer)&&void 0!==i&&i.items&&mo(e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.gridRenderer.items),e.endscreen&&Er("enableHideEndScreenCards")&&(e.endscreen=null),e.messages&&Array.isArray(e.messages)&&!Er("enableYouThereRenderer")&&(e.messages=e.messages.filter(e=>!(null!=e&&e.youThereRenderer))),!Array.isArray(e)&&null!=e&&e.entries&&v)e.entries=null===(m=e.entries)||void 0===m?void 0:m.filter(e=>{var t;return!(null!=e&&null!==(t=e.command)&&void 0!==t&&null!==(t=t.reelWatchEndpoint)&&void 0!==t&&null!==(t=t.adClientParams)&&void 0!==t&&t.isAd)});if(null!=e&&null!==(r=e.title)&&void 0!==r&&r.runs&&function(e){var t,n,i,r,o=function(e,t,n){var i={settingCategoryCollectionRenderer:{items:t,categoryId:e,focused:!1,trackingParams:"null"}};return n&&(i.settingCategoryCollectionRenderer.title={runs:[{text:n}]}),i}("tizentube_category",[(t=mr("settings.ttSettings.title"),n="tizentube_open_action",i={customAction:{action:"TT_SETTINGS_SHOW",parameters:[]}},r=mr("settings.ttSettings.summary"),{settingActionRenderer:{title:{runs:[{text:t}]},serviceEndpoint:i,summary:{runs:[{text:r}]},trackingParams:"null",actionLabel:{runs:[{text:t}]},itemId:n,thumbnail:{thumbnails:[{url:"https://www.gstatic.com/ytlr/img/parent_code.png"}]}}})]);e.items.unshift(o)}(e),null!=e&&null!==(o=e.contents)&&void 0!==o&&null!==(o=o.sectionListRenderer)&&void 0!==o&&o.contents&&uo(e.contents.sectionListRenderer.contents),null!=e&&null!==(a=e.continuationContents)&&void 0!==a&&null!==(a=a.sectionListContinuation)&&void 0!==a&&a.contents&&uo(e.continuationContents.sectionListContinuation.contents),null!=e&&null!==(s=e.continuationContents)&&void 0!==s&&null!==(s=s.horizontalListContinuation)&&void 0!==s&&s.items&&(ho(e.continuationContents.horizontalListContinuation.items),po(e.continuationContents.horizontalListContinuation.items),mo(e.continuationContents.horizontalListContinuation.items),e.continuationContents.horizontalListContinuation.items=go(e.continuationContents.horizontalListContinuation.items)),null!=e&&null!==(l=e.continuationContents)&&void 0!==l&&null!==(l=l.gridContinuation)&&void 0!==l&&l.items&&mo(e.continuationContents.gridContinuation.items),null!=e&&null!==(u=e.contents)&&void 0!==u&&null!==(u=u.tvBrowseRenderer)&&void 0!==u&&null!==(u=u.content)&&void 0!==u&&null!==(u=u.tvSecondaryNavRenderer)&&void 0!==u&&u.sections)for(var w=0;w<e.contents.tvBrowseRenderer.content.tvSecondaryNavRenderer.sections.length;w++){var C=e.contents.tvBrowseRenderer.content.tvSecondaryNavRenderer.sections[w].tvSecondaryNavSectionRenderer;if(C&&C.tabs){Er("sortSubscriptionsByAlphabet")&&C.tabs.sort((e,t)=>e.tabRenderer.selected&&!t.tabRenderer.selected?-1:!e.tabRenderer.selected&&t.tabRenderer.selected?1:e.tabRenderer.title.localeCompare(t.tabRenderer.title));for(var k=0;k<C.tabs.length;k++){var A,T,F,P=C.tabs[k],B=null===(A=P.tabRenderer.content)||void 0===A||null===(A=A.tvSurfaceContentRenderer)||void 0===A?void 0:A.content;if(null!=B&&null!==(T=B.sectionListRenderer)&&void 0!==T&&T.contents){var I=C.tabs.indexOf(P),O=B.sectionListRenderer.contents;uo(O),C.tabs[I].tabRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents=O}null!=B&&null!==(F=B.gridRenderer)&&void 0!==F&&F.items&&mo(B.gridRenderer.items)}}}if(null!=e&&null!==(c=e.contents)&&void 0!==c&&null!==(c=c.singleColumnWatchNextResults)&&void 0!==c&&null!==(c=c.pivot)&&void 0!==c&&c.sectionListRenderer&&(Er("hideRelatedVideosPlayer")&&(e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents=[{}],e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.continuations=[]),y||(e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents=e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents.filter(e=>!e.alertWithActionsRenderer)),uo(e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents,!1),window.queuedVideos.videos.length>0)){var N=window.queuedVideos.videos.slice();N.unshift({tileRenderer:{contentType:"TILE_CONTENT_TYPE_VIDEO",metadata:{tileMetadataRenderer:{title:{simpleText:"Clear Queue"}}},onSelectCommand:{customAction:{action:"CLEAR_QUEUE"}},style:"TILE_STYLE_YTLR_DEFAULT"}}),e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents.unshift(function(e,t){return{shelfRenderer:{shelfHeaderRenderer:{title:{simpleText:e}},tvhtml5ShelfRendererType:"TVHTML5_SHELF_RENDERER_TYPE_GRID",content:{horizontalListRenderer:{items:t,selectedIndex:arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,visibleItemCount:3}}}}}("Queued Videos",N,-1!==N.findIndex(e=>e.contentId===window.queuedVideos.lastVideoId)?N.findIndex(e=>e.contentId===window.queuedVideos.lastVideoId):0))}if(null!=e&&null!==(h=e.playerOverlays)&&void 0!==h&&h.playerOverlayRenderer&&(e.playerOverlays.playerOverlayRenderer.timelyActionRenderers?e.playerOverlays.playerOverlayRenderer.timelyActionRenderers=e.playerOverlays.playerOverlayRenderer.timelyActionRenderers.filter(e=>"TIMELY_ACTION_TYPE_SHOPPING"!==e.timelyActionRenderer.type&&"TIMELY_ACTION_TYPE_NFL_WATERMARK"!==e.timelyActionRenderer.type):e.playerOverlays.playerOverlayRenderer.timelyActionRenderers=[],Er("sponsorBlockManualSkips").length>0)){var R,L=Er("sponsorBlockManualSkips");if(null!==(R=window)&&void 0!==R&&null!==(R=R.sponsorblock)&&void 0!==R&&R.segments){var M,_=f(window.sponsorblock.segments);try{for(_.s();!(M=_.n()).done;){var U=M.value;if(L.includes(U.category)){var z=Ir(mr("sponsorblock.toasts.skip",{segment:mr(`sponsorblock.segments.${U.category}`)}),"SKIP_NEXT",{clickTrackingParams:null,showEngagementPanelEndpoint:{customAction:{action:"SKIP",parameters:{time:U.segment[1]}}}},1e3*U.segment[0],1e3*U.segment[1]-1e3*U.segment[0]);e.playerOverlays.playerOverlayRenderer.timelyActionRenderers.push(z)}}}catch(e){_.e(e)}finally{_.f()}}}if(null!=e&&null!==(d=e.transportControls)&&void 0!==d&&null!==(d=d.transportControlsRenderer)&&void 0!==d&&d.promotedActions&&Er("enableSponsorBlockHighlight"))if(null!==(g=window)&&void 0!==g&&null!==(g=g.sponsorblock)&&void 0!==g&&g.segments){var V=window.sponsorblock.segments.find(e=>"poi_highlight"===e.category);V&&e.transportControls.transportControlsRenderer.promotedActions.push({type:"TRANSPORT_CONTROLS_BUTTON_TYPE_SPONSORBLOCK_HIGHLIGHT",button:{buttonRenderer:Ur(!1,mr("sponsorblock.toasts.skipToHighlight"),"SKIP_NEXT",{clickTrackingParams:null,customAction:{action:"SKIP",parameters:{time:V.segment[0]}}})}})}if(null!=e&&null!==(p=e.contents)&&void 0!==p&&null!==(p=p.tvBrowseRenderer)&&void 0!==p&&null!==(p=p.content)&&void 0!==p&&null!==(p=p.tvSurfaceContentRenderer)&&void 0!==p&&null!==(p=p.header)&&void 0!==p&&null!==(p=p.channelHeaderRenderer)&&void 0!==p&&p.buttons){var H,j,W=null,K=e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.header.channelHeaderRenderer.title.simpleText,J=f(e.responseContext.serviceTrackingParams);try{for(J.s();!(j=J.n()).done;){var G,X=f(j.value.params);try{for(X.s();!(G=X.n()).done;){var q=G.value;if("browse_id"===q.key){W=q.value;break}}}catch(e){X.e(e)}finally{X.f()}if(W)break}}catch(e){J.e(e)}finally{J.f()}var Y=null===(H=Er("sidebarContentsOrder"))||void 0===H?void 0:H.some(e=>("object"===D(e)?e.browseId:e)===W);e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.header.channelHeaderRenderer.buttons.push({buttonRenderer:Ur(!1,mr(Y?"settings.options.uiSettings.options.sortSidebarContents.removeFromSidebar":"settings.options.uiSettings.options.sortSidebarContents.addToSidebar"),Y?"REMOVE":"ADD",{customAction:{action:"ADD_OR_REMOVE_CHANNEL_TO_SIDEBAR",parameters:{browseId:W,title:K}}})})}}catch(e){console.error("An error occured while processing the JSON:",e)}return e};var so=JSON.stringify;for(var lo in JSON.stringify=function(e,t,n){var i;if(null!=e&&null!==(i=e.playbackContext)&&void 0!==i&&i.contentPlaybackContext){var r=JSON.parse(so(e));if(!r.playbackContext.contentPlaybackContext.isInlinePlaybackNoAd)return r.playbackContext.contentPlaybackContext.isInlinePlaybackNoAd=!0,so.call(this,r,t,n)}return so.call(this,e,t,n)},window.JSON.stringify=JSON.stringify,window.JSON.parse=JSON.parse,window._yttv)window._yttv[lo]&&window._yttv[lo].JSON&&window._yttv[lo].JSON.parse&&(window._yttv[lo].JSON.parse=JSON.parse);function uo(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=f(e);try{for(i.s();!(t=i.n()).done;){var r=t.value;if(r.shelfRenderer){var o;if(r.shelfRenderer.tvhtml5Style||(r.shelfRenderer.tvhtml5Style={effects:{}}),Er("disableEnlargingThumbnails")&&(r.shelfRenderer.tvhtml5Style.effects.enlarge=!1),Er("enableShrinkingThumbnails")&&(r.shelfRenderer.tvhtml5Style.effects.shrink=!0),null===(o=r.shelfRenderer.content)||void 0===o||null===(o=o.horizontalListRenderer)||void 0===o||!o.items)continue;if(ho(r.shelfRenderer.content.horizontalListRenderer.items),po(r.shelfRenderer.content.horizontalListRenderer.items),mo(r.shelfRenderer.content.horizontalListRenderer.items),n&&co(r.shelfRenderer.content.horizontalListRenderer.items),r.shelfRenderer.content.horizontalListRenderer.items=go(r.shelfRenderer.content.horizontalListRenderer.items),!Er("enableShorts")){if("TVHTML5_SHELF_RENDERER_TYPE_SHORTS"===r.shelfRenderer.tvhtml5ShelfRendererType){e.splice(e.indexOf(r),1);continue}r.shelfRenderer.content.horizontalListRenderer.items=r.shelfRenderer.content.horizontalListRenderer.items.filter(e=>{var t;return"TVHTML5_TILE_RENDERER_TYPE_SHORTS"!==(null===(t=e.tileRenderer)||void 0===t?void 0:t.tvhtml5ShelfRendererType)}),r.shelfRenderer.content.horizontalListRenderer.items=r.shelfRenderer.content.horizontalListRenderer.items.filter(e=>{var t;return"LOCKUP_CONTENT_TYPE_SHORT"!==(null===(t=e.lockupViewModel)||void 0===t?void 0:t.contentType)}),r.shelfRenderer.content.horizontalListRenderer.items=r.shelfRenderer.content.horizontalListRenderer.items.filter(e=>{var t;return!(null!==(t=e.tileRenderer)&&void 0!==t&&null!==(t=t.onSelectCommand)&&void 0!==t&&t.reelWatchEndpoint)})}}}}catch(e){i.e(e)}finally{i.f()}}function co(e){if(Er("enablePreviews")){var t,n=f(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.tileRenderer){var r,o,a=i.tileRenderer.onSelectCommand,s=JSON.parse(JSON.stringify(a));if(null!==(r=i.tileRenderer)&&void 0!==r&&null!==(r=r.onFocusCommand)&&void 0!==r&&r.playbackEndpoint)continue;if(null!==(o=i.tileRenderer)&&void 0!==o&&null!==(o=o.onFocusCommand)&&void 0!==o&&o.commandExecutorCommand)continue;i.tileRenderer.onFocusCommand={startInlinePlaybackCommand:{blockAdoption:!0,caption:!1,delayMs:3e3,durationMs:4e4,muted:!1,restartPlaybackBeforeSeconds:10,resumeVideo:!0,playbackEndpoint:s}}}}}catch(e){n.e(e)}finally{n.f()}}}function ho(e){var t,n=f(e);try{var i=function(){var n,i=t.value;if(i.adSlotRenderer){var r=e.indexOf(i);return e.splice(r,1),0}if(!i.tileRenderer&&i.lockupViewModel)return 0;if("LOCKUP_CONTENT_TYPE_VIDEO"!==!(null!=i&&null!==(n=i.lockupViewModel)&&void 0!==n&&n.contentType))return 0;if(Er("enableDeArrow")){var o=i.tileRenderer.contentId||i.lockupViewModel.contentId;fetch(`https://sponsor.ajay.app/api/branding?videoID=${o}`).then(e=>e.json()).then(e=>{if(e.titles.length>0){var t=e.titles.reduce((e,t)=>e.votes>t.votes?e:t);i.tileRenderer?i.tileRenderer.metadata.tileMetadataRenderer.title.simpleText=t.title:i.lockupViewModel.metadata.lockupMetadataViewModel.title.content=t.title}if(e.thumbnails.length>0&&Er("enableDeArrowThumbnails")){var n=e.thumbnails.reduce((e,t)=>e.votes>t.votes?e:t);n.timestamp&&(i.tileRenderer?i.tileRenderer.header.tileHeaderRenderer.thumbnail.thumbnails=[{url:`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${o}&time=${n.timestamp}`,width:1280,height:640}]:i.lockupViewModel.contentImage.thumbnailViewModel.image.sources=[{url:`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${o}&time=${n.timestamp}`,width:1280,height:640}])}}).catch(()=>{})}};for(n.s();!(t=n.n()).done;)i()}catch(e){n.e(e)}finally{n.f()}}function po(e){var t,n=f(e);try{for(n.s();!(t=n.n()).done;){var i,r,o=t.value;if((o.tileRenderer||o.lockupViewModel)&&(("TILE_STYLE_YTLR_DEFAULT"===(null==o||null===(i=o.tileRenderer)||void 0===i?void 0:i.style)||"LOCKUP_CONTENT_TYPE_VIDEO"===(null==o||null===(r=o.lockupViewModel)||void 0===r?void 0:r.contentType))&&Er("enableHqThumbnails"))){var a,s,l,u;if(!(null!=o&&null!==(a=o.tileRenderer)&&void 0!==a&&null!==(a=a.onSelectCommand)&&void 0!==a&&null!==(a=a.watchEndpoint)&&void 0!==a&&a.videoId||null!=o&&null!==(s=o.lockupViewModel)&&void 0!==s&&s.contentId))continue;if(!(null!=o&&null!==(l=o.tileRenderer)&&void 0!==l&&null!==(l=l.header)&&void 0!==l&&null!==(l=l.tileHeaderRenderer)&&void 0!==l&&null!==(l=l.thumbnail)&&void 0!==l&&null!==(l=l.thumbnails)&&void 0!==l&&null!==(l=l[0])&&void 0!==l&&l.url||null!=o&&null!==(u=o.lockupViewModel)&&void 0!==u&&null!==(u=u.contentImage)&&void 0!==u&&null!==(u=u.thumbnailViewModel)&&void 0!==u&&null!==(u=u.image)&&void 0!==u&&null!==(u=u.sources)&&void 0!==u&&null!==(u=u[0])&&void 0!==u&&u.url))continue;var c=o.tileRenderer?o.tileRenderer.onSelectCommand.watchEndpoint.videoId:o.lockupViewModel.contentId,h=o.tileRenderer?o.tileRenderer.header.tileHeaderRenderer.thumbnail.thumbnails[0].url.split("?")[1]:o.lockupViewModel.contentImage.thumbnailViewModel.image.sources[0].url.split("?")[1];o.tileRenderer?o.tileRenderer.header.tileHeaderRenderer.thumbnail.thumbnails=[{url:`https://i.ytimg.com/vi/${c}/sddefault.jpg${h?`?${h}`:""}`,width:640,height:480}]:o.lockupViewModel.contentImage.thumbnailViewModel.image.sources=[{url:`https://i.ytimg.com/vi/${c}/sddefault.jpg${h?`?${h}`:""}`,width:640,height:480}]}}}catch(e){n.e(e)}finally{n.f()}}function mo(e){var t,n=f(e);try{for(n.s();!(t=n.n()).done;){var i,r,o,a,s,l,u,c,h,d,p,m,g,v,y,b,S,x,E,w,D=t.value;if((D.tileRenderer||D.lockupViewModel)&&("TILE_STYLE_YTLR_DEFAULT"===(null==D||null===(i=D.tileRenderer)||void 0===i?void 0:i.style)||"LOCKUP_CONTENT_TYPE_VIDEO"===(null==D||null===(r=D.lockupViewModel)||void 0===r?void 0:r.contentType)))if(null!=D&&null!==(o=D.tileRenderer)&&void 0!==o&&null!==(o=o.onLongPressCommand)&&void 0!==o&&null!==(o=o.showMenuCommand)&&void 0!==o&&null!==(o=o.menu)&&void 0!==o&&null!==(o=o.menuRenderer)&&void 0!==o&&o.items||null!=D&&null!==(a=D.lockupViewModel)&&void 0!==a&&null!==(a=a.rendererContext)&&void 0!==a&&null!==(a=a.commandContext)&&void 0!==a&&null!==(a=a.onLongPress)&&void 0!==a&&null!==(a=a.innertubeCommand)&&void 0!==a&&null!==(a=a.showMenuCommand)&&void 0!==a&&null!==(a=a.menu)&&void 0!==a&&null!==(a=a.menuRenderer)&&void 0!==a&&a.items){var C=Nr("Add to Queue",{clickTrackingParams:null,playlistEditEndpoint:{customAction:{action:"ADD_TO_QUEUE",parameters:JSON.parse(JSON.stringify(D))}}}),k=D.tileRenderer?D.tileRenderer.onLongPressCommand.showMenuCommand.menu.menuRenderer.items:D.lockupViewModel.rendererContext.commandContext.onLongPress.innertubeCommand.showMenuCommand.menu.menuRenderer.items;k.push(C),fo(D,k)}else if(Er("enableLongPress")&&(null!==(s=D.tileRenderer)&&void 0!==s&&null!==(s=s.metadata)&&void 0!==s&&s.tileMetadataRenderer||null!==(l=D.lockupViewModel)&&void 0!==l&&null!==(l=l.metadata)&&void 0!==l&&l.lockupMetadataViewModel)&&(null!==(u=D.tileRenderer)&&void 0!==u&&null!==(u=u.header)&&void 0!==u&&null!==(u=u.tileHeaderRenderer)&&void 0!==u&&null!==(u=u.thumbnail)&&void 0!==u&&u.thumbnails||null!==(c=D.lockupViewModel)&&void 0!==c&&null!==(c=c.contentImage)&&void 0!==c&&null!==(c=c.thumbnailViewModel)&&void 0!==c&&null!==(c=c.image)&&void 0!==c&&c.sources)&&(null!=D&&null!==(h=D.tileRenderer)&&void 0!==h&&null!==(h=h.onSelectCommand)&&void 0!==h&&h.watchEndpoint||null!=D&&null!==(d=D.lockupViewModel)&&void 0!==d&&null!==(d=d.rendererContext)&&void 0!==d&&null!==(d=d.commandContext)&&void 0!==d&&null!==(d=d.onTap)&&void 0!==d&&null!==(d=d.innertubeCommand)&&void 0!==d&&d.watchEndpoint)){var A=JSON.parse(JSON.stringify(D)),T=null!=A&&A.tileRenderer?null===(p=A.tileRenderer.metadata)||void 0===p||null===(p=p.tileMetadataRenderer)||void 0===p||null===(p=p.lines)||void 0===p||null===(p=p[0])||void 0===p||null===(p=p.lineRenderer)||void 0===p||null===(p=p.items)||void 0===p||null===(p=p[0])||void 0===p||null===(p=p.lineItemRenderer)||void 0===p?void 0:p.text:null===(m=A.lockupViewModel.metadata)||void 0===m||null===(m=m.lockupMetadataViewModel)||void 0===m||null===(m=m.metadata)||void 0===m||null===(m=m.contentMetadataViewModel)||void 0===m||null===(m=m.metadataRows)||void 0===m||null===(m=m[0])||void 0===m||null===(m=m.metadataParts)||void 0===m||null===(m=m[0])||void 0===m||null===(m=m.text)||void 0===m?void 0:m.content;if(T){var F=T,P=Or({videoId:(null==A||null===(g=A.tileRenderer)||void 0===g?void 0:g.contentId)||(null==A||null===(v=A.lockupViewModel)||void 0===v?void 0:v.contentId),thumbnails:(null==A||null===(y=A.tileRenderer)||void 0===y||null===(y=y.header)||void 0===y||null===(y=y.tileHeaderRenderer)||void 0===y||null===(y=y.thumbnail)||void 0===y?void 0:y.thumbnails)||(null==A||null===(b=A.lockupViewModel)||void 0===b||null===(b=b.contentImage)||void 0===b||null===(b=b.thumbnailViewModel)||void 0===b||null===(b=b.image)||void 0===b?void 0:b.sources),title:(null==A||null===(S=A.tileRenderer)||void 0===S||null===(S=S.metadata)||void 0===S||null===(S=S.tileMetadataRenderer)||void 0===S||null===(S=S.title)||void 0===S?void 0:S.simpleText)||(null==A||null===(x=A.lockupViewModel)||void 0===x||null===(x=x.metadata)||void 0===x||null===(x=x.lockupMetadataViewModel)||void 0===x||null===(x=x.title)||void 0===x?void 0:x.content),subtitle:F.length&&F.length>0?F:F.runs?F.runs[0].text:F.simpleText,watchEndpointData:(null==A||null===(E=A.tileRenderer)||void 0===E||null===(E=E.onSelectCommand)||void 0===E?void 0:E.watchEndpoint)||(null==A||null===(w=A.lockupViewModel)||void 0===w||null===(w=w.rendererContext)||void 0===w||null===(w=w.commandContext)||void 0===w||null===(w=w.onTap)||void 0===w||null===(w=w.innertubeCommand)||void 0===w?void 0:w.watchEndpoint),item:A});fo(D,P.showMenuCommand.menu.menuRenderer.items),D.tileRenderer?D.tileRenderer.onLongPressCommand=P:D.lockupViewModel.rendererContext.commandContext.onLongPress={innertubeCommand:P}}}}}catch(e){n.e(e)}finally{n.f()}}function fo(e,t){var n=function(e){var t,n,i,r,o,a=null!=e&&e.tileRenderer?e.tileRenderer.onLongPressCommand:null==e||null===(t=e.lockupViewModel)||void 0===t||null===(t=t.rendererContext)||void 0===t||null===(t=t.commandContext)||void 0===t?void 0:t.onLongPress,s=null!==(n=null==a?void 0:a.showEngagementPanelEndpoint)&&void 0!==n?n:null==a||null===(i=a.innertubeCommand)||void 0===i?void 0:i.showEngagementPanelEndpoint;return null!=s&&null!==(r=s.identifier)&&void 0!==r&&r.tag&&null!=s&&null!==(o=s.globalConfiguration)&&void 0!==o&&o.params?{panelId:s.identifier.tag,params:s.globalConfiguration.params}:null}(e);if(n&&!function(e){return null==e?void 0:e.some(e=>{var t,n;return!!$r(null==e||null===(t=e.menuServiceItemRenderer)||void 0===t?void 0:t.serviceEndpoint)||!!$r(null==e||null===(n=e.menuNavigationItemRenderer)||void 0===n?void 0:n.navigationEndpoint)})}(t)){var i,r=f(function(e){return[Nr(mr("videoMenu.notInterested"),{clickTrackingParams:null,customAction:{action:"NOT_INTERESTED",parameters:e}}),Nr(mr("videoMenu.dontRecommendChannel"),{clickTrackingParams:null,customAction:{action:"DONT_RECOMMEND_CHANNEL",parameters:e}})]}(n));try{for(r.s();!(i=r.n()).done;){var o=i.value;t.push(o)}}catch(e){r.e(e)}finally{r.f()}}}function go(e){return e.filter(e=>{var t,n,i,r;if(!e.tileRenderer)return!0;var o=null!=e&&e.tileRenderer?null===(t=e.tileRenderer.header)||void 0===t||null===(t=t.tileHeaderRenderer)||void 0===t||null===(t=t.thumbnailOverlays)||void 0===t||null===(t=t.find(e=>e.thumbnailOverlayResumePlaybackRenderer))||void 0===t?void 0:t.thumbnailOverlayResumePlaybackRenderer:null===(n=e.lockupViewModel)||void 0===n||null===(n=n.contentImage)||void 0===n||null===(n=n.thumbnailViewModel)||void 0===n||null===(n=n.overlays)||void 0===n||null===(n=n.find(e=>{var t;return null===(t=e.thumbnailBottomOverlayViewModel)||void 0===t?void 0:t.progressBar}))||void 0===n||null===(n=n.thumbnailBottomOverlayViewModel)||void 0===n?void 0:n.progressBar.thumbnailOverlayProgressBarViewModel;if(!o)return!0;var a=Er("hideWatchedVideosPages");if(!a.length)return!0;var s=location.hash.substring(1),l="/"===s?"home":s.startsWith("/search")?"search":null!==(i=null===(r=s.split("?")[1])||void 0===r||null===(r=r.split("&")[0])||void 0===r||null===(r=r.split("=")[1])||void 0===r||null===(r=r.replace("FE",""))||void 0===r?void 0:r.replace("topics_",""))&&void 0!==i?i:"";return!a.includes(l)||((null==o?void 0:o.percentDurationWatched)||(null==o?void 0:o.startPercent)||0)<=Er("hideWatchedVideosThreshold")})}var vo=Object.freeze({de:Object.freeze({title:"S95B · Performance",language:"Sprache",codec:"Videocodec",quality:"Bevorzugte Qualität",automatic:"Automatisch",light:"Ressourcenschonender Modus",lightHint:"Schaltet Vorschauen und DeArrow ab; vorherige Werte werden beim Ausschalten wiederhergestellt.",codecHint:"H.264 liefert bei YouTube in der Regel höchstens 1080p; 4K gibt es nur als VP9 oder AV1. Ein Codec wird nur erzwungen, wenn dadurch keine Qualität verloren geht. Gilt ab dem nächsten Video.",qualityHint:"Eine feste Qualität gilt sofort. „Automatisch“ wirkt eventuell erst nach einem Neustart von YouTube.",languageHint:"Gilt für dieses Menü, beim nächsten Öffnen.",statVideo:"Video",statFrames:"Verlorene Bilder",statCodec:"Codec-Wunsch",statUnavailable:"nicht verfügbar",statWait:"wartet auf Video",languageDE:"Deutsch",languageEN:"English"}),en:Object.freeze({title:"S95B · Performance",language:"Language",codec:"Video codec",quality:"Preferred quality",automatic:"Automatic",light:"Low-overhead mode",lightHint:"Disables previews and DeArrow; the previous values are restored when switched off.",codecHint:"On YouTube, H.264 usually tops out at 1080p; 4K is only available as VP9 or AV1. A codec is only forced if no quality is lost. Applies from the next video.",qualityHint:"A fixed quality applies immediately. “Automatic” may only take effect after restarting YouTube.",languageHint:"Applies to this menu, the next time it is opened.",statVideo:"Video",statFrames:"Dropped frames",statCodec:"Codec preference",statUnavailable:"not available",statWait:"waiting for video",languageDE:"Deutsch",languageEN:"English"})});var yo="s95b-perf-edition-v1",bo=["enablePreviews","enableDeArrow","enableDeArrowThumbnails"],So=["any","vp9","av01","avc1"],xo=["auto","2160p","1440p","1080p","720p"],Eo={lang:"de",light:!1,previous:null},wo=b({},Eo);function Do(){try{localStorage.setItem(yo,JSON.stringify(wo))}catch(e){}}function Co(e){return function(e,t){return(vo[e]||vo.de)[t]||vo.en[t]||t}(wo.lang,e)}function ko(e){return"any"===e?Co("automatic"):"vp9"===e?"VP9":"av01"===e?"AV1":"H.264"}function Ao(){var e,t=document.querySelector("video"),n=Co("statWait"),i=Co("statUnavailable");if(t){var r=t.videoWidth||0,o=t.videoHeight||0;if(n=r>0&&o>0?r+" × "+o:Co("statUnavailable"),"function"==typeof t.getVideoPlaybackQuality)try{var a=t.getVideoPlaybackQuality();a&&Number.isFinite(a.droppedVideoFrames)&&(i=String(a.droppedVideoFrames))}catch(e){}}return Co("statVideo")+": "+n+" | "+Co("statFrames")+": "+i+" | "+Co("statCodec")+": "+ko((e=Er("preferredVideoCodec"),So.indexOf(e)>=0?e:"any"))}function To(e){var t=e.keyCode||e.which;405!==t&&170!==t&&"ColorF2Yellow"!==e.key&&"F2"!==e.key||(e.preventDefault(),e.stopImmediatePropagation(),void 0!==e.type&&"keydown"!==e.type||function(){try{Gr({menuId:"s95b-menu",menuHeader:{title:Co("title"),subtitle:Ao()},selectedIndex:0,options:[{name:Co("language"),value:null,menuId:"s95b-language",menuHeader:{title:Co("language"),subtitle:Co("languageHint")},options:[{name:Co("languageDE"),key:"s95bLanguage",value:"de"},{name:Co("languageEN"),key:"s95bLanguage",value:"en"}]},{name:Co("codec"),icon:"VIDEO_QUALITY",value:null,menuId:"s95b-codec",menuHeader:{title:Co("codec"),subtitle:Co("codecHint")},options:So.map(e=>({name:ko(e),key:"preferredVideoCodec",value:e}))},{name:Co("quality"),icon:"VIDEO_QUALITY",value:null,menuId:"s95b-quality",menuHeader:{title:Co("quality"),subtitle:Co("qualityHint")},options:xo.map(e=>{return{name:(t=e,"auto"===t?Co("automatic"):"2160p"===t?"2160p (4K)":t),key:"preferredVideoQuality",value:e};var t})},{name:Co("light"),subtitle:Co("lightHint"),value:"s95bLowOverhead"}]},!1)}catch(e){console.warn("[S95B] menu could not be opened:",e)}}())}function Fo(e){var t=e&&e.detail;t&&("s95bLowOverhead"===t.key?function(e){if(e!==wo.light){if(e){var t={};bo.forEach(e=>{t[e]=Er(e)}),wo.previous=t,bo.forEach(e=>wr(e,!1)),wo.light=!0}else wo.previous&&bo.forEach(e=>{Object.prototype.hasOwnProperty.call(wo.previous,e)&&wr(e,wo.previous[e])}),wo.previous=null,wo.light=!1;Do()}}(!0===t.value):"s95bLanguage"===t.key&&(wo.lang="en"===t.value?"en":"de",Do()))}!function(){try{var e=JSON.parse(localStorage.getItem(yo)||"null");e&&"object"===D(e)&&(wo=b(b({},Eo),{},{lang:"en"===e.lang?"en":"de",light:!0===e.light,previous:e.previous&&"object"===D(e.previous)?e.previous:null}))}catch(e){wo=b({},Eo)}}(),Er("s95bLowOverhead")!==wo.light&&wr("s95bLowOverhead",wo.light),Er("s95bLanguage")!==wo.lang&&wr("s95bLanguage",wo.lang),Dr.addEventListener("configChange",Fo),window.addEventListener("keydown",To,!0),window.addEventListener("keyup",To,!0),window.addEventListener("keypress",To,!0);var Po=function e(t){function n(e,t){return e>>>t|e<<32-t}for(var i,r,o=Math.pow,a=o(2,32),s="length",l="",u=[],c=8*t[s],h=e.h=e.h||[],d=e.k=e.k||[],p=d[s],m={},f=2;p<64;f++)if(!m[f]){for(i=0;i<313;i+=f)m[i]=f;h[p]=o(f,.5)*a|0,d[p++]=o(f,1/3)*a|0}for(t+="";t[s]%64-56;)t+="\0";for(i=0;i<t[s];i++){if((r=t.charCodeAt(i))>>8)return;u[i>>2]|=r<<(3-i)%4*8}for(u[u[s]]=c/a|0,u[u[s]]=c,r=0;r<u[s];){var g=u.slice(r,r+=16),v=h;for(h=h.slice(0,8),i=0;i<64;i++){var y=g[i-15],b=g[i-2],S=h[0],x=h[4],E=h[7]+(n(x,6)^n(x,11)^n(x,25))+(x&h[5]^~x&h[6])+d[i]+(g[i]=i<16?g[i]:g[i-16]+(n(y,7)^n(y,18)^y>>>3)+g[i-7]+(n(b,17)^n(b,19)^b>>>10)|0);(h=[E+((n(S,2)^n(S,13)^n(S,22))+(S&h[1]^S&h[2]^h[1]&h[2]))|0].concat(h))[4]=h[4]+E|0}for(i=0;i<8;i++)h[i]=h[i]+v[i]|0}for(i=0;i<8;i++)for(r=3;r+1;r--){var w=h[i]>>8*r&255;l+=(w<16?0:"")+w.toString(16)}return l},Bo={sponsor:{color:"#00d400",opacity:"0.7",name:mr("sponsorblock.segments.sponsor")||"sponsored segment"},intro:{color:"#00ffff",opacity:"0.7",name:mr("sponsorblock.segments.intro")||"intro"},outro:{color:"#0202ed",opacity:"0.7",name:mr("sponsorblock.segments.outro")||"outro"},interaction:{color:"#cc00ff",opacity:"0.7",name:mr("sponsorblock.segments.interaction")||"interaction reminder"},selfpromo:{color:"#ffff00",opacity:"0.7",name:mr("sponsorblock.segments.selfpromo")||"self-promotion"},preview:{color:"#008fd6",opacity:"0.7",name:mr("sponsorblock.segments.preview")||"recap or preview"},filler:{color:"#7300FF",opacity:"0.9",name:mr("sponsorblock.segments.filler")||"tangents"},music_offtopic:{color:"#ff9900",opacity:"0.7",name:mr("sponsorblock.segments.music_offtopic")||"non-music part"},poi_highlight:{color:"#9b044c",opacity:"0.7",name:mr("sponsorblock.segments.poi_highlight")||"highlight"}};class Io{constructor(e){g(this,"video",null),g(this,"active",!0),g(this,"attachVideoTimeout",null),g(this,"nextSkipTimeout",null),g(this,"sliderInterval",null),g(this,"observer",null),g(this,"scheduleSkipHandler",null),g(this,"durationChangeHandler",null),g(this,"segments",null),g(this,"skippableCategories",[]),g(this,"manualSkippableCategories",[]),g(this,"skippedCategories",new Map),this.videoID=e}init(){var e=this;return c(S().m(function t(){var n,i,r,o,a;return S().w(function(t){for(;;)switch(t.n){case 0:return n=Po(e.videoID).substring(0,4),i=["sponsor","intro","outro","interaction","selfpromo","preview","filler","music_offtopic","poi_highlight"],t.n=1,fetch(`https://sponsor.ajay.app/api/skipSegments/${n}?categories=${encodeURIComponent(JSON.stringify(i))}`);case 1:return r=t.v,t.n=2,r.json();case 2:if(o=t.v,a=o.find(t=>t.videoID===e.videoID),console.info(e.videoID,"Got it:",a),a&&a.segments&&a.segments.length){t.n=3;break}return console.info(e.videoID,"No segments found."),t.a(2);case 3:e.segments=a.segments,e.manualSkippableCategories=Er("sponsorBlockManualSkips"),e.skippableCategories=e.getSkippableCategories(),e.scheduleSkipHandler=()=>{var t=document.querySelector('div[idomkey="slider"]'),n=null==t?void 0:t.getBoundingClientRect();!document.querySelector('div[idomkey="Metadata-Section"]')&&n&&e.segmentsoverlay.style.setProperty("top",`${n.top}px`,"important"),e.scheduleSkip()},e.durationChangeHandler=()=>e.buildOverlay(),e.attachVideo(),e.buildOverlay();case 4:return t.a(2)}},t)}))()}getSkippableCategories(){var e=[];return Er("enableSponsorBlockSponsor")&&e.push("sponsor"),Er("enableSponsorBlockIntro")&&e.push("intro"),Er("enableSponsorBlockOutro")&&e.push("outro"),Er("enableSponsorBlockInteraction")&&e.push("interaction"),Er("enableSponsorBlockSelfPromo")&&e.push("selfpromo"),Er("enableSponsorBlockPreview")&&e.push("preview"),Er("enableSponsorBlockFiller")&&e.push("filler"),Er("enableSponsorBlockMusicOfftopic")&&e.push("music_offtopic"),e}attachVideo(){if(clearTimeout(this.attachVideoTimeout),this.attachVideoTimeout=null,this.video=document.querySelector("video"),!this.video)return console.info(this.videoID,"No video yet..."),void(this.attachVideoTimeout=setTimeout(()=>this.attachVideo(),100));console.info(this.videoID,"Video found, binding..."),this.video.addEventListener("play",this.scheduleSkipHandler),this.video.addEventListener("pause",this.scheduleSkipHandler),this.video.addEventListener("timeupdate",this.scheduleSkipHandler),this.video.addEventListener("durationchange",this.durationChangeHandler)}buildOverlay(){if(this.segmentsoverlay)console.info("Overlay already built");else if(this.video&&this.video.duration){var e=this.video.duration,t=document.querySelector('div[idomkey="slider"]');if(!t)return setTimeout(()=>this.buildOverlay(),100);this.segmentsoverlay=document.createElement("div"),this.segmentsoverlay.classList.add("ytLrProgressBarSlider","ytLrProgressBarSliderRectangularProgressBar"),this.segmentsoverlay.style.setProperty("z-index","10","important"),this.segmentsoverlay.style.setProperty("background-color","rgba(0, 0, 0, 0)","important"),this.segmentsoverlay.style.setProperty("width","72rem","important"),this.segmentsoverlay.style.setProperty("left","4rem","important");var n=t.getBoundingClientRect();if(!t.classList.contains("ytLrProgressBarSlider")){for(var i=0;i<t.classList.length;i++)this.segmentsoverlay.classList.add(t.classList[i]);this.segmentsoverlay.style.setProperty("height",`${n.height}px`,"important"),this.segmentsoverlay.style.setProperty("bottom",n.bottom-n.top+"px","important")}this.segments.forEach(t=>{var n=E(t.segment,2),i=n[0],r=n[1],o=Bo[t.category]||{color:"blue",opacity:.7},a=e?100*i/e:0,s=e?100*(r-i)/e:0,l=document.createElement("div");l.style.setProperty("background-color",o.color,"important"),l.style.setProperty("opacity",o.opacity,"important"),l.style.setProperty("height","100%","important"),l.style.setProperty("width",`${"poi_highlight"===t.category?1:s}%`,"important"),l.style.setProperty("left",`${a}%`,"important"),l.style.setProperty("position","absolute","important"),console.info("Generated element",l,"from",t),this.segmentsoverlay.appendChild(l)}),this.observer=new MutationObserver(e=>{e.forEach(e=>{if(e.removedNodes){var t,n=f(e.removedNodes);try{for(n.s();!(t=n.n()).done;){t.value===this.segmentsoverlay&&(console.info("bringing back segments overlay"),this.slider.appendChild(this.segmentsoverlay))}}catch(e){n.e(e)}finally{n.f()}}"false"===document.querySelector("ytlr-progress-bar").getAttribute("hybridnavfocusable")?this.segmentsoverlay.style.setProperty("display","none","important"):this.segmentsoverlay.style.setProperty("display","block","important")})}),this.sliderInterval=setInterval(()=>{this.slider=document.querySelector("ytlr-redux-connect-ytlr-progress-bar"),this.slider&&(clearInterval(this.sliderInterval),this.sliderInterval=null,this.observer.observe(this.slider,{childList:!0,subtree:!0}),this.slider.appendChild(this.segmentsoverlay))},500)}else console.info("No video duration yet")}scheduleSkip(){if(clearTimeout(this.nextSkipTimeout),this.nextSkipTimeout=null,this.active)if(this.video.paused)console.info(this.videoID,"Currently paused, ignoring...");else{var e=this.segments.filter(e=>e.segment[0]>this.video.currentTime-.3&&e.segment[1]>this.video.currentTime-.3);if(e.sort((e,t)=>e.segment[0]-t.segment[0]),e.length){var t=E(e,1)[0],n=E(t.segment,2),i=n[0],r=n[1];console.info(this.videoID,"Scheduling skip of",t,"in",i-this.video.currentTime),this.nextSkipTimeout=setTimeout(()=>{var e;if(this.video.paused)console.info(this.videoID,"Currently paused, ignoring...");else if(this.skippableCategories.includes(t.category)){var n=(null===(e=Bo[t.category])||void 0===e?void 0:e.name)||t.category;if(console.info(this.videoID,"Skipping",t),!this.manualSkippableCategories.includes(t.category)){var i=this.skippedCategories.get(t.UUID);if(i){if(i.count++,i.lastSkipped=Date.now(),this.skippedCategories.set(t.UUID,i),i.lastSkipped-i.firstSkipped<1e3)return void(i.hasShownToast||(Er("enableSponsorBlockToasts")&&Tr("SponsorBlock",mr("sponsorblock.toasts.notSkipping",{segment:n,count:i.count})),i.hasShownToast=!0,this.skippedCategories.set(t.UUID,i)))}else this.skippedCategories.set(t.UUID,{count:1,firstSkipped:Date.now(),lastSkipped:Date.now(),hasShownToast:!1});Er("enableSponsorBlockToasts")&&Tr("SponsorBlock",mr("sponsorblock.toasts.skipping",{segment:n})),this.video.duration-r<1?this.video.currentTime=r-1:this.video.currentTime=r,this.scheduleSkip()}}else console.info(this.videoID,"Segment",t.category,"is not skippable, ignoring...")},1e3*(i-this.video.currentTime))}else console.info(this.videoID,"No more segments")}else console.info(this.videoID,"No longer active, ignoring...")}destroy(){console.info(this.videoID,"Destroying"),this.active=!1,this.nextSkipTimeout&&(clearTimeout(this.nextSkipTimeout),this.nextSkipTimeout=null),this.attachVideoTimeout&&(clearTimeout(this.attachVideoTimeout),this.attachVideoTimeout=null),this.sliderInterval&&(clearInterval(this.sliderInterval),this.sliderInterval=null),this.observer&&(this.observer.disconnect(),this.observer=null),this.segmentsoverlay&&(this.segmentsoverlay.remove(),this.segmentsoverlay=null),this.video&&(this.video.removeEventListener("play",this.scheduleSkipHandler),this.video.removeEventListener("pause",this.scheduleSkipHandler),this.video.removeEventListener("timeupdate",this.scheduleSkipHandler),this.video.removeEventListener("durationchange",this.durationChangeHandler)),this.skippedCategories.clear()}}window.sponsorblock=null,window.addEventListener("hashchange",()=>{var e=new URL(location.hash.substring(1),location.href).search.replace("?v=","").split("&")[0],t=e&&(!window.sponsorblock||window.sponsorblock.videoID!=e);if(console.info("hashchange",e,window.sponsorblock,window.sponsorblock?window.sponsorblock.videoID:null,t),t){if(window.sponsorblock){try{window.sponsorblock.destroy()}catch(e){console.warn("window.sponsorblock.destroy() failed!",e)}window.sponsorblock=null}Er("enableSponsorBlock")?(window.sponsorblock=new Io(e),window.sponsorblock.init()):console.info("SponsorBlock disabled, not loading")}},!1);var Oo;Oo||(Oo=1,function(){if(!("navigate"in window)){var e={37:"left",38:"up",39:"right",40:"down"},t=null,n=null,i={element:null,rect:null},r=null;window.navigate=a,window.Element.prototype.spatialNavigationSearch=h,window.Element.prototype.focusableAreas=y,window.Element.prototype.getSpatialNavigationContainer=g,window.CSS&&CSS.registerProperty&&(""===window.getComputedStyle(document.documentElement).getPropertyValue("--spatial-navigation-contain")&&CSS.registerProperty({name:"--spatial-navigation-contain",syntax:"auto | contain",inherits:!1,initialValue:"auto"}),""===window.getComputedStyle(document.documentElement).getPropertyValue("--spatial-navigation-action")&&CSS.registerProperty({name:"--spatial-navigation-action",syntax:"auto | focus | scroll",inherits:!1,initialValue:"auto"}),""===window.getComputedStyle(document.documentElement).getPropertyValue("--spatial-navigation-function")&&CSS.registerProperty({name:"--spatial-navigation-function",syntax:"normal | grid",inherits:!1,initialValue:"normal"})),q(!1),window.addEventListener("load",()=>{o()})}function o(){window.addEventListener("keydown",i=>{var r=parent&&parent.__spatialNavigation__.keyMode||window.__spatialNavigation__.keyMode,o=document.activeElement,s=e[i.keyCode];if(9===i.keyCode&&(n=null),!(!r||"NONE"===r||"SHIFTARROW"===r&&!i.shiftKey||"ARROW"===r&&i.shiftKey||i.defaultPrevented)){var l={left:!0,up:!0,right:!0,down:!0};"INPUT"!==o.nodeName&&"TEXTAREA"!==o.nodeName||(l=function(t){var n=["email","date","month","number","time","week"],i=["password","text","search","tel","url",null],r=document.activeElement,o={left:!1,up:!1,right:!1,down:!1},a=e[t.keyCode];if(void 0===a)return o;if(!n.includes(r.getAttribute("type"))||"up"!==a&&"down"!==a)if(i.includes(r.getAttribute("type"))||"TEXTAREA"===r.nodeName){var s=r.selectionStart,l=r.selectionEnd;s===l&&(0===s&&(o.left=!0,o.up=!0),l===r.value.length&&(o.right=!0,o.down=!0))}else o[a]=!0;else o[a]=!0;return o}(i)),l[s]&&(i.preventDefault(),t=new Map,a(s),t=null,n=null)}}),document.addEventListener("mouseup",e=>{n={x:e.clientX,y:e.clientY}}),window.addEventListener("focusin",e=>{e.target!==window&&(i.element=e.target,i.rect=e.target.getBoundingClientRect())})}function a(e){var t=function(){var e=document.activeElement;if(!e||e===document.body&&!document.querySelector(":focus")){if(i.element&&e!==i.element){var t=window.getComputedStyle(i.element,null),n=["hidden","collapse"];if(i.element.disabled||n.includes(t.getPropertyValue("visibility")))return e=i.element}e=document.documentElement}if(!i.element||0!==X(i.element).height&&0!==X(i.element).width||(r=i.rect),!I(e)){var o=v(e);if(o&&(o===window||"auto"===x(o)))return o}return e}(),o=t,a=null;n&&(null===(a=document.elementFromPoint(n.x,n.y))&&(a=document.body),O(a)&&!C(a)?n=null:o=C(a)?a:a.getSpatialNavigationContainer()),o!==document&&o!==document.documentElement||(o=document.body||document.documentElement);var c=null;if((C(o)||"BODY"===o.nodeName)&&"INPUT"!==o.nodeName)if("IFRAME"===o.nodeName&&(o=o.contentDocument.documentElement),c=o,document.activeElement===t||document.activeElement===document.body&&t===document.documentElement){if("scroll"===x(o)){if(l(o,e))return}else if("focus"===x(o)){if(s(o.spatialNavigationSearch(e,{container:o,candidates:u(o,{mode:"all"})}),e))return}else if("auto"===x(o)&&(s(o.spatialNavigationSearch(e,{container:o}),e)||l(o,e)))return}else c=c.getSpatialNavigationContainer();var h=(c=o.getSpatialNavigationContainer()).parentElement?c.getSpatialNavigationContainer():null;if(h||window.location===window.parent.location||(h=window.parent.document.documentElement),"scroll"===x(c)){if(l(c,e))return}else"focus"===x(c)?E(o,c,h,e,"all"):"auto"===x(c)&&E(o,c,h,e,"visible")}function s(e,t){if(e){if(!b("beforefocus",e,null,t))return!0;var i=e.getSpatialNavigationContainer();return i!==window&&"focus"===x(i)?e.focus():e.focus({preventScroll:!0}),n=null,!0}return!1}function l(e,t){return T(e,t)&&!B(e,t)?(w(e,t),!0):!e.parentElement&&!P(e,t)&&(w(e.ownerDocument.documentElement,t),!0)}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{mode:"visible"},n=[];if(e.childElementCount>0){e.parentElement||(e=e.getElementsByTagName("body")[0]||document.body);var i,r=f(e.children);try{for(r.s();!(i=r.n()).done;){var o=i.value;k(o)?n.push(o):O(o)?(n.push(o),!C(o)&&o.childElementCount&&(n=n.concat(u(o,{mode:"all"})))):o.childElementCount&&(n=n.concat(u(o,{mode:"all"})))}}catch(e){r.e(e)}finally{r.f()}}return"all"===t.mode?n:n.filter(N)}function c(e,t,n,i){var r=e;return i=i||r.getSpatialNavigationContainer(),d(r,n=!n||n.length<=0?u(i):n,t,i)}function h(e,t){var i,o=this,a=[],s=[],l=function(e){var t=e.getSpatialNavigationContainer(),n=t.focusableAreas(),i=[];return n.forEach(t=>{e!==t&&R(t,e)&&i.push(t)}),i}(o);t||(t={});var h=o.getSpatialNavigationContainer(),d=u(h),f=t.container||h;t.container&&h.contains(t.container)&&(d=d.concat(u(f)));var g=t.candidates&&t.candidates.length>0?t.candidates.filter(e=>f.contains(e)):d.filter(e=>f.contains(e)&&f!==e);if(g&&g.length>0){g.forEach(e=>{e!==o&&(o.contains(e)&&o!==e?a:s).push(e)});var v=l.filter(e=>!a.includes(e)),y=g.filter(e=>C(e)&&R(o,e)).map(e=>e.focusableAreas()).flat().filter(e=>e!==o);if(a=a.concat(v).filter(e=>f.contains(e)),(s=s.concat(y).filter(e=>f.contains(e))).length>0&&(s=c(o,e,s,f)),r&&(i=p(o,c(o,e,a,f),e)),a&&a.length>0&&"INPUT"!==o.nodeName&&(i=function(e,t,i){return m(e,t,i,n?H:j)}(o,a,e)),(i=i||p(o,s,e))&&k(i)){var b=u(i,{mode:"all"}),S=b.length>0?o.spatialNavigationSearch(e,{candidates:b,container:i}):null;S?i=S:O(i)||(g.splice(g.indexOf(i),1),i=g.length?o.spatialNavigationSearch(e,{candidates:g,container:f}):null)}return i}return null}function d(e,t,n,i){var o,a=e.getSpatialNavigationContainer();return void 0===n?t:(o=a.parentElement&&i!==a&&!N(e)?X(a):r||X(e),!C(e)&&"BODY"!==e.nodeName||"INPUT"===e.nodeName?t.filter(t=>{var r=X(t),a="IFRAME"===t.nodeName?t.contentDocument.body:null;return i.contains(t)&&t!==e&&a!==e&&_(r,o,n)&&!M(o,r)}):t.filter(t=>{var r=X(t);return i.contains(t)&&(e.contains(t)&&M(o,r)&&t!==e||_(r,o,n))}))}function p(e,t,n){var i,o,a=e.getSpatialNavigationContainer(),s=getComputedStyle(a).getPropertyValue("--spatial-navigation-function"),l=r||X(e);return"grid"===s?((o=t.filter(e=>V(l,X(e),n))).length>0&&(t=o),i=J):i=W,m(e,t,n,i)}function m(e,t,n,i){var o=null;window.location===window.parent.location||"BODY"!==e.nodeName&&"HTML"!==e.nodeName?o=r||e.getBoundingClientRect():((o=window.frameElement.getBoundingClientRect()).x=0,o.y=0);var a=Number.POSITIVE_INFINITY,s=[];if(t)for(var l=0;l<t.length;l++){var u=i(o,X(t[l]),n);u<a?(a=u,s=[t[l]]):u===a&&s.push(t[l])}return 0===s.length?null:s.length>1&&i===J?m(e,s,n,K):s[0]}function g(){var e=this;do{if(!e.parentElement){e=window.location!==window.parent.location?window.parent.document.documentElement:window.document.documentElement;break}e=e.parentElement}while(!C(e));return e}function v(e){var t=e;do{if(!t.parentElement){t=window.location!==window.parent.location?window.parent.document.documentElement:window.document.documentElement;break}t=t.parentElement}while(!A(t)||!N(t));return t!==document&&t!==document.documentElement||(t=window),t}function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{mode:"visible"},t=this.parentElement?this:document.body,n=Array.prototype.filter.call(t.getElementsByTagName("*"),O);return"all"===e.mode?n:n.filter(N)}function b(e,t,n,i){if(["beforefocus","notarget"].includes(e)){var r=new CustomEvent("nav"+e,{bubbles:!0,cancelable:!0,detail:{causedTarget:n,dir:i}});return t.dispatchEvent(r)}}function S(e,t){return(e.style.getPropertyValue(`--${t}`)||"").trim()}function x(e){return S(e,"spatial-navigation-action")||"auto"}function E(e,t,n,i,r){for(var o={candidates:u(t,{mode:r}),container:t};n;){if(s(e.spatialNavigationSearch(i,o),i))return;if("visible"===r&&l(t,i))return;if(!b("notarget",t,e,i))return;t===document||t===document.documentElement?window.location!==window.parent.location&&(t=(e=window.frameElement).ownerDocument.documentElement):t=n,o={candidates:u(t,{mode:r}),container:t};var a=t.getSpatialNavigationContainer();n=a!==t?a:null}o={candidates:u(t,{mode:r}),container:t},!n&&t&&s(e.spatialNavigationSearch(i,o),i)||b("notarget",o.container,e,i)&&("auto"!==x(t)||"visible"!==r||l(t,i))}function w(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e)switch(t){case"left":e.scrollLeft-=40+n;break;case"right":e.scrollLeft+=40+n;break;case"up":e.scrollTop-=40+n;break;case"down":e.scrollTop+=40+n}}function C(e){return!e.parentElement||"IFRAME"===e.nodeName||A(e)||function(e){return"contain"===S(e,"spatial-navigation-contain")}(e)}function k(e){return"delegable"===S(e,"spatial-navigation-contain")}function A(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("overflow-x"),i=t.getPropertyValue("overflow-y");return!!("visible"!==n&&"clip"!==n&&F(e,"left")||"visible"!==i&&"clip"!==i&&F(e,"down"))}function T(e,t){if(e&&"object"===D(e)){if(t&&"string"==typeof t){if(F(e,t)){var n=window.getComputedStyle(e,null),i=n.getPropertyValue("overflow-x"),r=n.getPropertyValue("overflow-y");switch(t){case"left":case"right":return"visible"!==i&&"clip"!==i&&"hidden"!==i;case"up":case"down":return"visible"!==r&&"clip"!==r&&"hidden"!==r}}return!1}return"HTML"===e.nodeName||"BODY"===e.nodeName||A(e)&&F(e)}}function F(e,t){if(e&&"object"===D(e)){if(!t||"string"!=typeof t)return e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight;switch(t){case"left":case"right":return e.scrollWidth>e.clientWidth;case"up":case"down":return e.scrollHeight>e.clientHeight}return!1}}function P(e,t){var n=!1;switch(t){case"left":n=0===e.scrollLeft;break;case"right":n=e.scrollWidth-e.scrollLeft-e.clientWidth===0;break;case"up":n=0===e.scrollTop;break;case"down":n=e.scrollHeight-e.scrollTop-e.clientHeight===0}return n}function B(e,t){if(T(e,t)){var n=e.scrollTop,i=e.scrollLeft,r=e.scrollHeight-e.clientHeight,o=e.scrollWidth-e.clientWidth;switch(t){case"left":return 0===i;case"right":return Math.abs(i-o)<=1;case"up":return 0===n;case"down":return Math.abs(n-r)<=1}}return!1}function I(e){var t=e.getBoundingClientRect(),n=v(e),i=null;return!(!M(i=n!==window?X(n):new DOMRect(0,0,window.innerWidth,window.innerHeight),t)||!M(i,t))}function O(e){return!(e.tabIndex<0||function(e){return"A"===e.tagName&&null===e.getAttribute("href")&&null===e.getAttribute("tabIndex")}(e)||function(e){return!!["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(e.tagName)&&e.disabled}(e)||function(e){return e.inert&&!e.ownerDocument.documentElement.inert}(e)||!function(e){return!!L(e.parentElement)&&!(!L(e)||"0"===e.style.opacity||"0px"===window.getComputedStyle(e).height||"0px"===window.getComputedStyle(e).width)}(e))&&(!!(!e.parentElement||T(e)&&F(e)||e.tabIndex>=0)||void 0)}function N(e){return!e.parentElement||L(e)&&function(e){var t=X(e);if("IFRAME"!==e.nodeName&&(t.top<0||t.left<0||t.top>e.ownerDocument.documentElement.clientHeight||t.left>e.ownerDocument.documentElement.clientWidth))return!1;var n=parseInt(e.offsetWidth)/10,i=parseInt(e.offsetHeight)/10;n=isNaN(n)?1:n,i=isNaN(i)?1:i;var r={middle:[(t.left+t.right)/2,(t.top+t.bottom)/2],leftTop:[t.left+n,t.top+i],rightBottom:[t.right-n,t.bottom-i]};for(var o in r){var a=e.ownerDocument.elementFromPoint(...r[o]);if(e===a||e.contains(a))return!0}return!1}(e)}function R(e,t){var n=X(e),i=X(t||e.getSpatialNavigationContainer());return!(n.left<i.left||n.right>i.right||n.top<i.top||n.bottom>i.bottom)}function L(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("visibility");return"none"!==t.getPropertyValue("display")&&!["hidden","collapse"].includes(n)}function M(e,t){var n=e.left<=t.right&&e.right>=t.right,i=e.left<=t.left&&e.right>=t.left,r=e.top<=t.top&&e.bottom>=t.top,o=e.top<=t.bottom&&e.bottom>=t.bottom;return(n||i)&&(r||o)}function _(e,t,n){switch(n){case"left":return U(t,e);case"right":return U(e,t);case"up":return z(t,e);case"down":return z(e,t);default:return!1}}function U(e,t){return e.left>=t.right||e.left>=t.left&&e.right>t.right&&e.bottom>t.top&&e.top<t.bottom}function z(e,t){return e.top>=t.bottom||e.top>=t.top&&e.bottom>t.bottom&&e.left<t.right&&e.right>t.left}function V(e,t,n){switch(n){case"left":case"right":return e.bottom>t.top&&e.top<t.bottom;case"up":case"down":return e.right>t.left&&e.left<t.right;default:return!1}}function H(e,t,i){var r=G(i,n,t),o=Math.abs(r.entryPoint.x-r.exitPoint.x),a=Math.abs(r.entryPoint.y-r.exitPoint.y);return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}function j(e,t,n){var i={left:"right",right:"left",up:"bottom",down:"top"}[n];return Math.abs(e[i]-t[i])}function W(e,t,n){var i,r,o,a,s,l,u,c=0,h=0,d=G(n,e,t),p=Math.abs(d.entryPoint.x-d.exitPoint.x),m=Math.abs(d.entryPoint.y-d.exitPoint.y),f=Math.sqrt(Math.pow(p,2)+Math.pow(m,2)),g=(o=e,a=t,s={width:0,height:0,area:0},l=[Math.max(o.left,a.left),Math.max(o.top,a.top)],u=[Math.min(o.right,a.right),Math.min(o.bottom,a.bottom)],s.width=Math.abs(l[0]-u[0]),s.height=Math.abs(l[1]-u[1]),l[0]>=u[0]||l[1]>=u[1]||(s.area=Math.sqrt(s.width*s.height)),s),v=g.area;switch(n){case"left":case"right":V(e,t,n)?h=Math.min(g.height/e.height,1):c=e.height/2,i=30*(m+c),r=5*h;break;case"up":case"down":V(e,t,n)?h=Math.min(g.width/e.width,1):c=e.width/2,i=2*(p+c),r=5*h;break;default:i=0,r=0}return f+i-r-v}function K(e,t,n){var i=G(n,e,t),r=Math.abs(i.entryPoint.x-i.exitPoint.x),o=Math.abs(i.entryPoint.y-i.exitPoint.y);return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))}function J(e,t,n){var i=G(n,e,t);return"left"===n||"right"===n?Math.abs(i.entryPoint.x-i.exitPoint.x):Math.abs(i.entryPoint.y-i.exitPoint.y)}function G(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"down",t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r={entryPoint:{x:0,y:0},exitPoint:{x:0,y:0}};if(n){switch(r.exitPoint=t,e){case"left":r.entryPoint.x=i.right;break;case"up":r.entryPoint.y=i.bottom;break;case"right":r.entryPoint.x=i.left;break;case"down":r.entryPoint.y=i.top}switch(e){case"left":case"right":n.y<=i.top?r.entryPoint.y=i.top:n.y<i.bottom?r.entryPoint.y=n.y:r.entryPoint.y=i.bottom;break;case"up":case"down":n.x<=i.left?r.entryPoint.x=i.left:n.x<i.right?r.entryPoint.x=n.x:r.entryPoint.x=i.right}}else{switch(e){case"left":r.exitPoint.x=t.left,r.entryPoint.x=i.right<t.left?i.right:t.left;break;case"up":r.exitPoint.y=t.top,r.entryPoint.y=i.bottom<t.top?i.bottom:t.top;break;case"right":r.exitPoint.x=t.right,r.entryPoint.x=i.left>t.right?i.left:t.right;break;case"down":r.exitPoint.y=t.bottom,r.entryPoint.y=i.top>t.bottom?i.top:t.bottom}switch(e){case"left":case"right":z(t,i)?(r.exitPoint.y=t.top,r.entryPoint.y=i.bottom<t.top?i.bottom:t.top):z(i,t)?(r.exitPoint.y=t.bottom,r.entryPoint.y=i.top>t.bottom?i.top:t.bottom):(r.exitPoint.y=Math.max(t.top,i.top),r.entryPoint.y=r.exitPoint.y);break;case"up":case"down":U(t,i)?(r.exitPoint.x=t.left,r.entryPoint.x=i.right<t.left?i.right:t.left):U(i,t)?(r.exitPoint.x=t.right,r.entryPoint.x=i.left>t.right?i.left:t.right):(r.exitPoint.x=Math.max(t.left,i.left),r.entryPoint.x=r.exitPoint.x)}}return r}function X(e){var n=t&&t.get(e);if(!n){var i=e.getBoundingClientRect();n={top:Number(i.top.toFixed(2)),right:Number(i.right.toFixed(2)),bottom:Number(i.bottom.toFixed(2)),left:Number(i.left.toFixed(2)),width:Number(i.width.toFixed(2)),height:Number(i.height.toFixed(2))},t&&t.set(e,n)}return n}function q(e){var t=window.__spatialNavigation__&&window.__spatialNavigation__.keyMode;window.__spatialNavigation__=!1===e?Y():Object.assign(Y(),function(){function e(e,t){return T(e,t)&&!B(e,t)||!e.parentElement&&!P(e,t)}function t(t,n,i,r){var o=n,a=null;if(o!==document&&o!==document.documentElement||(o=document.body||document.documentElement),(C(o)||"BODY"===o.nodeName)&&"INPUT"!==o.nodeName){"IFRAME"===o.nodeName&&(o=o.contentDocument.body);var s=u(o,r);if(Array.isArray(s)&&s.length>0)return t?c(o,i,s):o.spatialNavigationSearch(i,{candidates:s});if(e(o,i))return t?[]:o}var l=o.getSpatialNavigationContainer(),h=l.parentElement?l.getSpatialNavigationContainer():null;for(h||window.location===window.parent.location||(h=window.parent.document.documentElement);h;){var p=d(o,u(l,r),i,l);if(Array.isArray(p)&&p.length>0){if(a=o.spatialNavigationSearch(i,{candidates:p,container:l}))return t?p:a}else{if(e(l,i))return t?[]:o;if(l===document||l===document.documentElement){if(l=window.document.documentElement,window.location!==window.parent.location){if(o=window.frameElement,!(l=window.parent.document.documentElement).parentElement){h=null;break}h=l.getSpatialNavigationContainer()}}else{if(O(l)&&(o=l),!(l=h).parentElement){h=null;break}h=l.getSpatialNavigationContainer()}}}if(!h&&l){var m=d(o,u(l,r),i,l);if(Array.isArray(m)&&m.length>0&&(a=o.spatialNavigationSearch(i,{candidates:m,container:l})))return t?m:a}if(e(l,i))return o}return{isContainer:C,isScrollContainer:A,isVisibleInScroller:I,findCandidates:t.bind(null,!0),findNextTarget:t.bind(null,!1),getDistanceFromTarget:(e,t,n)=>(C(e)||"BODY"===e.nodeName)&&"INPUT"!==e.nodeName&&u(e).includes(t)?j(X(e),X(t),n):W(X(e),X(t),n)}}()),window.__spatialNavigation__.keyMode=t,Object.seal(window.__spatialNavigation__)}function Y(){return{enableExperimentalAPIs:q,get keyMode(){return this._keymode?this._keymode:"ARROW"},set keyMode(e){this._keymode=["SHIFTARROW","ARROW","NONE"].includes(e)?e:"ARROW"},setStartingPoint:function(e,t){n=e&&t?{x:e,y:t}:null}}}}());var No='.ytaf-ui-container {\n position: absolute;\n top: 10%;\n left: 10%;\n right: 10%;\n bottom: 10%;\n\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 20px;\n padding: 20px;\n font-size: 1.5rem;\n z-index: 1000;\n}\n\n.ytaf-ui-container :focus {\n outline: 4px red solid;\n}\n\n.ytaf-ui-container h1 {\n margin: 0;\n margin-bottom: 0.5em;\n text-align: center;\n}\n\n.ytaf-ui-container input[type=\'checkbox\'] {\n width: 1.4rem;\n height: 1.4rem;\n}\n\n.ytaf-ui-container input[type=\'radio\'] {\n width: 1.4rem;\n height: 1.4rem;\n}\n\n.ytaf-ui-container label {\n display: block;\n font-size: 1.4rem;\n}\n\n.ytaf-notification-container {\n position: absolute;\n right: 10px;\n bottom: 10px;\n font-size: 16pt;\n z-index: 1200;\n}\n\n.ytaf-notification-container .message {\n background: rgba(0, 0, 0, 0.7);\n color: white;\n padding: 1em;\n margin: 0.5em;\n transition: all 0.3s ease-in-out;\n opacity: 1;\n line-height: 1;\n border-right: 10px solid rgba(50, 255, 50, 0.3);\n display: inline-block;\n float: right;\n}\n\n.ytaf-notification-container .message-hidden {\n opacity: 0;\n margin: 0 0.5em;\n padding: 0 1em;\n line-height: 0;\n}\n\n/* Fixes transparency effect for the video player */\n\n.ytLrWatchDefaultShadow,\ndiv[idomkey="shadow"] {\n background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.8) 90%) !important;\n background-color: rgba(0, 0, 0, 0.3) !important;\n display: block !important;\n height: 100% !important;\n pointer-events: none !important;\n position: absolute !important;\n width: 100% !important;\n}\n\n/* https://github.com/webosbrew/youtube-webos/commit/4fbe38a18df31ddd62b6cf15f141dd58e1d1a71d */\n.ytLrWatchDefault2025Shadow {\n background-color: rgba(11, 11, 11, 0.5) !important;\n}\n\n/* Fixes shorts having a black background */\n\n.ytLrTileHeaderRendererShorts {\n background-image: none !important;\n}\n\n/* Multiline support for strings in the UI */\n\n.ytLrOverlayPanelHeaderRendererSubtitle {\n white-space: pre-wrap !important;\n}\n\n/* Fixes SponsorBlock segments overlapping with the playhead */\n\n.ytLrProgressBarPlayhead {\n z-index: 1 !important;\n}\n\n.ytLrProgressBarPlayed {\n z-index: 1 !important;\n}\n\n.ytLrSearchBarSearchVoice {\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: auto\n}\n\n.ytLrSearchVoiceHost {\n font-size: 3rem;\n}\n\n.ytLrSearchVoiceMicButtonHost {\n color: rgba(255, 255, 255, 0.7);\n}\n\n.ytLrSearchVoiceMicButtonHost {\n background-color: rgba(255, 255, 255, 0.1);\n border-radius: 50%;\n color: #f1f1f1;\n display: block;\n text-align: center;\n width: 1em;\n height: 1em;\n}\n\n.ytLrSearchVoiceMicButtonIcon {\n display: inline-block;\n font-size: .5em;\n height: .5em;\n width: .5em;\n height: 1em;\n width: 1em;\n margin-top: .5em;\n vertical-align: top !important;\n}\n\n.ytContribIconHost {\n display: inline-block;\n vertical-align: middle;\n}\n\n.ytContribIconTvArrowLeft::before {\n content: "\\e822";\n}\n\n.ytContribIconHost::before {\n font-family: "YouTube Icons Outlined";\n}',Ro=document.createElement("style"),Lo="";function Mo(){Lo=`\n ytlr-guide-response yt-focus-container {\n background-color: ${Er("focusContainerColor")};\n }\n\n #container {\n background-color: ${Er("routeColor")} !important;\n }\n`;var e=document.querySelector("style[nonce]");e?e.textContent+=Lo:Ro.textContent=Lo}function _o(){var e,t;for(var n in window._yttv)if(window._yttv[n]&&window._yttv[n].getInstance)if(window._yttv[n].toString().includes("ytlrActionRouter"))e=window._yttv[n].getInstance();else{var i,r=!1,o=window._yttv[n].getInstance(),a=f(Object.getOwnPropertyNames(Object.getPrototypeOf(o)));try{for(a.s();!(i=a.n()).done;){var s=i.value;"function"==typeof o[s]&&o[s].toString().includes("ytlrActionRouter")&&(t=o[s],r=!0)}}catch(e){a.e(e)}finally{a.f()}r&&(e=window._yttv[n].getInstance())}if(e){if(!t){var l,u=f(Object.getOwnPropertyNames(Object.getPrototypeOf(e)));try{for(u.s();!(l=u.n()).done;){var c=l.value;"function"==typeof e[c]&&e[c].toString().includes("ytlrActionRouter")&&(t=e[c])}}catch(e){u.e(e)}finally{u.f()}}if(t){var h;for(var d in window._yttv)window._yttv[d]&&"function"==typeof window._yttv[d]&&window._yttv[d].toString().includes("this.actionName")&&(h=window._yttv[d]);return{executeFunction:t.bind(e),commandFunction:h}}}}document.head.appendChild(Ro),Mo();var Uo,zo=setInterval(()=>{document.querySelector("video")&&(!function(){var e=document.querySelector("style[nonce]");if(e)e.textContent+=No;else{var t=document.createElement("style");t.textContent=No,document.head.appendChild(t)}if(Er("enableFixedUI"))try{window.tectonicConfig.featureSwitches.isLimitedMemory=!1,window.tectonicConfig.clientData.legacyApplicationQuality="full-animation",window.tectonicConfig.featureSwitches.enableAnimations=!0,window.tectonicConfig.featureSwitches.enableOnScrollLinearAnimation=!0,window.tectonicConfig.featureSwitches.enableListAnimations=!0,window.tectonicConfig.featureSwitches.supportsLongPress=!0}catch(e){}window.__spatialNavigation__.keyMode="NONE";var n={37:"left",38:"up",39:"right",40:"down"},i=document.createElement("div");i.classList.add("ytaf-ui-container"),i.style.display="none",i.setAttribute("tabindex",0),i.addEventListener("focus",()=>console.info("uiContainer focused!"),!0),i.addEventListener("blur",()=>console.info("uiContainer blured!"),!0),i.addEventListener("keydown",e=>{if(console.info("uiContainer key event:",e.type,e.keyCode,e),404!==e.keyCode&&172!==e.keyCode){var t;if(e.keyCode in n)navigate(n[e.keyCode]);else{if(13===e.keyCode||32===e.keyCode){console.log("OK button pressed");var r=document.querySelector(":focus");return"checkbox"===r.type&&(r.checked=!r.checked,r.dispatchEvent(new Event("change"))),e.preventDefault(),void e.stopPropagation()}if(27===e.keyCode&&"text"!==document.querySelector(":focus").type)i.style.display="none",i.blur();else if("text"===document.querySelector(":focus").type&&27===e.keyCode){var o=document.querySelector(":focus");o.value=o.value.slice(0,-1)}}"Enter"!==e.key&&"Enter"!==(null===(t=e.Uc)||void 0===t?void 0:t.key)||"text"===document.querySelector(":focus").type&&document.querySelector(":focus").dispatchEvent(new Event("change"))}},!0);try{i.innerHTML='\n<h1>TizenTube Theme Configuration</h1>\n<label for="__barColor">Navigation Bar Color: <input type="text" id="__barColor"/></label>\n<label for="__routeColor">Main Content Color: <input type="text" id="__routeColor"/></label>\n<div><small>Sponsor segments skipping - https://sponsor.ajay.app</small></div>\n',document.querySelector("body").appendChild(i),i.querySelector("#__barColor").value=Er("focusContainerColor"),i.querySelector("#__barColor").addEventListener("change",e=>{wr("focusContainerColor",e.target.value),Mo()}),i.querySelector("#__routeColor").value=Er("routeColor"),i.querySelector("#__routeColor").addEventListener("change",e=>{wr("routeColor",e.target.value),Mo()})}catch(e){}var r=e=>{if(console.info("Key event:",e.type,e.keyCode,e.keyCode,e.defaultPrevented),e.keyCode in Ho){var t=10*Ho[e.keyCode],n=document.querySelector("video");n.currentTime=t/100*n.duration}var r,o,a,s,l=document.getElementById("container");if(window.screenTurnedOffAt&&Date.now()-window.screenTurnedOffAt>1e3){var u,c=f(document.body.children);try{for(c.s();!(u=c.n()).done;){var h=u.value;"script"!==h.tagName.toLowerCase()&&"svg"!==h.tagName.toLowerCase()&&h.style.setProperty("display","block","important")}}catch(e){c.e(e)}finally{c.f()}window.screenTurnedOffAt=null}if(Er("enableScreenDimming")&&(Vo&&clearTimeout(Vo),l.style.setProperty("opacity","1","important"),Vo=setTimeout(()=>{document.querySelector(".html5-video-player").getPlayerStateObject().isPlaying||l.style.setProperty("opacity",(1-Er("dimmingOpacity")).toString(),"important")},1e3*Er("dimmingTimeout"))),403==e.keyCode){if(console.info("Taking over!"),e.preventDefault(),e.stopPropagation(),"keydown"===e.type)try{"none"===i.style.display?(console.info("Showing and focusing!"),i.style.display="block",i.focus()):(console.info("Hiding!"),i.style.display="none",i.blur())}catch(e){}return!1}if(404==e.keyCode)"keydown"===e.type&&Jr();else if(39==e.keyCode){if("keydown"===e.type)if(document.querySelector("ytlr-search-text-box > .zylon-focus")&&window.isPipPlaying)document.querySelector("ytlr-player").style.setProperty("background-color","rgb(0, 0, 0)"),r=Cr.loadedPlaybackConfig,o=r.clickTrackingParams,a=r.commandMetadata,(s=r.watchEndpoint).startTimeSeconds=Math.floor(document.querySelector("video").currentTime),to({clickTrackingParams:o,commandMetadata:a,watchEndpoint:s}),window.isPipPlaying=!1}return!0};document.addEventListener("keydown",r,!0),document.addEventListener("keypress",r,!0),document.addEventListener("keyup",r,!0),Er("showWelcomeToast")&&setTimeout(()=>{Tr(mr("welcomeMsg.title"),mr("welcomeMsg.subtitle"))},2e3);Er("reloadHomeOnStartup")&&(Er("launchToOnStartup")?to(JSON.parse(Er("launchToOnStartup"))):to({signalAction:{signal:"SOFT_RELOAD_PAGE"}}));var o=_o();o&&o.executeFunction(new o.commandFunction("reloadGuideAction"));if(Er("enableFixedUI"))try{new MutationObserver((e,t)=>{var n=document.body;n.classList.contains("app-quality-root")&&n.classList.remove("app-quality-root")}).observe(document.body,{attributes:!0,childList:!1,subtree:!1})}catch(e){}}(),function(){var e=function(e){if(window._yttv[e]&&window._yttv[e].instance&&window._yttv[e].instance.resolveCommand){var t=window._yttv[e].instance.resolveCommand;window._yttv[e].instance.resolveCommand=function(n,i){var r,o,a,s,l,u;if(n.setClientSettingEndpoint){var c,h=f(n.setClientSettingEndpoint.settingDatas);try{for(h.s();!(c=h.n()).done;){var d=c.value;if(d.clientSettingEnum.item.includes("_")){if("I18N_LANGUAGE"===d.clientSettingEnum.item){var p=d.stringValue,m=new Date;return m.setFullYear(m.getFullYear()+10),document.cookie=`PREF=hl=${p}; expires=${m.toUTCString()};`,to({signalAction:{signal:"RELOAD_PAGE"}}),!0}}else{var g,v=f(n.setClientSettingEndpoint.settingDatas);try{for(v.s();!(g=v.n()).done;){var y=g.value,b=Object.keys(y).find(e=>e.includes("Value")),S="intValue"===b?Number(y[b]):y[b];if("arrayValue"===b){var x=Er(y.clientSettingEnum.item);x.includes(S)?x.splice(x.indexOf(S),1):x.push(S),wr(y.clientSettingEnum.item,x)}else wr(y.clientSettingEnum.item,S)}}catch(e){v.e(e)}finally{v.f()}}}}catch(e){h.e(e)}finally{h.f()}}else{if(n.customAction)return no(n.customAction.action,n.customAction.parameters),!0;if(null!=n&&null!==(r=n.signalAction)&&void 0!==r&&r.customAction)return no(n.signalAction.customAction.action,n.signalAction.customAction.parameters),!0;if(null!=n&&null!==(o=n.showEngagementPanelEndpoint)&&void 0!==o&&o.customAction)return no(n.showEngagementPanelEndpoint.customAction.action,n.showEngagementPanelEndpoint.customAction.parameters),!0;if(null!=n&&null!==(a=n.playlistEditEndpoint)&&void 0!==a&&a.customAction)return no(n.playlistEditEndpoint.customAction.action,n.playlistEditEndpoint.customAction.parameters),!0;if("playback-settings"===(null==n||null===(s=n.openPopupAction)||void 0===s?void 0:s.uniqueId)){var E,w=f(n.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items);try{for(w.s();!(E=w.n()).done;){var D,C=E.value;"SLOW_MOTION_VIDEO"===(null==C||null===(D=C.compactLinkRenderer)||void 0===D||null===(D=D.icon)||void 0===D?void 0:D.iconType)&&(C.compactLinkRenderer.subtitle&&(C.compactLinkRenderer.subtitle.simpleText=mr("player.withTizenTube")),C.compactLinkRenderer.serviceEndpoint={clickTrackingParams:"null",signalAction:{customAction:{action:"TT_SPEED_SETTINGS_SHOW",parameters:[]}}})}}catch(e){w.e(e)}finally{w.f()}n.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items.splice(2,0,Br({title:mr("player.miniPlayer")},{icon:"CLEAR_COOKIES"},[{customAction:{action:"ENTER_MP"}}])),n.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items.splice(3,0,Br({title:mr("player.share.button")},{icon:"OPEN_IN_NEW"},[{customAction:{action:"SHARE"}}])),n.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items.splice(3,0,Br({title:mr("player.screenOff")},{icon:"EYE_OFF"},[{customAction:{action:"SCREEN_OFF"}}])),window.h5vcc&&window.h5vcc.tizentube&&window.h5vcc.tizentube.HasSystemFeature&&window.h5vcc.tizentube.HasSystemFeature("android.software.picture_in_picture")&&n.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items.splice(3,0,Br({title:mr("player.pictureInPicture")},{icon:"TV"},[{customAction:{action:"ENTER_PIP"}},{signalAction:{signal:"POPUP_BACK"}}]))}else null!=n&&null!==(l=n.watchEndpoint)&&void 0!==l&&l.videoId&&(window.isPipPlaying=!1,document.querySelector("ytlr-player-container").style.removeProperty("z-index"))}if(n.customAction)return window._yttv[e].instance.resolveCommand(n,i);if(n.commandExecutorCommand&&n.commandExecutorCommand.commands){var k,A=f(n.commandExecutorCommand.commands);try{for(A.s();!(k=A.n()).done;){var T,F,P,B=k.value;B.customAction?no(B.customAction.action,B.customAction.parameters):null!==(T=B.signalAction)&&void 0!==T&&T.customAction?no(B.signalAction.customAction.action,B.signalAction.customAction.parameters):null!==(F=B.showEngagementPanelEndpoint)&&void 0!==F&&F.customAction?no(B.showEngagementPanelEndpoint.customAction.action,B.showEngagementPanelEndpoint.customAction.parameters):null!==(P=B.playlistEditEndpoint)&&void 0!==P&&P.customAction?no(B.playlistEditEndpoint.customAction.action,B.playlistEditEndpoint.customAction.parameters):window._yttv[e].instance.resolveCommand(B,i)}}catch(e){A.e(e)}finally{A.f()}return!0}return null!=n&&n.requestAccountSelectorCommand&&"ACCOUNT_EVENT_TRIGGER_ON_EXIT"===(null===(u=n.requestAccountSelectorCommand)||void 0===u||null===(u=u.identityActionContext)||void 0===u?void 0:u.eventTrigger)&&!Er("enableWhosWatchingMenuOnAppExit")?(t.call(this,{signalAction:{signal:"EXIT_APP"}}),!1):t.call(this,n,i)}}};for(var t in window._yttv)e(t)}(),clearInterval(zo))},250),Vo=null,Ho={49:1,50:2,51:3,52:4,53:5,54:6,55:7,56:8,57:9,48:0};function jo(e){var t=JSON.parse(localStorage["yt.leanback.default::recurring_actions"]),n=Er("permanentlyEnableWhoIsWatchingMenu"),i=new Date;if(e){var r,o;if(i.getTime()-(null===(r=t.data.data["startup-screen-account-selector-with-guest"])||void 0===r?void 0:r.lastFired)>0&&i.getTime()-(null===(o=t.data.data["startup-screen-account-selector-with-guest"])||void 0===o?void 0:o.lastFired)<72e5&&!n)return;function a(){t.data.data["startup-screen-account-selector-with-guest"]&&(t.data.data["startup-screen-account-selector-with-guest"].lastFired=i.getTime()),t.data.data.whos_watching_fullscreen_zero_accounts.lastFired=i.getTime(),t.data.data["startup-screen-signed-out-welcome-back"]&&(t.data.data["startup-screen-signed-out-welcome-back"].lastFired=i.getTime()),localStorage["yt.leanback.default::recurring_actions"]=JSON.stringify(t)}a(),n?(i.setDate(i.getDate()-7),a(),Uo=setInterval(a,6e4)):Uo&&clearInterval(Uo)}else i.setDate(i.getDate()+7),t.data.data["startup-screen-account-selector-with-guest"]&&(t.data.data["startup-screen-account-selector-with-guest"].lastFired=i.getTime()),t.data.data.whos_watching_fullscreen_zero_accounts.lastFired=i.getTime(),t.data.data["startup-screen-signed-out-welcome-back"]&&(t.data.data["startup-screen-signed-out-welcome-back"].lastFired=i.getTime()),localStorage["yt.leanback.default::recurring_actions"]=JSON.stringify(t)}Dr.addEventListener("configChange",e=>{var t=e.detail,n=t.key,i=t.value;"enableWhoIsWatchingMenu"===n&&jo(i)}),jo(Er("enableWhoIsWatchingMenu"));var Wo={language:{standard:{long:{aa:"Afar",ab:"Abkhazian",ace:"Acehnese",ach:"Acoli",ada:"Adangme",ady:"Adyghe",ae:"Avestan",aeb:"Tunisian Arabic",af:"Afrikaans",afh:"Afrihili",agq:"Aghem",ain:"Ainu",ak:"Akan",akk:"Akkadian",akz:"Alabama",ale:"Aleut",aln:"Gheg Albanian",alt:"Southern Altai",am:"Amharic",an:"Aragonese",ang:"Old English",ann:"Obolo",anp:"Angika",ar:"Arabic","ar-001":"Arabic (world)",arc:"Aramaic",arn:"Mapuche",aro:"Araona",arp:"Arapaho",arq:"Algerian Arabic",ars:"Najdi Arabic",arw:"Arawak",ary:"Moroccan Arabic",arz:"Egyptian Arabic",as:"Assamese",asa:"Asu",ase:"American Sign Language",ast:"Asturian",atj:"Atikamekw",av:"Avaric",avk:"Kotava",awa:"Awadhi",ay:"Aymara",az:"Azerbaijani",ba:"Bashkir",bal:"Baluchi",ban:"Balinese",bar:"Bavarian",bas:"Basaa",bax:"Bamun",bbc:"Batak Toba",bbj:"Ghomala",be:"Belarusian",bej:"Beja",bem:"Bemba",bew:"Betawi",bez:"Bena",bfd:"Bafut",bfq:"Badaga",bg:"Bulgarian",bgc:"Haryanvi",bgn:"Western Balochi",bho:"Bhojpuri",bi:"Bislama",bik:"Bikol",bin:"Bini",bjn:"Banjar",bkm:"Kom",bla:"Siksiká",blo:"Anii",blt:"Tai Dam",bm:"Bambara",bn:"Bangla",bo:"Tibetan",bpy:"Bishnupriya",bqi:"Bakhtiari",br:"Breton",bra:"Braj",brh:"Brahui",brx:"Bodo",bs:"Bosnian",bss:"Akoose",bua:"Buriat",bug:"Buginese",bum:"Bulu",byn:"Blin",byv:"Medumba",ca:"Catalan",cad:"Caddo",car:"Carib",cay:"Cayuga",cch:"Atsam",ccp:"Chakma",ce:"Chechen",ceb:"Cebuano",cgg:"Chiga",ch:"Chamorro",chb:"Chibcha",chg:"Chagatai",chk:"Chuukese",chm:"Mari",chn:"Chinook Jargon",cho:"Choctaw",chp:"Chipewyan",chr:"Cherokee",chy:"Cheyenne",cic:"Chickasaw",ckb:"Central Kurdish",clc:"Chilcotin",co:"Corsican",cop:"Coptic",cps:"Capiznon",cr:"Cree",crg:"Michif",crh:"Crimean Tatar",crj:"Southern East Cree",crk:"Plains Cree",crl:"Northern East Cree",crm:"Moose Cree",crr:"Carolina Algonquian",crs:"Seselwa Creole French",cs:"Czech",csb:"Kashubian",csw:"Swampy Cree",cu:"Church Slavic",cv:"Chuvash",cwd:"Woods Cree",cy:"Welsh",da:"Danish",dak:"Dakota",dar:"Dargwa",dav:"Taita",de:"German","de-AT":"German (Austria)","de-CH":"German (Switzerland)",del:"Delaware",den:"Slave",dgr:"Dogrib",din:"Dinka",dje:"Zarma",doi:"Dogri",dsb:"Lower Sorbian",dtp:"Central Dusun",dua:"Duala",dum:"Middle Dutch",dv:"Divehi",dyo:"Jola-Fonyi",dyu:"Dyula",dz:"Dzongkha",dzg:"Dazaga",ebu:"Embu",ee:"Ewe",efi:"Efik",egl:"Emilian",egy:"Ancient Egyptian",eka:"Ekajuk",el:"Greek",elx:"Elamite",en:"English","en-AU":"English (Australia)","en-CA":"English (Canada)","en-GB":"English (United Kingdom)","en-US":"English (United States)",enm:"Middle English",eo:"Esperanto",es:"Spanish","es-419":"Spanish (Latin America)","es-ES":"Spanish (Spain)","es-MX":"Spanish (Mexico)",esu:"Central Yupik",et:"Estonian",eu:"Basque",ewo:"Ewondo",ext:"Extremaduran",fa:"Persian","fa-AF":"Persian (Afghanistan)",fan:"Fang",fat:"Fanti",ff:"Fula",fi:"Finnish",fil:"Filipino",fit:"Tornedalen Finnish",fj:"Fijian",fo:"Faroese",fon:"Fon",fr:"French","fr-CA":"French (Canada)","fr-CH":"French (Switzerland)",frc:"Cajun French",frm:"Middle French",fro:"Old French",frp:"Arpitan",frr:"Northern Frisian",frs:"Eastern Frisian",fur:"Friulian",fy:"Western Frisian",ga:"Irish",gaa:"Ga",gag:"Gagauz",gan:"Gan Chinese",gay:"Gayo",gba:"Gbaya",gbz:"Zoroastrian Dari",gd:"Scottish Gaelic",gez:"Geez",gil:"Gilbertese",gl:"Galician",glk:"Gilaki",gmh:"Middle High German",gn:"Guarani",goh:"Old High German",gon:"Gondi",gor:"Gorontalo",got:"Gothic",grb:"Grebo",grc:"Ancient Greek",gsw:"Swiss German",gu:"Gujarati",guc:"Wayuu",gur:"Frafra",guz:"Gusii",gv:"Manx",gwi:"Gwichʼin",ha:"Hausa",hai:"Haida",hak:"Hakka Chinese",haw:"Hawaiian",hax:"Southern Haida",hdn:"Northern Haida",he:"Hebrew",hi:"Hindi","hi-Latn":"Hindi (Latin)",hif:"Fiji Hindi",hil:"Hiligaynon",hit:"Hittite",hmn:"Hmong",hnj:"Hmong Njua",ho:"Hiri Motu",hr:"Croatian",hsb:"Upper Sorbian",hsn:"Xiang Chinese",ht:"Haitian Creole",hu:"Hungarian",hup:"Hupa",hur:"Halkomelem",hy:"Armenian",hz:"Herero",ia:"Interlingua",iba:"Iban",ibb:"Ibibio",id:"Indonesian",ie:"Interlingue",ig:"Igbo",ii:"Sichuan Yi",ik:"Inupiaq",ike:"Eastern Canadian Inuktitut",ikt:"Western Canadian Inuktitut",ilo:"Iloko",inh:"Ingush",io:"Ido",is:"Icelandic",it:"Italian",iu:"Inuktitut",izh:"Ingrian",ja:"Japanese",jam:"Jamaican Creole English",jbo:"Lojban",jgo:"Ngomba",jmc:"Machame",jpr:"Judeo-Persian",jrb:"Judeo-Arabic",jut:"Jutish",jv:"Javanese",ka:"Georgian",kaa:"Kara-Kalpak",kab:"Kabyle",kac:"Kachin",kaj:"Jju",kam:"Kamba",kaw:"Kawi",kbd:"Kabardian",kbl:"Kanembu",kcg:"Tyap",kde:"Makonde",kea:"Kabuverdianu",ken:"Kenyang",kfo:"Koro",kg:"Kongo",kgp:"Kaingang",kha:"Khasi",kho:"Khotanese",khq:"Koyra Chiini",khw:"Khowar",ki:"Kikuyu",kiu:"Kirmanjki",kj:"Kuanyama",kk:"Kazakh",kkj:"Kako",kl:"Kalaallisut",kln:"Kalenjin",km:"Khmer",kmb:"Kimbundu",kn:"Kannada",ko:"Korean",koi:"Komi-Permyak",kok:"Konkani",kos:"Kosraean",kpe:"Kpelle",kr:"Kanuri",krc:"Karachay-Balkar",kri:"Krio",krj:"Kinaray-a",krl:"Karelian",kru:"Kurukh",ks:"Kashmiri",ksb:"Shambala",ksf:"Bafia",ksh:"Colognian",ku:"Kurdish",kum:"Kumyk",kut:"Kutenai",kv:"Komi",kw:"Cornish",kwk:"Kwakʼwala",kxv:"Kuvi",ky:"Kyrgyz",la:"Latin",lad:"Ladino",lag:"Langi",lah:"Western Panjabi",lam:"Lamba",lb:"Luxembourgish",lez:"Lezghian",lfn:"Lingua Franca Nova",lg:"Ganda",li:"Limburgish",lij:"Ligurian",lil:"Lillooet",liv:"Livonian",lkt:"Lakota",lmo:"Lombard",ln:"Lingala",lo:"Lao",lol:"Mongo",lou:"Louisiana Creole",loz:"Lozi",lrc:"Northern Luri",lsm:"Saamia",lt:"Lithuanian",ltg:"Latgalian",lu:"Luba-Katanga",lua:"Luba-Lulua",lui:"Luiseno",lun:"Lunda",luo:"Luo",lus:"Mizo",luy:"Luyia",lv:"Latvian",lzh:"Literary Chinese",lzz:"Laz",mad:"Madurese",maf:"Mafa",mag:"Magahi",mai:"Maithili",mak:"Makasar",man:"Mandingo",mas:"Masai",mde:"Maba",mdf:"Moksha",mdr:"Mandar",men:"Mende",mer:"Meru",mfe:"Morisyen",mg:"Malagasy",mga:"Middle Irish",mgh:"Makhuwa-Meetto",mgo:"Metaʼ",mh:"Marshallese",mi:"Māori",mic:"Mi'kmaw",min:"Minangkabau",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mnc:"Manchu",mni:"Manipuri",moe:"Innu-aimun",moh:"Mohawk",mos:"Mossi",mr:"Marathi",mrj:"Western Mari",ms:"Malay",mt:"Maltese",mua:"Mundang",mul:"Multiple languages",mus:"Muscogee",mwl:"Mirandese",mwr:"Marwari",mwv:"Mentawai",my:"Burmese",mye:"Myene",myv:"Erzya",mzn:"Mazanderani",na:"Nauru",nan:"Min Nan Chinese",nap:"Neapolitan",naq:"Nama",nb:"Norwegian Bokmål",nd:"North Ndebele",nds:"Low German","nds-NL":"Low German (Netherlands)",ne:"Nepali",new:"Newari",ng:"Ndonga",nia:"Nias",niu:"Niuean",njo:"Ao Naga",nl:"Dutch","nl-BE":"Dutch (Belgium)",nmg:"Kwasio",nn:"Norwegian Nynorsk",nnh:"Ngiemboon",no:"Norwegian",nog:"Nogai",non:"Old Norse",nov:"Novial",nqo:"N’Ko",nr:"South Ndebele",nso:"Northern Sotho",nus:"Nuer",nv:"Navajo",nwc:"Classical Newari",ny:"Nyanja",nym:"Nyamwezi",nyn:"Nyankole",nyo:"Nyoro",nzi:"Nzima",oc:"Occitan",oj:"Ojibwa",ojb:"Northwestern Ojibwa",ojc:"Central Ojibwa",ojg:"Eastern Ojibwa",ojs:"Oji-Cree",ojw:"Western Ojibwa",oka:"Okanagan",om:"Oromo",or:"Odia",os:"Ossetic",osa:"Osage",ota:"Ottoman Turkish",pa:"Punjabi",pag:"Pangasinan",pal:"Pahlavi",pam:"Pampanga",pap:"Papiamento",pau:"Palauan",pcd:"Picard",pcm:"Nigerian Pidgin",pdc:"Pennsylvania German",pdt:"Plautdietsch",peo:"Old Persian",pfl:"Palatine German",phn:"Phoenician",pi:"Pali",pis:"Pijin",pl:"Polish",pms:"Piedmontese",pnt:"Pontic",pon:"Pohnpeian",pqm:"Maliseet-Passamaquoddy",prg:"Prussian",pro:"Old Provençal",ps:"Pashto",pt:"Portuguese","pt-BR":"Portuguese (Brazil)","pt-PT":"Portuguese (Portugal)",qu:"Quechua",quc:"Kʼicheʼ",qug:"Chimborazo Highland Quichua",raj:"Rajasthani",rap:"Rapanui",rar:"Rarotongan",rgn:"Romagnol",rhg:"Rohingya",rif:"Riffian",rm:"Romansh",rn:"Rundi",ro:"Romanian","ro-MD":"Romanian (Moldova)",rof:"Rombo",rom:"Romany",rtm:"Rotuman",ru:"Russian",rue:"Rusyn",rug:"Roviana",rup:"Aromanian",rw:"Kinyarwanda",rwk:"Rwa",sa:"Sanskrit",sad:"Sandawe",sah:"Yakut",sam:"Samaritan Aramaic",saq:"Samburu",sas:"Sasak",sat:"Santali",saz:"Saurashtra",sba:"Ngambay",sbp:"Sangu",sc:"Sardinian",scn:"Sicilian",sco:"Scots",sd:"Sindhi",sdc:"Sassarese Sardinian",sdh:"Southern Kurdish",se:"Northern Sami",see:"Seneca",seh:"Sena",sei:"Seri",sel:"Selkup",ses:"Koyraboro Senni",sg:"Sango",sga:"Old Irish",sgs:"Samogitian",sh:"Serbo-Croatian",shi:"Tachelhit",shn:"Shan",shu:"Chadian Arabic",si:"Sinhala",sid:"Sidamo",sk:"Slovak",sl:"Slovenian",slh:"Southern Lushootseed",sli:"Lower Silesian",sly:"Selayar",sm:"Samoan",sma:"Southern Sami",smj:"Lule Sami",smn:"Inari Sami",sms:"Skolt Sami",sn:"Shona",snk:"Soninke",so:"Somali",sog:"Sogdien",sq:"Albanian",sr:"Serbian","sr-ME":"Serbian (Montenegro)",srn:"Sranan Tongo",srr:"Serer",ss:"Swati",ssy:"Saho",st:"Southern Sotho",stq:"Saterland Frisian",str:"Straits Salish",su:"Sundanese",suk:"Sukuma",sus:"Susu",sux:"Sumerian",sv:"Swedish",sw:"Swahili","sw-CD":"Swahili (Congo - Kinshasa)",swb:"Comorian",syc:"Classical Syriac",syr:"Syriac",szl:"Silesian",ta:"Tamil",tce:"Southern Tutchone",tcy:"Tulu",te:"Telugu",tem:"Timne",teo:"Teso",ter:"Tereno",tet:"Tetum",tg:"Tajik",tgx:"Tagish",th:"Thai",tht:"Tahltan",ti:"Tigrinya",tig:"Tigre",tiv:"Tiv",tk:"Turkmen",tkl:"Tokelau",tkr:"Tsakhur",tl:"Tagalog",tlh:"Klingon",tli:"Tlingit",tly:"Talysh",tmh:"Tamashek",tn:"Tswana",to:"Tongan",tog:"Nyasa Tonga",tok:"Toki Pona",tpi:"Tok Pisin",tr:"Turkish",tru:"Turoyo",trv:"Taroko",trw:"Torwali",ts:"Tsonga",tsd:"Tsakonian",tsi:"Tsimshian",tt:"Tatar",ttm:"Northern Tutchone",ttt:"Muslim Tat",tum:"Tumbuka",tvl:"Tuvalu",tw:"Twi",twq:"Tasawaq",ty:"Tahitian",tyv:"Tuvinian",tzm:"Central Atlas Tamazight",udm:"Udmurt",ug:"Uyghur",uga:"Ugaritic",uk:"Ukrainian",umb:"Umbundu",und:"Unknown language",ur:"Urdu",uz:"Uzbek",vai:"Vai",ve:"Venda",vec:"Venetian",vep:"Veps",vi:"Vietnamese",vls:"West Flemish",vmf:"Main-Franconian",vmw:"Makhuwa",vo:"Volapük",vot:"Votic",vro:"Võro",vun:"Vunjo",wa:"Walloon",wae:"Walser",wal:"Wolaytta",war:"Waray",was:"Washo",wbp:"Warlpiri",wo:"Wolof",wuu:"Wu Chinese",xal:"Kalmyk",xh:"Xhosa",xmf:"Mingrelian",xnr:"Kangri",xog:"Soga",yao:"Yao",yap:"Yapese",yav:"Yangben",ybb:"Yemba",yi:"Yiddish",yo:"Yoruba",yrl:"Nheengatu",yue:"Cantonese",za:"Zhuang",zap:"Zapotec",zbl:"Blissymbols",zea:"Zeelandic",zen:"Zenaga",zgh:"Standard Moroccan Tamazight",zh:"Chinese","zh-Hans":"Simplified Chinese","zh-Hant":"Traditional Chinese",zu:"Zulu",zun:"Zuni",zxx:"No linguistic content",zza:"Zaza"}}},region:{long:{"001":"world","002":"Africa","003":"North America","005":"South America","009":"Oceania","011":"Western Africa","013":"Central America","014":"Eastern Africa","015":"Northern Africa","017":"Middle Africa","018":"Southern Africa","019":"Americas","021":"Northern America","029":"Caribbean","030":"Eastern Asia","034":"Southern Asia","035":"Southeast Asia","039":"Southern Europe","053":"Australasia","054":"Melanesia","057":"Micronesian Region","061":"Polynesia",142:"Asia",143:"Central Asia",145:"Western Asia",150:"Europe",151:"Eastern Europe",154:"Northern Europe",155:"Western Europe",202:"Sub-Saharan Africa",419:"Latin America",AC:"Ascension Island",AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua & Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia & Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"St. Barthélemy",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BQ:"Caribbean Netherlands",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Congo - Kinshasa",CF:"Central African Republic",CG:"Congo - Brazzaville",CH:"Switzerland",CI:"Côte d’Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CP:"Clipperton Island",CQ:"Sark",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czechia",DE:"Germany",DG:"Diego Garcia",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EA:"Ceuta & Melilla",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",EU:"European Union",EZ:"Eurozone",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia & South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong SAR China",HM:"Heard & McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",IC:"Canary Islands",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"St. Kitts & Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"St. Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"St. Martin",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar (Burma)",MN:"Mongolia",MO:"Macao SAR China",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"St. Pierre & Miquelon",PN:"Pitcairn Islands",PR:"Puerto Rico",PS:"Palestinian Territories",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",QO:"Outlying Oceania",RE:"Réunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"St. Helena",SI:"Slovenia",SJ:"Svalbard & Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"São Tomé & Príncipe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Eswatini",TA:"Tristan da Cunha",TC:"Turks & Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Türkiye",TT:"Trinidad & Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"U.S. Outlying Islands",UN:"United Nations",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Vatican City",VC:"St. Vincent & Grenadines",VE:"Venezuela",VG:"British Virgin Islands",VI:"U.S. Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis & Futuna",WS:"Samoa",XA:"Pseudo-Accents",XB:"Pseudo-Bidi",XK:"Kosovo",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"Unknown Region",BA:"Bosnia",GB:"UK",HK:"Hong Kong",MM:"Myanmar",MO:"Macao",PS:"Palestine",UN:"UN",US:"US"}}},Ko=["af","sq","am","ar","hy","as","az","eu","be","bn","bs","bg","my","ca","zh-CN","zh-TW","zh-HK","hr","cs","da","nl","en","et","fil","fi","fr","gl","ka","de","el","gu","he","hi","hu","is","id","ga","it","ja","kn","kk","km","ko","ky","lo","lv","lt","mk","ms","ml","mt","mr","mn","ne","no","or","fa","pl","pt","pa","ro","ru","sr","si","sk","sl","es","sw","sv","ta","te","th","tr","uk","ur","uz","vi","cy","yi","yo","zu"];var Jo=!1;function Go(e,t){return{compactLinkRenderer:{title:{simpleText:t},serviceEndpoint:{commandExecutorCommand:{commands:[{selectSubtitlesTrackCommand:{translationLanguage:{languageCode:e,languageName:t}}},{openClientOverlayAction:{type:"CLIENT_OVERLAY_TYPE_CAPTIONS_LANGUAGE",updateAction:!0}},{signalAction:{signal:"POPUP_BACK"}}]}},secondaryIcon:{iconType:"RADIO_BUTTON_UNCHECKED"}}}}function Xo(){if(!Jo){if(!document.querySelector(".html5-video-player"))return setTimeout(Xo,250);if(!window._yttv)return setTimeout(Xo,250);var e=Object.values(window._yttv).find(e=>e&&e.instance&&"function"==typeof e.instance.resolveCommand);if(e&&!e.instance.resolveCommand.isPatchedBySubtitleLocalization){var t=e.instance.resolveCommand;e.instance.resolveCommand=function(e,n){var i;if("CLIENT_OVERLAY_TYPE_CAPTIONS_AUTO_TRANSLATE"===(null==e||null===(i=e.openPopupAction)||void 0===i?void 0:i.uniqueId)){var r=Er("enableShowUserLanguage"),o=Er("enableShowOtherLanguages");if(!r&&!o)return t.apply(this,arguments);var a=e.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items,s=function(e){var t=new Set;return e.forEach(e=>{if(e.compactLinkRenderer&&e.compactLinkRenderer.serviceEndpoint){var n,i=null===(n=e.compactLinkRenderer.serviceEndpoint.commandExecutorCommand)||void 0===n?void 0:n.commands;if(i&&i[0]&&i[0].selectSubtitlesTrackCommand){var r=i[0].selectSubtitlesTrackCommand.translationLanguage;r&&(t.add(r.languageCode),t.add(r.languageName))}}}),t}(a);if(r){var l=function(){try{return window.yt&&window.yt.config_&&window.yt.config_.GL?window.yt.config_.GL:(console.warn("TizenTube Subtitle Localization: Could not determine user country code"),null)}catch(e){return console.error("TizenTube Subtitle Localization: Error getting country code:",e),null}}(),u=function(e){if(!e)return null;try{var t=String(e).toUpperCase(),n={CN:"zh-CN",TW:"zh-TW",HK:"zh-HK",SG:"zh-CN"};if(n[t]){var i=n[t];return{code:i,name:Wo.language.standard.long[i]||i}}var r=new Intl.Locale("und",{region:t}),o=(r.maximize?r.maximize():r).language||"en";return{code:o,name:Wo.language.standard.long[o]||o}}catch(t){return console.warn("TizenTube Subtitle Localization: Could not infer language for country",e,t),null}}(l);if(u)if(function(e,t,n){return e.some(e=>{if(e.compactLinkRenderer&&e.compactLinkRenderer.serviceEndpoint){var i,r=null===(i=e.compactLinkRenderer.serviceEndpoint.commandExecutorCommand)||void 0===i?void 0:i.commands;if(r&&r[0]&&r[0].selectSubtitlesTrackCommand){var o=r[0].selectSubtitlesTrackCommand.translationLanguage;return o&&(o.languageCode===t||o.languageName===n)}}return!1})}(a,u.code,u.name))console.log(`%c[TizenTube Subtitle Localization] User's language ${u.name} already exists in menu`,"background: #4CAF50; color: #ffffff; font-size: 12px;");else{console.log(`%c[TizenTube Subtitle Localization] Adding user's local language: ${u.name} (${u.code})`,"background: #2196F3; color: #ffffff; font-size: 14px; font-weight: bold;");var c=Go(u.code,u.name),h=a.findIndex(e=>{var t;return"Recommended languages"===(null===(t=e.overlayMessageRenderer)||void 0===t||null===(t=t.subtitle)||void 0===t?void 0:t.simpleText)});if(h>-1)a.splice(h+1,0,c),s.add(u.code),s.add(u.name);else{var d=a.findIndex(e=>{var t;return"Other languages"===(null===(t=e.overlayMessageRenderer)||void 0===t||null===(t=t.subtitle)||void 0===t?void 0:t.simpleText)});d>-1?a.splice(d,0,c):a.unshift(c),s.add(u.code),s.add(u.name)}}else console.warn(`TizenTube Subtitle Localization: No language mapping found for country code: ${l}`)}if(o){var p=Object.entries(function(){try{var e={};return Ko.forEach(t=>{if(t.includes("-")){var n=E(t.split("-"),2),i=n[0],r=n[1],o=Wo.language.standard.long[i]||t,a=Wo.region.long[r]||r;e[t]=`${o} (${a})`}else{var s=Wo.language.standard.long[t]||t;e[t]=s}}),e}catch(e){var t={};return Ko.forEach(e=>t[e]=e),t}}()).filter(e=>{var t=E(e,2),n=t[0],i=t[1];return!s.has(n)&&!s.has(i)}).sort((e,t)=>{var n=E(e,2)[1],i=E(t,2)[1];return n.localeCompare(i)});p.length>0?(console.log(`%c[TizenTube Subtitle Localization] Adding "Tizen Languages" section with ${p.length} additional languages`,"background: #FF9800; color: #ffffff; font-size: 12px;"),a.push({overlayMessageRenderer:{title:{simpleText:""},subtitle:{simpleText:"Other Languages"},style:"OVERLAY_MESSAGE_STYLE_SUBSECTION_TITLE"}}),p.forEach(e=>{var t=E(e,2),n=t[0],i=t[1];a.push(Go(n,i))}),console.log('%c[TizenTube Subtitle Localization] Added "Tizen Languages" section',"background: #FF9800; color: #ffffff; font-size: 12px;")):console.log("%c[TizenTube Subtitle Localization] All languages already present in menu","background: #4CAF50; color: #ffffff; font-size: 12px;")}}return t.apply(this,arguments)},e.instance.resolveCommand.isPatchedBySubtitleLocalization=!0,console.log("TizenTube Subtitle Localization: Patch successful!"),Jo=!0}else e?console.log("TizenTube Subtitle Localization: Already patched."):console.error("TizenTube Subtitle Localization: Could not find resolveCommand instance.")}}var qo=setInterval(()=>{window._yttv&&Object.keys(window._yttv).length>0&&(Xo(),clearInterval(qo))},1e3);"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Xo):Xo(),console.log("TizenTube Subtitle Localization: Module loaded, waiting for YouTube TV...");var Yo=".html5-video-player",$o="onStateChange",Qo="configChange",Zo="preferredVideoQuality",ea=new WeakMap,ta=new WeakMap,na=new WeakMap,ia=new WeakMap,ra=new WeakSet,oa=new WeakMap;function aa(){clearTimeout(d(ta,this));var e=document.querySelector(Yo);e?(m(ea,this,e),d(ea,this).addEventListener($o,d(oa,this)),d(oa,this).call(this)):m(ta,this,setTimeout(()=>l(ra,this,aa).call(this),100))}function sa(){Dr.addEventListener(Qo,e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.key)===Zo&&l(ra,this,la).call(this)})}function la(){var e=Er(Zo);if(e&&"auto"!==e&&d(ea,this))try{var t=l(ra,this,ua).call(this,e);t&&d(ea,this).setPlaybackQualityRange(t,t)}catch(e){console.warn("[PreferredQuality] Failed to apply quality:",e)}}function ua(e){var t=d(ea,this).getAvailableQualityData();if(null==t||!t.length)return"highres";var n=e=>parseInt(e,10)||0,i=n(e),r=t.find(e=>n(e.qualityLabel)===i);return r?r.quality:"highres"}function ca(){var e;if(!window._yttv)return setTimeout(ca,250);null===(e=Object.values(window._yttv).find(e=>e instanceof Map&&e.has("ENABLE_PREVIEWS_WITH_SOUND")))||void 0===e||e.set("ENABLE_PREVIEWS_WITH_SOUND",Er("enablePreviews"))}window.preferredVideoQualityHandler=new class{constructor(){var e,t;h(e=this,t=ra),t.add(e),p(this,ea,null),p(this,ta,null),p(this,na,null),p(this,ia,!1),p(this,oa,()=>{var e,t,n,i,r=null===(e=d(ea,this))||void 0===e||null===(t=e.getPlayerStateObject)||void 0===t?void 0:t.call(e),o=null===(n=d(ea,this))||void 0===n||null===(i=n.getVideoData)||void 0===i?void 0:i.call(n),a=null==o?void 0:o.video_id;a!==d(na,this)&&(m(na,this,a),m(ia,this,!1));var s=Object.values(d(ea,this).getVideoStats()).find(e=>e&&"shortspage"===e);null==r||!r.isPlaying||d(ia,this)||s||(l(ra,this,la).call(this),m(ia,this,!0))}),this.init()}init(){l(ra,this,aa).call(this),l(ra,this,sa).call(this)}},window.queuedVideos={videos:[],lastVideoId:null},function e(){var t=document.querySelector(".html5-video-player");if(!t)return setTimeout(e,250);t.addEventListener("onStateChange",()=>{var e=t.getPlayerStateObject(),n=t.getVideoData();if(0!==window.queuedVideos.videos.length)if(e.isEnded){var i=window.queuedVideos.videos.findIndex(e=>e.tileRenderer&&e.tileRenderer.contentId===n.video_id||e.lockupViewModel&&e.lockupViewModel.contentId===n.video_id);if(-1!==i){if(i+1>=window.queuedVideos.videos.length)return void to({customAction:{action:"CLEAR_QUEUE"}});var r=window.queuedVideos.videos[i+1],o=r.tileRenderer?r.tileRenderer.onSelectCommand:r.lockupViewModel.rendererContext.commandContext.onTap.innertubeCommand;setTimeout(()=>to(o),500)}else if(window.queuedVideos.lastVideoId){var a=window.queuedVideos.videos.findIndex(e=>{var t,n;return(null===(t=e.tileRenderer)||void 0===t?void 0:t.contentId)===window.queuedVideos.lastVideoId||(null===(n=e.lockupViewModel)||void 0===n?void 0:n.contentId)===window.queuedVideos.lastVideoId});if(!(-1!==a&&a+1<window.queuedVideos.videos.length))return void to({customAction:{action:"CLEAR_QUEUE"}});var s=window.queuedVideos.videos[a+1],l=s.tileRenderer?s.tileRenderer.onSelectCommand:s.lockupViewModel.rendererContext.commandContext.onTap.innertubeCommand;setTimeout(()=>to(l),500)}else{var u=window.queuedVideos.videos[0],c=u.tileRenderer?u.tileRenderer.onSelectCommand:u.lockupViewModel.rendererContext.commandContext.onTap.innertubeCommand;setTimeout(()=>to(c),500)}}else e.isPlaying&&(document.getElementById("container").style.setProperty("opacity","1","important"),window.queuedVideos.videos.find(e=>e.contentId===n.video_id)&&(window.queuedVideos.lastVideoId=n.video_id))})}(),Dr.addEventListener("configChange",e=>{ca()}),"complete"===document.readyState?ca():window.addEventListener("load",ca);var ha,da={exports:{}};var pa,ma,fa=(ha||(ha=1,pa=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),r=n(3),o=n(8),a=n(15);function s(e,t,n){var a=null,s=function(e,t){n&&n(e,t),a&&a.visit(e,t)},l="function"==typeof n?s:null,u=!1;if(t){u="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(u||c)&&((a=new i.CommentHandler).attach=c,t.comment=!0,l=s)}var h,d=!1;t&&"string"==typeof t.sourceType&&(d="module"===t.sourceType),h=t&&"boolean"==typeof t.jsx&&t.jsx?new r.JSXParser(e,t,l):new o.Parser(e,t,l);var p=d?h.parseModule():h.parseScript();return u&&a&&(p.comments=a.comments),h.config.tokens&&(p.tokens=h.tokens),h.config.tolerant&&(p.errors=h.errorHandler.errors),p}t.parse=s,t.parseModule=function(e,t,n){var i=t||{};return i.sourceType="module",s(e,i,n)},t.parseScript=function(e,t,n){var i=t||{};return i.sourceType="script",s(e,i,n)},t.tokenize=function(e,t,n){var i,r=new a.Tokenizer(e,t);i=[];try{for(;;){var o=r.getNextToken();if(!o)break;n&&(o=n(o)),i.push(o)}}catch(e){r.errorHandler.tolerate(e)}return r.errorHandler.tolerant&&(i.errors=r.errors()),i};var l=n(2);t.Syntax=l.Syntax,t.version="4.0.1"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===i.Syntax.BlockStatement&&0===e.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var o=this.leading[r];t.end.offset>=o.start&&(n.unshift(o.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=e.end.offset&&t.unshift(i.comment)}return this.trailing.length=0,t}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var o=r.node.trailingComments[0];o&&o.range[0]>=e.end.offset&&(t=r.node.trailingComments,delete r.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&(o=this.stack[this.stack.length-1])&&o.start>=e.start.offset;)t=o.node,this.stack.pop();if(t){for(var i=(t.leadingComments?t.leadingComments.length:0)-1;i>=0;--i){var r=t.leadingComments[i];r.range[1]<=e.start.offset&&(n.unshift(r),t.leadingComments.splice(i,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(i=this.leading.length-1;i>=0;--i){var o;(o=this.leading[i]).start<=e.start.offset&&(n.unshift(o.comment),this.leading.splice(i,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===i.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),r=this.findLeadingComments(t);r.length>0&&(e.leadingComments=r),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",i={type:n,value:e.value};if(e.range&&(i.range=e.range),e.loc&&(i.loc=e.loc),this.comments.push(i),this.attach){var r={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(r.comment.loc=e.loc),e.type=n,this.leading.push(r),this.trailing.push(r)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=r},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),a=n(5),s=n(6),l=n(7),u=n(8),c=n(13),h=n(14);function d(e){var t;switch(e.type){case s.JSXSyntax.JSXIdentifier:t=e.name;break;case s.JSXSyntax.JSXNamespacedName:var n=e;t=d(n.namespace)+":"+d(n.name);break;case s.JSXSyntax.JSXMemberExpression:var i=e;t=d(i.object)+"."+d(i.property)}return t}c.TokenName[100]="JSXIdentifier",c.TokenName[101]="JSXText";var p=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return r(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,i=!1,r=!1,a=!1;!this.scanner.eof()&&n&&!i;){var s=this.scanner.source[this.scanner.index];if(s===e)break;if(i=";"===s,t+=s,++this.scanner.index,!i)switch(t.length){case 2:r="#"===s;break;case 3:r&&(n=(a="x"===s)||o.Character.isDecimalDigit(s.charCodeAt(0)),r=r&&!a);break;default:n=(n=n&&!(r&&!o.Character.isDecimalDigit(s.charCodeAt(0))))&&!(a&&!o.Character.isHexDigit(s.charCodeAt(0)))}}if(n&&i&&t.length>2){var l=t.substr(1,t.length-2);r&&l.length>1?t=String.fromCharCode(parseInt(l.substr(1),10)):a&&l.length>2?t=String.fromCharCode(parseInt("0"+l.substr(1),16)):r||a||!h.XHTMLEntities[l]||(t=h.XHTMLEntities[l])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:s=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],i="";!this.scanner.eof()&&(l=this.scanner.source[this.scanner.index++])!==n;)i+="&"===l?this.scanXHTMLEntity(n):l;return{type:8,value:i,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var r=this.scanner.source.charCodeAt(this.scanner.index+1),a=this.scanner.source.charCodeAt(this.scanner.index+2),s=46===r&&46===a?"...":".";return t=this.scanner.index,this.scanner.index+=s.length,{type:7,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(o.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var l=this.scanner.source.charCodeAt(this.scanner.index);if(o.Character.isIdentifierPart(l)&&92!==l)++this.scanner.index;else{if(45!==l)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,o.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(i)),i},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new a.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(n,i))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var r=t;this.expectJSX(".");var o=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(r,o))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=n;this.expectJSX(":");var r=this.parseJSXIdentifier();e=this.finalize(t,new a.JSXNamespacedName(i,r))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new l.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new a.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(t,i,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new a.JSXClosingElement(t))}var n=this.parseJSXElementName(),i=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(n,r,i))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new a.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new a.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start<n.end){var i=this.getTokenRaw(n),r=this.finalize(t,new a.JSXText(n.value,i));e.push(r)}if("{"!==this.scanner.source[this.scanner.index])break;var o=this.parseJSXExpressionContainer();e.push(o)}return e},t.prototype.parseComplexJSXElement=function(e){for(var t=[];!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());var n=this.createJSXChildNode(),i=this.parseJSXBoundaryElement();if(i.type===s.JSXSyntax.JSXOpeningElement){var r=i;if(r.selfClosing){var o=this.finalize(n,new a.JSXElement(r,[],null));e.children.push(o)}else t.push(e),e={node:n,opening:r,closing:null,children:[]}}if(i.type===s.JSXSyntax.JSXClosingElement){e.closing=i;var l=d(e.opening.name);if(l!==d(e.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",l),!(t.length>0))break;o=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(o),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],i=null;if(!t.selfClosing){var r=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:n});n=r.children,i=r.closing}return this.finalize(e,new a.JSXElement(t,n,i))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(u.Parser);t.JSXParser=p},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),r=function(e){this.type=i.JSXSyntax.JSXClosingElement,this.name=e};t.JSXClosingElement=r;var o=function(e,t,n){this.type=i.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXElement=o;var a=function(){this.type=i.JSXSyntax.JSXEmptyExpression};t.JSXEmptyExpression=a;var s=function(e){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXExpressionContainer=s;var l=function(e){this.type=i.JSXSyntax.JSXIdentifier,this.name=e};t.JSXIdentifier=l;var u=function(e,t){this.type=i.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXMemberExpression=u;var c=function(e,t){this.type=i.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXAttribute=c;var h=function(e,t){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXNamespacedName=h;var d=function(e,t,n){this.type=i.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXOpeningElement=d;var p=function(e){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXSpreadAttribute=p;var m=function(e,t){this.type=i.JSXSyntax.JSXText,this.value=e,this.raw=t};t.JSXText=m},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(e){this.type=i.Syntax.ArrayExpression,this.elements=e};t.ArrayExpression=r;var o=function(e){this.type=i.Syntax.ArrayPattern,this.elements=e};t.ArrayPattern=o;var a=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.ArrowFunctionExpression=a;var s=function(e,t,n){this.type=i.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentExpression=s;var l=function(e,t){this.type=i.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AssignmentPattern=l;var u=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncArrowFunctionExpression=u;var c=function(e,t,n){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionDeclaration=c;var h=function(e,t,n){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=h;var d=function(e){this.type=i.Syntax.AwaitExpression,this.argument=e};t.AwaitExpression=d;var p=function(e,t,n){var r="||"===e||"&&"===e;this.type=r?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BinaryExpression=p;var m=function(e){this.type=i.Syntax.BlockStatement,this.body=e};t.BlockStatement=m;var f=function(e){this.type=i.Syntax.BreakStatement,this.label=e};t.BreakStatement=f;var g=function(e,t){this.type=i.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CallExpression=g;var v=function(e,t){this.type=i.Syntax.CatchClause,this.param=e,this.body=t};t.CatchClause=v;var y=function(e){this.type=i.Syntax.ClassBody,this.body=e};t.ClassBody=y;var b=function(e,t,n){this.type=i.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassDeclaration=b;var S=function(e,t,n){this.type=i.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=S;var x=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ComputedMemberExpression=x;var E=function(e,t,n){this.type=i.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ConditionalExpression=E;var w=function(e){this.type=i.Syntax.ContinueStatement,this.label=e};t.ContinueStatement=w;var D=function(){this.type=i.Syntax.DebuggerStatement};t.DebuggerStatement=D;var C=function(e,t){this.type=i.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.Directive=C;var k=function(e,t){this.type=i.Syntax.DoWhileStatement,this.body=e,this.test=t};t.DoWhileStatement=k;var A=function(){this.type=i.Syntax.EmptyStatement};t.EmptyStatement=A;var T=function(e){this.type=i.Syntax.ExportAllDeclaration,this.source=e};t.ExportAllDeclaration=T;var F=function(e){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportDefaultDeclaration=F;var P=function(e,t,n){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportNamedDeclaration=P;var B=function(e,t){this.type=i.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExportSpecifier=B;var I=function(e){this.type=i.Syntax.ExpressionStatement,this.expression=e};t.ExpressionStatement=I;var O=function(e,t,n){this.type=i.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForInStatement=O;var N=function(e,t,n){this.type=i.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForOfStatement=N;var R=function(e,t,n,r){this.type=i.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r};t.ForStatement=R;var L=function(e,t,n,r){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionDeclaration=L;var M=function(e,t,n,r){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionExpression=M;var _=function(e){this.type=i.Syntax.Identifier,this.name=e};t.Identifier=_;var U=function(e,t,n){this.type=i.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.IfStatement=U;var z=function(e,t){this.type=i.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDeclaration=z;var V=function(e){this.type=i.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportDefaultSpecifier=V;var H=function(e){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportNamespaceSpecifier=H;var j=function(e,t){this.type=i.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.ImportSpecifier=j;var W=function(e,t){this.type=i.Syntax.LabeledStatement,this.label=e,this.body=t};t.LabeledStatement=W;var K=function(e,t){this.type=i.Syntax.Literal,this.value=e,this.raw=t};t.Literal=K;var J=function(e,t){this.type=i.Syntax.MetaProperty,this.meta=e,this.property=t};t.MetaProperty=J;var G=function(e,t,n,r,o){this.type=i.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=r,this.static=o};t.MethodDefinition=G;var X=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="module"};t.Module=X;var q=function(e,t){this.type=i.Syntax.NewExpression,this.callee=e,this.arguments=t};t.NewExpression=q;var Y=function(e){this.type=i.Syntax.ObjectExpression,this.properties=e};t.ObjectExpression=Y;var $=function(e){this.type=i.Syntax.ObjectPattern,this.properties=e};t.ObjectPattern=$;var Q=function(e,t,n,r,o,a){this.type=i.Syntax.Property,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=o,this.shorthand=a};t.Property=Q;var Z=function(e,t,n,r){this.type=i.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}};t.RegexLiteral=Z;var ee=function(e){this.type=i.Syntax.RestElement,this.argument=e};t.RestElement=ee;var te=function(e){this.type=i.Syntax.ReturnStatement,this.argument=e};t.ReturnStatement=te;var ne=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="script"};t.Script=ne;var ie=function(e){this.type=i.Syntax.SequenceExpression,this.expressions=e};t.SequenceExpression=ie;var re=function(e){this.type=i.Syntax.SpreadElement,this.argument=e};t.SpreadElement=re;var oe=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.StaticMemberExpression=oe;var ae=function(){this.type=i.Syntax.Super};t.Super=ae;var se=function(e,t){this.type=i.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchCase=se;var le=function(e,t){this.type=i.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.SwitchStatement=le;var ue=function(e,t){this.type=i.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TaggedTemplateExpression=ue;var ce=function(e,t){this.type=i.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateElement=ce;var he=function(e,t){this.type=i.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.TemplateLiteral=he;var de=function(){this.type=i.Syntax.ThisExpression};t.ThisExpression=de;var pe=function(e){this.type=i.Syntax.ThrowStatement,this.argument=e};t.ThrowStatement=pe;var me=function(e,t,n){this.type=i.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.TryStatement=me;var fe=function(e,t){this.type=i.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UnaryExpression=fe;var ge=function(e,t,n){this.type=i.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.UpdateExpression=ge;var ve=function(e,t){this.type=i.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclaration=ve;var ye=function(e,t){this.type=i.Syntax.VariableDeclarator,this.id=e,this.init=t};t.VariableDeclarator=ye;var be=function(e,t){this.type=i.Syntax.WhileStatement,this.test=e,this.body=t};t.WhileStatement=be;var Se=function(e,t){this.type=i.Syntax.WithStatement,this.object=e,this.body=t};t.WithStatement=Se;var xe=function(e,t){this.type=i.Syntax.YieldExpression,this.argument=e,this.delegate=t};t.YieldExpression=xe},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(10),o=n(11),a=n(7),s=n(12),l=n(2),u=n(13),c="ArrowParameterPlaceHolder",h=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new s.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){var t=Array.prototype.slice.call(arguments,1),n=e.replace(/%(\d)/g,function(e,n){return i.assert(n<t.length,"Message reference must be in range"),t[n]}),r=this.lastMarker.index,o=this.lastMarker.line,a=this.lastMarker.column+1;throw this.errorHandler.createError(r,o,a,n)},e.prototype.tolerateError=function(e){var t=Array.prototype.slice.call(arguments,1),n=e.replace(/%(\d)/g,function(e,n){return i.assert(n<t.length,"Message reference must be in range"),t[n]}),r=this.lastMarker.index,o=this.scanner.lineNumber,a=this.lastMarker.column+1;this.errorHandler.tolerateError(r,o,a,n)},e.prototype.unexpectedTokenError=function(e,t){var n,i=t||o.Messages.UnexpectedToken;if(e?(t||(i=2===e.type?o.Messages.UnexpectedEOS:3===e.type?o.Messages.UnexpectedIdentifier:6===e.type?o.Messages.UnexpectedNumber:8===e.type?o.Messages.UnexpectedString:10===e.type?o.Messages.UnexpectedTemplate:o.Messages.UnexpectedToken,4===e.type&&(this.scanner.isFutureReservedWord(e.value)?i=o.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(i=o.Messages.StrictReservedWord))),n=e.value):n="ILLEGAL",i=i.replace("%0",n),e&&"number"==typeof e.lineNumber){var r=e.start,a=e.lineNumber,s=this.lastMarker.index-this.lastMarker.column,l=e.start-s+1;return this.errorHandler.createError(r,a,l,i)}return r=this.lastMarker.index,a=this.lastMarker.line,l=this.lastMarker.column+1,this.errorHandler.createError(r,a,l,i)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var n=e[t],i=void 0;i={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])},this.config.range&&(i.range=n.range),this.config.loc&&(i.loc=n.loc);var r={start:{line:n.loc.start.line,column:n.loc.start.column,offset:n.range[0]},end:{line:n.loc.end.line,column:n.loc.end.column,offset:n.range[1]}};this.delegate(i,r)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t={type:u.TokenName[e.type],value:this.getTokenRaw(e)};if(this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===e.type){var n=e.pattern,i=e.flags;t.regex={pattern:n,flags:i}}return t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&3===t.type&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&2!==t.type&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},e.prototype.startNode=function(e,t){void 0===t&&(t=0);var n=e.start-e.lineStart,i=e.lineNumber;return n<0&&(n+=t,i--),{index:e.start,line:i,column:n}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var n={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,n)}return t},e.prototype.expect=function(e){var t=this.nextToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;7===e.type&&","===e.value?this.nextToken():7===e.type&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,o.Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();4===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return 7===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return 4===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return 3===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=i,r},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,r},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,i=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(i,new a.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new a.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new a.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new a.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(i,new a.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(i,new a.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(i,new a.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new a.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new a.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,i},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,i,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var i=this.parseFormalParameters(),r=this.parsePropertyMethod(i);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new a.AsyncFunctionExpression(null,i.params,r))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,o.Messages.StrictOctalLiteral);var i=this.getTokenRaw(n);e=this.finalize(t,new a.Literal(n.value,i));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new a.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===l.Syntax.Identifier&&e.name===t||e.type===l.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),i=this.lookahead,r=null,s=null,l=!1,u=!1,c=!1,h=!1;if(3===i.type){var d=i.value;this.nextToken(),l=this.match("["),r=(h=!(this.hasLineTerminator||"async"!==d||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new a.Identifier(d))}else this.match("*")?this.nextToken():(l=this.match("["),r=this.parseObjectPropertyKey());var p=this.qualifiedPropertyName(this.lookahead);if(3===i.type&&!h&&"get"===i.value&&p)t="get",l=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod();else if(3===i.type&&!h&&"set"===i.value&&p)t="set",l=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseSetterMethod();else if(7===i.type&&"*"===i.value&&p)t="init",l=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),u=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!h)!l&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),s=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))s=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),u=!0;else if(3===i.type)if(d=this.finalize(n,new a.Identifier(i.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),c=!0;var m=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(n,new a.AssignmentPattern(d,m))}else c=!0,s=d;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new a.Property(t,r,l,s,u,c))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new a.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,i=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:i},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],i=this.parseTemplateHead();for(n.push(i);!i.tail;)t.push(this.parseExpression()),i=this.parseTemplateElement(),n.push(i);return this.finalize(e,new a.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:e.type=l.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case l.Syntax.ArrayExpression:e.type=l.Syntax.ArrayPattern;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case l.Syntax.ObjectExpression:for(e.type=l.Syntax.ObjectPattern,t=0;t<e.properties.length;t++)this.reinterpretExpressionAsPattern(e.properties[t].value);break;case l.Syntax.AssignmentExpression:e.type=l.Syntax.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:c,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:c,params:[e],async:!1};else{var i=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o<r.length;o++)this.reinterpretExpressionAsPattern(r[o]);i=!0,e={type:c,params:r,async:!1}}else if(this.match("...")){for(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),r.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1,o=0;o<r.length;o++)this.reinterpretExpressionAsPattern(r[o]);i=!0,e={type:c,params:r,async:!1}}else r.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(i)break}i||(e=this.finalize(this.startNode(t),new a.SequenceExpression(r)))}if(!i){if(this.expect(")"),this.match("=>")&&(e.type===l.Syntax.Identifier&&"yield"===e.name&&(i=!0,e={type:c,params:[e],async:!1}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===l.Syntax.SequenceExpression)for(o=0;o<e.expressions.length;o++)this.reinterpretExpressionAsPattern(e.expressions[o]);else this.reinterpretExpressionAsPattern(e);var s=e.type===l.Syntax.SequenceExpression?e.expressions:[e];e={type:c,params:s,async:!1}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return 3===e.type||4===e.type||1===e.type||5===e.type},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new a.Identifier(t.value))},e.prototype.parseNewExpression=function(){var e,t=this.createNode(),n=this.parseIdentifierName();if(i.assert("new"===n.name,"New expression must start with `new`"),this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var r=this.parseIdentifierName();e=new a.MetaProperty(n,r)}else this.throwUnexpectedToken(this.lookahead);else{var o=this.isolateCoverGrammar(this.parseLeftHandSideExpression),s=this.match("(")?this.parseArguments():[];e=new a.NewExpression(o,s),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(t,e)},e.prototype.parseAsyncArgument=function(){var e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e},e.prototype.parseAsyncArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e,t=this.lookahead,n=this.matchContextualKeyword("async"),i=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(e=this.createNode(),this.nextToken(),e=this.finalize(e,new a.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):e=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var r=this.parseIdentifierName();e=this.finalize(this.startNode(t),new a.StaticMemberExpression(e,r))}else if(this.match("(")){var o=n&&t.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var s=o?this.parseAsyncArguments():this.parseArguments();if(e=this.finalize(this.startNode(t),new a.CallExpression(e,s)),o&&this.match("=>")){for(var l=0;l<s.length;++l)this.reinterpretExpressionAsPattern(s[l]);e={type:c,params:s,async:!0}}}else if(this.match("["))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("["),r=this.isolateCoverGrammar(this.parseExpression),this.expect("]"),e=this.finalize(this.startNode(t),new a.ComputedMemberExpression(e,r));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var u=this.parseTemplateLiteral();e=this.finalize(this.startNode(t),new a.TaggedTemplateExpression(e,u))}return this.context.allowIn=i,e},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new a.Super)},e.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new a.ComputedMemberExpression(t,n))}else if(this.match("."))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("."),n=this.parseIdentifierName(),t=this.finalize(e,new a.StaticMemberExpression(t,n));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var r=this.parseTemplateLiteral();t=this.finalize(e,new a.TaggedTemplateExpression(t,r))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(t),i=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(o.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment);var r=!0;e=this.finalize(n,new a.UpdateExpression(i.value,e,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(o.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var s=this.nextToken().value;r=!1,e=this.finalize(this.startNode(t),new a.UpdateExpression(s,e,r))}return e},e.prototype.parseAwaitExpression=function(){var e=this.createNode();this.nextToken();var t=this.parseUnaryExpression();return this.finalize(e,new a.AwaitExpression(t))},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new a.UnaryExpression(n.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===l.Syntax.Identifier&&this.tolerateError(o.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(t.type!==l.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=t,i=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new a.BinaryExpression("**",n,i))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return 7===e.type?this.operatorPrecedence[t]||0:4===e.type&&("instanceof"===t||this.context.allowIn&&"in"===t)?7:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),n=this.lookahead,i=this.binaryPrecedence(n);if(i>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var r=[e,this.lookahead],o=t,s=this.isolateCoverGrammar(this.parseExponentiationExpression),l=[o,n.value,s],u=[i];!((i=this.binaryPrecedence(this.lookahead))<=0);){for(;l.length>2&&i<=u[u.length-1];){s=l.pop();var c=l.pop();u.pop(),o=l.pop(),r.pop();var h=this.startNode(r[r.length-1]);l.push(this.finalize(h,new a.BinaryExpression(c,o,s)))}l.push(this.nextToken().value),u.push(i),r.push(this.lookahead),l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var d=l.length-1;t=l[d];for(var p=r.pop();d>1;){var m=r.pop(),f=p&&p.lineStart;h=this.startNode(m,f),c=l[d-1],t=this.finalize(h,new a.BinaryExpression(c,l[d-2],t)),d-=2,p=m}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new a.ConditionalExpression(t,i,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case l.Syntax.Identifier:this.validateParam(e,t,t.name);break;case l.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case l.Syntax.ArrayPattern:for(var n=0;n<t.elements.length;n++)null!==t.elements[n]&&this.checkPatternParam(e,t.elements[n]);break;case l.Syntax.ObjectPattern:for(n=0;n<t.properties.length;n++)this.checkPatternParam(e,t.properties[n].value)}e.simple=e.simple&&t instanceof a.Identifier},e.prototype.reinterpretAsCoverFormalsList=function(e){var t,n=[e],i=!1;switch(e.type){case l.Syntax.Identifier:break;case c:n=e.params,i=e.async;break;default:return null}t={simple:!0,paramSet:{}};for(var r=0;r<n.length;++r)(a=n[r]).type===l.Syntax.AssignmentPattern?a.right.type===l.Syntax.YieldExpression&&(a.right.argument&&this.throwUnexpectedToken(this.lookahead),a.right.type=l.Syntax.Identifier,a.right.name="yield",delete a.right.argument,delete a.right.delegate):i&&a.type===l.Syntax.Identifier&&"await"===a.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(t,a),n[r]=a;if(this.context.strict||!this.context.allowYield)for(r=0;r<n.length;++r){var a;(a=n[r]).type===l.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(t.message===o.Messages.StrictParamDupe){var s=this.context.strict?t.stricted:t.firstRestricted;this.throwUnexpectedToken(s,t.message)}return{simple:t.simple,params:n,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,n=t;if(e=this.parseConditionalExpression(),3===n.type&&n.lineNumber===this.lookahead.lineNumber&&"async"===n.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var i=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(i),e={type:c,params:[i],async:!0}}if(e.type===c||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=e.async,s=this.reinterpretAsCoverFormalsList(e);if(s){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var u=this.context.strict,h=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var d=this.context.allowYield,p=this.context.await;this.context.allowYield=!0,this.context.await=r;var m=this.startNode(t);this.expect("=>");var f=void 0;if(this.match("{")){var g=this.context.allowIn;this.context.allowIn=!0,f=this.parseFunctionSourceElements(),this.context.allowIn=g}else f=this.isolateCoverGrammar(this.parseAssignmentExpression);var v=f.type!==l.Syntax.BlockStatement;this.context.strict&&s.firstRestricted&&this.throwUnexpectedToken(s.firstRestricted,s.message),this.context.strict&&s.stricted&&this.tolerateUnexpectedToken(s.stricted,s.message),e=r?this.finalize(m,new a.AsyncArrowFunctionExpression(s.params,f,v)):this.finalize(m,new a.ArrowFunctionExpression(s.params,f,v)),this.context.strict=u,this.context.allowStrictDirective=h,this.context.allowYield=d,this.context.await=p}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===l.Syntax.Identifier){var y=e;this.scanner.isRestrictedWord(y.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(y.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var b=(n=this.nextToken()).value,S=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new a.AssignmentExpression(b,e,S)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new a.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new a.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),i=this.parsePattern([],e);this.context.strict&&i.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(o.Messages.StrictVarName);var r=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&i.type!==l.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new a.VariableDeclarator(i,r))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;i.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new a.VariableDeclaration(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var i=this.parsePattern(e,t);return this.finalize(n,new a.RestElement(i))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var i=[];!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}i.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new a.ArrayPattern(i))},e.prototype.parsePropertyPattern=function(e,t){var n,i,r=this.createNode(),o=!1,s=!1;if(3===this.lookahead.type){var l=this.lookahead;n=this.parseVariableIdentifier();var u=this.finalize(r,new a.Identifier(l.value));if(this.match("=")){e.push(l),s=!0,this.nextToken();var c=this.parseAssignmentExpression();i=this.finalize(this.startNode(l),new a.AssignmentPattern(u,c))}else this.match(":")?(this.expect(":"),i=this.parsePatternWithDefault(e,t)):(e.push(l),s=!0,i=u)}else o=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),i=this.parsePatternWithDefault(e,t);return this.finalize(r,new a.Property("init",n,o,i,!1,s))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),i=[];for(this.expect("{");!this.match("}");)i.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new a.ObjectPattern(i))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,i=this.finalize(this.startNode(n),new a.AssignmentPattern(i,o))}return i},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new a.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(o.Messages.StrictVarName);var i=null;return this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===l.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new a.VariableDeclarator(n,i))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new a.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new a.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new a.IfStatement(i,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new a.DoWhileStatement(n,i))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=i}return this.finalize(t,new a.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,i=null,r=null,s=null,u=!0,c=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){i=this.createNode(),this.nextToken();var h=this.context.allowIn;this.context.allowIn=!1;var d=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=h,1===d.length&&this.matchKeyword("in")){var p=d[0];p.init&&(p.id.type===l.Syntax.ArrayPattern||p.id.type===l.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),i=this.finalize(i,new a.VariableDeclaration(d,"var")),this.nextToken(),e=i,t=this.parseExpression(),i=null}else 1===d.length&&null===d[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new a.VariableDeclaration(d,"var")),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,u=!1):(i=this.finalize(i,new a.VariableDeclaration(d,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){i=this.createNode();var m=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(h=this.context.allowIn,this.context.allowIn=!1,d=this.parseBindingList(m,{inFor:!0}),this.context.allowIn=h,1===d.length&&null===d[0].init&&this.matchKeyword("in")?(i=this.finalize(i,new a.VariableDeclaration(d,m)),this.nextToken(),e=i,t=this.parseExpression(),i=null):1===d.length&&null===d[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new a.VariableDeclaration(d,m)),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,u=!1):(this.consumeSemicolon(),i=this.finalize(i,new a.VariableDeclaration(d,m)))):(i=this.finalize(i,new a.Identifier(m)),this.nextToken(),e=i,t=this.parseExpression(),i=null)}else{var f=this.lookahead;if(h=this.context.allowIn,this.context.allowIn=!1,i=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=h,this.matchKeyword("in"))this.context.isAssignmentTarget&&i.type!==l.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseExpression(),i=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&i.type!==l.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseAssignmentExpression(),i=null,u=!1;else{if(this.match(",")){for(var g=[i];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(f),new a.SequenceExpression(g))}this.expect(";")}}if(void 0===e&&(this.match(";")||(r=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===e?this.finalize(c,new a.ForStatement(i,r,s,n)):u?this.finalize(c,new a.ForInStatement(e,t,n)):this.finalize(c,new a.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(o.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(o.Messages.IllegalContinue),this.finalize(e,new a.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(o.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(o.Messages.IllegalBreak),this.finalize(e,new a.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new a.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new a.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var i=[],r=!1;for(this.expect("{");!this.match("}");){var s=this.parseSwitchCase();null===s.test&&(r&&this.throwError(o.Messages.MultipleDefaultsInSwitch),r=!0),i.push(s)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new a.SwitchStatement(t,i))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var i=n,r="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(o.Messages.Redeclaration,"Label",i.name),this.context.labelSet[r]=!0;var s=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),s=this.parseClassDeclaration();else if(this.matchKeyword("function")){var u=this.lookahead,c=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(u,o.Messages.StrictFunction):c.generator&&this.tolerateUnexpectedToken(u,o.Messages.GeneratorInLegacyContext),s=c}else s=this.parseStatement();delete this.context.labelSet[r],e=new a.LabeledStatement(i,s)}else this.consumeSemicolon(),e=new a.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),i={},r=0;r<t.length;r++){var s="$"+t[r].value;Object.prototype.hasOwnProperty.call(i,s)&&this.tolerateError(o.Messages.DuplicateBinding,t[r].value),i[s]=!0}this.context.strict&&n.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(o.Messages.StrictCatchVariable),this.expect(")");var u=this.parseBlock();return this.finalize(e,new a.CatchClause(n,u))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,i=this.matchKeyword("finally")?this.parseFinallyClause():null;return n||i||this.throwError(o.Messages.NoCatchOrFinally),this.finalize(e,new a.TryStatement(t,n,i))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new a.DebuggerStatement)},e.prototype.parseStatement=function(){var e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:e=this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),n=this.context.labelSet,i=this.context.inIteration,r=this.context.inSwitch,o=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=i,this.context.inSwitch=r,this.context.inFunctionBody=o,this.finalize(e,new a.BlockStatement(t))},e.prototype.validateParam=function(e,t,n){var i="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(e.stricted=t,e.message=o.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.message=o.Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(n)?(e.firstRestricted=t,e.message=o.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(n)?(e.firstRestricted=t,e.message=o.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.message=o.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,i,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[i]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var n=this.parsePattern(e);return this.match("=")&&this.throwError(o.Messages.DefaultRestParameter),this.match(")")||this.throwError(o.Messages.ParameterAfterRestParameter),this.finalize(t,new a.RestElement(n))},e.prototype.parseFormalParameter=function(e){for(var t=[],n=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),i=0;i<t.length;i++)this.validateParam(e,t[i],t[i].value);e.simple=e.simple&&n instanceof a.Identifier,e.params.push(n)},e.prototype.parseFormalParameters=function(e){var t;if(t={simple:!0,params:[],firstRestricted:e},this.expect("("),!this.match(")"))for(t.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(t),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.matchAsyncFunction=function(){var e=this.matchContextualKeyword("async");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===n.lineNumber&&4===n.type&&"function"===n.value}return e},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var i,r=!n&&this.match("*");r&&this.nextToken();var s=null,l=null;if(!e||!this.match("(")){var u=this.lookahead;s=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(u.value)&&this.tolerateUnexpectedToken(u,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(u.value)?(l=u,i=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(u.value)&&(l=u,i=o.Messages.StrictReservedWord)}var c=this.context.await,h=this.context.allowYield;this.context.await=n,this.context.allowYield=!r;var d=this.parseFormalParameters(l),p=d.params,m=d.stricted;l=d.firstRestricted,d.message&&(i=d.message);var f=this.context.strict,g=this.context.allowStrictDirective;this.context.allowStrictDirective=d.simple;var v=this.parseFunctionSourceElements();return this.context.strict&&l&&this.throwUnexpectedToken(l,i),this.context.strict&&m&&this.tolerateUnexpectedToken(m,i),this.context.strict=f,this.context.allowStrictDirective=g,this.context.await=c,this.context.allowYield=h,n?this.finalize(t,new a.AsyncFunctionDeclaration(s,p,v)):this.finalize(t,new a.FunctionDeclaration(s,p,v,r))},e.prototype.parseFunctionExpression=function(){var e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");var n,i=!t&&this.match("*");i&&this.nextToken();var r,s=null,l=this.context.await,u=this.context.allowYield;if(this.context.await=t,this.context.allowYield=!i,!this.match("(")){var c=this.lookahead;s=this.context.strict||i||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(c.value)&&this.tolerateUnexpectedToken(c,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(c.value)?(r=c,n=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(c.value)&&(r=c,n=o.Messages.StrictReservedWord)}var h=this.parseFormalParameters(r),d=h.params,p=h.stricted;r=h.firstRestricted,h.message&&(n=h.message);var m=this.context.strict,f=this.context.allowStrictDirective;this.context.allowStrictDirective=h.simple;var g=this.parseFunctionSourceElements();return this.context.strict&&r&&this.throwUnexpectedToken(r,n),this.context.strict&&p&&this.tolerateUnexpectedToken(p,n),this.context.strict=m,this.context.allowStrictDirective=f,this.context.await=l,this.context.allowYield=u,t?this.finalize(e,new a.AsyncFunctionExpression(s,d,g)):this.finalize(e,new a.FunctionExpression(s,d,g,i))},e.prototype.parseDirective=function(){var e=this.lookahead,t=this.createNode(),n=this.parseExpression(),i=n.type===l.Syntax.Literal?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,i?new a.Directive(n,i):new a.ExpressionStatement(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var n=this.lookahead;if(8!==n.type)break;var i=this.parseDirective();t.push(i);var r=i.directive;if("string"!=typeof r)break;"use strict"===r?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,o.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,o.Messages.IllegalLanguageModeDirective)):!e&&n.octal&&(e=n)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode(),t=!1,n=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters();i.params.length>0&&this.tolerateError(o.Messages.BadGetterArity);var r=this.parsePropertyMethod(i);return this.context.allowYield=n,this.finalize(e,new a.FunctionExpression(null,i.params,r,t))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=!1,n=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters();1!==i.params.length?this.tolerateError(o.Messages.BadSetterArity):i.params[0]instanceof a.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var r=this.parsePropertyMethod(i);return this.context.allowYield=n,this.finalize(e,new a.FunctionExpression(null,i.params,r,t))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,i,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=i}return this.finalize(e,new a.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),i="",r=null,s=null,l=!1,u=!1,c=!1,h=!1;if(this.match("*"))this.nextToken();else if(l=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,c=!0,l=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var d=this.lookahead.value;":"!==d&&"("!==d&&"*"!==d&&(h=!0,t=this.lookahead,r=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,o.Messages.ConstructorIsAsync))}var p=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&p?(i="get",l=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod()):"set"===t.value&&p&&(i="set",l=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseSetterMethod()):7===t.type&&"*"===t.value&&p&&(i="init",l=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),u=!0),!i&&r&&this.match("(")&&(i="init",s=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),u=!0),i||this.throwUnexpectedToken(this.lookahead),"init"===i&&(i="method"),l||(c&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(t,o.Messages.StaticPrototype),!c&&this.isPropertyKey(r,"constructor")&&(("method"!==i||!u||s&&s.generator)&&this.throwUnexpectedToken(t,o.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,o.Messages.DuplicateConstructor):e.value=!0,i="constructor")),this.finalize(n,new a.MethodDefinition(r,l,s,i,c))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new a.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var i=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=n,this.finalize(t,new a.ClassDeclaration(i,r,o))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=t,this.finalize(e,new a.ClassExpression(n,i,r))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(o.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new a.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new a.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new a.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new a.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var i=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new a.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new a.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new a.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new a.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var i=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();var r=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new a.ExportAllDeclaration(r))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null));else{var s=[],l=null,u=!1;for(this.expect("{");!this.match("}");)u=u||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),l=this.parseModuleSpecifier(),this.consumeSemicolon()):u?(i=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause,this.throwError(i,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new a.ExportNamedDeclaration(null,s,l))}return e},e}();t.Parser=h},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(e){Object.create&&Object.defineProperty&&(n=Object.create(e),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,i){var r="Line "+t+": "+i,o=this.constructError(r,n);return o.index=e,o.lineNumber=t,o.description=i,o},e.prototype.throwError=function(e,t,n,i){throw this.createError(e,t,n,i)},e.prototype.tolerateError=function(e,t,n,i){var r=this.createError(e,t,n,i);if(!this.tolerant)throw r;this.recordError(r)},e}();t.ErrorHandler=n},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(4),o=n(11);function a(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function s(e){return"01234567".indexOf(e)}var l=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,i=[];for(this.trackComment&&(i=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(++this.index,r.Character.isLineTerminator(o)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var a={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};i.push(a)}return 13===o&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,i}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},a={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},i.push(a)),i},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(r.Character.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(o)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(o)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(r.Character.isWhiteSpace(n))++this.index;else if(r.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var i=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(i)),t=!0}else{if(42!==n)break;this.index+=2,i=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(i))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,i=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(i))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,i=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(i))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,i=0;i<t;++i){if(this.eof()||!r.Character.isHexDigit(this.source.charCodeAt(this.index)))return null;n=16*n+a(this.source[this.index++])}return String.fromCharCode(n)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],r.Character.isHexDigit(e.charCodeAt(0)));)t=16*t+a(e);return(t>1114111||"}"!==e)&&this.throwUnexpectedToken(),r.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!r.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=r.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),r.Character.isIdentifierPart(t));)n+=e=r.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=s(e);return!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+s(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+s(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var i=this.index;this.index=t,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=i}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&r.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(r.Character.isIdentifierStart(t)||r.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",i=!1;for(r.Character.isOctalDigit(e.charCodeAt(0))?(i=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return i||0!==n.length||this.throwUnexpectedToken(),(r.Character.isIdentifierStart(this.source.charCodeAt(this.index))||r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!r.Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];i.assert(r.Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var n="";if("."!==t){if(n=this.source[this.index++],t=this.source[this.index],"0"===n){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&r.Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(n+=this.source[this.index++];r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(n+=this.source[this.index++],"+"!==(t=this.source[this.index])&&"-"!==t||(n+=this.source[this.index++]),r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];i.assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var n=!1,a="";!this.eof();){var s=this.source[this.index++];if(s===t){t="";break}if("\\"===s)if((s=this.source[this.index++])&&r.Character.isLineTerminator(s.charCodeAt(0)))++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(s){case"u":if("{"===this.source[this.index])++this.index,a+=this.scanUnicodeCodePointEscape();else{var l=this.scanHexEscape(s);null===l&&this.throwUnexpectedToken(),a+=l}break;case"x":var u=this.scanHexEscape(s);null===u&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),a+=u;break;case"n":a+="\n";break;case"r":a+="\r";break;case"t":a+="\t";break;case"b":a+="\b";break;case"f":a+="\f";break;case"v":a+="\v";break;case"8":case"9":a+=s,this.tolerateUnexpectedToken();break;default:if(s&&r.Character.isOctalDigit(s.charCodeAt(0))){var c=this.octalToDecimal(s);n=c.octal||n,a+=String.fromCharCode(c.code)}else a+=s}else{if(r.Character.isLineTerminator(s.charCodeAt(0)))break;a+=s}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:a,octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,n=this.index,i="`"===this.source[n],a=!1,s=2;for(++this.index;!this.eof();){var l=this.source[this.index++];if("`"===l){s=1,a=!0,t=!0;break}if("$"===l){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=l}else if("\\"===l)if(l=this.source[this.index++],r.Character.isLineTerminator(l.charCodeAt(0)))++this.lineNumber,"\r"===l&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(l){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{var u=this.index,c=this.scanHexEscape(l);null!==c?e+=c:(this.index=u,e+=l)}break;case"x":var h=this.scanHexEscape(l);null===h&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),e+=h;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===l?(r.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral),e+="\0"):r.Character.isOctalDigit(l.charCodeAt(0))?this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral):e+=l}else r.Character.isLineTerminator(l.charCodeAt(0))?(++this.lineNumber,"\r"===l&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=l}return t||this.throwUnexpectedToken(),i||this.curlyStack.pop(),{type:10,value:this.source.slice(n+1,this.index-s),cooked:e,head:i,tail:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}},e.prototype.testRegExp=function(e,t){var n=e,i=this;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,n){var r=parseInt(t||n,16);return r>1114111&&i.throwUnexpectedToken(o.Messages.InvalidRegExp),r<=65535?String.fromCharCode(r):""}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,""));try{RegExp(n)}catch(e){this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];i.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,a=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],r.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t+=e;else if(r.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){a=!0;break}"["===e&&(n=!0)}return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!r.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,i=this.scanHexEscape("u");if(null!==i)for(e+=i;n<this.index;++n)this.source[n];else this.index=n,e+="u";this.tolerateUnexpectedToken()}else this.tolerateUnexpectedToken()}return e},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),n=this.scanRegExpFlags();return{type:9,value:"",pattern:t,flags:n,regex:this.testRegExp(t,n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return r.Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?r.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():r.Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&r.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=l},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=n(12),o=n(13),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(i=this.values[this.curly-4])&&!this.beforeFunctionExpression(i);else if("function"===this.values[this.curly-4]){var i;t=!(i=this.values[this.curly-5])||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),s=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var n=e[t],i=this.scanner.source.slice(n.slice[0],n.slice[1]),r={type:n.multiLine?"BlockComment":"LineComment",value:i};this.trackRange&&(r.range=n.range),this.trackLoc&&(r.loc=n.loc),this.buffer.push(r)}if(!this.scanner.eof()){var a=void 0;this.trackLoc&&(a={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var s="/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(s);var l={type:o.TokenName[s.type],value:this.scanner.source.slice(s.start,s.end)};if(this.trackRange&&(l.range=[s.start,s.end]),this.trackLoc&&(a.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},l.loc=a),9===s.type){var u=s.pattern,c=s.flags;l.regex={pattern:u,flags:c}}this.buffer.push(l)}}return this.buffer.shift()},e}();t.Tokenizer=s}])},da.exports=pa()),da.exports),ga=$(fa),va={};var ya=(ma||(ma=1,function e(t){var n,i,r,o,a,s;function l(e){var t,n,i={};for(t in e)e.hasOwnProperty(t)&&("object"===D(n=e[t])&&null!==n?i[t]=l(n):i[t]=n);return i}function u(e,t){this.parent=e,this.key=t}function c(e,t,n,i){this.node=e,this.path=t,this.wrap=n,this.ref=i}function h(){}function d(e){return null!=e&&"object"===D(e)&&"string"==typeof e.type}function p(e,t){return(e===n.ObjectExpression||e===n.ObjectPattern)&&"properties"===t}function m(e,t){for(var n=e.length-1;n>=0;--n)if(e[n].node===t)return!0;return!1}function f(e,t){return(new h).traverse(e,t)}function g(e,t){var n;return n=function(e,t){var n,i,r,o;for(i=e.length,r=0;i;)t(e[o=r+(n=i>>>1)])?i=n:(r=o+1,i-=n+1);return r}(t,function(t){return t.range[0]>e.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),(n-=1)>=0&&(e.extendedRange[0]=t[n].range[1]),e}return n={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},r={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},i={Break:o={},Skip:a={},Remove:s={}},u.prototype.replace=function(e){this.parent[this.key]=e},u.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},h.prototype.path=function(){var e,t,n,i,r;function o(e,t){if(Array.isArray(t))for(n=0,i=t.length;n<i;++n)e.push(t[n]);else e.push(t)}if(!this.__current.path)return null;for(r=[],e=2,t=this.__leavelist.length;e<t;++e)o(r,this.__leavelist[e].path);return o(r,this.__current.path),r},h.prototype.type=function(){return this.current().type||this.__current.wrap},h.prototype.parents=function(){var e,t,n;for(n=[],e=1,t=this.__leavelist.length;e<t;++e)n.push(this.__leavelist[e].node);return n},h.prototype.current=function(){return this.__current.node},h.prototype.__execute=function(e,t){var n,i;return i=void 0,n=this.__current,this.__current=t,this.__state=null,e&&(i=e.call(this,t.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=n,i},h.prototype.notify=function(e){this.__state=e},h.prototype.skip=function(){this.notify(a)},h.prototype.break=function(){this.notify(o)},h.prototype.remove=function(){this.notify(s)},h.prototype.__initialize=function(e,t){this.visitor=t,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,"iteration"===t.fallback?this.__fallback=Object.keys:"function"==typeof t.fallback&&(this.__fallback=t.fallback),this.__keys=r,t.keys&&(this.__keys=Object.assign(Object.create(this.__keys),t.keys))},h.prototype.traverse=function(e,t){var n,i,r,s,l,u,h,f,g,v,y,b;for(this.__initialize(e,t),b={},n=this.__worklist,i=this.__leavelist,n.push(new c(e,null,null,null)),i.push(new c(null,null,null,null));n.length;)if((r=n.pop())!==b){if(r.node){if(u=this.__execute(t.enter,r),this.__state===o||u===o)return;if(n.push(b),i.push(r),this.__state===a||u===a)continue;if(l=(s=r.node).type||r.wrap,!(v=this.__keys[l])){if(!this.__fallback)throw new Error("Unknown node type "+l+".");v=this.__fallback(s)}for(f=v.length;(f-=1)>=0;)if(y=s[h=v[f]])if(Array.isArray(y)){for(g=y.length;(g-=1)>=0;)if(y[g]&&!m(i,y[g])){if(p(l,v[f]))r=new c(y[g],[h,g],"Property",null);else{if(!d(y[g]))continue;r=new c(y[g],[h,g],null,null)}n.push(r)}}else if(d(y)){if(m(i,y))continue;n.push(new c(y,h,null,null))}}}else if(r=i.pop(),u=this.__execute(t.leave,r),this.__state===o||u===o)return},h.prototype.replace=function(e,t){var n,i,r,l,h,m,f,g,v,y,b,S,x;function E(e){var t,i,r,o;if(e.ref.remove())for(i=e.ref.key,o=e.ref.parent,t=n.length;t--;)if((r=n[t]).ref&&r.ref.parent===o){if(r.ref.key<i)break;--r.ref.key}}for(this.__initialize(e,t),b={},n=this.__worklist,i=this.__leavelist,m=new c(e,null,null,new u(S={root:e},"root")),n.push(m),i.push(m);n.length;)if((m=n.pop())!==b){if(void 0!==(h=this.__execute(t.enter,m))&&h!==o&&h!==a&&h!==s&&(m.ref.replace(h),m.node=h),this.__state!==s&&h!==s||(E(m),m.node=null),this.__state===o||h===o)return S.root;if((r=m.node)&&(n.push(b),i.push(m),this.__state!==a&&h!==a)){if(l=r.type||m.wrap,!(v=this.__keys[l])){if(!this.__fallback)throw new Error("Unknown node type "+l+".");v=this.__fallback(r)}for(f=v.length;(f-=1)>=0;)if(y=r[x=v[f]])if(Array.isArray(y)){for(g=y.length;(g-=1)>=0;)if(y[g]){if(p(l,v[f]))m=new c(y[g],[x,g],"Property",new u(y,g));else{if(!d(y[g]))continue;m=new c(y[g],[x,g],null,new u(y,g))}n.push(m)}}else d(y)&&n.push(new c(y,x,null,new u(r,x)))}}else if(m=i.pop(),void 0!==(h=this.__execute(t.leave,m))&&h!==o&&h!==a&&h!==s&&m.ref.replace(h),this.__state!==s&&h!==s||E(m),this.__state===o||h===o)return S.root;return S.root},t.Syntax=n,t.traverse=f,t.replace=function(e,t){return(new h).replace(e,t)},t.attachComments=function(e,t,n){var r,o,a,s,u=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(a=0,o=t.length;a<o;a+=1)(r=l(t[a])).extendedRange=[0,e.range[0]],u.push(r);e.leadingComments=u}return e}for(a=0,o=t.length;a<o;a+=1)u.push(g(l(t[a]),n));return s=0,f(e,{enter:function(e){for(var t;s<u.length&&!((t=u[s]).extendedRange[1]>e.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?i.Break:u[s].extendedRange[0]>e.range[1]?i.Skip:void 0}}),s=0,f(e,{leave:function(e){for(var t;s<u.length&&(t=u[s],!(e.range[1]<t.extendedRange[0]));)e.range[1]===t.extendedRange[0]?(e.trailingComments||(e.trailingComments=[]),e.trailingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?i.Break:u[s].extendedRange[0]>e.range[1]?i.Skip:void 0}}),e},t.VisitorKeys=r,t.VisitorOption=i,t.Controller=h,t.cloneEnvironment=function(){return e({})},t}(va)),va),ba=$(ya);var Sa=null;function xa(){if(!window._yttv)return setTimeout(xa,250);if(!document.querySelector("video"))return setTimeout(xa,250);var e=Object.keys(window._yttv).filter(e=>"function"==typeof window._yttv[e]&&window._yttv[e].toString().includes("TRANSPORT_CONTROLS_BUTTON_TYPE_FEATURED_ACTION"));if(0!==e.length){var t=window._yttv[e[0]];Er("enablePatchingVideoPlayer")&&(n.prototype=t.prototype,window._yttv[e[0]]=n)}else setTimeout(xa,250);function n(){var e,i=Array.prototype.slice.call(arguments),r=/^class\s/.test(t.toString());function o(e,i){return"undefined"!=typeof Reflect&&"function"==typeof Reflect.construct?Reflect.construct(e,i,n):new t(...i)}if(!(this instanceof n))return r?o(t,i):t.apply(this,i);r?e=o(t,i):(t.apply(this,i),e=this);var a=Sa||(Sa=function(e){var t,n=e,i=0;try{t=ga.parse(e,{range:!0,tolerant:!0,sourceType:"script"})}catch(n){try{var r="("+e+")";t=ga.parse(r,{range:!0,tolerant:!0,sourceType:"script"}),i=1}catch(r){try{t=ga.parse(e,{range:!0,tolerant:!0,sourceType:"module"})}catch(r){try{var o="("+e+")";t=ga.parse(o,{range:!0,tolerant:!0,sourceType:"module"}),i=1}catch(e){throw n}}}}var a=[];return ba.traverse(t,{enter:function(e){if("AssignmentExpression"===e.type){var t=e.right;if(t&&t.range){var r=n.slice(t.range[0]-i,t.range[1]-i),o=null;if("CallExpression"===t.type&&t.callee&&"FunctionExpression"===t.callee.type&&t.callee.body)for(var s=t.callee.body.body||[],l=0;l<s.length;l++){var u=s[l];if("ReturnStatement"===u.type&&u.argument&&u.argument.range){o=n.slice(u.argument.range[0]-i,u.argument.range[1]-i);break}}else"FunctionExpression"!==t.type&&"ArrowFunctionExpression"!==t.type||(o=r);a.push({left:e.left&&e.left.range?n.slice(e.left.range[0]-i,e.left.range[1]-i):null,rhs:r,returned:o})}}}}),a}(t.toString())),s={type:"TRANSPORT_CONTROLS_BUTTON_TYPE_PIP",button:{buttonRenderer:Ur(!1,Er("enableSwapMPWithPIP")?mr("player.pictureInPicture"):mr("player.miniPlayer"),"CLEAR_COOKIES",{customAction:{action:Er("enableSwapMPWithPIP")?"ENTER_PIP":"ENTER_MP"}})}},l=a.find(e=>e.rhs.includes("TRANSPORT_CONTROLS_BUTTON_TYPE_PLAYBACK_SETTINGS")).left.split(".")[1];if(!l)return e;var u=e[l];Er("enableMPButton")&&(e[l]=function(){var e=u.apply(this,arguments),t=e.findIndex(e=>"TRANSPORT_CONTROLS_BUTTON_TYPE_PLAYBACK_SETTINGS"===e.type);return e.find(e=>"TRANSPORT_CONTROLS_BUTTON_TYPE_PIP"===e.type)||e.splice(t,0,s),e});var c=a.find(e=>{if(e.rhs.includes("skipNextButton")){var t=e.rhs.indexOf("skipNextButton");if(e.rhs.indexOf("skipPreviousButton")>t)return!0}}).left.split(".")[1],h=a.find(e=>{if(e.rhs.includes("skipPreviousButton")&&e.rhs.indexOf("skipNextButton")>e.rhs.indexOf("skipPreviousButton"))return!0}).left.split(".")[1],d=a.find(e=>e.rhs.includes("props.data.engagementActions")).left.split(".")[1];if(d&&Er("enableSpeedControlsButton")){var p=e[d];e[d]=function(){var e=p.apply(this,arguments);return e.find(e=>"TRANSPORT_CONTROLS_BUTTON_TYPE_SPEED"===e.type)||e.push({type:"TRANSPORT_CONTROLS_BUTTON_TYPE_SPEED",button:{buttonRenderer:Ur(!1,mr("player.playbackSpeed.button"),"SLOW_MOTION_VIDEO",{customAction:{action:"TT_SPEED_SETTINGS_SHOW"}})}}),e}}if(!Er("enableSuperThanksButton")){var m=e[d];e[d]=function(){return m.apply(this,arguments).filter(e=>"TRANSPORT_CONTROLS_BUTTON_TYPE_SUPER_THANKS"!==e.type).filter(e=>"TRANSPORT_CONTROLS_BUTTON_TYPE_SHOPPING"!==e.type)}}if(!Er("enableAIAskButton")){var f=e[d];e[d]=function(){return f.apply(this,arguments).filter(e=>"TRANSPORT_CONTROLS_BUTTON_TYPE_YOUCHAT_BUTTON"!==e.type).filter(e=>"TRANSPORT_CONTROLS_BUTTON_TYPE_YOUCHAT_BUTTON"!==e.type)}}if(Er("enablePreviousNextButtons")){if(!c||!h)return e;e[c]=function(){return Ur(!1,mr("player.previous"),"SKIP_PREVIOUS",{signalAction:{signal:"PLAYER_PLAY_PREVIOUS"}})},e[h]=function(){return Ur(!1,mr("player.next"),"SKIP_NEXT",{signalAction:{signal:"PLAYER_PLAY_NEXT"}})}}return e}}"complete"===document.readyState||"interactive"===document.readyState?xa():window.addEventListener("DOMContentLoaded",xa);var Ea,wa=JSON.parse;function Da(e){var t=document.getElementById("tizentube-clock");if(!e||!t)if(e||!t){if(e||t){var n=document.createElement("div");function i(){var e=new Date,t=Er("isClock12HourFormat"),n=Er("clockShowSeconds"),i=Er("clockHideWhenVideoPlaying"),r=document.querySelector("ytlr-watch-default");i&&(r&&"true"===r.getAttribute("hybridnavfocusable")?Ea.style.display="none":Ea.style.display="block");var o=e.getHours();t&&(o=o%12||12),o=o.toString().padStart(2,"0");var a=e.getMinutes().toString().padStart(2,"0"),s=e.getSeconds().toString().padStart(2,"0");Ea.textContent=`${o}:${a}${n?`:${s}`:""}${t?e.getHours()>=12?" PM":" AM":""}`}n.id="tizentube-clock",n.style.height="45rem",n.style.width="80rem",n.style.position="absolute",n.style.top="50%",n.style.left="50%",n.style.marginTop="-22.5rem",n.style.marginLeft="-40rem",(Ea=document.createElement("div")).style.position="absolute",Ea.style.zIndex="9999",Ea.style.right="5%",Ea.style.top="2%",Ea.style.fontSize="1.5em",n.appendChild(Ea),document.body.appendChild(n),i(),setInterval(i,1e3)}}else t.remove()}JSON.parse=function(){var e,t,n=wa.apply(this,arguments),i=null===(e=n.items)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.guideSectionRenderer,r=Er("sidebarContentsOrder");if(i&&Array.isArray(r)){var o,a=!1,s=f(i.items);try{var l=function(){var e,t,n=o.value,i=(null===(e=n.guideEntryRenderer)||void 0===e||null===(e=e.navigationEndpoint)||void 0===e||null===(e=e.browseEndpoint)||void 0===e?void 0:e.browseId)||(null===(t=n.guideEntryRenderer)||void 0===t||null===(t=t.navigationEndpoint)||void 0===t?void 0:t.searchEndpoint)&&"search";i&&!r.some(e=>("object"===D(e)?e.browseId:e)===i)&&(r.push(i),a=!0)};for(s.s();!(o=s.n()).done;)l()}catch(e){s.e(e)}finally{s.f()}a&&wr("sidebarContentsOrder",r)}if(0===(null===(t=Er("sidebarContentsOrder"))||void 0===t?void 0:t.length)){if(n.items&&Array.isArray(n.items)&&n.items[0].guideSectionRenderer){var u,c=[],h=f(n.items[0].guideSectionRenderer.items);try{for(h.s();!(u=h.n()).done;){var d,p,m=u.value,g=null===(d=m.guideEntryRenderer)||void 0===d||null===(d=d.navigationEndpoint)||void 0===d||null===(d=d.browseEndpoint)||void 0===d?void 0:d.browseId;g?c.push(g):null!==(p=m.guideEntryRenderer)&&void 0!==p&&null!==(p=p.navigationEndpoint)&&void 0!==p&&p.searchEndpoint&&c.push("search")}}catch(e){h.e(e)}finally{h.f()}wr("sidebarContentsOrder",c)}}else if(n.items&&Array.isArray(n.items)&&n.items[0].guideSectionRenderer){var v,y=Er("sidebarContentsOrder"),b=n.items[0].guideSectionRenderer.items,S=JSON.parse(JSON.stringify(b)),x=f(y);try{for(x.s();!(v=x.n()).done;){var E=v.value;if("object"===D(E)&&null!==E){var w=zr(E.title,{browseEndpoint:{browseId:E.browseId}},"PERSON");S.push(w)}}}catch(e){x.e(e)}finally{x.f()}var C,k=[],A=new Set,T=f(y);try{var F=function(){var e=C.value,t="object"===D(e)?e.browseId:e,n=S.findIndex(e=>{var n,i;return(null===(n=e.guideEntryRenderer)||void 0===n||null===(n=n.navigationEndpoint)||void 0===n||null===(n=n.browseEndpoint)||void 0===n?void 0:n.browseId)===t||"search"===t&&(null===(i=e.guideEntryRenderer)||void 0===i||null===(i=i.navigationEndpoint)||void 0===i?void 0:i.searchEndpoint)});-1!==n&&(k.push(S[n]),A.add(n))};for(T.s();!(C=T.n()).done;)F()}catch(e){T.e(e)}finally{T.f()}S.forEach((e,t)=>{A.has(t)||k.push(e)}),n.items[0].guideSectionRenderer.items=k}var P=Er("disabledSidebarContents"),B=Er("disableChannelsOnSidebar");if(n.items&&Array.isArray(n.items)&&n.items[0].guideSectionRenderer)for(var I=0;I<n.items.length;I++){var O=n.items[I].guideSectionRenderer;O.originalItems=O.items.slice();for(var N=0;N<O.items.length;N++){var R,L=O.items[N].guideEntryRenderer;L&&((null!=P&&P.length&&P.includes(null!==(R=L.navigationEndpoint)&&void 0!==R&&R.browseEndpoint?L.navigationEndpoint.browseEndpoint.browseId:"search")||B&&null!=L&&L.thumbnail)&&(O.items.splice(N,1),N--))}}return n},Dr.addEventListener("configChange",e=>{if("disabledSidebarContents"===e.detail.key||"disableChannelsOnSidebar"===e.detail.key||"sidebarContentsOrder"===e.detail.key){var t=_o();t&&t.executeFunction(new t.commandFunction("reloadGuideAction"))}}),function e(){var t=document.querySelector(".html5-video-player"),n=document.querySelector("video");if(!t)return setTimeout(e,500);t.addEventListener("onPlaybackStartExternal",()=>{try{if(-1===window.location.href.indexOf("watch"))return;var e=t.getStatsForNerds().resolution.match(/(\d+)x(\d+)@([\d.]+)/),i=Er("autoFrameRatePauseVideoFor");if(e){var r=e[3];Er("autoFrameRate")&&window.h5vcc&&window.h5vcc.tizentube&&window.h5vcc.tizentube.SetFrameRate&&(i>0&&(n.pause(),setTimeout(()=>{n.play()},i)),window.h5vcc.tizentube.SetFrameRate(parseFloat(r)))}}catch(e){console.error("Error in auto frame rate handling:",e)}}),window.addEventListener("hashchange",()=>{window.location.href.indexOf("watch")>0&&Er("autoFrameRate")&&window.h5vcc&&window.h5vcc.tizentube&&window.h5vcc.tizentube.SetFrameRate&&window.h5vcc.tizentube.SetFrameRate(0)})}(),Dr.addEventListener("configChange",e=>{"enableClock"===e.detail.key&&Da(e.detail.value)}),Da(Er("enableClock")),"localhost"===window.location.hostname&&function(){var t=window.fetch;t&&(window.fetch=function(n,i){var r="",o=!1;if("string"==typeof n?r=e(n):n instanceof URL?(r=e(n.toString()),n=new URL(r)):n instanceof Request&&(o=!0,r=e(n.url)),o){if("POST"===n.method&&-1!==r.indexOf("localhost")){var a={method:n.method,headers:new Headers(n.headers),mode:n.mode,credentials:n.credentials};return n.body&&!n.bodyUsed?(n.clone(),n.clone().arrayBuffer().then(function(e){return a.body=e,t(r,a)})):t(r,a)}n=new Request(r,n)}return t.apply(this,[r,i])});var n=XMLHttpRequest.prototype.open;if(XMLHttpRequest.prototype.open=function(t,i,r,o,a){var s=e(i);return s!==i&&(r=!0),void 0===r&&(r=!0),n.apply(this,[t,s,r,o,a])},navigator.sendBeacon){var i=navigator.sendBeacon;navigator.sendBeacon=function(t,n){return console.log("Beacon data:",n),i.apply(this,[e(t),n])}}Object.defineProperty(HTMLImageElement.prototype,"src",{set:function(t){Object.getOwnPropertyDescriptor(Element.prototype,"setAttribute").value.call(this,"src",e(t))}}),Object.defineProperty(HTMLScriptElement.prototype,"src",{set:function(t){Object.getOwnPropertyDescriptor(Element.prototype,"setAttribute").value.call(this,"src",e(t))}})}()}();
|
|
3
|
+
var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var l=i&&i.prototype instanceof s?i:s,u=Object.create(l.prototype);return x(u,"_invoke",function(n,i,r){var o,s,l,u=0,c=r||[],h=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,d.n=n,a}};function p(n,i){for(s=n,l=i,t=0;!h&&u&&!r&&t<c.length;t++){var r,o=c[t],p=d.p,m=o[2];n>3?(r=m===i)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((r=n<2&&p<o[1])?(s=0,d.v=i,d.n=o[1]):p<m&&(r=n<3||o[0]>i||i>m)&&(o[4]=n,o[5]=i,d.n=m,s=0))}if(r||n>1)return a;throw h=!0,i}return function(r,c,m){if(u>1)throw TypeError("Generator is already running");for(h&&1===c&&p(c,m),s=c,l=m;(t=s<2?e:l)||!h;){o||(s?s<3?(s>1&&(d.n=-1),p(s,l)):d.n=l:d.v=l);try{if(u=2,o){if(s||(r="next"),t=o[r]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),s=1);o=e}else if((t=(h=d.n<0)?l:n.call(i,d))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:h}}}(n,r,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][i]?t(t([][i]())):(x(t={},i,function(){return this}),t),h=u.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,x(e,r,"GeneratorFunction")),e.prototype=Object.create(h),e}return l.prototype=u,x(h,"constructor",u),x(u,"constructor",l),l.displayName="GeneratorFunction",x(u,r,"GeneratorFunction"),x(h),x(h,r,"Generator"),x(h,i,function(){return this}),x(h,"toString",function(){return"[object Generator]"}),(S=function(){return{w:o,m:d}})()}function x(e,t,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}x=function(e,t,n,i){if(t)r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n;else{function o(t,n){x(e,t,function(e){return this._invoke(t,n,e)})}o("next",0),o("throw",1),o("return",2)}},x(e,t,n,i)}function E(e,t){return s(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){u=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(e,t)||C(e,t)||v()}function w(e){return s(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(e)||v()}function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function C(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}var k="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},A="URLSearchParams"in k,T="Symbol"in k&&"iterator"in Symbol,F="FileReader"in k&&"Blob"in k&&function(){try{return new Blob,!0}catch(e){return!1}}(),P="FormData"in k,B="ArrayBuffer"in k;if(B)var I=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],O=ArrayBuffer.isView||function(e){return e&&I.indexOf(Object.prototype.toString.call(e))>-1};function N(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function R(e){return"string"!=typeof e&&(e=String(e)),e}function L(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return T&&(t[Symbol.iterator]=function(){return t}),t}function M(e){this.map={},e instanceof M?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function _(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function U(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function z(e){var t=new FileReader,n=U(t);return t.readAsArrayBuffer(e),n}function V(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function H(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:F&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:P&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:A&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():B&&F&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=V(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):B&&(ArrayBuffer.prototype.isPrototypeOf(e)||O(e))?this._bodyArrayBuffer=V(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):A&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},F&&(this.blob=function(){var e=_(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=_(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(F)return this.blob().then(z);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,i,r,o=_(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=U(t),i=/charset=([A-Za-z0-9_-]+)/.exec(e.type),r=i?i[1]:"utf-8",t.readAsText(e,r),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),i=0;i<t.length;i++)n[i]=String.fromCharCode(t[i]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},P&&(this.formData=function(){return this.text().then(K)}),this.json=function(){return this.text().then(JSON.parse)},this}M.prototype.append=function(e,t){e=N(e),t=R(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},M.prototype.delete=function(e){delete this.map[N(e)]},M.prototype.get=function(e){return e=N(e),this.has(e)?this.map[e]:null},M.prototype.has=function(e){return this.map.hasOwnProperty(N(e))},M.prototype.set=function(e,t){this.map[N(e)]=R(t)},M.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},M.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),L(e)},M.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),L(e)},M.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),L(e)},T&&(M.prototype[Symbol.iterator]=M.prototype.entries);var j=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function W(e,t){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,i,r=(t=t||{}).body;if(e instanceof W){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new M(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new M(t.headers)),this.method=(n=t.method||this.method||"GET",i=n.toUpperCase(),j.indexOf(i)>-1?i:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in k)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function K(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}}),t}function J(e,t){if(!(this instanceof J))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new M(t.headers),this.url=t.url||"",this._initBody(e)}W.prototype.clone=function(){return new W(this,{body:this._bodyInit})},H.call(W.prototype),H.call(J.prototype),J.prototype.clone=function(){return new J(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new M(this.headers),url:this.url})},J.error=function(){var e=new J(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var G=[301,302,303,307,308];J.redirect=function(e,t){if(-1===G.indexOf(t))throw new RangeError("Invalid status code");return new J(null,{status:t,headers:{location:e}})};var X=k.DOMException;try{new X}catch(e){(X=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),X.prototype.constructor=X}function q(e,t){return new Promise(function(n,i){var r=new W(e,t);if(r.signal&&r.signal.aborted)return i(new X("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}if(o.onload=function(){var e,t,i={statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new M,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(":"),i=n.shift().trim();if(i){var r=n.join(":").trim();try{t.append(i,r)}catch(e){console.warn("Response "+e.message)}}}),t)};0===r.url.indexOf("file://")&&(o.status<200||o.status>599)?i.status=200:i.status=o.status,i.url="responseURL"in o?o.responseURL:i.headers.get("X-Request-URL");var a="response"in o?o.response:o.responseText;setTimeout(function(){n(new J(a,i))},0)},o.onerror=function(){setTimeout(function(){i(new TypeError("Network request failed"))},0)},o.ontimeout=function(){setTimeout(function(){i(new TypeError("Network request timed out"))},0)},o.onabort=function(){setTimeout(function(){i(new X("Aborted","AbortError"))},0)},o.open(r.method,function(e){try{return""===e&&k.location.href?k.location.href:e}catch(t){return e}}(r.url),!0),"include"===r.credentials?o.withCredentials=!0:"omit"===r.credentials&&(o.withCredentials=!1),"responseType"in o&&(F?o.responseType="blob":B&&(o.responseType="arraybuffer")),t&&"object"===D(t.headers)&&!(t.headers instanceof M||k.Headers&&t.headers instanceof k.Headers)){var s=[];Object.getOwnPropertyNames(t.headers).forEach(function(e){s.push(N(e)),o.setRequestHeader(e,R(t.headers[e]))}),r.headers.forEach(function(e,t){-1===s.indexOf(t)&&o.setRequestHeader(t,e)})}else r.headers.forEach(function(e,t){o.setRequestHeader(t,e)});r.signal&&(r.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&r.signal.removeEventListener("abort",a)}),o.send(void 0===r._bodyInit?null:r._bodyInit)})}q.polyfill=!0,k.fetch||(k.fetch=q,k.Headers=M,k.Request=W,k.Response=J);var Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function $(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Q,Z,ee={};function te(){if(Z)return Q;Z=1;var e=function(e){return e&&e.Math===Math&&e};return Q=e("object"==("undefined"==typeof globalThis?"undefined":D(globalThis))&&globalThis)||e("object"==("undefined"==typeof window?"undefined":D(window))&&window)||e("object"==("undefined"==typeof self?"undefined":D(self))&&self)||e("object"==D(Y)&&Y)||e("object"==D(Q)&&Q)||function(){return this}()||Function("return this")()}var ne,ie,re,oe,ae,se,le,ue,ce={};function he(){return ie?ne:(ie=1,ne=function(e){try{return!!e()}catch(e){return!0}})}function de(){if(oe)return re;oe=1;var e=he();return re=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function pe(){if(se)return ae;se=1;var e=he();return ae=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function me(){if(ue)return le;ue=1;var e=pe(),t=Function.prototype.call;return le=e?t.bind(t):function(){return t.apply(t,arguments)},le}var fe,ge,ve,ye,be,Se,xe,Ee,we,De,Ce,ke,Ae,Te,Fe,Pe,Be,Ie,Oe,Ne,Re,Le,Me,_e,Ue,ze,Ve,He,je,We,Ke,Je,Ge,Xe,qe,Ye,$e,Qe,Ze,et,tt,nt={};function it(){return ve?ge:(ve=1,ge=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function rt(){if(be)return ye;be=1;var e=pe(),t=Function.prototype,n=t.call,i=e&&t.bind.bind(n,n);return ye=e?i:function(e){return function(){return n.apply(e,arguments)}},ye}function ot(){if(we)return Ee;we=1;var e=rt(),t=he(),n=function(){if(xe)return Se;xe=1;var e=rt(),t=e({}.toString),n=e("".slice);return Se=function(e){return n(t(e),8,-1)}}(),i=Object,r=e("".split);return Ee=t(function(){return!i("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?r(e,""):i(e)}:i}function at(){return Ce?De:(Ce=1,De=function(e){return null==e})}function st(){if(Ae)return ke;Ae=1;var e=at(),t=TypeError;return ke=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function lt(){if(Fe)return Te;Fe=1;var e=ot(),t=st();return Te=function(n){return e(t(n))}}function ut(){if(Be)return Pe;Be=1;var e="object"==("undefined"==typeof document?"undefined":D(document))&&document.all;return Pe=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function ct(){if(Oe)return Ie;Oe=1;var e=ut();return Ie=function(t){return"object"==D(t)?null!==t:e(t)}}function ht(){if(Re)return Ne;Re=1;var e=te(),t=ut();return Ne=function(n,i){return arguments.length<2?(r=e[n],t(r)?r:void 0):e[n]&&e[n][i];var r},Ne}function dt(){if(Ve)return ze;Ve=1;var e,t,n=te(),i=function(){if(Ue)return _e;Ue=1;var e=te().navigator,t=e&&e.userAgent;return _e=t?String(t):""}(),r=n.process,o=n.Deno,a=r&&r.versions||o&&o.version,s=a&&a.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&i&&(!(e=i.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=i.match(/Chrome\/(\d+)/))&&(t=+e[1]),ze=t}function pt(){if(je)return He;je=1;var e=dt(),t=he(),n=te().String;return He=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41})}function mt(){if(Ke)return We;Ke=1;var e=pt();return We=e&&!Symbol.sham&&"symbol"==D(Symbol.iterator)}function ft(){if(Ge)return Je;Ge=1;var e=ht(),t=ut(),n=function(){if(Me)return Le;Me=1;var e=rt();return Le=e({}.isPrototypeOf)}(),i=mt(),r=Object;return Je=i?function(e){return"symbol"==D(e)}:function(i){var o=e("Symbol");return t(o)&&n(o.prototype,r(i))}}function gt(){if(qe)return Xe;qe=1;var e=String;return Xe=function(t){try{return e(t)}catch(e){return"Object"}}}function vt(){if($e)return Ye;$e=1;var e=ut(),t=gt(),n=TypeError;return Ye=function(i){if(e(i))return i;throw new n(t(i)+" is not a function")}}function yt(){if(Ze)return Qe;Ze=1;var e=vt(),t=at();return Qe=function(n,i){var r=n[i];return t(r)?void 0:e(r)}}function bt(){if(tt)return et;tt=1;var e=me(),t=ut(),n=ct(),i=TypeError;return et=function(r,o){var a,s;if("string"===o&&t(a=r.toString)&&!n(s=e(a,r)))return s;if(t(a=r.valueOf)&&!n(s=e(a,r)))return s;if("string"!==o&&t(a=r.toString)&&!n(s=e(a,r)))return s;throw new i("Can't convert object to primitive value")}}var St,xt,Et,wt,Dt,Ct,kt,At,Tt,Ft,Pt,Bt,It,Ot,Nt,Rt,Lt,Mt,_t,Ut,zt,Vt,Ht,jt,Wt={exports:{}};function Kt(){if(wt)return Et;wt=1;var e=te(),t=Object.defineProperty;return Et=function(n,i){try{t(e,n,{value:i,configurable:!0,writable:!0})}catch(t){e[n]=i}return i},Et}function Jt(){if(Dt)return Wt.exports;Dt=1;var e=xt?St:(xt=1,St=!1),t=te(),n=Kt(),i="__core-js_shared__",r=Wt.exports=t[i]||n(i,{});return(r.versions||(r.versions=[])).push({version:"3.46.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Wt.exports}function Gt(){if(kt)return Ct;kt=1;var e=Jt();return Ct=function(t,n){return e[t]||(e[t]=n||{})},Ct}function Xt(){if(Tt)return At;Tt=1;var e=st(),t=Object;return At=function(n){return t(e(n))}}function qt(){if(Pt)return Ft;Pt=1;var e=rt(),t=Xt(),n=e({}.hasOwnProperty);return Ft=Object.hasOwn||function(e,i){return n(t(e),i)},Ft}function Yt(){if(It)return Bt;It=1;var e=rt(),t=0,n=Math.random(),i=e(1.1.toString);return Bt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++t+n,36)},Bt}function $t(){if(Nt)return Ot;Nt=1;var e=te(),t=Gt(),n=qt(),i=Yt(),r=pt(),o=mt(),a=e.Symbol,s=t("wks"),l=o?a.for||a:a&&a.withoutSetter||i;return Ot=function(e){return n(s,e)||(s[e]=r&&n(a,e)?a[e]:l("Symbol."+e)),s[e]}}function Qt(){if(Lt)return Rt;Lt=1;var e=me(),t=ct(),n=ft(),i=yt(),r=bt(),o=$t(),a=TypeError,s=o("toPrimitive");return Rt=function(o,l){if(!t(o)||n(o))return o;var u,c=i(o,s);if(c){if(void 0===l&&(l="default"),u=e(c,o,l),!t(u)||n(u))return u;throw new a("Can't convert object to primitive value")}return void 0===l&&(l="number"),r(o,l)}}function Zt(){if(_t)return Mt;_t=1;var e=Qt(),t=ft();return Mt=function(n){var i=e(n,"string");return t(i)?i:i+""},Mt}function en(){if(Ht)return Vt;Ht=1;var e=de(),t=he(),n=function(){if(zt)return Ut;zt=1;var e=te(),t=ct(),n=e.document,i=t(n)&&t(n.createElement);return Ut=function(e){return i?n.createElement(e):{}}}();return Vt=!e&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function tn(){if(jt)return ce;jt=1;var e=de(),t=me(),n=function(){if(fe)return nt;fe=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return nt.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,nt}(),i=it(),r=lt(),o=Zt(),a=qt(),s=en(),l=Object.getOwnPropertyDescriptor;return ce.f=e?l:function(e,u){if(e=r(e),u=o(u),s)try{return l(e,u)}catch(e){}if(a(e,u))return i(!t(n.f,e,u),e[u])},ce}var nn,rn,on,an,sn,ln,un,cn={};function hn(){if(an)return on;an=1;var e=ct(),t=String,n=TypeError;return on=function(i){if(e(i))return i;throw new n(t(i)+" is not an object")}}function dn(){if(sn)return cn;sn=1;var e=de(),t=en(),n=function(){if(rn)return nn;rn=1;var e=de(),t=he();return nn=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}(),i=hn(),r=Zt(),o=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l="enumerable",u="configurable",c="writable";return cn.f=e?n?function(e,t,n){if(i(e),t=r(t),i(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var o=s(e,t);o&&o[c]&&(e[t]=n.value,n={configurable:u in n?n[u]:o[u],enumerable:l in n?n[l]:o[l],writable:!1})}return a(e,t,n)}:a:function(e,n,s){if(i(e),n=r(n),i(s),t)try{return a(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new o("Accessors not supported");return"value"in s&&(e[n]=s.value),e},cn}function pn(){if(un)return ln;un=1;var e=de(),t=dn(),n=it();return ln=e?function(e,i,r){return t.f(e,i,n(1,r))}:function(e,t,n){return e[t]=n,e},ln}var mn,fn,gn,vn,yn,bn,Sn,xn,En,wn,Dn,Cn,kn,An,Tn,Fn={exports:{}};function Pn(){if(vn)return gn;vn=1;var e=rt(),t=ut(),n=Jt(),i=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return i(e)}),gn=n.inspectSource}function Bn(){if(xn)return Sn;xn=1;var e=Gt(),t=Yt(),n=e("keys");return Sn=function(e){return n[e]||(n[e]=t(e))},Sn}function In(){return wn?En:(wn=1,En={})}function On(){if(Cn)return Dn;Cn=1;var e,t,n,i=function(){if(bn)return yn;bn=1;var e=te(),t=ut(),n=e.WeakMap;return yn=t(n)&&/native code/.test(String(n))}(),r=te(),o=ct(),a=pn(),s=qt(),l=Jt(),u=Bn(),c=In(),h="Object already initialized",d=r.TypeError,p=r.WeakMap;if(i||l.state){var m=l.state||(l.state=new p);m.get=m.get,m.has=m.has,m.set=m.set,e=function(e,t){if(m.has(e))throw new d(h);return t.facade=e,m.set(e,t),t},t=function(e){return m.get(e)||{}},n=function(e){return m.has(e)}}else{var f=u("state");c[f]=!0,e=function(e,t){if(s(e,f))throw new d(h);return t.facade=e,a(e,f,t),t},t=function(e){return s(e,f)?e[f]:{}},n=function(e){return s(e,f)}}return Dn={set:e,get:t,has:n,enforce:function(i){return n(i)?t(i):e(i,{})},getterFor:function(e){return function(n){var i;if(!o(n)||(i=t(n)).type!==e)throw new d("Incompatible receiver, "+e+" required");return i}}},Dn}function Nn(){if(kn)return Fn.exports;kn=1;var e=rt(),t=he(),n=ut(),i=qt(),r=de(),o=function(){if(fn)return mn;fn=1;var e=de(),t=qt(),n=Function.prototype,i=e&&Object.getOwnPropertyDescriptor,r=t(n,"name"),o=r&&"something"===function(){}.name,a=r&&(!e||e&&i(n,"name").configurable);return mn={EXISTS:r,PROPER:o,CONFIGURABLE:a}}().CONFIGURABLE,a=Pn(),s=On(),l=s.enforce,u=s.get,c=String,h=Object.defineProperty,d=e("".slice),p=e("".replace),m=e([].join),f=r&&!t(function(){return 8!==h(function(){},"length",{value:8}).length}),g=String(String).split("String"),v=Fn.exports=function(e,t,n){"Symbol("===d(c(t),0,7)&&(t="["+p(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!i(e,"name")||o&&e.name!==t)&&(r?h(e,"name",{value:t,configurable:!0}):e.name=t),f&&n&&i(n,"arity")&&e.length!==n.arity&&h(e,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?r&&h(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var a=l(e);return i(a,"source")||(a.source=m(g,"string"==typeof t?t:"")),e};return Function.prototype.toString=v(function(){return n(this)&&u(this).source||a(this)},"toString"),Fn.exports}function Rn(){if(Tn)return An;Tn=1;var e=ut(),t=dn(),n=Nn(),i=Kt();return An=function(r,o,a,s){s||(s={});var l=s.enumerable,u=void 0!==s.name?s.name:o;if(e(a)&&n(a,u,s),s.global)l?r[o]=a:i(o,a);else{try{s.unsafe?r[o]&&(l=!0):delete r[o]}catch(e){}l?r[o]=a:t.f(r,o,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return r},An}var Ln,Mn,_n,Un,zn,Vn,Hn,jn,Wn,Kn,Jn,Gn,Xn,qn,Yn,$n,Qn,Zn={};function ei(){if(Un)return _n;Un=1;var e=function(){if(Mn)return Ln;Mn=1;var e=Math.ceil,t=Math.floor;return Ln=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)}}();return _n=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function ti(){if(Vn)return zn;Vn=1;var e=ei(),t=Math.max,n=Math.min;return zn=function(i,r){var o=e(i);return o<0?t(o+r,0):n(o,r)}}function ni(){if(jn)return Hn;jn=1;var e=ei(),t=Math.min;return Hn=function(n){var i=e(n);return i>0?t(i,9007199254740991):0}}function ii(){if(Kn)return Wn;Kn=1;var e=ni();return Wn=function(t){return e(t.length)}}function ri(){if(qn)return Xn;qn=1;var e=rt(),t=qt(),n=lt(),i=function(){if(Gn)return Jn;Gn=1;var e=lt(),t=ti(),n=ii(),i=function(i){return function(r,o,a){var s=e(r),l=n(s);if(0===l)return!i&&-1;var u,c=t(a,l);if(i&&o!=o){for(;l>c;)if((u=s[c++])!=u)return!0}else for(;l>c;c++)if((i||c in s)&&s[c]===o)return i||c||0;return!i&&-1}};return Jn={includes:i(!0),indexOf:i(!1)}}().indexOf,r=In(),o=e([].push);return Xn=function(e,a){var s,l=n(e),u=0,c=[];for(s in l)!t(r,s)&&t(l,s)&&o(c,s);for(;a.length>u;)t(l,s=a[u++])&&(~i(c,s)||o(c,s));return c},Xn}var oi,ai,si,li,ui,ci,hi,di,pi,mi,fi,gi,vi,yi={};function bi(){if(si)return ai;si=1;var e=ht(),t=rt(),n=function(){if(Qn)return Zn;Qn=1;var e=ri(),t=($n?Yn:($n=1,Yn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])).concat("length","prototype");return Zn.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Zn}(),i=(oi||(oi=1,yi.f=Object.getOwnPropertySymbols),yi),r=hn(),o=t([].concat);return ai=e("Reflect","ownKeys")||function(e){var t=n.f(r(e)),a=i.f;return a?o(t,a(e)):t},ai}function Si(){if(ui)return li;ui=1;var e=qt(),t=bi(),n=tn(),i=dn();return li=function(r,o,a){for(var s=t(o),l=i.f,u=n.f,c=0;c<s.length;c++){var h=s[c];e(r,h)||a&&e(a,h)||l(r,h,u(o,h))}},li}function xi(){if(pi)return di;pi=1;var e=te(),t=tn().f,n=pn(),i=Rn(),r=Kt(),o=Si(),a=function(){if(hi)return ci;hi=1;var e=he(),t=ut(),n=/#|\.prototype\./,i=function(n,i){var l=o[r(n)];return l===s||l!==a&&(t(i)?e(i):!!i)},r=i.normalize=function(e){return String(e).replace(n,".").toLowerCase()},o=i.data={},a=i.NATIVE="N",s=i.POLYFILL="P";return ci=i}();return di=function(s,l){var u,c,h,d,p,m=s.target,f=s.global,g=s.stat;if(u=f?e:g?e[m]||r(m,{}):e[m]&&e[m].prototype)for(c in l){if(d=l[c],h=s.dontCallGetSet?(p=t(u,c))&&p.value:u[c],!a(f?c:m+(g?".":"#")+c,s.forced)&&void 0!==h){if(D(d)==D(h))continue;o(d,h)}(s.sham||h&&h.sham)&&n(d,"sham",!0),i(u,c,d,s)}},di}function Ei(){if(fi)return mi;fi=1;var e=de(),t=dn(),n=it();return mi=function(i,r,o){e?t.f(i,r,n(0,o)):i[r]=o},mi}vi||(vi=1,function(){if(gi)return ee;gi=1;var e=xi(),t=de(),n=bi(),i=lt(),r=tn(),o=Ei();e({target:"Object",stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t,a,s=i(e),l=r.f,u=n(s),c={},h=0;u.length>h;)void 0!==(a=l(s,t=u[h++]))&&o(c,t,a);return c}})}());var wi=e=>"string"==typeof e,Di=()=>{var e,t,n=new Promise((n,i)=>{e=n,t=i});return n.resolve=e,n.reject=t,n},Ci=e=>null==e?"":""+e,ki=/###/g,Ai=e=>e&&e.indexOf("###")>-1?e.replace(ki,"."):e,Ti=e=>!e||wi(e),Fi=(e,t,n)=>{for(var i=wi(t)?t.split("."):t,r=0;r<i.length-1;){if(Ti(e))return{};var o=Ai(i[r]);!e[o]&&n&&(e[o]=new n),e=Object.prototype.hasOwnProperty.call(e,o)?e[o]:{},++r}return Ti(e)?{}:{obj:e,k:Ai(i[r])}},Pi=(e,t,n)=>{var i=Fi(e,t,Object),r=i.obj,o=i.k;if(void 0===r&&1!==t.length){for(var a=t[t.length-1],s=t.slice(0,t.length-1),l=Fi(e,s,Object);void 0===l.obj&&s.length;){var u;a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),null!==(u=l=Fi(e,s,Object))&&void 0!==u&&u.obj&&void 0!==l.obj[`${l.k}.${a}`]&&(l.obj=void 0)}l.obj[`${l.k}.${a}`]=n}else r[o]=n},Bi=(e,t)=>{var n=Fi(e,t),i=n.obj,r=n.k;if(i&&Object.prototype.hasOwnProperty.call(i,r))return i[r]},Ii=(e,t,n)=>{for(var i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?wi(e[i])||e[i]instanceof String||wi(t[i])||t[i]instanceof String?n&&(e[i]=t[i]):Ii(e[i],t[i],n):e[i]=t[i]);return e},Oi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Ni={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Ri=e=>wi(e)?e.replace(/[&<>"'\/]/g,e=>Ni[e]):e;var Li=[" ",",","?","!",";"],Mi=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){var t=this.regExpMap.get(e);if(void 0!==t)return t;var n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),_i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}for(var i=t.split(n),r=e,o=0;o<i.length;){if(!r||"object"!==D(r))return;for(var a=void 0,s="",l=o;l<i.length;++l)if(l!==o&&(s+=n),void 0!==(a=r[s+=i[l]])){if(["string","number","boolean"].indexOf(D(a))>-1&&l<i.length-1)continue;o+=l-o+1;break}r=a}return r}},Ui=e=>null==e?void 0:e.replace(/_/g,"-"),zi={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,i;null===(n=console)||void 0===n||null===(n=n[e])||void 0===n||null===(i=n.apply)||void 0===i||i.call(n,console,t)}};class Vi{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||zi,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(wi(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Vi(this.logger,b(b({},{prefix:`${this.prefix}:${e}:`}),this.options))}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Vi(this.logger,e)}}var Hi=new Vi;class ji{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);var n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{for(var t=E(e,2),i=t[0],r=t[1],o=0;o<r;o++)i(...n)});this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(t=>{for(var i=E(t,2),r=i[0],o=i[1],a=0;a<o;a++)r.apply(r,[e,...n])})}}class Wi extends ji{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){var i,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,s=void 0!==o.ignoreJSONStructure?o.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?r=e.split("."):(r=[e,t],n&&(Array.isArray(n)?r.push(...n):wi(n)&&a?r.push(...n.split(a)):r.push(n)));var l=Bi(this.data,r);return!l&&!t&&!n&&e.indexOf(".")>-1&&(e=r[0],t=r[1],n=r.slice(2).join(".")),!l&&s&&wi(n)?_i(null===(i=this.data)||void 0===i||null===(i=i[e])||void 0===i?void 0:i[t],n,a):l}addResource(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=t,t=(a=e.split("."))[1]),this.addNamespaces(t),Pi(this.data,a,i),r.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var r in n)(wi(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(i=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=Bi(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Ii(s,n,r):s=b(b({},s),n),Pi(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Ki={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,i,r){return e.forEach(e=>{var o,a;t=null!==(o=null===(a=this.processors[e])||void 0===a?void 0:a.process(t,n,i,r))&&void 0!==o?o:t}),t}},Ji=Symbol("i18next/PATH_KEY");function Gi(e,t){var n,i,r=e(function(){var e,t=[],n=Object.create(null);return n.get=(i,r)=>{var o,a;return null===(o=e)||void 0===o||null===(a=o.revoke)||void 0===a||a.call(o),r===Ji?t:(t.push(r),(e=Proxy.revocable(i,n)).proxy)},Proxy.revocable(Object.create(null),n).proxy}()),o=r[Ji],a=null!==(n=null==t?void 0:t.keySeparator)&&void 0!==n?n:".",s=null!==(i=null==t?void 0:t.nsSeparator)&&void 0!==i?i:":";if(o.length>1&&s){var l=null==t?void 0:t.ns;if((l?Array.isArray(l)?l:[l]:[]).includes(o[0]))return`${o[0]}${s}${o.slice(1).join(a)}`}return o.join(a)}var Xi={},qi=e=>!wi(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Yi extends ji{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Hi.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){var t=b({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});if(null==e)return!1;var n=this.resolve(e,t);if(void 0===(null==n?void 0:n.res))return!1;var i=qi(n.res);return!1!==t.returnObjects||!i}extractFromKey(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";var i=Li.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===i.length)return!0;var r=Mi.getRegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`),o=!r.test(e);if(!o){var a=e.indexOf(n);a>0&&!r.test(e.substring(0,a))&&(o=!0)}return o})(e,n,i));if(o&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:wi(r)?[r]:r};var l=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(l[0])>-1)&&(r=l.shift()),e=l.join(i)}return{key:e,namespaces:wi(r)?[r]:r}}translate(e,t,n){var i="object"===D(t)?b({},t):t;if("object"!==D(i)&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),"object"===D(i)&&(i=b({},i)),i||(i={}),null==e)return"";"function"==typeof e&&(e=Gi(e,b(b({},this.options),i))),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?Gi(e,b(b({},this.options),i)):String(e));var r=void 0!==i.returnDetails?i.returnDetails:this.options.returnDetails,o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],i),s=a.key,l=a.namespaces,u=l[l.length-1],c=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");var h=i.lng||this.language,d=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===(null==h?void 0:h.toLowerCase()))return d?r?{res:`${u}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${c}${s}`:r?{res:s,usedKey:s,exactUsedKey:s,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:s;var p=this.resolve(e,i),m=null==p?void 0:p.res,f=(null==p?void 0:p.usedKey)||s,g=(null==p?void 0:p.exactUsedKey)||s,v=void 0!==i.joinArrays?i.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,S=void 0!==i.count&&!wi(i.count),x=Yi.hasDefaultValue(i),E=S?this.pluralResolver.getSuffix(h,i.count,i):"",w=i.ordinal&&S?this.pluralResolver.getSuffix(h,i.count,{ordinal:!1}):"",C=S&&!i.ordinal&&0===i.count,k=C&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${E}`]||i[`defaultValue${w}`]||i.defaultValue,A=m;y&&!m&&x&&(A=k);var T=qi(A),F=Object.prototype.toString.apply(A);if(!(y&&A&&T&&["[object Number]","[object Function]","[object RegExp]"].indexOf(F)<0)||wi(v)&&Array.isArray(A))if(y&&wi(v)&&Array.isArray(m))(m=m.join(v))&&(m=this.extendTranslation(m,e,i,n));else{var P=!1,B=!1;!this.isValidLookup(m)&&x&&(P=!0,m=k),this.isValidLookup(m)||(B=!0,m=s);var I=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:m,O=x&&k!==m&&this.options.updateMissing;if(B||P||O){if(this.logger.log(O?"updateKey":"missingKey",h,u,s,O?k:m),o){var N=this.resolve(s,b(b({},i),{},{keySeparator:!1}));N&&N.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var R=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var M=0;M<L.length;M++)R.push(L[M]);else"all"===this.options.saveMissingTo?R=this.languageUtils.toResolveHierarchy(i.lng||this.language):R.push(i.lng||this.language);var _=(e,t,n)=>{var r,o=x&&n!==m?n:I;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,t,o,O,i):null!==(r=this.backendConnector)&&void 0!==r&&r.saveMissing&&this.backendConnector.saveMissing(e,u,t,o,O,i),this.emit("missingKey",e,u,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?R.forEach(e=>{var t=this.pluralResolver.getSuffixes(e,i);C&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{_([e],s+t,i[`defaultValue${t}`]||k)})}):_(R,s,k))}m=this.extendTranslation(m,e,i,p,n),B&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${u}${c}${s}`),(B||P)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${s}`:s,P?m:void 0,i))}else{if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var U=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,A,b(b({},i),{},{ns:l})):`key '${s} (${this.language})' returned an object instead of string.`;return r?(p.res=U,p.usedParams=this.getUsedParamsDetails(i),p):U}if(o){var z=Array.isArray(A),V=z?[]:{},H=z?g:f;for(var j in A)if(Object.prototype.hasOwnProperty.call(A,j)){var W=`${H}${o}${j}`;V[j]=x&&!m?this.translate(W,b(b({},i),{},{defaultValue:qi(k)?k[j]:void 0},{joinArrays:!1,ns:l})):this.translate(W,b(b({},i),{joinArrays:!1,ns:l})),V[j]===W&&(V[j]=A[j])}m=V}}return r?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,i,r){var o,a=this;if(null!==(o=this.i18nFormat)&&void 0!==o&&o.parse)e=this.i18nFormat.parse(e,b(b({},this.options.interpolation.defaultVariables),n),n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){var s;n.interpolation&&this.interpolator.init(b(b({},n),{interpolation:b(b({},this.options.interpolation),n.interpolation)}));var l,u=wi(e)&&(void 0!==(null==n||null===(s=n.interpolation)||void 0===s?void 0:s.skipOnVariables)?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(u){var c=e.match(this.interpolator.nestingRegexp);l=c&&c.length}var h=n.replace&&!wi(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(h=b(b({},this.options.interpolation.defaultVariables),h)),e=this.interpolator.interpolate(e,h,n.lng||this.language||i.usedLng,n),u){var d=e.match(this.interpolator.nestingRegexp);l<(d&&d.length)&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];return(null==r?void 0:r[0])!==i[0]||n.context?a.translate(...i,t):(a.logger.warn(`It seems you are nesting recursively key: ${i[0]} in key: ${t[0]}`),null)},n)),n.interpolation&&this.interpolator.reset()}var p=n.postProcess||this.options.postProcess,m=wi(p)?[p]:p;return null!=e&&null!=m&&m.length&&!1!==n.applyPostProcessor&&(e=Ki.handle(m,e,t,this.options&&this.options.postProcessPassResolved?b({i18nResolved:b(b({},i),{},{usedParams:this.getUsedParamsDetails(n)})},n):n,this)),e}resolve(e){var t,n,i,r,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return wi(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?Gi(e,b(b({},this.options),a)):e)),e.forEach(e=>{if(!this.isValidLookup(t)){var s=this.extractFromKey(e,a),l=s.key;n=l;var u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));var c=void 0!==a.count&&!wi(a.count),h=c&&!a.ordinal&&0===a.count,d=void 0!==a.context&&(wi(a.context)||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);u.forEach(e=>{var s,u;this.isValidLookup(t)||(o=e,Xi[`${p[0]}-${e}`]||null===(s=this.utils)||void 0===s||!s.hasLoadedNamespace||null!==(u=this.utils)&&void 0!==u&&u.hasLoadedNamespace(o)||(Xi[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(n=>{var o;if(!this.isValidLookup(t)){r=n;var s,u=[l];if(null!==(o=this.i18nFormat)&&void 0!==o&&o.addLookupKeys)this.i18nFormat.addLookupKeys(u,l,n,e,a);else{var p;c&&(p=this.pluralResolver.getSuffix(n,a.count,a));var m=`${this.options.pluralSeparator}zero`,f=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(a.ordinal&&0===p.indexOf(f)&&u.push(l+p.replace(f,this.options.pluralSeparator)),u.push(l+p),h&&u.push(l+m)),d){var g=`${l}${this.options.contextSeparator||"_"}${a.context}`;u.push(g),c&&(a.ordinal&&0===p.indexOf(f)&&u.push(g+p.replace(f,this.options.pluralSeparator)),u.push(g+p),h&&u.push(g+m))}}for(;s=u.pop();)this.isValidLookup(t)||(i=s,t=this.getResource(n,e,s,a))}}))})}}),{res:t,usedKey:n,exactUsedKey:i,usedLng:r,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){var i,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return null!==(i=this.i18nFormat)&&void 0!==i&&i.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&!wi(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n=b(b({},this.options.interpolation.defaultVariables),n)),!t){n=b({},n);var i,r=f(["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]);try{for(r.s();!(i=r.n()).done;){delete n[i.value]}}catch(e){r.e(e)}finally{r.f()}}return n}static hasDefaultValue(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class $i{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Hi.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Ui(e))||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Ui(e))||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(wi(e)&&e.indexOf("-")>-1){var t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){return e?(e.forEach(e=>{if(!t){var n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(!t){var n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;var i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>e===i?e:e.indexOf("-")<0&&i.indexOf("-")<0?void 0:e.indexOf("-")>0&&i.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===i||0===e.indexOf(i)&&i.length>1?e:void 0)}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null;var t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),wi(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){var n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),i=[],r=e=>{e&&(this.isSupportedCode(e)?i.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return wi(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):wi(e)&&r(this.formatLanguageCode(e)),n.forEach(e=>{i.indexOf(e)<0&&r(this.formatLanguageCode(e))}),i}}var Qi={zero:0,one:1,two:2,few:3,many:4,other:5},Zi={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class er{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Hi.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Ui("dev"===e?"en":e),r=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:i,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];try{t=new Intl.PluralRules(i,{type:r})}catch(i){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Zi;if(!e.match(/-|_/))return Zi;var a=this.languageUtils.getLanguagePartFromCode(e);t=this.getRule(a,n)}return this.pluralRulesCache[o]=t,t}needsPlural(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),(null===(t=i)||void 0===t?void 0:t.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Qi[e]-Qi[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}var tr=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=((e,t,n)=>{var i=Bi(e,n);return void 0!==i?i:Bi(t,n)})(e,t,n);return!o&&r&&wi(n)&&void 0===(o=_i(e,n,i))&&(o=_i(t,n,i)),o},nr=e=>e.replace(/\$/g,"$$$$");class ir{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Hi.create("interpolator"),this.options=t,this.format=(null==t||null===(e=t.interpolation)||void 0===e?void 0:e.format)||(e=>e),this.init(t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation,n=t.escape,i=t.escapeValue,r=t.useRawValueToEscape,o=t.prefix,a=t.prefixEscaped,s=t.suffix,l=t.suffixEscaped,u=t.formatSeparator,c=t.unescapeSuffix,h=t.unescapePrefix,d=t.nestingPrefix,p=t.nestingPrefixEscaped,m=t.nestingSuffix,f=t.nestingSuffixEscaped,g=t.nestingOptionsSeparator,v=t.maxReplaces,y=t.alwaysFormat;this.escape=void 0!==n?n:Ri,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Oi(o):a||"{{",this.suffix=s?Oi(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?Oi(d):p||Oi("$t("),this.nestingSuffix=m?Oi(m):f||Oi(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){var e=(e,t)=>(null==e?void 0:e.source)===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,i){var r,o,a,s,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){var r=tr(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,n,b(b(b({},i),t),{},{interpolationkey:e})):r}var o=e.split(this.formatSeparator),a=o.shift().trim(),s=o.join(this.formatSeparator).trim();return this.format(tr(t,l,a,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,b(b(b({},i),t),{},{interpolationkey:a}))};this.resetRegExp();var c=(null==i?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,h=void 0!==(null==i||null===(r=i.interpolation)||void 0===r?void 0:r.skipOnVariables)?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>nr(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?nr(this.escape(e)):nr(e)}].forEach(t=>{for(s=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(a=u(n)))if("function"==typeof c){var r=c(e,o,i);a=wi(r)?r:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n))a="";else{if(h){a=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=""}else wi(a)||this.useRawValueToEscape||(a=Ci(a));var l=t.safeValue(a);if(e=e.replace(o[0],l),h?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++s>=this.maxReplaces)break}}),e}nest(e,t){for(var n,i,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=(e,t)=>{var n,i,o=this.nestingOptionsSeparator;if(e.indexOf(o)<0)return e;var a=e.split(new RegExp(`${Oi(o)}[ ]*{`)),s=`{${a[1]}`;e=a[0];var l=(s=this.interpolate(s,r)).match(/'/g),u=s.match(/"/g);((null!==(n=null==l?void 0:l.length)&&void 0!==n?n:0)%2==0&&!u||(null!==(i=null==u?void 0:u.length)&&void 0!==i?i:0)%2!=0)&&(s=s.replace(/'/g,'"'));try{r=JSON.parse(s),t&&(r=b(b({},t),r))}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${o}${s}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,e};n=this.nestingRegexp.exec(e);){var s=[];(r=(r=b({},o)).replace&&!wi(r.replace)?r.replace:r).applyPostProcessor=!1,delete r.defaultValue;var l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(s=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),(i=t(a.call(this,n[1].trim(),r),r))&&n[0]===e&&!wi(i))return i;wi(i)||(i=Ci(i)),i||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),i=""),s.length&&(i=s.reduce((e,t)=>this.format(e,t,o.lng,b(b({},o),{},{interpolationkey:n[1].trim()})),i.trim())),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}var rr=e=>{var t={};return(n,i,r)=>{var o=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(o=b(b({},o),{},{[r.interpolationkey]:void 0}));var a=i+JSON.stringify(o),s=t[a];return s||(s=e(Ui(i),r),t[a]=s),s(n)}},or=e=>(t,n,i)=>e(Ui(n),i)(t);class ar{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Hi.create("formatter"),this.options=e,this.init(e)}init(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";var n=t.cacheInBuiltFormats?rr:or;this.formats={number:n((e,t)=>{var n=new Intl.NumberFormat(e,b({},t));return e=>n.format(e)}),currency:n((e,t)=>{var n=new Intl.NumberFormat(e,b(b({},t),{},{style:"currency"}));return e=>n.format(e)}),datetime:n((e,t)=>{var n=new Intl.DateTimeFormat(e,b({},t));return e=>n.format(e)}),relativetime:n((e,t)=>{var n=new Intl.RelativeTimeFormat(e,b({},t));return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{var n=new Intl.ListFormat(e,b({},t));return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=rr(t)}format(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(e=>e.indexOf(")")>-1)){var o=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,o)].join(this.formatSeparator)}var a=r.reduce((e,t)=>{var r=(e=>{var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var i=e.split("(");t=i[0].toLowerCase().trim();var r=i[1].substring(0,i[1].length-1);"currency"===t&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):"relativetime"===t&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(e=>{if(e){var t=w(e.split(":")),i=t[0],r=t.slice(1).join(":").trim().replace(/^'+|'+$/g,""),o=i.trim();n[o]||(n[o]=r),"false"===r&&(n[o]=!1),"true"===r&&(n[o]=!0),isNaN(r)||(n[o]=parseInt(r,10))}})}return{formatName:t,formatOptions:n}})(t),o=r.formatName,a=r.formatOptions;if(this.formats[o]){var s=e;try{var l,u=(null==i||null===(l=i.formatParams)||void 0===l?void 0:l[i.interpolationkey])||{},c=u.locale||u.lng||i.locale||i.lng||n;s=this.formats[o](e,c,b(b(b({},a),i),u))}catch(e){this.logger.warn(e)}return s}return this.logger.warn(`there was no format function for ${o}`),e},e);return a}}class sr extends ji{constructor(e,t,n){var i,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=o,this.logger=Hi.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],null===(i=this.backend)||void 0===i||null===(r=i.init)||void 0===r||r.call(i,n,o.backend,o)}queueLoad(e,t,n,i){var r={},o={},a={},s={};return e.forEach(e=>{var i=!0;t.forEach(t=>{var a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,i=!1,void 0===o[a]&&(o[a]=!0),void 0===r[a]&&(r[a]=!0),void 0===s[t]&&(s[t]=!0)))}),i||(a[e]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){var i=e.split("|"),r=i[0],o=i[1];t&&this.emit("failedLoading",r,o,t),!t&&n&&this.store.addResourceBundle(r,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);var a={};this.queue.forEach(n=>{var i,s,l,u,c;i=n.loaded,s=o,l=Fi(i,[r],Object),u=l.obj,c=l.k,u[c]=u[c]||[],u[c].push(s),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:r,callback:o});else{this.readingCalls++;var a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){var l=this.waitingReads.shift();this.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}a&&s&&i<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,i+1,2*r,o)},r):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{var l=s(e,t);l&&"function"==typeof l.then?l.then(e=>a(null,e)).catch(a):a(null,l)}catch(e){a(e)}}}prepareLoading(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();wi(e)&&(e=this.languageUtils.toResolveHierarchy(e)),wi(t)&&(t=[t]);var r=this.queueLoad(e,t,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,i,r){var o,a,s,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(null===(o=this.services)||void 0===o||null===(o=o.utils)||void 0===o||!o.hasLoadedNamespace||null!==(a=this.services)&&void 0!==a&&null!==(a=a.utils)&&void 0!==a&&a.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(null!==(s=this.backend)&&void 0!==s&&s.create){var c=b(b({},l),{},{isUpdate:r}),h=this.backend.create.bind(this.backend);if(h.length<6)try{var d;(d=5===h.length?h(e,t,n,i,c):h(e,t,n,i))&&"function"==typeof d.then?d.then(e=>u(null,e)).catch(u):u(null,d)}catch(e){u(e)}else h(e,t,n,i,u,c)}e&&e[0]&&this.store.addResource(e[0],t,n,i)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}var lr=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{var t={};if("object"===D(e[1])&&(t=e[1]),wi(e[1])&&(t.defaultValue=e[1]),wi(e[2])&&(t.tDescription=e[2]),"object"===D(e[2])||"object"===D(e[3])){var n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ur=e=>{var t,n;return wi(e.ns)&&(e.ns=[e.ns]),wi(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),wi(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),(null===(t=e.supportedLngs)||void 0===t||null===(n=t.indexOf)||void 0===n?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e},cr=()=>{},hr="__i18next_supportNoticeShown";class dr extends ji{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ur(t),this.services={},this.logger=Hi,this.modules={external:[]},e=this,Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),null==t.defaultNS&&t.ns&&(wi(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var i,r,o,a,s,l,u=lr();this.options=b(b(b({},u),this.options),ur(t)),this.options.interpolation=b(b({},u.interpolation),this.options.interpolation),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=u.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||((null==(i=this)||null===(r=i.modules)||void 0===r||null===(r=r.backend)||void 0===r||null===(r=r.name)||void 0===r?void 0:r.indexOf("Locize"))>0||(null==i||null===(o=i.modules)||void 0===o||null===(o=o.backend)||void 0===o||null===(o=o.constructor)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.indexOf("Locize"))>0||null!=i&&null!==(a=i.options)&&void 0!==a&&null!==(a=a.backend)&&void 0!==a&&a.backends&&i.options.backend.backends.some(e=>{var t,n;return(null==e||null===(t=e.name)||void 0===t?void 0:t.indexOf("Locize"))>0||(null==e||null===(n=e.constructor)||void 0===n||null===(n=n.name)||void 0===n?void 0:n.indexOf("Locize"))>0})||null!=i&&null!==(s=i.options)&&void 0!==s&&null!==(s=s.backend)&&void 0!==s&&s.projectId||null!=i&&null!==(l=i.options)&&void 0!==l&&null!==(l=l.backend)&&void 0!==l&&l.backendOptions&&i.options.backend.backendOptions.some(e=>null==e?void 0:e.projectId))||"undefined"!=typeof globalThis&&globalThis[hr]||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[hr]=!0));var c=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){var h;this.modules.logger?Hi.init(c(this.modules.logger),this.options):Hi.init(null,this.options),h=this.modules.formatter?this.modules.formatter:ar;var d=new $i(this.options);this.store=new Wi(this.options.resources,this.options);var p=this.services;p.logger=Hi,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new er(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==u.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!h||this.options.interpolation.format&&this.options.interpolation.format!==u.interpolation.format||(p.formatter=c(h),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new ir(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new sr(c(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit(t,...i)}),this.modules.languageDetector&&(p.languageDetector=c(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=c(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new Yi(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit(t,...i)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=cr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&"dev"!==m[0]&&(this.options.lng=m[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});var f=Di(),g=()=>{var e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),f.resolve(t),n(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),f}loadResources(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cr,n=wi(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){var i,r;if("cimode"===(null==n?void 0:n.toLowerCase())&&(!this.options.preload||0===this.options.preload.length))return t();var o=[],a=e=>{e&&("cimode"!==e&&this.services.languageUtils.toResolveHierarchy(e).forEach(e=>{"cimode"!==e&&o.indexOf(e)<0&&o.push(e)}))};if(n)a(n);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>a(e));null===(i=this.options.preload)||void 0===i||null===(r=i.forEach)||void 0===r||r.call(i,e=>a(e)),this.services.backendConnector.load(o,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){var i=Di();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=cr),this.services.backendConnector.reload(e,t,e=>{i.resolve(),n(e)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Ki.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;var i=Di();this.emit("languageChanging",e);var r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit("languageChanged",a),this.logger.log("languageChanged",a)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),t&&t(o,function(){return n.t(...arguments)})},a=t=>{e||t||!this.services.languageDetector||(t=[]);var n,i,a=wi(t)?t:t&&t[0],s=this.store.hasLanguageSomeTranslations(a)?a:this.services.languageUtils.getBestMatchFromCodes(wi(t)?[t]:t);s&&(this.language||r(s),this.translator.language||this.translator.changeLanguage(s),null===(n=this.services.languageDetector)||void 0===n||null===(i=n.cacheUserLanguage)||void 0===i||i.call(n,s));this.loadResources(s,e=>{o(e,s)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),i}getFixedT(e,t,n){var i=this,r=function(e,t){var o;if("object"!==D(t)){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];o=i.options.overloadTranslationOptionHandler([e,t].concat(s))}else o=b({},t);o.lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||r.keyPrefix);var u,c=i.options.keySeparator||".";return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>("function"==typeof e&&(e=Gi(e,b(b({},i.options),t))),`${o.keyPrefix}${c}${e}`)):("function"==typeof e&&(e=Gi(e,b(b({},i.options),t))),u=o.keyPrefix?`${o.keyPrefix}${c}${e}`:e),i.t(u,o)};return wi(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return null===(e=this.translator)||void 0===e?void 0:e.translate(...n)}exists(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return null===(e=this.translator)||void 0===e?void 0:e.exists(...n)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var o=(e,t)=>{var n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){var a=t.precheck(this,o);if(void 0!==a)return a}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||i&&!o(r,e)))}loadNamespaces(e,t){var n=Di();return this.options.ns?(wi(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){var n=Di();wi(e)&&(e=[e]);var i=this.options.preload||[],r=e.filter(e=>i.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return r.length?(this.options.preload=i.concat(r),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){var t,n;if(e||(e=this.resolvedLanguage||((null===(t=this.languages)||void 0===t?void 0:t.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{var i=new Intl.Locale(e);if(i&&i.getTextInfo){var r=i.getTextInfo();if(r&&r.direction)return r.direction}}catch(e){}var o=(null===(n=this.services)||void 0===n?void 0:n.languageUtils)||new $i(lr());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(o.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){var e=new dr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0);return e.createInstance=dr.createInstance,e}cloneInstance(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cr,n=e.forkResourceStore;n&&delete e.forkResourceStore;var i=b(b(b({},this.options),e),{isClone:!0}),r=new dr(i);void 0===e.debug&&void 0===e.prefix||(r.logger=r.logger.clone(e));if(["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services=b({},this.services),r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n){var o=Object.keys(this.store.data).reduce((e,t)=>(e[t]=b({},this.store.data[t]),e[t]=Object.keys(e[t]).reduce((n,i)=>(n[i]=b({},e[t][i]),n),e[t]),e),{});r.store=new Wi(o,i),r.services.resourceStore=r.store}if(e.interpolation){var a=b(b(b({},lr().interpolation),this.options.interpolation),e.interpolation),s=b(b({},i),{},{interpolation:a});r.services.interpolator=new ir(s)}return r.translator=new Yi(r.services,i),r.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r.emit(e,...n)}),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}var pr=dr.createInstance();pr.createInstance,pr.dir,pr.init,pr.loadResources,pr.reloadResources,pr.use,pr.changeLanguage,pr.getFixedT;var mr=pr.t;pr.exists,pr.setDefaultNamespace,pr.hasLoadedNamespace,pr.loadNamespaces,pr.loadLanguages;var fr,gr,vr={en:{translation:{__contributors:["reisxd"],settings:{options:{socialMedia:{title:"Social Media Links",qrCodeScanMessage:"You can visit the {{name}} page by scanning the QR code below.",announcements:"Announcements",group:"Group",website:"Website",githubSponsors:"GitHub Sponsors"},adBlock:"Ad Block",sponsorblock:{title:"SponsorBlock Settings",options:{enableSB:"Enable SponsorBlock",manualSkip:"Manual SponsorBlock Segment Skip",segments:"Segments",categories:{sponsor:"Skip Sponsor Segments",intro:"Skip Intro Segments",outro:"Skip Outro Segments",interaction:"Skip Interaction Reminder Segments",selfpromo:"Skip Self-Promotion Segments",preview:"Skip Preview/Recap Segments",filler:"Skip Tangents/Jokes Segments",music_offtopic:"Skip Off-Topic Music Segments",highlights:"Enable Highlights"},showSBToasts:"Show SponsorBlock Toasts"}},dearrow:{title:"DeArrow Settings",options:{enableDA:"Enable DeArrow",enableDAThumbnails:"Enable DeArrow Thumbnails"}},misc:{title:"Miscellaneous Settings",options:{endScreenCards:"Hide End Screen Cards",youThereRenderer:"Enable 'Are you still watching?' Renderer",paidPromoOverlay:"Enable 'Includes paid promotion' Overlay",whosWatching:{title:"Who's Watching Menu",options:{enableWW:"Enable Who's Watching Menu",permaEnableWW:"Permanently Enable Who's Watching Menu",enableWWOnExit:"Enable Who's Watching Menu on App Exit"}},fixUI:"Fix UI",hqThumbnails:"Enable High Quality Thumbnails",longPress:"Enable Long Press Actions",shorts:"Enable Shorts",videoPreviews:"Enable Video Previews",ttWelcomeMsg:"Show TT Welcome Message",guestSignInReminder:"Show Guest Sign In Reminder",reloadHomeOnStartup:"Reload Home on Startup"}},subtitles:{title:"Subtitle Settings",options:{showLocalSubtitle:"Show Local Subtitle",showHiddenSubtitles:"Show Hidden Subtitles"}},videoPlayer:{title:"Video Player Settings",subtitle:"Customize video player features",options:{patching:{title:"Patch Video Player UI",options:{enableVPUIPatching:"Enable Video Player UI Patching",previousNextBtns:"Enable Previous and Next Buttons",showSuperThxBtn:"Show Super Thanks Button",showAIAskBtn:"Show Ask Button",showSpeedCtrlBtn:"Show Speed Controls Button",addMPBtn:"Show Mini Player Button",swapMPWithPIP:"Swap Mini Player Button with PiP Button"}},preferredVideoQuality:{title:"Preferred Video Quality",subtitle:"Choose the preferred or next best video quality applied when playback starts"},speedSettings:{title:"Speed Settings Increments",subtitle:"Set the speed increments for video playback speed adjustments"},preferredVideoCodec:{title:"Preferred Video Codec",subtitle:"Choose the preferred video codec for playback"},afr:"Auto Frame Rate",afrPauseDuration:{title:"Auto Frame Rate Pause Duration",subtitle:"Set the duration (in seconds) to pause video playback when adjusting frame rate"},codecAny:"Any",qualityAuto:"Auto",hideRelatedVideosPlayer:"Hide Related Videos"}},time:{second:"{{count}} second",seconds:"{{count}} seconds",minute:"{{count}} minute",minutes:"{{count}} minutes"},uiSettings:{title:"User Interface Settings",subtitle:"Customize the UI to your liking",options:{hideWatchedVideos:{title:"Hide Watched Videos",options:{enableHideWatchedVideos:"Enable Hide Watched Videos",watchedVideosThreshold:{title:"Watched Videos Threshold",subtitle:"Set the percentage threshold for hiding watched videos"},setPagesToHideWatchedVideos:"Set Pages to Hide Watched Videos"}},screenDimming:{title:"Screen Dimming",options:{enableScreenDimming:"Enable Screen Dimming",dimmingTimeout:{title:"Dimming Timeout",subtitle:"Set the inactivity timeout (in seconds) before the screen dims"},dimmingOpacity:{title:"Dimming Opacity",subtitle:"Set the opacity level for screen dimming"}}},disableSidebarContents:{title:"Disable Sidebar Contents",subtitle:"Select sidebar contents to disable"},sortSidebarContents:{title:"Sort Sidebar Contents",subtitle:"Reorder sidebar contents to your preference",moveUp:{title:"Move Up",subtitle:"Move this item up in the sidebar"},moveDown:{title:"Move Down",subtitle:"Move this item down in the sidebar"},addToSidebar:"Add Channel to Sidebar",removeFromSidebar:"Remove Channel from Sidebar"},launchToOnStartup:{title:"Launch To on Startup",subtitle:"Choose the default page TizenTube opens to on startup"},categories:{search:"Search",home:"Home",sports:"Sports",news:"News",music:"Music",podcasts:"Podcasts",moviesAndTv:"Movies & TV",live:"Live",gaming:"Gaming",subscriptions:"Subscriptions",library:"Library",more:"More",shorts:"Shorts",searchResults:"Search Results"},sortSubscriptionsByAlphabet:"Sort Subscriptions Alphabetically",disableChannelsOnSidebar:"Disable Channels on Sidebar",clock:{title:"Clock",subtitle:"Display a clock on the screen",options:{enableClock:"Enable Clock",isClock12HourFormat:"Use 12-Hour Format for Clock",clockShowSeconds:"Show Seconds on Clock",clockHideWhenVideoPlaying:"Hide Clock While Video is Playing"}},disableEnlargingThumbnails:"Disable Enlarged Thumbnails",enableShrinkingThumbnails:"Enable Shrinked Thumbnails"}},updater:{title:"TizenTube Cobalt Updater",menuSubtitle:"Manage TizenTube Cobalt updates",versionSubtitle:"Current version: {{version}}",options:{checkForUpdates:"Check for updates",checkForUpdatesOnStartup:"Check for updates on startup"},updateAvailable:{title:"Update Available",subtitle:"A new version of TizenTube Cobalt is available: {{latestVersion}}, current: {{currentVersion}}"},releaseDate:"Release Date: {{date}}",updateNow:{title:"Update Now",subtitle:"Click to download the latest version."},remindLater:{title:"Remind Me Later",subtitle:"Check for updates later."},upToDate:{title:"TizenTube is up to date",subtitle:"You are using the latest version ({{version}}) of TizenTube Cobalt."},checkFailed:{title:"TizenTube update check failed",subtitle:"Could not check for updates."},downloading:{title:"TizenTube Update",subtitle:"Downloading update, please wait..."}}},ttSettings:{title:"TizenTube Settings",madeByText:"Made by Reis Can (reisxd) with ❤️",summary:"Open TizenTube Settings"},supportTT:{title:"Support TizenTube",subtitle:"❤️ Show support for TizenTube and its development",content:{1:"If you enjoy using TizenTube and would like to support its development, consider the following:",2:"1. Star the GitHub repository to help increase its visibility.",3:"2. Share TizenTube with others.",4:"If you would like to contribute financially, consider donating:",5:"- Buy Me A Coffee: https://www.buymeacoffee.com/reisxd (preferably)",6:"- GitHub Sponsors: https://github.com/sponsors/reisxd"}}},welcomeMsg:{title:"Welcome to TizenTube",subtitle:"Go to settings and click on TizenTube Settings for settings."},sponsorblock:{segments:{sponsor:"sponsored segment",intro:"intro",outro:"outro",interaction:"interaction reminder",selfpromo:"self-promotion",preview:"recap or preview",filler:"tangents",music_offtopic:"non-music part",poi_highlight:"highlight"},toasts:{skipping:"Skipping {{segment}}",notSkipping:"Not skipping {{segment}} (was skipped {{count}} times)",skip:"Skip {{segment}}",skipToHighlight:"Skip to highlight"}},player:{playbackSpeed:{title:"Playback Speed",button:"Speed Controls",fixStuttering:"Fix stuttering (1.0001x)"},miniPlayer:"Mini Player",pictureInPicture:"Picture in Picture",previous:"Previous",next:"Next",withTizenTube:"with TizenTube",share:{title:"Share",button:"Share",qrCodeScanMessage:"Scan the QR code below to share this video."},screenOff:"Turn off screen"},videoMenu:{notInterested:"Not interested",dontRecommendChannel:"Don't recommend channel"},toasts:{videoAddedToQueue:"Video added to queue.",videoQueueCleared:"Video queue cleared.",feedbackSent:"Feedback sent.",sidebarContentsUpdated:{title:"Sidebar Contents Updated",subtitle:"The sidebar contents have been updated."}}}},de:{translation:{__contributors:["CrazyWolf13"],settings:{options:{socialMedia:{title:"Social-Media-Links",qrCodeScanMessage:"Du kannst die {{name}}-Seite besuchen, indem du den untenstehenden QR-Code scannst.",announcements:"Anzeigen",group:"Gruppe",website:"Website",githubSponsors:"GitHub Sponsoren"},adBlock:"Werbeblocker",sponsorblock:{title:"SponsorBlock-Einstellungen",options:{enableSB:"SponsorBlock aktivieren",manualSkip:"Manuelles Überspringen von SponsorBlock-Segmenten",segments:"Segmente",categories:{sponsor:"Sponsor-Segmente überspringen",intro:"Intro-Segmente überspringen",outro:"Outro-Segmente überspringen",interaction:"Interaktionsaufforderungen überspringen",selfpromo:"Eigenwerbung überspringen",preview:"Vorschau-/Zusammenfassungs-Segmente überspringen",filler:"Abschweifungen/Witze überspringen",music_offtopic:"Off-Topic-Musiksegmente überspringen",highlights:"Highlights aktivieren"},showSBToasts:"SponsorBlock-Pop-Ups anzeigen"}},dearrow:{title:"DeArrow-Einstellungen",options:{enableDA:"DeArrow aktivieren",enableDAThumbnails:"DeArrow-Thumbnails aktivieren"}},misc:{title:"Sonstige Einstellungen",options:{endScreenCards:"Endbildschirm-Karten ausblenden",youThereRenderer:"'Schaust du noch?' anzeigen",paidPromoOverlay:"'Enthält bezahlte Werbung'-Overlay anzeigen",whosWatching:{title:"„Wer schaut?“ Menü",options:{enableWW:"„Wer schaut?“ Menü aktivieren",permaEnableWW:"„Wer schaut?“ Menü dauerhaft aktivieren",enableWWOnExit:"„Wer schaut?“ Menü beim Beenden der App anzeigen"}},fixUI:"UI korrigieren",hqThumbnails:"Hochqualitative Thumbnails aktivieren",longPress:"Aktionen bei langem Drücken aktivieren",shorts:"Shorts aktivieren",videoPreviews:"Videovorschauen aktivieren",ttWelcomeMsg:"TT-Begrüßungsnachricht anzeigen",guestSignInReminder:"Gast-Anmeldeerinnerung anzeigen",reloadHomeOnStartup:"Startseite beim Start neu laden"}},subtitles:{title:"Untertitel-Einstellungen",options:{showLocalSubtitle:"Lokale Untertitel anzeigen",showHiddenSubtitles:"Versteckte Untertitel anzeigen"}},videoPlayer:{title:"Videoplayer-Einstellungen",subtitle:"Videoplayer-Funktionen anpassen",options:{patching:{title:"Videoplayer-UI patchen",options:{enableVPUIPatching:"Videoplayer-UI-Patching aktivieren",previousNextBtns:"Zurück-/Weiter-Buttons aktivieren",showSuperThxBtn:"Super-Thanks-Button anzeigen",showAIAskBtn:"KI-Frage-Button anzeigen",showSpeedCtrlBtn:"Geschwindigkeitssteuerungs-Button anzeigen",addMPBtn:"Miniplayer-Schaltfläche anzeigen",swapMPWithPIP:"Miniplayer-Schaltfläche durch PiP ersetzen"}},preferredVideoQuality:{title:"Bevorzugte Videoqualität",subtitle:"Wähle die bevorzugte oder nächstbeste Videoqualität, die beim Start der Wiedergabe verwendet wird"},speedSettings:{title:"Geschwindigkeitsstufen",subtitle:"Lege die Schritte für Anpassungen der Wiedergabegeschwindigkeit fest"},preferredVideoCodec:{title:"Bevorzugter Videocodec",subtitle:"Wähle den bevorzugten Videocodec für die Wiedergabe"},afr:"Automatische Bildrate",afrPauseDuration:{title:"Pause bei automatischer Bildrate",subtitle:"Lege fest, wie lange (in Sekunden) das Video pausiert wird, wenn die Bildrate angepasst wird"},codecAny:"Beliebig",qualityAuto:"Automatisch",hideRelatedVideosPlayer:"Hide Related Videos"}},time:{second:"{{count}} Sekunde",seconds:"{{count}} Sekunden",minute:"{{count}} Minute",minutes:"{{count}} Minuten"},uiSettings:{title:"Benutzeroberflächen-Einstellungen",subtitle:"Passe die Oberfläche nach deinen Wünschen an",options:{hideWatchedVideos:{title:"Angesehene Videos ausblenden",options:{enableHideWatchedVideos:"Ausblenden angesehener Videos aktivieren",watchedVideosThreshold:{title:"Schwellenwert für angesehene Videos",subtitle:"Lege den Prozentsatz fest, ab dem Videos als angesehen gelten und ausgeblendet werden"},setPagesToHideWatchedVideos:"Seiten festlegen, auf denen angesehene Videos ausgeblendet werden"}},screenDimming:{title:"Bildschirmabdunklung",options:{enableScreenDimming:"Bildschirmabdunklung aktivieren",dimmingTimeout:{title:"Timeout für Abdunklung",subtitle:"Lege die Inaktivitätszeit (in Sekunden) fest, bevor der Bildschirm abgedunkelt wird"},dimmingOpacity:{title:"Abdunklungs-Deckkraft",subtitle:"Lege die Deckkraft der Bildschirmabdunklung fest"}}},disableSidebarContents:{title:"Seitenleisten-Inhalte deaktivieren",subtitle:"Wähle Seitenleisten-Inhalte aus, die deaktiviert werden sollen"},launchToOnStartup:{title:"Startseite beim Start",subtitle:"Wähle die Standardseite, die TizenTube beim Start öffnet"},categories:{search:"Suchen",home:"Startseite",sports:"Sport",news:"Nachrichten",music:"Musik",podcasts:"Podcasts",moviesAndTv:"Filme",live:"Live",gaming:"Gaming",subscriptions:"Abos",library:"Mediathek",more:"Mehr",shorts:"Shorts",searchResults:"Suchergebnisse"},sortSubscriptionsByAlphabet:"Abonnements alphabetisch sortieren",disableChannelsOnSidebar:"Kanäle in der Seitenleiste deaktivieren",clock:{title:"Uhr",subtitle:"Die Uhr auf dem Bildschirm anzeigen",options:{enableClock:"Uhr aktivieren",isClock12HourFormat:"12-Stunden-Format",clockShowSeconds:"Sekunden anzeigen",clockHideWhenVideoPlaying:"Hide Clock While Video is Playing"}},disableEnlargingThumbnails:"Disable Enlarged Thumbnails",enableShrinkingThumbnails:"Enable Shrinked Thumbnails",sortSidebarContents:{title:"Sort Sidebar Contents",subtitle:"Reorder sidebar contents to your preference",moveUp:{title:"Move Up",subtitle:"Move this item up in the sidebar"},moveDown:{title:"Move Down",subtitle:"Move this item down in the sidebar"},addToSidebar:"Add Channel to Sidebar",removeFromSidebar:"Remove Channel from Sidebar"}}},updater:{title:"TizenTube Cobalt Updater",menuSubtitle:"TizenTube Cobalt Updates verwalten",versionSubtitle:"Aktuelle Version: {{version}}",options:{checkForUpdates:"Nach Updates suchen",checkForUpdatesOnStartup:"Beim Start nach Updates suchen"},updateAvailable:{title:"Update verfügbar",subtitle:"Eine neue Version von TizenTube Cobalt ist verfügbar: {{latestVersion}}, installiert: {{currentVersion}}"},releaseDate:"Veröffentlichungsdatum: {{date}}",updateNow:{title:"Jetzt aktualisieren",subtitle:"Klicken Sie hier, um die neueste Version herunterzuladen"},remindLater:{title:"Später daran erinnern",subtitle:"Später nach Updates suchen."},upToDate:{title:"TizenTube ist auf dem neuesten Stand",subtitle:"Sie verwenden die neueste Version ({{version}}) von TizenTube Cobalt."},checkFailed:{title:"Überprüfung auf TizenTube-Updates fehlgeschlagen",subtitle:"Es konnten keine Updates gefunden werden."},downloading:{title:"TizenTube-Update",subtitle:"Update wird heruntergeladen, bitte warten..."}}},ttSettings:{title:"TizenTube-Einstellungen",madeByText:"Erstellt von Reis Can (reisxd) mit ❤️",summary:"TizenTube-Einstellungen öffnen"},supportTT:{title:"TizenTube unterstützen",subtitle:"❤️ Unterstütze TizenTube und seine Entwicklung",content:{1:"Wenn dir TizenTube gefällt und du seine Entwicklung unterstützen möchtest, ziehe Folgendes in Betracht:",2:"1. Markiere das GitHub-Repository mit einem Stern, um seine Sichtbarkeit zu erhöhen.",3:"2. Teile TizenTube mit anderen.",4:"Wenn du finanziell beitragen möchtest, kannst du spenden:",5:"- Buy Me A Coffee: https://www.buymeacoffee.com/reisxd (bevorzugt)",6:"- GitHub Sponsoren: https://github.com/sponsors/reisxd"}}},welcomeMsg:{title:"Willkommen bei TizenTube",subtitle:"Gehe zu den Einstellungen und klicke auf TizenTube-Einstellungen."},sponsorblock:{segments:{sponsor:"Sponsor-Segment",intro:"Intro",outro:"Outro",interaction:"Interaktionshinweis",selfpromo:"Eigenwerbung",preview:"Zusammenfassung oder Vorschau",filler:"Abschweifung",music_offtopic:"Nicht-Musik-Teil",poi_highlight:"Highlight"},toasts:{skipping:"{{segment}} wird übersprungen",notSkipping:"{{segment}} wird nicht übersprungen (wurde {{count}} mal übersprungen)",skip:"{{segment}} überspringen",skipToHighlight:"Zum Highlight springen"}},player:{playbackSpeed:{title:"Wiedergabegeschwindigkeit",button:"Geschwindigkeit",fixStuttering:"Ruckeln beheben (1.0001x)"},miniPlayer:"MiniPlayer",pictureInPicture:"Bild-in-Bild",previous:"Zurück",next:"Weiter",withTizenTube:"mit TizenTube",share:{title:"Share",button:"Share",qrCodeScanMessage:"Scan the QR code below to share this video."},screenOff:"Turn off screen"},toasts:{videoAddedToQueue:"Video wurde zur Warteschlange hinzugefügt",videoQueueCleared:"Die Warteschlange wurde geleert.",sidebarContentsUpdated:{title:"Sidebar Contents Updated",subtitle:"The sidebar contents have been updated."},feedbackSent:"Feedback sent."},videoMenu:{notInterested:"Not interested",dontRecommendChannel:"Don't recommend channel"}}}};gr=(null===(fr=window)||void 0===fr||null===(fr=fr.yt)||void 0===fr||null===(fr=fr.config_)||void 0===fr?void 0:fr.HL)||navigator.language.replace(/(\-.*)/g,""),pr.init({lng:gr,fallbackLng:"en",resources:vr,debug:!1,interpolation:{escapeValue:!1}});var yr;yr||(yr=1,function(){function e(e){return void 0===e?0:Number(e)}function t(e,t){return e!==t&&!(isNaN(e)&&isNaN(t))}self.DOMRect=function(n,i,r,o){var a,s,l,u,c,h,d,p;a=e(n),s=e(i),l=e(r),u=e(o),Object.defineProperties(this,{x:{get:function(){return a},set:function(e){t(a,e)&&(a=e,c=h=void 0)},enumerable:!0},y:{get:function(){return s},set:function(e){t(s,e)&&(s=e,d=p=void 0)},enumerable:!0},width:{get:function(){return l},set:function(e){t(l,e)&&(l=e,c=h=void 0)},enumerable:!0},height:{get:function(){return u},set:function(e){t(u,e)&&(u=e,d=p=void 0)},enumerable:!0},left:{get:function(){return void 0===c&&(c=a+Math.min(0,l)),c},enumerable:!0},right:{get:function(){return void 0===h&&(h=a+Math.max(0,l)),h},enumerable:!0},top:{get:function(){return void 0===d&&(d=s+Math.min(0,u)),d},enumerable:!0},bottom:{get:function(){return void 0===p&&(p=s+Math.max(0,u)),p},enumerable:!0}})}}());var br,Sr="ytaf-configuration",xr={enableAdBlock:!0,enableSponsorBlock:!0,enableSponsorBlockToasts:!0,sponsorBlockManualSkips:["intro","outro","filler"],enableSponsorBlockSponsor:!0,enableSponsorBlockIntro:!0,enableSponsorBlockOutro:!0,enableSponsorBlockInteraction:!0,enableSponsorBlockSelfPromo:!0,enableSponsorBlockPreview:!0,enableSponsorBlockMusicOfftopic:!0,enableSponsorBlockFiller:!1,enableSponsorBlockHighlight:!0,videoSpeed:1,preferredVideoQuality:"auto",enableDeArrow:!0,enableDeArrowThumbnails:!1,focusContainerColor:"#0f0f0f",routeColor:"#0f0f0f",enableFixedUI:!window.h5vcc,enableHqThumbnails:!1,enableChapters:!0,enableLongPress:!0,enableShorts:!0,dontCheckUpdateUntil:0,enableWhoIsWatchingMenu:!1,permanentlyEnableWhoIsWatchingMenu:!1,enableWhosWatchingMenuOnAppExit:!1,enableShowUserLanguage:!0,enableShowOtherLanguages:!1,showWelcomeToast:!0,enablePreviousNextButtons:!0,enableSuperThanksButton:!1,enableAIAskButton:!1,enableSpeedControlsButton:!0,enablePatchingVideoPlayer:!0,enableMPButton:!0,enableSwapMPWithPIP:!1,enablePreviews:!0,enableHideWatchedVideos:!1,hideWatchedVideosThreshold:80,hideWatchedVideosPages:[],enableHideEndScreenCards:!1,enableYouThereRenderer:!0,lastAnnouncementCheck:0,enableScreenDimming:!1,dimmingTimeout:60,dimmingOpacity:.5,enablePaidPromotionOverlay:!0,speedSettingsIncrement:.25,preferredVideoCodec:"any",launchToOnStartup:null,reloadHomeOnStartup:!0,disabledSidebarContents:[],sidebarContentsOrder:[],disableChannelsOnSidebar:!1,enableUpdater:!0,autoFrameRate:!1,autoFrameRatePauseVideoFor:0,enableSigninReminder:!1,sortSubscriptionsByAlphabet:!1,enableClock:!1,isClock12HourFormat:!1,clockShowSeconds:!1,clockHideWhenVideoPlaying:!1,disableEnlargingThumbnails:!1,enableShrinkingThumbnails:!1,hideRelatedVideosPlayer:!1};try{br=JSON.parse(window.localStorage[Sr])}catch(e){console.warn("Config read failed:",e),br=xr}function Er(e){return void 0===br[e]&&(console.warn("Populating key",e,"with default value",xr[e]),br[e]=xr[e]),br[e]}function wr(e,t){console.info("Setting key",e,"to",t),br[e]=t,window.localStorage[Sr]=JSON.stringify(br),Dr.dispatchEvent(new CustomEvent("configChange",{detail:{key:e,value:t}}))}var Dr={listeners:{},addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},removeEventListener(e,t){this.listeners[e]&&(this.listeners[e]=this.listeners[e].filter(e=>e!==t))},dispatchEvent(e){var t=e.type;this.listeners[t]&&this.listeners[t].forEach(t=>{try{t.call(this,e)}catch(e){}})}};window.isPipPlaying=!1;var Cr=null;function kr(){var e=Object.values(window._yttv).find(e=>e&&e.mappings);Cr=e.get("PlayerService");var t=e.get("PlaybackPreviewService"),n=t.start,i=t.stop;t.start=function(){if(!window.isPipPlaying){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n.apply(this,t)}},t.stop=function(){if(!window.isPipPlaying){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.apply(this,t)}}}"complete"===document.readyState?kr():window.addEventListener("load",kr);var Ar={ytlrSearchVoice:{length:0,classes:[]},ytlrSearchVoiceMicButton:{length:0,classes:[]}};new MutationObserver(()=>{if(window.isPipPlaying){var e=document.querySelector("ytlr-search-bar");if(e)if(!document.querySelector("#tt-pip-button")){var t=e.querySelector("ytlr-search-voice");if(t){for(var n=Object.values(window._yttv).find(e=>e instanceof Map&&e.has("CLEAR_COOKIES")),i=n.get("MICROPHONE_ON"),r=n.get("CLEAR_COOKIES"),o=document.createElement("ytlr-search-voice"),a=0;a<t.classList.length;a++){if(0===Ar.ytlrSearchVoice.length&&(Ar.ytlrSearchVoice.length=t.classList.length),Ar.ytlrSearchVoice.length!==t.classList.length){var s,l=f(Ar.ytlrSearchVoice.classes);try{for(l.s();!(s=l.n()).done;){var u=s.value;o.classList.add(u)}}catch(e){l.e(e)}finally{l.f()}break}Ar.ytlrSearchVoice.classes.includes(t.classList[a])||Ar.ytlrSearchVoice.classes.push(t.classList[a]),o.classList.add(t.classList[a])}o.style.left="10.25em",o.id="tt-pip-button";for(var c=document.createElement("ytlr-search-voice-mic-button"),h=0;h<t.children[0].classList.length;h++){if(0===Ar.ytlrSearchVoiceMicButton.length&&(Ar.ytlrSearchVoiceMicButton.length=t.children[0].classList.length),Ar.ytlrSearchVoiceMicButton.length!==t.children[0].classList.length){var d,p=f(Ar.ytlrSearchVoiceMicButton.classes);try{for(p.s();!(d=p.n()).done;){var m=d.value;c.classList.add(m)}}catch(e){p.e(e)}finally{p.f()}break}Ar.ytlrSearchVoiceMicButton.classes.includes(t.children[0].classList[h])||Ar.ytlrSearchVoiceMicButton.classes.push(t.children[0].classList[h]),c.classList.add(t.children[0].classList[h])}for(var g=document.createElement("yt-icon"),v=0;v<t.children[0].children[0].classList.length;v++)g.classList.add(t.children[0].children[0].classList[v]);g.classList.remove(i),g.classList.add(r),c.appendChild(g),o.appendChild(c),e.appendChild(o)}else{var y=document.createElement("ytlr-search-voice");y.style.left="10.25em",y.id="tt-pip-button",y.setAttribute("idomkey","ytLrSearchBarSearchVoice"),y.setAttribute("tabindex","0"),y.classList.add("ytLrSearchVoiceHost","ytLrSearchBarSearchVoice");var b=document.createElement("ytlr-search-voice-mic-button");b.setAttribute("hybridnavfocusable","true"),b.setAttribute("tabindex","-1"),b.classList.add("ytLrSearchVoiceMicButtonHost","zylon-ve");var S=document.createElement("yt-icon");S.setAttribute("tabindex","-1"),S.classList.add("ytContribIconTvArrowLeft","ytContribIconHost","ytLrSearchVoiceMicButtonIcon"),b.appendChild(S),y.appendChild(b),e.appendChild(y)}}}}).observe(document.body,{childList:!0,subtree:!0});var Tr=Object.freeze({de:Object.freeze({title:"S95B · Performance",language:"Sprache",codec:"Videocodec",quality:"Standardqualität (alle Videos)",automatic:"Automatisch",light:"Ressourcenschonender Modus",lightHint:"Schaltet Vorschauen und DeArrow ab; vorherige Werte werden beim Ausschalten wiederhergestellt.",codecHint:"H.264 liefert bei YouTube in der Regel höchstens 1080p; 4K gibt es nur als VP9 oder AV1. Ein Codec wird nur erzwungen, wenn dadurch keine Qualität verloren geht. Gilt ab dem nächsten Video.",qualityHint:"Gilt für alle Videos (YouTubes eigene Zeile „Qualität“ ändert nur das laufende Video). Eine feste Qualität gilt sofort. „Automatisch“ wirkt eventuell erst nach einem Neustart von YouTube.",languageHint:"Gilt für dieses Menü, beim nächsten Öffnen.",statVideo:"Video",statFrames:"Verlorene Bilder",statCodec:"Codec-Wunsch",statUnavailable:"nicht verfügbar",statWait:"wartet auf Video",languageDE:"Deutsch",languageEN:"English"}),en:Object.freeze({title:"S95B · Performance",language:"Language",codec:"Video codec",quality:"Default quality (all videos)",automatic:"Automatic",light:"Low-overhead mode",lightHint:"Disables previews and DeArrow; the previous values are restored when switched off.",codecHint:"On YouTube, H.264 usually tops out at 1080p; 4K is only available as VP9 or AV1. A codec is only forced if no quality is lost. Applies from the next video.",qualityHint:"Applies to all videos (YouTube’s own “Quality” row only changes the current video). A fixed quality applies immediately. “Automatic” may only take effect after restarting YouTube.",languageHint:"Applies to this menu, the next time it is opened.",statVideo:"Video",statFrames:"Dropped frames",statCodec:"Codec preference",statUnavailable:"not available",statWait:"waiting for video",languageDE:"Deutsch",languageEN:"English"})});function Fr(e,t){return(Tr[e]||Tr.de)[t]||Tr.en[t]||t}var Pr=["any","vp9","av01","avc1"],Br=["auto","2160p","1440p","1080p","720p"];function Ir(e,t){return"any"===t?e("automatic"):"vp9"===t?"VP9":"av01"===t?"AV1":"H.264"}function Or(e,t){return"auto"===t?e("automatic"):"2160p"===t?"2160p (4K)":String(t)}function Nr(){var e=Er("preferredVideoCodec");return Pr.indexOf(e)>=0?e:"any"}function Rr(e){return{name:e("codec"),icon:"VIDEO_QUALITY",value:null,menuId:"s95b-codec",menuHeader:{title:e("codec"),subtitle:e("codecHint")},options:Pr.map(t=>({name:Ir(e,t),key:"preferredVideoCodec",value:t}))}}function Lr(e){return{name:e("quality"),icon:"VIDEO_QUALITY",value:null,menuId:"s95b-quality",menuHeader:{title:e("quality"),subtitle:e("qualityHint")},options:Br.map(t=>({name:Or(e,t),key:"preferredVideoQuality",value:t}))}}function Mr(e,t,n){var i={openPopupAction:{popupType:"TOAST",popup:{overlayToastRenderer:{title:{simpleText:e},subtitle:{simpleText:t}}}}};n&&(i.openPopupAction.popup.overlayToastRenderer.image.thumbnails=n),co(i)}function _r(e,t,n,i){var r=function(e,t,n,i){var r="string"==typeof e?{title:e,subtitle:""}:e,o={openPopupAction:{popupType:"MODAL",popup:{overlaySectionRenderer:{overlay:{overlayTwoPanelRenderer:{actionPanel:{overlayPanelRenderer:{header:{overlayPanelHeaderRenderer:e.overlayPanelHeaderRenderer||{title:{simpleText:r.title}}},content:t}},backButton:{buttonRenderer:{accessibilityData:{accessibilityData:{label:"Back"}},command:{signalAction:{signal:"POPUP_BACK"}}}}}},dismissalCommand:{signalAction:{signal:"POPUP_BACK"}}}},uniqueId:n}};return r.subtitle&&(o.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.header.overlayPanelHeaderRenderer.subtitle={simpleText:r.subtitle}),i&&(o.openPopupAction.shouldMatchUniqueId=!0,o.openPopupAction.updateAction=!0),o}(e,t,n,i);co(r)}function Ur(e,t){return{overlayPanelItemListRenderer:{items:e,selectedIndex:t}}}function zr(e,t,n){var i={compactLinkRenderer:{serviceEndpoint:{commandExecutorCommand:{commands:n}}}};return e&&(i.compactLinkRenderer.title={simpleText:e.title}),e.subtitle&&(i.compactLinkRenderer.subtitle={simpleText:e.subtitle}),t&&(i.compactLinkRenderer.icon={iconType:t.icon}),t&&t.secondaryIcon&&(i.compactLinkRenderer.secondaryIcon={iconType:t.secondaryIcon}),i}function Vr(e,t,n,i,r){return{timelyActionRenderer:{actionButtons:[{buttonRenderer:{isDisabled:!1,text:{runs:[{text:e}]},icon:{iconType:t},trackingParams:null,command:n}}],triggerTimeMs:i,timeoutMs:r,type:""}}}function Hr(e){var t="WL"===e.watchEndpointData.playlistId,n=t?{removedVideoId:e.videoId,action:"ACTION_REMOVE_VIDEO_BY_VIDEO_ID"}:{addedVideoId:e.videoId,action:"ACTION_ADD_VIDEO"};return{clickTrackingParams:null,showMenuCommand:{contentId:e.videoId,thumbnail:{thumbnails:e.thumbnails},title:{simpleText:e.title},subtitle:{simpleText:e.subtitle},menu:{menuRenderer:{items:[Wr("Play",{clickTrackingParams:null,watchEndpoint:e.watchEndpointData}),jr(t?"Remove from Watch Later":"Save to Watch Later",{clickTrackingParams:null,commandMetadata:{webCommandMetadata:{sendPost:!0,apiUrl:"/youtubei/v1/browse/edit_playlist"}},playlistEditEndpoint:{playlistId:"WL",actions:[n]}}),Wr("Save to Playlist",{clickTrackingParams:null,addToPlaylistEndpoint:{videoId:e.videoId}}),jr("Add to Queue",{clickTrackingParams:null,playlistEditEndpoint:{customAction:{action:"ADD_TO_QUEUE",parameters:e.item}}}),jr("Go To Channel",{clickTrackingParams:null,playlistEditEndpoint:{customAction:{action:"GO_TO_CHANNEL",parameters:e.item}}})],trackingParams:null,accessibility:{accessibilityData:{label:"Video options"}}}}}}}function jr(e,t){return{menuServiceItemRenderer:{text:{runs:[{text:e}]},serviceEndpoint:t,trackingParams:null}}}function Wr(e,t){return{menuNavigationItemRenderer:{text:{runs:[{text:e}]},navigationEndpoint:t,trackingParams:null}}}function Kr(e){return{scrollPaneItemListRenderer:{items:e}}}function Jr(e){return{overlayMessageRenderer:{title:{simpleText:e}}}}function Gr(e){return{qrCodeRenderer:{qrCodeImage:{thumbnails:[{url:e}]},style:"QR_CODE_RENDERER_STYLE_ATA_SIDESHEET",trackingParams:null}}}function Xr(e,t,n,i){return{isDisabled:e,text:{runs:[{text:t}]},icon:{iconType:n},command:i,trackingParams:null}}function qr(e,t,n,i){var r={guideEntryRenderer:{navigationEndpoint:t,trackingParams:null,formattedTitle:{simpleText:e}}};return n&&(r.guideEntryRenderer.icon={iconType:n}),i&&(r.guideEntryRenderer.thumbnail={thumbnails:[{url:i}]}),r}var Yr,$r={};var Qr=(Yr||(Yr=1,$r.qrcode=function(){var e=function(e,t){var n=e,i=c[t],r=null,o=0,a=null,s=new Array,l={},u=function(e,t){r=function(e){for(var t=new Array(e),n=0;n<e;n+=1){t[n]=new Array(e);for(var i=0;i<e;i+=1)t[n][i]=null}return t}(o=4*n+17),h(0,0),h(o-7,0),h(0,o-7),p(),d(),f(e,t),n>=7&&m(e),null==a&&(a=v(n,i,s)),g(a,t)},h=function(e,t){for(var n=-1;n<=7;n+=1)if(!(e+n<=-1||o<=e+n))for(var i=-1;i<=7;i+=1)t+i<=-1||o<=t+i||(r[e+n][t+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},d=function(){for(var e=8;e<o-8;e+=1)null==r[e][6]&&(r[e][6]=e%2==0);for(var t=8;t<o-8;t+=1)null==r[6][t]&&(r[6][t]=t%2==0)},p=function(){for(var e=b.getPatternPosition(n),t=0;t<e.length;t+=1)for(var i=0;i<e.length;i+=1){var o=e[t],a=e[i];if(null==r[o][a])for(var s=-2;s<=2;s+=1)for(var l=-2;l<=2;l+=1)r[o+s][a+l]=-2==s||2==s||-2==l||2==l||0==s&&0==l}},m=function(e){for(var t=b.getBCHTypeNumber(n),i=0;i<18;i+=1){var a=!e&&1==(t>>i&1);r[Math.floor(i/3)][i%3+o-8-3]=a}for(i=0;i<18;i+=1)a=!e&&1==(t>>i&1),r[i%3+o-8-3][Math.floor(i/3)]=a},f=function(e,t){for(var n=i<<3|t,a=b.getBCHTypeInfo(n),s=0;s<15;s+=1){var l=!e&&1==(a>>s&1);s<6?r[s][8]=l:s<8?r[s+1][8]=l:r[o-15+s][8]=l}for(s=0;s<15;s+=1)l=!e&&1==(a>>s&1),s<8?r[8][o-s-1]=l:s<9?r[8][15-s-1+1]=l:r[8][15-s-1]=l;r[o-8][8]=!e},g=function(e,t){for(var n=-1,i=o-1,a=7,s=0,l=b.getMaskFunction(t),u=o-1;u>0;u-=2)for(6==u&&(u-=1);;){for(var c=0;c<2;c+=1)if(null==r[i][u-c]){var h=!1;s<e.length&&(h=1==(e[s]>>>a&1)),l(i,u-c)&&(h=!h),r[i][u-c]=h,-1==(a-=1)&&(s+=1,a=7)}if((i+=n)<0||o<=i){i-=n,n=-n;break}}},v=function(e,t,n){for(var i=E.getRSBlocks(e,t),r=w(),o=0;o<n.length;o+=1){var a=n[o];r.put(a.getMode(),4),r.put(a.getLength(),b.getLengthInBits(a.getMode(),e)),a.write(r)}var s=0;for(o=0;o<i.length;o+=1)s+=i[o].dataCount;if(r.getLengthInBits()>8*s)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+8*s+")");for(r.getLengthInBits()+4<=8*s&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=8*s||(r.put(236,8),r.getLengthInBits()>=8*s));)r.put(17,8);return function(e,t){for(var n=0,i=0,r=0,o=new Array(t.length),a=new Array(t.length),s=0;s<t.length;s+=1){var l=t[s].dataCount,u=t[s].totalCount-l;i=Math.max(i,l),r=Math.max(r,u),o[s]=new Array(l);for(var c=0;c<o[s].length;c+=1)o[s][c]=255&e.getBuffer()[c+n];n+=l;var h=b.getErrorCorrectPolynomial(u),d=x(o[s],h.getLength()-1).mod(h);for(a[s]=new Array(h.getLength()-1),c=0;c<a[s].length;c+=1){var p=c+d.getLength()-a[s].length;a[s][c]=p>=0?d.get(p):0}}var m=0;for(c=0;c<t.length;c+=1)m+=t[c].totalCount;var f=new Array(m),g=0;for(c=0;c<i;c+=1)for(s=0;s<t.length;s+=1)c<o[s].length&&(f[g]=o[s][c],g+=1);for(c=0;c<r;c+=1)for(s=0;s<t.length;s+=1)c<a[s].length&&(f[g]=a[s][c],g+=1);return f}(r,i)};return l.addData=function(e){var t=D(e);s.push(t),a=null},l.isDark=function(e,t){if(e<0||o<=e||t<0||o<=t)throw new Error(e+","+t);return r[e][t]},l.getModuleCount=function(){return o},l.make=function(){u(!1,function(){for(var e=0,t=0,n=0;n<8;n+=1){u(!0,n);var i=b.getLostPoint(l);(0==n||e>i)&&(e=i,t=n)}return t}())},l.createTableTag=function(e,t){e=e||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(t=void 0===t?4*e:t)+"px;",n+='">',n+="<tbody>";for(var i=0;i<l.getModuleCount();i+=1){n+="<tr>";for(var r=0;r<l.getModuleCount();r+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+e+"px;",n+=" height: "+e+"px;",n+=" background-color: ",n+=l.isDark(i,r)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return n+="</tbody>",n+="</table>"},l.createImgTag=function(e,t){e=e||2,t=void 0===t?4*e:t;var n=l.getModuleCount()*e+2*t,i=t,r=n-t;return T(n,n,function(t,n){if(i<=t&&t<r&&i<=n&&n<r){var o=Math.floor((t-i)/e),a=Math.floor((n-i)/e);return l.isDark(a,o)?0:1}return 1})},l};e.stringToBytes=function(e){for(var t=new Array,n=0;n<e.length;n+=1){var i=e.charCodeAt(n);t.push(255&i)}return t},e.createStringToBytes=function(e,t){var n=function(){for(var n=k(e),i=function(){var e=n.read();if(-1==e)throw new Error;return e},r=0,o={};;){var a=n.read();if(-1==a)break;var s=i(),l=i()<<8|i();o[String.fromCharCode(a<<8|s)]=l,r+=1}if(r!=t)throw new Error(r+" != "+t);return o}(),i="?".charCodeAt(0);return function(e){for(var t=new Array,r=0;r<e.length;r+=1){var o=e.charCodeAt(r);if(o<128)t.push(o);else{var a=n[e.charAt(r)];"number"==typeof a?(255&a)==a?t.push(a):(t.push(a>>>8),t.push(255&a)):t.push(i)}}return t}};var t,n,i,r,o,a=1,s=2,l=4,u=8,c={L:1,M:0,Q:3,H:2},h=0,d=1,p=2,m=3,f=4,g=5,v=6,y=7,b=(t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,o=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(r={}).getBCHTypeInfo=function(e){for(var t=e<<10;o(t)-o(n)>=0;)t^=n<<o(t)-o(n);return 21522^(e<<10|t)},r.getBCHTypeNumber=function(e){for(var t=e<<12;o(t)-o(i)>=0;)t^=i<<o(t)-o(i);return e<<12|t},r.getPatternPosition=function(e){return t[e-1]},r.getMaskFunction=function(e){switch(e){case h:return function(e,t){return(e+t)%2==0};case d:return function(e,t){return e%2==0};case p:return function(e,t){return t%3==0};case m:return function(e,t){return(e+t)%3==0};case f:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case g:return function(e,t){return e*t%2+e*t%3==0};case v:return function(e,t){return(e*t%2+e*t%3)%2==0};case y:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw new Error("bad maskPattern:"+e)}},r.getErrorCorrectPolynomial=function(e){for(var t=x([1],0),n=0;n<e;n+=1)t=t.multiply(x([1,S.gexp(n)],0));return t},r.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case a:return 10;case s:return 9;case l:case u:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case a:return 12;case s:return 11;case l:return 16;case u:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case a:return 14;case s:return 13;case l:return 16;case u:return 12;default:throw new Error("mode:"+e)}}},r.getLostPoint=function(e){for(var t=e.getModuleCount(),n=0,i=0;i<t;i+=1)for(var r=0;r<t;r+=1){for(var o=0,a=e.isDark(i,r),s=-1;s<=1;s+=1)if(!(i+s<0||t<=i+s))for(var l=-1;l<=1;l+=1)r+l<0||t<=r+l||0==s&&0==l||a==e.isDark(i+s,r+l)&&(o+=1);o>5&&(n+=3+o-5)}for(i=0;i<t-1;i+=1)for(r=0;r<t-1;r+=1){var u=0;e.isDark(i,r)&&(u+=1),e.isDark(i+1,r)&&(u+=1),e.isDark(i,r+1)&&(u+=1),e.isDark(i+1,r+1)&&(u+=1),0!=u&&4!=u||(n+=3)}for(i=0;i<t;i+=1)for(r=0;r<t-6;r+=1)e.isDark(i,r)&&!e.isDark(i,r+1)&&e.isDark(i,r+2)&&e.isDark(i,r+3)&&e.isDark(i,r+4)&&!e.isDark(i,r+5)&&e.isDark(i,r+6)&&(n+=40);for(r=0;r<t;r+=1)for(i=0;i<t-6;i+=1)e.isDark(i,r)&&!e.isDark(i+1,r)&&e.isDark(i+2,r)&&e.isDark(i+3,r)&&e.isDark(i+4,r)&&!e.isDark(i+5,r)&&e.isDark(i+6,r)&&(n+=40);var c=0;for(r=0;r<t;r+=1)for(i=0;i<t;i+=1)e.isDark(i,r)&&(c+=1);return n+=Math.abs(100*c/t/t-50)/5*10},r),S=function(){for(var e=new Array(256),t=new Array(256),n=0;n<8;n+=1)e[n]=1<<n;for(n=8;n<256;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;n<255;n+=1)t[e[n]]=n;var i={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t[e]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e[t]}};return i}();function x(e,t){if(void 0===e.length)throw new Error(e.length+"/"+t);var n=function(){for(var n=0;n<e.length&&0==e[n];)n+=1;for(var i=new Array(e.length-n+t),r=0;r<e.length-n;r+=1)i[r]=e[r+n];return i}(),i={get:function(e){return n[e]},getLength:function(){return n.length},multiply:function(e){for(var t=new Array(i.getLength()+e.getLength()-1),n=0;n<i.getLength();n+=1)for(var r=0;r<e.getLength();r+=1)t[n+r]^=S.gexp(S.glog(i.get(n))+S.glog(e.get(r)));return x(t,0)},mod:function(e){if(i.getLength()-e.getLength()<0)return i;for(var t=S.glog(i.get(0))-S.glog(e.get(0)),n=new Array(i.getLength()),r=0;r<i.getLength();r+=1)n[r]=i.get(r);for(r=0;r<e.getLength();r+=1)n[r]^=S.gexp(S.glog(e.get(r))+t);return x(n,0).mod(e)}};return i}var E=function(){var e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16]],t=function(e,t){var n={};return n.totalCount=e,n.dataCount=t,n},n={getRSBlocks:function(n,i){var r=function(t,n){switch(n){case c.L:return e[4*(t-1)+0];case c.M:return e[4*(t-1)+1];case c.Q:return e[4*(t-1)+2];case c.H:return e[4*(t-1)+3];default:return}}(n,i);if(void 0===r)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+i);for(var o=r.length/3,a=new Array,s=0;s<o;s+=1)for(var l=r[3*s+0],u=r[3*s+1],h=r[3*s+2],d=0;d<l;d+=1)a.push(t(u,h));return a}};return n}(),w=function(){var e=new Array,t=0,n={getBuffer:function(){return e},get:function(t){var n=Math.floor(t/8);return 1==(e[n]>>>7-t%8&1)},put:function(e,t){for(var i=0;i<t;i+=1)n.putBit(1==(e>>>t-i-1&1))},getLengthInBits:function(){return t},putBit:function(n){var i=Math.floor(t/8);e.length<=i&&e.push(0),n&&(e[i]|=128>>>t%8),t+=1}};return n},D=function(t){var n=l,i=e.stringToBytes(t),r={getMode:function(){return n},getLength:function(e){return i.length},write:function(e){for(var t=0;t<i.length;t+=1)e.put(i[t],8)}};return r},C=function(){var e=new Array,t={writeByte:function(t){e.push(255&t)},writeShort:function(e){t.writeByte(e),t.writeByte(e>>>8)},writeBytes:function(e,n,i){n=n||0,i=i||e.length;for(var r=0;r<i;r+=1)t.writeByte(e[r+n])},writeString:function(e){for(var n=0;n<e.length;n+=1)t.writeByte(e.charCodeAt(n))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var n=0;n<e.length;n+=1)n>0&&(t+=","),t+=e[n];return t+="]"}};return t},k=function(e){var t=e,n=0,i=0,r=0,o={read:function(){for(;r<8;){if(n>=t.length){if(0==r)return-1;throw new Error("unexpected end of file./"+r)}var e=t.charAt(n);if(n+=1,"="==e)return r=0,-1;e.match(/^\s$/)||(i=i<<6|a(e.charCodeAt(0)),r+=6)}var o=i>>>r-8&255;return r-=8,o}},a=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw new Error("c:"+e)};return o},A=function(e,t){var n=e,i=t,r=new Array(e*t),o={setPixel:function(e,t,i){r[t*n+e]=i},write:function(e){e.writeString("GIF87a"),e.writeShort(n),e.writeShort(i),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(i),e.writeByte(0);var t=a(2);e.writeByte(2);for(var r=0;t.length-r>255;)e.writeByte(255),e.writeBytes(t,r,255),r+=255;e.writeByte(t.length-r),e.writeBytes(t,r,t.length-r),e.writeByte(0),e.writeString(";")}},a=function(e){for(var t=1<<e,n=1+(1<<e),i=e+1,o=s(),a=0;a<t;a+=1)o.add(String.fromCharCode(a));o.add(String.fromCharCode(t)),o.add(String.fromCharCode(n));var l=C(),u=function(e){var t=e,n=0,i=0,r={write:function(e,r){if(e>>>r!=0)throw new Error("length over");for(;n+r>=8;)t.writeByte(255&(e<<n|i)),r-=8-n,e>>>=8-n,i=0,n=0;i|=e<<n,n+=r},flush:function(){n>0&&t.writeByte(i)}};return r}(l);u.write(t,i);var c=0,h=String.fromCharCode(r[c]);for(c+=1;c<r.length;){var d=String.fromCharCode(r[c]);c+=1,o.contains(h+d)?h+=d:(u.write(o.indexOf(h),i),o.size()<4095&&(o.size()==1<<i&&(i+=1),o.add(h+d)),h=d)}return u.write(o.indexOf(h),i),u.write(n,i),u.flush(),l.toByteArray()},s=function(){var e={},t=0,n={add:function(i){if(n.contains(i))throw new Error("dup key:"+i);e[i]=t,t+=1},size:function(){return t},indexOf:function(t){return e[t]},contains:function(t){return void 0!==e[t]}};return n};return o},T=function(e,t,n,i){for(var r=A(e,t),o=0;o<t;o+=1)for(var a=0;a<e;a+=1)r.setPixel(a,o,n(a,o));var s=C();r.write(s);for(var l=function(){var e=0,t=0,n=0,i="",r={},o=function(e){i+=String.fromCharCode(a(63&e))},a=function(e){if(e<0);else{if(e<26)return 65+e;if(e<52)return e-26+97;if(e<62)return e-52+48;if(62==e)return 43;if(63==e)return 47}throw new Error("n:"+e)};return r.writeByte=function(i){for(e=e<<8|255&i,t+=8,n+=1;t>=6;)o(e>>>t-6),t-=6},r.flush=function(){if(t>0&&(o(e<<6-t),e=0,t=0),n%3!=0)for(var r=3-n%3,a=0;a<r;a+=1)i+="="},r.toString=function(){return i},r}(),u=s.toByteArray(),c=0;c<u.length;c+=1)l.writeByte(u[c]);l.flush();var h="";return h+="<img",h+=' src="',h+="data:image/gif;base64,",h+=l,h+='"',h+=' width="',h+=e,h+='"',h+=' height="',h+=t,h+='"',i&&(h+=' alt="',h+=i,h+='"'),h+="/>"};return e}()),$r),Zr=$(Qr),eo={};function to(e,t){for(var n,i=[],r=0,o=0,a=[{name:mr("settings.supportTT.title"),icon:"MONEY_HEART",value:null,options:{title:mr("settings.supportTT.title"),subtitle:mr("settings.supportTT.subtitle"),content:(n=[Jr(mr("settings.supportTT.content.1")),Jr(mr("settings.supportTT.content.2")),Jr(mr("settings.supportTT.content.3")),Jr(mr("settings.supportTT.content.4")),Jr(mr("settings.supportTT.content.5")),Jr(mr("settings.supportTT.content.6"))],{scrollPaneRenderer:{content:Kr(n)}})}},{name:mr("settings.options.socialMedia.title"),icon:"PRIVACY_UNLISTED",value:null,options:[{name:"GitHub",link:"https://github.com/reisxd/TizenTube"},{name:"YouTube",link:"https://www.youtube.com/@tizenbrew"},{name:"Discord",link:"https://discord.gg/m2P7v8Y2qR"},{name:`Telegram (${mr("settings.options.socialMedia.announcements")})`,link:"https://t.me/tizentubecobaltofficial"},{name:`Telegram (${mr("settings.options.socialMedia.group")})`,link:"https://t.me/tizentubeofficial"},{name:mr("settings.options.socialMedia.website"),link:"https://tizentube.6513006.xyz"},{name:"Buy Me A Coffee",link:"https://www.buymeacoffee.com/reisxd"},{name:mr("settings.options.socialMedia.githubSponsors"),link:"https://github.com/sponsors/reisxd"}].map(e=>{if(!eo[e.name]){var t=Zr.qrcode(6,"H");t.addData(e.link),t.make();var n=t.createImgTag(8,8).match(/src="([^"]+)"/)[1];eo[e.name]=n}return{name:e.name,icon:"OPEN_IN_NEW",value:null,options:{title:e.name,subtitle:e.link,content:Ur([Jr(mr("settings.options.socialMedia.qrCodeScanMessage",{name:e.name})),Gr(eo[e.name])])}}})},{name:mr("settings.options.adBlock"),icon:"DOLLAR_SIGN",value:"enableAdBlock"},{name:mr("settings.options.sponsorblock.title"),icon:"MONEY_HAND",value:null,menuId:"tt-sponsorblock-settings",menuHeader:{title:mr("settings.options.sponsorblock.title"),subtitle:"https://sponsor.ajay.app/"},options:[{name:mr("settings.options.sponsorblock.options.enableSB"),icon:"MONEY_HAND",value:"enableSponsorBlock"},{name:mr("settings.options.sponsorblock.options.manualSkip"),icon:"DOLLAR_SIGN",value:null,arrayToEdit:"sponsorBlockManualSkips",menuId:"tt-sponsorblock-manual-segment-skip",options:[{name:mr("settings.options.sponsorblock.options.categories.sponsor"),icon:"MONEY_HEART",value:"sponsor"},{name:mr("settings.options.sponsorblock.options.categories.intro"),icon:"PLAY_CIRCLE",value:"intro"},{name:mr("settings.options.sponsorblock.options.categories.outro"),value:"outro"},{name:mr("settings.options.sponsorblock.options.categories.interaction"),value:"interaction"},{name:mr("settings.options.sponsorblock.options.categories.selfpromo"),value:"selfpromo"},{name:mr("settings.options.sponsorblock.options.categories.preview"),value:"preview"},{name:mr("settings.options.sponsorblock.options.categories.filler"),value:"filler"},{name:mr("settings.options.sponsorblock.options.categories.music_offtopic"),value:"music_offtopic"}]},{name:mr("settings.options.sponsorblock.options.segments"),icon:"SETTINGS",value:null,menuId:"tt-sponsorblock-segments",options:[{name:mr("settings.options.sponsorblock.options.categories.sponsor"),icon:"MONEY_HEART",value:"enableSponsorBlockSponsor"},{name:mr("settings.options.sponsorblock.options.categories.intro"),icon:"PLAY_CIRCLE",value:"enableSponsorBlockIntro"},{name:mr("settings.options.sponsorblock.options.categories.outro"),value:"enableSponsorBlockOutro"},{name:mr("settings.options.sponsorblock.options.categories.interaction"),value:"enableSponsorBlockInteraction"},{name:mr("settings.options.sponsorblock.options.categories.selfpromo"),value:"enableSponsorBlockSelfPromo"},{name:mr("settings.options.sponsorblock.options.categories.preview"),value:"enableSponsorBlockPreview"},{name:mr("settings.options.sponsorblock.options.categories.filler"),value:"enableSponsorBlockFiller"},{name:mr("settings.options.sponsorblock.options.categories.music_offtopic"),value:"enableSponsorBlockMusicOfftopic"},{name:mr("settings.options.sponsorblock.options.categories.highlights"),icon:"LOCATION_POINT",value:"enableSponsorBlockHighlight"}]},{name:mr("settings.options.sponsorblock.options.showSBToasts"),value:"enableSponsorBlockToasts"}]},{name:mr("settings.options.dearrow.title"),icon:"VISIBILITY_OFF",value:null,menuHeader:{title:mr("settings.options.dearrow.title"),subtitle:"https://dearrow.ajay.app/"},options:[{name:mr("settings.options.dearrow.options.enableDA"),icon:"VISIBILITY_OFF",value:"enableDeArrow"},{name:mr("settings.options.dearrow.options.enableDAThumbnails"),icon:"TV",value:"enableDeArrowThumbnails"}]},{name:mr("settings.options.misc.title"),icon:"SETTINGS",value:null,options:[{name:mr("settings.options.misc.options.endScreenCards"),icon:"VISIBILITY_OFF",value:"enableHideEndScreenCards"},{name:mr("settings.options.misc.options.youThereRenderer"),icon:"HELP",value:"enableYouThereRenderer"},{name:mr("settings.options.misc.options.paidPromoOverlay"),icon:"MONEY_HAND",value:"enablePaidPromotionOverlay"},{name:mr("settings.options.misc.options.whosWatching.title"),icon:"ACCOUNT_CIRCLE",menuId:"tt-whos-watching-menu-settings",value:null,options:[{name:mr("settings.options.misc.options.whosWatching.options.enableWW"),value:"enableWhoIsWatchingMenu"},{name:mr("settings.options.misc.options.whosWatching.options.permaEnableWW"),value:"permanentlyEnableWhoIsWatchingMenu"},{name:mr("settings.options.misc.options.whosWatching.options.enableWWOnExit"),value:"enableWhosWatchingMenuOnAppExit"}]},{name:mr("settings.options.misc.options.fixUI"),icon:"STAR",value:"enableFixedUI"},{name:mr("settings.options.misc.options.hqThumbnails"),icon:"VIDEO_QUALITY",value:"enableHqThumbnails"},{name:mr("settings.options.misc.options.longPress"),value:"enableLongPress"},{name:mr("settings.options.misc.options.shorts"),icon:"YOUTUBE_SHORTS_FILL_24",value:"enableShorts"},{name:mr("settings.options.misc.options.videoPreviews"),value:"enablePreviews"},{name:mr("settings.options.misc.options.ttWelcomeMsg"),value:"showWelcomeToast"},{name:mr("settings.options.misc.options.guestSignInReminder"),value:"enableSigninReminder"},{name:mr("settings.options.misc.options.reloadHomeOnStartup"),value:"reloadHomeOnStartup"}]},{name:mr("settings.options.subtitles.title"),icon:"TRANSLATE",value:null,options:[{name:mr("settings.options.subtitles.options.showLocalSubtitle"),value:"enableShowUserLanguage"},{name:mr("settings.options.subtitles.options.showHiddenSubtitles"),value:"enableShowOtherLanguages"}]},{name:mr("settings.options.videoPlayer.title"),icon:"VIDEO_YOUTUBE",value:null,menuHeader:{title:mr("settings.options.videoPlayer.title"),subtitle:mr("settings.options.videoPlayer.subtitle")},options:[{name:mr("settings.options.videoPlayer.options.patching.title"),icon:"SETTINGS",value:null,menuId:"tt-video-player-ui-patching",options:[{name:mr("settings.options.videoPlayer.options.patching.options.enableVPUIPatching"),icon:"SETTINGS",value:"enablePatchingVideoPlayer"},{name:mr("settings.options.videoPlayer.options.patching.options.previousNextBtns"),icon:"SKIP_NEXT",value:"enablePreviousNextButtons"},{name:mr("settings.options.videoPlayer.options.patching.options.showSuperThxBtn"),icon:"MONEY_HEART",value:"enableSuperThanksButton"},{name:mr("settings.options.videoPlayer.options.patching.options.showAIAskBtn"),icon:"SPARK",value:"enableAIAskButton"},{name:mr("settings.options.videoPlayer.options.patching.options.showSpeedCtrlBtn"),icon:"SLOW_MOTION_VIDEO",value:"enableSpeedControlsButton"},{name:mr("settings.options.videoPlayer.options.patching.options.addMPBtn"),icon:"CLEAR_COOKIES",value:"enableMPButton"},{name:mr("settings.options.videoPlayer.options.patching.options.swapMPWithPIP"),icon:"CLEAR_COOKIES",value:"enableSwapMPWithPIP"}]},{name:mr("settings.options.videoPlayer.options.preferredVideoQuality.title"),icon:"VIDEO_QUALITY",value:null,menuId:"tt-preferred-video-quality",menuHeader:{title:mr("settings.options.videoPlayer.options.preferredVideoQuality.title"),subtitle:mr("settings.options.videoPlayer.options.preferredVideoQuality.subtitle")},options:["Auto","2160p","1440p","1080p","720p","480p","360p","240p","144p"].map(e=>({name:"Auto"===e?mr("settings.options.videoPlayer.options.qualityAuto"):e,key:"preferredVideoQuality",value:e.toLowerCase()}))},{name:mr("settings.options.videoPlayer.options.speedSettings.title"),icon:"SLOW_MOTION_VIDEO",value:null,menuId:"tt-speed-settings-increments",menuHeader:{title:mr("settings.options.videoPlayer.options.speedSettings.title"),subtitle:mr("settings.options.videoPlayer.options.speedSettings.subtitle")},options:[.05,.1,.15,.2,.25,.3,.35,.4,.45,.5].map(e=>({name:`${e}x`,key:"speedSettingsIncrement",value:e}))},{name:mr("settings.options.videoPlayer.options.hideRelatedVideosPlayer"),icon:"VISIBILITY_OFF",value:"hideRelatedVideosPlayer"},{name:mr("settings.options.videoPlayer.options.preferredVideoCodec.title"),icon:"VIDEO_QUALITY",value:null,menuId:"tt-preferred-video-codec",menuHeader:{title:mr("settings.options.videoPlayer.options.preferredVideoCodec.title"),subtitle:mr("settings.options.videoPlayer.options.preferredVideoCodec.subtitle")},options:["any","vp9","av01","avc1"].map(e=>({name:"any"===e?mr("settings.options.videoPlayer.options.codecAny"):e.toUpperCase(),key:"preferredVideoCodec",value:e}))},window.h5vcc&&window.h5vcc.tizentube&&window.h5vcc.tizentube.SetFrameRate?{name:mr("settings.options.videoPlayer.options.afr"),icon:"SLOW_MOTION_VIDEO",value:"autoFrameRate"}:null,window.h5vcc&&window.h5vcc.tizentube&&window.h5vcc.tizentube.SetFrameRate?{name:mr("settings.options.videoPlayer.options.afrPauseDuration.title"),icon:"TIMER",value:null,menuId:"tt-auto-frame-rate-pause-duration",menuHeader:{title:mr("settings.options.videoPlayer.options.afrPauseDuration.title"),subtitle:mr("settings.options.videoPlayer.options.afrPauseDuration.subtitle")},options:[0,.5,1,1.5,2,2.5,3,3.5,4,4.5,5].map(e=>({name:mr(1===e?"settings.options.time.second":"settings.options.time.seconds",{count:e}),key:"autoFrameRatePauseVideoFor",value:1e3*e}))}:null]},{name:mr("settings.options.uiSettings.title"),icon:"SETTINGS",value:null,menuHeader:{title:mr("settings.options.uiSettings.title"),subtitle:mr("settings.options.uiSettings.subtitle")},options:[{name:mr("settings.options.uiSettings.options.hideWatchedVideos.title"),icon:"VISIBILITY_OFF",value:null,menuId:"tt-hide-watched-videos-settings",options:[{name:mr("settings.options.uiSettings.options.hideWatchedVideos.options.enableHideWatchedVideos"),icon:"VISIBILITY_OFF",value:"enableHideWatchedVideos"},{name:mr("settings.options.uiSettings.options.hideWatchedVideos.options.watchedVideosThreshold.title"),value:null,menuId:"tt-hide-watched-videos-threshold",menuHeader:{title:mr("settings.options.uiSettings.options.hideWatchedVideos.options.watchedVideosThreshold.title"),subtitle:mr("settings.options.uiSettings.options.hideWatchedVideos.options.watchedVideosThreshold.subtitle")},options:[0,10,20,30,40,50,60,70,80,90,100].map(e=>({name:`${e}%`,key:"hideWatchedVideosThreshold",value:e}))},{name:mr("settings.options.uiSettings.options.hideWatchedVideos.options.setPagesToHideWatchedVideos"),value:null,arrayToEdit:"hideWatchedVideosPages",menuId:"tt-hide-watched-videos-pages",options:[{name:mr("settings.options.uiSettings.options.categories.searchResults"),value:"search"},{name:mr("settings.options.uiSettings.options.categories.home"),value:"home"},{name:mr("settings.options.uiSettings.options.categories.music"),value:"music"},{name:mr("settings.options.uiSettings.options.categories.gaming"),value:"gaming"},{name:mr("settings.options.uiSettings.options.categories.subscriptions"),value:"subscriptions"},{name:mr("settings.options.uiSettings.options.categories.library"),value:"library"},{name:mr("settings.options.uiSettings.options.categories.more"),value:"more"}]}]},{name:mr("settings.options.uiSettings.options.screenDimming.title"),icon:"EYE_OFF",value:null,menuId:"tt-screen-dimming-settings",options:[{name:mr("settings.options.uiSettings.options.screenDimming.options.enableScreenDimming"),icon:"EYE_OFF",value:"enableScreenDimming"},{name:mr("settings.options.uiSettings.options.screenDimming.options.dimmingTimeout.title"),icon:"TIMER",value:null,menuId:"tt-dimming-timeout",menuHeader:{title:mr("settings.options.uiSettings.options.screenDimming.options.dimmingTimeout.title"),subtitle:mr("settings.options.uiSettings.options.screenDimming.options.dimmingTimeout.subtitle")},options:[10,20,30,60,120,180,240,300].map(e=>({name:e>=60?mr("settings.options.time.minute"+(e/60>1?"s":""),{count:e/60}):mr("settings.options.time.seconds",{count:e}),key:"dimmingTimeout",value:e}))},{name:mr("settings.options.uiSettings.options.screenDimming.options.dimmingOpacity.title"),icon:"LENS_BLUE",value:null,menuId:"tt-dimming-opacity",menuHeader:{title:mr("settings.options.uiSettings.options.screenDimming.options.dimmingOpacity.title"),subtitle:mr("settings.options.uiSettings.options.screenDimming.options.dimmingOpacity.subtitle")},options:[.1,.2,.3,.4,.5,.6,.7,.8,.9,1].map(e=>({name:`${Math.round(100*e)}%`,key:"dimmingOpacity",value:e}))}]},{name:mr("settings.options.uiSettings.options.disableSidebarContents.title"),icon:"MENU",value:null,action:{customAction:{action:"SHOW_GUIDE_SETTINGS",parameters:"disabledSidebarContents"}}},{name:mr("settings.options.uiSettings.options.sortSidebarContents.title"),icon:"MENU",value:null,action:{customAction:{action:"SHOW_GUIDE_SETTINGS",parameters:"sortSidebarContents"}}},{name:mr("settings.options.uiSettings.options.launchToOnStartup.title"),icon:"TV",value:null,menuId:"tt-launch-to-on-startup",menuHeader:{title:mr("settings.options.uiSettings.options.launchToOnStartup.title"),subtitle:mr("settings.options.uiSettings.options.launchToOnStartup.subtitle")},options:[{name:mr("settings.options.uiSettings.options.categories.search"),icon:"SEARCH",key:"launchToOnStartup",value:JSON.stringify({searchEndpoint:{query:""}})},{name:mr("settings.options.uiSettings.options.categories.home"),icon:"WHAT_TO_WATCH",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics"}})},{name:mr("settings.options.uiSettings.options.categories.sports"),icon:"TROPHY",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_sports"}})},{name:mr("settings.options.uiSettings.options.categories.news"),icon:"NEWS",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_news"}})},{name:mr("settings.options.uiSettings.options.categories.music"),icon:"YOUTUBE_MUSIC",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_music"}})},{name:mr("settings.options.uiSettings.options.categories.podcasts"),icon:"BROADCAST",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_podcasts"}})},{name:mr("settings.options.uiSettings.options.categories.moviesAndTv"),icon:"CLAPPERBOARD",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_movies"}})},{name:mr("settings.options.uiSettings.options.categories.gaming"),icon:"GAMING",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_gaming"}})},{name:mr("settings.options.uiSettings.options.categories.live"),icon:"LIVE",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_live"}})},{name:mr("settings.options.uiSettings.options.categories.subscriptions"),icon:"SUBSCRIPTIONS",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEsubscriptions"}})},{name:mr("settings.options.uiSettings.options.categories.library"),icon:"TAB_LIBRARY",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FElibrary"}})},{name:mr("settings.options.uiSettings.options.categories.more"),icon:"TAB_MORE",key:"launchToOnStartup",value:JSON.stringify({browseEndpoint:{browseId:"FEtopics_more"}})}]},{name:mr("settings.options.uiSettings.options.sortSubscriptionsByAlphabet"),icon:"SUBSCRIPTIONS",value:"sortSubscriptionsByAlphabet"},{name:mr("settings.options.uiSettings.options.disableChannelsOnSidebar"),value:"disableChannelsOnSidebar"},{name:mr("settings.options.uiSettings.options.clock.title"),value:null,icon:"TIMER",menuId:"tt-clock-settings",menuHeader:{title:mr("settings.options.uiSettings.options.clock.title"),subtitle:mr("settings.options.uiSettings.options.clock.subtitle")},options:[{name:mr("settings.options.uiSettings.options.clock.options.enableClock"),icon:"TIMER",value:"enableClock"},{name:mr("settings.options.uiSettings.options.clock.options.isClock12HourFormat"),icon:"TIMER",value:"isClock12HourFormat"},{name:mr("settings.options.uiSettings.options.clock.options.clockShowSeconds"),icon:"TIMER",value:"clockShowSeconds"},{name:mr("settings.options.uiSettings.options.clock.options.clockHideWhenVideoPlaying"),icon:"EYE_OFF",value:"clockHideWhenVideoPlaying"}]},{name:mr("settings.options.uiSettings.options.disableEnlargingThumbnails"),value:"disableEnlargingThumbnails",icon:null},{name:mr("settings.options.uiSettings.options.enableShrinkingThumbnails"),value:"enableShrinkingThumbnails",icon:null}]},window.h5vcc&&window.h5vcc.tizentube?{name:mr("settings.options.updater.title"),icon:"SYSTEM_UPDATE",value:null,menuHeader:{title:mr("settings.options.updater.title"),subtitle:mr("settings.options.updater.menuSubtitle")},subtitle:mr("settings.options.updater.versionSubtitle",{version:window.h5vcc.tizentube.GetVersion()}),options:[zr({title:mr("settings.options.updater.options.checkForUpdates")},{icon:"SYSTEM_UPDATE"},[{customAction:{action:"CHECK_FOR_UPDATES"}}]),{name:mr("settings.options.updater.options.checkForUpdatesOnStartup"),icon:"SYSTEM_UPDATE",value:"enableUpdater"}]}:null];o<a.length;o++){var s,l=a[o];if(l){var u=l.value?Er(l.value):null;i.push(zr({title:l.name,subtitle:l.subtitle},{icon:l.icon?l.icon:"CHEVRON_DOWN",secondaryIcon:null===u?"CHEVRON_RIGHT":u?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK"},null!==u?[{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:l.value},boolValue:!Er(l.value)}]}},{customAction:{action:"SETTINGS_UPDATE",parameters:[r]}}]:[{customAction:{action:"OPTIONS_SHOW",parameters:{options:l.options,selectedIndex:0,update:!(null===(s=l.options)||void 0===s||!s.title)&&"customUI",menuId:l.menuId,arrayToEdit:l.arrayToEdit,menuHeader:l.menuHeader,action:l.action}}}])),r++}}_r({title:mr("settings.ttSettings.title"),subtitle:mr("settings.ttSettings.madeByText")},Ur(i,t&&t.length>0?t[0]:0),"tt-settings",e)}function no(e,t){if("customUI"!==t){var n=[],i=void 0!==e.arrayToEdit;if(e.action)return co(e.action);if(i){var r,o=Er(e.arrayToEdit),a=f(e.options);try{for(a.s();!(r=a.n()).done;){var s=r.value;n.push(zr({title:s.name,subtitle:s.subtitle},{icon:s.icon?s.icon:"CHEVRON_DOWN",secondaryIcon:o.includes(s.value)?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK"},[{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:e.arrayToEdit},arrayValue:s.value}]}},{customAction:{action:"OPTIONS_SHOW",parameters:{options:e.options,selectedIndex:e.options.indexOf(s),update:!0,menuId:e.menuId,arrayToEdit:e.arrayToEdit,menuHeader:e.menuHeader,action:e.action}}}]))}}catch(e){a.e(e)}finally{a.f()}}else{var l,u=0,c=f(e.options);try{for(c.s();!(l=c.n()).done;){var h,d,p,m=l.value;if(m)if(m.compactLinkRenderer)n.push(m),u++;else{var g=null!==m.key&&void 0!==m.key,v=null===m.value?void 0:Er(g?m.key:m.value);n.push(zr({title:m.name,subtitle:m.subtitle},{icon:m.icon?m.icon:"CHEVRON_DOWN",secondaryIcon:g?v===m.value?"RADIO_BUTTON_CHECKED":"RADIO_BUTTON_UNCHECKED":null===m.value?"CHEVRON_RIGHT":v?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK"},null===m.value?[{customAction:{action:"OPTIONS_SHOW",parameters:{options:m.options,selectedIndex:0,update:!(null===(h=m.options)||void 0===h||!h.title)&&"customUI",menuId:m.menuId,arrayToEdit:m.arrayToEdit,menuHeader:m.menuHeader,action:m.action}}}]:null!==m.key&&void 0!==m.key?[{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:m.key},stringValue:m.value}]}},{customAction:{action:"OPTIONS_SHOW",parameters:{options:e.options,selectedIndex:u,update:null===(d=e.options)||void 0===d||!d.title||"customUI",menuId:e.menuId,arrayToEdit:e.arrayToEdit,menuHeader:e.menuHeader,action:e.action}}}]:[{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:m.value},boolValue:!v}]}},{customAction:{action:"OPTIONS_SHOW",parameters:{options:e.options,selectedIndex:u,update:null===(p=e.options)||void 0===p||!p.title||"customUI",menuId:e.menuId,arrayToEdit:e.arrayToEdit,menuHeader:e.menuHeader,action:e.action}}}])),u++}}}catch(e){c.e(e)}finally{c.f()}}_r(e.menuHeader?e.menuHeader:mr("settings.ttSettings.title"),Ur(n,e.selectedIndex),e.menuId||"tt-settings-options",t)}else{var y=e.options;_r({title:y.title,subtitle:y.subtitle},y.content,"tt-settings-support",!1)}}var io=setInterval(()=>{document.querySelector("video")&&(!function(){document.querySelector("video").addEventListener("canplay",()=>{document.getElementsByTagName("video")[0].playbackRate=Er("videoSpeed")});var e=e=>{if(406==e.keyCode||191==e.keyCode)return e.preventDefault(),e.stopPropagation(),"keydown"!==e.type||(ro(),!1)};document.addEventListener("keydown",e,!0),document.addEventListener("keypress",e,!0),document.addEventListener("keyup",e,!0)}(),clearInterval(io))},1e3);function ro(){for(var e=Er("videoSpeed"),t=0,n=Er("speedSettingsIncrement")||.25,i=[],r=n;r<=5;r+=n){var o=Math.round(100*r)/100;i.push(zr({title:`${o}x`},null,[{signalAction:{signal:"POPUP_BACK"}},{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:"videoSpeed"},intValue:o.toString()}]}},{customAction:{action:"SET_PLAYER_SPEED",parameters:o.toString()}}])),e===o&&(t=i.length-1)}i.push(zr({title:mr("player.playbackSpeed.fixStuttering")},null,[{signalAction:{signal:"POPUP_BACK"}},{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:"videoSpeed"},intValue:"1.0001"}]}},{customAction:{action:"SET_PLAYER_SPEED",parameters:"1.0001"}}])),_r(mr("player.playbackSpeed.title"),Ur(i,t),"tt-speed")}function oo(e){var t=window.h5vcc.tizentube.GetVersion(),n=Math.floor(Date.now()/1e3);fetch("https://api.github.com/repos/reisxd/TizenTubeCobalt/releases/latest").then(e=>{if(!e.ok)throw new Error("Network response was not ok");return e.json()}).then(i=>{var r,o,a=i.tag_name.replace("v",""),s=new Date(i.published_at).getTime()/1e3;if(window.h5vcc.tizentube.GetArchitecture&&(r=window.h5vcc.tizentube.GetArchitecture()),o=r?"arm64-v8a"===r?i.assets.find(e=>e.name.includes("arm64.apk")).browser_download_url:i.assets.find(e=>e.name.includes("arm.apk")).browser_download_url:i.assets[0].browser_download_url,a!==t){console.info(`New version available: ${a} (current: ${t})`);var l=`${mr("settings.options.updater.releaseDate",{date:new Date(1e3*s).toLocaleString()})}\n${i.body}`.replace(/#/g,"").replace(/\*/g,"").trim(),u=[zr({title:mr("settings.options.updater.updateNow.title"),subtitle:mr("settings.options.updater.updateNow.subtitle")},{icon:"DOWN_ARROW"},[{customAction:{action:"UPDATE_DOWNLOAD",parameters:o}},{signalAction:{signal:"POPUP_BACK"}}]),zr({title:mr("settings.options.updater.remindLater.title"),subtitle:mr("settings.options.updater.remindLater.subtitle")},{icon:"SEARCH_HISTORY"},[{customAction:{action:"UPDATE_REMIND_LATER",parameters:n+86400}},{signalAction:{signal:"POPUP_BACK"}}])];u.push(Jr(" ")),u.push(Jr(l)),_r({title:mr("settings.options.updater.updateAvailable.title"),subtitle:mr("settings.options.updater.updateAvailable.subtitle",{latestVersion:a,currentVersion:t})},Ur(u),"tt-update-modal",!1)}else console.info("You are using the latest version of TizenTube."),e&&Mr(mr("settings.options.updater.upToDate.title"),mr("settings.options.updater.upToDate.subtitle",{version:t}),null)}).catch(e=>{console.error("Error fetching the latest release:",e),Mr(mr("settings.options.updater.checkFailed.title"),mr("settings.options.updater.checkFailed.subtitle"),null)})}function ao(e){if(!e||"object"!==D(e))return null;if("string"==typeof e.feedbackToken)return e.feedbackToken;for(var t=0,n=Object.values(e);t<n.length;t++){var i=ao(n[t]);if(i)return i}return null}function so(e,t){var n=Object.values(window._yttv).find(e=>e&&e.mappings).get("KabukiInnerTubeClient"),i={path:"/youtubei/v1/get_panel",payload:{panelId:e,params:t}};return new Promise((e,t)=>{n.fetch(i).subscribe(t=>{var n,i=null==t||null===(n=t.content)||void 0===n||null===(n=n.engagementPanelSectionListRenderer)||void 0===n||null===(n=n.content)||void 0===n||null===(n=n.listViewModel)||void 0===n?void 0:n.listItems;Array.isArray(i)?e(i.map(e=>ao(null==e?void 0:e.listItemViewModel)).filter(Boolean)):e([])},t)})}function lo(e){var t=Object.values(window._yttv).find(e=>e&&e.mappings).get("KabukiInnerTubeClient"),n={path:"/youtubei/v1/feedback",payload:{feedbackTokens:[e]}};return new Promise((e,i)=>{t.fetch(n).subscribe(t=>{e(t)},i)})}function uo(e,t){if("MOVE_GUIDE_BUTTON"===e){var n,i,r=Er("sidebarContentsOrder"),o=(null===(n=t.item.guideEntryRenderer.navigationEndpoint)||void 0===n||null===(n=n.browseEndpoint)||void 0===n?void 0:n.browseId)||(null===(i=t.item.guideEntryRenderer.navigationEndpoint)||void 0===i?void 0:i.searchEndpoint)&&"search",a=r.findIndex(e=>"object"===D(e)&&null!==e?e.browseId===o:e===o);if(-1===a)return uo("",!0);if("up"===t.direction&&a>0){var s=r[a-1];r[a-1]=r[a],r[a]=s}else if("down"===t.direction&&a<r.length-1){var l=r[a+1];r[a+1]=r[a],r[a]=l}return wr("sidebarContentsOrder",r),uo("",!0)}if("SHOW_GUIDE_BUTTONS"===e){var u=t.item.guideEntryRenderer.formattedTitle.simpleText,c=[];return c.push(zr({title:mr("settings.options.uiSettings.options.sortSidebarContents.moveUp.title"),subtitle:mr("settings.options.uiSettings.options.sortSidebarContents.moveUp.subtitle")},{icon:"UP_ARROW"},[{customAction:{action:"MOVE_GUIDE_BUTTON",parameters:{settingType:e,direction:"up",item:t.item}}},{signalAction:{signal:"POPUP_BACK"}}])),c.push(zr({title:mr("settings.options.uiSettings.options.sortSidebarContents.moveDown.title"),subtitle:mr("settings.options.uiSettings.options.sortSidebarContents.moveDown.subtitle")},{icon:"DOWN_ARROW"},[{customAction:{action:"MOVE_GUIDE_BUTTON",parameters:{settingType:e,direction:"down",item:t.item}}},{signalAction:{signal:"POPUP_BACK"}}])),_r(u,Ur(c),"tt-move-guide-button-modal")}var h,d;(h=Object.values(window._yttv).find(e=>e&&e.mappings).get("KabukiInnerTubeClient"),d={path:"/youtubei/v1/guide"},new Promise((e,t)=>{h.fetch(d).subscribe(t=>{e(t)})})).then(n=>{var i,r=[],o=0,a=f(n.items[0].guideSectionRenderer.originalItems||n.items[0].guideSectionRenderer.items);try{for(a.s();!(i=a.n()).done;){var s,l,u,c=i.value,h=c.guideEntryRenderer.formattedTitle.simpleText,d=null===(s=c.guideEntryRenderer.icon)||void 0===s?void 0:s.iconType,p=null!==(l=c.guideEntryRenderer.navigationEndpoint)&&void 0!==l&&l.browseEndpoint?c.guideEntryRenderer.navigationEndpoint.browseEndpoint.browseId:"search";r.push(zr({title:h},{icon:d,secondaryIcon:"disabledSidebarContents"===e?null!==(u=Er(e))&&void 0!==u&&u.includes(p)?"CHECK_BOX":"CHECK_BOX_OUTLINE_BLANK":null},["disabledSidebarContents"===e?{setClientSettingEndpoint:{settingDatas:[{clientSettingEnum:{item:"disabledSidebarContents"},arrayValue:p}]}}:{customAction:{action:"SHOW_GUIDE_BUTTONS",parameters:{settingType:e,idx:o,item:c}}},..."disabledSidebarContents"===e?[{customAction:{action:"RELOAD_GUIDE_OPTIONS",parameters:{settingType:e,idx:o,item:c}}}]:[]])),o++}}catch(e){a.e(e)}finally{a.f()}_r({title:mr("disabledSidebarContents"===e?"settings.options.uiSettings.options.disableSidebarContents.title":"settings.options.uiSettings.options.sortSidebarContents.title"),subtitle:mr("disabledSidebarContents"===e?"settings.options.uiSettings.options.disableSidebarContents.subtitle":"settings.options.uiSettings.options.sortSidebarContents.subtitle")},Ur(r),"tt-sidebar-settings",!0===t)})}function co(e,t){for(var n in window._yttv)if(window._yttv[n]&&window._yttv[n].instance&&window._yttv[n].instance.resolveCommand)return window._yttv[n].instance.resolveCommand(e,t)}function ho(){var e=function(e){if(window._yttv[e]&&window._yttv[e].instance&&window._yttv[e].instance.resolveCommand){var t=window._yttv[e].instance.resolveCommand;window._yttv[e].instance.resolveCommand=function(n,i){var r,o,a,s,l,u;if(n.setClientSettingEndpoint){var c,h=f(n.setClientSettingEndpoint.settingDatas);try{for(h.s();!(c=h.n()).done;){var d=c.value;if(d.clientSettingEnum.item.includes("_")){if("I18N_LANGUAGE"===d.clientSettingEnum.item){var p=d.stringValue,m=new Date;return m.setFullYear(m.getFullYear()+10),document.cookie=`PREF=hl=${p}; expires=${m.toUTCString()};`,co({signalAction:{signal:"RELOAD_PAGE"}}),!0}}else{var g,v=f(n.setClientSettingEndpoint.settingDatas);try{for(v.s();!(g=v.n()).done;){var y=g.value,b=Object.keys(y).find(e=>e.includes("Value")),S="intValue"===b?Number(y[b]):y[b];if("arrayValue"===b){var x=Er(y.clientSettingEnum.item);x.includes(S)?x.splice(x.indexOf(S),1):x.push(S),wr(y.clientSettingEnum.item,x)}else wr(y.clientSettingEnum.item,S)}}catch(e){v.e(e)}finally{v.f()}}}}catch(e){h.e(e)}finally{h.f()}}else{if(n.customAction)return po(n.customAction.action,n.customAction.parameters),!0;if(null!=n&&null!==(r=n.signalAction)&&void 0!==r&&r.customAction)return po(n.signalAction.customAction.action,n.signalAction.customAction.parameters),!0;if(null!=n&&null!==(o=n.showEngagementPanelEndpoint)&&void 0!==o&&o.customAction)return po(n.showEngagementPanelEndpoint.customAction.action,n.showEngagementPanelEndpoint.customAction.parameters),!0;if(null!=n&&null!==(a=n.playlistEditEndpoint)&&void 0!==a&&a.customAction)return po(n.playlistEditEndpoint.customAction.action,n.playlistEditEndpoint.customAction.parameters),!0;if("playback-settings"===(null==n||null===(s=n.openPopupAction)||void 0===s?void 0:s.uniqueId)){var E,w=f(n.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items);try{for(w.s();!(E=w.n()).done;){var D,C=E.value;"SLOW_MOTION_VIDEO"===(null==C||null===(D=C.compactLinkRenderer)||void 0===D||null===(D=D.icon)||void 0===D?void 0:D.iconType)&&(C.compactLinkRenderer.subtitle&&(C.compactLinkRenderer.subtitle.simpleText=mr("player.withTizenTube")),C.compactLinkRenderer.serviceEndpoint={clickTrackingParams:"null",signalAction:{customAction:{action:"TT_SPEED_SETTINGS_SHOW",parameters:[]}}})}}catch(e){w.e(e)}finally{w.f()}n.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items.splice(2,0,zr({title:mr("player.miniPlayer")},{icon:"CLEAR_COOKIES"},[{customAction:{action:"ENTER_MP"}}])),n.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items.splice(3,0,zr({title:mr("player.share.button")},{icon:"OPEN_IN_NEW"},[{customAction:{action:"SHARE"}}])),n.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items.splice(3,0,zr({title:mr("player.screenOff")},{icon:"EYE_OFF"},[{customAction:{action:"SCREEN_OFF"}}])),window.h5vcc&&window.h5vcc.tizentube&&window.h5vcc.tizentube.HasSystemFeature&&window.h5vcc.tizentube.HasSystemFeature("android.software.picture_in_picture")&&n.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items.splice(3,0,zr({title:mr("player.pictureInPicture")},{icon:"TV"},[{customAction:{action:"ENTER_PIP"}},{signalAction:{signal:"POPUP_BACK"}}]));try{n.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items.splice(1,0,...function(e){var t="en"===Er("s95bLanguage")?"en":"de",n=e=>Fr(t,e),i=(t,n)=>e({title:t.name,subtitle:n},{icon:t.icon},[{customAction:{action:"OPTIONS_SHOW",parameters:{options:t.options,selectedIndex:Math.max(0,t.options.findIndex(e=>e.value===Er(e.key))),update:!1,menuId:t.menuId,menuHeader:t.menuHeader}}}]);return[i(Rr(n),Ir(n,Nr())),i(Lr(n),Or(n,Er("preferredVideoQuality")))]}(zr))}catch(e){console.warn("[S95B] playback settings entries skipped:",e)}}else if(null!=n&&null!==(l=n.watchEndpoint)&&void 0!==l&&l.videoId){window.isPipPlaying=!1,document.querySelector("ytlr-player-container").style.removeProperty("z-index")}}if(n.customAction)return window._yttv[e].instance.resolveCommand(n,i);if(n.commandExecutorCommand&&n.commandExecutorCommand.commands){var k,A=f(n.commandExecutorCommand.commands);try{for(A.s();!(k=A.n()).done;){var T,F,P,B=k.value;B.customAction?po(B.customAction.action,B.customAction.parameters):null!==(T=B.signalAction)&&void 0!==T&&T.customAction?po(B.signalAction.customAction.action,B.signalAction.customAction.parameters):null!==(F=B.showEngagementPanelEndpoint)&&void 0!==F&&F.customAction?po(B.showEngagementPanelEndpoint.customAction.action,B.showEngagementPanelEndpoint.customAction.parameters):null!==(P=B.playlistEditEndpoint)&&void 0!==P&&P.customAction?po(B.playlistEditEndpoint.customAction.action,B.playlistEditEndpoint.customAction.parameters):window._yttv[e].instance.resolveCommand(B,i)}}catch(e){A.e(e)}finally{A.f()}return!0}return null!=n&&n.requestAccountSelectorCommand&&"ACCOUNT_EVENT_TRIGGER_ON_EXIT"===(null===(u=n.requestAccountSelectorCommand)||void 0===u||null===(u=u.identityActionContext)||void 0===u?void 0:u.eventTrigger)&&!Er("enableWhosWatchingMenuOnAppExit")?(t.call(this,{signalAction:{signal:"EXIT_APP"}}),!1):t.call(this,n,i)}}};for(var t in window._yttv)e(t)}function po(e,t){switch(e){case"SETTINGS_UPDATE":to(!0,t);break;case"OPTIONS_SHOW":no(t,t.update);break;case"SKIP":var n=document.createEvent("Event");n.initEvent("keydown",!0,!0),n.keyCode=27,n.which=27,document.dispatchEvent(n),document.querySelector("video").currentTime=t.time;break;case"TT_SETTINGS_SHOW":to();break;case"TT_SPEED_SETTINGS_SHOW":ro();break;case"UPDATE_REMIND_LATER":wr("dontCheckUpdateUntil",t);break;case"UPDATE_DOWNLOAD":window.h5vcc.tizentube.InstallAppFromURL(t),Mr(mr("settings.options.updater.downloading.title"),mr("settings.options.updater.downloading.subtitle"));break;case"SET_PLAYER_SPEED":var i=Number(t);document.querySelector("video").playbackRate=i;break;case"ENTER_MP":!function(){if(Cr){var e=Math.floor(document.querySelector("video").currentTime),t=document.querySelector("video"),n=document.querySelector("ytlr-player"),i=document.querySelector("ytlr-player-container"),r=new MutationObserver(o=>{o.forEach(o=>{if("class"===o.attributeName&&!n.classList.contains("ytLrPlayerEnabled")){function a(){i.style.zIndex="10",n.style.display="block",n.style.backgroundColor="rgba(0,0,0,0)"}function s(){t.style.removeProperty("inset");var e=window.innerWidth/3.5,n=window.innerHeight/3.5;t.style.width=`${e}px`,t.style.height=`${n}px`,t.style.top="68vh",t.style.left="68vw",window.isPipPlaying=!0,t.removeEventListener("play",s)}a(),setTimeout(a,500),t.addEventListener("play",s),r.disconnect(),setTimeout(()=>{Cr.loadedPlaybackConfig.watchEndpoint.startTimeSeconds=e,Cr.loadVideo(Cr.loadedPlaybackConfig)},1e3)}})});r.observe(n,{attributes:!0}),co({signalAction:{signal:"HISTORY_BACK"}})}}();break;case"ENTER_PIP":window.h5vcc.tizentube.EnterPIP();break;case"SHOW_TOAST":Mr("TizenTube",t);break;case"ADD_TO_QUEUE":window.queuedVideos.videos.push(t),Mr("TizenTube",mr("toasts.videoAddedToQueue"));break;case"CLEAR_QUEUE":window.queuedVideos.videos=[],Mr("TizenTube",mr("toasts.videoQueueCleared"));break;case"CHECK_FOR_UPDATES":oo(!0);break;case"GO_TO_CHANNEL":!function(e){var t=Object.values(window._yttv).find(e=>e&&e.mappings),n=t.get("CurrentIdentityService"),i=t.get("KabukiInnerTubeClient"),r=e.tileRenderer?e.tileRenderer.contentId:e.lockupViewModel.contentId,o=e.tileRenderer?e.tileRenderer.onSelectCommand.watchEndpoint.params:e.lockupViewModel.rendererContext.commandContext.onTap.innertubeCommand.watchEndpoint.params,a=Math.floor(2e3*Math.random());n.get().then(e=>{var t={identity:e,isPrefetch:!1,path:"/youtubei/v1/next",payload:{videoId:r,params:o,racyCheckOk:!0,contentCheckOk:!0,playbackContext:{lactMilliseconds:a,isLyricsMode:!1},autonavState:"STATE_NONE",mdxContext:{mdxReceiverContext:{mdxConnectedDevices:[]}}},clickTracking:{clickTrackingParams:null}};i.fetch(t).subscribe(e=>{var t,n=null==e||null===(t=e.contents)||void 0===t||null===(t=t.singleColumnWatchNextResults)||void 0===t||null===(t=t.results)||void 0===t||null===(t=t.results)||void 0===t?void 0:t.contents;if(n){var i,r=n.find(e=>e.itemSectionRenderer),o=null==r||null===(i=r.itemSectionRenderer)||void 0===i||null===(i=i.contents)||void 0===i?void 0:i.find(e=>e.videoMetadataRenderer);if(o){var a,s=null===(a=o.videoMetadataRenderer)||void 0===a||null===(a=a.owner)||void 0===a||null===(a=a.videoOwnerRenderer)||void 0===a?void 0:a.navigationEndpoint;s&&co(s)}}})})}(t);break;case"NOT_INTERESTED":mo(t,0,!0);break;case"DONT_RECOMMEND_CHANNEL":mo(t,1,!1);break;case"FEEDBACK_REASON":lo(t.token).then(()=>{co({signalAction:{signal:"POPUP_BACK"}}),Mr("TizenTube",mr("toasts.feedbackSent"))}).catch(e=>console.error("TizenTube: failed to send feedback:",e));break;case"SHARE":var r=`https://www.youtube.com/watch?v=${document.querySelector(".html5-video-player").getVideoData().video_id}`,o=Zr.qrcode(6,"H");o.addData(r),o.make();var a=o.createImgTag(8,8).match(/src="([^"]+)"/)[1];_r({title:mr("player.share.title")},Ur([Jr(mr("player.share.qrCodeScanMessage")),Gr(a)]),"tt-share-modal");break;case"SHOW_GUIDE_BUTTONS":uo("SHOW_GUIDE_BUTTONS",t);break;case"RELOAD_GUIDE_OPTIONS":uo(t.settingType,!0);break;case"MOVE_GUIDE_BUTTON":uo("MOVE_GUIDE_BUTTON",t);break;case"SHOW_GUIDE_SETTINGS":uo(t);break;case"ADD_OR_REMOVE_CHANNEL_TO_SIDEBAR":var s=Er("sidebarContentsOrder");s.find(e=>e.browseId===t.browseId)?s.splice(s.findIndex(e=>e.browseId===t.browseId),1):s.push({browseId:t.browseId,title:t.title}),wr("sidebarContentsOrder",s),Mr(mr("toasts.sidebarContentsUpdated.title"),mr("toasts.sidebarContentsUpdated.subtitle"));break;case"SCREEN_OFF":var l,u=f(document.body.children);try{for(u.s();!(l=u.n()).done;){var c=l.value;"script"!==c.tagName.toLowerCase()&&"svg"!==c.tagName.toLowerCase()&&c.style.setProperty("display","none","important")}}catch(e){u.e(e)}finally{u.f()}window.screenTurnedOffAt=Date.now()}}function mo(e,t,n){return fo.apply(this,arguments)}function fo(){return(fo=c(S().m(function e(t,n,i){var r,o,a,s,l,u,c,h;return S().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,so(t.panelId,t.params);case 1:if(o=e.v,a=o[n]){e.n=2;break}return e.a(2);case 2:return e.n=3,lo(a);case 3:if(s=e.v,i){e.n=4;break}return e.a(2);case 4:if(l=null==s||null===(r=s.feedbackResponses)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.followUpDialog)||void 0===r?void 0:r.dismissalFollowUpRenderer,u=null==l?void 0:l.reasons,Array.isArray(u)&&u.length){e.n=5;break}return e.a(2);case 5:c=u.map(e=>zr({title:go(e.title)},null,[{signalAction:{signal:"POPUP_BACK"}},{customAction:{action:"FEEDBACK_REASON",parameters:{token:e.token}}}])),_r(go(l.dismissalReasonsPrompt),Ur(c),"tt-feedback-reasons"),e.n=7;break;case 6:e.p=6,h=e.v,console.error("TizenTube: failed to mark feedback:",h);case 7:return e.a(2)}},e,null,[[0,6]])}))).apply(this,arguments)}function go(e){return e?e.simpleText?e.simpleText:e.content?e.content:Array.isArray(e.runs)?e.runs.map(e=>{var t;return null!==(t=null==e?void 0:e.text)&&void 0!==t?t:""}).join(""):String(e):""}setTimeout(()=>{if(window.h5vcc&&window.h5vcc.tizentube&&Er("enableUpdater")){var e=Math.floor(Date.now()/1e3);Er("dontCheckUpdateUntil")>e?console.info("Skipping update check until",new Date(1e3*Er("dontCheckUpdateUntil")).toLocaleString()):oo()}},2500);var vo=JSON.parse;JSON.parse=function(){var e=vo.apply(this,arguments);try{var t,n,i,r,o,a,s,l,u,c,h,d,p,m,g,v=Er("enableAdBlock"),y=Er("enableSigninReminder");if(null!=e&&null!==(t=e.playbackContext)&&void 0!==t&&t.contentPlaybackContext,e.adPlacements&&v&&(e.adPlacements=[]),e.playerAds&&v&&(e.playerAds=!1),e.adSlots&&v&&(e.adSlots=[]),e.paidContentOverlay&&!Er("enablePaidPromotionOverlay")&&(e.paidContentOverlay=null),function(e,t){if(!e||!e.streamingData||!Array.isArray(e.streamingData.adaptiveFormats))return{changed:!1,reason:"no-formats"};if("vp9"!==t&&"av01"!==t&&"avc1"!==t)return{changed:!1,reason:"automatic"};var n=e.streamingData.adaptiveFormats,i=n.filter(e=>e&&"string"==typeof e.mimeType&&/^video\//i.test(e.mimeType)),r=e=>{var n=e.mimeType.toLowerCase();return"vp9"===t?/(?:vp9|vp09)/.test(n):"av01"===t?/av01/.test(n):/avc1/.test(n)},o=i.filter(r);if(!o.length)return{changed:!1,reason:"codec-unavailable"};if(o.length===i.length)return{changed:!1,reason:"already-selected"};var a=e=>Number.isFinite(e.height)&&e.height>0&&Number.isFinite(e.fps)&&e.fps>0;if(!i.every(a)||!o.every(a))return{changed:!1,reason:"quality-unknown"};var s=Math.max(...i.map(e=>e.height)),l=Math.max(...i.filter(e=>e.height===s).map(e=>e.fps));if(!o.some(e=>e.height>=s&&e.fps>=l))return{changed:!1,reason:"quality-fallback"};var u=n.filter(e=>!e||"string"!=typeof e.mimeType||!/^video\//i.test(e.mimeType)||r(e));u.some(e=>e&&/^audio\//i.test(e.mimeType||""))&&(e.streamingData.adaptiveFormats=u)}(e,Er("preferredVideoCodec")),null!=e&&null!==(n=e.contents)&&void 0!==n&&null!==(n=n.tvBrowseRenderer)&&void 0!==n&&null!==(n=n.content)&&void 0!==n&&null!==(n=n.tvSurfaceContentRenderer)&&void 0!==n&&null!==(n=n.content)&&void 0!==n&&null!==(n=n.sectionListRenderer)&&void 0!==n&&n.contents){if(y||(e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents=e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents.filter(e=>!e.feedNudgeRenderer)),v){e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents=e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents.filter(e=>!e.adSlotRenderer);var b,S=f(e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents);try{for(S.s();!(b=S.n()).done;){var x,E=b.value;E.shelfRenderer&&null!==(x=E.shelfRenderer.content)&&void 0!==x&&null!==(x=x.horizontalListRenderer)&&void 0!==x&&x.items&&(E.shelfRenderer.content.horizontalListRenderer.items=E.shelfRenderer.content.horizontalListRenderer.items.filter(e=>!e.adSlotRenderer))}}catch(e){S.e(e)}finally{S.f()}}So(e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents)}if(null!=e&&null!==(i=e.contents)&&void 0!==i&&null!==(i=i.tvBrowseRenderer)&&void 0!==i&&null!==(i=i.content)&&void 0!==i&&null!==(i=i.tvSurfaceContentRenderer)&&void 0!==i&&null!==(i=i.content)&&void 0!==i&&null!==(i=i.gridRenderer)&&void 0!==i&&i.items&&Do(e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.content.gridRenderer.items),e.endscreen&&Er("enableHideEndScreenCards")&&(e.endscreen=null),e.messages&&Array.isArray(e.messages)&&!Er("enableYouThereRenderer")&&(e.messages=e.messages.filter(e=>!(null!=e&&e.youThereRenderer))),!Array.isArray(e)&&null!=e&&e.entries&&v)e.entries=null===(m=e.entries)||void 0===m?void 0:m.filter(e=>{var t;return!(null!=e&&null!==(t=e.command)&&void 0!==t&&null!==(t=t.reelWatchEndpoint)&&void 0!==t&&null!==(t=t.adClientParams)&&void 0!==t&&t.isAd)});if(null!=e&&null!==(r=e.title)&&void 0!==r&&r.runs&&function(e){var t,n,i,r,o=function(e,t,n){var i={settingCategoryCollectionRenderer:{items:t,categoryId:e,focused:!1,trackingParams:"null"}};return n&&(i.settingCategoryCollectionRenderer.title={runs:[{text:n}]}),i}("tizentube_category",[(t=mr("settings.ttSettings.title"),n="tizentube_open_action",i={customAction:{action:"TT_SETTINGS_SHOW",parameters:[]}},r=mr("settings.ttSettings.summary"),{settingActionRenderer:{title:{runs:[{text:t}]},serviceEndpoint:i,summary:{runs:[{text:r}]},trackingParams:"null",actionLabel:{runs:[{text:t}]},itemId:n,thumbnail:{thumbnails:[{url:"https://www.gstatic.com/ytlr/img/parent_code.png"}]}}})]);e.items.unshift(o)}(e),null!=e&&null!==(o=e.contents)&&void 0!==o&&null!==(o=o.sectionListRenderer)&&void 0!==o&&o.contents&&So(e.contents.sectionListRenderer.contents),null!=e&&null!==(a=e.continuationContents)&&void 0!==a&&null!==(a=a.sectionListContinuation)&&void 0!==a&&a.contents&&So(e.continuationContents.sectionListContinuation.contents),null!=e&&null!==(s=e.continuationContents)&&void 0!==s&&null!==(s=s.horizontalListContinuation)&&void 0!==s&&s.items&&(Eo(e.continuationContents.horizontalListContinuation.items),wo(e.continuationContents.horizontalListContinuation.items),Do(e.continuationContents.horizontalListContinuation.items),e.continuationContents.horizontalListContinuation.items=ko(e.continuationContents.horizontalListContinuation.items)),null!=e&&null!==(l=e.continuationContents)&&void 0!==l&&null!==(l=l.gridContinuation)&&void 0!==l&&l.items&&Do(e.continuationContents.gridContinuation.items),null!=e&&null!==(u=e.contents)&&void 0!==u&&null!==(u=u.tvBrowseRenderer)&&void 0!==u&&null!==(u=u.content)&&void 0!==u&&null!==(u=u.tvSecondaryNavRenderer)&&void 0!==u&&u.sections)for(var w=0;w<e.contents.tvBrowseRenderer.content.tvSecondaryNavRenderer.sections.length;w++){var C=e.contents.tvBrowseRenderer.content.tvSecondaryNavRenderer.sections[w].tvSecondaryNavSectionRenderer;if(C&&C.tabs){Er("sortSubscriptionsByAlphabet")&&C.tabs.sort((e,t)=>e.tabRenderer.selected&&!t.tabRenderer.selected?-1:!e.tabRenderer.selected&&t.tabRenderer.selected?1:e.tabRenderer.title.localeCompare(t.tabRenderer.title));for(var k=0;k<C.tabs.length;k++){var A,T,F,P=C.tabs[k],B=null===(A=P.tabRenderer.content)||void 0===A||null===(A=A.tvSurfaceContentRenderer)||void 0===A?void 0:A.content;if(null!=B&&null!==(T=B.sectionListRenderer)&&void 0!==T&&T.contents){var I=C.tabs.indexOf(P),O=B.sectionListRenderer.contents;So(O),C.tabs[I].tabRenderer.content.tvSurfaceContentRenderer.content.sectionListRenderer.contents=O}null!=B&&null!==(F=B.gridRenderer)&&void 0!==F&&F.items&&Do(B.gridRenderer.items)}}}if(null!=e&&null!==(c=e.contents)&&void 0!==c&&null!==(c=c.singleColumnWatchNextResults)&&void 0!==c&&null!==(c=c.pivot)&&void 0!==c&&c.sectionListRenderer&&(Er("hideRelatedVideosPlayer")&&(e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents=[{}],e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.continuations=[]),y||(e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents=e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents.filter(e=>!e.alertWithActionsRenderer)),So(e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents,!1),window.queuedVideos.videos.length>0)){var N=window.queuedVideos.videos.slice();N.unshift({tileRenderer:{contentType:"TILE_CONTENT_TYPE_VIDEO",metadata:{tileMetadataRenderer:{title:{simpleText:"Clear Queue"}}},onSelectCommand:{customAction:{action:"CLEAR_QUEUE"}},style:"TILE_STYLE_YTLR_DEFAULT"}}),e.contents.singleColumnWatchNextResults.pivot.sectionListRenderer.contents.unshift(function(e,t){return{shelfRenderer:{shelfHeaderRenderer:{title:{simpleText:e}},tvhtml5ShelfRendererType:"TVHTML5_SHELF_RENDERER_TYPE_GRID",content:{horizontalListRenderer:{items:t,selectedIndex:arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,visibleItemCount:3}}}}}("Queued Videos",N,-1!==N.findIndex(e=>e.contentId===window.queuedVideos.lastVideoId)?N.findIndex(e=>e.contentId===window.queuedVideos.lastVideoId):0))}if(null!=e&&null!==(h=e.playerOverlays)&&void 0!==h&&h.playerOverlayRenderer&&(e.playerOverlays.playerOverlayRenderer.timelyActionRenderers?e.playerOverlays.playerOverlayRenderer.timelyActionRenderers=e.playerOverlays.playerOverlayRenderer.timelyActionRenderers.filter(e=>"TIMELY_ACTION_TYPE_SHOPPING"!==e.timelyActionRenderer.type&&"TIMELY_ACTION_TYPE_NFL_WATERMARK"!==e.timelyActionRenderer.type):e.playerOverlays.playerOverlayRenderer.timelyActionRenderers=[],Er("sponsorBlockManualSkips").length>0)){var R,L=Er("sponsorBlockManualSkips");if(null!==(R=window)&&void 0!==R&&null!==(R=R.sponsorblock)&&void 0!==R&&R.segments){var M,_=f(window.sponsorblock.segments);try{for(_.s();!(M=_.n()).done;){var U=M.value;if(L.includes(U.category)){var z=Vr(mr("sponsorblock.toasts.skip",{segment:mr(`sponsorblock.segments.${U.category}`)}),"SKIP_NEXT",{clickTrackingParams:null,showEngagementPanelEndpoint:{customAction:{action:"SKIP",parameters:{time:U.segment[1]}}}},1e3*U.segment[0],1e3*U.segment[1]-1e3*U.segment[0]);e.playerOverlays.playerOverlayRenderer.timelyActionRenderers.push(z)}}}catch(e){_.e(e)}finally{_.f()}}}if(null!=e&&null!==(d=e.transportControls)&&void 0!==d&&null!==(d=d.transportControlsRenderer)&&void 0!==d&&d.promotedActions&&Er("enableSponsorBlockHighlight"))if(null!==(g=window)&&void 0!==g&&null!==(g=g.sponsorblock)&&void 0!==g&&g.segments){var V=window.sponsorblock.segments.find(e=>"poi_highlight"===e.category);V&&e.transportControls.transportControlsRenderer.promotedActions.push({type:"TRANSPORT_CONTROLS_BUTTON_TYPE_SPONSORBLOCK_HIGHLIGHT",button:{buttonRenderer:Xr(!1,mr("sponsorblock.toasts.skipToHighlight"),"SKIP_NEXT",{clickTrackingParams:null,customAction:{action:"SKIP",parameters:{time:V.segment[0]}}})}})}if(null!=e&&null!==(p=e.contents)&&void 0!==p&&null!==(p=p.tvBrowseRenderer)&&void 0!==p&&null!==(p=p.content)&&void 0!==p&&null!==(p=p.tvSurfaceContentRenderer)&&void 0!==p&&null!==(p=p.header)&&void 0!==p&&null!==(p=p.channelHeaderRenderer)&&void 0!==p&&p.buttons){var H,j,W=null,K=e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.header.channelHeaderRenderer.title.simpleText,J=f(e.responseContext.serviceTrackingParams);try{for(J.s();!(j=J.n()).done;){var G,X=f(j.value.params);try{for(X.s();!(G=X.n()).done;){var q=G.value;if("browse_id"===q.key){W=q.value;break}}}catch(e){X.e(e)}finally{X.f()}if(W)break}}catch(e){J.e(e)}finally{J.f()}var Y=null===(H=Er("sidebarContentsOrder"))||void 0===H?void 0:H.some(e=>("object"===D(e)?e.browseId:e)===W);e.contents.tvBrowseRenderer.content.tvSurfaceContentRenderer.header.channelHeaderRenderer.buttons.push({buttonRenderer:Xr(!1,mr(Y?"settings.options.uiSettings.options.sortSidebarContents.removeFromSidebar":"settings.options.uiSettings.options.sortSidebarContents.addToSidebar"),Y?"REMOVE":"ADD",{customAction:{action:"ADD_OR_REMOVE_CHANNEL_TO_SIDEBAR",parameters:{browseId:W,title:K}}})})}}catch(e){console.error("An error occured while processing the JSON:",e)}return e};var yo=JSON.stringify;for(var bo in JSON.stringify=function(e,t,n){var i;if(null!=e&&null!==(i=e.playbackContext)&&void 0!==i&&i.contentPlaybackContext){var r=JSON.parse(yo(e));if(!r.playbackContext.contentPlaybackContext.isInlinePlaybackNoAd)return r.playbackContext.contentPlaybackContext.isInlinePlaybackNoAd=!0,yo.call(this,r,t,n)}return yo.call(this,e,t,n)},window.JSON.stringify=JSON.stringify,window.JSON.parse=JSON.parse,window._yttv)window._yttv[bo]&&window._yttv[bo].JSON&&window._yttv[bo].JSON.parse&&(window._yttv[bo].JSON.parse=JSON.parse);function So(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=f(e);try{for(i.s();!(t=i.n()).done;){var r=t.value;if(r.shelfRenderer){var o;if(r.shelfRenderer.tvhtml5Style||(r.shelfRenderer.tvhtml5Style={effects:{}}),Er("disableEnlargingThumbnails")&&(r.shelfRenderer.tvhtml5Style.effects.enlarge=!1),Er("enableShrinkingThumbnails")&&(r.shelfRenderer.tvhtml5Style.effects.shrink=!0),null===(o=r.shelfRenderer.content)||void 0===o||null===(o=o.horizontalListRenderer)||void 0===o||!o.items)continue;if(Eo(r.shelfRenderer.content.horizontalListRenderer.items),wo(r.shelfRenderer.content.horizontalListRenderer.items),Do(r.shelfRenderer.content.horizontalListRenderer.items),n&&xo(r.shelfRenderer.content.horizontalListRenderer.items),r.shelfRenderer.content.horizontalListRenderer.items=ko(r.shelfRenderer.content.horizontalListRenderer.items),!Er("enableShorts")){if("TVHTML5_SHELF_RENDERER_TYPE_SHORTS"===r.shelfRenderer.tvhtml5ShelfRendererType){e.splice(e.indexOf(r),1);continue}r.shelfRenderer.content.horizontalListRenderer.items=r.shelfRenderer.content.horizontalListRenderer.items.filter(e=>{var t;return"TVHTML5_TILE_RENDERER_TYPE_SHORTS"!==(null===(t=e.tileRenderer)||void 0===t?void 0:t.tvhtml5ShelfRendererType)}),r.shelfRenderer.content.horizontalListRenderer.items=r.shelfRenderer.content.horizontalListRenderer.items.filter(e=>{var t;return"LOCKUP_CONTENT_TYPE_SHORT"!==(null===(t=e.lockupViewModel)||void 0===t?void 0:t.contentType)}),r.shelfRenderer.content.horizontalListRenderer.items=r.shelfRenderer.content.horizontalListRenderer.items.filter(e=>{var t;return!(null!==(t=e.tileRenderer)&&void 0!==t&&null!==(t=t.onSelectCommand)&&void 0!==t&&t.reelWatchEndpoint)})}}}}catch(e){i.e(e)}finally{i.f()}}function xo(e){if(Er("enablePreviews")){var t,n=f(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.tileRenderer){var r,o,a=i.tileRenderer.onSelectCommand,s=JSON.parse(JSON.stringify(a));if(null!==(r=i.tileRenderer)&&void 0!==r&&null!==(r=r.onFocusCommand)&&void 0!==r&&r.playbackEndpoint)continue;if(null!==(o=i.tileRenderer)&&void 0!==o&&null!==(o=o.onFocusCommand)&&void 0!==o&&o.commandExecutorCommand)continue;i.tileRenderer.onFocusCommand={startInlinePlaybackCommand:{blockAdoption:!0,caption:!1,delayMs:3e3,durationMs:4e4,muted:!1,restartPlaybackBeforeSeconds:10,resumeVideo:!0,playbackEndpoint:s}}}}}catch(e){n.e(e)}finally{n.f()}}}function Eo(e){var t,n=f(e);try{var i=function(){var n,i=t.value;if(i.adSlotRenderer){var r=e.indexOf(i);return e.splice(r,1),0}if(!i.tileRenderer&&i.lockupViewModel)return 0;if("LOCKUP_CONTENT_TYPE_VIDEO"!==!(null!=i&&null!==(n=i.lockupViewModel)&&void 0!==n&&n.contentType))return 0;if(Er("enableDeArrow")){var o=i.tileRenderer.contentId||i.lockupViewModel.contentId;fetch(`https://sponsor.ajay.app/api/branding?videoID=${o}`).then(e=>e.json()).then(e=>{if(e.titles.length>0){var t=e.titles.reduce((e,t)=>e.votes>t.votes?e:t);i.tileRenderer?i.tileRenderer.metadata.tileMetadataRenderer.title.simpleText=t.title:i.lockupViewModel.metadata.lockupMetadataViewModel.title.content=t.title}if(e.thumbnails.length>0&&Er("enableDeArrowThumbnails")){var n=e.thumbnails.reduce((e,t)=>e.votes>t.votes?e:t);n.timestamp&&(i.tileRenderer?i.tileRenderer.header.tileHeaderRenderer.thumbnail.thumbnails=[{url:`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${o}&time=${n.timestamp}`,width:1280,height:640}]:i.lockupViewModel.contentImage.thumbnailViewModel.image.sources=[{url:`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${o}&time=${n.timestamp}`,width:1280,height:640}])}}).catch(()=>{})}};for(n.s();!(t=n.n()).done;)i()}catch(e){n.e(e)}finally{n.f()}}function wo(e){var t,n=f(e);try{for(n.s();!(t=n.n()).done;){var i,r,o=t.value;if((o.tileRenderer||o.lockupViewModel)&&(("TILE_STYLE_YTLR_DEFAULT"===(null==o||null===(i=o.tileRenderer)||void 0===i?void 0:i.style)||"LOCKUP_CONTENT_TYPE_VIDEO"===(null==o||null===(r=o.lockupViewModel)||void 0===r?void 0:r.contentType))&&Er("enableHqThumbnails"))){var a,s,l,u;if(!(null!=o&&null!==(a=o.tileRenderer)&&void 0!==a&&null!==(a=a.onSelectCommand)&&void 0!==a&&null!==(a=a.watchEndpoint)&&void 0!==a&&a.videoId||null!=o&&null!==(s=o.lockupViewModel)&&void 0!==s&&s.contentId))continue;if(!(null!=o&&null!==(l=o.tileRenderer)&&void 0!==l&&null!==(l=l.header)&&void 0!==l&&null!==(l=l.tileHeaderRenderer)&&void 0!==l&&null!==(l=l.thumbnail)&&void 0!==l&&null!==(l=l.thumbnails)&&void 0!==l&&null!==(l=l[0])&&void 0!==l&&l.url||null!=o&&null!==(u=o.lockupViewModel)&&void 0!==u&&null!==(u=u.contentImage)&&void 0!==u&&null!==(u=u.thumbnailViewModel)&&void 0!==u&&null!==(u=u.image)&&void 0!==u&&null!==(u=u.sources)&&void 0!==u&&null!==(u=u[0])&&void 0!==u&&u.url))continue;var c=o.tileRenderer?o.tileRenderer.onSelectCommand.watchEndpoint.videoId:o.lockupViewModel.contentId,h=o.tileRenderer?o.tileRenderer.header.tileHeaderRenderer.thumbnail.thumbnails[0].url.split("?")[1]:o.lockupViewModel.contentImage.thumbnailViewModel.image.sources[0].url.split("?")[1];o.tileRenderer?o.tileRenderer.header.tileHeaderRenderer.thumbnail.thumbnails=[{url:`https://i.ytimg.com/vi/${c}/sddefault.jpg${h?`?${h}`:""}`,width:640,height:480}]:o.lockupViewModel.contentImage.thumbnailViewModel.image.sources=[{url:`https://i.ytimg.com/vi/${c}/sddefault.jpg${h?`?${h}`:""}`,width:640,height:480}]}}}catch(e){n.e(e)}finally{n.f()}}function Do(e){var t,n=f(e);try{for(n.s();!(t=n.n()).done;){var i,r,o,a,s,l,u,c,h,d,p,m,g,v,y,b,S,x,E,w,D=t.value;if((D.tileRenderer||D.lockupViewModel)&&("TILE_STYLE_YTLR_DEFAULT"===(null==D||null===(i=D.tileRenderer)||void 0===i?void 0:i.style)||"LOCKUP_CONTENT_TYPE_VIDEO"===(null==D||null===(r=D.lockupViewModel)||void 0===r?void 0:r.contentType)))if(null!=D&&null!==(o=D.tileRenderer)&&void 0!==o&&null!==(o=o.onLongPressCommand)&&void 0!==o&&null!==(o=o.showMenuCommand)&&void 0!==o&&null!==(o=o.menu)&&void 0!==o&&null!==(o=o.menuRenderer)&&void 0!==o&&o.items||null!=D&&null!==(a=D.lockupViewModel)&&void 0!==a&&null!==(a=a.rendererContext)&&void 0!==a&&null!==(a=a.commandContext)&&void 0!==a&&null!==(a=a.onLongPress)&&void 0!==a&&null!==(a=a.innertubeCommand)&&void 0!==a&&null!==(a=a.showMenuCommand)&&void 0!==a&&null!==(a=a.menu)&&void 0!==a&&null!==(a=a.menuRenderer)&&void 0!==a&&a.items){var C=jr("Add to Queue",{clickTrackingParams:null,playlistEditEndpoint:{customAction:{action:"ADD_TO_QUEUE",parameters:JSON.parse(JSON.stringify(D))}}}),k=D.tileRenderer?D.tileRenderer.onLongPressCommand.showMenuCommand.menu.menuRenderer.items:D.lockupViewModel.rendererContext.commandContext.onLongPress.innertubeCommand.showMenuCommand.menu.menuRenderer.items;k.push(C),Co(D,k)}else if(Er("enableLongPress")&&(null!==(s=D.tileRenderer)&&void 0!==s&&null!==(s=s.metadata)&&void 0!==s&&s.tileMetadataRenderer||null!==(l=D.lockupViewModel)&&void 0!==l&&null!==(l=l.metadata)&&void 0!==l&&l.lockupMetadataViewModel)&&(null!==(u=D.tileRenderer)&&void 0!==u&&null!==(u=u.header)&&void 0!==u&&null!==(u=u.tileHeaderRenderer)&&void 0!==u&&null!==(u=u.thumbnail)&&void 0!==u&&u.thumbnails||null!==(c=D.lockupViewModel)&&void 0!==c&&null!==(c=c.contentImage)&&void 0!==c&&null!==(c=c.thumbnailViewModel)&&void 0!==c&&null!==(c=c.image)&&void 0!==c&&c.sources)&&(null!=D&&null!==(h=D.tileRenderer)&&void 0!==h&&null!==(h=h.onSelectCommand)&&void 0!==h&&h.watchEndpoint||null!=D&&null!==(d=D.lockupViewModel)&&void 0!==d&&null!==(d=d.rendererContext)&&void 0!==d&&null!==(d=d.commandContext)&&void 0!==d&&null!==(d=d.onTap)&&void 0!==d&&null!==(d=d.innertubeCommand)&&void 0!==d&&d.watchEndpoint)){var A=JSON.parse(JSON.stringify(D)),T=null!=A&&A.tileRenderer?null===(p=A.tileRenderer.metadata)||void 0===p||null===(p=p.tileMetadataRenderer)||void 0===p||null===(p=p.lines)||void 0===p||null===(p=p[0])||void 0===p||null===(p=p.lineRenderer)||void 0===p||null===(p=p.items)||void 0===p||null===(p=p[0])||void 0===p||null===(p=p.lineItemRenderer)||void 0===p?void 0:p.text:null===(m=A.lockupViewModel.metadata)||void 0===m||null===(m=m.lockupMetadataViewModel)||void 0===m||null===(m=m.metadata)||void 0===m||null===(m=m.contentMetadataViewModel)||void 0===m||null===(m=m.metadataRows)||void 0===m||null===(m=m[0])||void 0===m||null===(m=m.metadataParts)||void 0===m||null===(m=m[0])||void 0===m||null===(m=m.text)||void 0===m?void 0:m.content;if(T){var F=T,P=Hr({videoId:(null==A||null===(g=A.tileRenderer)||void 0===g?void 0:g.contentId)||(null==A||null===(v=A.lockupViewModel)||void 0===v?void 0:v.contentId),thumbnails:(null==A||null===(y=A.tileRenderer)||void 0===y||null===(y=y.header)||void 0===y||null===(y=y.tileHeaderRenderer)||void 0===y||null===(y=y.thumbnail)||void 0===y?void 0:y.thumbnails)||(null==A||null===(b=A.lockupViewModel)||void 0===b||null===(b=b.contentImage)||void 0===b||null===(b=b.thumbnailViewModel)||void 0===b||null===(b=b.image)||void 0===b?void 0:b.sources),title:(null==A||null===(S=A.tileRenderer)||void 0===S||null===(S=S.metadata)||void 0===S||null===(S=S.tileMetadataRenderer)||void 0===S||null===(S=S.title)||void 0===S?void 0:S.simpleText)||(null==A||null===(x=A.lockupViewModel)||void 0===x||null===(x=x.metadata)||void 0===x||null===(x=x.lockupMetadataViewModel)||void 0===x||null===(x=x.title)||void 0===x?void 0:x.content),subtitle:F.length&&F.length>0?F:F.runs?F.runs[0].text:F.simpleText,watchEndpointData:(null==A||null===(E=A.tileRenderer)||void 0===E||null===(E=E.onSelectCommand)||void 0===E?void 0:E.watchEndpoint)||(null==A||null===(w=A.lockupViewModel)||void 0===w||null===(w=w.rendererContext)||void 0===w||null===(w=w.commandContext)||void 0===w||null===(w=w.onTap)||void 0===w||null===(w=w.innertubeCommand)||void 0===w?void 0:w.watchEndpoint),item:A});Co(D,P.showMenuCommand.menu.menuRenderer.items),D.tileRenderer?D.tileRenderer.onLongPressCommand=P:D.lockupViewModel.rendererContext.commandContext.onLongPress={innertubeCommand:P}}}}}catch(e){n.e(e)}finally{n.f()}}function Co(e,t){var n=function(e){var t,n,i,r,o,a=null!=e&&e.tileRenderer?e.tileRenderer.onLongPressCommand:null==e||null===(t=e.lockupViewModel)||void 0===t||null===(t=t.rendererContext)||void 0===t||null===(t=t.commandContext)||void 0===t?void 0:t.onLongPress,s=null!==(n=null==a?void 0:a.showEngagementPanelEndpoint)&&void 0!==n?n:null==a||null===(i=a.innertubeCommand)||void 0===i?void 0:i.showEngagementPanelEndpoint;return null!=s&&null!==(r=s.identifier)&&void 0!==r&&r.tag&&null!=s&&null!==(o=s.globalConfiguration)&&void 0!==o&&o.params?{panelId:s.identifier.tag,params:s.globalConfiguration.params}:null}(e);if(n&&!function(e){return null==e?void 0:e.some(e=>{var t,n;return!!ao(null==e||null===(t=e.menuServiceItemRenderer)||void 0===t?void 0:t.serviceEndpoint)||!!ao(null==e||null===(n=e.menuNavigationItemRenderer)||void 0===n?void 0:n.navigationEndpoint)})}(t)){var i,r=f(function(e){return[jr(mr("videoMenu.notInterested"),{clickTrackingParams:null,customAction:{action:"NOT_INTERESTED",parameters:e}}),jr(mr("videoMenu.dontRecommendChannel"),{clickTrackingParams:null,customAction:{action:"DONT_RECOMMEND_CHANNEL",parameters:e}})]}(n));try{for(r.s();!(i=r.n()).done;){var o=i.value;t.push(o)}}catch(e){r.e(e)}finally{r.f()}}}function ko(e){return e.filter(e=>{var t,n,i,r;if(!e.tileRenderer)return!0;var o=null!=e&&e.tileRenderer?null===(t=e.tileRenderer.header)||void 0===t||null===(t=t.tileHeaderRenderer)||void 0===t||null===(t=t.thumbnailOverlays)||void 0===t||null===(t=t.find(e=>e.thumbnailOverlayResumePlaybackRenderer))||void 0===t?void 0:t.thumbnailOverlayResumePlaybackRenderer:null===(n=e.lockupViewModel)||void 0===n||null===(n=n.contentImage)||void 0===n||null===(n=n.thumbnailViewModel)||void 0===n||null===(n=n.overlays)||void 0===n||null===(n=n.find(e=>{var t;return null===(t=e.thumbnailBottomOverlayViewModel)||void 0===t?void 0:t.progressBar}))||void 0===n||null===(n=n.thumbnailBottomOverlayViewModel)||void 0===n?void 0:n.progressBar.thumbnailOverlayProgressBarViewModel;if(!o)return!0;var a=Er("hideWatchedVideosPages");if(!a.length)return!0;var s=location.hash.substring(1),l="/"===s?"home":s.startsWith("/search")?"search":null!==(i=null===(r=s.split("?")[1])||void 0===r||null===(r=r.split("&")[0])||void 0===r||null===(r=r.split("=")[1])||void 0===r||null===(r=r.replace("FE",""))||void 0===r?void 0:r.replace("topics_",""))&&void 0!==i?i:"";return!a.includes(l)||((null==o?void 0:o.percentDurationWatched)||(null==o?void 0:o.startPercent)||0)<=Er("hideWatchedVideosThreshold")})}var Ao="s95b-perf-edition-v1",To=["enablePreviews","enableDeArrow","enableDeArrowThumbnails"],Fo={lang:"de",light:!1,previous:null},Po=b({},Fo);function Bo(){try{localStorage.setItem(Ao,JSON.stringify(Po))}catch(e){}}function Io(e){return Fr(Po.lang,e)}function Oo(){var e=document.querySelector("video"),t=Io("statWait"),n=Io("statUnavailable");if(e){var i=e.videoWidth||0,r=e.videoHeight||0;if(t=i>0&&r>0?i+" × "+r+function(){try{var e=document.querySelector(".html5-video-player");if(!e||"function"!=typeof e.getStatsForNerds)return"";var t=String(e.getStatsForNerds().resolution||"").match(/@([\d.]+)/);return t?" @"+t[1]:""}catch(e){return""}}():Io("statUnavailable"),"function"==typeof e.getVideoPlaybackQuality)try{var o=e.getVideoPlaybackQuality();o&&Number.isFinite(o.droppedVideoFrames)&&(n=String(o.droppedVideoFrames))}catch(e){}}return Io("statVideo")+": "+t+" | "+Io("statFrames")+": "+n+" | "+Io("statCodec")+": "+Ir(Io,Nr())}function No(e){var t=e.keyCode||e.which;405!==t&&170!==t&&"ColorF2Yellow"!==e.key&&"F2"!==e.key||(e.preventDefault(),e.stopImmediatePropagation(),void 0!==e.type&&"keydown"!==e.type||function(){try{no({menuId:"s95b-menu",menuHeader:{title:Io("title"),subtitle:Oo()},selectedIndex:0,options:[{name:Io("language"),value:null,menuId:"s95b-language",menuHeader:{title:Io("language"),subtitle:Io("languageHint")},options:[{name:Io("languageDE"),key:"s95bLanguage",value:"de"},{name:Io("languageEN"),key:"s95bLanguage",value:"en"}]},Rr(Io),Lr(Io),{name:Io("light"),subtitle:Io("lightHint"),value:"s95bLowOverhead"}]},!1)}catch(e){console.warn("[S95B] menu could not be opened:",e)}}())}function Ro(e){var t=e&&e.detail;t&&("s95bLowOverhead"===t.key?function(e){if(e!==Po.light){if(e){var t={};To.forEach(e=>{t[e]=Er(e)}),Po.previous=t,To.forEach(e=>wr(e,!1)),Po.light=!0}else Po.previous&&To.forEach(e=>{Object.prototype.hasOwnProperty.call(Po.previous,e)&&wr(e,Po.previous[e])}),Po.previous=null,Po.light=!1;Bo()}}(!0===t.value):"s95bLanguage"===t.key&&(Po.lang="en"===t.value?"en":"de",Bo()))}!function(){try{var e=JSON.parse(localStorage.getItem(Ao)||"null");e&&"object"===D(e)&&(Po=b(b({},Fo),{},{lang:"en"===e.lang?"en":"de",light:!0===e.light,previous:e.previous&&"object"===D(e.previous)?e.previous:null}))}catch(e){Po=b({},Fo)}}(),Er("s95bLowOverhead")!==Po.light&&wr("s95bLowOverhead",Po.light),Er("s95bLanguage")!==Po.lang&&wr("s95bLanguage",Po.lang),Dr.addEventListener("configChange",Ro),window.addEventListener("keydown",No,!0),window.addEventListener("keyup",No,!0),window.addEventListener("keypress",No,!0);var Lo=function e(t){function n(e,t){return e>>>t|e<<32-t}for(var i,r,o=Math.pow,a=o(2,32),s="length",l="",u=[],c=8*t[s],h=e.h=e.h||[],d=e.k=e.k||[],p=d[s],m={},f=2;p<64;f++)if(!m[f]){for(i=0;i<313;i+=f)m[i]=f;h[p]=o(f,.5)*a|0,d[p++]=o(f,1/3)*a|0}for(t+="";t[s]%64-56;)t+="\0";for(i=0;i<t[s];i++){if((r=t.charCodeAt(i))>>8)return;u[i>>2]|=r<<(3-i)%4*8}for(u[u[s]]=c/a|0,u[u[s]]=c,r=0;r<u[s];){var g=u.slice(r,r+=16),v=h;for(h=h.slice(0,8),i=0;i<64;i++){var y=g[i-15],b=g[i-2],S=h[0],x=h[4],E=h[7]+(n(x,6)^n(x,11)^n(x,25))+(x&h[5]^~x&h[6])+d[i]+(g[i]=i<16?g[i]:g[i-16]+(n(y,7)^n(y,18)^y>>>3)+g[i-7]+(n(b,17)^n(b,19)^b>>>10)|0);(h=[E+((n(S,2)^n(S,13)^n(S,22))+(S&h[1]^S&h[2]^h[1]&h[2]))|0].concat(h))[4]=h[4]+E|0}for(i=0;i<8;i++)h[i]=h[i]+v[i]|0}for(i=0;i<8;i++)for(r=3;r+1;r--){var w=h[i]>>8*r&255;l+=(w<16?0:"")+w.toString(16)}return l},Mo={sponsor:{color:"#00d400",opacity:"0.7",name:mr("sponsorblock.segments.sponsor")||"sponsored segment"},intro:{color:"#00ffff",opacity:"0.7",name:mr("sponsorblock.segments.intro")||"intro"},outro:{color:"#0202ed",opacity:"0.7",name:mr("sponsorblock.segments.outro")||"outro"},interaction:{color:"#cc00ff",opacity:"0.7",name:mr("sponsorblock.segments.interaction")||"interaction reminder"},selfpromo:{color:"#ffff00",opacity:"0.7",name:mr("sponsorblock.segments.selfpromo")||"self-promotion"},preview:{color:"#008fd6",opacity:"0.7",name:mr("sponsorblock.segments.preview")||"recap or preview"},filler:{color:"#7300FF",opacity:"0.9",name:mr("sponsorblock.segments.filler")||"tangents"},music_offtopic:{color:"#ff9900",opacity:"0.7",name:mr("sponsorblock.segments.music_offtopic")||"non-music part"},poi_highlight:{color:"#9b044c",opacity:"0.7",name:mr("sponsorblock.segments.poi_highlight")||"highlight"}};class _o{constructor(e){g(this,"video",null),g(this,"active",!0),g(this,"attachVideoTimeout",null),g(this,"nextSkipTimeout",null),g(this,"sliderInterval",null),g(this,"observer",null),g(this,"scheduleSkipHandler",null),g(this,"durationChangeHandler",null),g(this,"segments",null),g(this,"skippableCategories",[]),g(this,"manualSkippableCategories",[]),g(this,"skippedCategories",new Map),this.videoID=e}init(){var e=this;return c(S().m(function t(){var n,i,r,o,a;return S().w(function(t){for(;;)switch(t.n){case 0:return n=Lo(e.videoID).substring(0,4),i=["sponsor","intro","outro","interaction","selfpromo","preview","filler","music_offtopic","poi_highlight"],t.n=1,fetch(`https://sponsor.ajay.app/api/skipSegments/${n}?categories=${encodeURIComponent(JSON.stringify(i))}`);case 1:return r=t.v,t.n=2,r.json();case 2:if(o=t.v,a=o.find(t=>t.videoID===e.videoID),console.info(e.videoID,"Got it:",a),a&&a.segments&&a.segments.length){t.n=3;break}return console.info(e.videoID,"No segments found."),t.a(2);case 3:e.segments=a.segments,e.manualSkippableCategories=Er("sponsorBlockManualSkips"),e.skippableCategories=e.getSkippableCategories(),e.scheduleSkipHandler=()=>{var t=document.querySelector('div[idomkey="slider"]'),n=null==t?void 0:t.getBoundingClientRect();!document.querySelector('div[idomkey="Metadata-Section"]')&&n&&e.segmentsoverlay.style.setProperty("top",`${n.top}px`,"important"),e.scheduleSkip()},e.durationChangeHandler=()=>e.buildOverlay(),e.attachVideo(),e.buildOverlay();case 4:return t.a(2)}},t)}))()}getSkippableCategories(){var e=[];return Er("enableSponsorBlockSponsor")&&e.push("sponsor"),Er("enableSponsorBlockIntro")&&e.push("intro"),Er("enableSponsorBlockOutro")&&e.push("outro"),Er("enableSponsorBlockInteraction")&&e.push("interaction"),Er("enableSponsorBlockSelfPromo")&&e.push("selfpromo"),Er("enableSponsorBlockPreview")&&e.push("preview"),Er("enableSponsorBlockFiller")&&e.push("filler"),Er("enableSponsorBlockMusicOfftopic")&&e.push("music_offtopic"),e}attachVideo(){if(clearTimeout(this.attachVideoTimeout),this.attachVideoTimeout=null,this.video=document.querySelector("video"),!this.video)return console.info(this.videoID,"No video yet..."),void(this.attachVideoTimeout=setTimeout(()=>this.attachVideo(),100));console.info(this.videoID,"Video found, binding..."),this.video.addEventListener("play",this.scheduleSkipHandler),this.video.addEventListener("pause",this.scheduleSkipHandler),this.video.addEventListener("timeupdate",this.scheduleSkipHandler),this.video.addEventListener("durationchange",this.durationChangeHandler)}buildOverlay(){if(this.segmentsoverlay)console.info("Overlay already built");else if(this.video&&this.video.duration){var e=this.video.duration,t=document.querySelector('div[idomkey="slider"]');if(!t)return setTimeout(()=>this.buildOverlay(),100);this.segmentsoverlay=document.createElement("div"),this.segmentsoverlay.classList.add("ytLrProgressBarSlider","ytLrProgressBarSliderRectangularProgressBar"),this.segmentsoverlay.style.setProperty("z-index","10","important"),this.segmentsoverlay.style.setProperty("background-color","rgba(0, 0, 0, 0)","important"),this.segmentsoverlay.style.setProperty("width","72rem","important"),this.segmentsoverlay.style.setProperty("left","4rem","important");var n=t.getBoundingClientRect();if(!t.classList.contains("ytLrProgressBarSlider")){for(var i=0;i<t.classList.length;i++)this.segmentsoverlay.classList.add(t.classList[i]);this.segmentsoverlay.style.setProperty("height",`${n.height}px`,"important"),this.segmentsoverlay.style.setProperty("bottom",n.bottom-n.top+"px","important")}this.segments.forEach(t=>{var n=E(t.segment,2),i=n[0],r=n[1],o=Mo[t.category]||{color:"blue",opacity:.7},a=e?100*i/e:0,s=e?100*(r-i)/e:0,l=document.createElement("div");l.style.setProperty("background-color",o.color,"important"),l.style.setProperty("opacity",o.opacity,"important"),l.style.setProperty("height","100%","important"),l.style.setProperty("width",`${"poi_highlight"===t.category?1:s}%`,"important"),l.style.setProperty("left",`${a}%`,"important"),l.style.setProperty("position","absolute","important"),console.info("Generated element",l,"from",t),this.segmentsoverlay.appendChild(l)}),this.observer=new MutationObserver(e=>{e.forEach(e=>{if(e.removedNodes){var t,n=f(e.removedNodes);try{for(n.s();!(t=n.n()).done;){t.value===this.segmentsoverlay&&(console.info("bringing back segments overlay"),this.slider.appendChild(this.segmentsoverlay))}}catch(e){n.e(e)}finally{n.f()}}"false"===document.querySelector("ytlr-progress-bar").getAttribute("hybridnavfocusable")?this.segmentsoverlay.style.setProperty("display","none","important"):this.segmentsoverlay.style.setProperty("display","block","important")})}),this.sliderInterval=setInterval(()=>{this.slider=document.querySelector("ytlr-redux-connect-ytlr-progress-bar"),this.slider&&(clearInterval(this.sliderInterval),this.sliderInterval=null,this.observer.observe(this.slider,{childList:!0,subtree:!0}),this.slider.appendChild(this.segmentsoverlay))},500)}else console.info("No video duration yet")}scheduleSkip(){if(clearTimeout(this.nextSkipTimeout),this.nextSkipTimeout=null,this.active)if(this.video.paused)console.info(this.videoID,"Currently paused, ignoring...");else{var e=this.segments.filter(e=>e.segment[0]>this.video.currentTime-.3&&e.segment[1]>this.video.currentTime-.3);if(e.sort((e,t)=>e.segment[0]-t.segment[0]),e.length){var t=E(e,1)[0],n=E(t.segment,2),i=n[0],r=n[1];console.info(this.videoID,"Scheduling skip of",t,"in",i-this.video.currentTime),this.nextSkipTimeout=setTimeout(()=>{var e;if(this.video.paused)console.info(this.videoID,"Currently paused, ignoring...");else if(this.skippableCategories.includes(t.category)){var n=(null===(e=Mo[t.category])||void 0===e?void 0:e.name)||t.category;if(console.info(this.videoID,"Skipping",t),!this.manualSkippableCategories.includes(t.category)){var i=this.skippedCategories.get(t.UUID);if(i){if(i.count++,i.lastSkipped=Date.now(),this.skippedCategories.set(t.UUID,i),i.lastSkipped-i.firstSkipped<1e3)return void(i.hasShownToast||(Er("enableSponsorBlockToasts")&&Mr("SponsorBlock",mr("sponsorblock.toasts.notSkipping",{segment:n,count:i.count})),i.hasShownToast=!0,this.skippedCategories.set(t.UUID,i)))}else this.skippedCategories.set(t.UUID,{count:1,firstSkipped:Date.now(),lastSkipped:Date.now(),hasShownToast:!1});Er("enableSponsorBlockToasts")&&Mr("SponsorBlock",mr("sponsorblock.toasts.skipping",{segment:n})),this.video.duration-r<1?this.video.currentTime=r-1:this.video.currentTime=r,this.scheduleSkip()}}else console.info(this.videoID,"Segment",t.category,"is not skippable, ignoring...")},1e3*(i-this.video.currentTime))}else console.info(this.videoID,"No more segments")}else console.info(this.videoID,"No longer active, ignoring...")}destroy(){console.info(this.videoID,"Destroying"),this.active=!1,this.nextSkipTimeout&&(clearTimeout(this.nextSkipTimeout),this.nextSkipTimeout=null),this.attachVideoTimeout&&(clearTimeout(this.attachVideoTimeout),this.attachVideoTimeout=null),this.sliderInterval&&(clearInterval(this.sliderInterval),this.sliderInterval=null),this.observer&&(this.observer.disconnect(),this.observer=null),this.segmentsoverlay&&(this.segmentsoverlay.remove(),this.segmentsoverlay=null),this.video&&(this.video.removeEventListener("play",this.scheduleSkipHandler),this.video.removeEventListener("pause",this.scheduleSkipHandler),this.video.removeEventListener("timeupdate",this.scheduleSkipHandler),this.video.removeEventListener("durationchange",this.durationChangeHandler)),this.skippedCategories.clear()}}window.sponsorblock=null,window.addEventListener("hashchange",()=>{var e=new URL(location.hash.substring(1),location.href).search.replace("?v=","").split("&")[0],t=e&&(!window.sponsorblock||window.sponsorblock.videoID!=e);if(console.info("hashchange",e,window.sponsorblock,window.sponsorblock?window.sponsorblock.videoID:null,t),t){if(window.sponsorblock){try{window.sponsorblock.destroy()}catch(e){console.warn("window.sponsorblock.destroy() failed!",e)}window.sponsorblock=null}Er("enableSponsorBlock")?(window.sponsorblock=new _o(e),window.sponsorblock.init()):console.info("SponsorBlock disabled, not loading")}},!1);var Uo;Uo||(Uo=1,function(){if(!("navigate"in window)){var e={37:"left",38:"up",39:"right",40:"down"},t=null,n=null,i={element:null,rect:null},r=null;window.navigate=a,window.Element.prototype.spatialNavigationSearch=h,window.Element.prototype.focusableAreas=y,window.Element.prototype.getSpatialNavigationContainer=g,window.CSS&&CSS.registerProperty&&(""===window.getComputedStyle(document.documentElement).getPropertyValue("--spatial-navigation-contain")&&CSS.registerProperty({name:"--spatial-navigation-contain",syntax:"auto | contain",inherits:!1,initialValue:"auto"}),""===window.getComputedStyle(document.documentElement).getPropertyValue("--spatial-navigation-action")&&CSS.registerProperty({name:"--spatial-navigation-action",syntax:"auto | focus | scroll",inherits:!1,initialValue:"auto"}),""===window.getComputedStyle(document.documentElement).getPropertyValue("--spatial-navigation-function")&&CSS.registerProperty({name:"--spatial-navigation-function",syntax:"normal | grid",inherits:!1,initialValue:"normal"})),q(!1),window.addEventListener("load",()=>{o()})}function o(){window.addEventListener("keydown",i=>{var r=parent&&parent.__spatialNavigation__.keyMode||window.__spatialNavigation__.keyMode,o=document.activeElement,s=e[i.keyCode];if(9===i.keyCode&&(n=null),!(!r||"NONE"===r||"SHIFTARROW"===r&&!i.shiftKey||"ARROW"===r&&i.shiftKey||i.defaultPrevented)){var l={left:!0,up:!0,right:!0,down:!0};"INPUT"!==o.nodeName&&"TEXTAREA"!==o.nodeName||(l=function(t){var n=["email","date","month","number","time","week"],i=["password","text","search","tel","url",null],r=document.activeElement,o={left:!1,up:!1,right:!1,down:!1},a=e[t.keyCode];if(void 0===a)return o;if(!n.includes(r.getAttribute("type"))||"up"!==a&&"down"!==a)if(i.includes(r.getAttribute("type"))||"TEXTAREA"===r.nodeName){var s=r.selectionStart,l=r.selectionEnd;s===l&&(0===s&&(o.left=!0,o.up=!0),l===r.value.length&&(o.right=!0,o.down=!0))}else o[a]=!0;else o[a]=!0;return o}(i)),l[s]&&(i.preventDefault(),t=new Map,a(s),t=null,n=null)}}),document.addEventListener("mouseup",e=>{n={x:e.clientX,y:e.clientY}}),window.addEventListener("focusin",e=>{e.target!==window&&(i.element=e.target,i.rect=e.target.getBoundingClientRect())})}function a(e){var t=function(){var e=document.activeElement;if(!e||e===document.body&&!document.querySelector(":focus")){if(i.element&&e!==i.element){var t=window.getComputedStyle(i.element,null),n=["hidden","collapse"];if(i.element.disabled||n.includes(t.getPropertyValue("visibility")))return e=i.element}e=document.documentElement}if(!i.element||0!==X(i.element).height&&0!==X(i.element).width||(r=i.rect),!I(e)){var o=v(e);if(o&&(o===window||"auto"===x(o)))return o}return e}(),o=t,a=null;n&&(null===(a=document.elementFromPoint(n.x,n.y))&&(a=document.body),O(a)&&!C(a)?n=null:o=C(a)?a:a.getSpatialNavigationContainer()),o!==document&&o!==document.documentElement||(o=document.body||document.documentElement);var c=null;if((C(o)||"BODY"===o.nodeName)&&"INPUT"!==o.nodeName)if("IFRAME"===o.nodeName&&(o=o.contentDocument.documentElement),c=o,document.activeElement===t||document.activeElement===document.body&&t===document.documentElement){if("scroll"===x(o)){if(l(o,e))return}else if("focus"===x(o)){if(s(o.spatialNavigationSearch(e,{container:o,candidates:u(o,{mode:"all"})}),e))return}else if("auto"===x(o)&&(s(o.spatialNavigationSearch(e,{container:o}),e)||l(o,e)))return}else c=c.getSpatialNavigationContainer();var h=(c=o.getSpatialNavigationContainer()).parentElement?c.getSpatialNavigationContainer():null;if(h||window.location===window.parent.location||(h=window.parent.document.documentElement),"scroll"===x(c)){if(l(c,e))return}else"focus"===x(c)?E(o,c,h,e,"all"):"auto"===x(c)&&E(o,c,h,e,"visible")}function s(e,t){if(e){if(!b("beforefocus",e,null,t))return!0;var i=e.getSpatialNavigationContainer();return i!==window&&"focus"===x(i)?e.focus():e.focus({preventScroll:!0}),n=null,!0}return!1}function l(e,t){return T(e,t)&&!B(e,t)?(w(e,t),!0):!e.parentElement&&!P(e,t)&&(w(e.ownerDocument.documentElement,t),!0)}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{mode:"visible"},n=[];if(e.childElementCount>0){e.parentElement||(e=e.getElementsByTagName("body")[0]||document.body);var i,r=f(e.children);try{for(r.s();!(i=r.n()).done;){var o=i.value;k(o)?n.push(o):O(o)?(n.push(o),!C(o)&&o.childElementCount&&(n=n.concat(u(o,{mode:"all"})))):o.childElementCount&&(n=n.concat(u(o,{mode:"all"})))}}catch(e){r.e(e)}finally{r.f()}}return"all"===t.mode?n:n.filter(N)}function c(e,t,n,i){var r=e;return i=i||r.getSpatialNavigationContainer(),d(r,n=!n||n.length<=0?u(i):n,t,i)}function h(e,t){var i,o=this,a=[],s=[],l=function(e){var t=e.getSpatialNavigationContainer(),n=t.focusableAreas(),i=[];return n.forEach(t=>{e!==t&&R(t,e)&&i.push(t)}),i}(o);t||(t={});var h=o.getSpatialNavigationContainer(),d=u(h),f=t.container||h;t.container&&h.contains(t.container)&&(d=d.concat(u(f)));var g=t.candidates&&t.candidates.length>0?t.candidates.filter(e=>f.contains(e)):d.filter(e=>f.contains(e)&&f!==e);if(g&&g.length>0){g.forEach(e=>{e!==o&&(o.contains(e)&&o!==e?a:s).push(e)});var v=l.filter(e=>!a.includes(e)),y=g.filter(e=>C(e)&&R(o,e)).map(e=>e.focusableAreas()).flat().filter(e=>e!==o);if(a=a.concat(v).filter(e=>f.contains(e)),(s=s.concat(y).filter(e=>f.contains(e))).length>0&&(s=c(o,e,s,f)),r&&(i=p(o,c(o,e,a,f),e)),a&&a.length>0&&"INPUT"!==o.nodeName&&(i=function(e,t,i){return m(e,t,i,n?H:j)}(o,a,e)),(i=i||p(o,s,e))&&k(i)){var b=u(i,{mode:"all"}),S=b.length>0?o.spatialNavigationSearch(e,{candidates:b,container:i}):null;S?i=S:O(i)||(g.splice(g.indexOf(i),1),i=g.length?o.spatialNavigationSearch(e,{candidates:g,container:f}):null)}return i}return null}function d(e,t,n,i){var o,a=e.getSpatialNavigationContainer();return void 0===n?t:(o=a.parentElement&&i!==a&&!N(e)?X(a):r||X(e),!C(e)&&"BODY"!==e.nodeName||"INPUT"===e.nodeName?t.filter(t=>{var r=X(t),a="IFRAME"===t.nodeName?t.contentDocument.body:null;return i.contains(t)&&t!==e&&a!==e&&_(r,o,n)&&!M(o,r)}):t.filter(t=>{var r=X(t);return i.contains(t)&&(e.contains(t)&&M(o,r)&&t!==e||_(r,o,n))}))}function p(e,t,n){var i,o,a=e.getSpatialNavigationContainer(),s=getComputedStyle(a).getPropertyValue("--spatial-navigation-function"),l=r||X(e);return"grid"===s?((o=t.filter(e=>V(l,X(e),n))).length>0&&(t=o),i=J):i=W,m(e,t,n,i)}function m(e,t,n,i){var o=null;window.location===window.parent.location||"BODY"!==e.nodeName&&"HTML"!==e.nodeName?o=r||e.getBoundingClientRect():((o=window.frameElement.getBoundingClientRect()).x=0,o.y=0);var a=Number.POSITIVE_INFINITY,s=[];if(t)for(var l=0;l<t.length;l++){var u=i(o,X(t[l]),n);u<a?(a=u,s=[t[l]]):u===a&&s.push(t[l])}return 0===s.length?null:s.length>1&&i===J?m(e,s,n,K):s[0]}function g(){var e=this;do{if(!e.parentElement){e=window.location!==window.parent.location?window.parent.document.documentElement:window.document.documentElement;break}e=e.parentElement}while(!C(e));return e}function v(e){var t=e;do{if(!t.parentElement){t=window.location!==window.parent.location?window.parent.document.documentElement:window.document.documentElement;break}t=t.parentElement}while(!A(t)||!N(t));return t!==document&&t!==document.documentElement||(t=window),t}function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{mode:"visible"},t=this.parentElement?this:document.body,n=Array.prototype.filter.call(t.getElementsByTagName("*"),O);return"all"===e.mode?n:n.filter(N)}function b(e,t,n,i){if(["beforefocus","notarget"].includes(e)){var r=new CustomEvent("nav"+e,{bubbles:!0,cancelable:!0,detail:{causedTarget:n,dir:i}});return t.dispatchEvent(r)}}function S(e,t){return(e.style.getPropertyValue(`--${t}`)||"").trim()}function x(e){return S(e,"spatial-navigation-action")||"auto"}function E(e,t,n,i,r){for(var o={candidates:u(t,{mode:r}),container:t};n;){if(s(e.spatialNavigationSearch(i,o),i))return;if("visible"===r&&l(t,i))return;if(!b("notarget",t,e,i))return;t===document||t===document.documentElement?window.location!==window.parent.location&&(t=(e=window.frameElement).ownerDocument.documentElement):t=n,o={candidates:u(t,{mode:r}),container:t};var a=t.getSpatialNavigationContainer();n=a!==t?a:null}o={candidates:u(t,{mode:r}),container:t},!n&&t&&s(e.spatialNavigationSearch(i,o),i)||b("notarget",o.container,e,i)&&("auto"!==x(t)||"visible"!==r||l(t,i))}function w(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e)switch(t){case"left":e.scrollLeft-=40+n;break;case"right":e.scrollLeft+=40+n;break;case"up":e.scrollTop-=40+n;break;case"down":e.scrollTop+=40+n}}function C(e){return!e.parentElement||"IFRAME"===e.nodeName||A(e)||function(e){return"contain"===S(e,"spatial-navigation-contain")}(e)}function k(e){return"delegable"===S(e,"spatial-navigation-contain")}function A(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("overflow-x"),i=t.getPropertyValue("overflow-y");return!!("visible"!==n&&"clip"!==n&&F(e,"left")||"visible"!==i&&"clip"!==i&&F(e,"down"))}function T(e,t){if(e&&"object"===D(e)){if(t&&"string"==typeof t){if(F(e,t)){var n=window.getComputedStyle(e,null),i=n.getPropertyValue("overflow-x"),r=n.getPropertyValue("overflow-y");switch(t){case"left":case"right":return"visible"!==i&&"clip"!==i&&"hidden"!==i;case"up":case"down":return"visible"!==r&&"clip"!==r&&"hidden"!==r}}return!1}return"HTML"===e.nodeName||"BODY"===e.nodeName||A(e)&&F(e)}}function F(e,t){if(e&&"object"===D(e)){if(!t||"string"!=typeof t)return e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight;switch(t){case"left":case"right":return e.scrollWidth>e.clientWidth;case"up":case"down":return e.scrollHeight>e.clientHeight}return!1}}function P(e,t){var n=!1;switch(t){case"left":n=0===e.scrollLeft;break;case"right":n=e.scrollWidth-e.scrollLeft-e.clientWidth===0;break;case"up":n=0===e.scrollTop;break;case"down":n=e.scrollHeight-e.scrollTop-e.clientHeight===0}return n}function B(e,t){if(T(e,t)){var n=e.scrollTop,i=e.scrollLeft,r=e.scrollHeight-e.clientHeight,o=e.scrollWidth-e.clientWidth;switch(t){case"left":return 0===i;case"right":return Math.abs(i-o)<=1;case"up":return 0===n;case"down":return Math.abs(n-r)<=1}}return!1}function I(e){var t=e.getBoundingClientRect(),n=v(e),i=null;return!(!M(i=n!==window?X(n):new DOMRect(0,0,window.innerWidth,window.innerHeight),t)||!M(i,t))}function O(e){return!(e.tabIndex<0||function(e){return"A"===e.tagName&&null===e.getAttribute("href")&&null===e.getAttribute("tabIndex")}(e)||function(e){return!!["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(e.tagName)&&e.disabled}(e)||function(e){return e.inert&&!e.ownerDocument.documentElement.inert}(e)||!function(e){return!!L(e.parentElement)&&!(!L(e)||"0"===e.style.opacity||"0px"===window.getComputedStyle(e).height||"0px"===window.getComputedStyle(e).width)}(e))&&(!!(!e.parentElement||T(e)&&F(e)||e.tabIndex>=0)||void 0)}function N(e){return!e.parentElement||L(e)&&function(e){var t=X(e);if("IFRAME"!==e.nodeName&&(t.top<0||t.left<0||t.top>e.ownerDocument.documentElement.clientHeight||t.left>e.ownerDocument.documentElement.clientWidth))return!1;var n=parseInt(e.offsetWidth)/10,i=parseInt(e.offsetHeight)/10;n=isNaN(n)?1:n,i=isNaN(i)?1:i;var r={middle:[(t.left+t.right)/2,(t.top+t.bottom)/2],leftTop:[t.left+n,t.top+i],rightBottom:[t.right-n,t.bottom-i]};for(var o in r){var a=e.ownerDocument.elementFromPoint(...r[o]);if(e===a||e.contains(a))return!0}return!1}(e)}function R(e,t){var n=X(e),i=X(t||e.getSpatialNavigationContainer());return!(n.left<i.left||n.right>i.right||n.top<i.top||n.bottom>i.bottom)}function L(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("visibility");return"none"!==t.getPropertyValue("display")&&!["hidden","collapse"].includes(n)}function M(e,t){var n=e.left<=t.right&&e.right>=t.right,i=e.left<=t.left&&e.right>=t.left,r=e.top<=t.top&&e.bottom>=t.top,o=e.top<=t.bottom&&e.bottom>=t.bottom;return(n||i)&&(r||o)}function _(e,t,n){switch(n){case"left":return U(t,e);case"right":return U(e,t);case"up":return z(t,e);case"down":return z(e,t);default:return!1}}function U(e,t){return e.left>=t.right||e.left>=t.left&&e.right>t.right&&e.bottom>t.top&&e.top<t.bottom}function z(e,t){return e.top>=t.bottom||e.top>=t.top&&e.bottom>t.bottom&&e.left<t.right&&e.right>t.left}function V(e,t,n){switch(n){case"left":case"right":return e.bottom>t.top&&e.top<t.bottom;case"up":case"down":return e.right>t.left&&e.left<t.right;default:return!1}}function H(e,t,i){var r=G(i,n,t),o=Math.abs(r.entryPoint.x-r.exitPoint.x),a=Math.abs(r.entryPoint.y-r.exitPoint.y);return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}function j(e,t,n){var i={left:"right",right:"left",up:"bottom",down:"top"}[n];return Math.abs(e[i]-t[i])}function W(e,t,n){var i,r,o,a,s,l,u,c=0,h=0,d=G(n,e,t),p=Math.abs(d.entryPoint.x-d.exitPoint.x),m=Math.abs(d.entryPoint.y-d.exitPoint.y),f=Math.sqrt(Math.pow(p,2)+Math.pow(m,2)),g=(o=e,a=t,s={width:0,height:0,area:0},l=[Math.max(o.left,a.left),Math.max(o.top,a.top)],u=[Math.min(o.right,a.right),Math.min(o.bottom,a.bottom)],s.width=Math.abs(l[0]-u[0]),s.height=Math.abs(l[1]-u[1]),l[0]>=u[0]||l[1]>=u[1]||(s.area=Math.sqrt(s.width*s.height)),s),v=g.area;switch(n){case"left":case"right":V(e,t,n)?h=Math.min(g.height/e.height,1):c=e.height/2,i=30*(m+c),r=5*h;break;case"up":case"down":V(e,t,n)?h=Math.min(g.width/e.width,1):c=e.width/2,i=2*(p+c),r=5*h;break;default:i=0,r=0}return f+i-r-v}function K(e,t,n){var i=G(n,e,t),r=Math.abs(i.entryPoint.x-i.exitPoint.x),o=Math.abs(i.entryPoint.y-i.exitPoint.y);return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))}function J(e,t,n){var i=G(n,e,t);return"left"===n||"right"===n?Math.abs(i.entryPoint.x-i.exitPoint.x):Math.abs(i.entryPoint.y-i.exitPoint.y)}function G(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"down",t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r={entryPoint:{x:0,y:0},exitPoint:{x:0,y:0}};if(n){switch(r.exitPoint=t,e){case"left":r.entryPoint.x=i.right;break;case"up":r.entryPoint.y=i.bottom;break;case"right":r.entryPoint.x=i.left;break;case"down":r.entryPoint.y=i.top}switch(e){case"left":case"right":n.y<=i.top?r.entryPoint.y=i.top:n.y<i.bottom?r.entryPoint.y=n.y:r.entryPoint.y=i.bottom;break;case"up":case"down":n.x<=i.left?r.entryPoint.x=i.left:n.x<i.right?r.entryPoint.x=n.x:r.entryPoint.x=i.right}}else{switch(e){case"left":r.exitPoint.x=t.left,r.entryPoint.x=i.right<t.left?i.right:t.left;break;case"up":r.exitPoint.y=t.top,r.entryPoint.y=i.bottom<t.top?i.bottom:t.top;break;case"right":r.exitPoint.x=t.right,r.entryPoint.x=i.left>t.right?i.left:t.right;break;case"down":r.exitPoint.y=t.bottom,r.entryPoint.y=i.top>t.bottom?i.top:t.bottom}switch(e){case"left":case"right":z(t,i)?(r.exitPoint.y=t.top,r.entryPoint.y=i.bottom<t.top?i.bottom:t.top):z(i,t)?(r.exitPoint.y=t.bottom,r.entryPoint.y=i.top>t.bottom?i.top:t.bottom):(r.exitPoint.y=Math.max(t.top,i.top),r.entryPoint.y=r.exitPoint.y);break;case"up":case"down":U(t,i)?(r.exitPoint.x=t.left,r.entryPoint.x=i.right<t.left?i.right:t.left):U(i,t)?(r.exitPoint.x=t.right,r.entryPoint.x=i.left>t.right?i.left:t.right):(r.exitPoint.x=Math.max(t.left,i.left),r.entryPoint.x=r.exitPoint.x)}}return r}function X(e){var n=t&&t.get(e);if(!n){var i=e.getBoundingClientRect();n={top:Number(i.top.toFixed(2)),right:Number(i.right.toFixed(2)),bottom:Number(i.bottom.toFixed(2)),left:Number(i.left.toFixed(2)),width:Number(i.width.toFixed(2)),height:Number(i.height.toFixed(2))},t&&t.set(e,n)}return n}function q(e){var t=window.__spatialNavigation__&&window.__spatialNavigation__.keyMode;window.__spatialNavigation__=!1===e?Y():Object.assign(Y(),function(){function e(e,t){return T(e,t)&&!B(e,t)||!e.parentElement&&!P(e,t)}function t(t,n,i,r){var o=n,a=null;if(o!==document&&o!==document.documentElement||(o=document.body||document.documentElement),(C(o)||"BODY"===o.nodeName)&&"INPUT"!==o.nodeName){"IFRAME"===o.nodeName&&(o=o.contentDocument.body);var s=u(o,r);if(Array.isArray(s)&&s.length>0)return t?c(o,i,s):o.spatialNavigationSearch(i,{candidates:s});if(e(o,i))return t?[]:o}var l=o.getSpatialNavigationContainer(),h=l.parentElement?l.getSpatialNavigationContainer():null;for(h||window.location===window.parent.location||(h=window.parent.document.documentElement);h;){var p=d(o,u(l,r),i,l);if(Array.isArray(p)&&p.length>0){if(a=o.spatialNavigationSearch(i,{candidates:p,container:l}))return t?p:a}else{if(e(l,i))return t?[]:o;if(l===document||l===document.documentElement){if(l=window.document.documentElement,window.location!==window.parent.location){if(o=window.frameElement,!(l=window.parent.document.documentElement).parentElement){h=null;break}h=l.getSpatialNavigationContainer()}}else{if(O(l)&&(o=l),!(l=h).parentElement){h=null;break}h=l.getSpatialNavigationContainer()}}}if(!h&&l){var m=d(o,u(l,r),i,l);if(Array.isArray(m)&&m.length>0&&(a=o.spatialNavigationSearch(i,{candidates:m,container:l})))return t?m:a}if(e(l,i))return o}return{isContainer:C,isScrollContainer:A,isVisibleInScroller:I,findCandidates:t.bind(null,!0),findNextTarget:t.bind(null,!1),getDistanceFromTarget:(e,t,n)=>(C(e)||"BODY"===e.nodeName)&&"INPUT"!==e.nodeName&&u(e).includes(t)?j(X(e),X(t),n):W(X(e),X(t),n)}}()),window.__spatialNavigation__.keyMode=t,Object.seal(window.__spatialNavigation__)}function Y(){return{enableExperimentalAPIs:q,get keyMode(){return this._keymode?this._keymode:"ARROW"},set keyMode(e){this._keymode=["SHIFTARROW","ARROW","NONE"].includes(e)?e:"ARROW"},setStartingPoint:function(e,t){n=e&&t?{x:e,y:t}:null}}}}());var zo='.ytaf-ui-container {\n position: absolute;\n top: 10%;\n left: 10%;\n right: 10%;\n bottom: 10%;\n\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 20px;\n padding: 20px;\n font-size: 1.5rem;\n z-index: 1000;\n}\n\n.ytaf-ui-container :focus {\n outline: 4px red solid;\n}\n\n.ytaf-ui-container h1 {\n margin: 0;\n margin-bottom: 0.5em;\n text-align: center;\n}\n\n.ytaf-ui-container input[type=\'checkbox\'] {\n width: 1.4rem;\n height: 1.4rem;\n}\n\n.ytaf-ui-container input[type=\'radio\'] {\n width: 1.4rem;\n height: 1.4rem;\n}\n\n.ytaf-ui-container label {\n display: block;\n font-size: 1.4rem;\n}\n\n.ytaf-notification-container {\n position: absolute;\n right: 10px;\n bottom: 10px;\n font-size: 16pt;\n z-index: 1200;\n}\n\n.ytaf-notification-container .message {\n background: rgba(0, 0, 0, 0.7);\n color: white;\n padding: 1em;\n margin: 0.5em;\n transition: all 0.3s ease-in-out;\n opacity: 1;\n line-height: 1;\n border-right: 10px solid rgba(50, 255, 50, 0.3);\n display: inline-block;\n float: right;\n}\n\n.ytaf-notification-container .message-hidden {\n opacity: 0;\n margin: 0 0.5em;\n padding: 0 1em;\n line-height: 0;\n}\n\n/* Fixes transparency effect for the video player */\n\n.ytLrWatchDefaultShadow,\ndiv[idomkey="shadow"] {\n background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.8) 90%) !important;\n background-color: rgba(0, 0, 0, 0.3) !important;\n display: block !important;\n height: 100% !important;\n pointer-events: none !important;\n position: absolute !important;\n width: 100% !important;\n}\n\n/* https://github.com/webosbrew/youtube-webos/commit/4fbe38a18df31ddd62b6cf15f141dd58e1d1a71d */\n.ytLrWatchDefault2025Shadow {\n background-color: rgba(11, 11, 11, 0.5) !important;\n}\n\n/* Fixes shorts having a black background */\n\n.ytLrTileHeaderRendererShorts {\n background-image: none !important;\n}\n\n/* Multiline support for strings in the UI */\n\n.ytLrOverlayPanelHeaderRendererSubtitle {\n white-space: pre-wrap !important;\n}\n\n/* Fixes SponsorBlock segments overlapping with the playhead */\n\n.ytLrProgressBarPlayhead {\n z-index: 1 !important;\n}\n\n.ytLrProgressBarPlayed {\n z-index: 1 !important;\n}\n\n.ytLrSearchBarSearchVoice {\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n pointer-events: auto\n}\n\n.ytLrSearchVoiceHost {\n font-size: 3rem;\n}\n\n.ytLrSearchVoiceMicButtonHost {\n color: rgba(255, 255, 255, 0.7);\n}\n\n.ytLrSearchVoiceMicButtonHost {\n background-color: rgba(255, 255, 255, 0.1);\n border-radius: 50%;\n color: #f1f1f1;\n display: block;\n text-align: center;\n width: 1em;\n height: 1em;\n}\n\n.ytLrSearchVoiceMicButtonIcon {\n display: inline-block;\n font-size: .5em;\n height: .5em;\n width: .5em;\n height: 1em;\n width: 1em;\n margin-top: .5em;\n vertical-align: top !important;\n}\n\n.ytContribIconHost {\n display: inline-block;\n vertical-align: middle;\n}\n\n.ytContribIconTvArrowLeft::before {\n content: "\\e822";\n}\n\n.ytContribIconHost::before {\n font-family: "YouTube Icons Outlined";\n}',Vo=document.createElement("style"),Ho="";function jo(){Ho=`\n ytlr-guide-response yt-focus-container {\n background-color: ${Er("focusContainerColor")};\n }\n\n #container {\n background-color: ${Er("routeColor")} !important;\n }\n`;var e=document.querySelector("style[nonce]");e?e.textContent+=Ho:Vo.textContent=Ho}function Wo(){var e,t;for(var n in window._yttv)if(window._yttv[n]&&window._yttv[n].getInstance)if(window._yttv[n].toString().includes("ytlrActionRouter"))e=window._yttv[n].getInstance();else{var i,r=!1,o=window._yttv[n].getInstance(),a=f(Object.getOwnPropertyNames(Object.getPrototypeOf(o)));try{for(a.s();!(i=a.n()).done;){var s=i.value;"function"==typeof o[s]&&o[s].toString().includes("ytlrActionRouter")&&(t=o[s],r=!0)}}catch(e){a.e(e)}finally{a.f()}r&&(e=window._yttv[n].getInstance())}if(e){if(!t){var l,u=f(Object.getOwnPropertyNames(Object.getPrototypeOf(e)));try{for(u.s();!(l=u.n()).done;){var c=l.value;"function"==typeof e[c]&&e[c].toString().includes("ytlrActionRouter")&&(t=e[c])}}catch(e){u.e(e)}finally{u.f()}}if(t){var h;for(var d in window._yttv)window._yttv[d]&&"function"==typeof window._yttv[d]&&window._yttv[d].toString().includes("this.actionName")&&(h=window._yttv[d]);return{executeFunction:t.bind(e),commandFunction:h}}}}document.head.appendChild(Vo),jo();var Ko,Jo=setInterval(()=>{document.querySelector("video")&&(!function(){var e=document.querySelector("style[nonce]");if(e)e.textContent+=zo;else{var t=document.createElement("style");t.textContent=zo,document.head.appendChild(t)}if(Er("enableFixedUI"))try{window.tectonicConfig.featureSwitches.isLimitedMemory=!1,window.tectonicConfig.clientData.legacyApplicationQuality="full-animation",window.tectonicConfig.featureSwitches.enableAnimations=!0,window.tectonicConfig.featureSwitches.enableOnScrollLinearAnimation=!0,window.tectonicConfig.featureSwitches.enableListAnimations=!0,window.tectonicConfig.featureSwitches.supportsLongPress=!0}catch(e){}window.__spatialNavigation__.keyMode="NONE";var n={37:"left",38:"up",39:"right",40:"down"},i=document.createElement("div");i.classList.add("ytaf-ui-container"),i.style.display="none",i.setAttribute("tabindex",0),i.addEventListener("focus",()=>console.info("uiContainer focused!"),!0),i.addEventListener("blur",()=>console.info("uiContainer blured!"),!0),i.addEventListener("keydown",e=>{if(console.info("uiContainer key event:",e.type,e.keyCode,e),404!==e.keyCode&&172!==e.keyCode){var t;if(e.keyCode in n)navigate(n[e.keyCode]);else{if(13===e.keyCode||32===e.keyCode){console.log("OK button pressed");var r=document.querySelector(":focus");return"checkbox"===r.type&&(r.checked=!r.checked,r.dispatchEvent(new Event("change"))),e.preventDefault(),void e.stopPropagation()}if(27===e.keyCode&&"text"!==document.querySelector(":focus").type)i.style.display="none",i.blur();else if("text"===document.querySelector(":focus").type&&27===e.keyCode){var o=document.querySelector(":focus");o.value=o.value.slice(0,-1)}}"Enter"!==e.key&&"Enter"!==(null===(t=e.Uc)||void 0===t?void 0:t.key)||"text"===document.querySelector(":focus").type&&document.querySelector(":focus").dispatchEvent(new Event("change"))}},!0);try{i.innerHTML='\n<h1>TizenTube Theme Configuration</h1>\n<label for="__barColor">Navigation Bar Color: <input type="text" id="__barColor"/></label>\n<label for="__routeColor">Main Content Color: <input type="text" id="__routeColor"/></label>\n<div><small>Sponsor segments skipping - https://sponsor.ajay.app</small></div>\n',document.querySelector("body").appendChild(i),i.querySelector("#__barColor").value=Er("focusContainerColor"),i.querySelector("#__barColor").addEventListener("change",e=>{wr("focusContainerColor",e.target.value),jo()}),i.querySelector("#__routeColor").value=Er("routeColor"),i.querySelector("#__routeColor").addEventListener("change",e=>{wr("routeColor",e.target.value),jo()})}catch(e){}var r=e=>{if(console.info("Key event:",e.type,e.keyCode,e.keyCode,e.defaultPrevented),e.keyCode in Xo){var t=10*Xo[e.keyCode],n=document.querySelector("video");n.currentTime=t/100*n.duration}var r,o,a,s,l=document.getElementById("container");if(window.screenTurnedOffAt&&Date.now()-window.screenTurnedOffAt>1e3){var u,c=f(document.body.children);try{for(c.s();!(u=c.n()).done;){var h=u.value;"script"!==h.tagName.toLowerCase()&&"svg"!==h.tagName.toLowerCase()&&h.style.setProperty("display","block","important")}}catch(e){c.e(e)}finally{c.f()}window.screenTurnedOffAt=null}if(Er("enableScreenDimming")&&(Go&&clearTimeout(Go),l.style.setProperty("opacity","1","important"),Go=setTimeout(()=>{document.querySelector(".html5-video-player").getPlayerStateObject().isPlaying||l.style.setProperty("opacity",(1-Er("dimmingOpacity")).toString(),"important")},1e3*Er("dimmingTimeout"))),403==e.keyCode){if(console.info("Taking over!"),e.preventDefault(),e.stopPropagation(),"keydown"===e.type)try{"none"===i.style.display?(console.info("Showing and focusing!"),i.style.display="block",i.focus()):(console.info("Hiding!"),i.style.display="none",i.blur())}catch(e){}return!1}if(404==e.keyCode)"keydown"===e.type&&to();else if(39==e.keyCode){if("keydown"===e.type)if(document.querySelector("ytlr-search-text-box > .zylon-focus")&&window.isPipPlaying)document.querySelector("ytlr-player").style.setProperty("background-color","rgb(0, 0, 0)"),r=Cr.loadedPlaybackConfig,o=r.clickTrackingParams,a=r.commandMetadata,(s=r.watchEndpoint).startTimeSeconds=Math.floor(document.querySelector("video").currentTime),co({clickTrackingParams:o,commandMetadata:a,watchEndpoint:s}),window.isPipPlaying=!1}return!0};document.addEventListener("keydown",r,!0),document.addEventListener("keypress",r,!0),document.addEventListener("keyup",r,!0),Er("showWelcomeToast")&&setTimeout(()=>{Mr(mr("welcomeMsg.title"),mr("welcomeMsg.subtitle"))},2e3);Er("reloadHomeOnStartup")&&(Er("launchToOnStartup")?co(JSON.parse(Er("launchToOnStartup"))):co({signalAction:{signal:"SOFT_RELOAD_PAGE"}}));var o=Wo();o&&o.executeFunction(new o.commandFunction("reloadGuideAction"));if(Er("enableFixedUI"))try{new MutationObserver((e,t)=>{var n=document.body;n.classList.contains("app-quality-root")&&n.classList.remove("app-quality-root")}).observe(document.body,{attributes:!0,childList:!1,subtree:!1})}catch(e){}}(),ho(),clearInterval(Jo))},250),Go=null,Xo={49:1,50:2,51:3,52:4,53:5,54:6,55:7,56:8,57:9,48:0};function qo(e){var t=JSON.parse(localStorage["yt.leanback.default::recurring_actions"]),n=Er("permanentlyEnableWhoIsWatchingMenu"),i=new Date;if(e){var r,o;if(i.getTime()-(null===(r=t.data.data["startup-screen-account-selector-with-guest"])||void 0===r?void 0:r.lastFired)>0&&i.getTime()-(null===(o=t.data.data["startup-screen-account-selector-with-guest"])||void 0===o?void 0:o.lastFired)<72e5&&!n)return;function a(){t.data.data["startup-screen-account-selector-with-guest"]&&(t.data.data["startup-screen-account-selector-with-guest"].lastFired=i.getTime()),t.data.data.whos_watching_fullscreen_zero_accounts.lastFired=i.getTime(),t.data.data["startup-screen-signed-out-welcome-back"]&&(t.data.data["startup-screen-signed-out-welcome-back"].lastFired=i.getTime()),localStorage["yt.leanback.default::recurring_actions"]=JSON.stringify(t)}a(),n?(i.setDate(i.getDate()-7),a(),Ko=setInterval(a,6e4)):Ko&&clearInterval(Ko)}else i.setDate(i.getDate()+7),t.data.data["startup-screen-account-selector-with-guest"]&&(t.data.data["startup-screen-account-selector-with-guest"].lastFired=i.getTime()),t.data.data.whos_watching_fullscreen_zero_accounts.lastFired=i.getTime(),t.data.data["startup-screen-signed-out-welcome-back"]&&(t.data.data["startup-screen-signed-out-welcome-back"].lastFired=i.getTime()),localStorage["yt.leanback.default::recurring_actions"]=JSON.stringify(t)}Dr.addEventListener("configChange",e=>{var t=e.detail,n=t.key,i=t.value;"enableWhoIsWatchingMenu"===n&&qo(i)}),qo(Er("enableWhoIsWatchingMenu"));var Yo={language:{standard:{long:{aa:"Afar",ab:"Abkhazian",ace:"Acehnese",ach:"Acoli",ada:"Adangme",ady:"Adyghe",ae:"Avestan",aeb:"Tunisian Arabic",af:"Afrikaans",afh:"Afrihili",agq:"Aghem",ain:"Ainu",ak:"Akan",akk:"Akkadian",akz:"Alabama",ale:"Aleut",aln:"Gheg Albanian",alt:"Southern Altai",am:"Amharic",an:"Aragonese",ang:"Old English",ann:"Obolo",anp:"Angika",ar:"Arabic","ar-001":"Arabic (world)",arc:"Aramaic",arn:"Mapuche",aro:"Araona",arp:"Arapaho",arq:"Algerian Arabic",ars:"Najdi Arabic",arw:"Arawak",ary:"Moroccan Arabic",arz:"Egyptian Arabic",as:"Assamese",asa:"Asu",ase:"American Sign Language",ast:"Asturian",atj:"Atikamekw",av:"Avaric",avk:"Kotava",awa:"Awadhi",ay:"Aymara",az:"Azerbaijani",ba:"Bashkir",bal:"Baluchi",ban:"Balinese",bar:"Bavarian",bas:"Basaa",bax:"Bamun",bbc:"Batak Toba",bbj:"Ghomala",be:"Belarusian",bej:"Beja",bem:"Bemba",bew:"Betawi",bez:"Bena",bfd:"Bafut",bfq:"Badaga",bg:"Bulgarian",bgc:"Haryanvi",bgn:"Western Balochi",bho:"Bhojpuri",bi:"Bislama",bik:"Bikol",bin:"Bini",bjn:"Banjar",bkm:"Kom",bla:"Siksiká",blo:"Anii",blt:"Tai Dam",bm:"Bambara",bn:"Bangla",bo:"Tibetan",bpy:"Bishnupriya",bqi:"Bakhtiari",br:"Breton",bra:"Braj",brh:"Brahui",brx:"Bodo",bs:"Bosnian",bss:"Akoose",bua:"Buriat",bug:"Buginese",bum:"Bulu",byn:"Blin",byv:"Medumba",ca:"Catalan",cad:"Caddo",car:"Carib",cay:"Cayuga",cch:"Atsam",ccp:"Chakma",ce:"Chechen",ceb:"Cebuano",cgg:"Chiga",ch:"Chamorro",chb:"Chibcha",chg:"Chagatai",chk:"Chuukese",chm:"Mari",chn:"Chinook Jargon",cho:"Choctaw",chp:"Chipewyan",chr:"Cherokee",chy:"Cheyenne",cic:"Chickasaw",ckb:"Central Kurdish",clc:"Chilcotin",co:"Corsican",cop:"Coptic",cps:"Capiznon",cr:"Cree",crg:"Michif",crh:"Crimean Tatar",crj:"Southern East Cree",crk:"Plains Cree",crl:"Northern East Cree",crm:"Moose Cree",crr:"Carolina Algonquian",crs:"Seselwa Creole French",cs:"Czech",csb:"Kashubian",csw:"Swampy Cree",cu:"Church Slavic",cv:"Chuvash",cwd:"Woods Cree",cy:"Welsh",da:"Danish",dak:"Dakota",dar:"Dargwa",dav:"Taita",de:"German","de-AT":"German (Austria)","de-CH":"German (Switzerland)",del:"Delaware",den:"Slave",dgr:"Dogrib",din:"Dinka",dje:"Zarma",doi:"Dogri",dsb:"Lower Sorbian",dtp:"Central Dusun",dua:"Duala",dum:"Middle Dutch",dv:"Divehi",dyo:"Jola-Fonyi",dyu:"Dyula",dz:"Dzongkha",dzg:"Dazaga",ebu:"Embu",ee:"Ewe",efi:"Efik",egl:"Emilian",egy:"Ancient Egyptian",eka:"Ekajuk",el:"Greek",elx:"Elamite",en:"English","en-AU":"English (Australia)","en-CA":"English (Canada)","en-GB":"English (United Kingdom)","en-US":"English (United States)",enm:"Middle English",eo:"Esperanto",es:"Spanish","es-419":"Spanish (Latin America)","es-ES":"Spanish (Spain)","es-MX":"Spanish (Mexico)",esu:"Central Yupik",et:"Estonian",eu:"Basque",ewo:"Ewondo",ext:"Extremaduran",fa:"Persian","fa-AF":"Persian (Afghanistan)",fan:"Fang",fat:"Fanti",ff:"Fula",fi:"Finnish",fil:"Filipino",fit:"Tornedalen Finnish",fj:"Fijian",fo:"Faroese",fon:"Fon",fr:"French","fr-CA":"French (Canada)","fr-CH":"French (Switzerland)",frc:"Cajun French",frm:"Middle French",fro:"Old French",frp:"Arpitan",frr:"Northern Frisian",frs:"Eastern Frisian",fur:"Friulian",fy:"Western Frisian",ga:"Irish",gaa:"Ga",gag:"Gagauz",gan:"Gan Chinese",gay:"Gayo",gba:"Gbaya",gbz:"Zoroastrian Dari",gd:"Scottish Gaelic",gez:"Geez",gil:"Gilbertese",gl:"Galician",glk:"Gilaki",gmh:"Middle High German",gn:"Guarani",goh:"Old High German",gon:"Gondi",gor:"Gorontalo",got:"Gothic",grb:"Grebo",grc:"Ancient Greek",gsw:"Swiss German",gu:"Gujarati",guc:"Wayuu",gur:"Frafra",guz:"Gusii",gv:"Manx",gwi:"Gwichʼin",ha:"Hausa",hai:"Haida",hak:"Hakka Chinese",haw:"Hawaiian",hax:"Southern Haida",hdn:"Northern Haida",he:"Hebrew",hi:"Hindi","hi-Latn":"Hindi (Latin)",hif:"Fiji Hindi",hil:"Hiligaynon",hit:"Hittite",hmn:"Hmong",hnj:"Hmong Njua",ho:"Hiri Motu",hr:"Croatian",hsb:"Upper Sorbian",hsn:"Xiang Chinese",ht:"Haitian Creole",hu:"Hungarian",hup:"Hupa",hur:"Halkomelem",hy:"Armenian",hz:"Herero",ia:"Interlingua",iba:"Iban",ibb:"Ibibio",id:"Indonesian",ie:"Interlingue",ig:"Igbo",ii:"Sichuan Yi",ik:"Inupiaq",ike:"Eastern Canadian Inuktitut",ikt:"Western Canadian Inuktitut",ilo:"Iloko",inh:"Ingush",io:"Ido",is:"Icelandic",it:"Italian",iu:"Inuktitut",izh:"Ingrian",ja:"Japanese",jam:"Jamaican Creole English",jbo:"Lojban",jgo:"Ngomba",jmc:"Machame",jpr:"Judeo-Persian",jrb:"Judeo-Arabic",jut:"Jutish",jv:"Javanese",ka:"Georgian",kaa:"Kara-Kalpak",kab:"Kabyle",kac:"Kachin",kaj:"Jju",kam:"Kamba",kaw:"Kawi",kbd:"Kabardian",kbl:"Kanembu",kcg:"Tyap",kde:"Makonde",kea:"Kabuverdianu",ken:"Kenyang",kfo:"Koro",kg:"Kongo",kgp:"Kaingang",kha:"Khasi",kho:"Khotanese",khq:"Koyra Chiini",khw:"Khowar",ki:"Kikuyu",kiu:"Kirmanjki",kj:"Kuanyama",kk:"Kazakh",kkj:"Kako",kl:"Kalaallisut",kln:"Kalenjin",km:"Khmer",kmb:"Kimbundu",kn:"Kannada",ko:"Korean",koi:"Komi-Permyak",kok:"Konkani",kos:"Kosraean",kpe:"Kpelle",kr:"Kanuri",krc:"Karachay-Balkar",kri:"Krio",krj:"Kinaray-a",krl:"Karelian",kru:"Kurukh",ks:"Kashmiri",ksb:"Shambala",ksf:"Bafia",ksh:"Colognian",ku:"Kurdish",kum:"Kumyk",kut:"Kutenai",kv:"Komi",kw:"Cornish",kwk:"Kwakʼwala",kxv:"Kuvi",ky:"Kyrgyz",la:"Latin",lad:"Ladino",lag:"Langi",lah:"Western Panjabi",lam:"Lamba",lb:"Luxembourgish",lez:"Lezghian",lfn:"Lingua Franca Nova",lg:"Ganda",li:"Limburgish",lij:"Ligurian",lil:"Lillooet",liv:"Livonian",lkt:"Lakota",lmo:"Lombard",ln:"Lingala",lo:"Lao",lol:"Mongo",lou:"Louisiana Creole",loz:"Lozi",lrc:"Northern Luri",lsm:"Saamia",lt:"Lithuanian",ltg:"Latgalian",lu:"Luba-Katanga",lua:"Luba-Lulua",lui:"Luiseno",lun:"Lunda",luo:"Luo",lus:"Mizo",luy:"Luyia",lv:"Latvian",lzh:"Literary Chinese",lzz:"Laz",mad:"Madurese",maf:"Mafa",mag:"Magahi",mai:"Maithili",mak:"Makasar",man:"Mandingo",mas:"Masai",mde:"Maba",mdf:"Moksha",mdr:"Mandar",men:"Mende",mer:"Meru",mfe:"Morisyen",mg:"Malagasy",mga:"Middle Irish",mgh:"Makhuwa-Meetto",mgo:"Metaʼ",mh:"Marshallese",mi:"Māori",mic:"Mi'kmaw",min:"Minangkabau",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mnc:"Manchu",mni:"Manipuri",moe:"Innu-aimun",moh:"Mohawk",mos:"Mossi",mr:"Marathi",mrj:"Western Mari",ms:"Malay",mt:"Maltese",mua:"Mundang",mul:"Multiple languages",mus:"Muscogee",mwl:"Mirandese",mwr:"Marwari",mwv:"Mentawai",my:"Burmese",mye:"Myene",myv:"Erzya",mzn:"Mazanderani",na:"Nauru",nan:"Min Nan Chinese",nap:"Neapolitan",naq:"Nama",nb:"Norwegian Bokmål",nd:"North Ndebele",nds:"Low German","nds-NL":"Low German (Netherlands)",ne:"Nepali",new:"Newari",ng:"Ndonga",nia:"Nias",niu:"Niuean",njo:"Ao Naga",nl:"Dutch","nl-BE":"Dutch (Belgium)",nmg:"Kwasio",nn:"Norwegian Nynorsk",nnh:"Ngiemboon",no:"Norwegian",nog:"Nogai",non:"Old Norse",nov:"Novial",nqo:"N’Ko",nr:"South Ndebele",nso:"Northern Sotho",nus:"Nuer",nv:"Navajo",nwc:"Classical Newari",ny:"Nyanja",nym:"Nyamwezi",nyn:"Nyankole",nyo:"Nyoro",nzi:"Nzima",oc:"Occitan",oj:"Ojibwa",ojb:"Northwestern Ojibwa",ojc:"Central Ojibwa",ojg:"Eastern Ojibwa",ojs:"Oji-Cree",ojw:"Western Ojibwa",oka:"Okanagan",om:"Oromo",or:"Odia",os:"Ossetic",osa:"Osage",ota:"Ottoman Turkish",pa:"Punjabi",pag:"Pangasinan",pal:"Pahlavi",pam:"Pampanga",pap:"Papiamento",pau:"Palauan",pcd:"Picard",pcm:"Nigerian Pidgin",pdc:"Pennsylvania German",pdt:"Plautdietsch",peo:"Old Persian",pfl:"Palatine German",phn:"Phoenician",pi:"Pali",pis:"Pijin",pl:"Polish",pms:"Piedmontese",pnt:"Pontic",pon:"Pohnpeian",pqm:"Maliseet-Passamaquoddy",prg:"Prussian",pro:"Old Provençal",ps:"Pashto",pt:"Portuguese","pt-BR":"Portuguese (Brazil)","pt-PT":"Portuguese (Portugal)",qu:"Quechua",quc:"Kʼicheʼ",qug:"Chimborazo Highland Quichua",raj:"Rajasthani",rap:"Rapanui",rar:"Rarotongan",rgn:"Romagnol",rhg:"Rohingya",rif:"Riffian",rm:"Romansh",rn:"Rundi",ro:"Romanian","ro-MD":"Romanian (Moldova)",rof:"Rombo",rom:"Romany",rtm:"Rotuman",ru:"Russian",rue:"Rusyn",rug:"Roviana",rup:"Aromanian",rw:"Kinyarwanda",rwk:"Rwa",sa:"Sanskrit",sad:"Sandawe",sah:"Yakut",sam:"Samaritan Aramaic",saq:"Samburu",sas:"Sasak",sat:"Santali",saz:"Saurashtra",sba:"Ngambay",sbp:"Sangu",sc:"Sardinian",scn:"Sicilian",sco:"Scots",sd:"Sindhi",sdc:"Sassarese Sardinian",sdh:"Southern Kurdish",se:"Northern Sami",see:"Seneca",seh:"Sena",sei:"Seri",sel:"Selkup",ses:"Koyraboro Senni",sg:"Sango",sga:"Old Irish",sgs:"Samogitian",sh:"Serbo-Croatian",shi:"Tachelhit",shn:"Shan",shu:"Chadian Arabic",si:"Sinhala",sid:"Sidamo",sk:"Slovak",sl:"Slovenian",slh:"Southern Lushootseed",sli:"Lower Silesian",sly:"Selayar",sm:"Samoan",sma:"Southern Sami",smj:"Lule Sami",smn:"Inari Sami",sms:"Skolt Sami",sn:"Shona",snk:"Soninke",so:"Somali",sog:"Sogdien",sq:"Albanian",sr:"Serbian","sr-ME":"Serbian (Montenegro)",srn:"Sranan Tongo",srr:"Serer",ss:"Swati",ssy:"Saho",st:"Southern Sotho",stq:"Saterland Frisian",str:"Straits Salish",su:"Sundanese",suk:"Sukuma",sus:"Susu",sux:"Sumerian",sv:"Swedish",sw:"Swahili","sw-CD":"Swahili (Congo - Kinshasa)",swb:"Comorian",syc:"Classical Syriac",syr:"Syriac",szl:"Silesian",ta:"Tamil",tce:"Southern Tutchone",tcy:"Tulu",te:"Telugu",tem:"Timne",teo:"Teso",ter:"Tereno",tet:"Tetum",tg:"Tajik",tgx:"Tagish",th:"Thai",tht:"Tahltan",ti:"Tigrinya",tig:"Tigre",tiv:"Tiv",tk:"Turkmen",tkl:"Tokelau",tkr:"Tsakhur",tl:"Tagalog",tlh:"Klingon",tli:"Tlingit",tly:"Talysh",tmh:"Tamashek",tn:"Tswana",to:"Tongan",tog:"Nyasa Tonga",tok:"Toki Pona",tpi:"Tok Pisin",tr:"Turkish",tru:"Turoyo",trv:"Taroko",trw:"Torwali",ts:"Tsonga",tsd:"Tsakonian",tsi:"Tsimshian",tt:"Tatar",ttm:"Northern Tutchone",ttt:"Muslim Tat",tum:"Tumbuka",tvl:"Tuvalu",tw:"Twi",twq:"Tasawaq",ty:"Tahitian",tyv:"Tuvinian",tzm:"Central Atlas Tamazight",udm:"Udmurt",ug:"Uyghur",uga:"Ugaritic",uk:"Ukrainian",umb:"Umbundu",und:"Unknown language",ur:"Urdu",uz:"Uzbek",vai:"Vai",ve:"Venda",vec:"Venetian",vep:"Veps",vi:"Vietnamese",vls:"West Flemish",vmf:"Main-Franconian",vmw:"Makhuwa",vo:"Volapük",vot:"Votic",vro:"Võro",vun:"Vunjo",wa:"Walloon",wae:"Walser",wal:"Wolaytta",war:"Waray",was:"Washo",wbp:"Warlpiri",wo:"Wolof",wuu:"Wu Chinese",xal:"Kalmyk",xh:"Xhosa",xmf:"Mingrelian",xnr:"Kangri",xog:"Soga",yao:"Yao",yap:"Yapese",yav:"Yangben",ybb:"Yemba",yi:"Yiddish",yo:"Yoruba",yrl:"Nheengatu",yue:"Cantonese",za:"Zhuang",zap:"Zapotec",zbl:"Blissymbols",zea:"Zeelandic",zen:"Zenaga",zgh:"Standard Moroccan Tamazight",zh:"Chinese","zh-Hans":"Simplified Chinese","zh-Hant":"Traditional Chinese",zu:"Zulu",zun:"Zuni",zxx:"No linguistic content",zza:"Zaza"}}},region:{long:{"001":"world","002":"Africa","003":"North America","005":"South America","009":"Oceania","011":"Western Africa","013":"Central America","014":"Eastern Africa","015":"Northern Africa","017":"Middle Africa","018":"Southern Africa","019":"Americas","021":"Northern America","029":"Caribbean","030":"Eastern Asia","034":"Southern Asia","035":"Southeast Asia","039":"Southern Europe","053":"Australasia","054":"Melanesia","057":"Micronesian Region","061":"Polynesia",142:"Asia",143:"Central Asia",145:"Western Asia",150:"Europe",151:"Eastern Europe",154:"Northern Europe",155:"Western Europe",202:"Sub-Saharan Africa",419:"Latin America",AC:"Ascension Island",AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua & Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia & Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"St. Barthélemy",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BQ:"Caribbean Netherlands",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Congo - Kinshasa",CF:"Central African Republic",CG:"Congo - Brazzaville",CH:"Switzerland",CI:"Côte d’Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CP:"Clipperton Island",CQ:"Sark",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czechia",DE:"Germany",DG:"Diego Garcia",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EA:"Ceuta & Melilla",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",EU:"European Union",EZ:"Eurozone",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia & South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong SAR China",HM:"Heard & McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",IC:"Canary Islands",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"St. Kitts & Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"St. Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"St. Martin",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar (Burma)",MN:"Mongolia",MO:"Macao SAR China",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"St. Pierre & Miquelon",PN:"Pitcairn Islands",PR:"Puerto Rico",PS:"Palestinian Territories",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",QO:"Outlying Oceania",RE:"Réunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"St. Helena",SI:"Slovenia",SJ:"Svalbard & Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"São Tomé & Príncipe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Eswatini",TA:"Tristan da Cunha",TC:"Turks & Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Türkiye",TT:"Trinidad & Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"U.S. Outlying Islands",UN:"United Nations",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Vatican City",VC:"St. Vincent & Grenadines",VE:"Venezuela",VG:"British Virgin Islands",VI:"U.S. Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis & Futuna",WS:"Samoa",XA:"Pseudo-Accents",XB:"Pseudo-Bidi",XK:"Kosovo",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"Unknown Region",BA:"Bosnia",GB:"UK",HK:"Hong Kong",MM:"Myanmar",MO:"Macao",PS:"Palestine",UN:"UN",US:"US"}}},$o=["af","sq","am","ar","hy","as","az","eu","be","bn","bs","bg","my","ca","zh-CN","zh-TW","zh-HK","hr","cs","da","nl","en","et","fil","fi","fr","gl","ka","de","el","gu","he","hi","hu","is","id","ga","it","ja","kn","kk","km","ko","ky","lo","lv","lt","mk","ms","ml","mt","mr","mn","ne","no","or","fa","pl","pt","pa","ro","ru","sr","si","sk","sl","es","sw","sv","ta","te","th","tr","uk","ur","uz","vi","cy","yi","yo","zu"];var Qo=!1;function Zo(e,t){return{compactLinkRenderer:{title:{simpleText:t},serviceEndpoint:{commandExecutorCommand:{commands:[{selectSubtitlesTrackCommand:{translationLanguage:{languageCode:e,languageName:t}}},{openClientOverlayAction:{type:"CLIENT_OVERLAY_TYPE_CAPTIONS_LANGUAGE",updateAction:!0}},{signalAction:{signal:"POPUP_BACK"}}]}},secondaryIcon:{iconType:"RADIO_BUTTON_UNCHECKED"}}}}function ea(){if(!Qo){if(!document.querySelector(".html5-video-player"))return setTimeout(ea,250);if(!window._yttv)return setTimeout(ea,250);var e=Object.values(window._yttv).find(e=>e&&e.instance&&"function"==typeof e.instance.resolveCommand);if(e&&!e.instance.resolveCommand.isPatchedBySubtitleLocalization){var t=e.instance.resolveCommand;e.instance.resolveCommand=function(e,n){var i;if("CLIENT_OVERLAY_TYPE_CAPTIONS_AUTO_TRANSLATE"===(null==e||null===(i=e.openPopupAction)||void 0===i?void 0:i.uniqueId)){var r=Er("enableShowUserLanguage"),o=Er("enableShowOtherLanguages");if(!r&&!o)return t.apply(this,arguments);var a=e.openPopupAction.popup.overlaySectionRenderer.overlay.overlayTwoPanelRenderer.actionPanel.overlayPanelRenderer.content.overlayPanelItemListRenderer.items,s=function(e){var t=new Set;return e.forEach(e=>{if(e.compactLinkRenderer&&e.compactLinkRenderer.serviceEndpoint){var n,i=null===(n=e.compactLinkRenderer.serviceEndpoint.commandExecutorCommand)||void 0===n?void 0:n.commands;if(i&&i[0]&&i[0].selectSubtitlesTrackCommand){var r=i[0].selectSubtitlesTrackCommand.translationLanguage;r&&(t.add(r.languageCode),t.add(r.languageName))}}}),t}(a);if(r){var l=function(){try{return window.yt&&window.yt.config_&&window.yt.config_.GL?window.yt.config_.GL:(console.warn("TizenTube Subtitle Localization: Could not determine user country code"),null)}catch(e){return console.error("TizenTube Subtitle Localization: Error getting country code:",e),null}}(),u=function(e){if(!e)return null;try{var t=String(e).toUpperCase(),n={CN:"zh-CN",TW:"zh-TW",HK:"zh-HK",SG:"zh-CN"};if(n[t]){var i=n[t];return{code:i,name:Yo.language.standard.long[i]||i}}var r=new Intl.Locale("und",{region:t}),o=(r.maximize?r.maximize():r).language||"en";return{code:o,name:Yo.language.standard.long[o]||o}}catch(t){return console.warn("TizenTube Subtitle Localization: Could not infer language for country",e,t),null}}(l);if(u)if(function(e,t,n){return e.some(e=>{if(e.compactLinkRenderer&&e.compactLinkRenderer.serviceEndpoint){var i,r=null===(i=e.compactLinkRenderer.serviceEndpoint.commandExecutorCommand)||void 0===i?void 0:i.commands;if(r&&r[0]&&r[0].selectSubtitlesTrackCommand){var o=r[0].selectSubtitlesTrackCommand.translationLanguage;return o&&(o.languageCode===t||o.languageName===n)}}return!1})}(a,u.code,u.name))console.log(`%c[TizenTube Subtitle Localization] User's language ${u.name} already exists in menu`,"background: #4CAF50; color: #ffffff; font-size: 12px;");else{console.log(`%c[TizenTube Subtitle Localization] Adding user's local language: ${u.name} (${u.code})`,"background: #2196F3; color: #ffffff; font-size: 14px; font-weight: bold;");var c=Zo(u.code,u.name),h=a.findIndex(e=>{var t;return"Recommended languages"===(null===(t=e.overlayMessageRenderer)||void 0===t||null===(t=t.subtitle)||void 0===t?void 0:t.simpleText)});if(h>-1)a.splice(h+1,0,c),s.add(u.code),s.add(u.name);else{var d=a.findIndex(e=>{var t;return"Other languages"===(null===(t=e.overlayMessageRenderer)||void 0===t||null===(t=t.subtitle)||void 0===t?void 0:t.simpleText)});d>-1?a.splice(d,0,c):a.unshift(c),s.add(u.code),s.add(u.name)}}else console.warn(`TizenTube Subtitle Localization: No language mapping found for country code: ${l}`)}if(o){var p=Object.entries(function(){try{var e={};return $o.forEach(t=>{if(t.includes("-")){var n=E(t.split("-"),2),i=n[0],r=n[1],o=Yo.language.standard.long[i]||t,a=Yo.region.long[r]||r;e[t]=`${o} (${a})`}else{var s=Yo.language.standard.long[t]||t;e[t]=s}}),e}catch(e){var t={};return $o.forEach(e=>t[e]=e),t}}()).filter(e=>{var t=E(e,2),n=t[0],i=t[1];return!s.has(n)&&!s.has(i)}).sort((e,t)=>{var n=E(e,2)[1],i=E(t,2)[1];return n.localeCompare(i)});p.length>0?(console.log(`%c[TizenTube Subtitle Localization] Adding "Tizen Languages" section with ${p.length} additional languages`,"background: #FF9800; color: #ffffff; font-size: 12px;"),a.push({overlayMessageRenderer:{title:{simpleText:""},subtitle:{simpleText:"Other Languages"},style:"OVERLAY_MESSAGE_STYLE_SUBSECTION_TITLE"}}),p.forEach(e=>{var t=E(e,2),n=t[0],i=t[1];a.push(Zo(n,i))}),console.log('%c[TizenTube Subtitle Localization] Added "Tizen Languages" section',"background: #FF9800; color: #ffffff; font-size: 12px;")):console.log("%c[TizenTube Subtitle Localization] All languages already present in menu","background: #4CAF50; color: #ffffff; font-size: 12px;")}}return t.apply(this,arguments)},e.instance.resolveCommand.isPatchedBySubtitleLocalization=!0,console.log("TizenTube Subtitle Localization: Patch successful!"),Qo=!0}else e?console.log("TizenTube Subtitle Localization: Already patched."):console.error("TizenTube Subtitle Localization: Could not find resolveCommand instance.")}}var ta=setInterval(()=>{window._yttv&&Object.keys(window._yttv).length>0&&(ea(),clearInterval(ta))},1e3);"loading"===document.readyState?document.addEventListener("DOMContentLoaded",ea):ea(),console.log("TizenTube Subtitle Localization: Module loaded, waiting for YouTube TV...");var na=".html5-video-player",ia="onStateChange",ra="configChange",oa="preferredVideoQuality",aa=new WeakMap,sa=new WeakMap,la=new WeakMap,ua=new WeakMap,ca=new WeakSet,ha=new WeakMap;function da(){clearTimeout(d(sa,this));var e=document.querySelector(na);e?(m(aa,this,e),d(aa,this).addEventListener(ia,d(ha,this)),d(ha,this).call(this)):m(sa,this,setTimeout(()=>l(ca,this,da).call(this),100))}function pa(){Dr.addEventListener(ra,e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.key)===oa&&l(ca,this,ma).call(this)})}function ma(){var e=Er(oa);if(e&&"auto"!==e&&d(aa,this))try{var t=l(ca,this,fa).call(this,e);t&&d(aa,this).setPlaybackQualityRange(t,t)}catch(e){console.warn("[PreferredQuality] Failed to apply quality:",e)}}function fa(e){var t=d(aa,this).getAvailableQualityData();if(null==t||!t.length)return"highres";var n=e=>parseInt(e,10)||0,i=n(e),r=t.find(e=>n(e.qualityLabel)===i);return r?r.quality:"highres"}function ga(){var e;if(!window._yttv)return setTimeout(ga,250);null===(e=Object.values(window._yttv).find(e=>e instanceof Map&&e.has("ENABLE_PREVIEWS_WITH_SOUND")))||void 0===e||e.set("ENABLE_PREVIEWS_WITH_SOUND",Er("enablePreviews"))}window.preferredVideoQualityHandler=new class{constructor(){var e,t;h(e=this,t=ca),t.add(e),p(this,aa,null),p(this,sa,null),p(this,la,null),p(this,ua,!1),p(this,ha,()=>{var e,t,n,i,r=null===(e=d(aa,this))||void 0===e||null===(t=e.getPlayerStateObject)||void 0===t?void 0:t.call(e),o=null===(n=d(aa,this))||void 0===n||null===(i=n.getVideoData)||void 0===i?void 0:i.call(n),a=null==o?void 0:o.video_id;a!==d(la,this)&&(m(la,this,a),m(ua,this,!1));var s=Object.values(d(aa,this).getVideoStats()).find(e=>e&&"shortspage"===e);null==r||!r.isPlaying||d(ua,this)||s||(l(ca,this,ma).call(this),m(ua,this,!0))}),this.init()}init(){l(ca,this,da).call(this),l(ca,this,pa).call(this)}},window.queuedVideos={videos:[],lastVideoId:null},function e(){var t=document.querySelector(".html5-video-player");if(!t)return setTimeout(e,250);t.addEventListener("onStateChange",()=>{var e=t.getPlayerStateObject(),n=t.getVideoData();if(0!==window.queuedVideos.videos.length)if(e.isEnded){var i=window.queuedVideos.videos.findIndex(e=>e.tileRenderer&&e.tileRenderer.contentId===n.video_id||e.lockupViewModel&&e.lockupViewModel.contentId===n.video_id);if(-1!==i){if(i+1>=window.queuedVideos.videos.length)return void co({customAction:{action:"CLEAR_QUEUE"}});var r=window.queuedVideos.videos[i+1],o=r.tileRenderer?r.tileRenderer.onSelectCommand:r.lockupViewModel.rendererContext.commandContext.onTap.innertubeCommand;setTimeout(()=>co(o),500)}else if(window.queuedVideos.lastVideoId){var a=window.queuedVideos.videos.findIndex(e=>{var t,n;return(null===(t=e.tileRenderer)||void 0===t?void 0:t.contentId)===window.queuedVideos.lastVideoId||(null===(n=e.lockupViewModel)||void 0===n?void 0:n.contentId)===window.queuedVideos.lastVideoId});if(!(-1!==a&&a+1<window.queuedVideos.videos.length))return void co({customAction:{action:"CLEAR_QUEUE"}});var s=window.queuedVideos.videos[a+1],l=s.tileRenderer?s.tileRenderer.onSelectCommand:s.lockupViewModel.rendererContext.commandContext.onTap.innertubeCommand;setTimeout(()=>co(l),500)}else{var u=window.queuedVideos.videos[0],c=u.tileRenderer?u.tileRenderer.onSelectCommand:u.lockupViewModel.rendererContext.commandContext.onTap.innertubeCommand;setTimeout(()=>co(c),500)}}else e.isPlaying&&(document.getElementById("container").style.setProperty("opacity","1","important"),window.queuedVideos.videos.find(e=>e.contentId===n.video_id)&&(window.queuedVideos.lastVideoId=n.video_id))})}(),Dr.addEventListener("configChange",e=>{ga()}),"complete"===document.readyState?ga():window.addEventListener("load",ga);var va,ya={exports:{}};var ba,Sa,xa=(va||(va=1,ba=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),r=n(3),o=n(8),a=n(15);function s(e,t,n){var a=null,s=function(e,t){n&&n(e,t),a&&a.visit(e,t)},l="function"==typeof n?s:null,u=!1;if(t){u="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(u||c)&&((a=new i.CommentHandler).attach=c,t.comment=!0,l=s)}var h,d=!1;t&&"string"==typeof t.sourceType&&(d="module"===t.sourceType),h=t&&"boolean"==typeof t.jsx&&t.jsx?new r.JSXParser(e,t,l):new o.Parser(e,t,l);var p=d?h.parseModule():h.parseScript();return u&&a&&(p.comments=a.comments),h.config.tokens&&(p.tokens=h.tokens),h.config.tolerant&&(p.errors=h.errorHandler.errors),p}t.parse=s,t.parseModule=function(e,t,n){var i=t||{};return i.sourceType="module",s(e,i,n)},t.parseScript=function(e,t,n){var i=t||{};return i.sourceType="script",s(e,i,n)},t.tokenize=function(e,t,n){var i,r=new a.Tokenizer(e,t);i=[];try{for(;;){var o=r.getNextToken();if(!o)break;n&&(o=n(o)),i.push(o)}}catch(e){r.errorHandler.tolerate(e)}return r.errorHandler.tolerant&&(i.errors=r.errors()),i};var l=n(2);t.Syntax=l.Syntax,t.version="4.0.1"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===i.Syntax.BlockStatement&&0===e.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var o=this.leading[r];t.end.offset>=o.start&&(n.unshift(o.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=e.end.offset&&t.unshift(i.comment)}return this.trailing.length=0,t}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var o=r.node.trailingComments[0];o&&o.range[0]>=e.end.offset&&(t=r.node.trailingComments,delete r.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&(o=this.stack[this.stack.length-1])&&o.start>=e.start.offset;)t=o.node,this.stack.pop();if(t){for(var i=(t.leadingComments?t.leadingComments.length:0)-1;i>=0;--i){var r=t.leadingComments[i];r.range[1]<=e.start.offset&&(n.unshift(r),t.leadingComments.splice(i,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(i=this.leading.length-1;i>=0;--i){var o;(o=this.leading[i]).start<=e.start.offset&&(n.unshift(o.comment),this.leading.splice(i,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===i.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),r=this.findLeadingComments(t);r.length>0&&(e.leadingComments=r),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",i={type:n,value:e.value};if(e.range&&(i.range=e.range),e.loc&&(i.loc=e.loc),this.comments.push(i),this.attach){var r={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(r.comment.loc=e.loc),e.type=n,this.leading.push(r),this.trailing.push(r)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=r},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),a=n(5),s=n(6),l=n(7),u=n(8),c=n(13),h=n(14);function d(e){var t;switch(e.type){case s.JSXSyntax.JSXIdentifier:t=e.name;break;case s.JSXSyntax.JSXNamespacedName:var n=e;t=d(n.namespace)+":"+d(n.name);break;case s.JSXSyntax.JSXMemberExpression:var i=e;t=d(i.object)+"."+d(i.property)}return t}c.TokenName[100]="JSXIdentifier",c.TokenName[101]="JSXText";var p=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return r(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,i=!1,r=!1,a=!1;!this.scanner.eof()&&n&&!i;){var s=this.scanner.source[this.scanner.index];if(s===e)break;if(i=";"===s,t+=s,++this.scanner.index,!i)switch(t.length){case 2:r="#"===s;break;case 3:r&&(n=(a="x"===s)||o.Character.isDecimalDigit(s.charCodeAt(0)),r=r&&!a);break;default:n=(n=n&&!(r&&!o.Character.isDecimalDigit(s.charCodeAt(0))))&&!(a&&!o.Character.isHexDigit(s.charCodeAt(0)))}}if(n&&i&&t.length>2){var l=t.substr(1,t.length-2);r&&l.length>1?t=String.fromCharCode(parseInt(l.substr(1),10)):a&&l.length>2?t=String.fromCharCode(parseInt("0"+l.substr(1),16)):r||a||!h.XHTMLEntities[l]||(t=h.XHTMLEntities[l])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:s=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],i="";!this.scanner.eof()&&(l=this.scanner.source[this.scanner.index++])!==n;)i+="&"===l?this.scanXHTMLEntity(n):l;return{type:8,value:i,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var r=this.scanner.source.charCodeAt(this.scanner.index+1),a=this.scanner.source.charCodeAt(this.scanner.index+2),s=46===r&&46===a?"...":".";return t=this.scanner.index,this.scanner.index+=s.length,{type:7,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(o.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var l=this.scanner.source.charCodeAt(this.scanner.index);if(o.Character.isIdentifierPart(l)&&92!==l)++this.scanner.index;else{if(45!==l)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,o.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(i)),i},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new a.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(n,i))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var r=t;this.expectJSX(".");var o=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(r,o))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=n;this.expectJSX(":");var r=this.parseJSXIdentifier();e=this.finalize(t,new a.JSXNamespacedName(i,r))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new l.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new a.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(t,i,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new a.JSXClosingElement(t))}var n=this.parseJSXElementName(),i=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(n,r,i))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new a.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new a.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start<n.end){var i=this.getTokenRaw(n),r=this.finalize(t,new a.JSXText(n.value,i));e.push(r)}if("{"!==this.scanner.source[this.scanner.index])break;var o=this.parseJSXExpressionContainer();e.push(o)}return e},t.prototype.parseComplexJSXElement=function(e){for(var t=[];!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());var n=this.createJSXChildNode(),i=this.parseJSXBoundaryElement();if(i.type===s.JSXSyntax.JSXOpeningElement){var r=i;if(r.selfClosing){var o=this.finalize(n,new a.JSXElement(r,[],null));e.children.push(o)}else t.push(e),e={node:n,opening:r,closing:null,children:[]}}if(i.type===s.JSXSyntax.JSXClosingElement){e.closing=i;var l=d(e.opening.name);if(l!==d(e.closing.name)&&this.tolerateError("Expected corresponding JSX closing tag for %0",l),!(t.length>0))break;o=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(o),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],i=null;if(!t.selfClosing){var r=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:n});n=r.children,i=r.closing}return this.finalize(e,new a.JSXElement(t,n,i))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(u.Parser);t.JSXParser=p},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),r=function(e){this.type=i.JSXSyntax.JSXClosingElement,this.name=e};t.JSXClosingElement=r;var o=function(e,t,n){this.type=i.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXElement=o;var a=function(){this.type=i.JSXSyntax.JSXEmptyExpression};t.JSXEmptyExpression=a;var s=function(e){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXExpressionContainer=s;var l=function(e){this.type=i.JSXSyntax.JSXIdentifier,this.name=e};t.JSXIdentifier=l;var u=function(e,t){this.type=i.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXMemberExpression=u;var c=function(e,t){this.type=i.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXAttribute=c;var h=function(e,t){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXNamespacedName=h;var d=function(e,t,n){this.type=i.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXOpeningElement=d;var p=function(e){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXSpreadAttribute=p;var m=function(e,t){this.type=i.JSXSyntax.JSXText,this.value=e,this.raw=t};t.JSXText=m},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=function(e){this.type=i.Syntax.ArrayExpression,this.elements=e};t.ArrayExpression=r;var o=function(e){this.type=i.Syntax.ArrayPattern,this.elements=e};t.ArrayPattern=o;var a=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.ArrowFunctionExpression=a;var s=function(e,t,n){this.type=i.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentExpression=s;var l=function(e,t){this.type=i.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AssignmentPattern=l;var u=function(e,t,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncArrowFunctionExpression=u;var c=function(e,t,n){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionDeclaration=c;var h=function(e,t,n){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=h;var d=function(e){this.type=i.Syntax.AwaitExpression,this.argument=e};t.AwaitExpression=d;var p=function(e,t,n){var r="||"===e||"&&"===e;this.type=r?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BinaryExpression=p;var m=function(e){this.type=i.Syntax.BlockStatement,this.body=e};t.BlockStatement=m;var f=function(e){this.type=i.Syntax.BreakStatement,this.label=e};t.BreakStatement=f;var g=function(e,t){this.type=i.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CallExpression=g;var v=function(e,t){this.type=i.Syntax.CatchClause,this.param=e,this.body=t};t.CatchClause=v;var y=function(e){this.type=i.Syntax.ClassBody,this.body=e};t.ClassBody=y;var b=function(e,t,n){this.type=i.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassDeclaration=b;var S=function(e,t,n){this.type=i.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=S;var x=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ComputedMemberExpression=x;var E=function(e,t,n){this.type=i.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ConditionalExpression=E;var w=function(e){this.type=i.Syntax.ContinueStatement,this.label=e};t.ContinueStatement=w;var D=function(){this.type=i.Syntax.DebuggerStatement};t.DebuggerStatement=D;var C=function(e,t){this.type=i.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.Directive=C;var k=function(e,t){this.type=i.Syntax.DoWhileStatement,this.body=e,this.test=t};t.DoWhileStatement=k;var A=function(){this.type=i.Syntax.EmptyStatement};t.EmptyStatement=A;var T=function(e){this.type=i.Syntax.ExportAllDeclaration,this.source=e};t.ExportAllDeclaration=T;var F=function(e){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportDefaultDeclaration=F;var P=function(e,t,n){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportNamedDeclaration=P;var B=function(e,t){this.type=i.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExportSpecifier=B;var I=function(e){this.type=i.Syntax.ExpressionStatement,this.expression=e};t.ExpressionStatement=I;var O=function(e,t,n){this.type=i.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForInStatement=O;var N=function(e,t,n){this.type=i.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForOfStatement=N;var R=function(e,t,n,r){this.type=i.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r};t.ForStatement=R;var L=function(e,t,n,r){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionDeclaration=L;var M=function(e,t,n,r){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionExpression=M;var _=function(e){this.type=i.Syntax.Identifier,this.name=e};t.Identifier=_;var U=function(e,t,n){this.type=i.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.IfStatement=U;var z=function(e,t){this.type=i.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDeclaration=z;var V=function(e){this.type=i.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportDefaultSpecifier=V;var H=function(e){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportNamespaceSpecifier=H;var j=function(e,t){this.type=i.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.ImportSpecifier=j;var W=function(e,t){this.type=i.Syntax.LabeledStatement,this.label=e,this.body=t};t.LabeledStatement=W;var K=function(e,t){this.type=i.Syntax.Literal,this.value=e,this.raw=t};t.Literal=K;var J=function(e,t){this.type=i.Syntax.MetaProperty,this.meta=e,this.property=t};t.MetaProperty=J;var G=function(e,t,n,r,o){this.type=i.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=r,this.static=o};t.MethodDefinition=G;var X=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="module"};t.Module=X;var q=function(e,t){this.type=i.Syntax.NewExpression,this.callee=e,this.arguments=t};t.NewExpression=q;var Y=function(e){this.type=i.Syntax.ObjectExpression,this.properties=e};t.ObjectExpression=Y;var $=function(e){this.type=i.Syntax.ObjectPattern,this.properties=e};t.ObjectPattern=$;var Q=function(e,t,n,r,o,a){this.type=i.Syntax.Property,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=o,this.shorthand=a};t.Property=Q;var Z=function(e,t,n,r){this.type=i.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}};t.RegexLiteral=Z;var ee=function(e){this.type=i.Syntax.RestElement,this.argument=e};t.RestElement=ee;var te=function(e){this.type=i.Syntax.ReturnStatement,this.argument=e};t.ReturnStatement=te;var ne=function(e){this.type=i.Syntax.Program,this.body=e,this.sourceType="script"};t.Script=ne;var ie=function(e){this.type=i.Syntax.SequenceExpression,this.expressions=e};t.SequenceExpression=ie;var re=function(e){this.type=i.Syntax.SpreadElement,this.argument=e};t.SpreadElement=re;var oe=function(e,t){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.StaticMemberExpression=oe;var ae=function(){this.type=i.Syntax.Super};t.Super=ae;var se=function(e,t){this.type=i.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchCase=se;var le=function(e,t){this.type=i.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.SwitchStatement=le;var ue=function(e,t){this.type=i.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TaggedTemplateExpression=ue;var ce=function(e,t){this.type=i.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateElement=ce;var he=function(e,t){this.type=i.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.TemplateLiteral=he;var de=function(){this.type=i.Syntax.ThisExpression};t.ThisExpression=de;var pe=function(e){this.type=i.Syntax.ThrowStatement,this.argument=e};t.ThrowStatement=pe;var me=function(e,t,n){this.type=i.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.TryStatement=me;var fe=function(e,t){this.type=i.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UnaryExpression=fe;var ge=function(e,t,n){this.type=i.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.UpdateExpression=ge;var ve=function(e,t){this.type=i.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclaration=ve;var ye=function(e,t){this.type=i.Syntax.VariableDeclarator,this.id=e,this.init=t};t.VariableDeclarator=ye;var be=function(e,t){this.type=i.Syntax.WhileStatement,this.test=e,this.body=t};t.WhileStatement=be;var Se=function(e,t){this.type=i.Syntax.WithStatement,this.object=e,this.body=t};t.WithStatement=Se;var xe=function(e,t){this.type=i.Syntax.YieldExpression,this.argument=e,this.delegate=t};t.YieldExpression=xe},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(10),o=n(11),a=n(7),s=n(12),l=n(2),u=n(13),c="ArrowParameterPlaceHolder",h=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new s.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){var t=Array.prototype.slice.call(arguments,1),n=e.replace(/%(\d)/g,function(e,n){return i.assert(n<t.length,"Message reference must be in range"),t[n]}),r=this.lastMarker.index,o=this.lastMarker.line,a=this.lastMarker.column+1;throw this.errorHandler.createError(r,o,a,n)},e.prototype.tolerateError=function(e){var t=Array.prototype.slice.call(arguments,1),n=e.replace(/%(\d)/g,function(e,n){return i.assert(n<t.length,"Message reference must be in range"),t[n]}),r=this.lastMarker.index,o=this.scanner.lineNumber,a=this.lastMarker.column+1;this.errorHandler.tolerateError(r,o,a,n)},e.prototype.unexpectedTokenError=function(e,t){var n,i=t||o.Messages.UnexpectedToken;if(e?(t||(i=2===e.type?o.Messages.UnexpectedEOS:3===e.type?o.Messages.UnexpectedIdentifier:6===e.type?o.Messages.UnexpectedNumber:8===e.type?o.Messages.UnexpectedString:10===e.type?o.Messages.UnexpectedTemplate:o.Messages.UnexpectedToken,4===e.type&&(this.scanner.isFutureReservedWord(e.value)?i=o.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(i=o.Messages.StrictReservedWord))),n=e.value):n="ILLEGAL",i=i.replace("%0",n),e&&"number"==typeof e.lineNumber){var r=e.start,a=e.lineNumber,s=this.lastMarker.index-this.lastMarker.column,l=e.start-s+1;return this.errorHandler.createError(r,a,l,i)}return r=this.lastMarker.index,a=this.lastMarker.line,l=this.lastMarker.column+1,this.errorHandler.createError(r,a,l,i)},e.prototype.throwUnexpectedToken=function(e,t){throw this.unexpectedTokenError(e,t)},e.prototype.tolerateUnexpectedToken=function(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))},e.prototype.collectComments=function(){if(this.config.comment){var e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(var t=0;t<e.length;++t){var n=e[t],i=void 0;i={type:n.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(n.slice[0],n.slice[1])},this.config.range&&(i.range=n.range),this.config.loc&&(i.loc=n.loc);var r={start:{line:n.loc.start.line,column:n.loc.start.column,offset:n.range[0]},end:{line:n.loc.end.line,column:n.loc.end.column,offset:n.range[1]}};this.delegate(i,r)}}else this.scanner.scanComments()},e.prototype.getTokenRaw=function(e){return this.scanner.source.slice(e.start,e.end)},e.prototype.convertToken=function(e){var t={type:u.TokenName[e.type],value:this.getTokenRaw(e)};if(this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===e.type){var n=e.pattern,i=e.flags;t.regex={pattern:n,flags:i}}return t},e.prototype.nextToken=function(){var e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&3===t.type&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&2!==t.type&&this.tokens.push(this.convertToken(t)),e},e.prototype.nextRegexToken=function(){this.collectComments();var e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e},e.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},e.prototype.startNode=function(e,t){void 0===t&&(t=0);var n=e.start-e.lineStart,i=e.lineNumber;return n<0&&(n+=t,i--),{index:e.start,line:i,column:n}},e.prototype.finalize=function(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){var n={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,n)}return t},e.prototype.expect=function(e){var t=this.nextToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var e=this.lookahead;7===e.type&&","===e.value?this.nextToken():7===e.type&&";"===e.value?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,o.Messages.UnexpectedToken)}else this.expect(",")},e.prototype.expectKeyword=function(e){var t=this.nextToken();4===t.type&&t.value===e||this.throwUnexpectedToken(t)},e.prototype.match=function(e){return 7===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchKeyword=function(e){return 4===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchContextualKeyword=function(e){return 3===this.lookahead.type&&this.lookahead.value===e},e.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var e=this.lookahead.value;return"="===e||"*="===e||"**="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=i,r},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,r},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,i=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(i,new a.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new a.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new a.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(i,new a.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(i,new a.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(i,new a.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(i,new a.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new a.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new a.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,i},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,i,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var i=this.parseFormalParameters(),r=this.parsePropertyMethod(i);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new a.AsyncFunctionExpression(null,i.params,r))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,o.Messages.StrictOctalLiteral);var i=this.getTokenRaw(n);e=this.finalize(t,new a.Literal(n.value,i));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new a.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===l.Syntax.Identifier&&e.name===t||e.type===l.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),i=this.lookahead,r=null,s=null,l=!1,u=!1,c=!1,h=!1;if(3===i.type){var d=i.value;this.nextToken(),l=this.match("["),r=(h=!(this.hasLineTerminator||"async"!==d||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new a.Identifier(d))}else this.match("*")?this.nextToken():(l=this.match("["),r=this.parseObjectPropertyKey());var p=this.qualifiedPropertyName(this.lookahead);if(3===i.type&&!h&&"get"===i.value&&p)t="get",l=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod();else if(3===i.type&&!h&&"set"===i.value&&p)t="set",l=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseSetterMethod();else if(7===i.type&&"*"===i.value&&p)t="init",l=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),u=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!h)!l&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),s=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))s=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),u=!0;else if(3===i.type)if(d=this.finalize(n,new a.Identifier(i.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),c=!0;var m=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(n,new a.AssignmentPattern(d,m))}else c=!0,s=d;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new a.Property(t,r,l,s,u,c))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new a.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,i=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:i},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],i=this.parseTemplateHead();for(n.push(i);!i.tail;)t.push(this.parseExpression()),i=this.parseTemplateElement(),n.push(i);return this.finalize(e,new a.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:e.type=l.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case l.Syntax.ArrayExpression:e.type=l.Syntax.ArrayPattern;for(var t=0;t<e.elements.length;t++)null!==e.elements[t]&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case l.Syntax.ObjectExpression:for(e.type=l.Syntax.ObjectPattern,t=0;t<e.properties.length;t++)this.reinterpretExpressionAsPattern(e.properties[t].value);break;case l.Syntax.AssignmentExpression:e.type=l.Syntax.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left)}},e.prototype.parseGroupExpression=function(){var e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:c,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:c,params:[e],async:!1};else{var i=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o<r.length;o++)this.reinterpretExpressionAsPattern(r[o]);i=!0,e={type:c,params:r,async:!1}}else if(this.match("...")){for(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),r.push(this.parseRestElement(n)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1,o=0;o<r.length;o++)this.reinterpretExpressionAsPattern(r[o]);i=!0,e={type:c,params:r,async:!1}}else r.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(i)break}i||(e=this.finalize(this.startNode(t),new a.SequenceExpression(r)))}if(!i){if(this.expect(")"),this.match("=>")&&(e.type===l.Syntax.Identifier&&"yield"===e.name&&(i=!0,e={type:c,params:[e],async:!1}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===l.Syntax.SequenceExpression)for(o=0;o<e.expressions.length;o++)this.reinterpretExpressionAsPattern(e.expressions[o]);else this.reinterpretExpressionAsPattern(e);var s=e.type===l.Syntax.SequenceExpression?e.expressions:[e];e={type:c,params:s,async:!1}}this.context.isBindingElement=!1}}}return e},e.prototype.parseArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.isIdentifierName=function(e){return 3===e.type||4===e.type||1===e.type||5===e.type},e.prototype.parseIdentifierName=function(){var e=this.createNode(),t=this.nextToken();return this.isIdentifierName(t)||this.throwUnexpectedToken(t),this.finalize(e,new a.Identifier(t.value))},e.prototype.parseNewExpression=function(){var e,t=this.createNode(),n=this.parseIdentifierName();if(i.assert("new"===n.name,"New expression must start with `new`"),this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var r=this.parseIdentifierName();e=new a.MetaProperty(n,r)}else this.throwUnexpectedToken(this.lookahead);else{var o=this.isolateCoverGrammar(this.parseLeftHandSideExpression),s=this.match("(")?this.parseArguments():[];e=new a.NewExpression(o,s),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(t,e)},e.prototype.parseAsyncArgument=function(){var e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e},e.prototype.parseAsyncArguments=function(){this.expect("(");var e=[];if(!this.match(")"))for(;;){var t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),e},e.prototype.parseLeftHandSideExpressionAllowCall=function(){var e,t=this.lookahead,n=this.matchContextualKeyword("async"),i=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(e=this.createNode(),this.nextToken(),e=this.finalize(e,new a.Super),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):e=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var r=this.parseIdentifierName();e=this.finalize(this.startNode(t),new a.StaticMemberExpression(e,r))}else if(this.match("(")){var o=n&&t.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var s=o?this.parseAsyncArguments():this.parseArguments();if(e=this.finalize(this.startNode(t),new a.CallExpression(e,s)),o&&this.match("=>")){for(var l=0;l<s.length;++l)this.reinterpretExpressionAsPattern(s[l]);e={type:c,params:s,async:!0}}}else if(this.match("["))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("["),r=this.isolateCoverGrammar(this.parseExpression),this.expect("]"),e=this.finalize(this.startNode(t),new a.ComputedMemberExpression(e,r));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var u=this.parseTemplateLiteral();e=this.finalize(this.startNode(t),new a.TaggedTemplateExpression(e,u))}return this.context.allowIn=i,e},e.prototype.parseSuper=function(){var e=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(e,new a.Super)},e.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var e=this.startNode(this.lookahead),t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var n=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new a.ComputedMemberExpression(t,n))}else if(this.match("."))this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("."),n=this.parseIdentifierName(),t=this.finalize(e,new a.StaticMemberExpression(t,n));else{if(10!==this.lookahead.type||!this.lookahead.head)break;var r=this.parseTemplateLiteral();t=this.finalize(e,new a.TaggedTemplateExpression(t,r))}return t},e.prototype.parseUpdateExpression=function(){var e,t=this.lookahead;if(this.match("++")||this.match("--")){var n=this.startNode(t),i=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(o.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment);var r=!0;e=this.finalize(n,new a.UpdateExpression(i.value,e,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(o.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var s=this.nextToken().value;r=!1,e=this.finalize(this.startNode(t),new a.UpdateExpression(s,e,r))}return e},e.prototype.parseAwaitExpression=function(){var e=this.createNode();this.nextToken();var t=this.parseUnaryExpression();return this.finalize(e,new a.AwaitExpression(t))},e.prototype.parseUnaryExpression=function(){var e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var t=this.startNode(this.lookahead),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new a.UnaryExpression(n.value,e)),this.context.strict&&"delete"===e.operator&&e.argument.type===l.Syntax.Identifier&&this.tolerateError(o.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else e=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return e},e.prototype.parseExponentiationExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseUnaryExpression);if(t.type!==l.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=t,i=this.isolateCoverGrammar(this.parseExponentiationExpression);t=this.finalize(this.startNode(e),new a.BinaryExpression("**",n,i))}return t},e.prototype.binaryPrecedence=function(e){var t=e.value;return 7===e.type?this.operatorPrecedence[t]||0:4===e.type&&("instanceof"===t||this.context.allowIn&&"in"===t)?7:0},e.prototype.parseBinaryExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseExponentiationExpression),n=this.lookahead,i=this.binaryPrecedence(n);if(i>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var r=[e,this.lookahead],o=t,s=this.isolateCoverGrammar(this.parseExponentiationExpression),l=[o,n.value,s],u=[i];!((i=this.binaryPrecedence(this.lookahead))<=0);){for(;l.length>2&&i<=u[u.length-1];){s=l.pop();var c=l.pop();u.pop(),o=l.pop(),r.pop();var h=this.startNode(r[r.length-1]);l.push(this.finalize(h,new a.BinaryExpression(c,o,s)))}l.push(this.nextToken().value),u.push(i),r.push(this.lookahead),l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var d=l.length-1;t=l[d];for(var p=r.pop();d>1;){var m=r.pop(),f=p&&p.lineStart;h=this.startNode(m,f),c=l[d-1],t=this.finalize(h,new a.BinaryExpression(c,l[d-2],t)),d-=2,p=m}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new a.ConditionalExpression(t,i,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case l.Syntax.Identifier:this.validateParam(e,t,t.name);break;case l.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case l.Syntax.ArrayPattern:for(var n=0;n<t.elements.length;n++)null!==t.elements[n]&&this.checkPatternParam(e,t.elements[n]);break;case l.Syntax.ObjectPattern:for(n=0;n<t.properties.length;n++)this.checkPatternParam(e,t.properties[n].value)}e.simple=e.simple&&t instanceof a.Identifier},e.prototype.reinterpretAsCoverFormalsList=function(e){var t,n=[e],i=!1;switch(e.type){case l.Syntax.Identifier:break;case c:n=e.params,i=e.async;break;default:return null}t={simple:!0,paramSet:{}};for(var r=0;r<n.length;++r)(a=n[r]).type===l.Syntax.AssignmentPattern?a.right.type===l.Syntax.YieldExpression&&(a.right.argument&&this.throwUnexpectedToken(this.lookahead),a.right.type=l.Syntax.Identifier,a.right.name="yield",delete a.right.argument,delete a.right.delegate):i&&a.type===l.Syntax.Identifier&&"await"===a.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(t,a),n[r]=a;if(this.context.strict||!this.context.allowYield)for(r=0;r<n.length;++r){var a;(a=n[r]).type===l.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(t.message===o.Messages.StrictParamDupe){var s=this.context.strict?t.stricted:t.firstRestricted;this.throwUnexpectedToken(s,t.message)}return{simple:t.simple,params:n,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.parseAssignmentExpression=function(){var e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{var t=this.lookahead,n=t;if(e=this.parseConditionalExpression(),3===n.type&&n.lineNumber===this.lookahead.lineNumber&&"async"===n.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var i=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(i),e={type:c,params:[i],async:!0}}if(e.type===c||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=e.async,s=this.reinterpretAsCoverFormalsList(e);if(s){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var u=this.context.strict,h=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var d=this.context.allowYield,p=this.context.await;this.context.allowYield=!0,this.context.await=r;var m=this.startNode(t);this.expect("=>");var f=void 0;if(this.match("{")){var g=this.context.allowIn;this.context.allowIn=!0,f=this.parseFunctionSourceElements(),this.context.allowIn=g}else f=this.isolateCoverGrammar(this.parseAssignmentExpression);var v=f.type!==l.Syntax.BlockStatement;this.context.strict&&s.firstRestricted&&this.throwUnexpectedToken(s.firstRestricted,s.message),this.context.strict&&s.stricted&&this.tolerateUnexpectedToken(s.stricted,s.message),e=r?this.finalize(m,new a.AsyncArrowFunctionExpression(s.params,f,v)):this.finalize(m,new a.ArrowFunctionExpression(s.params,f,v)),this.context.strict=u,this.context.allowStrictDirective=h,this.context.allowYield=d,this.context.await=p}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===l.Syntax.Identifier){var y=e;this.scanner.isRestrictedWord(y.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(y.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var b=(n=this.nextToken()).value,S=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new a.AssignmentExpression(b,e,S)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new a.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new a.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),i=this.parsePattern([],e);this.context.strict&&i.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(o.Messages.StrictVarName);var r=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&i.type!==l.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new a.VariableDeclarator(i,r))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;i.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new a.VariableDeclaration(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var i=this.parsePattern(e,t);return this.finalize(n,new a.RestElement(i))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var i=[];!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else{if(this.match("...")){i.push(this.parseBindingRestElement(e,t));break}i.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new a.ArrayPattern(i))},e.prototype.parsePropertyPattern=function(e,t){var n,i,r=this.createNode(),o=!1,s=!1;if(3===this.lookahead.type){var l=this.lookahead;n=this.parseVariableIdentifier();var u=this.finalize(r,new a.Identifier(l.value));if(this.match("=")){e.push(l),s=!0,this.nextToken();var c=this.parseAssignmentExpression();i=this.finalize(this.startNode(l),new a.AssignmentPattern(u,c))}else this.match(":")?(this.expect(":"),i=this.parsePatternWithDefault(e,t)):(e.push(l),s=!0,i=u)}else o=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),i=this.parsePatternWithDefault(e,t);return this.finalize(r,new a.Property("init",n,o,i,!1,s))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),i=[];for(this.expect("{");!this.match("}");)i.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new a.ObjectPattern(i))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,i=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,i=this.finalize(this.startNode(n),new a.AssignmentPattern(i,o))}return i},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new a.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(o.Messages.StrictVarName);var i=null;return this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===l.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new a.VariableDeclarator(n,i))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new a.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new a.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new a.IfStatement(i,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new a.DoWhileStatement(n,i))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=i}return this.finalize(t,new a.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,i=null,r=null,s=null,u=!0,c=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){i=this.createNode(),this.nextToken();var h=this.context.allowIn;this.context.allowIn=!1;var d=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=h,1===d.length&&this.matchKeyword("in")){var p=d[0];p.init&&(p.id.type===l.Syntax.ArrayPattern||p.id.type===l.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),i=this.finalize(i,new a.VariableDeclaration(d,"var")),this.nextToken(),e=i,t=this.parseExpression(),i=null}else 1===d.length&&null===d[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new a.VariableDeclaration(d,"var")),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,u=!1):(i=this.finalize(i,new a.VariableDeclaration(d,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){i=this.createNode();var m=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(h=this.context.allowIn,this.context.allowIn=!1,d=this.parseBindingList(m,{inFor:!0}),this.context.allowIn=h,1===d.length&&null===d[0].init&&this.matchKeyword("in")?(i=this.finalize(i,new a.VariableDeclaration(d,m)),this.nextToken(),e=i,t=this.parseExpression(),i=null):1===d.length&&null===d[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new a.VariableDeclaration(d,m)),this.nextToken(),e=i,t=this.parseAssignmentExpression(),i=null,u=!1):(this.consumeSemicolon(),i=this.finalize(i,new a.VariableDeclaration(d,m)))):(i=this.finalize(i,new a.Identifier(m)),this.nextToken(),e=i,t=this.parseExpression(),i=null)}else{var f=this.lookahead;if(h=this.context.allowIn,this.context.allowIn=!1,i=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=h,this.matchKeyword("in"))this.context.isAssignmentTarget&&i.type!==l.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseExpression(),i=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&i.type!==l.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(i),e=i,t=this.parseAssignmentExpression(),i=null,u=!1;else{if(this.match(",")){for(var g=[i];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(f),new a.SequenceExpression(g))}this.expect(";")}}if(void 0===e&&(this.match(";")||(r=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===e?this.finalize(c,new a.ForStatement(i,r,s,n)):u?this.finalize(c,new a.ForInStatement(e,t,n)):this.finalize(c,new a.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(o.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(o.Messages.IllegalContinue),this.finalize(e,new a.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),i="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)||this.throwError(o.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(o.Messages.IllegalBreak),this.finalize(e,new a.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new a.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new a.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var i=[],r=!1;for(this.expect("{");!this.match("}");){var s=this.parseSwitchCase();null===s.test&&(r&&this.throwError(o.Messages.MultipleDefaultsInSwitch),r=!0),i.push(s)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new a.SwitchStatement(t,i))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var i=n,r="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(o.Messages.Redeclaration,"Label",i.name),this.context.labelSet[r]=!0;var s=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),s=this.parseClassDeclaration();else if(this.matchKeyword("function")){var u=this.lookahead,c=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(u,o.Messages.StrictFunction):c.generator&&this.tolerateUnexpectedToken(u,o.Messages.GeneratorInLegacyContext),s=c}else s=this.parseStatement();delete this.context.labelSet[r],e=new a.LabeledStatement(i,s)}else this.consumeSemicolon(),e=new a.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),i={},r=0;r<t.length;r++){var s="$"+t[r].value;Object.prototype.hasOwnProperty.call(i,s)&&this.tolerateError(o.Messages.DuplicateBinding,t[r].value),i[s]=!0}this.context.strict&&n.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(o.Messages.StrictCatchVariable),this.expect(")");var u=this.parseBlock();return this.finalize(e,new a.CatchClause(n,u))},e.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},e.prototype.parseTryStatement=function(){var e=this.createNode();this.expectKeyword("try");var t=this.parseBlock(),n=this.matchKeyword("catch")?this.parseCatchClause():null,i=this.matchKeyword("finally")?this.parseFinallyClause():null;return n||i||this.throwError(o.Messages.NoCatchOrFinally),this.finalize(e,new a.TryStatement(t,n,i))},e.prototype.parseDebuggerStatement=function(){var e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new a.DebuggerStatement)},e.prototype.parseStatement=function(){var e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:var t=this.lookahead.value;e="{"===t?this.parseBlock():"("===t?this.parseExpressionStatement():";"===t?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement()}break;default:e=this.throwUnexpectedToken(this.lookahead)}return e},e.prototype.parseFunctionSourceElements=function(){var e=this.createNode();this.expect("{");var t=this.parseDirectivePrologues(),n=this.context.labelSet,i=this.context.inIteration,r=this.context.inSwitch,o=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=n,this.context.inIteration=i,this.context.inSwitch=r,this.context.inFunctionBody=o,this.finalize(e,new a.BlockStatement(t))},e.prototype.validateParam=function(e,t,n){var i="$"+n;this.context.strict?(this.scanner.isRestrictedWord(n)&&(e.stricted=t,e.message=o.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.message=o.Messages.StrictParamDupe)):e.firstRestricted||(this.scanner.isRestrictedWord(n)?(e.firstRestricted=t,e.message=o.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(n)?(e.firstRestricted=t,e.message=o.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,i)&&(e.stricted=t,e.message=o.Messages.StrictParamDupe)),"function"==typeof Object.defineProperty?Object.defineProperty(e.paramSet,i,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[i]=!0},e.prototype.parseRestElement=function(e){var t=this.createNode();this.expect("...");var n=this.parsePattern(e);return this.match("=")&&this.throwError(o.Messages.DefaultRestParameter),this.match(")")||this.throwError(o.Messages.ParameterAfterRestParameter),this.finalize(t,new a.RestElement(n))},e.prototype.parseFormalParameter=function(e){for(var t=[],n=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t),i=0;i<t.length;i++)this.validateParam(e,t[i],t[i].value);e.simple=e.simple&&n instanceof a.Identifier,e.params.push(n)},e.prototype.parseFormalParameters=function(e){var t;if(t={simple:!0,params:[],firstRestricted:e},this.expect("("),!this.match(")"))for(t.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(t),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}},e.prototype.matchAsyncFunction=function(){var e=this.matchContextualKeyword("async");if(e){var t=this.scanner.saveState();this.scanner.scanComments();var n=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===n.lineNumber&&4===n.type&&"function"===n.value}return e},e.prototype.parseFunctionDeclaration=function(e){var t=this.createNode(),n=this.matchContextualKeyword("async");n&&this.nextToken(),this.expectKeyword("function");var i,r=!n&&this.match("*");r&&this.nextToken();var s=null,l=null;if(!e||!this.match("(")){var u=this.lookahead;s=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(u.value)&&this.tolerateUnexpectedToken(u,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(u.value)?(l=u,i=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(u.value)&&(l=u,i=o.Messages.StrictReservedWord)}var c=this.context.await,h=this.context.allowYield;this.context.await=n,this.context.allowYield=!r;var d=this.parseFormalParameters(l),p=d.params,m=d.stricted;l=d.firstRestricted,d.message&&(i=d.message);var f=this.context.strict,g=this.context.allowStrictDirective;this.context.allowStrictDirective=d.simple;var v=this.parseFunctionSourceElements();return this.context.strict&&l&&this.throwUnexpectedToken(l,i),this.context.strict&&m&&this.tolerateUnexpectedToken(m,i),this.context.strict=f,this.context.allowStrictDirective=g,this.context.await=c,this.context.allowYield=h,n?this.finalize(t,new a.AsyncFunctionDeclaration(s,p,v)):this.finalize(t,new a.FunctionDeclaration(s,p,v,r))},e.prototype.parseFunctionExpression=function(){var e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");var n,i=!t&&this.match("*");i&&this.nextToken();var r,s=null,l=this.context.await,u=this.context.allowYield;if(this.context.await=t,this.context.allowYield=!i,!this.match("(")){var c=this.lookahead;s=this.context.strict||i||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(c.value)&&this.tolerateUnexpectedToken(c,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(c.value)?(r=c,n=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(c.value)&&(r=c,n=o.Messages.StrictReservedWord)}var h=this.parseFormalParameters(r),d=h.params,p=h.stricted;r=h.firstRestricted,h.message&&(n=h.message);var m=this.context.strict,f=this.context.allowStrictDirective;this.context.allowStrictDirective=h.simple;var g=this.parseFunctionSourceElements();return this.context.strict&&r&&this.throwUnexpectedToken(r,n),this.context.strict&&p&&this.tolerateUnexpectedToken(p,n),this.context.strict=m,this.context.allowStrictDirective=f,this.context.await=l,this.context.allowYield=u,t?this.finalize(e,new a.AsyncFunctionExpression(s,d,g)):this.finalize(e,new a.FunctionExpression(s,d,g,i))},e.prototype.parseDirective=function(){var e=this.lookahead,t=this.createNode(),n=this.parseExpression(),i=n.type===l.Syntax.Literal?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,i?new a.Directive(n,i):new a.ExpressionStatement(n))},e.prototype.parseDirectivePrologues=function(){for(var e=null,t=[];;){var n=this.lookahead;if(8!==n.type)break;var i=this.parseDirective();t.push(i);var r=i.directive;if("string"!=typeof r)break;"use strict"===r?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,o.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(n,o.Messages.IllegalLanguageModeDirective)):!e&&n.octal&&(e=n)}return t},e.prototype.qualifiedPropertyName=function(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===e.value}return!1},e.prototype.parseGetterMethod=function(){var e=this.createNode(),t=!1,n=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters();i.params.length>0&&this.tolerateError(o.Messages.BadGetterArity);var r=this.parsePropertyMethod(i);return this.context.allowYield=n,this.finalize(e,new a.FunctionExpression(null,i.params,r,t))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=!1,n=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters();1!==i.params.length?this.tolerateError(o.Messages.BadSetterArity):i.params[0]instanceof a.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var r=this.parsePropertyMethod(i);return this.context.allowYield=n,this.finalize(e,new a.FunctionExpression(null,i.params,r,t))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var i=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,i,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=i}return this.finalize(e,new a.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),i="",r=null,s=null,l=!1,u=!1,c=!1,h=!1;if(this.match("*"))this.nextToken();else if(l=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,c=!0,l=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var d=this.lookahead.value;":"!==d&&"("!==d&&"*"!==d&&(h=!0,t=this.lookahead,r=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,o.Messages.ConstructorIsAsync))}var p=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&p?(i="get",l=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod()):"set"===t.value&&p&&(i="set",l=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseSetterMethod()):7===t.type&&"*"===t.value&&p&&(i="init",l=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),u=!0),!i&&r&&this.match("(")&&(i="init",s=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),u=!0),i||this.throwUnexpectedToken(this.lookahead),"init"===i&&(i="method"),l||(c&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(t,o.Messages.StaticPrototype),!c&&this.isPropertyKey(r,"constructor")&&(("method"!==i||!u||s&&s.generator)&&this.throwUnexpectedToken(t,o.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,o.Messages.DuplicateConstructor):e.value=!0,i="constructor")),this.finalize(n,new a.MethodDefinition(r,l,s,i,c))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new a.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var i=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=n,this.finalize(t,new a.ClassDeclaration(i,r,o))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=t,this.finalize(e,new a.ClassExpression(n,i,r))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(o.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new a.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new a.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new a.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new a.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var i=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new a.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new a.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new a.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new a.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var i=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(i,this.lookahead.value)}this.nextToken();var r=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new a.ExportAllDeclaration(r))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null));else{var s=[],l=null,u=!1;for(this.expect("{");!this.match("}");)u=u||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),l=this.parseModuleSpecifier(),this.consumeSemicolon()):u?(i=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause,this.throwError(i,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new a.ExportNamedDeclaration(null,s,l))}return e},e}();t.Parser=h},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(e){Object.create&&Object.defineProperty&&(n=Object.create(e),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,i){var r="Line "+t+": "+i,o=this.constructError(r,n);return o.index=e,o.lineNumber=t,o.description=i,o},e.prototype.throwError=function(e,t,n,i){throw this.createError(e,t,n,i)},e.prototype.tolerateError=function(e,t,n,i){var r=this.createError(e,t,n,i);if(!this.tolerant)throw r;this.recordError(r)},e}();t.ErrorHandler=n},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),r=n(4),o=n(11);function a(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function s(e){return"01234567".indexOf(e)}var l=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,i=[];for(this.trackComment&&(i=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(++this.index,r.Character.isLineTerminator(o)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var a={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};i.push(a)}return 13===o&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,i}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},a={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},i.push(a)),i},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(r.Character.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(o)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(o)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(r.Character.isWhiteSpace(n))++this.index;else if(r.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var i=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(i)),t=!0}else{if(42!==n)break;this.index+=2,i=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(i))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,i=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(i))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,i=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(i))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,i=0;i<t;++i){if(this.eof()||!r.Character.isHexDigit(this.source.charCodeAt(this.index)))return null;n=16*n+a(this.source[this.index++])}return String.fromCharCode(n)},e.prototype.scanUnicodeCodePointEscape=function(){var e=this.source[this.index],t=0;for("}"===e&&this.throwUnexpectedToken();!this.eof()&&(e=this.source[this.index++],r.Character.isHexDigit(e.charCodeAt(0)));)t=16*t+a(e);return(t>1114111||"}"!==e)&&this.throwUnexpectedToken(),r.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!r.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=r.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),r.Character.isIdentifierPart(t));)n+=e=r.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=s(e);return!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+s(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+s(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var i=this.index;this.index=t,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=i}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&r.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(r.Character.isIdentifierStart(t)||r.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",i=!1;for(r.Character.isOctalDigit(e.charCodeAt(0))?(i=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return i||0!==n.length||this.throwUnexpectedToken(),(r.Character.isIdentifierStart(this.source.charCodeAt(this.index))||r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e<this.length;++e){var t=this.source[e];if("8"===t||"9"===t)return!1;if(!r.Character.isOctalDigit(t.charCodeAt(0)))return!0}return!0},e.prototype.scanNumericLiteral=function(){var e=this.index,t=this.source[e];i.assert(r.Character.isDecimalDigit(t.charCodeAt(0))||"."===t,"Numeric literal must start with a decimal digit or a decimal point");var n="";if("."!==t){if(n=this.source[this.index++],t=this.source[this.index],"0"===n){if("x"===t||"X"===t)return++this.index,this.scanHexLiteral(e);if("b"===t||"B"===t)return++this.index,this.scanBinaryLiteral(e);if("o"===t||"O"===t)return this.scanOctalLiteral(t,e);if(t&&r.Character.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("."===t){for(n+=this.source[this.index++];r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];t=this.source[this.index]}if("e"===t||"E"===t)if(n+=this.source[this.index++],"+"!==(t=this.source[this.index])&&"-"!==t||(n+=this.source[this.index++]),r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;r.Character.isDecimalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];else this.throwUnexpectedToken();return r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanStringLiteral=function(){var e=this.index,t=this.source[e];i.assert("'"===t||'"'===t,"String literal must starts with a quote"),++this.index;for(var n=!1,a="";!this.eof();){var s=this.source[this.index++];if(s===t){t="";break}if("\\"===s)if((s=this.source[this.index++])&&r.Character.isLineTerminator(s.charCodeAt(0)))++this.lineNumber,"\r"===s&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(s){case"u":if("{"===this.source[this.index])++this.index,a+=this.scanUnicodeCodePointEscape();else{var l=this.scanHexEscape(s);null===l&&this.throwUnexpectedToken(),a+=l}break;case"x":var u=this.scanHexEscape(s);null===u&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),a+=u;break;case"n":a+="\n";break;case"r":a+="\r";break;case"t":a+="\t";break;case"b":a+="\b";break;case"f":a+="\f";break;case"v":a+="\v";break;case"8":case"9":a+=s,this.tolerateUnexpectedToken();break;default:if(s&&r.Character.isOctalDigit(s.charCodeAt(0))){var c=this.octalToDecimal(s);n=c.octal||n,a+=String.fromCharCode(c.code)}else a+=s}else{if(r.Character.isLineTerminator(s.charCodeAt(0)))break;a+=s}}return""!==t&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:a,octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanTemplate=function(){var e="",t=!1,n=this.index,i="`"===this.source[n],a=!1,s=2;for(++this.index;!this.eof();){var l=this.source[this.index++];if("`"===l){s=1,a=!0,t=!0;break}if("$"===l){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,t=!0;break}e+=l}else if("\\"===l)if(l=this.source[this.index++],r.Character.isLineTerminator(l.charCodeAt(0)))++this.lineNumber,"\r"===l&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(l){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":if("{"===this.source[this.index])++this.index,e+=this.scanUnicodeCodePointEscape();else{var u=this.index,c=this.scanHexEscape(l);null!==c?e+=c:(this.index=u,e+=l)}break;case"x":var h=this.scanHexEscape(l);null===h&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),e+=h;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:"0"===l?(r.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral),e+="\0"):r.Character.isOctalDigit(l.charCodeAt(0))?this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral):e+=l}else r.Character.isLineTerminator(l.charCodeAt(0))?(++this.lineNumber,"\r"===l&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,e+="\n"):e+=l}return t||this.throwUnexpectedToken(),i||this.curlyStack.pop(),{type:10,value:this.source.slice(n+1,this.index-s),cooked:e,head:i,tail:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:n,end:this.index}},e.prototype.testRegExp=function(e,t){var n=e,i=this;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,n){var r=parseInt(t||n,16);return r>1114111&&i.throwUnexpectedToken(o.Messages.InvalidRegExp),r<=65535?String.fromCharCode(r):""}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,""));try{RegExp(n)}catch(e){this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];i.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,a=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],r.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t+=e;else if(r.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){a=!0;break}"["===e&&(n=!0)}return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!r.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,i=this.scanHexEscape("u");if(null!==i)for(e+=i;n<this.index;++n)this.source[n];else this.index=n,e+="u";this.tolerateUnexpectedToken()}else this.tolerateUnexpectedToken()}return e},e.prototype.scanRegExp=function(){var e=this.index,t=this.scanRegExpBody(),n=this.scanRegExpFlags();return{type:9,value:"",pattern:t,flags:n,regex:this.testRegExp(t,n),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var e=this.source.charCodeAt(this.index);return r.Character.isIdentifierStart(e)?this.scanIdentifier():40===e||41===e||59===e?this.scanPunctuator():39===e||34===e?this.scanStringLiteral():46===e?r.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():r.Character.isDecimalDigit(e)?this.scanNumericLiteral():96===e||125===e&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():e>=55296&&e<57343&&r.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=l},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),r=n(12),o=n(13),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(i=this.values[this.curly-4])&&!this.beforeFunctionExpression(i);else if("function"===this.values[this.curly-4]){var i;t=!(i=this.values[this.curly-5])||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),s=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t<e.length;++t){var n=e[t],i=this.scanner.source.slice(n.slice[0],n.slice[1]),r={type:n.multiLine?"BlockComment":"LineComment",value:i};this.trackRange&&(r.range=n.range),this.trackLoc&&(r.loc=n.loc),this.buffer.push(r)}if(!this.scanner.eof()){var a=void 0;this.trackLoc&&(a={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var s="/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(s);var l={type:o.TokenName[s.type],value:this.scanner.source.slice(s.start,s.end)};if(this.trackRange&&(l.range=[s.start,s.end]),this.trackLoc&&(a.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},l.loc=a),9===s.type){var u=s.pattern,c=s.flags;l.regex={pattern:u,flags:c}}this.buffer.push(l)}}return this.buffer.shift()},e}();t.Tokenizer=s}])},ya.exports=ba()),ya.exports),Ea=$(xa),wa={};var Da=(Sa||(Sa=1,function e(t){var n,i,r,o,a,s;function l(e){var t,n,i={};for(t in e)e.hasOwnProperty(t)&&("object"===D(n=e[t])&&null!==n?i[t]=l(n):i[t]=n);return i}function u(e,t){this.parent=e,this.key=t}function c(e,t,n,i){this.node=e,this.path=t,this.wrap=n,this.ref=i}function h(){}function d(e){return null!=e&&"object"===D(e)&&"string"==typeof e.type}function p(e,t){return(e===n.ObjectExpression||e===n.ObjectPattern)&&"properties"===t}function m(e,t){for(var n=e.length-1;n>=0;--n)if(e[n].node===t)return!0;return!1}function f(e,t){return(new h).traverse(e,t)}function g(e,t){var n;return n=function(e,t){var n,i,r,o;for(i=e.length,r=0;i;)t(e[o=r+(n=i>>>1)])?i=n:(r=o+1,i-=n+1);return r}(t,function(t){return t.range[0]>e.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),(n-=1)>=0&&(e.extendedRange[0]=t[n].range[1]),e}return n={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},r={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},i={Break:o={},Skip:a={},Remove:s={}},u.prototype.replace=function(e){this.parent[this.key]=e},u.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},h.prototype.path=function(){var e,t,n,i,r;function o(e,t){if(Array.isArray(t))for(n=0,i=t.length;n<i;++n)e.push(t[n]);else e.push(t)}if(!this.__current.path)return null;for(r=[],e=2,t=this.__leavelist.length;e<t;++e)o(r,this.__leavelist[e].path);return o(r,this.__current.path),r},h.prototype.type=function(){return this.current().type||this.__current.wrap},h.prototype.parents=function(){var e,t,n;for(n=[],e=1,t=this.__leavelist.length;e<t;++e)n.push(this.__leavelist[e].node);return n},h.prototype.current=function(){return this.__current.node},h.prototype.__execute=function(e,t){var n,i;return i=void 0,n=this.__current,this.__current=t,this.__state=null,e&&(i=e.call(this,t.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=n,i},h.prototype.notify=function(e){this.__state=e},h.prototype.skip=function(){this.notify(a)},h.prototype.break=function(){this.notify(o)},h.prototype.remove=function(){this.notify(s)},h.prototype.__initialize=function(e,t){this.visitor=t,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,"iteration"===t.fallback?this.__fallback=Object.keys:"function"==typeof t.fallback&&(this.__fallback=t.fallback),this.__keys=r,t.keys&&(this.__keys=Object.assign(Object.create(this.__keys),t.keys))},h.prototype.traverse=function(e,t){var n,i,r,s,l,u,h,f,g,v,y,b;for(this.__initialize(e,t),b={},n=this.__worklist,i=this.__leavelist,n.push(new c(e,null,null,null)),i.push(new c(null,null,null,null));n.length;)if((r=n.pop())!==b){if(r.node){if(u=this.__execute(t.enter,r),this.__state===o||u===o)return;if(n.push(b),i.push(r),this.__state===a||u===a)continue;if(l=(s=r.node).type||r.wrap,!(v=this.__keys[l])){if(!this.__fallback)throw new Error("Unknown node type "+l+".");v=this.__fallback(s)}for(f=v.length;(f-=1)>=0;)if(y=s[h=v[f]])if(Array.isArray(y)){for(g=y.length;(g-=1)>=0;)if(y[g]&&!m(i,y[g])){if(p(l,v[f]))r=new c(y[g],[h,g],"Property",null);else{if(!d(y[g]))continue;r=new c(y[g],[h,g],null,null)}n.push(r)}}else if(d(y)){if(m(i,y))continue;n.push(new c(y,h,null,null))}}}else if(r=i.pop(),u=this.__execute(t.leave,r),this.__state===o||u===o)return},h.prototype.replace=function(e,t){var n,i,r,l,h,m,f,g,v,y,b,S,x;function E(e){var t,i,r,o;if(e.ref.remove())for(i=e.ref.key,o=e.ref.parent,t=n.length;t--;)if((r=n[t]).ref&&r.ref.parent===o){if(r.ref.key<i)break;--r.ref.key}}for(this.__initialize(e,t),b={},n=this.__worklist,i=this.__leavelist,m=new c(e,null,null,new u(S={root:e},"root")),n.push(m),i.push(m);n.length;)if((m=n.pop())!==b){if(void 0!==(h=this.__execute(t.enter,m))&&h!==o&&h!==a&&h!==s&&(m.ref.replace(h),m.node=h),this.__state!==s&&h!==s||(E(m),m.node=null),this.__state===o||h===o)return S.root;if((r=m.node)&&(n.push(b),i.push(m),this.__state!==a&&h!==a)){if(l=r.type||m.wrap,!(v=this.__keys[l])){if(!this.__fallback)throw new Error("Unknown node type "+l+".");v=this.__fallback(r)}for(f=v.length;(f-=1)>=0;)if(y=r[x=v[f]])if(Array.isArray(y)){for(g=y.length;(g-=1)>=0;)if(y[g]){if(p(l,v[f]))m=new c(y[g],[x,g],"Property",new u(y,g));else{if(!d(y[g]))continue;m=new c(y[g],[x,g],null,new u(y,g))}n.push(m)}}else d(y)&&n.push(new c(y,x,null,new u(r,x)))}}else if(m=i.pop(),void 0!==(h=this.__execute(t.leave,m))&&h!==o&&h!==a&&h!==s&&m.ref.replace(h),this.__state!==s&&h!==s||E(m),this.__state===o||h===o)return S.root;return S.root},t.Syntax=n,t.traverse=f,t.replace=function(e,t){return(new h).replace(e,t)},t.attachComments=function(e,t,n){var r,o,a,s,u=[];if(!e.range)throw new Error("attachComments needs range information");if(!n.length){if(t.length){for(a=0,o=t.length;a<o;a+=1)(r=l(t[a])).extendedRange=[0,e.range[0]],u.push(r);e.leadingComments=u}return e}for(a=0,o=t.length;a<o;a+=1)u.push(g(l(t[a]),n));return s=0,f(e,{enter:function(e){for(var t;s<u.length&&!((t=u[s]).extendedRange[1]>e.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?i.Break:u[s].extendedRange[0]>e.range[1]?i.Skip:void 0}}),s=0,f(e,{leave:function(e){for(var t;s<u.length&&(t=u[s],!(e.range[1]<t.extendedRange[0]));)e.range[1]===t.extendedRange[0]?(e.trailingComments||(e.trailingComments=[]),e.trailingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?i.Break:u[s].extendedRange[0]>e.range[1]?i.Skip:void 0}}),e},t.VisitorKeys=r,t.VisitorOption=i,t.Controller=h,t.cloneEnvironment=function(){return e({})},t}(wa)),wa),Ca=$(Da);var ka=null;function Aa(){if(!window._yttv)return setTimeout(Aa,250);if(!document.querySelector("video"))return setTimeout(Aa,250);var e=Object.keys(window._yttv).filter(e=>"function"==typeof window._yttv[e]&&window._yttv[e].toString().includes("TRANSPORT_CONTROLS_BUTTON_TYPE_FEATURED_ACTION"));if(0!==e.length){var t=window._yttv[e[0]];Er("enablePatchingVideoPlayer")&&(n.prototype=t.prototype,window._yttv[e[0]]=n)}else setTimeout(Aa,250);function n(){var e,i=Array.prototype.slice.call(arguments),r=/^class\s/.test(t.toString());function o(e,i){return"undefined"!=typeof Reflect&&"function"==typeof Reflect.construct?Reflect.construct(e,i,n):new t(...i)}if(!(this instanceof n))return r?o(t,i):t.apply(this,i);r?e=o(t,i):(t.apply(this,i),e=this);var a=ka||(ka=function(e){var t,n=e,i=0;try{t=Ea.parse(e,{range:!0,tolerant:!0,sourceType:"script"})}catch(n){try{var r="("+e+")";t=Ea.parse(r,{range:!0,tolerant:!0,sourceType:"script"}),i=1}catch(r){try{t=Ea.parse(e,{range:!0,tolerant:!0,sourceType:"module"})}catch(r){try{var o="("+e+")";t=Ea.parse(o,{range:!0,tolerant:!0,sourceType:"module"}),i=1}catch(e){throw n}}}}var a=[];return Ca.traverse(t,{enter:function(e){if("AssignmentExpression"===e.type){var t=e.right;if(t&&t.range){var r=n.slice(t.range[0]-i,t.range[1]-i),o=null;if("CallExpression"===t.type&&t.callee&&"FunctionExpression"===t.callee.type&&t.callee.body)for(var s=t.callee.body.body||[],l=0;l<s.length;l++){var u=s[l];if("ReturnStatement"===u.type&&u.argument&&u.argument.range){o=n.slice(u.argument.range[0]-i,u.argument.range[1]-i);break}}else"FunctionExpression"!==t.type&&"ArrowFunctionExpression"!==t.type||(o=r);a.push({left:e.left&&e.left.range?n.slice(e.left.range[0]-i,e.left.range[1]-i):null,rhs:r,returned:o})}}}}),a}(t.toString())),s={type:"TRANSPORT_CONTROLS_BUTTON_TYPE_PIP",button:{buttonRenderer:Xr(!1,Er("enableSwapMPWithPIP")?mr("player.pictureInPicture"):mr("player.miniPlayer"),"CLEAR_COOKIES",{customAction:{action:Er("enableSwapMPWithPIP")?"ENTER_PIP":"ENTER_MP"}})}},l=a.find(e=>e.rhs.includes("TRANSPORT_CONTROLS_BUTTON_TYPE_PLAYBACK_SETTINGS")).left.split(".")[1];if(!l)return e;var u=e[l];Er("enableMPButton")&&(e[l]=function(){var e=u.apply(this,arguments),t=e.findIndex(e=>"TRANSPORT_CONTROLS_BUTTON_TYPE_PLAYBACK_SETTINGS"===e.type);return e.find(e=>"TRANSPORT_CONTROLS_BUTTON_TYPE_PIP"===e.type)||e.splice(t,0,s),e});var c=a.find(e=>{if(e.rhs.includes("skipNextButton")){var t=e.rhs.indexOf("skipNextButton");if(e.rhs.indexOf("skipPreviousButton")>t)return!0}}).left.split(".")[1],h=a.find(e=>{if(e.rhs.includes("skipPreviousButton")&&e.rhs.indexOf("skipNextButton")>e.rhs.indexOf("skipPreviousButton"))return!0}).left.split(".")[1],d=a.find(e=>e.rhs.includes("props.data.engagementActions")).left.split(".")[1];if(d&&Er("enableSpeedControlsButton")){var p=e[d];e[d]=function(){var e=p.apply(this,arguments);return e.find(e=>"TRANSPORT_CONTROLS_BUTTON_TYPE_SPEED"===e.type)||e.push({type:"TRANSPORT_CONTROLS_BUTTON_TYPE_SPEED",button:{buttonRenderer:Xr(!1,mr("player.playbackSpeed.button"),"SLOW_MOTION_VIDEO",{customAction:{action:"TT_SPEED_SETTINGS_SHOW"}})}}),e}}if(!Er("enableSuperThanksButton")){var m=e[d];e[d]=function(){return m.apply(this,arguments).filter(e=>"TRANSPORT_CONTROLS_BUTTON_TYPE_SUPER_THANKS"!==e.type).filter(e=>"TRANSPORT_CONTROLS_BUTTON_TYPE_SHOPPING"!==e.type)}}if(!Er("enableAIAskButton")){var f=e[d];e[d]=function(){return f.apply(this,arguments).filter(e=>"TRANSPORT_CONTROLS_BUTTON_TYPE_YOUCHAT_BUTTON"!==e.type).filter(e=>"TRANSPORT_CONTROLS_BUTTON_TYPE_YOUCHAT_BUTTON"!==e.type)}}if(Er("enablePreviousNextButtons")){if(!c||!h)return e;e[c]=function(){return Xr(!1,mr("player.previous"),"SKIP_PREVIOUS",{signalAction:{signal:"PLAYER_PLAY_PREVIOUS"}})},e[h]=function(){return Xr(!1,mr("player.next"),"SKIP_NEXT",{signalAction:{signal:"PLAYER_PLAY_NEXT"}})}}return e}}"complete"===document.readyState||"interactive"===document.readyState?Aa():window.addEventListener("DOMContentLoaded",Aa);var Ta,Fa=JSON.parse;function Pa(e){var t=document.getElementById("tizentube-clock");if(!e||!t)if(e||!t){if(e||t){var n=document.createElement("div");function i(){var e=new Date,t=Er("isClock12HourFormat"),n=Er("clockShowSeconds"),i=Er("clockHideWhenVideoPlaying"),r=document.querySelector("ytlr-watch-default");i&&(r&&"true"===r.getAttribute("hybridnavfocusable")?Ta.style.display="none":Ta.style.display="block");var o=e.getHours();t&&(o=o%12||12),o=o.toString().padStart(2,"0");var a=e.getMinutes().toString().padStart(2,"0"),s=e.getSeconds().toString().padStart(2,"0");Ta.textContent=`${o}:${a}${n?`:${s}`:""}${t?e.getHours()>=12?" PM":" AM":""}`}n.id="tizentube-clock",n.style.height="45rem",n.style.width="80rem",n.style.position="absolute",n.style.top="50%",n.style.left="50%",n.style.marginTop="-22.5rem",n.style.marginLeft="-40rem",(Ta=document.createElement("div")).style.position="absolute",Ta.style.zIndex="9999",Ta.style.right="5%",Ta.style.top="2%",Ta.style.fontSize="1.5em",n.appendChild(Ta),document.body.appendChild(n),i(),setInterval(i,1e3)}}else t.remove()}JSON.parse=function(){var e,t,n=Fa.apply(this,arguments),i=null===(e=n.items)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.guideSectionRenderer,r=Er("sidebarContentsOrder");if(i&&Array.isArray(r)){var o,a=!1,s=f(i.items);try{var l=function(){var e,t,n=o.value,i=(null===(e=n.guideEntryRenderer)||void 0===e||null===(e=e.navigationEndpoint)||void 0===e||null===(e=e.browseEndpoint)||void 0===e?void 0:e.browseId)||(null===(t=n.guideEntryRenderer)||void 0===t||null===(t=t.navigationEndpoint)||void 0===t?void 0:t.searchEndpoint)&&"search";i&&!r.some(e=>("object"===D(e)?e.browseId:e)===i)&&(r.push(i),a=!0)};for(s.s();!(o=s.n()).done;)l()}catch(e){s.e(e)}finally{s.f()}a&&wr("sidebarContentsOrder",r)}if(0===(null===(t=Er("sidebarContentsOrder"))||void 0===t?void 0:t.length)){if(n.items&&Array.isArray(n.items)&&n.items[0].guideSectionRenderer){var u,c=[],h=f(n.items[0].guideSectionRenderer.items);try{for(h.s();!(u=h.n()).done;){var d,p,m=u.value,g=null===(d=m.guideEntryRenderer)||void 0===d||null===(d=d.navigationEndpoint)||void 0===d||null===(d=d.browseEndpoint)||void 0===d?void 0:d.browseId;g?c.push(g):null!==(p=m.guideEntryRenderer)&&void 0!==p&&null!==(p=p.navigationEndpoint)&&void 0!==p&&p.searchEndpoint&&c.push("search")}}catch(e){h.e(e)}finally{h.f()}wr("sidebarContentsOrder",c)}}else if(n.items&&Array.isArray(n.items)&&n.items[0].guideSectionRenderer){var v,y=Er("sidebarContentsOrder"),b=n.items[0].guideSectionRenderer.items,S=JSON.parse(JSON.stringify(b)),x=f(y);try{for(x.s();!(v=x.n()).done;){var E=v.value;if("object"===D(E)&&null!==E){var w=qr(E.title,{browseEndpoint:{browseId:E.browseId}},"PERSON");S.push(w)}}}catch(e){x.e(e)}finally{x.f()}var C,k=[],A=new Set,T=f(y);try{var F=function(){var e=C.value,t="object"===D(e)?e.browseId:e,n=S.findIndex(e=>{var n,i;return(null===(n=e.guideEntryRenderer)||void 0===n||null===(n=n.navigationEndpoint)||void 0===n||null===(n=n.browseEndpoint)||void 0===n?void 0:n.browseId)===t||"search"===t&&(null===(i=e.guideEntryRenderer)||void 0===i||null===(i=i.navigationEndpoint)||void 0===i?void 0:i.searchEndpoint)});-1!==n&&(k.push(S[n]),A.add(n))};for(T.s();!(C=T.n()).done;)F()}catch(e){T.e(e)}finally{T.f()}S.forEach((e,t)=>{A.has(t)||k.push(e)}),n.items[0].guideSectionRenderer.items=k}var P=Er("disabledSidebarContents"),B=Er("disableChannelsOnSidebar");if(n.items&&Array.isArray(n.items)&&n.items[0].guideSectionRenderer)for(var I=0;I<n.items.length;I++){var O=n.items[I].guideSectionRenderer;O.originalItems=O.items.slice();for(var N=0;N<O.items.length;N++){var R,L=O.items[N].guideEntryRenderer;L&&((null!=P&&P.length&&P.includes(null!==(R=L.navigationEndpoint)&&void 0!==R&&R.browseEndpoint?L.navigationEndpoint.browseEndpoint.browseId:"search")||B&&null!=L&&L.thumbnail)&&(O.items.splice(N,1),N--))}}return n},Dr.addEventListener("configChange",e=>{if("disabledSidebarContents"===e.detail.key||"disableChannelsOnSidebar"===e.detail.key||"sidebarContentsOrder"===e.detail.key){var t=Wo();t&&t.executeFunction(new t.commandFunction("reloadGuideAction"))}}),function e(){var t=document.querySelector(".html5-video-player"),n=document.querySelector("video");if(!t)return setTimeout(e,500);t.addEventListener("onPlaybackStartExternal",()=>{try{if(-1===window.location.href.indexOf("watch"))return;var e=t.getStatsForNerds().resolution.match(/(\d+)x(\d+)@([\d.]+)/),i=Er("autoFrameRatePauseVideoFor");if(e){var r=e[3];Er("autoFrameRate")&&window.h5vcc&&window.h5vcc.tizentube&&window.h5vcc.tizentube.SetFrameRate&&(i>0&&(n.pause(),setTimeout(()=>{n.play()},i)),window.h5vcc.tizentube.SetFrameRate(parseFloat(r)))}}catch(e){console.error("Error in auto frame rate handling:",e)}}),window.addEventListener("hashchange",()=>{window.location.href.indexOf("watch")>0&&Er("autoFrameRate")&&window.h5vcc&&window.h5vcc.tizentube&&window.h5vcc.tizentube.SetFrameRate&&window.h5vcc.tizentube.SetFrameRate(0)})}(),Dr.addEventListener("configChange",e=>{"enableClock"===e.detail.key&&Pa(e.detail.value)}),Pa(Er("enableClock")),"localhost"===window.location.hostname&&function(){var t=window.fetch;t&&(window.fetch=function(n,i){var r="",o=!1;if("string"==typeof n?r=e(n):n instanceof URL?(r=e(n.toString()),n=new URL(r)):n instanceof Request&&(o=!0,r=e(n.url)),o){if("POST"===n.method&&-1!==r.indexOf("localhost")){var a={method:n.method,headers:new Headers(n.headers),mode:n.mode,credentials:n.credentials};return n.body&&!n.bodyUsed?(n.clone(),n.clone().arrayBuffer().then(function(e){return a.body=e,t(r,a)})):t(r,a)}n=new Request(r,n)}return t.apply(this,[r,i])});var n=XMLHttpRequest.prototype.open;if(XMLHttpRequest.prototype.open=function(t,i,r,o,a){var s=e(i);return s!==i&&(r=!0),void 0===r&&(r=!0),n.apply(this,[t,s,r,o,a])},navigator.sendBeacon){var i=navigator.sendBeacon;navigator.sendBeacon=function(t,n){return console.log("Beacon data:",n),i.apply(this,[e(t),n])}}Object.defineProperty(HTMLImageElement.prototype,"src",{set:function(t){Object.getOwnPropertyDescriptor(Element.prototype,"setAttribute").value.call(this,"src",e(t))}}),Object.defineProperty(HTMLScriptElement.prototype,"src",{set:function(t){Object.getOwnPropertyDescriptor(Element.prototype,"setAttribute").value.call(this,"src",e(t))}})}()}();
|