"use strict";this.default_IdentityRotateCookiesHttp=this.default_IdentityRotateCookiesHttp||{};(function(_){var window=this;
try{
/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var r=function(a){return m?p?p.brands.some(function(b){return(b=b.brand)&&-1!=b.indexOf(a)}):!1:!1},u=function(a){var b;a:{if(b=t.navigator)if(b=b.userAgent)break a;b=""}return-1!=b.indexOf(a)},w=function(){return m?!!p&&0
f;f++){var l=c.concat(g[f].split(""));fa[f]=l;for(var d=0;d>2];h=b[(h&3)<<4|k>>4];k=b[(k&15)<<2|e>>6];e=b[e&63];c[f++]=d+h+k+e}d=0;e=g;switch(a.length-l){case 2:d=a[l+1],e=b[(d&15)<<2]||g;case 1:a=a[l],c[f]=b[a>>2]+b[(a&3)<<4|d>>4]+e+g}a=c.join("")}return a}}return a},ia=function(a,b,c,g,f,l){if(null!=a){if(Array.isArray(a))a=f&&0==a.length&&A(a)&1?void 0:l&&A(a)&2?a:ha(a,b,c,void 0!==g,f,l);else if(D(a)){var d={},e;for(e in a)d[e]=
ia(a[e],b,c,g,f,l);a=d}else a=b(a,g);return a}},ha=function(a,b,c,g,f,l){var d=g||c?A(a):0;g=g?!!(d&16):void 0;a=Array.prototype.slice.call(a);for(var e=0;e=f){Object.assign(b[b.length-1]={},l);break}}f=b;c=!c;l=a.g;var e;
for(d=0;d=a.g){var g=a.g+a.h;(a.i||(a.i=a.l[g]={}))[b]=c}else a.l[b+a.h]=c,(c=a.i)&&b in c&&delete c[b];return a},za=function(a){a=1>=a.g?a.i?a.i[1]:void 0:a.l[1+a.h];return null==a?0:a};var Q;var R=function(a,b,c){null==a&&(a=Q);Q=void 0;if(null==a)a=c?[c]:[],B(a,48);else{if(!Array.isArray(a))throw Error();if(c&&c!==a[0])throw Error();z(a,32)}this.h=c?0:-1;this.l=a;a:{c=this.l.length;a=c-1;if(c&&(c=this.l[a],D(c))){this.i=c;this.g=a-this.h;break a}b?(this.g=Math.max(b,a+1-this.h),this.i=void 0):this.g=Number.MAX_VALUE}};R.prototype.toJSON=function(){if(O)var a=G(this,this.l,!1);else a=ha(this.l,ka,void 0,void 0,!1,!1),a=G(this,a,!0);return a};
var Aa=function(a){O=!0;try{return JSON.stringify(a.toJSON(),ca)}finally{O=!1}};R.prototype.G=ja;R.prototype.toString=function(){return G(this,this.l,!1).toString()};var Ba=function(a){R.call(this,a)};ta(Ba,R);var Ca=function(a){R.call(this,a,0,"identity.hfcr")};ta(Ca,R);var Da=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);z(b,16);Q=b;b=new a(b);Q=void 0}return b}}(Ca);var Ea=function(a,b,c,g,f,l){this.s=a;this.i=b;this.m=c;this.h=g;this.g=f;this.j=l};Ea.prototype.start=function(){var a=this;if("undefined"!==typeof fetch)if(Fa()){var b=S(),c=Date.now();b&&b>c+1E3*this.g&&(b=Date.now()+1E3*this.g,W(b));var g=function(){Ga(a).then(function(){a.j||setTimeout(g,1E3*a.g)})};setTimeout(function(){g()},b&&b>c?b-c:0)}else Ha(this)};
var Ha=function(a){var b=Ia(a);a.j||b.then(function(){var c=function(){Ia(a).then(function(){setTimeout(c,1E3*a.g)})};setTimeout(function(){c()},1E3*a.g)})},Ia=function(a){var b=Ja(a);return Ka(b).then(function(c){c=La(za(c));c!==a.g&&(a.g=c)}).catch(function(){a.g*=2})},Ga=function(a){var b=S();if(!b||Date.now()>=b){var c=Math.floor(1E3*Math.random());return new Promise(function(g){setTimeout(function(){var f=S();!f||Date.now()>=f?g(Ma(a)):g()},c)})}return Promise.resolve()},Ka=function(a){a={method:"POST",
credentials:"same-origin",cache:"no-store",mode:"same-origin",headers:{"Content-Type":"application/json"},body:Aa(a)};if("undefined"!==typeof AbortController){var b=new AbortController;setTimeout(function(){b.abort()},3E4);a.signal=b.signal}return fetch(new Request("/RotateCookies",a)).then(function(c){return c.text()}).then(function(c){return Da(JSON.stringify(JSON.parse(c.substring(5))[0]))})},Ja=function(a){var b=new Ba;b=P(b,2,a.s);0!==a.i&&P(b,1,a.i);0!==a.m&&P(b,3,a.m);0!==a.h&&P(b,4,a.h);return b},
Ma=function(a){W(Date.now()+1E3*a.g);var b=Ja(a);return Ka(b).then(function(c){c=La(za(c));c!==a.g&&(W(Date.now()+1E3*c),a.g=c)}).catch(function(){a.g*=2;W(Date.now()+1E3*a.g)})},Fa=function(){try{var a=window.localStorage;if(!a)return!1;a.setItem("cookieRotationStorageAccessTest","1");a.removeItem("cookieRotationStorageAccessTest");return!0}catch(b){return!1}},La=function(a){60>a&&(a=60);return a},S=function(){try{var a=window.localStorage.getItem("nextRotationAttemptTs");if(!a)return null;var b=
Math.floor(Number(a));return Number.isNaN(b)?null:b}catch(c){return null}},W=function(a){try{window.localStorage.setItem("nextRotationAttemptTs",a.toString())}catch(b){}};var Na=function(a,b,c,g,f,l){(new Ea(a,b,c,g,f,l)).start()},X=["init"],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===Na?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=Na;
}catch(e){_._DumpException(e)}
}).call(this,this.default_IdentityRotateCookiesHttp);
// Google Inc.