(function(){function e(e,r){try{const t=window.webkit;delete window["webkit"];window.webkit.messageHandlers[e].postMessage(r);window.webkit=t}catch(e){}}function r(){const e=new Uint32Array(4);window.crypto.getRandomValues(e);return e.reduce(((e="",r)=>e+r.toString(16).padStart(8,"0")),"")}class t{registeredApis={};frameId=r();registerApi(e,r){if(this.registeredApis[e]!==undefined){throw new Error(`API ${e} already registered.`)}this.registeredApis[e]=r}getRegisteredApi(e){return this.registeredApis[e]}getFrameId(){if(!this.frameId){this.frameId=r()}return this.frameId}registerFrame(){e("FrameBecameAvailable",{crwFrameId:this.getFrameId()})}}if(!window.__gCrWeb){window.__gCrWeb=new t}const i=window.__gCrWeb;const s=window.__gCrWeb;function n(){s.registerFrame();const e=window.frames.length;for(let r=0;r<e;r++){const e=window.frames[r];if(!e){continue}e.postMessage({type:"org.chromium.registerForFrameMessaging"},"*")}}i.message={getExistingFrames:n}})();