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