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