0% found this document useful (0 votes)
43 views

F

This document defines functions for creating and working with promises in JavaScript. It defines a Promise constructor function that allows creating promise objects, and methods like Promise.resolve, Promise.reject, Promise.all and Promise.race for resolving promises. It also polyfills features like Array.prototype.fill to ensure compatibility across environments.

Uploaded by

Lê Anh Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

F

This document defines functions for creating and working with promises in JavaScript. It defines a Promise constructor function that allows creating promise objects, and methods like Promise.resolve, Promise.reject, Promise.all and Promise.race for resolving promises. It also polyfills features like Array.prototype.fill to ensure compatibility across environments.

Uploaded by

Lê Anh Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 8

(function(){/*

Copyright The Closure Library Authors.


SPDX-License-Identifier: Apache-2.0
*/
function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:
{done:!0}}}var ba="function"==typeof Object.defineProperties?
Object.defineProperty:function(a,b,c){if(a==Array.prototype||
a==Object.prototype)return a;a[b]=c.value;return a};
function ca(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 n=ca(this);function p(a,b){if(b)a:{var
c=n;a=a.split(".");for(var d=0;d<a.length-1;d++){var g=a[d];if(!(g in c))break
a;c=c[g]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!
0,writable:!0,value:b})}}
function da(a){var b="undefined"!=typeof
Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return
b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+"
is not an iterable or ArrayLike");}var ea="function"==typeof Object.create?
Object.create:function(a){function b(){}b.prototype=a;return new b},fa;
if("function"==typeof Object.setPrototypeOf)fa=Object.setPrototypeOf;else{var ha;a:
{var ia={a:!0},ja={};try{ja.__proto__=ia;ha=ja.a;break a}catch(a){}ha=!1}fa=ha?
function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not
extensible");return a}:null}var ka=fa;
function la(a,b)
{a.prototype=ea(b.prototype);a.prototype.constructor=a;if(ka)ka(a,b);else for(var c
in b)if("prototype"!=c)if(Object.defineProperties){var
d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else
a[c]=b[c];a.ca=b.prototype}function ma(){for(var
a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
p("Promise",function(a){function b(e){this.i=0;this.j=void 0;this.h=[];this.v=!
1;var h=this.l();try{e(h.resolve,h.reject)}catch(k){h.reject(k)}}function c()
{this.h=null}function d(e){return e instanceof b?e:new b(function(h)
{h(e)})}if(a)return a;c.prototype.i=function(e){if(null==this.h){this.h=[];var
h=this;this.j(function(){h.o()})}this.h.push(e)};var
g=n.setTimeout;c.prototype.j=function(e){g(e,0)};c.prototype.o=function()
{for(;this.h&&this.h.length;){var e=this.h;this.h=[];for(var h=0;h<e.length;++h)
{var k=
e[h];e[h]=null;try{k()}catch(l){this.l(l)}}}this.h=null};c.prototype.l=function(e)
{this.j(function(){throw e;})};b.prototype.l=function(){function e(l){return
function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!
1;return{resolve:e(this.H),reject:e(this.o)}};b.prototype.H=function(e)
{if(e===this)this.o(new TypeError("A Promise cannot resolve to itself"));else if(e
instanceof b)this.J(e);else{a:switch(typeof e){case "object":var h=null!=e;break
a;case "function":h=!0;break a;default:h=!1}h?this.F(e):this.u(e)}};
b.prototype.F=function(e){var h=void 0;try{h=e.then}catch(k)
{this.o(k);return}"function"==typeof h?
this.K(h,e):this.u(e)};b.prototype.o=function(e)
{this.C(2,e)};b.prototype.u=function(e){this.C(1,e)};b.prototype.C=function(e,h)
{if(0!=this.i)throw Error("Cannot settle("+e+", "+h+"): Promise already settled in
state"+this.i);this.i=e;this.j=h;2===this.i&&this.I();this.G()};b.prototype.I=funct
ion(){var e=this;g(function(){if(e.D()){var h=n.console;"undefined"!==typeof
h&&h.error(e.j)}},1)};b.prototype.D=
function(){if(this.v)return!1;var
e=n.CustomEvent,h=n.Event,k=n.dispatchEvent;if("undefined"===typeof k)return!
0;"function"===typeof e?e=new e("unhandledrejection",{cancelable:!
0}):"function"===typeof h?e=new h("unhandledrejection",{cancelable:!0}):
(e=n.document.createEvent("CustomEvent"),e.initCustomEvent("unhandledrejection",!
1,!0,e));e.promise=this;e.reason=this.j;return k(e)};b.prototype.G=function()
{if(null!=this.h){for(var e=0;e<this.h.length;++e)f.i(this.h[e]);this.h=null}};var
f=new c;b.prototype.J=
function(e){var h=this.l();e.L(h.resolve,h.reject)};b.prototype.K=function(e,h){var
k=this.l();try{e.call(h,k.resolve,k.reject)}catch(l)
{k.reject(l)}};b.prototype.then=function(e,h){function k(q,u)
{return"function"==typeof q?function(v){try{l(q(v))}catch(J){m(J)}}:u}var l,m,w=new
b(function(q,u){l=q;m=u});this.L(k(e,l),k(h,m));return
w};b.prototype.catch=function(e){return this.then(void
0,e)};b.prototype.L=function(e,h){function k(){switch(l.i){case 1:e(l.j);break;case
2:h(l.j);break;default:throw Error("Unexpected state: "+
l.i);}}var l=this;null==this.h?f.i(k):this.h.push(k);this.v=!
0};b.resolve=d;b.reject=function(e){return new b(function(h,k)
{k(e)})};b.race=function(e){return new b(function(h,k){for(var l=da(e),m=l.next();!
m.done;m=l.next())d(m.value).L(h,k)})};b.all=function(e){var
h=da(e),k=h.next();return k.done?d([]):new b(function(l,m){function w(v){return
function(J){q[v]=J;u--;0==u&&l(q)}}var q=[],u=0;do q.push(void 0),u+
+,d(k.value).L(w(q.length-1),m),k=h.next();while(!k.done)})};return b});
p("Array.prototype.fill",function(a){return a?a:function(b,c,d){var g=this.length||
0;0>c&&(c=Math.max(0,g+c));if(null==d||
d>g)d=g;d=Number(d);0>d&&(d=Math.max(0,g+d));for(c=Number(c||0);c<d;c+
+)this[c]=b;return this}});function r(a){return a?
a:Array.prototype.fill}p("Int8Array.prototype.fill",r);p("Uint8Array.prototype.fill
",r);p("Uint8ClampedArray.prototype.fill",r);p("Int16Array.prototype.fill",r);p("Ui
nt16Array.prototype.fill",r);p("Int32Array.prototype.fill",r);
p("Uint32Array.prototype.fill",r);p("Float32Array.prototype.fill",r);p("Float64Arra
y.prototype.fill",r);var t=this||self;function na(a){return a};function oa(a){var
b;a:{if(b=t.navigator)if(b=b.userAgent)break a;b=""}return-1!=b.indexOf(a)};var
pa=Array.prototype.indexOf?function(a,b){return
Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if("string"===typeof
a)return"string"!==typeof b||1!=b.length?-1:a.indexOf(b,0);for(var
c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-
1},qa=Array.prototype.forEach?function(a,b){Array.prototype.forEach.call(a,b,void
0)}:function(a,b){for(var c=a.length,d="string"===typeof a?a.split(""):a,g=0;g<c;g+
+)g in d&&b.call(void 0,d[g],g,a)},ra=Array.prototype.map?function(a,b){return
Array.prototype.map.call(a,
b,void 0)}:function(a,b){for(var c=a.length,d=Array(c),g="string"===typeof a?
a.split(""):a,f=0;f<c;f++)f in g&&(d[f]=b.call(void 0,g[f],f,a));return d};function
sa(a){sa[" "](a);return a}sa[" "]=function(){};var ta={},x=null;var ua="undefined"!
==typeof Uint8Array,va=!(oa("Trident")||oa("MSIE"))&&"function"===typeof t.btoa;var
y="function"===typeof Symbol&&"symbol"===typeof Symbol()?Symbol():void 0;function
z(a,b){if(y)return a[y]|=b;if(void 0!==a.B)return a.B|=b;Object.defineProperties(a,
{B:{value:b,configurable:!0,writable:!0,enumerable:!1}});return b}function A(a){var
b;y?b=a[y]:b=a.B;return null==b?0:b}function B(a,b){y?a[y]=b:void 0!==a.B?
a.B=b:Object.defineProperties(a,{B:{value:b,configurable:!0,writable:!
0,enumerable:!1}})}function wa(a){z(a,16);return a}function xa(a,b){B(b,(a|0)&-51)}
function C(a,b){B(b,(a|18)&-41)};var D={};function E(a){return null!
==a&&"object"===typeof a&&!Array.isArray(a)&&a.constructor===Object}var
F,ya=[];B(ya,23);F=Object.freeze(ya);function za(a){var b=a.length;(b=b?a[b-1]:void
0)&&E(b)?b.g=1:(b={},a.push((b.g=1,b)))};function Aa(a){var b=a.i+a.A;return a.s||
(a.s=a.m[b]={})}function H(a,b,c){return-1===b?null:b>=a.i?a.s?a.s[b]:void
0:c&&a.s&&(c=a.s[b],null!=c)?c:a.m[b+a.A]}function Ba(a,b,c,d){a.j&&(a.j=void
0);b>=a.i||d?Aa(a)[b]=c:(a.m[b+a.A]=c,(a=a.s)&&b in a&&delete a[b])}
function Ca(a,b,c){var d=H(a,1,c);var g=A(a.m),f=!1;if(null==d||"object"!==typeof
d||(f=Array.isArray(d))||d.M!==D)if(f){var e=f=A(d);0===e&&(e|=g&16);e|=g&2;e!
==f&&B(d,e);b=new b(d)}else b=void 0;else b=d;b!==d&&null!=b&&Ba(a,1,b,c);return
b}function Da(a){var b=Ga;var c=void 0===c?!1:c;b=Ca(a,b,c);if(null==b)return
b;if(!(A(a.m)&2)){var d=b;if(A(d.m)&2){var g=Ha(d,!1);g.j=d;d=g}d!
==b&&(b=d,Ba(a,1,b,c))}return b}function I(a,b){return null==a?b:a}
function K(a,b){a=H(a,b);return I(null==a?a:!!a,!1)};var Ia;function Ja(a,b)
{Ia=b;a=new a(b);Ia=void 0;return a};function Ka(a){switch(typeof a){case
"number":return isFinite(a)?a:String(a);case "object":if(a)if(Array.isArray(a))
{if(0!==(A(a)&128))return a=Array.prototype.slice.call(a),za(a),a}else if(ua&&null!
=a&&a instanceof Uint8Array){if(va){for(var
b="";10240<a.length;)b+=String.fromCharCode.apply(null,a.subarray(0,10240)),a=a.sub
array(10240);b+=String.fromCharCode.apply(null,a);a=btoa(b)}else{void
0===b&&(b=0);if(!x){x={};for(var
c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),
d=["+/=","+/","-_=","-_.","-_"],g=0;5>g;g++){var
f=c.concat(d[g].split(""));ta[g]=f;for(var e=0;e<f.length;e++){var h=f[e];void
0===x[h]&&(x[h]=e)}}}b=ta[b];c=Array(Math.floor(a.length/3));d=b[64]||"";for(g=f=0;
f<a.length-2;f+=3){var k=a[f],l=a[f+1];h=a[f+2];e=b[k>>2];k=b[(k&3)<<4|
l>>4];l=b[(l&15)<<2|h>>6];h=b[h&63];c[g++]=e+k+l+h}e=0;h=d;switch(a.length-f){case
2:e=a[f+1],h=b[(e&15)<<2]||d;case 1:a=a[f],c[g]=b[a>>2]+b[(a&3)<<4|
e>>4]+h+d}a=c.join("")}return a}}return a};function La(a,b,c,d){if(null!=a)
{if(Array.isArray(a))a=Ma(a,b,c,void 0!==d);else if(E(a)){var g={},f;for(f in
a)g[f]=La(a[f],b,c,d);a=g}else a=b(a,d);return a}}function Ma(a,b,c,d){var
g=A(a);d=d?!!(g&16):void 0;a=Array.prototype.slice.call(a);for(var
f=0;f<a.length;f++)a[f]=La(a[f],b,c,d);c(g,a);return a}function Na(a){return
a.M===D?a.toJSON():Ka(a)}function Oa(a,b){a&128&&za(b)};function Pa(a,b,c){c=void
0===c?C:c;if(null!=a){if(ua&&a instanceof Uint8Array)return b?a:new
Uint8Array(a);if(Array.isArray(a)){var d=A(a);if(d&2)return a;if(b&&!
(d&32)&&(d&16||0===d))return B(a,d|18),a;a=Ma(a,Pa,d&4?C:c,!
0);b=A(a);b&4&&b&2&&Object.freeze(a);return a}return a.M===D?Qa(a):a}}
function Ra(a,b,c,d,g,f,e){if(a=a.h&&a.h[c]){d=A(a);d&2?d=a:
(f=ra(a,Qa),C(d,f),Object.freeze(f),d=f);if(A(b.m)&2)throw Error();null==d?f=F:
(f=[],z(f,1));e=f;if(null!=d){f=!!d.length;for(a=0;a<d.length;a++){var
h=d[a];f=f&&!(A(h.m)&2);e[a]=h.m}f=(f?8:0)|1;a=A(e);(a&f)!
==f&&(Object.isFrozen(e)&&(e=Array.prototype.slice.call(e)),B(e,a|f));b.h||
(b.h={});b.h[c]=d}else b.h&&(b.h[c]=void
0);Ba(b,c,e,g)}else{d=Pa(d,f,e);if(A(b.m)&2)throw Error();Ba(b,c,d,g)}}
function Qa(a){if(A(a.m)&2)return a;a=Ha(a,!0);z(a.m,18);return a}function Ha(a,b)
{var c=a.m,d=wa([]),g=a.constructor.h;g&&d.push(g);g=a.s;if(g)
{d.length=c.length;d.fill(void 0,d.length,c.length);var f={};d[d.length-1]=f}0!
==(A(c)&128)&&za(d);b=b||A(a.m)&2?
C:xa;d=Ja(a.constructor,d);a.O&&(d.O=a.O.slice());f=!!(A(c)&16);for(var e=g?
c.length-1:c.length,h=0;h<e;h++)Ra(a,d,h-a.A,c[h],!1,f,b);if(g)for(var k in
g)Ra(a,d,+k,g[k],!0,f,b);return d};function M(a,b,c,d){null==a&&(a=Ia);Ia=void
0;var g=this.constructor.h;if(null==a){a=g?[g]:[];var f=48;var e=!0;d&&(f|
=128);B(a,f)}else{if(!Array.isArray(a))throw Error();if(g&&g!==a[0])throw
Error();f=z(a,0)|32;e=0!==(16&f);if(d){if(!(f&128)&&0<a.length){var h=a[a.length-
1];if(E(h)&&"g"in h){f|=128;delete h.g;var k=!0,l;for(l in h){k=!
1;break}k&&a.pop()}else throw Error();}}else if(128&f)throw
Error();B(a,f)}this.A=g?0:-1;this.h=void 0;this.m=a;a:{f=this.m.length;g=f-
1;if(f&&(f=this.m[g],E(f))){this.s=
f;this.i=g-this.A;break a}void 0!==b&&-1<b?(this.i=Math.max(b,g+1-
this.A),this.s=void 0):this.i=Number.MAX_VALUE}if(!d&&this.s&&"g"in this.s)throw
Error('Unexpected "g" flag in sparse object of message that is not a group
type.');if(c){b=e&&!0;d=this.i;var m;for(e=0;e<c.length;e++)g=c[e],g<d?(g+=this.A,
(f=a[g])?Sa(f,b):a[g]=F):(m||(m=Aa(this)),(f=m[g])?
Sa(f,b):m[g]=F)}}M.prototype.toJSON=function(){return Ma(this.m,Na,Oa)};
function Sa(a,b){if(Array.isArray(a)){var c=A(a),d=1;!b||c&2||(d|=16);(c&d)!
==d&&B(a,c|d)}}M.prototype.M=D;function Ga(a){M.call(this,a,-1,Ta)}la(Ga,M);var
Ta=[28];function Ua(a){M.call(this,a,-1,Va)}la(Ua,M);var Wa=function(a){return
function(b){if(null==b||""==b)b=new a;else{b=JSON.parse(b);if(!
Array.isArray(b))throw Error(void 0);b=Ja(a,wa(b))}return b}}(Ua),Va=[21];function
Xa(a){var b=!1,c;return function(){b||(c=a(),b=!0);return c}};var Ya={passive:!
0},Za=Xa(function(){var a=!1;try{var b=Object.defineProperty({},"passive",
{get:function(){a=!0}});t.addEventListener("test",null,b)}catch(c){}return
a});function $a(a){return a?a.passive&&Za()?a:a.capture||!1:!1}function N(a,b,c,d)
{a.addEventListener&&a.addEventListener(b,c,$a(d))};var ab;function bb(a,b)
{this.h=b===cb?a:""}bb.prototype.toString=function(){return this.h+""};var
cb={};function O(a){var b=document;return"string"===typeof a?
b.getElementById(a):a}function db(a){var b=document;b.getElementsByClassName?
a=b.getElementsByClassName(a)[0]:
(b=document,a=b.querySelectorAll&&b.querySelector&&a?
b.querySelector(a?"."+a:""):eb(b,a)[0]||null);return a||null}
function eb(a,b){var c,d;if(a.querySelectorAll&&a.querySelector&&b)return
a.querySelectorAll(b?"."+b:"");if(b&&a.getElementsByClassName){var
g=a.getElementsByClassName(b);return g}g=a.getElementsByTagName("*");if(b){var
f={};for(c=d=0;a=g[c];c++){var e=a.className,h;if(h="function"==typeof
e.split)h=0<=pa(e.split(/\s+/),b);h&&(f[d++]=a)}f.length=d;return f}return
g}function fb(a){a&&a.parentNode&&a.parentNode.removeChild(a)};var gb=RegExp("^(?:
([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?
([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function hb(a,b){if(a)for(var c in
a)Object.prototype.hasOwnProperty.call(a,c)&&b(a[c],c,a)}function Q(a)
{a.preventDefault?a.preventDefault():a.returnValue=!1}function ib(a,b){b=void
0===b?document:b;return b.createElement(String(a).toLowerCase())};function
jb(a,b,c,d){kb(a,b,void 0===c?null:c,void 0===d?!1:d)}
function kb(a,b,c,d){var g=!1;g=void 0===g?!1:g;a.google_image_requests||
(a.google_image_requests=[]);var f=ib("IMG",a.document);if(c||d){var e=function(h)
{c&&c(h);if(d){h=a.google_image_requests;var
k=pa(h,f);0<=k&&Array.prototype.splice.call(h,k,1)}f.removeEventListener&&f.removeE
ventListener("load",e,$a());f.removeEventListener&&f.removeEventListener("error",e,
$a())};N(f,"load",e);N(f,"error",e)}g&&(f.attributionsrc="");f.src=b;a.google_image
_requests.push(f)};var lb=0;function mb(a){return(a=nb(a))&&a.getAttribute("data-
jc-version")||"unknown"}function nb(a){var b=document.currentScript;return(b=void
0===b?null:b)&&b.getAttribute("data-jc")===String(a)?
b:document.querySelector('[data-jc="'+a+'"]')}
function ob(){var a=void 0===a?.01:a;if(!(Math.random()>a)){var
b=nb(60);a="https://"+(b&&"true"===b.getAttribute("data-jc-
rcd")?"pagead2.googlesyndication-cn.com":"pagead2.googlesyndication.com")+"/
pagead/gen_204?id=jca&jc=60&version="+mb(60)+"&sample="+a;b=window;var c=void
0===c?!1:c;var
d;if(d=b.navigator)d=b.navigator.userAgent,d=/Chrome/.test(d)&&!/Edge/.test(d)?!0:!
1;d&&b.navigator.sendBeacon?b.navigator.sendBeacon(a):jb(b,a,void 0,c)}};var
pb=document,R=window;function qb(a){return"string"==typeof a.className?
a.className:a.getAttribute&&a.getAttribute("class")||""}function rb(a,b)
{a.classList?b=a.classList.contains(b):(a=a.classList?a.classList:qb(a).match(/\
S+/g)||[],b=0<=pa(a,b));return b}function S(a,b)
{if(a.classList)a.classList.add(b);else if(!rb(a,b)){var c=qb(a);b=c+(0<c.length?"
"+b:b);"string"==typeof a.className?
a.className=b:a.setAttribute&&a.setAttribute("class",b)}};function sb(a)
{this.serializedAttributionData=a.toJSON();this.h=Ha(a,!
1);this.isMutableImpression=void 0!==Ca(this.h,Ga,!1)&&!!K(Da(this.h),33);this.Z=!!
K(this.h,11);this.hasUserFeedbackData=!!this.h&&void 0!==Ca(this.h,Ga,!1);this.T=!!
K(this.h,4);this.W=!!K(this.h,6);this.S=!!
K(this.h,13);this.creativeIndexSuffix=1<I(H(this.h,8),0)?
I(H(this.h,7),0).toString():"";null!
=H(this.h,34)&&(this.creativeIndexSuffix=I(H(this.h,34),"")
+"_"+this.creativeIndexSuffix);this.aa=!!K(this.h,17);this.Y=!!K(this.h,
18);this.R=!!K(this.h,14);this.enableMultiplexThirdPartyAttribution=!!
K(this.h,32);this.I=!!K(this.h,15);this.ba=!!
K(this.h,31);this.X=1==K(this.h,9);this.openAttributionInline=1==K(this.h,10);this.
isMobileDevice=!!K(this.h,12);this.F=null;this.V=(a=pb.querySelector("[data-
slide]"))?"true"===a.getAttribute("data-slide"):!1;
(this.K=1<I(H(this.h,8),0))&&void
0===R.goog_multislot_cache&&(R.goog_multislot_cache={});if(this.K&&!this.V)
{if(a=R.goog_multislot_cache.hd,void 0===a){a=!1;var b=pb.querySelector("[data-
dim]");
if(b)if(b=b.getBoundingClientRect(),150<=b.right-b.left&&150<=b.bottom-b.top)a=!
1;else{var c=document.body.getBoundingClientRect();150>(1>=Math.abs(c.left-
b.left)&&1>=Math.abs(c.right-b.right)?b.bottom-b.top:b.right-b.left)&&(a=!0)}else
a=!1;window.goog_multislot_cache.hd=a}}else a=!
1;this.J=a;this.G=O("abgcp"+this.creativeIndexSuffix);this.C=O("abgc"+this.creative
IndexSuffix);this.i=O("abgs"+this.creativeIndexSuffix);O("abgl"+this.creativeIndexS
uffix);this.v=O("abgb"+this.creativeIndexSuffix);this.H=
O("abgac"+this.creativeIndexSuffix);O("mute_panel"+this.creativeIndexSuffix);this.D
=db("goog_delegate_attribution"+this.creativeIndexSuffix);this.isDelegateAttributio
nActive=!!this.D&&!!this.R&&!db("goog_delegate_disabled")&&!
this.I;if(this.i)a:for(a=this.i,b=a.childNodes,c=0;c<b.length;c++){var
d=b.item(c);if("undefined"!=typeof d.tagName&&"A"==d.tagName.toUpperCase())
{a=d;break a}}else a=null;this.o=a;this.l=this.isDelegateAttributionActive?
this.D:O("cbb"+this.creativeIndexSuffix);this.U=this.J?
"0"===this.creativeIndexSuffix:!0;this.enableDelegateDismissableMenu=!!
this.l&&rb(this.l,"goog_dismissable_menu");this.u=null;this.N=0;this.j=this.isDeleg
ateAttributionActive?this.D:this.W&&this.G?this.G:this.C;this.autoExpandOnLoad=!!
K(this.h,19);this.adbadgeEnabled=!!K(this.h,24);this.enableNativeJakeUi=!!
K(this.h,27)};function xb(a,b){if(!a)throw Error("bad conv util ctor
args");this.i=a;this.h=b};function T(a,b){a&&hb(b,function(c,d)
{a.style[d]=c})};function yb(a,b){var c=void 0===c?
{}:c;this.error=a;this.context=b.context;this.msg=b.message||"";this.id=b.id||"jser
ror";this.meta=c};var zb=RegExp("^https?://(\\w|-)+\\.cdn\\.ampproject\\.(net|org)
(\\?|/|$)");function Ab(a,b){this.h=a;this.i=b}function Bb(a,b)
{this.url=a;this.P=!!b;this.depth=null};function Cb()
{this.j="&";this.i={};this.l=0;this.h=[]}function Db(a,b){var
c={};c[a]=b;return[c]}function Eb(a,b,c,d,g){var f=[];hb(a,function(e,h)
{(e=Fb(e,b,c,d,g))&&f.push(h+"="+e)});return f.join(b)}
function Fb(a,b,c,d,g){if(null==a)return"";b=b||"&";c=c||",$";"string"==typeof
c&&(c=c.split(""));if(a instanceof Array){if(d=d||0,d<c.length){for(var
f=[],e=0;e<a.length;e++)f.push(Fb(a[e],b,c,d+1,g));return f.join(c[d])}}else
if("object"==typeof a)return g=g||0,2>g?
encodeURIComponent(Eb(a,b,c,d,g+1)):"...";return encodeURIComponent(String(a))}
function Gb(a,b){var c="https://pagead2.googlesyndication.com"+b,d=Hb(a)-
b.length;if(0>d)return"";a.h.sort(function(m,w){return m-w});b=null;for(var
g="",f=0;f<a.h.length;f++)for(var e=a.h[f],h=a.i[e],k=0;k<h.length;k++){if(!d)
{b=null==b?e:b;break}var l=Eb(h[k],a.j,",$");if(l){l=g+l;if(d>=l.length){d-
=l.length;c+=l;g=a.j;break}b=null==b?e:b}}a="";null!=b&&(a=g+"trn="+b);return
c+a}function Hb(a){var b=1,c;for(c in a.i)b=c.length>b?c.length:b;return 3997-b-
a.j.length-1};function Ib(){this.h=Math.random()}function Jb(){var
a=Kb,b=window.google_srt;0<=b&&1>=b&&(a.h=b)}function Lb(a,b,c,d,g){if(((void
0===d?0:d)?a.h:Math.random())<(g||.01))try{if(c instanceof Cb)var f=c;else f=new
Cb,hb(c,function(h,k){var l=f,m=l.l++;h=Db(k,h);l.h.push(m);l.i[m]=h});var
e=Gb(f,"/pagead/gen_204?id="+b+"&");e&&jb(t,e)}catch(h){}};var Mb=null;function
Nb(){var a=void 0===a?t:a;return(a=a.performance)&&a.now&&a.timing?
Math.floor(a.now()+a.timing.navigationStart):Date.now()}function Ob(){var a=void
0===a?t:a;return(a=a.performance)&&a.now?a.now():null};function Pb(a,b){var
c=Ob()||
Nb();this.label=a;this.type=b;this.value=c;this.duration=0;this.uniqueId=Math.rando
m();this.taskId=this.slotId=void 0};var U=t.performance,Qb=!!
(U&&U.mark&&U.measure&&U.clearMarks),V=Xa(function(){var a;if(a=Qb){var
b;if(null===Mb){Mb="";try{a="";try{a=t.top.location.hash}catch(c)
{a=t.location.hash}a&&(Mb=(b=a.match(/\bdeid=([\d,]+)/))?b[1]:"")}catch(c)
{}}b=Mb;a=!!b.indexOf&&0<=b.indexOf("1337")}return a});
function Rb(){var a=window;this.i=[];this.j=a||t;var
b=null;a&&(a.google_js_reporting_queue=a.google_js_reporting_queue||
[],this.i=a.google_js_reporting_queue,b=a.google_measure_js_timing);this.h=V()||
(null!=b?b:1>Math.random())}function Sb(a)
{a&&U&&V()&&(U.clearMarks("goog_"+a.label+"_"+a.uniqueId+"_start"),U.clearMarks("go
og_"+a.label+"_"+a.uniqueId+"_end"))}Rb.prototype.start=function(a,b){if(!
this.h)return null;a=new
Pb(a,b);b="goog_"+a.label+"_"+a.uniqueId+"_start";U&&V()&&U.mark(b);return a};
Rb.prototype.end=function(a){if(this.h&&"number"===typeof a.value)
{a.duration=(Ob()||Nb())-a.value;var
b="goog_"+a.label+"_"+a.uniqueId+"_end";U&&V()&&U.mark(b);!this.h||
2048<this.i.length||this.i.push(a)}};function Tb(){var
a=Ub;this.j=Kb;this.i=null;this.u=this.o;this.h=void 0===a?null:a;this.l=!
1}Tb.prototype.pinger=function(){return this.j};function Vb(a,b){var
c=Wb;try{if(c.h&&c.h.h){var d=c.h.start(a.toString(),3);var g=b();c.h.end(d)}else
g=b()}catch(h){b=!0;try{Sb(d),b=c.u(a,new yb(h,{message:Xb(h)}),void 0,void
0)}catch(k){c.o(217,k)}if(b){var f,e;null==(f=window.console)||null==(e=f.error)||
e.call(f,h)}else throw h;}return g}
function Yb(a,b){return function(){var c=ma.apply(0,arguments);return
Vb(a,function(){return b.apply(void 0,c)})}}
Tb.prototype.o=function(a,b,c,d,g){g=g||"jserror";try{var f=new
Cb;f.h.push(1);f.i[1]=Db("context",a);b.error&&b.meta&&b.id||(b=new yb(b,
{message:Xb(b)}));if(b.msg){var
e=b.msg.substring(0,512);f.h.push(2);f.i[2]=Db("msg",e)}var h=b.meta||
{};if(this.i)try{this.i(h)}catch(P){}if(d)try{d(h)}catch(P)
{}b=[h];f.h.push(3);f.i[3]=b;d=t;b=[];e=null;do{var k=d;try{var l;if(l=!!k&&null!
=k.location.href)b:{try{sa(k.foo);l=!0;break b}catch(P){}l=!1}var m=l}catch(P){m=!
1}if(m){var w=k.location.href;e=k.document&&
k.document.referrer||null}else w=e,e=null;b.push(new
Bb(w||""));try{d=k.parent}catch(P){d=null}}while(d&&k!=d);w=0;for(var q=b.length-
1;w<=q;++w)b[w].depth=q-
w;k=t;if(k.location&&k.location.ancestorOrigins&&k.location.ancestorOrigins.length=
=b.length-1)for(q=1;q<b.length;++q){var u=b[q];u.url||
(u.url=k.location.ancestorOrigins[q-1]||"",u.P=!0)}var v=new Bb(t.location.href,!
1);k=null;var J=b.length-1;for(u=J;0<=u;--u){var G=b[u];!
k&&zb.test(G.url)&&(k=G);if(G.url&&!G.P){v=G;break}}G=null;var kc=b.length&&
b[J].url;0!=v.depth&&kc&&(G=b[J]);var L=new Ab(v,G);if(L.i){var
lc=L.i.url||"";f.h.push(4);f.i[4]=Db("top",lc)}var Ea={url:L.h.url||""};if(L.h.url)
{var
Fa=L.h.url.match(gb),tb=Fa[1],ub=Fa[3],vb=Fa[4];v="";tb&&(v+=tb+":");ub&&(v+="//",v
+=ub,vb&&(v+=":"+vb));var wb=v}else wb="";Ea=[Ea,
{url:wb}];f.h.push(5);f.i[5]=Ea;Lb(this.j,g,f,this.l,c)}catch(P){try{Lb(this.j,g,
{context:"ecmserr",rctx:a,msg:Xb(P),url:L&&L.h.url},this.l,c)}catch(xc){}}return!
0};
function Xb(a){var b=a.toString();a.name&&-1==b.indexOf(a.name)&&(b+=":
"+a.name);a.message&&-1==b.indexOf(a.message)&&(b+=": "+a.message);if(a.stack)
{a=a.stack;var c=b;try{-1==a.indexOf(c)&&(a=c+"\n"+a);for(var d;a!
=d;)d=a,a=a.replace(RegExp("((https?:/..*/)[^/:]*:\\d+(?:.|\n)*)\\
2"),"$1");b=a.replace(RegExp("\n *","g"),"\n")}catch(g){b=c}}return b};var
Kb,Wb,Ub=new Rb;function Zb(){if(!window.google_measure_js_timing){var a=Ub;a.h=!
1;a.i!=a.j.google_js_reporting_queue&&(V()&&qa(a.i,Sb),a.i.length=0)}}(function(a)
{Kb=null!=a?a:new Ib;"number"!==typeof
window.google_srt&&(window.google_srt=Math.random());Jb();Wb=new
Tb;Wb.i=function(b){var c=lb;0!==c&&(b.jc=String(c),b.shv=mb(c))};Wb.l=!
0;"complete"==window.document.readyState?Zb():Ub.h&&N(window,"load",function()
{Zb()})})();function W(a,b){return Yb(a,b)};function $b(a,b){var
c=this;this.h=a;this.i=b;this.h.aa||(this.l=!1,this.j=null,!this.h.J||
this.h.adbadgeEnabled||this.h.U?ac(this):
(a={display:"none"},b={width:"15px",height:"15px"},this.h.isMobileDevice?
(T(this.h.v,a),T(this.h.i,a),T(this.h.G,b),T(this.h.C,b)):T(this.h.C,a)),bc(this),t
his.h.enableNativeJakeUi&&S(this.h.H,"abgnac"),this.h.isDelegateAttributionActive?
(S(document.body,"goog_delegate_active"),S(document.body,"jaa")):(!
this.h.isMutableImpression&&this.h.l&&fb(this.h.l),setTimeout(function()
{S(document.body,
"jar")},this.h.S?
750:100)),this.h.I&&S(document.body,"goog_delegate_disabled"),this.h.autoExpandOnLo
ad&&R.addEventListener("load",function(){return c.i()}))}
function bc(a){if(a.h.Z)N(a.h.j,"click",W(365,function(c){var
d=R.goog_interstitial_display;d&&(d(c),c&&(c.stopPropagation(),c.preventDefault()))
}));else if(a.h.isMutableImpression&&a.h.isMobileDevice)N(a.h.j,"click",function()
{return a.i()});else if(a.h.isMutableImpression&&!
a.h.isMobileDevice&&(a.h.l&&(N(a.h.l,"click",function(){return
a.i()}),N(a.h.l,"keydown",function(c){"Enter"!==c.code&&"Space"!==c.code||
a.i()})),a.h.ba&&a.h.i&&N(a.h.i,"click",function(){return
a.i()})),a.h.T)cc(a);else{N(a.h.j,
"mouseover",W(367,function(){return cc(a)}));N(a.h.j,"mouseout",W(369,function()
{return dc(a,500)}));N(a.h.j,"touchstart",W(368,function(){return cc(a)}),Ya);var
b=W(370,function(){return
dc(a,4E3)});N(a.h.j,"mouseup",b);N(a.h.j,"touchend",b);N(a.h.j,"touchcancel",b);a.h
.o&&N(a.h.o,"click",W(371,function(c){return a.preventDefault(c)}))}}
function ac(a){if(a.h.o&&a.h.Y){var b=Da(a.h.h);b&&null!=H(b,5)&&null!
=H(b,6)&&(a.j=new xb(I(H(b,5),""),I(H(b,19),"")));N(a.h.o,"click",W(452,function()
{if(!a.l&&(a.l=!0,a.j)){var
c=a.j,d=c.i+"&label=closebutton_whythisad_click";d+="&label_instance=1";c.h&&(d+="&
cid="+c.h);jb(window,d)}}))}}function ec(a){var
b=a.h.H;b.style.display="block";a.h.enableNativeJakeUi&&window.requestAnimationFram
e(function(){S(b,"abgacfo")})}
function cc(a)
{window.clearTimeout(a.h.u);a.h.u=null;a.h.i&&"block"==a.h.i.style.display||
(a.h.N=Date.now(),a.h.v&&a.h.i&&(a.h.v.style.display="none",a.h.i.style.display="bl
ock"))}function dc(a,b)
{window.clearTimeout(a.h.u);a.h.u=window.setTimeout(function(){return
fc(a)},b)}function fc(a)
{window.clearTimeout(a.h.u);a.h.u=null;a.h.v&&a.h.i&&(a.h.v.style.display="block",a
.h.i.style.display="none")}
$b.prototype.preventDefault=function(a)
{if(this.h.i&&"block"==this.h.i.style.display&&500>Date.now()-this.h.N)Q(a);else
if(this.h.openAttributionInline){var b=this.h.o.getAttribute("href");window.adSlot?
window.adSlot.openAttribution(b)&&Q(a):window.openAttribution&&(window.openAttribut
ion(b),Q(a))}else this.h.X&&(b=this.h.o.getAttribute("href"),window.adSlot?
window.adSlot.openSystemBrowser(b)&&Q(a):window.openSystemBrowser&&(window.openSyst
emBrowser(b),Q(a)))};function gc(a){var b=hc,c=this;if(!b)throw Error("bad
ctor");this.j=b;this.i=a;this.h=!1;db("goog_delegate_deferred")?void 0!
==R.goog_delegate_deferred_token?ic(this):(a=function()
{ic(c)},R.goog_delegate_deferred_token=a,setTimeout(a,5E3)):ic(this)}function ic(a)
{if(!a.h&&(a.h=!0,R.goog_delegate_deferred_token=void 0,a.i)){var
b=a.j;a=Wa(JSON.stringify(a.i));if(!a)throw Error("bad attrdata");a=new sb(a);new
b(a)}};function jc(){var a=this;this.promise=new Promise(function(b,c)
{a.resolve=b;a.reject=c})};function mc(){var a=new
jc;return{promise:a.promise,resolve:a.resolve}};/*

SPDX-License-Identifier: Apache-2.0
*/
function nc(a,b){b=void 0===b?function(){}:b;a.google_llp||
(a.google_llp={});a=a.google_llp;var c=a[5];if(c)return c;c=mc();a[5]=c;b();return
c}
function oc(a,b){return nc(a,function(){var c=a.document,d=ib("SCRIPT",c);d.src=b
instanceof bb&&b.constructor===bb?b.h:"type_error:TrustedResourceUrl";var
g,f,e=null==(f=(g=(d.ownerDocument&&d.ownerDocument.defaultView||
window).document).querySelector)?void 0:f.call(g,"script[nonce]");(g=e?e.nonce||
e.getAttribute("nonce")||"":"")&&d.setAttribute("nonce",g);
(c=c.getElementsByTagName("script")
[0])&&c.parentNode&&c.parentNode.insertBefore(d,c)}).promise};function pc(a)
{a=null===a?"null":void 0===a?"undefined":a;if(void 0===ab){var b=null;var
c=t.trustedTypes;if(c&&c.createPolicy){try{b=c.createPolicy("goog#html",
{createHTML:na,createScript:na,createScriptURL:na})}catch(d)
{t.console&&t.console.error(d.message)}ab=b}else ab=b}a=(b=ab)?
b.createScriptURL(a):a;return new bb(a,cb)};function hc(a){var
b=this;this.h=a;this.i=new $b(this.h,W(359,function(){return qc(b)}))}function
qc(a){a.h.F?a.h.F.expandAttributionCard():(Vb(373,function()
{fc(a.i);ec(a.i)}),oc(window,pc("https://pagead2.googlesyndication.com/pagead/js/"+
(I(H(a.h.h,33),"")+"/abg_survey.js"))).then(function(b)
{b.createAttributionCard(a.h);a.h.F=b;b.expandAttributionCard()}),ob())}
function rc(a){var b=[a];b=void 0===b?[]:b;t.google_logging_queue||
(t.google_logging_queue=[]);t.google_logging_queue.push([11,b]);new
gc(a)};lb=60;var sc=nb(60);if(null==sc)throw Error("JSC not found 60");for(var
tc={},uc=sc.attributes,vc=uc.length-1;0<=vc;vc--){var
wc=uc[vc].name;0===wc.indexOf("data-
jcp-")&&(tc[wc.substring(9)]=uc[vc].value)}if(tc["attribution-
data"])rc(JSON.parse(tc["attribution-data"]));else{var
X=["buildAttribution"],Y=t;X[0]in Y||"undefined"==typeof Y.execScript||
Y.execScript("var "+X[0]);for(var Z;X.length&&(Z=X.shift());)X.length||void 0===rc?
Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=rc};}).call(this);

You might also like