@googleworkspace/meet-addons 1.2.0-dev-1004293994 → 1.2.0-dev-1005918809

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/meet.addons.d.ts CHANGED
@@ -1,195 +1,5 @@
1
1
 
2
2
 
3
- // Original file: live_sharing.v2.types.d.ts
4
-
5
-
6
- /**
7
- * Binary-encoded state for CoDoing experiences.
8
- */
9
- export interface CoDoingState {
10
- bytes: Uint8Array;
11
- }
12
-
13
-
14
- /**
15
- * Host-provided set of base configuration options.
16
- */
17
- export interface CoActivityDelegate {
18
- /**
19
- * User-suitable string describing the CoActivity.
20
- */
21
- activityTitle: string;
22
- }
23
-
24
-
25
- /**
26
- * Host-provided set of callbacks required to operate a CoDoing experience.
27
- */
28
- export interface CoDoingDelegate extends CoActivityDelegate {
29
- /**
30
- * Callback for state updates broadcast by other participants in the meeting.
31
- *
32
- * Note: This isn't called in response to local changes.
33
- *
34
- * @param update the state update to be applied.
35
- */
36
- onCoDoingStateChanged(newState: CoDoingState): void;
37
- }
38
-
39
-
40
-
41
- /**
42
- * Client-constructed CoDoing experience with hooks for hosts to notify
43
- * of state updates.
44
- */
45
- export interface CoDoingClient {
46
- /**
47
- * Broadcasts state to all other current participants, and is the default
48
- * state for any participant until some other state is broadcast.
49
- *
50
- * **Note:** This shared state is eventually consistent across
51
- * participants. For predictable behavior, this binary state should be
52
- * complete, not partial, as the Meet add-ons SDK doesn't provide
53
- * guarantees around the delivery of individual messages -- only eventual
54
- * consistency.
55
- *
56
- * **Note:** In a race condition where two participants call this method
57
- * simultaneously, the Meet add-ons SDK selects a canonical winning
58
- * update. The losing update might or might not be applied to participants,
59
- * but the winning update is always applied later.
60
- */
61
- broadcastStateUpdate(newState: CoDoingState): void;
62
- }
63
-
64
-
65
-
66
- /**
67
- * Current PlaybackState for CoWatching experiences.
68
- */
69
- export type PlaybackState =
70
- | 'INVALID'
71
- | 'BUFFERING'
72
- | 'PLAY'
73
- | 'PAUSE'
74
- | 'ENDED';
75
-
76
- /**
77
- * State for CoWatching experiences.
78
- */
79
- export interface CoWatchingState {
80
- /**
81
- * The identifier for the media being played.
82
- *
83
- * Note: The actual format only matters to the co-watching app.
84
- */
85
- mediaId: string;
86
-
87
- /** The current position of the media playout, in seconds. */
88
- mediaPlayoutPosition: number;
89
-
90
- /** The current playout rate, where {@code 1.0} is normal speed. */
91
- mediaPlayoutRate: number;
92
-
93
- /** The current player state, such as Paused, Playing, Buffering, etc. */
94
- playbackState: PlaybackState;
95
- }
96
-
97
-
98
-
99
- type CoWatchingQueryResponse = Pick<CoWatchingState, 'mediaPlayoutPosition'>;
100
-
101
-
102
- /**
103
- * Host-provided set of callbacks required to operate a CoWatching experience.
104
- */
105
- export interface CoWatchingDelegate extends CoActivityDelegate {
106
- /**
107
- * Apply the supplied state to media playout, up to and including switching
108
- * to a new media stream if the mediaId changes.
109
- *
110
- * @param state the new state to be applied to the player.
111
- */
112
- onCoWatchingStateChanged(newState: CoWatchingState): void;
113
-
114
- /**
115
- * Return the current state of the local media playout. This is called
116
- * regularly so it should be written to be performant.
117
- *
118
- * @return a {@link CoWatchingState} describing the current state.
119
- */
120
- onCoWatchingStateQuery(): CoWatchingQueryResponse;
121
- }
122
-
123
-
124
-
125
- /**
126
- * Client-constructed CoWatching experience with hooks for hosts to manage the
127
- * state.
128
- */
129
- export interface CoWatchingClient {
130
- /**
131
- * Notify Meet that the user has switched media so Meet can pass that along
132
- * to other users.
133
- *
134
- * @param mediaTitle The title of the media switched to. This title is
135
- * reflected in the Meet UI when other users are considering connecting to
136
- * the co-watching session.
137
- * @param mediaId The string URI of the media switched to.
138
- * @param mediaPlayoutPosition The position at which the media began playout.
139
- */
140
- notifySwitchedToMedia(
141
- mediaTitle: string,
142
- mediaId: string,
143
- mediaPlayoutPosition: number,
144
- ): void;
145
-
146
- /**
147
- * Notify Meet that the user has paused or unpaused the playback of media, so
148
- * Meet can mirror that action for other users.
149
- *
150
- * @param paused The new paused or unpaused state.
151
- */
152
- notifyPauseState(paused: boolean, mediaPlayoutPosition: number): void;
153
-
154
- /**
155
- * Notify Meet that the user has sought the playback point of the media, so
156
- * Meet can mirror that action for other users.
157
- *
158
- * @param mediaPlayoutPosition The timestamp that the user sought.
159
- */
160
- notifySeekToTimestamp(mediaPlayoutPosition: number): void;
161
-
162
- /**
163
- * Notify Meet that the user updated the playout rate of the media to a new
164
- * value (for example, 1.25x).
165
- *
166
- * @param rate The rate at which the media is now being played.
167
- * @param mediaPlayoutPosition The position at which the media began playout
168
- */
169
- notifyPlayoutRate(rate: number, mediaPlayoutPosition: number): void;
170
-
171
- /**
172
- * Notify Meet that the media isn't ready to be played due to
173
- * buffering, a prior media switch, seeking, or normal network
174
- * congestion.
175
- *
176
- * @param mediaPlayoutPosition The timestamp at which the media is paused or
177
- * waiting for buffering to complete.
178
- */
179
- notifyBuffering(mediaPlayoutPosition: number): void;
180
-
181
- /**
182
- * Notify Meet that the buffering is complete and the media is now ready to
183
- * play, starting at the supplied timestamp.
184
- *
185
- * @param mediaPlayoutPosition The timestamp at which the media is buffered
186
- * and is now ready to play.
187
- */
188
- notifyReady(mediaPlayoutPosition: number): void;
189
- }
190
-
191
-
192
-
193
3
  // Original file: index.types.d.ts
194
4
 
195
5
 
@@ -245,7 +55,6 @@ declare global {
245
55
 
246
56
  // Original file: client.types.d.ts
247
57
 
248
-
249
58
  /**
250
59
  * Information about the meeting in which the add-on is running.
251
60
  */
@@ -493,10 +302,4 @@ export interface AddonSession {
493
302
  createMainStageClient(): Promise<MeetMainStageClient>;
494
303
  /** Creates a `SidePanelClient`. */
495
304
  createSidePanelClient(): Promise<MeetSidePanelClient>;
496
- /** Creates a `CoDoingClient`. */
497
- createCoDoingClient(coDoingDelegate: CoDoingDelegate): Promise<CoDoingClient>;
498
- /** Creates a `CoWatchingClient`. */
499
- createCoWatchingClient(
500
- coWatchingDelegate: CoWatchingDelegate,
501
- ): Promise<CoWatchingClient>;
502
305
  }
package/meet.addons.mjs CHANGED
@@ -1,75 +1,53 @@
1
- const topLevel = typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {};(function() {'use strict';var aa=Object.defineProperty;function ba(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 da=ba(this);
2
- function ea(a,b){if(b)a:{var c=da;a=a.split(".");for(var d=0;d<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})}}ea("Symbol.dispose",function(a){return a?a:Symbol("Symbol.dispose")});/*
1
+ const topLevel = typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {};(function() {'use strict';var aa=Object.defineProperty;function ba(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 ca=ba(this);
2
+ function da(a,b){if(b)a:{var c=ca;a=a.split(".");for(var d=0;d<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.
5
5
  SPDX-License-Identifier: Apache-2.0
6
6
  */
7
- var fa=this||self;function ha(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)}}function ia(a,b){function c(){}c.prototype=b.prototype;a.ra=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.pa=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 ja(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,ja);else{let c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}ia(ja,Error);ja.prototype.name="CustomError";function k(a){fa.setTimeout(()=>{throw a;},0)};var ka,la;a:{for(var ma=["CLOSURE_FLAGS"],na=fa,oa=0;oa<ma.length;oa++)if(na=na[ma[oa]],na==null){la=null;break a}la=na}var pa=la&&la[748402147];ka=pa!=null?pa:!0;function qa(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};const ra=/[-_.]/g,sa={"-":"+",_:"/",".":"="};function ta(a){return sa[a]||""}var ua={};function va(){return wa||(wa=new m(null,ua))}var m=class{constructor(a,b){xa(b);this.h=a;if(a!=null&&a.length===0)throw Error("ByteString should be constructed with non-empty values");}};let wa;function xa(a){if(a!==ua)throw Error("illegal external caller");};function ya(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let za=void 0;function Aa(a){a=Error(a);ya(a,"warning");return a};function Ba(){return typeof BigInt==="function"};function Ca(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var Da=Ca(),Ea=Ca(),Fa=Ca("m_m",!0);const n=Ca("jas",!0);var Ga;const Ha=[];Ha[n]=7;Ga=Object.freeze(Ha);var Ia={};function p(a,b){return b===void 0?a.h!==Ja&&!!(2&(a.m[n]|0)):!!(2&b)&&a.h!==Ja}const Ja={};function Ka(a,b){if(a!=null)if(typeof a==="string")a=a?new m(a,ua):va();else if(a.constructor!==m)if(a!=null&&a instanceof Uint8Array)a=a.length?new m(new Uint8Array(a),ua):va();else{if(!b)throw Error();a=void 0}return a}Object.freeze({});function La(a){a.qa=!0;return a};var Ma=La(a=>typeof a==="number"),Na=La(a=>typeof a==="string"),Oa=La(a=>typeof a==="boolean");var Pa=typeof fa.BigInt==="function"&&typeof fa.BigInt(0)==="bigint";function t(a){var b=a;if(Na(b)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(b))throw Error(String(b));}else if(Ma(b)&&!Number.isSafeInteger(b))throw Error(String(b));return Pa?BigInt(a):a=Oa(a)?a?"1":"0":Na(a)?a.trim()||"0":String(a)}var Va=La(a=>Pa?a>=Qa&&a<=Ra:a[0]==="-"?Sa(a,Ta):Sa(a,Ua));const Ta=Number.MIN_SAFE_INTEGER.toString(),Qa=Pa?BigInt(Number.MIN_SAFE_INTEGER):void 0,Ua=Number.MAX_SAFE_INTEGER.toString(),Ra=Pa?BigInt(Number.MAX_SAFE_INTEGER):void 0;
8
- function Sa(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){let d=a[c],e=b[c];if(d>e)return!1;if(d<e)return!0}};let u=0,w=0;function Wa(a){var b=a>>>0;u=b;w=(a-b)/4294967296>>>0}function Xa(a){if(a<0){Wa(-a);let [b,c]=Ya(u,w);u=b>>>0;w=c>>>0}else Wa(a)}function Za(a,b){b>>>=0;a>>>=0;if(b<=2097151)var c=""+(4294967296*b+a);else Ba()?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+$a(c)+$a(a));return c}
9
- function $a(a){a=String(a);return"0000000".slice(a.length)+a}function ab(){var a=u,b=w;if(b&2147483648)if(Ba())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{let [c,d]=Ya(a,b);a="-"+Za(c,d)}else a=Za(a,b);return a}function Ya(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};function bb(a,b=`unexpected value ${a}!`){throw Error(b);};const cb=typeof BigInt==="function"?BigInt.asIntN:void 0,db=Number.isSafeInteger,eb=Number.isFinite,fb=Math.trunc;function gb(a){if(a==null||typeof a==="number")return a;if(a==="NaN"||a==="Infinity"||a==="-Infinity")return Number(a)}const hb=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function ib(a){switch(typeof a){case "bigint":return!0;case "number":return eb(a);case "string":return hb.test(a);default:return!1}}
10
- function jb(a){if(a!=null){if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;eb(a)}}
11
- function kb(a){var b=void 0;b!=null||(b=1024);if(!ib(a))throw Aa("int64");var c=typeof a;switch(b){case 512:switch(c){case "string":return lb(a);case "bigint":return String(cb(64,a));default:return mb(a)}case 1024:switch(c){case "string":return nb(a);case "bigint":return t(cb(64,a));default:return t(db(a)?a:mb(a))}case 0:switch(c){case "string":return lb(a);case "bigint":return t(cb(64,a));default:a=fb(a);if(!db(a)){Xa(a);b=u;c=w;if(a=c&2147483648)b=~b+1>>>0,c=~c>>>0,b==0&&(c=c+1>>>0);let d=c*4294967296+
12
- (b>>>0);b=Number.isSafeInteger(d)?d:Za(b,c);a=typeof b==="number"?a?-b:b:a?"-"+b:b}return a}default:return bb(b,"Unknown format requested type for int64")}}
13
- function ob(a){var b=a.length;if(a[0]==="-"?b<20||b===20&&a<="-9223372036854775808":b<19||b===19&&a<="9223372036854775807")return a;if(a.length<16)Xa(Number(a));else if(Ba())a=BigInt(a),u=Number(a&BigInt(4294967295))>>>0,w=Number(a>>BigInt(32)&BigInt(4294967295));else{b=+(a[0]==="-");w=u=0;let c=a.length;for(let d=b,e=(c-b)%6+b;e<=c;d=e,e+=6){let f=Number(a.slice(d,e));w*=1E6;u=u*1E6+f;u>=4294967296&&(w+=Math.trunc(u/4294967296),w>>>=0,u>>>=0)}if(b){let [d,e]=Ya(u,w);u=d;w=e}}return ab()}
14
- function mb(a){a=fb(a);db(a)?a=String(a):(Xa(a),a=ab());return a}function lb(a){var b=fb(Number(a));if(db(b))return String(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));return ob(a)}function nb(a){var b=fb(Number(a));if(db(b))return t(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));return Ba()?t(cb(64,BigInt(a))):t(ob(a))}function pb(a){var b=typeof a;if(a==null)return a;if(b==="bigint")return t(cb(64,a));if(ib(a))return b==="string"?nb(a):t(db(a)?a:mb(a))}
15
- function x(a){if(a!=null&&typeof a!=="string")throw Error();return a}function qb(a,b,c){if(a!=null&&a[Fa]===Ia)return a;if(Array.isArray(a)){var d=a[n]|0;c=d|c&32|c&2;c!==d&&(a[n]=c);return new b(a)}};function rb(a){return a};function sb(a,b,c,d){var e=d!==void 0;d=!!d;var f=[],g=a.length,h=4294967295,l=!1,r=!!(b&64),v=r?b&128?0:-1:void 0;if(!(b&1)){var q=g&&a[g-1];q!=null&&typeof q==="object"&&q.constructor===Object?(g--,h=g):q=void 0;if(r&&!(b&128)&&!e){l=!0;var B;h=((B=tb)!=null?B:rb)(h-v,v,a,q,void 0)+v}}b=void 0;for(e=0;e<g;e++)if(B=a[e],B!=null&&(B=c(B,d))!=null)if(r&&e>=h){let E=e-v,H;((H=b)!=null?H:b={})[E]=B}else f[e]=B;if(q)for(let E in q){a=q[E];if(a==null||(a=c(a,d))==null)continue;g=+E;let H;if(r&&!Number.isNaN(g)&&
16
- (H=g+v)<h)f[H]=a;else{let ca;((ca=b)!=null?ca:b={})[E]=a}}b&&(l?f.push(b):f[h]=b);return f}
17
- function ub(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return Va(a)?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){var b=a[n]|0;return a.length===0&&b&1?void 0:sb(a,b,ub)}if(a!=null&&a[Fa]===Ia)return vb(a);if(a instanceof m){b=a.h;if(b==null)a="";else if(typeof b==="string")a=b;else{let c="",d=0,e=b.length-10240;for(;d<e;)c+=String.fromCharCode.apply(null,b.subarray(d,d+=10240));c+=String.fromCharCode.apply(null,d?b.subarray(d):
18
- b);b=btoa(c);a=a.h=b}return a}return}return a}let tb;function vb(a){a=a.m;return sb(a,a[n]|0,ub)};function wb(a,b,c,d=0){if(a==null){var e=32;c?(a=[c],e|=128):a=[];b&&(e=e&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw Error("narr");e=a[n]|0;if(ka&&1&e)throw Error("rfarr");2048&e&&!(2&e)&&xb();if(e&256)throw Error("farr");if(e&64)return(e|d)!==e&&(a[n]=e|d),a;if(c&&(e|=128,c!==a[0]))throw Error("mid");a:{c=a;e|=64;var f=c.length;if(f){var g=f-1;let l=c[g];if(l!=null&&typeof l==="object"&&l.constructor===Object){b=e&128?0:-1;g-=b;if(g>=1024)throw Error("pvtlmt");for(var h in l)if(f=+h,
19
- f<g)c[f+b]=l[h],delete l[h];else break;e=e&-16760833|(g&1023)<<14;break a}}if(b){h=Math.max(b,f-(e&128?0:-1));if(h>1024)throw Error("spvt");e=e&-16760833|(h&1023)<<14}}}a[n]=e|64|d;return a}function xb(){if(ka)throw Error("carr");if(Ea!=null){var a;var b=(a=za)!=null?a:za={};a=b[Ea]||0;a>=5||(b[Ea]=a+1,b=Error(),ya(b,"incident"),k(b))}};function yb(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){var c=a[n]|0;a.length===0&&c&1?a=void 0:c&2||(!b||4096&c||16&c?a=zb(a,c,!1,b&&!(c&16)):(a[n]|=34,c&4&&Object.freeze(a)));return a}if(a!=null&&a[Fa]===Ia)return b=a.m,c=b[n]|0,p(a,c)?a:Ab(a,b,c)?Bb(a,b):zb(b,c);if(a instanceof m)return a}function Bb(a,b,c){a=new a.constructor(b);c&&(a.h=Ja);a.B=Ja;return a}function zb(a,b,c,d){d!=null||(d=!!(34&b));a=sb(a,b,yb,d);d=32;c&&(d|=2);b=b&16769217|d;a[n]=b;return a}
20
- function Cb(a){var b=a.m,c=b[n]|0;return p(a,c)?Ab(a,b,c)?Bb(a,b,!0):new a.constructor(zb(b,c,!1)):a}function Db(a){if(a.h!==Ja)return!1;var b=a.m;b=zb(b,b[n]|0);b[n]|=2048;a.m=b;a.h=void 0;a.B=void 0;return!0}function Eb(a){if(!Db(a)&&p(a,a.m[n]|0))throw Error();}function Fb(a,b){b===void 0&&(b=a[n]|0);b&32&&!(b&4096)&&(a[n]=b|4096)}function Ab(a,b,c){return c&2?!0:c&32&&!(c&4096)?(b[n]=c|2,a.h=Ja,!0):!1};const Gb=t(0);function y(a,b,c,d){a=Hb(a.m,b,c,d);if(a!==null)return a}function Hb(a,b,c,d){if(b===-1)return null;var e=b+(c?0:-1),f=a.length-1;if(!(f<1+(c?0:-1))){if(e>=f){var g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object){c=g[b];var h=!0}else if(e===f)c=g;else return}else c=a[e];if(d&&c!=null){d=d(c);if(d==null)return d;if(!Object.is(d,c))return h?g[b]=d:a[e]=d,d}return c}}function Ib(a,b,c){Eb(a);var d=a.m;z(d,d[n]|0,b,c);return a}
21
- function z(a,b,c,d){var e=c+-1,f=a.length-1;if(f>=0&&e>=f){let g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object)return g[c]=d,b}if(e<=f)return a[e]=d,b;if(d!==void 0){let g;f=((g=b)!=null?g:b=a[n]|0)>>14&1023||536870912;c>=f?d!=null&&(a[f+-1]={[c]:d}):a[e]=d}return b}function Jb(a,b,c){b=A(a,c)===b?b:-1;a=Hb(a.m,b);return a!=null&&a[Fa]===Ia||Array.isArray(a)}function Kb(a){return!!(2&a)&&!!(4&a)||!!(256&a)}function Lb(a){return Ka(a,!0)}
22
- function C(a,b,c,d){Eb(a);var e=a.m;z(e,e[n]|0,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}function A(a,b){a=a.m;return Mb(Nb(a),a,void 0,b)}function Nb(a){var b;return(b=a[Da])!=null?b:a[Da]=new Map}function Mb(a,b,c,d){var e=a.get(d);if(e!=null)return e;e=0;for(let f=0;f<d.length;f++){let g=d[f];Hb(b,g)!=null&&(e!==0&&(c=z(b,c,e)),e=g)}a.set(d,e);return e}function Ob(a,b,c,d){var e=!1;d=Hb(a,d,void 0,f=>{var g=qb(f,c,b);e=g!==f&&g!=null;return g});if(d!=null)return e&&!p(d)&&Fb(a,b),d}
23
- function Pb(a,b,c){var d=a.m,e=d[n]|0;b=Ob(d,e,b,c);if(b==null)return b;e=d[n]|0;if(!p(a,e)){let f=Cb(b);f!==b&&(Db(a)&&(d=a.m,e=d[n]|0),b=f,e=z(d,e,c,b),Fb(d,e))}return b}function Qb(a){a==null&&(a=void 0);return a}function Rb(a,b,c){c=Qb(c);Ib(a,b,c);c&&!p(c)&&Fb(a.m);return a}
24
- function D(a,b,c,d){d=Qb(d);a:{var e=d;Eb(a);let h=a.m;var f=h[n]|0;if(e==null){var g=Nb(h);if(Mb(g,h,f,c)===b)g.set(c,0);else break a}else{g=h;let l=Nb(g),r=Mb(l,g,f,c);r!==b&&(r&&(f=z(g,f,r)),l.set(c,b))}z(h,f,b,e)}d&&!p(d)&&Fb(a.m);return a}
25
- function Sb(a,b){Eb(a);var c=a.m,d=c[n]|0;if(b==null)return z(c,d,1),a;var e=b===Ga?7:b[n]|0,f=e,g=Kb(e),h=g||Object.isFrozen(b),l=!0,r=!0;for(let q=0;q<b.length;q++){var v=b[q];g||(v=p(v),l&&(l=!v),r&&(r=v))}g||(e=l?13:5,e=r?e&-4097:e|4096);h&&e===f||(b=[...b],f=0,e=Tb(e,d));e!==f&&(b[n]=e);d=z(c,d,1,b);2&e||!(4096&e||16&e)||Fb(c,d);return a}function Tb(a,b){return a=(2&b?a|2:a&-3)&-273}function Ub(a){a=y(a,1);a=a==null||typeof a==="boolean"?a:typeof a==="number"?!!a:void 0;return a!=null?a:!1}
26
- function Vb(a){a=y(a,1,void 0,pb);return a!=null?a:Gb}function F(a,b){a=y(a,b);a=a==null||typeof a==="string"?a:void 0;return a!=null?a:""}function G(a,b){a=y(a,b);a=a==null?a:eb(a)?a|0:void 0;return a!=null?a:0}function I(a,b,c,d){c=A(a,d)===c?c:-1;return Pb(a,b,c)}function Wb(a,b){return C(a,1,b==null?b:kb(b),"0")}function J(a,b,c){if(c!=null){if(!eb(c))throw Aa("enum");c|=0}return C(a,b,c,0)};function Xb(){var a=Yb||(Yb=Zb("[1,2,0]"));a=Cb(a);a=Ib(a,4,x("dev-1004293994"));var b=a.m,c=b[n]|0;return p(a,c)?a:Ab(a,b,c)?Bb(a,b):new a.constructor(zb(b,c,!0))}var K=class{constructor(a){this.m=wb(a,void 0,void 0,2048)}toJSON(){return vb(this)}};K.prototype[Fa]=Ia;K.prototype.toString=function(){return this.m.toString()};function $b(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[n]|=32;b=new a(b)}return b}};var Zb=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[n]|=34;return new a(b)}}(class extends K{});var ac=class extends K{};function bc(a){var b=new cc(500),c=0,d;return(...e)=>{dc(b)?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;var f;(f=d)==null||f()},ec(b))))}}function fc(a){var b=new cc(100),c=Promise.resolve();return(...d)=>dc(b)?a(...d):c};function dc(a){return hc(a,a.index)>=a.h?(a.i[a.index]=Date.now(),a.index=(a.index+1)%1,!0):!1}function ec(a){var b=a.h;a=hc(a,a.index);return a>=b?0:b-a}function hc(a,b){var c;return Date.now()-((c=a.i[b])!=null?c:-1*a.h)}var cc=class{constructor(a){this.h=a;this.i=[];this.index=0}};var ic=class extends K{},jc=[2,3];var kc=class extends K{};var L=class extends Error{constructor({errorType:a,message:b,j:c}){super(`Meet add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},M={errorType:"InternalError",message:"An unexpected error has occurred.",j:"No further information is available."},lc={errorType:"MissingUrlParameter",message:"Missing required Meet SDK URL parameter",j:"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)."},
27
- mc={errorType:"NeedsMainStageContext",message:"This method can only be invoked if the addon is running in the main stage.",j:"Use getFrameType to check whether the addon is running in the main stage before invoking this method."},nc={errorType:"NeedsSidePanelContext",message:"This method can only be invoked if the addon is running in the side panel.",j:"Use getFrameType to check whether the addon is running in the side panel before invoking this method."},oc={errorType:"NotSupportedInStandalone",
28
- message:"This method is not supported in standalone mode.",j:"Do not call this method in standalone mode."},pc={errorType:"MustBeIframed",message:"The SDK must be run in an iframe as part of a Google Meet add-on.",j:"See https://developers.google.com/meet/add-ons/guides/deploy-add-on to deploy to Meet."},qc={errorType:"InternalError",message:"The frame type URL parameter is set to an unexpected value.",j:"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)."},
29
- rc={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.",j:"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."},sc={errorType:"DestinationNotReady",
30
- message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",j:"Make sure the destination frame has connected before sending messages to it."},tc={errorType:"InvalidActivityStartingState",message:"Origin of the ActivityStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",j:"Ensure that the ActivityStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},vc={errorType:"ActivityStartingStateMissingAttributes",
31
- message:"The supplied ActivityStartingState object does not contain any recognized attributes.",j:"Ensure that the ActivityStartingState object contains at least one of the following attributes: mainStageUrl, sidePanelUrl, additionalData."},wc={errorType:"ActivityStartingStateUnrecognizedAttributes",message:"The supplied ActivityStartingState object contains attributes that are not recognized.",j:"Ensure that the ActivityStartingState object has only the following attributes: mainStageUrl, sidePanelUrl, additionalData."},
32
- xc={errorType:"AddonStartingStateMissingAttributes",message:"The supplied AddonStartingState object does not contain any recognized attributes.",j:"Ensure that the AddonStartingState object contains at least one of the following attributes: sidePanelUrl, additionalData."},yc={errorType:"AddonStartingStateUnrecognizedAttributes",message:"The supplied AddonStartingState object contains attributes that are not recognized.",j:"Ensure that the AddonStartingState object has only the following attributes: sidePanelUrl, additionalData."},
33
- zc=a=>({errorType:"ArgumentNullError",message:`The argument supplied for '${a}' was 'null' but a value was expected.`,j:"Ensure you are passing a value of the expected type for the argument."}),N=(a,b,c)=>({errorType:"ArgumentTypeError",message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,j:"Ensure the type of the argument provided matches the expected type."}),Ac=a=>({errorType:"InternalError",message:`Could not connect to ${a} channel. Unknown error`,
34
- j:"No further information is available."}),Bc={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",j:"Ensure that no activity is ongoing."},Cc={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",j:"Send one of the available commands in the frame message."},Dc={errorType:"NoActivityFound",message:"No activity found.",j:"Ensure that the activity is started before performing this operation."},Ec={errorType:"RequiresEapEnrollment",
35
- message:"This feature is only available to early access partners.",j:"Meet add-on early access enrollment is currently closed."},Fc={errorType:"UserNotInitiator",message:"Operation cannot be performed because the user is not the initiator of the current activity.",j:"Ensure that the user is the initiator of the current activity or that the activity has ended."},Gc={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",
36
- j:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Hc={errorType:"SizeLimitExceededFrameToFrameMessage",message:"The size of the frame to frame message exceeds the limits allowed.",j:"Ensure that the frame to frame message size is less than 1,000,000 characters."},Ic={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",j:"Only instantiate the AddonSession once."},Jc={errorType:"UserCancelled",
37
- message:"The user cancelled starting an activity.",j:"The user needs to click continue to start the activity."},Kc={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",j:"Do not call this method during a Meet call."},Lc={errorType:"InvalidAddonStartingState",message:"Origin of the AddonStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",j:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},
38
- Mc={errorType:"SizeLimitExceededAddonStartingState",message:"The size of the AddonStartingState URLs and/or its data exceed the limits allowed.",j:"Ensure that the AddonStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Nc={errorType:"MeetingPolicyPreventsStartingActivity",message:"A meeting policy (such as using host control settings) prevents the user from starting the activity.",j:"Have a meeting host or administrator modify the necessary settings to allow the current user to start the activity."};
39
- function Oc(a){switch(a){case 0:return M;case 1:return sc;case 2:return tc;case 3:return Bc;case 4:return Cc;case 5:return Ec;case 6:return oc;case 7:return Fc;case 8:return Gc;case 9:return Hc;case 10:return Jc;case 11:return Kc;case 12:return Lc;case 13:return Mc;case 14:return Dc;case 15:return Nc;default:return M}}
40
- function Pc(a){var b,c=(b=G(a,1))!=null?b:0;a=Qc(A(a,jc));switch(c){case 1:return{errorType:"InternalError",message:`Could not connect to ${a} channel. Meet did not respond with a MessagePort.`,j:"No further information is available."};case 2:return{errorType:"InternalError",message:`Could not connect to ${a}. A conflicting ${a} exists.`,j:"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}.`,
41
- j:"This method might require EAP enrollment."};case 4:return{errorType:"InternalError",message:`Could not connect to ${a} channel. The addon is not authorized for this ${a}.`,j:"No further information is available."};case 0:return Ac(a);case 5:a:switch(a){case "co":c={errorType:"InternalError",message:`Could not connect to ${a} channel. The coActivity was not found.`,j:`Consider starting the ${a} only after after the startActivity promise returns.`};break a;default:c={errorType:"InternalError",message:`Could not connect to ${a} channel.`,
42
- j:"No further information is available."}}return c;default:return Ac(a)}}function Qc(a){switch(a){case 2:return"co";case 3:return"gd";case 0:return"unknown";default:return"unknown"}}function O({errorType:a,message:b,j:c},d=""){throw new L({errorType:a,message:d?`${b} ${d}`:b,j:c});}function Rc(a,b){O({...lc,message:`${lc.message}: ${a}. In URL ${b}`})};function Sc(a){var b=new Tc;return J(b,1,a)}function Uc(a,b){return C(a,2,x(b),"")}function Vc(a,b){return C(a,3,x(b),"")}var Tc=class extends K{getFrameType(){return G(this,1)}};function Wc(a){var b=a.m,c=b;b=b[n]|0;var d=Tc,e=!p(a,b);e&&Db(a)&&(c=a.m,b=c[n]|0);a=Hb(c,1);var f=Array.isArray(a)?a:Ga,g=f===Ga?7:f[n]|0;a=g;2&b&&(a|=2);var h=a|1;if(a=!(4&h)){var l=f,r=b;let v=!!(2&h);v&&(r|=2);let q=!v,B=!0,E=0,H=0;for(;E<l.length;E++){let ca=qb(l[E],d,r);if(ca instanceof d){if(!v){let uc=p(ca);q&&(q=!uc);B&&(B=uc)}l[H++]=ca}}H<E&&(l.length=H);h|=4;h=B?h&-4097:h|4096;h=q?h|8:h&-9}h!==g&&(f[n]=h,2&h&&Object.freeze(f));if(e&&!(8&h||!f.length&&(2&h||!(16&h)&&32&b))){Kb(h)&&(f=[...f],
43
- h=Tb(h,b),b=z(c,b,1,f));d=f;e=h;for(g=0;g<d.length;g++)l=d[g],h=Cb(l),l!==h&&(d[g]=h);e|=8;h=e=d.length?e|4096:e&-4097;f[n]=h}e=d=h;Kb(d)||(2&d||!(16&d)&&32&b?(d|=!f.length||a&&!(4096&d)||32&b&&!(4096&d||16&d)?2:256,d!==e&&(f[n]=d),Object.freeze(f)):(d|=16,d!==e&&(f[n]=d)));2&d||!(4096&d||16&d)||Fb(c,b);return f}function Xc(a){var b=new Yc;return Sb(b,a)}var Yc=class extends K{};var Zc=class extends K{};function $c(a){return Pb(a,Yc,1)}var ad=class extends K{};var bd=class extends K{};var cd=class extends K{};var dd=class extends K{};var ed=class extends K{getMeetPlatformInfo(){return Pb(this,cd,1)}};var fd=class extends K{getMeetingInfo(){return Pb(this,dd,1)}};var gd=class extends K{},P=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21];var hd=class extends K{};var id=class extends K{};var jd=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),kd=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function ld(a){a&&typeof a.dispose=="function"&&a.dispose()};function Q(){this.u=this.u;this.h=this.h}Q.prototype.u=!1;Q.prototype.dispose=function(){this.u||(this.u=!0,this.I())};Q.prototype[Symbol.dispose]=function(){this.dispose()};function md(a,b){a.u?b():(a.h||(a.h=[]),a.h.push(b))}Q.prototype.I=function(){if(this.h)for(;this.h.length;)this.h.shift()()};function nd({K:a,S:b}){if(a===null)throw new L(zc("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new L(N("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new L(N("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new L(N("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!==
44
- "string")throw new L(N("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new L(wc);if(Object.keys(a).length===0)throw new L(vc);}}function od(a){var b=[];b.push(Vc(Uc(Sc(2),a.mainStageUrl),a.additionalData));b.push(Vc(Uc(Sc(1),a.sidePanelUrl),a.additionalData));return b}
45
- var xd=class extends Q{constructor(a){super();this.context=a;this.i={};pd(this.context.h.U,b=>{switch(A(b.content,P)){case 7:let d=this.i.frameToFrameMessage;b=I(b.content,bd,7,P);if(d&&b){var c=G(b,1);c=jd.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:F(b,2)})}}},this)}async getMeetingInfo(){var a=await qd(this.context.h);var b=a.getMeetingInfo();b=F(b,1);a=a.getMeetingInfo();a=F(a,2);return{meetingId:b,meetingCode:a}}async getFrameOpenReason(){var a,b=(a=this.context.i.fa)!=
46
- null?a:0,c;return(c=kd.get(b))!=null?c:"UNKNOWN"}async getActivityStartingState(){var a=$c(await rd(this.context.h)),b=a==null?void 0:Wc(a).find(c=>c.getFrameType()===2);a=a==null?void 0:Wc(a).find(c=>c.getFrameType()===1);a==null||F(a,3);b==null||F(b,3);return{mainStageUrl:(b==null?void 0:F(b,2))||void 0,sidePanelUrl:(a==null?void 0:F(a,2))||void 0,additionalData:(a==null?void 0:F(a,3))||void 0}}async setActivityStartingState(a){nd({K:a,S:!0});var b=od(a);a=sd;var c=this.context.h;var d=new hd;b=
47
- Xc(b);d=Rb(d,1,b);await a(c,d)}on(a,b){this.i[a]=b}async getMeetPlatformInfo(){var a=(await td(this.context.h)).getMeetPlatformInfo();return{isMeetHardware:Ub(a)}}async closeAddon(){await ud(this.context.h)}async startActivity(a){nd({K:a,S:!1});var b=new id;a&&(a=od(a),a=Xc(a),Rb(b,1,a));await vd(this.context.h,b)}async endActivity(a){var b=wd,c=this.context.h,d=new Zc;a=J(d,1,a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0);await b(c,a)}};var yd=$b(class extends K{getFrameOpenReason(){return G(this,5)}});function zd(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");if(c)b=yd(atob(c));else{var d;((d=window.top)!=null?d:window)===window?O(pc):Rc("meet_sdk",b);b=void 0}(c=F(b,1))||Rc("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new L(qc);(d=F(b,2))||Rc("meet_control_channel_name",a);var e=F(b,4);e||Rc("addon_cloud_project_number",a);var f;a=(f=b.getFrameOpenReason())!=null?f:0;f=F(b,3)||"https://meet.google.com";return{fa:a,frameType:c,
48
- ea:d,cloudProjectNumber:e,T:f}};var Ad=class extends K{};var Bd=class extends K{};var Cd=class extends K{};function Dd(){var a=new Ed,b=new Cd;return D(a,1,Fd,b)}var Ed=class extends K{},Fd=[1,2];function Gd(a){var b=new Hd;return Rb(b,2,a)}function Id(a,b){return C(a,3,x(b),"")}var Hd=class extends K{};var Jd=class extends K{};var Kd=class extends K{};var Ld=class extends K{};var Md=class extends K{};var Nd=class extends K{};var Od=class extends K{};var Pd=class extends K{setAddonStartingState(a){return Rb(this,1,a)}};var Qd=class extends K{};function Rd(a,b){return D(a,2,R,b)}var S=class extends K{},R=[1,2,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20];function Sd(a){return I(a,gd,2,Td)}var Ud=class extends K{},Vd=$b(Ud),Td=[1,2];class Wd{constructor(a,b){this.data=a;this.channel=b}};var Xd=Promise;function Yd(a){var b=new MessageChannel;Zd(b.port1,a);return b}function $d(a,b){Zd(a,b);return new ae(a)}class ae{constructor(a){this.h=a}send(a,b,c=[]){b=Yd(b);this.h.postMessage(a,[b.port2].concat(c))}F(a,b){return new Xd(c=>{this.send(a,c,b)})}}function Zd(a,b){b&&(a.onmessage=c=>{var d=c.data;c=$d(c.ports[0]);b(new Wd(d,c))})};var be=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?a=>a&&AsyncContext.Snapshot.wrap(a):a=>a;function ce(a,b){a.o(b);a.i<100&&(a.i++,b.next=a.h,a.h=b)}class de{constructor(a,b){this.l=a;this.o=b;this.i=0;this.h=null}get(){if(this.i>0){this.i--;var a=this.h;this.h=a.next;a.next=null}else a=this.l();return a}};function ee(){var a=fe,b=null;a.h&&(b=a.h,a.h=a.h.next,a.h||(a.i=null),b.next=null);return b}class ge{constructor(){this.i=this.h=null}add(a,b){var c=he.get();c.set(a,b);this.i?this.i.next=c:this.h=c;this.i=c}}var he=new de(()=>new ie,a=>a.reset());class ie{constructor(){this.next=this.h=this.i=null}set(a,b){this.i=a;this.h=b;this.next=null}reset(){this.next=this.h=this.i=null}};let je,ke=!1,fe=new ge,me=(a,b)=>{je||le();ke||(je(),ke=!0);fe.add(a,b)},le=()=>{var a=Promise.resolve(void 0);je=()=>{a.then(ne)}};function ne(){for(var a;a=ee();){try{a.i.call(a.h)}catch(b){k(b)}ce(he,a)}ke=!1};function oe(){};function T(a){this.h=0;this.Y=void 0;this.o=this.i=this.l=null;this.v=this.B=!1;if(a!=oe)try{let b=this;a.call(void 0,function(c){pe(b,2,c)},function(c){pe(b,3,c)})}catch(b){pe(this,3,b)}}function qe(){this.next=this.context=this.i=this.o=this.h=null;this.l=!1}qe.prototype.reset=function(){this.context=this.i=this.o=this.h=null;this.l=!1};var re=new de(function(){return new qe},function(a){a.reset()});function se(a,b,c){var d=re.get();d.o=a;d.i=b;d.context=c;return d}
49
- function te(){var a,b,c=new T(function(d,e){a=d;b=e});return new ue(c,a,b)}T.prototype.then=function(a,b,c){return ve(this,be(typeof a==="function"?a:null),be(typeof b==="function"?b:null),c)};T.prototype.$goog_Thenable=!0;function we(a,b){b=be(b);b=se(b,b);b.l=!0;xe(a,b)}T.prototype.cancel=function(a){if(this.h==0){let b=new U(a);me(function(){ye(this,b)},this)}};
50
- function ye(a,b){if(a.h==0)if(a.l){var c=a.l;if(c.i){var d=0,e=null,f=null;for(let g=c.i;g&&(g.l||(d++,g.h==a&&(e=g),!(e&&d>1)));g=g.next)e||(f=g);e&&(c.h==0&&d==1?ye(c,b):(f?(d=f,d.next==c.o&&(c.o=d),d.next=d.next.next):ze(c),Ae(c,e,3,b)))}a.l=null}else pe(a,3,b)}function xe(a,b){a.i||a.h!=2&&a.h!=3||Be(a);a.o?a.o.next=b:a.i=b;a.o=b}
51
- function ve(a,b,c,d){var e=se(null,null,null);e.h=new T(function(f,g){e.o=b?function(h){try{let l=b.call(d,h);f(l)}catch(l){g(l)}}:f;e.i=c?function(h){try{let l=c.call(d,h);l===void 0&&h instanceof U?g(h):f(l)}catch(l){g(l)}}:g});e.h.l=a;xe(a,e);return e.h}T.prototype.Z=function(a){this.h=0;pe(this,2,a)};T.prototype.aa=function(a){this.h=0;pe(this,3,a)};
52
- function pe(a,b,c){if(a.h==0){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.h=1;a:{var d=c,e=a.Z,f=a.aa;if(d instanceof T){xe(d,se(e||oe,f||null,a));var g=!0}else{if(d)try{var h=!!d.$goog_Thenable}catch(l){h=!1}else h=!1;if(h)d.then(e,f,a),g=!0;else{h=typeof d;if(h=="object"&&d!=null||h=="function")try{let l=d.then;if(typeof l==="function"){Ce(d,l,e,f,a);g=!0;break a}}catch(l){f.call(a,l);g=!0;break a}g=!1}}}g||(a.Y=c,a.h=b,a.l=null,Be(a),b!=3||c instanceof U||De(a,c))}}
53
- function Ce(a,b,c,d,e){function f(l){h||(h=!0,d.call(e,l))}function g(l){h||(h=!0,c.call(e,l))}var h=!1;try{b.call(a,g,f)}catch(l){f(l)}}function Be(a){a.B||(a.B=!0,me(a.oa,a))}function ze(a){var b=null;a.i&&(b=a.i,a.i=b.next,b.next=null);a.i||(a.o=null);return b}T.prototype.oa=function(){for(var a;a=ze(this);)Ae(this,a,this.h,this.Y);this.B=!1};
54
- function Ae(a,b,c,d){if(c==3&&b.i&&!b.l)for(;a&&a.v;a=a.l)a.v=!1;if(b.h)b.h.l=null,Ee(b,c,d);else try{b.l?b.o.call(b.context):Ee(b,c,d)}catch(e){Fe.call(null,e)}ce(re,b)}function Ee(a,b,c){b==2?a.o.call(a.context,c):a.i&&a.i.call(a.context,c)}function De(a,b){a.v=!0;me(function(){a.v&&Fe.call(null,b)})}var Fe=k;function U(a){ja.call(this,a)}ia(U,ja);U.prototype.name="cancel";function ue(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let Ge=1,He=new WeakMap;function Ie(a,b,c){var d=Je;a.i.has(b);d(b,c)}var Le=class extends Q{constructor(){super();this.i=new Set}signal(){var a=new Ke;this.i.add(a);md(this,ha(ld,a));return a}};function Je(a,b){return new Promise(c=>{Me(()=>{a.M&&(a.ha=b,a.R=!0);for(let {J:d,slot:e}of a.A.values())try{e(b,{signal:a,J:d})}catch(f){k(f)}for(let d of a.D)d.resolve(b);a.D.clear();c()})})}function pd(a,b,c){var d=Ge++;Me(()=>{Ne(a,d,b,c)})}
55
- function Ne(a,b,c,d){if(!a.u)if(d){if(!d.u){let e=()=>{Me(()=>{a.A.delete(b);var f=He.get(d);f&&qa(f,e)})};a.A.set(b,{J:b,slot:c,H:e});Oe(d,e)}}else a.A.set(b,{J:b,slot:c,H:()=>a.A.delete(b)})}
56
- var Ke=class extends Q{constructor(){super();this.M=!1;this.A=new Map;this.D=new Set;this.R=!1}detach(a){Me(()=>{var b=this.A.get(a);b&&b.H()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){var c=te();Me(()=>{if(this.u)c.reject(new U("Signal initially disposed"));else if(b&&b.u)c.reject(new U("Owner initially disposed"));else if(a&&this.M&&this.R)c.resolve(this.ha);else if(this.D.add(c),we(c.promise,()=>{this.D.delete(c)}),b){let d=()=>{c.reject(new U("Owner asynchronously disposed"))};
57
- we(c.promise,()=>{var e=He.get(b);e&&qa(e,d)});Oe(b,d)}});return c.promise}I(){super.I();Me(()=>{for(let {H:a}of this.A.values())a();this.A.clear();for(let a of this.D)a.reject(new U("Signal asynchronously disposed"));this.D.clear()})}};const Pe=[];let Qe=!1;function Me(a){Pe.push(a);Re()}async function Re(){if(!Qe)try{Qe=!0;let a=Se(0);for(;a<Pe.length;)await Promise.resolve(),a=Se(a)}catch(a){k(a)}finally{Pe.length=0,Qe=!1}}
58
- function Se(a){for(var b=a+100;a<b&&a<Pe.length;)try{Pe[a++]()}catch(c){k(c)}return a}function Oe(a,b){if(a.u)b();else{var c=He.get(a);if(c)c.push(b);else{let d=[b];He.set(a,d);md(a,()=>{for(let e of[...d])e();He.delete(a)})}}};function V(a){var b=new Ud;a=D(b,1,Td,a);return{content:JSON.stringify(vb(a))}}const Te=new Le;function Ue(a,b){var c=Te.signal();return{channel:$d(a,d=>{var e=b(d.data);Ie(Te,c,{content:e,na:d})}),signal:c}};let Yb;var Ve=class extends K{};var We=class extends K{};var Ye=class extends K{l(){return I(this,Ve,2,Xe)}i(){return Jb(this,2,Xe)}o(){return I(this,We,3,Xe)}v(){return Jb(this,3,Xe)}},Xe=[2,3];var Ze=$b(class extends K{});var $e=$b(class extends K{}),af=[1,2];var bf=({destination:a,origin:b,sa:c,ba:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");var f=Yd(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return $d(f.port1,e)};function cf(a,b,c){var d=new Le,e=d.signal();a=bf({destination:window.parent,origin:b,ba:a,onMessage:f=>{var g=Vd(f.data.content);A(g,Td)===2&&Ie(d,e,{content:Sd(g),na:f,messagePort:f.data.messagePort})}});return new df(e,a,c)}async function qd(a){var b=W;var c=new S;var d=new Ld;c=D(c,19,R,d);a=await b(a,V(c));var e;return(e=Sd(Vd(a.data.content)))==null?void 0:I(e,fd,20,P)}
59
- async function rd(a){var b=W;var c=new S;var d=new Bd;c=D(c,17,R,d);a=await b(a,V(c));var e;return(e=Sd(Vd(a.data.content)))==null?void 0:I(e,ad,18,P)}async function sd(a,b){var c=W,d=new S;b=D(d,8,R,b);await c(a,V(b))}async function td(a){var b=W;var c=new S;var d=new Kd;c=D(c,18,R,d);a=await b(a,V(c));var e;return(e=Sd(Vd(a.data.content)))==null?void 0:I(e,ed,19,P)}async function ud(a){var b=W;var c=new S;var d=new Ad;c=D(c,11,R,d);await b(a,V(c))}
60
- async function vd(a,b){var c=W,d=new S;b=D(d,14,R,b);await c(a,V(b))}async function wd(a,b){var c=W,d=new S;b=D(d,15,R,b);await c(a,V(b))}async function ef(a){await a.i()}
61
- async function W(a,b){(a=await a.channel.F(b))||O(M,`Falsy response received from the message channel. ${JSON.stringify(a)}`);(b=a.data)||O(M,`Data field in the response from the message channel is falsy. ${JSON.stringify(b)}`);(b=b.content)||O(M,`Content field in the response from the message channel is falsy. ${JSON.stringify(b)}`);var c=void 0;try{c=Vd(b)}catch(d){O(M,`The ControlMessage can't be deserialized. ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=Sd(c))||O(M,`MeetToAddonMessage field on ControlMessage is falsy. ${JSON.stringify(b)}`);
62
- b=b==null?void 0:I(b,kc,10,P);if((b==null?void 0:G(b,1))!==void 0)throw a=G(b,1),new L(Oc(a));return a}async function ff(a,b,c){var d=W,e=new S;b=D(e,1,R,b);d=await d(a,V(b));a=d.data.messagePort;var f;(d=(f=Sd(Vd(d.data.content)))==null?void 0:I(f,ic,1,P))!=null?f=d:(f=new ic,f=J(f,1,0));return{channel:a?Ue(a,c):void 0,response:f}}async function gf(a){var b=Dd(),{channel:c,response:d}=await ff(a,b,e=>$e(e));if(!c)throw new L(Pc(d));return c}
63
- async function hf(a){var b=W;var c=new S;var d=new Qd;c=D(c,5,R,d);await b(a,V(c))}async function jf(a){var b=W;var c=new S;var d=new Jd;c=D(c,6,R,d);await b(a,V(c))}async function kf(a,b,c){var d=W,e=new S,f=new Md;b=J(f,1,b);c=C(b,2,x(c),"");e=D(e,7,R,c);await d(a,V(e))}async function lf(a,b){var c=W,d=new S;b=D(d,16,R,b);await c(a,V(b))}
64
- class df extends Q{constructor(a,b,c){super();this.U=a;this.channel=b;this.i=fc(async()=>{var d=this.channel,e=d.F;var f=new S;var g=new Nd;f=D(f,13,R,g);await e.call(d,V(f))});a=Xb();F(a,4);jb(y(a,1));jb(y(a,2));jb(y(a,3));c=Rd(new S,Id(Gd(a),c));this.channel.send(V(c));pd(this.U,async d=>{switch(A(d.content,P)){case 16:await ef(this)}},this)}};let mf;var nf=class{constructor(a){var b=mf;this.i=a;this.h=b}delete(){throw Error("Not implemented.");}};var pf=class extends K{l(){return I(this,Ve,2,of)}i(){return Jb(this,2,of)}o(){return I(this,We,3,of)}v(){return Jb(this,3,of)}},of=[2,3];var qf=class extends K{};var rf=class extends K{};var sf=class extends K{};var uf=class extends K{l(){return I(this,Ve,2,tf)}i(){return Jb(this,2,tf)}o(){return I(this,We,3,tf)}v(){return Jb(this,3,tf)}},tf=[2,3],vf=[5,6];var wf=class extends K{};var xf=class extends K{},yf=[1,2,3];var zf=class extends Error{constructor(){super("Failed to create CoActivity: Connection refused - Meet refused to begin Live Sharing")}};var Af=class{constructor(a){this.config=a}start(){this.h!=null||(this.h=setInterval(()=>{this.config.ka()},this.config.ga));return this}shutdown(){clearInterval(this.h)}};function Bf(a){return Va(a)?Number(a):String(a)};function Cf(){var a=new Map,b={set(c,d){a.set(c,d);return b},G:()=>a};return b};function Df(a){if(a.i()){a=a.l();a=y(a,1,void 0,Lb);var b=a==null?va():a;a=Uint8Array;xa(ua);var c=b.h;if(!(c==null||c!=null&&c instanceof Uint8Array))if(typeof c==="string"){c=ra.test(c)?c.replace(ra,ta):c;c=atob(c);let 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.h=c;return{bytes:new a(b||0)}}}function Ef(a,b){b=Ff(b);D(a,2,tf,b);return a}function Gf(a,b){b=Ff(b);D(a,2,of,b);return a}
65
- function Ff(a){var b=new Ve;return C(b,1,Ka(a.bytes,!1),va())}function Hf(a){if(a.v()){a=a.o();var b,c=F(a,1);var d=(b=Pb(a,ac,2))==null?void 0:Vb(b);b=d!=null?Bf(d):void 0;b=b!=null?b:0;let e;d=(e=y(a,4,void 0,gb))!=null?e:0;return{mediaId:c,mediaPlayoutPosition:b,mediaPlayoutRate:d,playbackState:If.get(G(a,3))}}}function Jf(a,b){b=Kf(b);D(a,3,tf,b);return a}function Lf(a,b){b=Kf(b);D(a,3,of,b);return a}
66
- const If=Cf().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").G(),Mf=Cf().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).G();function Kf(a){var b=new We;b=C(b,1,x(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=C(b,4,c,0);c=new ac;c=Wb(c,a.mediaPlayoutPosition);b=Rb(b,2,c);a=Mf.get(a.playbackState);return J(b,3,a)}
67
- function Nf({activityTitle:a}){var b=new sf;return Ib(b,4,x(a))}function Of(a,b){var c=new rf;b=J(c,1,b.C);D(a,6,vf,b);return a}function Pf(a){var b=new qf;D(a,5,vf,b);return a};const Qf=Cf().set("co-doing",1).set("co-watching",2).G();async function Rf(a,b,c){var d=b.F,e=new xf;var f=new wf;f=C(f,1,x(a.activityTitle),"");var g=Qf.get(a.L);f=J(f,2,g);e=D(e,3,yf,f);d=await d.call(b,e,Ze);var h;if((h=Ub(d))!=null&&h)return new Sf(a,b,c,Pb(d,Ye,2));throw new zf;}function Tf(a,b){var c=a.config.O(b);c&&!a.config.N(a.h,c)&&(a.h=c,a.l=Bf(Vb(b)),a.v(a.h))}function X(a,b){var {state:c,ia:d,context:e}=b(a.h);a.h=c;a.notify(a.h,e,d)}
68
- class Sf{constructor(a,b,c,d){this.o=a;this.i=b;this.config=c;this.v=bc(e=>void this.o.P(e));Uf(this.i,e=>{var f=A(e,af);switch(f){case 1:Tf(this,I(e,Ye,1,af));break;case 2:case 0:console.warn(`IllegalMessage: ${f} - Unhandled message - Please raise a bug with the MeetJS team`)}});this.B=(new Af({ga:1E3,ka:()=>{var e,f,g=(f=(e=this.o).ma)==null?void 0:f.call(e);if(this.h!==null){this.h={...this.h,...g};e=new xf;f=this.config;g=f.W;var h=new pf;h=Wb(h,this.l);f=g.call(f,h,this.h);e=D(e,1,yf,f);this.i.send(e)}}})).start();
69
- this.h=null;this.l=0;d&&Tf(this,d)}disconnect(){this.i.shutdown();this.B.shutdown()}notify(a,b,c){var d=c?Nf(c):void 0;c=this.config;var e=c.X;var f=new uf;f=Wb(f,this.l);d=Rb(f,4,d);a=e.call(c,d,a);a=this.config.V(a,b);b=this.i;c=b.send;e=new xf;a=D(e,2,yf,a);c.call(b,a)}};var Vf=class{constructor(a){this.h=a}broadcastStateUpdate(a){X(this.h,()=>({state:a,context:{}}))}disconnect(){this.h.disconnect()}};function Wf(a,b){return a==null||b==null?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var Xf=class{constructor(a){this.h=a}notifySwitchedToMedia(a,b,c){X(this.h,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},ia:{activityTitle:a},context:{C:1}}))}notifyPauseState(a,b){X(this.h,c=>{if(c==null)throw Error("Invalid before coWatchingState");return{state:{...c,playbackState:a?"PAUSE":"PLAY",mediaPlayoutPosition:b},context:{C:3}}})}notifySeekToTimestamp(a){X(this.h,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},
70
- context:{C:2}}})}notifyPlayoutRate(a){X(this.h,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutRate:a},context:{C:4}}})}notifyBuffering(a){X(this.h,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a,playbackState:"BUFFERING"},context:{C:3}}})}notifyReady(a){X(this.h,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},context:{C:3}}})}disconnect(){this.h.disconnect()}};
71
- function Yf(a,b){if(a==null||b==null)return!1;var 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};function Uf(a,b){pd(a.signal,c=>{b(c)},a.h)}var Zf=class{constructor(a,b){this.channel=a;this.signal=b;this.h=new Q}send(a){this.channel.send(JSON.stringify(vb(a)))}async F(a,b){a=await this.channel.F(JSON.stringify(vb(a)));return b(a.data)}shutdown(){this.h.dispose()}};function $f(a,b){var c=ag,d=a.signal(),e=a.signal();pd(b,f=>{var g=c(f)?d:e;Ie(a,g,f)},a);return{la:d,ja:e}}function bg(a,b,c,d){var e=d!=null?d:f=>f;pd(c,f=>{Ie(a,b,e(f))},a)};async function cg(a,b){if(b)return a=await Rf({activityTitle:b.activityTitle,L:"co-watching",ma:()=>b.onCoWatchingStateQuery(),P:c=>{b.onCoWatchingStateChanged(c)}},a,{X:Jf,W:Lf,V:Of,O:Hf,N:Yf}),new Xf(a)}async function dg(a,b){if(b)return a=await Rf({activityTitle:b.activityTitle,L:"co-doing",P:c=>{b.onCoDoingStateChanged(c)}},a,{X:Ef,W:Gf,V:Pf,O:Df,N:Wf}),new Vf(a)}
72
- async function eg(a){var b=new Le,c=b.signal();a=await a;bg(b,c,a.signal,f=>f.content);var {la:d,ja:e}=$f(b,c);b=new Zf(a.channel,d);c=new Zf(a.channel,e);return{ca:b,da:c}}function ag(a){a:switch(A(a,af)){case 1:a=I(a,Ye,1,af);break a;default:throw Error("CA Message arrived with no known content message set");}return a.i()};async function fg(a,b){({ca:a}=await eg(gf(a.h)));b=await dg(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function gg(a,b){({da:a}=await eg(gf(a.h)));b=await cg(a,b);if(!b)throw Error("Failed to create co-watching session");return b};var hg=class extends xd{async notifySidePanel(a){await kf(this.context.h,1,a)}async unloadSidePanel(){await hf(this.context.h)}async loadSidePanel(){await jf(this.context.h)}};var ig=class extends xd{async setAddonStartingState(a){if(a===null)throw new L(zc("addonStartingState"));if(typeof a!=="object")throw new L(N("addonStartingState",typeof a,"object | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new L(N("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!=="string")throw new L(N("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.sidePanelUrl+
73
- +!!a.additionalData)throw new L(yc);if(Object.keys(a).length===0)throw new L(xc);var b=[];b.push(Vc(Uc(Sc(1),a.sidePanelUrl),a.additionalData));a=this.context.h;var c=new Pd,d=c.setAddonStartingState,e=new Od;b=Sb(e,b);await lf(a,d.call(c,b))}};var jg=class extends xd{async notifyMainStage(a){await kf(this.context.h,2,a)}};var kg=class{constructor(a){a=a.cloudProjectNumber;var b=zd();if(b.cloudProjectNumber!==a)throw new L(rc);var c=b.T,d=b.ea,e;mf=(e=mf)!=null?e:cf(d,c,a);this.h=new nf(b)}async createMainStageClient(){var a=this.h;if(a.i.frameType!==2)throw new L(mc);return await Promise.resolve(new hg(a))}async createSidePanelClient(){var a=this.h;if(a.i.frameType!==1)throw new L(nc);return await Promise.resolve(new jg(a))}async createCoWatchingClient(a){return await gg(this.h,a)}async createCoDoingClient(a){return await fg(this.h,
74
- a)}async createRoomsStandaloneClient(){var a=this.h;if(a.i.frameType!==2)throw new L(mc);return await Promise.resolve(new ig(a))}};let lg=null;for(var mg={addon:{getFrameType:function(){a:{var a=zd().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},createAddonSession:async function(a){if(a===null)throw new L(zc("config"));if(typeof a!=="object")throw new L(N("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new L(N("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(lg&&zd().T!=="integration.test.google.com")throw new L(Ic);
75
- return lg=new kg(a)}}},ng=["meet"],Y=fa,Z;ng.length&&(Z=ng.shift());)ng.length||mg===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=mg;}).apply(topLevel);export const meet = topLevel.meet;
7
+ var l=this||self;function ea(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)}}function fa(a,b){function c(){}c.prototype=b.prototype;a.ca=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Z=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 m(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,m);else{let c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));b!==void 0&&(this.cause=b)}fa(m,Error);m.prototype.name="CustomError";function n(a){l.setTimeout(()=>{throw a;},0)};var ha,ia;a:{for(var ja=["CLOSURE_FLAGS"],ka=l,la=0;la<ja.length;la++)if(ka=ka[ja[la]],ka==null){ia=null;break a}ia=ka}var ma=ia&&ia[748402147];ha=ma!=null?ma:!0;function na(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};function oa(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let pa=void 0;function qa(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var ra=qa(),sa=qa(),ta=qa("m_m",!0);const t=qa("jas",!0);var ua;const va=[];va[t]=7;ua=Object.freeze(va);var wa={};function u(a,b){return b===void 0?a.h!==v&&!!(2&(a.l[t]|0)):!!(2&b)&&a.h!==v}const v={};Object.freeze({});var xa=typeof l.BigInt==="function"&&typeof l.BigInt(0)==="bigint";const ya=Number.MIN_SAFE_INTEGER.toString(),za=xa?BigInt(Number.MIN_SAFE_INTEGER):void 0,Aa=Number.MAX_SAFE_INTEGER.toString(),Ba=xa?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Ca(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){let d=a[c],e=b[c];if(d>e)return!1;if(d<e)return!0}};const Da=Number.isFinite;function Ea(a){if(a!=null){if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;Da(a)}}function w(a){if(a!=null&&typeof a!=="string")throw Error();return a}function Fa(a,b,c){if(a!=null&&a[ta]===wa)return a;if(Array.isArray(a)){var d=a[t]|0;c=d|c&32|c&2;c!==d&&(a[t]=c);return new b(a)}};function Ga(a){return a};function Ha(a,b,c,d){var e=d!==void 0;d=!!d;var f=[],g=a.length,h=4294967295,k=!1,q=!!(b&64),r=q?b&128?0:-1:void 0;if(!(b&1)){var p=g&&a[g-1];p!=null&&typeof p==="object"&&p.constructor===Object?(g--,h=g):p=void 0;if(q&&!(b&128)&&!e){k=!0;var y;h=((y=Ia)!=null?y:Ga)(h-r,r,a,p,void 0)+r}}b=void 0;for(e=0;e<g;e++)if(y=a[e],y!=null&&(y=c(y,d))!=null)if(q&&e>=h){let B=e-r,C;((C=b)!=null?C:b={})[B]=y}else f[e]=y;if(p)for(let B in p){a=p[B];if(a==null||(a=c(a,d))==null)continue;g=+B;let C;if(q&&!Number.isNaN(g)&&
8
+ (C=g+r)<h)f[C]=a;else{let P;((P=b)!=null?P:b={})[B]=a}}b&&(k?f.push(b):f[h]=b);return f}function Ja(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return(xa?a>=za&&a<=Ba:a[0]==="-"?Ca(a,ya):Ca(a,Aa))?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){let b=a[t]|0;return a.length===0&&b&1?void 0:Ha(a,b,Ja)}if(a!=null&&a[ta]===wa)return Ka(a);return}return a}let Ia;function Ka(a){a=a.l;return Ha(a,a[t]|0,Ja)};function La(a,b,c,d=0){if(a==null){var e=32;c?(a=[c],e|=128):a=[];b&&(e=e&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw Error("narr");e=a[t]|0;if(ha&&1&e)throw Error("rfarr");2048&e&&!(2&e)&&Ma();if(e&256)throw Error("farr");if(e&64)return(e|d)!==e&&(a[t]=e|d),a;if(c&&(e|=128,c!==a[0]))throw Error("mid");a:{c=a;e|=64;var f=c.length;if(f){var g=f-1;let k=c[g];if(k!=null&&typeof k==="object"&&k.constructor===Object){b=e&128?0:-1;g-=b;if(g>=1024)throw Error("pvtlmt");for(var h in k)if(f=+h,
9
+ f<g)c[f+b]=k[h],delete k[h];else break;e=e&-16760833|(g&1023)<<14;break a}}if(b){h=Math.max(b,f-(e&128?0:-1));if(h>1024)throw Error("spvt");e=e&-16760833|(h&1023)<<14}}}a[t]=e|64|d;return a}function Ma(){if(ha)throw Error("carr");if(sa!=null){var a;var b=(a=pa)!=null?a:pa={};a=b[sa]||0;a>=5||(b[sa]=a+1,b=Error(),oa(b,"incident"),n(b))}};function Na(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){var c=a[t]|0;a.length===0&&c&1?a=void 0:c&2||(!b||4096&c||16&c?a=x(a,c,!1,b&&!(c&16)):(a[t]|=34,c&4&&Object.freeze(a)));return a}if(a!=null&&a[ta]===wa)return b=a.l,c=b[t]|0,u(a,c)?a:Oa(a,b,c)?Pa(a,b):x(b,c)}function Pa(a,b,c){a=new a.constructor(b);c&&(a.h=v);a.i=v;return a}function x(a,b,c,d){d!=null||(d=!!(34&b));a=Ha(a,b,Na,d);d=32;c&&(d|=2);b=b&16769217|d;a[t]=b;return a}
10
+ function Qa(a){var b=a.l,c=b[t]|0;return u(a,c)?Oa(a,b,c)?Pa(a,b,!0):new a.constructor(x(b,c,!1)):a}function Ra(a){if(a.h!==v)return!1;var b=a.l;b=x(b,b[t]|0);b[t]|=2048;a.l=b;a.h=void 0;a.i=void 0;return!0}function Sa(a){if(!Ra(a)&&u(a,a.l[t]|0))throw Error();}function z(a,b){b===void 0&&(b=a[t]|0);b&32&&!(b&4096)&&(a[t]=b|4096)}function Oa(a,b,c){return c&2?!0:c&32&&!(c&4096)?(b[t]=c|2,a.h=v,!0):!1};function A(a,b){a=Ta(a.l,b);if(a!==null)return a}function Ta(a,b,c,d){if(b===-1)return null;var e=b+(c?0:-1),f=a.length-1;if(!(f<1+(c?0:-1))){if(e>=f){var g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object){c=g[b];var h=!0}else if(e===f)c=g;else return}else c=a[e];if(d&&c!=null){d=d(c);if(d==null)return d;if(!Object.is(d,c))return h?g[b]=d:a[e]=d,d}return c}}function Ua(a,b,c){Sa(a);var d=a.l;D(d,d[t]|0,b,c);return a}
11
+ function D(a,b,c,d){var e=c+-1,f=a.length-1;if(f>=0&&e>=f){let g=a[f];if(g!=null&&typeof g==="object"&&g.constructor===Object)return g[c]=d,b}if(e<=f)return a[e]=d,b;if(d!==void 0){let g;f=((g=b)!=null?g:b=a[t]|0)>>14&1023||536870912;c>=f?d!=null&&(a[f+-1]={[c]:d}):a[e]=d}return b}function Va(a){return!!(2&a)&&!!(4&a)||!!(256&a)}function E(a,b,c,d){Sa(a);var e=a.l;D(e,e[t]|0,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}function Wa(a,b){a=a.l;return Xa(Ya(a),a,void 0,b)}
12
+ function Ya(a){var b;return(b=a[ra])!=null?b:a[ra]=new Map}function Xa(a,b,c,d){var e=a.get(d);if(e!=null)return e;e=0;for(let f=0;f<d.length;f++){let g=d[f];Ta(b,g)!=null&&(e!==0&&(c=D(b,c,e)),e=g)}a.set(d,e);return e}function Za(a,b,c,d){var e=!1;d=Ta(a,d,void 0,f=>{var g=Fa(f,c,b);e=g!==f&&g!=null;return g});if(d!=null)return e&&!u(d)&&z(a,b),d}
13
+ function $a(a,b,c){var d=a.l,e=d[t]|0;b=Za(d,e,b,c);if(b==null)return b;e=d[t]|0;if(!u(a,e)){let f=Qa(b);f!==b&&(Ra(a)&&(d=a.l,e=d[t]|0),b=f,e=D(d,e,c,b),z(d,e))}return b}function ab(a){a==null&&(a=void 0);return a}function bb(a,b,c){c=ab(c);Ua(a,b,c);c&&!u(c)&&z(a.l);return a}
14
+ function F(a,b,c,d){d=ab(d);a:{var e=d;Sa(a);let h=a.l;var f=h[t]|0;if(e==null){var g=Ya(h);if(Xa(g,h,f,c)===b)g.set(c,0);else break a}else{g=h;let k=Ya(g),q=Xa(k,g,f,c);q!==b&&(q&&(f=D(g,f,q)),k.set(c,b))}D(h,f,b,e)}d&&!u(d)&&z(a.l);return a}
15
+ function cb(a,b){Sa(a);var c=a.l,d=c[t]|0;if(b==null)D(c,d,1);else{var e=b===ua?7:b[t]|0,f=e,g=Va(e),h=g||Object.isFrozen(b),k=!0,q=!0;for(let p=0;p<b.length;p++){var r=b[p];g||(r=u(r),k&&(k=!r),q&&(q=r))}g||(e=k?13:5,e=q?e&-4097:e|4096);h&&e===f||(b=[...b],f=0,e=db(e,d));e!==f&&(b[t]=e);d=D(c,d,1,b);2&e||!(4096&e||16&e)||z(c,d)}return a}function db(a,b){return a=(2&b?a|2:a&-3)&-273}function G(a,b){a=A(a,b);a=a==null||typeof a==="string"?a:void 0;return a!=null?a:""}
16
+ function eb(a,b){a=A(a,b);a=a==null?a:Da(a)?a|0:void 0;return a!=null?a:0}function H(a,b,c,d){c=Wa(a,d)===c?c:-1;return $a(a,b,c)}function fb(a,b){if(b!=null){if(!Da(b))throw a=Error("enum"),oa(a,"warning"),a;b|=0}return E(a,1,b,0)};function gb(){var a=hb||(hb=ib("[1,2,0]"));a=Qa(a);a=Ua(a,4,w("dev-1005918809"));var b=a.l,c=b[t]|0;return u(a,c)?a:Oa(a,b,c)?Pa(a,b):new a.constructor(x(b,c,!0))}var I=class{constructor(a){this.l=La(a,void 0,void 0,2048)}toJSON(){return Ka(this)}};I.prototype[ta]=wa;I.prototype.toString=function(){return this.l.toString()};function jb(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[t]|=32;b=new a(b)}return b}};var ib=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[t]|=34;return new a(b)}}(class extends I{});function kb(a){var b=new lb,c=Promise.resolve();return(...d)=>{var e;Date.now()-((e=b.L[b.index])!=null?e:-1*b.J)>=b.J?(b.L[b.index]=Date.now(),b.index=(b.index+1)%b.X,e=!0):e=!1;return e?a(...d):c}};var lb=class{constructor(){this.X=1;this.J=100;this.L=[];this.index=0}};var mb=class extends I{};var J=class extends Error{constructor({errorType:a,message:b,j:c}){super(`Meet add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},K={errorType:"InternalError",message:"An unexpected error has occurred.",j:"No further information is available."},nb={errorType:"MissingUrlParameter",message:"Missing required Meet SDK URL parameter",j:"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)."},
17
+ ob={errorType:"NeedsMainStageContext",message:"This method can only be invoked if the addon is running in the main stage.",j:"Use getFrameType to check whether the addon is running in the main stage before invoking this method."},pb={errorType:"NeedsSidePanelContext",message:"This method can only be invoked if the addon is running in the side panel.",j:"Use getFrameType to check whether the addon is running in the side panel before invoking this method."},qb={errorType:"NotSupportedInStandalone",
18
+ message:"This method is not supported in standalone mode.",j:"Do not call this method in standalone mode."},rb={errorType:"MustBeIframed",message:"The SDK must be run in an iframe as part of a Google Meet add-on.",j:"See https://developers.google.com/meet/add-ons/guides/deploy-add-on to deploy to Meet."},sb={errorType:"InternalError",message:"The frame type URL parameter is set to an unexpected value.",j:"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)."},
19
+ ub={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.",j:"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."},vb={errorType:"DestinationNotReady",
20
+ message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",j:"Make sure the destination frame has connected before sending messages to it."},wb={errorType:"InvalidActivityStartingState",message:"Origin of the ActivityStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",j:"Ensure that the ActivityStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},xb={errorType:"ActivityStartingStateMissingAttributes",
21
+ message:"The supplied ActivityStartingState object does not contain any recognized attributes.",j:"Ensure that the ActivityStartingState object contains at least one of the following attributes: mainStageUrl, sidePanelUrl, additionalData."},yb={errorType:"ActivityStartingStateUnrecognizedAttributes",message:"The supplied ActivityStartingState object contains attributes that are not recognized.",j:"Ensure that the ActivityStartingState object has only the following attributes: mainStageUrl, sidePanelUrl, additionalData."},
22
+ zb={errorType:"AddonStartingStateMissingAttributes",message:"The supplied AddonStartingState object does not contain any recognized attributes.",j:"Ensure that the AddonStartingState object contains at least one of the following attributes: sidePanelUrl, additionalData."},Ab={errorType:"AddonStartingStateUnrecognizedAttributes",message:"The supplied AddonStartingState object contains attributes that are not recognized.",j:"Ensure that the AddonStartingState object has only the following attributes: sidePanelUrl, additionalData."},
23
+ Bb=a=>({errorType:"ArgumentNullError",message:`The argument supplied for '${a}' was 'null' but a value was expected.`,j:"Ensure you are passing a value of the expected type for the argument."}),L=(a,b,c)=>({errorType:"ArgumentTypeError",message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,j:"Ensure the type of the argument provided matches the expected type."}),Cb={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",
24
+ j:"Ensure that no activity is ongoing."},Db={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",j:"Send one of the available commands in the frame message."},Eb={errorType:"NoActivityFound",message:"No activity found.",j:"Ensure that the activity is started before performing this operation."},Fb={errorType:"RequiresEapEnrollment",message:"This feature is only available to early access partners.",j:"Meet add-on early access enrollment is currently closed."},Gb={errorType:"UserNotInitiator",
25
+ message:"Operation cannot be performed because the user is not the initiator of the current activity.",j:"Ensure that the user is the initiator of the current activity or that the activity has ended."},Hb={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",j:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Ib={errorType:"SizeLimitExceededFrameToFrameMessage",
26
+ message:"The size of the frame to frame message exceeds the limits allowed.",j:"Ensure that the frame to frame message size is less than 1,000,000 characters."},Jb={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",j:"Only instantiate the AddonSession once."},Kb={errorType:"UserCancelled",message:"The user cancelled starting an activity.",j:"The user needs to click continue to start the activity."},Lb={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",
27
+ j:"Do not call this method during a Meet call."},Mb={errorType:"InvalidAddonStartingState",message:"Origin of the AddonStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",j:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},Nb={errorType:"SizeLimitExceededAddonStartingState",message:"The size of the AddonStartingState URLs and/or its data exceed the limits allowed.",j:"Ensure that the AddonStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},
28
+ Ob={errorType:"MeetingPolicyPreventsStartingActivity",message:"A meeting policy (such as using host control settings) prevents the user from starting the activity.",j:"Have a meeting host or administrator modify the necessary settings to allow the current user to start the activity."};
29
+ function Pb(a){switch(a){case 0:return K;case 1:return vb;case 2:return wb;case 3:return Cb;case 4:return Db;case 5:return Fb;case 6:return qb;case 7:return Gb;case 8:return Hb;case 9:return Ib;case 10:return Kb;case 11:return Lb;case 12:return Mb;case 13:return Nb;case 14:return Eb;case 15:return Ob;default:return K}}function M({errorType:a,message:b,j:c},d=""){throw new J({errorType:a,message:d?`${b} ${d}`:b,j:c});}function Qb(a,b){M({...nb,message:`${nb.message}: ${a}. In URL ${b}`})};function Rb(a){var b=new Sb;return fb(b,a)}function Tb(a,b){return E(a,2,w(b),"")}function Ub(a,b){return E(a,3,w(b),"")}var Sb=class extends I{getFrameType(){return eb(this,1)}};function Vb(a){var b=a.l,c=b;b=b[t]|0;var d=Sb,e=!(a?u(a,b):2&b);e&&a&&Ra(a)&&(c=a.l,b=c[t]|0);a=Ta(c,1);var f=Array.isArray(a)?a:ua,g=f===ua?7:f[t]|0;a=g;2&b&&(a|=2);var h=a|1;if(a=!(4&h)){var k=f,q=b;let r=!!(2&h);r&&(q|=2);let p=!r,y=!0,B=0,C=0;for(;B<k.length;B++){let P=Fa(k[B],d,q);if(P instanceof d){if(!r){let tb=u(P);p&&(p=!tb);y&&(y=tb)}k[C++]=P}}C<B&&(k.length=C);h|=4;h=y?h&-4097:h|4096;h=p?h|8:h&-9}h!==g&&(f[t]=h,2&h&&Object.freeze(f));if(e&&!(8&h||!f.length&&(2&h||!(16&h)&&32&b))){Va(h)&&
30
+ (f=[...f],h=db(h,b),b=D(c,b,1,f));d=f;e=h;for(g=0;g<d.length;g++)k=d[g],h=Qa(k),k!==h&&(d[g]=h);e|=8;h=e=d.length?e|4096:e&-4097;f[t]=h}e=d=h;Va(d)||(2&d||!(16&d)&&32&b?(d|=!f.length||a&&!(4096&d)||32&b&&!(4096&d||16&d)?2:256,d!==e&&(f[t]=d),Object.freeze(f)):(d|=16,d!==e&&(f[t]=d)));2&d||!(4096&d||16&d)||z(c,b);return f}function Wb(a){var b=new Xb;return cb(b,a)}var Xb=class extends I{};var Yb=class extends I{};function Zb(a){return $a(a,Xb,1)}var $b=class extends I{};var ac=class extends I{};var bc=class extends I{};var cc=class extends I{};var dc=class extends I{getMeetPlatformInfo(){return $a(this,bc,1)}};var ec=class extends I{getMeetingInfo(){return $a(this,cc,1)}};var fc=class extends I{},N=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21];var hc=class extends I{};var ic=class extends I{};var jc=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),kc=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function lc(a){a&&typeof a.dispose=="function"&&a.dispose()};function O(){this.u=this.u;this.i=this.i}O.prototype.u=!1;O.prototype.dispose=function(){this.u||(this.u=!0,this.D())};O.prototype[Symbol.dispose]=function(){this.dispose()};function mc(a,b){a.u?b():(a.i||(a.i=[]),a.i.push(b))}O.prototype.D=function(){if(this.i)for(;this.i.length;)this.i.shift()()};function nc({H:a,M:b}){if(a===null)throw new J(Bb("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new J(L("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new J(L("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new J(L("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!==
31
+ "string")throw new J(L("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new J(yb);if(Object.keys(a).length===0)throw new J(xb);}}function oc(a){var b=[];b.push(Ub(Tb(Rb(2),a.mainStageUrl),a.additionalData));b.push(Ub(Tb(Rb(1),a.sidePanelUrl),a.additionalData));return b}
32
+ var xc=class extends O{constructor(a){super();this.h=a;this.m={};pc(this.h.h.O,b=>{switch(Wa(b.content,N)){case 7:let d=this.m.frameToFrameMessage;b=H(b.content,ac,7,N);if(d&&b){var c=eb(b,1);c=jc.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:G(b,2)})}}},this)}async getMeetingInfo(){var a=await qc(this.h.h);var b=a.getMeetingInfo();b=G(b,1);a=a.getMeetingInfo();a=G(a,2);return{meetingId:b,meetingCode:a}}async getFrameOpenReason(){var a,b=(a=this.h.i.V)!=null?a:0,
33
+ c;return(c=kc.get(b))!=null?c:"UNKNOWN"}async getActivityStartingState(){var a=Zb(await rc(this.h.h)),b=a==null?void 0:Vb(a).find(c=>c.getFrameType()===2);a=a==null?void 0:Vb(a).find(c=>c.getFrameType()===1);a==null||G(a,3);b==null||G(b,3);return{mainStageUrl:(b==null?void 0:G(b,2))||void 0,sidePanelUrl:(a==null?void 0:G(a,2))||void 0,additionalData:(a==null?void 0:G(a,3))||void 0}}async setActivityStartingState(a){nc({H:a,M:!0});var b=oc(a);a=sc;var c=this.h.h;var d=new hc;b=Wb(b);d=bb(d,1,b);await a(c,
34
+ d)}on(a,b){this.m[a]=b}async getMeetPlatformInfo(){var a=(await tc(this.h.h)).getMeetPlatformInfo();a=A(a,1);a=a==null||typeof a==="boolean"?a:typeof a==="number"?!!a:void 0;return{isMeetHardware:a!=null?a:!1}}async closeAddon(){await uc(this.h.h)}async startActivity(a){nc({H:a,M:!1});var b=new ic;a&&(a=oc(a),a=Wb(a),bb(b,1,a));await vc(this.h.h,b)}async endActivity(a){var b=wc,c=this.h.h,d=new Yb;a=fb(d,a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0);await b(c,a)}};var yc=jb(class extends I{getFrameOpenReason(){return eb(this,5)}});function zc(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");if(c)b=yc(atob(c));else{var d;((d=window.top)!=null?d:window)===window?M(rb):Qb("meet_sdk",b);b=void 0}(c=G(b,1))||Qb("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new J(sb);(d=G(b,2))||Qb("meet_control_channel_name",a);var e=G(b,4);e||Qb("addon_cloud_project_number",a);var f;a=(f=b.getFrameOpenReason())!=null?f:0;f=G(b,3)||"https://meet.google.com";return{V:a,frameType:c,
35
+ U:d,cloudProjectNumber:e,N:f}};var Ac=class extends I{};var Bc=class extends I{};function Cc(a){var b=new Dc;return bb(b,2,a)}function Ec(a,b){return E(a,3,w(b),"")}var Dc=class extends I{};var Fc=class extends I{};var Gc=class extends I{};var Hc=class extends I{};var Ic=class extends I{};var Jc=class extends I{};var Kc=class extends I{};var Lc=class extends I{setAddonStartingState(a){return bb(this,1,a)}};var Mc=class extends I{};function Nc(a,b){return F(a,2,Q,b)}var R=class extends I{},Q=[1,2,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20];function Oc(a){return H(a,fc,2,Pc)}var Qc=class extends I{},Rc=jb(Qc),Pc=[1,2];class Sc{constructor(a){this.data=a}};var Tc=Promise;function Uc(a){var b=new MessageChannel;Vc(b.port1,a);return b}function Wc(a,b){Vc(a,b);return new Xc(a)}function Yc(a,b,c){c=Uc(c);a.h.postMessage(b,[c.port2].concat([]))}function Zc(a,b){return new Tc(c=>{Yc(a,b,c)})}class Xc{constructor(a){this.h=a}}function Vc(a,b){b&&(a.onmessage=c=>{var d=c.data;Wc(c.ports[0]);b(new Sc(d))})};var $c=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?a=>a&&AsyncContext.Snapshot.wrap(a):a=>a;function ad(a,b){a.o(b);a.i<100&&(a.i++,b.next=a.h,a.h=b)}class bd{constructor(a,b){this.m=a;this.o=b;this.i=0;this.h=null}get(){if(this.i>0){this.i--;var a=this.h;this.h=a.next;a.next=null}else a=this.m();return a}};function cd(){var a=dd,b=null;a.h&&(b=a.h,a.h=a.h.next,a.h||(a.i=null),b.next=null);return b}class ed{constructor(){this.i=this.h=null}add(a,b){var c=fd.get();c.set(a,b);this.i?this.i.next=c:this.h=c;this.i=c}}var fd=new bd(()=>new gd,a=>a.reset());class gd{constructor(){this.next=this.h=this.i=null}set(a,b){this.i=a;this.h=b;this.next=null}reset(){this.next=this.h=this.i=null}};let hd,id=!1,dd=new ed,kd=(a,b)=>{hd||jd();id||(hd(),id=!0);dd.add(a,b)},jd=()=>{var a=Promise.resolve(void 0);hd=()=>{a.then(ld)}};function ld(){for(var a;a=cd();){try{a.i.call(a.h)}catch(b){n(b)}ad(fd,a)}id=!1};function md(){};function S(a){this.h=0;this.P=void 0;this.o=this.i=this.m=null;this.v=this.F=!1;if(a!=md)try{let b=this;a.call(void 0,function(c){T(b,2,c)},function(c){T(b,3,c)})}catch(b){T(this,3,b)}}function nd(){this.next=this.m=this.i=this.v=this.h=null;this.o=!1}nd.prototype.reset=function(){this.m=this.i=this.v=this.h=null;this.o=!1};var od=new bd(function(){return new nd},function(a){a.reset()});function pd(a,b,c){var d=od.get();d.v=a;d.i=b;d.m=c;return d}
36
+ function qd(){var a,b,c=new S(function(d,e){a=d;b=e});return new rd(c,a,b)}S.prototype.then=function(a,b,c){return sd(this,$c(typeof a==="function"?a:null),$c(typeof b==="function"?b:null),c)};S.prototype.$goog_Thenable=!0;function td(a,b){b=$c(b);b=pd(b,b);b.o=!0;ud(a,b)}S.prototype.cancel=function(a){if(this.h==0){let b=new U(a);kd(function(){vd(this,b)},this)}};
37
+ function vd(a,b){if(a.h==0)if(a.m){var c=a.m;if(c.i){var d=0,e=null,f=null;for(let g=c.i;g&&(g.o||(d++,g.h==a&&(e=g),!(e&&d>1)));g=g.next)e||(f=g);e&&(c.h==0&&d==1?vd(c,b):(f?(d=f,d.next==c.o&&(c.o=d),d.next=d.next.next):wd(c),xd(c,e,3,b)))}a.m=null}else T(a,3,b)}function ud(a,b){a.i||a.h!=2&&a.h!=3||yd(a);a.o?a.o.next=b:a.i=b;a.o=b}
38
+ function sd(a,b,c,d){var e=pd(null,null,null);e.h=new S(function(f,g){e.v=b?function(h){try{let k=b.call(d,h);f(k)}catch(k){g(k)}}:f;e.i=c?function(h){try{let k=c.call(d,h);k===void 0&&h instanceof U?g(h):f(k)}catch(k){g(k)}}:g});e.h.m=a;ud(a,e);return e.h}S.prototype.R=function(a){this.h=0;T(this,2,a)};S.prototype.S=function(a){this.h=0;T(this,3,a)};
39
+ function T(a,b,c){if(a.h==0){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.h=1;a:{var d=c,e=a.R,f=a.S;if(d instanceof S){ud(d,pd(e||md,f||null,a));var g=!0}else{if(d)try{var h=!!d.$goog_Thenable}catch(k){h=!1}else h=!1;if(h)d.then(e,f,a),g=!0;else{h=typeof d;if(h=="object"&&d!=null||h=="function")try{let k=d.then;if(typeof k==="function"){zd(d,k,e,f,a);g=!0;break a}}catch(k){f.call(a,k);g=!0;break a}g=!1}}}g||(a.P=c,a.h=b,a.m=null,yd(a),b!=3||c instanceof U||Ad(a,c))}}
40
+ function zd(a,b,c,d,e){function f(k){h||(h=!0,d.call(e,k))}function g(k){h||(h=!0,c.call(e,k))}var h=!1;try{b.call(a,g,f)}catch(k){f(k)}}function yd(a){a.F||(a.F=!0,kd(a.Y,a))}function wd(a){var b=null;a.i&&(b=a.i,a.i=b.next,b.next=null);a.i||(a.o=null);return b}S.prototype.Y=function(){for(var a;a=wd(this);)xd(this,a,this.h,this.P);this.F=!1};
41
+ function xd(a,b,c,d){if(c==3&&b.i&&!b.o)for(;a&&a.v;a=a.m)a.v=!1;if(b.h)b.h.m=null,Bd(b,c,d);else try{b.o?b.v.call(b.m):Bd(b,c,d)}catch(e){Cd.call(null,e)}ad(od,b)}function Bd(a,b,c){b==2?a.v.call(a.m,c):a.i&&a.i.call(a.m,c)}function Ad(a,b){a.v=!0;kd(function(){a.v&&Cd.call(null,b)})}var Cd=n;function U(a){m.call(this,a)}fa(U,m);U.prototype.name="cancel";function rd(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let Dd=1,Ed=new WeakMap;var Gd=class extends O{constructor(){super();this.h=new Set}signal(){var a=new Fd;this.h.add(a);mc(this,ea(lc,a));return a}};function Hd(a,b){new Promise(c=>{V(()=>{a.I&&(a.W=b,a.K=!0);for(let {G:d,slot:e}of a.A.values())try{e(b,{signal:a,G:d})}catch(f){n(f)}for(let d of a.B)d.resolve(b);a.B.clear();c()})})}function pc(a,b,c){var d=Dd++;V(()=>{Id(a,d,b,c)})}
42
+ function Id(a,b,c,d){if(!a.u)if(d){if(!d.u){let e=()=>{V(()=>{a.A.delete(b);var f=Ed.get(d);f&&na(f,e)})};a.A.set(b,{G:b,slot:c,C:e});Jd(d,e)}}else a.A.set(b,{G:b,slot:c,C:()=>a.A.delete(b)})}
43
+ var Fd=class extends O{constructor(){super();this.I=!1;this.A=new Map;this.B=new Set;this.K=!1}detach(a){V(()=>{var b=this.A.get(a);b&&b.C()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){var c=qd();V(()=>{if(this.u)c.reject(new U("Signal initially disposed"));else if(b&&b.u)c.reject(new U("Owner initially disposed"));else if(a&&this.I&&this.K)c.resolve(this.W);else if(this.B.add(c),td(c.promise,()=>{this.B.delete(c)}),b){let d=()=>{c.reject(new U("Owner asynchronously disposed"))};
44
+ td(c.promise,()=>{var e=Ed.get(b);e&&na(e,d)});Jd(b,d)}});return c.promise}D(){super.D();V(()=>{for(let {C:a}of this.A.values())a();this.A.clear();for(let a of this.B)a.reject(new U("Signal asynchronously disposed"));this.B.clear()})}};const Kd=[];let Ld=!1;function V(a){Kd.push(a);Md()}async function Md(){if(!Ld)try{Ld=!0;let a=Nd(0);for(;a<Kd.length;)await Promise.resolve(),a=Nd(a)}catch(a){n(a)}finally{Kd.length=0,Ld=!1}}
45
+ function Nd(a){for(var b=a+100;a<b&&a<Kd.length;)try{Kd[a++]()}catch(c){n(c)}return a}function Jd(a,b){if(a.u)b();else{var c=Ed.get(a);if(c)c.push(b);else{let d=[b];Ed.set(a,d);mc(a,()=>{for(let e of[...d])e();Ed.delete(a)})}}};function W(a){var b=new Qc;a=F(b,1,Pc,a);return{content:JSON.stringify(Ka(a))}}new Gd;let hb;var Od=({destination:a,origin:b,da:c,T:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");var f=Uc(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return Wc(f.port1,e)};function Pd(a,b,c){var d=new Gd,e=d.signal();a=Od({destination:window.parent,origin:b,T:a,onMessage:f=>{var g=Rc(f.data.content);Wa(g,Pc)===2&&(f={content:Oc(g),ba:f,messagePort:f.data.messagePort},d.h.has(e),Hd(e,f))}});return new Qd(e,a,c)}async function qc(a){var b=X;var c=new R;var d=new Hc;c=F(c,19,Q,d);a=await b(a,W(c));var e;return(e=Oc(Rc(a.data.content)))==null?void 0:H(e,ec,20,N)}
46
+ async function rc(a){var b=X;var c=new R;var d=new Bc;c=F(c,17,Q,d);a=await b(a,W(c));var e;return(e=Oc(Rc(a.data.content)))==null?void 0:H(e,$b,18,N)}async function sc(a,b){var c=X,d=new R;b=F(d,8,Q,b);await c(a,W(b))}async function tc(a){var b=X;var c=new R;var d=new Gc;c=F(c,18,Q,d);a=await b(a,W(c));var e;return(e=Oc(Rc(a.data.content)))==null?void 0:H(e,dc,19,N)}async function uc(a){var b=X;var c=new R;var d=new Ac;c=F(c,11,Q,d);await b(a,W(c))}
47
+ async function vc(a,b){var c=X,d=new R;b=F(d,14,Q,b);await c(a,W(b))}async function wc(a,b){var c=X,d=new R;b=F(d,15,Q,b);await c(a,W(b))}async function Rd(a){await a.m()}
48
+ async function X(a,b){(a=await Zc(a.h,b))||M(K,`Falsy response received from the message channel. ${JSON.stringify(a)}`);(b=a.data)||M(K,`Data field in the response from the message channel is falsy. ${JSON.stringify(b)}`);(b=b.content)||M(K,`Content field in the response from the message channel is falsy. ${JSON.stringify(b)}`);var c=void 0;try{c=Rc(b)}catch(d){M(K,`The ControlMessage can't be deserialized. ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=Oc(c))||M(K,`MeetToAddonMessage field on ControlMessage is falsy. ${JSON.stringify(b)}`);
49
+ b=b==null?void 0:H(b,mb,10,N);if((b==null?void 0:eb(b,1))!==void 0)throw a=eb(b,1),new J(Pb(a));return a}async function Sd(a){var b=X;var c=new R;var d=new Mc;c=F(c,5,Q,d);await b(a,W(c))}async function Td(a){var b=X;var c=new R;var d=new Fc;c=F(c,6,Q,d);await b(a,W(c))}async function Ud(a,b,c){var d=X,e=new R,f=new Ic;b=fb(f,b);c=E(b,2,w(c),"");e=F(e,7,Q,c);await d(a,W(e))}async function Vd(a,b){var c=X,d=new R;b=F(d,16,Q,b);await c(a,W(b))}
50
+ class Qd extends O{constructor(a,b,c){super();this.O=a;this.h=b;this.m=kb(async()=>{var d=this.h;var e=new R;var f=new Jc;e=F(e,13,Q,f);await Zc(d,W(e))});a=gb();G(a,4);Ea(A(a,1));Ea(A(a,2));Ea(A(a,3));c=Nc(new R,Ec(Cc(a),c));Yc(this.h,W(c));pc(this.O,async d=>{switch(Wa(d.content,N)){case 16:await Rd(this)}},this)}};let Wd;var Xd=class{constructor(a){var b=Wd;this.i=a;this.h=b}delete(){throw Error("Not implemented.");}};function Yd(){var a=new Map,b={set(c,d){a.set(c,d);return b},aa:()=>a};return b};Yd().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED");Yd().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4);Yd().set("co-doing",1).set("co-watching",2);var Zd=class extends xc{async notifySidePanel(a){await Ud(this.h.h,1,a)}async unloadSidePanel(){await Sd(this.h.h)}async loadSidePanel(){await Td(this.h.h)}};var $d=class extends xc{async setAddonStartingState(a){if(a===null)throw new J(Bb("addonStartingState"));if(typeof a!=="object")throw new J(L("addonStartingState",typeof a,"object | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new J(L("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!=="string")throw new J(L("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.sidePanelUrl+
51
+ +!!a.additionalData)throw new J(Ab);if(Object.keys(a).length===0)throw new J(zb);var b=[];b.push(Ub(Tb(Rb(1),a.sidePanelUrl),a.additionalData));a=this.h.h;var c=new Lc,d=c.setAddonStartingState,e=new Kc;b=cb(e,b);await Vd(a,d.call(c,b))}};var ae=class extends xc{async notifyMainStage(a){await Ud(this.h.h,2,a)}};var be=class{constructor(a){a=a.cloudProjectNumber;var b=zc();if(b.cloudProjectNumber!==a)throw new J(ub);var c=b.N,d=b.U,e;Wd=(e=Wd)!=null?e:Pd(d,c,a);this.h=new Xd(b)}async createMainStageClient(){var a=this.h;if(a.i.frameType!==2)throw new J(ob);return await Promise.resolve(new Zd(a))}async createSidePanelClient(){var a=this.h;if(a.i.frameType!==1)throw new J(pb);return await Promise.resolve(new ae(a))}async createRoomsStandaloneClient(){var a=this.h;if(a.i.frameType!==2)throw new J(ob);return await Promise.resolve(new $d(a))}};
52
+ let ce=null;for(var de={addon:{getFrameType:function(){a:{var a=zc().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},createAddonSession:async function(a){if(a===null)throw new J(Bb("config"));if(typeof a!=="object")throw new J(L("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new J(L("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(ce&&zc().N!=="integration.test.google.com")throw new J(Jb);
53
+ return ce=new be(a)}}},ee=["meet"],Y=l,Z;ee.length&&(Z=ee.shift());)ee.length||de===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=de;}).apply(topLevel);export const meet = topLevel.meet;
@@ -3,19 +3,19 @@ const topLevel = typeof global !== 'undefined' ? global : typeof self !== 'undef
3
3
  Copyright The Closure Library Authors.
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- var m=this||self;function aa(a){return a};var u=class extends Error{constructor(a,b){super(`Meet Addon Screenshare Info error: ${`${a}${b?` - ${b}`:""}`}`)}};function v(a){throw new a.m(a.message,a.o);}
7
- var ba={message:"cloudProjectNumber was not defined.",o:"Ensure that cloudProjectNumber is provided in the call to exposeToMeetWhenScreensharing.",m:u},ca={message:"additionalData was defined, but startActivityOnOpen was not true.",o:"Ensure that startActivityOnOpen is set to true if additionalData is provided in the call to exposeToMeetWhenScreensharing.",m:u},da={message:"Received an incorrect value for startActivityOnOpen.",o:"Ensure that startActivityOnOpen is set to true if a mainStageUrl is provided in the call to exposeToMeetWhenScreensharing.",
8
- m:u};let ea;function fa(a){m.setTimeout(()=>{throw a;},0)};var w,x;a:{for(var ha=["CLOSURE_FLAGS"],z=m,A=0;A<ha.length;A++)if(z=z[ha[A]],z==null){x=null;break a}x=z}var ia=x&&x[748402147];w=ia!=null?ia:!0;const ja={};let B=null;function ka(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let la=void 0;function ma(a,b){if(a!=null){var c;var e=(c=la)!=null?c:la={};c=e[a]||0;c>=b||(e[a]=c+1,a=Error(),ka(a,"incident"),fa(a))}};function C(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var na=C(),oa=C(),D=C("m_m",!0);const E=C("jas",!0);var F;const pa=[];pa[E]=7;F=Object.freeze(pa);var G={};function H(a,b){return b===void 0?a.h!==I&&!!(2&(a.i[E]|0)):!!(2&b)&&a.h!==I}const I={};function qa(a,b,c){var e=b&128?0:-1,d=a.length,f;if(f=!!d)f=a[d-1],f=f!=null&&typeof f==="object"&&f.constructor===Object;var g=d+(f?-1:0);for(b=b&128?1:0;b<g;b++)c(b-e,a[b]);if(f){a=a[d-1];for(let h in a)!isNaN(h)&&c(+h,a[h])}}var ra={};var J=typeof m.BigInt==="function"&&typeof m.BigInt(0)==="bigint";const sa=Number.MIN_SAFE_INTEGER.toString(),ta=J?BigInt(Number.MIN_SAFE_INTEGER):void 0,ua=Number.MAX_SAFE_INTEGER.toString(),va=J?BigInt(Number.MAX_SAFE_INTEGER):void 0;function wa(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){let e=a[c],d=b[c];if(e>d)return!1;if(e<d)return!0}};const xa=Number.isFinite;function ya(a){if(a==null)return a;if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;return xa(a)?a|0:void 0}function K(a){if(a!=null&&typeof a!=="string")throw Error();return a};function za(a){return a};function L(a,b,c,e){var d=e!==void 0;e=!!e;var f=[],g=a.length,h=4294967295,k=!1,n=!!(b&64),l=n?b&128?0:-1:void 0;if(!(b&1)){var q=g&&a[g-1];q!=null&&typeof q==="object"&&q.constructor===Object?(g--,h=g):q=void 0;if(n&&!(b&128)&&!d){k=!0;var p;h=((p=Aa)!=null?p:za)(h-l,l,a,q,void 0)+l}}b=void 0;for(d=0;d<g;d++)if(p=a[d],p!=null&&(p=c(p,e))!=null)if(n&&d>=h){let t=d-l,r;((r=b)!=null?r:b={})[t]=p}else f[d]=p;if(q)for(let t in q){a=q[t];if(a==null||(a=c(a,e))==null)continue;g=+t;let r;if(n&&!Number.isNaN(g)&&
9
- (r=g+l)<h)f[r]=a;else{let y;((y=b)!=null?y:b={})[t]=a}}b&&(k?f.push(b):f[h]=b);return f}function Ba(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return(J?a>=ta&&a<=va:a[0]==="-"?wa(a,sa):wa(a,ua))?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){let b=a[E]|0;return a.length===0&&b&1?void 0:L(a,b,Ba)}if(a!=null&&a[D]===G)return Ca(a);return}return a}let Aa;function Ca(a){a=a.i;return L(a,a[E]|0,Ba)};let Da,Ea;function Fa(a){switch(typeof a){case "boolean":return Da||(Da=[0,void 0,!0]);case "number":return a>0?void 0:a===0?Ea||(Ea=[0,void 0]):[-a,void 0];case "string":return[0,a];case "object":return a}}
6
+ var m=this||self;function aa(a){return a};var u=class extends Error{constructor(a,b){super(`Meet Addon Screenshare Info error: ${`${a}${b?` - ${b}`:""}`}`)}};function v(a){throw new a.o(a.message,a.u);}
7
+ var ba={message:"cloudProjectNumber was not defined.",u:"Ensure that cloudProjectNumber is provided in the call to exposeToMeetWhenScreensharing.",o:u},ca={message:"additionalData was defined, but startActivityOnOpen was not true.",u:"Ensure that startActivityOnOpen is set to true if additionalData is provided in the call to exposeToMeetWhenScreensharing.",o:u},da={message:"Received an incorrect value for startActivityOnOpen.",u:"Ensure that startActivityOnOpen is set to true if a mainStageUrl is provided in the call to exposeToMeetWhenScreensharing.",
8
+ o:u};let ea;function fa(a){m.setTimeout(()=>{throw a;},0)};var w,x;a:{for(var ha=["CLOSURE_FLAGS"],z=m,A=0;A<ha.length;A++)if(z=z[ha[A]],z==null){x=null;break a}x=z}var ia=x&&x[748402147];w=ia!=null?ia:!0;const ja={};let B=null;function ka(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let la=void 0;function ma(a,b){if(a!=null){var c;var e=(c=la)!=null?c:la={};c=e[a]||0;c>=b||(e[a]=c+1,a=Error(),ka(a,"incident"),fa(a))}};function C(a,b=!1){return b&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol()}var na=C(),oa=C(),D=C("m_m",!0);const E=C("jas",!0);var F;const pa=[];pa[E]=7;F=Object.freeze(pa);var G={};function H(a,b){return b===void 0?a.h!==I&&!!(2&(a.i[E]|0)):!!(2&b)&&a.h!==I}const I={};function qa(a,b,c){var e=b&128?0:-1,d=a.length,f;if(f=!!d)f=a[d-1],f=f!=null&&typeof f==="object"&&f.constructor===Object;var g=d+(f?-1:0);for(b=b&128?1:0;b<g;b++)c(b-e,a[b]);if(f){a=a[d-1];for(let h in a)!isNaN(h)&&c(+h,a[h])}}var ra={};var J=typeof m.BigInt==="function"&&typeof m.BigInt(0)==="bigint";const sa=Number.MIN_SAFE_INTEGER.toString(),ta=J?BigInt(Number.MIN_SAFE_INTEGER):void 0,ua=Number.MAX_SAFE_INTEGER.toString(),va=J?BigInt(Number.MAX_SAFE_INTEGER):void 0;function wa(a,b){if(a.length>b.length)return!1;if(a.length<b.length||a===b)return!0;for(let c=0;c<a.length;c++){let e=a[c],d=b[c];if(e>d)return!1;if(e<d)return!0}};const xa=Number.isFinite;function ya(a){if(a==null)return a;if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;return xa(a)?a|0:void 0}function K(a){if(a!=null&&typeof a!=="string")throw Error();return a};function za(a){return a};function L(a,b,c,e){var d=e!==void 0;e=!!e;var f=[],g=a.length,h=4294967295,k=!1,n=!!(b&64),l=n?b&128?0:-1:void 0;if(!(b&1)){var r=g&&a[g-1];r!=null&&typeof r==="object"&&r.constructor===Object?(g--,h=g):r=void 0;if(n&&!(b&128)&&!d){k=!0;var q;h=((q=Aa)!=null?q:za)(h-l,l,a,r,void 0)+l}}b=void 0;for(d=0;d<g;d++)if(q=a[d],q!=null&&(q=c(q,e))!=null)if(n&&d>=h){let t=d-l,p;((p=b)!=null?p:b={})[t]=q}else f[d]=q;if(r)for(let t in r){a=r[t];if(a==null||(a=c(a,e))==null)continue;g=+t;let p;if(n&&!Number.isNaN(g)&&
9
+ (p=g+l)<h)f[p]=a;else{let y;((y=b)!=null?y:b={})[t]=a}}b&&(k?f.push(b):f[h]=b);return f}function Ba(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return(J?a>=ta&&a<=va:a[0]==="-"?wa(a,sa):wa(a,ua))?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Array.isArray(a)){let b=a[E]|0;return a.length===0&&b&1?void 0:L(a,b,Ba)}if(a!=null&&a[D]===G)return Ca(a);return}return a}let Aa;function Ca(a){a=a.i;return L(a,a[E]|0,Ba)};let Da,Ea;function Fa(a){switch(typeof a){case "boolean":return Da||(Da=[0,void 0,!0]);case "number":return a>0?void 0:a===0?Ea||(Ea=[0,void 0]):[-a,void 0];case "string":return[0,a];case "object":return a}}
10
10
  function M(a,b,c,e=0){if(a==null){var d=32;c?(a=[c],d|=128):a=[];b&&(d=d&-16760833|(b&1023)<<14)}else{if(!Array.isArray(a))throw Error("narr");d=a[E]|0;if(w&&1&d)throw Error("rfarr");2048&d&&!(2&d)&&Ga();if(d&256)throw Error("farr");if(d&64)return(d|e)!==d&&(a[E]=d|e),a;if(c&&(d|=128,c!==a[0]))throw Error("mid");a:{c=a;d|=64;var f=c.length;if(f){var g=f-1;let k=c[g];if(k!=null&&typeof k==="object"&&k.constructor===Object){b=d&128?0:-1;g-=b;if(g>=1024)throw Error("pvtlmt");for(var h in k)if(f=+h,f<
11
11
  g)c[f+b]=k[h],delete k[h];else break;d=d&-16760833|(g&1023)<<14;break a}}if(b){h=Math.max(b,f-(d&128?0:-1));if(h>1024)throw Error("spvt");d=d&-16760833|(h&1023)<<14}}}a[E]=d|64|e;return a}function Ga(){if(w)throw Error("carr");ma(oa,5)};function Ha(a,b){if(typeof a!=="object")return a;if(Array.isArray(a)){var c=a[E]|0;a.length===0&&c&1?a=void 0:c&2||(!b||4096&c||16&c?a=N(a,c,!1,b&&!(c&16)):(a[E]|=34,c&4&&Object.freeze(a)));return a}if(a!=null&&a[D]===G){c=a.i;let e=c[E]|0;H(a,e)||(e&2?b=!0:e&32&&!(e&4096)?(c[E]=e|2,a.h=I,b=!0):b=!1,b?(a=new a.constructor(c),a.l=I):a=N(c,e));return a}}function N(a,b,c,e){e!=null||(e=!!(34&b));a=L(a,b,Ha,e);e=32;c&&(e|=2);b=b&16769217|e;a[E]=b;return a}
12
12
  function Ia(a){if(a.h!==I)var b=!1;else b=a.i,b=N(b,b[E]|0),b[E]|=2048,a.i=b,a.h=void 0,a.l=void 0,b=!0;if(!b&&H(a,a.i[E]|0))throw Error();}function Ja(a,b){b===void 0&&(b=a[E]|0);b&32&&!(b&4096)&&(a[E]=b|4096)};function O(a,b,c){Ia(a);var e=a.i;P(e,e[E]|0,b,c);return a}function P(a,b,c,e,d){var f=c+(d?0:-1),g=a.length-1;if(g>=1+(d?0:-1)&&f>=g){let h=a[g];if(h!=null&&typeof h==="object"&&h.constructor===Object)return h[c]=e,b}if(f<=g)return a[f]=e,b;if(e!==void 0){let h;g=((h=b)!=null?h:b=a[E]|0)>>14&1023||536870912;c>=g?e!=null&&(a[g+(d?0:-1)]={[c]:e}):a[f]=e}return b}function Ka(a){return!!(2&a)&&!!(4&a)||!!(256&a)}
13
- function Q(a,b,c,e){Ia(a);var d=a.i;P(d,d[E]|0,b,(e==="0"?Number(c)===0:c===e)?void 0:c);return a}function La(a,b){return a=(2&b?a|2:a&-3)&-273};function R(a,b){for(;b>127;)a.h.push(b&127|128),b>>>=7;a.h.push(b)}var Ma=class{constructor(){this.h=[]}length(){return this.h.length}end(){var a=this.h;this.h=[];return a}};function S(a,b){b.length!==0&&(a.l.push(b),a.j+=b.length)}function Na(a,b){R(a.h,b*8+2);b=a.h.end();S(a,b);b.push(a.j);return b}function Oa(a,b){var c=b.pop();for(c=a.j+a.h.length()-c;c>127;)b.push(c&127|128),c>>>=7,a.j++;b.push(c);a.j++}var Pa=class{constructor(){this.l=[];this.j=0;this.h=new Ma}};function T(){var a=class{constructor(){throw Error();}};Object.setPrototypeOf(a,a.prototype);return a}var U=T(),Qa=T(),Ra=T(),Sa=T();var V=class{constructor(a){this.i=M(a,void 0,void 0,2048)}toJSON(){var a=Ca(this);return a}};V.prototype[D]=G;V.prototype.toString=function(){return this.i.toString()};var W=class{constructor(a,b){this.h=a;a=aa(U);this.j=!!a&&b===a||!1}};function Ta(a,b,c,e,d){b=Ua(b,e);b!=null&&(c=Na(a,c),d(b,a),Oa(a,c))}const Va=new W(Ta,U),Wa=new W(Ta,U);var Xa=Symbol(),Ya=Symbol();let Za,$a;
14
- function X(a){var b=ab,c=bb,e=a[Xa];if(e)return e;e={};e.C=a;e.u=Fa(a[0]);var d=a[1],f=1;d&&d.constructor===Object&&(e.v=d,d=a[++f],typeof d==="function"&&(e.A=!0,Za!=null||(Za=d),$a!=null||($a=a[f+1]),d=a[f+=2]));for(var g={};d&&Array.isArray(d)&&d.length&&typeof d[0]==="number"&&d[0]>0;){for(var h=0;h<d.length;h++)g[d[h]]=d;d=a[++f]}for(h=1;d!==void 0;){typeof d==="number"&&(h+=d,d=a[++f]);let l;var k=void 0;d instanceof W?l=d:(l=Va,f--);let q;if((q=l)==null?0:q.j){d=a[++f];k=a;var n=f;typeof d===
15
- "function"&&(d=d(),k[n]=d);k=d}d=a[++f];n=h+1;typeof d==="number"&&d<0&&(n-=d,d=a[++f]);for(;h<n;h++){let p=g[h];k?c(e,h,l,k,p):b(e,h,l,p)}}return a[Xa]=e}function Ua(a,b){if(a instanceof V)return a.i;if(Array.isArray(a))return M(a,b[0],b[1])};function ab(a,b,c){a[b]=c.h}function bb(a,b,c,e){var d,f,g=c.h;a[b]=(h,k,n)=>g(h,k,n,f||(f=X(e).u),d||(d=cb(e)))}function cb(a){var b=a[Ya];if(!b){let c=X(a);b=(e,d)=>db(e,d,c);a[Ya]=b}return b}function db(a,b,c){qa(a,a[E]|0,(e,d)=>{if(d!=null){var f=eb(c,e);f?f(b,d,e):e<500||ma(na,3)}})}
16
- function eb(a,b){var c=a[b];if(c)return c;if(c=a.v)if(c=c[b]){c=Array.isArray(c)?c[0]instanceof W?c:[Wa,c]:[c,void 0];var e=c[0].h;if(c=c[1]){let d=cb(c),f=X(c).u;c=a.A?$a(f,d):(g,h,k)=>e(g,h,k,f,d)}else c=e;return a[b]=c}};function fb(a,b,c){b=b==null||typeof b==="string"?b:void 0;b!=null&&(b=(ea||(ea=new TextEncoder)).encode(b),R(a.h,c*8+2),R(a.h,b.length),S(a,a.h.end()),S(a,b))};function gb(a){var b=new hb;if(a!=null){if(!xa(a))throw b=Error("enum"),ka(b,"warning"),b;a|=0}return Q(b,1,a,0)}var hb=class extends V{};var ib=class extends V{};var jb=class extends V{};jb.prototype.j=function(a){return function(){var b=new Pa;db(this.i,b,X(a));S(b,b.h.end());var c=new Uint8Array(b.j),e=b.l,d=e.length,f=0;for(let g=0;g<d;g++){let h=e[g];c.set(h,f);f+=h.length}b.l=[c];return c}}([0,new W(fb,Ra),-1,[0,function(a,b,c=U){return new W(b,c)}(function(a,b,c,e,d){if(a.h()!==2)return!1;var f=a.j;e=M(void 0,e[0],e[1]);var g=b[E]|0;if(g&2)throw Error();var h=g&128?ra:void 0;a:if(c===-1)var k=null;else{k=c+(h?0:-1);var n=b.length-1;if(n<1+(h?0:-1))k=void 0;else if(k>=n){var l=
13
+ function Q(a,b,c,e){Ia(a);var d=a.i;P(d,d[E]|0,b,(e==="0"?Number(c)===0:c===e)?void 0:c);return a}function La(a,b){return a=(2&b?a|2:a&-3)&-273};function R(a,b){for(;b>127;)a.h.push(b&127|128),b>>>=7;a.h.push(b)}var Ma=class{constructor(){this.h=[]}length(){return this.h.length}end(){var a=this.h;this.h=[];return a}};function S(a,b){b.length!==0&&(a.l.push(b),a.j+=b.length)}function Na(a,b){R(a.h,b*8+2);b=a.h.end();S(a,b);b.push(a.j);return b}function Oa(a,b){var c=b.pop();for(c=a.j+a.h.length()-c;c>127;)b.push(c&127|128),c>>>=7,a.j++;b.push(c);a.j++}var Pa=class{constructor(){this.l=[];this.j=0;this.h=new Ma}};function T(){var a=class{constructor(){throw Error();}};Object.setPrototypeOf(a,a.prototype);return a}var U=T(),Qa=T(),Ra=T(),Sa=T();var V=class{constructor(a){this.i=M(a,void 0,void 0,2048)}toJSON(){var a=Ca(this);return a}};V.prototype[D]=G;V.prototype.toString=function(){return this.i.toString()};var W=class{constructor(a,b){this.m=a;a=aa(U);this.h=!!a&&b===a||!1}};function Ta(a,b,c,e,d){b=Ua(b,e);b!=null&&(c=Na(a,c),d(b,a),Oa(a,c))}const Va=new W(Ta,U),Wa=new W(Ta,U);var Xa=Symbol(),Ya=Symbol();let Za,$a;
14
+ function X(a){var b=ab,c=bb,e=a[Xa];if(e)return e;e={};e.D=a;e.v=Fa(a[0]);var d=a[1],f=1;d&&d.constructor===Object&&(e.A=d,d=a[++f],typeof d==="function"&&(e.B=!0,Za!=null||(Za=d),$a!=null||($a=a[f+1]),d=a[f+=2]));for(var g={};d&&Array.isArray(d)&&d.length&&typeof d[0]==="number"&&d[0]>0;){for(var h=0;h<d.length;h++)g[d[h]]=d;d=a[++f]}for(h=1;d!==void 0;){typeof d==="number"&&(h+=d,d=a[++f]);let l;var k=void 0;d instanceof W?l=d:(l=Va,f--);let r;if((r=l)==null?0:r.h){d=a[++f];k=a;var n=f;typeof d===
15
+ "function"&&(d=d(),k[n]=d);k=d}d=a[++f];n=h+1;typeof d==="number"&&d<0&&(n-=d,d=a[++f]);for(;h<n;h++){let q=g[h];k?c(e,h,l,k,q):b(e,h,l,q)}}return a[Xa]=e}function Ua(a,b){if(a instanceof V)return a.i;if(Array.isArray(a))return M(a,b[0],b[1])};function ab(a,b,c){a[b]=c.m}function bb(a,b,c,e){var d,f,g=c.m;a[b]=(h,k,n)=>g(h,k,n,f||(f=X(e).v),d||(d=cb(e)))}function cb(a){var b=a[Ya];if(!b){let c=X(a);b=(e,d)=>db(e,d,c);a[Ya]=b}return b}function db(a,b,c){qa(a,a[E]|0,(e,d)=>{if(d!=null){var f=eb(c,e);f?f(b,d,e):e<500||ma(na,3)}})}
16
+ function eb(a,b){var c=a[b];if(c)return c;if(c=a.A)if(c=c[b]){c=Array.isArray(c)?c[0]instanceof W?c:[Wa,c]:[c,void 0];var e=c[0].m;if(c=c[1]){let d=cb(c),f=X(c).v;c=a.B?$a(f,d):(g,h,k)=>e(g,h,k,f,d)}else c=e;return a[b]=c}};function fb(a,b,c){b=b==null||typeof b==="string"?b:void 0;b!=null&&(b=(ea||(ea=new TextEncoder)).encode(b),R(a.h,c*8+2),R(a.h,b.length),S(a,a.h.end()),S(a,b))};function gb(a){var b=new hb;if(a!=null){if(!xa(a))throw b=Error("enum"),ka(b,"warning"),b;a|=0}return Q(b,1,a,0)}var hb=class extends V{};var ib=class extends V{};var jb=class extends V{};jb.prototype.j=function(a){return function(){var b=new Pa;db(this.i,b,X(a));S(b,b.h.end());var c=new Uint8Array(b.j),e=b.l,d=e.length,f=0;for(let g=0;g<d;g++){let h=e[g];c.set(h,f);f+=h.length}b.l=[c];return c}}([0,new W(fb,Ra),-1,[0,function(a,b,c=U){return new W(b,c)}(function(a,b,c,e,d){if(a.h()!==2)return!1;var f=a.j;e=M(void 0,e[0],e[1]);var g=b[E]|0;if(g&2)throw Error();var h=g&128?ra:void 0;a:if(c===-1)var k=null;else{k=c+(h?0:-1);var n=b.length-1;if(n<1+(h?0:-1))k=void 0;else if(k>=n){var l=
17
17
  b[n];if(l!=null&&typeof l==="object"&&l.constructor===Object)k=l[c];else if(k===n)k=l;else{k=void 0;break a}}else k=b[k]}k=Array.isArray(k)?k:F;l=n=k===F?7:k[E]|0;2&g&&(l|=2);l|=1;if(2&l||Ka(l)||16&l)l===n||Ka(l)||(k[E]=l),k=[...k],n=0,l=La(l,g),P(b,g,c,k,h);l&=-13;l!==n&&(k[E]=l);k.push(e);f.call(a,e,d);return!0},function(a,b,c,e,d){if(Array.isArray(b)){for(let n=0;n<b.length;n++){var f=a,g=c,h=d,k=Ua(b[n],e);k!=null&&(g=Na(f,g),h(k,f),Oa(f,g))}a=b[E]|0;a&1||(b[E]=a|1)}}),[0,new W(function(a,b,c){b=
18
- ya(b);if(b!=null)if(b=parseInt(b,10),R(a.h,c*8),a=a.h,c=b,c>=0)R(a,c);else{for(b=0;b<9;b++)a.h.push(c&127|128),c>>=7;a.h.push(1)}},Sa),new W(fb,Ra),-1]],new W(function(a,b,c){b=b==null||typeof b==="boolean"?b:typeof b==="number"?!!b:void 0;b!=null&&(R(a.h,c*8),a.h.h.push(b?1:0))},Qa)]);function kb(){var a,b,c=(b=(a=(new URL(lb||window.location.href)).searchParams.get("meet_capture_handle_origins"))==null?void 0:a.split(",").filter(e=>{try{return(new URL(e)).origin.endsWith(".google.com")}catch(d){return!1}}))!=null?b:[];return c.length===0?mb:c}let lb="";const mb=["https://meet.google.com"];for(var nb={exposeToMeetWhenScreensharing:function(a){var b=a.B,c=a.cloudProjectNumber,e=a.additionalData,d=a.mainStageUrl,f=a.sidePanelUrl;a=a.startActivityOnOpen;c||v(ba);var g=new jb;c=O(g,2,K(c));b&&O(c,1,K(b));b=[];e&&!a&&v(ca);d&&!a&&v(da);if(f){g=b.push;var h=gb(1);f=Q(h,2,K(f),"");f=Q(f,3,K(e),"");g.call(b,f)}d&&(f=b.push,g=gb(2),d=Q(g,2,K(d),""),e=Q(d,3,K(e),""),f.call(b,e));{e=new ib;d=b;Ia(e);let t=e.i,r=t[E]|0;if(d==null)P(t,r,1);else{f=b=d===F?7:d[E]|0;h=(g=Ka(b))||Object.isFrozen(d);
19
- var k=!0,n=!0;for(let y=0;y<d.length;y++){var l=d[y];g||(l=H(l),k&&(k=!l),n&&(n=l))}g||(b=k?13:5,b=n?b&-4097:b|4096);h&&b===f||(d=[...d],f=0,b=La(b,r));b!==f&&(d[E]=b);r=P(t,r,1,d);2&b||!(4096&b||16&b)||Ja(t,r)}}e==null&&(e=void 0);O(c,3,e);e&&!H(e)&&Ja(c.i);if(a!=null&&typeof a!=="boolean"){var q=typeof a;throw Error(`Expected boolean but got ${q!="object"?q:a?Array.isArray(a)?"array":q:"null"}: ${a}`);}O(c,4,a);a=c.j();var p;p===void 0&&(p=0);if(!B)for(B={},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),
20
- e=["+/=","+/","-_=","-_.","-_"],d=0;d<5;d++)for(b=c.concat(e[d].split("")),ja[d]=b,f=0;f<b.length;f++)g=b[f],B[g]===void 0&&(B[g]=f);p=ja[p];c=Array(Math.floor(a.length/3));e=p[64]||"";for(d=b=0;b<a.length-2;b+=3)h=a[b],k=a[b+1],g=a[b+2],f=p[h>>2],h=p[(h&3)<<4|k>>4],k=p[(k&15)<<2|g>>6],g=p[g&63],c[d++]=f+h+k+g;f=0;g=e;switch(a.length-b){case 2:f=a[b+1],g=p[(f&15)<<2]||e;case 1:a=a[b],c[d]=p[a>>2]+p[(a&3)<<4|f>>4]+g+e}a=c.join("");p=window;p.top===p.self&&(a={handle:a,permittedOrigins:kb(),exposeOrigin:!0},
21
- (q=p.navigator.mediaDevices)==null||q.setCaptureHandleConfig(a))}},ob=["meet","addon","screensharing"],Y=m,Z;ob.length&&(Z=ob.shift());)ob.length||nb===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=nb;}).apply(topLevel);export const meet = topLevel.meet;
18
+ ya(b);if(b!=null)if(b=parseInt(b,10),R(a.h,c*8),a=a.h,c=b,c>=0)R(a,c);else{for(b=0;b<9;b++)a.h.push(c&127|128),c>>=7;a.h.push(1)}},Sa),new W(fb,Ra),-1]],new W(function(a,b,c){b=b==null||typeof b==="boolean"?b:typeof b==="number"?!!b:void 0;b!=null&&(R(a.h,c*8),a.h.h.push(b?1:0))},Qa)]);function kb(){var a,b,c=(b=(a=(new URL(lb||window.location.href)).searchParams.get("meet_capture_handle_origins"))==null?void 0:a.split(",").filter(e=>{try{return(new URL(e)).origin.endsWith(".google.com")}catch(d){return!1}}))!=null?b:[];return c.length===0?mb:c}let lb="";const mb=["https://meet.google.com"];for(var nb={exposeToMeetWhenScreensharing:function(a){var b=a.C,c=a.cloudProjectNumber,e=a.additionalData,d=a.mainStageUrl,f=a.sidePanelUrl;a=a.startActivityOnOpen;c||v(ba);var g=new jb;c=O(g,2,K(c));b&&O(c,1,K(b));b=[];e&&!a&&v(ca);d&&!a&&v(da);if(f){g=b.push;var h=gb(1);f=Q(h,2,K(f),"");f=Q(f,3,K(e),"");g.call(b,f)}d&&(f=b.push,g=gb(2),d=Q(g,2,K(d),""),e=Q(d,3,K(e),""),f.call(b,e));e=new ib;Ia(e);d=e.i;f=d[E]|0;if(b==null)P(d,f,1);else{h=g=b===F?7:b[E]|0;var k=Ka(g),n=k||Object.isFrozen(b),l=!0,
19
+ r=!0;for(let y=0;y<b.length;y++){var q=b[y];k||(q=H(q),l&&(l=!q),r&&(r=q))}k||(g=l?13:5,g=r?g&-4097:g|4096);n&&g===h||(b=[...b],h=0,g=La(g,f));g!==h&&(b[E]=g);f=P(d,f,1,b);2&g||!(4096&g||16&g)||Ja(d,f)}e==null&&(e=void 0);O(c,3,e);e&&!H(e)&&Ja(c.i);if(a!=null&&typeof a!=="boolean"){var t=typeof a;throw Error(`Expected boolean but got ${t!="object"?t:a?Array.isArray(a)?"array":t:"null"}: ${a}`);}O(c,4,a);a=c.j();var p;p===void 0&&(p=0);if(!B)for(B={},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),
20
+ e=["+/=","+/","-_=","-_.","-_"],b=0;b<5;b++)for(d=c.concat(e[b].split("")),ja[b]=d,f=0;f<d.length;f++)g=d[f],B[g]===void 0&&(B[g]=f);p=ja[p];c=Array(Math.floor(a.length/3));e=p[64]||"";for(b=d=0;d<a.length-2;d+=3)h=a[d],k=a[d+1],g=a[d+2],f=p[h>>2],h=p[(h&3)<<4|k>>4],k=p[(k&15)<<2|g>>6],g=p[g&63],c[b++]=f+h+k+g;f=0;g=e;switch(a.length-d){case 2:f=a[d+1],g=p[(f&15)<<2]||e;case 1:a=a[d],c[b]=p[a>>2]+p[(a&3)<<4|f>>4]+g+e}a=c.join("");p=window;p.top===p.self&&(a={handle:a,permittedOrigins:kb(),exposeOrigin:!0},
21
+ (t=p.navigator.mediaDevices)==null||t.setCaptureHandleConfig(a))}},ob=["meet","addon","screensharing"],Y=m,Z;ob.length&&(Z=ob.shift());)ob.length||nb===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=nb;}).apply(topLevel);export const meet = topLevel.meet;
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": "1.2.0-dev-1004293994",
4
+ "version": "1.2.0-dev-1005918809",
5
5
  "repository": "googleworkspace/meet",
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "homepage": "https://developers.google.com/meet/add-ons/guides/overview",