You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 lines
284 KiB

/*! For license information please see jitsi.js.LICENSE.txt */
!function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=33)}([,,function(t,e){t.exports=function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}},function(t,e,i){"use strict";function r(t){return t.slice(0,t.length)}function n(t,e){if(t.length===e.length){for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!0;return!1}return!0}function s(t,e){return t.length!==e.length||(!!e.some(e=>!t.includes(e))||!!t.some(t=>!e.includes(t)))}function a(t,e){return{added:e.filter(e=>!t.includes(e)),removed:t.filter(t=>!e.includes(t))}}function o(t,e){return t.filter(t=>e.includes(t))}function h(...t){return Array.from(t.reduce((t,e)=>(e.forEach(e=>t.add(e)),t),new Set))}i.d(e,"c",(function(){return r})),i.d(e,"e",(function(){return n})),i.d(e,"d",(function(){return s})),i.d(e,"b",(function(){return a})),i.d(e,"g",(function(){return o})),i.d(e,"f",(function(){return h})),i.d(e,"a",(function(){return u}));class u{constructor(t){this.a=t}get value(){return this.a}groupBy(t){const e=this.a.reduce((e,i)=>{const r=t(i);return e.has(r)||e.set(r,[]),e.get(r).push(i),e},new Map);return new c(e)}}class c{constructor(t){this.val=t}orderBy(t){const e=[];for(const i of t)this.val.has(i)&&e.push(...this.val.get(i));return new u(e)}}},function(t,e,i){"use strict";e.decode=e.parse=i(8),e.encode=e.stringify=i(9)},,function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){"use strict";i.d(e,"a",(function(){return h})),i.d(e,"b",(function(){return u})),i.d(e,"c",(function(){return l}));var r=i(2),n=i.n(r),s=i(13),a=i(10),o=i(11);let h,u,c;!function(t){t.Screenshot="m.capability.screenshot",t.Sticker="m.sticker",t.AlwaysOnScreen="m.always_on_screen",t.ReceiveTerminate="im.vector.receive_terminate"}(h||(h={})),function(t){t.GetSupportedApiVersions="supported_api_versions",t.TakeScreenshot="screenshot",t.GetCapabilities="capabilities",t.SendEvent="send_event",t.UpdateVisibility="visibility",t.GetOpenIDCredentials="get_openid",t.ReceiveOpenIDCredentials="openid_credentials",t.SetAlwaysOnScreen="set_always_on_screen",t.ClientReady="im.vector.ready",t.Terminate="im.vector.terminate"}(u||(u={})),function(t){t.ToWidget="toWidget",t.FromWidget="fromWidget"}(c||(c={}));class l extends a.EventEmitter{constructor(t,e,i){super(),this.widgetId=e,this.requestedCapabilities=i,n()(this,"origin",void 0),n()(this,"inFlightRequests",{}),n()(this,"readyPromise",void 0),n()(this,"readyPromiseResolve",void 0),n()(this,"openIDCredentialsCallback",void 0),n()(this,"openIDCredentials",void 0),n()(this,"expectingExplicitReady",!1),this.origin=new URL(t).origin,this.readyPromise=new Promise(t=>this.readyPromiseResolve=t),window.addEventListener("message",t=>{if(t.origin!==this.origin)return;if(!t.data)return;if(t.data.widgetId!==this.widgetId)return;const e=t.data;if(e.api===c.ToWidget&&e.action)if(console.log("[WidgetAPI] Got request: "+JSON.stringify(e)),e.action===u.GetCapabilities)this.onCapabilitiesRequest(e),this.expectingExplicitReady||this.readyPromiseResolve();else if(e.action===u.ClientReady)this.readyPromiseResolve(),this.replyToRequest(e,{});else if(e.action===u.Terminate){let
//# sourceMappingURL=jitsi.js.map