(function(){function e(e,t){try{const r=window.webkit;delete window["webkit"];window.webkit.messageHandlers[e].postMessage(t);window.webkit=r}catch(e){}}function t(){const e=new Uint32Array(4);window.crypto.getRandomValues(e);return e.reduce(((e="",t)=>e+t.toString(16).padStart(8,"0")),"")}function r(t,r,i){try{return r.apply(null,i)}catch(r){let i="";let n="";if(r&&r instanceof Error){i=r.message;if(r.stack){n=r.stack}if(n.length>0){n+="\n"}n+=t}e("WindowErrorResultHandler",{message:i,stack:n})}return undefined}class i{registeredApis={};frameId=t();registerApi(e,t){if(this.registeredApis[e]!==undefined){throw new Error(`API ${e} already registered.`)}this.registeredApis[e]=t}getRegisteredApi(e){return this.registeredApis[e]}getFrameId(){if(!this.frameId){this.frameId=t()}return this.frameId}registerFrame(){e("FrameBecameAvailable",{crwFrameId:this.getFrameId()})}}if(!window.__gCrWeb){window.__gCrWeb=new i}const n=window.__gCrWeb;for(const e in n){const t=n[e];for(const i in t){const s=t[i];if(typeof s==="function"){const t="__gCrWeb."+e+"."+i;n[e][i]=function(...e){return r.apply(null,[t,s,e])}}}}})();