@googleworkspace/meet-addons 1.2.0-dev-725368308 → 1.2.0-dev-726217118
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.mjs +65 -65
- package/meet.addons.screenshare.mjs +16 -16
- package/package.json +1 -1
package/meet.addons.mjs
CHANGED
|
@@ -4,69 +4,69 @@ function ea(a,b){if(b)a:{var c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){v
|
|
|
4
4
|
Copyright The Closure Library Authors.
|
|
5
5
|
SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
|
-
var l=this||self;function fa(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 ha(a){return a}function ia(a,b){function c(){}c.prototype=b.prototype;a.qa=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.oa=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{const 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 ka(a){l.setTimeout(()=>{throw a;},0)};var la,ma;a:{for(var na=["CLOSURE_FLAGS"],oa=l,pa=0;pa<na.length;pa++)if(oa=oa[na[pa]],oa==null){ma=null;break a}ma=oa}var qa=ma&&ma[610401301];la=qa!=null?qa:!1;var ra;const
|
|
8
|
-
function
|
|
9
|
-
function
|
|
10
|
-
function
|
|
11
|
-
function
|
|
12
|
-
(t+=Math.trunc(q/4294967296),t>>>=0,q>>>=0)}if(b){const [d,e]=
|
|
13
|
-
function
|
|
14
|
-
function
|
|
15
|
-
function
|
|
16
|
-
;function
|
|
17
|
-
function x(a,b,c,d){const e=b&512?0:-1,f=c+e;var g=a.length-1;if(f>=g&&b&256)return a[g][c]=d,b;if(f<=g)return a[f]=d,b&256&&(a=a[g],c in a&&delete a[c]),b;d!==void 0&&(g=b>>15&1023||536870912,c>=g?d!=null&&(a[g+e]={[c]:d},b|=256,a[p]=b):a[f]=d);return b}function
|
|
18
|
-
function y(a,b){a=a.m;return
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function G(a,b,c,d){c=y(a,d)===c?c:-1;return
|
|
23
|
-
H.prototype.toString=function(){return this.m.toString()};function
|
|
24
|
-
|
|
25
|
-
message:"This method is not supported in standalone mode.",i:"Do not call this method in standalone mode."},
|
|
26
|
-
|
|
27
|
-
message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",i:"Make sure the destination frame has connected before sending messages to it."},
|
|
28
|
-
message:"The supplied ActivityStartingState object does not contain any recognized attributes.",i:"Ensure that the ActivityStartingState object contains at least one of the following attributes: mainStageUrl, sidePanelUrl, additionalData."},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
i:"No further information is available."}),
|
|
32
|
-
message:"This feature is only available to early access partners.",i:"Meet add-on early access enrollment is currently closed."},
|
|
33
|
-
i:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},
|
|
34
|
-
message:"The user cancelled starting an activity.",i:"The user needs to click continue to start the activity."},
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
function
|
|
38
|
-
i:"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}.`,i:"No further information is available."};case 0:return
|
|
39
|
-
i:"No further information is available."}}return c;default:return
|
|
40
|
-
(c===1||c===4&&32&h))){
|
|
41
|
-
"string")throw new I(K("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new I(
|
|
42
|
-
var
|
|
43
|
-
a:0;let c;return(c=
|
|
44
|
-
d)}on(a,b){this.h[a]=b}async getMeetPlatformInfo(){const a=await
|
|
45
|
-
ba:d,cloudProjectNumber:e,S:f}};var
|
|
46
|
-
function
|
|
47
|
-
function
|
|
48
|
-
function
|
|
49
|
-
function
|
|
50
|
-
function
|
|
51
|
-
function
|
|
52
|
-
function
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
function
|
|
56
|
-
async function
|
|
57
|
-
async function
|
|
58
|
-
async function W(a,b){(a=await a.channel.C(b))||L(J,"Falsy response received from the message channel."+` ${JSON.stringify(a)}`);(b=a.data)||L(J,"Data field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);(b=b.content)||L(J,"Content field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);let c=void 0;try{c=
|
|
59
|
-
` ${JSON.stringify(b)}`);b=b==null?void 0:G(b,
|
|
60
|
-
async function
|
|
61
|
-
class
|
|
62
|
-
function
|
|
63
|
-
function
|
|
64
|
-
function
|
|
65
|
-
class
|
|
66
|
-
e=A(e,1,
|
|
7
|
+
var l=this||self;function fa(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 ha(a){return a}function ia(a,b){function c(){}c.prototype=b.prototype;a.qa=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.oa=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{const 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 ka(a){l.setTimeout(()=>{throw a;},0)};var la,ma;a:{for(var na=["CLOSURE_FLAGS"],oa=l,pa=0;pa<na.length;pa++)if(oa=oa[na[pa]],oa==null){ma=null;break a}ma=oa}var qa=ma&&ma[610401301];la=qa!=null?qa:!1;var ra;const sa=l.navigator;ra=sa?sa.userAgentData||null:null;function va(a){return la?ra?ra.brands.some(({brand:b})=>b&&b.indexOf(a)!=-1):!1:!1}function m(a){var b;a:{if(b=l.navigator)if(b=b.userAgent)break a;b=""}return b.indexOf(a)!=-1};function n(){return la?!!ra&&ra.brands.length>0:!1}function wa(){return n()?va("Chromium"):(m("Chrome")||m("CriOS"))&&!(n()?0:m("Edge"))||m("Silk")};function xa(a,b){b=Array.prototype.indexOf.call(a,b,void 0);b>=0&&Array.prototype.splice.call(a,b,1)};!m("Android")||wa();wa();m("Safari")&&(wa()||(n()?0:m("Coast"))||(n()?0:m("Opera"))||(n()?0:m("Edge"))||(n()?va("Microsoft Edge"):m("Edg/"))||n()&&va("Opera"));function ya(a){let b="",c=0;const d=a.length-10240;for(;c<d;)b+=String.fromCharCode.apply(null,a.subarray(c,c+=10240));b+=String.fromCharCode.apply(null,c?a.subarray(c):a);return btoa(b)}const za=/[-_.]/g,Aa={"-":"+",_:"/",".":"="};function Ba(a){return Aa[a]||""}function Ca(a){return a!=null&&a instanceof Uint8Array}var Da={};function Ea(){return Fa||(Fa=new Ga(null,Da))}var Ga=class{constructor(a,b){Ha(b);this.g=a;if(a!=null&&a.length===0)throw Error("ByteString should be constructed with non-empty values");}};let Fa;function Ha(a){if(a!==Da)throw Error("illegal external caller");};function Ia(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let Ja=void 0;function Ka(a){a=Error(a);Ia(a,"warning");return a}function La(a,b){if(a!=null){var c;var d=(c=Ja)!=null?c:Ja={};c=d[a]||0;c>=b||(d[a]=c+1,a=Error(),Ia(a,"incident"),ka(a))}};var Ma=new Set;function Na(a,b=!1,c=!1){a=c&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol();b&&Ma.add(a);return a}var Oa=Na(),Pa=Na(void 0,!0),Qa=Na(void 0,!0),Ra=Na();const p=Na("jas",!0,!0);function Sa(a,b){b[p]=(a|0)&-30975}function Ta(a,b){b[p]=(a|34)&-30941};function Ua(){return typeof BigInt==="function"};function Va(a){return Array.prototype.slice.call(a)};var Wa={};function Xa(a){return a!==null&&typeof a==="object"&&!Array.isArray(a)&&a.constructor===Object}function Ya(a,b){if(a!=null)if(typeof a==="string")a=a?new Ga(a,Da):Ea();else if(a.constructor!==Ga)if(Ca(a))a=a.length?new Ga(new Uint8Array(a),Da):Ea();else{if(!b)throw Error();a=void 0}return a}var Za;const $a=[];$a[p]=55;Za=Object.freeze($a);function ab(a){if(a&2)throw Error();}function bb(a,b){const c=ha(Qa);(b=c?b[c]:void 0)&&(a[Qa]=Va(b))}var cb=Object.freeze({});function db(a){a.pa=!0;return a};var eb=db(a=>typeof a==="number"),fb=db(a=>typeof a==="string"),gb=db(a=>typeof a==="boolean");var hb=typeof l.BigInt==="function"&&typeof l.BigInt(0)==="bigint";var nb=db(a=>hb?a>=ib&&a<=jb:a[0]==="-"?kb(a,lb):kb(a,mb));const lb=Number.MIN_SAFE_INTEGER.toString(),ib=hb?BigInt(Number.MIN_SAFE_INTEGER):void 0,mb=Number.MAX_SAFE_INTEGER.toString(),jb=hb?BigInt(Number.MAX_SAFE_INTEGER):void 0;function kb(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++){const d=a[c],e=b[c];if(d>e)return!1;if(d<e)return!0}};let q=0,t=0;function ob(a){const b=a>>>0;q=b;t=(a-b)/4294967296>>>0}function pb(a){if(a<0){ob(-a);const [b,c]=qb(q,t);q=b>>>0;t=c>>>0}else ob(a)}function rb(a,b){b>>>=0;a>>>=0;if(b<=2097151)var c=""+(4294967296*b+a);else Ua()?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+sb(c)+sb(a));return c}
|
|
8
|
+
function sb(a){a=String(a);return"0000000".slice(a.length)+a}function qb(a,b){b=~b;a?a=~a+1:b+=1;return[a,b]};const tb=typeof BigInt==="function"?BigInt.asIntN:void 0,ub=Number.isSafeInteger,vb=Number.isFinite,wb=Math.trunc,xb=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function yb(a){switch(typeof a){case "bigint":return!0;case "number":return vb(a);case "string":return xb.test(a);default:return!1}}function u(a){if(a!=null){if(!vb(a))throw Ka("enum");a|=0}return a}function zb(a){if(a!=null){if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;vb(a)}}
|
|
9
|
+
function Ab(a){if(a!=null)a:{if(!yb(a))throw Ka("int64");switch(typeof a){case "string":a=Bb(a);break a;case "bigint":var b=a=tb(64,a);if(fb(b)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(b))throw Error(String(b));}else if(eb(b)&&!Number.isSafeInteger(b))throw Error(String(b));hb?a=BigInt(a):a=gb(a)?a?"1":"0":fb(a)?a.trim()||"0":String(a);break a;default:a=Cb(a)}}return a}
|
|
10
|
+
function Cb(a){a=wb(a);if(!ub(a)){pb(a);var b=q,c=t;if(a=c&2147483648)b=~b+1>>>0,c=~c>>>0,b==0&&(c=c+1>>>0);const d=c*4294967296+(b>>>0);b=Number.isSafeInteger(d)?d:rb(b,c);a=typeof b==="number"?a?-b:b:a?"-"+b:b}return a}
|
|
11
|
+
function Bb(a){var b=wb(Number(a));if(ub(b))return String(b);b=a.indexOf(".");b!==-1&&(a=a.substring(0,b));b=a.length;if(!(a[0]==="-"?b<20||b===20&&Number(a.substring(0,7))>-922337:b<19||b===19&&Number(a.substring(0,6))<922337)){if(a.length<16)pb(Number(a));else if(Ua())a=BigInt(a),q=Number(a&BigInt(4294967295))>>>0,t=Number(a>>BigInt(32)&BigInt(4294967295));else{b=+(a[0]==="-");t=q=0;const c=a.length;for(let d=b,e=(c-b)%6+b;e<=c;d=e,e+=6){const f=Number(a.slice(d,e));t*=1E6;q=q*1E6+f;q>=4294967296&&
|
|
12
|
+
(t+=Math.trunc(q/4294967296),t>>>=0,q>>>=0)}if(b){const [d,e]=qb(q,t);q=d;t=e}}a=q;b=t;if(b&2147483648)if(Ua())a=""+(BigInt(b|0)<<BigInt(32)|BigInt(a>>>0));else{const [c,d]=qb(a,b);a="-"+rb(c,d)}else a=rb(a,b)}return a}function v(a){if(a!=null&&typeof a!=="string")throw Error();return a}function Db(a,b,c){if(a!=null&&typeof a==="object"&&a.H===Wa)return a;if(Array.isArray(a)){var d=a[p]|0,e=d;e===0&&(e|=c&32);e|=c&2;e!==d&&(a[p]=e);return new b(a)}};function Eb(a){return a};function Fb(a,b,c){const d=Va(a);var e=d.length;const f=b&256?d[e-1]:void 0;e+=f?-1:0;for(b=b&512?1:0;b<e;b++)d[b]=c(d[b]);if(f){b=d[b]={};for(const g in f)b[g]=c(f[g])}bb(d,a);return d}function Gb(a,b,c,d,e){if(a!=null){if(Array.isArray(a)){const f=a[p]|0;return a.length===0&&f&1?void 0:e&&f&2?a:Hb(a,b,c,d!==void 0,e)}return b(a,d)}}
|
|
13
|
+
function Hb(a,b,c,d,e){const f=d||c?a[p]|0:0;d=d?!!(f&32):void 0;const g=Va(a);let h=0;const k=g.length;for(let C=0;C<k;C++){var r=g[C];if(C===k-1&&Xa(r)){var D=b,F=c,ta=d,ca=e;let Q=void 0;for(let ua in r){const ic=Gb(r[ua],D,F,ta,ca);if(ic!=null){let jc;((jc=Q)!=null?jc:Q={})[ua]=ic}}r=Q}else r=Gb(g[C],b,c,d,e);g[C]=r;r!=null&&(h=C+1)}h<k&&(g.length=h);c&&(bb(g,a),c(f,g));return g}
|
|
14
|
+
function Ib(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return nb(a)?Number(a):""+a;case "boolean":return a?1:0;case "object":if(Ca(a))return ya(a);if(a.H===Wa)return Jb(a);if(a instanceof Ga){const b=a.g;return b==null?"":typeof b==="string"?b:a.g=ya(b)}return}return a}let Kb;function Lb(a){try{return Jb(a)}finally{Kb=void 0}}
|
|
15
|
+
function Jb(a){var b=a.m;a=Hb(b,Ib,void 0,void 0,!1);var c=b[p]|0;if((b=a.length)&&!(c&512)){var d=a[b-1],e=!1;Xa(d)?(b--,e=!0):d=void 0;var f,g=(f=Kb)!=null?f:Eb;f=c&512?0:-1;c=b-f;g=g(c,f,a,d);d&&(a[b]=void 0);if(c<g&&d){c=!0;for(var h in d){const k=+h;if(k<=g)e=k+f,a[e]=d[h],b=Math.max(e+1,b),e=!1,delete d[h];else{c=!1;break}}c&&(d=void 0)}for(c=b-1;b>0;c=b-1)if(h=a[c],h==null)b--,e=!0;else if(c-=f,c>=g){let k;((k=d)!=null?k:d={})[c]=h;b--;e=!0}else break;e&&(a.length=b);d&&a.push(d)}return a}
|
|
16
|
+
;function Mb(){La(Ra,5)};function Nb(a,b,c=Ta){if(a!=null){if(a instanceof Uint8Array)return b?a:new Uint8Array(a);if(Array.isArray(a)){var d=a[p]|0;if(d&2)return a;b&&(b=d===0||!!(d&32)&&!(d&64||!(d&16)));return b?(a[p]=(d|34)&-12293,a):Hb(a,Nb,d&4?Ta:c,!0,!0)}a.H===Wa&&(c=a.m,d=c[p]|0,a=d&2?a:new a.constructor(Ob(c,d,!0)));return a}}function Ob(a,b,c){const d=c||b&2?Ta:Sa,e=!!(b&32);a=Fb(a,b,f=>Nb(f,e,d));a[p]=a[p]|32|(c?2:0);return a}function Pb(a){const b=a.m,c=b[p]|0;return c&2?new a.constructor(Ob(b,c,!1)):a};function w(a,b){a=a.m;return Qb(a,a[p]|0,b)}function Qb(a,b,c,d){if(c===-1)return null;const e=c+(b&512?0:-1),f=a.length-1;if(e>=f&&b&256)return a[f][c];if(d&&b&256&&(b=a[f][c],b!=null))return a[e]!=null&&La(Oa,4),b;if(e<=f)return a[e]}function Rb(a,b,c){const d=a.m;let e=d[p]|0;ab(e);x(d,e,b,c);return a}
|
|
17
|
+
function x(a,b,c,d){const e=b&512?0:-1,f=c+e;var g=a.length-1;if(f>=g&&b&256)return a[g][c]=d,b;if(f<=g)return a[f]=d,b&256&&(a=a[g],c in a&&delete a[c]),b;d!==void 0&&(g=b>>15&1023||536870912,c>=g?d!=null&&(a[g+e]={[c]:d},b|=256,a[p]=b):a[f]=d);return b}function Sb(a,b,c,d){c=y(a,d)===c?c:-1;return Tb(a,b,c)!==void 0}function Ub(a){return!!(2&a)&&!!(4&a)||!!(2048&a)}function z(a,b,c,d){const e=a.m;let f=e[p]|0;ab(f);x(e,f,b,(d==="0"?Number(c)===0:c===d)?void 0:c);return a}
|
|
18
|
+
function y(a,b){a=a.m;return Vb(Wb(a),a,a[p]|0,b)}function Wb(a){let b;return(b=a[Pa])!=null?b:a[Pa]=new Map}function Vb(a,b,c,d){let e=a.get(d);if(e!=null)return e;e=0;for(let f=0;f<d.length;f++){const g=d[f];Qb(b,c,g)!=null&&(e!==0&&(c=x(b,c,e)),e=g)}a.set(d,e);return e}function Tb(a,b,c,d){a=a.m;let e=a[p]|0;d=Qb(a,e,c,d);b=Db(d,b,e);b!==d&&b!=null&&x(a,e,c,b);return b}
|
|
19
|
+
function Xb(a,b,c){b=Tb(a,b,c,!1);if(b==null)return b;a=a.m;let d=a[p]|0;if(!(d&2)){const e=Pb(b);e!==b&&(b=e,x(a,d,c,b))}return b}function Yb(a,b,c){c==null&&(c=void 0);return Rb(a,b,c)}function A(a,b,c,d){d==null&&(d=void 0);a:{const g=a.m;var e=g[p]|0;ab(e);if(d==null){var f=Wb(g);if(Vb(f,g,e,c)===b)f.set(c,0);else break a}else{f=g;const h=Wb(f),k=Vb(h,f,e,c);k!==b&&(k&&(e=x(f,e,k)),h.set(c,b))}x(g,e,b,d)}return a}
|
|
20
|
+
function Zb(a,b){const c=a.m;let d=c[p]|0;ab(d);if(b==null)return x(c,d,1),a;let e=b[p]|0,f=e;const g=Ub(e),h=g||Object.isFrozen(b);let k=!0,r=!0;for(let F=0;F<b.length;F++){var D=b[F];g||(D=!!((D.m[p]|0)&2),k&&(k=!D),r&&(r=D))}g||(e=k?13:5,e=r?e|16:e&-17);h&&e===f||(b=Va(b),f=0,e=$b(e,d),e=ac(e,d,!0));e!==f&&(b[p]=e);x(c,d,1,b);return a}function $b(a,b){a=(2&b?a|2:a&-3)|32;return a&=-2049}function ac(a,b,c){32&b&&c||(a&=-33);return a}
|
|
21
|
+
function bc(a){a=w(a,1);a=a==null||typeof a==="boolean"?a:typeof a==="number"?!!a:void 0;return a!=null?a:!1}function cc(a){a=w(a,1);a!=null&&(typeof a==="bigint"?nb(a)?a=Number(a):(a=tb(64,a),a=nb(a)?Number(a):String(a)):a=yb(a)?typeof a==="number"?Cb(a):Bb(a):void 0);return a!=null?a:0}function B(a,b){a=w(a,b);a=a==null||typeof a==="string"?a:void 0;return a!=null?a:""}function E(a,b){a=w(a,b);a=a==null?a:vb(a)?a|0:void 0;return a!=null?a:0}
|
|
22
|
+
function G(a,b,c,d){c=y(a,d)===c?c:-1;return Xb(a,b,c)};function dc(){var a=ec||(ec=fc("[1,2,0]"));a=Pb(a);a=Rb(a,4,v("dev-726217118"));const b=a.m,c=b[p]|0;return c&2?a:new a.constructor(Ob(b,c,!0))}var H=class{constructor(a){a:{if(a==null){var b=96;a=[]}else{if(!Array.isArray(a))throw Error("narr");b=a[p]|0;16384&b||!(64&b)||2&b||Mb();if(b&2048)throw Error("farr");if(b&64)break a;var c=a;b|=64;var d=c.length;if(d&&(--d,Xa(c[d]))){b|=256;c=d-(b&512?0:-1);if(c>=1024)throw Error("pvtlmt");b=b&-33521665|(c&1023)<<15}}a[p]=b}this.m=a}toJSON(){return Lb(this)}};
|
|
23
|
+
H.prototype.H=Wa;H.prototype.toString=function(){return this.m.toString()};function gc(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[p]|=32;b=new a(b)}return b}};var fc=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[p]|=34;return new a(b)}}(class extends H{});var hc=class extends H{};function kc(a){var b=new lc(500);let c=0,d;return(...e)=>{mc(b)?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;let f;(f=d)==null||f()},nc(b))))}}function oc(a){var b=new lc(100),c=Promise.resolve();return(...d)=>mc(b)?a(...d):c};function mc(a){return pc(a,a.index)>=a.g?(a.h[a.index]=Date.now(),a.index=(a.index+1)%1,!0):!1}function nc(a){const b=a.g;a=pc(a,a.index);return a>=b?0:b-a}function pc(a,b){let c;return Date.now()-((c=a.h[b])!=null?c:-1*a.g)}var lc=class{constructor(a){this.g=a;this.h=[];this.index=0}};var qc=class extends H{},rc=[2,3];var sc=class extends H{};var I=class extends Error{constructor({errorType:a,message:b,i:c}){super(`Meet add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},J={errorType:"InternalError",message:"An unexpected error has occurred.",i:"No further information is available."},tc={errorType:"MissingUrlParameter",message:"Missing required Meet SDK URL parameter",i:"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)."},
|
|
24
|
+
uc={errorType:"NeedsMainStageContext",message:"This method can only be invoked if the addon is running in the main stage.",i:"Use getFrameType to check whether the addon is running in the main stage before invoking this method."},vc={errorType:"NeedsSidePanelContext",message:"This method can only be invoked if the addon is running in the side panel.",i:"Use getFrameType to check whether the addon is running in the side panel before invoking this method."},wc={errorType:"NotSupportedInStandalone",
|
|
25
|
+
message:"This method is not supported in standalone mode.",i:"Do not call this method in standalone mode."},xc={errorType:"MustBeIframed",message:"The SDK must be run in an iframe as part of a Google Meet add-on.",i:"See https://developers.google.com/meet/add-ons/guides/deploy-add-on to deploy to Meet."},yc={errorType:"InternalError",message:"The frame type URL parameter is set to an unexpected value.",i:"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)."},
|
|
26
|
+
zc={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.",i:"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."},Ac={errorType:"DestinationNotReady",
|
|
27
|
+
message:"The recipient frame is not connected via the addon SDK and cannot receive the notification.",i:"Make sure the destination frame has connected before sending messages to it."},Bc={errorType:"InvalidActivityStartingState",message:"Origin of the ActivityStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",i:"Ensure that the ActivityStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},Cc={errorType:"ActivityStartingStateMissingAttributes",
|
|
28
|
+
message:"The supplied ActivityStartingState object does not contain any recognized attributes.",i:"Ensure that the ActivityStartingState object contains at least one of the following attributes: mainStageUrl, sidePanelUrl, additionalData."},Dc={errorType:"ActivityStartingStateUnrecognizedAttributes",message:"The supplied ActivityStartingState object contains attributes that are not recognized.",i:"Ensure that the ActivityStartingState object has only the following attributes: mainStageUrl, sidePanelUrl, additionalData."},
|
|
29
|
+
Ec={errorType:"AddonStartingStateMissingAttributes",message:"The supplied AddonStartingState object does not contain any recognized attributes.",i:"Ensure that the AddonStartingState object contains at least one of the following attributes: sidePanelUrl, additionalData."},Fc={errorType:"AddonStartingStateUnrecognizedAttributes",message:"The supplied AddonStartingState object contains attributes that are not recognized.",i:"Ensure that the AddonStartingState object has only the following attributes: sidePanelUrl, additionalData."},
|
|
30
|
+
Gc=a=>({errorType:"ArgumentNullError",message:`The argument supplied for '${a}' was 'null' but a value was expected.`,i:"Ensure you are passing a value of the expected type for the argument."}),K=(a,b,c)=>({errorType:"ArgumentTypeError",message:`The type '${b}' of argument supplied for '${a}' did not match the expected type '${c}'.`,i:"Ensure the type of the argument provided matches the expected type."}),Hc=a=>({errorType:"InternalError",message:`Could not connect to ${a} channel. Unknown error`,
|
|
31
|
+
i:"No further information is available."}),Ic={errorType:"ActivityIsOngoing",message:"Operation cannot be performed while an activity is ongoing.",i:"Ensure that no activity is ongoing."},Jc={errorType:"InternalError",message:"Frame message missing required Meet SDK command.",i:"Send one of the available commands in the frame message."},Kc={errorType:"NoActivityFound",message:"No activity found.",i:"Ensure that the activity is started before performing this operation."},Lc={errorType:"RequiresEapEnrollment",
|
|
32
|
+
message:"This feature is only available to early access partners.",i:"Meet add-on early access enrollment is currently closed."},Mc={errorType:"UserNotInitiator",message:"Operation cannot be performed because the user is not the initiator of the current activity.",i:"Ensure that the user is the initiator of the current activity or that the activity has ended."},Nc={errorType:"SizeLimitExceededActivityStartingState",message:"The size of the activityStartingState URLs and/or its data exceed the limits allowed.",
|
|
33
|
+
i:"Ensure that the activityStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Oc={errorType:"SizeLimitExceededFrameToFrameMessage",message:"The size of the frame to frame message exceeds the limits allowed.",i:"Ensure that the frame to frame message size is less than 1,000,000 characters."},Pc={errorType:"AddonSessionAlreadyCreated",message:"The addon session has already been created.",i:"Only instantiate the AddonSession once."},Qc={errorType:"UserCancelled",
|
|
34
|
+
message:"The user cancelled starting an activity.",i:"The user needs to click continue to start the activity."},Rc={errorType:"NotSupportedInMeetCall",message:"This method is not supported during a Meet call.",i:"Do not call this method during a Meet call."},Sc={errorType:"InvalidAddonStartingState",message:"Origin of the AddonStartingState iframeURLs does not match the origin of the URLs provided in the add-on manifest.",i:"Ensure that the AddonStartingState iframeURL origins match the origins of the URLs provided in the add-on manifest."},
|
|
35
|
+
Tc={errorType:"SizeLimitExceededAddonStartingState",message:"The size of the AddonStartingState URLs and/or its data exceed the limits allowed.",i:"Ensure that the AddonStartingState URL size is less than 512 characters and the additional data size is less than 4096 characters."},Uc={errorType:"MeetingPolicyPreventsStartingActivity",message:"A meeting policy (such as using host control settings) prevents the user from starting the activity.",i:"Have a meeting host or administrator modify the necessary settings to allow the current user to start the activity."};
|
|
36
|
+
function Vc(a){switch(a){case 0:return J;case 1:return Ac;case 2:return Bc;case 3:return Ic;case 4:return Jc;case 5:return Lc;case 6:return wc;case 7:return Mc;case 8:return Nc;case 9:return Oc;case 10:return Qc;case 11:return Rc;case 12:return Sc;case 13:return Tc;case 14:return Kc;case 15:return Uc;default:return J}}
|
|
37
|
+
function Wc(a){let b;var c=(b=E(a,1))!=null?b:0;a=Xc(y(a,rc));switch(c){case 1:return{errorType:"InternalError",message:`Could not connect to ${a} channel. Meet did not respond with a MessagePort.`,i:"No further information is available."};case 2:return{errorType:"InternalError",message:`Could not connect to ${a}. A conflicting ${a} exists.`,i:"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}.`,
|
|
38
|
+
i:"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}.`,i:"No further information is available."};case 0:return Hc(a);case 5:a:switch(a){case "co":c={errorType:"InternalError",message:`Could not connect to ${a} channel. The coActivity was not found.`,i:`Consider starting the ${a} only after after the startActivity promise returns.`};break a;default:c={errorType:"InternalError",message:`Could not connect to ${a} channel.`,
|
|
39
|
+
i:"No further information is available."}}return c;default:return Hc(a)}}function Xc(a){switch(a){case 2:return"co";case 3:return"gd";case 0:return"unknown";default:return"unknown"}}function L({errorType:a,message:b,i:c},d=""){throw new I({errorType:a,message:d?`${b} ${d}`:b,i:c});}function Yc(a,b){L({...tc,message:`${tc.message}: ${a}. In URL ${b}`})};function Zc(a){var b=new $c;return z(b,1,u(a),0)}function ad(a,b){return z(a,2,v(b),"")}function bd(a,b){return z(a,3,v(b),"")}var $c=class extends H{getFrameType(){return E(this,1)}};function cd(a){var b;void 0===cb?b=2:b=4;var c=a.m[p]|0,d=c,e=!(2&c),f=$c;a=a.m;var g=!!(2&d);c=g?1:b;e&&(e=!g);b=Qb(a,d,1);b=Array.isArray(b)?b:Za;var h=b[p]|0;g=!!(4&h);if(!g){var k=h;k===0&&(k=$b(k,d));h=b;k|=1;var r=d;const D=!!(2&k);D&&(r|=2);let F=!D,ta=!0,ca=0,C=0;for(;ca<h.length;ca++){const Q=Db(h[ca],f,r);if(Q instanceof f){if(!D){const ua=!!((Q.m[p]|0)&2);F&&(F=!ua);ta&&(ta=ua)}h[C++]=Q}}C<ca&&(h.length=C);k|=4;k=ta?k|16:k&-17;k=F?k|8:k&-9;h[p]=k;D&&Object.freeze(h);h=k}if(e&&!(8&h||!b.length&&
|
|
40
|
+
(c===1||c===4&&32&h))){Ub(h)&&(b=Va(b),h=$b(h,d),d=x(a,d,1,b));e=b;f=h;for(h=0;h<e.length;h++)k=e[h],r=Pb(k),k!==r&&(e[h]=r);f|=8;f=e.length?f&-17:f|16;h=e[p]=f}c===1||c===4&&32&h?Ub(h)||(d=h,a=!!(32&h),h|=!b.length||16&h&&(!g||a)?2:2048,h!==d&&(b[p]=h),Object.freeze(b)):(c===2&&Ub(h)&&(b=Va(b),h=$b(h,d),h=ac(h,d,!1),b[p]=h,d=x(a,d,1,b)),Ub(h)||(a=h,h=ac(h,d,!1),h!==a&&(b[p]=h)));return b}function dd(a){var b=new ed;return Zb(b,a)}var ed=class extends H{};var fd=class extends H{};var gd=class extends H{};var hd=class extends H{};var id=class extends H{};var jd=class extends H{};var kd=class extends H{getMeetPlatformInfo(){return Xb(this,id,1)}};var ld=class extends H{getMeetingInfo(){return Xb(this,jd,1)}};var md=class extends H{},M=[1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21];var nd=class extends H{};var od=class extends H{};var pd=new Map([[2,"MAIN_STAGE"],[1,"SIDE_PANEL"]]),qd=new Map([[0,"UNKNOWN"],[1,"OPEN_ADDON"],[2,"START_ACTIVITY"],[3,"JOIN_ACTIVITY"]]);function rd(a){a&&typeof a.dispose=="function"&&a.dispose()};function N(){this.s=this.s;this.g=this.g}N.prototype.s=!1;N.prototype.dispose=function(){this.s||(this.s=!0,this.G())};N.prototype[Symbol.dispose]=function(){this.dispose()};function sd(a,b){a.s?b():(a.g||(a.g=[]),a.g.push(b))}N.prototype.G=function(){if(this.g)for(;this.g.length;)this.g.shift()()};function td({J:a,R:b}){if(a===null)throw new I(Gc("activityStartingState"));if(b||a!==void 0){if(typeof a!=="object")throw new I(K("activityStartingState",typeof a,`object${b?"":" | undefined"}`));if(a.mainStageUrl!==void 0&&typeof a.mainStageUrl!=="string")throw new I(K("mainStageUrl",typeof a.mainStageUrl,"string | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new I(K("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!==
|
|
41
|
+
"string")throw new I(K("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.mainStageUrl+ +!!a.sidePanelUrl+ +!!a.additionalData)throw new I(Dc);if(Object.keys(a).length===0)throw new I(Cc);}}function ud(a){const b=[];b.push(bd(ad(Zc(2),a.mainStageUrl),a.additionalData));b.push(bd(ad(Zc(1),a.sidePanelUrl),a.additionalData));return b}
|
|
42
|
+
var Dd=class extends N{constructor(a){super();this.context=a;this.h={};vd(this.context.g.U,b=>{switch(y(b.content,M)){case 7:const d=this.h.frameToFrameMessage;b=G(b.content,hd,7,M);if(d&&b){var c=E(b,1);c=pd.get(c);if(c===void 0)throw Error("Unknown frame type.");d({originator:c,payload:B(b,2)})}}})}async getMeetingInfo(){const a=await wd(this.context.g);return{meetingId:B(a.getMeetingInfo(),1),meetingCode:B(a.getMeetingInfo(),2)}}async getFrameOpenReason(){let a;const b=(a=this.context.h.ca)!=null?
|
|
43
|
+
a:0;let c;return(c=qd.get(b))!=null?c:"UNKNOWN"}async getActivityStartingState(){var a=Xb(await xd(this.context.g),ed,1);const b=a==null?void 0:cd(a).find(c=>c.getFrameType()===2);a=a==null?void 0:cd(a).find(c=>c.getFrameType()===1);return{mainStageUrl:(b==null?void 0:B(b,2))||void 0,sidePanelUrl:(a==null?void 0:B(a,2))||void 0,additionalData:(a==null?void 0:B(a,3))||void 0}}async setActivityStartingState(a){td({J:a,R:!0});var b=ud(a);a=yd;var c=this.context.g;var d=new nd;b=dd(b);d=Yb(d,1,b);await a(c,
|
|
44
|
+
d)}on(a,b){this.h[a]=b}async getMeetPlatformInfo(){const a=await zd(this.context.g);return{isMeetHardware:bc(a.getMeetPlatformInfo())}}async closeAddon(){await Ad(this.context.g)}async startActivity(a){td({J:a,R:!1});const b=new od;a&&(a=ud(a),a=dd(a),Yb(b,1,a));await Bd(this.context.g,b)}async endActivity(a){var b=Cd,c=this.context.g,d=new fd;a=z(d,1,u(a==="aab61ee0-51b4-475d-aa4d-849f2498640d"?999:0),0);await b(c,a)}};var Ed=gc(class extends H{getFrameOpenReason(){return E(this,5)}});function Fd(){var a=window.location.href;var b=window.location.href;var c=(new URL(b)).searchParams.get("meet_sdk");if(c)b=Ed(atob(c));else{var d;((d=window.top)!=null?d:window)===window?L(xc):Yc("meet_sdk",b);b=void 0}(c=B(b,1))||Yc("meet_addon_frame_type",a);c=Number(c);if(c!==2&&c!==1)throw new I(yc);(d=B(b,2))||Yc("meet_control_channel_name",a);const e=B(b,4);e||Yc("addon_cloud_project_number",a);var f;a=(f=b.getFrameOpenReason())!=null?f:0;f=B(b,3)||"https://meet.google.com";return{ca:a,frameType:c,
|
|
45
|
+
ba:d,cloudProjectNumber:e,S:f}};var Gd=class extends H{};var Hd=class extends H{};var Id=class extends H{};function Jd(){var a=new Kd,b=new Id;return A(a,1,Ld,b)}var Kd=class extends H{},Ld=[1,2];function Md(a){var b=new Nd;return Yb(b,2,a)}function Od(a,b){return z(a,3,v(b),"")}var Nd=class extends H{};var Pd=class extends H{};var Qd=class extends H{};var Rd=class extends H{};var Sd=class extends H{};var Td=class extends H{};var Ud=class extends H{};var Vd=class extends H{setAddonStartingState(a){return Yb(this,1,a)}};var Wd=class extends H{};function Xd(a,b){return A(a,2,O,b)}var P=class extends H{},O=[1,2,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20];function Yd(a){return G(a,md,2,Zd)}var $d=class extends H{},ae=gc($d),Zd=[1,2];class be{constructor(a,b){this.data=a;this.channel=b}};var ce=Promise;function de(a){const b=new MessageChannel;ee(b.port1,a);return b}function fe(a,b){ee(a,b);return new ge(a)}class ge{constructor(a){this.g=a}send(a,b,c=[]){b=de(b);this.g.postMessage(a,[b.port2].concat(c))}C(a,b){return new ce(c=>{this.send(a,c,b)})}}function ee(a,b){b&&(a.onmessage=c=>{var d=c.data;c=fe(c.ports[0]);b(new be(d,c))})};var he=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?a=>a&&AsyncContext.Snapshot.wrap(a):a=>a;function ie(a,b){a.l(b);a.h<100&&(a.h++,b.next=a.g,a.g=b)}class je{constructor(a,b){this.j=a;this.l=b;this.h=0;this.g=null}get(){let a;this.h>0?(this.h--,a=this.g,this.g=a.next,a.next=null):a=this.j();return a}};function ke(){var a=le;let b=null;a.g&&(b=a.g,a.g=a.g.next,a.g||(a.h=null),b.next=null);return b}class me{constructor(){this.h=this.g=null}add(a,b){const c=ne.get();c.set(a,b);this.h?this.h.next=c:this.g=c;this.h=c}}var ne=new je(()=>new oe,a=>a.reset());class oe{constructor(){this.next=this.g=this.h=null}set(a,b){this.h=a;this.g=b;this.next=null}reset(){this.next=this.g=this.h=null}};let pe,qe=!1,le=new me,se=(a,b)=>{pe||re();qe||(pe(),qe=!0);le.add(a,b)},re=()=>{const a=Promise.resolve(void 0);pe=()=>{a.then(te)}};function te(){let a;for(;a=ke();){try{a.h.call(a.g)}catch(b){ka(b)}ie(ne,a)}qe=!1};function ue(){};function R(a){this.g=0;this.T=void 0;this.l=this.h=this.j=null;this.v=this.B=!1;if(a!=ue)try{const b=this;a.call(void 0,function(c){ve(b,2,c)},function(c){ve(b,3,c)})}catch(b){ve(this,3,b)}}function we(){this.next=this.context=this.h=this.l=this.g=null;this.j=!1}we.prototype.reset=function(){this.context=this.h=this.l=this.g=null;this.j=!1};var xe=new je(function(){return new we},function(a){a.reset()});function ye(a,b,c){const d=xe.get();d.l=a;d.h=b;d.context=c;return d}
|
|
46
|
+
function ze(){let a,b;const c=new R(function(d,e){a=d;b=e});return new Ae(c,a,b)}R.prototype.then=function(a,b,c){return Be(this,he(typeof a==="function"?a:null),he(typeof b==="function"?b:null),c)};R.prototype.$goog_Thenable=!0;function Ce(a,b){b=he(b);b=ye(b,b);b.j=!0;De(a,b)}R.prototype.cancel=function(a){if(this.g==0){const b=new S(a);se(function(){Ee(this,b)},this)}};
|
|
47
|
+
function Ee(a,b){if(a.g==0)if(a.j){var c=a.j;if(c.h){var d=0,e=null,f=null;for(let g=c.h;g&&(g.j||(d++,g.g==a&&(e=g),!(e&&d>1)));g=g.next)e||(f=g);e&&(c.g==0&&d==1?Ee(c,b):(f?(d=f,d.next==c.l&&(c.l=d),d.next=d.next.next):Fe(c),Ge(c,e,3,b)))}a.j=null}else ve(a,3,b)}function De(a,b){a.h||a.g!=2&&a.g!=3||He(a);a.l?a.l.next=b:a.h=b;a.l=b}
|
|
48
|
+
function Be(a,b,c,d){const e=ye(null,null,null);e.g=new R(function(f,g){e.l=b?function(h){try{const k=b.call(d,h);f(k)}catch(k){g(k)}}:f;e.h=c?function(h){try{const k=c.call(d,h);k===void 0&&h instanceof S?g(h):f(k)}catch(k){g(k)}}:g});e.g.j=a;De(a,e);return e.g}R.prototype.ma=function(a){this.g=0;ve(this,2,a)};R.prototype.na=function(a){this.g=0;ve(this,3,a)};
|
|
49
|
+
function ve(a,b,c){if(a.g==0){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.g=1;a:{var d=c,e=a.ma,f=a.na;if(d instanceof R){De(d,ye(e||ue,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{const k=d.then;if(typeof k==="function"){Ie(d,k,e,f,a);g=!0;break a}}catch(k){f.call(a,k);g=!0;break a}g=!1}}}g||(a.T=c,a.g=b,a.j=null,He(a),b!=3||c instanceof S||Je(a,c))}}
|
|
50
|
+
function Ie(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))}let h=!1;try{b.call(a,g,f)}catch(k){f(k)}}function He(a){a.B||(a.B=!0,se(a.la,a))}function Fe(a){let b=null;a.h&&(b=a.h,a.h=b.next,b.next=null);a.h||(a.l=null);return b}R.prototype.la=function(){let a;for(;a=Fe(this);)Ge(this,a,this.g,this.T);this.B=!1};
|
|
51
|
+
function Ge(a,b,c,d){if(c==3&&b.h&&!b.j)for(;a&&a.v;a=a.j)a.v=!1;if(b.g)b.g.j=null,Ke(b,c,d);else try{b.j?b.l.call(b.context):Ke(b,c,d)}catch(e){Le.call(null,e)}ie(xe,b)}function Ke(a,b,c){b==2?a.l.call(a.context,c):a.h&&a.h.call(a.context,c)}function Je(a,b){a.v=!0;se(function(){a.v&&Le.call(null,b)})}var Le=ka;function S(a){ja.call(this,a)}ia(S,ja);S.prototype.name="cancel";function Ae(a,b,c){this.promise=a;this.resolve=b;this.reject=c};let Me=1,Ne=new WeakMap;function Oe(a,b,c){var d=Pe;a.h.has(b);d(b,c)}var Re=class extends N{constructor(){super();this.h=new Set}signal(){const a=new Qe;this.h.add(a);sd(this,fa(rd,a));return a}};function Pe(a,b){return new Promise(c=>{Se(()=>{a.L&&(a.ea=b,a.P=!0);for(const {I:d,slot:e}of a.o.values())try{e(b,{signal:a,I:d})}catch(f){ka(f)}for(const d of a.A)d.resolve(b);a.A.clear();c()})})}function vd(a,b,c){const d=Me++;Se(()=>{Te(a,d,b,c)});return d}
|
|
52
|
+
function Te(a,b,c,d){if(!a.s)if(d){if(!d.s){const e=()=>{Se(()=>{a.o.delete(b);const f=Ne.get(d);f&&xa(f,e)})};a.o.set(b,{I:b,slot:c,F:e});Ue(d,e)}}else a.o.set(b,{I:b,slot:c,F:()=>a.o.delete(b)})}
|
|
53
|
+
var Qe=class extends N{constructor(){super();this.L=!1;this.o=new Map;this.A=new Set;this.P=!1}detach(a){Se(()=>{const b=this.o.get(a);b&&b.F()})}value(a){return this.promise(!0,a)}next(a){return this.promise(!1,a)}promise(a,b){const c=ze();Se(()=>{if(this.s)c.reject(new S("Signal initially disposed"));else if(b&&b.s)c.reject(new S("Owner initially disposed"));else if(a&&this.L&&this.P)c.resolve(this.ea);else if(this.A.add(c),Ce(c.promise,()=>{this.A.delete(c)}),b){const d=()=>{c.reject(new S("Owner asynchronously disposed"))};
|
|
54
|
+
Ce(c.promise,()=>{const e=Ne.get(b);e&&xa(e,d)});Ue(b,d)}});return c.promise}G(){super.G();Se(()=>{for(const {F:a}of this.o.values())a();this.o.clear();for(const a of this.A)a.reject(new S("Signal asynchronously disposed"));this.A.clear()})}};const Ve=[];let We=!1;function Se(a){Ve.push(a);Xe()}async function Xe(){if(!We)try{We=!0;let a=Ye(0);for(;a<Ve.length;)await Promise.resolve(),a=Ye(a)}catch(a){ka(a)}finally{Ve.length=0,We=!1}}
|
|
55
|
+
function Ye(a){const b=a+100;for(;a<b&&a<Ve.length;)try{Ve[a++]()}catch(c){ka(c)}return a}function Ue(a,b){if(a.s)b();else{var c=Ne.get(a);if(c)c.push(b);else{const d=[b];Ne.set(a,d);sd(a,()=>{for(const e of[...d])e();Ne.delete(a)})}}};function T(a){var b=new $d;a=A(b,1,Zd,a);return{content:JSON.stringify(Lb(a))}}const Ze=new Re;function $e(a,b){const c=Ze.signal();return{channel:fe(a,d=>{const e=b(d.data);Oe(Ze,c,{content:e,ka:d})}),signal:c}};let ec;var U=class extends H{};var V=class extends H{};var bf=class extends H{h(){return G(this,U,2,af)}g(){return Sb(this,U,2,af)}j(){return G(this,V,3,af)}l(){return Sb(this,V,3,af)}},af=[2,3];var cf=gc(class extends H{});var df=gc(class extends H{}),ef=[1,2];var ff=({destination:a,origin:b,ra:c,Y:d="ZNWN1d",onMessage:e})=>{if(b==="*")throw Error("Sending to wildcard origin not allowed.");const f=de(e);a.postMessage(c?{n:d,t:c}:d,b,[f.port2]);return fe(f.port1,e)};function gf(a,b,c){const d=new Re,e=d.signal();a=ff({destination:window.parent,origin:b,Y:a,onMessage:f=>{const g=ae(f.data.content);y(g,Zd)===2&&Oe(d,e,{content:Yd(g),ka:f,messagePort:f.data.messagePort})}});return new hf(e,a,c)}async function wd(a){var b=W;var c=new P;var d=new Rd;c=A(c,19,O,d);a=await b(a,T(c));let e;return(e=Yd(ae(a.data.content)))==null?void 0:G(e,ld,20,M)}
|
|
56
|
+
async function xd(a){var b=W;var c=new P;var d=new Hd;c=A(c,17,O,d);a=await b(a,T(c));let e;return(e=Yd(ae(a.data.content)))==null?void 0:G(e,gd,18,M)}async function yd(a,b){var c=W,d=new P;b=A(d,8,O,b);await c(a,T(b))}async function zd(a){var b=W;var c=new P;var d=new Qd;c=A(c,18,O,d);a=await b(a,T(c));let e;return(e=Yd(ae(a.data.content)))==null?void 0:G(e,kd,19,M)}async function Ad(a){var b=W;var c=new P;var d=new Gd;c=A(c,11,O,d);await b(a,T(c))}
|
|
57
|
+
async function Bd(a,b){var c=W,d=new P;b=A(d,14,O,b);await c(a,T(b))}async function Cd(a,b){var c=W,d=new P;b=A(d,15,O,b);await c(a,T(b))}async function jf(a){await a.h()}
|
|
58
|
+
async function W(a,b){(a=await a.channel.C(b))||L(J,"Falsy response received from the message channel."+` ${JSON.stringify(a)}`);(b=a.data)||L(J,"Data field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);(b=b.content)||L(J,"Content field in the response from the message channel is falsy."+` ${JSON.stringify(b)}`);let c=void 0;try{c=ae(b)}catch(d){L(J,"The ControlMessage can't be deserialized."+` ${JSON.stringify(b)}. ${JSON.stringify(d)}`)}(b=Yd(c))||L(J,"MeetToAddonMessage field on ControlMessage is falsy."+
|
|
59
|
+
` ${JSON.stringify(b)}`);b=b==null?void 0:G(b,sc,10,M);if((b==null?void 0:E(b,1))!==void 0)throw new I(Vc(E(b,1)));return a}async function kf(a,b,c){var d=W,e=new P;b=A(e,1,O,b);d=await d(a,T(b));a=d.data.messagePort;var f;(d=(f=Yd(ae(d.data.content)))==null?void 0:G(f,qc,1,M))!=null?f=d:(f=new qc,f=z(f,1,u(0),0));return{channel:a?$e(a,c):void 0,response:f}}async function lf(a){const b=Jd(),{channel:c,response:d}=await kf(a,b,e=>df(e));if(!c)throw new I(Wc(d));return c}
|
|
60
|
+
async function mf(a){var b=W;var c=new P;var d=new Wd;c=A(c,5,O,d);await b(a,T(c))}async function nf(a){var b=W;var c=new P;var d=new Pd;c=A(c,6,O,d);await b(a,T(c))}async function of(a,b,c){var d=W,e=new P,f=new Sd;b=z(f,1,u(b),0);c=z(b,2,v(c),"");e=A(e,7,O,c);await d(a,T(e))}async function pf(a,b){var c=W,d=new P;b=A(d,16,O,b);await c(a,T(b))}
|
|
61
|
+
class hf extends N{constructor(a,b,c){super();this.U=a;this.channel=b;this.h=oc(async()=>{var d=this.channel,e=d.C;var f=new P;var g=new Td;f=A(f,13,O,g);await e.call(d,T(f))});a=dc();B(a,4);zb(w(a,1));zb(w(a,2));zb(w(a,3));c=Xd(new P,Od(Md(a),c));this.channel.send(T(c));vd(this.U,async d=>{switch(y(d.content,M)){case 16:await jf(this)}})}};let qf;var rf=class{constructor(a){var b=qf;this.h=a;this.g=b}delete(){throw Error("Not implemented.");}};var tf=class extends H{h(){return G(this,U,2,sf)}g(){return Sb(this,U,2,sf)}j(){return G(this,V,3,sf)}l(){return Sb(this,V,3,sf)}},sf=[2,3];var uf=class extends H{};var vf=class extends H{};var wf=class extends H{};var yf=class extends H{h(){return G(this,U,2,xf)}g(){return Sb(this,U,2,xf)}j(){return G(this,V,3,xf)}l(){return Sb(this,V,3,xf)}},xf=[2,3],zf=[5,6];var Af=class extends H{};var Bf=class extends H{},Cf=[1,2,3];var Df=class extends Error{constructor(){super("Failed to create CoActivity: Connection refused - Meet refused to begin Live Sharing")}};var Ef=class{constructor(a){this.config=a}start(){this.g!=null||(this.g=setInterval(()=>{this.config.ha()},this.config.da));return this}shutdown(){clearInterval(this.g)}};function Ff(){const a=new Map,b={set(c,d){a.set(c,d);return b},D:()=>a};return b};function Gf(a){if(a.g()){a=a.h().m;var b=a[p]|0;var c=Qb(a,b,1),d=Ya(c,!0);d!=null&&d!==c&&x(a,b,1,d);a=d;b=a==null?Ea():a;a=Uint8Array;Ha(Da);c=b.g;if(c!=null&&!Ca(c))if(typeof c==="string"){za.test(c)&&(c=c.replace(za,Ba));c=atob(c);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.g=c;return{bytes:new a(b||0)}}}function Hf(a,b){b=If(b);A(a,2,xf,b);return a}function Jf(a,b){b=If(b);A(a,2,sf,b);return a}
|
|
62
|
+
function If(a){var b=new U;return z(b,1,Ya(a.bytes,!1),Ea())}function Kf(a){if(a.l()){a=a.j();var b,c,d=B(a,1),e=(c=(b=Xb(a,hc,2))==null?void 0:cc(b))!=null?c:0;c=a.m;let f=c[p]|0;const g=Qb(c,f,4);b=g==null||typeof g==="number"?g:g==="NaN"||g==="Infinity"||g==="-Infinity"?Number(g):void 0;b!=null&&b!==g&&x(c,f,4,b);return{mediaId:d,mediaPlayoutPosition:e,mediaPlayoutRate:b!=null?b:0,playbackState:Lf.get(E(a,3))}}}function Mf(a,b){b=Nf(b);A(a,3,xf,b);return a}
|
|
63
|
+
function Of(a,b){b=Nf(b);A(a,3,sf,b);return a}const Lf=Ff().set(0,"INVALID").set(1,"BUFFERING").set(2,"PLAY").set(3,"PAUSE").set(4,"ENDED").D(),Pf=Ff().set("INVALID",0).set("BUFFERING",1).set("PLAY",2).set("PAUSE",3).set("ENDED",4).D();
|
|
64
|
+
function Nf(a){var b=new V;b=z(b,1,v(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=z(b,4,c,0);c=new hc;c=z(c,1,Ab(a.mediaPlayoutPosition),"0");b=Yb(b,2,c);a=Pf.get(a.playbackState);return z(b,3,u(a),0)}function Qf({activityTitle:a}){var b=new wf;return Rb(b,4,v(a))}function Rf(a,b){var c=new vf;b=z(c,1,u(b.u),0);A(a,6,zf,b);return a}function Sf(a){var b=new uf;A(a,5,zf,b);return a};const Tf=Ff().set("co-doing",1).set("co-watching",2).D();async function Uf(a,b,c){var d=b.C,e=new Bf;var f=new Af;f=z(f,1,v(a.activityTitle),"");var g=Tf.get(a.K);f=z(f,2,u(g),0);e=A(e,3,Cf,f);d=await d.call(b,e,cf);let h;if((h=bc(d))!=null&&h)return new Vf(a,b,c,Xb(d,bf,2));throw new Df;}function Wf(a,b){const c=a.config.N(b);c&&!a.config.M(a.g,c)&&(a.g=c,a.j=cc(b),a.v(a.g))}function X(a,b){const {state:c,fa:d,context:e}=b(a.g);a.g=c;a.notify(a.g,e,d)}
|
|
65
|
+
class Vf{constructor(a,b,c,d){this.l=a;this.h=b;this.config=c;this.v=kc(e=>void this.l.O(e));Xf(this.h,e=>{const f=y(e,ef);switch(f){case 1:Wf(this,G(e,bf,1,ef));break;case 2:case 0:console.warn(`IllegalMessage: ${f} - ${"Unhandled message"} - ${"Please raise a bug with the MeetJS team"}`)}});this.B=(new Ef({da:1E3,ha:()=>{var e,f,g=(f=(e=this.l).ja)==null?void 0:f.call(e);if(this.g!==null){this.g={...this.g,...g};e=new Bf;f=this.config;g=f.W;var h=new tf;h=z(h,1,Ab(this.j),"0");f=g.call(f,h,this.g);
|
|
66
|
+
e=A(e,1,Cf,f);this.h.send(e)}}})).start();this.g=null;this.j=0;d&&Wf(this,d)}disconnect(){this.h.shutdown();this.B.shutdown()}notify(a,b,c){var d=c?Qf(c):void 0;c=this.config;var e=c.X;var f=new yf;f=z(f,1,Ab(this.j),"0");d=Yb(f,4,d);a=e.call(c,d,a);a=this.config.V(a,b);b=this.h;c=b.send;e=new Bf;a=A(e,2,Cf,a);c.call(b,a)}};var Yf=class{constructor(a){this.g=a}broadcastStateUpdate(a){X(this.g,()=>({state:a,context:{}}))}disconnect(){this.g.disconnect()}};function Zf(a,b){return a==null||b==null?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var $f=class{constructor(a){this.g=a}notifySwitchedToMedia(a,b,c){X(this.g,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},fa:{activityTitle:a},context:{u:1}}))}notifyPauseState(a,b){X(this.g,c=>{if(c==null)throw Error("Invalid before coWatchingState");return{state:{...c,playbackState:a?"PAUSE":"PLAY",mediaPlayoutPosition:b},context:{u:3}}})}notifySeekToTimestamp(a){X(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},
|
|
67
67
|
context:{u:2}}})}notifyPlayoutRate(a){X(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutRate:a},context:{u:4}}})}notifyBuffering(a){X(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a,playbackState:"BUFFERING"},context:{u:3}}})}notifyReady(a){X(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},context:{u:3}}})}disconnect(){this.g.disconnect()}};
|
|
68
|
-
function
|
|
69
|
-
async function
|
|
70
|
-
+!!a.additionalData)throw new I(
|
|
71
|
-
a)}async createRoomsStandaloneClient(){var a=this.g;if(a.h.frameType!==2)throw new I(
|
|
72
|
-
return
|
|
68
|
+
function ag(a,b){if(a==null||b==null)return!1;const c=a.playbackState==="PLAY"?3*Math.max(a.mediaPlayoutRate,1):0,d=Math.abs(a.mediaPlayoutPosition-b.mediaPlayoutPosition);return a.mediaId===b.mediaId&&a.mediaPlayoutRate===b.mediaPlayoutRate&&d<=c&&a.playbackState===b.playbackState};function Xf(a,b){const c=vd(a.signal,d=>{b(d)});a.o.push(c)}var bg=class{constructor(a,b){this.channel=a;this.signal=b;this.o=[]}send(a){this.channel.send(JSON.stringify(Lb(a)))}async C(a,b){a=await this.channel.C(JSON.stringify(Lb(a)));return b(a.data)}shutdown(){this.o.forEach(a=>{this.signal.detach(a)})}};function cg(a,b){var c=dg;const d=a.signal(),e=a.signal();vd(b,f=>{const g=c(f)?d:e;Oe(a,g,f)},a);return{ia:d,ga:e}}function eg(a,b,c,d=e=>e){vd(c,e=>{Oe(a,b,d(e))},a)};async function fg(a,b){if(b)return a=await Uf({activityTitle:b.activityTitle,K:"co-watching",ja:()=>b.onCoWatchingStateQuery(),O:c=>{b.onCoWatchingStateChanged(c)}},a,{X:Mf,W:Of,V:Rf,N:Kf,M:ag}),new $f(a)}async function gg(a,b){if(b)return a=await Uf({activityTitle:b.activityTitle,K:"co-doing",O:c=>{b.onCoDoingStateChanged(c)}},a,{X:Hf,W:Jf,V:Sf,N:Gf,M:Zf}),new Yf(a)}
|
|
69
|
+
async function hg(a){const b=new Re,c=b.signal();a=await a;eg(b,c,a.signal,f=>f.content);const {ia:d,ga:e}=cg(b,c);return{Z:new bg(a.channel,d),aa:new bg(a.channel,e)}}function dg(a){a:switch(y(a,ef)){case 1:a=G(a,bf,1,ef);break a;default:throw Error("CA Message arrived with no known content message set");}return a.g()};async function ig(a,b){({Z:a}=await hg(lf(a.g)));b=await gg(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function jg(a,b){({aa:a}=await hg(lf(a.g)));b=await fg(a,b);if(!b)throw Error("Failed to create co-watching session");return b};var kg=class extends Dd{async notifySidePanel(a){await of(this.context.g,1,a)}async unloadSidePanel(){await mf(this.context.g)}async loadSidePanel(){await nf(this.context.g)}};var lg=class extends Dd{async setAddonStartingState(a){if(a===null)throw new I(Gc("addonStartingState"));if(typeof a!=="object")throw new I(K("addonStartingState",typeof a,"object | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new I(K("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!=="string")throw new I(K("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.sidePanelUrl+
|
|
70
|
+
+!!a.additionalData)throw new I(Fc);if(Object.keys(a).length===0)throw new I(Ec);var b=[];b.push(bd(ad(Zc(1),a.sidePanelUrl),a.additionalData));a=this.context.g;var c=new Vd,d=c.setAddonStartingState,e=new Ud;b=Zb(e,b);await pf(a,d.call(c,b))}};var mg=class extends Dd{async notifyMainStage(a){await of(this.context.g,2,a)}};var ng=class{constructor(a){a=a.cloudProjectNumber;const b=Fd();if(b.cloudProjectNumber!==a)throw new I(zc);const c=b.S,d=b.ba;let e;qf=(e=qf)!=null?e:gf(d,c,a);this.g=new rf(b)}async createMainStageClient(){var a=this.g;if(a.h.frameType!==2)throw new I(uc);return await Promise.resolve(new kg(a))}async createSidePanelClient(){var a=this.g;if(a.h.frameType!==1)throw new I(vc);return await Promise.resolve(new mg(a))}async createCoWatchingClient(a){return await jg(this.g,a)}async createCoDoingClient(a){return await ig(this.g,
|
|
71
|
+
a)}async createRoomsStandaloneClient(){var a=this.g;if(a.h.frameType!==2)throw new I(uc);return await Promise.resolve(new lg(a))}};let og=null;for(var pg={addon:{getFrameType:function(){a:{var a=Fd().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 I(Gc("config"));if(typeof a!=="object")throw new I(K("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new I(K("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(og&&Fd().S!=="integration.test.google.com")throw new I(Pc);
|
|
72
|
+
return og=new ng(a)}}},qg=["meet"],Y=l,Z;qg.length&&(Z=qg.shift());)qg.length||pg===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=pg;}).apply(topLevel);export const meet = topLevel.meet;
|
|
@@ -5,19 +5,19 @@ const topLevel = typeof global !== 'undefined' ? global : typeof self !== 'undef
|
|
|
5
5
|
*/
|
|
6
6
|
var p=this||self;function aa(a){return a};var r=class extends Error{constructor(a,b){super(`Meet Addon Screenshare Info error: ${`${a}${b?` - ${b}`:""}`}`)}};function u(a){throw new a.j(a.message,a.m);}
|
|
7
7
|
var ba={message:"cloudProjectNumber was not defined.",m:"Ensure that cloudProjectNumber is provided in the call to exposeToMeetWhenScreensharing.",j:r},ca={message:"additionalData was defined, but startActivityOnOpen was not true.",m:"Ensure that startActivityOnOpen is set to true if additionalData is provided in the call to exposeToMeetWhenScreensharing.",j:r},da={message:"Received an incorrect value for startActivityOnOpen.",m:"Ensure that startActivityOnOpen is set to true if a mainStageUrl is provided in the call to exposeToMeetWhenScreensharing.",
|
|
8
|
-
j:r};let ea;var v,
|
|
9
|
-
function
|
|
10
|
-
function
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
d;return a};function O(a,b,c){const e=a.i;let d=e[
|
|
14
|
-
function
|
|
15
|
-
function X(a){var b
|
|
16
|
-
"function"&&(d=d(),k[l]=d);k=d}d=a[++f];l=h+1;typeof d==="number"&&d<0&&(l-=d,d=a[++f]);for(;h<l;h++){const n=g[h];k?c(e,h,m,k,n):b(e,h,m,n)}}return a[
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
128),c>>=7;a.g.push(1)}},U()),new W(
|
|
21
|
-
Object.isFrozen(d);var k=!0,l=!0;for(let
|
|
22
|
-
e=["+/=","+/","-_=","-_.","-_"],d=0;d<5;d++)for(b=c.concat(e[d].split("")),
|
|
23
|
-
(t=n.navigator.mediaDevices)==null||t.setCaptureHandleConfig(a))}},
|
|
8
|
+
j:r};let ea;function fa(a){p.setTimeout(()=>{throw a;},0)};var v,w;a:{for(var ha=["CLOSURE_FLAGS"],y=p,z=0;z<ha.length;z++)if(y=y[ha[z]],y==null){w=null;break a}w=y}var ia=w&&w[610401301];v=ia!=null?ia:!1;var A;const ja=p.navigator;A=ja?ja.userAgentData||null:null;function B(a){return v?A?A.brands.some(({brand:b})=>b&&b.indexOf(a)!=-1):!1:!1}function C(a){var b;a:{if(b=p.navigator)if(b=b.userAgent)break a;b=""}return b.indexOf(a)!=-1};function D(){return v?!!A&&A.brands.length>0:!1}function E(){return D()?B("Chromium"):(C("Chrome")||C("CriOS"))&&!(D()?0:C("Edge"))||C("Silk")};!C("Android")||E();E();C("Safari")&&(E()||(D()?0:C("Coast"))||(D()?0:C("Opera"))||(D()?0:C("Edge"))||(D()?B("Microsoft Edge"):C("Edg/"))||D()&&B("Opera"));var ka={},G=null;var la={};function ma(a,b){a.__closure__error__context__984382||(a.__closure__error__context__984382={});a.__closure__error__context__984382.severity=b};let na=void 0;var oa=new Set;function H(a,b=!1,c=!1){a=c&&Symbol.for&&a?Symbol.for(a):a!=null?Symbol(a):Symbol();b&&oa.add(a);return a}var pa=H(void 0,!0),I=H();const J=H("jas",!0,!0);var qa={};function K(a){return a!==null&&typeof a==="object"&&!Array.isArray(a)&&a.constructor===Object}var L;const ra=[];ra[J]=55;L=Object.freeze(ra);function M(a){if(a&2)throw Error();}function sa(a){const b=aa(pa);return b?a[b]:void 0};var ta=typeof p.BigInt==="function"&&typeof p.BigInt(0)==="bigint";const ua=Number.MIN_SAFE_INTEGER.toString(),va=ta?BigInt(Number.MIN_SAFE_INTEGER):void 0,za=Number.MAX_SAFE_INTEGER.toString(),Aa=ta?BigInt(Number.MAX_SAFE_INTEGER):void 0;function Ba(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++){const e=a[c],d=b[c];if(e>d)return!1;if(e<d)return!0}};const Ca=Number.isFinite;function Da(a){if(a==null)return a;if(typeof a==="string"&&a)a=+a;else if(typeof a!=="number")return;return Ca(a)?a|0:void 0}function N(a){if(a!=null&&typeof a!=="string")throw Error();return a};function Ea(a){return a};function Fa(a,b,c,e,d){if(a!=null){if(Array.isArray(a)){const f=a[J]|0;return a.length===0&&f&1?void 0:d&&f&2?a:Ga(a,b,c,e!==void 0,d)}return b(a,e)}}
|
|
9
|
+
function Ga(a,b,c,e,d){const f=e||c?a[J]|0:0,g=e?!!(f&32):void 0;e=Array.prototype.slice.call(a);let h=0;const k=e.length;for(let q=0;q<k;q++){var l=e[q];if(q===k-1&&K(l)){var m=b,t=c,n=g,F=d;let x=void 0;for(let wa in l){const xa=Fa(l[wa],m,t,n,F);if(xa!=null){let ya;((ya=x)!=null?ya:x={})[wa]=xa}}l=x}else l=Fa(e[q],b,c,g,d);e[q]=l;l!=null&&(h=q+1)}h<k&&(e.length=h);c&&((a=sa(a))&&(e[pa]=Array.prototype.slice.call(a)),c(f,e));return e}
|
|
10
|
+
function Ha(a){switch(typeof a){case "number":return Number.isFinite(a)?a:""+a;case "bigint":return(ta?a>=va&&a<=Aa:a[0]==="-"?Ba(a,ua):Ba(a,za))?Number(a):""+a;case "boolean":return a?1:0;case "object":if(a!=null&&a instanceof Uint8Array){let b="",c=0;const e=a.length-10240;for(;c<e;)b+=String.fromCharCode.apply(null,a.subarray(c,c+=10240));b+=String.fromCharCode.apply(null,c?a.subarray(c):a);return btoa(b)}if(a.v===qa)return Ia(a);return}return a}let Ja;
|
|
11
|
+
function Ia(a){var b=a.i;a=Ga(b,Ha,void 0,void 0,!1);var c=b[J]|0;if((b=a.length)&&!(c&512)){var e=a[b-1],d=!1;K(e)?(b--,d=!0):e=void 0;var f,g=(f=Ja)!=null?f:Ea;f=c&512?0:-1;c=b-f;g=g(c,f,a,e);e&&(a[b]=void 0);if(c<g&&e){c=!0;for(var h in e){const k=+h;if(k<=g)d=k+f,a[d]=e[h],b=Math.max(d+1,b),d=!1,delete e[h];else{c=!1;break}}c&&(e=void 0)}for(c=b-1;b>0;c=b-1)if(h=a[c],h==null)b--,d=!0;else if(c-=f,c>=g){let k;((k=e)!=null?k:e={})[c]=h;b--;d=!0}else break;d&&(a.length=b);e&&a.push(e)}return a};let Ka,La;function Ma(a){switch(typeof a){case "boolean":return Ka||(Ka=[0,void 0,!0]);case "number":return a>0?void 0:a===0?La||(La=[0,void 0]):[-a,void 0];case "string":return[0,a];case "object":return a}}function Na(a,b,c){a=Oa(a,b[0],b[1],c?1:2);b!==Ka&&c&&(a[J]|=16384);return a}
|
|
12
|
+
function Oa(a,b,c,e){if(a==null){var d=96;c?(a=[c],d|=512):a=[];b&&(d=d&-33521665|(b&1023)<<15)}else{if(!Array.isArray(a))throw Error("narr");d=a[J]|0;16384&d||!(64&d)||2&d||Pa();if(d&2048)throw Error("farr");if(d&64)return a;e===1||e===2||(d|=64);if(c&&(d|=512,c!==a[0]))throw Error("mid");a:{c=a;if(e=c.length){const f=e-1;if(K(c[f])){d|=256;b=f-(d&512?0:-1);if(b>=1024)throw Error("pvtlmt");d=d&-33521665|(b&1023)<<15;break a}}if(b){b=Math.max(b,e-(d&512?0:-1));if(b>1024)throw Error("spvt");d=d&-33521665|
|
|
13
|
+
(b&1023)<<15}}}a[J]=d;return a}function Pa(){if(I!=null){var a;var b=(a=na)!=null?a:na={};a=b[I]||0;a>=5||(b[I]=a+1,b=Error(),ma(b,"incident"),fa(b))}};function O(a,b,c){const e=a.i;let d=e[J]|0;M(d);P(e,d,b,c);return a}function P(a,b,c,e){const d=b&512?0:-1,f=c+d;var g=a.length-1;if(f>=g&&b&256)return a[g][c]=e,b;if(f<=g)return a[f]=e,b&256&&(a=a[g],c in a&&delete a[c]),b;e!==void 0&&(g=b>>15&1023||536870912,c>=g?e!=null&&(a[g+d]={[c]:e},b|=256,a[J]=b):a[f]=e);return b}function Q(a,b,c,e){const d=a.i;let f=d[J]|0;M(f);P(d,f,b,(e==="0"?Number(c)===0:c===e)?void 0:c);return a}function Qa(a,b){a=(2&b?a|2:a&-3)|32;return a&=-2049}
|
|
14
|
+
function Ra(a,b){32&b||(a&=-33);return a};var R=class{constructor(a){this.i=Oa(a)}toJSON(){try{var a=Ia(this)}finally{Ja=void 0}return a}};R.prototype.v=qa;R.prototype.toString=function(){return this.i.toString()};function S(a,b){for(;b>127;)a.g.push(b&127|128),b>>>=7;a.g.push(b)}var Sa=class{constructor(){this.g=[]}length(){return this.g.length}end(){const a=this.g;this.g=[];return a}};function T(a,b){b.length!==0&&(a.l.push(b),a.h+=b.length)}function Ta(a,b){S(a.g,b*8+2);b=a.g.end();T(a,b);b.push(a.h);return b}function Ua(a,b){var c=b.pop();for(c=a.h+a.g.length()-c;c>127;)b.push(c&127|128),c>>>=7,a.h++;b.push(c);a.h++}var Va=class{constructor(){this.l=[];this.h=0;this.g=new Sa}};function U(){const a=class{constructor(){throw Error();}};Object.setPrototypeOf(a,a.prototype);return a}var V=U(),Wa=U();var W=class{constructor(a,b){this.g=a;a=aa(V);this.h=!!a&&b===a||!1}};function Xa(a,b,c,e,d){b=Ya(b,e);b!=null&&(c=Ta(a,c),d(b,a),Ua(a,c))}const Za=new W(Xa,V),$a=new W(Xa,V);var ab=Symbol(),bb=Symbol();let cb,db;
|
|
15
|
+
function X(a){var b=eb,c=fb,e=a[ab];if(e)return e;e={};e.B=a;e.o=Ma(a[0]);var d=a[1];let f=1;d&&d.constructor===Object&&(e.s=d,d=a[++f],typeof d==="function"&&(e.u=!0,cb!=null||(cb=d),db!=null||(db=a[f+1]),d=a[f+=2]));const g={};for(;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 m;var k=void 0;d instanceof W?m=d:(m=Za,f--);let t;if((t=m)==null?0:t.h){d=a[++f];k=a;var l=f;typeof d===
|
|
16
|
+
"function"&&(d=d(),k[l]=d);k=d}d=a[++f];l=h+1;typeof d==="number"&&d<0&&(l-=d,d=a[++f]);for(;h<l;h++){const n=g[h];k?c(e,h,m,k,n):b(e,h,m,n)}}return a[ab]=e}function Ya(a,b){if(a instanceof R)return a.i;if(Array.isArray(a))return Na(a,b,!1)};function eb(a,b,c){a[b]=c.g}function fb(a,b,c,e){let d,f;const g=c.g;a[b]=(h,k,l)=>g(h,k,l,f||(f=X(e).o),d||(d=gb(e)))}function gb(a){let b=a[bb];if(!b){const c=X(a);b=(e,d)=>hb(e,d,c);a[bb]=b}return b}
|
|
17
|
+
function hb(a,b,c){for(var e=a[J]|0,d=e&512?0:-1,f=a.length,g=e&512?1:0,h=f+(e&256?-1:0);g<h;g++){const k=a[g];if(k==null)continue;const l=g-d,m=ib(c,l);m&&m(b,k,l)}if(e&256){e=a[f-1];for(const k in e)d=+k,Number.isNaN(d)||(f=e[d],f!=null&&(h=ib(c,d))&&h(b,f,d))}if(a=sa(a))for(T(b,b.g.end()),c=0;c<a.length;c++)T(b,a[c].g(la)||new Uint8Array(0))}
|
|
18
|
+
function ib(a,b){var c=a[b];if(c)return c;if(c=a.s)if(c=c[b]){c=Array.isArray(c)?c[0]instanceof W?c:[$a,c]:[c,void 0];var e=c[0].g;if(c=c[1]){const d=gb(c),f=X(c).o;c=a.u?db(f,d):(g,h,k)=>e(g,h,k,f,d)}else c=e;return a[b]=c}};function jb(a,b,c){b=b==null||typeof b==="string"?b:void 0;b!=null&&(b=(ea||(ea=new TextEncoder)).encode(b),S(a.g,c*8+2),S(a.g,b.length),T(a,a.g.end()),T(a,b))};function kb(a){var b=new lb;if(a!=null){if(!Ca(a))throw b=Error("enum"),ma(b,"warning"),b;a|=0}return Q(b,1,a,0)}var lb=class extends R{};var mb=class extends R{};var nb=class extends R{};nb.prototype.g=function(a){return function(){const b=new Va;hb(this.i,b,X(a));T(b,b.g.end());const c=new Uint8Array(b.h),e=b.l,d=e.length;let f=0;for(let g=0;g<d;g++){const h=e[g];c.set(h,f);f+=h.length}b.l=[c];return c}}([0,new W(jb,Wa),-1,[0,function(a,b,c=V){return new W(b,c)}(function(a,b,c,e,d){if(a.g()!==2)return!1;var f=a.h;e=Na(void 0,e,!0);var g=b[J]|0;M(g);if(c===-1)var h=null;else{h=c+(g&512?0:-1);var k=b.length-1;h=h>=k&&g&256?b[k][c]:h<=k?b[h]:void 0}h=Array.isArray(h)?h:L;const l=h!==
|
|
19
|
+
L;if(64&g||!(16384&g)||!l){let m=k=l?h[J]|0:0;if(!l||2&m||2&m&&4&m||2048&m||4&m&&!(32&m))h=Array.prototype.slice.call(h),m=Qa(m,g),g=P(b,g,c,h);b=m;b===0&&(b=Qa(b,g));m=Ra((b|1)&-29,g);m!==k&&(h[J]=m)}h.push(e);f.call(a,e,d);return!0},function(a,b,c,e,d){if(Array.isArray(b))for(let l=0;l<b.length;l++){var f=a,g=c,h=d,k=Ya(b[l],e);k!=null&&(g=Ta(f,g),h(k,f),Ua(f,g))}}),[0,new W(function(a,b,c){b=Da(b);if(b!=null)if(b=parseInt(b,10),S(a.g,c*8),a=a.g,c=b,c>=0)S(a,c);else{for(b=0;b<9;b++)a.g.push(c&127|
|
|
20
|
+
128),c>>=7;a.g.push(1)}},U()),new W(jb,Wa),-1]],new W(function(a,b,c){b=b==null||typeof b==="boolean"?b:typeof b==="number"?!!b:void 0;b!=null&&(S(a.g,c*8),a.g.g.push(b?1:0))},U())]);function ob(){let a,b;const c=(b=(a=(new URL(pb||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?qb:c}let pb="";const qb=["https://meet.google.com"];for(var rb={exposeToMeetWhenScreensharing:function(a){var b=a.A,c=a.cloudProjectNumber,e=a.additionalData,d=a.mainStageUrl,f=a.sidePanelUrl;a=a.startActivityOnOpen;c||u(ba);var g=new nb;c=O(g,2,N(c));b&&O(c,1,N(b));b=[];e&&!a&&u(ca);d&&!a&&u(da);if(f){g=b.push;var h=kb(1);f=Q(h,2,N(f),"");f=Q(f,3,N(e),"");g.call(b,f)}d&&(f=b.push,g=kb(2),d=Q(g,2,N(d),""),e=Q(d,3,N(e),""),f.call(b,e));{e=new mb;d=b;const F=e.i;let q=F[J]|0;M(q);if(d==null)P(F,q,1);else{f=b=d[J]|0;h=(g=!!(2&b)&&!!(4&b)||!!(2048&b))||
|
|
21
|
+
Object.isFrozen(d);var k=!0,l=!0;for(let x=0;x<d.length;x++){var m=d[x];g||(m=!!((m.i[J]|0)&2),k&&(k=!m),l&&(l=m))}g||(b=k?13:5,b=l?b|16:b&-17);h&&b===f||(d=Array.prototype.slice.call(d),f=0,b=Qa(b,q),b=Ra(b,q));b!==f&&(d[J]=b);P(F,q,1,d)}}e==null&&(e=void 0);e=O(c,3,e);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(e,4,a);a=c.g();var n;n===void 0&&(n=0);if(!G)for(G={},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),
|
|
22
|
+
e=["+/=","+/","-_=","-_.","-_"],d=0;d<5;d++)for(b=c.concat(e[d].split("")),ka[d]=b,f=0;f<b.length;f++)g=b[f],G[g]===void 0&&(G[g]=f);n=ka[n];c=Array(Math.floor(a.length/3));e=n[64]||"";for(d=b=0;b<a.length-2;b+=3)h=a[b],k=a[b+1],g=a[b+2],f=n[h>>2],h=n[(h&3)<<4|k>>4],k=n[(k&15)<<2|g>>6],g=n[g&63],c[d++]=f+h+k+g;f=0;g=e;switch(a.length-b){case 2:f=a[b+1],g=n[(f&15)<<2]||e;case 1:a=a[b],c[d]=n[a>>2]+n[(a&3)<<4|f>>4]+g+e}a=c.join("");n=window;n.top===n.self&&(a={handle:a,permittedOrigins:ob(),exposeOrigin:!0},
|
|
23
|
+
(t=n.navigator.mediaDevices)==null||t.setCaptureHandleConfig(a))}},sb=["meet","addon","screensharing"],Y=p,Z;sb.length&&(Z=sb.shift());)sb.length||rb===void 0?Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}:Y[Z]=rb;}).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-
|
|
4
|
+
"version": "1.2.0-dev-726217118",
|
|
5
5
|
"repository": "googleworkspace/meet",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"homepage": "https://developers.google.com/meet/add-ons/guides/overview",
|