(function(){'use strict';var aa=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};function ba(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ca=ba(this);
function da(a,b){if(b)a:{var c=ca;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&aa(c,a,{configurable:!0,writable:!0,value:b})}}function ea(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function m(a){return ea(a())}da("globalThis",function(a){return a||ca});
da("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&c.push(b[d]);return c}});da("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(c<0&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});
da("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&c.push([d,b[d]]);return c}});function fa(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}da("Array.prototype.values",function(a){return a?a:function(){return fa(this,function(b,c){return c})}});
var ha=()=>{var a=window.getCurrentSdkUrl();if(a!==null){a=new URL(a.origin+a.pathname+"?"+window.getLocationHash().substring(1));if(a.searchParams.has("flags")){let b;window.sdkFlags=(b=a.searchParams.get("flags"))!=null?b:""}if(a.searchParams.has("environment")&&a.searchParams.has("bundle")&&a.searchParams.has("key")&&(a.searchParams.get("environment")!=="prod"||a.searchParams.get("bundle")!=="public"))throw document.write('<script src="'+a.toString()+'">\x3c/script>'),Error("Exiting SDK: Purposefully exiting to load a different SDK version.");
}};if(!window.loadYTGame){window.getLocationHash=()=>window.location.hash;let a=document.currentScript.src;window.getCurrentSdkUrl=()=>a!=""?new URL(a):null;window.loadYTGame=ha;ha()}window.enableSendingResourceLoadedEvents=!0;/*

 Copyright The Closure Library Authors.
 SPDX-License-Identifier: Apache-2.0
*/
var p=this||self;function ia(a,b){a:{var c=["CLOSURE_FLAGS"];for(var d=p,e=0;e<c.length;e++)if(d=d[c[e]],d==null){c=null;break a}c=d}a=c&&c[a];return a!=null?a:b}function ja(a){var b=typeof a;return b=="object"&&a!=null||b=="function"}function ka(a,b){a=a.split(".");for(var c=p,d;a.length&&(d=a.shift());)a.length||b===void 0?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b}function la(a){return a}
function ma(a,b){function c(){}c.prototype=b.prototype;a.S=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Y=function(d,e,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[e].apply(d,g)}};function na(){throw Error("Invalid UTF8");}function oa(a,b){b=String.fromCharCode.apply(null,b);return a==null?b:a+b}var pa=void 0,qa,ra=typeof TextDecoder!=="undefined",sa,ta=typeof TextEncoder!=="undefined";function ua(a){p.setTimeout(()=>{throw a;},0)};var va=ia(610401301,!1),wa=ia(748402147,!0);function xa(){var a=p.navigator;return a&&(a=a.userAgent)?a:""}var ya,za=p.navigator;ya=za?za.userAgentData||null:null;function r(a){return xa().indexOf(a)!=-1};var Aa=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(typeof a==="string")return typeof b!=="string"||b.length!=1?-1:a.indexOf(b,0);for(let c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};function Ba(a){Ba[" "](a);return a}Ba[" "]=function(){};var Ca=r("Gecko")&&!(xa().toLowerCase().indexOf("webkit")!=-1&&!r("Edge"))&&!(r("Trident")||r("MSIE"))&&!r("Edge"),Da=xa().toLowerCase().indexOf("webkit")!=-1&&!r("Edge");var Ea={},Fa=null;function Ga(a){var b;b===void 0&&(b=0);Ha();b=Ea[b];for(var c=Array(Math.floor(a.length/3)),d=b[64]||"",e=0,f=0;e<a.length-2;e+=3){var g=a[e],h=a[e+1],k=a[e+2],l=b[g>>2];g=b[(g&3)<<4|h>>4];h=b[(h&15)<<2|k>>6];k=b[k&63];c[f++]=l+g+h+k}l=0;k=d;switch(a.length-e){case 2:l=a[e+1],k=b[(l&15)<<2]||d;case 1:a=a[e],c[f]=b[a>>2]+b[(a&3)<<4|l>>4]+k+d}return c.join("")}
function Ia(a){var b=a.length,c=b*3/4;c%3?c=Math.floor(c):"=.".indexOf(a[b-1])!=-1&&(c="=.".indexOf(a[b-2])!=-1?c-2:c-1);var d=new Uint8Array(c),e=0;Ja(a,function(f){d[e++]=f});return e!==c?d.subarray(0,e):d}
function Ja(a,b){function c(e){for(;d<a.length;){let f=a.charAt(d++),g=Fa[f];if(g!=null)return g;if(!/^[\s\xa0]*$/.test(f))throw Error("Unknown base64 encoding at char: "+f);}return e}Ha();for(var d=0;;){let e=c(-1),f=c(0),g=c(64),h=c(64);if(h===64&&e===-1)break;b(e<<2|f>>4);g!=64&&(b(f<<4&240|g>>2),h!=64&&b(g<<6&192|h))}}
function Ha(){if(!Fa){Fa={};var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),b=["+/=","+/","-_=","-_.","-_"];for(let c=0;c<5;c++){let d=a.concat(b[c].split(""));Ea[c]=d;for(let e=0;e<d.length;e++){let f=d[e];Fa[f]===void 0&&(Fa[f]=e)}}}};var Ka=typeof Uint8Array!=="undefined",La=!(va&&ya&&ya.brands.length>0?0:r("Trident")||r("MSIE"))&&typeof btoa==="function",Ma=/[-_.]/g,Na={"-":"+",_:"/",".":"="};function Oa(a){return Na[a]||""}function Pa(a){if(!La)return Ia(a);a=Ma.test(a)?a.replace(Ma,Oa):a;a=atob(a);var b=new Uint8Array(a.length);for(let c=0;c<a.length;c++)b[c]=a.charCodeAt(c);return b}var Qa={};function Ra(a){Sa(Qa);var b=a.g;b=b==null||Ka&&b!=null&&b instanceof Uint8Array?b:typeof b==="string"?Pa(b):null;return b==null?b:a.g=b}var Ta=class{constructor(a,b){Sa(b);this.g=a;if(a!=null&&a.length===0)throw Error("ByteString should be constructed with non-empty values");}},Ua;function Sa(a){if(a!==Qa)throw Error("illegal external caller");};function Va(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};var Wa=void 0;function Xa(a){a=Error(a);Va(a,"warning");return a}function Ya(a,b){if(a!=null){var c;var d=(c=Wa)!=null?c:Wa={};c=d[a]||0;c>=b||(d[a]=c+1,a=Error(),Va(a,"incident"),ua(a))}};function Za(){return typeof BigInt==="function"};var $a=typeof Symbol==="function"&&typeof Symbol()==="symbol";function v(a,b,c=!1){return typeof Symbol==="function"&&typeof Symbol()==="symbol"?c&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol():b}var ab=v("jas",void 0,!0),bb=v(void 0,"0di"),cb=v(void 0,"1oa"),db=v(void 0,Symbol()),eb=v(void 0,"0ubs"),fb=v(void 0,"0ubsb"),gb=v(void 0,"0actk"),hb=v("m_m","ca",!0);var ib={V:{value:0,configurable:!0,writable:!0,enumerable:!1}},jb=Object.defineProperties,w=$a?ab:"V",kb,lb=[];x(lb,7);kb=Object.freeze(lb);function mb(a,b){$a||w in a||jb(a,ib);a[w]|=b}function x(a,b){$a||w in a||jb(a,ib);a[w]=b}function nb(a){mb(a,34);return a}function ob(a){mb(a,8192);return a};var pb={};function y(a,b){return b===void 0?a.g!==qb&&!!(2&(a.l[w]|0)):!!(2&b)&&a.g!==qb}var qb={};class rb{constructor(a,b,c){this.g=a;this.h=b;this.i=c}next(){var a=this.g.next();a.done||(a.value=this.h.call(this.i,a.value));return a}[Symbol.iterator](){return this}}function tb(a,b,c){var d=b&128?0:-1,e=a.length,f;if(f=!!e)f=a[e-1],f=f!=null&&typeof f==="object"&&f.constructor===Object;var g=e+(f?-1:0);for(b=b&128?1:0;b<g;b++)c(b-d,a[b]);if(f){a=a[e-1];for(let h in a)!isNaN(h)&&c(+h,a[h])}}
var ub={};function vb(a){return a&128?ub:void 0};function wb(a){a.ba=!0;return a};var xb=wb(a=>typeof a==="number"),yb=wb(a=>typeof a==="string"),zb=wb(a=>typeof a==="boolean");var Ab=typeof p.BigInt==="function"&&typeof p.BigInt(0)==="bigint";function z(a){var b=a;if(yb(b)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(b))throw Error(String(b));}else if(xb(b)&&!Number.isSafeInteger(b))throw Error(String(b));return Ab?BigInt(a):a=zb(a)?a?"1":"0":yb(a)?a.trim()||"0":String(a)}var Gb=wb(a=>Ab?a>=Bb&&a<=Cb:a[0]==="-"?Db(a,Eb):Db(a,Fb)),Eb=Number.MIN_SAFE_INTEGER.toString(),Bb=Ab?BigInt(Number.MIN_SAFE_INTEGER):void 0,Fb=Number.MAX_SAFE_INTEGER.toString(),Cb=Ab?BigInt(Number.MAX_SAFE_INTEGER):void 0;
function Db(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){let d=a[c],e=b[c];if(d>e)return!1;if(d<e)return!0}};var Hb=typeof Uint8Array.prototype.slice==="function",A=0,C=0;function Ib(a){var b=a>>>0;A=b;C=(a-b)/4294967296>>>0}function Jb(a){if(a<0){Ib(-a);let [b,c]=Kb(A,C);A=b>>>0;C=c>>>0}else Ib(a)}function Lb(a,b){b>>>=0;a>>>=0;if(b<=2097151)var c=""+(4294967296*b+a);else Za()?c=""+(BigInt(b)<<BigInt(32)|BigInt(a)):(c=(a>>>24|b<<8)&16777215,b=b>>16&65535,a=(a&16777215)+c*6777216+b*6710656,c+=b*8147497,b*=2,a>=1E7&&(c+=a/1E7>>>0,a%=1E7),c>=1E7&&(b+=c/1E7>>>0,c%=1E7),c=b+Mb(c)+Mb(a));return c}
function Mb(a){a=String(a);return"0000000".slice(a.length)+a}function Nb(a,b){if(b&2147483648)if(Za())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{let [c,d]=Kb(a,b);a="-"+Lb(c,d)}else a=Lb(a,b);return a}
function Ob(a){if(a.length<16)Jb(Number(a));else if(Za())a=BigInt(a),A=Number(a&BigInt(4294967295))>>>0,C=Number(a>>BigInt(32)&BigInt(4294967295));else{let b=+(a[0]==="-");C=A=0;let c=a.length;for(let d=b,e=(c-b)%6+b;e<=c;d=e,e+=6){let f=Number(a.slice(d,e));C*=1E6;A=A*1E6+f;A>=4294967296&&(C+=Math.trunc(A/4294967296),C>>>=0,A>>>=0)}if(b){let [d,e]=Kb(A,C);A=d;C=e}}}function Kb(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};function Pb(a){return Array.prototype.slice.call(a)};function Qb(a,b=`unexpected value ${a}!`){throw Error(b);};var Rb=typeof BigInt==="function"?BigInt.asIntN:void 0,Sb=Number.isSafeInteger,Tb=Number.isFinite,Ub=Math.trunc;function Vb(a){if(typeof a!=="number")throw Error(`Value of float/double field must be a number, found ${typeof a}: ${a}`);return a}function Wb(a){if(a==null||typeof a==="boolean")return a;if(typeof a==="number")return!!a}var Xb=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;
function Yb(a){switch(typeof a){case "bigint":return!0;case "number":return Tb(a);case "string":return Xb.test(a);default:return!1}}function Zb(a){if(typeof a!=="number")throw Xa("int32");if(!Tb(a))throw Xa("int32");return a|0}function $b(a){return a==null?a:Zb(a)}function ac(a){if(a==null)return a;if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;return Tb(a)?a|0:void 0}
function bc(a){if(a==null)return a;if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;return Tb(a)?a>>>0:void 0}
function cc(a){var b=void 0;b!=null||(b=1024);if(!Yb(a))throw Xa("int64");var c=typeof a;switch(b){case 512:switch(c){case "string":return dc(a);case "bigint":return String(Rb(64,a));default:return ec(a)}case 1024:switch(c){case "string":return b=Ub(Number(a)),Sb(b)?a=z(b):(b=a.indexOf("."),b!==-1&&(a=a.substring(0,b)),a=Za()?z(Rb(64,BigInt(a))):z(fc(a))),a;case "bigint":return z(Rb(64,a));default:return Sb(a)?z(hc(a)):z(ec(a))}case 0:switch(c){case "string":return dc(a);case "bigint":return z(Rb(64,
a));default:return hc(a)}default:return Qb(b,"Unknown format requested type for int64")}}function fc(a){var b=a.length;if(a[0]==="-"?b<20||b===20&&a<="-9223372036854775808":b<19||b===19&&a<="9223372036854775807")return a;Ob(a);return Nb(A,C)}function hc(a){a=Ub(a);if(!Sb(a)){Jb(a);var b=A,c=C;if(a=c&2147483648)b=~b+1>>>0,c=~c>>>0,b==0&&(c=c+1>>>0);let d=c*4294967296+(b>>>0);b=Number.isSafeInteger(d)?d:Lb(b,c);a=typeof b==="number"?a?-b:b:a?"-"+b:b}return a}
function ec(a){a=Ub(a);Sb(a)?a=String(a):(Jb(a),a=Nb(A,C));return a}function dc(a){var b=Ub(Number(a));if(Sb(b))return String(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));return fc(a)}function ic(a){if(a==null)return a;var b=typeof a;if(b==="bigint")return String(Rb(64,a));if(Yb(a)){if(b==="string")return dc(a);if(b==="number")return hc(a)}}function D(a){if(a!=null&&typeof a!=="string")throw Error();return a}function jc(a){return a==null||typeof a==="string"?a:void 0}
function kc(a,b,c,d){if(a!=null&&a[hb]===pb)return a;if(!Array.isArray(a))return c?d&2?((a=b[bb])||(a=new b,nb(a.l),a=b[bb]=a),b=a):b=new b:b=void 0,b;c=a[w]|0;d=c|d&32|d&2;d!==c&&x(a,d);return new b(a)}function lc(a,b,c){a=b?Zb(a):ac(a);return a==null?c?0:void 0:a|0}function mc(a,b,c){if(b){if(typeof a!=="string")throw Error();return a}var d;return(d=jc(a))!=null?d:c?"":void 0};function nc(a){return a};var oc={},pc=function(){try{return Ba(new class extends Map{constructor(){super()}}),!1}catch(a){return!0}}();
class qc{constructor(){this.g=new Map}get(a){return this.g.get(a)}set(a,b){this.g.set(a,b);this.size=this.g.size;return this}delete(a){a=this.g.delete(a);this.size=this.g.size;return a}clear(){this.g.clear();this.size=this.g.size}has(a){return this.g.has(a)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(a,b){return this.g.forEach(a,b)}[Symbol.iterator](){return this.entries()}}
var rc=(()=>pc?(Object.setPrototypeOf(qc.prototype,Map.prototype),Object.defineProperties(qc.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),qc):class extends Map{constructor(){super()}})();function sc(a){return a}function tc(a){if(a.v&2)throw Error("Cannot mutate an immutable Map");}
var E=class extends rc{constructor(a,b,c=sc,d=sc){super();this.v=a[w]|0;this.C=b;this.D=c;this.N=this.C?uc:d;for(let e=0;e<a.length;e++){let f=a[e],g=c(f[0],!1,!0),h=f[1];b?h===void 0&&(h=null):h=d(f[1],!1,!0,void 0,void 0,this.v);super.set(g,h)}}G(a){return ob(Array.from(super.entries(),a))}clear(){tc(this);super.clear()}delete(a){tc(this);return super.delete(this.D(a,!0,!1))}entries(){if(this.C){var a=super.keys();a=new rb(a,vc,this)}else a=super.entries();return a}values(){if(this.C){var a=super.keys();
a=new rb(a,E.prototype.get,this)}else a=super.values();return a}forEach(a,b){this.C?super.forEach((c,d,e)=>{a.call(b,e.get(d),d,e)}):super.forEach(a,b)}set(a,b){tc(this);a=this.D(a,!0,!1);return a==null?this:b==null?(super.delete(a),this):super.set(a,this.N(b,!0,!0,this.C,!1,this.v))}W(a){var b=this.D(a[0],!1,!0);a=a[1];a=this.C?a===void 0?null:a:this.N(a,!1,!0,void 0,!1,this.v);super.set(b,a)}has(a){return super.has(this.D(a,!1,!1))}get(a){a=this.D(a,!1,!1);var b=super.get(a);if(b!==void 0){var c=
this.C;return c?(c=this.N(b,!1,!0,c,this.Z,this.v),c!==b&&super.set(a,c),c):b}}[Symbol.iterator](){return this.entries()}};E.prototype.toJSON=void 0;function uc(a,b,c,d,e,f){a=kc(a,d,c,f);e&&(a=wc(a));return a}function vc(a){return[a,this.get(a)]}var xc;function yc(){return xc||(xc=new E(nb([]),void 0,void 0,void 0,oc))};function zc(a){var b=la(db);return b?a[b]:void 0}function Ac(a,b){for(let c in a)!isNaN(c)&&b(a,+c,a[c])}function Bc(a){var b=new Cc;Ac(a,(c,d,e)=>{b[d]=Pb(e)});b.g=a.g;return b}var Cc=class{};function Dc(a,b){b<100||Ya(eb,1)};function Ec(a,b,c,d){var e=d!==void 0;d=!!d;var f=la(db),g;!e&&$a&&f&&(g=a[f])&&Ac(g,Dc);f=[];var h=a.length;g=4294967295;var k=!1,l=!!(b&64),n=l?b&128?0:-1:void 0;if(!(b&1)){var q=h&&a[h-1];q!=null&&typeof q==="object"&&q.constructor===Object?(h--,g=h):q=void 0;if(l&&!(b&128)&&!e){k=!0;var t;g=((t=Fc)!=null?t:nc)(g-n,n,a,q,void 0)+n}}b=void 0;for(t=0;t<h;t++){let B=a[t];if(B!=null&&(B=c(B,d))!=null)if(l&&t>=g){let sb=t-n;var u=void 0;((u=b)!=null?u:b={})[sb]=B}else f[t]=B}if(q)for(let B in q){u=
q[B];if(u==null||(u=c(u,d))==null)continue;h=+B;let sb;if(l&&!Number.isNaN(h)&&(sb=h+n)<g)f[sb]=u;else{let Ad;((Ad=b)!=null?Ad:b={})[B]=u}}b&&(k?f.push(b):f[g]=b);e&&la(db)&&(a=zc(a))&&a instanceof Cc&&(f[db]=Bc(a));return f}function Gc(a){a[0]=Hc(a[0]);a[1]=Hc(a[1]);return a}
function Hc(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return Gb(a)?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){var b=a[w]|0;return a.length===0&&b&1?void 0:Ec(a,b,Hc)}if(a!=null&&a[hb]===pb)return Ic(a);if(a instanceof Ta){let e=a.g;if(e==null)a="";else if(typeof e==="string")a=e;else{if(La){b="";for(var c=0,d=e.length-10240;c<d;)b+=String.fromCharCode.apply(null,e.subarray(c,c+=10240));b+=String.fromCharCode.apply(null,c?e.subarray(c):
e);b=btoa(b)}else b=Ga(e);a=a.g=b}return a}if(a instanceof E)return a=a.size!==0?a.G(Gc):void 0,a;return}return a}var Fc;function Ic(a){a=a.l;return Ec(a,a[w]|0,Hc)};var Jc,Kc;function Lc(a){switch(typeof a){case "boolean":return Jc||(Jc=[0,void 0,!0]);case "number":return a>0?void 0:a===0?Kc||(Kc=[0,void 0]):[-a,void 0];case "string":return[0,a];case "object":return a}}function Mc(a,b){return Nc(a,b[0],b[1])}
function Nc(a,b,c,d=0){if(a==null){var e=32;c?(a=[c],e|=128):a=[];b&&(e=e&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw Error("narr");e=a[w]|0;if(wa&&1&e)throw Error("rfarr");2048&e&&!(2&e)&&Oc();if(e&256)throw Error("farr");if(e&64)return(e|d)!==e&&x(a,e|d),a;if(c&&(e|=128,c!==a[0]))throw Error("mid");a:{c=a;e|=64;var f=c.length;if(f){var g=f-1;let k=c[g];if(k!=null&&typeof k==="object"&&k.constructor===Object){b=e&128?0:-1;g-=b;if(g>=1024)throw Error("pvtlmt");for(var h in k)f=+h,f<g&&
(c[f+b]=k[h],delete k[h]);e=e&-16760833|(g&1023)<<14;break a}}if(b){h=Math.max(b,f-(e&128?0:-1));if(h>1024)throw Error("spvt");e=e&-16760833|(h&1023)<<14}}}x(a,e|64|d);return a}function Oc(){if(wa)throw Error("carr");Ya(gb,5)};function Pc(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){var c=a[w]|0;return a.length===0&&c&1?void 0:Qc(a,c,b)}if(a!=null&&a[hb]===pb)return Rc(a);if(a instanceof E){b=a.v;if(b&2)return a;if(!a.size)return;c=nb(a.G());if(a.C)for(a=0;a<c.length;a++){let d=c[a],e=d[1];e==null||typeof e!=="object"?e=void 0:e!=null&&e[hb]===pb?e=Rc(e):Array.isArray(e)?e=Qc(e,e[w]|0,!!(b&32)):e=void 0;d[1]=e}return c}if(a instanceof Ta)return a}
function Qc(a,b,c){if(b&2)return a;!c||4096&b||16&b?a=Sc(a,b,!1,c&&!(b&16)):(mb(a,34),b&4&&Object.freeze(a));return a}function Tc(a,b,c){a=new a.constructor(b);c&&(a.g=qb);a.h=qb;return a}function Rc(a){var b=a.l,c=b[w]|0;return y(a,c)?a:Uc(a,b,c)?Tc(a,b):Sc(b,c)}function Sc(a,b,c,d){d!=null||(d=!!(34&b));a=Ec(a,b,Pc,d);d=32;c&&(d|=2);b=b&16769217|d;x(a,b);return a}function wc(a){var b=a.l,c=b[w]|0;return y(a,c)?Uc(a,b,c)?Tc(a,b,!0):new a.constructor(Sc(b,c,!1)):a}
function Vc(a){if(a.g!==qb)return!1;var b=a.l;b=Sc(b,b[w]|0);mb(b,2048);a.l=b;a.g=void 0;a.h=void 0;return!0}function Wc(a){if(!Vc(a)&&y(a,a.l[w]|0))throw Error();}function Xc(a,b){b===void 0&&(b=a[w]|0);b&32&&!(b&4096)&&x(a,b|4096)}function Uc(a,b,c){return c&2?!0:c&32&&!(c&4096)?(x(b,c|2),a.g=qb,!0):!1};function Yc(a,b){a=F(a.l,b);if(a!==null)return a}function F(a,b,c,d){if(b===-1)return null;var e=b+(c?0:-1),f=a.length-1;if(!(f<1+(c?0:-1))){if(e>=f){var g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object){c=g[b];var h=!0}else if(e===f)c=g;else return}else c=a[e];if(d&&c!=null){d=d(c);if(d==null)return d;if(!Object.is(d,c))return h?g[b]=d:a[e]=d,d}return c}}function G(a,b,c){Wc(a);var d=a.l;H(d,d[w]|0,b,c);return a}
function H(a,b,c,d,e){var f=c+(e?0:-1),g=a.length-1;if(g>=1+(e?0:-1)&&f>=g){let h=a[g];if(h!=null&&typeof h==="object"&&h.constructor===Object)return h[c]=d,b}if(f<=g)return a[f]=d,b;if(d!==void 0){let h;g=((h=b)!=null?h:b=a[w]|0)>>14&1023||536870912;c>=g?d!=null&&(a[g+(e?0:-1)]={[c]:d}):a[f]=d}return b}function Zc(a,b,c){var d=a.l;return $c(d,d[w]|0,b,ad(a,I,c))!==void 0}function bd(a){return!!(2&a)&&!!(4&a)||!!(256&a)}
function cd(a){a=Pb(a);for(let b=0;b<a.length;b++){let c=a[b]=Pb(a[b]);Array.isArray(c[1])&&(c[1]=nb(c[1]))}return ob(a)}
function dd(a,b,c){var d=a.l,e=d[w]|0;a:{var f=e;e=y(a,e);!e&&Vc(a)&&(d=a.l,f=d[w]|0);var g=F(d,b);a=!1;if(g==null){if(e){b=yc();break a}g=[]}else if(g.constructor===E)if(g.v&2&&!e)g=g.G();else{b=g;break a}else Array.isArray(g)?a=!!((g[w]|0)&2):g=[];if(e){if(!g.length){b=yc();break a}a||(a=!0,nb(g))}else a&&(a=!1,ob(g),g=cd(g));!a&&f&32&&mb(g,32);c=new E(g,void 0,lc,c);f=H(d,f,b,c);a||Xc(d,f);b=c}return b}function ed(a,b){this.set(b,a)}
function fd(a,b,c,d){Wc(a);var e=a.l,f=e[w]|0;if(d==null){let g=gd(e);if(hd(g,e,f,c)===b)g.set(c,0);else return a}else f=id(e,f,c,b);H(e,f,b,d);return a}function jd(a,b,c,d){var e=a[w]|0,f=vb(e);e=id(a,e,c,b,f);H(a,e,b,d,f)}function ad(a,b,c){a=a.l;return hd(gd(a),a,void 0,b)===c?c:-1}function gd(a){if($a){var b;return(b=a[cb])!=null?b:a[cb]=new Map}if(cb in a)return a[cb];b=new Map;Object.defineProperty(a,cb,{value:b});return b}
function id(a,b,c,d,e){var f=gd(a),g=hd(f,a,b,c,e);g!==d&&(g&&(b=H(a,b,g,void 0,e)),f.set(c,d));return b}function hd(a,b,c,d,e){var f=a.get(d);if(f!=null)return f;f=0;for(let g=0;g<d.length;g++){let h=d[g];F(b,h,e)!=null&&(f!==0&&(c=H(b,c,f,void 0,e)),f=h)}a.set(d,f);return f}function kd(a,b,c){var d=a[w]|0,e=vb(d),f=F(a,c,e);if(f!=null&&f[hb]===pb){if(!y(f))return Vc(f),f.l;var g=f.l}else Array.isArray(f)&&(g=f);if(g){let h=g[w]|0;h&2&&(g=Sc(g,h))}g=Mc(g,b);g!==f&&H(a,d,c,g,e);return g}
function $c(a,b,c,d){var e=!1;d=F(a,d,void 0,f=>{var g=kc(f,c,!1,b);e=g!==f&&g!=null;return g});if(d!=null)return e&&!y(d)&&Xc(a,b),d}function ld(a,b,c){var d=a.l,e=d[w]|0;b=$c(d,e,b,c);if(b==null)return b;e=d[w]|0;if(!y(a,e)){let f=wc(b);f!==b&&(Vc(a)&&(d=a.l,e=d[w]|0),b=f,e=H(d,e,c,b),Xc(d,e))}return b}function md(a){a==null&&(a=void 0);return a}function nd(a,b,c){c=md(c);G(a,b,c);c&&!y(c)&&Xc(a.l);return a}function J(a,b,c,d){d=md(d);fd(a,b,c,d);d&&!y(d)&&Xc(a.l);return a}
function od(a,b){return a=(2&b?a|2:a&-3)&-273}function pd(a){a=Wb(Yc(a,1));return a!=null?a:!1}function qd(a,b){a=ac(Yc(a,b));return a!=null?a:0}function rd(a,b){var c;return(c=jc(Yc(a,b)))!=null?c:""}function K(a,b){a=Yc(a,b);a=a==null?a:Tb(a)?a|0:void 0;return a!=null?a:0}function L(a,b,c,d){return ld(a,b,ad(a,d,c))}function sd(a,b,c){return G(a,b,c==null?c:cc(c))}function M(a,b,c){if(c!=null){if(!Tb(c))throw Xa("enum");c|=0}return G(a,b,c)}
function td(a,b,c){Wc(a);var d=a.l,e=d[w]|0,f=F(d,b);f instanceof E&&!(f instanceof E&&f.v&2)?f.clear():f!=null&&H(d,e,b);c&&(Wc(a),c.forEach(ed,dd(a,b,lc)));return a};var ud=class{constructor(a,b,c){this.buffer=a;if(c&&!b)throw Error();this.g=b}};
function vd(a,b){if(typeof a==="string")return new ud(Pa(a),b);if(Array.isArray(a))return new ud(new Uint8Array(a),b);if(a.constructor===Uint8Array)return new ud(a,!1);if(a.constructor===ArrayBuffer)return a=new Uint8Array(a),new ud(a,!1);if(a.constructor===Ta)return b=Ra(a)||new Uint8Array(0),new ud(b,!0,a);if(a instanceof Uint8Array)return a=a.constructor===Uint8Array?a:new Uint8Array(a.buffer,a.byteOffset,a.byteLength),new ud(a,!1);throw Error();};function wd(a){var b=0,c=0,d=0,e=a.h,f=a.g;do{var g=e[f++];b|=(g&127)<<d;d+=7}while(d<32&&g&128);if(d>32)for(c|=(g&127)>>4,d=3;d<32&&g&128;d+=7)g=e[f++],c|=(g&127)<<d;xd(a,f);if(!(g&128))return a=b>>>0,c>>>=0,Za()?z(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(c))<<BigInt(32))+BigInt.asUintN(32,BigInt(a)))):z(Nb(a,c));throw Error();}function yd(a){for(var b=0,c=a.g,d=c+10,e=a.h;c<d;){let f=e[c++];b|=f;if((f&128)===0)return xd(a,c),!!(b&127)}throw Error();}
function N(a){var b=a.h,c=a.g,d=b[c++],e=d&127;if(d&128&&(d=b[c++],e|=(d&127)<<7,d&128&&(d=b[c++],e|=(d&127)<<14,d&128&&(d=b[c++],e|=(d&127)<<21,d&128&&(d=b[c++],e|=d<<28,d&128&&b[c++]&128&&b[c++]&128&&b[c++]&128&&b[c++]&128&&b[c++]&128)))))throw Error();xd(a,c);return e}function xd(a,b){a.g=b;if(b>a.i)throw Error();}function zd(a,b){if(b<0)throw Error();var c=a.g;b=c+b;if(b>a.i)throw Error();a.g=b;return c}
function Bd(a,b){if(b==0)return Ua||(Ua=new Ta(null,Qa));var c=zd(a,b);a.I&&a.m?c=a.h.subarray(c,c+b):(a=a.h,b=c+b,c=c===b?new Uint8Array(0):Hb?a.slice(c,b):new Uint8Array(a.subarray(c,b)));return c.length==0?Ua||(Ua=new Ta(null,Qa)):new Ta(c,Qa)}
var Cd=class{constructor(a,b,c,d){this.h=null;this.m=!1;this.g=this.i=this.j=0;this.init(a,b,c,d)}init(a,b,c,{I:d=!1,M:e=!1}={}){this.I=d;this.M=e;a&&(a=vd(a,this.M),this.h=a.buffer,this.m=a.g,this.j=b||0,this.i=c!==void 0?this.j+c:this.h.length,this.g=this.j)}clear(){this.h=null;this.m=!1;this.g=this.i=this.j=0;this.I=!1}},Dd=[];function Ed(a,b,c,d){if(Fd.length){let e=Fd.pop();Gd(e,d);e.g.init(a,b,c,d);return e}return new Hd(a,b,c,d)}function Gd(a,{O:b=!1}={}){a.O=b}function Id(a){a.g.clear();a.i=-1;a.h=-1;Fd.length<100&&Fd.push(a)}function Jd(a){var b=a.g;if(b.g==b.i)return!1;a.j=a.g.g;var c=N(a.g)>>>0;b=c>>>3;c&=7;if(!(c>=0&&c<=5))throw Error();if(b<1)throw Error();a.i=b;a.h=c;return!0}
function Kd(a){switch(a.h){case 0:a.h!=0?Kd(a):yd(a.g);break;case 1:a=a.g;xd(a,a.g+8);break;case 2:if(a.h!=2)Kd(a);else{var b=N(a.g)>>>0;a=a.g;xd(a,a.g+b)}break;case 5:a=a.g;xd(a,a.g+4);break;case 3:b=a.i;do{if(!Jd(a))throw Error();if(a.h==4){if(a.i!=b)throw Error();break}Kd(a)}while(1);break;default:throw Error();}}function Ld(a,b,c){var d=a.g.i,e=N(a.g)>>>0;e=a.g.g+e;var f=e-d;f<=0&&(a.g.i=e,c(b,a,void 0,void 0,void 0),f=e-a.g.g);if(f)throw Error();a.g.g=e;a.g.i=d;return b}
function Md(a){var b=N(a.g)>>>0;a=a.g;var c=zd(a,b);a=a.h;if(ra){var d=a,e;(e=qa)||(e=qa=new TextDecoder("utf-8",{fatal:!0}));b=c+b;d=c===0&&b===d.length?d:d.subarray(c,b);try{var f=e.decode(d)}catch(h){if(pa===void 0){try{e.decode(new Uint8Array([128]))}catch(k){}try{e.decode(new Uint8Array([97])),pa=!0}catch(k){pa=!1}}!pa&&(qa=void 0);throw h;}}else{f=c;b=f+b;c=[];let h=null;let k;for(;f<b;){var g=a[f++];g<128?c.push(g):g<224?f>=b?na():(k=a[f++],g<194||(k&192)!==128?(f--,na()):c.push((g&31)<<6|
k&63)):g<240?f>=b-1?na():(k=a[f++],(k&192)!==128||g===224&&k<160||g===237&&k>=160||((e=a[f++])&192)!==128?(f--,na()):c.push((g&15)<<12|(k&63)<<6|e&63)):g<=244?f>=b-2?na():(k=a[f++],(k&192)!==128||(g<<28)+(k-144)>>30!==0||((e=a[f++])&192)!==128||((d=a[f++])&192)!==128?(f--,na()):(g=(g&7)<<18|(k&63)<<12|(e&63)<<6|d&63,g-=65536,c.push((g>>10&1023)+55296,(g&1023)+56320))):na();c.length>=8192&&(h=oa(h,c),c.length=0)}f=oa(h,c)}return f}
var Hd=class{constructor(a,b,c,d){if(Dd.length){let e=Dd.pop();e.init(a,b,c,d);a=e}else a=new Cd(a,b,c,d);this.g=a;this.j=this.g.g;this.h=this.i=-1;Gd(this,d)}},Fd=[];function Nd(a){if(!a)return Od||(Od=new Pd(0,0));if(!/^-?\d+$/.test(a))return null;Ob(a);return new Pd(A,C)}var Pd=class{constructor(a,b){this.h=a>>>0;this.g=b>>>0}},Od;function Qd(a,b,c){for(;c>0||b>127;)a.g.push(b&127|128),b=(b>>>7|c<<25)>>>0,c>>>=7;a.g.push(b)}function O(a,b){for(;b>127;)a.g.push(b&127|128),b>>>=7;a.g.push(b)}function Rd(a,b){if(b>=0)O(a,b);else{for(let c=0;c<9;c++)a.g.push(b&127|128),b>>=7;a.g.push(1)}}var Sd=class{constructor(){this.g=[]}length(){return this.g.length}end(){var a=this.g;this.g=[];return a}};function Td(a,b){b.length!==0&&(a.i.push(b),a.h+=b.length)}function Ud(a,b,c,d){if(c!=null){O(a.g,b*8+2);b=a.g.end();Td(a,b);b.push(a.h);d(c,a);c=b.pop();for(c=a.h+a.g.length()-c;c>127;)b.push(c&127|128),c>>>=7,a.h++;b.push(c);a.h++}}var Vd=class{constructor(){this.i=[];this.h=0;this.g=new Sd}};function Wd(){var a=class{constructor(){throw Error();}};Object.setPrototypeOf(a,a.prototype);return a}var Xd=Wd(),Yd=Wd(),Zd=Wd(),$d=Wd(),ae=Wd(),be=Wd(),ce=Wd(),de=Wd();var P=class{constructor(a){this.l=Nc(a,void 0,void 0,2048)}toJSON(){return Ic(this)}clone(){var a=this.l,b=a[w]|0;return Uc(this,a,b)?Tc(this,a,!0):new this.constructor(Sc(a,b,!1))}};P.prototype[hb]=pb;P.prototype.toString=function(){return this.l.toString()};var ee=class{constructor(a,b,c){this.g=a;this.h=b;a=la(Xd);this.i=!!a&&c===a||!1}};function fe(a,b){return new ee(a,b,Xd)}function ge(a,b,c,d,e){Ud(a,c,he(b,d),e)}var ie=fe(function(a,b,c,d,e){if(a.h!==2)return!1;Ld(a,kd(b,d,c),e);return!0},ge),je=fe(function(a,b,c,d,e){if(a.h!==2)return!1;Ld(a,kd(b,d,c),e);return!0},ge),ke=Symbol(),le=Symbol(),me=Symbol(),ne=Symbol(),oe=Symbol(),pe,qe;
function re(a,b,c,d){var e=d[a];if(e)return e;e={};e.T=d;e.F=Lc(d[0]);var f=d[1],g=1;f&&f.constructor===Object&&(e.K=f,f=d[++g],typeof f==="function"&&(e.R=!0,pe!=null||(pe=f),qe!=null||(qe=d[g+1]),f=d[g+=2]));for(var h={};f&&Array.isArray(f)&&f.length&&typeof f[0]==="number"&&f[0]>0;){for(var k=0;k<f.length;k++)h[f[k]]=f;f=d[++g]}for(k=1;f!==void 0;){typeof f==="number"&&(k+=f,f=d[++g]);let q;var l=void 0;f instanceof ee?q=f:(q=ie,g--);let t;if((t=q)==null?0:t.i){f=d[++g];l=d;var n=g;typeof f===
"function"&&(f=f(),l[n]=f);l=f}f=d[++g];n=k+1;typeof f==="number"&&f<0&&(n-=f,f=d[++g]);for(;k<n;k++){let u=h[k];l?c(e,k,q,l,u):b(e,k,q,u)}}return d[a]=e}function se(a){return Array.isArray(a)?a[0]instanceof ee?a:[je,a]:[a,void 0]}function he(a,b){if(a instanceof P)return a.l;if(Array.isArray(a))return Mc(a,b)};function te(a,b,c,d){var e=c.g;a[b]=d?(f,g,h)=>e(f,g,h,d):e}function ue(a,b,c,d,e){var f=c.g,g,h;a[b]=(k,l,n)=>f(k,l,n,h||(h=re(le,te,ue,d).F),g||(g=ve(d)),e)}
function ve(a){var b=a[me];if(b!=null)return b;var c=re(le,te,ue,a);b=c.R?(d,e)=>pe(d,e,c):(d,e)=>{for(;Jd(e)&&e.h!=4;){var f=e.i,g=c[f];if(g==null){var h=c.K;h&&(h=h[f])&&(h=we(h),h!=null&&(g=c[f]=h))}if(g==null||!g(e,d,f)){h=e;g=h.j;Kd(h);if(h.O)var k=void 0;else{var l=h.g.g-g;h.g.g=g;k=Bd(h.g,l)}l=h=g=void 0;var n=d;k&&((g=(h=(l=n[db])!=null?l:n[db]=new Cc)[f])!=null?g:h[f]=[]).push(k)}}if(d=zc(d))d.g=c.T[oe];return!0};a[me]=b;a[oe]=xe.bind(a);return b}
function xe(a,b,c,d){var e=this[le],f=this[me],g=Mc(void 0,e.F),h=zc(a);if(h){var k=!1,l=e.K;if(l){e=(n,q,t)=>{if(t.length!==0)if(l[q])for(let u of t){n=Ed(u);try{k=!0,f(g,n)}finally{Id(n)}}else d==null||d(a,q,t)};if(b==null)Ac(h,e);else if(h!=null){let n=h[b];n&&e(h,b,n)}if(k){let n=a[w]|0;if(n&2&&n&2048&&(c==null||!c.ea))throw Error();let q=vb(n),t=(u,B)=>{if(F(a,u,q)!=null)switch(c==null?void 0:c.da){case 1:return;default:throw Error();}B!=null&&(n=H(a,n,u,B,q));delete h[u]};b==null?tb(g,g[w]|
0,(u,B)=>{t(u,B)}):t(b,F(g,b,q))}}}}function we(a){a=se(a);var b=a[0].g;if(a=a[1]){let c=ve(a),d=re(le,te,ue,a).F;return(e,f,g)=>b(e,f,g,d,c)}return b};function ye(a,b,c){a[b]=c.h}function ze(a,b,c,d){var e,f,g=c.h;a[b]=(h,k,l)=>g(h,k,l,f||(f=re(ke,ye,ze,d).F),e||(e=Ae(d)))}function Ae(a){var b=a[ne];if(!b){let c=re(ke,ye,ze,a);b=(d,e)=>Be(d,e,c);a[ne]=b}return b}function Be(a,b,c){tb(a,a[w]|0,(d,e)=>{if(e!=null){var f=Ce(c,d);f?f(b,e,d):d<500||Ya(fb,3)}});(a=zc(a))&&Ac(a,(d,e,f)=>{Td(b,b.g.end());for(d=0;d<f.length;d++)Td(b,Ra(f[d])||new Uint8Array(0))})}
function Ce(a,b){var c=a[b];if(c)return c;if(c=a.K)if(c=c[b]){c=se(c);var d=c[0].h;if(c=c[1]){let e=Ae(c),f=re(ke,ye,ze,c).F;c=a.R?qe(f,e):(g,h,k)=>d(g,h,k,f,e)}else c=d;return a[b]=c}};var De=z(0);function Q(a,b,c){return new ee(a,b,c)}function Ee(a,b,c){H(a,a[w]|0,b,c,vb(a[w]|0))}
var Fe=fe(function(a,b,c,d,e){if(a.h!==2)return!1;a=Ld(a,Mc([void 0,void 0],d),e);a=Pb(a);d=b[w]|0;e=vb(d);if(d&2)throw Error();var f=F(b,c,e);if(f instanceof E)(f.v&2)!=0?(f=f.G(),f.push(a),H(b,d,c,f,e)):f.W(a);else if(Array.isArray(f)){var g=f[w]|0;g&8192||x(f,g|=8192);g&2&&(f=cd(f),H(b,d,c,f,e));f.push(a)}else H(b,d,c,ob([a]),e);return!0},function(a,b,c,d,e){if(b instanceof E)b.forEach((f,g)=>{Ud(a,c,Mc([g,f],d),e)});else if(Array.isArray(b)){for(let f=0;f<b.length;f++){let g=b[f];Array.isArray(g)&&
Ud(a,c,Mc(g,d),e)}ob(b)}});function Ge(a,b,c){b=ic(b);if(b!=null){switch(typeof b){case "string":Nd(b)}if(b!=null)switch(O(a.g,c*8),typeof b){case "number":a=a.g;Jb(b);Qd(a,A,C);break;case "bigint":c=BigInt.asUintN(64,b);c=new Pd(Number(c&BigInt(4294967295)),Number(c>>BigInt(32)));Qd(a.g,c.h,c.g);break;default:c=Nd(b),Qd(a.g,c.h,c.g)}}}function He(a,b,c){b=ac(b);b!=null&&b!=null&&(O(a.g,c*8),Rd(a.g,b))}
function Ie(a,b,c){b=jc(b);if(b!=null){if(ta)b=(sa||(sa=new TextEncoder)).encode(b);else{let e=0,f=new Uint8Array(3*b.length);for(let g=0;g<b.length;g++){var d=b.charCodeAt(g);if(d<128)f[e++]=d;else{if(d<2048)f[e++]=d>>6|192;else{if(d>=55296&&d<=57343){if(d<=56319&&g<b.length){let h=b.charCodeAt(++g);if(h>=56320&&h<=57343){d=(d-55296)*1024+h-56320+65536;f[e++]=d>>18|240;f[e++]=d>>12&63|128;f[e++]=d>>6&63|128;f[e++]=d&63|128;continue}else g--}d=65533}f[e++]=d>>12|224;f[e++]=d>>6&63|128}f[e++]=d&63|
128}}b=e===f.length?f:f.subarray(0,e)}O(a.g,c*8+2);O(a.g,b.length);Td(a,a.g.end());Td(a,b)}}function Je(a,b,c,d,e){Ud(a,c,he(b,d),e)}
var Ke=Q(function(a,b,c){a.h!==0?a=!1:(Ee(b,c,wd(a.g)),a=!0);return a},Ge,be),Le=Q(function(a,b,c){a.h!==0?b=!1:(a=wd(a.g),Ee(b,c,a===De?void 0:a),b=!0);return b},Ge,be),Me=Q(function(a,b,c){if(a.h!==0)return!1;Ee(b,c,N(a.g));return!0},He,$d),Ne=Q(function(a,b,c){if(a.h!==0)return!1;a=N(a.g);Ee(b,c,a===0?void 0:a);return!0},He,$d),Oe=Q(function(a,b,c){if(a.h!==0)return!1;Ee(b,c,yd(a.g));return!0},function(a,b,c){b=Wb(b);b!=null&&(O(a.g,c*8),a.g.g.push(b?1:0))},Yd),Pe=Q(function(a,b,c){if(a.h!==2)return!1;
Ee(b,c,Md(a));return!0},Ie,Zd),Qe=Q(function(a,b,c,d){if(a.h!==2)return!1;jd(b,c,d,Md(a));return!0},Ie,Zd),Re=function(a,b,c=Xd){return new ee(a,b,c)}(function(a,b,c,d,e){if(a.h!==2)return!1;d=Mc(void 0,d);var f=b[w]|0;if(f&2)throw Error();var g=vb(f),h=F(b,c,g);h=Array.isArray(h)?h:kb;var k=h===kb?7:h[w]|0,l=k;2&f&&(l|=2);l|=1;if(2&l||bd(l)||16&l)l===k||bd(l)||x(h,l),h=Pb(h),k=0,l=od(l,f),H(b,f,c,h,g);l&=-13;l!==k&&x(h,l);h.push(d);Ld(a,d,e);return!0},function(a,b,c,d,e){if(Array.isArray(b)){for(let f=
0;f<b.length;f++)Je(a,b[f],c,d,e);a=b[w]|0;a&1||x(b,a|1)}}),R=fe(function(a,b,c,d,e,f){if(a.h!==2)return!1;var g=b[w]|0;id(b,g,f,c,vb(g));b=kd(b,d,c);Ld(a,b,e);return!0},Je),Se=Q(function(a,b,c,d){if(a.h!==2)return!1;var e=N(a.g)>>>0;a=Bd(a.g,e);jd(b,c,d,a);return!0},function(a,b,c){b=b==null||typeof b=="string"||b instanceof Ta?b:void 0;b!=null&&(b=vd(b,!0).buffer,O(a.g,c*8+2),O(a.g,b.length),Td(a,a.g.end()),Td(a,b))},ce),Te=Q(function(a,b,c,d){if(a.h!==0)return!1;jd(b,c,d,N(a.g)>>>0);return!0},
function(a,b,c){b=bc(b);b!=null&&b!=null&&(O(a.g,c*8),O(a.g,b))},ae),Ue=Q(function(a,b,c){if(a.h!==0)return!1;Ee(b,c,N(a.g));return!0},function(a,b,c){b=ac(b);b!=null&&(b=parseInt(b,10),O(a.g,c*8),Rd(a.g,b))},de),Ve=[!0,Me,Me],We=[!0,Me,Pe];function Xe(a,b){return(c,d)=>{{let f={M:!0};d&&Object.assign(f,d);c=Ed(c,void 0,void 0,f);try{let g=new a,h=g.l;ve(b)(h,c);var e=g}finally{Id(c)}}return e}}function Ye(a){return b=>{var c=new Vd;Be(b.l,c,re(ke,ye,ze,a));Td(c,c.g.end());b=new Uint8Array(c.h);var d=c.i,e=d.length,f=0;for(let g=0;g<e;g++){let h=d[g];b.set(h,f);f+=h.length}c.i=[b];return b}};var Ze=[0,Le,Ne];var $e=[0,Le,Ne];class af{constructor(a,b){this.data=a;this.channel=b}};function bf(a){var b=new MessageChannel;cf(b.port1,a);return b}function df(a,b){cf(a,b);return new ef(a)}class ef{constructor(a){this.h=a}g(a,b,c=[]){b=bf(b);this.h.postMessage(a,[b.port2].concat(c))}}function cf(a,b){b&&(a.onmessage=c=>{var d=c.data;c=df(c.ports[0]);b(new af(d,c))})};var ff=function(){if(!p.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});try{let c=()=>{};p.addEventListener("test",c,b);p.removeEventListener("test",c,b)}catch(c){}return a}();var gf=({destination:a,origin:b,fa:c,U:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");var f=bf(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return df(f.port1,e)};var hf=class{constructor(a){this.h=a}g(a,b,c){this.h.g(Ic(a),b,c)}},kf=a=>{var b=jf;return c=>{var d=new b(c.data);return a(new af(d,c.channel))}},lf=a=>b=>a(new af(b.data,new hf(b.channel)));/*

 Copyright Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
var mf=globalThis.trustedTypes,nf;function of(){var a=null;if(!mf)return a;try{let b=c=>c;a=mf.createPolicy("goog#html",{createHTML:b,createScript:b,createScriptURL:b})}catch(b){}return a};var pf=class{constructor(a){this.g=a}toString(){return this.g+""}};function qf(a){var b;nf===void 0&&(nf=of());a=(b=nf)?b.createScriptURL(a):a;return new pf(a)};function rf(a,b){var c=a.register;if(b instanceof pf)b=b.g;else throw Error("");return c.call(a,b,void 0)};function sf(a){return String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()})}function tf(a){return a.replace(RegExp("(^|[\\s]+)([a-z])","g"),function(b,c,d){return c+d.toUpperCase()})};function uf(a,...b){if(b.length===0)return qf(a[0]);var c=a[0];for(let d=0;d<b.length;d++)c+=encodeURIComponent(b[d])+a[d+1];return qf(c)};function vf(a,b){this.type=a;this.target=b}vf.prototype.g=function(){};function wf(a,b){vf.call(this,a?a.type:"");this.relatedTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=0;this.key="";this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType="";this.h=null;a&&this.init(a,b)}ma(wf,vf);
wf.prototype.init=function(a){var b=this.type=a.type,c=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement;var d=a.relatedTarget;d||(b=="mouseover"?d=a.fromElement:b=="mouseout"&&(d=a.toElement));this.relatedTarget=d;c?(this.clientX=c.clientX!==void 0?c.clientX:c.pageX,this.clientY=c.clientY!==void 0?c.clientY:c.pageY,this.screenX=c.screenX||0,this.screenY=c.screenY||0):(this.clientX=a.clientX!==void 0?a.clientX:a.pageX,this.clientY=a.clientY!==void 0?
a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0);this.button=a.button;this.key=a.key||"";this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.pointerId=a.pointerId||0;this.pointerType=a.pointerType;this.state=a.state;this.h=a;a.defaultPrevented&&wf.S.g.call(this)};wf.prototype.g=function(){wf.S.g.call(this);var a=this.h;a.preventDefault?a.preventDefault():a.returnValue=!1};var xf="closure_listenable_"+(Math.random()*1E6|0);var yf=0;function zf(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.h=e;this.key=++yf;this.g=this.J=!1}function Af(a){a.g=!0;a.listener=null;a.proxy=null;a.src=null;a.h=null};function Bf(a){this.src=a;this.g={};this.h=0}Bf.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.g[f];a||(a=this.g[f]=[],this.h++);var g;a:{for(g=0;g<a.length;++g){let h=a[g];if(!h.g&&h.listener==b&&h.capture==!!d&&h.h==e)break a}g=-1}g>-1?(b=a[g],c||(b.J=!1)):(b=new zf(b,this.src,f,!!d,e),b.J=c,a.push(b));return b};var Cf="closure_lm_"+(Math.random()*1E6|0),Df={},Ef=0;function Ff(a,b,c,d,e){if(d&&d.once)Gf(a,b,c,d,e);else if(Array.isArray(b))for(let f=0;f<b.length;f++)Ff(a,b[f],c,d,e);else c=Hf(c),a&&a[xf]?a.g(b,c,ja(d)?!!d.capture:!!d,e):If(a,b,c,!1,d,e)}
function If(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=ja(e)?!!e.capture:!!e,h=Jf(a);h||(a[Cf]=h=new Bf(a));c=h.add(b,c,d,g,f);if(!c.proxy){d=Kf();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)ff||(e=g),e===void 0&&(e=!1),a.addEventListener(b.toString(),d,e);else if(a.attachEvent)a.attachEvent(Lf(b.toString()),d);else if(a.addListener&&a.removeListener)a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");Ef++}}
function Kf(){function a(c){return b.call(a.src,a.listener,c)}var b=Mf;return a}function Gf(a,b,c,d,e){if(Array.isArray(b))for(let f=0;f<b.length;f++)Gf(a,b[f],c,d,e);else c=Hf(c),a&&a[xf]?a.h(b,c,ja(d)?!!d.capture:!!d,e):If(a,b,c,!0,d,e)}function Lf(a){return a in Df?Df[a]:Df[a]="on"+a}
function Mf(a,b){if(a.g)a=!0;else{b=new wf(b,this);let g=a.listener,h=a.h||a.src;if(a.J&&typeof a!=="number"&&a&&!a.g){var c=a.src;if(c&&c[xf])c.i(a);else{var d=a.type,e=a.proxy;c.removeEventListener?c.removeEventListener(d,e,a.capture):c.detachEvent?c.detachEvent(Lf(d),e):c.addListener&&c.removeListener&&c.removeListener(e);Ef--;if(d=Jf(c)){e=a.type;var f;if(f=e in d.g){f=d.g[e];let k=Aa(f,a),l;(l=k>=0)&&Array.prototype.splice.call(f,k,1);f=l}f&&(Af(a),d.g[e].length==0&&(delete d.g[e],d.h--));d.h==
0&&(d.src=null,c[Cf]=null)}else Af(a)}}a=g.call(h,b)}return a}function Jf(a){a=a[Cf];return a instanceof Bf?a:null}var Nf="__closure_events_fn_"+(Math.random()*1E9>>>0);function Hf(a){if(typeof a==="function")return a;a[Nf]||(a[Nf]=function(b){return a.handleEvent(b)});return a[Nf]};class Of{constructor(){this.promise=new Promise((a,b)=>{this.resolve=a;this.reject=b})}};function Pf(a,b){if(typeof b==="string")Qf(a,"none",b);else for(let c in b)Qf(a,b[c],c)}var Rf=/^--.+/;function Qf(a,b,c){var d=Sf[c];if(!d){var e=sf(c);d=e;a.style[e]===void 0&&(e=(Da?"Webkit":Ca?"Moz":null)+tf(e),a.style[e]!==void 0&&(d=e));Sf[c]=d}(c=d)&&(Rf.test(c)?a.style.setProperty(c,b):a.style[c]=b)}var Sf={};/*

Math.uuid.js (v1.4)
http://www.broofa.com
mailto:robert@broofa.com
Copyright (c) 2010 Robert Kieffer
Dual licensed under the MIT and GPL licenses.
*/
var Tf="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");var Uf=class extends P{};function Vf(a){var b=new Wf;return M(b,1,a)}var Wf=class extends P{};var Xf=class extends P{};var Yf=class extends P{};var Zf=class extends P{},$f=[3,4];var ag=class extends P{};function bg(a,b){{Wc(a);let l=a.l,n=l[w]|0;if(b==null)H(l,n,1);else{var c=b===kb?7:b[w]|0,d=c,e=bd(c),f=e||Object.isFrozen(b),g=!0,h=!0;for(let q=0;q<b.length;q++){var k=b[q];e||(k=y(k),g&&(g=!k),h&&(h=k))}e||(c=g?13:5,c=h?c&-4097:c|4096);f&&c===d||(b=Pb(b),d=0,c=od(c,n));c!==d&&x(b,c);n=H(l,n,1,b);2&c||!(4096&c||16&c)||Xc(l,n)}}return a}var cg=class extends P{};var dg=class extends P{};function eg(a){var b=new fg;if(a!=null&&typeof a!=="boolean")throw b=typeof a,Error(`Expected boolean but got ${b!="object"?b:a?Array.isArray(a)?"array":b:"null"}: ${a}`);return G(b,2,a)}var fg=class extends P{};var gg=class extends P{};var hg=class extends P{};var ig=class extends P{};function jg(a){var b=new kg;return M(b,1,a)}function lg(a,b){return nd(a,2,b)}function mg(a){var b=ng();b=og(b.o);return nd(a,4,b)}var kg=class extends P{},pg=[3];var qg=class extends P{};function rg(a){return qd(a,1)}var sg=class extends P{};var tg=class extends P{};var ug=class extends P{getInviteCode(){return rd(this,1)}hasInviteCode(){return jc(Yc(this,1))!=null}};var wg=class extends P{getLanguage(){return rd(this,ad(this,vg,4))}},vg=[3,4,5,6,7,8];var xg=class extends P{};function yg(a){return L(a,wg,2,I)}var jf=class extends P{},I=[2,3,4,5,6,7,8];var zg=Xe(jf,[0,I,Ue,R,[0,vg,1,Ue,R,[0,Pe],Qe,R,[0,[3,4],[5,6],Ze,-1,R,$e,-1,Se,Te],R,[0,Ue],R,[0,Re,[0,Pe,-1]],R,[0,Re,[0,Pe,Ue]]],R,[0,Oe],R,[0,Me],R,[0,Pe],R,[0,Me,-1],R,[0,Fe,We,Fe,Ve],R,[0,Pe]]);var Ag=class extends P{};var Bg=class extends P{};function Cg(a,b){return sd(a,1,b)}function Dg(a){return sd(a,2,performance.now())}function Eg(a,b){return G(a,3,b==null?b:Vb(b))}function Fg(a,b){return G(a,4,b==null?b:Vb(b))}function Gg(a,b){return nd(a,5,b)}function Hg(a,b){return nd(a,6,b)}var Ig=class extends P{};var Jg=class extends P{};var Kg=class extends P{};function S(a){var b=new Lg;return M(b,1,a)}function Mg(a,b){return J(a,2,T,b)}function Ng(a,b){return J(a,5,T,b)}function Og(){var a=S(8);var b=new Ag;b=G(b,1,D("1.20260511.0000"));return J(a,7,T,b)}function Pg(a){var b=S(12);return J(b,10,T,a)}var Lg=class extends P{getInviteCode(){return rd(this,ad(this,T,11))}hasInviteCode(){var a=ad(this,T,11);return jc(Yc(this,a))!=null}},T=[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18];var Qg=Ye([0,Me,-2,Fe,Ve,-1,[0,Ke,-2]]);var Rg=class extends P{};var Sg=[0,Pe,-2];var Tg=Xe(Rg,Sg),Ug=Ye(Sg);var Vg={UNKNOWN:0,API_UNAVAILABLE:1,INVALID_PARAMS:2,SIZE_LIMIT_EXCEEDED:3,0:"UNKNOWN",1:"API_UNAVAILABLE",2:"INVALID_PARAMS",3:"SIZE_LIMIT_EXCEEDED"},U=class extends Error{constructor(a,b){super(b);this.errorType=a;this.name=`SDK_ERROR_${Vg[this.errorType]}`}};var Wg=new U(0,"An unknown error occurred."),Xg=new U(2,"Invalid parameters entered, please fix and try again."),Yg=new U(1,"Unspecified network error. Check your internet connection and try again."),Zg=new U(3,"Size limit exceeded."),$g=new U(0,"Resource URL is malformed"),ah=new U(1,"The requested Ad failed to load. Check your network and try again.");function bh(a){switch(a){case 1:return"SDK_API_FIRST_FRAME_READY";case 2:return"SDK_API_LOAD_DATA";case 3:return"SDK_API_SAVE_DATA";case 4:return"SDK_API_SEND_SCORE";case 5:return"SDK_API_ON_AUDIO_ENABLED_CHANGE";case 6:return"SDK_API_ON_PAUSE";case 7:return"SDK_API_ON_RESUME";case 8:return"SDK_API_GET_LANGUAGE";case 9:return"SDK_API_GAME_READY";case 10:return"SDK_API_IS_AUDIO_ENABLED";case 11:return"SDK_API_BENCHMARKING";case 16:return"SDK_API_REQUEST_INTERSTITIAL_AD";case 17:return"SDK_API_REQUEST_REWARDED_AD"}return"SDK_API_UNSPECIFIED"}
var V=class extends U{constructor(a,b,c,d){super(a.errorType,c!=null?c:a.message);this.A=a;this.g=b;this.data=d;this.name=`${this.name}_${bh(b)}`}};function ch(a,b){var c=Wg;if(Zc(a,wg,2))switch(a=yg(a),K(a,2)){case 1:return;case 2:c=Xg;break;case 3:if(b===14){c=ah;break}c=Yg;break;case 4:console.warn("The SDK is no-op, if you are trying to verify SDK integration please use the SDK Test Suite available at https://developers.google.com/youtube/gaming/playables/certification/sdktestsuite");return;default:c=Wg}throw new V(c,b);};var dh={disableConsoleLog:!1,enableNerdStats:!1,enableServiceWorker:!1,enableServiceWorkerKillswitch:!1,enableAudioCapture:!1,sendAudioDataViaPostMessage:!1,sampleAudioAs44100Hz:!1,captureAudioOnGameReady:!1,useSystemDefaultSampleRate:!1,numSamplesPerAudioCapturePacket:4096,setAudioSessionTypeToAmbient:!1,useNativeMessageChannel:!1};function W(a){return typeof a==="boolean"?a:!1}var eh=null;
function X(){if(eh)return eh;eh=dh;var a,b=(a=window.sdkFlags)!=null?a:"";if(b){let c;try{c=JSON.parse(b)}catch(d){return console.error("Failed to parse flags.",d," Flags string: ",b),eh}typeof c==="object"&&c&&Object.keys(c).length>0&&(a=c.numSamplesPerAudioCapturePacket,b=dh.numSamplesPerAudioCapturePacket,eh={disableConsoleLog:W(c.disableConsoleLog),enableNerdStats:W(c.enableNerdStats),enableServiceWorker:W(c.enableServiceWorker),enableServiceWorkerKillswitch:W(c.enableServiceWorkerKillswitch),
enableAudioCapture:W(c.enableAudioCapture),sendAudioDataViaPostMessage:W(c.sendAudioDataViaPostMessage),sampleAudioAs44100Hz:W(c.sampleAudioAs44100Hz),captureAudioOnGameReady:W(c.captureAudioOnGameReady),useSystemDefaultSampleRate:W(c.useSystemDefaultSampleRate),numSamplesPerAudioCapturePacket:typeof a==="number"?a:b,setAudioSessionTypeToAmbient:W(c.setAudioSessionTypeToAmbient),useNativeMessageChannel:W(c.useNativeMessageChannel)})}return eh};function fh(a,b){var c=d=>{d instanceof gh&&b(d.g)};a.g.addEventListener(a.type,c);a.h!==void 0&&a.dispatchEvent(a.h);return()=>{a.g.removeEventListener(a.type,c)}}var hh=class{constructor(a,b){this.type=a;this.g=new EventTarget;var c;this.L=(c=b==null?void 0:b.L)!=null?c:!0;(b==null?void 0:b.P)!==void 0&&this.dispatchEvent(b==null?void 0:b.P)}dispatchEvent(a){this.g.dispatchEvent(new gh(this.type,a));this.L&&(this.h=a)}};class gh extends Event{constructor(a,b){super(a);this.g=b}};function ih(a,b){if(!b.data)throw Error("Incoming event has no data!");try{let c=Tg(b.data),d=rd(c,3);if(d&&a.h.has(d)){let e=a.h.get(d);a.h.delete(d);let f=zg(rd(c,2));e.resolve(new af(f,a))}else if(jc(Yc(c,1))==null)throw Error("Incoming event has no method name!");}catch(c){throw c;}}
var jh=class{constructor(){this.h=new Map;window.youtubewebview?window.youtubewebview.onmessage=a=>{ih(this,a)}:(window.nativeMessageListener={},window.nativeMessageListener.onmessage=a=>{ih(this,a)})}g(a,b){var c,d,e=window.youtubewebview||((c=window.webkit)==null?void 0:(d=c.messageHandlers)==null?void 0:d.youtubewebview);if(e){c=[];c[8]=c[13]=c[18]=c[23]="-";c[14]="4";for(d=0;d<36;d++)if(!c[d]){var f=0|Math.random()*16;c[d]=Tf[d==19?f&3|8:f]}c=c.join("");b&&(d=new Of,this.h.set(c,d),d.promise.then(b));
a:{b=K(a,1);switch(b){case 1:b=L(a,kg,2,T);if(!b)break;switch(K(b,1)){case 1:a=new Rg;a=G(a,1,D("firstFrameReady"));if(b=ld(b,hg,4))b=Ga(Qg(b)),G(a,2,D(b));c&&G(a,3,D(c));break a;default:throw Error(`Unsupported game event: ${K(b,1)}`);}default:throw Error(`Unsupported iframe message type: ${b}`);}a=void 0}a&&(a=Ga(Ug(a)),e.postMessage(a))}}};var kh,lh,mh=new jf;lh=M(mh,1,1);var nh,oh=new wg;nh=M(oh,2,4);kh=J(lh,2,I,nh);var ph=new af(kh,df((new MessageChannel).port2));function Y(){var a=window!==window.parent;qh||(qh=new rh(a));if(qh.g!==a)throw Error(`MessagingService is already created with isEmbedded=${!a}`);return qh}function sh(a,b){fh(a.target,b)}function Z(a,b,c=()=>{}){a.g?X().useNativeMessageChannel?a.h.g(b,c):a.channel.g(b,lf(kf(c))):c(ph)}function th(a,b){return new Promise(c=>{Z(a,b,c)})}
var rh=class{constructor(a){this.g=a;this.h=new jh;this.target=new hh("HOST_EVENT",{L:!1});a=(new URLSearchParams(window.location.hash.substring(1))).get("origin")||document.referrer;this.channel=new hf(gf({destination:window.parent,origin:this.g?a:window.location.origin,U:"playableIframe",onMessage:lf(kf(b=>{this.target.dispatchEvent(b)}))}))}},qh;var uh={UNKNOWN:0,SHOWED:1,REJECTED:3,DISMISSED:2,0:"UNKNOWN",1:"SHOWED",3:"REJECTED",2:"DISMISSED"};function vh(a,b){return m(function*(){if(!a)return Promise.reject(new V(Xg,17,"Reward ID cannot be empty"));var c=S(14);var d=Vf(2);d=G(d,2,D(a));c=J(c,13,T,d);c=yield th(b,c);ch(c.data,17);var e,f;switch((e=yg(c.data))==null?void 0:(f=L(e,Uf,6,vg))==null?void 0:K(f,1)){case 5:return!0;case 6:return!1;case 2:case 7:return!1;default:return Promise.reject(new V(Wg,17))}})}
var wh=class{constructor(){this.g=Y();this.AdResult=uh}requestAd(){var a=this;return m(function*(){try{yield a.requestInterstitialAd()}catch(b){if(b instanceof V)throw b;return 3}return 1})}requestInterstitialAd(){var a=this;return m(function*(){var b=a.g;var c=S(14);var d=Vf(1);c=J(c,13,T,d);b=yield th(b,c);ch(b.data,16);var e,f;b=(e=yg(b.data))==null?void 0:(f=L(e,Uf,6,vg))==null?void 0:K(f,1);if(b!==4&&b!==7&&b!==2)return Promise.reject(new V(Wg,16))})}requestRewardedAd(a){var b=this;return m(function*(){return vh(a,
b.g)})}};var xh=window!==window.parent,yh=class{constructor(){this.SDK_VERSION="1.20260511.0000";this.IN_PLAYABLES_ENV=xh;this.SdkError=U;this.SdkErrorType=Vg}};var zh={VIDEO:0,PLAYABLE:1,0:"VIDEO",1:"PLAYABLE"},Ah=class{constructor(){this.g=Y();this.ContentType=zh}sendScore(a){var b=this;return m(function*(){if(!Number.isInteger(a.value))throw new V(Xg,4,`Score value must be an integer and the value entered was: ${a.value}`);if(!Number.isSafeInteger(a.value))throw new V(Xg,4,`Score value must be less than the maximum safe integer in Javascript ${Number.MAX_SAFE_INTEGER} and the value entered was: ${a.value}`);var c=b.g,d=S(2);var e=new Jg;e=sd(e,1,a.value);
d=J(d,3,T,e);c=yield th(c,d);ch(c.data,4)})}openYTContent(a){var b=this;return m(function*(){var c,d=(c=a.contentType)!=null?c:0;c=a.id;if(!(d===1?/^[-A-Za-z0-9_]+$/.test(c):c.length===11&&/^[-A-Za-z0-9_]+$/.test(c)&&"AEIMQUYcgkosw048".includes(c[10])&&c!=="GU5U2spHI_4"))throw new V(Xg,15,"Invalid format for content being passed");c=new Yf;c=G(c,1,D(a.id));d===1?M(c,2,2):M(c,2,1);d=b.g;var e=S(15);c=J(e,12,T,c);d=yield th(d,c);ch(d.data,15)})}};function Bh(a){Object.defineProperty(window,"AudioContext",{value:new Proxy(AudioContext,{construct(b,c){if(a.g===null||a.g.state==="closed"){if(X().useSystemDefaultSampleRate)a.g=new b(...c);else{let d=X().sampleAudioAs44100Hz?44100:48E3;try{a.g=new b({latencyHint:"interactive",sampleRate:d})}catch(e){console.error(`Failed to create AudioContext with ${d} sample rate.`),a.g=new b(...c)}}a.h!==null&&(a.h.disconnect(),a.h.onaudioprocess=null);a.h=a.g.createScriptProcessor(X().numSamplesPerAudioCapturePacket,
1,1);a.h.onaudioprocess=d=>m(function*(){if(a.j){var e=d.inputBuffer.getChannelData(0);if(X().sendAudioDataViaPostMessage)e=new Uint8Array(e.buffer),a.i.parent.postMessage({type:"GAME_AUDIO",audio:e},a.o,[]);else{let h=yield Ch(e);e=a.m;var f=S(17);var g=new dg;g=G(g,1,D(h));f=J(f,15,T,g);Z(e,f)}}});a.h.connect(a.g.destination);Dh(a.g,a.h);Eh(a.g,a.h)}return a.g}}),writable:!0})}
function Fh(a,b){var c=a.connect.bind(a);a.connect=(d,e,f)=>{d instanceof AudioDestinationNode&&c(b,e);d instanceof AudioNode?c(d,e,f):c(d,e);return a}}
function Eh(a,b){var c=a.createBufferSource.bind(a);a.createBufferSource=()=>{var g=c();Fh(g,b);return g};var d=a.createMediaElementSource.bind(a);a.createMediaElementSource=g=>{g=d(g);Fh(g,b);return g};var e=a.createGain.bind(a);a.createGain=()=>{var g=e();Fh(g,b);return g};var f=a.createPanner.bind(a);a.createPanner=()=>{var g=f();Fh(g,b);return g}}
function Dh(a,b){Object.defineProperty(window,"AudioBufferSourceNode",{value:new Proxy(AudioBufferSourceNode,{construct(c,d){d[0]=a;c=new c(...d);Fh(c,b);return c}}),writable:!0});Object.defineProperty(window,"MediaElementAudioSourceNode",{value:new Proxy(MediaElementAudioSourceNode,{construct(c,d){d[0]=a;c=new c(...d);Fh(c,b);return c}}),writable:!0});Object.defineProperty(window,"GainNode",{value:new Proxy(GainNode,{construct(c,d){d[0]=a;c=new c(...d);Fh(c,b);return c}}),writable:!0});Object.defineProperty(window,
"PannerNode",{value:new Proxy(PannerNode,{construct(c,d){d[0]=a;c=new c(...d);Fh(c,b);return c}}),writable:!0})}function Ch(a){return m(function*(){return yield new Promise(b=>{var c=new FileReader;c.onload=()=>{b(c.result)};c.readAsDataURL(new Blob([a]))})})}
var Gh=class{constructor(){var a=window;this.m=Y();this.g=this.h=null;this.j=!X().captureAudioOnGameReady;this.i=a;this.o=(new URLSearchParams(this.i.location.hash.substring(1))).get("origin")||this.i.document.referrer;X().enableAudioCapture&&(X().setAudioSessionTypeToAmbient&&navigator.audioSession&&(navigator.audioSession.type="ambient"),Bh(this))}},Hh;function Ih(a){a.h=0;a.g=0;a.i=a.index}function Jh(a,b){a.index===a.i&&a.g>0&&(a.h-=a.buffer[a.index],a.g--,a.i++,a.i>=a.buffer.length&&(a.i=0));a.buffer[a.index]=b;a.h+=b;a.g++;a.index++;a.index>=a.buffer.length&&(a.index=0)}function Kh(a){return a.g===0?0:a.h/a.g}var Lh=class{constructor(a){this.index=this.i=this.g=this.h=0;this.buffer=Array(a)}};function Mh(a){var b=performance.now();a.h>0?Jh(a.g,b-a.h):a.j!==0&&(Jh(a.g,0),clearTimeout(a.j));a.h=-1;a.j=setTimeout(()=>{a.h=performance.now()},0);a.m>0&&Jh(a.i,b-a.m);a.m=b;requestAnimationFrame(()=>{Mh(a)})}var Nh=class{constructor(){this.h=this.m=-1;this.j=0;this.i=new Lh(3600);this.g=new Lh(3600)}init(){requestAnimationFrame(()=>{Mh(this)})}};function Oh(a){var b=new Bg;return sd(b,1,Kh(a.g))}var Ph=class{constructor(){this.g=new Lh(12)}init(){setInterval(()=>{var a=window.performance&&window.performance.memory||null;a&&Jh(this.g,a.usedJSHeapSize)},5E3)}};function Qh(a,b){a.H=b}function Rh(a){return a!=null&&typeof a==="number"&&Number.isFinite(a)?Math.floor(a):0}function og(a){var b=new hg;var c=Rh(a.o);b=G(b,1,$b(c));c=Rh(a.m);b=G(b,2,$b(c));c=Rh(a.j);b=G(b,3,$b(c));b=td(b,4,a.h);b=td(b,5,a.g);c=new gg;var d=Rh(a.B);c=sd(c,1,d);d=Rh(a.u);c=sd(c,2,d);a=Rh(a.i);a=sd(c,3,a);return nd(b,6,a)}
var Sh=class{constructor(){this.navigator=window.navigator;this.h=new Map;this.g=new Map;this.i=this.u=this.B=this.j=this.m=this.o=0;this.H=null}init(a=window.navigator){this.navigator=a;typeof performance.getEntriesByType==="function"&&"encodedBodySize"in PerformanceResourceTiming.prototype&&"decodedBodySize"in PerformanceResourceTiming.prototype&&"transferSize"in PerformanceResourceTiming.prototype&&((new PerformanceObserver(b=>{b.getEntries().forEach(c=>{if(c.entryType==="resource"&&!c.name.includes("https://www.youtube.com/game_api")){this.o++;
this.j+=c.encodedBodySize;c.transferSize===0&&c.decodedBodySize>0&&this.m++;let f=Rh(c.responseStatus);if(!(f>=100&&f<200)){try{var d=new URL(c.name)}catch(g){throw $g;}window.location.origin===d.origin?this.h.set(f,(this.h.get(f)||0)+1):this.g.set(f,(this.g.get(f)||0)+1)}var e;(e=this.H)==null||e.call(this,c)}})})).observe({type:"resource",buffered:!0}),this.navigator&&"serviceWorker"in this.navigator&&this.navigator.serviceWorker.addEventListener&&this.navigator.serviceWorker.addEventListener("message",
b=>{this.B++;b.data.cacheHit&&(this.u++,this.i+=b.data.cachedBytes)}))}};function ng(){Th||(Th=new Uh);return Th}function Vh(a){a.i!==0&&(a.i=0,Wh(a),a.h=setTimeout(()=>{Xh(a)},Yh()))}function Wh(a){a.u=performance.now();var b=a.g;Ih(b.i);Ih(b.g);b=a.m;b.o=0;b.m=0;b.j=0;b.B=0;b.u=0;b.i=0;b.h.clear();b.g.clear();Ih(a.j.g)}function Xh(a){var b=Hg(Gg(Fg(Eg(Dg(Cg(new Ig,a.u)),Kh(a.g.i)),Kh(a.g.g)),og(a.m)),Oh(a.j));Z(Y(),Pg(b));Wh(a);a.h=setTimeout(()=>{Xh(a)},Yh())}
function Yh(){var a=performance.now();return a<18E4?3E4:Math.min(3E4*Math.pow(2,Math.floor((a-18E4)/3E4)+1),36E5)}function Zh(a){a.i=1;clearTimeout(a.h);a.h=0}
var Uh=class{constructor(){this.u=this.h=0;this.i=1;this.B=Y();this.g=new Nh;this.o=new Sh;this.m=new Sh;this.j=new Ph}init(){var a=(new URLSearchParams(window.location.hash.substring(1))).get("debug")!==null;(a||window.enableSendingResourceLoadedEvents===!0)&&Qh(this.o,b=>{var c=this.B,d=S(1),e=jg(3);var f=new ig;f=G(f,1,D(b.name));f=G(f,2,$b(b.decodedBodySize));f=G(f,3,$b(b.encodedBodySize));b=G(f,4,$b(b.transferSize));e=J(e,3,pg,b);Z(c,Mg(d,e))});this.g.init();this.o.init();this.m.init();a&&this.j.init();
Vh(this)}},Th;function $h(){ai||(ai=new bi);return ai}function ci(a){a.navigator&&"serviceWorker"in a.navigator&&a.navigator.serviceWorker.addEventListener&&a.navigator.serviceWorker.addEventListener("message",b=>{b.data.serviceWorkerMessageKind==="clientStatusRequest"&&di(a)})}function di(a){a.navigator&&"serviceWorker"in a.navigator&&a.navigator.serviceWorker.controller&&a.navigator.serviceWorker.controller.postMessage({serviceWorkerMessageKind:"clientStatus",shouldCacheResources:a.shouldCacheResources})}
var bi=class{constructor(){this.navigator=window.navigator;this.shouldCacheResources=!0}init(){ci(this);di(this)}},ai;var ei=class{constructor(){this.log=()=>{}}};function fi(a){switch(a){case 0:return 1;case 1:return 2;case 2:return 3;case 3:return 4;case 4:return 5;default:return 0}}function gi(a){switch(a.errorType){case 2:return 2;case 1:return 1;case 3:return 3;default:return 0}}function hi(a,b){var c=S(9),d=new Kg;b=M(d,1,b);c=J(c,8,T,b);Z(a,c)};var ii=class{constructor(){this.h=xh;this.i=new hh("GAME_DATA_EVENT");this.g=Y();this.j=$h();Hh||(Hh=new Gh);this.m=Hh;sh(this.g,a=>{switch(K(a.data,1)){case 7:Zc(a.data,ug,5)&&this.i.dispatchEvent(L(a.data,ug,5,I))}})}saveData(a){var b=this;return m(function*(){if(b.h){try{encodeURIComponent(a)}catch(f){throw new V(Xg,3,"Failed to encode save data");}var c=(new Blob([a])).size;if(c>3145727){var d=new Zf;c=fd(d,3,$f,$b(c));throw new V(Zg,3,void 0,c);}c=b.g;d=S(3);var e=new Xf;e=G(e,1,D(a));d=J(d,
4,T,e);c=yield th(c,d);ch(c.data,3)}})}loadData(){var a=this;return m(function*(){if(!a.h)return"";var b=yield th(a.g,S(4));ch(b.data,2);var c,d;return((c=yg(b.data))==null?void 0:(d=L(c,Xf,3,vg))==null?void 0:rd(d,1))||""})}firstFrameReady(){var a=Array.from(document.getElementsByTagName("script")).filter(b=>!b.src.endsWith("/@vite/client"))[0];a=!!a&&a.src.startsWith("https://www.youtube.com/game_api/")&&a.attributes.getNamedItem("defer")===null&&a.attributes.getNamedItem("async")===null;Z(this.g,
Mg(S(1),mg(lg(jg(1),eg(a)))))}gameReady(){Z(this.g,Mg(S(1),mg(jg(2))));var a=this.j,b=a.shouldCacheResources!==!1;a.shouldCacheResources=!1;b&&di(a);this.m.j=!0}onGameDataAvailable(a){hi(this.g,13);return fh(this.i,a)}shareInviteCode(a){var b=this;return m(function*(){if(a.length===0)throw new V(Xg,12,"Invite code cannot be empty");if((new TextEncoder).encode(a).length>8)throw new V(Xg,12,"Invite code provided exceeded 8 bytes");var c=b.g;var d=S(13);d=fd(d,11,T,D(a));c=yield th(c,d);ch(c.data,12)})}};function ji(a,b){var c={level:1,source:1};b&&(c.A=b,c.source=3,c.message=b.message,c.X=b.stack);a.h.log(c)}
var ki=class{constructor(a){var b=window;this.h=a;this.g=b;this.i=!1;this.j=c=>{ji(this,c.reason instanceof U?c.reason:void 0)};this.o=this.g.onerror;this.u=this.g.console.warn;this.m=this.g.console.error}install(){this.i||(this.i=!0,this.g.onerror=(a,b,c,d,e)=>{var f;(f=this.o)==null||f.call(this.g,a,b,c,d,e);ji(this,e instanceof U?e:void 0)},this.g.console.warn=(...a)=>{this.warn(...a)},this.g.console.error=(...a)=>{this.error(...a)},this.g.addEventListener("unhandledrejection",this.j))}error(...a){this.h.log({level:1,
source:0});this.m(...a)}warn(...a){this.h.log({level:0,source:0});this.u(...a)}};function li(a,b){Z(a.h,Ng(S(6),bg(new cg,b.map((c,d)=>{c=b[b.length-1-d];d=new ag;a:switch(c.level){case 0:var e=1;break a;case 1:e=2;break a;default:e=0}d=M(d,2,e);d=M(d,1,fi(c.source));c.A&&(e=M(d,6,gi(c.A)),e=G(e,4,D(c.message)),G(e,5,D(c.X)),c.A instanceof V&&c.A.g!==0&&(M(d,7,c.A.g),c.A.data&&nd(d,8,c.A.data)));return d}))))}
var mi=class{constructor(){this.g=void 0;this.h=Y();this.g=new ei;this.g.log=this.log.bind(this);this.i=new ki(this.g);this.i.install()}logError(){this.log({level:1,source:2})}logWarning(){this.log({level:0,source:2})}log(a){li(this,[a])}};var ni=class{constructor(){Y()}};function oi(){m(function*(){try{yield rf(navigator.serviceWorker,uf`/null_sw.js`)}catch(a){console.error("Failed to register null service worker.",a)}})}function pi(){m(function*(){try{yield rf(navigator.serviceWorker,uf`/sw.js`)}catch(a){console.error("Failed to register service worker.",a)}})}function qi(a){m(function*(){try{yield ri()}catch(b){console.error("Failed to unregister service worker.",b)}try{yield si(a)}catch(b){console.error("Failed to delete cache entries.",b)}})}
function ri(){return m(function*(){if(navigator&&"serviceWorker"in navigator){var a=yield navigator.serviceWorker.getRegistration("/");a&&(yield a.unregister())}})}function si(a){return m(function*(){if(a&&"keys"in a){var b=yield a.keys();b&&(yield Promise.all(b.map(c=>a.delete(c))))}})}var ti=class{constructor(){var a=window.caches;xh&&(X().enableServiceWorker?X().enableServiceWorkerKillswitch?oi():pi():qi(a))}};var ui=class{constructor(){this.j=xh;this.m=new hh("AUDIO_EVENT",{P:!1});this.o=!1;this.g=Y();this.i=ng();this.H=$h();this.h=new hh("LIFECYCLE_EVENT");this.B=1E4;this.u=0;new hh("DISPATCH_CLICK_EVENT");sh(this.g,a=>{switch(K(a.data,1)){case 2:var b;a=(b=L(a.data,qg,3,I))==null?void 0:pd(b);this.j&&a!==void 0&&(this.m.dispatchEvent(a),this.o=a);break;case 3:this.h.dispatchEvent(1);Zh(this.i);break;case 4:this.h.dispatchEvent(0);Vh(this.i);break;case 12:let c,d;(c=L(a.data,tg,6,I))!=null&&qd(c,1);(d=
L(a.data,tg,6,I))!=null&&qd(d,2);break;case 13:if(b=L(a.data,xg,7,I))dd(b,1,mc).forEach(()=>{}),dd(b,2,lc).forEach(()=>{});break;case 5:Zc(a.data,sg,4)&&(this.B=rg(L(a.data,sg,4,I))),Z(this.g,Og())}});Ff(window,"pointerdown",a=>{!a.h.isTrusted||Date.now()-this.u<this.B||(this.u=Date.now(),Z(this.g,S(10)))},!0);Ff(window,"keydown",()=>{});this.i.init();this.H.init()}onAudioEnabledChange(a){hi(this.g,5);return fh(this.m,a)}isAudioEnabled(){if(!this.j)return!0;hi(this.g,10);return this.o}onPause(a){a.aa||
hi(this.g,6);return fh(this.h,b=>{b===1&&a()})}onResume(a){hi(this.g,7);return fh(this.h,b=>{b===0&&a()})}getLanguage(){var a=this;return m(function*(){var b=yield th(a.g,S(5));ch(b.data,8);var c;return((c=yg(b.data))==null?void 0:c.getLanguage())||"en"})}};var vi=new class{constructor(a=xh,b=new yh,c=new wh,d=new Ah,e=new ii,f=new mi,g=new ui,h=new ni,k=new ti){this.g=a;this.h=b;this.ads=c;this.engagement=d;this.game=e;this.health=f;this.system=g;this.i=h;document.addEventListener("DOMContentLoaded",()=>{var l=document.body;Pf(l,"touch-action");Pf(l,"overscroll-behavior");Pf(l,"user-select");Pf(l,"-webkit-user-select");Pf(l,"-ms-user-select");Pf(l,"-moz-user-select");Pf(l,"-o-user-select")});this.g&&(Object.defineProperty(window,"localStorage",{value:null,
writable:!1}),Object.defineProperty(window,"sessionStorage",{value:null,writable:!1}),Object.defineProperty(window,"indexedDB",{value:null,writable:!1}),Object.defineProperty(window,"caches",{value:null,writable:!1}),Object.defineProperty(document,"cookie",{value:null,writable:!1}))}};ka("ytgame",vi.h);ka("ytgame.ads",vi.ads);ka("ytgame.engagement",vi.engagement);ka("ytgame.game",vi.game);ka("ytgame.health",vi.health);ka("ytgame.proto",vi.i);ka("ytgame.system",vi.system);}).call(this);
