@googleworkspace/meet-addons 0.8.0-649719088 → 0.8.0-650782503
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +16 -0
- package/meet.addons.js +66 -66
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -316,6 +316,14 @@ export type FrameOpenReason =
|
|
|
316
316
|
| 'START_COLLABORATION'
|
|
317
317
|
| 'JOIN_COLLABORATION';
|
|
318
318
|
|
|
319
|
+
/**
|
|
320
|
+
* The different reasons why the collaboration was ended:
|
|
321
|
+
*
|
|
322
|
+
* - `END_REASON_UNSPECIFIED`: The reason for ending the collaboration is
|
|
323
|
+
* unspecified.
|
|
324
|
+
*/
|
|
325
|
+
export type EndCollaborationReason = 'END_REASON_UNSPECIFIED';
|
|
326
|
+
|
|
319
327
|
/**
|
|
320
328
|
* A client-initiated message sent from one add-on frame to another.
|
|
321
329
|
*/
|
|
@@ -448,6 +456,14 @@ export interface MeetAddonClient {
|
|
|
448
456
|
collaborationStartingState?: CollaborationStartingState,
|
|
449
457
|
): Promise<void>;
|
|
450
458
|
|
|
459
|
+
/**
|
|
460
|
+
* Ends an ongoing collaboration.
|
|
461
|
+
* Will fail if:
|
|
462
|
+
* - There is not an ongoing coActivity.
|
|
463
|
+
* - The user is not the initiator of the collaboration.
|
|
464
|
+
*/
|
|
465
|
+
endCollaboration(): Promise<void>;
|
|
466
|
+
|
|
451
467
|
/**
|
|
452
468
|
* Close the add-on that is running in the Meet iframe.
|
|
453
469
|
*/
|
package/meet.addons.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){var
|
|
1
|
+
(function(){var k,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},ba=function(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");},ca=ba(this),da=function(a,b){if(b)a:{var c=ca;a=a.split(".");for(var d=0;d<
|
|
2
2
|
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})}};da("Symbol.dispose",function(a){return a?a:Symbol("Symbol.dispose")});/*
|
|
3
3
|
|
|
4
4
|
Copyright The Closure Library Authors.
|
|
@@ -6,7 +6,7 @@ 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=
|
|
|
6
6
|
*/
|
|
7
7
|
var m=this||self,ea=function(a,b){a:{var c=["CLOSURE_FLAGS"];for(var d=m,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},fa=function(a){var b=typeof a;return b=="object"&&a!=null||b=="function"},ha="closure_uid_"+(Math.random()*1E9>>>0),ia=0,ja=function(a,b,c){return a.call.apply(a.bind,arguments)},ka=function(a,b,c){if(!a)throw Error();if(arguments.length>2){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);
|
|
8
8
|
Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}},la=function(a,b,c){la=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?ja:ka;return la.apply(null,arguments)},ma=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}},na=function(a,b){function c(){}c.prototype=b.prototype;a.T=b.prototype;a.prototype=new c;a.prototype.constructor=
|
|
9
|
-
a;a.Xb=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 oa(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,oa);else{const c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}na(oa,Error);oa.prototype.name="CustomError";function pa(a){m.setTimeout(()=>{throw a;},0)};const qa=ea(1,!0);var ra=ea(610401301,!1),sa=ea(188588736,qa),ta=ea(645172343,qa);function ua(){var a=m.navigator;return a&&(a=a.userAgent)?a:""}var va;const wa=m.navigator;va=wa?wa.userAgentData||null:null;function xa(a){return ra?va?va.brands.some(({brand:b})=>b&&b.indexOf(a)!=-1):!1:!1}function p(a){return ua().indexOf(a)!=-1};function q(){return ra?!!va&&va.brands.length>0:!1}function ya(){return q()?xa("Chromium"):(p("Chrome")||p("CriOS"))&&!(q()?0:p("Edge"))||p("Silk")};function za(a,b){b=Array.prototype.indexOf.call(a,b,void 0);let c;(c=b>=0)&&Array.prototype.splice.call(a,b,1);return c};var Aa=function(a){Aa[" "](a);return a};Aa[" "]=function(){};var Ba=p("Gecko")&&!(ua().toLowerCase().indexOf("webkit")!=-1&&!p("Edge"))&&!(p("Trident")||p("MSIE"))&&!p("Edge"),Ca=ua().toLowerCase().indexOf("webkit")!=-1&&!p("Edge");!p("Android")||ya();ya();var Da=p("Safari")&&!(ya()||(q()?0:p("Coast"))||(q()?0:p("Opera"))||(q()?0:p("Edge"))||(q()?xa("Microsoft Edge"):p("Edg/"))||(q()?xa("Opera"):p("OPR"))||p("Firefox")||p("FxiOS")||p("Silk")||p("Android"))&&!(p("iPhone")&&!p("iPod")&&!p("iPad")||p("iPad")||p("iPod"));var Ea=null,Fa=Ba||Ca||!Da&&typeof m.atob=="function",Ha=function(a){if(Fa)return m.atob(a);var b="";Ga(a,function(c){b+=String.fromCharCode(c)});return b},Ga=function(a,b){function c(
|
|
9
|
+
a;a.Xb=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 oa(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,oa);else{const c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}na(oa,Error);oa.prototype.name="CustomError";function pa(a){m.setTimeout(()=>{throw a;},0)};const qa=ea(1,!0);var ra=ea(610401301,!1),sa=ea(188588736,qa),ta=ea(645172343,qa);function ua(){var a=m.navigator;return a&&(a=a.userAgent)?a:""}var va;const wa=m.navigator;va=wa?wa.userAgentData||null:null;function xa(a){return ra?va?va.brands.some(({brand:b})=>b&&b.indexOf(a)!=-1):!1:!1}function p(a){return ua().indexOf(a)!=-1};function q(){return ra?!!va&&va.brands.length>0:!1}function ya(){return q()?xa("Chromium"):(p("Chrome")||p("CriOS"))&&!(q()?0:p("Edge"))||p("Silk")};function za(a,b){b=Array.prototype.indexOf.call(a,b,void 0);let c;(c=b>=0)&&Array.prototype.splice.call(a,b,1);return c};var Aa=function(a){Aa[" "](a);return a};Aa[" "]=function(){};var Ba=p("Gecko")&&!(ua().toLowerCase().indexOf("webkit")!=-1&&!p("Edge"))&&!(p("Trident")||p("MSIE"))&&!p("Edge"),Ca=ua().toLowerCase().indexOf("webkit")!=-1&&!p("Edge");!p("Android")||ya();ya();var Da=p("Safari")&&!(ya()||(q()?0:p("Coast"))||(q()?0:p("Opera"))||(q()?0:p("Edge"))||(q()?xa("Microsoft Edge"):p("Edg/"))||(q()?xa("Opera"):p("OPR"))||p("Firefox")||p("FxiOS")||p("Silk")||p("Android"))&&!(p("iPhone")&&!p("iPod")&&!p("iPad")||p("iPad")||p("iPod"));var Ea=null,Fa=Ba||Ca||!Da&&typeof m.atob=="function",Ha=function(a){if(Fa)return m.atob(a);var b="";Ga(a,function(c){b+=String.fromCharCode(c)});return b},Ga=function(a,b){function c(l){for(;d<a.length;){var n=a.charAt(d++),u=Ea[n];if(u!=null)return u;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n);}return l}Ia();for(var d=0;;){var 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))}},Ia=function(){if(!Ea){Ea=
|
|
10
10
|
{};for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),b=["+/=","+/","-_=","-_.","-_"],c=0;c<5;c++)for(var d=a.concat(b[c].split("")),e=0;e<d.length;e++){var f=d[e];Ea[f]===void 0&&(Ea[f]=e)}}};function Ja(a){let b="",c=0;const d=a.length-10240;for(;c<d;)b+=String.fromCharCode.apply(null,a.subarray(c,c+=10240));b+=String.fromCharCode.apply(null,c?a.subarray(c):a);return btoa(b)}const Ka=/[-_.]/g,La={"-":"+",_:"/",".":"="};function Ma(a){return La[a]||""}function Na(a){return a!=null&&a instanceof Uint8Array}var Oa={};let Pa;function Qa(a){if(a!==Oa)throw Error("illegal external caller");}var Sa=function(){return Pa||(Pa=new Ra(null,Oa))},Ra=class{constructor(a,b){Qa(b);this.ua=a;if(a!=null&&a.length===0)throw Error("ByteString should be constructed with non-empty values");}};function Ta(){return typeof BigInt==="function"};let r=0,t=0;function Ua(a){const b=a>>>0;r=b;t=(a-b)/4294967296>>>0}function Va(a){if(a<0){Ua(0-a);const [b,c]=Wa(r,t);r=b>>>0;t=c>>>0}else Ua(a)}function Xa(a,b){b>>>=0;a>>>=0;if(b<=2097151)var c=""+(4294967296*b+a);else Ta()?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+Ya(c)+Ya(a));return c}
|
|
11
11
|
function Ya(a){a=String(a);return"0000000".slice(a.length)+a}function Za(){var a=r,b=t;if(b&2147483648)if(Ta())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{const [c,d]=Wa(a,b);a="-"+Xa(c,d)}else a=Xa(a,b);return a}function Wa(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};function $a(a){return Array.prototype.slice.call(a)};var v=Symbol(),ab=Symbol(),bb=Symbol();function cb(a,b){b[v]=(a|0)&-14591}function db(a,b){b[v]=(a|34)&-14557};var eb={},fb={};function gb(a){return!(!a||typeof a!=="object"||a.dc!==fb)}function hb(a){return a!==null&&typeof a==="object"&&!Array.isArray(a)&&a.constructor===Object}function ib(a,b,c){if(a!=null)if(typeof a==="string")a=a?new Ra(a,Oa):Sa();else if(a.constructor!==Ra)if(Na(a))a=a.length?new Ra(c?a:new Uint8Array(a),Oa):Sa();else{if(!b)throw Error();a=void 0}return a}
|
|
12
12
|
function jb(a,b,c){if(!Array.isArray(a)||a.length)return!1;const d=a[v]|0;if(d&1)return!0;if(!(b&&(Array.isArray(b)?b.includes(c):b.has(c))))return!1;a[v]=d|1;return!0}var kb;const lb=[];lb[v]=55;kb=Object.freeze(lb);function mb(a){if(a&2)throw Error();}var nb=Object.freeze({});Object.freeze({});var ob=Object.freeze({});var pb=function(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let qb;function rb(){const a=Error();pb(a,"incident");pa(a)}function sb(a){a=Error(a);pb(a,"warning");return a};function tb(a){if(a==null||typeof a==="boolean")return a;if(typeof a==="number")return!!a}const ub=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function vb(a){const b=typeof a;return b==="number"?Number.isFinite(a):b!=="string"?!1:ub.test(a)}function wb(a){return a[0]==="-"?a.length<20?!0:a.length===20&&Number(a.substring(0,7))>-922337:a.length<19?!0:a.length===19&&Number(a.substring(0,6))<922337}
|
|
@@ -18,70 +18,70 @@ function w(a,b,c,d,e){const f=b>>14&1023||536870912;if(c>=f||e&&!ta){let g=b;if(
|
|
|
18
18
|
function $b(a,b,c,d){const e=a.h;let f=e[v];mb(f);w(e,f,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}var cc=function(a,b,c,d){const e=a.h;var f=e[v];mb(f);if(d==null){var g=ac(e);if(bc(g,e,f,c)===b)g.set(c,0);else return a}else{g=ac(e);const h=bc(g,e,f,c);h!==b&&(h&&(f=w(e,f,h)),g.set(c,b))}w(e,f,b,d);return a},y=function(a,b){a=a.h;return bc(ac(a),a,a[v],b)};function ac(a){let b;return(b=a[bb])!=null?b:a[bb]=new Map}
|
|
19
19
|
function bc(a,b,c,d){let e=a.get(d);if(e!=null)return e;e=0;for(let f=0;f<d.length;f++){const g=d[f];Ub(b,c,g)!=null&&(e!==0&&(c=w(b,c,e)),e=g)}a.set(d,e);return e}function Yb(a,b,c,d){a=a.h;let e=a[v];const f=Ub(a,e,c,d);b=Ab(f,b,e);b!==f&&b!=null&&w(a,e,c,b,d);return b}
|
|
20
20
|
var A=function(a,b,c){b=Yb(a,b,c,!1);if(b==null)return b;a=a.h;let d=a[v];if(!(d&2)){const e=Tb(b);e!==b&&(b=e,w(a,d,c,b,!1))}return b},C=function(a,b,c){c==null&&(c=void 0);return Xb(a,b,c)},D=function(a,b,c,d){d==null&&(d=void 0);return cc(a,b,c,d)};function dc(a,b){a=(2&b?a|2:a&-3)|32;return a&=-2049}function ec(a,b,c){32&b&&c||(a&=-33);return a}function fc(a,b){return a!=null?a:b}
|
|
21
|
-
var gc=function(a){a=Vb(a,1);a=a==null?a:vb(a)?typeof a==="number"?xb(a):yb(a):void 0;return fc(a,0)},E=function(a,b){a=Vb(a,b);return fc(a==null||typeof a==="string"?a:void 0,"")},
|
|
22
|
-
Za()))):b=xb(b)}return $b(a,1,b,"0")},
|
|
21
|
+
var gc=function(a){a=Vb(a,1);a=a==null?a:vb(a)?typeof a==="number"?xb(a):yb(a):void 0;return fc(a,0)},E=function(a,b){a=Vb(a,b);return fc(a==null||typeof a==="string"?a:void 0,"")},F=function(a,b){a=Vb(a,b);a=a==null?a:Number.isFinite(a)?a|0:void 0;return fc(a,0)},G=function(a,b,c,d){c=y(a,d)===c?c:-1;return A(a,b,c)},hc=function(a,b){if(b!=null){var c=!!c;if(!vb(b))throw sb("int64");typeof b==="string"?b=yb(b):c?(b=Math.trunc(b),Number.isSafeInteger(b)?b=String(b):(c=String(b),wb(c)?b=c:(Va(b),b=
|
|
22
|
+
Za()))):b=xb(b)}return $b(a,1,b,"0")},H=function(a,b,c){return $b(a,b,zb(c),"")},J=function(a,b,c){if(c!=null){if(!Number.isFinite(c))throw sb("enum");c|=0}return $b(a,b,c,0)};let ic;
|
|
23
23
|
var kc=function(a){try{return ic=!0,JSON.stringify(jc(a),Jb)}finally{ic=!1}},K=class{constructor(a){a:{a==null&&(a=Bb);Bb=void 0;if(a==null){var b=96;a=[]}else{if(!Array.isArray(a))throw Error("narr");b=a[v]|0;if(b&2048)throw Error("farr");if(b&64)break a;var c=a;b|=64;var d=c.length;if(d&&(--d,hb(c[d]))){b|=256;c=d-(+!!(b&512)-1);if(c>=1024)throw Error("pvtlmt");b=b&-16760833|(c&1023)<<14}}a[v]=b}this.h=a}toJSON(){return jc(this)}getExtension(a){const b=a.M?a.Fb?a.Y(this,a.M,a.O,void 0===nb?2:4,
|
|
24
24
|
!0):a.Y(this,a.M,a.O,!0):a.Fb?a.Y(this,a.O,void 0===nb?2:4,!0):a.Y(this,a.O,a.defaultValue,!0);return a.cc&&b==null?a.defaultValue:b}hasExtension(a){a.M?a=Yb(this,a.M,a.O,!0)!==void 0:(a=a.M?a.Y(this,a.M,a.O,!0):a.Y(this,a.O,null,!0),a=(a===null?void 0:a)!==void 0);return a}clone(){const a=this.h;return Cb(this.constructor,Sb(a,a[v],!1))}};K.prototype.Na=eb;K.prototype.toString=function(){try{return ic=!0,jc(this).toString()}finally{ic=!1}};
|
|
25
|
-
function jc(a){var b=ic?a.h:Pb(a.h,Qb,void 0,void 0,!1);var c=!ic;var d=sa?void 0:a.constructor.Rb;var e=(c?a.h:b)[v];if(a=b.length){var f=b[a-1],g=hb(f);g?a--:f=void 0;e=+!!(e&512)-1;var h=b;if(g){b:{var
|
|
26
|
-
jb(u,d,x)||gb(u)&&u.size===0))break;
|
|
27
|
-
4&&32&g))){Zb(g)&&(c=$a(c),g=dc(g,a),a=w(b,a,1,c));d=c;e=g;for(g=0;g<d.length;g++)
|
|
28
|
-
x,1);else{var c=a,d;a=((d=Ib)==null?void 0:d.get(c))||c;c=d=a[v]|0;var e=!!(2&d)||!!(2048&d),f=e||Object.isFrozen(a),g;if(g=!f)g=void 0===ob||!1;var h=!0,
|
|
29
|
-
case 11:c=this.Ka.userInitiatedCollaboration;b=
|
|
30
|
-
c.getFrameType()===2);a=a==null?void 0:qc(a).find(c=>c.getFrameType()===1);return{mainStageUrl:(b==null?void 0:E(b,2))||void 0,sidePanelUrl:(a==null?void 0:E(a,2))||void 0,additionalData:(a==null?void 0:E(a,3))||void 0}}async setCollaborationStartingState(a){a=
|
|
31
|
-
1)),!1)}}async getCurrentMeetingRecordingStatus(){var a=await
|
|
32
|
-
|
|
33
|
-
message:"This method is not supported in standalone mode.",g:"Do not call this method in standalone mode."},
|
|
34
|
-
g:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not modify URL parameters (e.g. as part of a redirect) and ensure that the correct Cloud Project Number was passed into the SDK as a string."},
|
|
35
|
-
message:"Origin of the CollaborationStartingState iframeURLs does not match the origin of the URLs provided in the Add-on manifest.",g:"Ensure that the CollaborationStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest."},
|
|
36
|
-
g:"Ensure that no collaboration is ongoing."},
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
function
|
|
40
|
-
g:"No further information is available."};case 4:return{errorType:"InternalError",message:`Could not connect to ${a} channel. The addon is not authorized for this ${a}.`,g:"No further information is available."};case 0:return
|
|
41
|
-
{errorType:"InternalError",message:`Could not connect to ${a} channel.`,g:"No further information is available."}}return c;default:return
|
|
42
|
-
function
|
|
43
|
-
e,!1);this.port1={};this.port2={postMessage:function(){f.postMessage(g,h)}}});if(typeof a!=="undefined"){var b=new a,c={},d=c;b.port1.onmessage=function(){if(c.next!==void 0){c=c.next;var e=c.Xa;c.Xa=null;e()}};return function(e){d.next={Xa:e};d=d.next;b.port2.postMessage(0)}}return function(e){m.setTimeout(e,0)}};class
|
|
44
|
-
var
|
|
45
|
-
Q.prototype.cancel=function(a){if(this.o==0){var b=new R(a);
|
|
46
|
-
var
|
|
47
|
-
h);
|
|
48
|
-
var
|
|
49
|
-
(f=!0,c.call(e,
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
{a.m.delete(b);const f=
|
|
53
|
-
this.Wa&&this.gb)c.resolve(this.Gb);else if(this.S.add(c),
|
|
54
|
-
async function
|
|
25
|
+
function jc(a){var b=ic?a.h:Pb(a.h,Qb,void 0,void 0,!1);var c=!ic;var d=sa?void 0:a.constructor.Rb;var e=(c?a.h:b)[v];if(a=b.length){var f=b[a-1],g=hb(f);g?a--:f=void 0;e=+!!(e&512)-1;var h=b;if(g){b:{var l=f;var n={};g=!1;if(l)for(var u in l){if(isNaN(+u)){n[u]=l[u];continue}let B=l[u];Array.isArray(B)&&(jb(B,d,+u)||gb(B)&&B.size===0)&&(B=null);B==null&&(g=!0);B!=null&&(n[u]=B)}if(g){for(var x in n)break b;n=null}else n=l}l=n==null?f!=null:n!==f}for(var I;a>0;a--){x=a-1;u=h[x];x-=e;if(!(u==null||
|
|
26
|
+
jb(u,d,x)||gb(u)&&u.size===0))break;I=!0}if(h!==b||l||I){if(!c)h=Array.prototype.slice.call(h,0,a);else if(I||l||n)h.length=a;n&&h.push(n)}b=h}return b};function lc(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[v]|=32;b=Cb(a,b)}return b}};var mc=function(a){return b=>{b=JSON.parse(b);if(!Array.isArray(b)){var c=typeof b;throw Error("Expected jspb data to be an array, got "+(c!="object"?c:b?Array.isArray(b)?"array":c:"null")+": "+b);}b[v]|=34;return new a(b)}}(class extends K{});var nc=class extends K{getSeconds(){return gc(this)}setSeconds(a){return hc(this,a)}};var pc=function(a){var b=new oc;return J(b,1,a)},oc=class extends K{getFrameType(){return F(this,1)}};var qc=function(a){var b=a.h,c=b[v];a=c;var d=!(2&c),e=oc;const f=(c=!!(2&a))?1:2;d&&(d=!c);c=Ub(b,a,1);c=Array.isArray(c)?c:kb;var g=c[v]|0,h=!!(4&g);if(!h){var l=g;l===0&&(l=dc(l,a));g=c;l|=1;var n=a;const u=!!(2&l);u&&(n|=2);let x=!u,I=!0,B=0,Nb=0;for(;B<g.length;B++){const Ob=Ab(g[B],e,n);if(Ob instanceof e){if(!u){const dd=!!((Ob.h[v]|0)&2);x&&(x=!dd);I&&(I=dd)}g[Nb++]=Ob}}Nb<B&&(g.length=Nb);l|=4;l=I?l|16:l&-17;l=x?l|8:l&-9;g[v]=l;u&&Object.freeze(g);g=l}if(d&&!(8&g||!c.length&&(f===1||f===
|
|
27
|
+
4&&32&g))){Zb(g)&&(c=$a(c),g=dc(g,a),a=w(b,a,1,c));d=c;e=g;for(g=0;g<d.length;g++)l=d[g],n=Tb(l),l!==n&&(d[g]=n);e|=8;e=d.length?e&-17:e|16;g=d[v]=e}f===1||f===4&&32&g?Zb(g)||(a=g,b=!!(32&g),g|=!c.length||16&g&&(!h||b)?2:2048,g!==a&&(c[v]=g),Object.freeze(c)):(h=f!==5?!1:!!(32&g)||Zb(g)||!!Db(c),(f===2||h)&&Zb(g)&&(c=$a(c),g=dc(g,a),g=ec(g,a,!1),c[v]=g,a=w(b,a,1,c)),Zb(g)||(b=g,g=ec(g,a,!1),g!==b&&(c[v]=g)),h&&(c=Gb(c)));return c},sc=function(a){{var b=new rc;const u=b.h;let x=u[v];mb(x);if(a==null)w(u,
|
|
28
|
+
x,1);else{var c=a,d;a=((d=Ib)==null?void 0:d.get(c))||c;c=d=a[v]|0;var e=!!(2&d)||!!(2048&d),f=e||Object.isFrozen(a),g;if(g=!f)g=void 0===ob||!1;var h=!0,l=!0;for(let I=0;I<a.length;I++){var n=a[I];e||(n=!!((n.h[v]|0)&2),h&&(h=!n),l&&(l=n))}e||(d|=5,d=h?d|8:d&-9,d=l?d|16:d&-17);if(g||f&&d!==c)a=$a(a),c=0,d=dc(d,x),d=ec(d,x,!0);d!==c&&(a[v]=d);w(u,x,1,a)}}return b},rc=class extends K{};rc.Rb=[1];var tc=class extends K{constructor(){super()}};var vc=function(a){var b=new uc;return J(b,1,a)},uc=class extends K{constructor(){super()}};var wc=class extends K{};var yc=class extends K{ab(){return y(this,xc)}},xc=[2,3];var zc=class extends K{};var Ac=class extends K{ob(a){return H(this,2,a)}};var Bc=class extends K{};var Cc=class extends K{};var Dc=class extends K{H(){return y(this,L)}getCollaborationStartingState(){return G(this,rc,2,L)}setCollaborationStartingState(a){return D(this,2,L,a)}clearCollaborationStartingState(){return cc(this,2,L)}getMeetingInfo(){return G(this,Cc,3,L)}getMeetPlatformInfo(){return G(this,Bc,4,L)}},L=[2,3,4,5];var Ec=class extends K{};var Fc=class extends K{},Gc=[3];var Ic=class extends K{bb(){return y(this,Hc)}},Hc=[1,4,5,6,7,8,9,10,11,12,13,14,15,16];var Jc=class extends K{constructor(){super()}getCollaborationStartingState(){return A(this,rc,1)}setCollaborationStartingState(a){return C(this,1,a)}clearCollaborationStartingState(){return Xb(this,1)}};var Kc=class extends K{constructor(){super()}getCollaborationStartingState(){return A(this,rc,1)}setCollaborationStartingState(a){return C(this,1,a)}clearCollaborationStartingState(){return Xb(this,1)}};var Lc=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),Mc=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_COLLABORATION"],[3,"JOIN_COLLABORATION"]]),Nc=new Map([[0,"RECORDING_STATUS_UNKNOWN"],[1,"RECORDING_STARTING"],[2,"RECORDING_IN_PROGRESS"],[3,"NOT_RECORDING"]]);function Oc(a){a&&typeof a.dispose=="function"&&a.dispose()};var M=function(){this.v=this.v;this.I=this.I};M.prototype.v=!1;M.prototype.dispose=function(){this.v||(this.v=!0,this.G())};M.prototype[Symbol.dispose]=function(){this.dispose()};var Pc=function(a,b){a.v?b():(a.I||(a.I=[]),a.I.push(b))};M.prototype.G=function(){if(this.I)for(;this.I.length;)this.I.shift()()};var Qc=function(a){const b=[];var c=b.push;var d=pc(2);d=H(d,2,a.mainStageUrl);d=H(d,3,a.additionalData);c.call(b,d);c=b.push;d=pc(1);d=H(d,2,a.sidePanelUrl);a=H(d,3,a.additionalData);c.call(b,a);return b},Zc=class extends M{constructor(a){super();this.context=a;this.Ka={};Rc(this.context.i.Nb,b=>{switch(b.content.bb()){case 7:var c=this.Ka.frameToFrameMessage;b=G(b.content,Ac,7,Hc);if(c&&b){var d=F(b,1);d=Lc.get(d);if(d===void 0)throw Error("Unknown frame type.");c({originator:d,payload:E(b,2)})}break;
|
|
29
|
+
case 11:c=this.Ka.userInitiatedCollaboration;b=G(b.content,Fc,11,Hc);c&&(b==null?0:z(b,Ec,3,Gc))&&c();break;case 16:Sc(this.context.i)}})}async getMeetingInfo(){const a=await Tc(this.context.i,vc(2));return{meetingId:E(a.getMeetingInfo(),1)}}async getFrameOpenReason(){let a;const b=(a=this.context.xa.Bb)!=null?a:0;let c;return(c=Mc.get(b))!=null?c:"UNKNOWN"}async getCollaborationStartingState(){var a=(await Tc(this.context.i,vc(1))).getCollaborationStartingState();const b=a==null?void 0:qc(a).find(c=>
|
|
30
|
+
c.getFrameType()===2);a=a==null?void 0:qc(a).find(c=>c.getFrameType()===1);return{mainStageUrl:(b==null?void 0:E(b,2))||void 0,sidePanelUrl:(a==null?void 0:E(a,2))||void 0,additionalData:(a==null?void 0:E(a,3))||void 0}}async setCollaborationStartingState(a){a=Qc(a);await Uc(this.context.i,(new Jc).setCollaborationStartingState(sc(a)))}async clearCollaborationStartingState(){await Vc(this.context.i)}on(a,b){this.Ka[a]=b}async getMeetPlatformInfo(){const a=await Tc(this.context.i,vc(3));return{isMeetHardware:fc(tb(Vb(a.getMeetPlatformInfo(),
|
|
31
|
+
1)),!1)}}async getCurrentMeetingRecordingStatus(){var a=await Tc(this.context.i,vc(4));let b;a=(b=F(a,y(a,L)===5?5:-1))!=null?b:0;let c;return(c=Nc.get(a))!=null?c:"RECORDING_STATUS_UNKNOWN"}async closeAddon(){await Wc(this.context.i)}async startCollaboration(a){const b=new Kc;a&&(a=Qc(a),b.setCollaborationStartingState(sc(a)));await Xc(this.context.i,b)}async endCollaboration(a){var b=Yc,c=this.context.i,d=new tc;a=J(d,1,a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0);await b(c,a)}};var $c=lc(class extends K{getFrameOpenReason(){return F(this,5)}});var N=class extends Error{constructor({errorType:a,message:b,g:c}){super(`Meet Add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},ad={errorType:"InternalError",message:"An unexpected error has occurred.",g:"No further information is available."},bd={errorType:"InternalError",message:"An unexpected error has occurred.",g:"No further information is available."},cd={errorType:"MissingUrlParameter",message:"Missing required Meet SDK URL parameter",g:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not strip URL parameters (e.g. as part of a redirect)."},
|
|
32
|
+
ed={errorType:"NeedsMainStageContext",message:"This method can only be invoked if the addon is running in the main stage.",g:"Use getFrameType to check whether the addon is running in the main stage before invoking this method."},fd={errorType:"NeedsSidePanelContext",message:"This method can only be invoked if the addon is running in the side panel.",g:"Use getFrameType to check whether the addon is running in the side panel before invoking this method."},gd={errorType:"NotSupportedInStandalone",
|
|
33
|
+
message:"This method is not supported in standalone mode.",g:"Do not call this method in standalone mode."},hd={errorType:"InternalError",message:"The frame type URL parameter is set to an unexpected value.",g:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not modify URL parameters (e.g. as part of a redirect)."},id={errorType:"InvalidCloudProjectNumber",message:"Cloud Project Number provided by meet does not match the one passed in by the SDK. Ensure that the correct Cloud Project Number is passed to the SDK as a string.",
|
|
34
|
+
g:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not modify URL parameters (e.g. as part of a redirect) and ensure that the correct Cloud Project Number was passed into the SDK as a string."},jd={errorType:"DestinationNotReady",message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",g:"Make sure the destination frame has connected before sending messages to it."},kd={errorType:"InvalidCollaborationStartingState",
|
|
35
|
+
message:"Origin of the CollaborationStartingState iframeURLs does not match the origin of the URLs provided in the Add-on manifest.",g:"Ensure that the CollaborationStartingState iframeURL origins match the origins of the URLs provided in the Add-on manifest."},ld=a=>({errorType:"InternalError",message:`Could not connect to ${a} channel. Unknown error`,g:"No further information is available."}),md={errorType:"CoactivityIsOngoing",message:"Operation cannot be performed while a collaboration is ongoing.",
|
|
36
|
+
g:"Ensure that no collaboration is ongoing."},nd={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",g:"Send one of the available commands in the frame message."},od={errorType:"RequiresEapEnrollment",message:"Requested method requires EAP enrollment",g:"No further information is available."},pd={errorType:"UserNotInitiator",message:"Operation cannot be performed because the user is not the initiator of the current collaboration.",g:"Ensure that the user is the initiator of the current collaboration or that the collaboration has ended."},
|
|
37
|
+
qd={errorType:"SizeLimitExceededCollaborationStartingState",message:"The size of the collaborationStartingState URLs and/or its data exceed the limits allowed.",g:"Ensure that the collaborationStartingState URL size is less than 512 characters and the data size is less than 4096 characters."},rd={errorType:"SizeLimitExceededFrameToFrameMessage",message:"The size of the frame to frame message exceeds the limits allowed.",g:"Ensure that the frame to frame message size is less than 1 megabyte."};
|
|
38
|
+
function sd(a){switch(a){case 0:return ad;case 1:return jd;case 2:return kd;case 3:return md;case 4:return nd;case 5:return od;case 6:return gd;case 7:return pd;case 8:return qd;case 9:return rd;default:return bd}}
|
|
39
|
+
function td(a){let b;var c=(b=F(a,1))!=null?b:0;a=ud(a.ab());switch(c){case 1:return{errorType:"InternalError",message:`Could not connect to ${a} channel. Meet did not respond with a MessagePort.`,g:"No further information is available."};case 2:return{errorType:"InternalError",message:`Could not connect to ${a}. A conflicting ${a} exists.`,g:"No further information is available."};case 3:return{errorType:"InternalError",message:`Could not connect to ${a} channel. The addon does not have permission to open a ${a}.`,
|
|
40
|
+
g:"No further information is available."};case 4:return{errorType:"InternalError",message:`Could not connect to ${a} channel. The addon is not authorized for this ${a}.`,g:"No further information is available."};case 0:return ld(a);case 5:a:switch(a){case "coActivity":c={errorType:"InternalError",message:`Could not connect to ${a} channel. The coActivity was not found.`,g:`Consider starting the ${a} only after receiving a callback from the 'userInitiatedCollaboration' callback.`};break a;default:c=
|
|
41
|
+
{errorType:"InternalError",message:`Could not connect to ${a} channel.`,g:"No further information is available."}}return c;default:return ld(a)}}function ud(a){switch(a){case 2:return"coActivity";case 3:return"guaranteed delivery";case 0:return"unknown";default:return"unknown"}}function vd(a=""){({errorType:d,message:c,g:b}=bd);var b,c,d;throw new N({errorType:d,message:a?`${c} ${a}`:c,g:b});};class wd{constructor(a,b){this.ub=a[m.Symbol.iterator]();this.Ib=b}[Symbol.iterator](){return this}next(){const a=this.ub.next();return{value:a.done?void 0:this.Ib.call(void 0,a.value),done:a.done}}}var xd=function(a,b){return new wd(a,b)};var yd=function(){};function zd(a,b){for(const c in a)if(b.call(void 0,a[c],c,a))return!0;return!1}const Ad="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Bd(a,b){let c,d;for(let e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(let f=0;f<Ad.length;f++)c=Ad[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var Cd=function(){var a=document;var b="IFRAME";a.contentType==="application/xhtml+xml"&&(b=b.toLowerCase());return a.createElement(b)};const Dd=m.URL;function Ed(){var a=window.location.href,b;(b=(new Dd(a)).searchParams.get("meet_sdk"))?b=$c(Ha(b)):(Fd("meet_sdk",a),b=void 0);var c=E(b,1);c||Fd("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new N(hd);const d=E(b,2);d||Fd("meet_control_channel_name",a);const e=E(b,4);e||Fd("addon_cloud_project_number",a);var f;a=(f=b.getFrameOpenReason())!=null?f:0;f=E(b,3)||"https://meet.google.com";return{Bb:a,frameType:c,xb:d,cloudProjectNumber:e,jb:f}}
|
|
42
|
+
function Fd(a,b){throw new N({...cd,message:`${cd.message}: ${a}. In URL ${b}`});};var Gd=class extends K{constructor(){super()}};var Hd=class extends K{constructor(){super()}};var Id=class extends K{constructor(){super()}};var Jd=class extends K{constructor(){super()}};var Md=function(){var a=new Kd,b=new Id;return D(a,1,Ld,b)},Nd=function(){var a=new Kd,b=new Jd;return D(a,2,Ld,b)},Kd=class extends K{constructor(){super()}ab(){return y(this,Ld)}},Ld=[1,2];var Od=class extends K{constructor(){super()}};var Pd=class extends K{constructor(){super()}};var Qd=class extends K{constructor(){super()}ob(a){return H(this,2,a)}};var Rd=class extends K{constructor(){super()}};var Sd=class extends K{constructor(){super()}};var P=class extends K{constructor(){super()}bb(){return y(this,O)}},O=[1,2,5,6,7,8,9,10,11,13,14,15];var Td=class extends K{},Ud=lc(Td),Vd=[1,2];class Wd{constructor(a,b){this.data=a;this.channel=b}};var Xd=Promise;var Zd=function(a){const b=new MessageChannel;Yd(b.port1,a);return b},ae=function(a,b){Yd(a,b);return new $d(a)};class $d{constructor(a){this.Pb=a}send(a,b,c=[]){b=Zd(b);this.Pb.postMessage(a,[b.port2].concat(c))}da(a,b){return new Xd(c=>{this.send(a,c,b)})}}const Yd=function(a,b){b&&(a.onmessage=c=>{var d=c.data;c=ae(c.ports[0]);b(new Wd(d,c))})};class be{constructor(a,b){this.Hb=100;this.yb=a;this.Sb=b;this.qa=0;this.na=null}get(){let a;this.qa>0?(this.qa--,a=this.na,this.na=a.next,a.next=null):a=this.yb();return a}put(a){this.Sb(a);this.qa<this.Hb&&(this.qa++,a.next=this.na,this.na=a)}};var ce,de=function(){var a=m.MessageChannel;typeof a==="undefined"&&typeof window!=="undefined"&&window.postMessage&&window.addEventListener&&!p("Presto")&&(a=function(){var e=Cd();e.style.display="none";document.documentElement.appendChild(e);var f=e.contentWindow;e=f.document;e.open();e.close();var g="callImmediate"+Math.random(),h=f.location.protocol=="file:"?"*":f.location.protocol+"//"+f.location.host;e=la(function(l){if((h=="*"||l.origin==h)&&l.data==g)this.port1.onmessage()},this);f.addEventListener("message",
|
|
43
|
+
e,!1);this.port1={};this.port2={postMessage:function(){f.postMessage(g,h)}}});if(typeof a!=="undefined"){var b=new a,c={},d=c;b.port1.onmessage=function(){if(c.next!==void 0){c=c.next;var e=c.Xa;c.Xa=null;e()}};return function(e){d.next={Xa:e};d=d.next;b.port2.postMessage(0)}}return function(e){m.setTimeout(e,0)}};class ee{constructor(){this.va=this.U=null}add(a,b){const c=fe.get();c.set(a,b);this.va?this.va.next=c:this.U=c;this.va=c}remove(){let a=null;this.U&&(a=this.U,this.U=this.U.next,this.U||(this.va=null),a.next=null);return a}}var fe=new be(()=>new ge,a=>a.reset());class ge{constructor(){this.next=this.scope=this.Ca=null}set(a,b){this.Ca=a;this.scope=b;this.next=null}reset(){this.next=this.scope=this.Ca=null}};let he,ie=!1,je=new ee,le=(a,b)=>{he||ke();ie||(he(),ie=!0);je.add(a,b)},ke=()=>{if(m.Promise&&m.Promise.resolve){const a=m.Promise.resolve(void 0);he=()=>{a.then(me)}}else he=()=>{var a=me;typeof m.setImmediate!=="function"||m.Window&&m.Window.prototype&&m.Window.prototype.setImmediate==m.setImmediate?(ce||(ce=de()),ce(a)):m.setImmediate(a)}};var me=()=>{let a;for(;a=je.remove();){try{a.Ca.call(a.scope)}catch(b){pa(b)}fe.put(a)}ie=!1};var Q=function(a){this.o=0;this.lb=void 0;this.L=this.D=this.J=null;this.ka=this.Ba=!1;if(a!=yd)try{var b=this;a.call(void 0,function(c){ne(b,2,c)},function(c){ne(b,3,c)})}catch(c){ne(this,3,c)}},oe=function(){this.next=this.context=this.R=this.aa=this.F=null;this.W=!1};oe.prototype.reset=function(){this.context=this.R=this.aa=this.F=null;this.W=!1};
|
|
44
|
+
var pe=new be(function(){return new oe},function(a){a.reset()}),qe=function(a,b,c){var d=pe.get();d.aa=a;d.R=b;d.context=c;return d},se=function(){var a,b,c=new Q(function(d,e){a=d;b=e});return new re(c,a,b)};Q.prototype.then=function(a,b,c){return te(this,typeof a==="function"?a:null,typeof b==="function"?b:null,c)};Q.prototype.$goog_Thenable=!0;var ve=function(a,b){b=qe(b,b);b.W=!0;ue(a,b)};Q.prototype.Tb=function(a,b){return te(this,null,a,b)};Q.prototype.catch=Q.prototype.Tb;
|
|
45
|
+
Q.prototype.cancel=function(a){if(this.o==0){var b=new R(a);le(function(){we(this,b)},this)}};
|
|
46
|
+
var we=function(a,b){if(a.o==0)if(a.J){var c=a.J;if(c.D){for(var d=0,e=null,f=null,g=c.D;g&&(g.W||(d++,g.F==a&&(e=g),!(e&&d>1)));g=g.next)e||(f=g);e&&(c.o==0&&d==1?we(c,b):(f?(d=f,d.next==c.L&&(c.L=d),d.next=d.next.next):xe(c),ye(c,e,3,b)))}a.J=null}else ne(a,3,b)},ue=function(a,b){a.D||a.o!=2&&a.o!=3||ze(a);a.L?a.L.next=b:a.D=b;a.L=b},te=function(a,b,c,d){var e=qe(null,null,null);e.F=new Q(function(f,g){e.aa=b?function(h){try{var l=b.call(d,h);f(l)}catch(n){g(n)}}:f;e.R=c?function(h){try{var l=c.call(d,
|
|
47
|
+
h);l===void 0&&h instanceof R?g(h):f(l)}catch(n){g(n)}}:g});e.F.J=a;ue(a,e);return e.F};Q.prototype.Vb=function(a){this.o=0;ne(this,2,a)};Q.prototype.Wb=function(a){this.o=0;ne(this,3,a)};
|
|
48
|
+
var ne=function(a,b,c){if(a.o==0){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.o=1;a:{var d=c,e=a.Vb,f=a.Wb;if(d instanceof Q){ue(d,qe(e||yd,f||null,a));var g=!0}else{if(d)try{var h=!!d.$goog_Thenable}catch(n){h=!1}else h=!1;if(h)d.then(e,f,a),g=!0;else{if(fa(d))try{var l=d.then;if(typeof l==="function"){Ae(d,l,e,f,a);g=!0;break a}}catch(n){f.call(a,n);g=!0;break a}g=!1}}}g||(a.lb=c,a.o=b,a.J=null,ze(a),b!=3||c instanceof R||Be(a,c))}},Ae=function(a,b,c,d,e){var f=!1,g=function(l){f||
|
|
49
|
+
(f=!0,c.call(e,l))},h=function(l){f||(f=!0,d.call(e,l))};try{b.call(a,g,h)}catch(l){h(l)}},ze=function(a){a.Ba||(a.Ba=!0,le(a.Ab,a))},xe=function(a){var b=null;a.D&&(b=a.D,a.D=b.next,b.next=null);a.D||(a.L=null);return b};Q.prototype.Ab=function(){for(var a;a=xe(this);)ye(this,a,this.o,this.lb);this.Ba=!1};
|
|
50
|
+
var ye=function(a,b,c,d){if(c==3&&b.R&&!b.W)for(;a&&a.ka;a=a.J)a.ka=!1;if(b.F)b.F.J=null,Ce(b,c,d);else try{b.W?b.aa.call(b.context):Ce(b,c,d)}catch(e){De.call(null,e)}pe.put(b)},Ce=function(a,b,c){b==2?a.aa.call(a.context,c):a.R&&a.R.call(a.context,c)},Be=function(a,b){a.ka=!0;le(function(){a.ka&&De.call(null,b)})},De=pa,R=function(a){oa.call(this,a)};na(R,oa);R.prototype.name="cancel";var re=function(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let Ee=1,Fe=new WeakMap;
|
|
51
|
+
var He=function(a,b,c){var d=Ge;a.rb.has(b);d(b,c)},Je=class extends M{constructor(){super();this.rb=new Set}signal(){const a=new Ie;this.rb.add(a);Pc(this,ma(Oc,a));return a}},Ge=function(a,b){return new Promise(c=>{Ke(()=>{a.Wa&&(a.Gb=b,a.gb=!0);for(const {Sa:d,slot:e}of a.m.values())try{e(b,{signal:a,Sa:d})}catch(f){pa(f)}for(const d of a.S)d.resolve(b);a.S.clear();c()})})},Rc=function(a,b,c){const d=Ee++;Ke(()=>{Le(a,d,b,c)});return d},Le=function(a,b,c,d){if(!a.v)if(d){if(!d.v){const e=()=>{Ke(()=>
|
|
52
|
+
{a.m.delete(b);const f=Fe.get(d);f&&za(f,e)})};a.m.set(b,{Sa:b,slot:c,za:e});Me(d,e)}}else a.m.set(b,{Sa:b,slot:c,za:()=>a.m.delete(b)})},Ie=class extends M{constructor(){super();this.Wa=!1;this.m=new Map;this.S=new Set;this.gb=!1}detach(a){Ke(()=>{const b=this.m.get(a);b&&b.za()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){const c=se();Ke(()=>{if(this.v)c.reject(new R("Signal initially disposed"));else if(b&&b.v)c.reject(new R("Owner initially disposed"));else if(a&&
|
|
53
|
+
this.Wa&&this.gb)c.resolve(this.Gb);else if(this.S.add(c),ve(c.promise,()=>{this.S.delete(c)}),b){const d=()=>{c.reject(new R("Owner asynchronously disposed"))};ve(c.promise,()=>{const e=Fe.get(b);e&&za(e,d)});Me(b,d)}});return c.promise}G(){super.G();Ke(()=>{for(const {za:a}of this.m.values())a();this.m.clear();for(const a of this.S)a.reject(new R("Signal asynchronously disposed"));this.S.clear()})}};const Ne=[];let Oe=!1;function Ke(a){Ne.push(a);Pe()}
|
|
54
|
+
async function Pe(){if(!Oe)try{Oe=!0;let a=Qe(0);for(;a<Ne.length;)await Promise.resolve(),a=Qe(a)}catch(a){pa(a)}finally{Ne.length=0,Oe=!1}}function Qe(a){const b=a+100;for(;a<b&&a<Ne.length;)try{Ne[a++]()}catch(c){pa(c)}return a}function Me(a,b){if(a.v)b();else{var c=Fe.get(a);if(c)c.push(b);else{const d=[b];Fe.set(a,d);Pc(a,()=>{for(const e of[...d])e();Fe.delete(a)})}}};function S(a){var b=new Td;a=D(b,1,Vd,a);return{content:kc(a)}}const Re=new Je;function Se(a,b){const c=Re.signal();return{channel:ae(a,d=>{const e=b(d.data);He(Re,c,{content:e,kb:d})}),signal:c}};var Te=function(a,b){return J(a,1,b)},Ue=class extends K{};var Ve=class extends K{nb(a){return C(this,1,a)}};var We=class extends K{nb(a){return C(this,1,a)}};var Ye=lc(class extends K{H(){return y(this,Xe)}Ga(){return G(this,Ve,1,Xe)}ta(a){return D(this,1,Xe,a)}}),Xe=[1,2];let Ze;var T=class extends K{getState(){const a=this.h;let b=a[v];const c=Ub(a,b,1),d=ib(c,!0,!!(b&34));d!=null&&d!==c&&w(a,b,1,d);return d==null?Sa():d}};var U=class extends K{};var af=class extends K{Ea(){return G(this,T,2,$e)}ra(a){D(this,2,$e,a)}ma(){return z(this,T,2,$e)}Fa(){return G(this,U,3,$e)}sa(a){D(this,3,$e,a)}Ia(){return z(this,U,3,$e)}},$e=[2,3];var bf=lc(class extends K{});var df=lc(class extends K{H(){return y(this,cf)}}),cf=[1,2];var V=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.ba=!1};V.prototype.stopPropagation=function(){this.ba=!0};V.prototype.preventDefault=function(){this.defaultPrevented=!0};var ef=function(){if(!m.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});try{const c=()=>{};m.addEventListener("test",c,b);m.removeEventListener("test",c,b)}catch(c){}return a}();var gf=function(a,b){V.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType="";this.timeStamp=0;this.X=null;if(a){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement;
|
|
55
55
|
this.currentTarget=b;if(b=a.relatedTarget){if(Ba){a:{try{Aa(b.nodeName);var e=!0;break a}catch(f){}e=!1}e||(b=null)}}else c=="mouseover"?b=a.fromElement:c=="mouseout"&&(b=a.toElement);this.relatedTarget=b;d?(this.clientX=d.clientX!==void 0?d.clientX:d.pageX,this.clientY=d.clientY!==void 0?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0):(this.offsetX=Ca||a.offsetX!==void 0?a.offsetX:a.layerX,this.offsetY=Ca||a.offsetY!==void 0?a.offsetY:a.layerY,this.clientX=a.clientX!==void 0?
|
|
56
|
-
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.keyCode=a.keyCode||0;this.key=a.key||"";this.charCode=a.charCode||(c=="keypress"?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.pointerId=a.pointerId||0;this.pointerType=typeof a.pointerType==="string"?a.pointerType:
|
|
57
|
-
a;a.defaultPrevented&&
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
d,e);else if(a.attachEvent)a.attachEvent(
|
|
61
|
-
0;f<b.length;f++)
|
|
62
|
-
|
|
63
|
-
class
|
|
64
|
-
W.prototype.delete=function(a){return
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
X.prototype.dispatchEvent=function(a){var b,c=this.Pa;if(c)for(b=[];c;c=c.Pa)b.push(c);c=this.sb;var d=a.type||a;if(typeof a==="string")a=new V(a,c);else if(a instanceof V)a.target=a.target||c;else{var e=a;a=new V(d,c);
|
|
68
|
-
X.prototype.G=function(){X.T.G.call(this);if(this.A){var a=this.A,b=0,c;for(c in a.l){for(var d=a.l[c],e=0;e<d.length;e++)++b,
|
|
69
|
-
X.prototype.Ha=function(a,b,c,d){return this.A.Ha(String(a),b,c,d)};X.prototype.hasListener=function(a,b){return this.A.hasListener(a!==void 0?String(a):void 0,b)};var
|
|
70
|
-
|
|
71
|
-
var
|
|
72
|
-
b){var c=Y,d=new P;b=D(d,14,O,b);await c(a,S(b))},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
class
|
|
76
|
-
d=await
|
|
77
|
-
|
|
78
|
-
b=a.send;var c=new
|
|
79
|
-
function
|
|
80
|
-
const
|
|
81
|
-
function
|
|
82
|
-
class
|
|
83
|
-
this.B=null;this.Ma=0;d&&
|
|
84
|
-
context:{P:2}}})}notifyPlayoutRate(a){
|
|
85
|
-
function
|
|
86
|
-
async function
|
|
87
|
-
for(var
|
|
56
|
+
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.keyCode=a.keyCode||0;this.key=a.key||"";this.charCode=a.charCode||(c=="keypress"?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.pointerId=a.pointerId||0;this.pointerType=typeof a.pointerType==="string"?a.pointerType:ff[a.pointerType]||"";this.state=a.state;this.timeStamp=a.timeStamp;this.X=
|
|
57
|
+
a;a.defaultPrevented&&gf.T.preventDefault.call(this)}};na(gf,V);var ff={2:"touch",3:"pen",4:"mouse"};gf.prototype.stopPropagation=function(){gf.T.stopPropagation.call(this);this.X.stopPropagation?this.X.stopPropagation():this.X.cancelBubble=!0};gf.prototype.preventDefault=function(){gf.T.preventDefault.call(this);var a=this.X;a.preventDefault?a.preventDefault():a.returnValue=!1};var hf="closure_listenable_"+(Math.random()*1E6|0);var jf=0;var kf=function(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.la=e;this.key=++jf;this.ca=this.ha=!1},lf=function(a){a.ca=!0;a.listener=null;a.proxy=null;a.src=null;a.la=null};var mf=function(a){this.src=a;this.l={};this.fa=0};mf.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.l[f];a||(a=this.l[f]=[],this.fa++);var g=nf(a,b,d,e);g>-1?(b=a[g],c||(b.ha=!1)):(b=new kf(b,this.src,f,!!d,e),b.ha=c,a.push(b));return b};mf.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.l))return!1;var e=this.l[a];b=nf(e,b,c,d);return b>-1?(lf(e[b]),Array.prototype.splice.call(e,b,1),e.length==0&&(delete this.l[a],this.fa--),!0):!1};
|
|
58
|
+
var of=function(a,b){var c=b.type;c in a.l&&za(a.l[c],b)&&(lf(b),a.l[c].length==0&&(delete a.l[c],a.fa--))};mf.prototype.Ha=function(a,b,c,d){a=this.l[a.toString()];var e=-1;a&&(e=nf(a,b,c,d));return e>-1?a[e]:null};mf.prototype.hasListener=function(a,b){var c=a!==void 0,d=c?a.toString():"",e=b!==void 0;return zd(this.l,function(f){for(var g=0;g<f.length;++g)if(!(c&&f[g].type!=d||e&&f[g].capture!=b))return!0;return!1})};
|
|
59
|
+
var nf=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.ca&&f.listener==b&&f.capture==!!c&&f.la==d)return e}return-1};var pf="closure_lm_"+(Math.random()*1E6|0),qf={},rf=0,tf=function(a,b,c,d,e){if(d&&d.once)sf(a,b,c,d,e);else if(Array.isArray(b))for(var f=0;f<b.length;f++)tf(a,b[f],c,d,e);else c=uf(c),a&&a[hf]?vf(a,b,c,fa(d)?!!d.capture:!!d,e):wf(a,b,c,!1,d,e)},wf=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=fa(e)?!!e.capture:!!e,h=xf(a);h||(a[pf]=h=new mf(a));c=h.add(b,c,d,g,f);if(!c.proxy){d=yf();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)ef||(e=g),e===void 0&&(e=!1),a.addEventListener(b.toString(),
|
|
60
|
+
d,e);else if(a.attachEvent)a.attachEvent(zf(b.toString()),d);else if(a.addListener&&a.removeListener)a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");rf++}},yf=function(){const a=Af,b=function(c){return a.call(b.src,b.listener,c)};return b},sf=function(a,b,c,d,e){if(Array.isArray(b))for(var f=0;f<b.length;f++)sf(a,b[f],c,d,e);else c=uf(c),a&&a[hf]?a.A.add(String(b),c,!0,fa(d)?!!d.capture:!!d,e):wf(a,b,c,!0,d,e)},Bf=function(a,b,c,d,e){if(Array.isArray(b))for(var f=
|
|
61
|
+
0;f<b.length;f++)Bf(a,b[f],c,d,e);else d=fa(d)?!!d.capture:!!d,c=uf(c),a&&a[hf]?a.A.remove(String(b),c,d,e):a&&(a=xf(a))&&(b=a.Ha(b,c,d,e))&&Cf(b)},Cf=function(a){if(typeof a!=="number"&&a&&!a.ca){var b=a.src;if(b&&b[hf])of(b.A,a);else{var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent?b.detachEvent(zf(c),d):b.addListener&&b.removeListener&&b.removeListener(d);rf--;(c=xf(b))?(of(c,a),c.fa==0&&(c.src=null,b[pf]=null)):lf(a)}}},zf=function(a){return a in
|
|
62
|
+
qf?qf[a]:qf[a]="on"+a},Af=function(a,b){if(a.ca)a=!0;else{b=new gf(b,this);var c=a.listener,d=a.la||a.src;a.ha&&Cf(a);a=c.call(d,b)}return a},xf=function(a){a=a[pf];return a instanceof mf?a:null},Df="__closure_events_fn_"+(Math.random()*1E9>>>0),uf=function(a){if(typeof a==="function")return a;a[Df]||(a[Df]=function(b){return a.handleEvent(b)});return a[Df]};var Ef=function(){};Ef.prototype.next=function(){return Ff};var Ff={done:!0,value:void 0};Ef.prototype.K=function(){return this};var Jf=function(a){if(a instanceof Gf||a instanceof Hf||a instanceof If)return a;if(typeof a.next=="function")return new Gf(()=>a);if(typeof a[Symbol.iterator]=="function")return new Gf(()=>a[Symbol.iterator]());if(typeof a.K=="function")return new Gf(()=>a.K());throw Error("Not an iterator or iterable.");};class Gf{constructor(a){this.Da=a}K(){return new Hf(this.Da())}[Symbol.iterator](){return new If(this.Da())}Ta(){return new If(this.Da())}}
|
|
63
|
+
class Hf extends Ef{constructor(a){super();this.Z=a}next(){return this.Z.next()}[Symbol.iterator](){return new If(this.Z)}Ta(){return new If(this.Z)}}class If extends Gf{constructor(a){super(()=>a);this.Z=a}next(){return this.Z.next()}};var W=function(a,b){this.C={};this.j=[];this.ga=this.size=0;var c=arguments.length;if(c>1){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)},Lf=function(a){Kf(a);return a.j.concat()};W.prototype.has=function(a){return Mf(this.C,a)};W.prototype.clear=function(){this.C={};this.ga=this.size=this.j.length=0};W.prototype.remove=function(a){return this.delete(a)};
|
|
64
|
+
W.prototype.delete=function(a){return Mf(this.C,a)?(delete this.C[a],--this.size,this.ga++,this.j.length>2*this.size&&Kf(this),!0):!1};var Kf=function(a){if(a.size!=a.j.length){for(var b=0,c=0;b<a.j.length;){var d=a.j[b];Mf(a.C,d)&&(a.j[c++]=d);b++}a.j.length=c}if(a.size!=a.j.length){var e={};for(c=b=0;b<a.j.length;)d=a.j[b],Mf(e,d)||(a.j[c++]=d,e[d]=1),b++;a.j.length=c}};k=W.prototype;k.get=function(a,b){return Mf(this.C,a)?this.C[a]:b};
|
|
65
|
+
k.set=function(a,b){Mf(this.C,a)||(this.size+=1,this.j.push(a),this.ga++);this.C[a]=b};k.addAll=function(a){if(a instanceof W)for(var b=Lf(a),c=0;c<b.length;c++)this.set(b[c],a.get(b[c]));else for(b in a)this.set(b,a[b])};k.forEach=function(a,b){for(var c=Lf(this),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};k.clone=function(){return new W(this)};k.keys=function(){return Jf(this.K(!0)).Ta()};k.values=function(){return Jf(this.K(!1)).Ta()};
|
|
66
|
+
k.entries=function(){const a=this;return xd(this.keys(),function(b){return[b,a.get(b)]})};k.K=function(a){Kf(this);var b=0,c=this.ga,d=this,e=new Ef;e.next=function(){if(c!=d.ga)throw Error("The map has changed since the iterator was created");if(b>=d.j.length)return Ff;var f=d.j[b++];return{value:a?f:d.C[f],done:!1}};return e};var Mf=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var X=function(){M.call(this);this.A=new mf(this);this.sb=this;this.Pa=null};na(X,M);X.prototype[hf]=!0;X.prototype.addEventListener=function(a,b,c,d){tf(this,a,b,c,d)};X.prototype.removeEventListener=function(a,b,c,d){Bf(this,a,b,c,d)};
|
|
67
|
+
X.prototype.dispatchEvent=function(a){var b,c=this.Pa;if(c)for(b=[];c;c=c.Pa)b.push(c);c=this.sb;var d=a.type||a;if(typeof a==="string")a=new V(a,c);else if(a instanceof V)a.target=a.target||c;else{var e=a;a=new V(d,c);Bd(a,e)}e=!0;if(b)for(var f=b.length-1;!a.ba&&f>=0;f--){var g=a.currentTarget=b[f];e=Nf(g,d,!0,a)&&e}a.ba||(g=a.currentTarget=c,e=Nf(g,d,!0,a)&&e,a.ba||(e=Nf(g,d,!1,a)&&e));if(b)for(f=0;!a.ba&&f<b.length;f++)g=a.currentTarget=b[f],e=Nf(g,d,!1,a)&&e;return e};
|
|
68
|
+
X.prototype.G=function(){X.T.G.call(this);if(this.A){var a=this.A,b=0,c;for(c in a.l){for(var d=a.l[c],e=0;e<d.length;e++)++b,lf(d[e]);delete a.l[c];a.fa--}}this.Pa=null};var vf=function(a,b,c,d,e){a.A.add(String(b),c,!1,d,e)},Nf=function(a,b,c,d){b=a.A.l[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.ca&&g.capture==c){var h=g.listener,l=g.la||g.src;g.ha&&of(a.A,g);e=h.call(l,d)!==!1&&e}}return e&&!d.defaultPrevented};
|
|
69
|
+
X.prototype.Ha=function(a,b,c,d){return this.A.Ha(String(a),b,c,d)};X.prototype.hasListener=function(a,b){return this.A.hasListener(a!==void 0?String(a):void 0,b)};var Of=function(a,b){X.call(this);this.pa=a||1;this.ea=b||m;this.Va=la(this.Ub,this);this.ib=Date.now()};na(Of,X);k=Of.prototype;k.enabled=!1;k.s=null;k.setInterval=function(a){this.pa=a;this.s&&this.enabled?(this.stop(),this.start()):this.s&&this.stop()};k.Ub=function(){if(this.enabled){var a=Date.now()-this.ib;a>0&&a<this.pa*.8?this.s=this.ea.setTimeout(this.Va,this.pa-a):(this.s&&(this.ea.clearTimeout(this.s),this.s=null),this.Aa(),this.enabled&&(this.stop(),this.start()))}};k.Aa=function(){this.dispatchEvent("tick")};
|
|
70
|
+
k.start=function(){this.enabled=!0;this.s||(this.s=this.ea.setTimeout(this.Va,this.pa),this.ib=Date.now())};k.stop=function(){this.enabled=!1;this.s&&(this.ea.clearTimeout(this.s),this.s=null)};k.G=function(){Of.T.G.call(this);this.stop();delete this.ea};var Pf=function(a,b,c){Of.call(this,b,c)},Qf;na(Pf,Of);Pf.prototype.Aa=function(){Pf.T.Aa.call(this)};var Rf=function(a){Qf||(Qf=new W);const b=new Pf("heartbeat interval",1E3),c=Object.prototype.hasOwnProperty.call(b,ha)&&b[ha]||(b[ha]=++ia);Qf.set(c,b);tf(b,"tick",a,!1);b.start()};var Sf=({destination:a,origin:b,ec:c,tb:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");const f=Zd(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return ae(f.port1,e)};function Tf(a,b){const c=new Je,d=c.signal();a=Sf({destination:window.parent,origin:b,tb:a,onMessage:e=>{const f=Ud(e.data.content);y(f,Vd)===2&&He(c,d,{content:G(f,Ic,2,Vd),kb:e,messagePort:e.data.messagePort})}});return new Uf(d,a)}
|
|
71
|
+
var Sc=async function(a){a=a.channel;var b=a.da;var c=new P;var d=new Rd;c=D(c,13,O,d);await b.call(a,S(c))},Tc=async function(a,b){var c=Y,d=new P;b=D(d,9,O,b);a=await c(a,S(b));let e;return(e=G(Ud(a.data.content),Ic,2,Vd))==null?void 0:G(e,Dc,9,Hc)},Uc=async function(a,b){var c=Y,d=new P;b=D(d,8,O,b);await c(a,S(b))},Vc=async function(a){var b=Y;var c=new P;var d=new Gd;c=D(c,10,O,d);await b(a,S(c))},Wc=async function(a){var b=Y;var c=new P;var d=new Hd;c=D(c,11,O,d);await b(a,S(c))},Xc=async function(a,
|
|
72
|
+
b){var c=Y,d=new P;b=D(d,14,O,b);await c(a,S(b))},Yc=async function(a,b){var c=Y,d=new P;b=D(d,15,O,b);await c(a,S(b))},Vf=async function(a){Rf(async()=>{await Sc(a)})},Y=async function(a,b){(a=await a.channel.da(b))||vd("Falsy response received from the message channel."+` ${JSON.stringify(a)}`);(b=a.data)||vd("Data field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);(b=b.content)||vd("Content field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);
|
|
73
|
+
let c=void 0;try{c=Ud(b)}catch(d){vd("The ControlMessage can't be deserialized."+` ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=G(c,Ic,2,Vd))||vd("MeetToAddonMessage field on ControlMessage is falsy."+` ${JSON.stringify(b)}`);b=b==null?void 0:G(b,zc,10,Hc);if((b==null?void 0:F(b,1))!==void 0)throw new N(sd(F(b,1)));return a},Wf=async function(a,b,c){var d=Y,e=new P;b=D(e,1,O,b);d=await d(a,S(b));a=d.data.messagePort;var f;(d=(f=G(Ud(d.data.content),Ic,2,Vd))==null?void 0:G(f,yc,1,Hc))!=null?f=
|
|
74
|
+
d:(f=new yc,f=J(f,1,0));return{channel:a?Se(a,c):void 0,response:f}},Xf=async function(a){const b=Md(),{channel:c,response:d}=await Wf(a,b,e=>df(e));if(!c)throw new N(td(d));return c},Yf=async function(a){const b=Nd(),{channel:c,response:d}=await Wf(a,b,e=>Ye(e));if(!c)throw new N(td(d));return{channel:c,response:d}},Zf=async function(a){var b=Y;var c=new P;var d=new Sd;c=D(c,5,O,d);await b(a,S(c))},$f=async function(a){var b=Y;var c=new P;var d=new Pd;c=D(c,6,O,d);await b(a,S(c))},ag=async function(a,
|
|
75
|
+
b,c){var d=Y,e=new P,f=new Qd;b=J(f,1,b).ob(c);e=D(e,7,O,b);await d(a,S(e))};class Uf extends M{constructor(a,b){super();this.Nb=a;this.channel=b;a=Ze||(Ze=mc("[0,8,0]"));a=Tb(a);a=Xb(a,4,zb("650782503"));b=a.h;var c=b[v];b=c&2?a:Cb(a.constructor,Sb(b,c,!0));a=new P;c=new Od;b=C(c,2,b);a=D(a,2,O,b);this.channel.send(S(a));Vf(this)}};let bg;function cg(a){var b=a.cloudProjectNumber;a=Ed();if(a.cloudProjectNumber!==b)throw new N(id);b=a.jb;const c=a.xb;let d;bg=(d=bg)!=null?d:Tf(c,b);return new dg(a)}var dg=class{constructor(a){var b=bg;this.xa=a;this.i=b}delete(){throw Error("Not implemented.");}};var eg=class extends K{constructor(){super()}};var fg=class extends K{constructor(){super()}};var hg=class extends K{constructor(){super()}H(){return y(this,gg)}Ga(){return G(this,Ve,1,gg)}ta(a){return D(this,1,gg,a)}},gg=[1,2,3];var kg=async function(a,b){switch(b.H()){case 1:var c=ig;b=b.Ga();await c(a,b);break;case 2:return c=jg,b=G(b,We,2,Xe),await c(a,b)}},mg=function(a){a.Ja=setTimeout(async()=>{await lg(a)},3E3)},ig=async function(a,b){a.Ja&&(clearTimeout(a.Ja),mg(a));let c;((c=A(b,Ue,1))==null?void 0:F(c,1))!==F(a.ya,1)?(a.Oa++,await ng(a)):a.Oa=0},jg=async function(a,b){var c=new fg;b=A(b,Ue,1);if(!b)return c=new hg,a=new fg,a=J(a,1,4),D(c,2,gg,a);var d;const e=(d=Nc.get(F(b,1)))!=null?d:"RECORDING_STATUS_UNKNOWN";
|
|
76
|
+
d=await og(a,e);J(c,1,d);d===2&&Te(a.ya,F(b,1));a=new hg;return D(a,2,gg,c)},ng=async function(a){if(a.Oa>3)try{await a.N.onRecordingStatusChanged({recordingStatus:"RECORDING_STATUS_UNKNOWN"})}catch(b){}},og=async function(a,b){const c=new Promise((d,e)=>{setTimeout(()=>{e(new pg)},5E3)});try{return await Promise.race([c,(async()=>a.N.onRecordingStatusChanged({recordingStatus:b}))()])?2:3}catch(d){return d instanceof pg?5:4}},lg=async function(a){try{await a.N.onRecordingStatusChanged({recordingStatus:"RECORDING_STATUS_UNKNOWN"})}catch(b){}},
|
|
77
|
+
qg=class extends M{constructor(a,b){super();this.eb=a;this.N=b;this.oa=new Of(1E3);this.Oa=0;a=this.eb.response;this.ja=this.eb.channel;this.Cb=Rc(this.ja.signal,async e=>{var f=await kg(this,e.content);f&&(e=e.kb,f=kc(f),e.channel.send(f,void 0,void 0))},this);let c,d;a=(d=(c=G(a,wc,3,xc))==null?void 0:F(c,1))!=null?d:0;this.ya=Te(new Ue,a);Pc(this,ma(Oc,this.oa));vf(this.oa,"tick",()=>{this.ja.channel.send(kc((new hg).ta((new Ve).nb(this.ya))))});this.oa.start();mg(this)}disconnect(){var a=this.ja.channel,
|
|
78
|
+
b=a.send;var c=new hg;var d=new eg;c=D(c,3,gg,d);b.call(a,kc(c));this.oa.stop();clearTimeout(this.Ja);this.ja.signal.detach(this.Cb)}},pg=class extends Error{constructor(){super("Timed out waiting for guaranteed delivery delegate method to return")}};async function rg(a,b){a=await Yf(a.i);return new qg(a,b)};var tg=class extends K{Ra(a){return hc(this,a)}Ea(){return G(this,T,2,sg)}ra(a){D(this,2,sg,a)}ma(){return z(this,T,2,sg)}Fa(){return G(this,U,3,sg)}sa(a){D(this,3,sg,a)}Ia(){return z(this,U,3,sg)}},sg=[2,3];var ug=class extends K{constructor(){super()}};var vg=class extends K{constructor(){super()}};var wg=class extends K{constructor(){super()}Qa(a){return Xb(this,4,zb(a))}};var yg=class extends K{constructor(){super()}Ra(a){return hc(this,a)}Ea(){return G(this,T,2,xg)}ra(a){D(this,2,xg,a)}ma(){return z(this,T,2,xg)}Fa(){return G(this,U,3,xg)}sa(a){D(this,3,xg,a)}Ia(){return z(this,U,3,xg)}},xg=[2,3],zg=[5,6];var Ag=class extends K{constructor(){super()}Qa(a){return H(this,1,a)}};var Cg=class extends K{constructor(){super()}H(){return y(this,Bg)}Ga(){return G(this,tg,1,Bg)}ta(a){return D(this,1,Bg,a)}},Bg=[1,2,3];function Dg(a){var b=new Eg;let c=0,d;return(...e)=>{if(Fg(b)){Gg(b);var f=!0}else f=!1;f?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;let g;(g=d)==null||g()},Hg(b))))}};var Hg=function(a){const b=a.Ya;let c;a=Date.now()-((c=a.La[a.index])!=null?c:0);return a>=b?0:b-a},Fg=function(a){const b=a.Ya;let c;return Date.now()-((c=a.La[a.index])!=null?c:0)>=b},Gg=function(a){a.La[a.index]=Date.now();a.index=(a.index+1)%a.Jb},Eg=class{constructor(){this.Jb=1;this.Ya=500;this.La=[];this.index=0}};var Ig=class extends Error{constructor(){super("Failed to create CoActivity: Connection refused - Meet refused to begin Live Sharing")}};var Jg=class{constructor(a){this.config=a}start(){this.hb!=null||(this.hb=setInterval(()=>{this.config.Mb()},this.config.Eb));return this}shutdown(){clearInterval(this.hb)}};function Kg(){const a=new Map,b={set(c,d){a.set(c,d);return b},wa:()=>a};return b};function Lg(a){if(a.ma()){var b=a.Ea().getState();a=Uint8Array;Qa(Oa);var c=b.ua;if(c!=null&&!Na(c))if(typeof c==="string"){Ka.test(c)&&(c=c.replace(Ka,Ma));c=atob(c);const d=new Uint8Array(c.length);for(let e=0;e<c.length;e++)d[e]=c.charCodeAt(e);c=d}else c=null;b=c==null?c:b.ua=c;return{bytes:new a(b||0)}}}function Mg(a,b){a.ra(Ng(b));return a}function Og(a,b){a.ra(Ng(b));return a}function Ng(a){var b=new T;return $b(b,1,ib(a.bytes,!1,!1),Sa())}
|
|
79
|
+
function Pg(a){if(a.Ia()){a=a.Fa();var b,c,d=E(a,1),e=(c=(b=A(a,nc,2))==null?void 0:gc(b))!=null?c:0;c=a.h;let f=c[v];const g=Ub(c,f,4);b=g==null||typeof g==="number"?g:g==="NaN"||g==="Infinity"||g==="-Infinity"?Number(g):void 0;b!=null&&b!==g&&w(c,f,4,b);return{mediaId:d,mediaPlayoutPosition:e,mediaPlayoutRate:fc(b,0),playbackState:Qg.get(F(a,3))}}}function Rg(a,b){a.sa(Sg(b));return a}function Tg(a,b){a.sa(Sg(b));return a}
|
|
80
|
+
const Qg=Kg().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").wa(),Ug=Kg().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).wa();function Sg(a){var b=new U;b=H(b,1,a.mediaId);var c=a.mediaPlayoutRate;if(c!=null&&typeof c!=="number")throw Error(`Value of float/double field must be a number, found ${typeof c}: ${c}`);b=$b(b,4,c,0);c=(new nc).setSeconds(a.mediaPlayoutPosition);b=C(b,2,c);a=Ug.get(a.playbackState);return J(b,3,a)}
|
|
81
|
+
function Vg({activityTitle:a}){return(new wg).Qa(a)}function Wg(a,b){var c=new vg;b=J(c,1,b.P);D(a,6,zg,b);return a}function Xg(a){var b=new ug;D(a,5,zg,b);return a};const Yg=Kg().set("co-doing",1).set("co-watching",2).wa();async function Zg(a,b,c){var d=b.da,e=new Cg;var f=(new Ag).Qa(a.activityTitle);var g=Yg.get(a.Ua);f=J(f,2,g);e=D(e,3,Bg,f);d=await d.call(b,e,bf);let h;if((h=fc(tb(Vb(d,1)),!1))!=null&&h)return new $g(a,b,c,A(d,af,2));throw new Ig;}var ah=function(a,b){const c=a.config.cb(b);c&&!a.config.Za(a.B,c)&&(a.B=c,a.Ma=gc(b),a.zb(a.B))},bh=function(a,b){const {state:c,Kb:d,context:e}=b(a.B);a.B=c;a.notify(a.B,e,d)};
|
|
82
|
+
class $g{constructor(a,b,c,d){this.N=a;this.ia=b;this.config=c;this.zb=Dg(e=>void this.N.fb(e));ch(this.ia,e=>{const f=e.H();switch(f){case 1:ah(this,G(e,af,1,cf));break;case 2:case 0:console.warn(`IllegalMessage: ${f} - ${"Unhandled message"} - ${"Please raise a bug with the MeetJS team"}`)}});this.Db=(new Jg({Eb:1E3,Mb:()=>{var e;let f;const g=(f=(e=this.N).Qb)==null?void 0:f.call(e);this.B!==null&&(this.B={...this.B,...g},e=(new Cg).ta(this.config.pb((new tg).Ra(this.Ma),this.B)),this.ia.send(e))}})).start();
|
|
83
|
+
this.B=null;this.Ma=0;d&&ah(this,d)}disconnect(){this.ia.shutdown();this.Db.shutdown()}notify(a,b,c){var d=c?Vg(c):void 0;c=this.config;var e=c.qb,f=(new yg).Ra(this.Ma);d=C(f,4,d);a=e.call(c,d,a);a=this.config.mb(a,b);b=this.ia;c=b.send;e=new Cg;a=D(e,2,Bg,a);c.call(b,a)}};var dh=class{constructor(a){this.u=a}broadcastStateUpdate(a){bh(this.u,()=>({state:a,context:{}}))}disconnect(){this.u.disconnect()}};function eh(a,b){return a==null||b==null?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var fh=class{constructor(a){this.u=a}notifySwitchedToMedia(a,b,c){bh(this.u,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},Kb:{activityTitle:a},context:{P:1}}))}notifyPauseState(a,b){bh(this.u,c=>{if(c==null)throw Error("Invalid before coWatchingState");return{state:{...c,playbackState:a?"PAUSE":"PLAY",mediaPlayoutPosition:b},context:{P:3}}})}notifySeekToTimestamp(a){bh(this.u,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},
|
|
84
|
+
context:{P:2}}})}notifyPlayoutRate(a){bh(this.u,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutRate:a},context:{P:4}}})}notifyBuffering(a){bh(this.u,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a,playbackState:"BUFFERING"},context:{P:3}}})}notifyReady(a){bh(this.u,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},context:{P:3}}})}disconnect(){this.u.disconnect()}};
|
|
85
|
+
function gh(a,b){if(a==null||b==null)return!1;const c=a.playbackState==="PLAY"?3*Math.max(a.mediaPlayoutRate,1):0,d=Math.abs(a.mediaPlayoutPosition-b.mediaPlayoutPosition);return a.mediaId===b.mediaId&&a.mediaPlayoutRate===b.mediaPlayoutRate&&d<=c&&a.playbackState===b.playbackState};var ch=function(a,b){const c=Rc(a.signal,d=>{b(d)});a.m.push(c)},hh=class{constructor(a,b){this.channel=a;this.signal=b;this.m=[]}send(a){this.channel.send(kc(a))}async da(a,b){a=await this.channel.da(kc(a));return b(a.data)}shutdown(){this.m.forEach(a=>{this.signal.detach(a)})}};function ih(a,b){var c=jh;const d=a.signal(),e=a.signal();Rc(b,f=>{const g=c(f)?d:e;He(a,g,f)},a);return{Ob:d,Lb:e}}function kh(a,b,c,d=e=>e){Rc(c,e=>{He(a,b,d(e))},a)};async function lh(a,b){if(b)return a=await Zg({activityTitle:b.activityTitle,Ua:"co-watching",Qb:()=>b.onCoWatchingStateQuery(),fb:c=>{b.onCoWatchingStateChanged(c)}},a,{qb:Rg,pb:Tg,mb:Wg,cb:Pg,Za:gh}),new fh(a)}async function mh(a,b){if(b)return a=await Zg({activityTitle:b.activityTitle,Ua:"co-doing",fb:c=>{b.onCoDoingStateChanged(c)}},a,{qb:Mg,pb:Og,mb:Xg,cb:Lg,Za:eh}),new dh(a)}
|
|
86
|
+
async function nh(a){const b=new Je,c=b.signal();a=await a;kh(b,c,a.signal,f=>f.content);const {Ob:d,Lb:e}=ih(b,c);return{vb:new hh(a.channel,d),wb:new hh(a.channel,e)}}function jh(a){a:switch(a.H()){case 1:a=G(a,af,1,cf);break a;default:throw Error("CA Message arrived with no known content message set");}return a.ma()};async function oh(a,b){({vb:a}=await nh(Xf(a.i)));b=await mh(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function ph(a,b){({wb:a}=await nh(Xf(a.i)));b=await lh(a,b);if(!b)throw Error("Failed to create co-watching session");return b};function qh(a){if(a.xa.frameType!==2)throw new N(ed);return Promise.resolve(new rh(a))}var rh=class extends Zc{async notifySidePanel(a){await ag(this.context.i,1,a)}async unloadSidePanel(){await Zf(this.context.i)}async loadSidePanel(){await $f(this.context.i)}};function sh(a){if(a.xa.frameType!==1)throw new N(fd);return Promise.resolve(new th(a))}var th=class extends Zc{async notifyMainStage(a){await ag(this.context.i,2,a)}};class uh{constructor(a){this.V=cg(a)}async createMainStageClient(){return await qh(this.V)}async createSidePanelClient(){return await sh(this.V)}async createCoWatchingClient(a){return await ph(this.V,a)}async createCoDoingClient(a){return await oh(this.V,a)}async createGuaranteedDeliveryClient(a){return await rg(this.V,a)}}let vh=null;var wh=class{};var xh={addon:{Zb:cg,getFrameType:function(){a:{var a=Ed().frameType;switch(a){case 2:a="MAIN_STAGE";break a;case 1:a="SIDE_PANEL";break a;default:throw Error(`Unknown frame type: ${a}`);}}return a},ac:qh,bc:sh,Yb:function(a){a=Xf(a.i);nh(a);return new wh},createAddonSession:async function(a){if(vh&&Ed().jb!=="integration.test.google.com")throw Error("AddonSession already created");return vh=new uh(a)}}},yh=["meet"],Z=m;yh[0]in Z||typeof Z.execScript=="undefined"||Z.execScript("var "+yh[0]);
|
|
87
|
+
for(var zh;yh.length&&(zh=yh.shift());)yh.length||xh===void 0?Z=Z[zh]&&Z[zh]!==Object.prototype[zh]?Z[zh]:Z[zh]={}:Z[zh]=xh;}).call(this);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@googleworkspace/meet-addons",
|
|
3
3
|
"description": "The Google Meet Add-ons SDK lets you embed your app into Google Meet as an add-on where users can discover, share, and collaborate in the app without leaving Meet",
|
|
4
|
-
"version": "0.8.0-
|
|
4
|
+
"version": "0.8.0-650782503",
|
|
5
5
|
"repository": "googleworkspace/meet",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"homepage": "https://developers.google.com/meet/add-ons/guides/overview",
|