var __BUNDLE_START_TIME__=this.nativePerformanceNow?nativePerformanceNow():Date.now(),__DEV__=false,process=this.process||{};process.env=process.env||{};process.env.NODE_ENV=process.env.NODE_ENV||"production"; !(function(r){"use strict";r.__r=o,r.__d=function(r,i,n){if(null!=e[i])return;var o={dependencyMap:n,factory:r,hasError:!1,importedAll:t,importedDefault:t,isInitialized:!1,publicModule:{exports:{}}};e[i]=o},r.__c=n,r.__registerSegment=function(r,e){s[r]=e};var e=n(),t={},i={}.hasOwnProperty;function n(){return e=Object.create(null)}function o(r){var t=r,i=e[t];return i&&i.isInitialized?i.publicModule.exports:d(t,i)}function l(r){var i=r;if(e[i]&&e[i].importedDefault!==t)return e[i].importedDefault;var n=o(i),l=n&&n.__esModule?n.default:n;return e[i].importedDefault=l}function u(r){var n=r;if(e[n]&&e[n].importedAll!==t)return e[n].importedAll;var l,u=o(n);if(u&&u.__esModule)l=u;else{if(l={},u)for(var a in u)i.call(u,a)&&(l[a]=u[a]);l.default=u}return e[n].importedAll=l}o.importDefault=l,o.importAll=u;var a=!1;function d(e,t){if(!a&&r.ErrorUtils){var i;a=!0;try{i=v(e,t)}catch(e){r.ErrorUtils.reportFatalError(e)}return a=!1,i}return v(e,t)}var c=16,f=65535;function p(r){return{segmentId:r>>>c,localId:r&f}}o.unpackModuleId=p,o.packModuleId=function(r){return(r.segmentId<0){var n=p(t),a=n.segmentId,d=n.localId,c=s[a];null!=c&&(c(d),i=e[t])}var f=r.nativeRequire;if(!i&&f){var v=p(t),h=v.segmentId;f(v.localId,h),i=e[t]}if(!i)throw Error('Requiring unknown module "'+t+'".');if(i.hasError)throw m(t,i.error);i.isInitialized=!0;var I=i,g=I.factory,y=I.dependencyMap;try{var _=i.publicModule;return _.id=t,g(r,o,l,u,_,_.exports,y),i.factory=void 0,i.dependencyMap=void 0,_.exports}catch(r){throw i.hasError=!0,i.error=r,i.isInitialized=!1,i.publicModule.exports=void 0,r}}function m(r,e){return Error('Requiring module "'+r+'", which threw an exception: '+e)}})('undefined'!=typeof globalThis?globalThis:'undefined'!=typeof global?global:'undefined'!=typeof window?window:this); !(function(n){var e=(function(){function n(n,e){return n}function e(n){var e={};return n.forEach(function(n,r){e[n]=!0}),e}function r(n,r,u){if(n.formatValueCalls++,n.formatValueCalls>200)return"[TOO BIG formatValueCalls "+n.formatValueCalls+" exceeded limit of 200]";var f=t(n,r);if(f)return f;var c=Object.keys(r),s=e(c);if(d(r)&&(c.indexOf('message')>=0||c.indexOf('description')>=0))return o(r);if(0===c.length){if(v(r)){var p=r.name?': '+r.name:'';return n.stylize('[Function'+p+']','special')}if(g(r))return n.stylize(RegExp.prototype.toString.call(r),'regexp');if(y(r))return n.stylize(Date.prototype.toString.call(r),'date');if(d(r))return o(r)}var h,b,m='',j=!1,O=['{','}'];(h=r,Array.isArray(h)&&(j=!0,O=['[',']']),v(r))&&(m=' [Function'+(r.name?': '+r.name:'')+']');return g(r)&&(m=' '+RegExp.prototype.toString.call(r)),y(r)&&(m=' '+Date.prototype.toUTCString.call(r)),d(r)&&(m=' '+o(r)),0!==c.length||j&&0!=r.length?u<0?g(r)?n.stylize(RegExp.prototype.toString.call(r),'regexp'):n.stylize('[Object]','special'):(n.seen.push(r),b=j?i(n,r,u,s,c):c.map(function(e){return a(n,r,u,s,e,j)}),n.seen.pop(),l(b,m,O)):O[0]+m+O[1]}function t(n,e){if(s(e))return n.stylize('undefined','undefined');if('string'==typeof e){var r="'"+JSON.stringify(e).replace(/^"|"$/g,'').replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return n.stylize(r,'string')}return c(e)?n.stylize(''+e,'number'):u(e)?n.stylize(''+e,'boolean'):f(e)?n.stylize('null','null'):void 0}function o(n){return'['+Error.prototype.toString.call(n)+']'}function i(n,e,r,t,o){for(var i=[],l=0,u=e.length;l-1&&(u=a?u.split('\n').map(function(n){return' '+n}).join('\n').substr(2):'\n'+u.split('\n').map(function(n){return' '+n}).join('\n')):u=n.stylize('[Circular]','special')),s(l)){if(a&&i.match(/^\d+$/))return u;(l=JSON.stringify(''+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(l=l.substr(1,l.length-2),l=n.stylize(l,'name')):(l=l.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),l=n.stylize(l,'string'))}return l+': '+u}function l(n,e,r){return n.reduce(function(n,e){return 0,e.indexOf('\n')>=0&&0,n+e.replace(/\u001b\[\d\d?m/g,'').length+1},0)>60?r[0]+(''===e?'':e+'\n ')+' '+n.join(',\n ')+' '+r[1]:r[0]+e+' '+n.join(', ')+' '+r[1]}function u(n){return'boolean'==typeof n}function f(n){return null===n}function c(n){return'number'==typeof n}function s(n){return void 0===n}function g(n){return p(n)&&'[object RegExp]'===h(n)}function p(n){return'object'==typeof n&&null!==n}function y(n){return p(n)&&'[object Date]'===h(n)}function d(n){return p(n)&&('[object Error]'===h(n)||n instanceof Error)}function v(n){return'function'==typeof n}function h(n){return Object.prototype.toString.call(n)}function b(n,e){return Object.prototype.hasOwnProperty.call(n,e)}return function(e,t){return r({seen:[],formatValueCalls:0,stylize:n},e,t.depth)}})(),r='(index)',t={trace:0,info:1,warn:2,error:3},o=[];o[t.trace]='debug',o[t.info]='log',o[t.warn]='warning',o[t.error]='error';var i=1;function a(r){return function(){var a;a=1===arguments.length&&'string'==typeof arguments[0]?arguments[0]:Array.prototype.map.call(arguments,function(n){return e(n,{depth:10})}).join(', ');var l=r;'Warning: '===a.slice(0,9)&&l>=t.error&&(l=t.warn),n.__inspectorLog&&n.__inspectorLog(o[l],a,[].slice.call(arguments),i),s.length&&(a=g('',a)),n.nativeLoggingHook(a,l)}}function l(n,e){return Array.apply(null,Array(e)).map(function(){return n})}var u="\u2502",f="\u2510",c="\u2518",s=[];function g(n,e){return s.join('')+n+' '+(e||'')}if(n.nativeLoggingHook){n.console;n.console={error:a(t.error),info:a(t.info),log:a(t.info),warn:a(t.warn),trace:a(t.trace),debug:a(t.trace),table:function(e){if(!Array.isArray(e)){var o=e;for(var i in e=[],o)if(o.hasOwnProperty(i)){var a=o[i];a[r]=i,e.push(a)}}if(0!==e.length){var u=Object.keys(e[0]).sort(),f=[],c=[];u.forEach(function(n,r){c[r]=n.length;for(var t=0;t';return function(){for(var r,u=arguments.length,o=new Array(u),a=0;a','text/xml');void 0===c.addEventListener&&(c.addEventListener=function(){}),void 0===c.cookie&&(c.cookie=''),void 0===c.implementation.createHTMLDocument&&(c.implementation.createHTMLDocument=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'',n=(new u).parseFromString("\n "+t+"\n \n ",'text/xml');return Object.defineProperty(n,'body',{get:function(){return n.getElementsByTagName('body')[0]}}),n});var v=Object.getPrototypeOf(c.documentElement);v&&(void 0===v.querySelector&&(v.querySelector=function(t){return f(this,t)}),void 0===v.remove&&(v.remove=function(){null!==this.parentNode&&this.parentNode.removeChild(this)}),v.hasOwnProperty('innerHTML')||Object.defineProperty(v,'innerHTML',{get:function(){return this.childNodes.toString()},set:function(t){this.textContent='';for(var n,o=(new u).parseFromString("
"+t+"
",'text/xml').documentElement;n=o.firstChild;)this.appendChild(n)}}),v.hasOwnProperty('children')||Object.defineProperty(v,'children',{get:function(){for(var t=this.childNodes,n=[],o=0,l=t[o];l;)1===l.nodeType&&n.push(l),l=t[o+=1];return n}}));var h=s(Object.getPrototypeOf(c),v);if(h&&h!==Object.getPrototypeOf({})){var p=t.console;if(p){var y=r(d[6]).levels;Object.keys(y).forEach(function(t){var n=y[t],o=p[n];'function'==typeof o&&(p[n]=function(){for(var t=arguments.length,l=new Array(t),s=0;s1&&void 0!==arguments[1]?arguments[1]:0;return o.default.setTimeout(t,n)},void 0===t.localStorage&&(t.localStorage=new l.default('@jitsi-meet/')),void 0===t.sessionStorage&&(t.sessionStorage=new l.default)})(g||window||this)},14,[3,15,383,384,385,389,392,395,396,432,435]); __d(function(g,r,i,a,m,e,d){'use strict';r(d[0]);var t=r(d[1]);m.exports={get AccessibilityInfo(){return r(d[2])},get ActivityIndicator(){return r(d[3])},get ART(){return t('art-moved',"React Native ART has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-community/art' instead of 'react-native'. See https://github.com/react-native-community/art"),r(d[4])},get Button(){return r(d[5])},get CheckBox(){return t('checkBox-moved',"CheckBox has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-community/checkbox' instead of 'react-native'. See https://github.com/react-native-community/react-native-checkbox"),r(d[6])},get DatePickerIOS(){return t('DatePickerIOS-merged',"DatePickerIOS has been merged with DatePickerAndroid and will be removed in a future release. It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. See https://github.com/react-native-community/react-native-datetimepicker"),r(d[7])},get DrawerLayoutAndroid(){return r(d[8])},get FlatList(){return r(d[9])},get Image(){return r(d[10])},get ImageBackground(){return r(d[11])},get InputAccessoryView(){return r(d[12])},get KeyboardAvoidingView(){return r(d[13])},get MaskedViewIOS(){return t('maskedviewios-moved',"MaskedViewIOS has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-community/masked-view' instead of 'react-native'. See https://github.com/react-native-community/react-native-masked-view"),r(d[14])},get Modal(){return r(d[15])},get Picker(){return r(d[16])},get PickerIOS(){return r(d[17])},get ProgressBarAndroid(){return r(d[18])},get ProgressViewIOS(){return r(d[19])},get SafeAreaView(){return r(d[20])},get ScrollView(){return r(d[21])},get SectionList(){return r(d[22])},get SegmentedControlIOS(){return r(d[23])},get Slider(){return t('slider-moved',"Slider has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-community/slider' instead of 'react-native'. See https://github.com/react-native-community/react-native-slider"),r(d[24])},get Switch(){return r(d[25])},get RefreshControl(){return r(d[26])},get StatusBar(){return r(d[27])},get Text(){return r(d[28])},get TextInput(){return r(d[29])},get Touchable(){return r(d[30])},get TouchableHighlight(){return r(d[31])},get TouchableNativeFeedback(){return r(d[32])},get TouchableOpacity(){return r(d[33])},get TouchableWithoutFeedback(){return r(d[34])},get View(){return r(d[35])},get VirtualizedList(){return r(d[36])},get VirtualizedSectionList(){return r(d[37])},get ActionSheetIOS(){return r(d[38])},get Alert(){return r(d[39])},get Animated(){return r(d[40])},get AppRegistry(){return r(d[41])},get AppState(){return r(d[42])},get AsyncStorage(){return t('async-storage-moved',"AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-community/async-storage' instead of 'react-native'. See https://github.com/react-native-community/react-native-async-storage"),r(d[43])},get BackHandler(){return r(d[44])},get Clipboard(){return r(d[45])},get DatePickerAndroid(){return t('DatePickerAndroid-merged',"DatePickerAndroid has been merged with DatePickerIOS and will be removed in a future release. It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. See https://github.com/react-native-community/react-native-datetimepicker"),r(d[46])},get DeviceInfo(){return r(d[47])},get Dimensions(){return r(d[48])},get Easing(){return r(d[49])},get findNodeHandle(){return r(d[50]).findNodeHandle},get I18nManager(){return r(d[51])},get ImagePickerIOS(){return t('imagePickerIOS-moved',"ImagePickerIOS has been extracted from react-native core and will be removed in a future release. Please upgrade to use either '@react-native-community/react-native-image-picker' or 'expo-image-picker'. If you cannot upgrade to a different library, please install the deprecated '@react-native-community/image-picker-ios' package. See https://github.com/react-native-community/react-native-image-picker-ios"),r(d[52])},get InteractionManager(){return r(d[53])},get Keyboard(){return r(d[54])},get LayoutAnimation(){return r(d[55])},get Linking(){return r(d[56])},get NativeDialogManagerAndroid(){return r(d[57]).default},get NativeEventEmitter(){return r(d[58])},get PanResponder(){return r(d[59])},get PermissionsAndroid(){return r(d[60])},get PixelRatio(){return r(d[61])},get PushNotificationIOS(){return t('pushNotificationIOS-moved',"PushNotificationIOS has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-community/push-notification-ios' instead of 'react-native'. See https://github.com/react-native-community/react-native-push-notification-ios"),r(d[62])},get Settings(){return r(d[63])},get Share(){return r(d[64])},get StatusBarIOS(){return t('StatusBarIOS-merged','StatusBarIOS has been merged with StatusBar and will be removed in a future release. Use StatusBar for mutating the status bar'),r(d[65])},get StyleSheet(){return r(d[66])},get Systrace(){return r(d[67])},get TimePickerAndroid(){return t('TimePickerAndroid-merged',"TimePickerAndroid has been merged with DatePickerIOS and DatePickerAndroid and will be removed in a future release. It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. See https://github.com/react-native-community/react-native-datetimepicker"),r(d[68])},get ToastAndroid(){return r(d[69])},get TurboModuleRegistry(){return r(d[70])},get TVEventHandler(){return r(d[71])},get UIManager(){return r(d[72])},get unstable_batchedUpdates(){return r(d[50]).unstable_batchedUpdates},get useWindowDimensions(){return r(d[73]).default},get UTFSequence(){return r(d[74])},get Vibration(){return r(d[75])},get YellowBox(){return r(d[76])},get DeviceEventEmitter(){return r(d[77])},get NativeAppEventEmitter(){return r(d[78])},get NativeModules(){return r(d[79])},get Platform(){return r(d[80])},get processColor(){return r(d[81])},get requireNativeComponent(){return r(d[82])},get unstable_RootTagContext(){return r(d[83])},get ColorPropType(){return r(d[84])},get EdgeInsetsPropType(){return r(d[85])},get PointPropType(){return r(d[86])},get ViewPropTypes(){return r(d[87])}}},15,[16,17,20,52,188,198,288,290,292,248,269,293,294,296,297,299,306,308,310,311,313,255,276,315,317,319,252,322,199,324,205,333,214,215,281,90,249,277,334,142,216,336,350,353,347,355,357,358,64,244,92,304,359,225,259,261,361,143,125,363,365,63,367,369,371,373,62,36,374,376,22,209,77,377,378,379,381,45,153,23,57,84,184,303,68,201,382,326]); __d(function(g,r,i,a,m,e,d){'use strict';m.exports=function(n,o,t,f,s,u,c,l){if(!n){var v;if(void 0===o)v=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[t,f,s,u,c,l],h=0;(v=new Error(o.replace(/%s/g,function(){return p[h++]}))).name='Invariant Violation'}throw v.framesToPop=1,v}}},16,[]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n={};m.exports=function(c,o){n[c]||(t(!1,o),n[c]=!0)}},17,[18]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);m.exports=t},18,[19]); __d(function(g,r,i,a,m,e,d){"use strict";function t(t){return function(){return t}}var n=function(){};n.thatReturns=t,n.thatReturnsFalse=t(!1),n.thatReturnsTrue=t(!0),n.thatReturnsNull=t(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(t){return t},m.exports=n},19,[]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0])(r(d[1])),t=r(d[2]),u=r(d[3]),c={announcementFinished:'announcementFinished',boldTextChanged:'boldTextChanged',grayscaleChanged:'grayscaleChanged',invertColorsChanged:'invertColorsChanged',reduceMotionChanged:'reduceMotionChanged',reduceTransparencyChanged:'reduceTransparencyChanged',screenReaderChanged:'screenReaderChanged'},o=new Map,s={isBoldTextEnabled:function(){return new t(function(t,u){n.default?n.default.getCurrentBoldTextState(t,u):u(u)})},isGrayscaleEnabled:function(){return new t(function(t,u){n.default?n.default.getCurrentGrayscaleState(t,u):u(u)})},isInvertColorsEnabled:function(){return new t(function(t,u){n.default?n.default.getCurrentInvertColorsState(t,u):u(u)})},isReduceMotionEnabled:function(){return new t(function(t,u){n.default?n.default.getCurrentReduceMotionState(t,u):u(u)})},isReduceTransparencyEnabled:function(){return new t(function(t,u){n.default?n.default.getCurrentReduceTransparencyState(t,u):u(u)})},isScreenReaderEnabled:function(){return new t(function(t,u){n.default?n.default.getCurrentVoiceOverState(t,u):u(u)})},get fetch(){return this.isScreenReaderEnabled},addEventListener:function(n,t){var l;return'change'===n?l=u.addListener(c.screenReaderChanged,t):c[n]&&(l=u.addListener(n,t)),o.set(t,l),{remove:s.removeEventListener.bind(null,n,t)}},setAccessibilityFocus:function(t){n.default&&n.default.setAccessibilityFocus(t)},announceForAccessibility:function(t){n.default&&n.default.announceForAccessibility(t)},removeEventListener:function(n,t){var u=o.get(t);u&&(u.remove(),o.delete(t))}};m.exports=s},20,[3,21,40,45]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=t(r(d[1])).get('AccessibilityManager');e.default=u},21,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.get=o,e.getEnforcing=function(n){var u=o(n);return(0,t.default)(null!=u,"TurboModuleRegistry.getEnforcing(...): '"+n+"' could not be found. Verify that a module by this name is registered in the native binary."),u};var t=n(r(d[1])),u=r(d[2]),l=g.__turboModuleProxy;function o(n){if(!g.RN$Bridgeless){var t=u[n];if(null!=t)return t}return null!=l?l(n):null}},22,[3,16,23]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=r(d[1]),o=r(d[2]),u=r(d[3]);function l(o,l){if(!o)return null;var f=t(o,5),v=f[0],h=f[1],y=f[2],C=f[3],p=f[4];if(u(!v.startsWith('RCT')&&!v.startsWith('RK'),"Module name prefixes should've been stripped by the native side but wasn't for "+v),!h&&!y)return{name:v};var M={};return y&&y.forEach(function(n,t){var o=C&&c(C,t),f=p&&c(p,t);u(!o||!f,'Cannot have a method that is both async and a sync hook');var v=o?'promise':f?'sync':'async';M[n]=s(l,t,v)}),n(M,h),null==M.getConstants?M.getConstants=function(){return h||Object.freeze({})}:console.warn("Unable to define method 'getConstants()' on NativeModule '"+v+"'. NativeModule '"+v+"' already has a constant or method called 'getConstants'. Please remove it."),{name:v,module:M}}function f(n,t){u(g.nativeRequireModuleConfig,"Can't lazily create module without nativeRequireModuleConfig");var o=l(g.nativeRequireModuleConfig(n),t);return o&&o.module}function s(n,t,l){var f=null;return(f='promise'===l?function(){for(var u=arguments.length,l=new Array(u),f=0;f0?s[s.length-1]:null,h=s.length>1?s[s.length-2]:null,y='function'==typeof v,C='function'==typeof h;C&&u(y,'Cannot have a non-function arg after a function arg.');var p=y?v:null,M=C?h:null,b=y+C;if(s=s.slice(0,s.length-b),'sync'===l)return o.callNativeSyncHook(n,t,s,M,p);o.enqueueNativeCall(n,t,s,M,p)}).type=l,f}function c(n,t){return-1!==n.indexOf(t)}function v(t,o){return n(o,t||{})}g.__fbGenNativeModule=l;var h={};if(g.nativeModuleProxy)h=g.nativeModuleProxy;else if(!g.nativeExtensions){var y=g.__fbBatchedBridgeConfig;u(y,'__fbBatchedBridgeConfig is not set, cannot invoke native modules');var C=r(d[4]);(y.remoteModuleConfig||[]).forEach(function(n,t){var o=l(n,t);o&&(o.module?h[o.name]=o.module:C(h,o.name,{get:function(){return f(o.name,t)}}))})}m.exports=h},23,[24,25,29,16,39]); __d(function(g,r,i,a,m,e,d){function t(){return m.exports=t=Object.assign||function(t){for(var n=1;n=5){var c=this._queue;this._queue=[[],[],[],this._callID],this._lastFlush=o,g.nativeFlushQueueImmediate(c)}n.counterEvent('pending_js_to_native_queue',this._queue[0].length),this.__spy&&this.__spy({type:1,module:t+'',method:l,args:u})}},{key:"createDebugLookup",value:function(t,l,u){}},{key:"setImmediatesCallback",value:function(t){this._immediatesCallback=t}},{key:"__guard",value:function(t){if(this.__shouldPauseOnThrow())t();else try{t()}catch(t){s.reportFatalError(t)}}},{key:"__shouldPauseOnThrow",value:function(){return'undefined'!=typeof DebuggerInternal&&!0===DebuggerInternal.shouldPauseOnThrow}},{key:"__callImmediates",value:function(){n.beginEvent('JSTimers.callImmediates()'),null!=this._immediatesCallback&&this._immediatesCallback(),n.endEvent()}},{key:"__callFunction",value:function(t,l,u){this._lastFlush=Date.now(),this._eventLoopStartTime=this._lastFlush,this.__spy?n.beginEvent(t+"."+l+"("+o(u)+")"):n.beginEvent(t+"."+l+"(...)"),this.__spy&&this.__spy({type:0,module:t,method:l,args:u});var s=this.getCallableModule(t);h(!!s,'Module %s is not a registered callable module (calling %s)',t,l),h(!!s[l],'Method %s does not exist on module %s',l,t);var c=s[l].apply(s,u);return n.endEvent(),c}},{key:"__invokeCallback",value:function(l,u){this._lastFlush=Date.now(),this._eventLoopStartTime=this._lastFlush;var s=l>>>1,n=1&l?this._successCallbacks.get(s):this._failureCallbacks.get(s);n&&(this._successCallbacks.delete(s),this._failureCallbacks.delete(s),n.apply(void 0,t(u)))}}],[{key:"spy",value:function(t){c.prototype.__spy=!0===t?function(t){console.log((0===t.type?'N->JS':'JS->N')+" : "+(t.module?t.module+'.':'')+t.method+"("+JSON.stringify(t.args)+")")}:!1===t?null:t}}]),c})());m.exports=c},30,[31,4,5,35,36,37,16,38,17]); __d(function(g,r,i,a,m,e,d){var n=r(d[0]),t=r(d[1]),o=r(d[2]);m.exports=function(u){return n(u)||t(u)||o()}},31,[32,33,34]); __d(function(g,r,i,a,m,e,d){m.exports=function(n){if(Array.isArray(n)){for(var t=0,f=new Array(n.length);t=0||Object.prototype.propertyIsEnumerable.call(n,l)&&(b[l]=n[l])}return b}},55,[56]); __d(function(g,r,i,a,m,e,d){m.exports=function(n,t){if(null==n)return{};var f,u,o={},c=Object.keys(n);for(u=0;u=0||(o[f]=n[f]);return o}},56,[]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0])(r(d[1])),s={__constants:null,OS:'ios',get Version(){return this.constants.osVersion},get constants(){return null==this.__constants&&(this.__constants=t.default.getConstants()),this.__constants},get isPad(){return'pad'===this.constants.interfaceIdiom},get isTVOS(){return s.isTV},get isTV(){return'tv'===this.constants.interfaceIdiom},get isTesting(){return!1},select:function(t){return'ios'in t?t.ios:t.default}};m.exports=s},57,[3,58]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(d[1])).getEnforcing('PlatformConstants');e.default=n},58,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';m.exports=r(d[0])},59,[60]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n="function"==typeof Symbol&&("function"==typeof Symbol?Symbol.for:"@@for"),o=n?("function"==typeof Symbol?Symbol.for:"@@for")("react.element"):60103,u=n?("function"==typeof Symbol?Symbol.for:"@@for")("react.portal"):60106,f=n?("function"==typeof Symbol?Symbol.for:"@@for")("react.fragment"):60107,l=n?("function"==typeof Symbol?Symbol.for:"@@for")("react.strict_mode"):60108,c=n?("function"==typeof Symbol?Symbol.for:"@@for")("react.profiler"):60114,s=n?("function"==typeof Symbol?Symbol.for:"@@for")("react.provider"):60109,y=n?("function"==typeof Symbol?Symbol.for:"@@for")("react.context"):60110,p=n?("function"==typeof Symbol?Symbol.for:"@@for")("react.forward_ref"):60112,b=n?("function"==typeof Symbol?Symbol.for:"@@for")("react.suspense"):60113,v=n?("function"==typeof Symbol?Symbol.for:"@@for")("react.suspense_list"):60120,S=n?("function"==typeof Symbol?Symbol.for:"@@for")("react.memo"):60115,h=n?("function"==typeof Symbol?Symbol.for:"@@for")("react.lazy"):60116;n&&("function"==typeof Symbol?Symbol.for:"@@for")("react.fundamental"),n&&("function"==typeof Symbol?Symbol.for:"@@for")("react.responder");var _="function"==typeof Symbol&&("function"==typeof Symbol?Symbol.iterator:"@@iterator");function k(t){for(var n=t.message,o="https://reactjs.org/docs/error-decoder.html?invariant="+n,u=1;uD.length&&D.push(t)}function N(t,n,f,l){var c=typeof t;"undefined"!==c&&"boolean"!==c||(t=null);var s=!1;if(null===t)s=!0;else switch(c){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case o:case u:s=!0}}if(s)return f(l,t,""===n?"."+z(t,0):n),1;if(s=0,n=""===n?".":n+":",Array.isArray(t))for(var y=0;y1&&(t-=1),t<.16666666666666666?l+6*(n-l)*t:t<.5?n:t<.6666666666666666?l+(n-l)*(.6666666666666666-t)*6:l}function n(n,t,o){var u=o<.5?o*(1+t):o+t-o*t,s=2*o-u,h=l(s,u,n+.3333333333333333),c=l(s,u,n),b=l(s,u,n-.3333333333333333);return Math.round(255*h)<<24|Math.round(255*c)<<16|Math.round(255*b)<<8}var t,o='[-+]?\\d*\\.?\\d+',u="[-+]?\\d*\\.?\\d+%";function s(){for(var l=arguments.length,n=new Array(l),t=0;t255?255:n}function c(l){return(parseFloat(l)%360+360)%360/360}function b(l){var n=parseFloat(l);return n<0?0:n>1?255:Math.round(255*n)}function p(l){var n=parseFloat(l);return n<0?0:n>100?1:n/100}var y={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};m.exports=function(l){var k,f=(void 0===t&&(t={rgb:new RegExp('rgb'+s(o,o,o)),rgba:new RegExp('rgba'+s(o,o,o,o)),hsl:new RegExp('hsl'+s(o,u,u)),hsla:new RegExp('hsla'+s(o,u,u,o)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/}),t);return'number'==typeof l?l>>>0===l&&l>=0&&l<=4294967295?l:null:(k=f.hex6.exec(l))?parseInt(k[1]+'ff',16)>>>0:y.hasOwnProperty(l)?y[l]:(k=f.rgb.exec(l))?(h(k[1])<<24|h(k[2])<<16|h(k[3])<<8|255)>>>0:(k=f.rgba.exec(l))?(h(k[1])<<24|h(k[2])<<16|h(k[3])<<8|b(k[4]))>>>0:(k=f.hex3.exec(l))?parseInt(k[1]+k[1]+k[2]+k[2]+k[3]+k[3]+'ff',16)>>>0:(k=f.hex8.exec(l))?parseInt(k[1],16)>>>0:(k=f.hex4.exec(l))?parseInt(k[1]+k[1]+k[2]+k[2]+k[3]+k[3]+k[4]+k[4],16)>>>0:(k=f.hsl.exec(l))?(255|n(c(k[1]),p(k[2]),p(k[3])))>>>0:(k=f.hsla.exec(l))?(n(c(k[1]),p(k[2]),p(k[3]))|b(k[4]))>>>0:null}},69,[]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t={display:n.oneOf(['none','flex']),width:n.oneOfType([n.number,n.string]),height:n.oneOfType([n.number,n.string]),start:n.oneOfType([n.number,n.string]),end:n.oneOfType([n.number,n.string]),top:n.oneOfType([n.number,n.string]),left:n.oneOfType([n.number,n.string]),right:n.oneOfType([n.number,n.string]),bottom:n.oneOfType([n.number,n.string]),minWidth:n.oneOfType([n.number,n.string]),maxWidth:n.oneOfType([n.number,n.string]),minHeight:n.oneOfType([n.number,n.string]),maxHeight:n.oneOfType([n.number,n.string]),margin:n.oneOfType([n.number,n.string]),marginVertical:n.oneOfType([n.number,n.string]),marginHorizontal:n.oneOfType([n.number,n.string]),marginTop:n.oneOfType([n.number,n.string]),marginBottom:n.oneOfType([n.number,n.string]),marginLeft:n.oneOfType([n.number,n.string]),marginRight:n.oneOfType([n.number,n.string]),marginStart:n.oneOfType([n.number,n.string]),marginEnd:n.oneOfType([n.number,n.string]),padding:n.oneOfType([n.number,n.string]),paddingVertical:n.oneOfType([n.number,n.string]),paddingHorizontal:n.oneOfType([n.number,n.string]),paddingTop:n.oneOfType([n.number,n.string]),paddingBottom:n.oneOfType([n.number,n.string]),paddingLeft:n.oneOfType([n.number,n.string]),paddingRight:n.oneOfType([n.number,n.string]),paddingStart:n.oneOfType([n.number,n.string]),paddingEnd:n.oneOfType([n.number,n.string]),borderWidth:n.number,borderTopWidth:n.number,borderStartWidth:n.number,borderEndWidth:n.number,borderRightWidth:n.number,borderBottomWidth:n.number,borderLeftWidth:n.number,position:n.oneOf(['absolute','relative']),flexDirection:n.oneOf(['row','row-reverse','column','column-reverse']),flexWrap:n.oneOf(['wrap','nowrap','wrap-reverse']),justifyContent:n.oneOf(['flex-start','flex-end','center','space-between','space-around','space-evenly']),alignItems:n.oneOf(['flex-start','flex-end','center','stretch','baseline']),alignSelf:n.oneOf(['auto','flex-start','flex-end','center','stretch','baseline']),alignContent:n.oneOf(['flex-start','flex-end','center','stretch','space-between','space-around']),overflow:n.oneOf(['visible','hidden','scroll']),flex:n.number,flexGrow:n.number,flexShrink:n.number,flexBasis:n.oneOfType([n.number,n.string]),aspectRatio:n.number,zIndex:n.number,direction:n.oneOf(['inherit','ltr','rtl'])};m.exports=t},70,[71]); __d(function(g,r,i,a,m,e,d){m.exports=r(d[0])()},71,[72]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]);function t(){}function o(){}o.resetWarningCache=t,m.exports=function(){function p(t,o,p,c,s,y){if(y!==n){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name='Invariant Violation',f}}function c(){return p}p.isRequired=p;var s={array:p,bool:p,func:p,number:p,object:p,string:p,symbol:p,any:p,arrayOf:c,element:p,elementType:p,instanceOf:c,node:p,objectOf:c,oneOf:c,oneOfType:c,shape:c,exact:c,checkPropTypes:o,resetWarningCache:t};return s.PropTypes=s,s}},72,[73]); __d(function(g,r,i,a,m,e,d){'use strict';m.exports='SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'},73,[]); __d(function(g,r,i,a,m,e,d){'use strict';var s=r(d[0]),h=r(d[1]),o={shadowColor:s,shadowOffset:h.shape({width:h.number,height:h.number}),shadowOpacity:h.number,shadowRadius:h.number};m.exports=o},74,[68,71]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),s=r(d[1]),n={transform:t.arrayOf(t.oneOfType([t.shape({perspective:t.number}),t.shape({rotate:t.string}),t.shape({rotateX:t.string}),t.shape({rotateY:t.string}),t.shape({rotateZ:t.string}),t.shape({scale:t.number}),t.shape({scaleX:t.number}),t.shape({scaleY:t.number}),t.shape({translateX:t.number}),t.shape({translateY:t.number}),t.shape({skewX:t.string}),t.shape({skewY:t.string})])),transformMatrix:function(t,s,n){if(t[s])return new Error("The transformMatrix style property is deprecated. Use `transform: [{ matrix: ... }]` instead.")},decomposedMatrix:function(t,s,n){if(t[s])return new Error("The decomposedMatrix style property is deprecated. Use `transform: [...]` instead.")},scaleX:s(t.number,'Use the transform prop instead.'),scaleY:s(t.number,'Use the transform prop instead.'),rotation:s(t.number,'Use the transform prop instead.'),translateX:s(t.number,'Use the transform prop instead.'),translateY:s(t.number,'Use the transform prop instead.')};m.exports=n},75,[71,76]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]);m.exports=function(t,o){return function(c,u,p){n.getViewManagerConfig(p)||void 0===c[u]||console.warn("`"+u+"` supplied to `"+p+"` has been deprecated. "+o);for(var s=arguments.length,f=new Array(s>3?s-3:0),l=3;l>>8)>>>0:void 0}},84,[57,69]); __d(function(g,r,i,a,m,e,d){'use strict';r(d[0]),r(d[1]),r(d[2]),r(d[3]);m.exports=function(t){return t}},85,[86,57,16,38]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),o={createIdentityMatrix:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},createCopy:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]},createOrthographic:function(t,n,o,u,s,c){return[2/(n-t),0,0,0,0,2/(u-o),0,0,0,0,-2/(c-s),0,-(n+t)/(n-t),-(u+o)/(u-o),-(c+s)/(c-s),1]},createFrustum:function(t,n,o,u,s,c){var v=1/(n-t),f=1/(u-o),h=1/(s-c);return[s*v*2,0,0,0,0,s*f*2,0,0,(n+t)*v,(u+o)*f,(c+s)*h,-1,0,0,c*s*h*2,0]},createPerspective:function(t,n,o,u){var s=1/Math.tan(t/2),c=1/(o-u);return[s/n,0,0,0,0,s,0,0,0,0,(u+o)*c,-1,0,0,u*o*c*2,0]},createTranslate2d:function(t,n){var u=o.createIdentityMatrix();return o.reuseTranslate2dCommand(u,t,n),u},reuseTranslate2dCommand:function(t,n,o){t[12]=n,t[13]=o},reuseTranslate3dCommand:function(t,n,o,u){t[12]=n,t[13]=o,t[14]=u},createScale:function(t){var n=o.createIdentityMatrix();return o.reuseScaleCommand(n,t),n},reuseScaleCommand:function(t,n){t[0]=n,t[5]=n},reuseScale3dCommand:function(t,n,o,u){t[0]=n,t[5]=o,t[10]=u},reusePerspectiveCommand:function(t,n){t[11]=-1/n},reuseScaleXCommand:function(t,n){t[0]=n},reuseScaleYCommand:function(t,n){t[5]=n},reuseScaleZCommand:function(t,n){t[10]=n},reuseRotateXCommand:function(t,n){t[5]=Math.cos(n),t[6]=Math.sin(n),t[9]=-Math.sin(n),t[10]=Math.cos(n)},reuseRotateYCommand:function(t,n){t[0]=Math.cos(n),t[2]=-Math.sin(n),t[8]=Math.sin(n),t[10]=Math.cos(n)},reuseRotateZCommand:function(t,n){t[0]=Math.cos(n),t[1]=Math.sin(n),t[4]=-Math.sin(n),t[5]=Math.cos(n)},createRotateZ:function(t){var n=o.createIdentityMatrix();return o.reuseRotateZCommand(n,t),n},reuseSkewXCommand:function(t,n){t[4]=Math.tan(n)},reuseSkewYCommand:function(t,n){t[1]=Math.tan(n)},multiplyInto:function(t,n,o){var u=n[0],s=n[1],c=n[2],v=n[3],f=n[4],h=n[5],M=n[6],l=n[7],C=n[8],p=n[9],x=n[10],T=n[11],y=n[12],S=n[13],D=n[14],P=n[15],q=o[0],X=o[1],Y=o[2],I=o[3];t[0]=q*u+X*f+Y*C+I*y,t[1]=q*s+X*h+Y*p+I*S,t[2]=q*c+X*M+Y*x+I*D,t[3]=q*v+X*l+Y*T+I*P,q=o[4],X=o[5],Y=o[6],I=o[7],t[4]=q*u+X*f+Y*C+I*y,t[5]=q*s+X*h+Y*p+I*S,t[6]=q*c+X*M+Y*x+I*D,t[7]=q*v+X*l+Y*T+I*P,q=o[8],X=o[9],Y=o[10],I=o[11],t[8]=q*u+X*f+Y*C+I*y,t[9]=q*s+X*h+Y*p+I*S,t[10]=q*c+X*M+Y*x+I*D,t[11]=q*v+X*l+Y*T+I*P,q=o[12],X=o[13],Y=o[14],I=o[15],t[12]=q*u+X*f+Y*C+I*y,t[13]=q*s+X*h+Y*p+I*S,t[14]=q*c+X*M+Y*x+I*D,t[15]=q*v+X*l+Y*T+I*P},determinant:function(n){var o=t(n,16),u=o[0],s=o[1],c=o[2],v=o[3],f=o[4],h=o[5],M=o[6],l=o[7],C=o[8],p=o[9],x=o[10],T=o[11],y=o[12],S=o[13],D=o[14],P=o[15];return v*M*p*y-c*l*p*y-v*h*x*y+s*l*x*y+c*h*T*y-s*M*T*y-v*M*C*S+c*l*C*S+v*f*x*S-u*l*x*S-c*f*T*S+u*M*T*S+v*h*C*D-s*l*C*D-v*f*p*D+u*l*p*D+s*f*T*D-u*h*T*D-c*h*C*P+s*M*C*P+c*f*p*P-u*M*p*P-s*f*x*P+u*h*x*P},inverse:function(n){var u=o.determinant(n);if(!u)return n;var s=t(n,16),c=s[0],v=s[1],f=s[2],h=s[3],M=s[4],l=s[5],C=s[6],p=s[7],x=s[8],T=s[9],y=s[10],S=s[11],D=s[12],P=s[13],q=s[14],X=s[15];return[(C*S*P-p*y*P+p*T*q-l*S*q-C*T*X+l*y*X)/u,(h*y*P-f*S*P-h*T*q+v*S*q+f*T*X-v*y*X)/u,(f*p*P-h*C*P+h*l*q-v*p*q-f*l*X+v*C*X)/u,(h*C*T-f*p*T-h*l*y+v*p*y+f*l*S-v*C*S)/u,(p*y*D-C*S*D-p*x*q+M*S*q+C*x*X-M*y*X)/u,(f*S*D-h*y*D+h*x*q-c*S*q-f*x*X+c*y*X)/u,(h*C*D-f*p*D-h*M*q+c*p*q+f*M*X-c*C*X)/u,(f*p*x-h*C*x+h*M*y-c*p*y-f*M*S+c*C*S)/u,(l*S*D-p*T*D+p*x*P-M*S*P-l*x*X+M*T*X)/u,(h*T*D-v*S*D-h*x*P+c*S*P+v*x*X-c*T*X)/u,(v*p*D-h*l*D+h*M*P-c*p*P-v*M*X+c*l*X)/u,(h*l*x-v*p*x-h*M*T+c*p*T+v*M*S-c*l*S)/u,(C*T*D-l*y*D-C*x*P+M*y*P+l*x*q-M*T*q)/u,(v*y*D-f*T*D+f*x*P-c*y*P-v*x*q+c*T*q)/u,(f*l*D-v*C*D-f*M*P+c*C*P+v*M*q-c*l*q)/u,(v*C*x-f*l*x+f*M*T-c*C*T-v*M*y+c*l*y)/u]},transpose:function(t){return[t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15]]},multiplyVectorByMatrix:function(n,o){var u=t(n,4),s=u[0],c=u[1],v=u[2],f=u[3];return[s*o[0]+c*o[4]+v*o[8]+f*o[12],s*o[1]+c*o[5]+v*o[9]+f*o[13],s*o[2]+c*o[6]+v*o[10]+f*o[14],s*o[3]+c*o[7]+v*o[11]+f*o[15]]},v3Length:function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])},v3Normalize:function(t,n){var u=1/(n||o.v3Length(t));return[t[0]*u,t[1]*u,t[2]*u]},v3Dot:function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]},v3Combine:function(t,n,o,u){return[o*t[0]+u*n[0],o*t[1]+u*n[1],o*t[2]+u*n[2]]},v3Cross:function(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]},quaternionToDegreesXYZ:function(n,u,s){var c=t(n,4),v=c[0],f=c[1],h=c[2],M=c[3],l=v*v,C=f*f,p=h*h,x=v*f+h*M,T=M*M+l+C+p,y=180/Math.PI;return x>.49999*T?[0,2*Math.atan2(v,M)*y,90]:x<-.49999*T?[0,-2*Math.atan2(v,M)*y,-90]:[o.roundTo3Places(Math.atan2(2*v*M-2*f*h,1-2*l-2*p)*y),o.roundTo3Places(Math.atan2(2*f*M-2*v*h,1-2*C-2*p)*y),o.roundTo3Places(Math.asin(2*v*f+2*h*M)*y)]},roundTo3Places:function(t){var n=t.toString().split('e');return.001*Math.round(n[0]+'e'+(n[1]?+n[1]-3:3))},decomposeMatrix:function(t){n(16===t.length,'Matrix decomposition needs a list of 3d matrix values, received %s',t);var u=[],s=[],c=[],v=[],f=[];if(t[15]){for(var h=[],M=[],l=0;l<4;l++){h.push([]);for(var C=0;C<4;C++){var p=t[4*l+C]/t[15];h[l].push(p),M.push(3===C?0:p)}}if(M[15]=1,o.determinant(M)){if(0!==h[0][3]||0!==h[1][3]||0!==h[2][3]){var x=[h[0][3],h[1][3],h[2][3],h[3][3]],T=o.inverse(M),y=o.transpose(T);u=o.multiplyVectorByMatrix(x,y)}else u[0]=u[1]=u[2]=0,u[3]=1;for(var S=0;S<3;S++)f[S]=h[3][S];for(var D=[],P=0;P<3;P++)D[P]=[h[P][0],h[P][1],h[P][2]];c[0]=o.v3Length(D[0]),D[0]=o.v3Normalize(D[0],c[0]),v[0]=o.v3Dot(D[0],D[1]),D[1]=o.v3Combine(D[1],D[0],1,-v[0]),v[0]=o.v3Dot(D[0],D[1]),D[1]=o.v3Combine(D[1],D[0],1,-v[0]),c[1]=o.v3Length(D[1]),D[1]=o.v3Normalize(D[1],c[1]),v[0]/=c[1],v[1]=o.v3Dot(D[0],D[2]),D[2]=o.v3Combine(D[2],D[0],1,-v[1]),v[2]=o.v3Dot(D[1],D[2]),D[2]=o.v3Combine(D[2],D[1],1,-v[2]),c[2]=o.v3Length(D[2]),D[2]=o.v3Normalize(D[2],c[2]),v[1]/=c[2],v[2]/=c[2];var q,X=o.v3Cross(D[1],D[2]);if(o.v3Dot(D[0],X)<0)for(var Y=0;Y<3;Y++)c[Y]*=-1,D[Y][0]*=-1,D[Y][1]*=-1,D[Y][2]*=-1;return s[0]=.5*Math.sqrt(Math.max(1+D[0][0]-D[1][1]-D[2][2],0)),s[1]=.5*Math.sqrt(Math.max(1-D[0][0]+D[1][1]-D[2][2],0)),s[2]=.5*Math.sqrt(Math.max(1-D[0][0]-D[1][1]+D[2][2],0)),s[3]=.5*Math.sqrt(Math.max(1+D[0][0]+D[1][1]+D[2][2],0)),D[2][1]>D[1][2]&&(s[0]=-s[0]),D[0][2]>D[2][0]&&(s[1]=-s[1]),D[1][0]>D[0][1]&&(s[2]=-s[2]),{rotationDegrees:q=s[0]<.001&&s[0]>=0&&s[1]<.001&&s[1]>=0?[0,0,o.roundTo3Places(180*Math.atan2(D[0][1],D[0][0])/Math.PI)]:o.quaternionToDegreesXYZ(s,h,D),perspective:u,quaternion:s,scale:c,skew:v,translation:f,rotate:q[2],rotateX:q[0],rotateY:q[1],scaleX:c[0],scaleY:c[1],translateX:f[0],translateY:f[1]}}}}};m.exports=o},86,[25,16]); __d(function(g,r,i,a,m,e,d){'use strict';var t={width:void 0,height:void 0};m.exports=function(h,n){return(h=h||t)!==(n=n||t)&&(h.width!==n.width||h.height!==n.height)}},87,[]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),u=(r(d[2]),r(d[3]),r(d[4]),r(d[5]),(function(){function u(){t(this,u)}return n(u,null,[{key:"validateStyleProp",value:function(t,n,u){}},{key:"validateStyle",value:function(t,n){}},{key:"addValidStylePropTypes",value:function(t){}}]),u})());m.exports=u},88,[4,5,67,82,83,16]); __d(function(g,r,i,a,m,e,d){'use strict';m.exports=function t(n){if(null!==n&&'object'==typeof n){if(!Array.isArray(n))return n;for(var f={},o=0,u=n.length;othis.eventPool.length&&this.eventPool.push(e)}function G(e){e.eventPool=[],e.getPooled=q,e.release=$}o(X.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=L)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=L)},persist:function(){this.isPersistent=L},isPersistent:Y,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Y,this._dispatchInstances=this._dispatchListeners=null}}),X.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},X.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,G(n),n},G(X);var J=X.extend({touchHistory:function(){return null}});function K(e){return"topTouchStart"===e}function Z(e){return"topTouchMove"===e}var ee=["topTouchStart"],te=["topTouchMove"],ne=["topTouchCancel","topTouchEnd"],re=[],ie={touchBank:re,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0};function le(e){return e.timeStamp||e.timestamp}function ae(e){if(null==(e=e.identifier))throw f(Error("Touch object is missing identifier."));return e}function oe(e){var t=ae(e),n=re[t];n?(n.touchActive=!0,n.startPageX=e.pageX,n.startPageY=e.pageY,n.startTimeStamp=le(e),n.currentPageX=e.pageX,n.currentPageY=e.pageY,n.currentTimeStamp=le(e),n.previousPageX=e.pageX,n.previousPageY=e.pageY,n.previousTimeStamp=le(e)):(n={touchActive:!0,startPageX:e.pageX,startPageY:e.pageY,startTimeStamp:le(e),currentPageX:e.pageX,currentPageY:e.pageY,currentTimeStamp:le(e),previousPageX:e.pageX,previousPageY:e.pageY,previousTimeStamp:le(e)},re[t]=n),ie.mostRecentTimeStamp=le(e)}function ue(e){var t=re[ae(e)];t?(t.touchActive=!0,t.previousPageX=t.currentPageX,t.previousPageY=t.currentPageY,t.previousTimeStamp=t.currentTimeStamp,t.currentPageX=e.pageX,t.currentPageY=e.pageY,t.currentTimeStamp=le(e),ie.mostRecentTimeStamp=le(e)):console.warn("Cannot record touch move without a touch start.\nTouch Move: %s\n","Touch Bank: %s",se(e),fe())}function ce(e){var t=re[ae(e)];t?(t.touchActive=!1,t.previousPageX=t.currentPageX,t.previousPageY=t.currentPageY,t.previousTimeStamp=t.currentTimeStamp,t.currentPageX=e.pageX,t.currentPageY=e.pageY,t.currentTimeStamp=le(e),ie.mostRecentTimeStamp=le(e)):console.warn("Cannot record touch end without a touch start.\nTouch End: %s\n","Touch Bank: %s",se(e),fe())}function se(e){return JSON.stringify({identifier:e.identifier,pageX:e.pageX,pageY:e.pageY,timestamp:le(e)})}function fe(){var e=JSON.stringify(re.slice(0,20));return 20a||(l=a),Ue(l,e,i)}}}),_=function(e){return xe.get(e._nativeTag)||null},P=we,R=function(e){var t=e.stateNode._nativeTag;if(void 0===t&&(t=e.stateNode.canonical._nativeTag),!t)throw f(Error("All native instances should have a tag."));return t},ye.injection.injectGlobalResponderHandler({onChange:function(e,t,n){null!==t?u.UIManager.setJSResponder(t.stateNode._nativeTag,n):u.UIManager.clearJSResponder()}});var ze=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;ze.hasOwnProperty("ReactCurrentDispatcher")||(ze.ReactCurrentDispatcher={current:null}),ze.hasOwnProperty("ReactCurrentBatchConfig")||(ze.ReactCurrentBatchConfig={suspense:null});var Me="function"==typeof Symbol&&("function"==typeof Symbol?Symbol.for:"@@for"),Ae=Me?("function"==typeof Symbol?Symbol.for:"@@for")("react.element"):60103,De=Me?("function"==typeof Symbol?Symbol.for:"@@for")("react.portal"):60106,Fe=Me?("function"==typeof Symbol?Symbol.for:"@@for")("react.fragment"):60107,Oe=Me?("function"==typeof Symbol?Symbol.for:"@@for")("react.strict_mode"):60108,je=Me?("function"==typeof Symbol?Symbol.for:"@@for")("react.profiler"):60114,We=Me?("function"==typeof Symbol?Symbol.for:"@@for")("react.provider"):60109,He=Me?("function"==typeof Symbol?Symbol.for:"@@for")("react.context"):60110,Qe=Me?("function"==typeof Symbol?Symbol.for:"@@for")("react.concurrent_mode"):60111,Be=Me?("function"==typeof Symbol?Symbol.for:"@@for")("react.forward_ref"):60112,Ve=Me?("function"==typeof Symbol?Symbol.for:"@@for")("react.suspense"):60113,Le=Me?("function"==typeof Symbol?Symbol.for:"@@for")("react.suspense_list"):60120,Ye=Me?("function"==typeof Symbol?Symbol.for:"@@for")("react.memo"):60115,Xe=Me?("function"==typeof Symbol?Symbol.for:"@@for")("react.lazy"):60116;Me&&("function"==typeof Symbol?Symbol.for:"@@for")("react.fundamental"),Me&&("function"==typeof Symbol?Symbol.for:"@@for")("react.responder");var qe="function"==typeof Symbol&&("function"==typeof Symbol?Symbol.iterator:"@@iterator");function $e(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=qe&&e[qe]||e["@@iterator"])?e:null}function Ge(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Fe:return"Fragment";case De:return"Portal";case je:return"Profiler";case Oe:return"StrictMode";case Ve:return"Suspense";case Le:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case He:return"Context.Consumer";case We:return"Context.Provider";case Be:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case Ye:return Ge(e.type);case Xe:if(e=1===e._status?e._result:null)return Ge(e)}return null}function Je(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(0!=(2&(t=t.return).effectTag))return 1}return 3===t.tag?2:3}function Ke(e){if(2!==Je(e))throw f(Error("Unable to find node on an unmounted component."))}function Ze(e){var t=e.alternate;if(!t){if(3===(t=Je(e)))throw f(Error("Unable to find node on an unmounted component."));return 1===t?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var l=i.alternate;if(null===l){if(null!==(r=i.return)){n=r;continue}break}if(i.child===l.child){for(l=i.child;l;){if(l===n)return Ke(i),e;if(l===r)return Ke(i),t;l=l.sibling}throw f(Error("Unable to find node on an unmounted component."))}if(n.return!==r.return)n=i,r=l;else{for(var a=!1,o=i.child;o;){if(o===n){a=!0,n=i,r=l;break}if(o===r){a=!0,r=i,n=l;break}o=o.sibling}if(!a){for(o=l.child;o;){if(o===n){a=!0,n=l,r=i;break}if(o===r){a=!0,r=l,n=i;break}o=o.sibling}if(!a)throw f(Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."))}}if(n.alternate!==r)throw f(Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."))}if(3!==n.tag)throw f(Error("Unable to find node on an unmounted component."));return n.stateNode.current===n?e:t}function et(e){if(!(e=Ze(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}var tt={},nt=null,rt=0;function it(e,t,n){if(Array.isArray(t))for(var r=t.length;r--&&0wt||(e.current=xt[wt],xt[wt]=null,wt--)}function kt(e,t){xt[++wt]=e.current,e.current=t}var Ct={},_t={current:Ct},Pt={current:!1},Rt=Ct;function Nt(e,t){var n=e.type.contextTypes;if(!n)return Ct;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,l={};for(i in n)l[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function It(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ut(e){St(Pt),St(_t)}function zt(e){St(Pt),St(_t)}function Mt(e,t,n){if(_t.current!==Ct)throw f(Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue."));kt(_t,t),kt(Pt,n)}function At(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw f(Error((Ge(t)||"Unknown")+'.getChildContext(): key "'+i+'" is not defined in childContextTypes.'));return o({},n,r)}function Dt(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Ct,Rt=_t.current,kt(_t,t),kt(Pt,Pt.current),!0}function Ft(e,t,n){var r=e.stateNode;if(!r)throw f(Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue."));n?(t=At(e,t,Rt),r.__reactInternalMemoizedMergedChildContext=t,St(Pt),St(_t),kt(_t,t)):St(Pt),kt(Pt,n)}var Ot=s.unstable_runWithPriority,jt=s.unstable_scheduleCallback,Wt=s.unstable_cancelCallback,Ht=s.unstable_shouldYield,Qt=s.unstable_requestPaint,Bt=s.unstable_now,Vt=s.unstable_getCurrentPriorityLevel,Lt=s.unstable_ImmediatePriority,Yt=s.unstable_UserBlockingPriority,Xt=s.unstable_NormalPriority,qt=s.unstable_LowPriority,$t=s.unstable_IdlePriority,Gt={},Jt=void 0!==Qt?Qt:function(){},Kt=null,Zt=null,en=!1,tn=Bt(),nn=1e4>tn?Bt:function(){return Bt()-tn};function rn(){switch(Vt()){case Lt:return 99;case Yt:return 98;case Xt:return 97;case qt:return 96;case $t:return 95;default:throw f(Error("Unknown priority level."))}}function ln(e){switch(e){case 99:return Lt;case 98:return Yt;case 97:return Xt;case 96:return qt;case 95:return $t;default:throw f(Error("Unknown priority level."))}}function an(e,t){return e=ln(e),Ot(e,t)}function on(e,t,n){return e=ln(e),jt(e,t,n)}function un(e){return null===Kt?(Kt=[e],Zt=jt(Lt,sn)):Kt.push(e),Gt}function cn(){null!==Zt&&Wt(Zt),sn()}function sn(){if(!en&&null!==Kt){en=!0;var e=0;try{var t=Kt;an(99,function(){for(;e=(e=10*(1073741821-t)-10*(1073741821-e))?99:250>=e?98:5250>=e?97:95}function dn(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var pn=Object.prototype.hasOwnProperty;function hn(e,t){if(dn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r=t&&(li=!0),e.firstContext=null)}function Cn(e,t){if(Tn!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Tn=e,t=1073741823),t={context:e,observedBits:t,next:null},null===bn){if(null===yn)throw f(Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."));bn=t,yn.dependencies={expirationTime:0,firstContext:t,responders:null}}else bn=bn.next=t;return e._currentValue}var _n=!1;function Pn(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Rn(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Nn(e,t){return{expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function In(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function Un(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,i=null;null===r&&(r=e.updateQueue=Pn(e.memoizedState))}else r=e.updateQueue,i=n.updateQueue,null===r?null===i?(r=e.updateQueue=Pn(e.memoizedState),i=n.updateQueue=Pn(n.memoizedState)):r=e.updateQueue=Rn(i):null===i&&(i=n.updateQueue=Rn(r));null===i||r===i?In(r,t):null===r.lastUpdate||null===i.lastUpdate?(In(r,t),In(i,t)):(In(r,t),i.lastUpdate=t)}function zn(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=Pn(e.memoizedState):Mn(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function Mn(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Rn(t)),t}function An(e,t,n,r,i,l){switch(n.tag){case 1:return"function"==typeof(e=n.payload)?e.call(l,r,i):e;case 3:e.effectTag=-2049&e.effectTag|64;case 0:if(null===(i="function"==typeof(e=n.payload)?e.call(l,r,i):e)||void 0===i)break;return o({},r,i);case 2:_n=!0}return r}function Dn(e,t,n,r,i){_n=!1;for(var l=(t=Mn(e,t)).baseState,a=null,o=0,u=t.firstUpdate,c=l;null!==u;){var s=u.expirationTime;sm?(g=f,f=null):g=f.sibling;var v=p(i,f,o[m],u);if(null===v){null===f&&(f=g);break}e&&f&&null===v.alternate&&t(i,f),a=l(v,a,m),null===s?c=v:s.sibling=v,s=v,f=g}if(m===o.length)return n(i,f),c;if(null===f){for(;mg?(v=m,m=null):v=m.sibling;var b=p(i,m,y.value,u);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(i,m),a=l(b,a,g),null===s?c=b:s.sibling=b,s=b,m=v}if(y.done)return n(i,m),c;if(null===m){for(;!y.done;g++,y=o.next())null!==(y=d(i,y.value,u))&&(a=l(y,a,g),null===s?c=y:s.sibling=y,s=y);return c}for(m=r(i,m);!y.done;g++,y=o.next())null!==(y=h(m,i,g,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),a=l(y,a,g),null===s?c=y:s.sibling=y,s=y);return e&&m.forEach(function(e){return t(i,e)}),c}return function(e,r,l,o){var u="object"==typeof l&&null!==l&&l.type===Fe&&null===l.key;u&&(l=l.props.children);var c="object"==typeof l&&null!==l;if(c)switch(l.$$typeof){case Ae:e:{for(c=l.key,u=r;null!==u;){if(u.key===c){if(7===u.tag?l.type===Fe:u.elementType===l.type){n(e,u.sibling),(r=i(u,l.type===Fe?l.props.children:l.props)).ref=qn(e,u,l),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}l.type===Fe?((r=ea(l.props.children,e.mode,o,l.key)).return=e,e=r):((o=Zl(l.type,l.key,l.props,null,e.mode,o)).ref=qn(e,r,l),o.return=e,e=o)}return a(e);case De:e:{for(u=l.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===l.containerInfo&&r.stateNode.implementation===l.implementation){n(e,r.sibling),(r=i(r,l.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=na(l,e.mode,o)).return=e,e=r}return a(e)}if("string"==typeof l||"number"==typeof l)return l=""+l,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,l)).return=e,e=r):(n(e,r),(r=ta(l,e.mode,o)).return=e,e=r),a(e);if(Xn(l))return m(e,r,l,o);if($e(l))return g(e,r,l,o);if(c&&$n(e,l),void 0===l&&!u)switch(e.tag){case 1:case 0:throw e=e.type,f(Error((e.displayName||e.name||"Component")+"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null."))}return n(e,r)}}var Jn=Gn(!0),Kn=Gn(!1),Zn={},er={current:Zn},tr={current:Zn},nr={current:Zn};function rr(e){if(e===Zn)throw f(Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."));return e}function ir(e,t){kt(nr,t),kt(tr,e),kt(er,Zn),St(er),kt(er,{isInAParentText:!1})}function lr(e){St(er),St(tr),St(nr)}function ar(e){rr(nr.current);var t=rr(er.current),n=e.type;n="AndroidTextInput"===n||"RCTMultilineTextInputView"===n||"RCTSinglelineTextInputView"===n||"RCTText"===n||"RCTVirtualText"===n,t!==(n=t.isInAParentText!==n?{isInAParentText:n}:t)&&(kt(tr,e),kt(er,n))}function or(e){tr.current===e&&(St(er),St(tr))}var ur=1,cr=1,sr=2,fr={current:0};function dr(e){for(var t=e;null!==t;){if(13===t.tag){if(null!==t.memoizedState)return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function pr(e,t){return{responder:e,props:t}}var hr=0,mr=2,gr=4,vr=8,yr=16,br=32,Tr=64,Er=128,xr=ze.ReactCurrentDispatcher,wr=0,Sr=null,kr=null,Cr=null,_r=null,Pr=null,Rr=null,Nr=0,Ir=null,Ur=0,zr=!1,Mr=null,Ar=0;function Dr(){throw f(Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem."))}function Fr(e,t){if(null===t)return!1;for(var n=0;nNr&&(Nr=s)):(zl(s,u.suspenseConfig),l=u.eagerReducer===e?u.eagerState:e(l,u.action)),a=u,u=u.next}while(null!==u&&u!==r);c||(o=a,i=l),dn(l,t.memoizedState)||(li=!0),t.memoizedState=l,t.baseUpdate=o,t.baseState=i,n.lastRenderedState=l}return[t.memoizedState,n.dispatch]}function Vr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===Ir?(Ir={lastEffect:null}).lastEffect=e.next=e:null===(t=Ir.lastEffect)?Ir.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,Ir.lastEffect=e),e}function Lr(e,t,n,r){var i=Wr();Ur|=e,i.memoizedState=Vr(t,n,void 0,void 0===r?null:r)}function Yr(e,t,n,r){var i=Hr();r=void 0===r?null:r;var l=void 0;if(null!==kr){var a=kr.memoizedState;if(l=a.destroy,null!==r&&Fr(r,a.deps))return void Vr(hr,n,l,r)}Ur|=e,i.memoizedState=Vr(t,n,l,r)}function Xr(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function qr(){}function $r(e,t,n){if(!(25>Ar))throw f(Error("Too many re-renders. React limits the number of renders to prevent an infinite loop."));var r=e.alternate;if(e===Sr||null!==r&&r===Sr)if(zr=!0,e={expirationTime:wr,suspenseConfig:null,action:n,eagerReducer:null,eagerState:null,next:null},null===Mr&&(Mr=new Map),void 0===(n=Mr.get(t)))Mr.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{var i=wl(),l=jn.suspense;l={expirationTime:i=Sl(i,e,l),suspenseConfig:l,action:n,eagerReducer:null,eagerState:null,next:null};var a=t.last;if(null===a)l.next=l;else{var o=a.next;null!==o&&(l.next=o),a.next=l}if(t.last=l,0===e.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=t.lastRenderedReducer))try{var u=t.lastRenderedState,c=r(u,n);if(l.eagerReducer=r,l.eagerState=c,dn(c,u))return}catch(e){}kl(e,i)}}var Gr={readContext:Cn,useCallback:Dr,useContext:Dr,useEffect:Dr,useImperativeHandle:Dr,useLayoutEffect:Dr,useMemo:Dr,useReducer:Dr,useRef:Dr,useState:Dr,useDebugValue:Dr,useResponder:Dr},Jr={readContext:Cn,useCallback:function(e,t){return Wr().memoizedState=[e,void 0===t?null:t],e},useContext:Cn,useEffect:function(e,t){return Lr(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Lr(4,36,Xr.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Lr(4,36,e,t)},useMemo:function(e,t){var n=Wr();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wr();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=$r.bind(null,Sr,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Wr().memoizedState=e},useState:function(e){var t=Wr();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,lastRenderedReducer:Qr,lastRenderedState:e}).dispatch=$r.bind(null,Sr,e),[t.memoizedState,e]},useDebugValue:qr,useResponder:pr},Kr={readContext:Cn,useCallback:function(e,t){var n=Hr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Fr(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},useContext:Cn,useEffect:function(e,t){return Yr(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Yr(4,36,Xr.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yr(4,36,e,t)},useMemo:function(e,t){var n=Hr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Fr(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:Br,useRef:function(){return Hr().memoizedState},useState:function(e){return Br(Qr)},useDebugValue:qr,useResponder:pr},Zr=null,ei=null,ti=!1;function ni(e,t){switch(e.tag){case 5:return null!==(t=ft(e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=ft(e.pendingProps))&&(e.stateNode=t,!0);case 13:default:return!1}}function ri(e){if(ti){var t=ei;if(t){var n=t;if(!ni(e,t)){if(!(t=ft())||!ni(e,t))return e.effectTag|=2,ti=!1,void(Zr=e);var r=Zr,i=$l(5,null,null,0);i.elementType="DELETED",i.type="DELETED",i.stateNode=n,i.return=r,i.effectTag=8,null!==r.lastEffect?(r.lastEffect.nextEffect=i,r.lastEffect=i):r.firstEffect=r.lastEffect=i}Zr=e,ei=ft()}else e.effectTag|=2,ti=!1,Zr=e}}var ii=ze.ReactCurrentOwner,li=!1;function ai(e,t,n,r){t.child=null===e?Kn(t,null,n,r):Jn(t,e.child,n,r)}function oi(e,t,n,r,i){n=n.render;var l=t.ref;return kn(t,i),r=Or(e,t,n,r,l,i),null===e||li?(t.effectTag|=1,ai(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),bi(e,t,i))}function ui(e,t,n,r,i,l){if(null===e){var a=n.type;return"function"!=typeof a||Gl(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Zl(n.type,null,r,null,t.mode,l)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ci(e,t,a,r,i,l))}return a=e.child,it)&&bl.set(e,t))}}function Cl(e,t){e.expirationTimei.firstPendingTime&&(i.firstPendingTime=t),0===(e=i.lastPendingTime)||t=t)&&(on(97,function(){return n._onComplete(),null}),!0)}function Nl(){if(null!==bl){var e=bl;bl=null,e.forEach(function(e,t){un(Ul.bind(null,t,e))}),cn()}}function Il(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,bt(n)),null!==nl)for(n=nl.return;null!==n;){var r=n;switch(r.tag){case 1:var i=r.type.childContextTypes;null!==i&&void 0!==i&&Ut();break;case 3:lr(),zt();break;case 5:or(r);break;case 4:lr();break;case 13:case 19:St(fr);break;case 10:wn(r)}n=n.return}tl=e,nl=Kl(e.current,null),rl=t,il=$i,al=ll=1073741823,ol=null,ul=!1}function Ul(e,t,n){if((48&el)!==Li)throw f(Error("Should not already be working."));if(e.firstPendingTime component higher in the tree to provide a loading indicator or placeholder to display."+Et(u))}il!==Zi&&(il=Gi),c=Ci(c,u),u=o;do{switch(u.tag){case 3:u.effectTag|=2048,u.expirationTime=s,zn(u,s=Wi(u,c,s));break e;case 1:if(d=c,a=u.type,o=u.stateNode,0==(64&u.effectTag)&&("function"==typeof a.getDerivedStateFromError||null!==o&&"function"==typeof o.componentDidCatch&&(null===hl||!hl.has(o)))){u.effectTag|=2048,u.expirationTime=s,zn(u,s=Hi(u,d,s));break e}}u=u.return}while(null!==u)}nl=Al(l)}if(el=r,En(),Bi.current=i,null!==nl)return Ul.bind(null,e,t)}if(e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Rl(e,t))return null;switch(tl=null,il){case $i:throw f(Error("Should have a work-in-progress."));case Gi:return(r=e.lastPendingTime)(n=r-n)&&(n=0),t<(n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Qi(n/1960))-n)&&(n=t)),10=(t=0|(i=ol).busyMinDurationMs)?t=0:(n=0|i.busyDelayMs,t=(r=nn()-(10*(1073741821-r)-(0|i.timeoutMs||5e3)))<=n?0:n+t-r),10 component."));r=mt(),u.UIManager.createView(r,"RCTRawText",l,{text:i}),Ee.set(r,t),n.stateNode=r}break;case 11:break;case 13:if(St(fr),i=t.memoizedState,0!=(64&t.effectTag)){t.expirationTime=r;break e}i=null!==i,r=!1,null!==n&&(r=null!==(l=n.memoizedState),i||null===l||null!==(l=n.child.sibling)&&(null!==(o=t.firstEffect)?(t.firstEffect=l,l.nextEffect=o):(t.firstEffect=t.lastEffect=l,l.nextEffect=null),l.effectTag=8)),i&&!r&&0!=(2&t.mode)&&(null===n&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(fr.current&cr)?il===$i&&(il=Ji):il!==$i&&il!==Ji||(il=Ki)),(i||r)&&(t.effectTag|=4);break;case 7:case 8:case 12:break;case 4:lr(),Ei(t);break;case 10:wn(t);break;case 9:case 14:break;case 17:It(t.type)&&Ut();break;case 18:break;case 19:if(St(fr),null===(i=t.memoizedState))break;if(l=0!=(64&t.effectTag),null===(o=i.rendering)){if(l)Si(i,!1);else if(il!==$i||null!==n&&0!=(64&n.effectTag))for(n=t.child;null!==n;){if(null!==(o=dr(n))){for(t.effectTag|=64,Si(i,!1),null!==(i=o.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),t.firstEffect=t.lastEffect=null,i=r,n=t.child;null!==n;)l=i,(r=n).effectTag&=2,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null,null===(o=r.alternate)?(r.childExpirationTime=0,r.expirationTime=l,r.child=null,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null):(r.childExpirationTime=o.childExpirationTime,r.expirationTime=o.expirationTime,r.child=o.child,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,l=o.dependencies,r.dependencies=null===l?null:{expirationTime:l.expirationTime,firstContext:l.firstContext,responders:l.responders}),n=n.sibling;kt(fr,fr.current&ur|sr),t=t.child;break e}n=n.sibling}}else{if(!l)if(null!==(n=dr(o))){if(t.effectTag|=64,l=!0,Si(i,!0),null===i.tail&&"hidden"===i.tailMode){null!==(n=n.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),null!==(t=t.lastEffect=i.lastEffect)&&(t.nextEffect=null);break}}else nn()>i.tailExpiration&&1n&&(n=l),o>n&&(n=o),r=r.sibling;i.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(1024&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=nl.firstEffect),null!==nl.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=nl.firstEffect),e.lastEffect=nl.lastEffect),1i?l:i,e.firstPendingTime=i,i=n?gi(e,t,n):(kt(fr,fr.current&ur),null!==(t=bi(e,t,n))?t.sibling:null);kt(fr,fr.current&ur);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return yi(e,t,n);t.effectTag|=64}var i=t.memoizedState;if(null!==i&&(i.rendering=null,i.tail=null),kt(fr,fr.current),!r)return null}return bi(e,t,n)}}else li=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=Nt(t,_t.current),kn(t,n),i=Or(null,t,r,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,jr(),It(r)){var l=!0;Dt(t)}else l=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null;var a=r.getDerivedStateFromProps;"function"==typeof a&&Hn(t,r,a,e),i.updater=Qn,t.stateNode=i,i._reactInternalFiber=t,Yn(t,r,e,n),t=pi(null,t,r,!0,l,n)}else t.tag=0,ai(null,t,i,n),t=t.child;return t;case 16:switch(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=gn(i),t.type=i,l=t.tag=Jl(i),e=mn(i,e),l){case 0:t=fi(null,t,i,e,n);break;case 1:t=di(null,t,i,e,n);break;case 11:t=oi(null,t,i,e,n);break;case 14:t=ui(null,t,i,mn(i.type,e),r,n);break;default:throw f(Error("Element type is invalid. Received a promise that resolves to: "+i+". Lazy element type must resolve to a class or function."))}return t;case 0:return r=t.type,i=t.pendingProps,fi(e,t,r,i=t.elementType===r?i:mn(r,i),n);case 1:return r=t.type,i=t.pendingProps,di(e,t,r,i=t.elementType===r?i:mn(r,i),n);case 3:if(hi(t),null===(r=t.updateQueue))throw f(Error("If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."));return i=null!==(i=t.memoizedState)?i.element:null,Dn(t,r,t.pendingProps,null,n),(r=t.memoizedState.element)===i?t=bi(e,t,n):(ai(e,t,r,n),t=t.child),t;case 5:return ar(t),null===e&&ri(t),r=t.pendingProps.children,si(e,t),ai(e,t,r,n),t.child;case 6:return null===e&&ri(t),null;case 13:return gi(e,t,n);case 4:return ir(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Jn(t,null,r,n):ai(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,oi(e,t,r,i=t.elementType===r?i:mn(r,i),n);case 7:return ai(e,t,t.pendingProps,n),t.child;case 8:case 12:return ai(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,xn(t,l=i.value),null!==a){var o=a.value;if(0===(l=dn(o,l)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(o,l):1073741823))){if(a.children===i.children&&!Pt.current){t=bi(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var u=o.dependencies;if(null!==u){a=o.child;for(var c=u.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&l)){1===o.tag&&((c=Nn(n,null)).tag=2,Un(o,c)),o.expirationTime|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,t=/\((\S*)(?::(\d+))(?::(\d+))\)/;function o(n){var o=u.exec(n);if(!o)return null;var c=o[2]&&0===o[2].indexOf('native'),s=o[2]&&0===o[2].indexOf('eval'),f=t.exec(o[2]);return s&&null!=f&&(o[2]=f[1],o[3]=f[2],o[4]=f[3]),{file:c?null:o[2],methodName:o[1]||l,arguments:c?[o[2]]:[],lineNumber:o[3]?+o[3]:null,column:o[4]?+o[4]:null}}var c=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function s(n){var u=c.exec(n);return u?{file:u[2],methodName:u[1]||l,arguments:[],lineNumber:+u[3],column:u[4]?+u[4]:null}:null}var f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,v=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function b(n){var u=f.exec(n);if(!u)return null;var t=u[3]&&u[3].indexOf(' > eval')>-1,o=v.exec(u[3]);return t&&null!=o&&(u[3]=o[1],u[4]=o[2],u[5]=null),{file:u[3],methodName:u[1]||l,arguments:u[2]?u[2].split(','):[],lineNumber:u[4]?+u[4]:null,column:u[5]?+u[5]:null}}var p=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function x(n){var u=p.exec(n);return u?{file:u[3],methodName:u[1]||l,arguments:[],lineNumber:+u[4],column:u[5]?+u[5]:null}:null}var h=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function N(n){var u=h.exec(n);return u?{file:u[2],methodName:u[1]||l,arguments:[],lineNumber:+u[3],column:u[4]?+u[4]:null}:null}n.parse=function(n){return n.split('\n').reduce(function(n,l){var u=o(l)||s(l)||b(l)||N(l)||x(l);return u&&n.push(u),n},[])},Object.defineProperty(n,'__esModule',{value:!0})},'object'==typeof e&&void 0!==m?l(e):'function'==typeof define&&define.amd?define(['exports'],l):l((n=n||self).stackTraceParser={})},105,[]); __d(function(g,r,i,a,m,e,d){'use strict';(0,r(d[0]).polyfillGlobal)('Promise',function(){return r(d[1])})},106,[107,40]); __d(function(g,r,i,a,m,e,d){'use strict';var l=r(d[0]);function o(o,t,n){var c=Object.getOwnPropertyDescriptor(o,t),b=c||{},f=b.enumerable,u=b.writable,p=b.configurable;!c||p?l(o,t,{get:n,enumerable:!1!==f,writable:!1!==u}):console.error('Failed to set polyfill. '+t+' is not configurable.')}m.exports={polyfillObjectProperty:o,polyfillGlobal:function(l,t){o(g,l,t)}}},107,[39]); __d(function(g,r,i,a,m,e,d){'use strict';(0,r(d[0]).polyfillGlobal)('regeneratorRuntime',function(){return delete g.regeneratorRuntime,r(d[1])})},108,[107,109]); __d(function(g,r,i,a,m,e,d){var t=(function(t){"use strict";var n,o=Object.prototype,c=o.hasOwnProperty,u="function"==typeof Symbol?Symbol:{},h=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function l(t,n,o,c){var u=n&&n.prototype instanceof E?n:E,h=Object.create(u.prototype),f=new A(c||[]);return h._invoke=F(t,o,f),h}function p(t,n,o){try{return{type:"normal",arg:t.call(n,o)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var y="suspendedStart",v="suspendedYield",w="executing",L="completed",x={};function E(){}function b(){}function _(){}var j={};j[h]=function(){return this};var O=Object.getPrototypeOf,k=O&&O(O(R([])));k&&k!==o&&c.call(k,h)&&(j=k);var G=_.prototype=E.prototype=Object.create(j);function N(t){["next","throw","return"].forEach(function(n){t[n]=function(t){return this._invoke(n,t)}})}function P(t){function n(o,u,h,f){var s=p(t[o],t,u);if("throw"!==s.type){var l=s.arg,y=l.value;return y&&"object"==typeof y&&c.call(y,"__await")?Promise.resolve(y.__await).then(function(t){n("next",t,h,f)},function(t){n("throw",t,h,f)}):Promise.resolve(y).then(function(t){l.value=t,h(l)},function(t){return n("throw",t,h,f)})}f(s.arg)}var o;this._invoke=function(t,c){function u(){return new Promise(function(o,u){n(t,c,o,u)})}return o=o?o.then(u,u):u()}}function F(t,n,o){var c=y;return function(u,h){if(c===w)throw new Error("Generator is already running");if(c===L){if("throw"===u)throw h;return Y()}for(o.method=u,o.arg=h;;){var f=o.delegate;if(f){var s=S(f,o);if(s){if(s===x)continue;return s}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(c===y)throw c=L,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);c=w;var l=p(t,n,o);if("normal"===l.type){if(c=o.done?L:v,l.arg===x)continue;return{value:l.arg,done:o.done}}"throw"===l.type&&(c=L,o.method="throw",o.arg=l.arg)}}}function S(t,o){var c=t.iterator[o.method];if(c===n){if(o.delegate=null,"throw"===o.method){if(t.iterator.return&&(o.method="return",o.arg=n,S(t,o),"throw"===o.method))return x;o.method="throw",o.arg=new TypeError("The iterator does not provide a 'throw' method")}return x}var u=p(c,t.iterator,o.arg);if("throw"===u.type)return o.method="throw",o.arg=u.arg,o.delegate=null,x;var h=u.arg;return h?h.done?(o[t.resultName]=h.value,o.next=t.nextLoc,"return"!==o.method&&(o.method="next",o.arg=n),o.delegate=null,x):h:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,x)}function T(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function I(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function R(t){if(t){var o=t[h];if(o)return o.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var u=-1,f=function o(){for(;++u=0;--h){var f=this.tryEntries[h],s=f.completion;if("root"===f.tryLoc)return u("end");if(f.tryLoc<=this.prev){var l=c.call(f,"catchLoc"),p=c.call(f,"finallyLoc");if(l&&p){if(this.prev=0;--o){var u=this.tryEntries[o];if(u.tryLoc<=this.prev&&c.call(u,"finallyLoc")&&this.prev=0;--n){var o=this.tryEntries[n];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),I(o),x}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc===t){var c=o.completion;if("throw"===c.type){var u=c.arg;I(o)}return u}}throw new Error("illegal catch attempt")},delegateYield:function(t,o,c){return this.delegate={iterator:R(t),resultName:o,nextLoc:c},"next"===this.method&&(this.arg=n),x}},t})("object"==typeof m?m.exports:{});try{regeneratorRuntime=t}catch(n){Function("r","regeneratorRuntime = r")(t)}},109,[]); __d(function(g,r,i,a,m,e,d){'use strict';if(!g.RN$Bridgeless){var l=r(d[0]).polyfillGlobal,t=function(t){l(t,function(){return r(d[1])[t]})};t('setTimeout'),t('setInterval'),t('setImmediate'),t('clearTimeout'),t('clearInterval'),t('clearImmediate'),t('requestAnimationFrame'),t('cancelAnimationFrame'),t('requestIdleCallback'),t('cancelIdleCallback')}},110,[107,111]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0])(r(d[1])),n=r(d[2]),l=(r(d[3]),r(d[4]),r(d[5])),u=null;function o(){return u||(u=r(d[6])),u()}var c=16.666666666666668,f=[],s=[],v=[],h=[],I=[],T={},b=[],p=1,w=null,k=!1;function q(){var t=v.indexOf(null);return-1===t&&(t=v.length),t}function x(t,n){var l=p++,u=q();return v[u]=l,f[u]=t,s[u]=n,l}function y(t,n,l){r(d[7])(t<=p,'Tried to call timer with ID %s but no such timer exists.',t);var u=v.indexOf(t);if(-1!==u){var h=s[u],I=f[u];if(I&&h){'setTimeout'!==h&&'setImmediate'!==h&&'requestAnimationFrame'!==h&&'requestIdleCallback'!==h||A(u);try{'setTimeout'===h||'setInterval'===h||'setImmediate'===h?I():'requestAnimationFrame'===h?I(o()):'requestIdleCallback'===h?I({timeRemaining:function(){return Math.max(0,c-(o()-n))},didTimeout:!!l}):console.error('Tried to call a callback with invalid type: '+h)}catch(t){w?w.push(t):w=[t]}}else console.error('No callback found for timerID '+t)}}function C(){if(h.length>0){var t=h.slice();h=[];for(var n=0;n0}function A(t){v[t]=null,f[t]=null,s[t]=null,b[t]=null}function D(t){if(null!=t){var n=v.indexOf(t);if(-1!==n){A(n);var l=s[n];'setImmediate'!==l&&'requestIdleCallback'!==l&&E(t)}}}var O,F={setTimeout:function(t,n){for(var l=arguments.length,u=new Array(l>2?l-2:0),o=2;o2?l-2:0),o=2;o1?n-1:0),u=1;u-1&&(I.splice(t,1),y(u,o(),!0)),delete T[u],0===I.length&&_(!1)},l);T[u]=c}return u},cancelIdleCallback:function(t){D(t);var n=I.indexOf(t);-1!==n&&I.splice(n,1);var l=T[t];l&&(F.clearTimeout(l),delete T[t]),0===I.length&&_(!1)},clearTimeout:function(t){D(t)},clearInterval:function(t){D(t)},clearImmediate:function(t){D(t);var n=h.indexOf(t);-1!==n&&h.splice(n,1)},cancelAnimationFrame:function(t){D(t)},callTimers:function(t){l(0!==t.length,'Cannot call `callTimers` with an empty list of IDs.'),w=null;for(var n=0;n1)for(var o=1;o0){var n=I.slice();I=[];for(var l=0;l=0,loaded:s,total:n})}},{key:"__didCompleteResponse",value:function(t,s,n){t===this._requestId&&(s&&(''!==this._responseType&&'text'!==this._responseType||(this._response=s),this._hasError=!0,n&&(this._timedOut=!0)),this._clearSubscriptions(),this._requestId=null,this.setReadyState(this.DONE),s?S._interceptor&&S._interceptor.loadingFailed(t,s):S._interceptor&&S._interceptor.loadingFinished(t,this._response.length))}},{key:"_clearSubscriptions",value:function(){(this._subscriptions||[]).forEach(function(t){t&&t.remove()}),this._subscriptions=[]}},{key:"getAllResponseHeaders",value:function(){if(!this.responseHeaders)return null;var t=this.responseHeaders||{};return Object.keys(t).map(function(s){return s+': '+t[s]}).join('\r\n')}},{key:"getResponseHeader",value:function(t){var s=this._lowerCaseResponseHeaders[t.toLowerCase()];return void 0!==s?s:null}},{key:"setRequestHeader",value:function(t,s){if(this.readyState!==this.OPENED)throw new Error('Request has not been opened');this._headers[t.toLowerCase()]=String(s)}},{key:"setTrackingName",value:function(t){return this._trackingName=t,this}},{key:"open",value:function(t,s,n){if(this.readyState!==this.UNSENT)throw new Error('Cannot open, already sending');if(void 0!==n&&!n)throw new Error('Synchronous http requests are not supported');if(!s)throw new Error('Cannot load an empty url');this._method=t.toUpperCase(),this._url=s,this._aborted=!1,this.setReadyState(this.OPENED)}},{key:"send",value:function(s){var n=this;if(this.readyState!==this.OPENED)throw new Error('Request has not been opened');if(this._sent)throw new Error('Request has already been sent');this._sent=!0;var o=this._incrementalEvents||!!this.onreadystatechange||!!this.onprogress;this._subscriptions.push(l.addListener('didSendNetworkData',function(s){return n.__didUploadProgress.apply(n,t(s))})),this._subscriptions.push(l.addListener('didReceiveNetworkResponse',function(s){return n.__didReceiveResponse.apply(n,t(s))})),this._subscriptions.push(l.addListener('didReceiveNetworkData',function(s){return n.__didReceiveData.apply(n,t(s))})),this._subscriptions.push(l.addListener('didReceiveNetworkIncrementalData',function(s){return n.__didReceiveIncrementalData.apply(n,t(s))})),this._subscriptions.push(l.addListener('didReceiveNetworkDataProgress',function(s){return n.__didReceiveDataProgress.apply(n,t(s))})),this._subscriptions.push(l.addListener('didCompleteNetworkResponse',function(s){return n.__didCompleteResponse.apply(n,t(s))}));var h='text';'arraybuffer'===this._responseType&&(h='base64'),'blob'===this._responseType&&(h='blob'),v(this._method,'Request method needs to be defined.'),v(this._url,'Request URL needs to be defined.'),l.sendRequest(this._method,this._trackingName,this._url,this._headers,s,h,o,this.timeout,this.__didCreateRequest.bind(this),this.withCredentials)}},{key:"abort",value:function(){this._aborted=!0,this._requestId&&l.abortRequest(this._requestId),this.readyState===this.UNSENT||this.readyState===this.OPENED&&!this._sent||this.readyState===this.DONE||(this._reset(),this.setReadyState(this.DONE)),this._reset()}},{key:"setResponseHeaders",value:function(t){this.responseHeaders=t||null;var s=t||{};this._lowerCaseResponseHeaders=Object.keys(s).reduce(function(t,n){return t[n.toLowerCase()]=s[n],t},{})}},{key:"setReadyState",value:function(t){this.readyState=t,this.dispatchEvent({type:'readystatechange'}),t===this.DONE&&(this._aborted?this.dispatchEvent({type:'abort'}):this._hasError?this._timedOut?this.dispatchEvent({type:'timeout'}):this.dispatchEvent({type:'error'}):this.dispatchEvent({type:'load'}),this.dispatchEvent({type:'loadend'}))}},{key:"addEventListener",value:function(t,n){'readystatechange'!==t&&'progress'!==t||(this._incrementalEvents=!0),s(p(S.prototype),"addEventListener",this).call(this,t,n)}},{key:"responseType",get:function(){return this._responseType},set:function(t){if(this._sent)throw new Error("Failed to set the 'responseType' property on 'XMLHttpRequest': The response type cannot be set after the request has been sent.");w.hasOwnProperty(t)?(v(w[t]||'document'===t,"The provided value '"+t+"' is unsupported in this environment."),'blob'===t&&v(_.isAvailable,'Native module BlobModule is required for blob support'),this._responseType=t):f(!1,"The provided value '"+t+"' is not a valid 'responseType'.")}},{key:"responseText",get:function(){if(''!==this._responseType&&'text'!==this._responseType)throw new Error("The 'responseText' property is only available if 'responseType' is set to '' or 'text', but it is '"+this._responseType+"'.");return this.readyState0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0;t(this,s);var u=r(d[2]);this.data=u.createFromParts(n,o).data}return n(s,[{key:"slice",value:function(t,n){var s=r(d[2]),o=this.data,u=o.offset,l=o.size;return'number'==typeof t&&(t>l&&(t=l),u+=t,l-=t,'number'==typeof n&&(n<0&&(n=this.size+n),l=n-t)),s.createFromOptions({blobId:this.data.blobId,offset:u,size:l})}},{key:"close",value:function(){r(d[2]).release(this.data.blobId),this.data=null}},{key:"data",set:function(t){this._data=t},get:function(){if(!this._data)throw new Error('Blob has been closed and is no longer available');return this._data}},{key:"size",get:function(){return this.data.size}},{key:"type",get:function(){return this.data.type||''}}]),s})();m.exports=s},120,[4,5,118]); __d(function(g,r,i,a,m,e,d){var n={};m.exports={register:function(t){n[t]?n[t]++:n[t]=1},unregister:function(t){n[t]&&(n[t]--,n[t]<=0&&delete n[t])},has:function(t){return n[t]&&n[t]>0}}},121,[]); __d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,'__esModule',{value:!0});var t=new WeakMap,n=new WeakMap;function o(n){var o=t.get(n);return console.assert(null!=o,"'this' is expected an Event object, but got",n),o}function l(t){null==t.passiveListener?t.event.cancelable&&(t.canceled=!0,"function"==typeof t.event.preventDefault&&t.event.preventDefault()):"undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",t.passiveListener)}function u(n,o){t.set(this,{eventTarget:n,event:o,eventPhase:2,currentTarget:n,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:o.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});for(var l=Object.keys(o),u=0;u0){for(var t=new Array(arguments.length),n=0;n0?C-4:C;for(u=0;u>16&255,s[v++]=h>>8&255,s[v++]=255&h;2===y&&(h=n[t.charCodeAt(u)]<<2|n[t.charCodeAt(u+1)]>>4,s[v++]=255&h);1===y&&(h=n[t.charCodeAt(u)]<<10|n[t.charCodeAt(u+1)]<<4|n[t.charCodeAt(u+2)]>>2,s[v++]=h>>8&255,s[v++]=255&h);return s},e.fromByteArray=function(n){for(var o,h=n.length,u=h%3,c=[],f=0,A=h-u;fA?A:f+16383));1===u?(o=n[h-1],c.push(t[o>>2]+t[o<<4&63]+'==')):2===u&&(o=(n[h-2]<<8)+n[h-1],c.push(t[o>>10]+t[o>>4&63]+t[o<<2&63]+'='));return c.join('')};for(var t=[],n=[],o='undefined'!=typeof Uint8Array?Uint8Array:Array,h='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',u=0,c=h.length;u0)throw new Error('Invalid string. Length must be a multiple of 4');var o=t.indexOf('=');return-1===o&&(o=n),[o,o===n?0:4-o%4]}function A(t,n,o){return 3*(n+o)/4-o}function C(n,o,h){for(var u,c,f=[],A=o;A>18&63]+t[c>>12&63]+t[c>>6&63]+t[63&c]);return f.join('')}n['-'.charCodeAt(0)]=62,n['_'.charCodeAt(0)]=63},128,[]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),p=(function(){function p(){s(this,p),this._parts=[]}return o(p,[{key:"append",value:function(t,n){this._parts.push([t,n])}},{key:"getParts",value:function(){return this._parts.map(function(s){var o=n(s,2),p=o[0],f=o[1],u={'content-disposition':'form-data; name="'+p+'"'};return'object'==typeof f&&f?('string'==typeof f.name&&(u['content-disposition']+='; filename="'+f.name+'"'),'string'==typeof f.type&&(u['content-type']=f.type),t({},f,{headers:u,fieldName:p})):{string:String(f),headers:u,fieldName:p}})}}]),p})();m.exports=p},129,[53,25,4,5]); __d(function(g,r,i,a,m,e,d){'use strict';r(d[0]),m.exports={fetch:fetch,Headers:Headers,Request:Request,Response:Response}},130,[131]); __d(function(g,r,i,a,m,e,d){var t,o;t=this,o=function(t){'use strict';var o={searchParams:'URLSearchParams'in self,iterable:'Symbol'in self&&'iterator'in Symbol,blob:'FileReader'in self&&'Blob'in self&&(function(){try{return new Blob,!0}catch(t){return!1}})(),formData:'FormData'in self,arrayBuffer:'ArrayBuffer'in self};if(o.arrayBuffer)var n=['[object Int8Array]','[object Uint8Array]','[object Uint8ClampedArray]','[object Int16Array]','[object Uint16Array]','[object Int32Array]','[object Uint32Array]','[object Float32Array]','[object Float64Array]'],s=ArrayBuffer.isView||function(t){return t&&n.indexOf(Object.prototype.toString.call(t))>-1};function f(t){if('string'!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError('Invalid character in header field name');return t.toLowerCase()}function h(t){return'string'!=typeof t&&(t=String(t)),t}function u(t){var n={next:function(){var o=t.shift();return{done:void 0===o,value:o}}};return o.iterable&&(n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){return n}),n}function c(t){this.map={},t instanceof c?t.forEach(function(t,o){this.append(o,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(o){this.append(o,t[o])},this)}function y(t){if(t.bodyUsed)return Promise.reject(new TypeError('Already read'));t.bodyUsed=!0}function l(t){return new Promise(function(o,n){t.onload=function(){o(t.result)},t.onerror=function(){n(t.error)}})}function p(t){var o=new FileReader,n=l(o);return o.readAsArrayBuffer(t),n}function b(t){for(var o=new Uint8Array(t),n=new Array(o.length),s=0;s-1?s:n),this.mode=o.mode||this.mode||null,this.signal=o.signal||this.signal,this.referrer=null,('GET'===this.method||'HEAD'===this.method)&&f)throw new TypeError('Body not allowed for GET or HEAD requests');this._initBody(f)}function A(t){var o=new FormData;return t.trim().split('&').forEach(function(t){if(t){var n=t.split('='),s=n.shift().replace(/\+/g,' '),f=n.join('=').replace(/\+/g,' ');o.append(decodeURIComponent(s),decodeURIComponent(f))}}),o}function x(t,o){o||(o={}),this.type='default',this.status=void 0===o.status?200:o.status,this.ok=this.status>=200&&this.status<300,this.statusText='statusText'in o?o.statusText:'OK',this.headers=new c(o.headers),this.url=o.url||'',this._initBody(t)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},v.call(_.prototype),v.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},x.error=function(){var t=new x(null,{status:0,statusText:''});return t.type='error',t};var B=[301,302,303,307,308];x.redirect=function(t,o){if(-1===B.indexOf(o))throw new RangeError('Invalid status code');return new x(null,{status:o,headers:{location:t}})},t.DOMException=self.DOMException;try{new t.DOMException}catch(o){t.DOMException=function(t,o){this.message=t,this.name=o;var n=Error(t);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function T(n,s){return new Promise(function(f,h){var u=new _(n,s);if(u.signal&&u.signal.aborted)return h(new t.DOMException('Aborted','AbortError'));var y=new XMLHttpRequest;function l(){y.abort()}y.onload=function(){var t,o,n={status:y.status,statusText:y.statusText,headers:(t=y.getAllResponseHeaders()||'',o=new c,t.replace(/\r?\n[\t ]+/g,' ').split(/\r?\n/).forEach(function(t){var n=t.split(':'),s=n.shift().trim();if(s){var f=n.join(':').trim();o.append(s,f)}}),o)};n.url='responseURL'in y?y.responseURL:n.headers.get('X-Request-URL');var s='response'in y?y.response:y.responseText;f(new x(s,n))},y.onerror=function(){h(new TypeError('Network request failed'))},y.ontimeout=function(){h(new TypeError('Network request failed'))},y.onabort=function(){h(new t.DOMException('Aborted','AbortError'))},y.open(u.method,u.url,!0),'include'===u.credentials?y.withCredentials=!0:'omit'===u.credentials&&(y.withCredentials=!1),'responseType'in y&&o.blob&&(y.responseType='blob'),u.headers.forEach(function(t,o){y.setRequestHeader(o,t)}),u.signal&&(u.signal.addEventListener('abort',l),y.onreadystatechange=function(){4===y.readyState&&u.signal.removeEventListener('abort',l)}),y.send(void 0===u._bodyInit?null:u._bodyInit)})}T.polyfill=!0,self.fetch||(self.fetch=T,self.Headers=c,self.Request=_,self.Response=x),t.Headers=c,t.Request=_,t.Response=x,t.fetch=T,Object.defineProperty(t,'__esModule',{value:!0})},'object'==typeof e&&void 0!==m?o(e):'function'==typeof define&&define.amd?define(['exports'],o):o(t.WHATWGFetch={})},131,[]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),s=t(r(d[1])),o=t(r(d[2])),n=t(r(d[3])),c=t(r(d[4])),u=t(r(d[5])),l=t(r(d[6])),f=t(r(d[7])),h=r(d[8]),b=r(d[9]),y=r(d[10]),p=r(d[11]),v=(r(d[12]),r(d[13])),_=r(d[14]),E=r(d[15]),k=r(d[16]),I=0,S=1,N=2,w=3,O=0,C=(function(t){function y(t,n,l){var h;(0,o.default)(this,y),(h=(0,c.default)(this,(0,u.default)(y).call(this))).CONNECTING=I,h.OPEN=S,h.CLOSING=N,h.CLOSED=w,h.readyState=I,'string'==typeof n&&(n=[n]);var b=l||{},v=b.headers,_=void 0===v?{}:v,E=(0,s.default)(b,["headers"]);return E&&'string'==typeof E.origin&&(console.warn('Specifying `origin` as a WebSocket connection option is deprecated. Include it under `headers` instead.'),_.origin=E.origin,delete E.origin),Object.keys(E).length>0&&console.warn('Unrecognized WebSocket connection option(s) `'+Object.keys(E).join('`, `')+"`. Did you mean to put these under `headers`?"),Array.isArray(n)||(n=null),h._eventEmitter=new p(f.default),h._socketId=O++,h._registerEvents(),f.default.connect(t,n,{headers:_},h._socketId),h}return(0,l.default)(y,t),(0,n.default)(y,[{key:"close",value:function(t,s){this.readyState!==this.CLOSING&&this.readyState!==this.CLOSED&&(this.readyState=this.CLOSING,this._close(t,s))}},{key:"send",value:function(t){if(this.readyState===this.CONNECTING)throw new Error('INVALID_STATE_ERR');if(t instanceof h)return k(b.isAvailable,'Native module BlobModule is required for blob support'),void b.sendOverSocket(t,this._socketId);if('string'!=typeof t){if(!(t instanceof ArrayBuffer||ArrayBuffer.isView(t)))throw new Error('Unsupported data type');f.default.sendBinary(E(t),this._socketId)}else f.default.send(t,this._socketId)}},{key:"ping",value:function(){if(this.readyState===this.CONNECTING)throw new Error('INVALID_STATE_ERR');f.default.ping(this._socketId)}},{key:"_close",value:function(t,s){var o='number'==typeof t?t:1e3,n='string'==typeof s?s:'';f.default.close(o,n,this._socketId),b.isAvailable&&'blob'===this._binaryType&&b.removeWebSocketHandler(this._socketId)}},{key:"_unregisterEvents",value:function(){this._subscriptions.forEach(function(t){return t.remove()}),this._subscriptions=[]}},{key:"_registerEvents",value:function(){var t=this;this._subscriptions=[this._eventEmitter.addListener('websocketMessage',function(s){if(s.id===t._socketId){var o=s.data;switch(s.type){case'binary':o=_.toByteArray(s.data).buffer;break;case'blob':o=b.createFromOptions(s.data)}t.dispatchEvent(new v('message',{data:o}))}}),this._eventEmitter.addListener('websocketOpen',function(s){s.id===t._socketId&&(t.readyState=t.OPEN,t.protocol=s.protocol,t.dispatchEvent(new v('open')))}),this._eventEmitter.addListener('websocketClosed',function(s){s.id===t._socketId&&(t.readyState=t.CLOSED,t.dispatchEvent(new v('close',{code:s.code,reason:s.reason})),t._unregisterEvents(),t.close())}),this._eventEmitter.addListener('websocketFailed',function(s){s.id===t._socketId&&(t.readyState=t.CLOSED,t.dispatchEvent(new v('error',{message:s.message})),t.dispatchEvent(new v('close',{message:s.message})),t._unregisterEvents(),t.close())})]}},{key:"binaryType",get:function(){return this._binaryType},set:function(t){if('blob'!==t&&'arraybuffer'!==t)throw new Error("binaryType must be either 'blob' or 'arraybuffer'");'blob'!==this._binaryType&&'blob'!==t||(k(b.isAvailable,'Native module BlobModule is required for blob support'),'blob'===t?b.addWebSocketHandler(this._socketId):b.removeWebSocketHandler(this._socketId)),this._binaryType=t}}]),y})(y.apply(void 0,['close','error','message','open']));C.CONNECTING=I,C.OPEN=S,C.CLOSING=N,C.CLOSED=w,m.exports=C},132,[3,55,4,5,6,9,10,133,120,118,122,125,57,134,128,127,16]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t(r(d[1])).getEnforcing('WebSocketModule');e.default=o},133,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),s=r(d[1]);m.exports=function n(o,c){s(this,n),this.type=o.toString(),t(this,c)}},134,[24,4]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),s=r(d[2]),u=r(d[3]),l=r(d[4]),o=r(d[5]),c=r(d[6]),h=(function(h){function f(n,l,o){var h;return t(this,f),c(null!=n&&null!=l,'Failed to construct `File`: Must pass both `parts` and `name` arguments.'),(h=s(this,u(f).call(this,n,o))).data.name=l,h}return l(f,o),n(f,[{key:"name",get:function(){return c(null!=this.data.name,'Files must have a name set.'),this.data.name}},{key:"lastModified",get:function(){return this.data.lastModified||0}}]),f})();m.exports=h},135,[4,5,6,9,10,120,16]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),s=t(r(d[1])),n=t(r(d[2])),o=t(r(d[3])),u=t(r(d[4])),h=t(r(d[5])),_=t(r(d[6])),l=(r(d[7]),0),c=1,y=2,f=(function(t){function f(){var t;return(0,s.default)(this,f),(t=(0,o.default)(this,(0,u.default)(f).call(this))).EMPTY=l,t.LOADING=c,t.DONE=y,t._aborted=!1,t._subscriptions=[],t._reset(),t}return(0,h.default)(f,t),(0,n.default)(f,[{key:"_reset",value:function(){this._readyState=l,this._error=null,this._result=null}},{key:"_clearSubscriptions",value:function(){this._subscriptions.forEach(function(t){return t.remove()}),this._subscriptions=[]}},{key:"_setReadyState",value:function(t){this._readyState=t,this.dispatchEvent({type:'readystatechange'}),t===y&&(this._aborted?this.dispatchEvent({type:'abort'}):this._error?this.dispatchEvent({type:'error'}):this.dispatchEvent({type:'load'}),this.dispatchEvent({type:'loadend'}))}},{key:"readAsArrayBuffer",value:function(){throw new Error('FileReader.readAsArrayBuffer is not implemented')}},{key:"readAsDataURL",value:function(t){var s=this;this._aborted=!1,_.default.readAsDataURL(t.data).then(function(t){s._aborted||(s._result=t,s._setReadyState(y))},function(t){s._aborted||(s._error=t,s._setReadyState(y))})}},{key:"readAsText",value:function(t){var s=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'UTF-8';this._aborted=!1,_.default.readAsText(t.data,n).then(function(t){s._aborted||(s._result=t,s._setReadyState(y))},function(t){s._aborted||(s._error=t,s._setReadyState(y))})}},{key:"abort",value:function(){this._aborted=!0,this._readyState!==l&&this._readyState!==y&&(this._reset(),this._setReadyState(y)),this._reset()}},{key:"readyState",get:function(){return this._readyState}},{key:"error",get:function(){return this._error}},{key:"result",get:function(){return this._result}}]),f})(r(d[8]).apply(void 0,['abort','error','load','loadstart','loadend','progress']));f.EMPTY=l,f.LOADING=c,f.DONE=y,m.exports=f},136,[3,4,5,6,9,10,137,120,122]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=t(r(d[1])).getEnforcing('FileReaderModule');e.default=u},137,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.URL=e.URLSearchParams=void 0;var n=t(r(d[1])),o=t(r(d[2])),u=t(r(d[3])),s=(r(d[4]),null);if(u.default&&'string'==typeof u.default.getConstants().BLOB_URI_SCHEME){var f=u.default.getConstants();s=f.BLOB_URI_SCHEME+':','string'==typeof f.BLOB_URI_HOST&&(s+="//"+f.BLOB_URI_HOST+"/")}var l="function"==typeof Symbol?Symbol.iterator:"@@iterator",h=(function(){function t(o){var u=this;(0,n.default)(this,t),this._searchParams=[],'object'==typeof o&&Object.keys(o).forEach(function(t){return u.append(t,o[t])})}return(0,o.default)(t,[{key:"append",value:function(t,n){this._searchParams.push([t,n])}},{key:"delete",value:function(t){throw new Error('not implemented')}},{key:"get",value:function(t){throw new Error('not implemented')}},{key:"getAll",value:function(t){throw new Error('not implemented')}},{key:"has",value:function(t){throw new Error('not implemented')}},{key:"set",value:function(t,n){throw new Error('not implemented')}},{key:"sort",value:function(){throw new Error('not implemented')}},{key:l,value:function(){return this._searchParams["function"==typeof Symbol?Symbol.iterator:"@@iterator"]()}},{key:"toString",value:function(){if(0===this._searchParams.length)return'';var t=this._searchParams.length-1;return this._searchParams.reduce(function(n,o,u){return n+o.join('=')+(u===t?'':'&')},'')}}]),t})();function c(t){return/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(t)}e.URLSearchParams=h;var y=(function(){function t(o,u){(0,n.default)(this,t),this._searchParamsInstance=null;var s=null;if(!u||c(o))this._url=o,this._url.endsWith('/')||(this._url+='/');else{if('string'==typeof u){if(!c(s=u))throw new TypeError("Invalid base URL: "+s)}else'object'==typeof u&&(s=u.toString());s.endsWith('/')&&o.startsWith('/')&&(s=s.slice(0,s.length-1)),s.endsWith(o)&&(o=''),this._url=""+s+o}}return(0,o.default)(t,null,[{key:"createObjectURL",value:function(t){if(null===s)throw new Error('Cannot create URL for blob!');return""+s+t.data.blobId+"?offset="+t.data.offset+"&size="+t.size}},{key:"revokeObjectURL",value:function(t){}}]),(0,o.default)(t,[{key:"toJSON",value:function(){return this.toString()}},{key:"toString",value:function(){if(null===this._searchParamsInstance)return this._url;var t=this._url.indexOf('?')>-1?'&':'?';return this._url+t+this._searchParamsInstance.toString()}},{key:"hash",get:function(){throw new Error('not implemented')}},{key:"host",get:function(){throw new Error('not implemented')}},{key:"hostname",get:function(){throw new Error('not implemented')}},{key:"href",get:function(){return this.toString()}},{key:"origin",get:function(){throw new Error('not implemented')}},{key:"password",get:function(){throw new Error('not implemented')}},{key:"pathname",get:function(){throw new Error('not implemented')}},{key:"port",get:function(){throw new Error('not implemented')}},{key:"protocol",get:function(){throw new Error('not implemented')}},{key:"search",get:function(){throw new Error('not implemented')}},{key:"searchParams",get:function(){return null==this._searchParamsInstance&&(this._searchParamsInstance=new h),this._searchParamsInstance}},{key:"username",get:function(){throw new Error('not implemented')}}]),t})();e.URL=y},138,[3,4,5,119,120]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),o=r(d[1]),n=r(d[2]),l=r(d[3]),b=r(d[4]);Object.defineProperty(e,'__esModule',{value:!0});var u=r(d[5]),p=(function(u){function p(){throw t(this,p),n(this,l(p).call(this)),new TypeError("AbortSignal cannot be constructed directly")}return b(p,u),o(p,[{key:"aborted",get:function(){var t=y.get(this);if("boolean"!=typeof t)throw new TypeError("Expected 'this' to be an 'AbortSignal' object, but got "+(null===this?"null":typeof this));return t}}]),p})(u.EventTarget);u.defineEventAttribute(p.prototype,"abort");var y=new WeakMap;Object.defineProperties(p.prototype,{aborted:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof("function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag")&&Object.defineProperty(p.prototype,"function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag",{configurable:!0,value:"AbortSignal"});var f=(function(){function n(){var o;t(this,n),c.set(this,(o=Object.create(p.prototype),u.EventTarget.call(o),y.set(o,!1),o))}return o(n,[{key:"abort",value:function(){var t;t=s(this),!1===y.get(t)&&(y.set(t,!0),t.dispatchEvent({type:"abort"}))}},{key:"signal",get:function(){return s(this)}}]),n})(),c=new WeakMap;function s(t){var o=c.get(t);if(null==o)throw new TypeError("Expected 'this' to be an 'AbortController' object, but got "+(null===t?"null":typeof t));return o}Object.defineProperties(f.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof("function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag")&&Object.defineProperty(f.prototype,"function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag",{configurable:!0,value:"AbortController"}),e.AbortController=f,e.AbortSignal=p,e.default=f,m.exports=f,m.exports.AbortController=m.exports.default=f,m.exports.AbortSignal=p},139,[4,5,6,9,10,140]); __d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,'__esModule',{value:!0});var t=new WeakMap,n=new WeakMap;function o(n){var o=t.get(n);return console.assert(null!=o,"'this' is expected an Event object, but got",n),o}function l(t){null==t.passiveListener?t.event.cancelable&&(t.canceled=!0,"function"==typeof t.event.preventDefault&&t.event.preventDefault()):"undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",t.passiveListener)}function u(n,o){t.set(this,{eventTarget:n,event:o,eventPhase:2,currentTarget:n,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:o.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});for(var l=Object.keys(o),u=0;u0){for(var t=new Array(arguments.length),n=0;n3&&void 0!==arguments[3]?arguments[3]:'plain-text',c=arguments.length>4?arguments[4]:void 0,f=arguments.length>5?arguments[5]:void 0;if('ios'===l.default.OS){if('function'==typeof s){console.warn("You passed a callback function as the \"type\" argument to Alert.prompt(). React Native is assuming you want to use the deprecated Alert.prompt(title, defaultValue, buttons, callback) signature. The current signature is Alert.prompt(title, message, callbackOrButtons, type, defaultValue, keyboardType) and the old syntax will be removed in a future version.");var p=s;return void u.default.alertWithArgs({title:t||'',type:'plain-text',defaultValue:n||''},function(t,n){p(n)})}var v,y,b=[],h=[];'function'==typeof o?b=[o]:Array.isArray(o)&&o.forEach(function(t,n){if(b[n]=t.onPress,'cancel'===t.style?v=String(n):'destructive'===t.style&&(y=String(n)),t.text||n<(o||[]).length-1){var l={};l[n]=t.text||'',h.push(l)}}),u.default.alertWithArgs({title:t||'',message:n||void 0,buttons:h,type:s||void 0,defaultValue:c,cancelButtonKey:v,destructiveButtonKey:y,keyboardType:f},function(t,n){var o=b[t];o&&o(n)})}}}]),t})();m.exports=c},142,[3,4,5,57,143,144]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t(r(d[1])).get('DialogManagerAndroid');e.default=o},143,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0])(r(d[1]));m.exports={alertWithArgs:function(l,u){null!=t.default&&t.default.alertWithArgs(l,u)}}},144,[3,145]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=t(r(d[1])).get('AlertManager');e.default=u},145,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]).polyfillObjectProperty,o=g.navigator;void 0===o&&(g.navigator=o={}),t(o,'product',function(){return'ReactNative'})},146,[107]); __d(function(g,r,i,a,m,e,d){'use strict';if(!g.RN$Bridgeless){var l=r(d[0]);l.registerLazyCallableModule('Systrace',function(){return r(d[1])}),l.registerLazyCallableModule('JSTimers',function(){return r(d[2])}),l.registerLazyCallableModule('HeapCapture',function(){return r(d[3])}),l.registerLazyCallableModule('SamplingProfiler',function(){return r(d[4])}),l.registerLazyCallableModule('RCTLog',function(){return r(d[5])}),l.registerLazyCallableModule('RCTDeviceEventEmitter',function(){return r(d[6])}),l.registerLazyCallableModule('RCTNativeAppEventEmitter',function(){return r(d[7])}),l.registerLazyCallableModule('GlobalPerformanceLogger',function(){return r(d[8])}),l.registerLazyCallableModule('JSDevSupportModule',function(){return r(d[9])}),l.registerCallableModule('HMRClient',r(d[10]))}},147,[29,36,111,148,150,152,45,153,154,157,159]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0])(r(d[1])),p={captureHeap:function(p){var u=null;try{g.nativeCaptureHeap(p),console.log('HeapCapture.captureHeap succeeded: '+p)}catch(t){console.log('HeapCapture.captureHeap error: '+t.toString()),u=t.toString()}t.default&&t.default.captureComplete(p,u)}};m.exports=p},148,[3,149]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=t(r(d[1])).get('HeapCapture');e.default=u},149,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';var o={poke:function(o){var l=null,n=null;try{null===(n=g.pokeSamplingProfiler())?console.log('The JSC Sampling Profiler has started'):console.log('The JSC Sampling Profiler has stopped')}catch(o){console.log('Error occurred when restarting Sampling Profiler: '+o.toString()),l=o.toString()}var t=r(d[0]).default;t&&t.operationComplete(o,n,l)}};m.exports=o},150,[151]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=t(r(d[1])).get('JSCSamplingProfiler');e.default=l},151,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';var o=r(d[0]),n={log:'log',info:'info',warn:'warn',error:'error',fatal:'error'},l=null,t={logIfNoNativeHook:function(o){for(var n=arguments.length,f=new Array(n>1?n-1:0),c=1;c1?c-1:0),s=1;s2&&void 0!==arguments[2]?arguments[2]:-1;if(0===o)return!0;if(n===f)return!1;if('function'==typeof n&&'function'==typeof f)return!1;if('object'!=typeof n||null===n)return n!==f;if('object'!=typeof f||null===f)return!0;if(n.constructor!==f.constructor)return!0;if(Array.isArray(n)){var u=n.length;if(f.length!==u)return!0;for(var c=0;c=C},u=function(){},e.unstable_forceFrameRate=function(n){0>n||125(F=lc){if(s=f,null===E)E=o.next=o.previous=o;else{u=null;var p=E;do{if(s1&&(o[u]=c)}else o[u]=f}for(var l in n)f.includes(l)||(u?n.hasOwnProperty(l)&&c(n[l],u[l],l):o[l]={});return o},e.getConfigWithoutViewProps=function(t,f){if(!t[f])return{};return Object.keys(t[f]).filter(function(t){return!n.default[f][t]}).reduce(function(n,u){return n[u]=t[f][u],n},{})},e.stringifyViewConfig=function(t){return JSON.stringify(t,function(t,n){return'function'==typeof n?"\u0192 "+n.name:n},2)},e.default=void 0;var n=t(r(d[1])),f=(r(d[2]),['transform','hitSlop']);var u=function(t,n){};e.default=u},172,[3,173,176]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),o=t(r(d[1])),s=t(r(d[2])),n={uiViewClassName:'RCTView',baseModuleName:null,Manager:'ViewManager',Commands:{},Constants:{},bubblingEventTypes:(0,o.default)({},s.default.bubblingEventTypes,{topBlur:{phasedRegistrationNames:{bubbled:'onBlur',captured:'onBlurCapture'}},topChange:{phasedRegistrationNames:{bubbled:'onChange',captured:'onChangeCapture'}},topEndEditing:{phasedRegistrationNames:{bubbled:'onEndEditing',captured:'onEndEditingCapture'}},topFocus:{phasedRegistrationNames:{bubbled:'onFocus',captured:'onFocusCapture'}},topKeyPress:{phasedRegistrationNames:{bubbled:'onKeyPress',captured:'onKeyPressCapture'}},topPress:{phasedRegistrationNames:{bubbled:'onPress',captured:'onPressCapture'}},topSubmitEditing:{phasedRegistrationNames:{bubbled:'onSubmitEditing',captured:'onSubmitEditingCapture'}},topTouchCancel:{phasedRegistrationNames:{bubbled:'onTouchCancel',captured:'onTouchCancelCapture'}},topTouchEnd:{phasedRegistrationNames:{bubbled:'onTouchEnd',captured:'onTouchEndCapture'}},topTouchMove:{phasedRegistrationNames:{bubbled:'onTouchMove',captured:'onTouchMoveCapture'}},topTouchStart:{phasedRegistrationNames:{bubbled:'onTouchStart',captured:'onTouchStartCapture'}}}),directEventTypes:(0,o.default)({},s.default.directEventTypes,{topAccessibilityAction:{registrationName:'onAccessibilityAction'},topAccessibilityEscape:{registrationName:'onAccessibilityEscape'},topAccessibilityTap:{registrationName:'onAccessibilityTap'},topLayout:{registrationName:'onLayout'},topMagicTap:{registrationName:'onMagicTap'},onGestureHandlerEvent:{registrationName:'onGestureHandlerEvent'},onGestureHandlerStateChange:{registrationName:'onGestureHandlerStateChange'}}),validAttributes:(0,o.default)({},s.default.validAttributes,{accessibilityActions:!0,accessibilityElementsHidden:!0,accessibilityHint:!0,accessibilityIgnoresInvertColors:!0,accessibilityLabel:!0,accessibilityLiveRegion:!0,accessibilityRole:!0,accessibilityStates:!0,accessibilityState:!0,accessibilityViewIsModal:!0,accessible:!0,alignContent:!0,alignItems:!0,alignSelf:!0,aspectRatio:!0,backfaceVisibility:!0,backgroundColor:{process:r(d[3])},borderBottomColor:{process:r(d[3])},borderBottomEndRadius:!0,borderBottomLeftRadius:!0,borderBottomRightRadius:!0,borderBottomStartRadius:!0,borderBottomWidth:!0,borderColor:{process:r(d[3])},borderEndColor:{process:r(d[3])},borderEndWidth:!0,borderLeftColor:{process:r(d[3])},borderLeftWidth:!0,borderRadius:!0,borderRightColor:{process:r(d[3])},borderRightWidth:!0,borderStartColor:{process:r(d[3])},borderStartWidth:!0,borderStyle:!0,borderTopColor:{process:r(d[3])},borderTopEndRadius:!0,borderTopLeftRadius:!0,borderTopRightRadius:!0,borderTopStartRadius:!0,borderTopWidth:!0,borderWidth:!0,bottom:!0,clickable:!0,collapsable:!0,direction:!0,display:!0,elevation:!0,end:!0,flex:!0,flexBasis:!0,flexDirection:!0,flexGrow:!0,flexShrink:!0,flexWrap:!0,height:!0,hitSlop:{diff:r(d[4])},importantForAccessibility:!0,justifyContent:!0,left:!0,margin:!0,marginBottom:!0,marginEnd:!0,marginHorizontal:!0,marginLeft:!0,marginRight:!0,marginStart:!0,marginTop:!0,marginVertical:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,nativeID:!0,needsOffscreenAlphaCompositing:!0,onAccessibilityAction:!0,onAccessibilityEscape:!0,onAccessibilityTap:!0,onLayout:!0,onMagicTap:!0,opacity:!0,overflow:!0,padding:!0,paddingBottom:!0,paddingEnd:!0,paddingHorizontal:!0,paddingLeft:!0,paddingRight:!0,paddingStart:!0,paddingTop:!0,paddingVertical:!0,pointerEvents:!0,position:!0,removeClippedSubviews:!0,renderToHardwareTextureAndroid:!0,right:!0,rotation:!0,scaleX:!0,scaleY:!0,shadowColor:{process:r(d[3])},shadowOffset:{diff:r(d[5])},shadowOpacity:!0,shadowRadius:!0,shouldRasterizeIOS:!0,start:!0,style:{alignContent:!0,alignItems:!0,alignSelf:!0,aspectRatio:!0,backfaceVisibility:!0,backgroundColor:{process:r(d[3])},borderBottomColor:{process:r(d[3])},borderBottomEndRadius:!0,borderBottomLeftRadius:!0,borderBottomRightRadius:!0,borderBottomStartRadius:!0,borderBottomWidth:!0,borderColor:{process:r(d[3])},borderEndColor:{process:r(d[3])},borderEndWidth:!0,borderLeftColor:{process:r(d[3])},borderLeftWidth:!0,borderRadius:!0,borderRightColor:{process:r(d[3])},borderRightWidth:!0,borderStartColor:{process:r(d[3])},borderStartWidth:!0,borderStyle:!0,borderTopColor:{process:r(d[3])},borderTopEndRadius:!0,borderTopLeftRadius:!0,borderTopRightRadius:!0,borderTopStartRadius:!0,borderTopWidth:!0,borderWidth:!0,bottom:!0,color:{process:r(d[3])},decomposedMatrix:!0,direction:!0,display:!0,elevation:!0,end:!0,flex:!0,flexBasis:!0,flexDirection:!0,flexGrow:!0,flexShrink:!0,flexWrap:!0,fontFamily:!0,fontSize:!0,fontStyle:!0,fontVariant:!0,fontWeight:!0,height:!0,includeFontPadding:!0,justifyContent:!0,left:!0,letterSpacing:!0,lineHeight:!0,margin:!0,marginBottom:!0,marginEnd:!0,marginHorizontal:!0,marginLeft:!0,marginRight:!0,marginStart:!0,marginTop:!0,marginVertical:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,opacity:!0,overflow:!0,overlayColor:{process:r(d[3])},padding:!0,paddingBottom:!0,paddingEnd:!0,paddingHorizontal:!0,paddingLeft:!0,paddingRight:!0,paddingStart:!0,paddingTop:!0,paddingVertical:!0,position:!0,resizeMode:!0,right:!0,rotation:!0,scaleX:!0,scaleY:!0,shadowColor:{process:r(d[3])},shadowOffset:{diff:r(d[5])},shadowOpacity:!0,shadowRadius:!0,start:!0,textAlign:!0,textAlignVertical:!0,textDecorationColor:{process:r(d[3])},textDecorationLine:!0,textDecorationStyle:!0,textShadowColor:{process:r(d[3])},textShadowOffset:!0,textShadowRadius:!0,textTransform:!0,tintColor:{process:r(d[3])},top:!0,transform:{diff:r(d[6])},transformMatrix:!0,translateX:!0,translateY:!0,width:!0,writingDirection:!0,zIndex:!0},testID:!0,top:!0,transform:{diff:r(d[6])},translateX:!0,translateY:!0,width:!0,zIndex:!0})};m.exports=n},173,[3,53,170,84,174,87,175]); __d(function(g,r,i,a,m,e,d){'use strict';var t={top:void 0,left:void 0,right:void 0,bottom:void 0};m.exports=function(o,f){return(o=o||t)!==(f=f||t)&&(o.top!==f.top||o.left!==f.left||o.right!==f.right||o.bottom!==f.bottom)}},174,[]); __d(function(g,r,i,a,m,e,d){'use strict';m.exports=function(t,n){return!(t===n||t&&n&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[5]===n[5]&&t[10]===n[10]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[11]===n[11]&&t[15]===n[15])}},175,[]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=r(d[1]),s=r(d[2]),o=r(d[3]),u=r(d[4]),c=r(d[5]),l=r(d[6]),v=r(d[7]),b=r(d[8]),p=r(d[9]),f=r(d[10]),y=r(d[11]),C=r(d[12]);var E=!1;function T(n){var t=o.getConstants();t.ViewManagerNames||t.LazyViewManagersEnabled?n=w(n,o.getDefaultEventTypes()):(n.bubblingEventTypes=w(n.bubblingEventTypes,t.genericBubblingEventTypes),n.directEventTypes=w(n.directEventTypes,t.genericDirectEventTypes))}function w(n,t){if(!t)return n;if(!n)return t;for(var s in t)if(t.hasOwnProperty(s)){var o=t[s];if(n.hasOwnProperty(s)){var u=n[s];'object'==typeof o&&'object'==typeof u&&(o=w(u,o))}n[s]=o}return n}function I(n){switch(n){case'CATransform3D':return l;case'CGPoint':return v;case'CGSize':return y;case'UIEdgeInsets':return u}return null}function N(n){switch(n){case'CGColor':case'UIColor':return b;case'CGColorArray':case'UIColorArray':return p;case'CGImage':case'UIImage':case'RCTImageSource':return f;case'Color':return b;case'ColorArray':return p}return null}m.exports=function(u){var l=o.getViewManagerConfig(u);c(null!=l&&null!=l.NativeProps,'requireNativeComponent: "%s" was not found in the UIManager.',u);for(var v=l.baseModuleName,b=l.bubblingEventTypes,p=l.directEventTypes,f=l.NativeProps;v;){var y=o.getViewManagerConfig(v);y?(b=t({},y.bubblingEventTypes,b),p=t({},y.directEventTypes,p),f=t({},y.NativeProps,f),v=y.baseModuleName):(C(!1,'Base module "%s" does not exist',v),v=null)}var w={};for(var M in f){var P=f[M],h=I(P),A=N(P);w[M]=null==h&&null==A||{diff:h,process:A}}return w.style=s,n(l,{uiViewClassName:u,validAttributes:w,bubblingEventTypes:b,directEventTypes:p}),E||(T(l),E=!0),l}},176,[24,53,66,77,174,16,175,177,84,178,179,87,18]); __d(function(g,r,i,a,m,e,d){'use strict';var t={x:void 0,y:void 0};m.exports=function(n,o){return(n=n||t)!==(o=o||t)&&(n.x!==o.x||n.y!==o.y)}},177,[]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]);m.exports=function(t){return null==t?null:t.map(n)}},178,[84]); __d(function(g,r,i,a,m,e,d){'use strict';var t,n,s,u,o=r(d[0]),f=r(d[1]);function c(){if(u)return u;var t=g.nativeExtensions&&g.nativeExtensions.SourceCode;return t||(t=r(d[2]).default),u=t.getConstants().scriptURL}function l(){if(void 0===n){var t=c(),s=t&&t.match(/^https?:\/\/.*?\//);n=s?s[0]:null}return n}function v(t){if(t){if(t.startsWith('assets://'))return null;(t=t.substring(0,t.lastIndexOf('/')+1)).includes('://')||(t='file://'+t)}return t}m.exports=function(n){if('object'==typeof n)return n;var u=o.getAssetByID(n);if(!u)return null;var p=new f(l(),(void 0===s&&(s=v(c())),s),u);return t?t(p):p.defaultAsset()},m.exports.pickScale=f.pickScale,m.exports.setCustomSourceTransformer=function(n){t=n}},179,[180,181,183]); __d(function(g,r,i,a,m,e,d){'use strict';var t=[];m.exports={registerAsset:function(s){return t.push(s)},getAssetByID:function(s){return t[s-1]}}},180,[]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),s=r(d[1]),n=r(d[2]),u=(r(d[3]),r(d[4])),o=r(d[5]);function l(t){var s=h.pickScale(t.scales,n.get()),o=1===s?'':'@'+s+'x';return u.getBasePath(t)+'/'+t.name+o+'.'+t.type}function c(t){var s=h.pickScale(t.scales,n.get());return u.getAndroidResourceFolderName(t,s)+'/'+u.getAndroidResourceIdentifier(t)+'.'+t.type}var h=(function(){function h(s,n,u){t(this,h),this.serverUrl=s,this.jsbundleUrl=n,this.asset=u}return s(h,[{key:"isLoadedFromServer",value:function(){return!!this.serverUrl}},{key:"isLoadedFromFileSystem",value:function(){return!(!this.jsbundleUrl||!this.jsbundleUrl.startsWith('file://'))}},{key:"defaultAsset",value:function(){return this.isLoadedFromServer()?this.assetServerURL():this.scaledAssetURLNearBundle()}},{key:"assetServerURL",value:function(){return o(!!this.serverUrl,'need server to load from'),this.fromSource(this.serverUrl+l(this.asset)+"?platform=ios&hash="+this.asset.hash)}},{key:"scaledAssetPath",value:function(){return this.fromSource(l(this.asset))}},{key:"scaledAssetURLNearBundle",value:function(){var t=this.jsbundleUrl||'file://';return this.fromSource(t+l(this.asset))}},{key:"resourceIdentifierWithoutScale",value:function(){return o(!1,'resource identifiers work on Android'),this.fromSource(u.getAndroidResourceIdentifier(this.asset))}},{key:"drawableFolderInBundle",value:function(){var t=this.jsbundleUrl||'file://';return this.fromSource(t+c(this.asset))}},{key:"fromSource",value:function(t){return{__packager_asset:!0,width:this.asset.width,height:this.asset.height,uri:t,scale:h.pickScale(this.asset.scales,n.get())}}}],[{key:"pickScale",value:function(t,s){for(var n=0;n=s)return t[n];return t[t.length-1]||1}}]),h})();m.exports=h},181,[4,5,63,57,182,16]); __d(function(g,r,i,a,m,e,d){'use strict';var t={.75:'ldpi',1:'mdpi',1.5:'hdpi',2:'xhdpi',3:'xxhdpi',4:'xxxhdpi'};function n(n){if(n.toString()in t)return t[n.toString()];throw new Error('no such scale '+n.toString())}var o=new Set(['gif','jpeg','jpg','png','svg','webp','xml']);function s(t){var n=t.httpServerLocation;return'/'===n[0]&&(n=n.substr(1)),n}m.exports={getAndroidAssetSuffix:n,getAndroidResourceFolderName:function(s,u){if(!o.has(s.type))return'raw';var c=n(u);if(!c)throw new Error("Don't know which android drawable suffix to use for scale: "+u+'\nAsset: '+JSON.stringify(s,null,'\t')+'\nPossible scales are:'+JSON.stringify(t,null,'\t'));return'drawable-'+c},getAndroidResourceIdentifier:function(t){return(s(t)+'/'+t.name).toLowerCase().replace(/\//g,'_').replace(/([^a-z0-9_])/g,'').replace(/^assets_/,'')},getBasePath:s}},182,[]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t(r(d[1])).getEnforcing('SourceCode');e.default=o},183,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=r(d[1]);m.exports=function(u){return n(u,function(){return t(u)})}},184,[185,176]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]).ReactNativeViewConfigRegistry.register;m.exports=function(n,s){return t(n,s)}},185,[162]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=(0,t(r(d[1])).default)('ActivityIndicatorView',{paperComponentName:'RCTActivityIndicatorView'});e.default=o},186,[3,187]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[1])),t=r(d[2]);var p=function(n,p){var f=p&&p.paperComponentName?p.paperComponentName:n;if(null!=p&&null!=p.paperComponentNameDeprecated)if(t.UIManager.getViewManagerConfig(n))f=n;else{if(null==p.paperComponentNameDeprecated||!t.UIManager.getViewManagerConfig(p.paperComponentNameDeprecated))throw new Error("Failed to find native component for either "+n+" or "+(p.paperComponentNameDeprecated||'(unknown)'));f=p.paperComponentNameDeprecated}return(0,o.default)(f)};e.default=p},187,[3,184,15]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),u=r(d[4]),s=r(d[5]),f=r(d[6]),c=r(d[7]),h=r(d[8]),p=r(d[9]),v=r(d[10]),y=r(d[11]),b=r(d[12]),k=r(d[13]);function S(t,n){if(null==t||null==n)return!0;if(t.length!==n.length)return!0;for(var o=0;o must be a child of a '),h.createElement(W,{opacity:E(t),transform:D(t)},this.props.children)}}]),f})(h.Component);F.contextTypes={isInSurface:p.bool.isRequired};var M=(function(s){function f(){return t(this,f),o(this,l(f).apply(this,arguments))}return u(f,s),n(f,[{key:"render",value:function(){var t=this.props,n=[N(t.x,0),N(t.y,0),N(t.width,0),N(t.height,0)],o=b(t);return delete o.x,delete o.y,h.createElement(W,{clipping:n,opacity:E(t),transform:D(o)},this.props.children)}}]),f})(h.Component),P=0,X=1,Y=2,O=3;function q(t,n,o){var l=new s(t);n[o+0]=l.red/255,n[o+1]=l.green/255,n[o+2]=l.blue/255,n[o+3]=l.alpha}function j(t,n,o){var l=0;if('length'in t)for(;lT?(X-=M,Y-=b):f>0&&0!=T&&(X-=f/T*M,Y-=f/T*b),l=X*X+Y*Y,(f=(X=o-t)*M+(Y=u-n)*b)>T?(X-=M,Y-=b):f>0&&0!=T&&(X-=f/T*M,Y-=f/T*b),v=X*X+Y*Y,l<.01&&v<.01)this.onLine(t,n,p,c);else{if(isNaN(l)||isNaN(v))throw new Error('Bad input');var k=.5*(s+o),w=.5*(h+u),_=.5*(s+t),D=.5*(h+n),z=.5*(_+k),C=.5*(D+w),B=.5*(p+o),A=.5*(c+u),L=.5*(B+k),I=.5*(A+w),P=.5*(z+L),N=.5*(C+I);this.onBezierCurve(t,n,_,D,z,C,P,N),this.onBezierCurve(P,N,L,I,B,A,p,c)}},onArc:function(t,n,s,h,o,u,p,c,l,v,X,Y){var f=Y?Y*Math.PI/180:0,M=Math.cos(f),b=Math.sin(f),T=M*p,k=-b*c,w=b*p,_=M*c,D=v-l;D<0&&!X?D+=2*Math.PI:D>0&&X&&(D-=2*Math.PI);for(var z=Math.ceil(Math.abs(D/(Math.PI/2))),C=D/z,B=1.3333333333333333*Math.tan(C/4),A=Math.cos(l),L=Math.sin(l),I=0;Ithis.yy/this.xy?-1:1;return(this.xx<0?this.xy>=0:this.xy<0)&&(x=-x),this.rotate(t-180*Math.atan2(x*this.yx,x*this.xx)/Math.PI,s,h)},scaleTo:function(t,s){var h=Math.sqrt(this.xx*this.xx+this.yx*this.yx);return this.xx/=h,this.yx/=h,h=Math.sqrt(this.yy*this.yy+this.xy*this.xy),this.yy/=h,this.xy/=h,this.scale(t,s)},resizeTo:function(t,s){var h=this.width,x=this.height;return h&&x?this.scaleTo(t/h,s/x):this},inversePoint:function(t,s){var h=this.xx,x=this.yx,y=this.xy,n=this.yy,o=this.x,u=this.y,f=x*y-h*n;return 0==f?null:{x:(n*(o-t)+y*(s-u))/f,y:(h*(u-s)+x*(t-o))/f}},point:function(t,s){return{x:this.xx*t+this.xy*s+this.x,y:this.yx*t+this.yy*s+this.y}}})},193,[191]); __d(function(g,r,i,a,m,e,d){'use strict';var s=r(d[0]),t={pointerEvents:!0,accessible:!0,accessibilityActions:!0,accessibilityLabel:!0,accessibilityLiveRegion:!0,accessibilityRole:!0,accessibilityStates:!0,accessibilityState:!0,accessibilityHint:!0,importantForAccessibility:!0,nativeID:!0,testID:!0,renderToHardwareTextureAndroid:!0,shouldRasterizeIOS:!0,onLayout:!0,onAccessibilityAction:!0,onAccessibilityTap:!0,onMagicTap:!0,onAccessibilityEscape:!0,collapsable:!0,needsOffscreenAlphaCompositing:!0,style:r(d[1])},c={UIView:t,RCTView:s({},t,{removeClippedSubviews:!0})};m.exports=c},194,[53,66]); __d(function(g,r,i,a,m,e,d){"use strict";var t=r(d[0]);m.exports=function(n,u){var c={};return t(c,n),t(c,u),c}},195,[196]); __d(function(g,r,i,a,m,e,d){"use strict";var t=r(d[0]),c=t.checkMergeObjectArg,n=t.checkMergeIntoObjectArg;m.exports=function(t,o){if(n(t),null!=o)for(var f in c(o),o)Object.prototype.hasOwnProperty.call(o,f)&&(t[f]=o[f])}},196,[197]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=function(t){return'object'!=typeof t||t instanceof Date||null===t},c={MAX_MERGE_DEPTH:36,isTerminal:n,normalizeMergeArg:function(t){return void 0===t||null===t?{}:t},checkMergeArrayArgs:function(n,c){t(Array.isArray(n)&&Array.isArray(c),'Tried to merge arrays, instead got %s and %s.',n,c)},checkMergeObjectArgs:function(t,n){c.checkMergeObjectArg(t),c.checkMergeObjectArg(n)},checkMergeObjectArg:function(c){t(!n(c)&&!Array.isArray(c),'Tried to merge an object, instead got %s.',c)},checkMergeIntoObjectArg:function(c){t(!(n(c)&&'function'!=typeof c||Array.isArray(c)),'Tried to merge into an object, instead got %s.',c)},checkMergeLevel:function(n){t(n<36,"Maximum deep merge depth exceeded. You may be attempting to merge circular structures in an unsupported way.")},checkArrayStrategy:function(n){t(void 0===n||n in c.ArrayStrategies,"You must provide an array strategy to deep merge functions to instruct the deep merge how to resolve merging two arrays.")},ArrayStrategies:{Clobber:'Clobber',Concat:'Concat',IndexByIndex:'IndexByIndex'}};m.exports=c},197,[16]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),s=r(d[1]),o=r(d[2]),n=r(d[3]),c=r(d[4]),u=r(d[5]),l=(r(d[6]),r(d[7])),b=r(d[8]),p=r(d[9]),x=(r(d[10]),r(d[11])),F=r(d[12]),h=r(d[13]),f=(function(t){function b(){return s(this,b),n(this,c(b).apply(this,arguments))}return u(b,t),o(b,[{key:"render",value:function(){var t=this.props,s=t.accessibilityLabel,o=t.color,n=t.onPress,c=t.touchSoundDisabled,u=t.title,b=t.hasTVPreferredFocus,f=t.nextFocusDown,y=t.nextFocusForward,v=t.nextFocusLeft,w=t.nextFocusRight,L=t.nextFocusUp,P=t.disabled,S=t.testID,E=[D.button],R=[D.text];o&&R.push({color:o});var T=[];P&&(E.push(D.buttonDisabled),R.push(D.textDisabled),T.push('disabled')),h('string'==typeof u,'The title prop of a Button must be a string');var A=u,I=x;return l.createElement(I,{accessibilityLabel:s,accessibilityRole:"button",accessibilityStates:T,hasTVPreferredFocus:b,nextFocusDown:f,nextFocusForward:y,nextFocusLeft:v,nextFocusRight:w,nextFocusUp:L,testID:S,disabled:P,onPress:n,touchSoundDisabled:c},l.createElement(F,{style:E},l.createElement(p,{style:R,disabled:P},A)))}}]),b})(l.Component),D=b.create({button:{},text:t({textAlign:'center',padding:8},{color:'#007AFF',fontSize:18}),buttonDisabled:{},textDisabled:{color:'#cdcdcd'}});m.exports=f},198,[53,4,5,6,9,10,57,59,62,199,214,215,90,16]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=r(d[1]),o=r(d[2]),s=r(d[3]),l=r(d[4]),u=r(d[5]),p=r(d[6]),c=r(d[7]),h=r(d[8]),f=r(d[9]),R=r(d[10]),H=r(d[11]),v=r(d[12]),T=r(d[13]),b=r(d[14]),S=r(d[15]),y=r(d[16]),w={top:20,left:20,right:20,bottom:30},x={validAttributes:c({},R.UIView,{isHighlighted:!0,numberOfLines:!0,ellipsizeMode:!0,allowFontScaling:!0,maxFontSizeMultiplier:!0,disabled:!0,selectable:!0,selectionColor:!0,adjustsFontSizeToFit:!0,minimumFontScale:!0,textBreakStrategy:!0,onTextLayout:!0,onInlineViewLayout:!0,dataDetectorType:!0}),directEventTypes:{topTextLayout:{registrationName:'onTextLayout'},topInlineViewLayout:{registrationName:'onInlineViewLayout'}},uiViewClassName:'RCTText'},C=(function(h){function R(){var n,o;t(this,R);for(var u=arguments.length,h=new Array(u),f=0;f4?p-4:0),l=4;l5?b-5:0),k=5;k4?s-4:0),p=4;p0,s=R&&R.length>0;return!_&&s?R[0]:_?t[0]:E}),T=N({NOT_RESPONDER:null,RESPONDER_INACTIVE_PRESS_IN:null,RESPONDER_INACTIVE_PRESS_OUT:null,RESPONDER_ACTIVE_PRESS_IN:null,RESPONDER_ACTIVE_PRESS_OUT:null,RESPONDER_ACTIVE_LONG_PRESS_IN:null,RESPONDER_ACTIVE_LONG_PRESS_OUT:null,ERROR:null}),u={NOT_RESPONDER:!1,RESPONDER_INACTIVE_PRESS_IN:!1,RESPONDER_INACTIVE_PRESS_OUT:!1,RESPONDER_ACTIVE_PRESS_IN:!1,RESPONDER_ACTIVE_PRESS_OUT:!1,RESPONDER_ACTIVE_LONG_PRESS_IN:!1,RESPONDER_ACTIVE_LONG_PRESS_OUT:!1,ERROR:!1},P=t({},u,{RESPONDER_ACTIVE_PRESS_OUT:!0,RESPONDER_ACTIVE_PRESS_IN:!0}),O=t({},u,{RESPONDER_INACTIVE_PRESS_IN:!0,RESPONDER_ACTIVE_PRESS_IN:!0,RESPONDER_ACTIVE_LONG_PRESS_IN:!0}),D=t({},u,{RESPONDER_ACTIVE_LONG_PRESS_IN:!0}),c=N({DELAY:null,RESPONDER_GRANT:null,RESPONDER_RELEASE:null,RESPONDER_TERMINATED:null,ENTER_PRESS_RECT:null,LEAVE_PRESS_RECT:null,LONG_PRESS_DETECTED:null}),A={NOT_RESPONDER:{DELAY:T.ERROR,RESPONDER_GRANT:T.RESPONDER_INACTIVE_PRESS_IN,RESPONDER_RELEASE:T.ERROR,RESPONDER_TERMINATED:T.ERROR,ENTER_PRESS_RECT:T.ERROR,LEAVE_PRESS_RECT:T.ERROR,LONG_PRESS_DETECTED:T.ERROR},RESPONDER_INACTIVE_PRESS_IN:{DELAY:T.RESPONDER_ACTIVE_PRESS_IN,RESPONDER_GRANT:T.ERROR,RESPONDER_RELEASE:T.NOT_RESPONDER,RESPONDER_TERMINATED:T.NOT_RESPONDER,ENTER_PRESS_RECT:T.RESPONDER_INACTIVE_PRESS_IN,LEAVE_PRESS_RECT:T.RESPONDER_INACTIVE_PRESS_OUT,LONG_PRESS_DETECTED:T.ERROR},RESPONDER_INACTIVE_PRESS_OUT:{DELAY:T.RESPONDER_ACTIVE_PRESS_OUT,RESPONDER_GRANT:T.ERROR,RESPONDER_RELEASE:T.NOT_RESPONDER,RESPONDER_TERMINATED:T.NOT_RESPONDER,ENTER_PRESS_RECT:T.RESPONDER_INACTIVE_PRESS_IN,LEAVE_PRESS_RECT:T.RESPONDER_INACTIVE_PRESS_OUT,LONG_PRESS_DETECTED:T.ERROR},RESPONDER_ACTIVE_PRESS_IN:{DELAY:T.ERROR,RESPONDER_GRANT:T.ERROR,RESPONDER_RELEASE:T.NOT_RESPONDER,RESPONDER_TERMINATED:T.NOT_RESPONDER,ENTER_PRESS_RECT:T.RESPONDER_ACTIVE_PRESS_IN,LEAVE_PRESS_RECT:T.RESPONDER_ACTIVE_PRESS_OUT,LONG_PRESS_DETECTED:T.RESPONDER_ACTIVE_LONG_PRESS_IN},RESPONDER_ACTIVE_PRESS_OUT:{DELAY:T.ERROR,RESPONDER_GRANT:T.ERROR,RESPONDER_RELEASE:T.NOT_RESPONDER,RESPONDER_TERMINATED:T.NOT_RESPONDER,ENTER_PRESS_RECT:T.RESPONDER_ACTIVE_PRESS_IN,LEAVE_PRESS_RECT:T.RESPONDER_ACTIVE_PRESS_OUT,LONG_PRESS_DETECTED:T.ERROR},RESPONDER_ACTIVE_LONG_PRESS_IN:{DELAY:T.ERROR,RESPONDER_GRANT:T.ERROR,RESPONDER_RELEASE:T.NOT_RESPONDER,RESPONDER_TERMINATED:T.NOT_RESPONDER,ENTER_PRESS_RECT:T.RESPONDER_ACTIVE_LONG_PRESS_IN,LEAVE_PRESS_RECT:T.RESPONDER_ACTIVE_LONG_PRESS_OUT,LONG_PRESS_DETECTED:T.RESPONDER_ACTIVE_LONG_PRESS_IN},RESPONDER_ACTIVE_LONG_PRESS_OUT:{DELAY:T.ERROR,RESPONDER_GRANT:T.ERROR,RESPONDER_RELEASE:T.NOT_RESPONDER,RESPONDER_TERMINATED:T.NOT_RESPONDER,ENTER_PRESS_RECT:T.RESPONDER_ACTIVE_LONG_PRESS_IN,LEAVE_PRESS_RECT:T.RESPONDER_ACTIVE_LONG_PRESS_OUT,LONG_PRESS_DETECTED:T.ERROR},error:{DELAY:T.NOT_RESPONDER,RESPONDER_GRANT:T.RESPONDER_INACTIVE_PRESS_IN,RESPONDER_RELEASE:T.NOT_RESPONDER,RESPONDER_TERMINATED:T.NOT_RESPONDER,ENTER_PRESS_RECT:T.NOT_RESPONDER,LEAVE_PRESS_RECT:T.NOT_RESPONDER,LONG_PRESS_DETECTED:T.NOT_RESPONDER}},I={componentDidMount:function(){_.isTV&&(this._tvEventHandler=new n,this._tvEventHandler.enable(this,function(E,t){var R=o.findNodeHandle(E);t.dispatchConfig={},R===t.tag&&('focus'===t.eventType?E.touchableHandleFocus(t):'blur'===t.eventType?E.touchableHandleBlur(t):'select'===t.eventType&&E.touchableHandlePress&&!E.props.disabled&&E.touchableHandlePress(t))}))},componentWillUnmount:function(){this._tvEventHandler&&(this._tvEventHandler.disable(),delete this._tvEventHandler),this.touchableDelayTimeout&&clearTimeout(this.touchableDelayTimeout),this.longPressDelayTimeout&&clearTimeout(this.longPressDelayTimeout),this.pressOutDelayTimeout&&clearTimeout(this.pressOutDelayTimeout)},touchableGetInitialState:function(){return{touchable:{touchState:void 0,responderID:null}}},touchableHandleResponderTerminationRequest:function(){return!this.props.rejectResponderTermination},touchableHandleStartShouldSetResponder:function(){return!this.props.disabled},touchableLongPressCancelsPress:function(){return!0},touchableHandleResponderGrant:function(E){var t=E.currentTarget;E.persist(),this.pressOutDelayTimeout&&clearTimeout(this.pressOutDelayTimeout),this.pressOutDelayTimeout=null,this.state.touchable.touchState=T.NOT_RESPONDER,this.state.touchable.responderID=t,this._receiveSignal(c.RESPONDER_GRANT,E);var R=void 0!==this.touchableGetHighlightDelayMS?Math.max(this.touchableGetHighlightDelayMS(),0):130;0!==(R=isNaN(R)?130:R)?this.touchableDelayTimeout=setTimeout(this._handleDelay.bind(this,E),R):this._handleDelay(E);var _=void 0!==this.touchableGetLongPressDelayMS?Math.max(this.touchableGetLongPressDelayMS(),10):370;_=isNaN(_)?370:_,this.longPressDelayTimeout=setTimeout(this._handleLongDelay.bind(this,E),_+R)},touchableHandleResponderRelease:function(E){this.pressInLocation=null,this._receiveSignal(c.RESPONDER_RELEASE,E)},touchableHandleResponderTerminate:function(E){this.pressInLocation=null,this._receiveSignal(c.RESPONDER_TERMINATED,E)},touchableHandleResponderMove:function(E){if(this.state.touchable.positionOnActivate){var t=this.state.touchable.positionOnActivate,R=this.state.touchable.dimensionsOnActivate,_=this.touchableGetPressRectOffset?this.touchableGetPressRectOffset():{left:20,right:20,top:20,bottom:20},s=_.left,o=_.top,S=_.right,n=_.bottom,l=this.touchableGetHitSlop?this.touchableGetHitSlop():null;l&&(s+=l.left||0,o+=l.top||0,S+=l.right||0,n+=l.bottom||0);var N=h(E.nativeEvent),u=N&&N.pageX,P=N&&N.pageY;if(this.pressInLocation)this._getDistanceBetweenPoints(u,P,this.pressInLocation.pageX,this.pressInLocation.pageY)>10&&this._cancelLongPressDelayTimeout();if(u>t.left-s&&P>t.top-o&&u2?f-2:0),u=2;u1&&void 0!==arguments[1]?arguments[1]:{}).iterations;return V},event:function(t,n){return null},createAnimatedComponent:E,attachNativeEvent:o,forkEvent:f.forkEvent,unforkEvent:f.unforkEvent,Event:u,__PropsOnlyForTests:s}},217,[53,218,227,220,221,233,219,238,246]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),s=r(d[2]),v=r(d[3]),o=r(d[4]),c=r(d[5]),_=r(d[3]).shouldUseNativeDriver;function l(t,n,_){var l=[];c(_[0]&&_[0].nativeEvent,'Native driven events only support animated values contained inside `nativeEvent`.'),(function t(n,v){if(n instanceof s)n.__makeNative(),l.push({nativeEventPath:v,animatedValueTag:n.__getNativeTag()});else if('object'==typeof n)for(var o in n)t(n[o],v.concat(o))})(_[0].nativeEvent,[]);var h=o.findNodeHandle(t);return l.forEach(function(t){v.API.addAnimatedEventToView(h,n,t)}),{detach:function(){l.forEach(function(t){v.API.removeAnimatedEventFromView(h,n,t.animatedValueTag)})}}}var h=(function(){function v(n){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,v),this._listeners=[],this._argMapping=n,s.listener&&this.__addListener(s.listener),this._callListeners=this._callListeners.bind(this),this._attachedEvent=null,this.__isNative=_(s)}return n(v,[{key:"__addListener",value:function(t){this._listeners.push(t)}},{key:"__removeListener",value:function(t){this._listeners=this._listeners.filter(function(n){return n!==t})}},{key:"__attach",value:function(t,n){c(this.__isNative,'Only native driven events need to be attached.'),this._attachedEvent=l(t,n,this._argMapping)}},{key:"__detach",value:function(t,n){c(this.__isNative,'Only native driven events need to be detached.'),this._attachedEvent&&this._attachedEvent.detach()}},{key:"__getHandler",value:function(){var t=this;return this.__isNative?this._callListeners:function(){for(var n=arguments.length,v=new Array(n),o=0;oo){if('identity'===f)return c;'clamp'===f&&(c=o)}return u===p?u:n===o?t<=n?u:p:(n===-1/0?c=-c:o===1/0?c-=n:c=(c-n)/(o-n),c=l(c),u===-1/0?c=-c:p===1/0?c+=u:c=c*(p-u)+u,c)}function x(t){var n=_(t);return null===n?t:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var k=/[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/g;function b(t){var n=t.outputRange;s(n.length>=2,'Bad output range'),C(n=n.map(x));var o=n[0].match(k).map(function(){return[]});n.forEach(function(t){t.match(k).forEach(function(t,n){o[n].push(+t)})});var u,p=n[0].match(k).map(function(n,u){return y(h({},t,{outputRange:o[u]}))}),l='string'==typeof(u=n[0])&&u.startsWith('rgb');return function(t){var o=0;return n[0].replace(k,function(){var n=+p[o++](t);return l&&(n=o<4?Math.round(n):Math.round(1e3*n)/1e3),String(n)})}}function C(t){for(var n=t[0].replace(k,''),o=1;o=t);++o);return o-1}function N(t){s(t.length>=2,'inputRange must have at least 2 elements');for(var n=1;n=t[n-1],'inputRange must be monotonically non-decreasing '+t)}function w(t,n){s(n.length>=2,t+' must have at least 2 elements'),s(2!==n.length||n[0]!==-1/0||n[1]!==1/0,t+'cannot be ]-infinity;+infinity[ '+n)}var D=(function(h){function _(n,p){var l;return t(this,_),(l=o(this,u(_).call(this)))._parent=n,l._config=p,l._interpolation=y(p),l}return l(_,f),n(_,[{key:"__makeNative",value:function(){this._parent.__makeNative(),p(u(_.prototype),"__makeNative",this).call(this)}},{key:"__getValue",value:function(){var t=this._parent.__getValue();return s('number'==typeof t,'Cannot interpolate an input which is not a number.'),this._interpolation(t)}},{key:"interpolate",value:function(t){return new _(this,t)}},{key:"__attach",value:function(){this._parent.__addChild(this)}},{key:"__detach",value:function(){this._parent.__removeChild(this),p(u(_.prototype),"__detach",this).call(this)}},{key:"__transformDataType",value:function(t){return t.map(c.transformDataType)}},{key:"__getNativeConfig",value:function(){return{inputRange:this._config.inputRange,outputRange:this.__transformDataType(this._config.outputRange),extrapolateLeft:this._config.extrapolateLeft||this._config.extrapolate||'extend',extrapolateRight:this._config.extrapolateRight||this._config.extrapolate||'extend',type:'interpolation'}}}]),_})();D.__createInterpolation=y,m.exports=D},220,[4,5,6,9,46,10,53,221,224,222,16,69]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),s=r(d[2]),_=s.API,u=r(d[3]),o=1,v=(function(){function v(){t(this,v),this._listeners={}}return n(v,[{key:"__attach",value:function(){}},{key:"__detach",value:function(){this.__isNative&&null!=this.__nativeTag&&(s.API.dropAnimatedNode(this.__nativeTag),this.__nativeTag=void 0)}},{key:"__getValue",value:function(){}},{key:"__getAnimatedValue",value:function(){return this.__getValue()}},{key:"__addChild",value:function(t){}},{key:"__removeChild",value:function(t){}},{key:"__getChildren",value:function(){return[]}}]),n(v,[{key:"__makeNative",value:function(){if(!this.__isNative)throw new Error('This node cannot be made a "native" animated node');this.hasListeners()&&this._startListeningToNativeValueUpdates()}},{key:"addListener",value:function(t){var n=String(o++);return this._listeners[n]=t,this.__isNative&&this._startListeningToNativeValueUpdates(),n}},{key:"removeListener",value:function(t){delete this._listeners[t],this.__isNative&&!this.hasListeners()&&this._stopListeningForNativeValueUpdates()}},{key:"removeAllListeners",value:function(){this._listeners={},this.__isNative&&this._stopListeningForNativeValueUpdates()}},{key:"hasListeners",value:function(){return!!Object.keys(this._listeners).length}},{key:"_startListeningToNativeValueUpdates",value:function(){var t=this;this.__nativeAnimatedValueListener&&!this.__shouldUpdateListenersForNewNativeTag||(this.__shouldUpdateListenersForNewNativeTag&&(this.__shouldUpdateListenersForNewNativeTag=!1,this._stopListeningForNativeValueUpdates()),_.startListeningToAnimatedNodeValue(this.__getNativeTag()),this.__nativeAnimatedValueListener=s.nativeEventEmitter.addListener('onAnimatedValueUpdate',function(n){n.tag===t.__getNativeTag()&&t._onAnimatedValueUpdateReceived(n.value)}))}},{key:"_onAnimatedValueUpdateReceived",value:function(t){this.__callListeners(t)}},{key:"__callListeners",value:function(t){for(var n in this._listeners)this._listeners[n]({value:t})}},{key:"_stopListeningForNativeValueUpdates",value:function(){this.__nativeAnimatedValueListener&&(this.__nativeAnimatedValueListener.remove(),this.__nativeAnimatedValueListener=null,_.stopListeningToAnimatedNodeValue(this.__getNativeTag()))}},{key:"__getNativeTag",value:function(){if(s.assertNativeAnimatedModule(),u(this.__isNative,'Attempt to get native tag from node not marked as "native"'),null==this.__nativeTag){var t=s.generateNewNodeTag();this.__nativeTag=t,s.API.createAnimatedNode(t,this.__getNativeConfig()),this.__shouldUpdateListenersForNewNativeTag=!0}return this.__nativeTag}},{key:"__getNativeConfig",value:function(){throw new Error('This JS animated node type cannot be used as native animated node')}},{key:"toJSON",value:function(){return this.__getValue()}}]),v})();m.exports=v},221,[4,5,222,16]); __d(function(g,r,i,a,m,e,d){'use strict';var t,n=r(d[0]),o=n(r(d[1])),l=n(r(d[2])),u=n(r(d[3])),s=1,f=1,v=!1,c=[],N={enableQueue:function(){v=!0},disableQueue:function(){(0,u.default)(l.default,'Native animated module is not available'),v=!1;for(var t=0,n=c.length;t=t.length)break;l=t[n++]}else{if((n=t.next()).done)break;l=n.value}var o=l;o.__makeNative(),c.API.connectAnimatedNodes(this.__getNativeTag(),o.__getNativeTag())}}h(s(u.prototype),"__makeNative",this).call(this)}},{key:"__addChild",value:function(t){0===this._children.length&&this.__attach(),this._children.push(t),this.__isNative&&(t.__makeNative(),c.API.connectAnimatedNodes(this.__getNativeTag(),t.__getNativeTag()))}},{key:"__removeChild",value:function(t){var _=this._children.indexOf(t);-1!==_?(this.__isNative&&t.__isNative&&c.API.disconnectAnimatedNodes(this.__getNativeTag(),t.__getNativeTag()),this._children.splice(_,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")}},{key:"__getChildren",value:function(){return this._children}},{key:"__callListeners",value:function(t){if(h(s(u.prototype),"__callListeners",this).call(this,t),!this.__isNative){var _=this._children,n=Array.isArray(_),l=0;for(_=n?_:_["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(n){if(l>=_.length)break;o=_[l++]}else{if((l=_.next()).done)break;o=l.value}var c=o;c.__getValue&&c.__callListeners(c.__getValue())}}}}]),u})();m.exports=v},224,[4,5,6,9,46,10,221,222]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=r(d[1]),o=r(d[2]),c=(r(d[3]),r(d[4])),s=r(d[5]),u=new t,l={Events:s({interactionStart:!0,interactionComplete:!0}),runAfterInteractions:function(n){var t=[],o=new Promise(function(o){k(),n&&t.push(n),t.push({run:o,name:'resolve '+(n&&n.name||'?')}),h.enqueueTasks(t)});return{then:o.then.bind(o),done:function(){if(o.done)return o.done.apply(o,arguments);console.warn('Tried to call done when not supported by current Promise implementation.')},cancel:function(){h.cancelTasks(t)}}},createInteractionHandle:function(){k();var n=++T;return p.add(n),n},clearInteractionHandle:function(n){c(!!n,'InteractionManager: Must provide a handle to clear.'),k(),p.delete(n),v.add(n)},addListener:u.addListener.bind(u),setDeadline:function(n){E=n}},f=new Set,p=new Set,v=new Set,h=new o({onMoreTasks:k}),w=0,T=0,E=-1;function k(){w||(w=E>0?setTimeout(I,0):setImmediate(I))}function I(){w=0;var t=f.size;p.forEach(function(n){return f.add(n)}),v.forEach(function(n){return f.delete(n)});var o=f.size;if(0!==t&&0===o?u.emit(l.Events.interactionComplete):0===t&&0!==o&&u.emit(l.Events.interactionStart),0===o)for(;h.hasTasksToProcess();)if(h.processNext(),E>0&&n.getEventLoopRunningTime()>=E){k();break}p.clear(),v.clear()}m.exports=l},225,[29,48,226,156,16,211]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),u=r(d[1]),s=r(d[2]),n=(r(d[3]),r(d[4])),o=(function(){function o(t){var s=t.onMoreTasks;u(this,o),this._onMoreTasks=s,this._queueStack=[{tasks:[],popable:!1}]}return s(o,[{key:"enqueue",value:function(t){this._getCurrentQueue().push(t)}},{key:"enqueueTasks",value:function(t){var u=this;t.forEach(function(t){return u.enqueue(t)})}},{key:"cancelTasks",value:function(u){this._queueStack=this._queueStack.map(function(s){return t({},s,{tasks:s.tasks.filter(function(t){return-1===u.indexOf(t)})})}).filter(function(t,u){return t.tasks.length>0||0===u})}},{key:"hasTasksToProcess",value:function(){return this._getCurrentQueue().length>0}},{key:"processNext",value:function(){var t=this._getCurrentQueue();if(t.length){var u=t.shift();try{u.gen?this._genPromise(u):u.run?u.run():(n('function'==typeof u,'Expected Function, SimpleTask, or PromiseTask, but got:\n'+JSON.stringify(u,null,2)),u())}catch(t){throw t.message='TaskQueue: Error with task '+(u.name||'')+': '+t.message,t}}}},{key:"_getCurrentQueue",value:function(){var t=this._queueStack.length-1,u=this._queueStack[t];return u.popable&&0===u.tasks.length&&this._queueStack.length>1?(this._queueStack.pop(),this._getCurrentQueue()):u.tasks}},{key:"_genPromise",value:function(t){var u=this;this._queueStack.push({tasks:[],popable:!1});var s=this._queueStack.length-1;t.gen().then(function(){u._queueStack[s].popable=!0,u.hasTasksToProcess()&&u._onMoreTasks()}).catch(function(u){throw u.message="TaskQueue: Error resolving Promise in task "+t.name+": "+u.message,u}).done()}}]),o})();m.exports=o},226,[53,4,5,156,16]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=r(d[1]),o=t.AnimatedEvent,u=t.attachNativeEvent,s=r(d[2]),c=r(d[3]),f=r(d[4]),v=r(d[5]),p=r(d[6]),l=r(d[7]),h=r(d[8]),_=r(d[9]),N=r(d[10]),w=r(d[11]),E=r(d[12]),y=r(d[13]),D=r(d[14]),L=r(d[15]),A=r(d[16]),U=r(d[17]),k=function(n,t){return n&&t.onComplete?function(){t.onComplete&&t.onComplete.apply(t,arguments),n&&n.apply(void 0,arguments)}:n||t.onComplete},V=function(t,o,u){if(t instanceof y){var s=n({},o),c=n({},o);for(var f in o){var v=o[f],p=v.x,l=v.y;void 0!==p&&void 0!==l&&(s[f]=p,c[f]=l)}var h=u(t.x,s),_=u(t.y,c);return x([h,_],{stopTogether:!1})}return null},C=function t(o,u){var s=function(n,t,o){o=k(o,t);var u=n,s=t;u.stopTracking(),t.toValue instanceof h?u.track(new w(u,t.toValue,A,s,o)):u.animate(new A(s),o)};return V(o,u,t)||{start:function(n){s(o,u,n)},stop:function(){o.stopAnimation()},reset:function(){o.resetAnimation()},_startNativeLoop:function(t){var c=n({},u,{iterations:t});s(o,c)},_isUsingNativeDriver:function(){return u.useNativeDriver||!1}}},T=function(n){var t=0;return{start:function(o){0===n.length?o&&o({finished:!0}):n[t].start(function u(s){s.finished&&++t!==n.length?n[t].start(u):o&&o(s)})},stop:function(){t1&&void 0!==arguments[1]?arguments[1]:{},o=t.iterations,u=void 0===o?-1:o,s=t.resetBeforeIteration,c=void 0===s||s,f=!1,v=0;return{start:function(t){n&&0!==u?n._isUsingNativeDriver()?n._startNativeLoop(u):(function o(){var s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{finished:!0};f||v===u||!1===s.finished?t&&t(s):(v++,c&&n.reset(),n.start(o))})():t&&t({finished:!0})},stop:function(){f=!0,n.stop()},reset:function(){v=0,f=!1,n.reset()},_startNativeLoop:function(){throw new Error('Loops run using the native driver cannot contain Animated.loop animations')},_isUsingNativeDriver:function(){return n._isUsingNativeDriver()}}},event:function(n,t){var u=new o(n,t);return u.__isNative?u:u.__getHandler()},createAnimatedComponent:U,attachNativeEvent:u,forkEvent:function(n,t){return n?n instanceof o?(n.__addListener(t),n):function(){'function'==typeof n&&n.apply(void 0,arguments),t.apply(void 0,arguments)}:t},unforkEvent:function(n,t){n&&n instanceof o&&n.__removeListener(t)},Event:o,__PropsOnlyForTests:_}},227,[53,218,228,229,230,220,231,232,221,233,236,237,219,238,239,241,243,246]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),_=r(d[1]),n=r(d[2]),h=r(d[3]),u=r(d[4]),s=r(d[5]),o=r(d[6]),l=(r(d[7]),r(d[8])),v=r(d[9]),c=(function(c){function f(_,u){var s;return t(this,f),(s=n(this,h(f).call(this)))._a='number'==typeof _?new l(_):_,s._b='number'==typeof u?new l(u):u,s}return s(f,v),_(f,[{key:"__makeNative",value:function(){this._a.__makeNative(),this._b.__makeNative(),u(h(f.prototype),"__makeNative",this).call(this)}},{key:"__getValue",value:function(){return this._a.__getValue()+this._b.__getValue()}},{key:"interpolate",value:function(t){return new o(this,t)}},{key:"__attach",value:function(){this._a.__addChild(this),this._b.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this),this._b.__removeChild(this),u(h(f.prototype),"__detach",this).call(this)}},{key:"__getNativeConfig",value:function(){return{type:'addition',input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}}}]),f})();m.exports=c},228,[4,5,6,9,46,10,220,221,219,224]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),_=r(d[1]),n=r(d[2]),u=r(d[3]),h=r(d[4]),s=r(d[5]),l=r(d[6]),v=(r(d[7]),r(d[8])),c=(function(c){function o(_,h,s){var l;return t(this,o),(l=n(this,u(o).call(this)))._a=_,l._min=h,l._max=s,l._value=l._lastValue=l._a.__getValue(),l}return s(o,v),_(o,[{key:"__makeNative",value:function(){this._a.__makeNative(),h(u(o.prototype),"__makeNative",this).call(this)}},{key:"interpolate",value:function(t){return new l(this,t)}},{key:"__getValue",value:function(){var t=this._a.__getValue(),_=t-this._lastValue;return this._lastValue=t,this._value=Math.min(Math.max(this._value+_,this._min),this._max),this._value}},{key:"__attach",value:function(){this._a.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this),h(u(o.prototype),"__detach",this).call(this)}},{key:"__getNativeConfig",value:function(){return{type:'diffclamp',input:this._a.__getNativeTag(),min:this._min,max:this._max}}}]),o})();m.exports=c},229,[4,5,6,9,46,10,220,221,224]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),_=r(d[1]),n=r(d[2]),h=r(d[3]),s=r(d[4]),o=r(d[5]),u=r(d[6]),l=(r(d[7]),r(d[8])),v=r(d[9]),c=(function(c){function f(_,s){var o;return t(this,f),(o=n(this,h(f).call(this)))._a='number'==typeof _?new l(_):_,o._b='number'==typeof s?new l(s):s,o}return o(f,v),_(f,[{key:"__makeNative",value:function(){this._a.__makeNative(),this._b.__makeNative(),s(h(f.prototype),"__makeNative",this).call(this)}},{key:"__getValue",value:function(){var t=this._a.__getValue(),_=this._b.__getValue();return 0===_&&console.error('Detected division by zero in AnimatedDivision'),t/_}},{key:"interpolate",value:function(t){return new u(this,t)}},{key:"__attach",value:function(){this._a.__addChild(this),this._b.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this),this._b.__removeChild(this),s(h(f.prototype),"__detach",this).call(this)}},{key:"__getNativeConfig",value:function(){return{type:'division',input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}}}]),f})();m.exports=c},230,[4,5,6,9,46,10,220,221,219,224]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),u=r(d[1]),_=r(d[2]),s=r(d[3]),n=r(d[4]),h=r(d[5]),l=r(d[6]),o=(r(d[7]),r(d[8])),c=(function(c){function v(u,n){var h;return t(this,v),(h=_(this,s(v).call(this)))._a=u,h._modulus=n,h}return h(v,o),u(v,[{key:"__makeNative",value:function(){this._a.__makeNative(),n(s(v.prototype),"__makeNative",this).call(this)}},{key:"__getValue",value:function(){return(this._a.__getValue()%this._modulus+this._modulus)%this._modulus}},{key:"interpolate",value:function(t){return new l(this,t)}},{key:"__attach",value:function(){this._a.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this),n(s(v.prototype),"__detach",this).call(this)}},{key:"__getNativeConfig",value:function(){return{type:'modulus',input:this._a.__getNativeTag(),modulus:this._modulus}}}]),v})();m.exports=c},231,[4,5,6,9,46,10,220,221,224]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),_=r(d[1]),n=r(d[2]),h=r(d[3]),u=r(d[4]),s=r(d[5]),l=r(d[6]),o=(r(d[7]),r(d[8])),c=r(d[9]),v=(function(v){function f(_,u){var s;return t(this,f),(s=n(this,h(f).call(this)))._a='number'==typeof _?new o(_):_,s._b='number'==typeof u?new o(u):u,s}return s(f,c),_(f,[{key:"__makeNative",value:function(){this._a.__makeNative(),this._b.__makeNative(),u(h(f.prototype),"__makeNative",this).call(this)}},{key:"__getValue",value:function(){return this._a.__getValue()*this._b.__getValue()}},{key:"interpolate",value:function(t){return new l(this,t)}},{key:"__attach",value:function(){this._a.__addChild(this),this._b.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this),this._b.__removeChild(this),u(h(f.prototype),"__detach",this).call(this)}},{key:"__getNativeConfig",value:function(){return{type:'multiplication',input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}}}]),f})();m.exports=v},232,[4,5,6,9,46,10,220,221,219,224]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),_=r(d[2]),s=r(d[3]),o=r(d[4]),c=r(d[5]),v=r(d[6]),h=r(d[7]).AnimatedEvent,l=r(d[8]),p=r(d[9]),u=r(d[10]),f=r(d[11]),N=r(d[12]),V=(function(V){function k(_,c){var v;return n(this,k),v=s(this,o(k).call(this)),_.style&&(_=t({},_,{style:new p(_.style)})),v._props=_,v._callback=c,v.__attach(),v}return v(k,l),_(k,[{key:"__getValue",value:function(){var t={};for(var n in this._props){var _=this._props[n];_ instanceof l?(!_.__isNative||_ instanceof p)&&(t[n]=_.__getValue()):t[n]=_ instanceof h?_.__getHandler():_}return t}},{key:"__getAnimatedValue",value:function(){var t={};for(var n in this._props){var _=this._props[n];_ instanceof l&&(t[n]=_.__getAnimatedValue())}return t}},{key:"__attach",value:function(){for(var t in this._props){var n=this._props[t];n instanceof l&&n.__addChild(this)}}},{key:"__detach",value:function(){for(var t in this.__isNative&&this._animatedView&&this.__disconnectAnimatedView(),this._props){var n=this._props[t];n instanceof l&&n.__removeChild(this)}c(o(k.prototype),"__detach",this).call(this)}},{key:"update",value:function(){this._callback()}},{key:"__makeNative",value:function(){if(!this.__isNative){for(var t in this.__isNative=!0,this._props){var n=this._props[t];n instanceof l&&n.__makeNative()}this._animatedView&&this.__connectAnimatedView()}}},{key:"setNativeView",value:function(t){this._animatedView!==t&&(this._animatedView=t,this.__isNative&&this.__connectAnimatedView())}},{key:"__connectAnimatedView",value:function(){N(this.__isNative,'Expected node to be marked as "native"');var t=f.findNodeHandle(this._animatedView);N(null!=t,'Unable to locate attached view in the native tree'),u.API.connectAnimatedNodeToView(this.__getNativeTag(),t)}},{key:"__disconnectAnimatedView",value:function(){N(this.__isNative,'Expected node to be marked as "native"');var t=f.findNodeHandle(this._animatedView);N(null!=t,'Unable to locate attached view in the native tree'),u.API.disconnectAnimatedNodeFromView(this.__getNativeTag(),t)}},{key:"__getNativeConfig",value:function(){var t={};for(var n in this._props){var _=this._props[n];_ instanceof l&&(_.__makeNative(),t[n]=_.__getNativeTag())}return{type:'props',props:t}}}]),k})();m.exports=V},233,[53,4,5,6,9,46,10,218,221,234,222,92,16]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),s=r(d[2]),l=r(d[3]),_=r(d[4]),y=r(d[5]),o=r(d[6]),u=r(d[7]),v=r(d[8]),f=r(d[9]),h=r(d[10]),c=r(d[11]),k=(function(k){function A(s){var y;return n(this,A),y=l(this,_(A).call(this)),(s=c(s)||{}).transform&&(s=t({},s,{transform:new v(s.transform)})),y._style=s,y}return o(A,f),s(A,[{key:"_walkStyleAndGetValues",value:function(t){var n={};for(var s in t){var l=t[s];l instanceof u?l.__isNative||(n[s]=l.__getValue()):l&&!Array.isArray(l)&&'object'==typeof l?n[s]=this._walkStyleAndGetValues(l):n[s]=l}return n}},{key:"__getValue",value:function(){return this._walkStyleAndGetValues(this._style)}},{key:"_walkStyleAndGetAnimatedValues",value:function(t){var n={};for(var s in t){var l=t[s];l instanceof u?n[s]=l.__getAnimatedValue():l&&!Array.isArray(l)&&'object'==typeof l&&(n[s]=this._walkStyleAndGetAnimatedValues(l))}return n}},{key:"__getAnimatedValue",value:function(){return this._walkStyleAndGetAnimatedValues(this._style)}},{key:"__attach",value:function(){for(var t in this._style){var n=this._style[t];n instanceof u&&n.__addChild(this)}}},{key:"__detach",value:function(){for(var t in this._style){var n=this._style[t];n instanceof u&&n.__removeChild(this)}y(_(A.prototype),"__detach",this).call(this)}},{key:"__makeNative",value:function(){for(var t in this._style){var n=this._style[t];n instanceof u&&n.__makeNative()}y(_(A.prototype),"__makeNative",this).call(this)}},{key:"__getNativeConfig",value:function(){var t={};for(var n in this._style)if(this._style[n]instanceof u){var s=this._style[n];s.__makeNative(),t[n]=s.__getNativeTag()}return h.validateStyles(t),{type:'style',style:t}}}]),A})();m.exports=k},234,[53,4,5,6,9,46,10,221,235,224,222,89]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]),f=r(d[4]),_=r(d[5]),u=r(d[6]),c=r(d[7]),v=r(d[8]),h=(function(h){function l(n){var f;return t(this,l),(f=o(this,s(l).call(this)))._transforms=n,f}return _(l,c),n(l,[{key:"__makeNative",value:function(){this._transforms.forEach(function(t){for(var n in t){var o=t[n];o instanceof u&&o.__makeNative()}}),f(s(l.prototype),"__makeNative",this).call(this)}},{key:"__getValue",value:function(){return this._transforms.map(function(t){var n={};for(var o in t){var s=t[o];n[o]=s instanceof u?s.__getValue():s}return n})}},{key:"__getAnimatedValue",value:function(){return this._transforms.map(function(t){var n={};for(var o in t){var s=t[o];n[o]=s instanceof u?s.__getAnimatedValue():s}return n})}},{key:"__attach",value:function(){var t=this;this._transforms.forEach(function(n){for(var o in n){var s=n[o];s instanceof u&&s.__addChild(t)}})}},{key:"__detach",value:function(){var t=this;this._transforms.forEach(function(n){for(var o in n){var s=n[o];s instanceof u&&s.__removeChild(t)}}),f(s(l.prototype),"__detach",this).call(this)}},{key:"__getNativeConfig",value:function(){var t=[];return this._transforms.forEach(function(n){for(var o in n){var s=n[o];s instanceof u?t.push({type:'animated',property:o,nodeTag:s.__getNativeTag()}):t.push({type:'static',property:o,value:v.transformDataType(s)})}}),v.validateTransform(t),{type:'transform',transforms:t}}}]),l})();m.exports=h},235,[4,5,6,9,46,10,221,224,222]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),_=r(d[1]),n=r(d[2]),h=r(d[3]),u=r(d[4]),s=r(d[5]),o=r(d[6]),l=(r(d[7]),r(d[8])),c=r(d[9]),v=(function(v){function f(_,u){var s;return t(this,f),(s=n(this,h(f).call(this)))._a='number'==typeof _?new l(_):_,s._b='number'==typeof u?new l(u):u,s}return s(f,c),_(f,[{key:"__makeNative",value:function(){this._a.__makeNative(),this._b.__makeNative(),u(h(f.prototype),"__makeNative",this).call(this)}},{key:"__getValue",value:function(){return this._a.__getValue()-this._b.__getValue()}},{key:"interpolate",value:function(t){return new o(this,t)}},{key:"__attach",value:function(){this._a.__addChild(this),this._b.__addChild(this)}},{key:"__detach",value:function(){this._a.__removeChild(this),this._b.__removeChild(this),u(h(f.prototype),"__detach",this).call(this)}},{key:"__getNativeConfig",value:function(){return{type:'subtraction',input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}}}]),f})();m.exports=v},236,[4,5,6,9,46,10,220,221,219,224]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),_=r(d[2]),s=r(d[3]),o=r(d[4]),u=r(d[5]),l=r(d[6]),h=(r(d[7]),r(d[8])),v=r(d[9]),c=v.generateNewAnimationId,f=v.shouldUseNativeDriver,k=(function(v){function k(t,_,u,l,h){var v;return n(this,k),(v=s(this,o(k).call(this)))._value=t,v._parent=_,v._animationClass=u,v._animationConfig=l,v._useNativeDriver=f(l),v._callback=h,v.__attach(),v}return l(k,h),_(k,[{key:"__makeNative",value:function(){this.__isNative=!0,this._parent.__makeNative(),u(o(k.prototype),"__makeNative",this).call(this),this._value.__makeNative()}},{key:"__getValue",value:function(){return this._parent.__getValue()}},{key:"__attach",value:function(){this._parent.__addChild(this),this._useNativeDriver&&this.__makeNative()}},{key:"__detach",value:function(){this._parent.__removeChild(this),u(o(k.prototype),"__detach",this).call(this)}},{key:"update",value:function(){this._value.animate(new this._animationClass(t({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)}},{key:"__getNativeConfig",value:function(){var n=new this._animationClass(t({},this._animationConfig,{toValue:void 0})).__getNativeAnimationConfig();return{type:'tracking',animationId:c(),animationConfig:n,toValue:this._parent.__getNativeTag(),value:this._value.__getNativeTag()}}}]),k})();m.exports=k},237,[53,4,5,6,9,46,10,219,221,222]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),s=r(d[1]),n=r(d[2]),u=r(d[3]),l=r(d[4]),f=r(d[5]),o=r(d[6]),y=r(d[7]),h=1,x=(function(x){function c(s){var l;t(this,c),l=n(this,u(c).call(this));var o=s||{x:0,y:0};return'number'==typeof o.x&&'number'==typeof o.y?(l.x=new f(o.x),l.y=new f(o.y)):(y(o.x instanceof f&&o.y instanceof f,"AnimatedValueXY must be initialized with an object of numbers or AnimatedValues."),l.x=o.x,l.y=o.y),l._listeners={},l}return l(c,o),s(c,[{key:"setValue",value:function(t){this.x.setValue(t.x),this.y.setValue(t.y)}},{key:"setOffset",value:function(t){this.x.setOffset(t.x),this.y.setOffset(t.y)}},{key:"flattenOffset",value:function(){this.x.flattenOffset(),this.y.flattenOffset()}},{key:"extractOffset",value:function(){this.x.extractOffset(),this.y.extractOffset()}},{key:"__getValue",value:function(){return{x:this.x.__getValue(),y:this.y.__getValue()}}},{key:"resetAnimation",value:function(t){this.x.resetAnimation(),this.y.resetAnimation(),t&&t(this.__getValue())}},{key:"stopAnimation",value:function(t){this.x.stopAnimation(),this.y.stopAnimation(),t&&t(this.__getValue())}},{key:"addListener",value:function(t){var s=this,n=String(h++),u=function(n){n.value;t(s.__getValue())};return this._listeners[n]={x:this.x.addListener(u),y:this.y.addListener(u)},n}},{key:"removeListener",value:function(t){this.x.removeListener(this._listeners[t].x),this.y.removeListener(this._listeners[t].y),delete this._listeners[t]}},{key:"removeAllListeners",value:function(){this.x.removeAllListeners(),this.y.removeAllListeners(),this._listeners={}}},{key:"getLayout",value:function(){return{left:this.x,top:this.y}}},{key:"getTranslateTransform",value:function(){return[{translateX:this.x},{translateY:this.y}]}}]),c})();m.exports=x},238,[4,5,6,9,10,219,224,16]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),_=r(d[4]),h=r(d[5]),l=r(d[6]),c=r(d[7]).shouldUseNativeDriver,u=(function(u){function v(n){var _,h,l,u;return t(this,v),(u=s(this,o(v).call(this)))._deceleration=null!=(_=n.deceleration)?_:.998,u._velocity=n.velocity,u._useNativeDriver=c(n),u.__isInteraction=null!=(h=n.isInteraction)?h:!u._useNativeDriver,u.__iterations=null!=(l=n.iterations)?l:1,u}return h(v,l),n(v,[{key:"__getNativeAnimationConfig",value:function(){return{type:'decay',deceleration:this._deceleration,velocity:this._velocity,iterations:this.__iterations}}},{key:"start",value:function(t,n,s,o,_){this.__active=!0,this._lastValue=t,this._fromValue=t,this._onUpdate=n,this.__onEnd=s,this._startTime=Date.now(),this._useNativeDriver?this.__startNativeAnimation(_):this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))}},{key:"onUpdate",value:function(){var t=Date.now(),n=this._fromValue+this._velocity/(1-this._deceleration)*(1-Math.exp(-(1-this._deceleration)*(t-this._startTime)));this._onUpdate(n),Math.abs(this._lastValue-n)<.1?this.__debouncedOnEnd({finished:!0}):(this._lastValue=n,this.__active&&(this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))))}},{key:"stop",value:function(){_(o(v.prototype),"stop",this).call(this),this.__active=!1,g.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),v})();m.exports=u},239,[4,5,6,9,46,10,240,222]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=r(d[1]),o=r(d[2]),_=(function(){function _(){n(this,_)}return t(_,[{key:"start",value:function(n,t,o,_,u){}},{key:"stop",value:function(){this.__nativeId&&o.API.stopAnimation(this.__nativeId)}},{key:"__getNativeAnimationConfig",value:function(){throw new Error('This animation type cannot be offloaded to native')}},{key:"__debouncedOnEnd",value:function(n){var t=this.__onEnd;this.__onEnd=null,t&&t(n)}},{key:"__startNativeAnimation",value:function(n){o.API.enableQueue(),n.__makeNative(),o.API.disableQueue(),this.__nativeId=o.generateNewAnimationId(),o.API.startAnimatingNode(this.__nativeId,n.__getNativeTag(),this.__getNativeAnimationConfig(),this.__debouncedOnEnd.bind(this))}}]),_})();m.exports=_},240,[4,5,222]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),s=r(d[1]),n=r(d[2]),o=r(d[3]),l=r(d[4]),h=r(d[5]),_=(r(d[6]),r(d[7]),r(d[8])),u=r(d[9]),f=r(d[10]),c=r(d[11]).shouldUseNativeDriver,v=(function(v){function p(s){var l,h,_,v,y,V,T,b,M,D,P,S;if(t(this,p),(M=n(this,o(p).call(this)))._overshootClamping=null!=(l=s.overshootClamping)&&l,M._restDisplacementThreshold=null!=(h=s.restDisplacementThreshold)?h:.001,M._restSpeedThreshold=null!=(_=s.restSpeedThreshold)?_:.001,M._initialVelocity=null!=(v=s.velocity)?v:0,M._lastVelocity=null!=(y=s.velocity)?y:0,M._toValue=s.toValue,M._delay=null!=(V=s.delay)?V:0,M._useNativeDriver=c(s),M.__isInteraction=null!=(T=s.isInteraction)?T:!M._useNativeDriver,M.__iterations=null!=(b=s.iterations)?b:1,void 0!==s.stiffness||void 0!==s.damping||void 0!==s.mass)f(void 0===s.bounciness&&void 0===s.speed&&void 0===s.tension&&void 0===s.friction,'You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one'),M._stiffness=null!=(D=s.stiffness)?D:100,M._damping=null!=(P=s.damping)?P:10,M._mass=null!=(S=s.mass)?S:1;else if(void 0!==s.bounciness||void 0!==s.speed){var U,A;f(void 0===s.tension&&void 0===s.friction&&void 0===s.stiffness&&void 0===s.damping&&void 0===s.mass,'You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one');var C=u.fromBouncinessAndSpeed(null!=(U=s.bounciness)?U:8,null!=(A=s.speed)?A:12);M._stiffness=C.stiffness,M._damping=C.damping,M._mass=1}else{var N,k,F=u.fromOrigamiTensionAndFriction(null!=(N=s.tension)?N:40,null!=(k=s.friction)?k:7);M._stiffness=F.stiffness,M._damping=F.damping,M._mass=1}return f(M._stiffness>0,'Stiffness value must be greater than 0'),f(M._damping>0,'Damping value must be greater than 0'),f(M._mass>0,'Mass value must be greater than 0'),M}return h(p,_),s(p,[{key:"__getNativeAnimationConfig",value:function(){var t;return{type:'spring',overshootClamping:this._overshootClamping,restDisplacementThreshold:this._restDisplacementThreshold,restSpeedThreshold:this._restSpeedThreshold,stiffness:this._stiffness,damping:this._damping,mass:this._mass,initialVelocity:null!=(t=this._initialVelocity)?t:this._lastVelocity,toValue:this._toValue,iterations:this.__iterations}}},{key:"start",value:function(t,s,n,o,l){var h=this;if(this.__active=!0,this._startPosition=t,this._lastPosition=this._startPosition,this._onUpdate=s,this.__onEnd=n,this._lastTime=Date.now(),this._frameTime=0,o instanceof p){var _=o.getInternalState();this._lastPosition=_.lastPosition,this._lastVelocity=_.lastVelocity,this._initialVelocity=this._lastVelocity,this._lastTime=_.lastTime}var u=function(){h._useNativeDriver?h.__startNativeAnimation(l):h.onUpdate()};this._delay?this._timeout=setTimeout(u,this._delay):u()}},{key:"getInternalState",value:function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}}},{key:"onUpdate",value:function(){var t=Date.now();t>this._lastTime+64&&(t=this._lastTime+64);var s=(t-this._lastTime)/1e3;this._frameTime+=s;var n=this._damping,o=this._mass,l=this._stiffness,h=-this._initialVelocity,_=n/(2*Math.sqrt(l*o)),u=Math.sqrt(l/o),f=u*Math.sqrt(1-_*_),c=this._toValue-this._startPosition,v=0,p=0,y=this._frameTime;if(_<1){var V=Math.exp(-_*u*y);v=this._toValue-V*((h+_*u*c)/f*Math.sin(f*y)+c*Math.cos(f*y)),p=_*u*V*(Math.sin(f*y)*(h+_*u*c)/f+c*Math.cos(f*y))-V*(Math.cos(f*y)*(h+_*u*c)-f*c*Math.sin(f*y))}else{var T=Math.exp(-u*y);v=this._toValue-T*(c+(h+u*c)*y),p=T*(h*(y*u-1)+y*c*(u*u))}if(this._lastTime=t,this._lastPosition=v,this._lastVelocity=p,this._onUpdate(v),this.__active){var b=!1;this._overshootClamping&&0!==this._stiffness&&(b=this._startPositionthis._toValue:v18&&A<=44?p(A):h(A),s(2*M-M*M,v,.01));return{stiffness:n(x),damping:t(B)}}}},242,[]); __d(function(g,r,i,a,m,e,d){'use strict';var t,n=r(d[0]),s=r(d[1]),o=r(d[2]),_=r(d[3]),u=r(d[4]),h=r(d[5]),l=(r(d[6]),r(d[7]),r(d[8])),v=r(d[9]).shouldUseNativeDriver;function c(){if(!t){var n=r(d[10]);t=n.inOut(n.ease)}return t}var f=(function(t){function f(t){var s,u,h,l,p,V;return n(this,f),(V=o(this,_(f).call(this)))._toValue=t.toValue,V._easing=null!=(s=t.easing)?s:c(),V._duration=null!=(u=t.duration)?u:500,V._delay=null!=(h=t.delay)?h:0,V.__iterations=null!=(l=t.iterations)?l:1,V._useNativeDriver=v(t),V.__isInteraction=null!=(p=t.isInteraction)?p:!V._useNativeDriver,V}return h(f,l),s(f,[{key:"__getNativeAnimationConfig",value:function(){for(var t=[],n=Math.round(this._duration/16.666666666666668),s=0;s=this._startTime+this._duration)return 0===this._duration?this._onUpdate(this._toValue):this._onUpdate(this._fromValue+this._easing(1)*(this._toValue-this._fromValue)),void this.__debouncedOnEnd({finished:!0});this._onUpdate(this._fromValue+this._easing((t-this._startTime)/this._duration)*(this._toValue-this._fromValue)),this.__active&&(this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this)))}},{key:"stop",value:function(){u(_(f.prototype),"stop",this).call(this),this.__active=!1,clearTimeout(this._timeout),g.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),f})();m.exports=f},243,[4,5,6,9,46,10,219,238,240,222,244]); __d(function(g,r,i,a,m,e,d){'use strict';var n,u=r(d[0]),t=r(d[1]),o=(function(){function o(){u(this,o)}return t(o,null,[{key:"step0",value:function(n){return n>0?1:0}},{key:"step1",value:function(n){return n>=1?1:0}},{key:"linear",value:function(n){return n}},{key:"ease",value:function(u){return n||(n=o.bezier(.42,0,1,1)),n(u)}},{key:"quad",value:function(n){return n*n}},{key:"cubic",value:function(n){return n*n*n}},{key:"poly",value:function(n){return function(u){return Math.pow(u,n)}}},{key:"sin",value:function(n){return 1-Math.cos(n*Math.PI/2)}},{key:"circle",value:function(n){return 1-Math.sqrt(1-n*n)}},{key:"exp",value:function(n){return Math.pow(2,10*(n-1))}},{key:"elastic",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)*Math.PI;return function(u){return 1-Math.pow(Math.cos(u*Math.PI/2),3)*Math.cos(u*n)}}},{key:"back",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.70158;return function(u){return u*u*((n+1)*u-n)}}},{key:"bounce",value:function(n){if(n<.36363636363636365)return 7.5625*n*n;if(n<.7272727272727273){var u=n-.5454545454545454;return 7.5625*u*u+.75}if(n<.9090909090909091){var t=n-.8181818181818182;return 7.5625*t*t+.9375}var o=n-.9545454545454546;return 7.5625*o*o+.984375}},{key:"bezier",value:function(n,u,t,o){return r(d[2])(n,u,t,o)}},{key:"in",value:function(n){return n}},{key:"out",value:function(n){return function(u){return 1-n(1-u)}}},{key:"inOut",value:function(n){return function(u){return u<.5?n(2*u)/2:1-n(2*(1-u))/2}}}]),o})();m.exports=o},244,[4,5,245]); __d(function(g,r,i,a,m,e,d){'use strict';var n=4,t=.001,u=1e-7,o=10,f=.1,c='function'==typeof Float32Array;function v(n,t){return 1-3*t+3*n}function s(n,t){return 3*t-6*n}function w(n){return 3*n}function l(n,t,u){return((v(t,u)*n+s(t,u))*n+w(t))*n}function y(n,t,u){return 3*v(t,u)*n*n+2*s(t,u)*n+w(t)}function b(n,t,f,c,v){var s,w,y=0,b=t,h=f;do{(s=l(w=b+(h-b)/2,c,v)-n)>0?h=w:b=w}while(Math.abs(s)>u&&++y=0&&n<=1&&o>=0&&o<=1))throw new Error('bezier x values must be in [0, 1] range');var s=c?new Float32Array(11):new Array(11);if(n!==u||o!==v)for(var w=0;w<11;++w)s[w]=l(w*f,n,o);function A(u){for(var c=0,v=1;10!==v&&s[v]<=u;++v)c+=f;var w=c+(u-s[--v])/(s[v+1]-s[v])*f,l=y(w,n,o);return l>=t?h(u,w,n,o):0===l?w:b(u,c,c+f,n,o)}return function(t){return n===u&&o===v?t:0===t?0:1===t?1:l(A(t),u,v)}}},245,[]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]),p=r(d[4]),c=r(d[5]),_=r(d[6]).AnimatedEvent,h=r(d[7]),l=r(d[8]),v=r(d[9]),u=r(d[10]);m.exports=function(f,N){u('function'!=typeof f||f.prototype&&f.prototype.isReactComponent,"`createAnimatedComponent` does not support stateless functional components; use a class component instead.");var k=(function(v){function u(t){var o;return n(this,u),(o=s(this,p(u).call(this,t)))._invokeAnimatedPropsCallbackOnMount=!1,o._eventDetachers=[],o._animatedPropsCallback=function(){if(null==o._component)o._invokeAnimatedPropsCallbackOnMount=!0;else if(u.__skipSetNativeProps_FOR_TESTS_ONLY||'function'!=typeof o._component.setNativeProps)o.forceUpdate();else{if(o._propsAnimated.__isNative)throw new Error("Attempting to run JS driven animation on animated node that has been moved to \"native\" earlier by starting an animation with `useNativeDriver: true`");o._component.setNativeProps(o._propsAnimated.__getAnimatedValue())}},o._setComponentRef=function(t){o._prevComponent=o._component,o._component=t},o}return c(u,v),o(u,[{key:"componentWillUnmount",value:function(){this._propsAnimated&&this._propsAnimated.__detach(),this._detachNativeEvents()}},{key:"setNativeProps",value:function(t){this._component.setNativeProps(t)}},{key:"UNSAFE_componentWillMount",value:function(){this._attachProps(this.props)}},{key:"componentDidMount",value:function(){this._invokeAnimatedPropsCallbackOnMount&&(this._invokeAnimatedPropsCallbackOnMount=!1,this._animatedPropsCallback()),this._propsAnimated.setNativeView(this._component),this._attachNativeEvents()}},{key:"_attachNativeEvents",value:function(){var t,n=this,o=(null==(t=this._component)?void 0:t.getScrollableNode)?this._component.getScrollableNode():this._component,s=function(t){var s=n.props[t];s instanceof _&&s.__isNative&&(s.__attach(o,t),n._eventDetachers.push(function(){return s.__detach(o,t)}))};for(var p in this.props)s(p)}},{key:"_detachNativeEvents",value:function(){this._eventDetachers.forEach(function(t){return t()}),this._eventDetachers=[]}},{key:"_attachProps",value:function(t){var n=this._propsAnimated;this._propsAnimated=new h(t,this._animatedPropsCallback),n&&n.__detach()}},{key:"UNSAFE_componentWillReceiveProps",value:function(t){this._attachProps(t)}},{key:"componentDidUpdate",value:function(t){this._component!==this._prevComponent&&this._propsAnimated.setNativeView(this._component),this._component===this._prevComponent&&t===this.props||(this._detachNativeEvents(),this._attachNativeEvents())}},{key:"render",value:function(){var n=this._propsAnimated.__getValue();return l.createElement(f,t({},N,n,{ref:this._setComponentRef,collapsable:!this._propsAnimated.__isNative&&n.collapsable}))}},{key:"getNode",value:function(){return this._component}}]),u})(l.Component);k.__skipSetNativeProps_FOR_TESTS_ONLY=!1;var y=f.propTypes;return k.propTypes={style:function(t,n,o){if(y)for(var s in v)y[s]||void 0===t[s]||console.warn('You are setting the style `{ '+s+": ... }` as a prop. You should nest it in a style object. E.g. `{ style: { "+s+': ... } }`')}},k}},246,[24,4,5,6,9,10,218,233,59,83,16]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),o=r(d[1]);m.exports=o(t,{scrollEventThrottle:1e-4})},247,[248,246]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]),l=r(d[4]),u=r(d[5]),c=r(d[6]),f=r(d[7]),p=(r(d[8]),r(d[9])),h=r(d[10]),C=r(d[11]),v=r(d[12]),y=r(d[13]),b=r(d[14]),_=f({},v.defaultProps,{numColumns:1,removeClippedSubviews:!1}),w=(function(_){function w(t){var u;return o(this,w),(u=s(this,l(w).call(this,t)))._virtualizedListPairs=[],u._captureRef=function(t){u._listRef=t},u._getItem=function(t,n){var o=u.props.numColumns;if(o>1){for(var s=[],l=0;l1?(b(Array.isArray(t),"FlatList: Encountered internal consistency error, expected each item to consist of an array with 1-%s columns; instead, received a single item.",l),t.map(function(t,o){return s(t,n*l+o)}).join(':')):s(t,n)},u._renderer=function(){var t=u.props,o=t.ListItemComponent,s=t.renderItem,l=t.numColumns,c=t.columnWrapperStyle,f=function(t){return o?h.createElement(o,t):s?s(t):null};return n({},o?'ListItemComponent':'renderItem',function(t){if(l>1){var n=t.item,o=t.index;return b(Array.isArray(n),'Expected array of items with numColumns > 1'),h.createElement(C,{style:y.compose(I.row,c)},n.map(function(n,s){var u=f({item:n,index:o*l+s,separators:t.separators});return null!=u?h.createElement(h.Fragment,{key:s},u):null}))}return f(t)})},u._checkProps(u.props),u.props.viewabilityConfigCallbackPairs?u._virtualizedListPairs=u.props.viewabilityConfigCallbackPairs.map(function(t){return{viewabilityConfig:t.viewabilityConfig,onViewableItemsChanged:u._createOnViewableItemsChanged(t.onViewableItemsChanged)}}):u.props.onViewableItemsChanged&&u._virtualizedListPairs.push({viewabilityConfig:u.props.viewabilityConfig,onViewableItemsChanged:u._createOnViewableItemsChanged(u.props.onViewableItemsChanged)}),u}return c(w,_),u(w,[{key:"scrollToEnd",value:function(t){this._listRef&&this._listRef.scrollToEnd(t)}},{key:"scrollToIndex",value:function(t){this._listRef&&this._listRef.scrollToIndex(t)}},{key:"scrollToItem",value:function(t){this._listRef&&this._listRef.scrollToItem(t)}},{key:"scrollToOffset",value:function(t){this._listRef&&this._listRef.scrollToOffset(t)}},{key:"recordInteraction",value:function(){this._listRef&&this._listRef.recordInteraction()}},{key:"flashScrollIndicators",value:function(){this._listRef&&this._listRef.flashScrollIndicators()}},{key:"getScrollResponder",value:function(){if(this._listRef)return this._listRef.getScrollResponder()}},{key:"getScrollableNode",value:function(){if(this._listRef)return this._listRef.getScrollableNode()}},{key:"setNativeProps",value:function(t){this._listRef&&this._listRef.setNativeProps(t)}}]),u(w,[{key:"componentDidUpdate",value:function(t){b(t.numColumns===this.props.numColumns,"Changing numColumns on the fly is not supported. Change the key prop on FlatList when changing the number of columns to force a fresh render of the component."),b(t.onViewableItemsChanged===this.props.onViewableItemsChanged,'Changing onViewableItemsChanged on the fly is not supported'),b(!p(t.viewabilityConfig,this.props.viewabilityConfig),'Changing viewabilityConfig on the fly is not supported'),b(t.viewabilityConfigCallbackPairs===this.props.viewabilityConfigCallbackPairs,'Changing viewabilityConfigCallbackPairs on the fly is not supported'),this._checkProps(this.props)}},{key:"_checkProps",value:function(t){var n=t.getItem,o=t.getItemCount,s=t.horizontal,l=t.numColumns,u=t.columnWrapperStyle,c=t.onViewableItemsChanged,f=t.viewabilityConfigCallbackPairs;b(!n&&!o,'FlatList does not support custom data formats.'),l>1?b(!s,'numColumns does not support horizontal.'):b(!u,'columnWrapperStyle not supported for single column lists'),b(!(c&&f),"FlatList does not support setting both onViewableItemsChanged and viewabilityConfigCallbackPairs.")}},{key:"_pushMultiColumnViewable",value:function(t,n){var o=this.props,s=o.numColumns,l=o.keyExtractor;n.item.forEach(function(o,u){b(null!=n.index,'Missing index!');var c=n.index*s+u;t.push(f({},n,{item:o,key:l(o,c),index:c}))})}},{key:"_createOnViewableItemsChanged",value:function(t){var n=this;return function(o){var s=n.props.numColumns;if(t)if(s>1){var l=[],u=[];o.viewableItems.forEach(function(t){return n._pushMultiColumnViewable(u,t)}),o.changed.forEach(function(t){return n._pushMultiColumnViewable(l,t)}),t({viewableItems:u,changed:l})}else t(o)}}},{key:"render",value:function(){return h.createElement(v,t({},this.props,{getItem:this._getItem,getItemCount:this._getItemCount,keyExtractor:this._keyExtractor,ref:this._captureRef,viewabilityConfigCallbackPairs:this._virtualizedListPairs},this._renderer()))}}]),w})(h.PureComponent);w.defaultProps=_;var I=y.create({row:{flexDirection:'row'}});m.exports=w},248,[24,54,4,6,9,5,10,53,57,166,59,90,249,62,16]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),s=r(d[1]),o=r(d[2]),n=r(d[3]),l=r(d[4]),h=r(d[5]),c=r(d[6]),p=r(d[7]),u=r(d[8]),f=r(d[9]),_=r(d[10]),v=r(d[11]),y=r(d[12]),C=r(d[13]),L=r(d[14]),S=r(d[15]),b=r(d[16]),M=r(d[17]),I=r(d[18]),x=(r(d[19]),r(d[20])),R=r(d[21]),k=(r(d[22]),r(d[23]).computeWindowedRenderLimits),E=!1,w='',T=(function(v){function T(t,c){var p;n(this,T),(p=l(this,h(T).call(this,t,c)))._getScrollMetrics=function(){return p._scrollMetrics},p._getOutermostParentListRef=function(){return p._isNestedWithSameOrientation()?p.context.virtualizedList.getOutermostParentListRef():u(u(p))},p._getNestedChildState=function(t){var s=p._nestedChildLists.get(t);return s&&s.state},p._registerAsNestedChild=function(t){var s=p._cellKeysToChildListKeys.get(t.cellKey)||new Set;s.add(t.key),p._cellKeysToChildListKeys.set(t.cellKey,s);var o=p._nestedChildLists.get(t.key);o&&null!==o.ref&&console.error("A VirtualizedList contains a cell which itself contains more than one VirtualizedList of the same orientation as the parent list. You must pass a unique listKey prop to each sibling list."),p._nestedChildLists.set(t.key,{ref:t.ref,state:null}),p._hasInteracted&&t.ref.recordInteraction()},p._unregisterAsNestedChild=function(t){p._nestedChildLists.set(t.key,{ref:null,state:t.state})},p._onUpdateSeparators=function(t,s){t.forEach(function(t){var o=null!=t&&p._cellRefs[t];o&&o.updateSeparatorProps(s)})},p._averageCellLength=0,p._cellKeysToChildListKeys=new Map,p._cellRefs={},p._frames={},p._footerLength=0,p._hasDataChangedSinceEndReached=!0,p._hasDoneInitialScroll=!1,p._hasInteracted=!1,p._hasMore=!1,p._hasWarned={},p._headerLength=0,p._hiPriInProgress=!1,p._highestMeasuredFrameIndex=0,p._indicesToKeys=new Map,p._nestedChildLists=new Map,p._offsetFromParentVirtualizedList=0,p._prevParentOffset=0,p._scrollMetrics={contentLength:0,dOffset:0,dt:10,offset:0,timestamp:0,velocity:0,visibleLength:0},p._scrollRef=null,p._sentEndForContentLength=0,p._totalCellLength=0,p._totalCellsMeasured=0,p._viewabilityTuples=[],p._captureScrollRef=function(t){p._scrollRef=t},p._defaultRenderScrollComponent=function(t){var o=t.onRefresh;return p._isNestedWithSameOrientation()?y.createElement(M,t):o?(R('boolean'==typeof t.refreshing,'`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `'+JSON.stringify(t.refreshing)+'`'),y.createElement(S,s({},t,{refreshControl:null==t.refreshControl?y.createElement(L,{refreshing:t.refreshing,onRefresh:o,progressViewOffset:t.progressViewOffset}):t.refreshControl}))):y.createElement(S,t)},p._onCellUnmount=function(t){var s=p._frames[t];s&&(p._frames[t]=o({},s,{inLayout:!1}))},p._onLayout=function(t){p._isNestedWithSameOrientation()?p.measureLayoutRelativeToContainingList():p._scrollMetrics.visibleLength=p._selectLength(t.nativeEvent.layout),p.props.onLayout&&p.props.onLayout(t),p._scheduleCellsToRenderUpdate(),p._maybeCallOnEndReached()},p._onLayoutEmpty=function(t){p.props.onLayout&&p.props.onLayout(t)},p._onLayoutFooter=function(t){p._footerLength=p._selectLength(t.nativeEvent.layout)},p._onLayoutHeader=function(t){p._headerLength=p._selectLength(t.nativeEvent.layout)},p._onContentSizeChange=function(t,s){t>0&&s>0&&null!=p.props.initialScrollIndex&&p.props.initialScrollIndex>0&&!p._hasDoneInitialScroll&&(p.scrollToIndex({animated:!1,index:p.props.initialScrollIndex}),p._hasDoneInitialScroll=!0),p.props.onContentSizeChange&&p.props.onContentSizeChange(t,s),p._scrollMetrics.contentLength=p._selectLength({height:s,width:t}),p._scheduleCellsToRenderUpdate(),p._maybeCallOnEndReached()},p._convertParentScrollMetrics=function(t){var s=t.offset-p._offsetFromParentVirtualizedList,o=t.visibleLength,n=s-p._scrollMetrics.offset;return{visibleLength:o,contentLength:p._scrollMetrics.contentLength,offset:s,dOffset:n}},p._onScroll=function(t){p._nestedChildLists.forEach(function(s){s.ref&&s.ref._onScroll(t)}),p.props.onScroll&&p.props.onScroll(t);var s=t.timeStamp,o=p._selectLength(t.nativeEvent.layoutMeasurement),n=p._selectLength(t.nativeEvent.contentSize),l=p._selectOffset(t.nativeEvent.contentOffset),h=l-p._scrollMetrics.offset;if(p._isNestedWithSameOrientation()){if(0===p._scrollMetrics.contentLength)return;var c=p._convertParentScrollMetrics({visibleLength:o,offset:l});o=c.visibleLength,n=c.contentLength,l=c.offset,h=c.dOffset}var u=p._scrollMetrics.timestamp?Math.max(1,s-p._scrollMetrics.timestamp):1,f=h/u;u>500&&p._scrollMetrics.dt>500&&n>5*o&&!p._hasWarned.perf&&(x("VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate, etc.",{dt:u,prevDt:p._scrollMetrics.dt,contentLength:n}),p._hasWarned.perf=!0),p._scrollMetrics={contentLength:n,dt:u,dOffset:h,offset:l,timestamp:s,velocity:f,visibleLength:o},p._updateViewableItems(p.props.data),p.props&&(p._maybeCallOnEndReached(),0!==f&&p._fillRateHelper.activate(),p._computeBlankness(),p._scheduleCellsToRenderUpdate())},p._onScrollBeginDrag=function(t){p._nestedChildLists.forEach(function(s){s.ref&&s.ref._onScrollBeginDrag(t)}),p._viewabilityTuples.forEach(function(t){t.viewabilityHelper.recordInteraction()}),p._hasInteracted=!0,p.props.onScrollBeginDrag&&p.props.onScrollBeginDrag(t)},p._onScrollEndDrag=function(t){var s=t.nativeEvent.velocity;s&&(p._scrollMetrics.velocity=p._selectOffset(s)),p._computeBlankness(),p.props.onScrollEndDrag&&p.props.onScrollEndDrag(t)},p._onMomentumScrollEnd=function(t){p._scrollMetrics.velocity=0,p._computeBlankness(),p.props.onMomentumScrollEnd&&p.props.onMomentumScrollEnd(t)},p._updateCellsToRender=function(){var t=p.props,s=t.data,o=t.getItemCount,n=t.onEndReachedThreshold,l=p._isVirtualizationDisabled();p._updateViewableItems(s),s&&p.setState(function(t){var h;if(l){var c=p._scrollMetrics,u=c.contentLength,f=c.offset,_=c.visibleLength,v=u-_-f0)for(var y=h.first,C=h.last,L=y;L<=C;L++){var S=p._indicesToKeys.get(L),b=S&&p._cellKeysToChildListKeys.get(S);if(b){var M=!1,I=b,x=Array.isArray(I),R=0;for(I=x?I:I["function"==typeof Symbol&&"function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var E;if(x){if(R>=I.length)break;E=I[R++]}else{if((R=I.next()).done)break;E=R.value}var w=E,T=p._nestedChildLists.get(w);if(T&&T.ref&&T.ref.hasMore()){M=!0;break}}if(M){h.last=L;break}}}return h})},p._createViewToken=function(t,s){var o=p.props,n=o.data,l=o.getItem,h=o.keyExtractor,c=l(n,t);return{index:t,item:c,key:h(c,t),isViewable:s}},p._getFrameMetricsApprox=function(t){var s=p._getFrameMetrics(t);if(s&&s.index===t)return s;var o=p.props.getItemLayout;return R(!o,'Should not have to estimate frames when a measurement metrics function is provided'),{length:p._averageCellLength,offset:p._averageCellLength*t}},p._getFrameMetrics=function(t){var s=p.props,o=s.data,n=s.getItem,l=s.getItemCount,h=s.getItemLayout,c=s.keyExtractor;R(l(o)>t,'Tried to get frame for out of range index '+t);var u=n(o,t),f=u&&p._frames[c(u,t)];return f&&f.index===t||h&&(f=h(o,t)),f},R(!t.onScroll||!t.onScroll.__isNative,"Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent to support native onScroll events with useNativeDriver"),R(t.windowSize>0,'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.'),p._fillRateHelper=new _(p._getFrameMetrics),p._updateCellsToRenderBatcher=new f(p._updateCellsToRender,p.props.updateCellsBatchingPeriod),p.props.viewabilityConfigCallbackPairs?p._viewabilityTuples=p.props.viewabilityConfigCallbackPairs.map(function(t){return{viewabilityHelper:new I(t.viewabilityConfig),onViewableItemsChanged:t.onViewableItemsChanged}}):p.props.onViewableItemsChanged&&p._viewabilityTuples.push({viewabilityHelper:new I(p.props.viewabilityConfig),onViewableItemsChanged:p.props.onViewableItemsChanged});var v={first:p.props.initialScrollIndex||0,last:Math.min(p.props.getItemCount(p.props.data),(p.props.initialScrollIndex||0)+p.props.initialNumToRender)-1};if(p._isNestedWithSameOrientation()){var C=p.context.virtualizedList.getNestedChildState(p.props.listKey||p._getCellKey());C&&(v=C,p.state=C,p._frames=C.frames)}return p.state=v,p}return p(T,v),c(T,[{key:"scrollToEnd",value:function(t){var s=!t||t.animated,o=this.props.getItemCount(this.props.data)-1,n=this._getFrameMetricsApprox(o),l=Math.max(0,n.offset+n.length+this._footerLength-this._scrollMetrics.visibleLength);this._scrollRef.scrollTo(this.props.horizontal?{x:l,animated:s}:{y:l,animated:s})}},{key:"scrollToIndex",value:function(t){var s=this.props,o=s.data,n=s.horizontal,l=s.getItemCount,h=s.getItemLayout,c=s.onScrollToIndexFailed,p=t.animated,u=t.index,f=t.viewOffset,_=t.viewPosition;if(R(u>=0&&uthis._highestMeasuredFrameIndex)return R(!!c,"scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, otherwise there is no way to know the location of offscreen indices or handle failures."),void c({averageItemLength:this._averageCellLength,highestMeasuredFrameIndex:this._highestMeasuredFrameIndex,index:u});var v=this._getFrameMetricsApprox(u),y=Math.max(0,v.offset-(_||0)*(this._scrollMetrics.visibleLength-v.length))-(f||0);this._scrollRef.scrollTo(n?{x:y,animated:p}:{y:y,animated:p})}},{key:"scrollToItem",value:function(t){for(var s=t.item,n=this.props,l=n.data,h=n.getItem,c=(0,n.getItemCount)(l),p=0;p0){E=!1,w='';var R=f?'width':'height',k=this.props.initialScrollIndex?-1:this.props.initialNumToRender-1,T=this.state,z=T.first,F=T.last;this._pushCells(C,S,L,0,k,v);var K=Math.max(k+1,z);if(!_&&z>k+1){var N=!1;if(L.size>0)for(var V=c?1:0,A=K-1;A>k;A--)if(L.has(A+V)){var D=this._getFrameMetricsApprox(k),B=this._getFrameMetricsApprox(A),H=B.offset-D.offset-(this.props.initialScrollIndex?0:D.length);C.push(y.createElement(M,{key:"$sticky_lead",style:t({},R,H)})),this._pushCells(C,S,L,A,A,v);var U=this._getFrameMetricsApprox(z).offset-(B.offset+B.length);C.push(y.createElement(M,{key:"$sticky_trail",style:t({},R,U)})),N=!0;break}if(!N){var W=this._getFrameMetricsApprox(k),$=this._getFrameMetricsApprox(z).offset-(W.offset+W.length);C.push(y.createElement(M,{key:"$lead_spacer",style:t({},R,$)}))}}if(this._pushCells(C,S,L,K,F,v),!this._hasWarned.keys&&E&&(console.warn("VirtualizedList: missing keys for items, make sure to specify a key or id property on each item or provide a custom keyExtractor.",w),this._hasWarned.keys=!0),!_&&F=p.length)break;_=p[f++]}else{if((f=p.next()).done)break;_=f.value}var v=_,y=this._nestedChildLists.get(v);y&&y.ref&&y.ref.measureLayoutRelativeToContainingList()}}this._computeBlankness(),this._updateViewableItems(this.props.data)}},{key:"measureLayoutRelativeToContainingList",value:function(){var t=this;try{if(!this._scrollRef)return;this._scrollRef.measureLayout(this.context.virtualizedList.getOutermostParentListRef().getScrollRef().getNativeScrollRef(),function(s,o,n,l){t._offsetFromParentVirtualizedList=t._selectOffset({x:s,y:o}),t._scrollMetrics.contentLength=t._selectLength({width:n,height:l});var h=t._convertParentScrollMetrics(t.context.virtualizedList.getScrollMetrics());t._scrollMetrics.visibleLength=h.visibleLength,t._scrollMetrics.offset=h.offset},function(t){console.warn("VirtualizedList: Encountered an error while measuring a list's offset from its containing VirtualizedList.")})}catch(t){console.warn('measureLayoutRelativeToContainingList threw an error',t.stack)}}},{key:"_renderDebugOverlay",value:function(){for(var t=this._scrollMetrics.visibleLength/(this._scrollMetrics.contentLength||1),s=[],o=this.props.getItemCount(this.props.data),n=0;n0){var _=l-this._getFrameMetricsApprox(s).offset;u=u||_<0||c<-2&&_2&&v0&&void 0!==arguments[0]?arguments[0]:{abort:!1};this._taskHandle&&(this._taskHandle.cancel(),t.abort||this._callback(),this._taskHandle=null)}},{key:"schedule",value:function(){var t=this;if(!this._taskHandle){var n=setTimeout(function(){t._taskHandle=l.runAfterInteractions(function(){t._taskHandle=null,t._callback()})},this._delay);this._taskHandle={cancel:function(){return clearTimeout(n)}}}}}]),s})();m.exports=s},250,[4,5,225]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),s=r(d[2]),l=r(d[3]),_=r(d[4]),h=function t(){s(this,t),this.any_blank_count=0,this.any_blank_ms=0,this.any_blank_speed_sum=0,this.mostly_blank_count=0,this.mostly_blank_ms=0,this.pixels_blank=0,this.pixels_sampled=0,this.pixels_scrolled=0,this.total_time_spent=0,this.sample_count=0},o=[],u=10,f=null,c=(function(){function c(t){s(this,c),this._anyBlankStartTime=null,this._enabled=!1,this._info=new h,this._mostlyBlankStartTime=null,this._samplesStartTime=null,this._getFrameMetrics=t,this._enabled=(f||0)>Math.random(),this._resetData()}return n(c,null,[{key:"addListener",value:function(t){return _(null!==f,'Call `FillRateHelper.setSampleRate` before `addListener`.'),o.push(t),{remove:function(){o=o.filter(function(n){return t!==n})}}}},{key:"setSampleRate",value:function(t){f=t}},{key:"setMinSampleCount",value:function(t){u=t}}]),n(c,[{key:"activate",value:function(){this._enabled&&null==this._samplesStartTime&&(this._samplesStartTime=l())}},{key:"deactivateAndFlush",value:function(){if(this._enabled){var n=this._samplesStartTime;if(null!=n)if(this._info.sample_count0&&(k=Math.min(u,Math.max(0,p.offset-h)));for(var b=0,v=n.last,S=this._getFrameMetrics(v);v>=n.first&&(!S||!S.inLayout);)S=this._getFrameMetrics(v),v--;if(S&&v0?(this._anyBlankStartTime=c,this._info.any_blank_speed_sum+=f,this._info.any_blank_count++,this._info.pixels_blank+=T,B>.5&&(this._mostlyBlankStartTime=c,this._info.mostly_blank_count++)):(f<.01||Math.abs(_)<1)&&this.deactivateAndFlush(),B}},{key:"enabled",value:function(){return this._enabled}},{key:"_resetData",value:function(){this._anyBlankStartTime=null,this._info=new h,this._mostlyBlankStartTime=null,this._samplesStartTime=null}}]),c})();m.exports=c},251,[53,5,4,113,18]); __d(function(g,r,i,a,m,e,d){'use strict';var s,t=r(d[0]),n=t(r(d[1])),o=t(r(d[2])),f=t(r(d[3])),h=t(r(d[4])),p=t(r(d[5])),l=t(r(d[6])),u=t(r(d[7])),c=(t(r(d[8])),t(r(d[9]))),v=(r(d[10]),r(d[11]));r(d[12]);s={SIZE:{}};var R=(function(s){function t(){var s,n;(0,f.default)(this,t);for(var o=arguments.length,h=new Array(o),u=0;u0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;console.warn('`scrollWithoutAnimationTo` is deprecated. Use `scrollTo` instead'),this.scrollTo({x:n,y:t,animated:!1})}},{key:"flashScrollIndicators",value:function(){this._scrollResponder.scrollResponderFlashScrollIndicators()}},{key:"_getKeyForIndex",value:function(t,n){var o=n[t];return o&&o.key}},{key:"_updateAnimatedNodeAttachment",value:function(){this._scrollAnimatedValueAttachment&&this._scrollAnimatedValueAttachment.detach(),this.props.stickyHeaderIndices&&this.props.stickyHeaderIndices.length>0&&(this._scrollAnimatedValueAttachment=R.attachNativeEvent(this._scrollViewRef,'onScroll',[{nativeEvent:{contentOffset:{y:this._scrollAnimatedValue}}}]))}},{key:"_setStickyHeaderRef",value:function(t,n){n?this._stickyHeaderRefs.set(t,n):this._stickyHeaderRefs.delete(t)}},{key:"_onStickyHeaderLayout",value:function(t,n,o){var l=this.props.stickyHeaderIndices;if(l){var s=_.Children.toArray(this.props.children);if(o===this._getKeyForIndex(t,s)){var c=n.nativeEvent.layout.y;this._headerLayoutYs.set(o,c);var p=l[l.indexOf(t)-1];if(null!=p){var h=this._stickyHeaderRefs.get(this._getKeyForIndex(p,s));h&&h.setNextHeaderY&&h.setNextHeaderY(c)}}}}},{key:"render",value:function(){var l,s,c=this;s=n,V(void 0!==(l=t),'ScrollViewClass must not be undefined'),V(void 0!==s,'ScrollContentContainerViewClass must not be undefined');var p=[!0===this.props.horizontal&&b.contentContainerHorizontal,this.props.contentContainerStyle],h={};this.props.onContentSizeChange&&(h={onLayout:this._handleContentOnLayout});var u=this.props.stickyHeaderIndices,R=this.props.children;if(null!=u&&u.length>0){var v=_.Children.toArray(this.props.children);R=v.map(function(t,n){var o=t?u.indexOf(n):-1;if(o>-1){var l=t.key,s=u[o+1],p=c.props.StickyHeaderComponent||H;return _.createElement(p,{key:l,ref:function(t){return c._setStickyHeaderRef(l,t)},nextHeaderLayoutY:c._headerLayoutYs.get(c._getKeyForIndex(s,v)),onLayout:function(t){return c._onStickyHeaderLayout(n,t,l)},scrollAnimatedValue:c._scrollAnimatedValue,inverted:c.props.invertStickyHeaders,scrollViewHeight:c.state.layoutHeight},t)}return t})}R=_.createElement(E.Provider,{value:!0===this.props.horizontal?x:M},R);var S=Array.isArray(u)&&u.length>0,w=_.createElement(s,o({},h,{ref:this._setInnerViewRef,style:p,removeClippedSubviews:this.props.removeClippedSubviews,collapsable:!1}),R),C=void 0!==this.props.alwaysBounceHorizontal?this.props.alwaysBounceHorizontal:this.props.horizontal,A=void 0!==this.props.alwaysBounceVertical?this.props.alwaysBounceVertical:!this.props.horizontal,I=!!this.props.DEPRECATED_sendUpdatedChildFrames,z=!0===this.props.horizontal?b.baseHorizontal:b.baseVertical,L=f({},this.props,{alwaysBounceHorizontal:C,alwaysBounceVertical:A,style:[z,this.props.style],onContentSizeChange:null,onLayout:this._handleLayout,onMomentumScrollBegin:this._scrollResponder.scrollResponderHandleMomentumScrollBegin,onMomentumScrollEnd:this._scrollResponder.scrollResponderHandleMomentumScrollEnd,onResponderGrant:this._scrollResponder.scrollResponderHandleResponderGrant,onResponderReject:this._scrollResponder.scrollResponderHandleResponderReject,onResponderRelease:this._scrollResponder.scrollResponderHandleResponderRelease,onResponderTerminate:this._scrollResponder.scrollResponderHandleTerminate,onResponderTerminationRequest:this._scrollResponder.scrollResponderHandleTerminationRequest,onScrollBeginDrag:this._scrollResponder.scrollResponderHandleScrollBeginDrag,onScrollEndDrag:this._scrollResponder.scrollResponderHandleScrollEndDrag,onScrollShouldSetResponder:this._scrollResponder.scrollResponderHandleScrollShouldSetResponder,onStartShouldSetResponder:this._scrollResponder.scrollResponderHandleStartShouldSetResponder,onStartShouldSetResponderCapture:this._scrollResponder.scrollResponderHandleStartShouldSetResponderCapture,onTouchEnd:this._scrollResponder.scrollResponderHandleTouchEnd,onTouchMove:this._scrollResponder.scrollResponderHandleTouchMove,onTouchStart:this._scrollResponder.scrollResponderHandleTouchStart,onTouchCancel:this._scrollResponder.scrollResponderHandleTouchCancel,onScroll:this._handleScroll,scrollBarThumbImage:T(this.props.scrollBarThumbImage),scrollEventThrottle:S?1:this.props.scrollEventThrottle,sendMomentumEvents:!(!this.props.onMomentumScrollBegin&&!this.props.onMomentumScrollEnd),DEPRECATED_sendUpdatedChildFrames:I,snapToStart:!1!==this.props.snapToStart,snapToEnd:!1!==this.props.snapToEnd,pagingEnabled:!0===this.props.pagingEnabled&&null==this.props.snapToInterval&&null==this.props.snapToOffsets}),N=this.props.decelerationRate;null!=N&&(L.decelerationRate=k(N));var B=this.props.refreshControl;return B?_.createElement(l,o({},L,{ref:this._setScrollViewRef}),y.isTV?null:B,w):_.createElement(l,o({},L,{ref:this._setScrollViewRef}),w)}}]),C})(_.Component);I.Context=E;var b=w.create({baseVertical:{flexGrow:1,flexShrink:1,flexDirection:'column',overflow:'scroll'},baseHorizontal:{flexGrow:1,flexShrink:1,flexDirection:'row',overflow:'scroll'},contentContainerHorizontal:{flexDirection:'row'}});m.exports=I},255,[24,4,5,6,9,10,8,53,227,57,59,92,256,263,62,90,262,89,16,264,184,179,265]); __d(function(g,r,i,a,m,e,d){'use strict';var o=r(d[0]),s=r(d[1]),n=r(d[2]),l=r(d[3]),t=r(d[4]),c=r(d[5]),p=r(d[6]),h=r(d[7]),u=r(d[8]),S=r(d[9]),b=r(d[10]).ScrollViewManager,R={Mixin:{_subscriptionKeyboardWillShow:null,_subscriptionKeyboardWillHide:null,_subscriptionKeyboardDidShow:null,_subscriptionKeyboardDidHide:null,scrollResponderMixinGetInitialState:function(){return{isTouching:!1,lastMomentumScrollBeginTime:0,lastMomentumScrollEndTime:0,observedScrollSinceBecomingResponder:!1,becameResponderWhileAnimating:!1}},scrollResponderHandleScrollShouldSetResponder:function(){return!0!==this.props.disableScrollViewPanResponder&&this.state.isTouching},scrollResponderHandleStartShouldSetResponder:function(o){if(!0===this.props.disableScrollViewPanResponder)return!1;var s=t.currentlyFocusedField();return'handled'===this.props.keyboardShouldPersistTaps&&null!=s&&o.target!==s},scrollResponderHandleStartShouldSetResponderCapture:function(o){if(this.scrollResponderIsAnimating())return!0;if(!0===this.props.disableScrollViewPanResponder)return!1;var s=t.currentlyFocusedField(),n=this.props.keyboardShouldPersistTaps;return!(n&&'never'!==n||null==s||!o.target||t.isTextInput(o.target))},scrollResponderHandleResponderReject:function(){},scrollResponderHandleTerminationRequest:function(){return!this.state.observedScrollSinceBecomingResponder},scrollResponderHandleTouchEnd:function(o){var s=o.nativeEvent;this.state.isTouching=0!==s.touches.length,this.props.onTouchEnd&&this.props.onTouchEnd(o)},scrollResponderHandleTouchCancel:function(o){this.state.isTouching=!1,this.props.onTouchCancel&&this.props.onTouchCancel(o)},scrollResponderHandleResponderRelease:function(o){this.props.onResponderRelease&&this.props.onResponderRelease(o);var s=t.currentlyFocusedField();!0===this.props.keyboardShouldPersistTaps||'always'===this.props.keyboardShouldPersistTaps||null==s||o.target===s||this.state.observedScrollSinceBecomingResponder||this.state.becameResponderWhileAnimating||(this.props.onScrollResponderKeyboardDismissed&&this.props.onScrollResponderKeyboardDismissed(o),t.blurTextInput(s))},scrollResponderHandleScroll:function(o){this.state.observedScrollSinceBecomingResponder=!0,this.props.onScroll&&this.props.onScroll(o)},scrollResponderHandleResponderGrant:function(o){this.state.observedScrollSinceBecomingResponder=!1,this.props.onResponderGrant&&this.props.onResponderGrant(o),this.state.becameResponderWhileAnimating=this.scrollResponderIsAnimating()},scrollResponderHandleScrollBeginDrag:function(o){s.beginScroll(),this.props.onScrollBeginDrag&&this.props.onScrollBeginDrag(o)},scrollResponderHandleScrollEndDrag:function(o){var n=o.nativeEvent.velocity;this.scrollResponderIsAnimating()||n&&(0!==n.x||0!==n.y)||s.endScroll(),this.props.onScrollEndDrag&&this.props.onScrollEndDrag(o)},scrollResponderHandleMomentumScrollBegin:function(o){this.state.lastMomentumScrollBeginTime=u(),this.props.onMomentumScrollBegin&&this.props.onMomentumScrollBegin(o)},scrollResponderHandleMomentumScrollEnd:function(o){s.endScroll(),this.state.lastMomentumScrollEndTime=u(),this.props.onMomentumScrollEnd&&this.props.onMomentumScrollEnd(o)},scrollResponderHandleTouchStart:function(o){this.state.isTouching=!0,this.props.onTouchStart&&this.props.onTouchStart(o)},scrollResponderHandleTouchMove:function(o){this.props.onTouchMove&&this.props.onTouchMove(o)},scrollResponderIsAnimating:function(){return u()-this.state.lastMomentumScrollEndTime<16||this.state.lastMomentumScrollEndTime0){v.push(H),L.push(0),v.push(H+1),L.push(1);var Y=(y||0)-l-o;Y>H&&(v.push(Y,Y+1),L.push(Y-H,Y-H))}}}else{v.push(h),L.push(0);var x=(y||0)-l;x>=h?(v.push(x,x+1),L.push(x-h,x-h)):(v.push(h+1),L.push(1))}var C=this.props.scrollAnimatedValue.interpolate({inputRange:v,outputRange:L}),E=p.Children.only(this.props.children);return p.createElement(c,{collapsable:!1,onLayout:this._onLayout,style:[E.props.style,f.header,{transform:[{translateY:C}]}]},p.cloneElement(E,{style:f.fill,onLayout:void 0}))}}]),h})(p.Component),f=h.create({header:{zIndex:10},fill:{flex:1}});m.exports=v},263,[4,5,6,9,10,227,59,62,90]); __d(function(g,r,i,a,m,e,d){'use strict';r(d[0]);m.exports=function(t){return'normal'===t?.998:'fast'===t?.99:t}},264,[57]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0])(Object.create(null),{margin:!0,marginHorizontal:!0,marginVertical:!0,marginBottom:!0,marginTop:!0,marginLeft:!0,marginRight:!0,flex:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,alignSelf:!0,height:!0,minHeight:!0,maxHeight:!0,width:!0,minWidth:!0,maxWidth:!0,position:!0,left:!0,right:!0,bottom:!0,top:!0,transform:!0});m.exports=function(n){var o={},f={};return n&&Object.keys(n).forEach(function(h){var l=n[h];t[h]?f[h]=l:o[h]=l}),{outer:f,inner:o}}},265,[24]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),l=r(d[4]),h=(function(){function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{viewAreaCoveragePercentThreshold:0};s(this,h),this._hasInteracted=!1,this._timers=new Set,this._viewableIndices=[],this._viewableItems=new Map,this._config=t}return o(h,[{key:"dispose",value:function(){this._timers.forEach(clearTimeout)}},{key:"computeViewableItems",value:function(t,n,s,o,h){var c=this._config,f=c.itemVisiblePercentThreshold,v=c.viewAreaCoveragePercentThreshold,b=null!=v,_=b?v:f;l(null!=_&&null!=f!=(null!=v),'Must set exactly one of itemVisiblePercentThreshold or viewAreaCoveragePercentThreshold');var w=[];if(0===t)return w;var y=-1,I=h||{first:0,last:t-1},p=I.first,k=I.last;if(k>=t)return console.warn('Invalid render range computing viewability '+JSON.stringify({renderRange:h,itemCount:t})),[];for(var S=p;S<=k;S++){var T=o(S);if(T){var A=T.offset-n,V=A+T.length;if(A0)y=S,u(b,_,A,V,s,T.length)&&w.push(S);else if(y>=0)break}}return w}},{key:"onUpdate",value:function(t,n,s,o,l,h,u){var c=this;if((!this._config.waitForInteraction||this._hasInteracted)&&0!==t&&o(0)){var f=[];if(t&&(f=this.computeViewableItems(t,n,s,o,u)),this._viewableIndices.length!==f.length||!this._viewableIndices.every(function(t,n){return t===f[n]}))if(this._viewableIndices=f,this._config.minimumViewTime){var v=setTimeout(function(){c._timers.delete(v),c._onUpdateSync(f,h,l)},this._config.minimumViewTime);this._timers.add(v)}else this._onUpdateSync(f,h,l)}}},{key:"resetViewableIndices",value:function(){this._viewableIndices=[]}},{key:"recordInteraction",value:function(){this._hasInteracted=!0}},{key:"_onUpdateSync",value:function(s,o,l){var h=this;s=s.filter(function(t){return h._viewableIndices.includes(t)});var u=this._viewableItems,c=new Map(s.map(function(t){var n=l(t,!0);return[n.key,n]})),f=[],v=c,b=Array.isArray(v),_=0;for(v=b?v:v["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var w;if(b){if(_>=v.length)break;w=v[_++]}else{if((_=v.next()).done)break;w=_.value}var y=n(w,2),I=y[0],p=y[1];u.has(I)||f.push(p)}var k=u,S=Array.isArray(k),T=0;for(k=S?k:k["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var A;if(S){if(T>=k.length)break;A=k[T++]}else{if((T=k.next()).done)break;A=T.value}var V=n(A,2),x=V[0],M=V[1];c.has(x)||f.push(t({},M,{isViewable:!1}))}f.length>0&&(this._viewableItems=c,o({viewableItems:Array.from(c.values()),changed:f,viewabilityConfig:this._config}))}}]),h})();function u(t,n,s,o,l,h){if(f(s,o,l))return!0;var u=c(s,o,l);return 100*(t?u/l:u/h)>=n}function c(t,n,s){var o=Math.min(n,s)-Math.max(t,0);return Math.max(0,o)}function f(t,n,s){return t>=0&&n<=s&&n>t}m.exports=h},266,[53,25,4,5,16]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]);function s(t,s,f){for(var l=[],o=0,u=0;u=t[c]&&(l[c]=u,o++,c===t.length-1))return n(o===t.length,'bad offsets input, should be in increasing order: %s',JSON.stringify(t)),l;return l}function f(t,n){return n.last-n.first+1-Math.max(0,1+Math.min(n.last,t.last)-Math.max(n.first,t.first))}var l={computeWindowedRenderLimits:function(n,l,o,u){var h=n.data,v=n.getItemCount,c=n.maxToRenderPerBatch,x=n.windowSize,M=v(h);if(0===M)return l;var w=u.offset,b=u.velocity,p=u.visibleLength,C=Math.max(0,w),O=C+p,y=(x-1)*p,L=b>1?'after':b<-1?'before':'none',R=Math.max(0,C-.5*y),S=Math.max(0,O+.5*y);if(o(M-1).offset=_);){var E=z>=c,F=N<=l.first||N>l.last,P=N>J&&(!E||!F),W=T>=l.last||T=N&&N>=0&&T=J&&T<=_&&N<=k.first&&T>=k.last))throw new Error('Bad window calculation '+JSON.stringify({first:N,last:T,itemCount:M,overscanFirst:J,overscanLast:_,visible:k}));return{first:N,last:T}},elementsThatOverlapOffsets:s,newRangeCount:f};m.exports=l},267,[25,16]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),s=r(d[1]);m.exports=s(t)},268,[269,246]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]),c=r(d[4]),u=(r(d[5]),r(d[6])),h=r(d[7]),l=r(d[8]),f=r(d[9]),p=s.ImageViewManager,w=l('RCTImageView');var v=function(n,o){var s,u,l=f(n.source)||{uri:void 0,width:void 0,height:void 0};if(Array.isArray(l))u=h([y.base,n.style])||{},s=l;else{var p=l.width,v=l.height,z=l.uri;u=h([{width:p,height:v},y.base,n.style])||{},s=[l],''===z&&console.warn('source.uri should not be an empty string')}var I=n.resizeMode||u.resizeMode||'cover',b=u.tintColor;if(null!=n.src&&console.warn('The component requires a `source` property rather than `src`.'),null!=n.children)throw new Error('The component cannot contain children. If you want to render content on top of the image, consider using the component or absolute positioning.');return c.createElement(w,t({},n,{ref:o,style:u,resizeMode:I,tintColor:b,source:s}))};(v=c.forwardRef(v)).displayName='Image',v.getSize=function(t,n,o){p.getSize(t,n,o||function(){console.warn('Failed to get size for image: '+t)})},v.getSizeWithHeaders=function(t,n,o,s){return p.getSizeWithHeaders({uri:t,headers:n}).then(function(t){o(t.width,t.height)}).catch(s||function(){console.warn('Failed to get size for image: '+t)})},v.prefetch=function(t){return p.prefetchImage(t)},v.queryCache=function(t){return n.async(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,n.awrap(p.queryCache(t));case 2:return o.abrupt("return",o.sent);case 3:case"end":return o.stop()}},null,this)},v.resolveAssetSource=f,v.propTypes=o;var y=u.create({base:{overflow:'hidden'}});m.exports=v},269,[24,270,272,23,59,92,62,89,184,179]); __d(function(g,r,i,a,m,e,d){m.exports=r(d[0])},270,[271]); __d(function(g,r,i,a,m,e,d){var t=(function(t){"use strict";var n,o=Object.prototype,c=o.hasOwnProperty,u="function"==typeof Symbol?Symbol:{},h=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function l(t,n,o,c){var u=n&&n.prototype instanceof E?n:E,h=Object.create(u.prototype),f=new A(c||[]);return h._invoke=F(t,o,f),h}function p(t,n,o){try{return{type:"normal",arg:t.call(n,o)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var y="suspendedStart",v="suspendedYield",w="executing",L="completed",x={};function E(){}function b(){}function _(){}var j={};j[h]=function(){return this};var O=Object.getPrototypeOf,k=O&&O(O(R([])));k&&k!==o&&c.call(k,h)&&(j=k);var G=_.prototype=E.prototype=Object.create(j);function N(t){["next","throw","return"].forEach(function(n){t[n]=function(t){return this._invoke(n,t)}})}function P(t){function n(o,u,h,f){var s=p(t[o],t,u);if("throw"!==s.type){var l=s.arg,y=l.value;return y&&"object"==typeof y&&c.call(y,"__await")?Promise.resolve(y.__await).then(function(t){n("next",t,h,f)},function(t){n("throw",t,h,f)}):Promise.resolve(y).then(function(t){l.value=t,h(l)},function(t){return n("throw",t,h,f)})}f(s.arg)}var o;this._invoke=function(t,c){function u(){return new Promise(function(o,u){n(t,c,o,u)})}return o=o?o.then(u,u):u()}}function F(t,n,o){var c=y;return function(u,h){if(c===w)throw new Error("Generator is already running");if(c===L){if("throw"===u)throw h;return Y()}for(o.method=u,o.arg=h;;){var f=o.delegate;if(f){var s=S(f,o);if(s){if(s===x)continue;return s}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(c===y)throw c=L,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);c=w;var l=p(t,n,o);if("normal"===l.type){if(c=o.done?L:v,l.arg===x)continue;return{value:l.arg,done:o.done}}"throw"===l.type&&(c=L,o.method="throw",o.arg=l.arg)}}}function S(t,o){var c=t.iterator[o.method];if(c===n){if(o.delegate=null,"throw"===o.method){if(t.iterator.return&&(o.method="return",o.arg=n,S(t,o),"throw"===o.method))return x;o.method="throw",o.arg=new TypeError("The iterator does not provide a 'throw' method")}return x}var u=p(c,t.iterator,o.arg);if("throw"===u.type)return o.method="throw",o.arg=u.arg,o.delegate=null,x;var h=u.arg;return h?h.done?(o[t.resultName]=h.value,o.next=t.nextLoc,"return"!==o.method&&(o.method="next",o.arg=n),o.delegate=null,x):h:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,x)}function T(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function I(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function R(t){if(t){var o=t[h];if(o)return o.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var u=-1,f=function o(){for(;++u=0;--h){var f=this.tryEntries[h],s=f.completion;if("root"===f.tryLoc)return u("end");if(f.tryLoc<=this.prev){var l=c.call(f,"catchLoc"),p=c.call(f,"finallyLoc");if(l&&p){if(this.prev=0;--o){var u=this.tryEntries[o];if(u.tryLoc<=this.prev&&c.call(u,"finallyLoc")&&this.prev=0;--n){var o=this.tryEntries[n];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),I(o),x}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc===t){var c=o.completion;if("throw"===c.type){var u=c.arg;I(o)}return u}}throw new Error("illegal catch attempt")},delegateYield:function(t,o,c){return this.delegate={iterator:R(t),resultName:o,nextLoc:c},"next"===this.method&&(this.arg=n),x}},t})("object"==typeof m?m.exports:{});try{regeneratorRuntime=t}catch(n){Function("r","regeneratorRuntime = r")(t)}},271,[]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),o=r(d[1]),t=r(d[2]),s=r(d[3]),c=r(d[4]);m.exports={style:s(t),source:o,defaultSource:c.oneOfType([c.shape({uri:c.string,width:c.number,height:c.number,scale:c.number}),c.number]),accessible:c.bool,accessibilityLabel:c.node,blurRadius:c.number,capInsets:n,resizeMethod:c.oneOf(['auto','resize','scale']),resizeMode:c.oneOf(['cover','contain','stretch','repeat','center']),testID:c.string,onLayout:c.func,onLoadStart:c.func,onProgress:c.func,onError:c.func,onPartialLoad:c.func,onLoad:c.func,onLoadEnd:c.func}},272,[201,273,67,202,71]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=n.shape({uri:n.string,bundle:n.string,method:n.string,headers:n.objectOf(n.string),body:n.string,cache:n.oneOf(['default','reload','force-cache','only-if-cached']),width:n.number,height:n.number,scale:n.number}),c=n.oneOfType([t,n.number,n.arrayOf(t)]);m.exports=c},273,[71]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),o=r(d[1]);m.exports=o(t,{scrollEventThrottle:1e-4})},274,[255,246]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),o=r(d[1]);m.exports=o(t,{scrollEventThrottle:1e-4})},275,[276,246]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),f=r(d[4]),p=r(d[5]),c=r(d[6]),l=(r(d[7]),r(d[8])),u=(r(d[9]),r(d[10])),R=c({},u.defaultProps,{stickySectionHeadersEnabled:!0}),h=(function(c){function R(){var t,s;n(this,R);for(var p=arguments.length,c=new Array(p),l=0;l0&&this.props.stickySectionHeadersEnabled&&(l+=this._listRef._getFrameMetricsApprox(o-t.itemIndex).length);var p=n({},t,{viewOffset:l,index:o});this._listRef.scrollToIndex(p)}},{key:"getListRef",value:function(){return this._listRef}}]),p(I,[{key:"UNSAFE_componentWillReceiveProps",value:function(t){this.setState(this._computeState(t))}},{key:"_computeState",value:function(t){var o=t.ListHeaderComponent?1:0,s=[],l=t.sections?t.sections.reduce(function(n,l){return s.push(n+o),n+t.getItemCount(l.data)+2},0):0;return{childProps:n({},t,{renderItem:this._renderItem,ItemSeparatorComponent:void 0,data:t.sections,getItemCount:function(){return l},getItem:function(n,o){return x(t,n,o)},keyExtractor:this._keyExtractor,onViewableItemsChanged:t.onViewableItemsChanged?this._onViewableItemsChanged:void 0,stickyHeaderIndices:t.stickySectionHeadersEnabled?s:void 0})}}},{key:"render",value:function(){return h.createElement(S,t({},this.state.childProps,{ref:this._captureRef}))}},{key:"_subExtractor",value:function(t){for(var n=t,o=this.props,s=o.getItem,l=o.getItemCount,p=o.keyExtractor,c=o.sections,u=0;u=l(f)+1)n-=l(f)+1;else return-1===n?{section:h,key:S+':header',index:null,header:!0,trailingSection:c[u+1]}:n===l(f)?{section:h,key:S+':footer',index:null,header:!1,trailingSection:c[u+1]}:{section:h,key:S+':'+(h.keyExtractor||p)(s(f,n),n),index:n,leadingItem:s(f,n-1),leadingSection:c[u-1],trailingItem:s(f,n+1),trailingSection:c[u+1]}}}},{key:"_getSeparatorComponent",value:function(t,n){if(!(n=n||this._subExtractor(t)))return null;var o=n.section.ItemSeparatorComponent||this.props.ItemSeparatorComponent,s=this.props.SectionSeparatorComponent,l=t===this.state.childProps.getItemCount()-1,p=n.index===this.props.getItemCount(n.section.data)-1;return s&&p?s:!o||p||l?null:o}}]),I})(h.PureComponent);I.defaultProps=n({},S.defaultProps,{data:[]});var _=(function(t){function u(){var t,p;o(this,u);for(var c=arguments.length,h=new Array(c),f=0;f10?o:10,update:{duration:o>10?o:10,type:f.Types[s]||'keyboard'}}),n.setState({bottom:u}))}else n.setState({bottom:0})},n._onLayout=function(t){n._frame=t.nativeEvent.layout,n._initialFrameHeight||(n._initialFrameHeight=n._frame.height)},n.state={bottom:0},n.viewRef=y.createRef(),n}return h(p,_),s(p,[{key:"_relativeKeyboardHeight",value:function(t){var n=this._frame;if(!n||!t)return 0;var o=t.screenY-this.props.keyboardVerticalOffset;return Math.max(n.y+n.height-o,0)}},{key:"componentDidMount",value:function(){this._subscriptions=[c.addListener('keyboardWillChangeFrame',this._onKeyboardChange)]}},{key:"componentWillUnmount",value:function(){this._subscriptions.forEach(function(t){t.remove()})}},{key:"render",value:function(){var o=this.props,s=o.behavior,l=o.children,u=o.contentContainerStyle,h=o.enabled,c=(o.keyboardVerticalOffset,o.style),f=n(o,["behavior","children","contentContainerStyle","enabled","keyboardVerticalOffset","style"]),_=h?this.state.bottom:0;switch(s){case'height':var p;return null!=this._frame&&this.state.bottom>0&&(p={height:this._initialFrameHeight-_,flex:0}),y.createElement(v,t({ref:this.viewRef,style:b.compose(c,p),onLayout:this._onLayout},f),l);case'position':return y.createElement(v,t({ref:this.viewRef,style:c,onLayout:this._onLayout},f),y.createElement(v,{style:b.compose(u,{bottom:_})},l));case'padding':return y.createElement(v,t({ref:this.viewRef,style:b.compose(c,{paddingBottom:_}),onLayout:this._onLayout},f),l);default:return y.createElement(v,t({ref:this.viewRef,onLayout:this._onLayout,style:c},f),l)}}}]),p})(y.Component);_.defaultProps={enabled:!0,keyboardVerticalOffset:0},m.exports=_},296,[24,55,4,5,6,9,10,259,261,57,59,62,90]); __d(function(g,r,i,a,m,e,d){var n=r(d[0]),t=n(r(d[1])),l=n(r(d[2])),s=n(r(d[3])),o=n(r(d[4])),u=n(r(d[5])),c=n(r(d[6])),f=n(r(d[7])),h=r(d[8]),p=r(d[9]),k=r(d[10]),v=(function(n){function v(){var n,t;(0,l.default)(this,v);for(var s=arguments.length,c=new Array(s),f=0;f=1&&(l=_.createElement(y,{style:o.style,allowFontScaling:o.allowFontScaling,maxFontSizeMultiplier:o.maxFontSizeMultiplier},l)),o.inputView&&(l=[l,o.inputView]),o.style.unshift(L.multilineInput),s=_.createElement(t,u({ref:this._setNativeRef},o,{children:l,onFocus:this._onFocus,onBlur:this._onBlur,onChange:this._onChange,onContentSizeChange:this.props.onContentSizeChange,onSelectionChange:this._onSelectionChange,onTextInput:this._onTextInput,onSelectionChangeShouldSetResponder:N,text:this._getText(),dataDetectorTypes:this.props.dataDetectorTypes,onScroll:this._onScroll}))}else s=_.createElement(n,u({ref:this._setNativeRef},o,{onFocus:this._onFocus,onBlur:this._onBlur,onChange:this._onChange,onSelectionChange:this._onSelectionChange,onSelectionChangeShouldSetResponder:N,text:this._getText()}));return _.createElement(I,{onLayout:o.onLayout,onPress:this._onPress,rejectResponderTermination:!0,accessible:o.accessible,accessibilityLabel:o.accessibilityLabel,accessibilityRole:o.accessibilityRole,accessibilityStates:o.accessibilityStates,accessibilityState:o.accessibilityState,nativeID:this.props.nativeID,testID:o.testID},s)},_renderIOS:function(){var s=u({},this.props);s.style=[this.props.style],s.selection&&null==s.selection.end&&(s.selection={start:s.selection.start,end:s.selection.start});var o=s.multiline?t:n;s.multiline&&s.style.unshift(L.multilineInput);var l=_.createElement(o,u({ref:this._setNativeRef},s,{onFocus:this._onFocus,onBlur:this._onBlur,onChange:this._onChange,onContentSizeChange:this.props.onContentSizeChange,onSelectionChange:this._onSelectionChange,onTextInput:this._onTextInput,onSelectionChangeShouldSetResponder:N,text:this._getText(),dataDetectorTypes:this.props.dataDetectorTypes,onScroll:this._onScroll}));return _.createElement(I,{onLayout:s.onLayout,onPress:this._onPress,rejectResponderTermination:s.rejectResponderTermination,accessible:s.accessible,accessibilityLabel:s.accessibilityLabel,accessibilityRole:s.accessibilityRole,accessibilityStates:s.accessibilityStates,accessibilityState:s.accessibilityState,nativeID:this.props.nativeID,testID:s.testID},l)},_renderAndroid:function(){var t=u({},this.props);t.style=[this.props.style],t.autoCapitalize=t.autoCapitalize||'sentences';var n=this.props.children,s=0;_.Children.forEach(n,function(){return++s}),R(!(this.props.value&&s),'Cannot specify both value and children.'),s>1&&(n=_.createElement(y,null,n)),t.selection&&null==t.selection.end&&(t.selection={start:t.selection.start,end:t.selection.start});var o=_.createElement(void 0,u({ref:this._setNativeRef},t,{mostRecentEventCount:0,onFocus:this._onFocus,onBlur:this._onBlur,onChange:this._onChange,onSelectionChange:this._onSelectionChange,onTextInput:this._onTextInput,text:this._getText(),children:n,disableFullscreenUI:this.props.disableFullscreenUI,textBreakStrategy:this.props.textBreakStrategy,onScroll:this._onScroll}));return _.createElement(I,{onLayout:t.onLayout,onPress:this._onPress,accessible:this.props.accessible,accessibilityLabel:this.props.accessibilityLabel,accessibilityRole:this.props.accessibilityRole,accessibilityStates:this.props.accessibilityStates,accessibilityState:this.props.accessibilityState,nativeID:this.props.nativeID,testID:this.props.testID},o)},_onFocus:function(t){this.props.onFocus&&this.props.onFocus(t),this.props.selectionState&&this.props.selectionState.focus()},_onPress:function(t){(this.props.editable||void 0===this.props.editable)&&this.focus()},_onChange:function(t){this._inputRef&&this._inputRef.setNativeProps&&S.setNativeProps(this._inputRef,{mostRecentEventCount:t.nativeEvent.eventCount});var n=t.nativeEvent.text;this.props.onChange&&this.props.onChange(t),this.props.onChangeText&&this.props.onChangeText(n),this._inputRef&&(this._lastNativeText=n,this.forceUpdate())},_onSelectionChange:function(t){this.props.onSelectionChange&&this.props.onSelectionChange(t),this._inputRef&&(this._lastNativeSelection=t.nativeEvent.selection,(this.props.selection||this.props.selectionState)&&this.forceUpdate())},componentDidUpdate:function(){var t={};this._lastNativeText!==this.props.value&&'string'==typeof this.props.value&&(t.text=this.props.value);var n=this.props.selection;this._lastNativeSelection&&n&&(this._lastNativeSelection.start!==n.start||this._lastNativeSelection.end!==n.end)&&(t.selection=this.props.selection),Object.keys(t).length>0&&this._inputRef&&this._inputRef.setNativeProps&&S.setNativeProps(this._inputRef,t),this.props.selectionState&&n&&this.props.selectionState.update(n.start,n.end)},_onBlur:function(t){this.blur(),this.props.onBlur&&this.props.onBlur(t),this.props.selectionState&&this.props.selectionState.blur()},_onTextInput:function(t){this.props.onTextInput&&this.props.onTextInput(t)},_onScroll:function(t){this.props.onScroll&&this.props.onScroll(t)}}),E=((function(t){function n(){return s(this,n),l(this,c(n).apply(this,arguments))}p(n,t),o(n,[{key:"clear",value:function(){}},{key:"isFocused",value:function(){}}])})(S.NativeComponent),D),L=v.create({multilineInput:{paddingTop:5}});m.exports=E},324,[4,5,6,9,10,24,325,328,280,57,59,92,62,199,204,165,281,77,282,16,184,18]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),o=r(d[1]),t=r(d[2]),l=r(d[3]),s=r(d[4]),c=r(d[5]),u=['phoneNumber','link','address','calendarEvent','none','all'];m.exports=n({},l,{autoCapitalize:o.oneOf(['none','sentences','words','characters']),autoCompleteType:o.oneOf(['cc-csc','cc-exp','cc-exp-month','cc-exp-year','cc-number','email','name','password','postal-code','street-address','tel','username','off']),autoCorrect:o.bool,spellCheck:o.bool,autoFocus:o.bool,allowFontScaling:o.bool,maxFontSizeMultiplier:o.number,editable:o.bool,keyboardType:o.oneOf(['default','email-address','numeric','phone-pad','number-pad','ascii-capable','numbers-and-punctuation','url','name-phone-pad','decimal-pad','twitter','web-search','visible-password']),keyboardAppearance:o.oneOf(['default','light','dark']),returnKeyType:o.oneOf(['done','go','next','search','send','none','previous','default','emergency-call','google','join','route','yahoo']),returnKeyLabel:o.string,maxLength:o.number,numberOfLines:o.number,disableFullscreenUI:o.bool,enablesReturnKeyAutomatically:o.bool,multiline:o.bool,textBreakStrategy:o.oneOf(['simple','highQuality','balanced']),onBlur:o.func,onFocus:o.func,onChange:o.func,onChangeText:o.func,onContentSizeChange:o.func,onTextInput:o.func,onEndEditing:o.func,onSelectionChange:o.func,onSubmitEditing:o.func,onKeyPress:o.func,onLayout:o.func,onScroll:o.func,placeholder:o.string,placeholderTextColor:t,scrollEnabled:o.bool,secureTextEntry:o.bool,selectionColor:t,selectionState:o.instanceOf(s),selection:o.shape({start:o.number.isRequired,end:o.number}),value:o.string,defaultValue:o.string,clearButtonMode:o.oneOf(['never','while-editing','unless-editing','always']),clearTextOnFocus:o.bool,selectTextOnFocus:o.bool,blurOnSubmit:o.bool,style:c.propTypes.style,underlineColorAndroid:t,inlineImageLeft:o.string,inlineImagePadding:o.number,rejectResponderTermination:o.bool,dataDetectorTypes:o.oneOfType([o.oneOf(u),o.arrayOf(o.oneOf(u))]),caretHidden:o.bool,contextMenuHidden:o.bool,inputAccessoryViewID:o.string,textContentType:o.oneOf(['none','URL','addressCity','addressCityAndState','addressState','countryName','creditCardNumber','emailAddress','familyName','fullStreetAddress','givenName','jobTitle','location','middleName','name','namePrefix','nameSuffix','nickname','organizationName','postalCode','streetAddressLine1','streetAddressLine2','sublocality','telephoneNumber','username','password','newPassword','oneTimeCode']),showSoftInputOnFocus:o.bool})},325,[53,71,68,326,328,199]); __d(function(g,r,i,a,m,e,d){'use strict';var o=r(d[0]),n=r(d[1]),s=r(d[2]),t=r(d[3]),c=r(d[4]),l=r(d[5]),b=r(d[6]),u=b.DeprecatedAccessibilityRoles,p=b.DeprecatedAccessibilityStates,f=s(t);m.exports=o({accessible:l.bool,accessibilityLabel:l.node,accessibilityHint:l.string,accessibilityActions:l.arrayOf(l.string),accessibilityIgnoresInvertColors:l.bool,accessibilityRole:l.oneOf(u),accessibilityStates:l.arrayOf(l.oneOf(p)),accessibilityState:l.object,accessibilityLiveRegion:l.oneOf(['none','polite','assertive']),importantForAccessibility:l.oneOf(['auto','yes','no','no-hide-descendants']),accessibilityViewIsModal:l.bool,accessibilityElementsHidden:l.bool,onAccessibilityAction:l.func,onAccessibilityTap:l.func,onMagicTap:l.func,testID:l.string,nativeID:l.string,onResponderGrant:l.func,onResponderMove:l.func,onResponderReject:l.func,onResponderRelease:l.func,onResponderTerminate:l.func,onResponderTerminationRequest:l.func,onStartShouldSetResponder:l.func,onStartShouldSetResponderCapture:l.func,onMoveShouldSetResponder:l.func,onMoveShouldSetResponderCapture:l.func,hitSlop:n,onLayout:l.func,pointerEvents:l.oneOf(['box-none','none','box-only','auto']),style:f,removeClippedSubviews:l.bool,renderToHardwareTextureAndroid:l.bool,shouldRasterizeIOS:l.bool,collapsable:l.bool,needsOffscreenAlphaCompositing:l.bool},c)},326,[53,201,202,83,327,71,287]); __d(function(g,r,i,a,m,e,d){'use strict'},327,[]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),s=r(d[1]),f=r(d[2]),u=(function(){function f(s,u){t(this,f),this._anchorOffset=s,this._focusOffset=u,this._hasFocus=!1}return s(f,[{key:"update",value:function(t,s){this._anchorOffset===t&&this._focusOffset===s||(this._anchorOffset=t,this._focusOffset=s,this.emit('update'))}},{key:"constrainLength",value:function(t){this.update(Math.min(this._anchorOffset,t),Math.min(this._focusOffset,t))}},{key:"focus",value:function(){this._hasFocus||(this._hasFocus=!0,this.emit('focus'))}},{key:"blur",value:function(){this._hasFocus&&(this._hasFocus=!1,this.emit('blur'))}},{key:"hasFocus",value:function(){return this._hasFocus}},{key:"isCollapsed",value:function(){return this._anchorOffset===this._focusOffset}},{key:"isBackward",value:function(){return this._anchorOffset>this._focusOffset}},{key:"getAnchorOffset",value:function(){return this._hasFocus?this._anchorOffset:null}},{key:"getFocusOffset",value:function(){return this._hasFocus?this._focusOffset:null}},{key:"getStartOffset",value:function(){return this._hasFocus?Math.min(this._anchorOffset,this._focusOffset):null}},{key:"getEndOffset",value:function(){return this._hasFocus?Math.max(this._anchorOffset,this._focusOffset):null}},{key:"overlaps",value:function(t,s){return this.hasFocus()&&this.getStartOffset()<=s&&t<=this.getEndOffset()}}]),f})();f(u,{blur:!0,focus:!0,update:!0}),m.exports=u},328,[4,5,329]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),s=r(d[2]),_=r(d[3]),o=r(d[4]),v=r(d[5])({__types:!0});var E={emit:function(t,n,s,_,o,v,E){return this.__getEventEmitter().emit(t,n,s,_,o,v,E)},emitAndHold:function(t,n,s,_,o,v,E){return this.__getEventEmitter().emitAndHold(t,n,s,_,o,v,E)},addListener:function(t,n,s){return this.__getEventEmitter().addListener(t,n,s)},once:function(t,n,s){return this.__getEventEmitter().once(t,n,s)},addRetroactiveListener:function(t,n,s){return this.__getEventEmitter().addRetroactiveListener(t,n,s)},addListenerMap:function(t,n){return this.__getEventEmitter().addListenerMap(t,n)},addRetroactiveListenerMap:function(t,n){return this.__getEventEmitter().addListenerMap(t,n)},removeAllListeners:function(){this.__getEventEmitter().removeAllListeners()},removeCurrentListener:function(){this.__getEventEmitter().removeCurrentListener()},releaseHeldEventType:function(t){this.__getEventEmitter().releaseHeldEventType(t)},__getEventEmitter:function(){if(!this.__eventEmitter){var t=new n,o=new _;this.__eventEmitter=new s(t,o)}return this.__eventEmitter}};m.exports=function(n,s){o(s,'Must supply set of valid event types');var _=n.prototype||n;o(!_.__eventEmitter,'An active emitter is already mixed in');var u=n.constructor;u&&o(u===Object||u===Function,'Mix EventEmitter into a class, not an instance'),_.hasOwnProperty(v)?t(_.__types,s):_.__types?_.__types=t({},_.__types,s):_.__types=s,t(_,E)}},329,[24,48,330,331,16,332]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),s=(function(){function s(n,l){t(this,s),this._emitter=n,this._eventHolder=l,this._currentEventToken=null,this._emittingHeldEvents=!1}return n(s,[{key:"addListener",value:function(t,n,s){return this._emitter.addListener(t,n,s)}},{key:"once",value:function(t,n,s){return this._emitter.once(t,n,s)}},{key:"addRetroactiveListener",value:function(t,n,s){var l=this._emitter.addListener(t,n,s);return this._emittingHeldEvents=!0,this._eventHolder.emitToListener(t,n,s),this._emittingHeldEvents=!1,l}},{key:"removeAllListeners",value:function(t){this._emitter.removeAllListeners(t)}},{key:"removeCurrentListener",value:function(){this._emitter.removeCurrentListener()}},{key:"listeners",value:function(t){return this._emitter.listeners(t)}},{key:"emit",value:function(t){for(var n,s=arguments.length,l=new Array(s>1?s-1:0),o=1;o1?l-1:0),u=1;u1?v-1:0),u=1;u=n.length)break;_=n[x++]}else{if((x=n.next()).done)break;_=x.value}var b=_,y=(0,u.default)(b,2),S=y[0],v=y[1];l[S]=v()}var p={},k=t._fileSources,D=Array.isArray(k),E=0;for(k=D?k:k["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var h;if(D){if(E>=k.length)break;h=k[E++]}else{if((E=k.next()).done)break;h=E.value}var B=h,A=(0,u.default)(B,2),R=A[0],w=A[1];p[R]=w()}return f('BugReporting extraData:',l),null!=o.default&&null!=o.default.setExtraData&&o.default.setExtraData(l,p),null!=c.default&&null!=c.default.setExtraData&&c.default.setExtraData(l,'From BugReporting.js'),{extras:l,files:p}}}]),t})();_._extraSources=new Map,_._fileSources=new Map,_._subscription=null,_._redboxSubscription=null,m.exports=_},339,[3,25,4,5,340,341,45,156,342]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=t(r(d[1])).get('BugReporting');e.default=u},340,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=t(r(d[1])).get('RedBox');e.default=u},341,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';m.exports=function(){try{return"React tree dumps have been temporarily disabled while React is upgraded to Fiber."}catch(t){return'Failed to dump react tree: '+t}}},342,[]); __d(function(g,r,i,a,m,e,d){'use strict';var n=[],t={name:'default'},c={setActiveScene:function(c){t=c,n.forEach(function(n){return n(t)})},getActiveScene:function(){return t},addActiveSceneChangedListener:function(t){return n.push(t),{remove:function(){n=n.filter(function(n){return t!==n})}}}};m.exports=c},343,[]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=t(r(d[1])),l=t(r(d[2])),o=t(r(d[3])),c=r(d[4]),p=r(d[5]),u=r(d[6]),s=r(d[7]);r(d[8]),m.exports=function(t,f,v,_,E,T,x){var A;s(v,'Expect to have a valid rootTag, instead got ',v);var R=p.createElement(o.default.Provider,{value:null!=(A=x)?A:l.default},p.createElement(c,{rootTag:v,WrapperComponent:_},p.createElement(t,(0,n.default)({},f,{rootTag:v})),!0===E&&!0===T?p.createElement(u,null):null));l.default.startTimespan('renderApplication_React_render'),E?r(d[9]).render(R,v):r(d[10]).render(R,v),l.default.stopTimespan('renderApplication_React_render')}},344,[3,24,154,345,302,59,346,16,347,348,92]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),c=r(d[1])(r(d[2])),n=t(r(d[3])),o=c.createContext(n.default);m.exports=o},345,[3,2,59,154]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),o=r(d[2]),c=r(d[3]);var f=n.create({container:{alignItems:'center',justifyContent:'center',backgroundColor:'rgba(0,0,0, 0.25)',position:'absolute',top:0,right:0,padding:2},text:{fontSize:6,color:'#ffffff'}});m.exports=function(){return t.createElement(c,{style:f.container},t.createElement(o,{style:f.text},"FABRIC"))}},346,[59,62,199,90]); __d(function(g,r,i,a,m,e,d){'use strict';var n,t=r(d[0]),o=r(d[1]);function v(){}if(t.isTV){var u=new o,f=new Set;u.enable(this,function(t,o){if(o&&'menu'===o.eventType){for(var v=!0,u=Array.from(f.values()).reverse(),s=0;sthis.eventPool.length&&this.eventPool.push(e)}function G(e){e.eventPool=[],e.getPooled=q,e.release=$}o(X.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Y)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Y)},persist:function(){this.isPersistent=Y},isPersistent:V,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=V,this._dispatchInstances=this._dispatchListeners=null}}),X.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},X.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,G(n),n},G(X);var J=X.extend({touchHistory:function(){return null}});function K(e){return"topTouchStart"===e}function Z(e){return"topTouchMove"===e}var ee=["topTouchStart"],te=["topTouchMove"],ne=["topTouchCancel","topTouchEnd"],re=[],ie={touchBank:re,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0};function le(e){return e.timeStamp||e.timestamp}function ae(e){if(null==(e=e.identifier))throw f(Error("Touch object is missing identifier."));return e}function oe(e){var t=ae(e),n=re[t];n?(n.touchActive=!0,n.startPageX=e.pageX,n.startPageY=e.pageY,n.startTimeStamp=le(e),n.currentPageX=e.pageX,n.currentPageY=e.pageY,n.currentTimeStamp=le(e),n.previousPageX=e.pageX,n.previousPageY=e.pageY,n.previousTimeStamp=le(e)):(n={touchActive:!0,startPageX:e.pageX,startPageY:e.pageY,startTimeStamp:le(e),currentPageX:e.pageX,currentPageY:e.pageY,currentTimeStamp:le(e),previousPageX:e.pageX,previousPageY:e.pageY,previousTimeStamp:le(e)},re[t]=n),ie.mostRecentTimeStamp=le(e)}function ue(e){var t=re[ae(e)];t?(t.touchActive=!0,t.previousPageX=t.currentPageX,t.previousPageY=t.currentPageY,t.previousTimeStamp=t.currentTimeStamp,t.currentPageX=e.pageX,t.currentPageY=e.pageY,t.currentTimeStamp=le(e),ie.mostRecentTimeStamp=le(e)):console.warn("Cannot record touch move without a touch start.\nTouch Move: %s\n","Touch Bank: %s",se(e),fe())}function ce(e){var t=re[ae(e)];t?(t.touchActive=!1,t.previousPageX=t.currentPageX,t.previousPageY=t.currentPageY,t.previousTimeStamp=t.currentTimeStamp,t.currentPageX=e.pageX,t.currentPageY=e.pageY,t.currentTimeStamp=le(e),ie.mostRecentTimeStamp=le(e)):console.warn("Cannot record touch end without a touch start.\nTouch End: %s\n","Touch Bank: %s",se(e),fe())}function se(e){return JSON.stringify({identifier:e.identifier,pageX:e.pageX,pageY:e.pageY,timestamp:le(e)})}function fe(){var e=JSON.stringify(re.slice(0,20));return 20 component."));return n=St,St+=2,{node:ct(n,"RCTRawText",t,{text:e},r)}}var Pt=setTimeout,Ct=clearTimeout;function _t(e){var t=e.node,n=Ke(null,Ye,{style:{display:"none"}},e.canonical.viewConfig.validAttributes);return{node:pt(t,n),canonical:e.canonical}}var Rt=/^(.*)[\\\/]/;function Nt(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,l=Oe(e.type);n=null,r&&(n=Oe(r.type)),r=l,l="",i?l=" (at "+i.fileName.replace(Rt,"")+":"+i.lineNumber+")":n&&(l=" (created by "+n+")"),n="\n in "+(r||"Unknown")+l}t+=n,e=e.return}while(e);return t}new Set;var It=[],zt=-1;function Ut(e){0>zt||(e.current=It[zt],It[zt]=null,zt--)}function Mt(e,t){It[++zt]=e.current,e.current=t}var At={},Dt={current:At},Ft={current:!1},jt=At;function Ot(e,t){var n=e.type.contextTypes;if(!n)return At;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,l={};for(i in n)l[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Wt(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ht(e){Ut(Ft),Ut(Dt)}function Bt(e){Ut(Ft),Ut(Dt)}function Qt(e,t,n){if(Dt.current!==At)throw f(Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue."));Mt(Dt,t),Mt(Ft,n)}function Lt(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw f(Error((Oe(t)||"Unknown")+'.getChildContext(): key "'+i+'" is not defined in childContextTypes.'));return o({},n,r)}function Yt(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||At,jt=Dt.current,Mt(Dt,t),Mt(Ft,Ft.current),!0}function Vt(e,t,n){var r=e.stateNode;if(!r)throw f(Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue."));n?(t=Lt(e,t,jt),r.__reactInternalMemoizedMergedChildContext=t,Ut(Ft),Ut(Dt),Mt(Dt,t)):Ut(Ft),Mt(Ft,n)}var Xt=s.unstable_runWithPriority,qt=s.unstable_scheduleCallback,$t=s.unstable_cancelCallback,Gt=s.unstable_shouldYield,Jt=s.unstable_requestPaint,Kt=s.unstable_now,Zt=s.unstable_getCurrentPriorityLevel,en=s.unstable_ImmediatePriority,tn=s.unstable_UserBlockingPriority,nn=s.unstable_NormalPriority,rn=s.unstable_LowPriority,ln=s.unstable_IdlePriority,an={},on=void 0!==Jt?Jt:function(){},un=null,cn=null,sn=!1,fn=Kt(),dn=1e4>fn?Kt:function(){return Kt()-fn};function pn(){switch(Zt()){case en:return 99;case tn:return 98;case nn:return 97;case rn:return 96;case ln:return 95;default:throw f(Error("Unknown priority level."))}}function hn(e){switch(e){case 99:return en;case 98:return tn;case 97:return nn;case 96:return rn;case 95:return ln;default:throw f(Error("Unknown priority level."))}}function mn(e,t){return e=hn(e),Xt(e,t)}function gn(e,t,n){return e=hn(e),qt(e,t,n)}function yn(e){return null===un?(un=[e],cn=qt(en,bn)):un.push(e),an}function vn(){null!==cn&&$t(cn),bn()}function bn(){if(!sn&&null!==un){sn=!0;var e=0;try{var t=un;mn(99,function(){for(;e=(e=10*(1073741821-t)-10*(1073741821-e))?99:250>=e?98:5250>=e?97:95}function En(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var xn=Object.prototype.hasOwnProperty;function Sn(e,t){if(En(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r=t&&(hi=!0),e.firstContext=null)}function An(e,t){if(Rn!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Rn=e,t=1073741823),t={context:e,observedBits:t,next:null},null===_n){if(null===Cn)throw f(Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."));_n=t,Cn.dependencies={expirationTime:0,firstContext:t,responders:null}}else _n=_n.next=t;return e._currentValue2}var Dn=!1;function Fn(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function jn(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function On(e,t){return{expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Wn(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function Hn(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,i=null;null===r&&(r=e.updateQueue=Fn(e.memoizedState))}else r=e.updateQueue,i=n.updateQueue,null===r?null===i?(r=e.updateQueue=Fn(e.memoizedState),i=n.updateQueue=Fn(n.memoizedState)):r=e.updateQueue=jn(i):null===i&&(i=n.updateQueue=jn(r));null===i||r===i?Wn(r,t):null===r.lastUpdate||null===i.lastUpdate?(Wn(r,t),Wn(i,t)):(Wn(r,t),i.lastUpdate=t)}function Bn(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=Fn(e.memoizedState):Qn(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function Qn(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=jn(t)),t}function Ln(e,t,n,r,i,l){switch(n.tag){case 1:return"function"==typeof(e=n.payload)?e.call(l,r,i):e;case 3:e.effectTag=-2049&e.effectTag|64;case 0:if(null===(i="function"==typeof(e=n.payload)?e.call(l,r,i):e)||void 0===i)break;return o({},r,i);case 2:Dn=!0}return r}function Yn(e,t,n,r,i){Dn=!1;for(var l=(t=Qn(e,t)).baseState,a=null,o=0,u=t.firstUpdate,c=l;null!==u;){var s=u.expirationTime;sm?(g=f,f=null):g=f.sibling;var y=p(i,f,o[m],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(i,f),a=l(y,a,m),null===s?c=y:s.sibling=y,s=y,f=g}if(m===o.length)return n(i,f),c;if(null===f){for(;mg?(y=m,m=null):y=m.sibling;var b=p(i,m,v.value,u);if(null===b){null===m&&(m=y);break}e&&m&&null===b.alternate&&t(i,m),a=l(b,a,g),null===s?c=b:s.sibling=b,s=b,m=y}if(v.done)return n(i,m),c;if(null===m){for(;!v.done;g++,v=o.next())null!==(v=d(i,v.value,u))&&(a=l(v,a,g),null===s?c=v:s.sibling=v,s=v);return c}for(m=r(i,m);!v.done;g++,v=o.next())null!==(v=h(m,i,g,v.value,u))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),a=l(v,a,g),null===s?c=v:s.sibling=v,s=v);return e&&m.forEach(function(e){return t(i,e)}),c}return function(e,r,l,o){var u="object"==typeof l&&null!==l&&l.type===Pe&&null===l.key;u&&(l=l.props.children);var c="object"==typeof l&&null!==l;if(c)switch(l.$$typeof){case we:e:{for(c=l.key,u=r;null!==u;){if(u.key===c){if(7===u.tag?l.type===Pe:u.elementType===l.type){n(e,u.sibling),(r=i(u,l.type===Pe?l.props.children:l.props)).ref=rr(e,u,l),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}l.type===Pe?((r=oa(l.props.children,e.mode,o,l.key)).return=e,e=r):((o=aa(l.type,l.key,l.props,null,e.mode,o)).ref=rr(e,r,l),o.return=e,e=o)}return a(e);case ke:e:{for(u=l.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===l.containerInfo&&r.stateNode.implementation===l.implementation){n(e,r.sibling),(r=i(r,l.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=ca(l,e.mode,o)).return=e,e=r}return a(e)}if("string"==typeof l||"number"==typeof l)return l=""+l,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,l)).return=e,e=r):(n(e,r),(r=ua(l,e.mode,o)).return=e,e=r),a(e);if(nr(l))return m(e,r,l,o);if(je(l))return g(e,r,l,o);if(c&&ir(e,l),void 0===l&&!u)switch(e.tag){case 1:case 0:throw e=e.type,f(Error((e.displayName||e.name||"Component")+"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null."))}return n(e,r)}}var ar=lr(!0),or=lr(!1),ur={},cr={current:ur},sr={current:ur},fr={current:ur};function dr(e){if(e===ur)throw f(Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."));return e}function pr(e,t){Mt(fr,t),Mt(sr,e),Mt(cr,ur),Ut(cr),Mt(cr,{isInAParentText:!1})}function hr(e){Ut(cr),Ut(sr),Ut(fr)}function mr(e){dr(fr.current);var t=dr(cr.current),n=e.type;n="AndroidTextInput"===n||"RCTMultilineTextInputView"===n||"RCTSinglelineTextInputView"===n||"RCTText"===n||"RCTVirtualText"===n,t!==(n=t.isInAParentText!==n?{isInAParentText:n}:t)&&(Mt(sr,e),Mt(cr,n))}function gr(e){sr.current===e&&(Ut(cr),Ut(sr))}var yr=1,vr=1,br=2,Tr={current:0};function Er(e){for(var t=e;null!==t;){if(13===t.tag){if(null!==t.memoizedState)return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function xr(e,t){return{responder:e,props:t}}var Sr=0,wr=2,kr=4,Pr=8,Cr=16,_r=32,Rr=64,Nr=128,Ir=xe.ReactCurrentDispatcher,zr=0,Ur=null,Mr=null,Ar=null,Dr=null,Fr=null,jr=null,Or=0,Wr=null,Hr=0,Br=!1,Qr=null,Lr=0;function Yr(){throw f(Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem."))}function Vr(e,t){if(null===t)return!1;for(var n=0;nOr&&(Or=s)):(Wl(s,u.suspenseConfig),l=u.eagerReducer===e?u.eagerState:e(l,u.action)),a=u,u=u.next}while(null!==u&&u!==r);c||(o=a,i=l),En(l,t.memoizedState)||(hi=!0),t.memoizedState=l,t.baseUpdate=o,t.baseState=i,n.lastRenderedState=l}return[t.memoizedState,n.dispatch]}function Zr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===Wr?(Wr={lastEffect:null}).lastEffect=e.next=e:null===(t=Wr.lastEffect)?Wr.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,Wr.lastEffect=e),e}function ei(e,t,n,r){var i=$r();Hr|=e,i.memoizedState=Zr(t,n,void 0,void 0===r?null:r)}function ti(e,t,n,r){var i=Gr();r=void 0===r?null:r;var l=void 0;if(null!==Mr){var a=Mr.memoizedState;if(l=a.destroy,null!==r&&Vr(r,a.deps))return void Zr(Sr,n,l,r)}Hr|=e,i.memoizedState=Zr(t,n,l,r)}function ni(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ri(){}function ii(e,t,n){if(!(25>Lr))throw f(Error("Too many re-renders. React limits the number of renders to prevent an infinite loop."));var r=e.alternate;if(e===Ur||null!==r&&r===Ur)if(Br=!0,e={expirationTime:zr,suspenseConfig:null,action:n,eagerReducer:null,eagerState:null,next:null},null===Qr&&(Qr=new Map),void 0===(n=Qr.get(t)))Qr.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{var i=Nl(),l=qn.suspense;l={expirationTime:i=Il(i,e,l),suspenseConfig:l,action:n,eagerReducer:null,eagerState:null,next:null};var a=t.last;if(null===a)l.next=l;else{var o=a.next;null!==o&&(l.next=o),a.next=l}if(t.last=l,0===e.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=t.lastRenderedReducer))try{var u=t.lastRenderedState,c=r(u,n);if(l.eagerReducer=r,l.eagerState=c,En(c,u))return}catch(e){}zl(e,i)}}var li={readContext:An,useCallback:Yr,useContext:Yr,useEffect:Yr,useImperativeHandle:Yr,useLayoutEffect:Yr,useMemo:Yr,useReducer:Yr,useRef:Yr,useState:Yr,useDebugValue:Yr,useResponder:Yr},ai={readContext:An,useCallback:function(e,t){return $r().memoizedState=[e,void 0===t?null:t],e},useContext:An,useEffect:function(e,t){return ei(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ei(4,36,ni.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ei(4,36,e,t)},useMemo:function(e,t){var n=$r();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$r();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ii.bind(null,Ur,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},$r().memoizedState=e},useState:function(e){var t=$r();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,lastRenderedReducer:Jr,lastRenderedState:e}).dispatch=ii.bind(null,Ur,e),[t.memoizedState,e]},useDebugValue:ri,useResponder:xr},oi={readContext:An,useCallback:function(e,t){var n=Gr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Vr(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},useContext:An,useEffect:function(e,t){return ti(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ti(4,36,ni.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ti(4,36,e,t)},useMemo:function(e,t){var n=Gr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Vr(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:Kr,useRef:function(){return Gr().memoizedState},useState:function(e){return Kr(Jr)},useDebugValue:ri,useResponder:xr},ui=null,ci=null,si=!1;function fi(e,t){switch(e.tag){case 5:return null!==(t=ot(e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=ot(e.pendingProps))&&(e.stateNode=t,!0);case 13:default:return!1}}function di(e){if(si){var t=ci;if(t){var n=t;if(!fi(e,t)){if(!(t=ot())||!fi(e,t))return e.effectTag|=2,si=!1,void(ui=e);var r=ui,i=na(5,null,null,0);i.elementType="DELETED",i.type="DELETED",i.stateNode=n,i.return=r,i.effectTag=8,null!==r.lastEffect?(r.lastEffect.nextEffect=i,r.lastEffect=i):r.firstEffect=r.lastEffect=i}ui=e,ci=ot()}else e.effectTag|=2,si=!1,ui=e}}var pi=xe.ReactCurrentOwner,hi=!1;function mi(e,t,n,r){t.child=null===e?or(t,null,n,r):ar(t,e.child,n,r)}function gi(e,t,n,r,i){n=n.render;var l=t.ref;return Mn(t,i),r=Xr(e,t,n,r,l,i),null===e||hi?(t.effectTag|=1,mi(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),_i(e,t,i))}function yi(e,t,n,r,i,l){if(null===e){var a=n.type;return"function"!=typeof a||ra(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=aa(n.type,null,r,null,t.mode,l)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,vi(e,t,a,r,i,l))}return a=e.child,it)&&Pl.set(e,t))}}function Ul(e,t){e.expirationTimei.firstPendingTime&&(i.firstPendingTime=t),0===(e=i.lastPendingTime)||t=t)&&(gn(97,function(){return n._onComplete(),null}),!0)}function Fl(){if(null!==Pl){var e=Pl;Pl=null,e.forEach(function(e,t){yn(Ol.bind(null,t,e))}),vn()}}function jl(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Ct(n)),null!==cl)for(n=cl.return;null!==n;){var r=n;switch(r.tag){case 1:var i=r.type.childContextTypes;null!==i&&void 0!==i&&Ht();break;case 3:hr(),Bt();break;case 5:gr(r);break;case 4:hr();break;case 13:case 19:Ut(Tr);break;case 10:zn(r)}n=n.return}ul=e,cl=la(e.current,null),sl=t,fl=nl,pl=dl=1073741823,hl=null,ml=!1}function Ol(e,t,n){if((48&ol)!==Ki)throw f(Error("Should not already be working."));if(e.firstPendingTime component higher in the tree to provide a loading indicator or placeholder to display."+Nt(u))}fl!==al&&(fl=rl),c=Di(c,u),u=o;do{switch(u.tag){case 3:u.effectTag|=2048,u.expirationTime=s,Bn(u,s=Xi(u,c,s));break e;case 1:if(d=c,a=u.type,o=u.stateNode,0==(64&u.effectTag)&&("function"==typeof a.getDerivedStateFromError||null!==o&&"function"==typeof o.componentDidCatch&&(null===El||!El.has(o)))){u.effectTag|=2048,u.expirationTime=s,Bn(u,s=qi(u,d,s));break e}}u=u.return}while(null!==u)}cl=Bl(l)}if(ol=r,Nn(),Gi.current=i,null!==cl)return Ol.bind(null,e,t)}if(e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Dl(e,t))return null;switch(ul=null,fl){case nl:throw f(Error("Should have a work-in-progress."));case rl:return(r=e.lastPendingTime)(n=r-n)&&(n=0),t<(n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*$i(n/1960))-n)&&(n=t)),10=(t=0|(i=hl).busyMinDurationMs)?t=0:(n=0|i.busyDelayMs,t=(r=dn()-(10*(1073741821-r)-(0|i.timeoutMs||5e3)))<=n?0:n+t-r),10i.tailExpiration&&1r&&(r=l),a>r&&(r=a),i=i.sibling;n.childExpirationTime=r}if(null!==t)return t;null!==e&&0==(1024&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=cl.firstEffect),null!==cl.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=cl.firstEffect),e.lastEffect=cl.lastEffect),1i?l:i,e.firstPendingTime=i,i=n?ki(e,t,n):(Mt(Tr,Tr.current&yr),null!==(t=_i(e,t,n))?t.sibling:null);Mt(Tr,Tr.current&yr);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Ci(e,t,n);t.effectTag|=64}var i=t.memoizedState;if(null!==i&&(i.rendering=null,i.tail=null),Mt(Tr,Tr.current),!r)return null}return _i(e,t,n)}}else hi=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=Ot(t,Dt.current),Mn(t,n),i=Xr(null,t,r,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,qr(),Wt(r)){var l=!0;Yt(t)}else l=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null;var a=r.getDerivedStateFromProps;"function"==typeof a&&Gn(t,r,a,e),i.updater=Jn,t.stateNode=i,i._reactInternalFiber=t,tr(t,r,e,n),t=xi(null,t,r,!0,l,n)}else t.tag=0,mi(null,t,i,n),t=t.child;return t;case 16:switch(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=kn(i),t.type=i,l=t.tag=ia(i),e=wn(i,e),l){case 0:t=Ti(null,t,i,e,n);break;case 1:t=Ei(null,t,i,e,n);break;case 11:t=gi(null,t,i,e,n);break;case 14:t=yi(null,t,i,wn(i.type,e),r,n);break;default:throw f(Error("Element type is invalid. Received a promise that resolves to: "+i+". Lazy element type must resolve to a class or function."))}return t;case 0:return r=t.type,i=t.pendingProps,Ti(e,t,r,i=t.elementType===r?i:wn(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ei(e,t,r,i=t.elementType===r?i:wn(r,i),n);case 3:if(Si(t),null===(r=t.updateQueue))throw f(Error("If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."));return i=null!==(i=t.memoizedState)?i.element:null,Yn(t,r,t.pendingProps,null,n),(r=t.memoizedState.element)===i?t=_i(e,t,n):(mi(e,t,r,n),t=t.child),t;case 5:return mr(t),null===e&&di(t),r=t.pendingProps.children,bi(e,t),mi(e,t,r,n),t.child;case 6:return null===e&&di(t),null;case 13:return ki(e,t,n);case 4:return pr(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ar(t,null,r,n):mi(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,gi(e,t,r,i=t.elementType===r?i:wn(r,i),n);case 7:return mi(e,t,t.pendingProps,n),t.child;case 8:case 12:return mi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,In(t,l=i.value),null!==a){var o=a.value;if(0===(l=En(o,l)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(o,l):1073741823))){if(a.children===i.children&&!Ft.current){t=_i(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var u=o.dependencies;if(null!==u){a=o.child;for(var c=u.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&l)){1===o.tag&&((c=On(n,null)).tag=2,Hn(o,c)),o.expirationTimeo&&(s+=c&&u?v.currentPageX:c&&!u?v.currentPageY:!c&&u?v.previousPageX:v.previousPageY,h=1);else for(var C=0;C=o){s+=c&&u?l.currentPageX:c&&!u?l.currentPageY:!c&&u?l.previousPageX:l.previousPageY,h++}}return h>0?s/h:n.noCentroid},currentCentroidXOfTouchesChangedAfter:function(t,o){return n.centroidDimension(t,o,!0,!0)},currentCentroidYOfTouchesChangedAfter:function(t,o){return n.centroidDimension(t,o,!1,!0)},previousCentroidXOfTouchesChangedAfter:function(t,o){return n.centroidDimension(t,o,!0,!1)},previousCentroidYOfTouchesChangedAfter:function(t,o){return n.centroidDimension(t,o,!1,!1)},currentCentroidX:function(t){return n.centroidDimension(t,0,!0,!0)},currentCentroidY:function(t){return n.centroidDimension(t,0,!1,!0)},noCentroid:-1};m.exports=n},364,[]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),s=n(r(d[1])),o=n(r(d[2])),t=n(r(d[3])),E=n(r(d[4])),A=n(r(d[5])),u=n(r(d[6])),_=n(r(d[7])),S=(r(d[8]),Object.freeze({GRANTED:'granted',DENIED:'denied',NEVER_ASK_AGAIN:'never_ask_again'})),l=Object.freeze({READ_CALENDAR:'android.permission.READ_CALENDAR',WRITE_CALENDAR:'android.permission.WRITE_CALENDAR',CAMERA:'android.permission.CAMERA',READ_CONTACTS:'android.permission.READ_CONTACTS',WRITE_CONTACTS:'android.permission.WRITE_CONTACTS',GET_ACCOUNTS:'android.permission.GET_ACCOUNTS',ACCESS_FINE_LOCATION:'android.permission.ACCESS_FINE_LOCATION',ACCESS_COARSE_LOCATION:'android.permission.ACCESS_COARSE_LOCATION',RECORD_AUDIO:'android.permission.RECORD_AUDIO',READ_PHONE_STATE:'android.permission.READ_PHONE_STATE',CALL_PHONE:'android.permission.CALL_PHONE',READ_CALL_LOG:'android.permission.READ_CALL_LOG',WRITE_CALL_LOG:'android.permission.WRITE_CALL_LOG',ADD_VOICEMAIL:'com.android.voicemail.permission.ADD_VOICEMAIL',USE_SIP:'android.permission.USE_SIP',PROCESS_OUTGOING_CALLS:'android.permission.PROCESS_OUTGOING_CALLS',BODY_SENSORS:'android.permission.BODY_SENSORS',SEND_SMS:'android.permission.SEND_SMS',RECEIVE_SMS:'android.permission.RECEIVE_SMS',READ_SMS:'android.permission.READ_SMS',RECEIVE_WAP_PUSH:'android.permission.RECEIVE_WAP_PUSH',RECEIVE_MMS:'android.permission.RECEIVE_MMS',READ_EXTERNAL_STORAGE:'android.permission.READ_EXTERNAL_STORAGE',WRITE_EXTERNAL_STORAGE:'android.permission.WRITE_EXTERNAL_STORAGE'}),R=(function(){function n(){(0,t.default)(this,n),this.PERMISSIONS=l,this.RESULTS=S}return(0,E.default)(n,[{key:"checkPermission",value:function(n){return console.warn('"PermissionsAndroid.checkPermission" is deprecated. Use "PermissionsAndroid.check" instead'),console.warn('"PermissionsAndroid" module works only for Android platform.'),Promise.resolve(!1)}},{key:"check",value:function(n){return console.warn('"PermissionsAndroid" module works only for Android platform.'),Promise.resolve(!1)}},{key:"requestPermission",value:function(n,s){var t;return o.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return console.warn('"PermissionsAndroid.requestPermission" is deprecated. Use "PermissionsAndroid.request" instead'),console.warn('"PermissionsAndroid" module works only for Android platform.'),E.abrupt("return",Promise.resolve(!1));case 4:return E.next=6,o.default.awrap(this.request(n,s));case 6:return t=E.sent,E.abrupt("return",t===this.RESULTS.GRANTED);case 8:case"end":return E.stop()}},null,this)}},{key:"request",value:function(n,t){return o.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return console.warn('"PermissionsAndroid" module works only for Android platform.'),E.abrupt("return",Promise.resolve(this.RESULTS.DENIED));case 3:if((0,_.default)(u.default,'PermissionsAndroid is not installed correctly.'),!t){E.next=10;break}return E.next=7,o.default.awrap(u.default.shouldShowRequestPermissionRationale(n));case 7:if(!E.sent||!A.default){E.next=10;break}return E.abrupt("return",new Promise(function(o,E){var _=(0,s.default)({},t);A.default.showAlert(_,function(){return E(new Error('Error showing rationale'))},function(){return o(u.default.requestPermission(n))})}));case 10:return E.abrupt("return",u.default.requestPermission(n));case 11:case"end":return E.stop()}},null,this)}},{key:"requestMultiple",value:function(n){return console.warn('"PermissionsAndroid" module works only for Android platform.'),Promise.resolve({})}}]),n})();R=new R,m.exports=R},365,[3,53,270,4,5,143,366,16,57]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t(r(d[1])).get('PermissionsAndroid');e.default=o},366,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),o=t(r(d[1])),n=t(r(d[2])),l=t(r(d[3])),u=r(d[4]),c=r(d[5]),s=new u(l.default),f=new Map,v=(function(){function t(n){var l=this;(0,o.default)(this,t),this._data={},this._remoteNotificationCompleteCallbackCalled=!1,this._isRemote=n.remote,this._isRemote&&(this._notificationId=n.notificationId),n.remote?Object.keys(n).forEach(function(t){var o=n[t];'aps'===t?(l._alert=o.alert,l._sound=o.sound,l._badgeCount=o.badge,l._category=o.category,l._contentAvailable=o['content-available'],l._threadID=o['thread-id']):l._data[t]=o}):(this._badgeCount=n.applicationIconBadgeNumber,this._sound=n.soundName,this._alert=n.alertBody,this._data=n.userInfo,this._category=n.category)}return(0,n.default)(t,null,[{key:"presentLocalNotification",value:function(t){c(l.default,'PushNotificationManager is not available.'),l.default.presentLocalNotification(t)}},{key:"scheduleLocalNotification",value:function(t){c(l.default,'PushNotificationManager is not available.'),l.default.scheduleLocalNotification(t)}},{key:"cancelAllLocalNotifications",value:function(){c(l.default,'PushNotificationManager is not available.'),l.default.cancelAllLocalNotifications()}},{key:"removeAllDeliveredNotifications",value:function(){c(l.default,'PushNotificationManager is not available.'),l.default.removeAllDeliveredNotifications()}},{key:"getDeliveredNotifications",value:function(t){c(l.default,'PushNotificationManager is not available.'),l.default.getDeliveredNotifications(t)}},{key:"removeDeliveredNotifications",value:function(t){c(l.default,'PushNotificationManager is not available.'),l.default.removeDeliveredNotifications(t)}},{key:"setApplicationIconBadgeNumber",value:function(t){c(l.default,'PushNotificationManager is not available.'),l.default.setApplicationIconBadgeNumber(t)}},{key:"getApplicationIconBadgeNumber",value:function(t){c(l.default,'PushNotificationManager is not available.'),l.default.getApplicationIconBadgeNumber(t)}},{key:"cancelLocalNotifications",value:function(t){c(l.default,'PushNotificationManager is not available.'),l.default.cancelLocalNotifications(t)}},{key:"getScheduledLocalNotifications",value:function(t){c(l.default,'PushNotificationManager is not available.'),l.default.getScheduledLocalNotifications(t)}},{key:"addEventListener",value:function(o,n){var l;c('notification'===o||'register'===o||'registrationError'===o||'localNotification'===o,'PushNotificationIOS only supports `notification`, `register`, `registrationError`, and `localNotification` events'),'notification'===o?l=s.addListener("remoteNotificationReceived",function(o){n(new t(o))}):'localNotification'===o?l=s.addListener("localNotificationReceived",function(o){n(new t(o))}):'register'===o?l=s.addListener("remoteNotificationsRegistered",function(t){n(t.deviceToken)}):'registrationError'===o&&(l=s.addListener("remoteNotificationRegistrationError",function(t){n(t)})),f.set(o,l)}},{key:"removeEventListener",value:function(t,o){c('notification'===t||'register'===t||'registrationError'===t||'localNotification'===t,'PushNotificationIOS only supports `notification`, `register`, `registrationError`, and `localNotification` events');var n=f.get(t);n&&(n.remove(),f.delete(t))}},{key:"requestPermissions",value:function(t){var o={};return o=t?{alert:!!t.alert,badge:!!t.badge,sound:!!t.sound}:{alert:!0,badge:!0,sound:!0},c(l.default,'PushNotificationManager is not available.'),l.default.requestPermissions(o)}},{key:"abandonPermissions",value:function(){c(l.default,'PushNotificationManager is not available.'),l.default.abandonPermissions()}},{key:"checkPermissions",value:function(t){c('function'==typeof t,'Must provide a valid callback'),c(l.default,'PushNotificationManager is not available.'),l.default.checkPermissions(t)}},{key:"getInitialNotification",value:function(){return c(l.default,'PushNotificationManager is not available.'),l.default.getInitialNotification().then(function(o){return o&&new t(o)})}}]),(0,n.default)(t,[{key:"finish",value:function(t){this._isRemote&&this._notificationId&&!this._remoteNotificationCompleteCallbackCalled&&(this._remoteNotificationCompleteCallbackCalled=!0,c(l.default,'PushNotificationManager is not available.'),l.default.onFinishRemoteNotification(this._notificationId,t))}},{key:"getMessage",value:function(){return this._alert}},{key:"getSound",value:function(){return this._sound}},{key:"getCategory",value:function(){return this._category}},{key:"getAlert",value:function(){return this._alert}},{key:"getContentAvailable",value:function(){return this._contentAvailable}},{key:"getBadgeCount",value:function(){return this._badgeCount}},{key:"getData",value:function(){return this._data}},{key:"getThreadID",value:function(){return this._threadID}}]),t})();v.FetchResult={NewData:'UIBackgroundFetchResultNewData',NoData:'UIBackgroundFetchResultNoData',ResultFailed:'UIBackgroundFetchResultFailed'},m.exports=v},367,[3,4,5,368,125,16]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t(r(d[1])).get('PushNotificationManager');e.default=o},368,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),s=t(r(d[1])),n=t(r(d[2])),c=r(d[3]),l=r(d[4]),u=[],o={_settings:n.default&&n.default.getConstants().settings,get:function(t){return this._settings[t]},set:function(t){this._settings=(0,s.default)(this._settings,t),n.default.setValues(t)},watchKeys:function(t,s){'string'==typeof t&&(t=[t]),l(Array.isArray(t),'keys should be a string or array of strings');var n=u.length;return u.push({keys:t,callback:s}),n},clearWatch:function(t){t1&&void 0!==arguments[1]?arguments[1]:{};return u('object'==typeof t&&null!==t,'Content to share must be a valid object'),u('string'==typeof t.url||'string'==typeof t.message,'At least one of URL and message is required'),u('object'==typeof n&&null!==n,'Options must be a valid object'),new Promise(function(o,l){var f=c(n.tintColor);u(s.default,'NativeActionSheetManager is not registered on iOS, but it should be.'),s.default.showShareActionSheetWithOptions({message:'string'==typeof t.message?t.message:void 0,url:'string'==typeof t.url?t.url:void 0,subject:n.subject,tintColor:null!=f?f:void 0,excludedActivityTypes:n.excludedActivityTypes},function(t){return l(t)},function(t,n){o(t?{action:'sharedAction',activityType:n}:{action:'dismissedAction'})})})}}]),t})();l.sharedAction='sharedAction',l.dismissedAction='dismissedAction',m.exports=l},371,[3,4,5,335,372,57,16,84]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=t(r(d[1])).get('ShareModule');e.default=u},372,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),u=t(r(d[1])),n=t(r(d[2])),f=t(r(d[3])),l=t(r(d[4])),s=t(r(d[5])),c=(function(t){function s(){return(0,u.default)(this,s),(0,n.default)(this,(0,f.default)(s).apply(this,arguments))}return(0,l.default)(s,t),s})(r(d[6]));m.exports=new c(s.default)},373,[3,4,6,9,10,323,125]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=t(r(d[1])),s=t(r(d[2])),u=t(r(d[3])),o=t(r(d[4])),c=(function(){function t(){(0,s.default)(this,t)}return(0,u.default)(t,null,[{key:"open",value:function(t){return n.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:if(!o.default){n.next=4;break}return n.abrupt("return",o.default.open(t));case 4:return n.abrupt("return",Promise.reject({message:'TimePickerAndroid is not supported on this platform.'}));case 5:case"end":return n.stop()}},null,this)}}]),t})();c.timeSetAction='timeSetAction',c.dismissedAction='dismissedAction',m.exports=c},374,[3,270,4,5,375]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=t(r(d[1])).get('TimePickerAndroid');e.default=u},375,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),o={show:function(o,s){t(!1,'ToastAndroid is not supported on this platform.')},showWithGravity:function(o,s,n){t(!1,'ToastAndroid is not supported on this platform.')},showWithGravityAndOffset:function(o,s,n,p,f){t(!1,'ToastAndroid is not supported on this platform.')}};m.exports=o},376,[18]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=u.default.get('window'),n=f.useState(!1)[1].bind(null,function(t){return!t}),c=f.useState(t)[0];return f.useEffect(function(){return u.default.addEventListener('change',n),u.default.get('window')!==c&&n(),function(){u.default.removeEventListener('change',n)}},[n,c]),t};var u=n(r(d[2])),f=t(r(d[3]))},377,[2,3,64,59]); __d(function(g,r,i,a,m,e,d){'use strict';var A=r(d[0])({BOM:"\ufeff",BULLET:"\u2022",BULLET_SP:"\xa0\u2022\xa0",MIDDOT:"\xb7",MIDDOT_SP:"\xa0\xb7\xa0",MIDDOT_KATAKANA:"\u30fb",MDASH:"\u2014",MDASH_SP:"\xa0\u2014\xa0",NDASH:"\u2013",NDASH_SP:"\xa0\u2013\xa0",NBSP:"\xa0",PIZZA:"\ud83c\udf55",TRIANGLE_LEFT:"\u25c0",TRIANGLE_RIGHT:"\u25b6"});m.exports=A},378,[37]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0])(r(d[1])),n=(r(d[2]),!1),o=0;function u(u){var l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n||(n=!0,0===u[0]&&(t.default.vibrate(),u=u.slice(1)),0!==u.length?setTimeout(function(){return f(++o,u,l,1)},u[0]):n=!1)}function f(u,l,v,c){if(n&&u===o){if(t.default.vibrate(),c>=l.length){if(!v)return void(n=!1);c=0}setTimeout(function(){return f(u,l,v,c+1)},l[c])}}var l={vibrate:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:400,f=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!n)if('number'==typeof o)t.default.vibrate();else{if(!Array.isArray(o))throw new Error('Vibration pattern should be a number or array');u(o,f)}},cancel:function(){n=!1}};m.exports=l},379,[3,380,57]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(d[1])).getEnforcing('Vibration');e.default=n},380,[2,22]); __d(function(g,r,i,a,m,e,d){'use strict';var n,t=r(d[0]),u=r(d[1]),l=r(d[2]),o=r(d[3]),s=r(d[4]);n=(function(n){function c(){return t(this,c),l(this,o(c).apply(this,arguments))}return s(c,n),u(c,[{key:"render",value:function(){return null}}],[{key:"ignoreWarnings",value:function(n){}},{key:"install",value:function(){}},{key:"uninstall",value:function(){}}]),c})(r(d[5]).Component),m.exports=n},381,[4,5,6,9,10,59]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),s=n.shape({x:n.number,y:n.number});m.exports=s},382,[71]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(d[1])),u=t(r(d[2])),c=r(d[3]),l=c.NativeModules.RNBackgroundTimer,o=new c.NativeEventEmitter(l),s=new((function(){function t(){var u=this;(0,n.default)(this,t),this.uniqueId=0,this.callbacks={},o.addListener('backgroundTimer.timeout',function(t){if(u.callbacks[t]){var n=u.callbacks[t].callback;u.callbacks[t].interval?l.setTimeout(t,u.callbacks[t].timeout):delete u.callbacks[t],n()}})}return(0,u.default)(t,[{key:"start",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return l.start(t)}},{key:"stop",value:function(){return l.stop()}},{key:"runBackgroundTimer",value:function(t,n){var u=this,l=c.Platform.select({ios:function(){return c.NativeAppEventEmitter},android:function(){return c.DeviceEventEmitter}})();this.start(0),this.backgroundListener=l.addListener('backgroundTimer',function(){u.backgroundListener.remove(),u.backgroundClockMethod(t,n)})}},{key:"backgroundClockMethod",value:function(t,n){var u=this;this.backgroundTimer=this.setTimeout(function(){t(),u.backgroundClockMethod(t,n)},n)}},{key:"stopBackgroundTimer",value:function(){this.stop(),this.clearTimeout(this.backgroundTimer)}},{key:"setTimeout",value:function(t,n){this.uniqueId+=1;var u=this.uniqueId;return this.callbacks[u]={callback:t,interval:!1,timeout:n},l.setTimeout(u,n),u}},{key:"clearTimeout",value:function(t){this.callbacks[t]&&delete this.callbacks[t]}},{key:"setInterval",value:function(t,n){this.uniqueId+=1;var u=this.uniqueId;return this.callbacks[u]={callback:t,interval:!0,timeout:n},l.setTimeout(u,n),u}},{key:"clearInterval",value:function(t){this.callbacks[t]&&delete this.callbacks[t]}}]),t})());e.default=s},383,[3,4,5,15]); __d(function(g,r,i,a,m,e,d){!(function(t){'use strict';var s=!1;if(!t.forceJURL)try{var h=new URL('b','http://a');h.pathname='c%20d',s='http://a/c%20d'===h.href}catch(t){}if(!s){var n=Object.create(null);n.ftp=21,n.file=0,n.gopher=70,n.http=80,n.https=443,n.ws=80,n.wss=443;var o=Object.create(null);o['%2e']='.',o['.%2e']='..',o['%2e.']='..',o['%2e%2e']='..';var l=void 0,_=/[a-zA-Z]/,c=/[a-zA-Z0-9\+\-\.]/;I.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var t='';return''==this._username&&null==this._password||(t=this._username+(null!=this._password?':'+this._password:'')+'@'),this.protocol+(this._isRelative?'//'+t+this.host:'')+this.pathname+this._query+this._fragment},set href(t){k.call(this),b.call(this,t)},get protocol(){return this._scheme+':'},set protocol(t){this._isInvalid||b.call(this,t+':','scheme start')},get host(){return this._isInvalid?'':this._port?this._host+':'+this._port:this._host},set host(t){!this._isInvalid&&this._isRelative&&b.call(this,t,'host')},get hostname(){return this._host},set hostname(t){!this._isInvalid&&this._isRelative&&b.call(this,t,'hostname')},get port(){return this._port},set port(t){!this._isInvalid&&this._isRelative&&b.call(this,t,'port')},get pathname(){return this._isInvalid?'':this._isRelative?'/'+this._path.join('/'):this._schemeData},set pathname(t){!this._isInvalid&&this._isRelative&&(this._path=[],b.call(this,t,'relative path start'))},get search(){return this._isInvalid||!this._query||'?'==this._query?'':this._query},set search(t){!this._isInvalid&&this._isRelative&&(this._query='?','?'==t[0]&&(t=t.slice(1)),b.call(this,t,'query'))},get hash(){return this._isInvalid||!this._fragment||'#'==this._fragment?'':this._fragment},set hash(t){this._isInvalid||(this._fragment='#','#'==t[0]&&(t=t.slice(1)),b.call(this,t,'fragment'))},get origin(){var t;if(this._isInvalid||!this._scheme)return'';switch(this._scheme){case'data':case'file':case'javascript':case'mailto':return'null'}return(t=this.host)?this._scheme+'://'+t:''}};var p=t.URL;p&&(I.createObjectURL=function(t){return p.createObjectURL.apply(p,arguments)},I.revokeObjectURL=function(t){p.revokeObjectURL(t)}),t.URL=I}function u(t){return void 0!==n[t]}function f(){k.call(this),this._isInvalid=!0}function v(t){return''==t&&f.call(this),t.toLowerCase()}function y(t){var s=t.charCodeAt(0);return s>32&&s<127&&-1==[34,35,60,62,63,96].indexOf(s)?t:encodeURIComponent(t)}function w(t){var s=t.charCodeAt(0);return s>32&&s<127&&-1==[34,35,60,62,96].indexOf(s)?t:encodeURIComponent(t)}function b(t,s,h){function p(t){L.push(t)}var b=s||'scheme start',k=0,I='',R=!1,q=!1,L=[];t:for(;(t[k-1]!=l||0==k)&&!this._isInvalid;){var U=t[k];switch(b){case'scheme start':if(!U||!_.test(U)){if(s){p('Invalid scheme.');break t}I='',b='no scheme';continue}I+=U.toLowerCase(),b='scheme';break;case'scheme':if(U&&c.test(U))I+=U.toLowerCase();else{if(':'!=U){if(s){if(l==U)break t;p('Code point not allowed in scheme: '+U);break t}I='',k=0,b='no scheme';continue}if(this._scheme=I,I='',s)break t;u(this._scheme)&&(this._isRelative=!0),b='file'==this._scheme?'relative':this._isRelative&&h&&h._scheme==this._scheme?'relative or authority':this._isRelative?'authority first slash':'scheme data'}break;case'scheme data':'?'==U?(this._query='?',b='query'):'#'==U?(this._fragment='#',b='fragment'):l!=U&&'\t'!=U&&'\n'!=U&&'\r'!=U&&(this._schemeData+=y(U));break;case'no scheme':if(h&&u(h._scheme)){b='relative';continue}p('Missing scheme.'),f.call(this);break;case'relative or authority':if('/'!=U||'/'!=t[k+1]){p('Expected /, got: '+U),b='relative';continue}b='authority ignore slashes';break;case'relative':if(this._isRelative=!0,'file'!=this._scheme&&(this._scheme=h._scheme),l==U){this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query,this._username=h._username,this._password=h._password;break t}if('/'==U||'\\'==U)'\\'==U&&p('\\ is an invalid code point.'),b='relative slash';else if('?'==U)this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query='?',this._username=h._username,this._password=h._password,b='query';else{if('#'!=U){var C=t[k+1],j=t[k+2];('file'!=this._scheme||!_.test(U)||':'!=C&&'|'!=C||l!=j&&'/'!=j&&'\\'!=j&&'?'!=j&&'#'!=j)&&(this._host=h._host,this._port=h._port,this._username=h._username,this._password=h._password,this._path=h._path.slice(),this._path.pop()),b='relative path';continue}this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query,this._fragment='#',this._username=h._username,this._password=h._password,b='fragment'}break;case'relative slash':if('/'!=U&&'\\'!=U){'file'!=this._scheme&&(this._host=h._host,this._port=h._port,this._username=h._username,this._password=h._password),b='relative path';continue}'\\'==U&&p('\\ is an invalid code point.'),b='file'==this._scheme?'file host':'authority ignore slashes';break;case'authority first slash':if('/'!=U){p("Expected '/', got: "+U),b='authority ignore slashes';continue}b='authority second slash';break;case'authority second slash':if(b='authority ignore slashes','/'!=U){p("Expected '/', got: "+U);continue}break;case'authority ignore slashes':if('/'!=U&&'\\'!=U){b='authority';continue}p('Expected authority, got: '+U);break;case'authority':if('@'==U){R&&(p('@ already seen.'),I+='%40'),R=!0;for(var O=0;O=s.length)break;v=s[y++]}else{if((y=s.next()).done)break;v=y.value}var c=v,k=(0,n.default)(c,2),_=k[0],P=k[1];_=_.substring(o),t.hasOwnProperty(_)||(t[_]=P)}l()})})})}},{key:"key",value:function(t){var n=Object.keys(this);return t=n+o||n?new java.lang.String(t,n,o)+'':t}function u(t,n){t.currentElement?t.currentElement.appendChild(n):t.doc.appendChild(n)}t.prototype.parseFromString=function(t,c){var l=this.options,s=new h,u=l.domBuilder||new o,f=l.errorHandler,p=l.locator,D=l.xmlns||{},E={lt:'<',gt:'>',amp:'&',quot:'"',apos:"'"};return p&&u.setDocumentLocator(p),s.errorHandler=n(f,u,p),s.domBuilder=l.domBuilder||u,/\/x?html?$/.test(c)&&(E.nbsp='\xa0',E.copy='\xa9',D['']='http://www.w3.org/1999/xhtml'),D.xml=D.xml||'http://www.w3.org/XML/1998/namespace',t?s.parse(t,D,E):s.errorHandler.error("invalid doc source"),u.doc},o.prototype={startDocument:function(){this.doc=(new f).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,n,o,l){var s=this.doc,h=s.createElementNS(t,o||n),f=l.length;u(this,h),this.currentElement=h,this.locator&&c(this.locator,h);for(var p=0;p65535){var n=55296+((t-=65536)>>10),s=56320+(1023&t);return String.fromCharCode(n,s)}return String.fromCharCode(t)}function l(t){var n=t.slice(1,-1);return n in s?s[n]:'#'===n.charAt(0)?o(parseInt(n.substr(1).replace('x','0x'))):(u.error('entity not found:'+t),t)}function f(n){if(n>O){var s=t.substring(O,n).replace(/&#?\w+;/g,l);x&&h(O),c.characters(s,0,n-O),O=n}}function h(n,s){for(;n>=w&&(s=b.exec(t));)p=s.index,w=p+s[0].length,x.lineNumber++;x.columnNumber=n-p+1}for(var p=0,w=0,b=/.*(?:\r\n?|\n)|.*$/g,x=c.locator,E=[{currentNSMap:n}],M={},O=0;;){try{var T=t.indexOf('<',O);if(T<0){if(!t.substr(O).match(/^\s*$/)){var S=c.doc,q=S.createTextNode(t.substr(O));S.appendChild(q),c.currentElement=q}return}switch(T>O&&f(T),t.charAt(T+1)){case'/':var y=t.indexOf('>',T+3),_=t.substring(T+2,y),I=E.pop();y<0?(_=t.substring(T+2).replace(/[\s<].*/,''),u.error("end tag name: "+_+' is not complete:'+I.tagName),y=T+1+_.length):_.match(/\sO?O=y:f(Math.max(T,O)+1)}}function v(t,n){return n.lineNumber=t.lineNumber,n.columnNumber=t.columnNumber,n}function N(t,n,s,b,x,v){for(var N,F=++n,D=c;;){var k=t.charAt(F);switch(k){case'=':if(D===u)N=t.slice(n,F),D=l;else{if(D!==o)throw new Error('attribute equal must after attrName');D=l}break;case'\'':case'"':if(D===l||D===u){if(D===u&&(v.warning('attribute value must after "="'),N=t.slice(n,F)),n=F+1,!((F=t.indexOf(k,n))>0))throw new Error('attribute value no end \''+k+'\' match');E=t.slice(n,F).replace(/&#?\w+;/g,x),s.add(N,E,n-1),D=h}else{if(D!=f)throw new Error('attribute value must after "="');E=t.slice(n,F).replace(/&#?\w+;/g,x),s.add(N,E,n),v.warning('attribute "'+N+'" missed start quot('+k+')!!'),n=F+1,D=h}break;case'/':switch(D){case c:s.setTagName(t.slice(n,F));case h:case p:case w:D=w,s.closed=!0;case f:case u:case o:break;default:throw new Error("attribute invalid close char('/')")}break;case'':return v.error('unexpected end of input'),D==c&&s.setTagName(t.slice(n,F)),F;case'>':switch(D){case c:s.setTagName(t.slice(n,F));case h:case p:case w:break;case f:case u:'/'===(E=t.slice(n,F)).slice(-1)&&(s.closed=!0,E=E.slice(0,-1));case o:D===o&&(E=N),D==f?(v.warning('attribute "'+E+'" missed quot(")!!'),s.add(N,E.replace(/&#?\w+;/g,x),n)):('http://www.w3.org/1999/xhtml'===b['']&&E.match(/^(?:disabled|checked|selected)$/i)||v.warning('attribute "'+E+'" missed value!! "'+E+'" instead!!'),s.add(E,E,n));break;case l:throw new Error('attribute value missed!!')}return F;case"\x80":k=' ';default:if(k<=' ')switch(D){case c:s.setTagName(t.slice(n,F)),D=p;break;case u:N=t.slice(n,F),D=o;break;case f:var E=t.slice(n,F).replace(/&#?\w+;/g,x);v.warning('attribute "'+E+'" missed quot(")!!'),s.add(N,E,n);case h:D=p}else switch(D){case o:s.tagName;'http://www.w3.org/1999/xhtml'===b['']&&N.match(/^(?:disabled|checked|selected)$/i)||v.warning('attribute "'+N+'" missed value!! "'+N+'" instead2!!'),s.add(N,N,n),n=F,D=u;break;case h:v.warning('attribute space is required"'+N+'"!!');case p:D=u,n=F;break;case l:D=f,n=F;break;case w:throw new Error("elements closed character '/' and '>' must be connected to")}}F++}}function F(t,n,s){for(var c=t.tagName,u=null,o=t.length;o--;){var l=t[o],f=l.qName,h=l.value;if((x=f.indexOf(':'))>0)var p=l.prefix=f.slice(0,x),w=f.slice(x+1),b='xmlns'===p&&w;else w=f,p=null,b='xmlns'===f&&'';l.localName=w,!1!==b&&(null==u&&(u={},E(s,s={})),s[b]=u[b]=h,l.uri='http://www.w3.org/2000/xmlns/',n.startPrefixMapping(b,h))}for(o=t.length;o--;){(p=(l=t[o]).prefix)&&('xml'===p&&(l.uri='http://www.w3.org/XML/1998/namespace'),'xmlns'!==p&&(l.uri=s[p||'']))}var x;(x=c.indexOf(':'))>0?(p=t.prefix=c.slice(0,x),w=t.localName=c.slice(x+1)):(p=null,w=t.localName=c);var v=t.uri=s[p||''];if(n.startElement(v,w,c,t),!t.closed)return t.currentNSMap=s,t.localNSMap=u,!0;if(n.endElement(v,w,c),u)for(p in u)n.endPrefixMapping(p)}function D(t,n,s,c,u){if(/^(?:script|textarea)$/i.test(s)){var o=t.indexOf('',n),l=t.substring(n+1,o);if(/[&<]/.test(l))return/^script$/i.test(s)?(u.characters(l,0,l.length),o):(l=l.replace(/&#?\w+;/g,c),u.characters(l,0,l.length),o)}return n+1}function k(t,n,s,c){var u=c[s];return null==u&&((u=t.lastIndexOf(''))n?(s.comment(t,n+4,u-n-4),u+3):(c.error("Unclosed comment"),-1):-1;default:if('CDATA['==t.substr(n+3,6)){var u=t.indexOf(']]>',n+9);return s.startCDATA(),s.characters(t,n+9,u-n-9),s.endCDATA(),u+3}var o=O(t,n),l=o.length;if(l>1&&/!doctype/i.test(o[0][0])){var f=o[1][0],h=l>3&&/^public$/i.test(o[2][0])&&o[3][0],p=l>4&&o[4][0],w=o[l-1];return s.startDTD(f,h&&h.replace(/^(['"])(.*?)\1$/,'$2'),p&&p.replace(/^(['"])(.*?)\1$/,'$2')),s.endDTD(),w.index+w[0].length}}return-1}function $(t,n,s){var c=t.indexOf('?>',n);if(c){var u=t.substring(n,c).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(u){u[0].length;return s.processingInstruction(u[1],u[2]),c+2}return-1}return-1}function A(t){}function M(t,n){return t.__proto__=n,t}function O(t,n){var s,c=[],u=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(u.lastIndex=n,u.exec(t);s=u.exec(t);)if(c.push(s),s[1])return c}b.prototype={parse:function(t,n,s){var c=this.domBuilder;c.startDocument(),E(n,n={}),x(t,n,s,c,this.errorHandler),c.endDocument()}},A.prototype={setTagName:function(t){if(!s.test(t))throw new Error('invalid tagName:'+t);this.tagName=t},add:function(t,n,c){if(!s.test(t))throw new Error('invalid attribute:'+t);this[this.length++]={qName:t,value:n,offset:c}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},M({},M.prototype)instanceof M||(M=function(t,n){function s(){}for(n in s.prototype=n,s=new s,t)s[n]=t[n];return s}),e.XMLReader=b},390,[]); __d(function(g,r,i,a,m,e,d){function t(t,n){for(var o in t)n[o]=t[o]}function n(n,o){var u=n.prototype;if(Object.create){var s=Object.create(o.prototype);u.__proto__=s}if(!(u instanceof o)){function l(){}l.prototype=o.prototype,t(u,l=new l),n.prototype=u=l}u.constructor!=n&&('function'!=typeof n&&console.error("unknow Class:"+n),u.constructor=n)}var o='http://www.w3.org/1999/xhtml',u={},s=u.ELEMENT_NODE=1,l=u.ATTRIBUTE_NODE=2,c=u.TEXT_NODE=3,h=u.CDATA_SECTION_NODE=4,p=u.ENTITY_REFERENCE_NODE=5,f=u.ENTITY_NODE=6,N=u.PROCESSING_INSTRUCTION_NODE=7,v=u.COMMENT_NODE=8,w=u.DOCUMENT_NODE=9,E=u.DOCUMENT_TYPE_NODE=10,y=u.DOCUMENT_FRAGMENT_NODE=11,b=u.NOTATION_NODE=12,T={},_={},D=(T.INDEX_SIZE_ERR=(_[1]="Index size error",1),T.DOMSTRING_SIZE_ERR=(_[2]="DOMString size error",2),T.HIERARCHY_REQUEST_ERR=(_[3]="Hierarchy request error",3)),S=(T.WRONG_DOCUMENT_ERR=(_[4]="Wrong document",4),T.INVALID_CHARACTER_ERR=(_[5]="Invalid character",5),T.NO_DATA_ALLOWED_ERR=(_[6]="No data allowed",6),T.NO_MODIFICATION_ALLOWED_ERR=(_[7]="No modification allowed",7),T.NOT_FOUND_ERR=(_[8]="Not found",8)),C=(T.NOT_SUPPORTED_ERR=(_[9]="Not supported",9),T.INUSE_ATTRIBUTE_ERR=(_[10]="Attribute in use",10));T.INVALID_STATE_ERR=(_[11]="Invalid state",11),T.SYNTAX_ERR=(_[12]="Syntax error",12),T.INVALID_MODIFICATION_ERR=(_[13]="Invalid modification",13),T.NAMESPACE_ERR=(_[14]="Invalid namespace",14),T.INVALID_ACCESS_ERR=(_[15]="Invalid access",15);function I(t,n){if(n instanceof Error)var o=n;else o=this,Error.call(this,_[t]),this.message=_[t],Error.captureStackTrace&&Error.captureStackTrace(this,I);return o.code=t,n&&(this.message=this.message+": "+n),o}function A(){}function R(t,n){this._node=t,this._refresh=n,x(this)}function x(n){var o=n._node._inc||n._node.ownerDocument._inc;if(n._inc!=o){var u=n._refresh(n._node);he(n,'length',u.length),t(u,n),n._inc=o}}function O(){}function U(t,n){for(var o=t.length;o--;)if(t[o]===n)return o}function M(t,n,o,u){if(u?n[U(n,u)]=o:n[n.length++]=o,t){o.ownerElement=t;var s=t.ownerDocument;s&&(u&&Y(s,t,u),F(s,t,o))}}function B(t,n,o){var u=U(n,o);if(!(u>=0))throw I(S,new Error(t.tagName+'@'+o));for(var s=n.length-1;u'==t&&'>')||'&'==t&&'&'||'"'==t&&'"'||'&#'+t.charCodeAt()+';'}function k(t,n){if(n(t))return!0;if(t=t.firstChild)do{if(k(t,n))return!0}while(t=t.nextSibling)}function j(){}function F(t,n,o){t&&t._inc++,'http://www.w3.org/2000/xmlns/'==o.namespaceURI&&(n._nsMap[o.prefix?o.localName:'']=o.value)}function Y(t,n,o,u){t&&t._inc++,'http://www.w3.org/2000/xmlns/'==o.namespaceURI&&delete n._nsMap[o.prefix?o.localName:'']}function z(t,n,o){if(t&&t._inc){t._inc++;var u=n.childNodes;if(o)u[u.length++]=o;else{for(var s=n.firstChild,l=0;s;)u[l++]=s,s=s.nextSibling;u.length=l}}}function $(t,n){var o=n.previousSibling,u=n.nextSibling;return o?o.nextSibling=u:t.firstChild=u,u?u.previousSibling=o:t.lastChild=o,z(t.ownerDocument,t),n}function X(t,n,o){var u=n.parentNode;if(u&&u.removeChild(n),n.nodeType===y){var s=n.firstChild;if(null==s)return n;var l=n.lastChild}else s=l=n;var c=o?o.previousSibling:t.lastChild;s.previousSibling=c,l.nextSibling=o,c?c.nextSibling=s:t.firstChild=s,null==o?t.lastChild=l:o.previousSibling=l;do{s.parentNode=t}while(s!==l&&(s=s.nextSibling));return z(t.ownerDocument||t,t),n.nodeType==y&&(n.firstChild=n.lastChild=null),n}function G(t,n){var o=n.parentNode;if(o){var u=t.lastChild;o.removeChild(n);u=t.lastChild}u=t.lastChild;return n.parentNode=t,n.previousSibling=u,n.nextSibling=null,u?u.nextSibling=n:t.firstChild=n,t.lastChild=n,z(t.ownerDocument,t,n),n}function H(){this._nsMap={}}function W(){}function q(){}function Z(){}function Q(){}function J(){}function K(){}function ee(){}function te(){}function ne(){}function re(){}function ie(){}function oe(){}function ae(t,n){var o=[],u=9==this.nodeType?this.documentElement:this,s=u.prefix,l=u.namespaceURI;if(l&&null==s&&null==(s=u.lookupPrefix(l)))var c=[{namespace:l,prefix:null}];return se(this,o,t,n,c),o.join('')}function ue(t,n,o){var u=t.prefix||'',s=t.namespaceURI;if(!u&&!s)return!1;if("xml"===u&&"http://www.w3.org/XML/1998/namespace"===s||'http://www.w3.org/2000/xmlns/'==s)return!1;for(var l=o.length;l--;){var c=o[l];if(c.prefix==u)return c.namespace!=s}return!0}function se(t,n,u,f,b){if(f){if(!(t=f(t)))return;if('string'==typeof t)return void n.push(t)}switch(t.nodeType){case s:b||(b=[]);b.length;var T=t.attributes,_=T.length,D=t.firstChild,S=t.tagName;u=o===t.namespaceURI||u,n.push('<',S);for(var C=0;C<_;C++){'xmlns'==(I=T.item(C)).prefix?b.push({prefix:I.localName,namespace:I.value}):'xmlns'==I.nodeName&&b.push({prefix:'',namespace:I.value})}for(C=0;C<_;C++){var I;if(ue(I=T.item(C),0,b)){var A=I.prefix||'',R=I.namespaceURI,x=A?' xmlns:'+A:" xmlns";n.push(x,'="',R,'"'),b.push({prefix:A,namespace:R})}se(I,n,u,f,b)}if(ue(t,0,b)){A=t.prefix||'',R=t.namespaceURI,x=A?' xmlns:'+A:" xmlns";n.push(x,'="',R,'"'),b.push({prefix:A,namespace:R})}if(D||u&&!/^(?:meta|link|img|br|hr|input)$/i.test(S)){if(n.push('>'),u&&/^script$/i.test(S))for(;D;)D.data?n.push(D.data):se(D,n,u,f,b),D=D.nextSibling;else for(;D;)se(D,n,u,f,b),D=D.nextSibling;n.push('')}else n.push('/>');return;case w:case y:for(D=t.firstChild;D;)se(D,n,u,f,b),D=D.nextSibling;return;case l:return n.push(' ',t.name,'="',t.value.replace(/[<&"]/g,V),'"');case c:return n.push(t.data.replace(/[<&]/g,V));case h:return n.push('');case v:return n.push("\x3c!--",t.data,"--\x3e");case E:var O=t.publicId,U=t.systemId;if(n.push('');else if(U&&'.'!=U)n.push(' SYSTEM "',U,'">');else{var M=t.internalSubset;M&&n.push(" [",M,"]"),n.push(">")}return;case N:return n.push("");case p:return n.push('&',t.nodeName,';');default:n.push('??',t.nodeName)}}function le(t,n,o){var u;switch(n.nodeType){case s:(u=n.cloneNode(!1)).ownerDocument=t;case y:break;case l:o=!0}if(u||(u=n.cloneNode(!1)),u.ownerDocument=t,u.parentNode=null,o)for(var c=n.firstChild;c;)u.appendChild(le(t,c,o)),c=c.nextSibling;return u}function ce(t,n,o){var u=new n.constructor;for(var c in n){var h=n[c];'object'!=typeof h&&h!=u[c]&&(u[c]=h)}switch(n.childNodes&&(u.childNodes=new A),u.ownerDocument=t,u.nodeType){case s:var p=n.attributes,f=u.attributes=new O,N=p.length;f._ownerElement=u;for(var v=0;v0},lookupPrefix:function(t){for(var n=this;n;){var o=n._nsMap;if(o)for(var u in o)if(o[u]==t)return u;n=n.nodeType==l?n.ownerDocument:n.parentNode}return null},lookupNamespaceURI:function(t){for(var n=this;n;){var o=n._nsMap;if(o&&t in o)return o[t];n=n.nodeType==l?n.ownerDocument:n.parentNode}return null},isDefaultNamespace:function(t){return null==this.lookupPrefix(t)}},t(u,L),t(u,L.prototype),j.prototype={nodeName:'#document',nodeType:w,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,n){if(t.nodeType==y){for(var o=t.firstChild;o;){var u=o.nextSibling;this.insertBefore(o,n),o=u}return t}return null==this.documentElement&&t.nodeType==s&&(this.documentElement=t),X(this,t,n),t.ownerDocument=this,t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),$(this,t)},importNode:function(t,n){return le(this,t,n)},getElementById:function(t){var n=null;return k(this.documentElement,function(o){if(o.nodeType==s&&o.getAttribute('id')==t)return n=o,!0}),n},createElement:function(t){var n=new H;return n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.childNodes=new A,(n.attributes=new O)._ownerElement=n,n},createDocumentFragment:function(){var t=new re;return t.ownerDocument=this,t.childNodes=new A,t},createTextNode:function(t){var n=new Z;return n.ownerDocument=this,n.appendData(t),n},createComment:function(t){var n=new Q;return n.ownerDocument=this,n.appendData(t),n},createCDATASection:function(t){var n=new J;return n.ownerDocument=this,n.appendData(t),n},createProcessingInstruction:function(t,n){var o=new ie;return o.ownerDocument=this,o.tagName=o.target=t,o.nodeValue=o.data=n,o},createAttribute:function(t){var n=new W;return n.ownerDocument=this,n.name=t,n.nodeName=t,n.localName=t,n.specified=!0,n},createEntityReference:function(t){var n=new ne;return n.ownerDocument=this,n.nodeName=t,n},createElementNS:function(t,n){var o=new H,u=n.split(':'),s=o.attributes=new O;return o.childNodes=new A,o.ownerDocument=this,o.nodeName=n,o.tagName=n,o.namespaceURI=t,2==u.length?(o.prefix=u[0],o.localName=u[1]):o.localName=n,s._ownerElement=o,o},createAttributeNS:function(t,n){var o=new W,u=n.split(':');return o.ownerDocument=this,o.nodeName=n,o.name=n,o.namespaceURI=t,o.specified=!0,2==u.length?(o.prefix=u[0],o.localName=u[1]):o.localName=n,o}},n(j,L),H.prototype={nodeType:s,hasAttribute:function(t){return null!=this.getAttributeNode(t)},getAttribute:function(t){var n=this.getAttributeNode(t);return n&&n.value||''},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,n){var o=this.ownerDocument.createAttribute(t);o.value=o.nodeValue=""+n,this.setAttributeNode(o)},removeAttribute:function(t){var n=this.getAttributeNode(t);n&&this.removeAttributeNode(n)},appendChild:function(t){return t.nodeType===y?this.insertBefore(t,null):G(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,n){var o=this.getAttributeNodeNS(t,n);o&&this.removeAttributeNode(o)},hasAttributeNS:function(t,n){return null!=this.getAttributeNodeNS(t,n)},getAttributeNS:function(t,n){var o=this.getAttributeNodeNS(t,n);return o&&o.value||''},setAttributeNS:function(t,n,o){var u=this.ownerDocument.createAttributeNS(t,n);u.value=u.nodeValue=""+o,this.setAttributeNode(u)},getAttributeNodeNS:function(t,n){return this.attributes.getNamedItemNS(t,n)},getElementsByTagName:function(t){return new R(this,function(n){var o=[];return k(n,function(u){u===n||u.nodeType!=s||'*'!==t&&u.tagName!=t||o.push(u)}),o})},getElementsByTagNameNS:function(t,n){return new R(this,function(o){var u=[];return k(o,function(l){l===o||l.nodeType!==s||'*'!==t&&l.namespaceURI!==t||'*'!==n&&l.localName!=n||u.push(l)}),u})}},j.prototype.getElementsByTagName=H.prototype.getElementsByTagName,j.prototype.getElementsByTagNameNS=H.prototype.getElementsByTagNameNS,n(H,L),W.prototype.nodeType=l,n(W,L),q.prototype={data:'',substringData:function(t,n){return this.data.substring(t,t+n)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,n){this.replaceData(t,0,n)},appendChild:function(t){throw new Error(_[D])},deleteData:function(t,n){this.replaceData(t,n,"")},replaceData:function(t,n,o){o=this.data.substring(0,t)+o+this.data.substring(t+n),this.nodeValue=this.data=o,this.length=o.length}},n(q,L),Z.prototype={nodeName:"#text",nodeType:c,splitText:function(t){var n=this.data,o=n.substring(t);n=n.substring(0,t),this.data=this.nodeValue=n,this.length=n.length;var u=this.ownerDocument.createTextNode(o);return this.parentNode&&this.parentNode.insertBefore(u,this.nextSibling),u}},n(Z,q),Q.prototype={nodeName:"#comment",nodeType:v},n(Q,q),J.prototype={nodeName:"#cdata-section",nodeType:h},n(J,q),K.prototype.nodeType=E,n(K,L),ee.prototype.nodeType=b,n(ee,L),te.prototype.nodeType=f,n(te,L),ne.prototype.nodeType=p,n(ne,L),re.prototype.nodeName="#document-fragment",re.prototype.nodeType=y,n(re,L),ie.prototype.nodeType=N,n(ie,L),oe.prototype.serializeToString=function(t,n,o){return ae.call(t,n,o)},L.prototype.toString=ae;try{if(Object.defineProperty){function pe(t){switch(t.nodeType){case s:case y:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(pe(t)),t=t.nextSibling;return n.join('');default:return t.nodeValue}}Object.defineProperty(R.prototype,'length',{get:function(){return x(this),this.$$length}}),Object.defineProperty(L.prototype,'textContent',{get:function(){return pe(this)},set:function(t){switch(this.nodeType){case s:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),he=function(t,n,o){t['$$'+n]=o}}}catch(t){}e.DOMImplementation=P,e.XMLSerializer=oe},391,[]); __d(function(g,r,i,a,m,e,d){var o=r(d[0]),l=r(d[1]),t={},n=[],s=o.levels.TRACE;m.exports={addGlobalTransport:function(l){o.addGlobalTransport(l)},removeGlobalTransport:function(l){o.removeGlobalTransport(l)},setGlobalOptions:function(l){o.setGlobalOptions(l)},getLogger:function(l,v,f){var u=new o(s,l,v,f);return l?(t[l]=t[l]||[],t[l].push(u)):n.push(u),u},setLogLevelById:function(o,l){for(var s=l?t[l]||[]:n,v=0;v1&&O.push("<"+h.methodName+">: ");var N=O.concat(f);b.bind(v).apply(v,N)}}}function c(n,o,l,c){this.id=o,this.options=c||{},this.transports=l,this.transports||(this.transports=[]),this.level=t[n];for(var f=Object.keys(t),h=0;h=this.maxEntryLength&&this._flush(!0,!0)},s.prototype.start=function(){this._reschedulePublishInterval()},s.prototype._reschedulePublishInterval=function(){this.storeLogsIntervalID&&(window.clearTimeout(this.storeLogsIntervalID),this.storeLogsIntervalID=null),this.storeLogsIntervalID=window.setTimeout(this._flush.bind(this,!1,!0),this.storeInterval)},s.prototype.flush=function(){this._flush(!1,!0)},s.prototype._flush=function(t,s){this.totalLen>0&&(this.logStorage.isReady()||t)&&(this.logStorage.isReady()?(this.outputCache.length&&(this.outputCache.forEach(function(t){this.logStorage.storeLogs(t)}.bind(this)),this.outputCache=[]),this.logStorage.storeLogs(this.queue)):this.outputCache.push(this.queue),this.queue=[],this.totalLen=0),s&&this._reschedulePublishInterval()},s.prototype.stop=function(){this._flush(!1,!1)},m.exports=s},394,[393]); __d(function(e,t,i,r,s,a,n){s.exports={_args:[["github:jitsi/react-native#efd2aff5661d75a230e36406b698cfe0ee545be2","/Users/djorkaeff/Downloads/rocket-chat/jitsi-jitsi-meet"]],_from:"github:jitsi/react-native#efd2aff5661d75a230e36406b698cfe0ee545be2",_id:"react-native@github:jitsi/react-native#efd2aff5661d75a230e36406b698cfe0ee545be2",_inBundle:!1,_integrity:"",_location:"/react-native",_phantomChildren:{"@hapi/joi":"15.1.1","@react-native-community/cli-debugger-ui":"3.0.0","@react-native-community/cli-tools":"3.0.0","@react-native-community/cli-types":"3.0.0","@types/color-name":"1.1.1","@types/istanbul-lib-coverage":"2.0.1","@types/istanbul-reports":"1.1.1","@types/yargs-parser":"15.0.0","color-convert":"1.9.1","command-exists":"1.2.8",commander:"2.20.0",compression:"1.7.4",connect:"3.7.0","core-js":"2.5.3",cosmiconfig:"5.2.0",deepmerge:"3.3.0",didyoumean:"1.2.1",envinfo:"7.5.0",errorhandler:"1.5.1","escape-string-regexp":"1.0.5",execa:"1.0.0","fbjs-css-vars":"1.0.2","fs-extra":"7.0.1",glob:"7.1.2","graceful-fs":"4.1.11",inquirer:"3.3.0","isomorphic-fetch":"2.2.1","js-tokens":"3.0.2",lodash:"4.17.19","loose-envify":"1.3.1",metro:"0.56.4","metro-config":"0.56.4","metro-core":"0.56.4","metro-react-native-babel-transformer":"0.56.4",minimist:"1.2.5",mkdirp:"0.5.5",morgan:"1.9.1","node-notifier":"5.4.3","object-assign":"4.1.1",open:"6.4.0",ora:"3.4.0",plist:"3.0.1",promise:"7.3.1","serve-static":"1.13.2",setimmediate:"1.0.5","shell-quote":"1.6.1","sudo-prompt":"9.1.1",wcwidth:"1.0.1",ws:"1.1.5"},_requested:{type:"git",raw:"github:jitsi/react-native#efd2aff5661d75a230e36406b698cfe0ee545be2",rawSpec:"github:jitsi/react-native#efd2aff5661d75a230e36406b698cfe0ee545be2",saveSpec:"github:jitsi/react-native#efd2aff5661d75a230e36406b698cfe0ee545be2",fetchSpec:null,gitCommittish:"efd2aff5661d75a230e36406b698cfe0ee545be2"},_requiredBy:["/"],_resolved:"github:jitsi/react-native#efd2aff5661d75a230e36406b698cfe0ee545be2",_spec:"github:jitsi/react-native#efd2aff5661d75a230e36406b698cfe0ee545be2",_where:"/Users/djorkaeff/Downloads/rocket-chat/jitsi-jitsi-meet",bin:{"react-native":"cli.js"},bugs:{url:"https://github.com/facebook/react-native/issues"},dependencies:{"@babel/runtime":"^7.0.0","@react-native-community/cli":"^3.0.0","@react-native-community/cli-platform-android":"^3.0.0","@react-native-community/cli-platform-ios":"^3.0.0","abort-controller":"^3.0.0",art:"^0.10.0","base64-js":"^1.1.2",connect:"^3.6.5","create-react-class":"^15.6.3","escape-string-regexp":"^1.0.5","event-target-shim":"^5.0.1",fbjs:"^1.0.0","fbjs-scripts":"^1.1.0","hermes-engine":"^0.2.1",invariant:"^2.2.4","jsc-android":"^245459.0.0","metro-babel-register":"^0.56.0","metro-react-native-babel-transformer":"^0.56.0","metro-source-map":"^0.56.0",nullthrows:"^1.1.0","pretty-format":"^24.7.0",promise:"^7.1.1","prop-types":"^15.7.2","react-devtools-core":"^3.6.3","react-refresh":"^0.4.0","regenerator-runtime":"^0.13.2",scheduler:"0.15.0","stacktrace-parser":"^0.1.3","whatwg-fetch":"^3.0.0"},description:"A framework for building native apps using React",detox:{"test-runner":"jest","runner-config":"RNTester/e2e/config.json",specs:"",configurations:{"ios.sim.release":{binaryPath:"RNTester/build/Build/Products/Release-iphonesimulator/RNTester.app/",build:"xcodebuild -workspace RNTester/RNTesterPods.xcworkspace -scheme RNTester -configuration Release -sdk iphonesimulator -derivedDataPath RNTester/build -UseModernBuildSystem=NO -quiet",type:"ios.simulator",name:"iPhone 6s"},"ios.sim.debug":{binaryPath:"RNTester/build/Build/Products/Debug-iphonesimulator/RNTester.app/",build:"xcodebuild -workspace RNTester/RNTesterPods.xcworkspace -scheme RNTester -configuration Debug -sdk iphonesimulator -derivedDataPath RNTester/build -UseModernBuildSystem=NO -quiet",type:"ios.simulator",name:"iPhone 6s"}}},devDependencies:{"@babel/core":"^7.0.0","@babel/generator":"^7.0.0","@react-native-community/eslint-plugin":"1.0.0","@reactions/component":"^2.0.2",async:"^2.4.0","babel-eslint":"10.0.1","clang-format":"^1.2.4",coveralls:"^3.0.2",detox:"12.2.0",eslint:"5.1.0","eslint-config-fb-strict":"24.3.0","eslint-config-fbjs":"2.1.0","eslint-config-prettier":"^6.0.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-eslint-comments":"^3.1.1","eslint-plugin-flowtype":"2.50.3","eslint-plugin-jest":"22.4.1","eslint-plugin-jsx-a11y":"6.2.1","eslint-plugin-prettier":"2.6.2","eslint-plugin-react":"7.12.4","eslint-plugin-react-hooks":"^1.5.1","eslint-plugin-react-native":"3.6.0","eslint-plugin-relay":"1.3.0","flow-bin":"^0.105.0","flow-remove-types":"1.2.3",jest:"^24.8.0","jest-junit":"^6.3.0",jscodeshift:"^0.6.2",mkdirp:"^0.5.1",prettier:"1.17.0",react:"16.9.0","react-test-renderer":"16.9.0",shelljs:"^0.7.8",ws:"^6.1.4",yargs:"^9.0.0"},engines:{node:">=8.3"},files:[".flowconfig","android","cli.js","flow","init.sh","scripts/compose-source-maps.js","scripts/ios-configure-glog.sh","scripts/ios-install-third-party.sh","scripts/launchPackager.bat","scripts/launchPackager.command","scripts/node-binary.sh","scripts/packager.sh","scripts/react-native-xcode.sh","jest-preset.js","jest","lib","rn-get-polyfills.js","Libraries","LICENSE","packager","react-native.config.js","react.gradle","React.podspec","React-Core.podspec","React","ReactAndroid","ReactCommon","README.md","third-party-podspecs","template","local-cli","template.config.js","!template/node_modules","!template/yarn.lock","!template/package-lock.json"],homepage:"https://github.com/facebook/react-native#readme","jest-junit":{outputDirectory:"reports/junit",outputName:"js-test-results.xml"},license:"MIT",main:"Libraries/react-native/react-native-implementation.js",name:"react-native",peerDependencies:{react:"16.9.0"},repository:{type:"git",url:"git+ssh://git@github.com/facebook/react-native.git"},scripts:{"build-ios-e2e":"detox build -c ios.sim.release","clang-format":"clang-format -i --glob=*/**/*.{h,cpp,m,mm}","docker-build-android":"docker build -t reactnativeci/android -f .circleci/Dockerfiles/Dockerfile.android .","docker-setup-android":"docker pull reactnativecommunity/react-native-android",flow:"flow","flow-check-android":"flow check --flowconfig-name .flowconfig.android","flow-check-ios":"flow check",format:"npm run prettier && npm run clang-format","format-check":"prettier --list-different \"./**/*.{js,md,yml}\"",lint:"eslint .","lint-ci":"./scripts/circleci/analyze_code.sh && yarn shellcheck",prettier:"prettier --write \"./**/*.{js,md,yml}\"",shellcheck:"./scripts/circleci/analyze_scripts.sh",start:"react-native start",test:"jest","test-android-all":"yarn run docker-build-android && yarn run test-android-run-unit && yarn run test-android-run-instrumentation && yarn run test-android-run-e2e","test-android-e2e":"yarn run docker-build-android && yarn run test-android-run-e2e","test-android-instrumentation":"yarn run docker-build-android && yarn run test-android-run-instrumentation","test-android-run-e2e":"docker run --privileged -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-ci-e2e-tests.sh --android --js","test-android-run-instrumentation":"docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh","test-android-run-unit":"docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-unit-tests.sh","test-android-unit":"yarn run docker-build-android && yarn run test-android-run-unit","test-ci":"jest --maxWorkers=2 --ci --reporters=\"default\" --reporters=\"jest-junit\"","test-ios":"./scripts/objc-test.sh test","test-ios-e2e":"detox test -c ios.sim.release RNTester/e2e"},version:"0.61.5-jitsi.1"}},395,[]); __d(function(g,r,i,a,m,e,d){var n=r(d[0]),o=r(d[1]),t=n(r(d[2]));!(function(n){void 0===n.MediaStream&&(n.MediaStream=o.MediaStream),void 0===n.MediaStreamTrack&&(n.MediaStreamTrack=o.MediaStreamTrack),void 0===n.RTCIceCandidate&&(n.RTCIceCandidate=o.RTCIceCandidate),void 0===n.RTCPeerConnection&&(n.RTCPeerConnection=t.default),void 0===n.RTCPeerConnection&&(n.webkitRTCPeerConnection=t.default),void 0===n.RTCSessionDescription&&(n.RTCSessionDescription=o.RTCSessionDescription);var s=n.navigator;s&&(void 0===s.mediaDevices&&(s.mediaDevices=o.mediaDevices),void 0===s.permissions&&(s.permissions=o.permissions))})(g||window||this)},396,[3,397,431]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.registerGlobals=function(){if('object'!=typeof navigator)throw new Error('navigator is not an object');navigator.mediaDevices||(navigator.mediaDevices={});navigator.mediaDevices.getUserMedia=s.default.getUserMedia.bind(s.default),navigator.mediaDevices.enumerateDevices=s.default.enumerateDevices.bind(s.default),g.RTCPeerConnection=n.default,g.RTCIceCandidate=u.default,g.RTCSessionDescription=o.default,g.MediaStream=c.default,g.MediaStreamTrack=l.default},Object.defineProperty(e,"RTCPeerConnection",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"RTCIceCandidate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"RTCSessionDescription",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"RTCView",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"MediaStream",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"MediaStreamTrack",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"mediaDevices",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"permissions",{enumerable:!0,get:function(){return b.default}});var n=t(r(d[1])),u=t(r(d[2])),o=t(r(d[3])),f=t(r(d[4])),c=t(r(d[5])),l=t(r(d[6])),s=t(r(d[7])),b=t(r(d[8]))},397,[3,398,419,418,422,403,409,427,430]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t(r(d[2])),c=t(r(d[3])),s=t(r(d[4])),u=t(r(d[5])),f=t(r(d[6])),l=t(r(d[7])),h=t(r(d[8])),p=r(d[9]),C=t(r(d[10])),v=t(r(d[11])),_=(t(r(d[12])),t(r(d[13]))),S=t(r(d[14])),I=t(r(d[15])),w=t(r(d[16])),E=t(r(d[17])),k=t(r(d[18])),y=t(r(d[19])),O=n(r(d[20])),L=t(r(d[21])),D=p.NativeModules.WebRTCModule,b=0,T=(function(n){function t(n){var o;return(0,c.default)(this,t),(o=(0,u.default)(this,(0,f.default)(t).call(this))).signalingState='stable',o.iceGatheringState='new',o.connectionState='new',o.iceConnectionState='new',o._localStreams=[],o._remoteStreams=[],o._dataChannelIds=new Set,o._peerConnectionId=b++,D.peerConnectionInit(n,o._peerConnectionId),o._registerEvents(),o}return(0,l.default)(t,n),(0,s.default)(t,[{key:"addStream",value:function(n){-1===this._localStreams.indexOf(n)&&(D.peerConnectionAddStream(n._reactTag,this._peerConnectionId),this._localStreams.push(n))}},{key:"removeStream",value:function(n){var t=this._localStreams.indexOf(n);-1!==t&&(this._localStreams.splice(t,1),D.peerConnectionRemoveStream(n._reactTag,this._peerConnectionId))}},{key:"createOffer",value:function(n){var t=this;return new Promise(function(o,c){D.peerConnectionCreateOffer(t._peerConnectionId,O.normalizeOfferAnswerOptions(n),function(n,t){n?o(new w.default(t)):c(t)})})}},{key:"createAnswer",value:function(){var n=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(o,c){D.peerConnectionCreateAnswer(n._peerConnectionId,O.normalizeOfferAnswerOptions(t),function(n,t){n?o(new w.default(t)):c(t)})})}},{key:"setConfiguration",value:function(n){D.peerConnectionSetConfiguration(n,this._peerConnectionId)}},{key:"setLocalDescription",value:function(n){var t=this;return new Promise(function(o,c){D.peerConnectionSetLocalDescription(n.toJSON?n.toJSON():n,t._peerConnectionId,function(s,u){s?(t.localDescription=n,o()):c(u)})})}},{key:"setRemoteDescription",value:function(n){var t=this;return new Promise(function(o,c){D.peerConnectionSetRemoteDescription(n.toJSON?n.toJSON():n,t._peerConnectionId,function(s,u){s?(t.remoteDescription=n,o()):c(u)})})}},{key:"addIceCandidate",value:function(n){var t=this;return new Promise(function(o,c){D.peerConnectionAddICECandidate(n.toJSON?n.toJSON():n,t._peerConnectionId,function(n){n?o():c(new Error('Failed to add ICE candidate'))})})}},{key:"getStats",value:function(n){var t=this;return new Promise(function(o,c){D.peerConnectionGetStats(n&&n.id||'',t._peerConnectionId,function(n,t){if(n)try{var s=JSON.parse(t);o(s)}catch(n){c(n)}else c(new Error(t))})})}},{key:"getLocalStreams",value:function(){return this._localStreams.slice()}},{key:"getRemoteStreams",value:function(){return this._remoteStreams.slice()}},{key:"close",value:function(){D.peerConnectionClose(this._peerConnectionId)}},{key:"_getTrack",value:function(n,t){var o=this._remoteStreams.find(function(t){return t._reactTag===n});return o&&o._tracks.find(function(n){return n.id===t})}},{key:"_unregisterEvents",value:function(){this._subscriptions.forEach(function(n){return n.remove()}),this._subscriptions=[]}},{key:"_registerEvents",value:function(){var n=this;this._subscriptions=[L.default.addListener('peerConnectionOnRenegotiationNeeded',function(t){t.id===n._peerConnectionId&&n.dispatchEvent(new y.default('negotiationneeded'))}),L.default.addListener('peerConnectionIceConnectionChanged',function(t){t.id===n._peerConnectionId&&(n.iceConnectionState=t.iceConnectionState,n.dispatchEvent(new y.default('iceconnectionstatechange')),'closed'===t.iceConnectionState&&n._unregisterEvents())}),L.default.addListener('peerConnectionStateChanged',function(t){t.id===n._peerConnectionId&&(n.connectionState=t.connectionState,n.dispatchEvent(new y.default('connectionstatechange')),'closed'===t.connectionState&&n._unregisterEvents())}),L.default.addListener('peerConnectionSignalingStateChanged',function(t){t.id===n._peerConnectionId&&(n.signalingState=t.signalingState,n.dispatchEvent(new y.default('signalingstatechange')))}),L.default.addListener('peerConnectionAddedStream',function(t){if(t.id===n._peerConnectionId){var o=new C.default(t);n._remoteStreams.push(o),n.dispatchEvent(new v.default('addstream',{stream:o}))}}),L.default.addListener('peerConnectionRemovedStream',function(t){if(t.id===n._peerConnectionId){var o=n._remoteStreams.find(function(n){return n._reactTag===t.streamId});if(o){var c=n._remoteStreams.indexOf(o);-1!==c&&n._remoteStreams.splice(c,1)}n.dispatchEvent(new v.default('removestream',{stream:o}))}}),L.default.addListener('mediaStreamTrackMuteChanged',function(t){if(t.peerConnectionId===n._peerConnectionId){var o=n._getTrack(t.streamReactTag,t.trackId);if(o){o.muted=t.muted;var c=t.muted?'mute':'unmute';o.dispatchEvent(new _.default(c,{track:o}))}}}),L.default.addListener('peerConnectionGotICECandidate',function(t){if(t.id===n._peerConnectionId){var o=new E.default(t.candidate),c=new k.default('icecandidate',{candidate:o});n.dispatchEvent(c)}}),L.default.addListener('peerConnectionIceGatheringChanged',function(t){t.id===n._peerConnectionId&&(n.iceGatheringState=t.iceGatheringState,'complete'===n.iceGatheringState&&n.dispatchEvent(new k.default('icecandidate',null)),n.dispatchEvent(new y.default('icegatheringstatechange')))}),L.default.addListener('peerConnectionDidOpenDataChannel',function(t){if(t.id===n._peerConnectionId){var o=t.dataChannel,c=o.id;if('number'==typeof c&&-1!==c){var s=new S.default(n._peerConnectionId,o.label,o);n._dataChannelIds.add(c),n.dispatchEvent(new I.default('datachannel',{channel:s}))}}})]}},{key:"createDataChannel",value:function(n,t){var c,s=this._dataChannelIds;if(t&&'id'in t){if('number'!=typeof(c=t.id))throw new TypeError('DataChannel id must be a number: '+c);if(s.has(c))throw new ResourceInUse('DataChannel id already in use: '+c)}else{for(c=1;c<65535&&s.has(c);++c);t=(0,o.default)({id:c},t)}return D.createDataChannel(this._peerConnectionId,n,t),s.add(c),new S.default(this._peerConnectionId,n,t)}}]),t})((0,h.default)(['connectionstatechange','icecandidate','icecandidateerror','iceconnectionstatechange','icegatheringstatechange','negotiationneeded','signalingstatechange','datachannel','addstream','removestream']));e.default=T},398,[2,3,24,4,5,6,9,10,399,15,403,412,409,413,414,416,418,419,420,421,411,417]); __d(function(g,r,i,a,m,e,d){"use strict";var t=r(d[0]),n=r(d[1]),l=r(d[2]),o=t.LISTENERS,u=t.CAPTURE,f=t.BUBBLE,c=t.ATTRIBUTE,s=t.newNode,v=n.defineCustomEventTarget,h=l.createEventWrapper,E=l.STOP_IMMEDIATE_PROPAGATION_FLAG,p="undefined"!=typeof window&&void 0!==window.EventTarget,w=m.exports=function t(){if(!(this instanceof t)){if(1===arguments.length&&Array.isArray(arguments[0]))return v(t,arguments[0]);if(arguments.length>0){for(var n=Array(arguments.length),l=0;l=f.length)break;T=f[h++]}else{if((h=f.next()).done)break;T=h.value}var _=T;o.addTrack(_)}}else if(Array.isArray(t)){y.mediaStreamCreate(o.id);var b=t,p=Array.isArray(b),S=0;for(b=p?b:b["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var A;if(p){if(S>=b.length)break;A=b[S++]}else{if((S=b.next()).done)break;A=S.value}var R=A;o.addTrack(R)}}else{if(!('object'==typeof t&&t.streamId&&t.streamReactTag&&t.tracks))throw new TypeError("invalid type: "+typeof t);o.id=t.streamId,o._reactTag=t.streamReactTag;var w=t.tracks,x=Array.isArray(w),C=0;for(w=x?w:w["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var I;if(x){if(C>=w.length)break;I=w[C++]}else{if((C=w.next()).done)break;I=C.value}var M=I;o._tracks.push(new v.default(M))}}return o}return(0,f.default)(s,t),(0,o.default)(s,[{key:"addTrack",value:function(t){-1===this._tracks.indexOf(t)&&(this._tracks.push(t),y.mediaStreamAddTrack(this._reactTag,t.id))}},{key:"removeTrack",value:function(t){var n=this._tracks.indexOf(t);-1!==n&&(this._tracks.splice(n,1),y.mediaStreamRemoveTrack(this._reactTag,t.id))}},{key:"getTracks",value:function(){return this._tracks.slice()}},{key:"getTrackById",value:function(t){return this._tracks.find(function(n){return n.id===t})}},{key:"getAudioTracks",value:function(){return this._tracks.filter(function(t){return'audio'===t.kind})}},{key:"getVideoTracks",value:function(){return this._tracks.filter(function(t){return'video'===t.kind})}},{key:"clone",value:function(){throw new Error('Not implemented.')}},{key:"toURL",value:function(){return this._reactTag}},{key:"release",value:function(){y.mediaStreamRelease(this._reactTag)}}]),s})((0,l.default)(['active','inactive','addtrack','removetrack']));e.default=h},403,[3,4,5,6,9,10,15,399,404,409]); __d(function(g,r,i,a,m,e,d){var v=r(d[0]),n=r(d[1]),o=n;o.v1=v,o.v4=n,m.exports=o},404,[405,408]); __d(function(g,r,i,a,m,e,d){var n,o,s=r(d[0]),c=r(d[1]),v=0,l=0;m.exports=function(u,t,f){var k=t&&f||0,q=t||[],w=(u=u||{}).node||n,h=void 0!==u.clockseq?u.clockseq:o;if(null==w||null==h){var _=s();null==w&&(w=n=[1|_[0],_[1],_[2],_[3],_[4],_[5]]),null==h&&(h=o=16383&(_[6]<<8|_[7]))}var p=void 0!==u.msecs?u.msecs:(new Date).getTime(),x=void 0!==u.nsecs?u.nsecs:l+1,C=p-v+(x-l)/1e4;if(C<0&&void 0===u.clockseq&&(h=h+1&16383),(C<0||p>v)&&void 0===u.nsecs&&(x=0),x>=1e4)throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');v=p,l=x,o=h;var D=(1e4*(268435455&(p+=122192928e5))+x)%4294967296;q[k++]=D>>>24&255,q[k++]=D>>>16&255,q[k++]=D>>>8&255,q[k++]=255&D;var E=p/4294967296*1e4&268435455;q[k++]=E>>>8&255,q[k++]=255&E,q[k++]=E>>>24&15|16,q[k++]=E>>>16&255,q[k++]=h>>>8|128,q[k++]=255&h;for(var M=0;M<6;++M)q[k+M]=w[M];return t||c(q)}},405,[406,407]); __d(function(g,r,i,a,m,e,d){var n='undefined'!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||'undefined'!=typeof msCrypto&&'function'==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var t=new Uint8Array(16);m.exports=function(){return n(t),t}}else{var o=new Array(16);m.exports=function(){for(var n,t=0;t<16;t++)0==(3&t)&&(n=4294967296*Math.random()),o[t]=n>>>((3&t)<<3)&255;return o}}},406,[]); __d(function(g,r,i,a,m,e,d){for(var n=[],t=0;t<256;++t)n[t]=(t+256).toString(16).substr(1);m.exports=function(t,o){var u=o||0,f=n;return[f[t[u++]],f[t[u++]],f[t[u++]],f[t[u++]],'-',f[t[u++]],f[t[u++]],'-',f[t[u++]],f[t[u++]],'-',f[t[u++]],f[t[u++]],'-',f[t[u++]],f[t[u++]],f[t[u++]],f[t[u++]],f[t[u++]],f[t[u++]]].join('')}},407,[]); __d(function(g,r,i,a,m,e,d){var n=r(d[0]),o=r(d[1]);m.exports=function(t,f,u){var l=f&&u||0;'string'==typeof t&&(f='binary'===t?new Array(16):null,t=null);var v=(t=t||{}).random||(t.rng||n)();if(v[6]=15&v[6]|64,v[8]=63&v[8]|128,f)for(var y=0;y<16;++y)f[l+y]=v[y];return f||o(v)}},408,[406,407]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(d[1])),o=t(r(d[2])),l=t(r(d[3])),s=t(r(d[4])),u=t(r(d[5])),c=r(d[6]),f=t(r(d[7])),h=(t(r(d[8])),r(d[9])),v=c.NativeModules.WebRTCModule,k=(function(t){function c(t){var o;(0,n.default)(this,c),(o=(0,l.default)(this,(0,s.default)(c).call(this)))._constraints=t.constraints||{},o._enabled=t.enabled,o.id=t.id,o.kind=t.kind,o.label=t.label,o.muted=!1,o.remote=t.remote;var u=t.readyState.toLowerCase();return o.readyState="initializing"===u||"live"===u?"live":"ended",o}return(0,u.default)(c,t),(0,o.default)(c,[{key:"stop",value:function(){v.mediaStreamTrackSetEnabled(this.id,!1),this.readyState='ended'}},{key:"_switchCamera",value:function(){if(this.remote)throw new Error('Not implemented for remote tracks');if('video'!==this.kind)throw new Error('Only implemented for video tracks');v.mediaStreamTrackSwitchCamera(this.id)}},{key:"applyConstraints",value:function(){throw new Error('Not implemented.')}},{key:"clone",value:function(){throw new Error('Not implemented.')}},{key:"getCapabilities",value:function(){throw new Error('Not implemented.')}},{key:"getConstraints",value:function(){return(0,h.deepClone)(this._constraints)}},{key:"getSettings",value:function(){throw new Error('Not implemented.')}},{key:"release",value:function(){v.mediaStreamTrackRelease(this.id)}},{key:"enabled",get:function(){return this._enabled},set:function(t){t!==this._enabled&&(v.mediaStreamTrackSetEnabled(this.id,!this._enabled),this._enabled=!this._enabled,this.muted=!this._enabled)}}]),c})((0,f.default)(['ended','mute','unmute','overconstrained']));e.default=k},409,[3,4,5,6,9,10,15,399,410,411]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=t(r(d[1])),f=t(r(d[2]));e.default=function t(l,n){(0,f.default)(this,t),this.type=l.toString(),(0,u.default)(this,n)}},410,[3,24,4]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.deepClone=w,e.normalizeOfferAnswerOptions=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o={};if(!t)return o;t.mandatory&&(t=t.mandatory);for(var f=Object.entries(t),c=0;c0&&void 0!==arguments[0]?arguments[0]:{};if('object'!=typeof o)return Promise.reject(new TypeError('constraints is not a dictionary'));if(!(void 0!==o.audio&&o.audio||void 0!==o.video&&o.video))return Promise.reject(new TypeError('audio and/or video is required'));var t=[];(o=u.normalizeConstraints(o)).audio?t.push(c.default.request({name:'microphone'})):t.push(Promise.resolve(!1));o.video?t.push(c.default.request({name:'camera'})):t.push(Promise.resolve(!1));return new Promise(function(s,c){Promise.all(t).then(function(t){var p=(0,n.default)(t,2),y=p[0],h=p[1];if(y||h){y||delete o.audio,h||delete o.video;v.getUserMedia(o,function(t,n){for(var f=n,c=Array.isArray(f),v=0,f=c?f:f["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var p;if(c){if(v>=f.length)break;p=f[v++]}else{if((v=f.next()).done)break;p=v.value}var y=p,h=o[y.kind];'object'==typeof h&&(y.constraints=u.deepClone(h))}var b={streamId:t,streamReactTag:t,tracks:n};s(new l.default(b))},function(o,t){var n;switch(o){case'TypeError':n=new TypeError(t)}n||(n=new f.default({message:t,name:o}));c(n)})}else{c(new f.default({message:'Permission denied.',name:'SecurityError'}))}})})};var n=t(r(d[2])),s=r(d[3]),u=o(r(d[4])),l=t(r(d[5])),f=t(r(d[6])),c=t(r(d[7])),v=s.NativeModules.WebRTCModule},428,[2,3,25,15,411,403,429,430]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=t(r(d[1]));e.default=function t(n){(0,s.default)(this,t),this.name=n.name,this.message=n.message,this.constraintName=n.constraintName}},429,[3,4]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(r(d[1])),o=n(r(d[2])),s=r(d[3]),u=s.NativeModules.WebRTCModule,P=new((function(){function n(){(0,t.default)(this,n),this.RESULT={DENIED:'denied',GRANTED:'granted',PROMPT:'prompt'},this.VALID_PERMISSIONS=['camera','microphone'],this._lastReq=Promise.resolve()}return(0,o.default)(n,[{key:"_requestPermissionAndroid",value:function(n){return new Promise(function(t,o){s.PermissionsAndroid.request(n).then(function(n){return t(!0===n||n===s.PermissionsAndroid.RESULTS.GRANTED)},function(){return t(!1)})})}},{key:"_validatePermissionDescriptior",value:function(n){if("object"!=typeof n)throw new TypeError("Argument 1 of Permissions.query is not an object.");if(void 0===n.name)throw new TypeError("Missing required 'name' member of PermissionDescriptor.");if(-1===this.VALID_PERMISSIONS.indexOf(n.name))throw new TypeError("'name' member of PermissionDescriptor is not a valid value for enumeration PermissionName.")}},{key:"query",value:function(n){var t=this;try{this._validatePermissionDescriptior(n)}catch(n){return Promise.reject(n)}if('android'===s.Platform.OS){var o='camera'===n.name?s.PermissionsAndroid.PERMISSIONS.CAMERA:s.PermissionsAndroid.PERMISSIONS.RECORD_AUDIO;return new Promise(function(n,u){s.PermissionsAndroid.check(o).then(function(o){return n(o?t.RESULT.GRANTED:t.RESULT.PROMPT)},function(){return n(t.RESULT.PROMPT)})})}return'ios'===s.Platform.OS?u.checkPermission(n.name):Promise.reject(new TypeError("Unsupported platform."))}},{key:"request",value:function(n){var t=this;try{this._validatePermissionDescriptior(n)}catch(n){return Promise.reject(n)}if('android'===s.Platform.OS){var o='camera'===n.name?s.PermissionsAndroid.PERMISSIONS.CAMERA:s.PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,P=function(){return t._requestPermissionAndroid(o)};return this._lastReq=this._lastReq.then(P,P),this._lastReq}return'ios'===s.Platform.OS?u.requestPermission(n.name):Promise.reject(new TypeError("Unsupported platform."))}}]),n})());e.default=P},430,[3,4,5,15]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=f;var n=t(r(d[1])),o=t(r(d[2])),u=r(d[3]),s=r(d[4]);function f(){for(var t=this,n=arguments.length,o=new Array(n),u=0;u=10&&'typ'===v[6]){for(var l=[v[4]],h=!1,y=8;y>18&63)+s.charAt(h>>12&63)+s.charAt(h>>6&63)+s.charAt(63&h);return 2==A?(n=t.charCodeAt(p)<<8,o=t.charCodeAt(++p),l+=s.charAt((h=n+o)>>10)+s.charAt(h>>4&63)+s.charAt(h<<2&63)+'='):1==A&&(h=t.charCodeAt(p),l+=s.charAt(h>>2)+s.charAt(h<<4&63)+'=='),l},decode:function(t){var n=(t=String(t).replace(A,'')).length;n%4==0&&(n=(t=t.replace(/==?$/,'')).length),(n%4==1||/[^+a-zA-Z0-9/]/.test(t))&&f('Invalid character: the string to be decoded is not correctly encoded.');for(var o,c,h=0,l='',p=-1;++p>(-2*h&6)));return l},version:'0.1.0'};if('function'==typeof define&&'object'==typeof define.amd&&define.amd)define(function(){return l});else if(n&&!n.nodeType)if(o)o.exports=l;else for(var p in l)l.hasOwnProperty(p)&&(n[p]=l[p]);else t.base64=l})(this)},433,[]); __d(function(g,r,i,a,m,e,d){'use strict';!(function(n){function t(n,t,o){var h,l,A,p,E,H,v,S,U,k=0,F=[],R=0,y=!1,B=[],L=[],T=!1,C=!1,Y=-1;if(h=(o=o||{}).encoding||"UTF8",(U=o.numRounds||1)!==parseInt(U,10)||1>U)throw Error("numRounds must a integer >= 1");if("SHA-1"===n)E=512,H=N,v=j,p=160,S=function(n){return n.slice()};else if(0===n.lastIndexOf("SHA-",0))if(H=function(t,o){return z(t,o,n)},v=function(t,o,u,f){var w,s;if("SHA-224"===n||"SHA-256"===n)w=15+(o+65>>>9<<4),s=16;else{if("SHA-384"!==n&&"SHA-512"!==n)throw Error("Unexpected error in SHA-2 implementation");w=31+(o+129>>>10<<5),s=32}for(;t.length<=w;)t.push(0);for(t[o>>>5]|=128<<24-o%32,o+=u,t[w]=4294967295&o,t[w-1]=o/4294967296|0,u=t.length,o=0;ot;t+=1)o[t]=n[t].slice();return o},Y=1,"SHA3-224"===n)E=1152,p=224;else if("SHA3-256"===n)E=1088,p=256;else if("SHA3-384"===n)E=832,p=384;else if("SHA3-512"===n)E=576,p=512;else if("SHAKE128"===n)E=1344,p=-1,x=31,C=!0;else{if("SHAKE256"!==n)throw Error("Chosen SHA variant is not supported");E=1088,p=-1,x=31,C=!0}v=function(n,t,o,u,f){var w,s=x,c=[],b=(o=E)>>>5,h=0,l=t>>>5;for(w=0;w=o;w+=b)u=Z(n.slice(w,w+b),u),t-=o;for(n=n.slice(w),t%=o;n.length>>3)>>2]^=s<=f));)c.push(n.a),0==64*(h+=1)%o&&Z(null,u);return c}}A=b(t,h,Y),l=K(n),this.setHMACKey=function(t,o,u){var f;if(!0===y)throw Error("HMAC key already set");if(!0===T)throw Error("Cannot set HMAC key after calling update");if(!0===C)throw Error("SHAKE is not supported for HMAC");if(t=(o=b(o,h=(u||{}).encoding||"UTF8",Y)(t)).binLen,o=o.value,u=(f=E>>>3)/4-1,ft/8){for(;o.length<=u;)o.push(0);o[u]&=4294967040}for(t=0;t<=u;t+=1)B[t]=909522486^o[t],L[t]=1549556828^o[t];l=H(B,l),k=E,y=!0},this.update=function(n){var t,o,u,f=0,w=E>>>5;for(n=(t=A(n,F,R)).binLen,o=t.value,t=n>>>5,u=0;u>>5),R=n%E,T=!0},this.getHash=function(t,o){var b,h,A,E;if(!0===y)throw Error("Cannot call getHash after setting HMAC key");if(A=c(o),!0===C){if(-1===A.shakeLen)throw Error("shakeLen must be specified in options");p=A.shakeLen}switch(t){case"HEX":b=function(n){return u(n,p,Y,A)};break;case"B64":b=function(n){return f(n,p,Y,A)};break;case"BYTES":b=function(n){return w(n,p,Y)};break;case"ARRAYBUFFER":try{h=new ArrayBuffer(0)}catch(n){throw Error("ARRAYBUFFER not supported by this environment")}b=function(n){return s(n,p,Y)};break;default:throw Error("format must be HEX, B64, BYTES, or ARRAYBUFFER")}for(E=v(F.slice(),R,k,S(l),p),h=1;h>>24-p%32),E=v(E,p,0,K(n),p);return b(E)},this.getHMAC=function(t,o){var b,h,A,U;if(!1===y)throw Error("Cannot call getHMAC without first setting HMAC key");switch(A=c(o),t){case"HEX":b=function(n){return u(n,p,Y,A)};break;case"B64":b=function(n){return f(n,p,Y,A)};break;case"BYTES":b=function(n){return w(n,p,Y)};break;case"ARRAYBUFFER":try{b=new ArrayBuffer(0)}catch(n){throw Error("ARRAYBUFFER not supported by this environment")}b=function(n){return s(n,p,Y)};break;default:throw Error("outputFormat must be HEX, B64, BYTES, or ARRAYBUFFER")}return h=v(F.slice(),R,k,S(l),p),U=H(L,K(n)),b(U=v(h,p,E,U,p))}}function o(n,t){this.a=n,this.b=t}function u(n,t,o,u){var f,w,s,c="";for(t/=8,s=-1===o?3:0,f=0;f>>2]>>>8*(s+f%4*o),c+="0123456789abcdef".charAt(w>>>4&15)+"0123456789abcdef".charAt(15&w);return u.outputUpper?c.toUpperCase():c}function f(n,t,o,u){var f,w,s,c,b="",h=t/8;for(c=-1===o?3:0,f=0;f>>2]:0,s=f+2>>2]:0,s=(n[f>>>2]>>>8*(c+f%4*o)&255)<<16|(w>>>8*(c+(f+1)%4*o)&255)<<8|s>>>8*(c+(f+2)%4*o)&255,w=0;4>w;w+=1)b+=8*f+6*w<=t?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(s>>>6*(3-w)&63):u.b64Pad;return b}function w(n,t,o){var u,f,w,s="";for(t/=8,w=-1===o?3:0,u=0;u>>2]>>>8*(w+u%4*o)&255,s+=String.fromCharCode(f);return s}function s(n,t,o){t/=8;var u,f,w,s=new ArrayBuffer(t);for(w=new Uint8Array(s),f=-1===o?3:0,u=0;u>>2]>>>8*(f+u%4*o)&255;return s}function c(n){var t={outputUpper:!1,b64Pad:"=",shakeLen:-1};if(n=n||{},t.outputUpper=n.outputUpper||!1,!0===n.hasOwnProperty("b64Pad")&&(t.b64Pad=n.b64Pad),!0===n.hasOwnProperty("shakeLen")){if(0!=n.shakeLen%8)throw Error("shakeLen must be a multiple of 8");t.shakeLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw Error("Invalid b64Pad formatting option");return t}function b(n,t,o){switch(t){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(n){case"HEX":n=function(n,t,u){var f,w,s,c,b,h,l=n.length;if(0!=l%2)throw Error("String of HEX type must be in byte increments");for(t=t||[0],b=(u=u||0)>>>3,h=-1===o?3:0,f=0;f>>1)+b)>>>2;t.length<=s;)t.push(0);t[s]|=w<<8*(h+c%4*o)}return{value:t,binLen:4*l+u}};break;case"TEXT":n=function(n,u,f){var w,s,c,b,h,l,A,p,E=0;if(u=u||[0],h=(f=f||0)>>>3,"UTF8"===t)for(p=-1===o?3:0,c=0;c(w=n.charCodeAt(c))?s.push(w):2048>w?(s.push(192|w>>>6),s.push(128|63&w)):55296>w||57344<=w?s.push(224|w>>>12,128|w>>>6&63,128|63&w):(c+=1,w=65536+((1023&w)<<10|1023&n.charCodeAt(c)),s.push(240|w>>>18,128|w>>>12&63,128|w>>>6&63,128|63&w)),b=0;b>>2;u.length<=l;)u.push(0);u[l]|=s[b]<<8*(p+A%4*o),E+=1}else if("UTF16BE"===t||"UTF16LE"===t)for(p=-1===o?2:0,s="UTF16LE"===t&&1!==o||"UTF16LE"!==t&&1===o,c=0;c>>8),l=(A=E+h)>>>2;u.length<=l;)u.push(0);u[l]|=w<<8*(p+A%4*o),E+=2}return{value:u,binLen:8*E+f}};break;case"B64":n=function(n,t,u){var f,w,s,c,b,h,l,A,p=0;if(-1===n.search(/^[a-zA-Z0-9=+\/]+$/))throw Error("Invalid character in base-64 string");if(w=n.indexOf("="),n=n.replace(/\=/g,""),-1!==w&&w0;){var t=e.shift();if("function"==typeof t){var n=e.shift(),r=e.shift();t.call(n,r)}else t._settlePromises()}},i.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},i.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},i.prototype._reset=function(){this._isTickUsed=!1},n.exports=i,n.exports.firstLineError=c},{"./queue":26,"./schedule":29,"./util":36}],3:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){var i=!1,a=function(e,t){this._reject(t)},o=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(a,a,null,this,e)},s=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},c=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(a){i||(i=!0,e.prototype._propagateFrom=r.propagateFromFunction(),e.prototype._boundValue=r.boundValueFunction());var u=n(a),l=new e(t);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(u),u instanceof e){var d={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:u};f._then(t,o,void 0,l,d),u._then(s,c,void 0,l,d),l._setOnCancel(u)}else l._resolveCallback(f);return l},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,n){return e.resolve(n).bind(t)}}},{}],4:[function(e,t,n){"use strict";var r;"undefined"!=typeof Promise&&(r=Promise);var i=e("./promise")();i.noConflict=function(){try{Promise===i&&(Promise=r)}catch(e){}return i},t.exports=i},{"./promise":22}],5:[function(e,t,n){"use strict";var r=Object.create;if(r){var i=r(null),a=r(null);i[" size"]=a[" size"]=0}t.exports=function(t){function n(e,n){var r;if(null!=e&&(r=e[n]),"function"!=typeof r){var i="Object "+o.classString(e)+" has no method '"+o.toString(n)+"'";throw new t.TypeError(i)}return r}function r(e){return n(e,this.pop()).apply(e,this)}function i(e){return e[this]}function a(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}var o=e("./util"),s=o.canEvaluate;o.isIdentifier,t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(r,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t;if("number"==typeof e)t=a;else if(s){var n=(void 0)(e);t=null!==n?n:i}else t=i;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,n){"use strict";t.exports=function(t,n,r,i){var a=e("./util"),o=a.tryCatch,s=a.errorObj,c=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var n=e._cancellationParent;if(null==n||!n._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=n}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(a.isArray(e))for(var n=0;n=0)return i[e]}var r=!1,i=[];return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},t.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,i.push(this._trace))},t.prototype._popContext=function(){if(void 0!==this._trace){var e=i.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},t.CapturedTrace=null,t.create=function(){if(r)return new t},t.deactivateLongStackTraces=function(){},t.activateLongStackTraces=function(){var i=e.prototype._pushContext,a=e.prototype._popContext,o=e._peekContext,s=e.prototype._peekContext,c=e.prototype._promiseCreated;t.deactivateLongStackTraces=function(){e.prototype._pushContext=i,e.prototype._popContext=a,e._peekContext=o,e.prototype._peekContext=s,e.prototype._promiseCreated=c,r=!1},r=!0,e.prototype._pushContext=t.prototype._pushContext,e.prototype._popContext=t.prototype._popContext,e._peekContext=e.prototype._peekContext=n,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},t}},{}],9:[function(t,n,r){"use strict";n.exports=function(n,r){function i(e,t){return{promise:t}}function a(){return!1}function o(e,t,n){var r=this;try{e(t,n,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+x.toString(e));r._attachCancellationCallback(e)})}catch(e){return e}}function s(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?x.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function c(){return this._onCancelField}function u(e){this._onCancelField=e}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(e,t){if(0!=(1&t)){this._cancellationParent=e;var n=e._branchesRemainingToCancel;void 0===n&&(n=0),e._branchesRemainingToCancel=n+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function d(){var e=this._boundTo;return void 0!==e&&e instanceof n?e.isFulfilled()?e.value():void 0:e}function h(){this._trace=new I(this._peekContext())}function p(e,t){if(D(e)){var n=this._trace;if(void 0!==n&&t&&(n=n._parent),void 0!==n)n.attachExtraTrace(e);else if(!e.__stackCleaned__){var r=k(e);x.notEnumerableProp(e,"stack",r.message+"\n"+r.stack.join("\n")),x.notEnumerableProp(e,"__stackCleaned__",!0)}}}function v(e,t,r){if(ne.warnings){var i,a=new A(e);if(t)r._attachExtraTrace(a);else if(ne.longStackTraces&&(i=n._peekContext()))i.attachExtraTrace(a);else{var o=k(a);a.stack=o.message+"\n"+o.stack.join("\n")}$("warning",a)||w(a,"",!0)}}function g(e,t){for(var n=0;n=0;--s)if(r[s]===a){o=s;break}for(s=o;s>=0;--s){var c=r[s];if(t[i]!==c)break;t.pop(),i--}t=r}}function b(e){for(var t=[],n=0;n0&&"SyntaxError"!=e.name&&(t=t.slice(n)),t}function k(e){var t=e.stack,n=e.toString();return t="string"==typeof t&&t.length>0?S(e):[" (No stack trace)"],{message:n,stack:"SyntaxError"==e.name?t:b(t)}}function w(e,t,n){if("undefined"!=typeof console){var r;if(x.isObject(e)){var i=e.stack;r=t+N(i,e)}else r=t+String(e);"function"==typeof M?M(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function C(e,t,n,r){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(r):t(n,r))}catch(e){j.throwLater(e)}"unhandledRejection"===e?$(e,n,r)||i||w(n,"Unhandled rejection "):$(e,r)}function _(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{if(t=e&&"function"==typeof e.toString?e.toString():x.toString(e),/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+T(t)+">, no stack trace)"}function T(e){return e.length<41?e:e.substr(0,38)+"..."}function P(){return"function"==typeof te}function E(e){var t=e.match(ee);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function I(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);te(this,I),t>32&&this.uncycle()}var R,O,M,F=n._getDomain,j=n._async,A=t("./errors").Warning,x=t("./util"),D=x.canAttachTrace,U=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,L=/\((?:timers\.js):\d+:\d+\)/,B=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,H=null,N=null,V=!1,W=!(0==x.env("BLUEBIRD_DEBUG")),q=!(0==x.env("BLUEBIRD_WARNINGS")||!W&&!x.env("BLUEBIRD_WARNINGS")),G=!(0==x.env("BLUEBIRD_LONG_STACK_TRACES")||!W&&!x.env("BLUEBIRD_LONG_STACK_TRACES")),z=0!=x.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(q||!!x.env("BLUEBIRD_W_FORGOTTEN_RETURN"));n.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},n.prototype._ensurePossibleRejectionHandled=function(){if(0==(524288&this._bitField)){this._setRejectionIsUnhandled();var e=this;setTimeout(function(){e._notifyUnhandledRejection()},1)}},n.prototype._notifyUnhandledRejectionIsHandled=function(){C("rejectionHandled",R,void 0,this)},n.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},n.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},n.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),C("unhandledRejection",O,e,this)}},n.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},n.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},n.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},n.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},n.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},n.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},n.prototype._warn=function(e,t,n){return v(e,t,n||this)},n.onPossiblyUnhandledRejection=function(e){var t=F();O="function"==typeof e?null===t?e:x.domainBind(t,e):void 0},n.onUnhandledRejectionHandled=function(e){var t=F();R="function"==typeof e?null===t?e:x.domainBind(t,e):void 0};var Q=function(){};n.longStackTraces=function(){if(j.haveItemsQueued()&&!ne.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ne.longStackTraces&&P()){var e=n.prototype._captureStackTrace,t=n.prototype._attachExtraTrace;ne.longStackTraces=!0,Q=function(){if(j.haveItemsQueued()&&!ne.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");n.prototype._captureStackTrace=e,n.prototype._attachExtraTrace=t,r.deactivateLongStackTraces(),j.enableTrampoline(),ne.longStackTraces=!1},n.prototype._captureStackTrace=h,n.prototype._attachExtraTrace=p,r.activateLongStackTraces(),j.disableTrampolineIfNecessary()}},n.hasLongStackTraces=function(){return ne.longStackTraces&&P()};var J=(function(){try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return x.global.dispatchEvent(e),function(e,t){var n=new CustomEvent(e.toLowerCase(),{detail:t,cancelable:!0});return!x.global.dispatchEvent(n)}}if("function"==typeof Event){e=new Event("CustomEvent");return x.global.dispatchEvent(e),function(e,t){var n=new Event(e.toLowerCase(),{cancelable:!0});return n.detail=t,!x.global.dispatchEvent(n)}}return(e=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),x.global.dispatchEvent(e),function(e,t){var n=document.createEvent("CustomEvent");return n.initCustomEvent(e.toLowerCase(),!1,!0,t),!x.global.dispatchEvent(n)}}catch(e){}return function(){return!1}})(),K=x.isNode?function(){return e.emit.apply(e,arguments)}:x.global?function(e){var t="on"+e.toLowerCase(),n=x.global[t];return!!n&&(n.apply(x.global,[].slice.call(arguments,1)),!0)}:function(){return!1},X={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(e,t,n){return{promise:t,child:n}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,n){return{reason:t,promise:n}},rejectionHandled:i},$=function(e){var t=!1;try{t=K.apply(null,arguments)}catch(e){j.throwLater(e),t=!0}var n=!1;try{n=J(e,X[e].apply(null,arguments))}catch(e){j.throwLater(e),n=!0}return n||t};n.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?n.longStackTraces():!e.longStackTraces&&n.hasLongStackTraces()&&Q()),"warnings"in e){var t=e.warnings;ne.warnings=!!t,z=ne.warnings,x.isObject(t)&&"wForgottenReturn"in t&&(z=!!t.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!ne.cancellation){if(j.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");n.prototype._clearCancellationData=l,n.prototype._propagateFrom=f,n.prototype._onCancel=c,n.prototype._setOnCancel=u,n.prototype._attachCancellationCallback=s,n.prototype._execute=o,Y=f,ne.cancellation=!0}return"monitoring"in e&&(e.monitoring&&!ne.monitoring?(ne.monitoring=!0,n.prototype._fireEvent=$):!e.monitoring&&ne.monitoring&&(ne.monitoring=!1,n.prototype._fireEvent=a)),n},n.prototype._fireEvent=a,n.prototype._execute=function(e,t,n){try{e(t,n)}catch(e){return e}},n.prototype._onCancel=function(){},n.prototype._setOnCancel=function(e){},n.prototype._attachCancellationCallback=function(e){},n.prototype._captureStackTrace=function(){},n.prototype._attachExtraTrace=function(){},n.prototype._clearCancellationData=function(){},n.prototype._propagateFrom=function(e,t){};var Y=function(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)},Z=function(){return!1},ee=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;x.inherits(I,Error),r.CapturedTrace=I,I.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],n={},r=0,i=this;void 0!==i;++r)t.push(i),i=i._parent;for(r=(e=this._length=r)-1;r>=0;--r){var a=t[r].stack;void 0===n[a]&&(n[a]=r)}for(r=0;r0&&(t[o-1]._parent=void 0,t[o-1]._length=1),t[r]._parent=void 0,t[r]._length=1;var s=r>0?t[r-1]:this;o=0;--u)t[u]._length=c,c++;return}}}},I.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=k(e),n=t.message,r=[t.stack],i=this;void 0!==i;)r.push(b(i.stack.split("\n"))),i=i._parent;m(r),y(r),x.notEnumerableProp(e,"stack",g(n,r)),x.notEnumerableProp(e,"__stackCleaned__",!0)}};var te=(function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():_(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,H=e,N=t;var n=Error.captureStackTrace;return Z=function(e){return U.test(e)},function(e,t){Error.stackTraceLimit+=6,n(e,t),Error.stackTraceLimit-=6}}var r,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return H=/@/,N=t,V=!0,function(e){e.stack=(new Error).stack};try{throw new Error}catch(e){r="stack"in e}return"stack"in i||!r||"number"!=typeof Error.stackTraceLimit?(N=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?_(t):t.toString()},null):(H=e,N=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})})();"undefined"!=typeof console&&void 0!==console.warn&&(M=function(e){console.warn(e)},x.isNode&&e.stderr.isTTY?M=function(e,t){var n=t?"\x1b[33m":"\x1b[31m";console.warn(n+e+"\x1b[0m\n")}:x.isNode||"string"!=typeof(new Error).stack||(M=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var ne={warnings:q,longStackTraces:!1,cancellation:!1,monitoring:!1};return G&&n.longStackTraces(),{longStackTraces:function(){return ne.longStackTraces},warnings:function(){return ne.warnings},cancellation:function(){return ne.cancellation},monitoring:function(){return ne.monitoring},propagateFromFunction:function(){return Y},boundValueFunction:function(){return d},checkForgottenReturns:function(e,t,n,r,i){if(void 0===e&&null!==t&&z){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&r._bitField))return;n&&(n+=" ");var a="",o="";if(t._trace){for(var s=t._trace.stack.split("\n"),c=b(s),u=c.length-1;u>=0;--u){var l=c[u];if(!L.test(l)){var f=l.match(B);f&&(a="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(c.length>0){var d=c[0];for(u=0;u0&&(o="\n"+s[u-1]);break}}}var h="a promise was created in a "+n+"handler "+a+"but was not returned from it, see http://goo.gl/rRqMUw"+o;r._warn(h,!0,t)}},setBounds:function(e,t){if(P()){for(var n,r,i=e.stack.split("\n"),a=t.stack.split("\n"),o=-1,s=-1,c=0;c=s||(Z=function(e){if(U.test(e))return!0;var t=E(e);return!!(t&&t.fileName===n&&o<=t.line&&t.line<=s)})}},warn:v,deprecated:function(e,t){var n=e+" is deprecated and will be removed in a future version.";return t&&(n+=" Use "+t+" instead."),v(n)},CapturedTrace:I,fireDomEvent:J,fireGlobalEvent:K}}},{"./errors":12,"./util":36}],10:[function(e,t,n){"use strict";t.exports=function(e){function t(){return this.value}function n(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(n){return n instanceof e&&n.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:n},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(n,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:e},void 0);var t=arguments[1];return this.caught(e,function(){throw t})},e.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof e&&n.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:n},void 0);var r=arguments[1];r instanceof e&&r.suppressUnhandledRejections();return this.caught(n,function(){return r})}}},{}],11:[function(e,t,n){"use strict";t.exports=function(e,t){function n(){return i(this)}var r=e.reduce,i=e.all;e.prototype.each=function(e){return r(this,e,t,0)._then(n,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,i){return r(e,i,t,0)._then(n,void 0,void 0,e,void 0)},e.mapSeries=function(e,n){return r(e,n,t,t)}}},{}],12:[function(e,t,n){"use strict";function r(e,t){function n(r){if(!(this instanceof n))return new n(r);f(this,"message","string"==typeof r?r:t),f(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return l(n,Error),n}function i(e){if(!(this instanceof i))return new i(e);f(this,"name","OperationalError"),f(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(f(this,"message",e.message),f(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}var a,o,s=e("./es5"),c=s.freeze,u=e("./util"),l=u.inherits,f=u.notEnumerableProp,d=r("Warning","warning"),h=r("CancellationError","cancellation error"),p=r("TimeoutError","timeout error"),v=r("AggregateError","aggregate error");try{a=TypeError,o=RangeError}catch(e){a=r("TypeError","type error"),o=r("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),y=0;y1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function s(){return u.call(this,this.promise._target()._settledValue())}function c(e){if(!o(this,e))return d.e=e,d}function u(e){var i=this.promise,u=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?u.call(i._boundValue()):u.call(i._boundValue(),e);if(l===r)return l;if(void 0!==l){i._setReturnedNonUndefined();var h=n(l,i);if(h instanceof t){if(null!=this.cancelPromise){if(h._isCancelled()){var p=new f("late cancellation observer");return i._attachExtraTrace(p),d.e=p,d}h.isPending()&&h._attachCancellationCallback(new a(this))}return h._then(s,c,void 0,this,void 0)}}}return i.isRejected()?(o(this),d.e=e,d):(o(this),e)}var l=e("./util"),f=t.CancellationError,d=l.errorObj,h=e("./catch_filter")(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},a.prototype._resultCancelled=function(){o(this.finallyHandler)},t.prototype._passThrough=function(e,t,n,r){return"function"!=typeof e?this.then():this._then(n,r,void 0,new i(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,u,u)},t.prototype.tap=function(e){return this._passThrough(e,1,u)},t.prototype.tapCatch=function(e){var n=arguments.length;if(1===n)return this._passThrough(e,1,void 0,u);var r,i=new Array(n-1),a=0;for(r=0;r0&&"function"==typeof arguments[t]&&(e=arguments[t]);var r=[].slice.call(arguments);e&&r.pop();var i=new n(r).promise();return void 0!==e?i.spread(e):i}}},{"./util":36}],18:[function(e,t,n){"use strict";t.exports=function(t,n,r,i,a,o){function s(e,t,n,r){this.constructor$(e),this._promise._captureStackTrace();var i=u();this._callback=null===i?t:l.domainBind(i,t),this._preservedValues=r===a?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],h.invoke(this._asyncInit,this,void 0)}function c(e,n,i,a){if("function"!=typeof n)return r("expecting a function but got "+l.classString(n));var o=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+l.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+l.classString(i.concurrency)));o=i.concurrency}return new s(e,n,o="number"==typeof o&&isFinite(o)&&o>=1?o:0,a).promise()}var u=t._getDomain,l=e("./util"),f=l.tryCatch,d=l.errorObj,h=t._async;l.inherits(s,n),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(e,n){var r=this._values,a=this.length(),s=this._preservedValues,c=this._limit;if(n<0){if(r[n=-1*n-1]=e,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=e,this._queue.push(n),!1;null!==s&&(s[n]=e);var u=this._promise,l=this._callback,h=u._boundValue();u._pushContext();var p=f(l).call(h,e,n,a),v=u._popContext();if(o.checkForgottenReturns(p,v,null!==s?"Promise.filter":"Promise.map",u),p===d)return this._reject(p.e),!0;var g=i(p,this._promise);if(g instanceof t){var y=(g=g._target())._bitField;if(0==(50397184&y))return c>=1&&this._inFlight++,r[n]=g,g._proxy(this,-1*(n+1)),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(g._reason()),!0):(this._cancel(),!0);p=g._value()}r[n]=p}return++this._totalResolved>=a&&(null!==s?this._filter(r,s):this._resolve(r),!0)},s.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,n=this._values;e.length>0&&this._inFlight1){a.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],l=arguments[2];r=o.isArray(u)?s(e).apply(l,u):s(e).call(l,u)}else r=s(e)();var f=c._popContext();return a.checkForgottenReturns(r,f,"Promise.try",c),c._resolveFromSyncValue(r),c},t.prototype._resolveFromSyncValue=function(e){e===o.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,n){"use strict";function r(e){return e instanceof Error&&c.getPrototypeOf(e)===Error.prototype}function i(e){var t;if(r(e)){(t=new s(e)).name=e.name,t.message=e.message,t.stack=e.stack;for(var n=c.keys(e),i=0;i1){var n,r=new Array(t-1),i=0;for(n=0;n0&&"function"!=typeof e&&"function"!=typeof t){var n=".then() only accepts functions but was passed: "+p.classString(e);arguments.length>1&&(n+=", "+p.classString(t)),this._warn(n)}return this._then(e,t,void 0,void 0,void 0)},a.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},a.prototype.spread=function(e){return"function"!=typeof e?d("expecting a function but got "+p.classString(e)):this.all()._then(e,void 0,void 0,w,void 0)},a.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},a.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new T(this).promise()},a.prototype.error=function(e){return this.caught(p.originatesFromRejection,e)},a.getNewLibraryCopy=n.exports,a.is=function(e){return e instanceof a},a.fromNode=a.fromCallback=function(e){var t=new a(k);t._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=j(e)(M(t,n));return r===F&&t._rejectCallback(r.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},a.all=function(e){return new T(e).promise()},a.cast=function(e){var t=_(e);return t instanceof a||((t=new a(k))._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},a.resolve=a.fulfilled=a.cast,a.reject=a.rejected=function(e){var t=new a(k);return t._captureStackTrace(),t._rejectCallback(e,!0),t},a.setScheduler=function(e){if("function"!=typeof e)throw new b("expecting a function but got "+p.classString(e));return y.setScheduler(e)},a.prototype._then=function(e,t,n,r,i){var o=void 0!==i,s=o?i:new a(k),c=this._target(),l=c._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&l)?this._boundValue():c===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var f=u();if(0!=(50397184&l)){var d,h,v=c._settlePromiseCtx;0!=(33554432&l)?(h=c._rejectionHandler0,d=e):0!=(16777216&l)?(h=c._fulfillmentHandler0,d=t,c._unsetRejectionIsUnhandled()):(v=c._settlePromiseLateCancellationObserver,h=new S("late cancellation observer"),c._attachExtraTrace(h),d=t),y.invoke(v,c,{handler:null===f?d:"function"==typeof d&&p.domainBind(f,d),promise:s,receiver:r,value:h})}else c._addCallbacks(e,t,s,r,f);return s},a.prototype._length=function(){return 65535&this._bitField},a.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},a.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},a.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},a.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},a.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},a.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},a.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},a.prototype._isFinal=function(){return(4194304&this._bitField)>0},a.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},a.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},a.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},a.prototype._setAsyncGuaranteed=function(){y.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},a.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==h)return void 0===t&&this._isBound()?this._boundValue():t},a.prototype._promiseAt=function(e){return this[4*e-4+2]},a.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},a.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},a.prototype._boundValue=function(){},a.prototype._migrateCallback0=function(e){var t=(e._bitField,e._fulfillmentHandler0),n=e._rejectionHandler0,r=e._promise0,i=e._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(t,n,r,i,null)},a.prototype._migrateCallbackAt=function(e,t){var n=e._fulfillmentHandlerAt(t),r=e._rejectionHandlerAt(t),i=e._promiseAt(t),a=e._receiverAt(t);void 0===a&&(a=h),this._addCallbacks(n,r,i,a,null)},a.prototype._addCallbacks=function(e,t,n,r,i){var a=this._length();if(a>=65531&&(a=0,this._setLength(0)),0===a)this._promise0=n,this._receiver0=r,"function"==typeof e&&(this._fulfillmentHandler0=null===i?e:p.domainBind(i,e)),"function"==typeof t&&(this._rejectionHandler0=null===i?t:p.domainBind(i,t));else{var o=4*a-4;this[o+2]=n,this[o+3]=r,"function"==typeof e&&(this[o+0]=null===i?e:p.domainBind(i,e)),"function"==typeof t&&(this[o+1]=null===i?t:p.domainBind(i,t))}return this._setLength(a+1),a},a.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},a.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(l(),!1);var n=_(e,this);if(!(n instanceof a))return this._fulfill(e);t&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var i=r._bitField;if(0==(50397184&i)){var o=this._length();o>0&&r._migrateCallback0(this);for(var s=1;s>>16)){if(e===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():y.settlePromises(this))}},a.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return y.fatalError(e,p.isNode);(65535&t)>0?y.settlePromises(this):this._ensurePossibleRejectionHandled()}},a.prototype._fulfillPromises=function(e,t){for(var n=1;n0){if(0!=(16842752&e)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,e),this._rejectPromises(t,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,e),this._fulfillPromises(t,r)}this._setLength(0)}this._clearCancellationData()},a.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},a.defer=a.pending=function(){return I.deprecated("Promise.defer","new Promise"),{promise:new a(k),resolve:o,reject:s}},p.notEnumerableProp(a,"_makeSelfResolutionError",l),t("./method")(a,k,_,d,I),t("./bind")(a,k,_,I),t("./cancel")(a,T,d,I),t("./direct_resolve")(a),t("./synchronous_inspection")(a),t("./join")(a,T,_,k,y,u),a.Promise=a,a.version="3.5.1",t("./map.js")(a,T,d,_,k,I),t("./call_get.js")(a),t("./using.js")(a,d,_,E,k,I),t("./timers.js")(a,k,I),t("./generators.js")(a,d,k,_,r,I),t("./nodeify.js")(a),t("./promisify.js")(a,k),t("./props.js")(a,T,_,d),t("./race.js")(a,k,_,d),t("./reduce.js")(a,T,d,_,k,I),t("./settle.js")(a,T,I),t("./some.js")(a,T,d),t("./filter.js")(a,k),t("./each.js")(a,k),t("./any.js")(a),p.toFastProperties(a),p.toFastProperties(a.prototype),c({a:1}),c({b:2}),c({c:3}),c(1),c(function(){}),c(void 0),c(!1),c(new a(k)),I.setBounds(g.firstLineError,p.lastLineError),a}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(e,t,n){"use strict";t.exports=function(t,n,r,i,a){function o(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}function s(e){var r=this._promise=new t(n);e instanceof t&&r._propagateFrom(e,3),r._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=e("./util");return c.isArray,c.inherits(s,a),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(n,a){var s=r(this._values,this._promise);if(s instanceof t){var u=(s=s._target())._bitField;if(this._values=s,0==(50397184&u))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,a);if(0==(33554432&u))return 0!=(16777216&u)?this._reject(s._reason()):this._cancel();s=s._value()}if(null!==(s=c.asArray(s)))0!==s.length?this._iterate(s):-5===a?this._resolveEmptyArray():this._resolve(o(a));else{var l=i("expecting an array or an iterable object but got "+c.classString(s)).reason();this._promise._rejectCallback(l,!1)}},s.prototype._iterate=function(e){var n=this.getActualLength(e.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,a=!1,o=null,s=0;s=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var n=0;n=this._length){var n;if(this._isMap)n=d(this._values);else{n={};for(var r=this.length(),i=0,a=this.length();i>1},t.prototype.props=function(){return o(this)},t.props=function(e){return o(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,n){"use strict";function r(e,t,n,r,i){for(var a=0;a=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(e,t){var n=new a;return n._bitField=33554432,n._settledValueField=e,this._promiseResolved(t,n)},i.prototype._promiseRejected=function(e,t){var n=new a;return n._bitField=16777216,n._settledValueField=e,this._promiseResolved(t,n)},t.settle=function(e){return r.deprecated(".settle()",".reflect()"),new i(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,n){"use strict";t.exports=function(t,n,r){function i(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function a(e,t){if((0|t)!==t||t<0)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(e),a=n.promise();return n.setHowMany(t),n.init(),a}var o=e("./util"),s=e("./errors").RangeError,c=e("./errors").AggregateError,u=o.isArray,l={};o.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var e=u(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(e){this._howMany=e},i.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new c,t=this.length();t0?this._reject(e):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(e){this._values.push(e)},i.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new s(t)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return a(e,t)},t.prototype.some=function(e){return a(this,e)},t._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(e,t,n){"use strict";t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var n=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},a=t.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},o=t.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=t.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};t.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},e.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},e.prototype.isPending=function(){return o.call(this._target())},e.prototype.isRejected=function(){return a.call(this._target())},e.prototype.isFulfilled=function(){return i.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return n.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),r.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,n){"use strict";t.exports=function(t,n){function r(e){return e.then}function i(e){try{return r(e)}catch(e){return c.e=e,c}}function a(e){try{return l.call(e,"_promise0")}catch(e){return!1}}function o(e,r,i){var a=new t(n),o=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var u=!0,l=s.tryCatch(r).call(e,function(e){a&&(a._resolveCallback(e),a=null)},function(e){a&&(a._rejectCallback(e,u,!0),a=null)});return u=!1,a&&l===c&&(a._rejectCallback(l.e,!0,!0),a=null),o}var s=e("./util"),c=s.errorObj,u=s.isObject,l={}.hasOwnProperty;return function(e,r){if(u(e)){if(e instanceof t)return e;var s=i(e);if(s===c){r&&r._pushContext();var l=t.reject(s.e);return r&&r._popContext(),l}if("function"==typeof s)return a(e)?(l=new t(n),e._then(l._fulfill,l._reject,void 0,l,null),l):o(e,s,r)}return e}}},{"./util":36}],34:[function(e,t,n){"use strict";t.exports=function(t,n,r){function i(e){this.handle=e}function a(e){return clearTimeout(this.handle),e}function o(e){throw clearTimeout(this.handle),e}var s=e("./util"),c=t.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var u=function(e){return l(+this).thenReturn(e)},l=t.delay=function(e,a){var o,s;return void 0!==a?(o=t.resolve(a)._then(u,null,null,e,void 0),r.cancellation()&&a instanceof t&&o._setOnCancel(a)):(o=new t(n),s=setTimeout(function(){o._fulfill()},+e),r.cancellation()&&o._setOnCancel(new i(s)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};t.prototype.delay=function(e){return l(e,this)};var f=function(e,t,n){var r;r="string"!=typeof t?t instanceof Error?t:new c("operation timed out"):new c(t),s.markAsOriginatingFromRejection(r),e._attachExtraTrace(r),e._reject(r),null!=n&&n.cancel()};t.prototype.timeout=function(e,t){e=+e;var n,s,c=new i(setTimeout(function(){n.isPending()&&f(n,t,s)},e));return r.cancellation()?(s=this.then(),(n=s._then(a,o,void 0,c,void 0))._setOnCancel(c)):n=this._then(a,o,void 0,c,void 0),n}}},{"./util":36}],35:[function(e,t,n){"use strict";t.exports=function(t,n,r,i,a,o){function s(e){setTimeout(function(){throw e},0)}function c(e){var t=r(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}function u(e,n){var i=0,o=e.length,u=new t(a);return(function a(){if(i>=o)return u._fulfill();var l=c(e[i++]);if(l instanceof t&&l._isDisposable()){try{l=r(l._getDisposer().tryDispose(n),e.promise)}catch(e){return s(e)}if(l instanceof t)return l._then(a,s,null,null,null)}a()})(),u}function l(e,t,n){this._data=e,this._promise=t,this._context=n}function f(e,t,n){this.constructor$(e,t,n)}function d(e){return l.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function h(e){this.length=e,this.promise=null,this[e-1]=null}var p=e("./util"),v=e("./errors").TypeError,g=e("./util").inherits,y=p.errorObj,m=p.tryCatch,b={};l.prototype.data=function(){return this._data},l.prototype.promise=function(){return this._promise},l.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():b},l.prototype.tryDispose=function(e){var t=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=t!==b?this.doDispose(t,e):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},l.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},g(f,l),f.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},h.prototype._resultCancelled=function(){for(var e=this.length,n=0;n0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new f(e,this,i());throw new v}}},{"./errors":12,"./util":36}],36:[function(n,r,i){"use strict";function a(){try{var e=d;return d=null,e.apply(this,arguments)}catch(e){return v.e=e,v}}function o(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function s(e,t,n){if(o(e))return e;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return h.defineProperty(e,t,r),e}function c(e){try{return e+""}catch(e){return"[no string representation]"}}function u(e){return e instanceof Error||null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function l(e){return u(e)&&h.propertyIsWritable(e,"stack")}function f(e){return{}.toString.call(e)}var d,h=n("./es5"),p="undefined"==typeof navigator,v={e:{}},g="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:void 0!==this?this:null,y=(function(){var e=[Array.prototype,Object.prototype,Function.prototype],t=function(t){for(var n=0;n1,r=t.length>0&&!(1===t.length&&"constructor"===t[0]),i=m.test(e+"")&&h.names(e).length>0;if(n||r||i)return!0}return!1}catch(e){return!1}},isIdentifier:function(e){return b.test(e)},inheritedDataKeys:y,getDataPropertyOrDefault:function(e,t,n){if(!h.isES5)return{}.hasOwnProperty.call(e,t)?e[t]:void 0;var r=Object.getOwnPropertyDescriptor(e,t);return null!=r?null==r.get&&null==r.set?r.value:n:void 0},thrower:function(e){throw e},isArray:h.isArray,asArray:k,notEnumerableProp:s,isPrimitive:o,isObject:function(e){return"function"==typeof e||"object"==typeof e&&null!==e},isError:u,canEvaluate:p,errorObj:v,tryCatch:function(e){return d=e,a},inherits:function(e,t){function n(){for(var n in this.constructor=e,this.constructor$=t,t.prototype)r.call(t.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=t.prototype[n])}var r={}.hasOwnProperty;return n.prototype=t.prototype,e.prototype=new n,e.prototype},withAppended:function(e,t){var n,r=e.length,i=new Array(r+1);for(n=0;n10||t[0]>0})(),T.isNode&&T.toFastProperties(e);try{throw new Error}catch(e){T.lastLineError=e}r.exports=T},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,t("_process"),void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("timers").setImmediate)},{_process:15,timers:16}],2:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.PreCallTest=void 0;var i=(function(){function e(e,t){for(var n=0;n=10?e.stop():(e.turnConnection.disconnect(),setTimeout(function(){e._start()},0))}))}},{key:"stop",value:function(){var e=this;if(this.browserInfo.browserName!==l.Constants.browserName.msie&&this.active){this.active=!1,this.activeTurnTest&&this.activeTurnTest.forceStop();var t=this.onlineCheck.stop();this.resultsHandler&&this.resultsHandler.add("onlineStatus",t),this.turnConnection.getIceResults().then(function(t){e.resultsHandler&&e.resultsHandler.add("ice",t),e.turnConnection.disconnect(),e.sendResults()},function(t){e.resultsHandler&&e.resultsHandler.failure(t),e.turnConnection.disconnect(),e.sendResults()})}}},{key:"sendResults",value:function(){if(this.resultsHandler){var e=this.resultsHandler.getResults();this.resultsHandler=null,this.callback&&this.callback(e,null)}else this.callback&&this.callback(null,"No results present")}},{key:"callStarts",value:function(){this.callsInProgress+=1,this.resultsHandler&&this.resultsHandler.setStatusStopped(),this.stop()}},{key:"callFinished",value:function(){this.callsInProgress-=1}},{key:"getId",value:function(){return this.resultsHandler?this.resultsHandler.getId():null}},{key:"crashDisconnect",value:function(){try{this.turnConnection.disconnect()}catch(e){}}},{key:"startTurnTests",value:function(){var e=this;if(this.turnTestCounter>=this.turnTests.length)return new f(function(e,t){e()});var t=this.turnTests[this.turnTestCounter],n=null;switch(t){case d.RTT:n=new o.RttTest(this.turnConnection);break;case d.THROUGHPUT:n=new s.ThroughputTest(this.turnConnection,this.rtt);break;default:return new f(function(e,n){n(new Error("Unknown test: "+t))})}return this.activeTurnTest=n,this.active?n.start().then(function(){return e.handleTestResults(t,n.getResults()),e.turnTestCounter+=1,e.activeTurnTest=null,e.startTurnTests()},function(r){return e.handleTestResults(t,n.getResults(),r),e.turnTestCounter+=1,e.activeTurnTest=null,e.startTurnTests()}):new f(function(e,t){t(new Error("Test trying to start while testing is not active"))})}},{key:"handleTestResults",value:function(e,t){null==(2=this.intervalLength){var r=n-this.intervalStart,i=this.averageThroughput(this.intervalBytes,r),a=null;try{a=n-JSON.parse(this.lastMessage).timestamp}catch(e){}this.intervals.push({startTimestamp:this.intervalStart,endTimestamp:n,bytesReceived:this.intervalBytes,average:i,rtt:a}),this.intervalStart=n,this.intervalBytes=0}this.results.startTimestamp&&n-this.results.startTimestamp>this.duration/2&&(this.secondHalfStart||(this.secondHalfStart=n),this.secondHalfBytes+=e.length)}}},{key:"handleError",value:function(e){this.stop(),this.failed(e)}},{key:"averageThroughput",value:function(e,t){return e/(t/1e3)*8/1024}},{key:"bufferListener",value:function(){this.sendChannel.removeEventListener("bufferedamountlow",this.bufferListener.bind(this)),this.fillBuffer()}},{key:"fillBuffer",value:function(){for(0==this.sendChannel.bufferedAmount&&(this.bufferEmpty+=1);this.isActive();){if(this.sendChannel.bufferedAmount>this.bufferFullThreshold)return void(this.usePolling?setTimeout(this.fillBuffer.bind(this),250):this.sendChannel.addEventListener("bufferedamountlow",this.bufferListener.bind(this)));var e=this.messageMaker.make(this.sentBytes);this.sentBytes+=e.length,this.send(e)}this.sendChannel.removeEventListener("bufferedamountlow",this.bufferListener.bind(this))}},{key:"startSend",value:function(){this.isActive()&&(this.bufferFullThreshold=1e3*this.chunkSize,this.sendChannel=this.connection.sendChannel,this.usePolling=!0,"number"==typeof this.sendChannel.bufferedAmountLowThreshold&&(this.usePolling=!1,this.sendChannel.bufferedAmountLowThreshold=this.bufferFullThreshold/10),setTimeout(this.fillBuffer.bind(this),0))}},{key:"fillResults",value:function(){this.results.endTimestamp=c.getCurrent(),this.results.maxDuration=this.duration,this.results.forceStopped=this.forceStopped,this.results.bufferEmpty=this.bufferEmpty,this.results.intervals=this.intervals,this.results.bytesPrepared=this.sentBytes,this.results.bytesReceived=this.receivedBytes;var e=0,t=0;this.secondHalfStart&&(e=this.results.endTimestamp-this.secondHalfStart,t=this.averageThroughput(this.secondHalfBytes,e));var n=this.results.endTimestamp-this.results.startTimestamp,r=this.averageThroughput(this.receivedBytes,n);t>24;if("rtp"===this.protocol&&0<=n&&n<=2)switch(n){case 0:t="TLS";break;case 1:t="TCP";break;case 2:t="UDP"}return t}},{key:"getString",value:function(){return this.iceCandidateStr}},{key:"getType",value:function(){return this.type}},{key:"isHost",value:function(){return"host"===this.type.toLowerCase()}},{key:"isServerReflexive",value:function(){return"srflx"===this.type.toLowerCase()}},{key:"isPeerReflexive",value:function(){return"prflx"===this.type.toLowerCase()}},{key:"isRelay",value:function(){return"relay"===this.type.toLowerCase()||"relayed"===this.type.toLowerCase()}},{key:"getTypeTransport",value:function(){return this.typeTransport}},{key:"isTypeTransportUdp",value:function(){return"UDP"===this.typeTransport}},{key:"isTypeTransportTcp",value:function(){return"TCP"===this.typeTransport}},{key:"isTypeTransportTls",value:function(){return"TLS"===this.typeTransport}},{key:"getTransport",value:function(){return this.transport}},{key:"isUdp",value:function(){return"udp"===this.transport.toLowerCase()}},{key:"isTcp",value:function(){return"tcp"===this.transport.toLowerCase()}},{key:"getProtocol",value:function(){return this.protocol}},{key:"isRtp",value:function(){return"rtp"===this.protocol}},{key:"isRtcp",value:function(){return"rtcp"===this.protocol}},{key:"isIpv6",value:function(){return this.ipv6}},{key:"getIpAddress",value:function(){return this.ipAddress}},{key:"getPort",value:function(){return this.port}}]),e})();n.ParsedIceCandidate=a},{}],10:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.ResultsHandler=void 0;var i="function"==typeof Symbol&&"symbol"==typeof("function"==typeof Symbol?Symbol.iterator:"@@iterator")?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==("function"==typeof Symbol?Symbol.prototype:"@@prototype")?"symbol":typeof e},a=(function(){function e(e,t){for(var n=0;n>24;c.mozLocalTransport=this.formatRelayType(u)}c.mozLocalTransport=c.mozLocalTransport.toLowerCase()}t.push(c)}else s.remoteCandidate&&n.push(s.remoteCandidate)}if(i)for(var l=0;l1)for(var n=1;n=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n.setImmediate="function"==typeof t?t:function(e){var t=u++,r=!(arguments.length<2)&&s.call(arguments,1);return c[t]=!0,a(function(){c[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))}),t},n.clearImmediate="function"==typeof r?r:function(e){delete c[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":15,timers:16}],17:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"")}function s(){var e=null,t=v.Registry.getEndpoint().getBrowserName();return"Firefox"===t?e=mozRTCPeerConnection:"Chrome"===t||"Opera"===t?e=webkitRTCPeerConnection:"Safari"===t?g.log("Browser type Safari"):"Edge"===t&&(e=window.RTCPeerConnection),e}function c(e){if(null===e)return!1;var t=v.Registry.getEndpoint().getCodeBase();if(t===f.codeBaseType.firefox)return"undefined"!=typeof mozRTCPeerConnection&&e instanceof mozRTCPeerConnection||"undefined"!=typeof RTCPeerConnection&&e instanceof RTCPeerConnection;if(t===f.codeBaseType.edge||"function"==typeof e)return!0;var n=s();return null!==n&&e instanceof n||void 0!==e.createOffer}var u="function"==typeof Symbol&&"symbol"==typeof("function"==typeof Symbol?Symbol.iterator:"@@iterator")?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==("function"==typeof Symbol?Symbol.prototype:"@@prototype")?"symbol":typeof e},l=(function(){function e(e,t){for(var n=0;n ("+r+") ["+t.toString()+"]"),null!==t.getLeft()&&e(t.getLeft(),n+1,"Left"),null!==t.getRight()&&e(t.getRight(),n+1,"Right")}})(this.root,0,"Root")):s.log("This tree is empty Duplicate Counter: "+this.duplicate_counter)}}]),e})();n.BinaryTree=c},{"../utility/csiologger":92,"./binarytreenode.js":24}],24:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];this.length()>1e6?a.error("Maximum cached items reached, dropping."):t?this.priority.push(e):this.queue.push(e)}},{key:"pop",value:function(){return this.priority.length>0?this.priority.shift():this.queue.shift()}},{key:"peak",value:function(){return this.priority.length>0?this.priority[0]:this.queue.length>0?this.queue[0]:null}},{key:"length",value:function(){return this.queue.length+this.priority.length}},{key:"updateConferenceId",value:function(e){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:"Unknown";r(this,e),this.name=t,this.ports=new Map}return i(e,[{key:"bindPort",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;this.ports.has(e)?o.warn("Port ("+e+") for "+this.name+" already exists."):this.ports.set(e,new a.Port(t,n))}},{key:"declarePort",value:function(e){this.ports.has(e)?o.warn("Port ("+e+") for "+this.name+" already exists."):this.ports.set(e,null)}},{key:"getPort",value:function(e){return this.ports.get(e)}},{key:"isConnected",value:function(e){return!!this.ports.has(e)&&null!==this.ports.get(e)}},{key:"connect",value:function(e,t){this.ports.has(e)?this.ports.set(e,t):o.warn("Port ("+e+") for "+this.name+" does not exists.")}},{key:"transmit",value:function(e){var t=this.ports.get(e);if(void 0!==t)if(null!==t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i=a.pctSampleSize&&this.pctMeasurements.shift(),this.pctMeasurements.push(e);var t=e.getProvider();this.pctMeasurementsMap.has(t)||this.pctMeasurementsMap.set(t,[]),this.pctMeasurementsMap.get(t).push(e)}},{key:"clearPCTMeasurements",value:function(){this.pctMeasurements=[],this.pctMeasurementsMap=new Map}},{key:"doStats",value:function(e){var t={};return t.min=this.findMin(e),t.max=this.findMax(e),t.mean=this.calculateAverage(e),t.median=this.calculateMedian(e),t.stddev=this.calculateStandardDeviation(e,t.mean),t}},{key:"findMax",value:function(e){return e&&e.length?Math.max.apply(null,e):null}},{key:"findMin",value:function(e){return e&&e.length?Math.min.apply(null,e):null}},{key:"calculateAverage",value:function(e){return e&&e.length?e.reduce(function(e,t){return e+t},0)/e.length:0}},{key:"calculateMedian",value:function(e){if(!e)return 0;if(!e.length)return 0;var t=e.slice(0).sort(function(e,t){return e-t}),n=Math.floor(t.length/2);return t.length%2==0?(t[n]+t[n-1])/2:t[n]}},{key:"calculateStandardDeviation",value:function(e,t){if(!e)return 0;if(!e.length)return 0;var n=e.map(function(e){var n=e-t;return n*n}).reduce(function(e,t){return e+t},0);return Math.sqrt(n/(e.length-1))}},{key:"setAcceptability",value:function(e){var t=[];return t.push(e.throughput.median<30),t.push(e.loss.median>.05),t.push(e.rtt.median>400),e.acceptable=!t.reduce(function(e,t){return e||t},!1),e}},{key:"doInternalMeasurement",value:function(e){var t={},n=[],r=[],i=[],a=[];if(e)for(var o=0;o=.04?t-=3:t,t=n>=.025?t-=1:t,t=n>=.01?t-=1:t,t=r>=.04?t-=5:t,t=r>=.025?t-=3:t,r>=.005?t-=2:t}},{key:"scoreThroughPut",value:function(e){var t=0;if(!e||!e.throughput)return t;var n=e.throughput.median,r=e.throughput.min;return t=n>5e3?t+=5:t,t=n>2e3?t+=2:t,t=n>200?t+=1:t,t=r<100?t-=3:t,t=r<1e3?t-=2:t,(t=r<2e3?t-=1:t)>0?t:0}},{key:"aggregate",value:function(){var e=this,t=[];return e.pctMeasurementsMap.forEach(function(n,r){var i={};i.provider=r;var a=e.doInternalMeasurement(n);i.rtt=a.rtt,i.jitter=a.jitter,i.loss=a.loss,i.throughput=a.throughput,(i=e.setAcceptability(i)).rttScore=e.scoreRtt(),i.lossesScore=e.scoreLosses(),i.throughputScore=e.scoreThroughPut(),t.push(i)}),t}},{key:"getAggregate",value:function(e){var t=[];if(!e)return t;for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null;r(this,e),this.target=t,this.object=n}return i(e,[{key:"transmit",value:function(e){this.target.apply(this.object,e)}},{key:"request",value:function(e){return this.target.apply(this.object,e)}}]),e})();n.Port=a},{}],30:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,e),this.value=t,this.next=n}return a(e,[{key:"setNext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.next=e}}]),e})(),s=(function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;r(this,e),this.capacity=t,this.root=n,this.tail=i,this.currentLength=0}return a(e,[{key:"size",value:function(){return this.currentLength}},{key:"isEmpty",value:function(){return this.currentLength<1}},{key:"isOverflow",value:function(){return this.size()>this.capacity}},{key:"push",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.tail;this.tail=new o(e),this.isEmpty()?this.root=this.tail:t.setNext(this.tail),this.currentLength+=1;var n=void 0;return this.isOverflow()&&(n=this.pop()),n}},{key:"pop",value:function(){if(!this.isEmpty()){var e=this.root.value;return this.root=this.root.next,this.currentLength-=1,e}}},{key:"getFront",value:function(){return this.root}},{key:"getBack",value:function(){return this.tail}},{key:"clear",value:function(){this.root=void 0,this.tail=void 0,this.currentLength=0}},{key:"toArray",value:function(){for(var e=i({},this.root),t=[];e;){var n=e,r=n.value;e=n.next,t.push(r)}return t}}]),e})();n.Queue=s},{}],31:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.SlidingWindow=void 0;var i=(function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0;return this.items.length<=e?null:this.items[this.items.length-e-1].getValue()}},{key:"attach",value:function(e){this.plugins.push(e)}},{key:"addPreProcess",value:function(e){this.preProcesses.push(e)}},{key:"addPostProcess",value:function(e){this.postProcesses.push(e)}},{key:"detach",value:function(e){this.plugins=this.plugins.filter(function(t){return t!==e})}}]),e})();n.SlidingWindow=s},{"../utility/timestamps":104,"./switem":32}],32:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.SWItem=void 0;var i=(function(){function e(e,t){for(var n=0;n>>0,r=arguments[1],i=void 0,a=0;a0&&f.Registry.getEventMessageBuilder().make(v.precalltestEvents.associate,r,e,{ids:u})}},{key:"onStartPrecallTests",value:function(e,t){var n=f.Registry.getAuthenticator().getIceServers();n[0].label="callstats",e.push(n[0]),f.Registry.getPCTRunnerService().start(e,t)}},{key:"onSendCallDetails",value:function(e,t,n){d.warn("FSM onSendCallDetails");var r={};r.callType=n.callType,r.role=n.role,n.contactQueue&&(r.contactQueue=n.contactQueue),n.contactQueueID&&(r.contactQueueID=n.contactQueueID),n.routingProfile&&(r.routingProfile=n.routingProfile),n.routingProfileID&&(r.routingProfileID=n.routingProfileID),n.contactID&&(r.contactID=n.contactID),n.siteID&&(r.siteID=n.siteID,f.Registry.getCredentials().setSiteId(n.siteID)),f.Registry.getEventMessageBuilder().make(v.fabricEvent.callDetails,t,e,r)}},{key:"onSendFabricEvent",value:function(e,t,n,r){d.warn("FSM onSendFabricEvent");var i={};r&&((i=r).ssrc&&(i.ssrc=String(i.ssrc))),t===v.fabricEvent.activeDeviceList&&(i={mediaDeviceList:h.normalizeMediaDeviceList(r.deviceList)}),f.Registry.getEventMessageBuilder().make(t,n,e,i);var a=f.Registry.getConferenceManager().get(n);if(a){var o=a.getPeerConnectionManager().getPcHandler(e);t!==v.fabricEvent.fabricTerminated&&t!==v.internalFabricEvent.fabricSetupFailed||(o.stopUserAliveHandler(),o.setPcState(v.fabricState.terminated),o.stopStatsPolling(),a.getPeerConnectionManager().removePcStats(o&&o.getPcHash()),a.updateState()),t===v.fabricEvent.fabricHold&&(o.setPcState(v.fabricState.hold),o.stopStatsPolling()),t===v.fabricEvent.fabricResume&&(o.setPcState(v.fabricState.established),o.startStatsPolling())}}},{key:"onReportError",value:function(e,t,n,r,i,a){d.warn("FSM onReportError");var o={delay:0,reason:this.callFailureClassifier(n),function:n,magicKey:f.Registry.getEndpoint().getMagicKey(),endpoint:f.Registry.getEndpoint().serialize(),level:"debug"};if(r){var s=this.formatDomError(r);o.message=s.message,o.messageType=s.messageType,o.name=r.name,o.stack=r.stack}if(e){var c=f.Registry.getConferenceManager().get(t),u=void 0;if(c&&(u=c.getPeerConnectionManager().getPcHandler(e)),!u)return void d.error("onReportError: No handler found for given PeerConnection!");if(o.delay=p.getCurrent()-u.getStartTime(),o.fabricState=u.getPcState(),o.iceConnectionState=u.getIceConnectionState(),(i||a||e&&"closed"!==e.signalingState)&&f.Registry.getCredentials().getCollectSDP()&&n!==v.webRTCFunctions.applicationLog){var l={};l.localSDP=this.pickSDP(e,i,"localDescription"),l.remoteSDP=this.pickSDP(e,a,"remoteDescription"),f.Registry.getEventMessageBuilder().make(v.callstatsChannels.sdpSubmission,t,e,l)}}n===v.webRTCFunctions.applicationLog||n===v.webRTCFunctions.applicationError?f.Registry.getEventMessageBuilder().make(v.fabricEvent.applicationErrorLog,t,e,o):n===v.webRTCFunctions.iceConnectionFailure?this.handleIceConnectionFailure(e,t,o):(f.Registry.getEventMessageBuilder().make(v.fabricEvent.fabricSetupFailed,t,e,o),n===v.webRTCFunctions.getUserMedia&&this.handleGUMErrors(t))}},{key:"onAssociateMstWithUserID",value:function(e,t,n,r,i,a){var o=f.Registry.getConferenceManager().get(n);if(o){var s=o.getPeerConnectionManager().getPcHandler(e);"string"!=typeof r&&(r+=""),s.updateSSRCInfo(r,t,i,a)}}},{key:"onAttachWifiStatsHandler",value:function(e){f.Registry.getWifiStatsExecutor().setGetWifiStatsMethod(e)}},{key:"onSetProxyConfig",value:function(e){d.warn("FSM onSetProxyConfig"),e.collectorURL&&g.setBaseUrl(e.collectorURL),e.authServiceURL&&g.setAuthServiceUrl(e.authServiceURL),e.csioInternalAPIURL&&g.setQmodelThresholdsAPIUrl(e.csioInternalAPIURL),e.wsURL&&g.setWsUrl(e.wsURL),e.restEventURL&&g.setRestEventUrl(e.restEventURL),e.restStatsURL&&g.setRestStatsUrl(e.restStatsURL),e.appSettingsURL&&g.setConfigServiceUrl(e.appSettingsURL)}},{key:"onSendUserFeedback",value:function(e,t,n){var r={feedback:{overallRating:t.overall}};t.video&&(r.feedback.videoQualityRating=t.video),t.audio&&(r.feedback.audioQualityRating=t.audio),t.comment&&(r.feedback.comments=t.comment),f.Registry.getEventMessageBuilder().make(v.callstatsChannels.userFeedback,e,null,r)}},{key:"onOn",value:function(e,t){f.Registry.getCallbacks().set(e,t)}},{key:"onSetIdentifiers",value:function(e,t){if(e.conferenceID&&(f.Registry.getConferenceManager().updateConferenceId(e.conferenceID),f.Registry.getTransmissionManager().updateConferenceId(e.conferenceID),f.Registry.getTransmissionManager().trySend()),e.remoteUserID&&t){var n=f.Registry.getConferenceManager().getConferenceForPc(t);if(!n)return void d.log("onSetIdentifiers conference not found");var r=n.getPeerConnectionManager().getPcHandler(t);if(!r)return void d.log("pcHandler not found");r.updateRemoteId(e.remoteUserID),f.Registry.getTransmissionManager().trySend()}}},{key:"onMakePrecallTest",value:function(e,t){var n=e,r=t||"callstats";e||(n=this.authenticator.getIceServers(),r="callstats"),f.Registry.getPCTRunnerService().doPrecalltest(n,r)}},{key:"handleIceConnectionFailure",value:function(e,t,n){if(e){var r=f.Registry.getConferenceManager().get(t),i=void 0;if(r&&(i=r.getPeerConnectionManager().getPcHandler(e)),i)if(i.isFabricSetupSent()){var a={localIceCandidates:[],remoteIceCandidates:[],iceCandidatePairs:[]};a.delay=p.getCurrent()-i.getStartTime(),a.currIceConnectionState="failed",a.prevIceConnectionState="disconnected",f.Registry.getEventMessageBuilder().make(v.internalFabricEvent.iceFailed,t,e,a)}else n.delay=p.getCurrent()-i.getStartTime(),n.fabricState=i.getPcState(),n.iceConnectionState=i.getIceConnectionState(),f.Registry.getEventMessageBuilder().make(v.fabricEvent.fabricSetupFailed,t,e,n)}}},{key:"handleGUMErrors",value:function(e){var t=f.Registry.getConferenceManager().get(e);if(t||(f.Registry.getConferenceManager().add(e,f.Registry.getCredentials()),t=f.Registry.getConferenceManager().get(e)),!t.getUcId()){var n={endpointInfo:f.Registry.getEndpoint().serialize()};f.Registry.getEventMessageBuilder().make(v.internalFabricEvent.userJoined,e,null,n),t.setUserJoinedSent(!0)}}},{key:"callFailureClassifier",value:function(e){var t=void 0;return v.webRTCFunctions.hasOwnProperty(e)?e===v.webRTCFunctions.createOffer||e===v.webRTCFunctions.createAnswer||e===v.webRTCFunctions.setRemoteDescription?t=v.callFailureReasons.negotiationFailure:e===v.webRTCFunctions.setLocalDescription?t=v.callFailureReasons.sdpError:e===v.webRTCFunctions.addIceCandidate?t=v.callFailureReasons.sdpError:e===v.webRTCFunctions.getUserMedia?t=v.callFailureReasons.mediaConfigError:e===v.webRTCFunctions.iceConnectionFailure?t=v.callFailureReasons.iceFailure:e===v.webRTCFunctions.signalingError?t=v.callFailureReasons.signalingError:(e===v.webRTCFunctions.applicationLog||v.webRTCFunctions.applicationError)&&(t=v.callFailureReasons.applicationLog):t=v.callFailureReasons.invalidWebRTCFunctionName,t}},{key:"formatDomError",value:function(e){var t={},n={};e&&(window.DOMException&&e instanceof window.DOMException?(n.message=e.message,n.name=e.name,t.messageType="domError"):"object"===(void 0===e?"undefined":c(e))?(e.message&&(n.message=e.message),e.name&&(n.name=e.name),e.constraintName&&(n.name=e.constraintName),e.stack&&(n.stack=e.stack),t.messageType="json"):(n=e,t.messageType="text"));var r=this.truncateLog(n);return"object"===(void 0===r?"undefined":c(r))?t.message=JSON.stringify(r):t.message=r,t}},{key:"pickSDP",value:function(e,t,n){return t||(e&&e[n]?e[n].sdp:"")}},{key:"truncateString",value:function(e){return e.length>2e4&&(d.log("Log exceeds 20kb, It will be truncated"),e=e.substring(0,2e4)),e}},{key:"truncateLog",value:function(e){return e?("string"==typeof e?e=this.truncateString(e):"object"===(void 0===e?"undefined":c(e))&&e.message&&(e.message=this.truncateString(e.message)),e):e}}]),t})();n.MainFSM=T},{"../config/constants":36,"../config/settings":37,"../statspipeline/statsadapter":73,"../statspipeline/statsassembler":74,"../statspipeline/statsmonitor":76,"../statspipeline/statsparser":77,"../statspipeline/statstransmitter":78,"../utility/csiologger":92,"../utility/registry":100,"../utility/timestamps":104,"../utility/utils":106,"./statemachine":40}],39:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(){function e(e,t){for(var n=0;n1?t-1:0),r=1;r",this.iceConnectionState);var e={changedState:o.fabricStateChangeType.iceConnectionState,prevState:this.oldIceConnectionState,newState:this.iceConnectionState};this.sendFabricStateChange(e)}},{key:"handleIceGatheringState",value:function(){if(this.iceGatheringState!==this.pc.iceGatheringState){"complete"===this.pc.iceGatheringState&&(this.iceGatheringDelay=c.getCurrent()-this.startTime),this.oldIceGatheringState=this.iceGatheringState,this.iceGatheringState=this.pc.iceGatheringState,l.warn("CALLBACK: ICE gathering state change",this.oldIceGatheringState,"->",this.iceGatheringState);var e={changedState:o.fabricStateChangeType.iceGatheringState,prevState:this.oldIceGatheringState,newState:this.iceGatheringState};this.sendFabricStateChange(e)}}},{key:"handleIceChecking",value:function(){var e=c.getCurrent();if("disconnected"===this.oldIceConnectionState&&(this.pcState===o.fabricState.checkingDisrupted||this.pcState===o.fabricState.disrupted)){var t={prevIceConnectionState:this.oldIceConnectionState,currIceConnectionState:this.iceConnectionState,delay:e-this.connectionDisruptedTS};this.pcState===o.fabricState.disrupted&&(t.prevIceCandidatePair=this.prevActiveIceCandidatePair,t.currIceCandidatePair=this.activeIceCandidatePair,t.delay=e-this.disruptedTS,this.emb.make(o.internalFabricEvent.iceDisruptionEnd,this.conferenceId,this.pc,t)),this.pcState=o.fabricState.initializing,this.emb.make(o.internalFabricEvent.iceConnectionDisruptionEnd,this.conferenceId,this.pc,t)}}},{key:"handleIceConnectedOrCompleted",value:function(e){var t=c.getCurrent();this.pcState===o.fabricState.disrupted&&(e.prevIceCandidatePair=this.prevActiveIceCandidatePair,e.currIceCandidatePair=this.activeIceCandidatePair,e.delay=t-this.disruptedTS,this.emb.make(o.internalFabricEvent.iceDisruptionEnd,this.conferenceId,this.pc,e)),this.iceConnectivityDelay=t-this.startTime,this.established=!0,this.pcState=o.fabricState.established,this.sendfabricSetup(),this.startStatsPolling()}},{key:"sendfabricSetup",value:function(){if(this.fabricSetupSent)l.log("fabricSetup has been sent already");else{var e={delay:c.getCurrent()-this.startTime,iceGatheringDelay:this.iceGatheringDelay,iceConnectivityDelay:this.iceConnectivityDelay,localIceCandidates:this.localIceCandidates,remoteIceCandidates:this.remoteIceCandidates,iceCandidatePairs:this.iceCandidatePairs,remoteEndpointType:o.endpointType.peer,fabricTransmissionDirection:o.transmissionDirection.sendrecv,iceServers:this.iceServersURLs,sdpSemantics:this.sdpSemantics},t=this.getActiveIceCandidatePair();t&&(e.selectedCandidatePairID=t.id),this.fabricSetupSent=!0;var n=void 0;if(this.conferenceId){var r=s.Registry.getConferenceManager().get(this.conferenceId);r&&r.getPeerConnectionManager()&&(n=r.getPeerConnectionManager().getPcHandler(this.pc),e.remoteEndpointType=n.getRemoteEndpointType(),e.fabricTransmissionDirection=n.getFabricTransmissionDirection())}this.pcState=o.fabricState.established,this.emb.make(o.internalFabricEvent.fabricSetup,this.conferenceId,this.pc,e)}}},{key:"isFabricSetupSent",value:function(){return this.fabricSetupSent}},{key:"startStatsPolling",value:function(){this.getStatsHandler.startStatsPolling()}},{key:"stopStatsPolling",value:function(){this.getStatsHandler.stopStatsPolling()}},{key:"handleIceFailed",value:function(e){e.currIceCandidatePair=this.activeIceCandidatePair,e.delay=c.getCurrent()-this.startTime,this.pcState=o.fabricState.failed,"checking"===e.prevIceConnectionState?this.sendIceFailed(e):"completed"===e.prevIceConnectionState||"connected"===e.prevIceConnectionState?this.emb.make(o.internalFabricEvent.fabricDropped,this.conferenceId,this.pc,e):"disconnected"===e.prevIceConnectionState&&this.established?this.emb.make(o.internalFabricEvent.fabricDropped,this.conferenceId,this.pc,e):"disconnected"===e.prevIceConnectionState&&this.sendIceFailed(e)}},{key:"getActiveIceCandidatePair",value:function(){var e=null,t=this.iceCandidatePairs;if(t&&t.length>0){var n=t.filter(function(e){return"true"===e.selected||"true"===e.googActiveConnection||!0===e.selected||!0===e.googActiveConnection});n.length>0&&(e=n[0])}return e}},{key:"sendIceFailed",value:function(e){e.localIceCandidates=this.localIceCandidates,e.remoteIceCandidates=this.remoteIceCandidates,e.iceCandidatePairs=this.iceCandidatePairs,l.log("sending icefailed ",e),this.emb.make(o.internalFabricEvent.iceFailed,this.conferenceId,this.pc,e)}},{key:"sendFabricTransportSwitch",value:function(e){var t=this,n={};n.prevIceCandidatePair=t.activeIceCandidatePair,n.relayType=e,n.currIceConnectionState=t.iceConnectionState,n.prevIceConnectionState=t.oldIceConnectionState,n.switchDelay=null,t.getStatsHandler.getIceCandidates().then(function(e){t.localIceCandidates=e.localIceCandidates,t.remoteIceCandidates=e.remoteIceCandidates,t.iceCandidatePairs=e.iceCandidatePairs,t.activeIceCandidatePair=t.getActiveIceCandidatePair(),n.currIceCandidatePair=t.activeIceCandidatePair,n.localIceCandidates=t.localIceCandidates,n.remoteIceCandidates=t.remoteIceCandidates,l.log("sending fabric transport switch ",n),"completed"!==n.currIceConnectionState&&"connected"!==n.currIceConnectionState||"completed"!==n.prevIceConnectionState&&"connected"!==n.prevIceConnectionState||t.emb.make(o.internalFabricEvent.fabricTransportSwitch,t.conferenceId,t.pc,n)})}},{key:"handleIceDisconnected",value:function(e){var t=c.getCurrent();this.startTime=t,e.prevIceConnectionStateTs=this.iceConnectionStateTS,e.currIceCandidatePair=this.activeIceCandidatePair,"connected"===e.prevIceConnectionState||"completed"===e.prevIceConnectionState?(this.pcState=o.fabricState.disrupted,this.disruptedTS=t,this.emb.make(o.internalFabricEvent.iceDisruptionStart,this.conferenceId,this.pc,e),this.callback&&this.callback(u.csError.appConnectivityError,"Connectivity check for PC object to "+this.remoteId+" failed.")):"checking"===e.prevIceConnectionState&&(this.pcState=o.fabricState.checkingDisrupted,this.connectionDisruptedTS=t,this.emb.make(o.internalFabricEvent.iceConnectionDisruptionStart,this.conferenceId,this.pc,e),this.callback&&this.callback(u.csError.appConnectivityError,"Connectivity check for PC object to "+this.remoteId+" failed."))}},{key:"handleIceClosed",value:function(e){"new"===e.prevIceConnectionState||"checking"===e.prevIceConnectionState?(e.delay=c.getCurrent()-this.startTime,e.localIceCandidates=this.localIceCandidates,e.remoteIceCandidates=this.remoteIceCandidates,e.iceCandidatePairs=this.iceCandidatePairs,this.emb.make(o.internalFabricEvent.iceAborted,this.conferenceId,this.pc,e)):"connected"!==e.prevIceConnectionState&&"completed"!==e.prevIceConnectionState||(e.prevIceCandidatePair=this.activeIceCandidatePair,this.emb.make(o.internalFabricEvent.iceTerminated,this.conferenceId,this.pc,e)),this.pcState=o.fabricState.terminated,this.conferenceId&&s.Registry.getConferenceManager().get(this.conferenceId).updateState(),this.stopStatsPolling()}},{key:"handleIceRestart",value:function(e){e.prevIceCandidatePair=this.prevActiveIceCandidatePair,"new"!==e.prevIceConnectionState&&(l.log("iceRestarted sending"),this.established=!1,this.emb.make(o.internalFabricEvent.iceRestarted,this.conferenceId,this.pc,e))}},{key:"pcSignalingStateChangeCallback",value:function(e){var t=this;if(e){var n=this.signalingState;this.signalingState=this.pc.signalingState,l.warn("CALLBACK: signaling state change",n,"->",this.signalingState);var r={changedState:o.fabricStateChangeType.signalingState,prevState:n,newState:this.signalingState};if(this.sendFabricStateChange(r),"have-remote-offer"!==this.signalingState&&"stable"!==this.signalingState||(this.precalltest.callStarts(),s.Registry.getPCTRunnerService().setCallInProgress(!0),this.genericevent.sendEvent(o.logEvents.log,{msg:"precalltest told to stop "})),"closed"===this.signalingState&&(this.emb.make(o.fabricEvent.fabricTerminated,this.conferenceId,this.pc),this.userAlive.stop(),this.precalltest.callFinished(),s.Registry.getPCTRunnerService().setCallInProgress(!1),this.stopStatsPolling(),this.pcState=o.fabricState.terminated,this.conferenceId)){var i=s.Registry.getConferenceManager().get(this.conferenceId);if(i&&i.getPeerConnectionManager()){var a=i.getPeerConnectionManager().getPcHandler(this.pc);i.getPeerConnectionManager().removePcStats(a&&a.getPcHash())}i.updateState()}"have-local-offer"!==this.signalingState&&"have-local-pranswer"!==this.signalingState&&"stable"!==this.signalingState||(l.log(this.signalingState,".. requesting sender config."),s.Registry.getConfigServiceWrapper().initiateSenderConfig(this.pc).then(function(){var e=s.Registry.getConfigServiceWrapper().getSenderConfig();l.log("Sender config:",e);var n=o.callstatsChannels.senderConfiguration;e&&s.Registry.getEventMessageBuilder().make(n,t.conferenceId,t.pc,e)}).catch(function(e){l.warn(e)}))}}},{key:"pcNegotiationNeededCallback",value:function(e){e&&(this.negotiationNeeded++,this.startTime=c.getCurrent(),l.warn("CALLBACK: negotiation needed",this.negotiationNeeded))}}]),e})();n.PcCallbackHandler=f},{"../config/callstatserrors":35,"../config/constants":36,"../utility/csiologger":92,"../utility/registry":100,"../utility/timestamps":104}],43:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.PeerConnectionHandler=void 0;var a=(function(){function e(e,t){for(var n=0;n0)this.handleErrorActions(r["urn:x-callstats:auth:errorActions"]);else{if(200===t.status){if("bearer"!==r.token_type)return S.error(this.name+": successful, but token type was not bearer. Scheduling retry."),void this.sendNextRequest();this.setupToken(r.access_token),r.iceServers&&(this.iceServers=r.iceServers),r.metadata&&r.metadata.urls&&(this.backendURLs=r.metadata.urls,this.backendURLs.events&&f.setRestEventUrl(this.backendURLs.events+"/"),this.backendURLs.stats&&f.setRestStatsUrl(this.backendURLs.stats+"/"),this.backendURLs.config&&f.setConfigServiceUrl(this.backendURLs.config+"/"));var i=parseInt(1e3*parseInt(r.expires_in)*.9);return this.setupReauthTimer(i),this.renew=!1,this.initCallback&&this.initCallback(h.csError.success,p.csCallBackMessages.authSuccessful),this.elapsed=n,void this.completeProcess()}S.error("Authentication failed, but no error actions were defined in response."),this.sendNextRequest()}}},{key:"request",value:function(){var e=this;this.clearReauthTimer();var t=new Promise(function(t,n){e.tempResolve=t,e.tempReject=n});return this.tokenGenerator(this.renew,function(t,n){if(null!==t)return e.initCallback&&e.initCallback(h.csError.tokenGenerationError,t.toString()),e.rejectCb(new Error(e.name+": tokenGenerationError")),S.error("tokenGenerationError ",t),null;var r=f.authServiceUrl+"authenticate",i={client_id:e.credentials.userId+"@"+e.credentials.getAppId(),code:n,grant_type:"authorization_code"};(0,y.sendPostRequest)(r,{"Content-Type":"application/x-www-form-urlencoded"},k,i).then(function(t){e.tempResolve(t)},function(t){e.tempReject(t)})}),t}},{key:"tokenGeneratorCreator",value:function(e,t){var n=this;return function(r,i){var a=null;if(!r&&null!==a)return i(null,a);var o=n.credentials,s={userID:o.getUserId(),appID:o.getAppId()};t&&(s.keyId=t),n.jwt.sign({alg:"HS256"},s,e).then(function(e){a=e,i(null,e)}).catch(function(e){i(e)})}}},{key:"createTokenGenerator",value:function(e){var t=this;return new Promise(function(n,r){var i=null;e.indexOf(":")>-1&&(i=d.strtohex(e.split(":")[0]),e=e.split(":")[1]),t.jwt.importKey(e).then(function(r){e=null;var a=t.tokenGeneratorCreator(r,i);n(a)}).catch(function(e){S.error(t.name+": could not import key ("+e+")"),r(e)})})}}]),t})();n.Authenticator=w},{"../browserapi/localstorage":20,"../config/callstatserrors":35,"../config/constants":36,"../config/settings":37,"../utility/base64":89,"../utility/csiologger":92,"../utility/json":97,"../utility/registry":100,"./jwt/jwt":54,"./jwt/jwttoken":55,"./xmlhttp":60,"./xmlhttpservice":61}],47:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.GenericEventHandler=void 0;var a=(function(){function e(e,t){for(var n=0;n6e4?(h.Registry.getGenericEventHandler().sendEvent(p.logEvents.log,{msg:"latency > MAX_ALLOWED_LATENCY: clockSync reset"}),this.offsetResults=[]):this.addOffset(e,r,n),this.offsetResults.length>=5?(this.calculateOffset(),this.endTime=f.getCurrent(),this.completeProcess()):this.sendRequest()}},{key:"isCompleted",value:function(){return this.completed}},{key:"addOffset",value:function(e,t,n){var r=e.now+t-n;this.offsetResults.push(r)}},{key:"calculateOffset",value:function(){var e=this.offsetResults.reduce(function(e,t){return e+t});this.currentOffset=e/this.offsetResults.length,this.currentOffset=isNaN(this.currentOffset)?0:this.currentOffset,h.Registry.getGenericEventHandler().sendEvent(p.logEvents.log,{msg:"clockSync Done, offset is: "+this.currentOffset+"results length"+this.offsetResults.length}),this.offsetResults=[],this.completed=!0}}]),t})();n.ClockSync=v},{"../config/constants":36,"../config/settings":37,"../utility/registry":100,"../utility/timestamps":104,"./xmlhttp":60,"./xmlhttpservice":61}],49:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(){function e(e,t){for(var n=0;n1)return f.warn("Multiple PCs found, skipping"),null;if(!e.getSenders||"function"!=typeof e.getSenders)return f.warn("Get senders error"),t;for(var r=e.getSenders(),i=void 0,o=0;o=0;h--)f[h]=c.charCodeAt(h);var p=r.subtlecrypto.sign(d,n,f);"ie"===r.cryptotype?(p.onerror=a,p.oncomplete=function(e){c=r.buildToken(e.target.result,c),i(c)}):p.then(function(e){c=r.buildToken(e,c),i(c)}).catch(function(e){a(e)})})}},{key:"buildToken",value:function(e,t){for(var n="",r=new Uint8Array(e),i=r.byteLength,a=0;a0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r,i){"success"===n.status?e&&e(n,r):t&&t(n)}}Object.defineProperty(n,"__esModule",{value:!0}),n.RestRelays=void 0;var o=(function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null;i(this,e),this.baseUrl=t,this.urlAppendix=n,this.responseHandler=r}return o(e,[{key:"getRequestUrl",value:function(e,t,n){return this.makeRequestUrl(e,t,n),this.requestUrl.toString()}},{key:"makeRequestUrl",value:function(e,t,n){e===s.precalltestEvents.results?this.requestUrl=new l.Url(this.baseUrl,u.Registry.getCredentials().getAppId(),this.urlAppendix):(e===s.internalFabricEvent.userJoined&&n&&(n=""),this.requestUrl=new l.Url(this.baseUrl,u.Registry.getCredentials().getAppId()+"/conferences/"+t,n,this.urlAppendix))}},{key:"handleResponse",value:function(e,t,n){this.responseHandler(e,t,n)}}]),e})();n.RestRelays=d},{"../config/constants":36,"../config/settings":37,"../utility/csiologger":92,"../utility/registry":100,"../utility/url":105}],59:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.TransmissionManager=void 0;var a=(function(){function e(e,t){for(var n=0;n0&&this.startTimer());this.setupConnection()}},{key:"setupConnection",value:function(){this.connectionManager.setup().then(function(){l.log("Connected to connectionManager")}).catch(function(e){return l.log("Could not connect to connectionManager",e)})}},{key:"canSendUserAlive",value:function(e,t){return!(this.lastUserAliveTS[t]&&e-this.lastUserAliveTS[t]<9e3)}},{key:"sendMessage",value:function(){var e=void 0,t=void 0;if(0===this.getCacheLength())return!1;for(var n in this.cache)if(this.cache.hasOwnProperty(n)&&(t=n,(e=this.cache[t].peak())&&e.canBeSent()))break;if(!e||!e.canBeSent())return!1;if(e=this.cache[t].pop(),this.lastTS=o.getCurrent(),e.eventType===u.internalFabricEvent.userAlive){if(!this.canSendUserAlive(this.lastTS,t))return!0;this.lastUserAliveTS[t]=this.lastTS}return l.log("sending message type :",e.eventType,e.toJson()),this.connectionManager.send(e.toJson()),!0}},{key:"startTimer",value:function(){var e=this;this.timerStarted||0!=this.getCacheLength()&&(this.timerStarted=!0,setTimeout(function(){e.timerStarted=!1,e.trySend()},200))}},{key:"timeToSend",value:function(){return o.getCurrent()>=this.lastTS+200}},{key:"getCacheLength",value:function(){var e=0;for(var t in this.cache)this.cache.hasOwnProperty(t)&&(e+=this.cache[t].length());return e}},{key:"updateConferenceId",value:function(e){var t=u.tmpConferenceId;this.cache[t]&&this.cache[t].updateConferenceId(e)}}]),e})();n.TransmissionManager=f},{"../collections/cache":25,"../config/constants":36,"../utility/csiologger":92,"../utility/registry":100,"../utility/timestamps":104}],60:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n,r,i){return new Promise(function(a,o){var f,d=null,h=new XMLHttpRequest,p=u.Registry.getEndpoint().getBrowserName();if(h){for(var v in f=s.getCurrent(),h.open(e,t),p!==c.browserName.msie&&(h.timeout=r),n)n.hasOwnProperty(v)&&h.setRequestHeader(v,n[v]);var g=null;if("POST"===e){if("application/x-www-form-urlencoded"===n["Content-Type"]){var y=[];for(var m in i)i.hasOwnProperty(m)&&y.push(encodeURIComponent(m)+"="+encodeURIComponent(i[m]));g=y.join("&")}"application/json"===n["Content-Type"]&&(g=JSON.stringify(i))}h.onload=function(){d=s.getCurrent();var e=new l(h,d-f);a(e)},h.ontimeout=function(){o(new Error("connection timeout"))},h.onreadystatechange=function(){4===h.readyState&&0===h.status&&o(new Error("no server response received"))},h.send(g)}else o(new Error("creating instance failed"))})}Object.defineProperty(n,"__esModule",{value:!0});var o=(function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"XMLHttpService",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c;r(this,e),this.name=t,this.minRetryTimeout=n,this.sigmoid=new a.Sigmoid(i-n,15,.5),this.reset()}return i(e,[{key:"reset",value:function(){this.inProgress=!1,this.completed=!1,this.resolveCb&&this.rejectCb(new Error(this.name+": resetting")),this.resolveCb=null,this.rejectCb=null}},{key:"initiate",value:function(){var e=this;if(this.inProgress)return new Promise(function(t,n){n(new Error(e.name+": in progress"))});var t=new Promise(function(t,n){e.resolveCb=t,e.rejectCb=n});return this.inProgress=!0,this.sendRequest(),t}},{key:"isCompleted",value:function(){return this.completed}},{key:"handleSendError",value:function(e){o.log(this.name+": send next request ("+e+")"),this.sendNextRequest()}},{key:"handleResponseProxy",value:function(e){this.handleResponse(e),this.resetTimeout()}},{key:"handleResponse",value:function(e){o.error(this.name+": handleResponse() not implemented"),this.completeProcess()}},{key:"completeProcess",value:function(){this.inProgress=!1,this.completed=!0,this.resolveCb.apply(this,arguments)}},{key:"request",value:function(){return o.error(this.name+": request() not implemented!"),new Promise(function(e,t){e()})}},{key:"sendRequest",value:function(){if(this.inProgress){var e=this.request();e&&e.then(this.handleResponseProxy.bind(this),this.handleSendError.bind(this))}}},{key:"sendNextRequest",value:function(){setTimeout(this.sendRequest.bind(this),this.getTimeout())}},{key:"resetTimeout",value:function(){this.sigmoid.reset()}},{key:"getTimeout",value:function(){return this.minRetryTimeout+this.sigmoid.getActual()}}]),e})();n.XMLHttpService=u},{"../utility/csiologger":92,"../utility/sigmoid":102}],62:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.IntervalStatsMonitor=void 0;var a=(function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:0,r=this.getTotalBytes(e),i=this.getTotalBytes(t);if(!u.checkForPositiveValue(r)||!u.checkForPositiveValue(i)||!u.checkForPositiveValue(n))return null;var a=(8*r-8*i)/Math.max(n,1);return u.checkForPositiveValue(a)?a:null}},{key:"getIntervalPacketLoss",value:function(e,t,n){var r=this.getTotalLostPackets(e);if(!n)return u.checkForPositiveValue(r)?r:null;var i=this.getTotalLostPackets(t);if(!u.checkForPositiveValue(r)||!u.checkForPositiveValue(i))return null;var a=r-i;return u.checkForPositiveValue(a)?a:null}},{key:"getIntervalPacketRate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!u.checkForPositiveValue(n))return null;var r=this.getTotalPackets(e),i=this.getTotalPackets(t);if(!u.checkForPositiveValue(r)<0||!u.checkForPositiveValue(i))return null;var a=(r-i)/(Math.max(n,1)/1e3);return u.checkForPositiveValue(a)?a:null}},{key:"getIntervalFractionLost",value:function(e,t,n){var r=this.getIntervalPacketLoss(e,t,n),i=this.getTotalPackets(e)-this.getTotalPackets(t);if(!u.checkForPositiveValue(r)||!u.checkForPositiveValue(i))return null;var a=r/Math.max(i+r,1);return u.checkForPositiveValue(a)?a:null}},{key:"getIntervalStat",value:function(e,t){var n=e.getCurrent(),r=e.getPrevious(t),i=e.getElapsedTime(t),a=new Map;if(r)for(var o=0,s=r.length;o0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=e,r=e.tracks||[],i=0,a=r.length;i0&&this.frameHeight>0?this.resolution=new a.Resolution(this.frameWidth,this.frameHeight,this.frameRateReceived):this.resolution=null}},{key:"getJitter",value:function(){return this.jitter}},{key:"getRTT",value:function(){return this.rtt}},{key:"getLostPackets",value:function(){return this.lostPackets}},{key:"getDiscardedPackets",value:function(){return this.discardedPackets}},{key:"getReceivedPackets",value:function(){return this.receivedPackets}},{key:"getSentPackets",value:function(){return this.sentPackets}},{key:"getSentBytes",value:function(){return this.sentBytes}},{key:"getReceivedBytes",value:function(){return this.receivedBytes}},{key:"setFractionLost",value:function(e){this.fractionLost=void 0===e?null:e}},{key:"getFractionLost",value:function(){return this.fractionLost}},{key:"extractTrack",value:function(){var e=this.track;return this.track=null,e}},{key:"toString",value:function(){return"pcHash: "+this.pcHash+", ssrc: "+this.ssrc+", streamType: "+this.streamType+", mediaType: "+this.mediaType+", reportType: "+this.reportType+", frameRateReceived: "+this.frameRateReceived+", frameHeight: "+this.frameHeight+", frameWidth: "+this.frameWidth+", droppedFramesNum: "+this.droppedFramesNum+", rtt: "+this.rtt+", jitter: "+this.jitter+", lostPackets: "+this.lostPackets+", receivedPackets: "+this.receivedPackets+", sentPackets: "+this.sentPackets+", discardedPackets: "+this.discardedPackets+", sentBytes: "+this.sentBytes+", receivedBytes: "+this.receivedBytes+", fractionLost: "+this.fractionLost}}]),e})();n.Measurement=s},{"./resolution":72,"./validator":87}],64:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.CPULimitationObserver=void 0;var a=(function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:void 0,t=e&&e.getRequestedMeasurement();if(!t)return!0;if(e.getStreamType()===o.streamType.inbound){if(t.getReceivedBytes()<1)return!0}else if(t.getSentBytes()<1)return!0;return!e.lastTrack||!e.lastTrack.data||!e.lastTrack.data.mimeType&&!e.lastTrack.data.googCodecName}},{key:"isValidTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.streamType.inbound;if(!e)return!1;var n=e.getRequestedMeasurement();return!!n&&n.getReportType()===o.reportType.local&&e.getStreamType()===t&&e.getMediaType()===o.mediaType.audio}},{key:"accept",value:function(e){var t=this,n=e.filter(function(e){return t.isValidTrack(e,o.streamType.inbound)}),r=e.filter(function(e){return t.isValidTrack(e,o.streamType.outbound)}),i=this.getDisruptions(n,r);i.length>0&&this.notifierCallback(i)}},{key:"toString",value:function(){return"DisruptionObserver"}},{key:"getDisruptedTrack",value:function(){var e=this;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find(function(t){return t&&!1===t.hasTraffic()&&!1===e.isDeadTrack(t)})}},{key:"isStartedAndHasTraffic",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.filter(function(e){return 0===e.getStartTime()}).length<1,n=e.filter(function(e){return!e.hasTraffic()}).length<1;return e.length>0&&t&&n}},{key:"hasTracksAndTraffic",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.filter(function(e){return!e.hasTraffic()}).length<1;return e.length>0&&t}},{key:"isInitialSetupDelayPassed",value:function(){return c.getCurrent()>this.startTime+15e3}},{key:"isInbOneWayAudioDisruption",value:function(e,t){if(this.isStartedAndHasTraffic(t)&&this.isInitialSetupDelayPassed()){var n=void 0;if(!this.hasTracksAndTraffic(e)){var r=this.getDisruptedTrack(e),i=r&&r.getSSRC();i&&(n=new s.OneWayMediaDisruption(o.oneWayMediaTypes.audio,i,o.streamType.inbound))}return n}}},{key:"isOutbOneWayAudioDisruption",value:function(e,t){if(this.isStartedAndHasTraffic(e)&&this.isInitialSetupDelayPassed()){var n=void 0;if(!this.hasTracksAndTraffic(t)){var r=this.getDisruptedTrack(t),i=r&&r.getSSRC();i&&(n=new s.OneWayMediaDisruption(o.oneWayMediaTypes.audio,i,o.streamType.outbound))}return n}}},{key:"updateDisruptionAndRecoveryCount",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e?(t=Math.min(t+1,l),n=0):(n=Math.min(n+1,l),t=0),{disruptionCount:t,recoveryCount:n}}},{key:"getDisruptionState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!1===n&&e>=5?f:!0===n&&t>=5?d:h}},{key:"getAudioDisruption",value:function(e,t,n){var r=void 0,i=void 0;if(n===o.streamType.inbound?(r=this.isInbOneWayAudioDisruption(e,t),i=this.oneWayInbAudioDisruption):n===o.streamType.outbound&&(r=this.isOutbOneWayAudioDisruption(e,t),i=this.oneWayOutbAudioDisruption),i){var a=this.updateDisruptionAndRecoveryCount(r,i.disruptionCount,i.recoveryCount),s=a.disruptionCount,c=a.recoveryCount,u=this.getDisruptionState(s,c,i.started);return u===f?(i.started=!0,i.disruption=r.setStart(),i.disruptionCount=0,i.recoveryCount=0):u===d?(i.started=!1,i.disruption=i.disruption.setEnd(),i.disruptionCount=0,i.recoveryCount=0):(i.recoveryCount=c,i.disruptionCount=s),u!==h?i.disruption:void 0}}},{key:"getDisruptions",value:function(e,t){var n=[],r=this.getAudioDisruption(e,t,o.streamType.inbound),i=this.getAudioDisruption(e,t,o.streamType.outbound);return r&&n.push(r),i&&n.push(i),n}}]),e})();n.OneWayMediaObserver=p},{"../../config/constants":36,"../../utility/registry":100,"../../utility/timestamps":104,"../onewaymediadisruption":69}],66:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.QPSumObserver=void 0;var a=(function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(null===e||void 0===e||Math.abs(e)i;return a?(this.consecutivePositive+=1,this.consecutivePositive>this.resetThreshold&&this.runningStats.reset()):this.consecutivePositive=0,a}}]),e})(),p=(function(){function e(t){var n=t.maxMarginFactor,r=void 0===n?l.adaptiveStatsThresholds.maxMarginFactor:n,a=t.marginReductionFactor,o=void 0===a?l.adaptiveStatsThresholds.marginReductionFactor:a,s=t.marginIncreaseFactor,c=void 0===s?l.adaptiveStatsThresholds.marginIncreaseFactor:s,u=t.marginDecreaseIntervalInMs,f=void 0===u?l.adaptiveStatsThresholds.marginDecreaseIntervalInMs:u,d=t.maxGradualCounter,p=void 0===d?l.adaptiveStatsThresholds.maxGradualCounter:d,v=t.minIntervalInMs,g=void 0===v?l.adaptiveStatsThresholds.minIntervalInMs:v,y=t.rippleBase,m=void 0===y?l.adaptiveStatsThresholds.rippleBase:y,b=t.windowSize,S=void 0===b?l.adaptiveStatsThresholds.windowSize:b,k=t.resetThreshold,w=void 0===k?l.adaptiveStatsThresholds.resetThreshold:k,C=t.minThreshold,_=void 0===C?l.adaptiveStatsThresholds.minThreshold:C;i(this,e),this.rttTester=new h("RTT Tester",_.rtt,S,w),this.throughputTester=new h("Throughput Tester",_.throughput,S,w),this.FLTester=new h("FL Tester",_.fractionalLoss,S,w),this.marginFactor=1,this.lastDecreased=0,this.lastTriggering=0,this.maxMarginFactor=r,this.marginReductionFactor=o,this.marginIncreaseFactor=c,this.marginDecreaseIntervalInMs=f,this.maxGradualCounter=p,this.gradualCounter=p,this.minIntervalInMs=g,this.rippleBase=m}return o(e,[{key:"test",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=t?{}:e.peek();if(!n)return!1;var r=(t?{}:e.getTrack()).data,i=t?t.rtt:n.getRTT(),a=u.checkForNan(parseInt(t?t.throughput:r.intervalBandwidth,10)),o=t?t.loss:n.getFractionLost(),c=t?t.time:s.getCurrent(),l=this.rttTester.doTest(i,this.marginFactor),f=this.throughputTester.doTest(a,this.marginFactor),d=this.FLTester.doTest(o,this.marginFactor);if(l||f||d)return this.marginFactor=Math.min(this.marginFactor*this.marginIncreaseFactor,this.maxMarginFactor),this.lastTriggering=c,this.lastDecreased=c,this.gradualCounter=0,!0;if(c-this.lastDecreased>this.marginDecreaseIntervalInMs&&(this.marginFactor=Math.max(this.marginFactor*this.marginReductionFactor,1),this.lastDecreased=c),this.gradualCounter1&&void 0!==arguments[1]?arguments[1]:{};i(this,e),t?(this.notifyCallback=t,this.minIntervalInMs=n.minIntervalInMs||l.adaptiveStatsThresholds.minIntervalInMs,this.maxIntervalInMs=n.maxIntervalInMs||l.adaptiveStatsThresholds.maxIntervalInMs,this.config=n,this.notified=0,this.testers=new Map):d.warn("notifyCallback was null or undefined : "+t)}return o(e,[{key:"setup",value:function(e,t){this.minIntervalInMs=e,this.maxIntervalInMs=t}},{key:"getMostRecentTrackStartTime",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,t){return!!t&&"function"==typeof t.getCreationTime&&Math.max(t.getCreationTime(),e)},Number.MIN_VALUE)}},{key:"accept",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=t?t.time:s.getCurrent(),r=n-this.notified,i=this.doSend(e,t);if(this.minIntervalInMs===this.maxIntervalInMs)return d.log("Elapsed time in fix intervalset: "+r),void(r>this.minIntervalInMs&&(this.notifyCallback&&this.notifyCallback(n),this.notified=n));if(!(rl.adaptiveStatsThresholds.initialNotifyIntervalTimeoutInMs)return this.notifyCallback&&this.notifyCallback(n),void(this.notified=n);r0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(t){if(this.testers.has("test-ssrc")||this.testers.set("test-ssrc",new p(a({},this.config,{minIntervalInMs:this.minIntervalInMs,maxIntervalInMs:this.maxIntervalInMs}))),this.testers.get("test-ssrc").test(e,t))return!0}else for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"0",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];r(this,e),this.mediaType=t,this.ssrc=""+n,this.streamType=i,this.started=a}return i(e,[{key:"setStart",value:function(){return this.started=!0,this}},{key:"setEnd",value:function(){return this.started=!1,this}},{key:"getContent",value:function(){return{mediaType:this.mediaType,ssrc:this.ssrc,streamType:this.streamType}}},{key:"isStarted",value:function(){return this.started}},{key:"toString",value:function(){return JSON.stringify({started:this.started,ssrc:this.ssrc,mediaType:this.mediaType})}}]),e})();n.OneWayMediaDisruption=a},{}],70:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:o.avQualityRatings.unknown){case o.avQualityRatings.bad:return o.qualityRating.bad;case o.avQualityRatings.fair:return o.qualityRating.fair;case o.avQualityRatings.excellent:return o.qualityRating.excellent}return 0}},{key:"toQualityString",value:function(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.qualityRating.excellent){case o.qualityRating.excellent:return o.avQualityRatings.excellent;case o.qualityRating.good:case o.qualityRating.fair:case o.qualityRating.poor:return o.avQualityRatings.fair;case o.qualityRating.bad:return o.avQualityRatings.bad}return o.avQualityRatings.unknown}},{key:"inboundAudioQuality",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).data||{},t=[];if(e.csioIntBRKbps&&00&&void 0!==arguments[0]?arguments[0]:{}).data||{},t=[];if(e.csioIntBRKbps&&00&&void 0!==arguments[0]?arguments[0]:{}).data||{},t=[];if(e.csioIntBRKbps&&00&&void 0!==arguments[0]?arguments[0]:{}).data||{},t=[];if(e.csioIntBRKbps&&00&&void 0!==arguments[0]?arguments[0]:[],t=0,n=0,r=0,i=e.length;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.tracks||[],n=0,i=t.length;n0)return r;for(var o=void 0,s=0;s0||parseInt(a.transportStats.bytesSent,10)>0)&&n.transportStats.push(a.transportStats):"true"!==a.transportStats.selected&&!0!==a.transportStats.selected||n.transportStats.push(a.transportStats))}if(n.tracks){var o=f.Registry.getConferenceManager().getConferenceForPcHash(t),s=void 0;o&&(s=o.getPeerConnectionManager().getPcHandlerByHash(t)),n.tracks.forEach(function(e){var t=s.getSSRCInfo(e.data.ssrc);void 0!==t&&t.localStartTime||s&&(s.updateSDP(n.tracks),t=s.getSSRCInfo(e.data.ssrc)),t&&(e.cname=t.cname,e.msid=t.msid,e.associatedVideoTag=t.associatedVideoTag,e.usageLabel=t.usageLabel)})}return n.transportStats&&this.codeBase===u.codeBaseType.firefox&&(n.transportStats=this.getAddressInfoFromCandidates(n.transportStats,n.localIceCandidates,n.remoteIceCandidates)),n}},{key:"getParsedStats",value:function(e){var t={};if(e.timestamp instanceof Date&&(t.timestamp=e.timestamp.getTime().toString()),e.type&&(t.type=e.type),e.names){for(var n=e.names(),r=0;r0)return n[0]}}},{key:"formatRelayType",value:function(e){var t="None";switch(e){case 0:t="TURN/TLS";break;case 1:t="TURN/TCP";break;case 2:t="TURN/UDP"}return t}},{key:"getRelayType",value:function(e,t){var n=this,r=void 0;return t.getIceCandidates().some(function(t){if(t.typePreference){var i=t.typePreference>>24;return"rtp"===t.protocol&&t.address===e&&(i>=0&&i<=2&&(r=n.formatTypePreference(i)),!0)}return!1}),r}},{key:"getTransportInfo",value:function(e,t){for(var n={},r=!1,i=0;i0?a.statsType="outbound-rtp":a.statsType="inbound-rtp"}"remote-inbound-rtp"!==a.statsType&&"remote-outbound-rtp"!==a.statsType&&(!0!==i.isRemote&&"true"!==i.isRemote||(a.statsType="remote-"+a.statsType)),n.streams[i.ssrc]=a,n.mediaStreamTracks.push(a)}}this.callback(n)}}]),e})();n.StatsCallbackBuilder=o},{"../utility/registry":100}],76:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0}),n.StatsMonitor=n.StatsMonitorIO=void 0;var s=(function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;null===e&&(e=k.statsDestination.backend);var t=new h.StatsTuple(this.getCandidatePairs(),this.lastPcStats.getCodec(),this.lastPcStats.getTrackStats(),this.transportsmonitor.getIntervalStats(),this.tracksmonitor.extractTracks(),e),n=this.intervalstatsmonitor.getIntervalStats(e);t=this.intervalstatsmonitor.updateIntervalStats(t,n),t=this.qualityevaluator.updateQualityStats(t),this.transmit(C.StatsTupleOut,t)}},{key:"sendDisruptions",value:function(e){var t=this;e.forEach(function(e){e.isStarted()?t.sendEventMsg(k.internalFabricEvent.oneWayMediaStart,e.getContent()):t.sendEventMsg(k.internalFabricEvent.oneWayMediaStop,e.getContent())})}},{key:"sendCPULimitationObservations",value:function(e){}},{key:"sendQPSumDistortions",value:function(e){}},{key:"sendThroughputObservations",value:function(e){this.sendEventMsg(k.internalFabricEvent.sendingThroughputObservations,e)}},{key:"sendEventMsg",value:function(e,t){if(this.lastPcHash){var n=p.Registry.getConferenceManager().getConferenceForPcHash(this.lastPcHash);if(n){var r=n.getPeerConnectionManager().getPcHandlerByHash(this.lastPcHash),i=r.getPeerConnection(),a=r.getConferenceId();p.Registry.getEventMessageBuilder().make(e,a,i,t)}}}},{key:"delete",value:function(e){this.tracksmonitor&&this.tracksmonitor.deleteTracks(e),this.transportsmonitor&&this.transportsmonitor.delete(e),this.intervalstatsmonitor&&this.intervalstatsmonitor.delete(e),this.candidatepairs&&this.candidatepairs.has(e)&&this.candidatepairs.delete(e)}}]),t})();n.StatsMonitor=_},{"../collections/component":26,"../config/constants":36,"../utility/csiologger":92,"../utility/registry":100,"../utility/timestamps":104,"./intervalstatsmonitor":62,"./monitorhooks/cpulimitationobserver":64,"./monitorhooks/onewaymediaobserver":65,"./monitorhooks/qpsumobserver":66,"./monitorhooks/sendingtrigger":67,"./monitorhooks/throughputobserver":68,"./qualityevaluator":71,"./statstuple":79,"./tracksmonitor":85,"./transportsmonitor":86}],77:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0}),n.StatsParser=n.StatsParserIO=void 0;var s=(function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null;r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,a));return o.sum=0,o.counter=0,o}return a(t,s.SWPlugin),o(t,[{key:"add",value:function(e){this.filter(e)&&(this.sum+=this.extract(e),++this.counter,this.calculate())}},{key:"remove",value:function(e){this.filter(e)&&(this.sum-=this.extract(e),--this.counter,this.calculate())}},{key:"calculate",value:function(){var e=0;this.counter<1?this.notify(e):(e=this.sum/this.counter,this.notify(e))}}]),t})();n.SWAvg=c},{"./swplugin":83}],81:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0}),n.SWBTreePercentile=void 0;var o=(function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(("function"==typeof Symbol?Symbol.iterator:"@@iterator")in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),s=(function(){function e(e,t){for(var n=0;n4&&void 0!==arguments[4]?arguments[4]:null,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;r(this,t);var f=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,a,o,c));if(992&&void 0!==arguments[2]?arguments[2]:null;r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,null,null,a));return o.addFunc=e,o.remFunc=n,o}return a(t,s.SWPlugin),o(t,[{key:"add",value:function(e){this.filter(e)&&this.addFunc&&this.addFunc(e)}},{key:"remove",value:function(e){this.filter(e)&&this.remFunc&&this.remFunc(e)}},{key:"toString",value:function(){return"SWFuncPlugin"}}]),t})();n.SWFunctor=c},{"./swplugin":83}],83:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.SWPlugin=void 0;var i=(function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null;r(this,e),this.extractorFnc=t,this.notifierFnc=n,this.filterFunc=i}return i(e,[{key:"notify",value:function(e){this.notifierFnc?this.notifierFnc(e):a.warn("Failed notification for "+this.toString())}},{key:"extract",value:function(e){return this.extractorFnc?this.extractorFnc(e):(a.warn(this.toString()+" tried to extract without extractorFnc"),null)}},{key:"filter",value:function(e){return!this.filterFunc||this.filterFunc(e)}},{key:"add",value:function(e){a.log("Abstract method is called width value: "+e)}},{key:"remove",value:function(e){a.log("Abstract method is called with value: "+e)}},{key:"toString",value:function(){return"SWPlugin"}}]),e})();n.SWPlugin=o},{"../../utility/csiologger":92}],84:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.TrackMonitor=void 0;var c=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},u=(function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:1};this.evaluators.push(t)}}]),e})(),S=(function(e){function t(e,n,r,a){o(this,t);var s=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return s.thresholds=[],s.enableThresholds=!1,s.requestTime=0,s.started=0,s.created=v.getCurrent(),s.mediaType=a,s.streamType=r,s.qualityHelper=new b,s.metrics=s.makeTrack(),s.lastTrack={},s.prevFrameRateMean=null,s.ssrc=null,s}return a(t,f.SlidingWindow),u(t,null,[{key:"make",value:function(e,n,r,i){var a=new t(e,n,r,i),o=a.metrics;return a.attach(new d.SWAvg(function(e){return e.getJitter()},function(e){o.csioAvgJitter=e},function(e){var t=e.getJitter();return null!==t&&void 0!==t})),a.attach(new d.SWAvg(function(e){return e.getRTT()},function(e){o.csioAvgRtt=e},function(e){var t=e.getRTT();return null!==t&&void 0!==t})),a.attach(new h.SWBTreePercentile(95,function(e,t){var n=e.getJitter(),r=t.getJitter();return n==r?0:n0&&r>=0&&(t.csioEstFrameRatePerSecond=1e3*r/i)}}),e.attach(new p.SWFunctor(function(n){var r=v.getCurrent(),i=n.getResolution(),a=e.getRequestedMeasurement(),o=e.getRequestTime(),s=8*n.getReceivedBytes(),c=n.getReceivedPackets(),u=0,f=0,d=0,h=Math.max(r-e.getStartTime(),d);a?(u=s-8*a.getReceivedBytes(),f=Math.max(r-o,d)):(d=l.Registry.getCredentials().isAdaptiveStatsEnabled()?g.adaptiveStatsIntervalsInMs.min:l.Registry.getCredentials().getStatsSubmissionInterval(),h=Math.max(r-e.getStartTime(),d),u=s,f=Math.max(h,d)),t.csioAvgBRKbps=s/h,t.intervalBandwidth=Math.max(u/f,0),t.csioAvgPacketSize=n.getReceivedBytes()/Math.max(c,1),t.csiores=i},null,null)),e.attach(new h.SWBTreePercentile(95,function(e,t){var n=e.getFractionLost(),r=t.getFractionLost();return n==r?0:n=0},function(e,t){return e}))}},{key:"setupOutboundMonitor",value:function(e){var t=e.metrics;e.addPreProcess(function(t){var n=t.getFractionLost();if(!y.checkForPositiveValue(n)){var r=t.getLostPackets(),i=t.getReceivedPackets(),a=e.getRequestedMeasurement(),o=0,s=0;a?(o=r-a.getLostPackets(),s=i-a.getReceivedPackets()):(o=r,s=i),y.checkForPositiveValue(o)&&y.checkForPositiveValue(s)&&(n=o/Math.max(s+o,1),y.checkForPositiveValue(n)&&t.setFractionLost(n))}}),e.attach(new p.SWFunctor(function(n){var r=v.getCurrent(),i=n.getResolution(),a=e.getRequestedMeasurement(),o=e.getRequestTime(),s=8*n.getSentBytes(),c=n.getSentPackets(),u=0,f=0,d=0,h=Math.max(r-e.getStartTime(),d);a?(u=s-8*a.getSentBytes(),f=Math.max(r-o,d)):(d=l.Registry.getCredentials().isAdaptiveStatsEnabled()?g.adaptiveStatsIntervalsInMs.min:l.Registry.getCredentials().getStatsSubmissionInterval(),h=Math.max(r-e.getStartTime(),d),u=s,f=Math.max(h,d)),t.csioAvgBRKbps=s/h,t.intervalBandwidth=Math.max(u/f,0),t.csioAvgPacketSize=n.getSentBytes()/Math.max(c,1),t.csiores=i},null,null)),e.attach(new h.SWBTreePercentile(95,function(e,t){var n=e.getFractionLost(),r=t.getFractionLost();return n==r?0:n=0},function(e,t){return e}))}},{key:"setupAudioMonitor",value:function(e){var t=e.metrics;e.attach(new p.SWFunctor(function(e){t.csioMediaType=g.mediaType.audio},null,null))}},{key:"setupVideoMonitor",value:function(e){var t=e.metrics;e.attach(new d.SWAvg(function(e){return e.getFrameRateReceived()},function(n){e.prevFrameRateMean=t.csioFrameRateMean,t.csioPrevFrameRateMean=t.csioFrameRateMean,t.csioFrameRateMean=n},function(e){var t=e.getFrameRateReceived();return null!==t&&void 0!==t})),e.attach(new d.SWAvg(function(e){return e.getFrameHeight()},function(e){t.csioFrameHeightMean=e},function(e){var t=e.getFrameHeight();return null!==t&&void 0!==t})),e.attach(new d.SWAvg(function(e){return e.getFrameWidth()},function(e){t.csioFrameWidthMean=e},function(e){var t=e.getFrameWidth();return null!==t&&void 0!==t})),e.attach(new h.SWBTreePercentile(50,function(e,t){var n=e.getFrameRateReceived(),r=t.getFrameRateReceived();return n==r?0:n1&&void 0!==arguments[1]?arguments[1]:1;this.qualityHelper.addEvaluator(e,t)}},{key:"addPreProcess",value:function(e){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addPreProcess",this).call(this,e)}},{key:"addPostProcess",value:function(e){c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addPostProcess",this).call(this,e)}}]),t})();n.TrackMonitor=S},{"../collections/slidingwindow":31,"../config/constants":36,"../statspipeline/swplugins/swavg":80,"../statspipeline/swplugins/swbtreepercentile":81,"../statspipeline/swplugins/swfunctor":82,"../utility/csiologger":92,"../utility/registry":100,"../utility/timestamps":104,"./validator":87}],85:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.TracksMonitor=void 0;var i=(function(){function e(e,t){for(var n=0;n0||a.csioIntBytesReceived>0)?(a.csioTurnMins=r+o.csioTurnMins,a.csioBytesSent=o.csioBytesSent+a.csioIntBytesSent,a.csioBytesReceived=o.csioBytesReceived+a.csioIntBytesReceived):a.csioTurnMins=o.csioTurnMins}return t}},{key:"getIntervalStatForChrome",value:function(e){var t=e.getActual(),n=e.getPrevious(),r=e.getElapsedTime();if(!n)return actual;for(var i=0;i0||a.csioIntBytesReceived>0)?(a.csioTurnMins=r+o.csioTurnMins,a.csioBytesSent=o.csioBytesSent+a.csioIntBytesSent,a.csioBytesReceived=o.csioBytesReceived+a.csioIntBytesReceived):a.csioTurnMins=o.csioTurnMins}return t}}]),e})();n.TransportsMonitor=u},{"../config/constants":36,"../utility/timestamps":104}],87:[function(e,t,n){"use strict";function r(e){return isNaN(e)?null:e}Object.defineProperty(n,"__esModule",{value:!0}),n.checkForNan=r,n.checkForNegativeValue=function(e){return null!==r(e)&&0<=e?e:null},n.checkForPositiveValue=function(e){return void 0!==e&&null!==r(e)&&e>=0}},{}],88:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0];this.adaptiveStatsEnabled=e}}]),e})();n.Credentials=u},{"../config/constants":36,"./csiologger":92}],92:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.info=function(){var e;"true"===r.csioDebug&&(e=console).info.apply(e,arguments)},n.log=function(){var e;"true"===r.csioDebug&&(e=console).log.apply(e,arguments)},n.warn=function(){var e;"true"===r.csioDebug&&(e=console).warn.apply(e,arguments)},n.error=function(){var e;(e=console).warn.apply(e,arguments)};var r=(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t})(e("../config/settings"))},{"../config/settings":37}],93:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.Endpoint=void 0;var a=(function(){function e(e,t){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:{};if("string"!=typeof e||null===r||"object"!==(void 0===r?"undefined":a(r)))return l.error("failed typeof checks:",e,void 0===e?"undefined":a(e),void 0===r?"undefined":a(r),r),u.Registry.getGenericEventHandler().sendEvent(c.logEvents.error,{msg:"failed typeof checks:"+e+":"+(void 0===r?"undefined":a(r))+":"+(void 0===e?"undefined":a(e))}),!1;if(null===t&&e!==c.precalltestEvents.results)return l.error("failed conferenceId checks:",e,t),u.Registry.getGenericEventHandler().sendEvent(c.logEvents.error,{msg:"failed conferenceId checks:"+e}),!1;if(!n&&e!==c.callstatsChannels.userFeedback&&e!==c.fabricEvent.applicationErrorLog&&e!==c.fabricEvent.fabricSetupFailed&&e!==c.internalFabricEvent.userJoined&&e!==c.precalltestEvents.results)return l.error("peerconnection cannot be null",e),u.Registry.getGenericEventHandler().sendEvent(c.logEvents.error,{msg:"peerconnection cannot be null"+e}),!1;if(!s.EventMessage.checkCustomEntries(e,r))return l.error("failed checks:",e,r),u.Registry.getGenericEventHandler().sendEvent(c.logEvents.error,{msg:"failed customEntries checks:"+e}),!1;var i=void 0;if(t){var o=u.Registry.getConferenceManager().get(t);o&&n&&(i=o.getPeerConnectionManager().getPcHandler(n))}var f=new s.EventMessage(e,t,r,i);return this.transmissionmanager.send(f),!0}}]),e})();n.EventMessageBuilder=f},{"../config/constants":36,"./csiologger":92,"./eventmessage":94,"./registry":100}],96:[function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=0;if(!e)return n;for(var r=0,i=e.length;r127&&r<2048?(t[t.length]=r>>6|192,t[t.length]=63&r|128):(t[t.length]=r>>12|224,t[t.length]=r>>6&63|128,t[t.length]=63&r|128)}return new Uint8Array(t).buffer}function a(e){for(var t=new DataView(e),n="",r=void 0,i=0;i-1){for(var n=!1,r={fileName:e.filename,line:e.lineno,col:e.colno,jsVersion:a.version,eventType:"error",message:e.message,pageURL:window.location.href},s=i.Registry.getConferenceManager().getConferenceIds(),c=0;c0&&void 0!==arguments[0]?arguments[0]:100;r(this,e),this.queue=new a.Queue(t),this.cumulativeSum=0}return i(e,[{key:"add",value:function(e){this.cumulativeSum+=e;var t=this.queue.push(e);t&&(this.cumulativeSum-=t)}},{key:"getMean",value:function(){return this.queue.size()<1?null:this.cumulativeSum/this.queue.size()}},{key:"getVariance",value:function(){if(this.queue.size()<2)return null;for(var e=this.getMean(),t=0,n=this.queue.getFront();n;){var r=n,i=r.value-e;t+=i*i,n=r.next}return t/this.queue.size()}},{key:"getStd",value:function(){if(this.queue.size()<2)return null;var e=this.getVariance();return Math.sqrt(e)}},{key:"reset",value:function(){this.cumulativeSum=0,this.queue.clear()}}]),e})();n.RunningStats=o},{"../collections/queue":30}],102:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=(function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:1;return this.actualStep+=e,this.max/(1+Math.exp(-1*this.stepness*(this.actualStep-this.midpoint)))}}]),e})();n.Sigmoid=a},{}],103:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.TimeoutProcess=void 0;var i=(function(){function e(e,t){for(var n=0;n1?n-1:0),a=1;a=n.length)break;c=n[y++]}else{if((y=n.next()).done)break;c=y.value}var _=c;f.push(this._applyColorScheme(t,o,_))}}else{f=(0,s.default)({},u);for(var v=Object.entries(f),p=0;p"']/g,jn=RegExp(wn.source),An=RegExp(mn.source),kn=/<%-([\s\S]+?)%>/g,zn=/<%([\s\S]+?)%>/g,On=/<%=([\s\S]+?)%>/g,In=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rn=/^\w*$/,En=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Sn=/[\\^$.*+?()[\]{}|]/g,Ln=RegExp(Sn.source),Wn=/^\s+|\s+$/g,Cn=/^\s+/,Tn=/\s+$/,Un=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bn=/\{\n\/\* \[wrapped with (.+)\] \*/,$n=/,? & /,Dn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Mn=/\\(\\)?/g,Fn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nn=/\w*$/,Pn=/^[-+]0x[0-9a-f]+$/i,Zn=/^0b[01]+$/i,qn=/^\[object .+?Constructor\]$/,Kn=/^0o[0-7]+$/i,Vn=/^(?:0|[1-9]\d*)$/,Gn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Hn=/($^)/,Jn=/['\n\r\u2028\u2029\\]/g,Yn="[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]",Qn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Xn="(?:\\ud83c[\\udde6-\\uddff]){2}",nt="[\\ud800-\\udbff][\\udc00-\\udfff]",tt="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?"+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",Xn,nt].join('|')+")[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*"),rt='(?:'+["[\\u2700-\\u27bf]",Xn,nt].join('|')+')'+tt,et='(?:'+["[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?",Qn,Xn,nt,"[\\ud800-\\udfff]"].join('|')+')',ut=RegExp("['\u2019]",'g'),it=RegExp(Qn,'g'),ot=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+et+tt,'g'),ft=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[Yn,"[A-Z\\xc0-\\xd6\\xd8-\\xde]",'$'].join('|')+')',"(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[Yn,"[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])",'$'].join('|')+')',"[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?","[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",'\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])','\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])','\\d+',rt].join('|'),'g'),at=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),ct=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,lt=['Array','Buffer','DataView','Date','Error','Float32Array','Float64Array','Function','Int8Array','Int16Array','Int32Array','Map','Math','Object','Promise','RegExp','Set','String','Symbol','TypeError','Uint8Array','Uint8ClampedArray','Uint16Array','Uint32Array','WeakMap','_','clearTimeout','isFinite','parseInt','setTimeout'],st=-1,ht={};ht[cn]=ht[ln]=ht[sn]=ht[hn]=ht[pn]=ht[vn]=ht[_n]=ht[gn]=ht[dn]=!0,ht[D]=ht[M]=ht[fn]=ht[N]=ht[an]=ht[P]=ht[q]=ht[K]=ht[G]=ht[H]=ht[Y]=ht[X]=ht[nn]=ht[tn]=ht[un]=!1;var pt={};pt[D]=pt[M]=pt[fn]=pt[an]=pt[N]=pt[P]=pt[cn]=pt[ln]=pt[sn]=pt[hn]=pt[pn]=pt[G]=pt[H]=pt[Y]=pt[X]=pt[nn]=pt[tn]=pt[rn]=pt[vn]=pt[_n]=pt[gn]=pt[dn]=!0,pt[q]=pt[K]=pt[un]=!1;var vt={'\\':'\\',"'":"'",'\n':'n','\r':'r',"\u2028":'u2028',"\u2029":'u2029'},_t=parseFloat,gt=parseInt,dt='object'==typeof n&&n&&n.Object===Object&&n,yt='object'==typeof self&&self&&self.Object===Object&&self,xt=dt||yt||Function('return this')(),bt='object'==typeof i&&i&&!i.nodeType&&i,wt=bt&&'object'==typeof u&&u&&!u.nodeType&&u,mt=wt&&wt.exports===bt,jt=mt&&dt.process,At=(function(){try{var n=wt&&wt.require&&wt.require('util').types;return n||jt&&jt.binding&&jt.binding('util')}catch(n){}})(),kt=At&&At.isArrayBuffer,zt=At&&At.isDate,Ot=At&&At.isMap,It=At&&At.isRegExp,Rt=At&&At.isSet,Et=At&&At.isTypedArray;function St(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function Lt(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u-1}function $t(n,t,r){for(var e=-1,u=null==n?0:n.length;++e-1;);return r}function lr(n,t){for(var r=n.length;r--&&Ht(t,n[r],0)>-1;);return r}function sr(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}var hr=nr({'\xc0':'A','\xc1':'A','\xc2':'A','\xc3':'A','\xc4':'A','\xc5':'A','\xe0':'a','\xe1':'a','\xe2':'a','\xe3':'a','\xe4':'a','\xe5':'a','\xc7':'C','\xe7':'c','\xd0':'D','\xf0':'d','\xc8':'E','\xc9':'E','\xca':'E','\xcb':'E','\xe8':'e','\xe9':'e','\xea':'e','\xeb':'e','\xcc':'I','\xcd':'I','\xce':'I','\xcf':'I','\xec':'i','\xed':'i','\xee':'i','\xef':'i','\xd1':'N','\xf1':'n','\xd2':'O','\xd3':'O','\xd4':'O','\xd5':'O','\xd6':'O','\xd8':'O','\xf2':'o','\xf3':'o','\xf4':'o','\xf5':'o','\xf6':'o','\xf8':'o','\xd9':'U','\xda':'U','\xdb':'U','\xdc':'U','\xf9':'u','\xfa':'u','\xfb':'u','\xfc':'u','\xdd':'Y','\xfd':'y','\xff':'y','\xc6':'Ae','\xe6':'ae','\xde':'Th','\xfe':'th','\xdf':'ss',"\u0100":'A',"\u0102":'A',"\u0104":'A',"\u0101":'a',"\u0103":'a',"\u0105":'a',"\u0106":'C',"\u0108":'C',"\u010a":'C',"\u010c":'C',"\u0107":'c',"\u0109":'c',"\u010b":'c',"\u010d":'c',"\u010e":'D',"\u0110":'D',"\u010f":'d',"\u0111":'d',"\u0112":'E',"\u0114":'E',"\u0116":'E',"\u0118":'E',"\u011a":'E',"\u0113":'e',"\u0115":'e',"\u0117":'e',"\u0119":'e',"\u011b":'e',"\u011c":'G',"\u011e":'G',"\u0120":'G',"\u0122":'G',"\u011d":'g',"\u011f":'g',"\u0121":'g',"\u0123":'g',"\u0124":'H',"\u0126":'H',"\u0125":'h',"\u0127":'h',"\u0128":'I',"\u012a":'I',"\u012c":'I',"\u012e":'I',"\u0130":'I',"\u0129":'i',"\u012b":'i',"\u012d":'i',"\u012f":'i',"\u0131":'i',"\u0134":'J',"\u0135":'j',"\u0136":'K',"\u0137":'k',"\u0138":'k',"\u0139":'L',"\u013b":'L',"\u013d":'L',"\u013f":'L',"\u0141":'L',"\u013a":'l',"\u013c":'l',"\u013e":'l',"\u0140":'l',"\u0142":'l',"\u0143":'N',"\u0145":'N',"\u0147":'N',"\u014a":'N',"\u0144":'n',"\u0146":'n',"\u0148":'n',"\u014b":'n',"\u014c":'O',"\u014e":'O',"\u0150":'O',"\u014d":'o',"\u014f":'o',"\u0151":'o',"\u0154":'R',"\u0156":'R',"\u0158":'R',"\u0155":'r',"\u0157":'r',"\u0159":'r',"\u015a":'S',"\u015c":'S',"\u015e":'S',"\u0160":'S',"\u015b":'s',"\u015d":'s',"\u015f":'s',"\u0161":'s',"\u0162":'T',"\u0164":'T',"\u0166":'T',"\u0163":'t',"\u0165":'t',"\u0167":'t',"\u0168":'U',"\u016a":'U',"\u016c":'U',"\u016e":'U',"\u0170":'U',"\u0172":'U',"\u0169":'u',"\u016b":'u',"\u016d":'u',"\u016f":'u',"\u0171":'u',"\u0173":'u',"\u0174":'W',"\u0175":'w',"\u0176":'Y',"\u0177":'y',"\u0178":'Y',"\u0179":'Z',"\u017b":'Z',"\u017d":'Z',"\u017a":'z',"\u017c":'z',"\u017e":'z',"\u0132":'IJ',"\u0133":'ij',"\u0152":'Oe',"\u0153":'oe',"\u0149":"'n","\u017f":'s'}),pr=nr({'&':'&','<':'<','>':'>','"':'"',"'":'''});function vr(n){return'\\'+vt[n]}function _r(n,r){return null==n?t:n[r]}function gr(n){return at.test(n)}function dr(n){return ct.test(n)}function yr(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function xr(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function br(n,t){return function(r){return n(t(r))}}function wr(n,t){for(var r=-1,e=n.length,u=0,i=[];++r','"':'"',''':"'"});function Rr(n){for(var t=ot.lastIndex=0;ot.test(n);)++t;return t}function Er(n){return n.match(ot)||[]}function Sr(n){return n.match(ft)||[]}var Lr=(function n(u){var i,Dn=(u=null==u?xt:Lr.defaults(xt.Object(),u,Lr.pick(xt,lt))).Array,Yn=u.Date,Qn=u.Error,Xn=u.Function,nt=u.Math,tt=u.Object,rt=u.RegExp,et=u.String,ot=u.TypeError,ft=Dn.prototype,at=Xn.prototype,ct=tt.prototype,vt=u['__core-js_shared__'],dt=at.toString,yt=ct.hasOwnProperty,bt=0,wt=(i=/[^.]+$/.exec(vt&&vt.keys&&vt.keys.IE_PROTO||''))?'Symbol(src)_1.'+i:'',jt=ct.toString,At=dt.call(tt),Zt=xt._,qt=rt('^'+dt.call(yt).replace(Sn,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$'),nr=mt?u.Buffer:t,Ar=u.Symbol,Rr=u.Uint8Array,Er=nr?nr.allocUnsafe:t,Wr=br(tt.getPrototypeOf,tt),Cr=tt.create,Tr=ct.propertyIsEnumerable,Ur=ft.splice,Br=Ar?"function"==typeof Ar?Ar.isConcatSpreadable:"@@isConcatSpreadable":t,$r=Ar?"function"==typeof Ar?Ar.iterator:"@@iterator":t,Dr=Ar?"function"==typeof Ar?Ar.toStringTag:"@@toStringTag":t,Mr=(function(){try{var n=co(tt,'defineProperty');return n({},'',{}),n}catch(n){}})(),Fr=u.clearTimeout!==xt.clearTimeout&&u.clearTimeout,Nr=Yn&&Yn.now!==xt.Date.now&&Yn.now,Pr=u.setTimeout!==xt.setTimeout&&u.setTimeout,Zr=nt.ceil,qr=nt.floor,Kr=tt.getOwnPropertySymbols,Vr=nr?nr.isBuffer:t,Gr=u.isFinite,Hr=ft.join,Jr=br(tt.keys,tt),Yr=nt.max,Qr=nt.min,Xr=Yn.now,ne=u.parseInt,te=nt.random,re=ft.reverse,ee=co(u,'DataView'),ue=co(u,'Map'),ie=co(u,'Promise'),oe=co(u,'Set'),fe=co(u,'WeakMap'),ae=co(tt,'create'),ce=fe&&new fe,le={},se=Ko(ee),he=Ko(ue),pe=Ko(ie),ve=Ko(oe),_e=Ko(fe),ge=Ar?"function"==typeof Ar?Ar.prototype:"@@prototype":t,de=ge?ge.valueOf:t,ye=ge?ge.toString:t;function xe(n){if(sa(n)&&!na(n)&&!(n instanceof je)){if(n instanceof me)return n;if(yt.call(n,'__wrapped__'))return Go(n)}return new me(n)}var be=(function(){function n(){}return function(r){if(!la(r))return{};if(Cr)return Cr(r);n.prototype=r;var e=new n;return n.prototype=t,e}})();function we(){}function me(n,r){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=t}function je(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=T,this.__views__=[]}function Ae(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=r?n:r)),n}function Ne(n,r,e,u,i,o){var f,a=r&l,c=r&s,p=r&h;if(e&&(f=i?e(n,u,i,o):e(n)),f!==t)return f;if(!la(n))return n;var v=na(n);if(v){if(f=yo(n),!a)return bi(n,f)}else{var _=po(n),g=_==K||_==V;if(ua(n))return hi(n,a);if(_==Y||_==D||g&&!i){if(f=c||g?{}:xo(n),!a)return c?ji(n,$e(f,n)):mi(n,Be(f,n))}else{if(!pt[_])return i?n:{};f=bo(n,_,a)}}o||(o=new Ie);var d=o.get(n);if(d)return d;o.set(n,f),ga(n)?n.forEach(function(t){f.add(Ne(t,r,e,t,n,o))}):ha(n)&&n.forEach(function(t,u){f.set(u,Ne(t,r,e,u,n,o))});var y=v?t:(p?c?ro:to:c?Na:Fa)(n);return Wt(y||n,function(t,u){y&&(t=n[u=t]),Ce(f,u,Ne(t,r,e,u,n,o))}),f}function Pe(n){var t=Fa(n);return function(r){return Ze(r,n,t)}}function Ze(n,r,e){var u=e.length;if(null==n)return!u;for(n=tt(n);u--;){var i=e[u],o=r[i],f=n[i];if(f===t&&!(i in n)||!o(f))return!1}return!0}function qe(n,r,e){if('function'!=typeof n)throw new ot(o);return Do(function(){n.apply(t,e)},r)}function Ke(n,t,e,u){var i=-1,o=Bt,f=!0,a=n.length,c=[],l=t.length;if(!a)return c;e&&(t=Dt(t,or(e))),u?(o=$t,f=!1):t.length>=r&&(o=ar,f=!1,t=new Oe(t));n:for(;++i-1},ke.prototype.set=function(n,t){var r=this.__data__,e=Te(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this},ze.prototype.clear=function(){this.size=0,this.__data__={hash:new Ae,map:new(ue||ke),string:new Ae}},ze.prototype.delete=function(n){var t=fo(this,n).delete(n);return this.size-=t?1:0,t},ze.prototype.get=function(n){return fo(this,n).get(n)},ze.prototype.has=function(n){return fo(this,n).has(n)},ze.prototype.set=function(n,t){var r=fo(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},Oe.prototype.add=Oe.prototype.push=function(n){return this.__data__.set(n,f),this},Oe.prototype.has=function(n){return this.__data__.has(n)},Ie.prototype.clear=function(){this.__data__=new ke,this.size=0},Ie.prototype.delete=function(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r},Ie.prototype.get=function(n){return this.__data__.get(n)},Ie.prototype.has=function(n){return this.__data__.has(n)},Ie.prototype.set=function(n,t){var r=this.__data__;if(r instanceof ke){var e=r.__data__;if(!ue||e.length<199)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new ze(e)}return r.set(n,t),this.size=r.size,this};var Ve=zi(ru),Ge=zi(eu,!0);function He(n,t){var r=!0;return Ve(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Je(n,r,e){for(var u=-1,i=n.length;++ui?0:i+e),(u=u===t||u>i?i:Aa(u))<0&&(u+=i),u=e>u?0:ka(u);e0&&r(f)?t>1?Xe(f,t-1,r,e,u):Mt(u,f):e||(u[u.length]=f)}return u}var nu=Oi(),tu=Oi(!0);function ru(n,t){return n&&nu(n,t,Fa)}function eu(n,t){return n&&tu(n,t,Fa)}function uu(n,t){return Ut(t,function(t){return fa(n[t])})}function iu(n,r){for(var e=0,u=(r=ai(r,n)).length;null!=n&&et}function cu(n,t){return null!=n&&yt.call(n,t)}function lu(n,t){return null!=n&&t in tt(n)}function su(n,t,r){return n>=Qr(t,r)&&n=120&&s.length>=120)?new Oe(f&&s):t}s=n[0];var h=-1,p=a[0];n:for(;++h-1;)f!==n&&Ur.call(f,a,1),Ur.call(n,a,1);return n}function Tu(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(r==e||u!==i){var i=u;jo(u)?Ur.call(n,u,1):ni(n,u)}}return n}function Uu(n,t){return n+qr(te()*(t-n+1))}function Bu(n,t,r,e){for(var u=-1,i=Yr(Zr((t-n)/(r||1)),0),o=Dn(i);i--;)o[e?i:++u]=n,n+=r;return o}function $u(n,t){var r='';if(!n||t<1||t>L)return r;do{t%2&&(r+=n),(t=qr(t/2))&&(n+=n)}while(t);return r}function Du(n,t){return Mo(Co(n,t,pc),n+'')}function Mu(n){return Ee(Ja(n))}function Fu(n,t){var r=Ja(n);return Po(r,Fe(t,0,r.length))}function Nu(n,r,e,u){if(!la(n))return n;for(var i=-1,o=(r=ai(r,n)).length,f=o-1,a=n;null!=a&&++iu?0:u+t),(r=r>u?u:r)<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=Dn(u);++e>>1,o=n[i];null!==o&&!ya(o)&&(r?o<=t:o=r){var l=t?null:qi(n);if(l)return mr(l);f=!1,i=ar,c=new Oe}else c=t?[]:a;n:for(;++u=u?n:Ku(n,r,e)}var si=Fr||function(n){return xt.clearTimeout(n)};function hi(n,t){if(t)return n.slice();var r=n.length,e=Er?Er(r):new n.constructor(r);return n.copy(e),e}function pi(n){var t=new n.constructor(n.byteLength);return new Rr(t).set(new Rr(n)),t}function vi(n,t){var r=t?pi(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function _i(n,t){var r=t?pi(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function gi(n,r){if(n!==r){var e=n!==t,u=null===n,i=n==n,o=ya(n),f=r!==t,a=null===r,c=r==r,l=ya(r);if(!a&&!l&&!o&&n>r||o&&f&&c&&!a&&!l||u&&f&&c||!e&&c||!i)return 1;if(!u&&!o&&!l&&n=f?a:a*('desc'==r[e]?-1:1)}return n.index-t.index}function yi(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,a=t.length,c=Yr(i-o,0),l=Dn(a+c),s=!e;++f1?e[i-1]:t,f=i>2?e[2]:t;for(o=n.length>3&&'function'==typeof o?(i--,o):t,f&&Ao(e[0],e[1],f)&&(o=i<3?t:o,i=1),r=tt(r);++u-1?i[o?r[f]:f]:t}}function Ci(n){return no(function(r){var e=r.length,u=e,i=me.prototype.thru;for(n&&r.reverse();u--;){var f=r[u];if('function'!=typeof f)throw new ot(o);if(i&&!a&&'wrapper'==uo(f))var a=new me([],!0)}for(u=a?u:e;++u1&&g.reverse(),s&&c<_&&(g.length=c),this&&this!==xt&&this instanceof t&&(A=y||Si(A)),A.apply(j,g)}}function Ui(n,t){return function(r,e){return pu(r,n,t(e),{})}}function Bi(n,r){return function(e,u){var i;if(e===t&&u===t)return r;if(e!==t&&(i=e),u!==t){if(i===t)return u;'string'==typeof e||'string'==typeof u?(e=Qu(e),u=Qu(u)):(e=Yu(e),u=Yu(u)),i=n(e,u)}return i}}function $i(n){return no(function(t){return t=Dt(t,or(oo())),Du(function(r){var e=this;return n(t,function(n){return St(n,e,r)})})})}function Di(n,r){var e=(r=r===t?' ':Qu(r)).length;if(e<2)return e?$u(r,n):r;var u=$u(r,Zr(n/zr(r)));return gr(r)?li(Or(u),0,n).join(''):u.slice(0,n)}function Mi(n,t,r,e){var u=t&_,i=Si(n);return function t(){for(var o=-1,f=arguments.length,a=-1,c=e.length,l=Dn(c+f),s=this&&this!==xt&&this instanceof t?i:n;++aa))return!1;var l=o.get(n),s=o.get(r);if(l&&s)return l==r&&s==n;var h=-1,_=!0,g=e&v?new Oe:t;for(o.set(n,r),o.set(r,n);++h1?'& ':'')+t[e],t=t.join(r>2?', ':' '),n.replace(Un,'{\n/* [wrapped with '+t+'] */\n')}function mo(n){return na(n)||Xf(n)||!!(Br&&n&&n[Br])}function jo(n,t){var r=typeof n;return!!(t=null==t?L:t)&&('number'==r||'symbol'!=r&&Vn.test(n))&&n>-1&&n%1==0&&n0){if(++r>=O)return arguments[0]}else r=0;return n.apply(t,arguments)}}function Po(n,r){var e=-1,u=n.length,i=u-1;for(r=r===t?u:r;++e1?n[r-1]:t;return _f(n,e='function'==typeof e?(n.pop(),e):t)});function mf(n){var t=xe(n);return t.__chain__=!0,t}function jf(n,t){return t(n)}var Af=no(function(n){var r=n.length,e=r?n[0]:0,u=this.__wrapped__,i=function(t){return Me(t,n)};return!(r>1||this.__actions__.length)&&u instanceof je&&jo(e)?((u=u.slice(e,+e+(r?1:0))).__actions__.push({func:jf,args:[i],thisArg:t}),new me(u,this.__chain__).thru(function(n){return r&&!n.length&&n.push(t),n})):this.thru(i)});var kf=Ai(function(n,t,r){yt.call(n,r)?++n[r]:De(n,r,1)});var zf=Wi(Qo),Of=Wi(Xo);function If(n,t){return(na(n)?Wt:Ve)(n,oo(t,3))}function Rf(n,t){return(na(n)?Ct:Ge)(n,oo(t,3))}var Ef=Ai(function(n,t,r){yt.call(n,r)?n[r].push(t):De(n,r,[t])});var Sf=Du(function(n,t,r){var e=-1,u='function'==typeof t,i=ra(n)?Dn(n.length):[];return Ve(n,function(n){i[++e]=u?St(t,n,r):vu(n,t,r)}),i}),Lf=Ai(function(n,t,r){De(n,r,t)});function Wf(n,t){return(na(n)?Dt:Au)(n,oo(t,3))}var Cf=Ai(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]});var Tf=Du(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Ao(n,t[0],t[1])?t=[]:r>2&&Ao(t[0],t[1],t[2])&&(t=[t[0]]),Eu(n,Xe(t,1),[])}),Uf=Nr||function(){return xt.Date.now()};function Bf(n,r,e){return r=e?t:r,r=n&&null==r?n.length:r,Vi(n,m,t,t,t,t,r)}function $f(n,r){var e;if('function'!=typeof r)throw new ot(o);return n=Aa(n),function(){return--n>0&&(e=r.apply(this,arguments)),n<=1&&(r=t),e}}var Df=Du(function(n,t,r){var e=_;if(r.length){var u=wr(r,io(Df));e|=b}return Vi(n,e,t,r,u)}),Mf=Du(function(n,t,r){var e=3;if(r.length){var u=wr(r,io(Mf));e|=b}return Vi(t,e,n,r,u)});function Ff(n,r,e){var u,i,f,a,c,l,s=0,h=!1,p=!1,v=!0;if('function'!=typeof n)throw new ot(o);function _(r){var e=u,o=i;return u=i=t,s=r,a=n.apply(o,e)}function g(n){return s=n,c=Do(x,r),h?_(n):a}function d(n){var t=r-(n-l);return p?Qr(t,f-(n-s)):t}function y(n){var e=n-l;return l===t||e>=r||e<0||p&&n-s>=f}function x(){var n=Uf();if(y(n))return b(n);c=Do(x,d(n))}function b(n){return c=t,v&&u?_(n):(u=i=t,a)}function w(){var n=Uf(),e=y(n);if(u=arguments,i=this,l=n,e){if(c===t)return g(l);if(p)return si(c),c=Do(x,r),_(l)}return c===t&&(c=Do(x,r)),a}return r=za(r)||0,la(e)&&(h=!!e.leading,f=(p='maxWait'in e)?Yr(za(e.maxWait)||0,r):f,v='trailing'in e?!!e.trailing:v),w.cancel=function(){c!==t&&si(c),s=0,u=l=i=c=t},w.flush=function(){return c===t?a:b(Uf())},w}var Nf=Du(function(n,t){return qe(n,1,t)}),Pf=Du(function(n,t,r){return qe(n,za(t)||0,r)});function Zf(n,t){if('function'!=typeof n||null!=t&&'function'!=typeof t)throw new ot(o);var r=function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Zf.Cache||ze),r}function qf(n){if('function'!=typeof n)throw new ot(o);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}Zf.Cache=ze;var Kf=ci(function(n,t){var r=(t=1==t.length&&na(t[0])?Dt(t[0],or(oo())):Dt(Xe(t,1),or(oo()))).length;return Du(function(e){for(var u=-1,i=Qr(e.length,r);++u=t}),Xf=_u((function(){return arguments})())?_u:function(n){return sa(n)&&yt.call(n,'callee')&&!Tr.call(n,'callee')},na=Dn.isArray,ta=kt?or(kt):function(n){return sa(n)&&fu(n)==fn};function ra(n){return null!=n&&ca(n.length)&&!fa(n)}function ea(n){return sa(n)&&ra(n)}var ua=Vr||zc,ia=zt?or(zt):function(n){return sa(n)&&fu(n)==P};function oa(n){if(!sa(n))return!1;var t=fu(n);return t==q||t==Z||'string'==typeof n.message&&'string'==typeof n.name&&!va(n)}function fa(n){if(!la(n))return!1;var t=fu(n);return t==K||t==V||t==F||t==Q}function aa(n){return'number'==typeof n&&n==Aa(n)}function ca(n){return'number'==typeof n&&n>-1&&n%1==0&&n<=L}function la(n){var t=typeof n;return null!=n&&('object'==t||'function'==t)}function sa(n){return null!=n&&'object'==typeof n}var ha=Ot?or(Ot):function(n){return sa(n)&&po(n)==G};function pa(n){return'number'==typeof n||sa(n)&&fu(n)==H}function va(n){if(!sa(n)||fu(n)!=Y)return!1;var t=Wr(n);if(null===t)return!0;var r=yt.call(t,'constructor')&&t.constructor;return'function'==typeof r&&r instanceof r&&dt.call(r)==At}var _a=It?or(It):function(n){return sa(n)&&fu(n)==X};var ga=Rt?or(Rt):function(n){return sa(n)&&po(n)==nn};function da(n){return'string'==typeof n||!na(n)&&sa(n)&&fu(n)==tn}function ya(n){return'symbol'==typeof n||sa(n)&&fu(n)==rn}var xa=Et?or(Et):function(n){return sa(n)&&ca(n.length)&&!!ht[fu(n)]};var ba=Ni(ju),wa=Ni(function(n,t){return n<=t});function ma(n){if(!n)return[];if(ra(n))return da(n)?Or(n):bi(n);if($r&&n[$r])return yr(n[$r]());var t=po(n);return(t==G?xr:t==nn?mr:Ja)(n)}function ja(n){return n?(n=za(n))===S||n===-1/0?(n<0?-1:1)*W:n==n?n:0:0===n?n:0}function Aa(n){var t=ja(n),r=t%1;return t==t?r?t-r:t:0}function ka(n){return n?Fe(Aa(n),0,T):0}function za(n){if('number'==typeof n)return n;if(ya(n))return C;if(la(n)){var t='function'==typeof n.valueOf?n.valueOf():n;n=la(t)?t+'':t}if('string'!=typeof n)return 0===n?n:+n;n=n.replace(Wn,'');var r=Zn.test(n);return r||Kn.test(n)?gt(n.slice(2),r?2:8):Pn.test(n)?C:+n}function Oa(n){return wi(n,Na(n))}function Ia(n){return null==n?'':Qu(n)}var Ra=ki(function(n,t){if(Io(t)||ra(t))wi(t,Fa(t),n);else for(var r in t)yt.call(t,r)&&Ce(n,r,t[r])}),Ea=ki(function(n,t){wi(t,Na(t),n)}),Sa=ki(function(n,t,r,e){wi(t,Na(t),n,e)}),La=ki(function(n,t,r,e){wi(t,Fa(t),n,e)}),Wa=no(Me);var Ca=Du(function(n,r){n=tt(n);var e=-1,u=r.length,i=u>2?r[2]:t;for(i&&Ao(r[0],r[1],i)&&(u=1);++e1),t}),wi(n,ro(n),r),e&&(r=Ne(r,7,Ji));for(var u=t.length;u--;)ni(r,t[u]);return r});var Ka=no(function(n,t){return null==n?{}:Su(n,t)});function Va(n,t){if(null==n)return{};var r=Dt(ro(n),function(n){return[n]});return t=oo(t),Lu(n,r,function(n,r){return t(n,r[0])})}var Ga=Ki(Fa),Ha=Ki(Na);function Ja(n){return null==n?[]:fr(n,Fa(n))}var Ya=Ei(function(n,t,r){return t=t.toLowerCase(),n+(r?Qa(t):t)});function Qa(n){return oc(Ia(n).toLowerCase())}function Xa(n){return(n=Ia(n))&&n.replace(Gn,hr).replace(it,'')}var nc=Ei(function(n,t,r){return n+(r?'-':'')+t.toLowerCase()}),tc=Ei(function(n,t,r){return n+(r?' ':'')+t.toLowerCase()}),rc=Ri('toLowerCase');var ec=Ei(function(n,t,r){return n+(r?'_':'')+t.toLowerCase()});var uc=Ei(function(n,t,r){return n+(r?' ':'')+oc(t)});var ic=Ei(function(n,t,r){return n+(r?' ':'')+t.toUpperCase()}),oc=Ri('toUpperCase');function fc(n,r,e){return n=Ia(n),(r=e?t:r)===t?dr(n)?Sr(n):Kt(n):n.match(r)||[]}var ac=Du(function(n,r){try{return St(n,t,r)}catch(n){return oa(n)?n:new Qn(n)}}),cc=no(function(n,t){return Wt(t,function(t){t=qo(t),De(n,t,Df(n[t],n))}),n});function lc(n){return function(){return n}}var sc=Ci(),hc=Ci(!0);function pc(n){return n}function vc(n){return bu('function'==typeof n?n:Ne(n,l))}var _c=Du(function(n,t){return function(r){return vu(r,n,t)}}),gc=Du(function(n,t){return function(r){return vu(n,r,t)}});function dc(n,t,r){var e=Fa(t),u=uu(t,e);null!=r||la(t)&&(u.length||!e.length)||(r=t,t=n,n=this,u=uu(t,Fa(t)));var i=!(la(r)&&'chain'in r&&!r.chain),o=fa(n);return Wt(u,function(r){var e=t[r];n[r]=e,o&&(n.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=n(this.__wrapped__);return(r.__actions__=bi(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,Mt([this.value()],arguments))})}),n}function yc(){}var xc=$i(Dt),bc=$i(Tt),wc=$i(Pt);function mc(n){return ko(n)?Xt(qo(n)):Wu(n)}var jc=Fi(),Ac=Fi(!0);function kc(){return[]}function zc(){return!1}var Oc=Bi(function(n,t){return n+t},0),Ic=Zi('ceil'),Rc=Bi(function(n,t){return n/t},1),Ec=Zi('floor');var Sc,Lc=Bi(function(n,t){return n*t},1),Wc=Zi('round'),Cc=Bi(function(n,t){return n-t},0);return xe.after=function(n,t){if('function'!=typeof t)throw new ot(o);return n=Aa(n),function(){if(--n<1)return t.apply(this,arguments)}},xe.ary=Bf,xe.assign=Ra,xe.assignIn=Ea,xe.assignInWith=Sa,xe.assignWith=La,xe.at=Wa,xe.before=$f,xe.bind=Df,xe.bindAll=cc,xe.bindKey=Mf,xe.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return na(n)?n:[n]},xe.chain=mf,xe.chunk=function(n,r,e){r=(e?Ao(n,r,e):r===t)?1:Yr(Aa(r),0);var u=null==n?0:n.length;if(!u||r<1)return[];for(var i=0,o=0,f=Dn(Zr(u/r));i>>0)?(n=Ia(n))&&('string'==typeof r||null!=r&&!_a(r))&&!(r=Qu(r))&&gr(n)?li(Or(n),0,e):n.split(r,e):[]},xe.spread=function(n,t){if('function'!=typeof n)throw new ot(o);return t=null==t?0:Yr(Aa(t),0),Du(function(r){var e=r[t],u=li(r,0,t);return e&&Mt(u,e),St(n,this,u)})},xe.tail=function(n){var t=null==n?0:n.length;return t?Ku(n,1,t):[]},xe.take=function(n,r,e){return n&&n.length?Ku(n,0,(r=e||r===t?1:Aa(r))<0?0:r):[]},xe.takeRight=function(n,r,e){var u=null==n?0:n.length;return u?Ku(n,(r=u-(r=e||r===t?1:Aa(r)))<0?0:r,u):[]},xe.takeRightWhile=function(n,t){return n&&n.length?ri(n,oo(t,3),!1,!0):[]},xe.takeWhile=function(n,t){return n&&n.length?ri(n,oo(t,3)):[]},xe.tap=function(n,t){return t(n),n},xe.throttle=function(n,t,r){var e=!0,u=!0;if('function'!=typeof n)throw new ot(o);return la(r)&&(e='leading'in r?!!r.leading:e,u='trailing'in r?!!r.trailing:u),Ff(n,t,{leading:e,maxWait:t,trailing:u})},xe.thru=jf,xe.toArray=ma,xe.toPairs=Ga,xe.toPairsIn=Ha,xe.toPath=function(n){return na(n)?Dt(n,qo):ya(n)?[n]:bi(Zo(Ia(n)))},xe.toPlainObject=Oa,xe.transform=function(n,t,r){var e=na(n),u=e||ua(n)||xa(n);if(t=oo(t,4),null==r){var i=n&&n.constructor;r=u?e?new i:[]:la(n)&&fa(i)?be(Wr(n)):{}}return(u?Wt:ru)(n,function(n,e,u){return t(r,n,e,u)}),r},xe.unary=function(n){return Bf(n,1)},xe.union=sf,xe.unionBy=hf,xe.unionWith=pf,xe.uniq=function(n){return n&&n.length?Xu(n):[]},xe.uniqBy=function(n,t){return n&&n.length?Xu(n,oo(t,2)):[]},xe.uniqWith=function(n,r){return r='function'==typeof r?r:t,n&&n.length?Xu(n,t,r):[]},xe.unset=function(n,t){return null==n||ni(n,t)},xe.unzip=vf,xe.unzipWith=_f,xe.update=function(n,t,r){return null==n?n:ti(n,t,fi(r))},xe.updateWith=function(n,r,e,u){return u='function'==typeof u?u:t,null==n?n:ti(n,r,fi(e),u)},xe.values=Ja,xe.valuesIn=function(n){return null==n?[]:fr(n,Na(n))},xe.without=gf,xe.words=fc,xe.wrap=function(n,t){return Vf(fi(t),n)},xe.xor=df,xe.xorBy=yf,xe.xorWith=xf,xe.zip=bf,xe.zipObject=function(n,t){return ii(n||[],t||[],Ce)},xe.zipObjectDeep=function(n,t){return ii(n||[],t||[],Nu)},xe.zipWith=wf,xe.entries=Ga,xe.entriesIn=Ha,xe.extend=Ea,xe.extendWith=Sa,dc(xe,xe),xe.add=Oc,xe.attempt=ac,xe.camelCase=Ya,xe.capitalize=Qa,xe.ceil=Ic,xe.clamp=function(n,r,e){return e===t&&(e=r,r=t),e!==t&&(e=(e=za(e))==e?e:0),r!==t&&(r=(r=za(r))==r?r:0),Fe(za(n),r,e)},xe.clone=function(n){return Ne(n,h)},xe.cloneDeep=function(n){return Ne(n,5)},xe.cloneDeepWith=function(n,r){return Ne(n,5,r='function'==typeof r?r:t)},xe.cloneWith=function(n,r){return Ne(n,h,r='function'==typeof r?r:t)},xe.conformsTo=function(n,t){return null==t||Ze(n,t,Fa(t))},xe.deburr=Xa,xe.defaultTo=function(n,t){return null==n||n!=n?t:n},xe.divide=Rc,xe.endsWith=function(n,r,e){n=Ia(n),r=Qu(r);var u=n.length,i=e=e===t?u:Fe(Aa(e),0,u);return(e-=r.length)>=0&&n.slice(e,i)==r},xe.eq=Jf,xe.escape=function(n){return(n=Ia(n))&&An.test(n)?n.replace(mn,pr):n},xe.escapeRegExp=function(n){return(n=Ia(n))&&Ln.test(n)?n.replace(Sn,'\\$&'):n},xe.every=function(n,r,e){var u=na(n)?Tt:He;return e&&Ao(n,r,e)&&(r=t),u(n,oo(r,3))},xe.find=zf,xe.findIndex=Qo,xe.findKey=function(n,t){return Vt(n,oo(t,3),ru)},xe.findLast=Of,xe.findLastIndex=Xo,xe.findLastKey=function(n,t){return Vt(n,oo(t,3),eu)},xe.floor=Ec,xe.forEach=If,xe.forEachRight=Rf,xe.forIn=function(n,t){return null==n?n:nu(n,oo(t,3),Na)},xe.forInRight=function(n,t){return null==n?n:tu(n,oo(t,3),Na)},xe.forOwn=function(n,t){return n&&ru(n,oo(t,3))},xe.forOwnRight=function(n,t){return n&&eu(n,oo(t,3))},xe.get=Ua,xe.gt=Yf,xe.gte=Qf,xe.has=function(n,t){return null!=n&&go(n,t,cu)},xe.hasIn=Ba,xe.head=tf,xe.identity=pc,xe.includes=function(n,t,r,e){n=ra(n)?n:Ja(n),r=r&&!e?Aa(r):0;var u=n.length;return r<0&&(r=Yr(u+r,0)),da(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&Ht(n,t,r)>-1},xe.indexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:Aa(r);return u<0&&(u=Yr(e+u,0)),Ht(n,t,u)},xe.inRange=function(n,r,e){return r=ja(r),e===t?(e=r,r=0):e=ja(e),su(n=za(n),r,e)},xe.invoke=Ma,xe.isArguments=Xf,xe.isArray=na,xe.isArrayBuffer=ta,xe.isArrayLike=ra,xe.isArrayLikeObject=ea,xe.isBoolean=function(n){return!0===n||!1===n||sa(n)&&fu(n)==N},xe.isBuffer=ua,xe.isDate=ia,xe.isElement=function(n){return sa(n)&&1===n.nodeType&&!va(n)},xe.isEmpty=function(n){if(null==n)return!0;if(ra(n)&&(na(n)||'string'==typeof n||'function'==typeof n.splice||ua(n)||xa(n)||Xf(n)))return!n.length;var t=po(n);if(t==G||t==nn)return!n.size;if(Io(n))return!wu(n).length;for(var r in n)if(yt.call(n,r))return!1;return!0},xe.isEqual=function(n,t){return gu(n,t)},xe.isEqualWith=function(n,r,e){var u=(e='function'==typeof e?e:t)?e(n,r):t;return u===t?gu(n,r,t,e):!!u},xe.isError=oa,xe.isFinite=function(n){return'number'==typeof n&&Gr(n)},xe.isFunction=fa,xe.isInteger=aa,xe.isLength=ca,xe.isMap=ha,xe.isMatch=function(n,t){return n===t||yu(n,t,ao(t))},xe.isMatchWith=function(n,r,e){return e='function'==typeof e?e:t,yu(n,r,ao(r),e)},xe.isNaN=function(n){return pa(n)&&n!=+n},xe.isNative=function(n){if(Oo(n))throw new Qn(e);return xu(n)},xe.isNil=function(n){return null==n},xe.isNull=function(n){return null===n},xe.isNumber=pa,xe.isObject=la,xe.isObjectLike=sa,xe.isPlainObject=va,xe.isRegExp=_a,xe.isSafeInteger=function(n){return aa(n)&&n>=-9007199254740991&&n<=L},xe.isSet=ga,xe.isString=da,xe.isSymbol=ya,xe.isTypedArray=xa,xe.isUndefined=function(n){return n===t},xe.isWeakMap=function(n){return sa(n)&&po(n)==un},xe.isWeakSet=function(n){return sa(n)&&fu(n)==on},xe.join=function(n,t){return null==n?'':Hr.call(n,t)},xe.kebabCase=nc,xe.last=of,xe.lastIndexOf=function(n,r,e){var u=null==n?0:n.length;if(!u)return-1;var i=u;return e!==t&&(i=(i=Aa(e))<0?Yr(u+i,0):Qr(i,u-1)),r==r?kr(n,r,i):Gt(n,Yt,i,!0)},xe.lowerCase=tc,xe.lowerFirst=rc,xe.lt=ba,xe.lte=wa,xe.max=function(n){return n&&n.length?Je(n,pc,au):t},xe.maxBy=function(n,r){return n&&n.length?Je(n,oo(r,2),au):t},xe.mean=function(n){return Qt(n,pc)},xe.meanBy=function(n,t){return Qt(n,oo(t,2))},xe.min=function(n){return n&&n.length?Je(n,pc,ju):t},xe.minBy=function(n,r){return n&&n.length?Je(n,oo(r,2),ju):t},xe.stubArray=kc,xe.stubFalse=zc,xe.stubObject=function(){return{}},xe.stubString=function(){return''},xe.stubTrue=function(){return!0},xe.multiply=Lc,xe.nth=function(n,r){return n&&n.length?Ru(n,Aa(r)):t},xe.noConflict=function(){return xt._===this&&(xt._=Zt),this},xe.noop=yc,xe.now=Uf,xe.pad=function(n,t,r){n=Ia(n);var e=(t=Aa(t))?zr(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return Di(qr(u),r)+n+Di(Zr(u),r)},xe.padEnd=function(n,t,r){n=Ia(n);var e=(t=Aa(t))?zr(n):0;return t&&er){var u=n;n=r,r=u}if(e||n%1||r%1){var i=te();return Qr(n+i*(r-n+_t('1e-'+((i+'').length-1))),r)}return Uu(n,r)},xe.reduce=function(n,t,r){var e=na(n)?Ft:tr,u=arguments.length<3;return e(n,oo(t,4),r,u,Ve)},xe.reduceRight=function(n,t,r){var e=na(n)?Nt:tr,u=arguments.length<3;return e(n,oo(t,4),r,u,Ge)},xe.repeat=function(n,r,e){return r=(e?Ao(n,r,e):r===t)?1:Aa(r),$u(Ia(n),r)},xe.replace=function(){var n=arguments,t=Ia(n[0]);return n.length<3?t:t.replace(n[1],n[2])},xe.result=function(n,r,e){var u=-1,i=(r=ai(r,n)).length;for(i||(i=1,n=t);++uL)return[];var r=T,e=Qr(n,T);t=oo(t),n-=T;for(var u=ur(e,t);++r=o)return n;var a=e-zr(u);if(a<1)return u;var c=f?li(f,0,a).join(''):n.slice(0,a);if(i===t)return c+u;if(f&&(a+=c.length-a),_a(i)){if(n.slice(a).search(i)){var l,s=c;for(i.global||(i=rt(i.source,Ia(Nn.exec(i))+'g')),i.lastIndex=0;l=i.exec(s);)var h=l.index;c=c.slice(0,h===t?a:h)}}else if(n.indexOf(Qu(i),a)!=a){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+u},xe.unescape=function(n){return(n=Ia(n))&&jn.test(n)?n.replace(wn,Ir):n},xe.uniqueId=function(n){var t=++bt;return Ia(n)+t},xe.upperCase=ic,xe.upperFirst=oc,xe.each=If,xe.eachRight=Rf,xe.first=tf,dc(xe,(Sc={},ru(xe,function(n,t){yt.call(xe.prototype,t)||(Sc[t]=n)}),Sc),{chain:!1}),xe.VERSION="4.17.19",Wt(['bind','bindKey','curry','curryRight','partial','partialRight'],function(n){xe[n].placeholder=xe}),Wt(['drop','take'],function(n,r){je.prototype[n]=function(e){e=e===t?1:Yr(Aa(e),0);var u=this.__filtered__&&!r?new je(this):this.clone();return u.__filtered__?u.__takeCount__=Qr(e,u.__takeCount__):u.__views__.push({size:Qr(e,T),type:n+(u.__dir__<0?'Right':'')}),u},je.prototype[n+'Right']=function(t){return this.reverse()[n](t).reverse()}}),Wt(['filter','map','takeWhile'],function(n,t){var r=t+1,e=r==R||3==r;je.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:oo(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),Wt(['head','last'],function(n,t){var r='take'+(t?'Right':'');je.prototype[n]=function(){return this[r](1).value()[0]}}),Wt(['initial','tail'],function(n,t){var r='drop'+(t?'':'Right');je.prototype[n]=function(){return this.__filtered__?new je(this):this[r](1)}}),je.prototype.compact=function(){return this.filter(pc)},je.prototype.find=function(n){return this.filter(n).head()},je.prototype.findLast=function(n){return this.reverse().find(n)},je.prototype.invokeMap=Du(function(n,t){return'function'==typeof n?new je(this):this.map(function(r){return vu(r,n,t)})}),je.prototype.reject=function(n){return this.filter(qf(oo(n)))},je.prototype.slice=function(n,r){n=Aa(n);var e=this;return e.__filtered__&&(n>0||r<0)?new je(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),r!==t&&(e=(r=Aa(r))<0?e.dropRight(-r):e.take(r-n)),e)},je.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},je.prototype.toArray=function(){return this.take(T)},ru(je.prototype,function(n,r){var e=/^(?:filter|find|map|reject)|While$/.test(r),u=/^(?:head|last)$/.test(r),i=xe[u?'take'+('last'==r?'Right':''):r],o=u||/^find/.test(r);i&&(xe.prototype[r]=function(){var r=this.__wrapped__,f=u?[1]:arguments,a=r instanceof je,c=f[0],l=a||na(r),s=function(n){var t=i.apply(xe,Mt([n],f));return u&&h?t[0]:t};l&&e&&'function'==typeof c&&1!=c.length&&(a=l=!1);var h=this.__chain__,p=!!this.__actions__.length,v=o&&!h,_=a&&!p;if(!o&&l){r=_?r:new je(this);var g=n.apply(r,f);return g.__actions__.push({func:jf,args:[s],thisArg:t}),new me(g,h)}return v&&_?n.apply(this,f):(g=this.thru(s),v?u?g.value()[0]:g.value():g)})}),Wt(['pop','push','shift','sort','splice','unshift'],function(n){var t=ft[n],r=/^(?:push|sort|unshift)$/.test(n)?'tap':'thru',e=/^(?:pop|shift)$/.test(n);xe.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(na(u)?u:[],n)}return this[r](function(r){return t.apply(na(r)?r:[],n)})}}),ru(je.prototype,function(n,t){var r=xe[t];if(r){var e=r.name+'';yt.call(le,e)||(le[e]=[]),le[e].push({name:t,func:r})}}),le[Ti(t,g).name]=[{name:'wrapper',func:t}],je.prototype.clone=function(){var n=new je(this.__wrapped__);return n.__actions__=bi(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=bi(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=bi(this.__views__),n},je.prototype.reverse=function(){if(this.__filtered__){var n=new je(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},je.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,r=na(n),e=t<0,u=r?n.length:0,i=vo(0,u,this.__views__),o=i.start,f=i.end,a=f-o,c=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Qr(a,this.__takeCount__);if(!r||!e&&u==a&&p==a)return ei(n,this.__actions__);var v=[];n:for(;a--&&h=this.__values__.length;return{done:n,value:n?t:this.__values__[this.__index__++]}},xe.prototype.plant=function(n){for(var r,e=this;e instanceof we;){var u=Go(e);u.__index__=0,u.__values__=t,r?i.__wrapped__=u:r=u;var i=u;e=e.__wrapped__}return i.__wrapped__=n,r},xe.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof je){var r=n;return this.__actions__.length&&(r=new je(this)),(r=r.reverse()).__actions__.push({func:jf,args:[lf],thisArg:t}),new me(r,this.__chain__)}return this.thru(lf)},xe.prototype.toJSON=xe.prototype.valueOf=xe.prototype.value=function(){return ei(this.__wrapped__,this.__actions__)},xe.prototype.first=xe.prototype.head,$r&&(xe.prototype[$r]=function(){return this}),xe})();'function'==typeof define&&'object'==typeof define.amd&&define.amd?(xt._=Lr,define(function(){return Lr})):wt?((wt.exports=Lr)._=Lr,bt._=Lr):xt._=Lr}).call(this)},445,[]); __d(function(g,r,i,a,m,e,d){"use strict";var t=r(d[0]);e.__esModule=!0;var u=t(r(d[1]));e.Provider=u.default;var c=t(r(d[2]));e.connectAdvanced=c.default;var s=r(d[3]);e.ReactReduxContext=s.ReactReduxContext;var l=t(r(d[4]));e.connect=l.default;var o=r(d[5]);e.useDispatch=o.useDispatch;var v=r(d[6]);e.useSelector=v.useSelector;var n=r(d[7]);e.useStore=n.useStore;var h=r(d[8]),_=r(d[9]);e.batch=_.unstable_batchedUpdates;var b=t(r(d[10]));e.shallowEqual=b.default,(0,h.setBatch)(_.unstable_batchedUpdates)},446,[3,447,455,452,462,476,479,477,454,480,463]); __d(function(g,r,i,a,m,e,d){"use strict";var t=r(d[0]),s=r(d[1]);e.__esModule=!0,e.default=void 0;var n=s(r(d[2])),o=s(r(d[3])),u=t(r(d[4])),c=s(r(d[5])),b=r(d[6]),p=s(r(d[7])),f=(function(t){function s(s){var o;o=t.call(this,s)||this;var u=s.store;o.notifySubscribers=o.notifySubscribers.bind((0,n.default)(o));var c=new p.default(u);return c.onStateChange=o.notifySubscribers,o.state={store:u,subscription:c},o.previousState=u.getState(),o}(0,o.default)(s,t);var c=s.prototype;return c.componentDidMount=function(){this._isMounted=!0,this.state.subscription.trySubscribe(),this.previousState!==this.props.store.getState()&&this.state.subscription.notifyNestedSubs()},c.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe(),this.state.subscription.tryUnsubscribe(),this._isMounted=!1},c.componentDidUpdate=function(t){if(this.props.store!==t.store){this.state.subscription.tryUnsubscribe();var s=new p.default(this.props.store);s.onStateChange=this.notifySubscribers,this.setState({store:this.props.store,subscription:s})}},c.notifySubscribers=function(){this.state.subscription.notifyNestedSubs()},c.render=function(){var t=this.props.context||b.ReactReduxContext;return u.default.createElement(t.Provider,{value:this.state},this.props.children)},s})(u.Component);f.propTypes={store:c.default.shape({subscribe:c.default.func.isRequired,dispatch:c.default.func.isRequired,getState:c.default.func.isRequired}),context:c.default.object,children:c.default.any};var h=f;e.default=h},447,[2,3,8,448,59,449,452,453]); __d(function(g,r,i,a,m,e,d){m.exports=function(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,t.__proto__=o}},448,[]); __d(function(g,r,i,a,m,e,d){m.exports=r(d[0])()},449,[450]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]);function t(){}function o(){}o.resetWarningCache=t,m.exports=function(){function p(t,o,p,c,s,y){if(y!==n){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name='Invariant Violation',f}}function c(){return p}p.isRequired=p;var s={array:p,bool:p,func:p,number:p,object:p,string:p,symbol:p,any:p,arrayOf:c,element:p,elementType:p,instanceOf:c,node:p,objectOf:c,oneOf:c,oneOfType:c,shape:c,exact:c,checkPropTypes:o,resetWarningCache:t};return s.PropTypes=s,s}},450,[451]); __d(function(g,r,i,a,m,e,d){'use strict';m.exports='SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'},451,[]); __d(function(g,r,i,a,m,e,d){"use strict";var t=r(d[0]);e.__esModule=!0,e.default=e.ReactReduxContext=void 0;var u=t(r(d[1])).default.createContext(null);e.ReactReduxContext=u;var l=u;e.default=l},452,[3,59]); __d(function(g,r,i,a,m,e,d){"use strict";e.__esModule=!0,e.default=void 0;var t=r(d[0]),n=null,s={notify:function(){}};var u=(function(){function u(t,n){this.store=t,this.parentSub=n,this.unsubscribe=null,this.listeners=s,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var h=u.prototype;return h.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},h.notifyNestedSubs=function(){this.listeners.notify()},h.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},h.isSubscribed=function(){return Boolean(this.unsubscribe)},h.trySubscribe=function(){var s,u,h;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=(s=(0,t.getBatch)(),u=[],h=[],{clear:function(){h=n,u=n},notify:function(){var t=u=h;s(function(){for(var n=0;n. You may also pass a {context : MyContext} option to connect");var L=j;return function(n){var v=n.displayName||n.name||'Component',x=N(v),M=(0,o.default)({},k,{getDisplayName:N,methodName:P,renderCountProp:E,shouldHandleStateChanges:T,storeKey:K,displayName:x,wrappedComponentName:v,WrappedComponent:n}),b=k.pure;function S(n){return t(n.dispatch,M)}var D=b?f.useMemo:function(t){return t()};function _(t){var c=(0,f.useMemo)(function(){var n=t.forwardedRef,o=(0,u.default)(t,["forwardedRef"]);return[t.context,n,o]},[t]),v=c[0],M=c[1],N=c[2],b=(0,f.useMemo)(function(){return v&&v.Consumer&&(0,l.isContextConsumer)(f.default.createElement(v.Consumer,null))?v:L},[v,L]),P=(0,f.useContext)(b),E=Boolean(t.store),_=Boolean(P)&&Boolean(P.store);(0,s.default)(E||_,"Could not find \"store\" in the context of \""+x+"\". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to "+x+" in connect options.");var K=t.store||P.store,A=(0,f.useMemo)(function(){return S(K)},[K]),B=(0,f.useMemo)(function(){if(!T)return C;var t=new p.default(K,E?null:P.subscription),n=t.notifyNestedSubs.bind(t);return[t,n]},[K,E,P]),H=B[0],W=B[1],U=(0,f.useMemo)(function(){return E?P:(0,o.default)({},P,{subscription:H})},[E,P,H]),j=(0,f.useReducer)(y,h,R),k=j[0],O=k[0],Y=j[1];if(O&&O.error)throw O.error;var q=(0,f.useRef)(),z=(0,f.useRef)(N),F=(0,f.useRef)(),G=(0,f.useRef)(!1),I=D(function(){return F.current&&N===z.current?F.current:A(K.getState(),N)},[K,O,N]);w(function(){z.current=N,q.current=I,G.current=!1,F.current&&(F.current=null,W())}),w(function(){if(T){var t=!1,n=null,o=function(){if(!t){var o,u,c=K.getState();try{o=A(c,z.current)}catch(t){u=t,n=t}u||(n=null),o===q.current?G.current||W():(q.current=o,F.current=o,G.current=!0,Y({type:'STORE_UPDATED',payload:{latestStoreState:c,error:u}}))}};H.onStateChange=o,H.trySubscribe(),o();return function(){if(t=!0,H.tryUnsubscribe(),n)throw n}}},[K,H,A]);var J=(0,f.useMemo)(function(){return f.default.createElement(n,(0,o.default)({},I,{ref:M}))},[M,n,I]),Q=(0,f.useMemo)(function(){return T?f.default.createElement(b.Provider,{value:U},J):J},[b,J,U]);return Q}var A=b?f.default.memo(_):_;if(A.WrappedComponent=n,A.displayName=x,W){var B=f.default.forwardRef(function(t,n){return f.default.createElement(A,(0,o.default)({},t,{forwardedRef:n}))});return B.displayName=x,B.WrappedComponent=n,(0,c.default)(B,n)}return(0,c.default)(A,n)}};var o=n(r(d[2])),u=n(r(d[3])),c=n(r(d[4])),s=n(r(d[5])),f=t(r(d[6])),l=r(d[7]),p=n(r(d[8])),v=r(d[9]),h=[],C=[null,null];function y(t,n){var o=t[1];return[n.payload,o+1]}var R=function(){return[null,0]},w='undefined'!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?f.useLayoutEffect:f.useEffect},455,[2,3,24,56,456,459,59,460,453,452]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},p={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},y={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},n={};function s(p){return t.isMemo(p)?y:n[p.$$typeof]||o}n[t.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var c=Object.defineProperty,f=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,O=Object.getPrototypeOf,P=Object.prototype;m.exports=function t(o,y,n){if('string'!=typeof y){if(P){var v=O(y);v&&v!==P&&t(o,v,n)}var b=f(y);l&&(b=b.concat(l(y)));for(var j=s(o),T=s(y),$=0;$=0;u--){var p=o[u](t);if(p)return p}return function(o,u){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+u.wrappedComponentName+".")}}function P(t,o){return t===o}function E(t){var E=void 0===t?{}:t,q=E.connectHOC,S=void 0===q?u.default:q,h=E.mapStateToPropsFactories,w=void 0===h?l.default:h,M=E.mapDispatchToPropsFactories,T=void 0===M?s.default:M,C=E.mergePropsFactories,y=void 0===C?c.default:C,D=E.selectorFactory,F=void 0===D?f.default:D;return function(t,u,s,l){void 0===l&&(l={});var c=l,f=c.pure,E=void 0===f||f,q=c.areStatesEqual,h=void 0===q?P:q,M=c.areOwnPropsEqual,C=void 0===M?p.default:M,D=c.areStatePropsEqual,O=void 0===D?p.default:D,_=c.areMergedPropsEqual,N=void 0===_?p.default:_,H=(0,n.default)(c,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),B=v(t,w,'mapStateToProps'),I=v(u,T,'mapDispatchToProps'),b=v(s,y,'mergeProps');return S(F,(0,o.default)({methodName:'connect',getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:B,initMapDispatchToProps:I,initMergeProps:b,pure:E,areStatesEqual:h,areOwnPropsEqual:C,areStatePropsEqual:O,areMergedPropsEqual:N},H))}}var q=E();e.default=q},462,[3,24,56,455,463,464,472,473,474]); __d(function(g,r,i,a,m,e,d){"use strict";e.__esModule=!0,e.default=function(u,o){if(n(u,o))return!0;if('object'!=typeof u||null===u||'object'!=typeof o||null===o)return!1;var f=Object.keys(u),l=Object.keys(o);if(f.length!==l.length)return!1;for(var c=0;c'),t};var n=r(d[1]),u=t(r(d[2])),o=r(d[3])},478,[3,59,459,452]); __d(function(g,r,i,a,m,e,d){"use strict";var t=r(d[0]);e.__esModule=!0,e.useSelector=function(t,l){void 0===l&&(l=f);(0,u.default)(t,"You must pass a selector to useSelectors");var h,v=(0,c.useReduxContext)(),w=v.store,y=v.subscription,b=(0,n.useReducer)(function(t){return t+1},0)[1],S=(0,n.useMemo)(function(){return new o.default(w,y)},[w,y]),R=(0,n.useRef)(),p=(0,n.useRef)(),_=(0,n.useRef)();try{h=t!==p.current||R.current?t(w.getState()):_.current}catch(t){var E="An error occured while selecting the store state: "+t.message+".";throw R.current&&(E+="\nThe error may be correlated with this previous error:\n"+R.current.stack+"\n\nOriginal stack trace:"),new Error(E)}return s(function(){p.current=t,_.current=h,R.current=void 0}),s(function(){function t(){try{var t=p.current(w.getState());if(l(t,_.current))return;_.current=t}catch(t){R.current=t}b({})}return S.onStateChange=t,S.trySubscribe(),t(),function(){return S.tryUnsubscribe()}},[w,S]),h};var n=r(d[1]),u=t(r(d[2])),c=r(d[3]),o=t(r(d[4])),s='undefined'!=typeof window?n.useLayoutEffect:n.useEffect,f=function(t,n){return t===n}},479,[3,59,459,478,453]); __d(function(g,r,i,a,m,e,d){"use strict";e.__esModule=!0;var t=r(d[0]);e.unstable_batchedUpdates=t.unstable_batchedUpdates},480,[15]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(d[1])),l=t(r(d[2])),u=t(r(d[3])),f=r(d[4]),o=new((function(){function t(){(0,l.default)(this,t),this._elements=[]}return(0,u.default)(t,[{key:"applyMiddleware",value:function(){for(var t=arguments.length,l=new Array(t),u=0;u "+u),this._checksum=u}}},{key:"register",value:function(t){var s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],u=arguments.length>2?arguments[2]:void 0;this._elements[t]=s,this._defaultStates[t]=u}},{key:"_calculateChecksum",value:function(t){try{return c.default.hex(JSON.stringify(t)||'')}catch(t){return o.default.error('Error calculating checksum for state',t),''}}},{key:"_getFilteredState",value:function(t){for(var s={},u=Object.keys(this._elements),l=0;l1&&void 0!==arguments[1]?arguments[1]:{},v=t.avatarID,f=t.email,l=t.id,s=n.urlPrefix,c=void 0===s?'https://abotars.jitsi.net/meeple/':s,h=n.urlSuffix,w=void 0===h?'':h;return u(f)||o(v||l,c,w)},e.getGravatarURL=u;var n=t(r(d[1]));function o(t,o,u){return o+n.default.hex(t.trim().toLowerCase())+u}function u(t){var o;return"https://www.gravatar.com/avatar/"+((o=t)&&o.indexOf('@')>0?n.default.hex(t.trim().toLowerCase()):t)+'?d=404&size=200'}},484,[3,485]); __d(function(g,r,i,a,m,e,d){!(function(){'use strict';var ERROR='input is invalid type',WINDOW='object'==typeof window,root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&'object'==typeof self,NODE_JS=!root.JS_MD5_NO_NODE_JS&&'object'==typeof process&&process.versions&&process.versions.node;NODE_JS?root=g:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&'object'==typeof m&&m.exports,AMD='function'==typeof define&&define.amd,ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&'undefined'!=typeof ArrayBuffer,HEX_CHARS='0123456789abcdef'.split(''),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=['hex','array','digest','buffer','arrayBuffer','base64'],BASE64_ENCODE_CHAR='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return'[object Array]'===Object.prototype.toString.call(t)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return'object'==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var createOutputMethod=function(t){return function(s){return new Md5(!0).update(s)[t]()}},createMethod=function(){var t=createOutputMethod('hex');NODE_JS&&(t=nodeWrap(t)),t.create=function(){return new Md5},t.update=function(s){return t.create().update(s)};for(var s=0;s>2]|=t[n]<>6,R[f++]=128|63&h):h<55296||h>=57344?(R[f++]=224|h>>12,R[f++]=128|h>>6&63,R[f++]=128|63&h):(h=65536+((1023&h)<<10|1023&t.charCodeAt(++n)),R[f++]=240|h>>18,R[f++]=128|h>>12&63,R[f++]=128|h>>6&63,R[f++]=128|63&h);else for(f=this.start;n>2]|=h<>2]|=(192|h>>6)<>2]|=(128|63&h)<=57344?(u[f>>2]|=(224|h>>12)<>2]|=(128|h>>6&63)<>2]|=(128|63&h)<>2]|=(240|h>>18)<>2]|=(128|h>>12&63)<>2]|=(128|h>>6&63)<>2]|=(128|63&h)<=64?(this.start=f-64,this.hash(),this.hashed=!0):this.start=f}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,s=this.lastByteIndex;t[s>>2]|=EXTRA[3&s],s>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var t,s,o,h,f,n,A=this.blocks;this.first?s=((s=((t=((t=A[0]-680876937)<<7|t>>>25)-271733879<<0)^(o=((o=(-271733879^(h=((h=(-1732584194^2004318071&t)+A[1]-117830708)<<12|h>>>20)+t<<0)&(-271733879^t))+A[2]-1126478375)<<17|o>>>15)+h<<0)&(h^t))+A[3]-1316259209)<<22|s>>>10)+o<<0:(t=this.h0,s=this.h1,o=this.h2,s=((s+=((t=((t+=((h=this.h3)^s&(o^h))+A[0]-680876936)<<7|t>>>25)+s<<0)^(o=((o+=(s^(h=((h+=(o^t&(s^o))+A[1]-389564586)<<12|h>>>20)+t<<0)&(t^s))+A[2]+606105819)<<17|o>>>15)+h<<0)&(h^t))+A[3]-1044525330)<<22|s>>>10)+o<<0),s=((s+=((t=((t+=(h^s&(o^h))+A[4]-176418897)<<7|t>>>25)+s<<0)^(o=((o+=(s^(h=((h+=(o^t&(s^o))+A[5]+1200080426)<<12|h>>>20)+t<<0)&(t^s))+A[6]-1473231341)<<17|o>>>15)+h<<0)&(h^t))+A[7]-45705983)<<22|s>>>10)+o<<0,s=((s+=((t=((t+=(h^s&(o^h))+A[8]+1770035416)<<7|t>>>25)+s<<0)^(o=((o+=(s^(h=((h+=(o^t&(s^o))+A[9]-1958414417)<<12|h>>>20)+t<<0)&(t^s))+A[10]-42063)<<17|o>>>15)+h<<0)&(h^t))+A[11]-1990404162)<<22|s>>>10)+o<<0,s=((s+=((t=((t+=(h^s&(o^h))+A[12]+1804603682)<<7|t>>>25)+s<<0)^(o=((o+=(s^(h=((h+=(o^t&(s^o))+A[13]-40341101)<<12|h>>>20)+t<<0)&(t^s))+A[14]-1502002290)<<17|o>>>15)+h<<0)&(h^t))+A[15]+1236535329)<<22|s>>>10)+o<<0,s=((s+=((h=((h+=(s^o&((t=((t+=(o^h&(s^o))+A[1]-165796510)<<5|t>>>27)+s<<0)^s))+A[6]-1069501632)<<9|h>>>23)+t<<0)^t&((o=((o+=(t^s&(h^t))+A[11]+643717713)<<14|o>>>18)+h<<0)^h))+A[0]-373897302)<<20|s>>>12)+o<<0,s=((s+=((h=((h+=(s^o&((t=((t+=(o^h&(s^o))+A[5]-701558691)<<5|t>>>27)+s<<0)^s))+A[10]+38016083)<<9|h>>>23)+t<<0)^t&((o=((o+=(t^s&(h^t))+A[15]-660478335)<<14|o>>>18)+h<<0)^h))+A[4]-405537848)<<20|s>>>12)+o<<0,s=((s+=((h=((h+=(s^o&((t=((t+=(o^h&(s^o))+A[9]+568446438)<<5|t>>>27)+s<<0)^s))+A[14]-1019803690)<<9|h>>>23)+t<<0)^t&((o=((o+=(t^s&(h^t))+A[3]-187363961)<<14|o>>>18)+h<<0)^h))+A[8]+1163531501)<<20|s>>>12)+o<<0,s=((s+=((h=((h+=(s^o&((t=((t+=(o^h&(s^o))+A[13]-1444681467)<<5|t>>>27)+s<<0)^s))+A[2]-51403784)<<9|h>>>23)+t<<0)^t&((o=((o+=(t^s&(h^t))+A[7]+1735328473)<<14|o>>>18)+h<<0)^h))+A[12]-1926607734)<<20|s>>>12)+o<<0,s=((s+=((n=(h=((h+=((f=s^o)^(t=((t+=(f^h)+A[5]-378558)<<4|t>>>28)+s<<0))+A[8]-2022574463)<<11|h>>>21)+t<<0)^t)^(o=((o+=(n^s)+A[11]+1839030562)<<16|o>>>16)+h<<0))+A[14]-35309556)<<23|s>>>9)+o<<0,s=((s+=((n=(h=((h+=((f=s^o)^(t=((t+=(f^h)+A[1]-1530992060)<<4|t>>>28)+s<<0))+A[4]+1272893353)<<11|h>>>21)+t<<0)^t)^(o=((o+=(n^s)+A[7]-155497632)<<16|o>>>16)+h<<0))+A[10]-1094730640)<<23|s>>>9)+o<<0,s=((s+=((n=(h=((h+=((f=s^o)^(t=((t+=(f^h)+A[13]+681279174)<<4|t>>>28)+s<<0))+A[0]-358537222)<<11|h>>>21)+t<<0)^t)^(o=((o+=(n^s)+A[3]-722521979)<<16|o>>>16)+h<<0))+A[6]+76029189)<<23|s>>>9)+o<<0,s=((s+=((n=(h=((h+=((f=s^o)^(t=((t+=(f^h)+A[9]-640364487)<<4|t>>>28)+s<<0))+A[12]-421815835)<<11|h>>>21)+t<<0)^t)^(o=((o+=(n^s)+A[15]+530742520)<<16|o>>>16)+h<<0))+A[2]-995338651)<<23|s>>>9)+o<<0,s=((s+=((h=((h+=(s^((t=((t+=(o^(s|~h))+A[0]-198630844)<<6|t>>>26)+s<<0)|~o))+A[7]+1126891415)<<10|h>>>22)+t<<0)^((o=((o+=(t^(h|~s))+A[14]-1416354905)<<15|o>>>17)+h<<0)|~t))+A[5]-57434055)<<21|s>>>11)+o<<0,s=((s+=((h=((h+=(s^((t=((t+=(o^(s|~h))+A[12]+1700485571)<<6|t>>>26)+s<<0)|~o))+A[3]-1894986606)<<10|h>>>22)+t<<0)^((o=((o+=(t^(h|~s))+A[10]-1051523)<<15|o>>>17)+h<<0)|~t))+A[1]-2054922799)<<21|s>>>11)+o<<0,s=((s+=((h=((h+=(s^((t=((t+=(o^(s|~h))+A[8]+1873313359)<<6|t>>>26)+s<<0)|~o))+A[15]-30611744)<<10|h>>>22)+t<<0)^((o=((o+=(t^(h|~s))+A[6]-1560198380)<<15|o>>>17)+h<<0)|~t))+A[13]+1309151649)<<21|s>>>11)+o<<0,s=((s+=((h=((h+=(s^((t=((t+=(o^(s|~h))+A[4]-145523070)<<6|t>>>26)+s<<0)|~o))+A[11]-1120210379)<<10|h>>>22)+t<<0)^((o=((o+=(t^(h|~s))+A[2]+718787259)<<15|o>>>17)+h<<0)|~t))+A[9]-343485551)<<21|s>>>11)+o<<0,this.first?(this.h0=t+1732584193<<0,this.h1=s-271733879<<0,this.h2=o-1732584194<<0,this.h3=h+271733878<<0,this.first=!1):(this.h0=this.h0+t<<0,this.h1=this.h1+s<<0,this.h2=this.h2+o<<0,this.h3=this.h3+h<<0)},Md5.prototype.hex=function(){this.finalize();var t=this.h0,s=this.h1,o=this.h2,h=this.h3;return HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[h>>4&15]+HEX_CHARS[15&h]+HEX_CHARS[h>>12&15]+HEX_CHARS[h>>8&15]+HEX_CHARS[h>>20&15]+HEX_CHARS[h>>16&15]+HEX_CHARS[h>>28&15]+HEX_CHARS[h>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var t=this.h0,s=this.h1,o=this.h2,h=this.h3;return[255&t,t>>8&255,t>>16&255,t>>24&255,255&s,s>>8&255,s>>16&255,s>>24&255,255&o,o>>8&255,o>>16&255,o>>24&255,255&h,h>>8&255,h>>16&255,h>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),s=new Uint32Array(t);return s[0]=this.h0,s[1]=this.h1,s[2]=this.h2,s[3]=this.h3,t},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var t,s,o,h='',f=this.array(),n=0;n<15;)t=f[n++],s=f[n++],o=f[n++],h+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[63&(t<<4|s>>>4)]+BASE64_ENCODE_CHAR[63&(s<<2|o>>>6)]+BASE64_ENCODE_CHAR[63&o];return t=f[n],h+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[t<<4&63]+'=='};var exports=createMethod();COMMON_JS?m.exports=exports:(root.md5=exports,AMD&&define(function(){return exports}))})()},485,[]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BrowserCapabilities",{enumerable:!0,get:function(){return n.default}});var n=t(r(d[1]))},486,[3,487]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=t(r(d[1])),u=t(r(d[2])),o=t(r(d[3])),n=r(d[4]),p=(function(){function t(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},p=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=arguments.length>2?arguments[2]:void 0;(0,u.default)(this,t);var c,f=new n.BrowserDetection(l);if('object'==typeof o&&'string'==typeof f.getVersion())for(var v=o[f.getName()]||[],b=0;b72&&(t.name=v.CHROME,t.version=o)}else t.name=v.CHROME,t.version=n.match(/Chrome\/([\d.]+)/)[1];return t}function f(){var n=navigator.userAgent;if(n.match(/Electron/)){var t=n.match(/Electron\/([\d.]+)/)[1];return{name:v.ELECTRON,version:t}}}function l(){var n=navigator.userAgent;if(n.match(/JitsiMeetNW/)){var t=n.match(/JitsiMeetNW\/([\d.]+)/)[1];return{name:v.NWJS,version:t}}}function E(){var n,t,o=navigator.userAgent.match(/\b(react[ \t_-]*native)(?:\/(\S+))?/i);if(o||'ReactNative'===navigator.product)return o&&o.length>2&&(t=o[1],n=o[2]),t||(t='react-native'),n||(n='unknown'),{name:v.REACT_NATIVE,version:n}}function _(n){for(var t,o=[E,f,l],u=0;u"+n))}},{key:"isVersionLessThan",value:function(n){return this._checkCondition((0,t.default)({},this._name,"<"+n))}},{key:"isVersionEqualTo",value:function(n){return this._checkCondition((0,t.default)({},this._name,"~"+n))}}]),n})();e.default=N},489,[3,54,4,5,490,491]); __d(function(g,r,i,a,m,e,d){var t,n,s=r(d[0]);t=this,n=function(){return(function(t){var n={};function s(o){if(n[o])return n[o].exports;var u=n[o]={i:o,l:!1,exports:{}};return t[o].call(u.exports,u,u.exports,s),u.l=!0,u.exports}return s.m=t,s.c=n,s.d=function(t,n,o){s.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},s.r=function(t){"undefined"!=typeof Symbol&&("function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag")&&Object.defineProperty(t,"function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag",{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,n){if(1&n&&(t=s(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(s.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var u in t)s.d(o,u,function(n){return t[n]}.bind(null,u));return o},s.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(n,"a",n),n},s.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},s.p="",s(s.s=90)})({17:function(t,n,s){"use strict";n.__esModule=!0,n.default=void 0;var o=s(18),u=(function(){function t(){}return t.getFirstMatch=function(t,n){var s=n.match(t);return s&&s.length>0&&s[1]||""},t.getSecondMatch=function(t,n){var s=n.match(t);return s&&s.length>1&&s[2]||""},t.matchAndReturnConst=function(t,n,s){if(t.test(n))return s},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var n=t.split(".").splice(0,2).map(function(t){return parseInt(t,10)||0});if(n.push(0),10===n[0])switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var n=t.split(".").splice(0,2).map(function(t){return parseInt(t,10)||0});if(n.push(0),!(1===n[0]&&n[1]<5))return 1===n[0]&&n[1]<6?"Cupcake":1===n[0]&&n[1]>=6?"Donut":2===n[0]&&n[1]<2?"Eclair":2===n[0]&&2===n[1]?"Froyo":2===n[0]&&n[1]>2?"Gingerbread":3===n[0]?"Honeycomb":4===n[0]&&n[1]<1?"Ice Cream Sandwich":4===n[0]&&n[1]<4?"Jelly Bean":4===n[0]&&n[1]>=4?"KitKat":5===n[0]?"Lollipop":6===n[0]?"Marshmallow":7===n[0]?"Nougat":8===n[0]?"Oreo":9===n[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(n,s,o){void 0===o&&(o=!1);var u=t.getVersionPrecision(n),c=t.getVersionPrecision(s),f=Math.max(u,c),l=0,h=t.map([n,s],function(n){var s=f-t.getVersionPrecision(n),o=n+new Array(s+1).join(".0");return t.map(o.split("."),function(t){return new Array(20-t.length).join("0")+t}).reverse()});for(o&&(l=f-Math.min(u,c)),f-=1;f>=l;){if(h[0][f]>h[1][f])return 1;if(h[0][f]===h[1][f]){if(f===l)return 0;f-=1}else if(h[0][f]0){var f=Object.keys(s),l=f.find(function(t){return n.isOS(t)});if(l){var h=this.satisfies(s[l]);if(void 0!==h)return h}var p=f.find(function(t){return n.isPlatform(t)});if(p){var v=this.satisfies(s[p]);if(void 0!==v)return v}}if(c>0){var M=Object.keys(u).find(function(t){return n.isBrowser(t,!0)});if(void 0!==M)return this.compareVersion(u[M])}},n.isBrowser=function(t,n){void 0===n&&(n=!1);var s=this.getBrowserName().toLowerCase(),o=t.toLowerCase(),u=h.default.getBrowserTypeByAlias(o);return n&&u&&(o=u.toLowerCase()),o===s},n.compareVersion=function(t){var n=[0],s=t,o=!1,u=this.getBrowserVersion();if("string"==typeof u)return">"===t[0]||"<"===t[0]?(s=t.substr(1),"="===t[1]?(o=!0,s=t.substr(2)):n=[],">"===t[0]?n.push(1):n.push(-1)):"="===t[0]?s=t.substr(1):"~"===t[0]&&(o=!0,s=t.substr(1)),n.indexOf(h.default.compareVersions(u,s,o))>-1},n.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},n.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},n.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},n.is=function(t){return this.isBrowser(t)||this.isOS(t)||this.isPlatform(t)},n.some=function(t){var n=this;return void 0===t&&(t=[]),t.some(function(t){return n.is(t)})},t})();n.default=v,t.exports=n.default},92:function(t,n,s){"use strict";n.__esModule=!0,n.default=void 0;var o,u=(o=s(17))&&o.__esModule?o:{default:o},c=/version\/(\d+(\.?_?\d+)+)/i,f=[{test:[/googlebot/i],describe:function(t){var n={name:"Googlebot"},s=u.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||u.default.getFirstMatch(c,t);return s&&(n.version=s),n}},{test:[/opera/i],describe:function(t){var n={name:"Opera"},s=u.default.getFirstMatch(c,t)||u.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/opr\/|opios/i],describe:function(t){var n={name:"Opera"},s=u.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||u.default.getFirstMatch(c,t);return s&&(n.version=s),n}},{test:[/SamsungBrowser/i],describe:function(t){var n={name:"Samsung Internet for Android"},s=u.default.getFirstMatch(c,t)||u.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/Whale/i],describe:function(t){var n={name:"NAVER Whale Browser"},s=u.default.getFirstMatch(c,t)||u.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/MZBrowser/i],describe:function(t){var n={name:"MZ Browser"},s=u.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||u.default.getFirstMatch(c,t);return s&&(n.version=s),n}},{test:[/focus/i],describe:function(t){var n={name:"Focus"},s=u.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||u.default.getFirstMatch(c,t);return s&&(n.version=s),n}},{test:[/swing/i],describe:function(t){var n={name:"Swing"},s=u.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||u.default.getFirstMatch(c,t);return s&&(n.version=s),n}},{test:[/coast/i],describe:function(t){var n={name:"Opera Coast"},s=u.default.getFirstMatch(c,t)||u.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/yabrowser/i],describe:function(t){var n={name:"Yandex Browser"},s=u.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||u.default.getFirstMatch(c,t);return s&&(n.version=s),n}},{test:[/ucbrowser/i],describe:function(t){var n={name:"UC Browser"},s=u.default.getFirstMatch(c,t)||u.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/Maxthon|mxios/i],describe:function(t){var n={name:"Maxthon"},s=u.default.getFirstMatch(c,t)||u.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/epiphany/i],describe:function(t){var n={name:"Epiphany"},s=u.default.getFirstMatch(c,t)||u.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/puffin/i],describe:function(t){var n={name:"Puffin"},s=u.default.getFirstMatch(c,t)||u.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/sleipnir/i],describe:function(t){var n={name:"Sleipnir"},s=u.default.getFirstMatch(c,t)||u.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/k-meleon/i],describe:function(t){var n={name:"K-Meleon"},s=u.default.getFirstMatch(c,t)||u.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/micromessenger/i],describe:function(t){var n={name:"WeChat"},s=u.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||u.default.getFirstMatch(c,t);return s&&(n.version=s),n}},{test:[/qqbrowser/i],describe:function(t){var n={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},s=u.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||u.default.getFirstMatch(c,t);return s&&(n.version=s),n}},{test:[/msie|trident/i],describe:function(t){var n={name:"Internet Explorer"},s=u.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/\sedg\//i],describe:function(t){var n={name:"Microsoft Edge"},s=u.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/edg([ea]|ios)/i],describe:function(t){var n={name:"Microsoft Edge"},s=u.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/vivaldi/i],describe:function(t){var n={name:"Vivaldi"},s=u.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/seamonkey/i],describe:function(t){var n={name:"SeaMonkey"},s=u.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/sailfish/i],describe:function(t){var n={name:"Sailfish"},s=u.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return s&&(n.version=s),n}},{test:[/silk/i],describe:function(t){var n={name:"Amazon Silk"},s=u.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/phantom/i],describe:function(t){var n={name:"PhantomJS"},s=u.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/slimerjs/i],describe:function(t){var n={name:"SlimerJS"},s=u.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var n={name:"BlackBerry"},s=u.default.getFirstMatch(c,t)||u.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var n={name:"WebOS Browser"},s=u.default.getFirstMatch(c,t)||u.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/bada/i],describe:function(t){var n={name:"Bada"},s=u.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/tizen/i],describe:function(t){var n={name:"Tizen"},s=u.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||u.default.getFirstMatch(c,t);return s&&(n.version=s),n}},{test:[/qupzilla/i],describe:function(t){var n={name:"QupZilla"},s=u.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||u.default.getFirstMatch(c,t);return s&&(n.version=s),n}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var n={name:"Firefox"},s=u.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/chromium/i],describe:function(t){var n={name:"Chromium"},s=u.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||u.default.getFirstMatch(c,t);return s&&(n.version=s),n}},{test:[/chrome|crios|crmo/i],describe:function(t){var n={name:"Chrome"},s=u.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/GSA/i],describe:function(t){var n={name:"Google Search"},s=u.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:function(t){var n=!t.test(/like android/i),s=t.test(/android/i);return n&&s},describe:function(t){var n={name:"Android Browser"},s=u.default.getFirstMatch(c,t);return s&&(n.version=s),n}},{test:[/playstation 4/i],describe:function(t){var n={name:"PlayStation 4"},s=u.default.getFirstMatch(c,t);return s&&(n.version=s),n}},{test:[/safari|applewebkit/i],describe:function(t){var n={name:"Safari"},s=u.default.getFirstMatch(c,t);return s&&(n.version=s),n}},{test:[/.*/i],describe:function(t){var n=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:u.default.getFirstMatch(n,t),version:u.default.getSecondMatch(n,t)}}}];n.default=f,t.exports=n.default},93:function(t,n,s){"use strict";n.__esModule=!0,n.default=void 0;var o,u=(o=s(17))&&o.__esModule?o:{default:o},c=s(18),f=[{test:[/Roku\/DVP/],describe:function(t){var n=u.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:c.OS_MAP.Roku,version:n}}},{test:[/windows phone/i],describe:function(t){var n=u.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:c.OS_MAP.WindowsPhone,version:n}}},{test:[/windows/i],describe:function(t){var n=u.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),s=u.default.getWindowsVersionName(n);return{name:c.OS_MAP.Windows,version:n,versionName:s}}},{test:[/macintosh/i],describe:function(t){var n=u.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),s=u.default.getMacOSVersionName(n),o={name:c.OS_MAP.MacOS,version:n};return s&&(o.versionName=s),o}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var n=u.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:c.OS_MAP.iOS,version:n}}},{test:function(t){var n=!t.test(/like android/i),s=t.test(/android/i);return n&&s},describe:function(t){var n=u.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),s=u.default.getAndroidVersionName(n),o={name:c.OS_MAP.Android,version:n};return s&&(o.versionName=s),o}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var n=u.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),s={name:c.OS_MAP.WebOS};return n&&n.length&&(s.version=n),s}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var n=u.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||u.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||u.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:c.OS_MAP.BlackBerry,version:n}}},{test:[/bada/i],describe:function(t){var n=u.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:c.OS_MAP.Bada,version:n}}},{test:[/tizen/i],describe:function(t){var n=u.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:c.OS_MAP.Tizen,version:n}}},{test:[/linux/i],describe:function(){return{name:c.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:c.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var n=u.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:c.OS_MAP.PlayStation4,version:n}}}];n.default=f,t.exports=n.default},94:function(t,n,s){"use strict";n.__esModule=!0,n.default=void 0;var o,u=(o=s(17))&&o.__esModule?o:{default:o},c=s(18),f=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var n=u.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",s={type:c.PLATFORMS_MAP.mobile,vendor:"Huawei"};return n&&(s.model=n),s}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:c.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:c.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:c.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:c.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:c.PLATFORMS_MAP.tablet}}},{test:function(t){var n=t.test(/ipod|iphone/i),s=t.test(/like (ipod|iphone)/i);return n&&!s},describe:function(t){var n=u.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:c.PLATFORMS_MAP.mobile,vendor:"Apple",model:n}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:c.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:c.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:c.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:c.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:c.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var n=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&n>=3},describe:function(){return{type:c.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:c.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:c.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:c.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:c.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:c.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:c.PLATFORMS_MAP.tv}}}];n.default=f,t.exports=n.default},95:function(t,n,s){"use strict";n.__esModule=!0,n.default=void 0;var o,u=(o=s(17))&&o.__esModule?o:{default:o},c=s(18),f=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:c.ENGINE_MAP.Blink};var n=u.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:c.ENGINE_MAP.EdgeHTML,version:n}}},{test:[/trident/i],describe:function(t){var n={name:c.ENGINE_MAP.Trident},s=u.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:function(t){return t.test(/presto/i)},describe:function(t){var n={name:c.ENGINE_MAP.Presto},s=u.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:function(t){var n=t.test(/gecko/i),s=t.test(/like gecko/i);return n&&!s},describe:function(t){var n={name:c.ENGINE_MAP.Gecko},s=u.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:c.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var n={name:c.ENGINE_MAP.WebKit},s=u.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return s&&(n.version=s),n}}];n.default=f,t.exports=n.default}})},"object"==typeof e&&"object"==typeof m?m.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof e?e.bowser=n():t.bowser=n()},490,[24]); __d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.UNKNOWN=e.REACT_NATIVE=e.ELECTRON=e.NWJS=e.SAFARI=e.INTERNET_EXPLORER=e.FIREFOX=e.OPERA=e.CHROME=void 0;e.CHROME='chrome';e.OPERA='opera';e.FIREFOX='firefox';e.INTERNET_EXPLORER='iexplorer';e.SAFARI='safari';e.NWJS='nwjs';e.ELECTRON='electron';e.REACT_NATIVE='react-native';e.UNKNOWN='unknown'},491,[]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.jitsiLocalStorage=void 0;var n=t(r(d[1])),u=t(r(d[2])),o=t(r(d[3])),l=t(r(d[4])),f=t(r(d[5])),c=(function(){function t(){(0,l.default)(this,t)}return(0,f.default)(t,[{key:"getItem",value:function(){}},{key:"setItem",value:function(){}},{key:"removeItem",value:function(){}},{key:"key",value:function(){}}]),t})(),s=new((function(t){function s(){var t,o;(0,l.default)(this,s),t=(0,n.default)(this,(0,u.default)(s).call(this));try{o=window.localStorage}catch(t){}return t.storage=o||new c,t}return(0,o.default)(s,t),(0,f.default)(s,[{key:"getItem",value:function(t){return this.storage.getItem(t)}},{key:"setItem",value:function(t,n){return this.storage.setItem(t,n)}},{key:"removeItem",value:function(t){return this.storage.removeItem(t)}},{key:"key",value:function(t){return this.storage.key(t)}}]),s})(c));e.jitsiLocalStorage=s},492,[3,6,9,10,4,5]); __d(function(g,r,i,a,m,e,d){!(function(){'use strict';var ERROR='input is invalid type',WINDOW='object'==typeof window,root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&'object'==typeof self,NODE_JS=!root.JS_MD5_NO_NODE_JS&&'object'==typeof process&&process.versions&&process.versions.node;NODE_JS?root=g:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&'object'==typeof m&&m.exports,AMD='function'==typeof define&&define.amd,ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&'undefined'!=typeof ArrayBuffer,HEX_CHARS='0123456789abcdef'.split(''),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=['hex','array','digest','buffer','arrayBuffer','base64'],BASE64_ENCODE_CHAR='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return'[object Array]'===Object.prototype.toString.call(t)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return'object'==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var createOutputMethod=function(t){return function(s){return new Md5(!0).update(s)[t]()}},createMethod=function(){var t=createOutputMethod('hex');NODE_JS&&(t=nodeWrap(t)),t.create=function(){return new Md5},t.update=function(s){return t.create().update(s)};for(var s=0;s>2]|=t[n]<>6,R[f++]=128|63&h):h<55296||h>=57344?(R[f++]=224|h>>12,R[f++]=128|h>>6&63,R[f++]=128|63&h):(h=65536+((1023&h)<<10|1023&t.charCodeAt(++n)),R[f++]=240|h>>18,R[f++]=128|h>>12&63,R[f++]=128|h>>6&63,R[f++]=128|63&h);else for(f=this.start;n>2]|=h<>2]|=(192|h>>6)<>2]|=(128|63&h)<=57344?(u[f>>2]|=(224|h>>12)<>2]|=(128|h>>6&63)<>2]|=(128|63&h)<>2]|=(240|h>>18)<>2]|=(128|h>>12&63)<>2]|=(128|h>>6&63)<>2]|=(128|63&h)<=64?(this.start=f-64,this.hash(),this.hashed=!0):this.start=f}return this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,s=this.lastByteIndex;t[s>>2]|=EXTRA[3&s],s>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,this.hash()}},Md5.prototype.hash=function(){var t,s,o,h,f,n,A=this.blocks;this.first?s=((s=((t=((t=A[0]-680876937)<<7|t>>>25)-271733879<<0)^(o=((o=(-271733879^(h=((h=(-1732584194^2004318071&t)+A[1]-117830708)<<12|h>>>20)+t<<0)&(-271733879^t))+A[2]-1126478375)<<17|o>>>15)+h<<0)&(h^t))+A[3]-1316259209)<<22|s>>>10)+o<<0:(t=this.h0,s=this.h1,o=this.h2,s=((s+=((t=((t+=((h=this.h3)^s&(o^h))+A[0]-680876936)<<7|t>>>25)+s<<0)^(o=((o+=(s^(h=((h+=(o^t&(s^o))+A[1]-389564586)<<12|h>>>20)+t<<0)&(t^s))+A[2]+606105819)<<17|o>>>15)+h<<0)&(h^t))+A[3]-1044525330)<<22|s>>>10)+o<<0),s=((s+=((t=((t+=(h^s&(o^h))+A[4]-176418897)<<7|t>>>25)+s<<0)^(o=((o+=(s^(h=((h+=(o^t&(s^o))+A[5]+1200080426)<<12|h>>>20)+t<<0)&(t^s))+A[6]-1473231341)<<17|o>>>15)+h<<0)&(h^t))+A[7]-45705983)<<22|s>>>10)+o<<0,s=((s+=((t=((t+=(h^s&(o^h))+A[8]+1770035416)<<7|t>>>25)+s<<0)^(o=((o+=(s^(h=((h+=(o^t&(s^o))+A[9]-1958414417)<<12|h>>>20)+t<<0)&(t^s))+A[10]-42063)<<17|o>>>15)+h<<0)&(h^t))+A[11]-1990404162)<<22|s>>>10)+o<<0,s=((s+=((t=((t+=(h^s&(o^h))+A[12]+1804603682)<<7|t>>>25)+s<<0)^(o=((o+=(s^(h=((h+=(o^t&(s^o))+A[13]-40341101)<<12|h>>>20)+t<<0)&(t^s))+A[14]-1502002290)<<17|o>>>15)+h<<0)&(h^t))+A[15]+1236535329)<<22|s>>>10)+o<<0,s=((s+=((h=((h+=(s^o&((t=((t+=(o^h&(s^o))+A[1]-165796510)<<5|t>>>27)+s<<0)^s))+A[6]-1069501632)<<9|h>>>23)+t<<0)^t&((o=((o+=(t^s&(h^t))+A[11]+643717713)<<14|o>>>18)+h<<0)^h))+A[0]-373897302)<<20|s>>>12)+o<<0,s=((s+=((h=((h+=(s^o&((t=((t+=(o^h&(s^o))+A[5]-701558691)<<5|t>>>27)+s<<0)^s))+A[10]+38016083)<<9|h>>>23)+t<<0)^t&((o=((o+=(t^s&(h^t))+A[15]-660478335)<<14|o>>>18)+h<<0)^h))+A[4]-405537848)<<20|s>>>12)+o<<0,s=((s+=((h=((h+=(s^o&((t=((t+=(o^h&(s^o))+A[9]+568446438)<<5|t>>>27)+s<<0)^s))+A[14]-1019803690)<<9|h>>>23)+t<<0)^t&((o=((o+=(t^s&(h^t))+A[3]-187363961)<<14|o>>>18)+h<<0)^h))+A[8]+1163531501)<<20|s>>>12)+o<<0,s=((s+=((h=((h+=(s^o&((t=((t+=(o^h&(s^o))+A[13]-1444681467)<<5|t>>>27)+s<<0)^s))+A[2]-51403784)<<9|h>>>23)+t<<0)^t&((o=((o+=(t^s&(h^t))+A[7]+1735328473)<<14|o>>>18)+h<<0)^h))+A[12]-1926607734)<<20|s>>>12)+o<<0,s=((s+=((n=(h=((h+=((f=s^o)^(t=((t+=(f^h)+A[5]-378558)<<4|t>>>28)+s<<0))+A[8]-2022574463)<<11|h>>>21)+t<<0)^t)^(o=((o+=(n^s)+A[11]+1839030562)<<16|o>>>16)+h<<0))+A[14]-35309556)<<23|s>>>9)+o<<0,s=((s+=((n=(h=((h+=((f=s^o)^(t=((t+=(f^h)+A[1]-1530992060)<<4|t>>>28)+s<<0))+A[4]+1272893353)<<11|h>>>21)+t<<0)^t)^(o=((o+=(n^s)+A[7]-155497632)<<16|o>>>16)+h<<0))+A[10]-1094730640)<<23|s>>>9)+o<<0,s=((s+=((n=(h=((h+=((f=s^o)^(t=((t+=(f^h)+A[13]+681279174)<<4|t>>>28)+s<<0))+A[0]-358537222)<<11|h>>>21)+t<<0)^t)^(o=((o+=(n^s)+A[3]-722521979)<<16|o>>>16)+h<<0))+A[6]+76029189)<<23|s>>>9)+o<<0,s=((s+=((n=(h=((h+=((f=s^o)^(t=((t+=(f^h)+A[9]-640364487)<<4|t>>>28)+s<<0))+A[12]-421815835)<<11|h>>>21)+t<<0)^t)^(o=((o+=(n^s)+A[15]+530742520)<<16|o>>>16)+h<<0))+A[2]-995338651)<<23|s>>>9)+o<<0,s=((s+=((h=((h+=(s^((t=((t+=(o^(s|~h))+A[0]-198630844)<<6|t>>>26)+s<<0)|~o))+A[7]+1126891415)<<10|h>>>22)+t<<0)^((o=((o+=(t^(h|~s))+A[14]-1416354905)<<15|o>>>17)+h<<0)|~t))+A[5]-57434055)<<21|s>>>11)+o<<0,s=((s+=((h=((h+=(s^((t=((t+=(o^(s|~h))+A[12]+1700485571)<<6|t>>>26)+s<<0)|~o))+A[3]-1894986606)<<10|h>>>22)+t<<0)^((o=((o+=(t^(h|~s))+A[10]-1051523)<<15|o>>>17)+h<<0)|~t))+A[1]-2054922799)<<21|s>>>11)+o<<0,s=((s+=((h=((h+=(s^((t=((t+=(o^(s|~h))+A[8]+1873313359)<<6|t>>>26)+s<<0)|~o))+A[15]-30611744)<<10|h>>>22)+t<<0)^((o=((o+=(t^(h|~s))+A[6]-1560198380)<<15|o>>>17)+h<<0)|~t))+A[13]+1309151649)<<21|s>>>11)+o<<0,s=((s+=((h=((h+=(s^((t=((t+=(o^(s|~h))+A[4]-145523070)<<6|t>>>26)+s<<0)|~o))+A[11]-1120210379)<<10|h>>>22)+t<<0)^((o=((o+=(t^(h|~s))+A[2]+718787259)<<15|o>>>17)+h<<0)|~t))+A[9]-343485551)<<21|s>>>11)+o<<0,this.first?(this.h0=t+1732584193<<0,this.h1=s-271733879<<0,this.h2=o-1732584194<<0,this.h3=h+271733878<<0,this.first=!1):(this.h0=this.h0+t<<0,this.h1=this.h1+s<<0,this.h2=this.h2+o<<0,this.h3=this.h3+h<<0)},Md5.prototype.hex=function(){this.finalize();var t=this.h0,s=this.h1,o=this.h2,h=this.h3;return HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[h>>4&15]+HEX_CHARS[15&h]+HEX_CHARS[h>>12&15]+HEX_CHARS[h>>8&15]+HEX_CHARS[h>>20&15]+HEX_CHARS[h>>16&15]+HEX_CHARS[h>>28&15]+HEX_CHARS[h>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var t=this.h0,s=this.h1,o=this.h2,h=this.h3;return[255&t,t>>8&255,t>>16&255,t>>24&255,255&s,s>>8&255,s>>16&255,s>>24&255,255&o,o>>8&255,o>>16&255,o>>24&255,255&h,h>>8&255,h>>16&255,h>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),s=new Uint32Array(t);return s[0]=this.h0,s[1]=this.h1,s[2]=this.h2,s[3]=this.h3,t},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var t,s,o,h='',f=this.array(),n=0;n<15;)t=f[n++],s=f[n++],o=f[n++],h+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[63&(t<<4|s>>>4)]+BASE64_ENCODE_CHAR[63&(s<<2|o>>>6)]+BASE64_ENCODE_CHAR[63&o];return t=f[n],h+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[t<<4&63]+'=='};var exports=createMethod();COMMON_JS?m.exports=exports:(root.md5=exports,AMD&&define(function(){return exports}))})()},493,[]); __d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=(0,r(d[0]).getLogger)('features/base/redux');e.default=t},494,[495]); __d(function(g,r,i,a,m,e,d){var o=r(d[0]),t=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.getLogger=function(o){var t='ReactNative'===navigator.product?f:v;return(0,l.getLogger)(o,void 0,t)},e._initLogging=void 0;var l=t(r(d[2])),n=o(r(d[3])),u=o(r(d[4])),v={},f={disableCallerInfo:!0};var s=n.default.once(function(){if('ReactNative'===navigator.product){var o=r(d[5]).default;l.default.setGlobalOptions(f),o.setGlobalLogOptions(f),l.default.removeGlobalTransport(console),o.removeGlobalLogTransport(console),l.default.addGlobalTransport(u.default),o.addGlobalLogTransport(u.default)}});e._initLogging=s},495,[3,2,392,445,496,503]); __d(function(g,r,i,a,m,e,d){var n=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(r(d[1])),o=r(d[2]),u=r(d[3]),f=o.NativeModules.LogBridge;function c(n){var t,o=n.stack;return'function'==typeof n.cause&&(t=n.cause())&&(o+="\nCaused by: "+c(t)),o}var s=['trace','debug','info','log','warn','error'].reduce(function(n,o){return n[o]=function(n){for(var s=arguments.length,v=new Array(s>1?s-1:0),l=1;l=l)return t;switch(t){case'%s':return String(c[u++]);case'%d':return Number(c[u++]);case'%j':try{return JSON.stringify(c[u++])}catch(t){return'[Circular]'}default:return t}}),f=c[u];u=3&&(o.depth=arguments[2]),arguments.length>=4&&(o.colors=arguments[3]),E(n)?o.showHidden=n:n&&e._extend(o,n),D(o.showHidden)&&(o.showHidden=!1),D(o.depth)&&(o.depth=2),D(o.colors)&&(o.colors=!1),D(o.customInspect)&&(o.customInspect=!0),o.colors&&(o.stylize=l),y(o,t,o.depth)}function l(t,n){var o=s.styles[n];return o?"\x1b["+s.colors[o][0]+'m'+t+"\x1b["+s.colors[o][1]+'m':t}function p(t,n){return t}function f(t){var n={};return t.forEach(function(t,o){n[t]=!0}),n}function y(t,n,o){if(t.customInspect&&n&&F(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var u=n.inspect(o,t);return x(u)||(u=y(t,u,o)),u}var c=b(t,n);if(c)return c;var s=Object.keys(n),l=f(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(n)),$(n)&&(s.indexOf('message')>=0||s.indexOf('description')>=0))return h(n);if(0===s.length){if(F(n)){var p=n.name?': '+n.name:'';return t.stylize('[Function'+p+']','special')}if(P(n))return t.stylize(RegExp.prototype.toString.call(n),'regexp');if(T(n))return t.stylize(Date.prototype.toString.call(n),'date');if($(n))return h(n)}var E,S='',z=!1,D=['{','}'];(w(n)&&(z=!0,D=['[',']']),F(n))&&(S=' [Function'+(n.name?': '+n.name:'')+']');return P(n)&&(S=' '+RegExp.prototype.toString.call(n)),T(n)&&(S=' '+Date.prototype.toUTCString.call(n)),$(n)&&(S=' '+h(n)),0!==s.length||z&&0!=n.length?o<0?P(n)?t.stylize(RegExp.prototype.toString.call(n),'regexp'):t.stylize('[Object]','special'):(t.seen.push(n),E=z?v(t,n,o,l,s):s.map(function(u){return O(t,n,o,l,u,z)}),t.seen.pop(),j(E,S,D)):D[0]+S+D[1]}function b(t,n){if(D(n))return t.stylize('undefined','undefined');if(x(n)){var o='\''+JSON.stringify(n).replace(/^"|"$/g,'').replace(/'/g,"\\'").replace(/\\"/g,'"')+'\'';return t.stylize(o,'string')}return z(n)?t.stylize(''+n,'number'):E(n)?t.stylize(''+n,'boolean'):S(n)?t.stylize('null','null'):void 0}function h(t){return'['+Error.prototype.toString.call(t)+']'}function v(t,n,o,u,c){for(var s=[],l=0,p=n.length;l-1&&(p=s?p.split('\n').map(function(t){return' '+t}).join('\n').substr(2):'\n'+p.split('\n').map(function(t){return' '+t}).join('\n')):p=t.stylize('[Circular]','special')),D(l)){if(s&&c.match(/^\d+$/))return p;(l=JSON.stringify(''+c)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(l=l.substr(1,l.length-2),l=t.stylize(l,'name')):(l=l.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),l=t.stylize(l,'string'))}return l+': '+p}function j(t,n,o){return t.reduce(function(t,n){return 0,n.indexOf('\n')>=0&&0,t+n.replace(/\u001b\[\d\d?m/g,'').length+1},0)>60?o[0]+(''===n?'':n+'\n ')+' '+t.join(',\n ')+' '+o[1]:o[0]+n+' '+t.join(', ')+' '+o[1]}function w(t){return Array.isArray(t)}function E(t){return'boolean'==typeof t}function S(t){return null===t}function z(t){return'number'==typeof t}function x(t){return'string'==typeof t}function D(t){return void 0===t}function P(t){return N(t)&&'[object RegExp]'===_(t)}function N(t){return'object'==typeof t&&null!==t}function T(t){return N(t)&&'[object Date]'===_(t)}function $(t){return N(t)&&('[object Error]'===_(t)||t instanceof Error)}function F(t){return'function'==typeof t}function _(t){return Object.prototype.toString.call(t)}function k(t){return t<10?'0'+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!o[t])if(u.test(t)){var n=process.pid;o[t]=function(){var o=e.format.apply(e,arguments);console.error('%s %d: %s',t,n,o)}}else o[t]=function(){};return o[t]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:'cyan',number:'yellow',boolean:'yellow',undefined:'grey',null:'bold',string:'green',date:'magenta',regexp:'red'},e.types=r(d[0]),e.isArray=w,e.isBoolean=E,e.isNull=S,e.isNullOrUndefined=function(t){return null==t},e.isNumber=z,e.isString=x,e.isSymbol=function(t){return'symbol'==typeof t},e.isUndefined=D,e.isRegExp=P,e.types.isRegExp=P,e.isObject=N,e.isDate=T,e.types.isDate=T,e.isError=$,e.types.isNativeError=$,e.isFunction=F,e.isPrimitive=function(t){return null===t||'boolean'==typeof t||'number'==typeof t||'string'==typeof t||'symbol'==typeof t||void 0===t},e.isBuffer=r(d[1]);var A=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];function R(t,n){return Object.prototype.hasOwnProperty.call(t,n)}e.log=function(){var t,n;console.log('%s - %s',(t=new Date,n=[k(t.getHours()),k(t.getMinutes()),k(t.getSeconds())].join(':'),[t.getDate(),A[t.getMonth()],n].join(' ')),e.format.apply(e,arguments))},e.inherits=r(d[2]),e._extend=function(t,n){if(!n||!N(n))return t;for(var o=Object.keys(n),u=o.length;u--;)t[o[u]]=n[o[u]];return t};var U='undefined'!=typeof Symbol?Symbol('util.promisify.custom'):void 0;function J(t,n){if(!t){var o=new Error('Promise was rejected with a falsy value');o.reason=t,t=o}return n(t)}e.promisify=function(n){if('function'!=typeof n)throw new TypeError('The "original" argument must be of type Function');if(U&&n[U]){var o;if('function'!=typeof(o=n[U]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(o,U,{value:o,enumerable:!1,writable:!1,configurable:!0}),o}function o(){for(var t,o,u=new Promise(function(n,u){t=n,o=u}),c=[],s=0;s=0&&'[object Array]'!==o.call(t)&&'[object Function]'===o.call(t.callee)},l=(function(){return n(arguments)})();n.isLegacyArguments=c,m.exports=l?n:c},500,[]); __d(function(g,r,i,a,m,e,d){'use strict';var t=Object.prototype.toString,o=Function.prototype.toString,n=/^\s*(?:function)?\*/,c='function'==typeof Symbol&&'symbol'==typeof("function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag"),u=Object.getPrototypeOf,f=(function(){if(!c)return!1;try{return Function('return function*() {}')()}catch(t){}})(),y=f?u(f):{};m.exports=function(f){return'function'==typeof f&&(!!n.test(o.call(f))||(c?u(f)===y:'[object GeneratorFunction]'===t.call(f)))}},501,[]); __d(function(g,r,i,a,m,e,d){'function'==typeof Object.create?m.exports=function(t,o){t.super_=o,t.prototype=Object.create(o.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:m.exports=function(t,o){t.super_=o;var p=function(){};p.prototype=o.prototype,t.prototype=new p,t.prototype.constructor=t}},502,[]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n.default}}),r(d[1]);var n=t(r(d[2]));!(function(t){if(void 0===t.$){var n=r(d[3]);n(t),t.$=n}})(g||window||this)},503,[3,504,517,519]); __d(function(g,r,i,a,m,e,d){r(d[0])},504,[505]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),s=r(d[1]);t.NativeModules.WiFiStats&&((0,s.getJitsiMeetGlobalNS)().getWiFiStats=t.NativeModules.WiFiStats.getWiFiStats)},505,[15,506]); __d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0});var t=r(d[0]);Object.keys(t).forEach(function(n){"default"!==n&&"__esModule"!==n&&Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=r(d[1]);Object.keys(n).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})});var u=r(d[2]);Object.keys(u).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return u[t]}})});var o=r(d[3]);Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})});var c=r(d[4]);Object.keys(c).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}})});var f=r(d[5]);Object.keys(f).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return f[t]}})})},506,[507,508,510,511,513,514]); __d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.assignIfDefined=function(t,n){var o=Object(t);for(var c in n)if(n.hasOwnProperty(c)){var u=n[c];void 0!==u&&(o[c]=u)}return o},e.copyText=function(t){var n,o=document.createElement('textarea');document.body.appendChild(o),o.value=t,o.select();try{n=document.execCommand('copy')}catch(t){n=!1}return document.body.removeChild(o),n},e.createDeferred=function(){var t={};return t.promise=new Promise(function(n,o){t.resolve=n,t.reject=o}),t},e.escapeRegexp=function(n){if('string'!=typeof n)throw new TypeError('Expected a string');return n.replace(t,'\\$&')},e.getBaseUrl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,n=t.document.querySelector('base');if(n&&n.href)return n.href;var o=t.location,c=o.protocol,u=o.host;return c+"//"+u},e.getJitsiMeetGlobalNS=function(){window.JitsiMeetJS||(window.JitsiMeetJS={});window.JitsiMeetJS.app||(window.JitsiMeetJS.app={});return window.JitsiMeetJS.app},e.reportError=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'';console.error(n,t),window.onerror&&window.onerror(n,null,null,null,t)};var t=/[|\\{}()[\]^$+*?.-]/g},507,[]); __d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.doGetJSON=function(o,u){var c=fetch(o).then(function(t){var n=t.json();return t.ok?n:n.then(function(t){return Promise.reject(t)})});if(u)return(0,t.timeoutPromise)(c,n).catch(function(o){return o.status>=400&&o.status<500?Promise.reject(o):(0,t.timeoutPromise)(c,n)});return c};var t=r(d[0]),n=3e3},508,[509]); __d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.timeoutPromise=function(t,n){return new Promise(function(o,u){var c=setTimeout(function(){return u(new Error('timeout'))},n);t.then(function(t){o(t),clearTimeout(c)},function(t){u(t),clearTimeout(c)})})}},509,[]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.loadScript=function(t){var u,s,c,l,f,p,w,h,x,b,v,_=arguments;return n.default.async(function(k){for(;;)switch(k.prev=k.next){case 0:if(u=_.length>1&&void 0!==_[1]?_[1]:o,s=_.length>2&&void 0!==_[2]&&_[2],c=new URL(t),l=c.hostname,f=c.pathname,p=c.protocol,l&&f&&p){k.next=5;break}throw new Error("unexpected url: "+t);case 5:return w=new AbortController,h=w.signal,x=setTimeout(function(){w.abort()},u),k.next=10,n.default.awrap(fetch(t,{signal:h}));case 10:b=k.sent,clearTimeout(x),k.t0=b.status,k.next=200===k.t0?15:21;break;case 15:return k.next=17,n.default.awrap(b.text());case 17:if(v=k.sent,!s){k.next=20;break}return k.abrupt("return",v);case 20:return k.abrupt("return",eval.call(window,v));case 21:throw new Error("loadScript error: "+b.statusText);case 22:case"end":return k.stop()}},null,this)};var n=t(r(d[1])),o=5e3},510,[3,270]); __d(function(g,r,i,a,m,e,d){var n=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.openURLInBrowser=function(n){o.Linking.openURL(n).catch(function(o){t.default.error("An error occurred while trying to open "+n,o)})};var o=r(d[1]),t=n(r(d[2]))},511,[3,15,512]); __d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=(0,r(d[0]).getLogger)('features/base/util');e.default=t},512,[495]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.getBackendSafePath=function(t){if(!t)return t;return t.split('/').map(p).join('/')},e.getBackendSafeRoomName=p,e.getLocationContextRoot=v,e.parseStandardURIString=R,e.parseURIString=function(t){if('string'!=typeof t)return;var n=R(f(t));n.contextRoot=v(n);var o=n.pathname,s=o.lastIndexOf('/'),h=o.substring(s+1)||void 0;if(h){var c=u(h);c!==h&&(h=c,n.pathname=o.substring(0,s+1)+(h||''))}return n.room=h,n},e.safeDecodeURIComponent=function(t){try{return decodeURIComponent(t)}catch(t){}return t},e.toURLString=function(t){var n;switch(typeof t){case'object':t&&(n=t instanceof URL?t.href:I(t));break;case'string':n=String(t)}return n},e.urlObjectToString=I,e.addHashParamsToURL=function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=(0,o.parseURLParams)(t),c=l((0,n.default)({},h,s));c.length&&(t.hash="#"+c.join('&'));return t},e.getDecodedURI=function(t){return decodeURI(t.replace(/^https?:\/\//i,''))},e.URI_PROTOCOL_PATTERN=e.APP_LINK_SCHEME=void 0;var n=t(r(d[1])),o=r(d[2]),s=r(d[3]);e.APP_LINK_SCHEME='org.jitsi.meet:';var h='[\\:\\?#\\[\\]@!$&\'()*+,;=>0&&void 0!==arguments[0]?arguments[0]:{},n=[];for(var o in t)try{n.push(o+"="+encodeURIComponent(JSON.stringify(t[o])))}catch(t){console.warn("Error encoding "+o+": "+t)}return n}function R(t){var n,o,s,h={toString:x};if(t=t.replace(/\s/g,''),(o=(n=new RegExp(c,'gi')).exec(t))&&(h.protocol=o[1].toLowerCase(),t=t.substring(n.lastIndex)),o=(n=new RegExp("^(//[^/?#]+)",'gi')).exec(t)){var u=o[1].substring(2);t=t.substring(n.lastIndex);var f=u.indexOf('@');-1!==f&&(u=u.substring(f+1)),h.host=u;var p=u.lastIndexOf(':');-1!==p&&(h.port=u.substring(p+1),u=u.substring(0,p)),h.hostname=u}if((o=(n=new RegExp("^([^?#]*)",'gi')).exec(t))&&(s=o[1],t=t.substring(n.lastIndex)),s?s.startsWith('/')||(s="/"+s):s='/',h.pathname=s,t.startsWith('?')){var v=t.indexOf('#',1);-1===v&&(v=t.length),h.search=t.substring(0,v),t=t.substring(v)}else h.search='';return h.hash=t.startsWith('#')?t:'',h}function x(t){var n=t||this,o=n.hash,s=n.host,h=n.pathname,c=n.protocol,u=n.search,f='';return c&&(f+=c),s&&(f+="//"+s),f+=h||'/',u&&(f+=u),o&&(f+=o),f}function I(t){var n=R(f(t.serverURL&&t.room?new URL(t.room,t.serverURL).toString():t.room?t.room:t.url||''));if(!n.protocol){var o=t.protocol||t.scheme;o&&(o.endsWith(':')||(o+=':'),n.protocol=o)}var s=n.pathname;if(!n.host){var h=t.domain||t.host||t.hostname;if(h){var c=R(f("org.jitsi.meet://"+h)),u=c.host,p=c.hostname,v=c.pathname,x=c.port;u&&(n.host=u,n.hostname=p,n.port=x),'/'===s&&'/'!==v&&(s=v)}}var I=t.roomName||t.room;!I||!n.pathname.endsWith('/')&&n.pathname.endsWith("/"+I)||(s.endsWith('/')||(s+='/'),s+=I),n.pathname=s;var O=t.jwt;if(O){var U=n.search;-1===U.indexOf('?jwt=')&&-1===U.indexOf('&jwt=')&&(U.startsWith('?')||(U="?"+U),1===U.length||(U+='&'),U+="jwt="+O,n.search=U)}for(var b=n.hash,w=['config','interfaceConfig','devices','userInfo'],C=0;C1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:'hash',h='search'===o?n.search:n.hash,l={},v=h&&h.substr(1).split('&')||[];if('hash'===o&&1===v.length){var c=v[0];if(c.startsWith('/')&&1===c.split('&').length)return l}return v.forEach(function(n){var o=n.split('='),h=o[0];if(h){var v;try{if(v=o[1],!s){var c=decodeURIComponent(v).replace(/\\&/,'&');v='undefined'===c?void 0:JSON.parse(c)}}catch(n){return void(0,t.reportError)(n,"Failed to parse URL parameter value: "+String(v))}l[h]=v}}),l};var t=r(d[0])},514,[507]); __d(function(g,r,i,a,m,e,d){var n=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeNFKC=function(n){return o.nfkc(n)};var o=n(r(d[1]))},515,[2,516]); __d(function(g,r,i,a,m,e,d){!(function(t){"use strict";for(var n=[null,0,{}],o=10,s=44032,u=4352,f=4449,h=4519,c=21,l=28,p=588,C=function(t,n){this.codepoint=t,this.feature=n},v={},w=[],B=0;B<=255;++B)w[B]=0;var y=[function(t,o,s){return o<60||13311>8&255]>o&&(v[n]=u),u},function(t,n,o){return o?t(n,o):new C(n,null)},function(t,n,o){var v;if(n=55296&&t<=56319},C.isLowSurrogate=function(t){return t>=56320&&t<=57343},C.prototype.prepFeature=function(){this.feature||(this.feature=C.fromCharCode(this.codepoint,!0).feature)},C.prototype.toString=function(){if(this.codepoint<65536)return String.fromCharCode(this.codepoint);var t=this.codepoint-65536;return String.fromCharCode(Math.floor(t/1024)+55296,t%1024+56320)},C.prototype.getDecomp=function(){return this.prepFeature(),this.feature[0]||null},C.prototype.isCompatibility=function(){return this.prepFeature(),!!this.feature[1]&&256&this.feature[1]},C.prototype.isExclude=function(){return this.prepFeature(),!!this.feature[1]&&512&this.feature[1]},C.prototype.getCanonicalClass=function(){return this.prepFeature(),this.feature[1]?255&this.feature[1]:0},C.prototype.getComposite=function(t){if(this.prepFeature(),!this.feature[2])return null;var n=this.feature[2][t.codepoint];return n?C.fromCharCode(n):null};var F=function(t){this.str=t,this.cursor=0};F.prototype.next=function(){if(this.str&&this.cursor0;--o){if(this.resBuf[o-1].getCanonicalClass()<=t)break}this.resBuf.splice(o,0,n)}while(0!==t);return this.resBuf.shift()};var S=function(t){this.it=t,this.procBuf=[],this.resBuf=[],this.lastClass=null};S.prototype.next=function(){for(;0===this.resBuf.length;){var t=this.it.next();if(!t){this.resBuf=this.procBuf,this.procBuf=[];break}if(0===this.procBuf.length)this.lastClass=t.getCanonicalClass(),this.procBuf.push(t);else{var n=this.procBuf[0].getComposite(t),o=t.getCanonicalClass();n&&(this.lastClass>16)+(t>>16)+(n>>16)<<16|65535&n},o=function(e){if("string"!=typeof e)throw new Error("str2binl was passed a non-string");for(var t=[],n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<>>32-c,n);var s,c},s=function(e,t,n,r,i,o,s){return a(t&n|~t&r,e,t,i,o,s)},c=function(e,t,n,r,i,o,s){return a(t&r|n&~r,e,t,i,o,s)},u=function(e,t,n,r,i,o,s){return a(t^n^r,e,t,i,o,s)},d=function(e,t,n,r,i,o,s){return a(n^(t|~r),e,t,i,o,s)},l=function(e,t){e[t>>5]|=128<>>9<<4)]=t;for(var n,r,o,a,l=1732584193,h=-271733879,p=-1732584194,f=271733878,m=0;m>2]>>n%4*8+4&15)+"0123456789abcdef".charAt(e[n>>2]>>n%4*8&15);return t})(l(o(e),8*e.length))},hash:function(e){return(function(e){for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>n%32&255);return t})(l(o(e),8*e.length))}};function p(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;var n,r,i,o,a,s,c,u,d=new Array(80),l=1732584193,h=-271733879,p=-1732584194,v=271733878,_=-1009589776;for(n=0;n16&&(n=p(n,8*e.length));for(var r=new Array(16),i=new Array(16),o=0;o<16;o++)r[o]=909522486^n[o],i[o]=1549556828^n[o];var a=p(r.concat(_(t)),512+8*t.length);return p(i.concat(a),672)}function g(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function y(e,t){return e<>>32-t}function _(e){for(var t=[],n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<24-n%32;return t}function S(e){for(var t,n,r="",i=0;i<4*e.length;i+=3)for(t=(e[i>>2]>>8*(3-i%4)&255)<<16|(e[i+1>>2]>>8*(3-(i+1)%4)&255)<<8|e[i+2>>2]>>8*(3-(i+2)%4)&255,n=0;n<4;n++)8*i+6*n>32*e.length?r+="=":r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t>>6*(3-n)&63);return r}function E(e){for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}var b={b64_hmac_sha1:function(e,t){return S(v(e,t))},b64_sha1:function(e){return S(p(_(e),8*e.length))},binb2str:E,core_hmac_sha1:v,str_hmac_sha1:function(e,t){return E(v(e,t))},str_sha1:function(e){return E(p(_(e),8*e.length))}},C=function(e){var t,n,r="",i=e.length;for(t=0;t=0&&n<=127?r+=e.charAt(t):n>2047?(r+=String.fromCharCode(224|n>>12&15),r+=String.fromCharCode(128|n>>6&63),r+=String.fromCharCode(128|n>>0&63)):(r+=String.fromCharCode(192|n>>6&31),r+=String.fromCharCode(128|n>>0&63));return r},T=function(e){for(var t in e=e||{})if(Object.prototype.hasOwnProperty.call(e,t)){var r="",i="",o="",a=e[t],s="object"===n(a),c=escape(unescape(s?a.value:a));s&&(r=a.expires?";expires="+a.expires:"",i=a.domain?";domain="+a.domain:"",o=a.path?";path="+a.path:""),document.cookie=t+"="+c+r+i+o}};function R(e,t){return new w.Builder(e,t)}function A(e){return new w.Builder("iq",e)}function k(e){return new w.Builder("presence",e)}var w={VERSION:"@VERSION@",NS:{HTTPBIND:"http://jabber.org/protocol/httpbind",BOSH:"urn:xmpp:xbosh",CLIENT:"jabber:client",AUTH:"jabber:iq:auth",ROSTER:"jabber:iq:roster",PROFILE:"jabber:iq:profile",DISCO_INFO:"http://jabber.org/protocol/disco#info",DISCO_ITEMS:"http://jabber.org/protocol/disco#items",MUC:"http://jabber.org/protocol/muc",SASL:"urn:ietf:params:xml:ns:xmpp-sasl",STREAM:"http://etherx.jabber.org/streams",FRAMING:"urn:ietf:params:xml:ns:xmpp-framing",BIND:"urn:ietf:params:xml:ns:xmpp-bind",SESSION:"urn:ietf:params:xml:ns:xmpp-session",VERSION:"jabber:iq:version",STANZAS:"urn:ietf:params:xml:ns:xmpp-stanzas",XHTML_IM:"http://jabber.org/protocol/xhtml-im",XHTML:"http://www.w3.org/1999/xhtml"},XHTML:{tags:["a","blockquote","br","cite","em","img","li","ol","p","span","strong","ul","body"],attributes:{a:["href"],blockquote:["style"],br:[],cite:["style"],em:[],img:["src","alt","style","height","width"],li:["style"],ol:["style"],p:["style"],span:["style"],strong:[],ul:["style"],body:[]},css:["background-color","color","font-family","font-size","font-style","font-weight","margin-left","margin-right","text-align","text-decoration"],validTag:function(e){for(var t=0;t0)for(var n=0;n/g,">")).replace(/'/g,"'")).replace(/"/g,""")},xmlunescape:function(e){return(e=(e=(e=(e=e.replace(/\&/g,"&")).replace(/</g,"<")).replace(/>/g,">")).replace(/'/g,"'")).replace(/"/g,'"')},xmlTextNode:function(e){return w.xmlGenerator().createTextNode(e)},xmlHtmlNode:function(e){var t;return DOMParser?t=(new DOMParser).parseFromString(e,"text/xml"):((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)),t},getText:function(e){if(!e)return null;var t="";0===e.childNodes.length&&e.nodeType===w.ElementType.TEXT&&(t+=e.nodeValue);for(var n=0;n0&&(a=s.join("; "),t.setAttribute(o,a))}else t.setAttribute(o,a)}for(var p=0;p/g,"\\3e").replace(/@/g,"\\40")},unescapeNode:function(e){return"string"!=typeof e?e:e.replace(/\\20/g," ").replace(/\\22/g,'"').replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\")},getNodeFromJid:function(e){return e.indexOf("@")<0?null:e.split("@")[0]},getDomainFromJid:function(e){var t=w.getBareJidFromJid(e);if(t.indexOf("@")<0)return t;var n=t.split("@");return n.splice(0,1),n.join("@")},getResourceFromJid:function(e){if(!e)return null;var t=e.split("/");return t.length<2?null:(t.splice(0,1),t.join("/"))},getBareJidFromJid:function(e){return e?e.split("/")[0]:null},_handleError:function(e){void 0!==e.stack&&w.fatal(e.stack),e.sourceURL?w.fatal("error: "+this.handler+" "+e.sourceURL+":"+e.line+" - "+e.name+": "+e.message):e.fileName?w.fatal("error: "+this.handler+" "+e.fileName+":"+e.lineNumber+" - "+e.name+": "+e.message):w.fatal("error: "+e.message)},log:function(e,t){e===this.LogLevel.FATAL&&"object"===n(window.console)&&"function"==typeof window.console.error&&window.console.error(t)},debug:function(e){this.log(this.LogLevel.DEBUG,e)},info:function(e){this.log(this.LogLevel.INFO,e)},warn:function(e){this.log(this.LogLevel.WARN,e)},error:function(e){this.log(this.LogLevel.ERROR,e)},fatal:function(e){this.log(this.LogLevel.FATAL,e)},serialize:function(e){if(!e)return null;"function"==typeof e.tree&&(e=e.tree());var t=r(Array(e.attributes.length).keys()).map(function(t){return e.attributes[t].nodeName});t.sort();var n=t.reduce(function(t,n){return"".concat(t," ").concat(n,'="').concat(w.xmlescape(e.attributes.getNamedItem(n).value),'"')},"<".concat(e.nodeName));if(e.childNodes.length>0){n+=">";for(var i=0;i"}}n+=""}else n+="/>";return n},_requestId:0,_connectionPlugins:{},addConnectionPlugin:function(e,t){w._connectionPlugins[e]=t},Builder:function(e,t){"presence"!==e&&"message"!==e&&"iq"!==e||(t&&!t.xmlns?t.xmlns=w.NS.CLIENT:t||(t={xmlns:w.NS.CLIENT})),this.nodeTree=w.xmlElement(e,t),this.node=this.nodeTree}};w.Builder.prototype={tree:function(){return this.nodeTree},toString:function(){return w.serialize(this.nodeTree)},up:function(){return this.node=this.node.parentNode,this},root:function(){return this.node=this.nodeTree,this},attrs:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(void 0===e[t]?this.node.removeAttribute(t):this.node.setAttribute(t,e[t]));return this},c:function(e,t,n){var r=w.xmlElement(e,t,n);return this.node.appendChild(r),"string"!=typeof n&&"number"!=typeof n&&(this.node=r),this},cnode:function(e){var t,n=w.xmlGenerator();try{t=void 0!==n.importNode}catch(e){t=!1}var r=t?n.importNode(e,!0):w.copyElement(e);return this.node.appendChild(r),this.node=r,this},t:function(e){var t=w.xmlTextNode(e);return this.node.appendChild(t),this},h:function(e){var t=document.createElement("body");t.innerHTML=e;for(var n=w.createHtml(t);n.childNodes.length>0;)this.node.appendChild(n.childNodes[0]);return this}},w.Handler=function(e,t,n,r,i,o,a){this.handler=e,this.ns=t,this.name=n,this.type=r,this.id=i,this.options=a||{matchBareFromJid:!1,ignoreNamespaceFragment:!1},this.options.matchBare&&(w.warn('The "matchBare" option is deprecated, use "matchBareFromJid" instead.'),this.options.matchBareFromJid=this.options.matchBare,delete this.options.matchBare),this.options.matchBareFromJid?this.from=o?w.getBareJidFromJid(o):null:this.from=o,this.user=!0},w.Handler.prototype={getNamespace:function(e){var t=e.getAttribute("xmlns");return t&&this.options.ignoreNamespaceFragment&&(t=t.split("#")[0]),t},namespaceMatch:function(e){var t=this,n=!1;return!this.ns||(w.forEachChild(e,null,function(e){t.getNamespace(e)===t.ns&&(n=!0)}),n||this.getNamespace(e)===this.ns)},isMatch:function(e){var t=e.getAttribute("from");this.options.matchBareFromJid&&(t=w.getBareJidFromJid(t));var n=e.getAttribute("type");return!(!this.namespaceMatch(e)||this.name&&!w.isTagEqual(e,this.name)||this.type&&(Array.isArray(this.type)?-1===this.type.indexOf(n):n!==this.type)||this.id&&e.getAttribute("id")!==this.id||this.from&&t!==this.from)},run:function(e){var t=null;try{t=this.handler(e)}catch(e){throw w._handleError(e),e}return t},toString:function(){return"{Handler: "+this.handler+"("+this.name+","+this.id+","+this.ns+")}"}},w.TimedHandler=function(e,t){this.period=e,this.handler=t,this.lastCalled=(new Date).getTime(),this.user=!0},w.TimedHandler.prototype={run:function(){return this.lastCalled=(new Date).getTime(),this.handler()},reset:function(){this.lastCalled=(new Date).getTime()},toString:function(){return"{TimedHandler: "+this.handler+"("+this.period+")}"}},w.Connection=function(e,t){var n=this;this.service=e,this.options=t||{};var r=this.options.protocol||"";for(var i in 0===e.indexOf("ws:")||0===e.indexOf("wss:")||0===r.indexOf("ws")?this._proto=new w.Websocket(this):this._proto=new w.Bosh(this),this.jid="",this.domain=null,this.features=null,this._sasl_data={},this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this.protocolErrorHandlers={HTTP:{},websocket:{}},this._idleTimeout=null,this._disconnectTimeout=null,this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.do_authentication=!0,this.paused=!1,this.restored=!1,this._data=[],this._uniqueId=0,this._sasl_success_handler=null,this._sasl_failure_handler=null,this._sasl_challenge_handler=null,this.maxRetries=5,this._idleTimeout=setTimeout(function(){return n._onIdle()},100),T(this.options.cookies),this.registerSASLMechanisms(this.options.mechanisms),w._connectionPlugins)if(Object.prototype.hasOwnProperty.call(w._connectionPlugins,i)){var o=function(){};o.prototype=w._connectionPlugins[i],this[i]=new o,this[i].init(this)}},w.Connection.prototype={reset:function(){this._proto._reset(),this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.restored=!1,this._data=[],this._requests=[],this._uniqueId=0},pause:function(){this.paused=!0},resume:function(){this.paused=!1},getUniqueId:function(e){var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)});return"string"==typeof e||"number"==typeof e?t+":"+e:t+""},addProtocolErrorHandler:function(e,t,n){this.protocolErrorHandlers[e][t]=n},connect:function(e,t,n,r,i,o,a){this.jid=e,this.authzid=w.getBareJidFromJid(this.jid),this.authcid=a||w.getNodeFromJid(this.jid),this.pass=t,this.servtype="xmpp",this.connect_callback=n,this.disconnecting=!1,this.connected=!1,this.authenticated=!1,this.restored=!1,this.domain=w.getDomainFromJid(this.jid),this._changeConnectStatus(w.Status.CONNECTING,null),this._proto._connect(r,i,o)},attach:function(e,t,n,r,i,o,a){if(!(this._proto instanceof w.Bosh)){var s=new Error('The "attach" method can only be used with a BOSH connection.');throw s.name="StropheSessionError",s}this._proto._attach(e,t,n,r,i,o,a)},restore:function(e,t,n,r,i){if(!this._sessionCachingSupported()){var o=new Error('The "restore" method can only be used with a BOSH connection.');throw o.name="StropheSessionError",o}this._proto._restore(e,t,n,r,i)},_sessionCachingSupported:function(){if(this._proto instanceof w.Bosh){if(!JSON)return!1;try{sessionStorage.setItem("_strophe_","_strophe_"),sessionStorage.removeItem("_strophe_")}catch(e){return!1}return!0}return!1},xmlInput:function(e){},xmlOutput:function(e){},rawInput:function(e){},rawOutput:function(e){},nextValidRid:function(e){},send:function(e){if(null!==e){if("function"==typeof e.sort)for(var t=0;t=0&&this.addHandlers.splice(t,1)},registerSASLMechanisms:function(e){this.mechanisms={},(e=e||[w.SASLAnonymous,w.SASLExternal,w.SASLMD5,w.SASLOAuthBearer,w.SASLXOAuth2,w.SASLPlain,w.SASLSHA1]).forEach(this.registerSASLMechanism.bind(this))},registerSASLMechanism:function(e){this.mechanisms[e.prototype.name]=e},disconnect:function(e){if(this._changeConnectStatus(w.Status.DISCONNECTING,e),w.warn("Disconnect was called because: "+e),this.connected){var t=!1;this.disconnecting=!0,this.authenticated&&(t=k({xmlns:w.NS.CLIENT,type:"unavailable"})),this._disconnectTimeout=this._addSysTimedHandler(3e3,this._onDisconnectTimeout.bind(this)),this._proto._disconnect(t)}else w.warn("Disconnect was called before Strophe connected to the server"),this._proto._abortAllRequests(),this._doDisconnect()},_changeConnectStatus:function(e,t,n){for(var r in w._connectionPlugins)if(Object.prototype.hasOwnProperty.call(w._connectionPlugins,r)){var i=this[r];if(i.statusChanged)try{i.statusChanged(e,t)}catch(e){w.error("".concat(r," plugin caused an exception changing status: ").concat(e))}}if(this.connect_callback)try{this.connect_callback(e,t,n)}catch(e){w._handleError(e),w.error("User connection callback caused an exception: ".concat(e))}},_doDisconnect:function(e){"number"==typeof this._idleTimeout&&clearTimeout(this._idleTimeout),null!==this._disconnectTimeout&&(this.deleteTimedHandler(this._disconnectTimeout),this._disconnectTimeout=null),w.debug("_doDisconnect was called"),this._proto._doDisconnect(),this.authenticated=!1,this.disconnecting=!1,this.restored=!1,this.handlers=[],this.timedHandlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._changeConnectStatus(w.Status.DISCONNECTED,e),this.connected=!1},_dataRecv:function(e,t){var n=this;w.debug("_dataRecv called");var r=this._proto._reqToData(e);if(null!==r){for(this.xmlInput!==w.Connection.prototype.xmlInput&&(r.nodeName===this._proto.strip&&r.childNodes.length?this.xmlInput(r.childNodes[0]):this.xmlInput(r)),this.rawInput!==w.Connection.prototype.rawInput&&(t?this.rawInput(t):this.rawInput(w.serialize(r)));this.removeHandlers.length>0;){var i=this.removeHandlers.pop(),o=this.handlers.indexOf(i);o>=0&&this.handlers.splice(o,1)}for(;this.addHandlers.length>0;)this.handlers.push(this.addHandlers.pop());if(this.disconnecting&&this._proto._emptyQueue())this._doDisconnect();else{var a=r.getAttribute("type");if(null!==a&&"terminate"===a){if(this.disconnecting)return;var s=r.getAttribute("condition"),c=r.getElementsByTagName("conflict");return null!==s?("remote-stream-error"===s&&c.length>0&&(s="conflict"),this._changeConnectStatus(w.Status.CONNFAIL,s)):this._changeConnectStatus(w.Status.CONNFAIL,w.ErrorCondition.UNKOWN_REASON),void this._doDisconnect(s)}w.forEachChild(r,null,function(e){var t=n.handlers;n.handlers=[];for(var r=0;r0:r.getElementsByTagName("stream:features").length>0||r.getElementsByTagName("features").length>0){var i=[],o=r.getElementsByTagName("mechanism");if(o.length>0)for(var a=0;ae[n].prototype.priority&&(n=r);if(n!==t){var i=e[t];e[t]=e[n],e[n]=i}}return e},authenticate:function(e){this._attemptSASLAuth(e)||this._attemptLegacyAuth()},_attemptSASLAuth:function(e){e=this.sortMechanismsByPriority(e||[]);for(var t=!1,n=0;n0&&(t=w.ErrorCondition.CONFLICT),this._changeConnectStatus(w.Status.AUTHFAIL,t,e),!1;var n=e.getElementsByTagName("bind");if(!(n.length>0))return w.warn("Resource binding failed."),this._changeConnectStatus(w.Status.AUTHFAIL,null,e),!1;var r=n[0].getElementsByTagName("jid");r.length>0&&(this.jid=w.getText(r[0]),this.do_session?this._establishSession():(this.authenticated=!0,this._changeConnectStatus(w.Status.CONNECTED,null)))},_establishSession:function(){if(!this.do_session)throw new Error("Strophe.Connection.prototype._establishSession "+"called but apparently ".concat(w.NS.SESSION," wasn't advertised by the server"));this._addSysHandler(this._onSessionResultIQ.bind(this),null,null,null,"_session_auth_2"),this.send(A({type:"set",id:"_session_auth_2"}).c("session",{xmlns:w.NS.SESSION}).tree())},_onSessionResultIQ:function(e){if("result"===e.getAttribute("type"))this.authenticated=!0,this._changeConnectStatus(w.Status.CONNECTED,null);else if("error"===e.getAttribute("type"))return w.warn("Session creation failed."),this._changeConnectStatus(w.Status.AUTHFAIL,null,e),!1;return!1},_sasl_failure_cb:function(e){return this._sasl_success_handler&&(this.deleteHandler(this._sasl_success_handler),this._sasl_success_handler=null),this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_mechanism&&this._sasl_mechanism.onFailure(),this._changeConnectStatus(w.Status.AUTHFAIL,null,e),!1},_auth2_cb:function(e){return"result"===e.getAttribute("type")?(this.authenticated=!0,this._changeConnectStatus(w.Status.CONNECTED,null)):"error"===e.getAttribute("type")&&(this._changeConnectStatus(w.Status.AUTHFAIL,null,e),this.disconnect("authentication failed")),!1},_addSysTimedHandler:function(e,t){var n=new w.TimedHandler(e,t);return n.user=!1,this.addTimeds.push(n),n},_addSysHandler:function(e,t,n,r,i){var o=new w.Handler(e,t,n,r,i);return o.user=!1,this.addHandlers.push(o),o},_onDisconnectTimeout:function(){return w.debug("_onDisconnectTimeout was called"),this._changeConnectStatus(w.Status.CONNTIMEOUT,null),this._proto._onDisconnectTimeout(),this._doDisconnect(),!1},_onIdle:function(){for(var e=this;this.addTimeds.length>0;)this.timedHandlers.push(this.addTimeds.pop());for(;this.removeTimeds.length>0;){var t=this.removeTimeds.pop(),n=this.timedHandlers.indexOf(t);n>=0&&this.timedHandlers.splice(n,1)}for(var r=(new Date).getTime(),i=[],o=0;o0&&(n="conflict"),this._conn._changeConnectStatus(P.Status.CONNFAIL,n)):this._conn._changeConnectStatus(P.Status.CONNFAIL,"unknown"),this._conn._doDisconnect(n),P.Status.CONNFAIL}this.sid||(this.sid=e.getAttribute("sid"));var i=e.getAttribute("requests");i&&(this.window=parseInt(i,10));var o=e.getAttribute("hold");o&&(this.hold=parseInt(o,10));var a=e.getAttribute("wait");a&&(this.wait=parseInt(a,10));var s=e.getAttribute("inactivity");s&&(this.inactivity=parseInt(s,10))},_disconnect:function(e){this._sendTerminate(e)},_doDisconnect:function(){this.sid=null,this.rid=Math.floor(4294967295*Math.random()),this._conn._sessionCachingSupported()&&window.sessionStorage.removeItem("strophe-bosh-session"),this._conn.nextValidRid(this.rid)},_emptyQueue:function(){return 0===this._requests.length},_callProtocolErrorHandlers:function(e){var t=this._getRequestStatus(e),n=this._conn.protocolErrorHandlers.HTTP[t];n&&n.call(this,t)},_hitError:function(e){this.errors++,P.warn("request errored, status: "+e+", number of errors: "+this.errors),this.errors>4&&this._conn._onDisconnectTimeout()},_no_auth_received:function(e){P.warn("Server did not yet offer a supported authentication mechanism. Sending a blank poll request."),e=e?e.bind(this._conn):this._conn._connect_cb.bind(this._conn);var t=this._buildBody();this._requests.push(new P.Request(t.tree(),this._onRequestStateChange.bind(this,e),t.tree().getAttribute("rid"))),this._throttledRequestHandler()},_onDisconnectTimeout:function(){this._abortAllRequests()},_abortAllRequests:function(){for(;this._requests.length>0;){var e=this._requests.pop();e.abort=!0,e.xhr.abort(),e.xhr.onreadystatechange=function(){}}},_onIdle:function(){var e=this._conn._data;if(this._conn.authenticated&&0===this._requests.length&&0===e.length&&!this._conn.disconnecting&&(P.debug("no requests during idle cycle, sending blank request"),e.push(null)),!this._conn.paused){if(this._requests.length<2&&e.length>0){for(var t=this._buildBody(),n=0;n0){var r=this._requests[0].age();null!==this._requests[0].dead&&this._requests[0].timeDead()>Math.floor(P.SECONDARY_TIMEOUT*this.wait)&&this._throttledRequestHandler(),r>Math.floor(P.TIMEOUT*this.wait)&&(P.warn("Request "+this._requests[0].id+" timed out, over "+Math.floor(P.TIMEOUT*this.wait)+" seconds since last activity"),this._throttledRequestHandler())}}},_getRequestStatus:function(e,t){var n;if(4===e.xhr.readyState)try{n=e.xhr.status}catch(e){P.error("Caught an error while retrieving a request's status, reqStatus: "+n)}return void 0===n&&(n="number"==typeof t?t:0),n},_onRequestStateChange:function(e,t){if(P.debug("request id "+t.id+"."+t.sends+" state changed to "+t.xhr.readyState),t.abort)t.abort=!1;else if(4===t.xhr.readyState){var n=this._getRequestStatus(t);if(this.lastResponseHeaders=t.xhr.getAllResponseHeaders(),this.disconnecting&&n>=400)return this._hitError(n),void this._callProtocolErrorHandlers(t);var r=n>0&&n<500,i=t.sends>this._conn.maxRetries;if((r||i)&&(this._removeRequest(t),P.debug("request id "+t.id+" should now be removed")),200===n){var o=this._requests[0]===t;(this._requests[1]===t||o&&this._requests.length>0&&this._requests[0].age()>Math.floor(P.SECONDARY_TIMEOUT*this.wait))&&this._restartRequest(0),this._conn.nextValidRid(Number(t.rid)+1),P.debug("request id "+t.id+"."+t.sends+" got 200"),e(t),this.errors=0}else 0===n||n>=400&&n<600||n>=12e3?(P.error("request id "+t.id+"."+t.sends+" error "+n+" happened"),this._hitError(n),this._callProtocolErrorHandlers(t),n>=400&&n<500&&(this._conn._changeConnectStatus(P.Status.DISCONNECTING,null),this._conn._doDisconnect())):P.error("request id "+t.id+"."+t.sends+" error "+n+" happened");r||i?i&&!this._conn.connected&&this._conn._changeConnectStatus(P.Status.CONNFAIL,"giving-up"):this._throttledRequestHandler()}},_processRequest:function(e){var t=this,n=this._requests[e],r=this._getRequestStatus(n,-1);if(n.sends>this._conn.maxRetries)this._conn._onDisconnectTimeout();else{var i=n.age(),o=!isNaN(i)&&i>Math.floor(P.TIMEOUT*this.wait),a=null!==n.dead&&n.timeDead()>Math.floor(P.SECONDARY_TIMEOUT*this.wait),s=4===n.xhr.readyState&&(r<1||r>=500);if((o||a||s)&&(a&&P.error("Request ".concat(this._requests[e].id," timed out (secondary), restarting")),n.abort=!0,n.xhr.abort(),n.xhr.onreadystatechange=function(){},this._requests[e]=new P.Request(n.xmlData,n.origFunc,n.rid,n.sends),n=this._requests[e]),0===n.xhr.readyState){P.debug("request id "+n.id+"."+n.sends+" posting");try{var c=this._conn.options.contentType||"text/xml; charset=utf-8";n.xhr.open("POST",this._conn.service,!this._conn.options.sync),void 0!==n.xhr.setRequestHeader&&n.xhr.setRequestHeader("Content-Type",c),this._conn.options.withCredentials&&(n.xhr.withCredentials=!0)}catch(e){return P.error("XHR open failed: "+e.toString()),this._conn.connected||this._conn._changeConnectStatus(P.Status.CONNFAIL,"bad-service"),void this._conn.disconnect()}var u=function(){if(n.date=new Date,t._conn.options.customHeaders){var e=t._conn.options.customHeaders;for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.xhr.setRequestHeader(r,e[r])}n.xhr.send(n.data)};if(n.sends>1){var d=1e3*Math.min(Math.floor(P.TIMEOUT*this.wait),Math.pow(n.sends,3));setTimeout(function(){u()},d)}else u();n.sends++,this._conn.xmlOutput!==P.Connection.prototype.xmlOutput&&(n.xmlData.nodeName===this.strip&&n.xmlData.childNodes.length?this._conn.xmlOutput(n.xmlData.childNodes[0]):this._conn.xmlOutput(n.xmlData)),this._conn.rawOutput!==P.Connection.prototype.rawOutput&&this._conn.rawOutput(n.data)}else P.debug("_processRequest: "+(0===e?"first":"second")+" request has readyState of "+n.xhr.readyState)}},_removeRequest:function(e){P.debug("removing request");for(var t=this._requests.length-1;t>=0;t--)e===this._requests[t]&&this._requests.splice(t,1);e.xhr.onreadystatechange=function(){},this._throttledRequestHandler()},_restartRequest:function(e){var t=this._requests[e];null===t.dead&&(t.dead=new Date),this._processRequest(e)},_reqToData:function(e){try{return e.getResponse()}catch(e){if("parsererror"!==e.message)throw e;this._conn.disconnect("strophe-parsererror")}},_sendTerminate:function(e){P.debug("_sendTerminate was called");var t=this._buildBody().attrs({type:"terminate"});e&&t.cnode(e.tree());var n=new P.Request(t.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),t.tree().getAttribute("rid"));this._requests.push(n),this._throttledRequestHandler()},_send:function(){var e=this;clearTimeout(this._conn._idleTimeout),this._throttledRequestHandler(),this._conn._idleTimeout=setTimeout(function(){return e._conn._onIdle()},100)},_sendRestart:function(){this._throttledRequestHandler(),clearTimeout(this._conn._idleTimeout)},_throttledRequestHandler:function(){this._requests?P.debug("_throttledRequestHandler called with "+this._requests.length+" requests"):P.debug("_throttledRequestHandler called with undefined requests"),this._requests&&0!==this._requests.length&&(this._requests.length>0&&this._processRequest(0),this._requests.length>1&&Math.abs(this._requests[0].rid-this._requests[1].rid): "+n);var r=e.getAttribute("version");return"string"!=typeof r?t="Missing version in ":"1.0"!==r&&(t="Wrong version in : "+r),!t||(this._conn._changeConnectStatus(O.Status.CONNFAIL,t),this._conn._doDisconnect(),!1)},_connect_cb_wrapper:function(e){if(0===e.data.indexOf("\s*)*/,"");if(""===t)return;var n=(new DOMParser).parseFromString(t,"text/xml").documentElement;this._conn.xmlInput(n),this._conn.rawInput(e.data),this._handleStreamStart(n)&&this._connect_cb(n)}else if(0===e.data.indexOf("=0&&i.indexOf("wss:")>=0||o.indexOf("ws:")>=0)&&(this._conn._changeConnectStatus(O.Status.REDIRECT,"Received see-other-uri, resetting connection"),this._conn.reset(),this._conn.service=i,this._connect())}else this._conn._changeConnectStatus(O.Status.CONNFAIL,"Received closing stream"),this._conn._doDisconnect()}else{var a=this._streamWrap(e.data),s=(new DOMParser).parseFromString(a,"text/xml").documentElement;this.socket.onmessage=this._onMessage.bind(this),this._conn._connect_cb(s,null,e.data)}},_disconnect:function(e){if(this.socket&&this.socket.readyState!==WebSocket.CLOSED){e&&this._conn.send(e);var t=N("close",{xmlns:O.NS.FRAMING});this._conn.xmlOutput(t.tree());var n=O.serialize(t);this._conn.rawOutput(n);try{this.socket.send(n)}catch(e){O.warn("Couldn't send tag.")}}this._conn._doDisconnect()},_doDisconnect:function(){O.debug("WebSockets _doDisconnect was called"),this._closeSocket()},_streamWrap:function(e){return""+e+""},_closeSocket:function(){if(this.socket)try{this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,this.socket.close()}catch(e){O.debug(e.message)}this.socket=null},_emptyQueue:function(){return!0},_onClose:function(e){this._conn.connected&&!this._conn.disconnecting?(O.error("Websocket closed unexpectedly"),this._conn._doDisconnect()):e&&1006===e.code&&!this._conn.connected&&this.socket?(O.error("Websocket closed unexcectedly"),this._conn._changeConnectStatus(O.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._conn._doDisconnect()):O.debug("Websocket closed")},_no_auth_received:function(e){O.error("Server did not offer a supported authentication mechanism"),this._conn._changeConnectStatus(O.Status.CONNFAIL,O.ErrorCondition.NO_AUTH_MECH),e&&e.call(this._conn),this._conn._doDisconnect()},_onDisconnectTimeout:function(){},_abortAllRequests:function(){},_onError:function(e){O.error("Websocket error "+e),this._conn._changeConnectStatus(O.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._disconnect()},_onIdle:function(){var e=this._conn._data;if(e.length>0&&!this._conn.paused){for(var t=0;t=e.length)break;r=e[n++]}else{if((n=e.next()).done)break;r=n.value}var i=r;this.stopCallStats(i.tpc)}var o=this.rtpStatsMap.keys(),a=Array.isArray(o),s=0;for(o=a?o:o["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var c;if(a){if(s>=o.length)break;c=o[s++]}else{if((s=o.next()).done)break;c=s.value}var d=c;this._stopRemoteStats(d)}this.eventEmitter&&this.eventEmitter.removeAllListeners()}finally{b.instances.delete(this)}},b.stopLocalStats=function(e){if(b.audioLevelsEnabled)for(var t=0;t=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}var o=i.callsStatsInstances.values(),a=Array.isArray(o),s=0;for(o=a?o:o["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var c;if(a){if(s>=o.length)break;c=o[s++]}else{if((s=o.next()).done)break;c=s.value}var u=c;e.add(u)}}return e},b.prototype.stopCallStats=function(e){var t=this.callsStatsInstances.get(e.id);t&&(1===this.callsStatsInstances.size&&this.eventEmitter.emit(u.b),this.callsStatsInstances.delete(e.id),t.sendTerminateEvent())},b.prototype.isCallstatsEnabled=function(){return this.callStatsIntegrationEnabled},b.prototype.sendConnectionResumeOrHoldEvent=function(e,t){var n=this.callsStatsInstances.get(e.id);n&&n.sendResumeOrHoldEvent(t)},b.prototype.sendIceConnectionFailedEvent=function(e){var t=this.callsStatsInstances.get(e.id);t&&t.sendIceConnectionFailedEvent()},b.prototype.sendMuteEvent=function(e,t,n){var r=e&&this.callsStatsInstances.get(e.id);f.a.sendMuteEvent(t,n,r)},b.prototype.sendScreenSharingEvent=function(e,t){var n=this.callsStatsInstances.values(),r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}o.sendScreenSharingEvent(e,t)}},b.prototype.sendDominantSpeakerEvent=function(e){var t=this.callsStatsInstances.values(),n=Array.isArray(t),r=0;for(t=n?t:t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}i.sendDominantSpeakerEvent()}this.xmpp.sendDominantSpeakerEvent(e)},b.sendActiveDeviceListEvent=function(e){var t=b._getAllCallStatsInstances();if(t.size){var n=t,r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol&&"function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;f.a.sendActiveDeviceListEvent(e,a)}}else f.a.sendActiveDeviceListEvent(e,null)},b.prototype.associateStreamWithVideoTag=function(e,t,n,r,i,o){var a=this.callsStatsInstances.get(e.id);a&&a.associateStreamWithVideoTag(t,n,r,i,o)},b.sendGetUserMediaFailed=function(e){var t=e instanceof s.a?(function(e){var t=new Error;return t.stack=e.stack,t.name=(e.name||"Unknown error")+(e.gum&&e.gum.error&&e.gum.error.name?" - "+e.gum.error.name:""),t.constraintName=e.gum&&e.gum.constraints?JSON.stringify(e.gum.constraints):"",t.message=e.message,t})(e):e,n=b._getAllCallStatsInstances();if(n.size){var r=n,i=Array.isArray(r),o=0;for(r=i?r:r["function"==typeof Symbol&&"function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var a;if(i){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var c=a;f.a.sendGetUserMediaFailed(t,c)}}else f.a.sendGetUserMediaFailed(t,null)},b.prototype.sendCreateOfferFailed=function(e,t){var n=this.callsStatsInstances.get(t.id);n&&n.sendCreateOfferFailed(e)},b.prototype.sendCreateAnswerFailed=function(e,t){var n=this.callsStatsInstances.get(t.id);n&&n.sendCreateAnswerFailed(e)},b.prototype.sendSetLocalDescFailed=function(e,t){var n=this.callsStatsInstances.get(t.id);n&&n.sendSetLocalDescFailed(e)},b.prototype.sendSetRemoteDescFailed=function(e,t){var n=this.callsStatsInstances.get(t.id);n&&n.sendSetRemoteDescFailed(e)},b.prototype.sendAddIceCandidateFailed=function(e,t){var n=this.callsStatsInstances.get(t.id);n&&n.sendAddIceCandidateFailed(e)},b.sendLog=function(e){var t=new Set,n=b.instances,r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;if(a.callStatsApplicationLogsDisabled)return;a.callsStatsInstances.size&&t.add(a.callsStatsInstances.values().next().value)}if(t.size){var s=t,c=Array.isArray(s),u=0;for(s=c?s:s["function"==typeof Symbol&&"function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var d;if(c){if(u>=s.length)break;d=s[u++]}else{if((u=s.next()).done)break;d=u.value}var l=d;f.a.sendApplicationLog(e,l)}}else f.a.sendApplicationLog(e,null)},b.prototype.sendFeedback=function(e,t){return b.analytics.sendEvent(c.n,{rating:e,comment:t}),f.a.sendFeedback(this.options.confID,e,t)},b.LOCAL_JID=n(147).LOCAL_JID,b.reportGlobalError=function(e){e instanceof s.a&&e.gum?b.sendGetUserMediaFailed(e):b.sendLog(e)},b.sendAnalyticsAndLog=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e?(t="object"==typeof e?e:{name:e,properties:n},_.log(JSON.stringify(t)),this.analytics.sendEvent(e,n)):_.warn("No event or event name given.")},b.sendAnalytics=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.analytics.sendEvent(e,t)}}).call(this,"modules/statistics/statistics.js")},function(e,t){e.exports={CREATE_ANSWER_FAILED:"rtc.create_answer_failed",CREATE_OFFER_FAILED:"rtc.create_offer_failed",DATA_CHANNEL_OPEN:"rtc.data_channel_open",ENDPOINT_CONN_STATUS_CHANGED:"rtc.endpoint_conn_status_changed",DOMINANT_SPEAKER_CHANGED:"rtc.dominant_speaker_changed",LASTN_ENDPOINT_CHANGED:"rtc.lastn_endpoint_changed",GRANTED_PERMISSIONS:"rtc.granted_permissions",SENDER_VIDEO_CONSTRAINTS_CHANGED:"rtc.sender_video_constraints_changed",LASTN_VALUE_CHANGED:"rtc.lastn_value_changed",LOCAL_TRACK_SSRC_UPDATED:"rtc.local_track_ssrc_updated",LOCAL_TRACK_MAX_ENABLED_RESOLUTION_CHANGED:"rtc.local_track_max_enabled_resolution_changed",TRACK_ATTACHED:"rtc.track_attached",REMOTE_TRACK_ADDED:"rtc.remote_track_added",REMOTE_TRACK_MUTE:"rtc.remote_track_mute",REMOTE_TRACK_REMOVED:"rtc.remote_track_removed",REMOTE_TRACK_UNMUTE:"rtc.remote_track_unmute",SET_LOCAL_DESCRIPTION_FAILED:"rtc.set_local_description_failed",SET_REMOTE_DESCRIPTION_FAILED:"rtc.set_remote_description_failed",AUDIO_OUTPUT_DEVICE_CHANGED:"rtc.audio_output_device_changed",DEVICE_LIST_CHANGED:"rtc.device_list_changed",DEVICE_LIST_WILL_CHANGE:"rtc.device_list_will_change",DEVICE_LIST_AVAILABLE:"rtc.device_list_available",ENDPOINT_MESSAGE_RECEIVED:"rtc.endpoint_message_received",LOCAL_UFRAG_CHANGED:"rtc.local_ufrag_changed",REMOTE_UFRAG_CHANGED:"rtc.remote_ufrag_changed"}},function(e,t,n){"use strict";function r(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return{type:o,source:"get.user.media",action:e,attributes:t}},L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:o,source:"peer.conn.status",action:"duration",attributes:e}},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:o,action:e,source:"jingle",attributes:t}},F=function(e,t){return{attributes:{media_type:e,value:t},action:"track.no.data.from.source",type:o}},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:o,action:e,source:"p2p",attributes:t}},U=function(){return{type:o,action:"remotely.muted"}},H=function(e){return{type:o,action:"rtp.stats",attributes:e}},B=function(e){return{type:o,action:"transport.stats",attributes:e}};function J(e,t,n){return{type:o,action:"audio.output.problem",attributes:{userID:e,localAudioLevels:t,remoteAudioLevels:n}}}var G=function(e,t){return{type:o,action:"bridge-channel.error",attributes:{code:e,reason:t}}},V=function(e){return D("ttfm",e)}},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return o});var r="audio",i="presenter",o="video"},function(e,t,n){"use strict";(function(e){var r=n(4),i=n(39),o=n.n(i),a=n(3),s=n(35),c=n.n(s),u=Object(r.getLogger)(e),d={filterSpecialChars:function(e){return e?e.replace(/[\\\/\{,\}\+]/g,""):e},iceparams:function(e,t){var n,r,i=null;return(r=d.findLine(e,"a=ice-ufrag:",t))&&(n=d.findLine(e,"a=ice-pwd:",t))&&(i={ufrag:d.parseICEUfrag(r),pwd:d.parseICEPwd(n)}),i},parseICEUfrag:function(e){return e.substring(12)},buildICEUfrag:function(e){return"a=ice-ufrag:"+e},parseICEPwd:function(e){return e.substring(10)},buildICEPwd:function(e){return"a=ice-pwd:"+e},parseMID:function(e){return e.substring(6)},parseMLine:function(e){var t={},n=e.substring(2).split(" ");return t.media=n.shift(),t.port=n.shift(),t.proto=n.shift(),""===n[n.length-1]&&n.pop(),t.fmt=n,t},buildMLine:function(e){return"m="+e.media+" "+e.port+" "+e.proto+" "+e.fmt.join(" ")},parseRTPMap:function(e){var t={},n=e.substring(9).split(" ");return t.id=n.shift(),n=n[0].split("/"),t.name=n.shift(),t.clockrate=n.shift(),t.channels=n.length?n.shift():"1",t},parseSCTPMap:function(e){var t=e.substring(10).split(" ");return[t[0],t[1],t.length>2?t[2]:null]},buildRTPMap:function(e){var t="a=rtpmap:"+e.getAttribute("id")+" "+e.getAttribute("name")+"/"+e.getAttribute("clockrate");return e.getAttribute("channels")&&"1"!==e.getAttribute("channels")&&(t+="/"+e.getAttribute("channels")),t},parseCrypto:function(e){var t={},n=e.substring(9).split(" ");return t.tag=n.shift(),t["crypto-suite"]=n.shift(),t["key-params"]=n.shift(),n.length&&(t["session-params"]=n.join(" ")),t},parseFingerprint:function(e){var t={},n=e.substring(14).split(" ");return t.hash=n.shift(),t.fingerprint=n.shift(),t},parseFmtp:function(e){var t=[],n=e.split(" ");n.shift(),n=n.join(" ").split(";");for(var r=0;r1&&0===n)){var r=null;if(1===t)r=e.ssrcs[0].id;else if(2===t){var i=e.ssrcGroups.find(function(e){return"FID"===e.semantics});i&&(r=i.ssrcs.split(" ")[0])}else if(t>=3){var o=e.ssrcGroups.find(function(e){return"SIM"===e.semantics});o&&(r=o.ssrcs.split(" ")[0])}return r}},generateSsrc:function(){return c.a.randomInt(1,4294967295)},getSsrcAttribute:function(e,t,n){for(var r=0;r0)return t[0].substr("a=ice-ufrag:".length)},preferCodec:function(e,t){if(e&&t){var n=e.rtp.filter(function(e){return e.codec&&e.codec.toLowerCase()===t.toLowerCase()}).map(function(e){return e.payload});if(n){var r=e.payloads.toString().split(" ").map(function(e){return parseInt(e,10)}),i=n.reverse(),o=Array.isArray(i),a=0;for(i=o?i:i["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var s;if(o){if(a>=i.length)break;s=i[a++]}else{if((a=i.next()).done)break;s=a.value}var c=s,u=r.indexOf(c);r.splice(u,1),r.unshift(c)}e.payloads=r.join(" ")}}},stripCodec:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e&&t){var r=[],i=[],a=t.toLowerCase()===o.a.H264&&n,s=e.rtp,c=Array.isArray(s),u=0;for(s=c?s:s["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var d;if(c){if(u>=s.length)break;d=s[u++]}else{if((u=s.next()).done)break;d=u.value}var l=d;l.codec&&l.codec.toLowerCase()===t.toLowerCase()&&(a?r.push(l.payload):i.push(l.payload))}if(a&&(i=e.fmtp.filter(function(e){return r.indexOf(e.payload)>-1&&e.config.includes("profile-level-id=64")}).map(function(e){return e.payload})),i.length>0){var h,p=i.map(function(e){return"apt="+e}),f=e.fmtp.filter(function(e){return-1!==p.indexOf(e.config)});(h=i).push.apply(h,_toConsumableArray(f.map(function(e){return e.payload})));var m=e.payloads.toString().split(" ").map(Number).filter(function(e){return-1===i.indexOf(e)});0===m.length?(e.port=0,e.direction="inactive",e.payloads="*"):e.payloads=m.join(" "),e.rtp=e.rtp.filter(function(e){return-1!==m.indexOf(e.payload)}),e.fmtp=e.fmtp.filter(function(e){return-1!==m.indexOf(e.payload)}),e.rtcpFb&&(e.rtcpFb=e.rtcpFb.filter(function(e){return-1!==m.indexOf(e.payload)}))}}}};t.a=d}).call(this,"modules/xmpp/SDPUtil.js")},function(e,t,n){"use strict";(function(e){var r=n(19),i=n.n(r),o=n(4),a=n(41),s=n.n(a),c=n(18),u=n(43),d=n.n(u),l=n(8),h=n(6),p=n.n(h),f=n(33),m=n.n(f),v=n(13),g=n.n(v),y=n(7),_=n(3),S=n(5),E=n(11),b=n.n(E),C=n(21),T=n(9),R=n(44);function A(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n={audio:!1,video:!1},r=_.a.isFirefox()||_.a.isSafari()||_.a.isReactNative();if(e.indexOf("video")>=0){if(n.video={mandatory:{},optional:[]},t.cameraDeviceId)r&&(n.video.deviceId=t.cameraDeviceId),n.video.mandatory.sourceId=t.cameraDeviceId;else{var i=t.facingMode||d.a.USER;r&&(n.video.facingMode=i),n.video.optional.push({facingMode:i})}(t.minFps||t.maxFps||t.fps)&&((t.minFps||t.fps)&&(t.minFps=t.minFps||t.fps,n.video.mandatory.minFrameRate=t.minFps),t.maxFps&&(n.video.mandatory.maxFrameRate=t.maxFps)),(function(e,t,n){m.a[n]&&(t&&(e.video.width={ideal:m.a[n].width},e.video.height={ideal:m.a[n].height}),e.video.mandatory.minWidth=m.a[n].width,e.video.mandatory.minHeight=m.a[n].height),e.video.mandatory.minWidth&&(e.video.mandatory.maxWidth=e.video.mandatory.minWidth),e.video.mandatory.minHeight&&(e.video.mandatory.maxHeight=e.video.mandatory.minHeight)})(n,r,t.resolution)}if(e.indexOf("audio")>=0&&(_.a.isReactNative()?n.audio=!0:_.a.isFirefox()?t.micDeviceId?n.audio={mandatory:{},deviceId:t.micDeviceId,optional:[{sourceId:t.micDeviceId}]}:n.audio=!0:(n.audio={mandatory:{},optional:[]},t.micDeviceId&&(r&&(n.audio.deviceId=t.micDeviceId),n.audio.optional.push({sourceId:t.micDeviceId})),n.audio.optional.push({echoCancellation:!j&&!F},{googEchoCancellation:!j&&!F},{googAutoGainControl:!H&&!F},{googNoiseSuppression:!U&&!F},{googHighpassFilter:!B&&!F},{googNoiseSuppression2:!U&&!F},{googEchoCancellation2:!j&&!F},{googAutoGainControl2:!H&&!F}))),e.indexOf("screen")>=0)if(_.a.isChrome())n.video={mandatory:q(A({},t,{source:"screen"})),optional:[]};else if(_.a.isFirefox())n.video={mozMediaSource:"window",mediaSource:"window",frameRate:t.frameRate||{min:M,max:M}};else{var o="'screen' WebRTC media source is supported only in Chrome and Firefox";b.a.callErrorHandler(new Error(o)),w.error(o)}return e.indexOf("desktop")>=0&&(n.video={mandatory:q(A({},t,{source:"desktop"})),optional:[]},_.a.isElectron()&&t.screenShareAudio&&t.desktopStream.indexOf("screen")>=0&&(n.audio={mandatory:{chromeMediaSource:n.video.mandatory.chromeMediaSource}},delete n.video.mandatory.chromeMediaSourceId)),t.bandwidth&&(n.video||(n.video={mandatory:{},optional:[]}),n.video.optional.push({bandwidth:t.bandwidth})),_.a.isFirefox()&&t.firefox_fake_device&&(n.fake=!0),n}function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.desktopStream,n=e.frameRate,r=void 0===n?{min:M,max:M}:n,i=r.max,o=r.min,a={chromeMediaSource:e.source,maxWidth:window.screen.width,maxHeight:window.screen.height};return"number"==typeof o&&(a.minFrameRate=o),"number"==typeof i&&(a.maxFrameRate=i),void 0!==t&&(a.chromeMediaSourceId=t),a}function K(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={frameRate:M},n=e.desktopSharingFrameRate;return n&&n.max&&(t.frameRate=n.max),t}function z(e,t){var n=Boolean(t)&&t.getAudioTracks().length>0,r=Boolean(t)&&t.getVideoTracks().length>0,i={};-1!==e.indexOf("video")&&(i.video=r),-1!==e.indexOf("audio")&&(i.audio=n),D.emit(p.a.GRANTED_PERMISSIONS,i)}function W(e){var t=e.filter(function(e){return"audioinput"===e.kind}).length,n=e.filter(function(e){return"audiooutput"===e.kind}).length,r=e.filter(function(e){return"videoinput"===e.kind}).length,i=e.filter(function(e){return"videooutput"===e.kind}).length;e.forEach(function(e){var o={audio_input_device_count:t,audio_output_device_count:n,video_input_device_count:r,video_output_device_count:i,device_id:e.deviceId,device_group_id:e.groupId,device_kind:e.kind,device_label:e.label};S.a.sendAnalytics(y.l,o)})}var $=new((function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,D))}return _inherits(t,e),_createClass(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("boolean"==typeof t.disableAEC&&(j=t.disableAEC,w.info("Disable AEC: "+j)),"boolean"==typeof t.disableNS&&(U=t.disableNS,w.info("Disable NS: "+U)),"boolean"==typeof t.disableAP&&(F=t.disableAP,w.info("Disable AP: "+F)),"boolean"==typeof t.disableAGC&&(H=t.disableAGC,w.info("Disable AGC: "+H)),"boolean"==typeof t.disableHPF&&(B=t.disableHPF,w.info("Disable HPF: "+B)),I=void 0,window.clearInterval(P),P=void 0,this.enumerateDevices=(function(){if(navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices)return function(e){navigator.mediaDevices.enumerateDevices().then(e,function(){return e([])})}})(),_.a.usesNewGumFlow())this.RTCPeerConnectionType=RTCPeerConnection,this.attachMediaStream=Q(function(e,t){e&&(e.srcObject=t)}),this.getStreamID=function(e){return e.id},this.getTrackID=function(e){return e.id};else{if(!_.a.isChromiumBased()&&!_.a.isReactNative()){var n="Endpoint does not appear to be WebRTC-capable";throw w.error(n),new Error(n)}this.RTCPeerConnectionType=RTCPeerConnection,this.attachMediaStream=Q(function(e,t){return(function(e,t){var n,r="srcObject";r in e||((r="mozSrcObject")in e||(r=null)),r?e[r]=t:(t&&((n=t.jitsiObjectURL)||(t.jitsiObjectURL=n=URL.createObjectURL(t))),e.src=n||"")})(e,t),e}),this.getStreamID=function(e){var t=e.id;return"number"==typeof t?t:T.a.filterSpecialChars(t)},this.getTrackID=function(e){return e.id},MediaStream.prototype.getVideoTracks||(MediaStream.prototype.getVideoTracks=function(){return this.videoTracks}),MediaStream.prototype.getAudioTracks||(MediaStream.prototype.getAudioTracks=function(){return this.audioTracks})}this._initPCConstraints(),R.a.init(t,this.getUserMediaWithConstraints.bind(this)),this.isDeviceListAvailable()&&this.enumerateDevices(function(t){I=t.splice(0),w.debug("Available devices: ",I),W(I),D.emit(p.a.DEVICE_LIST_AVAILABLE,I);var n=function(){return e.enumerateDevices(function(e){var t;(function(e){return e.length!==I.length||e.map(t).sort().join("")!==I.map(t).sort().join("");function t(e){return JSON.stringify({kind:e.kind,deviceId:e.deviceId,groupId:e.groupId,label:e.label,facing:e.facing})}})(e)&&(I=(t=e).slice(0),w.info("list of media devices has changed:",I),W(I),D.emit(p.a.DEVICE_LIST_WILL_CHANGE,t),D.emit(p.a.DEVICE_LIST_CHANGED,t))})};_.a.supportsDeviceChangeEvent()?navigator.mediaDevices.addEventListener("devicechange",n):P=window.setInterval(n,3e3)})}},{key:"_initPCConstraints",value:function(){_.a.isFirefox()?this.pcConstraints={}:(_.a.isChromiumBased()||_.a.isReactNative())&&(this.pcConstraints={optional:[{googHighStartBitrate:0},{googPayloadPadding:!0},{googScreencastMinBitrate:100},{googCpuOveruseDetection:!0},{googCpuOveruseEncodeUsage:!0},{googCpuUnderuseThreshold:55},{googCpuOveruseThreshold:85}]},this.p2pPcConstraints=JSON.parse(JSON.stringify(this.pcConstraints))),this.p2pPcConstraints=this.p2pPcConstraints||this.pcConstraints}},{key:"getUserMediaWithConstraints",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=V(e,t);return w.info("Get media constraints",n),new Promise(function(t,r){navigator.mediaDevices.getUserMedia(n).then(function(n){w.log("onUserMediaSuccess"),z(e,n),t(n)}).catch(function(t){w.warn("Failed to get access to local media. "+t+" "+n+" "),z(e,void 0),r(new c.a(t,n,e))})})}},{key:"_newGetUserMediaWithConstraints",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,r){navigator.mediaDevices.getUserMedia(t).then(function(t){w.log("onUserMediaSuccess"),z(e,t),n(t)}).catch(function(n){w.warn("Failed to get access to local media. "+n+" "+t+" "),z(e,void 0),r(new c.a(n,t,e))})})}},{key:"_newGetDesktopMedia",value:function(e){var t=this;return R.a.isSupported()&&_.a.supportsVideo()?new Promise(function(n,r){R.a.obtainStream(t._parseDesktopSharingOptions(e),function(e){n(e)},function(e){r(e)})}):Promise.reject(new Error("Desktop sharing is not supported!"))}},{key:"obtainAudioAndVideoPermissions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.devices=e.devices||O.concat(),e.resolution=e.resolution||720,e.devices.includes("desktop")&&!R.a.isSupported()?Promise.reject(new Error("Desktop sharing is not supported!")):this._getAudioAndVideoStreams(e).then(function(t){return(function(e,t){var n,r,i,o=[];if(e){var a=e.audioVideo;if(a){var s=a.getAudioTracks();if(s.length){n=new MediaStream;for(var c=0;c0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=[],r=e.includes("audio"),i=t&&t.getAudioTracks().length>0;r&&!i&&n.push("audio");var o=e.includes("video"),a=t&&t.getVideoTracks().length>0;return o&&!a&&n.push("video"),n}},{key:"_parseDesktopSharingOptions",value:function(e){return{desktopSharingSources:e.desktopSharingSources,gumOptions:{frameRate:e.desktopSharingFrameRate},trackOptions:K(e)}}},{key:"newObtainAudioAndVideoPermissions",value:function(e){var t=this;w.info("Using the new gUM flow");var n=[],r=function(){if(-1===(e.devices||[]).indexOf("desktop"))return Promise.resolve();var t=e.desktopSharingSourceDevice,n=e.desktopSharingSources,r=e.desktopSharingFrameRate;if(t){var i=I&&I.find(function(e){return"videoinput"===e.kind&&(e.deviceId===t||e.label===t)});if(!i)return Promise.reject(new c.a({name:"ConstraintNotSatisfiedError"},{},[t]));var o=this._parseDesktopSharingOptions(e),a=o.gumOptions,s=o.trackOptions,u={video:A({},a,{deviceId:i.deviceId})};return this._newGetUserMediaWithConstraints(["video"],u).then(function(e){var t=e&&e.getTracks()[0];return(t&&t.applyConstraints?t.applyConstraints(s):Promise.resolve()).then(function(){return{sourceType:"device",stream:e}})})}return this._newGetDesktopMedia({desktopSharingSources:n,desktopSharingFrameRate:r})}.bind(this),i=function(){var t=(e.devices||["audio","video"]).filter(function(e){return"audio"===e||"video"===e&&_.a.supportsVideo()});if(!t.length)return Promise.resolve();var n=(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=s()(t.constraints||N);if(e.indexOf("video")>=0)if(n.video||(n.video={}),_.a.isSafari()&&(n.video.height&&n.video.height.ideal?n.video.height={ideal:s()(n.video.height.ideal)}:w.warn("Ideal camera height missing, camera may not start properly"),n.video.width&&n.video.width.ideal?n.video.width={ideal:s()(n.video.width.ideal)}:w.warn("Ideal camera width missing, camera may not start properly")),t.cameraDeviceId)n.video.deviceId=t.cameraDeviceId;else{var r=t.facingMode||d.a.USER;n.video.facingMode=r}else n.video=!1;return e.indexOf("audio")>=0?(n.audio&&"boolean"!=typeof n.audio||(n.audio={}),_.a.isFirefox()||_.a.isSafari()?n.audio={deviceId:t.micDeviceId,autoGainControl:!H&&!F,echoCancellation:!j&&!F,noiseSuppression:!U&&!F}:(n.audio.optional||(n.audio.optional=[]),n.audio.optional.push({sourceId:t.micDeviceId},{echoCancellation:!j&&!F},{googEchoCancellation:!j&&!F},{googAutoGainControl:!H&&!F},{googNoiseSuppression:!U&&!F},{googHighpassFilter:!B&&!F},{googNoiseSuppression2:!U&&!F},{googEchoCancellation2:!j&&!F},{googAutoGainControl2:!H&&!F}))):n.audio=!1,e.indexOf("desktop")>=0&&(n.video&&"boolean"!=typeof n.video||(n.video={}),n.video={mandatory:q(A({},t,{source:"desktop"}))}),n})(t,e);return w.info("Got media constraints: ",n),this._newGetUserMediaWithConstraints(t,n)}.bind(this);return r().then(function(e){if(e){var t=e.stream,r=e.sourceId,i=e.sourceType,o=t.getAudioTracks();if(o.length){var a=new MediaStream(o);n.push({stream:a,sourceId:r,sourceType:i,track:a.getAudioTracks()[0]})}var s=t.getVideoTracks();if(s.length){var c=new MediaStream(s);n.push({stream:c,sourceId:r,sourceType:i,track:c.getVideoTracks()[0],videoType:g.a.DESKTOP})}}}).then(i).then(function(t){if(t){var r=t.getAudioTracks();if(r.length){var i=new MediaStream(r);n.push({stream:i,track:i.getAudioTracks()[0],effects:e.effects})}var o=t.getVideoTracks();if(o.length){var a=new MediaStream(o);n.push({stream:a,track:a.getVideoTracks()[0],videoType:g.a.CAMERA,effects:e.effects})}}}).then(function(){return n}).catch(function(e){return n.forEach(function(e){var n=e.stream;t.stopMediaStream(n)}),Promise.reject(e)})}},{key:"isDeviceListAvailable",value:function(){return Boolean(navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices)}},{key:"isDeviceChangeAvailable",value:function(e){return"output"!==e&&"audiooutput"!==e||G}},{key:"stopMediaStream",value:function(e){if(e){e.getTracks().forEach(function(e){e.stop&&e.stop()}),e.stop&&e.stop(),e.release&&e.release();var t=e.jitsiObjectURL;t&&(delete e.jitsiObjectURL,URL.revokeObjectURL(t))}}},{key:"isDesktopSharingEnabled",value:function(){return R.a.isSupported()}},{key:"setAudioOutputDevice",value:function(e){return this.isDeviceChangeAvailable("output")?J.setSinkId(e).then(function(){L=e,x=!0,w.log("Audio output device set to "+e),D.emit(p.a.AUDIO_OUTPUT_DEVICE_CHANGED,e)}):Promise.reject(new Error("Audio output device change is not supported"))}},{key:"getAudioOutputDevice",value:function(){return L}},{key:"getCurrentlyAvailableMediaDevices",value:function(){return I}},{key:"getEventDataForActiveDevice",value:function(e){var t=[],n={deviceId:e.deviceId,kind:e.kind,label:e.label,groupId:e.groupId};return t.push(n),{deviceList:t}}},{key:"setSuspendVideo",value:function(e,t){e.optional||(e.optional=[]),e.optional=e.optional.filter(function(e){return!e.hasOwnProperty("googSuspendBelowMinBitrate")}),t&&e.optional.push({googSuspendBelowMinBitrate:"true"})}}]),t})(C.a));function Q(e){return function(t,n){var r=e.apply($,arguments);return n&&$.isDeviceChangeAvailable("output")&&n.getAudioTracks&&n.getAudioTracks().length&&x&&t.setSinkId($.getAudioOutputDevice()).catch(function(e){var n=new c.a(e,null,["audiooutput"]);b.a.callUnhandledRejectionHandler({promise:this,reason:n}),w.warn("Failed to set audio output device for the element. Default audio output device will be used instead",t,n)}),r}}t.a=$}).call(this,"modules/RTC/RTCUtils.js")},function(e,t){var n=[],r=window.onerror,i=window.onunhandledrejection;window.onerror=function(){for(var e=arguments.length,t=new Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){var t=e.sourceId,n=e.sourceType,r=e.stream,i=e.track,o=e.videoType,a=e.effects,s=i.getSettings(),c=s.deviceId,u=s.facingMode;return C=Object(m.d)(C),new g.a({deviceId:c,facingMode:u,mediaType:i.kind,rtcId:C,sourceId:t,sourceType:n,stream:r,track:i,videoType:o||null,effects:a})})}var A=(function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _classCallCheck(this,t),(n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this))).conference=e,n.peerConnections=new Map,n.localTracks=[],n.options=r,n._channel=null,n._lastN=-1,n._lastNEndpoints=null,n._senderVideoConstraints={},n._maxFrameHeight=void 0,n._pinnedEndpoint=null,n._selectedEndpoints=[],n._lastNChangeListener=n._onLastNChanged.bind(_assertThisInitialized(_assertThisInitialized(n))),n._onDeviceListChanged=n._onDeviceListChanged.bind(_assertThisInitialized(_assertThisInitialized(n))),n._updateAudioOutputForAudioTracks=n._updateAudioOutputForAudioTracks.bind(_assertThisInitialized(_assertThisInitialized(n))),y.a.isDeviceChangeAvailable("output")&&(y.a.addListener(s.a.AUDIO_OUTPUT_DEVICE_CHANGED,n._updateAudioOutputForAudioTracks),y.a.addListener(s.a.DEVICE_LIST_CHANGED,n._onDeviceListChanged)),n}return _inherits(t,e),_createClass(t,[{key:"destroy",value:function(){y.a.removeListener(s.a.AUDIO_OUTPUT_DEVICE_CHANGED,this._updateAudioOutputForAudioTracks),y.a.removeListener(s.a.DEVICE_LIST_CHANGED,this._onDeviceListChanged),this.removeListener(s.a.LASTN_ENDPOINT_CHANGED,this._lastNChangeListener),this._channelOpenListener&&this.removeListener(s.a.DATA_CHANNEL_OPEN,this._channelOpenListener)}},{key:"initializeBridgeChannel",value:function(e,t){var n=this;this._channel=new v.a(e,t,this.eventEmitter,this._senderVideoConstraintsChanged.bind(this)),this._channelOpenListener=function(){try{n._channel.sendPinnedEndpointMessage(n._pinnedEndpoint),n._channel.sendSelectedEndpointsMessage(n._selectedEndpoints),void 0!==n._maxFrameHeight&&n._channel.sendReceiverVideoConstraintMessage(n._maxFrameHeight)}catch(e){p.a.callErrorHandler(e),E.error("Cannot send selected("+n._selectedEndpoint+")pinned("+n._pinnedEndpoint+")frameHeight("+n._maxFrameHeight+") endpoint message",e)}n.removeListener(s.a.DATA_CHANNEL_OPEN,n._channelOpenListener),n._channelOpenListener=null,-1!==n._lastN&&n._channel.sendSetLastNMessage(n._lastN)},this.addListener(s.a.DATA_CHANNEL_OPEN,this._channelOpenListener),this.addListener(s.a.LASTN_ENDPOINT_CHANGED,this._lastNChangeListener)}},{key:"_onDeviceListChanged",value:function(){this._updateAudioOutputForAudioTracks(y.a.getAudioOutputDevice())}},{key:"_senderVideoConstraintsChanged",value:function(e){this._senderVideoConstraints=e,this.eventEmitter.emit(s.a.SENDER_VIDEO_CONSTRAINTS_CHANGED)}},{key:"_onLastNChanged",value:function(){var e,t,n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=this._lastNEndpoints||[];this._lastNEndpoints=r,e=o.filter(function(e){return!n.isInLastN(e)}),t=r.filter(function(e){return-1===o.indexOf(e)}),this.conference.eventEmitter.emit(i.LAST_N_ENDPOINTS_CHANGED,e,t)}},{key:"onCallEnded",value:function(){this._channel&&(this._channel&&"websocket"===this._channel.mode&&this._channel.close(),this._channel=null)}},{key:"setReceiverVideoConstraint",value:function(e){this._maxFrameHeight=e,this._channel&&this._channel.isOpen()&&this._channel.sendReceiverVideoConstraintMessage(e)}},{key:"selectEndpoints",value:function(e){this._selectedEndpoints=e,this._channel&&this._channel.isOpen()&&this._channel.sendSelectedEndpointsMessage(e)}},{key:"pinEndpoint",value:function(e){this._pinnedEndpoint=e,this._channel&&this._channel.isOpen()&&this._channel.sendPinnedEndpointMessage(e)}},{key:"createPeerConnection",value:function(e,n,r,i){var o=t.getPCConstraints(r);void 0!==i.abtestSuspendVideo&&(y.a.setSuspendVideo(o,i.abtestSuspendVideo),l.a.analytics.addPermanentProperties({abtestSuspendVideo:i.abtestSuspendVideo})),i.enableInsertableStreams&&(E.debug("E2EE - setting insertable streams constraints"),n.encodedInsertableStreams=!0,n.forceEncodedAudioInsertableStreams=!0,n.forceEncodedVideoInsertableStreams=!0),d.a.supportsSdpSemantics()&&(n.sdpSemantics="plan-b"),n.bundlePolicy="max-bundle",b=Object(m.d)(b);var a=new _.a(this,b,e,n,o,r,i);return this.peerConnections.set(a.id,a),a}},{key:"_removePeerConnection",value:function(e){var t=e.id;return!!this.peerConnections.has(t)&&(this.peerConnections.delete(t),!0)}},{key:"addLocalTrack",value:function(e){if(!e)throw new Error("track must not be null nor undefined");this.localTracks.push(e),e.conference=this.conference}},{key:"getLastN",value:function(){return this._lastN}},{key:"getSenderVideoConstraints",value:function(){return this._senderVideoConstraints}},{key:"getLocalVideoTrack",value:function(){var e=this.getLocalTracks(o.c);return e.length?e[0]:void 0}},{key:"getLocalAudioTrack",value:function(){var e=this.getLocalTracks(o.a);return e.length?e[0]:void 0}},{key:"getLocalTracks",value:function(e){var t=this.localTracks.slice();return void 0!==e&&(t=t.filter(function(t){return t.getType()===e})),t}},{key:"getRemoteTracks",value:function(e){var t=[],n=this.peerConnections.values(),r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o.getRemoteTracks(void 0,e);a&&(t=t.concat(a))}return t}},{key:"setAudioMute",value:function(e){var t=[];return this.getLocalTracks(o.a).forEach(function(n){t.push(e?n.mute():n.unmute())}),Promise.all(t)}},{key:"removeLocalTrack",value:function(e){var t=this.localTracks.indexOf(e);-1!==t&&this.localTracks.splice(t,1)}},{key:"removeRemoteTracks",value:function(e){var t=[],n=this.peerConnections.values(),r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o.removeRemoteTracks(e);t=t.concat(a)}return E.debug("Removed remote tracks for "+e+" count: "+t.length),t}},{key:"closeBridgeChannel",value:function(){this._channel&&(this._channel.close(),this._channel=null,this.removeListener(s.a.LASTN_ENDPOINT_CHANGED,this._lastNChangeListener))}},{key:"setAudioLevel",value:function(e,t,n,r){var i=e.getTrackBySSRC(t);i&&(i.isAudioTrack()?(i.isLocal()!==r&&E.error(i+" was expected to "+(r?"be":"not be")+" local"),i.setAudioLevel(n,e)):E.warn("Received audio level for non-audio track: "+t))}},{key:"sendChannelMessage",value:function(e,t){if(!this._channel)throw new Error("Channel support is disabled!");this._channel.sendMessage(e,t)}},{key:"setLastN",value:function(e){this._lastN!==e&&(this._lastN=e,this._channel&&this._channel.isOpen()&&this._channel.sendSetLastNMessage(e),this.eventEmitter.emit(s.a.LASTN_VALUE_CHANGED,e))}},{key:"isInLastN",value:function(e){return!this._lastNEndpoints||this._lastNEndpoints.indexOf(e)>-1}},{key:"_updateAudioOutputForAudioTracks",value:function(e){var t=this.getRemoteTracks(o.a),n=Array.isArray(t),r=0;for(t=n?t:t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}i.setAudioOutput(e)}}}],[{key:"newCreateLocalTracks",value:function(e){return R(e)}},{key:"obtainAudioAndVideoPermissions",value:function(e){var t=d.a.usesNewGumFlow();return(t?y.a.newObtainAudioAndVideoPermissions(e):y.a.obtainAudioAndVideoPermissions(e)).then(function(n){return t?R(n):T(n,e)})}},{key:"addListener",value:function(e,t){y.a.addListener(e,t)}},{key:"removeListener",value:function(e,t){y.a.removeListener(e,t)}},{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.options=e,y.a.init(this.options)}},{key:"getPCConstraints",value:function(e){var t=e?y.a.p2pPcConstraints:y.a.pcConstraints;return t?JSON.parse(JSON.stringify(t)):{}}},{key:"attachMediaStream",value:function(e,t){return y.a.attachMediaStream(e,t)}},{key:"getStreamID",value:function(e){return y.a.getStreamID(e)}},{key:"getTrackID",value:function(e){return y.a.getTrackID(e)}},{key:"isDeviceListAvailable",value:function(){return y.a.isDeviceListAvailable()}},{key:"isDeviceChangeAvailable",value:function(e){return y.a.isDeviceChangeAvailable(e)}},{key:"isWebRtcSupported",value:function(){return d.a.isSupported()}},{key:"getAudioOutputDevice",value:function(){return y.a.getAudioOutputDevice()}},{key:"getCurrentlyAvailableMediaDevices",value:function(){return y.a.getCurrentlyAvailableMediaDevices()}},{key:"getEventDataForActiveDevice",value:function(e){return y.a.getEventDataForActiveDevice(e)}},{key:"setAudioOutputDevice",value:function(e){return y.a.setAudioOutputDevice(e)}},{key:"isUserStream",value:function(e){return t.isUserStreamById(y.a.getStreamID(e))}},{key:"isUserStreamById",value:function(e){return e&&"mixedmslabel"!==e&&"default"!==e}},{key:"enumerateDevices",value:function(e){y.a.enumerateDevices(e)}},{key:"stopMediaStream",value:function(e){y.a.stopMediaStream(e)}},{key:"isDesktopSharingEnabled",value:function(){return y.a.isDesktopSharingEnabled()}}]),t})(f.a)}).call(this,"modules/RTC/RTC.js")},function(e,t){e.exports={CAMERA:"camera",DESKTOP:"desktop"}},function(e,t,n){"use strict";n.r(t),n.d(t,"CONSTRAINT_FAILED",function(){return r}),n.d(t,"ELECTRON_DESKTOP_PICKER_ERROR",function(){return i}),n.d(t,"ELECTRON_DESKTOP_PICKER_NOT_FOUND",function(){return o}),n.d(t,"GENERAL",function(){return a}),n.d(t,"NOT_FOUND",function(){return s}),n.d(t,"PERMISSION_DENIED",function(){return c}),n.d(t,"SCREENSHARING_GENERIC_ERROR",function(){return u}),n.d(t,"SCREENSHARING_USER_CANCELED",function(){return d}),n.d(t,"TRACK_IS_DISPOSED",function(){return l}),n.d(t,"TRACK_NO_STREAM_FOUND",function(){return h}),n.d(t,"UNSUPPORTED_RESOLUTION",function(){return p});var r="gum.constraint_failed",i="gum.electron_desktop_picker_error",o="gum.electron_desktop_picker_not_found",a="gum.general",s="gum.not_found",c="gum.permission_denied",u="gum.screensharing_generic_error",d="gum.screensharing_user_canceled",l="track.track_is_disposed",h="track.no_stream_found",p="gum.unsupported_resolution"},function(e,t,n){"use strict";n.r(t),n.d(t,"LOCAL_TRACK_STOPPED",function(){return r}),n.d(t,"TRACK_AUDIO_LEVEL_CHANGED",function(){return i}),n.d(t,"TRACK_AUDIO_OUTPUT_CHANGED",function(){return o}),n.d(t,"TRACK_MUTE_CHANGED",function(){return a}),n.d(t,"TRACK_VIDEOTYPE_CHANGED",function(){return s}),n.d(t,"NO_DATA_FROM_SOURCE",function(){return c}),n.d(t,"NO_AUDIO_INPUT",function(){return u});var r="track.stopped",i="track.audioLevelsChanged",o="track.audioOutputChanged",a="track.trackMuteChanged",s="track.videoTypeChanged",c="track.no_data_from_source",u="track.no_audio_input"},function(e,t,n){"use strict";n.r(t),n.d(t,"AUTHENTICATION_REQUIRED",function(){return r}),n.d(t,"CHAT_ERROR",function(){return i}),n.d(t,"CONFERENCE_DESTROYED",function(){return o}),n.d(t,"CONFERENCE_MAX_USERS",function(){return a}),n.d(t,"CONNECTION_ERROR",function(){return s}),n.d(t,"NOT_ALLOWED_ERROR",function(){return c}),n.d(t,"MEMBERS_ONLY_ERROR",function(){return u}),n.d(t,"CONFERENCE_ACCESS_DENIED",function(){return d}),n.d(t,"FOCUS_DISCONNECTED",function(){return l}),n.d(t,"FOCUS_LEFT",function(){return h}),n.d(t,"GRACEFUL_SHUTDOWN",function(){return p}),n.d(t,"ICE_FAILED",function(){return f}),n.d(t,"INCOMPATIBLE_SERVER_VERSIONS",function(){return m}),n.d(t,"OFFER_ANSWER_FAILED",function(){return v}),n.d(t,"PASSWORD_NOT_SUPPORTED",function(){return g}),n.d(t,"PASSWORD_REQUIRED",function(){return y}),n.d(t,"RESERVATION_ERROR",function(){return _}),n.d(t,"VIDEOBRIDGE_NOT_AVAILABLE",function(){return S});var r="conference.authenticationRequired",i="conference.chatError",o="conference.destroyed",a="conference.max_users",s="conference.connectionError",c="conference.connectionError.notAllowed",u="conference.connectionError.membersOnly",d="conference.connectionError.accessDenied",l="conference.focusDisconnected",h="conference.focusLeft",p="conference.gracefulShutdown",f="conference.iceFailed",m="conference.incompatible_server_versions",v="conference.offerAnswerFailed",g="conference.passwordNotSupported",y="conference.passwordRequired",_="conference.reservationError",S="conference.videobridgeNotAvailable"},function(e,t,n){"use strict";n.d(t,"a",function(){return S}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return b});var r={};n.r(r),n.d(r,"CHROME",function(){return a}),n.d(r,"OPERA",function(){return s}),n.d(r,"FIREFOX",function(){return c}),n.d(r,"INTERNET_EXPLORER",function(){return u}),n.d(r,"SAFARI",function(){return d}),n.d(r,"NWJS",function(){return l}),n.d(r,"ELECTRON",function(){return h}),n.d(r,"REACT_NATIVE",function(){return p}),n.d(r,"UNKNOWN",function(){return f}),n(68);var i=n(81),o=n.n(i),a="chrome",s="opera",c="firefox",u="iexplorer",d="safari",l="nwjs",h="electron",p="react-native",f="unknown",m={Chrome:a,Chromium:a,Opera:s,Firefox:c,"Internet Explorer":u,Safari:d};function v(){var e=navigator.userAgent;if(e.match(/Electron/)){var t=e.match(/Electron\/([\d.]+)/)[1];return{name:h,version:t}}}function g(){var e=navigator.userAgent;if(e.match(/JitsiMeetNW/)){var t=e.match(/JitsiMeetNW\/([\d.]+)/)[1];return{name:l,version:t}}}function y(){var e,t,n=navigator.userAgent.match(/\b(react[ \t_-]*native)(?:\/(\S+))?/i);if(n||"ReactNative"===navigator.product)return n&&n.length>2&&(t=n[1],e=n[2]),t||(t="react-native"),e||(e="unknown"),{name:p,version:e}}function _(e){for(var t,n=[y,v,g],r=0;r72&&(t.name=a,t.version=n)}else t.name=a,t.version=e.match(/Chrome\/([\d.]+)/)[1];return t})())||{name:f,version:void 0}}var S=(function(){function e(t){var n,r;if(_classCallCheck(this,e),this._bowser=o.a.getParser(navigator.userAgent),void 0===t){var i=_(this._bowser);n=i.name,r=i.version}else t.name in m?(n=m[t.name],r=t.version):(n=f,r=void 0);this._name=n,this._version=r}return _createClass(e,[{key:"getName",value:function(){return this._name}},{key:"isChrome",value:function(){return this._name===a}},{key:"isOpera",value:function(){return this._name===s}},{key:"isFirefox",value:function(){return this._name===c}},{key:"isIExplorer",value:function(){return this._name===u}},{key:"isSafari",value:function(){return this._name===d}},{key:"isNWJS",value:function(){return this._name===l}},{key:"isElectron",value:function(){return this._name===h}},{key:"isReactNative",value:function(){return this._name===p}},{key:"getVersion",value:function(){return this._version}},{key:"_checkCondition",value:function(e){if(this._version)return this._bowser.satisfies(e)}},{key:"isVersionGreaterThan",value:function(e){return this._checkCondition(_defineProperty({},this._name,">"+e))}},{key:"isVersionLessThan",value:function(e){return this._checkCondition(_defineProperty({},this._name,"<"+e))}},{key:"isVersionEqualTo",value:function(e){return this._checkCondition(_defineProperty({},this._name,"~"+e))}}]),e})(),E=(function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"getItem",value:function(){}},{key:"setItem",value:function(){}},{key:"removeItem",value:function(){}},{key:"key",value:function(){}}]),e})(),b=new((function(e){function t(){var e,n;_classCallCheck(this,t),e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this));try{n=window.localStorage}catch(n){}return e.storage=n||new E,e}return _inherits(t,E),_createClass(t,[{key:"getItem",value:function(e){return this.storage.getItem(e)}},{key:"setItem",value:function(e,t){return this.storage.setItem(e,t)}},{key:"removeItem",value:function(e){return this.storage.removeItem(e)}},{key:"key",value:function(e){return this.storage.key(e)}}]),t})())},function(e,t,n){"use strict";var r=n(14),i={};function o(e,t,n){if("object"==typeof e&&void 0!==e.name)switch(this.gum={error:e,constraints:t,devices:n&&Array.isArray(n)?n.slice(0):void 0},e.name){case"NotAllowedError":case"PermissionDeniedError":case"SecurityError":this.name=r.PERMISSION_DENIED,this.message=i[this.name]+(this.gum.devices||[]).join(", ");break;case"DevicesNotFoundError":case"NotFoundError":this.name=r.NOT_FOUND,this.message=i[this.name]+(this.gum.devices||[]).join(", ");break;case"ConstraintNotSatisfiedError":case"OverconstrainedError":var o=e.constraintName||e.constraint;t&&t.video&&(!n||n.indexOf("video")>-1)&&("minWidth"===o||"maxWidth"===o||"minHeight"===o||"maxHeight"===o||"width"===o||"height"===o||"deviceId"===o)?(this.name=r.UNSUPPORTED_RESOLUTION,this.message=i[this.name]+(function(e,t){if(t&&t.video&&t.video.mandatory)switch(e){case"width":return t.video.mandatory.minWidth;case"height":return t.video.mandatory.minHeight;default:return t.video.mandatory[e]||""}return""})(o,t)):(this.name=r.CONSTRAINT_FAILED,this.message=i[this.name]+e.constraintName);break;default:this.name=r.GENERAL,this.message=e.message||i[this.name]}else{if("string"!=typeof e)throw new Error("Invalid arguments");i[e]?(this.name=e,this.message=t||i[e]):this.message=e}this.stack=e.stack||(new Error).stack}i[r.UNSUPPORTED_RESOLUTION]="Video resolution is not supported: ",i[r.SCREENSHARING_USER_CANCELED]="User canceled screen sharing prompt",i[r.SCREENSHARING_GENERIC_ERROR]="Unknown error from screensharing",i[r.ELECTRON_DESKTOP_PICKER_ERROR]="Unkown error from desktop picker",i[r.ELECTRON_DESKTOP_PICKER_NOT_FOUND]="Failed to detect desktop picker",i[r.GENERAL]="Generic getUserMedia error",i[r.PERMISSION_DENIED]="User denied permission to use device(s): ",i[r.NOT_FOUND]="Requested device(s) was/were not found: ",i[r.CONSTRAINT_FAILED]="Constraint could not be satisfied: ",i[r.TRACK_IS_DISPOSED]="Track has been already disposed",i[r.TRACK_NO_STREAM_FOUND]="Track does not have an associated Media Stream",o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,t.a=o},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function d(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,o,a,s;if(u(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=d(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?(function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var u=c.length,d=v(c,u);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():(function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(3),i=n(9);function o(e){for(var t=e.split("\r\nm="),n=1,r=t.length;n=m.length)break;y=m[g++]}else{if((g=m.next()).done)break;y=g.value}var _=_slicedToArray(y,2),S=_[0],E=_[1];e.c("source",{ssrc:S,xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}),E.forEach(function(t){var n=t.indexOf(" "),r=t.substr(n+1);if(e.c("parameter"),-1===r.indexOf(":"))e.attrs({name:r});else{var o=r.split(":",2)[0];e.attrs({name:o});var a=r.split(":",2)[1];a=i.a.filterSpecialChars(a),e.attrs({value:a})}e.up()}),e.up()}i.a.findLines(this.media[n],"a=ssrc-group:").forEach(function(t){var n=t.indexOf(" "),r=t.substr(0,n).substr(13),i=t.substr(14+r.length).split(" ");i.length&&(e.c("ssrc-group",{semantics:r,xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}),i.forEach(function(t){return e.c("source",{ssrc:t}).up()}),e.up())})}var b=i.a.findLines(this.media[n],"a=rid");if(b.length&&r.a.usesRidsForSimulcast()){var C=b.map(function(e){return e.split(":")[1]}).map(function(e){return e.split(" ")[0]});C.forEach(function(t){e.c("source",{rid:t,xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}),e.up()}),i.a.findLine(this.media[n],"a=simulcast")&&(e.c("rid-group",{semantics:"SIM",xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}),C.forEach(function(t){e.c("source",{rid:t}).up()}),e.up())}i.a.findLine(this.media[n],"a=rtcp-mux")&&e.c("rtcp-mux").up(),this.rtcpFbToJingle(n,e,"*");for(var T=i.a.findLines(this.media[n],"a=extmap:"),R=0;R2&&t.attrs({streams:o[2]}),t.up()}i.a.findLines(this.media[e],"a=fingerprint:",this.session).forEach(function(r){var o=i.a.parseFingerprint(r);o.xmlns="urn:xmpp:jingle:apps:dtls:0",t.c("fingerprint").t(o.fingerprint),delete o.fingerprint;var a=i.a.findLine(n.media[e],"a=setup:",n.session);a&&(o.setup=a.substr(8)),t.attrs(o),t.up()});var a=i.a.iceparams(this.media[e],this.session);a&&(a.xmlns="urn:xmpp:jingle:transports:ice-udp:1",t.attrs(a),i.a.findLines(this.media[e],"a=candidate:",this.session).forEach(function(e){var r=i.a.candidateToJingle(e);n.failICE&&(r.ip="1.1.1.1");var o=r&&"string"==typeof r.protocol?r.protocol.toLowerCase():"";n.removeTcpCandidates&&("tcp"===o||"ssltcp"===o)||n.removeUdpCandidates&&"udp"===o||t.c("candidate",r).up()})),t.up()},o.prototype.rtcpFbToJingle=function(e,t,n){i.a.findLines(this.media[e],"a=rtcp-fb:"+n).forEach(function(e){var n=i.a.parseRTCPFB(e);"trr-int"===n.type?(t.c("rtcp-fb-trr-int",{xmlns:"urn:xmpp:jingle:apps:rtp:rtcp-fb:0",value:n.params[0]}),t.up()):(t.c("rtcp-fb",{xmlns:"urn:xmpp:jingle:apps:rtp:rtcp-fb:0",type:n.type}),n.params.length>0&&t.attrs({subtype:n.params[0]}),t.up())})},o.prototype.rtcpFbFromJingle=function(e,t){var n="",r=e.find('>rtcp-fb-trr-int[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]');return r.length&&(n+="a=rtcp-fb:* trr-int ",r.attr("value")?n+=r.attr("value"):n+="0",n+="\r\n"),e.find('>rtcp-fb[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]').each(function(e,r){n+="a=rtcp-fb:"+t+" "+r.getAttribute("type"),r.hasAttribute("subtype")&&(n+=" "+r.getAttribute("subtype")),n+="\r\n"}),n},o.prototype.fromJingle=function(e){var t=this,n=Date.now();this.raw="v=0\r\no=- "+n+" 2 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\n";var r=$(e).find('>group[xmlns="urn:xmpp:jingle:apps:grouping:0"]');r.length&&r.each(function(e,n){var r=$(n).find(">content").map(function(e,t){return t.getAttribute("name")}).get();r.length>0&&(t.raw+="a=group:"+(n.getAttribute("semantics")||n.getAttribute("type"))+" "+r.join(" ")+"\r\n")}),this.session=this.raw,e.find(">content").each(function(e,n){var r=t.jingle2media($(n));t.media.push(r)}),this.raw=this.session+this.media.join("")},o.prototype.jingle2media=function(e){var t=this,n=e.find(">description"),r=e.find('>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]'),o="",a=r.find('>sctpmap[xmlns="urn:xmpp:jingle:transports:dtls-sctp:1"]'),s={media:n.attr("media"),port:"1"};if("rejected"===e.attr("senders")&&(s.port="0"),r.find('>fingerprint[xmlns="urn:xmpp:jingle:apps:dtls:0"]').length?s.proto=a.length?"DTLS/SCTP":"RTP/SAVPF":s.proto="RTP/AVPF",a.length){o+="m=application "+s.port+" DTLS/SCTP "+a.attr("number")+"\r\n",o+="a=sctpmap:"+a.attr("number")+" "+a.attr("protocol");var c=a.attr("streams");o+=c?" "+c+"\r\n":"\r\n"}else s.fmt=n.find(">payload-type").map(function(e,t){return t.getAttribute("id")}).get(),o+=i.a.buildMLine(s)+"\r\n";switch(o+="c=IN IP4 0.0.0.0\r\n",a.length||(o+="a=rtcp:1 IN IP4 0.0.0.0\r\n"),r.length&&(r.attr("ufrag")&&(o+=i.a.buildICEUfrag(r.attr("ufrag"))+"\r\n"),r.attr("pwd")&&(o+=i.a.buildICEPwd(r.attr("pwd"))+"\r\n"),r.find('>fingerprint[xmlns="urn:xmpp:jingle:apps:dtls:0"]').each(function(e,t){o+="a=fingerprint:"+t.getAttribute("hash"),o+=" "+$(t).text(),o+="\r\n",t.hasAttribute("setup")&&(o+="a=setup:"+t.getAttribute("setup")+"\r\n")})),r.find(">candidate").each(function(e,n){var r=n.getAttribute("protocol");r="string"==typeof r?r.toLowerCase():"",t.removeTcpCandidates&&("tcp"===r||"ssltcp"===r)||t.removeUdpCandidates&&"udp"===r||(t.failICE&&n.setAttribute("ip","1.1.1.1"),o+=i.a.candidateFromJingle(n))}),e.attr("senders")){case"initiator":o+="a=sendonly\r\n";break;case"responder":o+="a=recvonly\r\n";break;case"none":o+="a=inactive\r\n";break;case"both":o+="a=sendrecv\r\n"}return o+="a=mid:"+e.attr("name")+"\r\n",n.find(">rtcp-mux").length&&(o+="a=rtcp-mux\r\n"),n.find(">payload-type").each(function(e,n){o+=i.a.buildRTPMap(n)+"\r\n",$(n).find(">parameter").length&&(o+="a=fmtp:"+n.getAttribute("id")+" ",o+=$(n).find(">parameter").map(function(e,t){var n=t.getAttribute("name");return(n?n+"=":"")+t.getAttribute("value")}).get().join("; "),o+="\r\n"),o+=t.rtcpFbFromJingle($(n),n.getAttribute("id"))}),o+=this.rtcpFbFromJingle(n,"*"),n.find('>rtp-hdrext[xmlns="urn:xmpp:jingle:apps:rtp:rtp-hdrext:0"]').each(function(e,t){o+="a=extmap:"+t.getAttribute("id")+" "+t.getAttribute("uri")+"\r\n"}),n.find('>ssrc-group[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(e,t){var n=t.getAttribute("semantics"),r=$(t).find(">source").map(function(e,t){return t.getAttribute("ssrc")}).get();r.length&&(o+="a=ssrc-group:"+n+" "+r.join(" ")+"\r\n")}),n.find('>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(e,t){var n=t.getAttribute("ssrc");$(t).find(">parameter").each(function(e,t){var r=t.getAttribute("name"),a=t.getAttribute("value");a=i.a.filterSpecialChars(a),o+="a=ssrc:"+n+" "+r,a&&a.length&&(o+=":"+a),o+="\r\n"})}),o}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(19),i=n.n(r),o=(function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new i.a;_classCallCheck(this,e),this.eventEmitter=t,this.addEventListener=this.on=this.addListener,this.removeEventListener=this.off=this.removeListener}return _createClass(e,[{key:"addListener",value:function(e,t){var n=this;return this.eventEmitter.addListener(e,t),function(){return n.removeEventListener(e,t)}}},{key:"removeListener",value:function(e,t){this.eventEmitter.removeListener(e,t)}}]),e})()},function(e,t,n){"use strict";n.r(t),n.d(t,"DETECTOR_STATE_CHANGE",function(){return r}),n.d(t,"AUDIO_INPUT_STATE_CHANGE",function(){return i}),n.d(t,"NO_AUDIO_INPUT",function(){return o}),n.d(t,"VAD_NOISY_DEVICE",function(){return a}),n.d(t,"VAD_REPORT_PUBLISHED",function(){return s}),n.d(t,"VAD_SCORE_PUBLISHED",function(){return c}),n.d(t,"VAD_TALK_WHILE_MUTED",function(){return u});var r="detector_state_change",i="audio_input_state_changed",o="no_audio_input_detected",a="detection.vad_noise_device",s="vad-report-published",c="detection.vad_score_published",u="detection.vad_talk_while_muted"},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return s});var r="statistics.audioLevel",i="statistics.before_disposed",o="statistics.byte_sent_stats",a="statistics.connectionstats",s="statistics.long_tasks_stats"},function(e,t,n){"use strict";n.r(t),n.d(t,"STATUS_AVAILABLE",function(){return r}),n.d(t,"STATUS_UNDEFINED",function(){return i}),n.d(t,"STATUS_BUSY",function(){return o}),n.d(t,"STATE_ON",function(){return a}),n.d(t,"STATE_OFF",function(){return s}),n.d(t,"STATE_PENDING",function(){return c}),n.d(t,"STATE_RETRYING",function(){return u}),n.d(t,"STATE_FAILED",function(){return d}),n.d(t,"ERROR_NO_CONNECTION",function(){return l}),n.d(t,"ERROR_SESSION_EXISTS",function(){return h});var r="available",i="undefined",o="busy",a="on",s="off",c="pending",u="retrying",d="failed",l="error_no_connection",h="error_session_already_exists"},function(e,t,n){var r=n(152),i=n(153);t.write=i,t.parse=r.parse,t.parseFmtpConfig=r.parseFmtpConfig,t.parseParams=r.parseParams,t.parsePayloads=r.parsePayloads,t.parseRemoteCandidates=r.parseRemoteCandidates,t.parseImageAttributes=r.parseImageAttributes,t.parseSimulcastStreamList=r.parseSimulcastStreamList},function(e,t,n){"use strict";n.r(t),n.d(t,"CONNECTION_DISCONNECTED",function(){return r}),n.d(t,"CONNECTION_ESTABLISHED",function(){return i}),n.d(t,"CONNECTION_FAILED",function(){return o}),n.d(t,"WRONG_STATE",function(){return a}),n.d(t,"DISPLAY_NAME_REQUIRED",function(){return s});var r="connection.connectionDisconnected",i="connection.connectionEstablished",o="connection.connectionFailed",a="connection.wrongState",s="connection.display_name_required"},function(e,t,n){"use strict";function r(e){var t=e;return e>=Number.MAX_SAFE_INTEGER&&(t=0),t+1}function i(e){return e.length>0?e.reduce(function(e,t){return e+t})/e.length:0}function o(e){return e.filter(function(e){return e>=0})}n.d(t,"d",function(){return r}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return o}),n.d(t,"a",function(){return a});var a=(function(){function e(){_classCallCheck(this,e),this.average=0,this.n=0}return _createClass(e,[{key:"addNext",value:function(e){"number"==typeof e&&(this.n+=1,this.average=this.average+(e-this.average)/this.n)}},{key:"getAverage",value:function(){return this.average}}]),e})()},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"c",function(){return o}),n.d(t,"a",function(){return c});var r=n(25);function i(e){return parseInt(e.ssrcs.split(" ")[0],10)}function o(e){return parseInt(e.ssrcs.split(" ")[1],10)}function a(e){return e.ssrcs?e.ssrcs.map(function(e){return e.id}).filter(function(e,t,n){return n.indexOf(e)===t}).length:0}var s=(function(){function e(t){if(_classCallCheck(this,e),!t)throw new Error("mLine is undefined");this.mLine=t}return _createClass(e,[{key:"getSSRCAttrValue",value:function(e,t){var n=this.ssrcs.find(function(n){return n.id===e&&n.attribute===t});return n&&n.value}},{key:"removeSSRC",value:function(e){this.mLine.ssrcs&&this.mLine.ssrcs.length&&(this.mLine.ssrcs=this.mLine.ssrcs.filter(function(t){return t.id!==e}))}},{key:"addSSRCAttribute",value:function(e){this.ssrcs.push(e)}},{key:"findGroup",value:function(e,t){return this.ssrcGroups.find(function(n){return n.semantics===e&&(!t||t===n.ssrcs)})}},{key:"findGroups",value:function(e){return this.ssrcGroups.filter(function(t){return t.semantics===e})}},{key:"findGroupByPrimarySSRC",value:function(e,t){return this.ssrcGroups.find(function(n){return n.semantics===e&&i(n)===t})}},{key:"findSSRCByMSID",value:function(e){return this.ssrcs.find(function(t){return"msid"===t.attribute&&(null===e||t.value===e)})}},{key:"getSSRCCount",value:function(){return a(this.mLine)}},{key:"containsAnySSRCGroups",value:function(){return void 0!==this.mLine.ssrcGroups}},{key:"getPrimaryVideoSsrc",value:function(){var e=this.mLine.type;if("video"!==e)throw new Error("getPrimarySsrc doesn't work with '"+e+"'");if(1===a(this.mLine))return this.mLine.ssrcs[0].id;if(this.mLine.ssrcGroups){var t=this.findGroup("SIM");if(t)return i(t);var n=this.findGroup("FID");if(n)return i(n);var r=this.findGroup("FEC-FR");if(r)return i(r)}}},{key:"getRtxSSRC",value:function(e){var t=this.findGroupByPrimarySSRC("FID",e);return t&&o(t)}},{key:"getSSRCs",value:function(){return this.ssrcs.map(function(e){return e.id}).filter(function(e,t,n){return n.indexOf(e)===t})}},{key:"getPrimaryVideoSSRCs",value:function(){var e=this.mLine.type;if("video"!==e)throw new Error("getPrimaryVideoSSRCs doesn't work with "+e);var t=this.getSSRCs(),n=this.ssrcGroups,r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var a;if(r){if(i>=n.length)break;a=n[i++]}else{if((i=n.next()).done)break;a=i.value}var s=a;if("FID"===s.semantics||"FEC-FR"===s.semantics){var c=o(s);t.splice(t.indexOf(c),1)}}return t}},{key:"dumpSSRCGroups",value:function(){return JSON.stringify(this.mLine.ssrcGroups)}},{key:"removeGroupsWithSSRC",value:function(e){this.mLine.ssrcGroups&&(this.mLine.ssrcGroups=this.mLine.ssrcGroups.filter(function(t){return-1===t.ssrcs.indexOf(""+e)}))}},{key:"removeGroupsBySemantics",value:function(e){this.mLine.ssrcGroups&&(this.mLine.ssrcGroups=this.mLine.ssrcGroups.filter(function(t){return t.semantics!==e}))}},{key:"replaceSSRC",value:function(e,t){this.mLine.ssrcs&&this.mLine.ssrcs.forEach(function(n){n.id===e&&(n.id=t)})}},{key:"addSSRCGroup",value:function(e){this.ssrcGroups.push(e)}},{key:"ssrcs",get:function(){return this.mLine.ssrcs||(this.mLine.ssrcs=[]),this.mLine.ssrcs},set:function(e){this.mLine.ssrcs=e}},{key:"direction",get:function(){return this.mLine.direction},set:function(e){this.mLine.direction=e}},{key:"ssrcGroups",get:function(){return this.mLine.ssrcGroups||(this.mLine.ssrcGroups=[]),this.mLine.ssrcGroups},set:function(e){this.mLine.ssrcGroups=e}}]),e})(),c=(function(){function e(t){_classCallCheck(this,e),this.parsedSDP=r.parse(t)}return _createClass(e,[{key:"selectMedia",value:function(e){var t=this.parsedSDP.media.find(function(t){return t.type===e});return t?new s(t):null}},{key:"toRawSDP",value:function(){return r.write(this.parsedSDP)}}]),e})()},function(e,t,n){"use strict";n.r(t),n.d(t,"LOCAL_STATS_UPDATED",function(){return r}),n.d(t,"REMOTE_STATS_UPDATED",function(){return i});var r="cq.local_stats_updated",i="cq.remote_stats_updated"},function(e,t,n){"use strict";(function(e){var r,i,o=n(17),a=n(4),s=n(96),c=n.n(s),u=Object(a.getLogger)(e);function d(){return(Math.random().toString(16)+"000000000").substr(2,8)}t.a={get callStatsUserName(){return r||((r=o.c.getItem("callStatsUserName"))||(e=c.a.generateUsername(),u.log("generated callstats uid",e),r=e,o.c.setItem("callStatsUserName",r))),r;var e},get machineId(){return i||((i=o.c.getItem("jitsiMeetId"))||(e=d()+d()+d()+d(),u.log("generated id",e),i=e,o.c.setItem("jitsiMeetId",i))),i;var e},get sessionId(){return o.c.getItem("sessionId")},set sessionId(e){e?o.c.setItem("sessionId",e):o.c.removeItem("sessionId")}}}).call(this,"modules/settings/Settings.js")},function(e,t,n){"use strict";n.d(t,"c",function(){return r}),n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o});var r="pending",i="active",o="ended"},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r={ACCEPT:"session-accept",CONNECTION_ERROR:"connection-error-encountered",INITIATE:"session-initiate",TERMINATE:"session-terminate",TRANSPORT_INFO:"transport-info",UNAVAILABLE:"unavailable"}},function(e,t){e.exports={1080:{width:1920,height:1080,order:8},fullhd:{width:1920,height:1080,order:8},720:{width:1280,height:720,order:7},hd:{width:1280,height:720,order:7},960:{width:960,height:720,order:6},540:{width:960,height:540,order:5},qhd:{width:960,height:540,order:5},360:{width:640,height:360,order:4},640:{width:640,height:480,order:3},vga:{width:640,height:480,order:3},180:{width:320,height:180,order:2},320:{width:320,height:240,order:1}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return h});var r,i=n(3),o=n(11),a=n.n(o),s=n(4).getLogger(e),c="applicationLog",u="error",d="event",l="mstWithUserID",h=(function(){function e(t,n){_classCallCheck(this,e),this.confID=n.confID,this.tpc=t,this.peerconnection=t.peerconnection,this.remoteUserID=n.remoteUserID||"jitsi",this.hasFabric=!1,e.fabrics.add(this),e.backendInitialized&&(this._addNewFabric(),1===e.fabrics.size&&e._emptyReportQueue(this))}return _createClass(e,null,[{key:"_addNewFabricCallback",value:function(t,n){e.backend&&"success"!==t&&s.error("Monitoring status: "+t+" msg: "+n)}},{key:"_initCallback",value:function(t,n){if(s.log("CallStats Status: err="+t+" msg="+n),"success"===t){e.backendInitialized=!0;var r=!1,i=null,o=e.fabrics.values(),a=Array.isArray(o),c=0;for(o=a?o:o["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var u;if(a){if(c>=o.length)break;u=o[c++]}else{if((c=o.next()).done)break;u=c.value}var d=u;d.hasFabric||(s.debug("addNewFabric - initCallback"),d._addNewFabric()&&(r=!0,i||(i=d)))}r&&e._emptyReportQueue(i)}}},{key:"_emptyReportQueue",value:function(t){var n=t.confID,r=t.peerconnection,i=e.reportsQueue,o=Array.isArray(i),a=0;for(i=o?i:i["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var s;if(o){if(a>=i.length)break;s=i[a++]}else{if((a=i.next()).done)break;s=a.value}var c=s;if(c.type===u){var h=c.data;e._reportError(t,h.type,h.error,h.pc||r)}else if(c.type===d){var p=c.data;e.backend.sendFabricEvent(c.pc||r,p.event,n,p.eventData)}else if(c.type===l){var f=c.data;e.backend.associateMstWithUserID(c.pc||r,f.callStatsId,n,f.ssrc,f.usageLabel,f.containerId)}}e.reportsQueue.length=0}},{key:"_reportError",value:function(t,n,r,i){var o=r;o||(s.warn("No error is passed!"),o=new Error("Unknown error")),e.backendInitialized&&t?e.backend.reportError(i,t.confID,n,o):e.reportsQueue.push({type:u,data:{error:o,pc:i,type:n}})}},{key:"_reportEvent",value:function(t,n,r){var i=t&&t.peerconnection,o=t&&t.confID;e.backendInitialized&&t?e.backend.sendFabricEvent(i,n,o,r):e.reportsQueue.push({confID:o,pc:i,type:d,data:{event:n,eventData:r}})}},{key:"_traceAndCatchBackendCalls",value:function(e){for(var t=["associateMstWithUserID","sendFabricEvent","sendUserFeedback"],n=function(t){var n=e[t];e[t]=function(){try{for(var t=arguments.length,r=new Array(t),i=0;i3?o-3:0),d=3;d0&&void 0!==arguments[0]?arguments[0]:(function(){return function e(){_classCallCheck(this,e)}})();return(function(t){function n(){var e,t;_classCallCheck(this,n);for(var r=arguments.length,i=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,s=window.performance.now(),u=i.Strophe.getStatusString(n).toLowerCase();if(this.connectionTimes[u]=s,b.log("(TIME) Strophe "+u+(r?"["+r+"]":"")+":\t",s),this.eventEmitter.emit(c.a.CONNECTION_STATUS_CHANGED,t,n,r),n===i.Strophe.Status.CONNECTED||n===i.Strophe.Status.ATTACHED){(this.options.useStunTurn||this.options.p2p&&this.options.p2p.useStunTurn)&&this.connection.jingle.getStunAndTurnCredentials(),b.info("My Jabber ID: "+this.connection.jid),this._resetState();var d=this.connection.domain;this.caps.getFeaturesAndIdentities(d).then(function(t){var n=t.features,r=t.identities;n.has(i.Strophe.NS.PING)||b.error("Ping NOT supported by "+d+" - please enable ping in your XMPP server config"),r.forEach(function(t){"speakerstats"===t.type&&(e.speakerStatsComponentAddress=t.name),"conference_duration"===t.type&&(e.conferenceDurationComponentAddress=t.name),"lobbyrooms"===t.type&&(e.lobbySupported=!0,t.name&&e.caps.getFeaturesAndIdentities(t.name,t.type).then(function(t){t.features.forEach(function(t){t.endsWith("#displayname_required")&&e.eventEmitter.emit(a.DISPLAY_NAME_REQUIRED)})}).catch(function(e){return b.warn("Error getting features from lobby.",e&&e.message)}))}),(e.speakerStatsComponentAddress||e.conferenceDurationComponentAddress)&&e.connection.addHandler(e._onPrivateMessage.bind(e),null,"message",null,null)}).catch(function(e){l.a.callErrorHandler(new Error("Feature discovery error: "+e)),b.error("Feature discovery error",e)}),t.password&&(this.authenticatedUser=!0),this.connection&&this.connection.connected&&i.Strophe.getResourceFromJid(this.connection.jid)&&this.eventEmitter.emit(a.CONNECTION_ESTABLISHED,i.Strophe.getResourceFromJid(this.connection.jid))}else if(n===i.Strophe.Status.CONNFAIL)"x-strophe-bad-non-anon-jid"===r?this.anonymousConnectionFailed=!0:this.connectionFailed=!0,this.lastErrorMsg=r,"giving-up"===r&&this.eventEmitter.emit(a.CONNECTION_FAILED,o.OTHER_ERROR,r);else if(n===i.Strophe.Status.ERROR)this.lastErrorMsg=r;else if(n===i.Strophe.Status.DISCONNECTED){this.connection.ping.stopInterval();var h=Boolean(this.disconnectInProgress),p=r||this.lastErrorMsg;if(this.anonymousConnectionFailed)this.eventEmitter.emit(a.CONNECTION_FAILED,o.PASSWORD_REQUIRED);else if(this.connectionFailed)this.eventEmitter.emit(a.CONNECTION_FAILED,o.OTHER_ERROR,p,void 0,this._getConnectionFailedReasonDetails());else if(h)this.eventEmitter.emit(a.CONNECTION_DISCONNECTED,p);else{b.error("XMPP connection dropped!");var f=i.Strophe.getLastErrorStatus();f>=500&&f<600?this.eventEmitter.emit(a.CONNECTION_FAILED,o.SERVER_ERROR,p||"server-error",void 0,this._getConnectionFailedReasonDetails()):this.eventEmitter.emit(a.CONNECTION_FAILED,o.CONNECTION_DROPPED_ERROR,p||"connection-dropped-error",void 0,this._getConnectionFailedReasonDetails())}}else n===i.Strophe.Status.AUTHFAIL&&this.eventEmitter.emit(a.CONNECTION_FAILED,o.PASSWORD_REQUIRED,r,t)}},{key:"_connect",value:function(e,t){this._resetState(),this.connection.connect(e,t,this.connectionHandler.bind(this,{jid:e,password:t}))}},{key:"attach",value:function(e){this._resetState();var t=this.connectionTimes.attaching=window.performance.now();b.log("(TIME) Strophe Attaching:\t",t),this.connection.attach(e.jid,e.sid,parseInt(e.rid,10)+1,this.connectionHandler.bind(this,{jid:e.jid,password:e.password}))}},{key:"_resetState",value:function(){this.anonymousConnectionFailed=!1,this.connectionFailed=!1,this.lastErrorMsg=void 0,this.disconnectInProgress=void 0}},{key:"connect",value:function(e,t){if(!e){var n=this.options.hosts,r=n.anonymousdomain,i=n.domain,o=r||i,a=window.location;if(r){var s=a&&a.search;(s&&-1!==s.indexOf("login=true")||this.token)&&(o=i)}e=o||a&&a.hostname}return this._connect(e,t)}},{key:"createRoom",value:function(e,t,n){var r=e+"@"+(t.customDomain?t.customDomain:this.options.hosts.muc.toLowerCase())+"/",i=n?n(this.connection.jid,this.authenticatedUser):f.a.randomHexString(8).toLowerCase();return b.info("JID "+this.connection.jid+" using MUC nickname "+i),r+=i,this.connection.emuc.createRoom(r,null,t)}},{key:"getJid",value:function(){return this.connection.jid}},{key:"getJingleLog",value:function(){var e=this.connection.jingle;return e?e.getLog():{}}},{key:"getXmppLog",value:function(){return(this.connection.logger||{}).log||null}},{key:"dial",value:function(){var e;(e=this.connection.rayo).dial.apply(e,arguments)}},{key:"ping",value:function(e){var t=this;return new Promise(function(n,r){t.connection.ping.ping(t.connection.domain,n,r,e)})}},{key:"getSessions",value:function(){return this.connection.jingle.sessions}},{key:"disconnect",value:function(e){var t=this;return this.disconnectInProgress?this.disconnectInProgress:this.connection?(this.disconnectInProgress=new Promise(function(e){t.eventEmitter.on(c.a.CONNECTION_STATUS_CHANGED,function n(r,o){o===i.Strophe.Status.DISCONNECTED&&(e(),t.eventEmitter.removeListener(c.a.CONNECTION_STATUS_CHANGED,n))})}),this._cleanupXmppConnection(e),this.disconnectInProgress):Promise.resolve()}},{key:"_cleanupXmppConnection",value:function(e){if(!this.connection.isUsingWebSocket&&this.connection.flush(),!this.connection.isUsingWebSocket&&null!=e){var t=e.type;if(("beforeunload"===t||"unload"===t)&&(this.connection.options.sync=!0,this.connection.sendUnavailableBeacon()))return}this.connection.disconnect(),!0!==this.connection.options.sync&&this.connection.flush()}},{key:"_initStrophePlugins",value:function(){var e={jvb:{iceServers:[]},p2p:{iceServers:[]}},t=this.options.p2p&&this.options.p2p.stunServers||C;Array.isArray(t)&&(b.info("P2P STUN servers: ",t),e.p2p.iceServers=t),this.options.p2p&&this.options.p2p.iceTransportPolicy&&(b.info("P2P ICE transport policy: ",this.options.p2p.iceTransportPolicy),e.p2p.iceTransportPolicy=this.options.p2p.iceTransportPolicy),this.connection.addConnectionPlugin("emuc",new g.a(this)),this.connection.addConnectionPlugin("jingle",new y.a(this,this.eventEmitter,e)),this.connection.addConnectionPlugin("rayo",new S.a)}},{key:"_getConnectionFailedReasonDetails",value:function(){var e={};if(this.options.deploymentInfo&&this.options.deploymentInfo.shard&&this.connection.lastResponseHeaders){var t={};this.connection.lastResponseHeaders.trim().split(/[\r\n]+/).forEach(function(e){var n=e.split(": "),r=n.shift(),i=n.join(": ");t[r]=i}),e.shard_changed=this.options.deploymentInfo.shard!==t["x-jitsi-shard"]}return e.suspend_time=this.connection.ping.getPingSuspendTime(),e.time_since_last_success=this.connection.getTimeSinceLastSuccess(),e}},{key:"sendDominantSpeakerEvent",value:function(e){if(this.speakerStatsComponentAddress&&e){var t=Object(i.$msg)({to:this.speakerStatsComponentAddress});t.c("speakerstats",{xmlns:"http://jitsi.org/jitmeet",room:e}).up(),this.connection.send(t)}}},{key:"tryParseJSONAndVerify",value:function(e){try{var t=JSON.parse(e);if(t&&"object"==typeof t){var n=t[T];if(void 0!==n)return t;b.debug("parsing valid json but does not have correct structure","topic: ",n)}}catch(e){return!1}return!1}},{key:"_onPrivateMessage",value:function(e){var t=e.getAttribute("from");if(t!==this.speakerStatsComponentAddress&&t!==this.conferenceDurationComponentAddress)return!0;var n=$(e).find(">json-message").text(),r=this.tryParseJSONAndVerify(n);return r&&"speakerstats"===r[T]&&r.users&&this.eventEmitter.emit(c.a.SPEAKER_STATS_RECEIVED,r.users),r&&"conference_duration"===r[T]&&r.created_timestamp&&this.eventEmitter.emit(c.a.CONFERENCE_TIMESTAMP_RECEIVED,r.created_timestamp),!0}}]),t})(h.a)}).call(this,"modules/xmpp/xmpp.js")},function(e,t,n){"use strict";n.r(t),n.d(t,"CONNECTION_DROPPED_ERROR",function(){return r}),n.d(t,"OTHER_ERROR",function(){return i}),n.d(t,"PASSWORD_REQUIRED",function(){return o}),n.d(t,"SERVER_ERROR",function(){return a});var r="connection.droppedError",i="connection.otherError",o="connection.passwordRequired",a="connection.serverError"},function(e,t){e.exports={H264:"h264",VP8:"vp8",VP9:"vp9"}},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i});var r="signaling.peerMuted",i="signaling.peerVideoType"},function(e,t,n){(function(e,n){var r="[object Arguments]",i="[object Function]",o="[object GeneratorFunction]",a="[object Map]",s="[object Set]",c=/\w*$/,u=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,l={};l[r]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object DataView]"]=l["[object Boolean]"]=l["[object Date]"]=l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l[a]=l["[object Number]"]=l["[object Object]"]=l["[object RegExp]"]=l[s]=l["[object String]"]=l["[object Symbol]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l["[object Error]"]=l[i]=l["[object WeakMap]"]=!1;var h="object"==typeof e&&e&&e.Object===Object&&e,p="object"==typeof self&&self&&self.Object===Object&&self,f=h||p||Function("return this")(),m=t&&!t.nodeType&&t,v=m&&"object"==typeof n&&n&&!n.nodeType&&n,g=v&&v.exports===m;function y(e,t){return e.set(t[0],t[1]),e}function _(e,t){return e.add(t),e}function S(e,t,n,r){var i=-1,o=e?e.length:0;for(r&&o&&(n=e[++i]);++i-1},oe.prototype.set=function(e,t){var n=this.__data__,r=de(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ae.prototype.clear=function(){this.__data__={hash:new ie,map:new(K||oe),string:new ie}},ae.prototype.delete=function(e){return me(this,e).delete(e)},ae.prototype.get=function(e){return me(this,e).get(e)},ae.prototype.has=function(e){return me(this,e).has(e)},ae.prototype.set=function(e,t){return me(this,e).set(e,t),this},se.prototype.clear=function(){this.__data__=new oe},se.prototype.delete=function(e){return this.__data__.delete(e)},se.prototype.get=function(e){return this.__data__.get(e)},se.prototype.has=function(e){return this.__data__.has(e)},se.prototype.set=function(e,t){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!K||r.length<199)return r.push([e,t]),this;n=this.__data__=new ae(r)}return n.set(e,t),this};var ge=J?C(J,Object):function(){return[]},ye=function(e){return N.call(e)};function _e(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||d.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991})(e.length)&&!Ae(e)}var Re=G||function(){return!1};function Ae(e){var t=ke(e)?N.call(e):"";return t==i||t==o}function ke(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function we(e){return Te(e)?ce(e):(function(e){if(!Se(e))return V(e);var t=[];for(var n in Object(e))O.call(e,n)&&"constructor"!=n&&t.push(n);return t})(e)}n.exports=function(e){return le(e,!0,!0)}}).call(this,n(45),n(74)(e))},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return d});var r=n(4),i=n(2),o=(n(149),n(21)),a=n(88),s=n(90),c=n(91),u=Object(r.getLogger)(e),d=(function(e){function t(e){var n,r=e.enableWebsocketResume,o=e.websocketKeepAlive,u=e.serviceUrl;return _classCallCheck(this,t),(n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this)))._options={enableWebsocketResume:void 0===r||r,websocketKeepAlive:void 0===o?24e4:Number(o)},n._stropheConn=new i.Strophe.Connection(u),n._usesWebsocket=u.startsWith("ws:")||u.startsWith("wss:"),n._stropheConn.maxRetries=3,n._lastSuccessTracker=new s.a,n._lastSuccessTracker.startTracking(_assertThisInitialized(_assertThisInitialized(n)),n._stropheConn),n._resumeTask=new a.a(n._stropheConn),n._deferredIQs=[],n.addConnectionPlugin("ping",new c.a({onPingThresholdExceeded:function(){return n._onPingErrorThresholdExceeded()}})),n}return _inherits(t,e),_createClass(t,null,[{key:"Events",get:function(){return{CONN_STATUS_CHANGED:"CONN_STATUS_CHANGED"}}},{key:"Status",get:function(){return i.Strophe.Status}}]),_createClass(t,[{key:"addConnectionPlugin",value:function(e,t){this[e]=t,t.init(this)}},{key:"addHandler",value:function(){var e;(e=this._stropheConn).addHandler.apply(e,arguments)}},{key:"attach",value:function(e,t,n,r){for(var i,o=arguments.length,a=new Array(o>4?o-4:0),s=4;s3?i-3:0),a=3;a2?o-2:0),s=2;s=e.length)break;r=e[n++]}else{if((n=e.next()).done)break;r=n.value}r.reject(new Error("disconnect"))}this._deferredIQs=[]}},{key:"closeWebsocket",value:function(){this._stropheConn&&this._stropheConn._proto&&(this._stropheConn._proto._closeSocket(),this._stropheConn._proto._onClose(null))}},{key:"disconnect",value:function(){var e;this._resumeTask.cancel(),clearTimeout(this._wsKeepAlive),this._clearDeferredIQs(),(e=this._stropheConn).disconnect.apply(e,arguments)}},{key:"flush",value:function(){var e;(e=this._stropheConn).flush.apply(e,arguments)}},{key:"getTimeSinceLastSuccess",value:function(){return this._lastSuccessTracker.getTimeSinceLastSuccess()}},{key:"_maybeEnableStreamResume",value:function(){if(this._options.enableWebsocketResume){var e=this._stropheConn.streamManagement;this.isUsingWebSocket?e?e.isSupported()?e.getResumeToken()||(u.info("Enabling XEP-0198 stream management"),e.enable(!0)):u.warn("Stream resume enabled, but XEP-0198 is not supported by the server"):u.warn("Stream resume enabled, but Strophe streamManagement plugin is not installed"):u.warn("Stream resume enabled, but WebSockets are not enabled")}}},{key:"_maybeStartWSKeepAlive",value:function(){var e=this,t=this._options.websocketKeepAlive;if(this._usesWebsocket&&t>0){this._wsKeepAlive||u.info("WebSocket keep alive interval: "+t+"ms"),clearTimeout(this._wsKeepAlive);var n=.2*t+.8*Math.random()*t;u.debug("Scheduling next WebSocket keep-alive in "+n+"ms"),this._wsKeepAlive=setTimeout(function(){var t=e.service.replace("wss://","https://").replace("ws://","http://");fetch(t).catch(function(e){u.error("Websocket Keep alive failed for url: "+t,{error:e})}).then(function(){return e._maybeStartWSKeepAlive()})},n)}}},{key:"_processDeferredIQs",value:function(){var e=this,t=function(t){if(t.iq){clearTimeout(t.timeout);var n=Date.now()-t.start;e.sendIQ(t.iq,function(e){return t.resolve(e)},function(e){return t.reject(e)},n)}},n=this._deferredIQs,r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}t(o)}this._deferredIQs=[]}},{key:"send",value:function(e){if(!this.connected)throw new Error("Not connected");this._stropheConn.send(e)}},{key:"sendIQ",value:function(e,t,n,r){if(this.connected)return this._stropheConn.sendIQ(e,t,n,r);n("Not connected")}},{key:"sendIQ2",value:function(e,t){var n=this,r=t.timeout;return new Promise(function(t,i){if(n.connected)n.sendIQ(e,function(e){return t(e)},function(e){return i(e)},r);else{var o={iq:e,resolve:t,reject:i,start:Date.now(),timeout:setTimeout(function(){o.iq=void 0,i(void 0)},r)};n._deferredIQs.push(o)}})}},{key:"_onPingErrorThresholdExceeded",value:function(){this.isUsingWebSocket&&(u.warn("Ping error threshold exceeded - killing the WebSocket"),this.closeWebsocket())}},{key:"sendPresence",value:function(e,t,n,r){this.connected?this._stropheConn.sendPresence(e,t,n,r):n("Not connected")}},{key:"sendUnavailableBeacon",value:function(){if(!navigator.sendBeacon||this._stropheConn.disconnecting||!this._stropheConn.connected)return!1;this._stropheConn._changeConnectStatus(i.Strophe.Status.DISCONNECTING),this._stropheConn.disconnecting=!0;var e=this._stropheConn._proto._buildBody().attrs({type:"terminate"}),t=Object(i.$pres)({xmlns:i.Strophe.NS.CLIENT,type:"unavailable"});e.cnode(t.tree());var n=navigator.sendBeacon(-1===this.service.indexOf("https://")?"https:"+this.service:this.service,i.Strophe.serialize(e.tree()));return u.info("Successfully send unavailable beacon "+n),this._stropheConn._proto._abortAllRequests(),this._stropheConn._doDisconnect(),!0}},{key:"_tryResumingConnection",value:function(){var e=this._stropheConn.streamManagement;return!(!e||!e.getResumeToken()||(this._resumeTask.schedule(),0))}},{key:"connected",get:function(){var e=this._stropheConn&&this._stropheConn._proto&&this._stropheConn._proto.socket;return(this._status===i.Strophe.Status.CONNECTED||this._status===i.Strophe.Status.ATTACHED)&&(!this.isUsingWebSocket||e&&e.readyState===WebSocket.OPEN)}},{key:"disco",get:function(){return this._stropheConn.disco}},{key:"disconnecting",get:function(){return!0===this._stropheConn.disconnecting}},{key:"domain",get:function(){return this._stropheConn.domain}},{key:"isUsingWebSocket",get:function(){return this._usesWebsocket}},{key:"jid",get:function(){return this._stropheConn.jid}},{key:"lastResponseHeaders",get:function(){return this._stropheConn._proto&&this._stropheConn._proto.lastResponseHeaders}},{key:"logger",get:function(){return this._stropheConn.logger}},{key:"options",get:function(){return this._stropheConn.options}},{key:"service",get:function(){return this._stropheConn.service}},{key:"status",get:function(){return this._status}}]),t})(o.a)}).call(this,"modules/xmpp/XmppConnection.js")},function(e,t){e.exports={ENVIRONMENT:"environment",USER:"user"}},function(e,t,n){"use strict";(function(e){var r=n(18),i=n(14),o=n(3);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(4).getLogger(e),c=null,u={obtainStream:null,init:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;this.options=e,c=t,this.obtainStream=this._createObtainStreamMethod(),this.obtainStream||s.info("Desktop sharing disabled")},_createObtainStreamMethod:function(){return o.a.isNWJS()?function(e,t,n){window.JitsiMeetNW.obtainDesktopStream(t,function(e,t){var o;o=e&&"InvalidStateError"===e.name?new r.a(i.SCREENSHARING_USER_CANCELED):new r.a(e,t,["desktop"]),"function"==typeof n&&n(o)})}:o.a.isElectron()?this.obtainScreenOnElectron:o.a.supportsGetDisplayMedia()?this.obtainScreenFromGetDisplayMedia:(s.log("Screen sharing not supported on ",o.a.getName()),null)},isSupported:function(){return null!==this.obtainStream},obtainScreenOnElectron:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(window.JitsiMeetScreenObtainer&&window.JitsiMeetScreenObtainer.openDesktopPicker){var o=e.desktopSharingSources,s=e.gumOptions;window.JitsiMeetScreenObtainer.openDesktopPicker({desktopSharingSources:o||["screen","window"]},function(e,o){return(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{response:{},gumOptions:{}},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=e.response||{},s=o.streamId,u=o.streamType,d=o.screenShareAudio,l=o.error;if(s){var h=(function(e){for(var t=1;t2&&void 0!==arguments[2]&&arguments[2]},gumOptions:s},t,n)},function(e){return n(new r.a(i.ELECTRON_DESKTOP_PICKER_ERROR,e))})}else n(new r.a(i.ELECTRON_DESKTOP_PICKER_NOT_FOUND))},obtainScreenFromGetDisplayMedia:function(e,t,n){s.info("Using getDisplayMedia for screen sharing"),(navigator.getDisplayMedia?navigator.getDisplayMedia.bind(navigator):navigator.mediaDevices.getDisplayMedia.bind(navigator.mediaDevices))({video:!0,audio:!0}).then(function(n){var r;if(n&&n.getTracks()&&n.getTracks().length>0){var i=n.getVideoTracks()[0];i&&(r=i.applyConstraints(e.trackOptions))}else r=Promise.resolve();r.then(function(){return t({stream:n,sourceId:n.id})})}).catch(function(){return n(new r.a(i.SCREENSHARING_USER_CANCELED))})}};t.a=u}).call(this,"modules/RTC/ScreenObtainer.js")},function(e,t){var n;n=(function(){return this})();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(146),i={loadScript:function(e,t,n,i,o,a){var s=document,c=s.createElement("script"),u=s.getElementsByTagName("script")[0];if(c.async=t,i){var d=r();if(d){var l=d.src,h=l.substring(0,l.lastIndexOf("/")+1);l&&h&&(e=h+e)}}o&&(c.onload=o),a&&(c.onerror=a),c.src=e,n?u.parentNode.insertBefore(c,u):u.parentNode.appendChild(c)}};e.exports=i},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return m}),n.d(t,"b",function(){return v});var r=n(4),i=n(1),o=n(15),a=n(8),s=n(6),c=n.n(s),u=n(7),d=n(3),l=n(5);function h(e){for(var t=1;t=i}},{key:"refreshConnectionStatusForAll",value:function(){var e=this.conference.getParticipants(),t=Array.isArray(e),n=0;for(e=t?e:e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var r;if(t){if(n>=e.length)break;r=e[n++]}else{if((n=e.next()).done)break;r=n.value}var i=r;this.figureOutConnectionStatus(i.getId())}}},{key:"figureOutConnectionStatus",value:function(t){var n=this.conference.getParticipantById(t);if(n){var r=this.conference.isP2PActive(),i=this._isRestoringTimedout(t),o=0===this.rtc.getLastN(),s=n.isVideoMuted()||o,c=this.isVideoTrackFrozen(n),u=this.rtc.isInLastN(t),d=this.connStatusFromJvb[t];"boolean"!=typeof d&&(f.debug("Assuming connection active by JVB - no notification"),d=!0);var l=r?e._getNewStateForP2PMode(s,c):e._getNewStateForJvbMode(d,u,i,s,c);l!==m.RESTORING&&this._clearRestoringTimer(t),f.debug("Figure out conn status for "+t+", is video muted: "+s+" is active(jvb): "+d+" video track frozen: "+c+" p2p mode: "+r+" is in last N: "+u+" currentStatus => newStatus: "+n.getConnectionStatus()+" => "+l);var p=this.connectionStatusMap[t]||{};if(!("p2p"in p&&"connectionStatus"in p&&p.p2p===r&&p.connectionStatus===l)){var v=Date.now();if(this.maybeSendParticipantConnectionStatusEvent(t,v),this.connectionStatusMap[t]=h({},p,{connectionStatus:l,p2p:r,startedMs:v}),!("videoType"in this.connectionStatusMap[t])){var g=n.getTracksByMediaType(a.c);Array.isArray(g)&&0!==g.length&&(this.connectionStatusMap[t].videoType=g[0].videoType)}}this._changeConnectionStatus(n,l)}else f.debug("figure out conn status - no participant for: "+t)}},{key:"maybeSendParticipantConnectionStatusEvent",value:function(e,t){var n=this.connectionStatusMap[e];n&&"startedMs"in n&&"videoType"in n&&"connectionStatus"in n&&"p2p"in n&&(n.value=t-n.startedMs,l.a.sendAnalytics(Object(u.J)(n)))}},{key:"_onLastNChanged",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Date.now();f.debug("leaving/entering lastN",e,t,n);var r=e,i=Array.isArray(r),o=0;for(r=i?r:r["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var a;if(i){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var s=a;this.enteredLastNTimestamp.delete(s),this._clearRestoringTimer(s),this.figureOutConnectionStatus(s)}var c=t,u=Array.isArray(c),d=0;for(c=u?c:c["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var l;if(u){if(d>=c.length)break;l=c[d++]}else{if((d=c.next()).done)break;l=d.value}var h=l;this.enteredLastNTimestamp.set(h,n),this.figureOutConnectionStatus(h)}}},{key:"_clearRestoringTimer",value:function(e){var t=this.restoringTimers.get(e);t&&(clearTimeout(t),this.restoringTimers.delete(e))}},{key:"_isRestoringTimedout",value:function(e){var t=this,n=this.enteredLastNTimestamp.get(e);return!!(n&&Date.now()-n>=1e4)||(this.restoringTimers.get(e)||this.restoringTimers.set(e,setTimeout(function(){return t.figureOutConnectionStatus(e)},1e4)),!1)}},{key:"onUserLeft",value:function(e){this.maybeSendParticipantConnectionStatusEvent(e,Date.now()),delete this.connectionStatusMap[e]}},{key:"onTrackRtcMuted",value:function(e){var t=this,n=e.getParticipantId(),r=this.conference.getParticipantById(n);if(f.debug("Detector track RTC muted: "+n,Date.now()),r){if(this.rtcMutedTimestamp[n]=Date.now(),!r.isVideoMuted()){this.clearTimeout(n);var i=this._getVideoFrozenTimeout(n);this.trackTimers[n]=window.setTimeout(function(){f.debug("Set RTC mute timeout for: "+n+" of "+i+" ms"),t.clearTimeout(n),t.figureOutConnectionStatus(n)},i)}}else f.error("No participant for id: "+n)}},{key:"onTrackRtcUnmuted",value:function(e){var t=e.getParticipantId();f.debug("Detector track RTC unmuted: "+t,Date.now()),this.clearTimeout(t),this.clearRtcMutedTimestamp(t),this.figureOutConnectionStatus(t)}},{key:"onSignallingMuteChanged",value:function(e){var t=e.getParticipantId();f.debug("Detector on track signalling mute changed: "+t,e.isMuted()),this.figureOutConnectionStatus(t)}},{key:"onTrackVideoTypeChanged",value:function(e,t){var n=e.getParticipantId(),r=Date.now();this.maybeSendParticipantConnectionStatusEvent(n,r),this.connectionStatusMap[n]=h({},this.connectionStatusMap[n]||{},{videoType:t,startedMs:r})}}]),e})()}).call(this,"modules/connectivity/ParticipantConnectionStatus.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return o});var r=n(4),i=n(21),o="NETWORK_INFO_CHANGED",a=Object(r.getLogger)(e),s=new((function(e){function t(){var e;return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this)))._current={isOnline:!0},e}return _inherits(t,e),_createClass(t,[{key:"updateNetworkInfo",value:function(e){var t=e.isOnline;a.debug("updateNetworkInfo",{isOnline:t}),this._current={isOnline:!0===t},this.eventEmitter.emit(o,this._current)}},{key:"isOnline",value:function(){return!0===this._current.isOnline}}]),t})(i.a));t.b=s}).call(this,"modules/connectivity/NetworkInfo.js")},function(e,t,n){"use strict";var r={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};r.localCName=r.generateIdentifier(),r.splitLines=function(e){return e.trim().split("\n").map(function(e){return e.trim()})},r.splitSections=function(e){return e.split("\nm=").map(function(e,t){return(t>0?"m="+e:e).trim()+"\r\n"})},r.getDescription=function(e){var t=r.splitSections(e);return t&&t[0]},r.getMediaSections=function(e){var t=r.splitSections(e);return t.shift(),t},r.matchPrefix=function(e,t){return r.splitLines(e).filter(function(e){return 0===e.indexOf(t)})},r.parseCandidate=function(e){for(var t,n={foundation:(t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" "))[0],component:parseInt(t[1],10),protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]},r=8;r0?t[0].split("/")[1]:"sendrecv",uri:t[1]}},r.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},r.parseFmtp=function(e){for(var t,n={},r=e.substr(e.indexOf(" ")+1).split(";"),i=0;i-1?(n.attribute=e.substr(t+1,r-t-1),n.value=e.substr(r+1)):n.attribute=e.substr(t+1),n},r.parseSsrcGroup=function(e){var t=e.substr(13).split(" ");return{semantics:t.shift(),ssrcs:t.map(function(e){return parseInt(e,10)})}},r.getMid=function(e){var t=r.matchPrefix(e,"a=mid:")[0];if(t)return t.substr(6)},r.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1]}},r.getDtlsParameters=function(e,t){return{role:"auto",fingerprints:r.matchPrefix(e+t,"a=fingerprint:").map(r.parseFingerprint)}},r.writeDtlsParameters=function(e,t){var n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(function(e){n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},r.parseCryptoLine=function(e){var t=e.substr(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},r.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?r.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},r.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;var t=e.substr(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},r.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},r.getCryptoParameters=function(e,t){return r.matchPrefix(e+t,"a=crypto:").map(r.parseCryptoLine)},r.getIceParameters=function(e,t){var n=r.matchPrefix(e+t,"a=ice-ufrag:")[0],i=r.matchPrefix(e+t,"a=ice-pwd:")[0];return n&&i?{usernameFragment:n.substr(12),password:i.substr(10)}:null},r.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},r.parseRtpParameters=function(e){for(var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=r.splitLines(e)[0].split(" "),i=3;i0?"9":"0",n+=" UDP/TLS/RTP/SAVPF ",n+=t.codecs.map(function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType}).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",t.codecs.forEach(function(e){n+=r.writeRtpMap(e),n+=r.writeFmtp(e),n+=r.writeRtcpFb(e)});var i=0;return t.codecs.forEach(function(e){e.maxptime>i&&(i=e.maxptime)}),i>0&&(n+="a=maxptime:"+i+"\r\n"),n+="a=rtcp-mux\r\n",t.headerExtensions&&t.headerExtensions.forEach(function(e){n+=r.writeExtmap(e)}),n},r.parseRtpEncodingParameters=function(e){var t,n=[],i=r.parseRtpParameters(e),o=-1!==i.fecMechanisms.indexOf("RED"),a=-1!==i.fecMechanisms.indexOf("ULPFEC"),s=r.matchPrefix(e,"a=ssrc:").map(function(e){return r.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute}),c=s.length>0&&s[0].ssrc,u=r.matchPrefix(e,"a=ssrc-group:FID").map(function(e){return e.substr(17).split(" ").map(function(e){return parseInt(e,10)})});u.length>0&&u[0].length>1&&u[0][0]===c&&(t=u[0][1]),i.codecs.forEach(function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var r={ssrc:c,codecPayloadType:parseInt(e.parameters.apt,10)};c&&t&&(r.rtx={ssrc:t}),n.push(r),o&&((r=JSON.parse(JSON.stringify(r))).fec={ssrc:c,mechanism:a?"red+ulpfec":"red"},n.push(r))}}),0===n.length&&c&&n.push({ssrc:c});var d=r.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substr(7),10):0===d[0].indexOf("b=AS:")?1e3*parseInt(d[0].substr(5),10)*.95-16e3:void 0,n.forEach(function(e){e.maxBitrate=d})),n},r.parseRtcpParameters=function(e){var t={},n=r.matchPrefix(e,"a=ssrc:").map(function(e){return r.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];n&&(t.cname=n.value,t.ssrc=n.ssrc);var i=r.matchPrefix(e,"a=rtcp-rsize");t.reducedSize=i.length>0,t.compound=0===i.length;var o=r.matchPrefix(e,"a=rtcp-mux");return t.mux=o.length>0,t},r.parseMsid=function(e){var t,n=r.matchPrefix(e,"a=msid:");if(1===n.length)return{stream:(t=n[0].substr(7).split(" "))[0],track:t[1]};var i=r.matchPrefix(e,"a=ssrc:").map(function(e){return r.parseSsrcMedia(e)}).filter(function(e){return"msid"===e.attribute});return i.length>0?{stream:(t=i[0].value.split(" "))[0],track:t[1]}:void 0},r.parseSctpDescription=function(e){var t,n=r.parseMLine(e),i=r.matchPrefix(e,"a=max-message-size:");i.length>0&&(t=parseInt(i[0].substr(19),10)),isNaN(t)&&(t=65536);var o=r.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substr(12),10),protocol:n.fmt,maxMessageSize:t};if(r.matchPrefix(e,"a=sctpmap:").length>0){var a=r.matchPrefix(e,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(a[0],10),protocol:a[1],maxMessageSize:t}}},r.writeSctpDescription=function(e,t){var n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},r.generateSessionId=function(){return Math.random().toString().substr(2,21)},r.writeSessionBoilerplate=function(e,t,n){var i=void 0!==t?t:2;return"v=0\r\no="+(n||"thisisadapterortc")+" "+(e||r.generateSessionId())+" "+i+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},r.writeMediaSection=function(e,t,n,i){var o=r.writeRtpDescription(e.kind,t);if(o+=r.writeIceParameters(e.iceGatherer.getLocalParameters()),o+=r.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":"active"),o+="a=mid:"+e.mid+"\r\n",e.direction?o+="a="+e.direction+"\r\n":e.rtpSender&&e.rtpReceiver?o+="a=sendrecv\r\n":e.rtpSender?o+="a=sendonly\r\n":e.rtpReceiver?o+="a=recvonly\r\n":o+="a=inactive\r\n",e.rtpSender){var a="msid:"+i.id+" "+e.rtpSender.track.id+"\r\n";o+="a="+a,o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+a,e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+a,o+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+r.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+r.localCName+"\r\n"),o},r.getDirection=function(e,t){for(var n=r.splitLines(e),i=0;icontent[name="video"]');if(t.length){var n=t[0].getAttribute("senders");if("both"===n||"initiator"===n||"responder"===n||"none"===n)return n}return null}},{key:"parseMaxFrameHeight",value:function(e){var t=e.find('>content[name="video"]>max-frame-height');return t.length?Number(t.text()):null}}]),_createClass(t,[{key:"_assertNotEnded",value:function(){return this.state!==g.b}},{key:"doInitialize",value:function(e){var t=this;this.failICE=Boolean(e.failICE),this.lasticecandidate=!1,this.options=e,this.isReconnect=!1,this.wasstable=!1,this.webrtcIceUdpDisable=Boolean(e.webrtcIceUdpDisable),this.webrtcIceTcpDisable=Boolean(e.webrtcIceTcpDisable);var n={disableRtx:e.disableRtx};if(e.gatherStats&&(n.maxstats=300),n.capScreenshareBitrate=!1,n.enableInsertableStreams=e.enableInsertableStreams,n.videoQuality=e.videoQuality,n.videoQuality&&(n.disabledCodec=n.videoQuality.disabledCodec,n.preferredCodec=n.videoQuality.preferredCodec),this.isP2P){n.disableSimulcast=!0,n.disableH264=e.p2p&&e.p2p.disableH264,n.preferH264=e.p2p&&e.p2p.preferH264,e.p2p&&(n.disabledCodec=e.p2p.disabledCodec,n.preferredCodec=e.p2p.preferredCodec);var r=this._abtestSuspendVideoEnabled(e);void 0!==r&&(n.abtestSuspendVideo=r)}else n.disableSimulcast=e.disableSimulcast||e.preferH264&&!e.disableH264,n.preferH264=e.preferH264,e.testing&&e.testing.capScreenshareBitrate&&"number"==typeof e.testing.capScreenshareBitrate&&(n.capScreenshareBitrate=Math.random()0){var s=E.a.iceparams(r.media[i],r.session);s.xmlns="urn:xmpp:jingle:transports:ice-udp:1",n.c("content",{creator:t.initiatorJid===t.localJid?"initiator":"responder",name:o[0].sdpMid?o[0].sdpMid:a.media}).c("transport",s);for(var c=0;ccontent>transport>candidate").each(function(e,t){var r=E.a.candidateFromJingle(t);r=r.replace("\r\n","").replace("a=","");var i=new RTCIceCandidate({sdpMLineIndex:0,sdpMid:"",candidate:r});n.push(i)}),n.length?(T.debug("Queued add ("+n.length+") ICE candidates task..."),this.modificationQueue.push(function(e){for(var r=0;rdescription>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(e,n){var r=Number(n.getAttribute("ssrc"));t.isP2P?t.signalingLayer.setSSRCOwner(r,i.Strophe.getResourceFromJid(t.remoteJid)):$(n).find('>ssrc-info[xmlns="http://jitsi.org/jitmeet"]').each(function(e,n){var o=n.getAttribute("owner");o&&o.length&&(isNaN(r)||r<0?T.warn("Invalid SSRC "+r+" value received for "+o):t.signalingLayer.setSSRCOwner(r,i.Strophe.getResourceFromJid(o)))})})}},{key:"generateRecvonlySsrc",value:function(){this.peerconnection?this.peerconnection.generateRecvonlySsrc():T.error("Unable to generate recvonly SSRC - no peerconnection")}},{key:"acceptOffer",value:function(e,t,n,r){var i=this;this.setOfferAnswerCycle(e,function(){i.sendSessionAccept(t,n)},n,r)}},{key:"invite",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!this.isInitiator)throw new Error("Trying to invite from the responder session");this.modificationQueue.push(function(n){var r=[],i=t,o=Array.isArray(i),a=0;for(i=o?i:i["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var s;if(o){if(a>=i.length)break;s=i[a++]}else{if((a=i.next()).done)break;s=a.value}var c=s;r.push(e.peerconnection.addTrack(c,e.isInitiator))}Promise.all(r).then(function(){return e.peerconnection.createOffer(e.mediaConstraints)}).then(function(t){return e.peerconnection.setLocalDescription(t)}).then(function(){e.sendSessionInitiate(e.peerconnection.localDescription.sdp)}).then(function(){return n()},function(e){return n(e)})},function(e){e?T.error("invite error",e):T.debug("invite executed - OK")})}},{key:"sendSessionInitiate",value:function(e){var t=Object(i.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-initiate",initiator:this.initiatorJid,sid:this.sid});new _.a(e).toJingle(t,this.isInitiator?"initiator":"responder"),t=t.tree(),T.info("Session-initiate: ",t),this.connection.sendIQ(t,function(){T.info('Got RESULT for "session-initiate"')},function(e){T.error('"session-initiate" error',e)},1e4)}},{key:"setAnswer",value:function(e){if(!this.isInitiator)throw new Error("Trying to set an answer on the responder session");this.setOfferAnswerCycle(e,function(){T.info("setAnswer - succeeded")},function(e){T.error("setAnswer failed: ",e)})}},{key:"setOfferAnswerCycle",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];this.modificationQueue.push(function(t){var n=[],o=i,a=Array.isArray(o),s=0;for(o=a?o:o["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var c;if(a){if(s>=o.length)break;c=o[s++]}else{if((s=o.next()).done)break;c=s.value}var u=c;n.push(r.peerconnection.addTrack(u,r.isInitiator))}var d=r._processNewJingleOfferIq(e),l=r.peerconnection.localDescription.sdp,h=$(e).find('>bridge-session[xmlns="http://jitsi.org/protocol/focus"]').attr("id");h!==r._bridgeSessionId&&(r._bridgeSessionId=h),Promise.all(n).then(function(){return r._renegotiate(d.raw)}).then(function(){if(r.state===g.c&&(r.state=g.a,!r.isP2P||r._localVideoActive&&!r.localRecvMaxFrameHeight||r.sendContentModify()),l){var e=new _.a(r.peerconnection.localDescription.sdp);r.notifyMySSRCUpdate(new _.a(l),e)}}).then(function(){return t()},function(e){return t(e)})},function(e){e?n(e):t()})}},{key:"replaceTransport",value:function(e,t,n){var r=this;this.room.eventEmitter.emit(u.a.ICE_RESTARTING,this);var i=e.clone();e.find(">content[name='data']").attr("senders","rejected"),e.find(">content>description>source").remove(),e.find(">content>description>ssrc-group").remove();var o=e.find(">content>transport>fingerprint");o.attr("hash","sha-1"),o.text("00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00"),this.setOfferAnswerCycle(e,function(){r.setOfferAnswerCycle(i,function(){var e=new _.a(r.peerconnection.localDescription.sdp);r.sendTransportAccept(e,t,n),r.room.eventEmitter.emit(u.a.ICE_RESTART_SUCCESS,r,i)},n)},n)}},{key:"sendSessionAccept",value:function(e,t){var n=this,r=new _.a(this.peerconnection.localDescription.sdp),o=Object(i.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-accept",initiator:this.initiatorJid,responder:this.responderJid,sid:this.sid});this.webrtcIceTcpDisable&&(r.removeTcpCandidates=!0),this.webrtcIceUdpDisable&&(r.removeUdpCandidates=!0),this.failICE&&(r.failICE=!0),r.toJingle(o,this.initiatorJid===this.localJid?"initiator":"responder",null),o=o.tree(),T.info("Sending session-accept",o),this.connection.sendIQ(o,e,this.newJingleErrorHandler(o,function(e){t(e),n.room.eventEmitter.emit(u.a.SESSION_ACCEPT_TIMEOUT,n)}),1e4)}},{key:"sendContentModify",value:function(){var e=this.localRecvMaxFrameHeight,t=this._localVideoActive?"both":"none",n=Object(i.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"content-modify",initiator:this.initiatorJid,sid:this.sid}).c("content",{name:"video",senders:t});void 0!==e&&(n=n.c("max-frame-height",{xmlns:"http://jitsi.org/jitmeet/video"}).t(e)),T.info(this+" sending content-modify, video senders: "+t+", max frame height: "+e),this.connection.sendIQ(n,null,this.newJingleErrorHandler(n),1e4)}},{key:"setReceiverVideoConstraint",value:function(e){T.info(this+" setReceiverVideoConstraint - max frame height: "+e),this.localRecvMaxFrameHeight=e,this.isP2P?this.state===g.a&&this.sendContentModify():this.rtc.setReceiverVideoConstraint(e)}},{key:"sendTransportAccept",value:function(e,t,n){var r=this,o=Object(i.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"transport-accept",initiator:this.initiatorJid,sid:this.sid});e.media.forEach(function(t,n){var i=E.a.parseMLine(t.split("\r\n")[0]);o.c("content",{creator:r.initiatorJid===r.localJid?"initiator":"responder",name:i.media}),e.transportToJingle(n,o),o.up()}),o=o.tree(),T.info("Sending transport-accept: ",o),this.connection.sendIQ(o,t,this.newJingleErrorHandler(o,n),1e4)}},{key:"sendTransportReject",value:function(e,t){var n=Object(i.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"transport-reject",initiator:this.initiatorJid,sid:this.sid});n=n.tree(),T.info("Sending 'transport-reject",n),this.connection.sendIQ(n,e,this.newJingleErrorHandler(n,t),1e4)}},{key:"setSenderMaxBitrates",value:function(){return this._assertNotEnded()?this.peerconnection.setMaxBitRate():Promise.resolve()}},{key:"setSenderVideoConstraint",value:function(e){return this._assertNotEnded()?(T.info(this+" setSenderVideoConstraint: "+e),this.peerconnection.setSenderVideoConstraint(e)):Promise.resolve()}},{key:"setSenderVideoDegradationPreference",value:function(){return this._assertNotEnded()?this.peerconnection.setSenderVideoDegradationPreference():Promise.resolve()}},{key:"terminate",value:function(e,t,n){if(this.state!==g.b){if(!n||Boolean(n.sendSessionTerminate)){var r=Object(i.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-terminate",initiator:this.initiatorJid,sid:this.sid}).c("reason").c(n&&n.reason||"success").up();n&&n.reasonDescription?r.c("text").t(n.reasonDescription).up().up():r.up(),this._bridgeSessionId&&r.c("bridge-session",{xmlns:"http://jitsi.org/protocol/focus",id:this._bridgeSessionId,restart:n&&!0===n.requestRestart}).up(),r=r.tree(),T.info("Sending session-terminate",r),this.connection.sendIQ(r,e,this.newJingleErrorHandler(r,t),1e4)}else T.info("Skipped sending session-terminate for "+this);this.connection.jingle.terminate(this.sid)}}},{key:"onTerminated",value:function(e,t){T.info("Session terminated "+this,e,t),this._xmppListeners.forEach(function(e){return e()}),this._xmppListeners=[],this._removeSenderVideoConstraintsChangeListener&&this._removeSenderVideoConstraintsChangeListener(),this.close()}},{key:"onXmppStatusChanged",value:function(e){e===C.a.Status.CONNECTED&&this._cachedOldLocalSdp&&(T.info("Sending SSRC update on reconnect"),this.notifyMySSRCUpdate(this._cachedOldLocalSdp,this._cachedNewLocalSdp))}},{key:"_parseSsrcInfoFromSourceAdd",value:function(e,t){var n=[];return $(e).each(function(e,r){var i=$(r).attr("name"),o="";$(r).find('ssrc-group[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(){var e=this.getAttribute("semantics"),t=$(this).find(">source").map(function(){return this.getAttribute("ssrc")}).get();t.length&&(o+="a=ssrc-group:"+e+" "+t.join(" ")+"\r\n")}),$(r).find('source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(){var e=$(this).attr("ssrc");t.containsSSRC(e)?T.warn("Source-add request for existing SSRC: "+e):$(this).find(">parameter").each(function(){o+="a=ssrc:"+e+" "+$(this).attr("name"),$(this).attr("value")&&$(this).attr("value").length&&(o+=":"+$(this).attr("value")),o+="\r\n"})}),t.media.forEach(function(e,t){E.a.findLine(e,"a=mid:"+i)&&(n[t]||(n[t]=""),n[t]+=o)})}),n}},{key:"addRemoteStream",value:function(e){this._addOrRemoveRemoteStream(!0,e)}},{key:"removeRemoteStream",value:function(e){this._addOrRemoveRemoteStream(!1,e)}},{key:"_addOrRemoveRemoteStream",value:function(e,t){var n=this,r=e?"addRemoteStream":"removeRemoteStream";e&&this.readSsrcInfo(t),this.modificationQueue.push(function(i){if(!n.peerconnection.localDescription||!n.peerconnection.localDescription.sdp){var o=r+" - localDescription not ready yet";return T.error(o),void i(o)}T.log("Processing "+r),T.log("ICE connection state: ",n.peerconnection.iceConnectionState);var a=new _.a(n.peerconnection.localDescription.sdp),s=new _.a(n.peerconnection.remoteDescription.sdp),c=e?n._parseSsrcInfoFromSourceAdd(t,s):n._parseSsrcInfoFromSourceRemove(t,s),u=e?n._processRemoteAddSource(c):n._processRemoteRemoveSource(c);n._renegotiate(u.raw).then(function(){var e=new _.a(n.peerconnection.localDescription.sdp);T.log(r+" - OK, SDPs: ",a,e),n.notifyMySSRCUpdate(a,e),i()},function(e){T.error(r+" failed:",e),i(e)})})}},{key:"_processNewJingleOfferIq",value:function(e){var t=new _.a("");return this.webrtcIceTcpDisable&&(t.removeTcpCandidates=!0),this.webrtcIceUdpDisable&&(t.removeUdpCandidates=!0),this.failICE&&(t.failICE=!0),t.fromJingle(e),this.readSsrcInfo($(e).find(">content")),t}},{key:"_processRemoteRemoveSource",value:function(e){var t=m.a.usesPlanB()?new _.a(this.peerconnection.remoteDescription.sdp):new _.a(this.peerconnection.peerconnection.remoteDescription.sdp);return e.forEach(function(e,n){(e=e.split("\r\n")).pop(),m.a.usesPlanB()?e.forEach(function(e){t.media[n]=t.media[n].replace(e+"\r\n","")}):e.forEach(function(e){var n=t.media.findIndex(function(t){return t.includes(e)});n>-1&&(t.media[n]=t.media[n].replace(e+"\r\n",""),m.a.isFirefox()&&(t.media[n]=t.media[n].replace("a=sendonly","a=inactive")))})}),t.raw=t.session+t.media.join(""),t}},{key:"_processRemoteAddSource",value:function(e){var t=new _.a(this.peerconnection.remoteDescription.sdp);return e.forEach(function(e,n){t.media[n]+=e}),t.raw=t.session+t.media.join(""),t}},{key:"_renegotiate",value:function(e){if("closed"===this.peerconnection.signalingState){var t=new Error("Attempted to renegotiate in state closed");return this.room.eventEmitter.emit(u.a.RENEGOTIATION_FAILED,t,this),Promise.reject(t)}var n=e||this.peerconnection.remoteDescription.sdp;if(!n){var r=new Error("Can not renegotiate without remote description, current state: "+this.state);return this.room.eventEmitter.emit(u.a.RENEGOTIATION_FAILED,r,this),Promise.reject(r)}var i=new RTCSessionDescription({type:this.isInitiator?"answer":"offer",sdp:n});return this.isInitiator?this._initiatorRenegotiate(i):this._responderRenegotiate(i)}},{key:"_responderRenegotiate",value:function(e){var t=this;return T.debug("Renegotiate: setting remote description"),this.peerconnection.setRemoteDescription(e).then(function(){return T.debug("Renegotiate: creating answer"),t.peerconnection.createAnswer(t.mediaConstraints).then(function(e){return T.debug("Renegotiate: setting local description"),t.peerconnection.setLocalDescription(e)})})}},{key:"_initiatorRenegotiate",value:function(e){var t=this;return T.debug("Renegotiate: creating offer"),this.peerconnection.createOffer(this.mediaConstraints).then(function(n){return T.debug("Renegotiate: setting local description"),t.peerconnection.setLocalDescription(n).then(function(){return T.debug("Renegotiate: setting remote description"),t.peerconnection.setRemoteDescription(e)})})}},{key:"replaceTrack",value:function(e,t){var n=this,r=function(r){var i=n.peerconnection.localDescription.sdp;m.a.usesPlanB()&&(n.peerconnection.options.capScreenshareBitrate&&e&&t&&t.isVideoTrack()&&n.peerconnection.clearRecvonlySsrc(),!e&&t&&t.isVideoTrack()?n.peerconnection.clearRecvonlySsrc():e&&e.isVideoTrack()&&!t&&(n.peerconnection.clearRecvonlySsrc(),n.peerconnection.generateRecvonlySsrc())),n.peerconnection.replaceTrack(e,t).then(function(r){var o=Promise.resolve();return r&&(e||t)&&n.state===g.a&&(o=n._renegotiate().then(function(){var e=new _.a(n.peerconnection.localDescription.sdp);n.notifyMySSRCUpdate(new _.a(i),e)})),o.then(function(){if(t&&t.isVideoTrack())return n.peerconnection.setSenderVideoDegradationPreference().then(function(){return n.peerconnection.setSenderVideoConstraint()}).then(function(){return n.peerconnection.setMaxBitRate()})})}).then(function(){return r()},function(e){return r(e)})};return new Promise(function(e,t){n.modificationQueue.push(r,function(n){n?(T.error("Replace track error:",n),t(n)):(T.info("Replace track done!"),e())})})}},{key:"_parseSsrcInfoFromSourceRemove",value:function(e,t){var n=[];return $(e).each(function(e,r){var i=$(r).attr("name"),o="";$(r).find('ssrc-group[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(){var e=this.getAttribute("semantics"),t=$(this).find(">source").map(function(){return this.getAttribute("ssrc")}).get();t.length&&(o+="a=ssrc-group:"+e+" "+t.join(" ")+"\r\n")});var a=[];$(r).find('source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(){var e=$(this).attr("ssrc");a.push(e)}),t.media.forEach(function(e,t){E.a.findLine(e,"a=mid:"+i)&&(n[t]||(n[t]=""),a.forEach(function(r){var i=E.a.findLines(e,"a=ssrc:"+r);i.length&&(n[t]+=i.join("\r\n")+"\r\n")}),n[t]+=o)})}),n}},{key:"_verifyNoSSRCChanged",value:function(e,t){var n=new _.a(this.peerconnection.localDescription.sdp),r=new S.a(t,n),i=r.getNewMedia();if(Object.keys(i).length)return T.error(this+" - some SSRC were added on "+e,i),!1;var o=(r=new S.a(n,t)).getNewMedia();return!Object.keys(o).length||(T.error(this+" - some SSRCs were removed on "+e,o),!1)}},{key:"addTrackAsUnmute",value:function(e){var t=this;return this._addRemoveTrackAsMuteUnmute(!1,e).then(function(){if(e.isVideoTrack()&&m.a.doesVideoMuteByStreamRemove())return t.setSenderMaxBitrates().then(function(){return t.setSenderVideoDegradationPreference()}).then(function(){return t.setSenderVideoConstraint()})})}},{key:"removeTrackAsMute",value:function(e){return this._addRemoveTrackAsMuteUnmute(!0,e)}},{key:"_addRemoveTrackAsMuteUnmute",value:function(e,t){var n=this;if(!t)return Promise.reject('invalid "track" argument value');var r=e?"removeTrackMute":"addTrackUnmute",i=function(i){var o=n.peerconnection;if(o){var a=o.localDescription.sdp;(e?o.removeTrackMute(t):o.addTrackUnmute(t)).then(function(e){e&&a&&o.remoteDescription.sdp?n._renegotiate().then(function(){n._verifyNoSSRCChanged(r,new _.a(a)),i()}):i()},i)}else i("Error: tried "+r+" track with no active peerconnection")};return new Promise(function(e,t){n.modificationQueue.push(i,function(n){n?t(n):e()})})}},{key:"setMediaTransferActive",value:function(e,t){var n=this;if(!this.peerconnection)return Promise.reject('Can not modify transfer active state, before "initialize" is called');var r=e?"audio active":"audio inactive",i=t?"video active":"video inactive";T.info("Queued make "+i+", "+r+" task...");var o=function(r){var i=n.state===g.a,o=n.peerconnection.setAudioTransferActive(e);n._localVideoActive!==t&&(n._localVideoActive=t,n.isP2P&&i&&n.sendContentModify());var a=n.peerconnection.setVideoTransferActive(n._localVideoActive&&n._remoteVideoActive);i&&(o||a)?n._renegotiate().then(r,r):r()};return new Promise(function(e,t){n.modificationQueue.push(o,function(n){n?t(n):e()})})}},{key:"modifyContents",value:function(e){var n=this,r=t.parseVideoSenders(e),i=t.parseMaxFrameHeight(e);i&&(T.info(this+" received remote max frame height: "+i),this.remoteRecvMaxFrameHeight=i,this.eventEmitter.emit(y.a.REMOTE_VIDEO_CONSTRAINTS_CHANGED,this)),null!==r?(T.debug(this+" queued \"content-modify\" task(video senders=\""+r+"\")"),this.modificationQueue.push(function(e){n._assertNotEnded("content-modify")&&n._modifyRemoteVideoActive(r)?n._renegotiate().then(e,e):e()},function(e){e&&T.error('"content-modify" failed',e)})):T.error(this+' - failed to parse video "senders" attribute in"content-modify" action')}},{key:"_modifyRemoteVideoActive",value:function(e){var t="both"===e||"initiator"===e&&this.isInitiator||"responder"===e&&!this.isInitiator;return t!==this._remoteVideoActive&&(T.debug(this+" new remote video active: "+t),this._remoteVideoActive=t),this.peerconnection.setVideoTransferActive(this._localVideoActive&&this._remoteVideoActive)}},{key:"notifyMySSRCUpdate",value:function(e,t){if(this.state===g.a){if(!this.connection.connected)return this._cachedOldLocalSdp||(this._cachedOldLocalSdp=e),this._cachedNewLocalSdp=t,void T.warn("Not sending SSRC update while the signaling is disconnected");this._cachedOldLocalSdp=void 0,this._cachedNewLocalSdp=void 0;var n=new S.a(t,e),r=Object(i.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"source-remove",initiator:this.initiatorJid,sid:this.sid});n.toJingle(r)?(T.info("Sending source-remove",r.tree()),this.connection.sendIQ(r,null,this.newJingleErrorHandler(r),1e4)):T.log("removal not necessary"),n=new S.a(e,t);var o=Object(i.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"source-add",initiator:this.initiatorJid,sid:this.sid});n.toJingle(o)?(T.info("Sending source-add",o.tree()),this.connection.sendIQ(o,null,this.newJingleErrorHandler(o),1e4)):T.log("addition not necessary")}else T.warn("Skipping SSRC update in '"+this.state+" ' state.")}},{key:"newJingleErrorHandler",value:function(e,t){var n=this;return function(e){var r={},i=$(e).find("error");if(i.length){r.code=i.attr("code");var o=$(e).find("error :first");o.length&&(r.reason=o[0].tagName);var a=i.find(">text");a.length&&(r.msg=a.text())}e||(r.reason="timeout"),r.session=n.toString(),t?t(r):n.state===g.b&&"item-not-found"===r.reason?T.debug("Jingle error: "+JSON.stringify(r)):p.a.callErrorHandler(new Error("Jingle error: "+JSON.stringify(r)))}}},{key:"getIceConnectionState",value:function(){return this.peerconnection.getConnectionState()}},{key:"close",value:function(){var e=this;this.state=g.b,this.establishmentDuration=void 0,this.peerconnection&&(this.peerconnection.onicecandidate=null,this.peerconnection.oniceconnectionstatechange=null,this.peerconnection.onnegotiationneeded=null,this.peerconnection.onsignalingstatechange=null),this.modificationQueue.clear(),this.modificationQueue.push(function(t){e.signalingLayer.setChatRoom(null),e.peerconnection&&e.peerconnection.close(),t()}),this.modificationQueue.shutdown()}},{key:"toString",value:function(){return"JingleSessionPC[p2p="+this.isP2P+",initiator="+this.isInitiator+",sid="+this.sid+"]"}},{key:"_abtestSuspendVideoEnabled",value:function(e){var t=e.abTesting;if(t&&t.enableSuspendVideoTest){var n=this._getInitiatorJid();return Object(f.integerHash)(n)%2==0}}}]),t})(v.a)}).call(this,"modules/xmpp/JingleSessionPC.js")},function(e,t,n){"use strict";t.a={REMOTE_VIDEO_CONSTRAINTS_CHANGED:"media_session.REMOTE_VIDEO_CONSTRAINTS_CHANGED"}},function(e,t,n){"use strict";n.r(t),n.d(t,"DEVICE_LIST_CHANGED",function(){return r}),n.d(t,"PERMISSION_PROMPT_IS_SHOWN",function(){return i});var r="mediaDevices.devicechange",i="mediaDevices.permissionPromptIsShown"},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(9);function i(e,t){if(!t)return!1;if(e.length!==t.length)return!1;for(var n=0,r=e.length;n1)for(var n=1;ns))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var d=-1,l=!0,h=2&n?new oe:void 0;for(o.set(e,t),o.set(t,e);++d-1},re.prototype.set=function(e,t){var n=this.__data__,r=ce(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ie.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(V||re),string:new ne}},ie.prototype.delete=function(e){var t=ve(this,e).delete(e);return this.size-=t?1:0,t},ie.prototype.get=function(e){return ve(this,e).get(e)},ie.prototype.has=function(e){return ve(this,e).has(e)},ie.prototype.set=function(e,t){var n=ve(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},oe.prototype.add=oe.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},oe.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.clear=function(){this.__data__=new re,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof re){var r=n.__data__;if(!V||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ie(r)}return n.set(e,t),this.size=n.size,this};var ye=H?function(e){return null==e?[]:(e=Object(e),(function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function we(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ie(e){return null!=e&&"object"==typeof e}var Pe=y?(function(e){return function(t){return e(t)}})(y):function(e){return Ie(e)&&ke(e.length)&&!!u[ue(e)]};function De(e){return null!=(t=e)&&ke(t.length)&&!Ae(t)?se(e):pe(e);var t}n.exports=function(e,t){return le(e,t)}}).call(this,n(45),n(74)(e))},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),window.AudioContext=window.AudioContext||window.webkitAudioContext;var r=null;function i(e,t,n){this.stream=e,this.intervalId=null,this.intervalMilis=t,this.audioLevel=0,this.callback=n}window.AudioContext&&((r=new AudioContext).suspend&&r.suspend()),i.prototype.start=function(){var e=this;if(i.isLocalStatsSupported()){r.resume();var t=r.createAnalyser();t.smoothingTimeConstant=.8,t.fftSize=2048,r.createMediaStreamSource(this.stream).connect(t),this.intervalId=setInterval(function(){var n=new Uint8Array(t.frequencyBinCount);t.getByteTimeDomainData(n);var r=(function(e){for(var t=0,n=e.length,r=0;r.2?t-.2:n<-.4?t+.4:e).toFixed(3))})(r,e.audioLevel),e.callback(e.audioLevel)},this.intervalMilis)}},i.prototype.stop=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)},i.isLocalStatsSupported=function(){return Boolean(r)}},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r="https://api.callstats.io/static/callstats-ws.min.js"},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return d}),n.d(t,"b",function(){return p});var r=n(2),i=n(0),o=n.n(i),a=n(21),s=n(4).getLogger(e),c=["category","type","lang","name"],u=["category","type","lang"],d="Feature version mismatch";function l(e,t){var n=0;return u.some(function(r){return 0!==(n=e[r]>t[r]?1:e[r]0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"http://jitsi.org/jitsimeet";if(_classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this))).node=i,e.disco=n.disco,!e.disco)throw new Error("Missing strophe-plugins (disco plugin is required)!");e.versionToCapabilities=Object.create(null),e.jidToVersion=Object.create(null),e.version="",e.rooms=new Set;var a=n.emuc;return a.addListener(o.a.EMUC_ROOM_ADDED,function(t){return e._addChatRoom(t)}),a.addListener(o.a.EMUC_ROOM_REMOVED,function(t){return e._removeChatRoom(t)}),Object.keys(a.rooms).forEach(function(t){e._addChatRoom(a.rooms[t])}),r.Strophe.addNamespace("CAPS","http://jabber.org/protocol/caps"),e.disco.addFeature(r.Strophe.NS.CAPS),n.addHandler(e._handleCaps.bind(_assertThisInitialized(_assertThisInitialized(e))),r.Strophe.NS.CAPS),e._onMucMemberLeft=e._removeJidToVersionEntry.bind(_assertThisInitialized(_assertThisInitialized(e))),_possibleConstructorReturn(e)}return _inherits(t,e),_createClass(t,[{key:"addFeature",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.disco.addFeature(e),this._generateVersion(),t&&this.submit()}},{key:"removeFeature",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.disco.removeFeature(e),this._generateVersion(),t&&this.submit()}},{key:"submit",value:function(){this.rooms.forEach(function(e){return e.sendPresence()})}},{key:"getFeatures",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,r=e in this.jidToVersion?this.jidToVersion[e]:null;if(!(r&&r.version in this.versionToCapabilities)){var i=r?r.node+"#"+r.version:null;return this._getDiscoInfo(e,i,n).then(function(e){var n=e.features,o=e.identities;if(r){var a=h(Array.from(o),Array.from(n)),c=r.node+"#"+a;return c===i?(t.versionToCapabilities[c]=n,n):t.versionToCapabilities[c]?t.versionToCapabilities[c]:(s.error("Expected node "+i+" but received "+c),Promise.reject(d))}return n})}return Promise.resolve(this.versionToCapabilities[r.version])}},{key:"getFeaturesAndIdentities",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3;return this._getDiscoInfo(e,t,n)}},{key:"_getDiscoInfo",value:function(e,t,n){var r=this;return new Promise(function(i,o){return r.disco.info(e,t,function(e){var t=new Set,n=new Set;$(e).find(">query>feature").each(function(e,n){return t.add(n.getAttribute("var"))}),$(e).find(">query>identity").each(function(e,t){return n.add({type:t.getAttribute("type"),name:t.getAttribute("name"),category:t.getAttribute("category")})}),i({features:t,identities:n})},o,n)})}},{key:"_addChatRoom",value:function(e){this.rooms.add(e),e.addListener(o.a.MUC_MEMBER_LEFT,this._onMucMemberLeft),this._fixChatRoomPresenceMap(e)}},{key:"_removeChatRoom",value:function(e){this.rooms.delete(e),e.removeListener(o.a.MUC_MEMBER_LEFT,this._onMucMemberLeft)}},{key:"_fixChatRoomPresenceMap",value:function(e){e.addToPresence("c",{attributes:{xmlns:r.Strophe.NS.CAPS,hash:"sha-1",node:this.node,ver:this.version}})}},{key:"_notifyVersionChanged",value:function(){var e=this;this.rooms.forEach(function(t){return e._fixChatRoomPresenceMap(t)})}},{key:"_generateVersion",value:function(){this.version=h(this.disco._identities,this.disco._features),this._notifyVersionChanged()}},{key:"_handleCaps",value:function(e){var t=e.getAttribute("from"),n=e.querySelector("c"),r=n.getAttribute("ver"),i=n.getAttribute("node"),a=this.jidToVersion[t];return this.jidToVersion[t]={version:r,node:i},a&&a.version!==r&&this.eventEmitter.emit(o.a.PARTCIPANT_FEATURES_CHANGED,t),!0}},{key:"_removeJidToVersionEntry",value:function(e){e in this.jidToVersion&&delete this.jidToVersion[e]}}]),t})(a.a)}).call(this,"modules/xmpp/Caps.js")},function(e,t,n){"use strict";n.r(t),n.d(t,"ON",function(){return r}),n.d(t,"OFF",function(){return i});var r="on",i="off"},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return h});var r=n(19),i=n.n(r),o=n(4),a=n(15),s=n(8),c=n(3),u=n(10),d=Object(o.getLogger)(e),l={track_mute:"onmute",track_unmute:"onunmute",track_ended:"onended"},h=(function(e){function t(e,n,r,i,o,a){var s;return _classCallCheck(this,t),(s=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this))).addEventListener=s.addListener,s.removeEventListener=s.off=s.removeListener,s.containers=[],s.conference=e,s.audioLevel=-1,s.type=o,s.track=r,s.videoType=a,s.handlers=new Map,s.disposed=!1,s._streamInactiveHandler=i,s._setStream(n),s}return _inherits(t,e),_createClass(t,[{key:"_addMediaStreamInactiveHandler",value:function(e){c.a.isFirefox()?this.track.onended=e:this.stream.oninactive=e}},{key:"_setHandler",value:function(e,t){if(l.hasOwnProperty(e)){if(t?this.handlers.set(e,t):this.handlers.delete(e),this.stream){var n=this.stream.getTracks(),r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol&&"function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}o[l[e]]=t}}}else d.error("Invalid handler type "+e)}},{key:"_unregisterHandlers",value:function(){if(this.stream){var e=this.handlers.keys(),t=Array.isArray(e),n=0;for(e=t?e:e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var r;if(t){if(n>=e.length)break;r=e[n++]}else{if((n=e.next()).done)break;r=n.value}var i=r,o=this.stream.getVideoTracks(),a=Array.isArray(o),s=0;for(o=a?o:o["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var c;if(a){if(s>=o.length)break;c=o[s++]}else{if((s=o.next()).done)break;c=s.value}c[l[i]]=void 0}}this._streamInactiveHandler&&this._addMediaStreamInactiveHandler(void 0)}else d.warn(this+": unable to unregister handlers - no stream object")}},{key:"_setStream",value:function(e){if(this.stream!==e&&(this.stream=e,this.stream)){var t=this.handlers.keys(),n=Array.isArray(t),r=0;for(t=n?t:t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}var o=i;this._setHandler(o,this.handlers.get(o))}this._streamInactiveHandler&&this._addMediaStreamInactiveHandler(this._streamInactiveHandler)}}},{key:"getType",value:function(){return this.type}},{key:"isAudioTrack",value:function(){return this.getType()===s.a}},{key:"isWebRTCTrackMuted",value:function(){return this.track&&this.track.muted}},{key:"isVideoTrack",value:function(){return this.getType()===s.c}},{key:"isLocal",value:function(){throw new Error("Not implemented by subclass")}},{key:"isLocalAudioTrack",value:function(){return this.isAudioTrack()&&this.isLocal()}},{key:"getOriginalStream",value:function(){return this.stream}},{key:"getStreamId",value:function(){return this.stream?this.stream.id:null}},{key:"getTrack",value:function(){return this.track}},{key:"getTrackLabel",value:function(){return this.track.label}},{key:"getTrackId",value:function(){return this.track?this.track.id:null}},{key:"getUsageLabel",value:function(){return this.isAudioTrack()?"mic":this.videoType?this.videoType:"default"}},{key:"_maybeFireTrackAttached",value:function(e){this.conference&&e&&this.conference._onTrackAttach(this,e)}},{key:"attach",value:function(e){this.stream&&(this._onTrackAttach(e),u.a.attachMediaStream(e,this.stream)),this.containers.push(e),this._maybeFireTrackAttached(e),this._attachTTFMTracker(e)}},{key:"detach",value:function(e){for(var t=this.containers,n=t.length-1;n>=0;--n){var r=t[n];e||(this._onTrackDetach(r),u.a.attachMediaStream(r,null)),e&&r!==e||t.splice(n,1)}e&&(this._onTrackDetach(e),u.a.attachMediaStream(e,null))}},{key:"_onTrackAttach",value:function(e){}},{key:"_onTrackDetach",value:function(e){}},{key:"_attachTTFMTracker",value:function(e){}},{key:"dispose",value:function(){return this.removeAllListeners(),this.disposed=!0,Promise.resolve()}},{key:"isScreenSharing",value:function(){}},{key:"getId",value:function(){return this.stream?u.a.getStreamID(this.stream):null}},{key:"isActive",value:function(){return void 0===this.stream.active||this.stream.active}},{key:"setAudioLevel",value:function(e,t){c.a.supportsReceiverStats()&&!this.isLocalAudioTrack()&&this.isWebRTCTrackMuted()||(this.audioLevel!==e?(this.audioLevel=e,this.emit(a.TRACK_AUDIO_LEVEL_CHANGED,e,t)):0===this.audioLevel&&0===e&&this.isLocal()&&!this.isWebRTCTrackMuted()&&this.emit(a.NO_AUDIO_INPUT,e))}},{key:"getMSID",value:function(){var e=this.getStreamId(),t=this.getTrackId();return e&&t?e+" "+t:null}},{key:"setAudioOutput",value:function(e){var t=this;return u.a.isDeviceChangeAvailable("output")?this.isVideoTrack()?Promise.resolve():Promise.all(this.containers.map(function(t){return t.setSinkId(e).catch(function(e){throw d.warn("Failed to change audio output device on element. Default or previously set audio output device will be used.",t,e),e})})).then(function(){t.emit(a.TRACK_AUDIO_OUTPUT_CHANGED,e)}):Promise.reject(new Error("Audio output device change is not supported"))}}]),t})(i.a)}).call(this,"modules/RTC/JitsiTrack.js")},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(19),i=n.n(r),o=n(12),a=n(63),s=n(22),c=(function(e){function t(e,n,r){var i;return _classCallCheck(this,t),(i=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this)))._procNodeSampleRate=e,i._vadProcessor=n,i._localTrack=r,i._bufferResidue=new Float32Array([]),i._audioContext=Object(a.a)({sampleRate:n.getRequiredPCMFrequency()}),i._vadSampleSize=n.getSampleLength(),i._onAudioProcess=i._onAudioProcess.bind(_assertThisInitialized(_assertThisInitialized(i))),i._initializeAudioContext(),i}return _inherits(t,e),_createClass(t,[{key:"_initializeAudioContext",value:function(){this._audioSource=this._audioContext.createMediaStreamSource(this._localTrack.stream),this._audioProcessingNode=this._audioContext.createScriptProcessor(this._procNodeSampleRate,1,1)}},{key:"_onAudioProcess",value:function(e){for(var t=e.inputBuffer.getChannelData(0),n=_toConsumableArray(this._bufferResidue).concat(_toConsumableArray(t)),r=Date.now(),i=0;i+this._vadSampleSize=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var s=a;t.push(n/s.scaleResolutionDownBy)}return t}},{key:"removeTrackMute",value:function(e){var t=e.getType(),n=this.pc.peerconnection.getTransceivers().find(function(t){return t.sender&&t.sender.track&&t.sender.track.id===e.getTrackId()});return n?(l.debug("Removing "+e+" on "+this.pc),n.sender.replaceTrack(null)):Promise.reject(new Error("RTCRtpTransceiver for "+t+" not found"))}},{key:"replaceTrack",value:function(e,t){var n=this;if(e&&t){var r=t.getType(),i=t.getOriginalStream(),o=r===s.a?i.getAudioTracks()[0]:i.getVideoTracks()[0],c=this.pc.peerconnection.getTransceivers().find(function(e){return e.receiver.track.kind===r&&!e.stopped});return c?(l.debug("Replacing "+e+" with "+t+" on "+this.pc),c.sender.replaceTrack(o).then(function(){var r=n.pc.localSSRCs.get(e.rtcId);n.pc.localTracks.delete(e.rtcId),n.pc.localSSRCs.delete(e.rtcId),n.pc._addedStreams=n.pc._addedStreams.filter(function(e){return e!==i}),n.pc.localTracks.set(t.rtcId,t),n.pc._addedStreams.push(i),n.pc.localSSRCs.set(t.rtcId,r),n.pc.eventEmitter.emit(u.a.LOCAL_TRACK_SSRC_UPDATED,t,n.pc._extractPrimarySSRC(r))})):Promise.reject(new Error("replace track failed"))}if(e&&!t){if(!this.removeTrackMute(e))return Promise.reject(new Error("replace track failed"));this.pc.localTracks.delete(e.rtcId),this.pc.localSSRCs.delete(e.rtcId)}else if(t&&!e){var d=this.pc.localSSRCs.get(t.rtcId);this.addTrackUnmute(t).then(function(){t.emit(a.TRACK_MUTE_CHANGED,t),n.pc.localTracks.set(t.rtcId,t),n.pc.localSSRCs.set(t.rtcId,d)})}return Promise.resolve()}},{key:"setAudioTransferActive",value:function(e){this.setMediaTransferActive(s.a,e)}},{key:"setEncodings",value:function(e){var t=this.pc.peerconnection.getTransceivers().find(function(t){return t.sender&&t.sender.track&&t.sender.track.kind===e.getType()}),n=t.sender.getParameters();return n.encodings=this._getStreamEncodings(e),t.sender.setParameters(n)}},{key:"setMediaTransferActive",value:function(e,t){var n=this.pc.peerconnection.getTransceivers().filter(function(t){return t.receiver&&t.receiver.track&&t.receiver.track.kind===e}),r=this.pc.getLocalTracks(e);l.info((t?"Enabling":"Suspending")+" "+e+" media transfer on "+this.pc),n.forEach(function(e,n){t?0===n&&r.length?e.direction="sendrecv":e.direction="recvonly":e.direction="inactive"})}},{key:"setVideoTransferActive",value:function(e){this.setMediaTransferActive(s.c,e)}}]),e})()}).call(this,"modules/RTC/TPCUtils.js")},function(e,t){e.exports=(function(){"use strict";function e(t,n,r){_classCallCheck(this,e),this._userId=t,this.setDisplayName(n),this._isLocalStats=r||!1,this.setDominantSpeaker(!1),this.totalDominantSpeakerTime=0,this._dominantSpeakerStart=0,this._hasLeft=!1}return _createClass(e,[{key:"getUserId",value:function(){return this._userId}},{key:"getDisplayName",value:function(){return this.displayName}},{key:"setDisplayName",value:function(e){this.displayName=e}},{key:"isLocalStats",value:function(){return this._isLocalStats}},{key:"isDominantSpeaker",value:function(){return this._dominantSpeakerStart>0}},{key:"setDominantSpeaker",value:function(e){if(!this.isDominantSpeaker()&&e)this._dominantSpeakerStart=Date.now();else if(this.isDominantSpeaker()&&!e){var t=Date.now()-this._dominantSpeakerStart;this.totalDominantSpeakerTime+=t,this._dominantSpeakerStart=0}}},{key:"getTotalDominantSpeakerTime",value:function(){var e=this.totalDominantSpeakerTime;return this.isDominantSpeaker()&&(e+=Date.now()-this._dominantSpeakerStart),e}},{key:"hasLeft",value:function(){return this._hasLeft}},{key:"markAsHasLeft",value:function(){this._hasLeft=!0,this.setDominantSpeaker(!1)}}]),e})()},function(e,t){e.exports={IDENTITY_UPDATED:"authentication.identity_updated"}},function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;!(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&"object"==typeof module&&module.exports,AMD=__webpack_require__(145),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e){return function(t){return new Md5(!0).update(t)[e]()}},createMethod=function(){var e=createOutputMethod("hex");NODE_JS&&(e=nodeWrap(e)),e.create=function(){return new Md5},e.update=function(t){return e.create().update(t)};for(var t=0;t>2]|=e[o]<>6,c[i++]=128|63&r):r<55296||r>=57344?(c[i++]=224|r>>12,c[i++]=128|r>>6&63,c[i++]=128|63&r):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++o)),c[i++]=240|r>>18,c[i++]=128|r>>12&63,c[i++]=128|r>>6&63,c[i++]=128|63&r);else for(i=this.start;o>2]|=r<>2]|=(192|r>>6)<>2]|=(128|63&r)<=57344?(s[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<=64?(this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=EXTRA[3&t],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var e,t,n,r,i,o,a=this.blocks;this.first?t=((t=((e=((e=a[0]-680876937)<<7|e>>>25)-271733879<<0)^(n=((n=(-271733879^(r=((r=(-1732584194^2004318071&e)+a[1]-117830708)<<12|r>>>20)+e<<0)&(-271733879^e))+a[2]-1126478375)<<17|n>>>15)+r<<0)&(r^e))+a[3]-1316259209)<<22|t>>>10)+n<<0:(e=this.h0,t=this.h1,n=this.h2,t=((t+=((e=((e+=((r=this.h3)^t&(n^r))+a[0]-680876936)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+a[1]-389564586)<<12|r>>>20)+e<<0)&(e^t))+a[2]+606105819)<<17|n>>>15)+r<<0)&(r^e))+a[3]-1044525330)<<22|t>>>10)+n<<0),t=((t+=((e=((e+=(r^t&(n^r))+a[4]-176418897)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+a[5]+1200080426)<<12|r>>>20)+e<<0)&(e^t))+a[6]-1473231341)<<17|n>>>15)+r<<0)&(r^e))+a[7]-45705983)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(r^t&(n^r))+a[8]+1770035416)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+a[9]-1958414417)<<12|r>>>20)+e<<0)&(e^t))+a[10]-42063)<<17|n>>>15)+r<<0)&(r^e))+a[11]-1990404162)<<22|t>>>10)+n<<0,t=((t+=((e=((e+=(r^t&(n^r))+a[12]+1804603682)<<7|e>>>25)+t<<0)^(n=((n+=(t^(r=((r+=(n^e&(t^n))+a[13]-40341101)<<12|r>>>20)+e<<0)&(e^t))+a[14]-1502002290)<<17|n>>>15)+r<<0)&(r^e))+a[15]+1236535329)<<22|t>>>10)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+a[1]-165796510)<<5|e>>>27)+t<<0)^t))+a[6]-1069501632)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+a[11]+643717713)<<14|n>>>18)+r<<0)^r))+a[0]-373897302)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+a[5]-701558691)<<5|e>>>27)+t<<0)^t))+a[10]+38016083)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+a[15]-660478335)<<14|n>>>18)+r<<0)^r))+a[4]-405537848)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+a[9]+568446438)<<5|e>>>27)+t<<0)^t))+a[14]-1019803690)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+a[3]-187363961)<<14|n>>>18)+r<<0)^r))+a[8]+1163531501)<<20|t>>>12)+n<<0,t=((t+=((r=((r+=(t^n&((e=((e+=(n^r&(t^n))+a[13]-1444681467)<<5|e>>>27)+t<<0)^t))+a[2]-51403784)<<9|r>>>23)+e<<0)^e&((n=((n+=(e^t&(r^e))+a[7]+1735328473)<<14|n>>>18)+r<<0)^r))+a[12]-1926607734)<<20|t>>>12)+n<<0,t=((t+=((o=(r=((r+=((i=t^n)^(e=((e+=(i^r)+a[5]-378558)<<4|e>>>28)+t<<0))+a[8]-2022574463)<<11|r>>>21)+e<<0)^e)^(n=((n+=(o^t)+a[11]+1839030562)<<16|n>>>16)+r<<0))+a[14]-35309556)<<23|t>>>9)+n<<0,t=((t+=((o=(r=((r+=((i=t^n)^(e=((e+=(i^r)+a[1]-1530992060)<<4|e>>>28)+t<<0))+a[4]+1272893353)<<11|r>>>21)+e<<0)^e)^(n=((n+=(o^t)+a[7]-155497632)<<16|n>>>16)+r<<0))+a[10]-1094730640)<<23|t>>>9)+n<<0,t=((t+=((o=(r=((r+=((i=t^n)^(e=((e+=(i^r)+a[13]+681279174)<<4|e>>>28)+t<<0))+a[0]-358537222)<<11|r>>>21)+e<<0)^e)^(n=((n+=(o^t)+a[3]-722521979)<<16|n>>>16)+r<<0))+a[6]+76029189)<<23|t>>>9)+n<<0,t=((t+=((o=(r=((r+=((i=t^n)^(e=((e+=(i^r)+a[9]-640364487)<<4|e>>>28)+t<<0))+a[12]-421815835)<<11|r>>>21)+e<<0)^e)^(n=((n+=(o^t)+a[15]+530742520)<<16|n>>>16)+r<<0))+a[2]-995338651)<<23|t>>>9)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+a[0]-198630844)<<6|e>>>26)+t<<0)|~n))+a[7]+1126891415)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+a[14]-1416354905)<<15|n>>>17)+r<<0)|~e))+a[5]-57434055)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+a[12]+1700485571)<<6|e>>>26)+t<<0)|~n))+a[3]-1894986606)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+a[10]-1051523)<<15|n>>>17)+r<<0)|~e))+a[1]-2054922799)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+a[8]+1873313359)<<6|e>>>26)+t<<0)|~n))+a[15]-30611744)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+a[6]-1560198380)<<15|n>>>17)+r<<0)|~e))+a[13]+1309151649)<<21|t>>>11)+n<<0,t=((t+=((r=((r+=(t^((e=((e+=(n^(t|~r))+a[4]-145523070)<<6|e>>>26)+t<<0)|~n))+a[11]-1120210379)<<10|r>>>22)+e<<0)^((n=((n+=(e^(r|~t))+a[2]+718787259)<<15|n>>>17)+r<<0)|~e))+a[9]-343485551)<<21|t>>>11)+n<<0,this.first?(this.h0=e+1732584193<<0,this.h1=t-271733879<<0,this.h2=n-1732584194<<0,this.h3=r+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0)},Md5.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3;return HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3;return[255&e,e>>8&255,e>>16&255,e>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255,255&r,r>>8&255,r>>16&255,r>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var e,t,n,r="",i=this.array(),o=0;o<15;)e=i[o++],t=i[o++],n=i[o++],r+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[63&(e<<4|t>>>4)]+BASE64_ENCODE_CHAR[63&(t<<2|n>>>6)]+BASE64_ENCODE_CHAR[63&n];return e=i[o],r+(BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[e<<4&63]+"==")};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__(55),__webpack_require__(45))},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return S});var r=n(4),i=n(18),o=n(14),a=n(15),s=n(43),c=n.n(s),u=n(8),d=n(6),l=n.n(d),h=n(13),p=n.n(h),f=n(7),m=n(3),v=n(5),g=n(61),y=n(10),_=Object(r.getLogger)(e),S=(function(e){function t(e){var n,r=e.deviceId,i=e.facingMode,o=e.mediaType,s=e.resolution,c=e.rtcId,u=e.sourceId,d=e.sourceType,h=e.stream,f=e.track,v=e.videoType,g=e.effects,_=void 0===g?[]:g;_classCallCheck(this,t),(n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,null,h,f,function(){return n.emit(a.LOCAL_TRACK_STOPPED)},o,v)))._setEffectInProgress=!1;var S=_.find(function(e){return e.isEnabled(_assertThisInitialized(_assertThisInitialized(n)))});return S&&n._startStreamEffect(S),n.rtcId=c,n.sourceId=u,n.sourceType=d,m.a.usesNewGumFlow()?(n.resolution=f.getSettings().height,n.maxEnabledResolution=s,n._constraints=f.getConstraints(),Object.keys(n._constraints).length||v!==p.a.CAMERA||(n._constraints={height:f.getSettings().height,width:f.getSettings().width})):(n.resolution=m.a.isFirefox()?null:s,n.maxEnabledResolution=n.resolution),n.deviceId=r,n._prevSetMuted=Promise.resolve(),n._facingMode=i,n._trackEnded=!1,n._hasSentData=!1,n._testDataSent=!0,n._realDeviceId=""===n.deviceId?void 0:n.deviceId,n._trackMutedTS=0,n._onDeviceListWillChange=function(e){var t=n._realDeviceId;n._setRealDeviceIdFromDeviceList(e),(void 0===n.getTrack().readyState&&void 0!==n._realDeviceId&&!e.find(function(e){return e.deviceId===n._realDeviceId})||void 0!==t&&void 0===n._realDeviceId)&&(n._trackEnded=!0)},n.isAudioTrack()&&y.a.isDeviceChangeAvailable("output")&&(n._onAudioOutputDeviceChanged=n.setAudioOutput.bind(_assertThisInitialized(_assertThisInitialized(n))),y.a.addListener(l.a.AUDIO_OUTPUT_DEVICE_CHANGED,n._onAudioOutputDeviceChanged)),y.a.addListener(l.a.DEVICE_LIST_WILL_CHANGE,n._onDeviceListWillChange),n._initNoDataFromSourceHandlers(),n}return _inherits(t,e),_createClass(t,[{key:"isEnded",value:function(){return this.isVideoTrack()&&this.isMuted()?this._trackEnded:"ended"===this.getTrack().readyState||this._trackEnded}},{key:"_initNoDataFromSourceHandlers",value:function(){var e=this;this._isNoDataFromSourceEventsEnabled()&&(this._setHandler("track_mute",function(){e._trackMutedTS=window.performance.now(),e._fireNoDataFromSourceEvent()}),this._setHandler("track_unmute",function(){e._fireNoDataFromSourceEvent(),v.a.sendAnalyticsAndLog(f.s,{media_type:e.getType(),track_type:"local",value:window.performance.now()-e._trackMutedTS})}),this.isVideoTrack()&&this.videoType===p.a.CAMERA&&this._setHandler("track_ended",function(){e.isReceivingData()||e._fireNoDataFromSourceEvent()}))}},{key:"_isNoDataFromSourceEventsEnabled",value:function(){return!this.isVideoTrack()||this.videoType!==p.a.DESKTOP}},{key:"_fireNoDataFromSourceEvent",value:function(){var e=!this.isReceivingData();this.emit(a.NO_DATA_FROM_SOURCE,e),v.a.sendAnalytics(Object(f.H)(this.getType(),e)),v.a.sendLog(JSON.stringify({name:a.NO_DATA_FROM_SOURCE,log:e}))}},{key:"_setRealDeviceIdFromDeviceList",value:function(e){var t=this.getTrack(),n=t.kind+"input",r=e.find(function(e){return e.kind===n&&e.label===t.label});if(!r&&"default"===this._realDeviceId){var i=(t.label||"").replace("Default - ","");r=e.find(function(e){return e.kind===n&&e.label===i})}this._realDeviceId=r?r.deviceId:void 0}},{key:"_setStream",value:function(e){_get(_getPrototypeOf(t.prototype),"_setStream",this).call(this,e),e?(this.storedMSID=this.getMSID(),_.debug("Setting new MSID: "+this.storedMSID+" on "+this)):_.debug("Setting 'null' stream on "+this)}},{key:"_startStreamEffect",value:function(e){this._streamEffect=e,this._originalStream=this.stream,this._setStream(this._streamEffect.startEffect(this._originalStream)),this.track=this.stream.getTracks()[0]}},{key:"_stopStreamEffect",value:function(){this._streamEffect&&(this._streamEffect.stopEffect(),this._setStream(this._originalStream),this._originalStream=null,this.track=this.stream.getTracks()[0])}},{key:"_switchStreamEffect",value:function(e){this._streamEffect&&(this._stopStreamEffect(),this._streamEffect=void 0),e&&this._startStreamEffect(e)}},{key:"setEffect",value:function(e){var t=this;if(void 0===this._streamEffect&&void 0===e)return Promise.resolve();if(void 0!==e&&!e.isEnabled(this))return Promise.reject(new Error("Incompatible effect instance!"));if(!0===this._setEffectInProgress)return Promise.reject(new Error("setEffect already in progress!"));if(this.isMuted()&&!this.isAudioTrack())return this._streamEffect=e,Promise.resolve();var n=this.conference;return n?(this._setEffectInProgress=!0,m.a.usesUnifiedPlan()?(this._switchStreamEffect(e),this.isVideoTrack()&&this.containers.forEach(function(e){return y.a.attachMediaStream(e,t.stream)}),n.replaceTrack(this,this).then(function(){t._setEffectInProgress=!1}).catch(function(e){throw t._setEffectInProgress=!1,t._switchStreamEffect(),_.error("Failed to switch to the new stream!",e),e})):n.removeTrack(this).then(function(){return t._switchStreamEffect(e),t.isVideoTrack()&&t.containers.forEach(function(e){return y.a.attachMediaStream(e,t.stream)}),n.addTrack(t)}).then(function(){t._setEffectInProgress=!1}).catch(function(e){throw t._setEffectInProgress=!1,t._switchStreamEffect(),_.error("Failed to switch to the new stream!",e),e})):(this._switchStreamEffect(e),Promise.resolve())}},{key:"mute",value:function(){return this._queueSetMuted(!0)}},{key:"unmute",value:function(){return this._queueSetMuted(!1)}},{key:"_queueSetMuted",value:function(e){var t=this._setMuted.bind(this,e);return this._prevSetMuted=this._prevSetMuted.then(t,t),this._prevSetMuted}},{key:"_setMuted",value:function(e){var t=this;if(this.isMuted()===e)return Promise.resolve();if(this.disposed)return Promise.reject(new i.a(o.TRACK_IS_DISPOSED));var n=Promise.resolve(),r=function(){return _.info("Mute "+t+": "+e)};if(this.isAudioTrack()||this.videoType===p.a.DESKTOP||!m.a.doesVideoMuteByStreamRemove())r(),this.track&&(this.track.enabled=!e);else if(e)n=new Promise(function(e,n){r(),t._removeStreamFromConferenceAsMute(function(){t._streamEffect&&t._stopStreamEffect(),t._unregisterHandlers(),t.stopStream(),t._setStream(null),e()},n)});else{r();var s={cameraDeviceId:this.getDeviceId(),devices:[u.c],effects:this._streamEffect?[this._streamEffect]:[],facingMode:this.getCameraFacingMode()};m.a.usesNewGumFlow()?n=y.a.newObtainAudioAndVideoPermissions(_extends({},s,{constraints:{video:this._constraints}})):(this.resolution&&(s.resolution=this.resolution),n=y.a.obtainAudioAndVideoPermissions(s)),n=n.then(function(e){var n=t.getType()===u.b?u.c:t.getType(),r=m.a.usesNewGumFlow()?e.find(function(e){return e.track.kind===n}):e.find(function(e){return e.mediaType===n});if(!r)throw new i.a(o.TRACK_NO_STREAM_FOUND);return t._setStream(r.stream),t.track=r.track,t.videoType!==r.videoType&&(_.warn(t+": video type has changed after unmute!",t.videoType,r.videoType),t.videoType=r.videoType),t._streamEffect&&t._startStreamEffect(t._streamEffect),t.containers.map(function(e){return y.a.attachMediaStream(e,t.stream)}),t._addStreamToConferenceAsUnmute()})}return n.then(function(){return t._sendMuteStatus(e)}).then(function(){return t.emit(a.TRACK_MUTE_CHANGED,t)})}},{key:"_addStreamToConferenceAsUnmute",value:function(){var e=this;return this.conference?new Promise(function(t,n){e.conference._addLocalTrackAsUnmute(e).then(t,function(e){return n(new Error(e))})}):Promise.resolve()}},{key:"_removeStreamFromConferenceAsMute",value:function(e,t){this.conference?this.conference._removeLocalTrackAsMute(this).then(e,function(e){return t(new Error(e))}):e()}},{key:"_sendMuteStatus",value:function(e){var t=this;return this.conference&&this.conference.room?new Promise(function(n){t.conference.room[t.isAudioTrack()?"setAudioMute":"setVideoMute"](e,n)}):Promise.resolve()}},{key:"dispose",value:function(){var e=this;this._switchStreamEffect();var n=Promise.resolve();return this.conference&&(n=this.conference.removeTrack(this)),this.stream&&(this.stopStream(),this.detach()),y.a.removeListener(l.a.DEVICE_LIST_WILL_CHANGE,this._onDeviceListWillChange),this._onAudioOutputDeviceChanged&&y.a.removeListener(l.a.AUDIO_OUTPUT_DEVICE_CHANGED,this._onAudioOutputDeviceChanged),n.then(function(){return _get(_getPrototypeOf(t.prototype),"dispose",e).call(e)})}},{key:"isMuted",value:function(){return!(this.stream&&(!this.isVideoTrack()||this.isActive())&&this.track&&this.track.enabled)}},{key:"_setConference",value:function(e){this.conference=e;for(var t=0;t0&&(this._hasSentData=!0);var r=e.getConnectionState();this._testDataSent&&"connected"===r&&(setTimeout(function(){n._hasSentData||(_.warn(n+" 'bytes sent' <= 0: "+t),v.a.analytics.sendEvent(f.r,{media_type:n.getType()}))},3e3),this._testDataSent=!1)}},{key:"getCameraFacingMode",value:function(){if(this.isVideoTrack()&&this.videoType===p.a.CAMERA){var e;try{e=this.track.getSettings()}catch(e){}return e&&"facingMode"in e?e.facingMode:void 0!==this._facingMode?this._facingMode:c.a.USER}}},{key:"stopStream",value:function(){this._stopStreamInProgress=!0;try{y.a.stopMediaStream(this.stream)}finally{this._stopStreamInProgress=!1}}},{key:"_switchCamera",value:function(){this.isVideoTrack()&&this.videoType===p.a.CAMERA&&"function"==typeof this.track._switchCamera&&(this.track._switchCamera(),this._facingMode=this._facingMode===c.a.ENVIRONMENT?c.a.USER:c.a.ENVIRONMENT)}},{key:"isReceivingData",value:function(){return!(!this.isVideoTrack()||!this.isMuted()&&!this._stopStreamInProgress&&this.videoType!==p.a.DESKTOP)||!!this.stream&&(this._effectEnabled?this._originalStream:this.stream).getTracks().some(function(e){return!("readyState"in e&&"live"!==e.readyState||"muted"in e&&!0===e.muted)})}},{key:"toString",value:function(){return"LocalTrack["+this.rtcId+","+this.getType()+"]"}}]),t})(g.a)}).call(this,"modules/RTC/JitsiLocalTrack.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return u});var r=n(19),i=n(4),o=n(1),a=n(22),s=n(62),c=Object(i.getLogger)(e),u=(function(e){function t(e,n){var r;return _classCallCheck(this,t),(r=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this)))._createVADProcessor=n,r._vadEmitter=null,r._isVADEmitterRunning=!1,r._detectionServices=[],r._vadInitTracker=Promise.resolve(),r._processVADScore=r._processVADScore.bind(_assertThisInitialized(_assertThisInitialized(r))),e.on(o.TRACK_ADDED,r._trackAdded.bind(_assertThisInitialized(_assertThisInitialized(r)))),e.on(o.TRACK_REMOVED,r._trackRemoved.bind(_assertThisInitialized(_assertThisInitialized(r)))),e.on(o.TRACK_MUTE_CHANGED,r._trackMuteChanged.bind(_assertThisInitialized(_assertThisInitialized(r)))),r}return _inherits(t,e),_createClass(t,[{key:"addVADDetectionService",value:function(e){var t=this;this._detectionServices.push(e),e.on(a.DETECTOR_STATE_CHANGE,function(){!t._detectionServices.filter(function(e){return!0===e.isActive()}).length&&t._isVADEmitterRunning?t._stopVADEmitter():t._isVADEmitterRunning||t._startVADEmitter()})}},{key:"_startVADEmitter",value:function(){this._vadEmitter.on(a.VAD_SCORE_PUBLISHED,this._processVADScore),this._vadEmitter.start(),this._isVADEmitterRunning=!0}},{key:"_stopVADEmitter",value:function(){this._vadEmitter.removeListener(a.VAD_SCORE_PUBLISHED,this._processVADScore),this._vadEmitter.stop(),this._isVADEmitterRunning=!1}},{key:"_processVADScore",value:function(e){var t=this._detectionServices,n=Array.isArray(t),r=0;for(t=n?t:t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}i.processVADScore(e)}}},{key:"_changeDetectorsMuteState",value:function(e){var t=this._detectionServices,n=Array.isArray(t),r=0;for(t=n?t:t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}i.changeMuteState(e)}}},{key:"_trackAdded",value:function(e){var t=this;e.isLocalAudioTrack()&&(this._vadInitTracker=this._vadInitTracker.then(function(){return t._createVADProcessor()}).then(function(t){return s.a.create(e.getDeviceId(),4096,t)}).then(function(n){c.debug("Created VAD emitter for track: ",e.getTrackLabel()),t._vadEmitter=n,t._changeDetectorsMuteState(e.isMuted())}))}},{key:"_trackMuteChanged",value:function(e){var t=this;e.isLocalAudioTrack()&&(this._vadInitTracker=this._vadInitTracker.then(function(){t._changeDetectorsMuteState(e.isMuted())}))}},{key:"_trackRemoved",value:function(e){var t=this;e.isLocalAudioTrack()&&(this._vadInitTracker=this._vadInitTracker.then(function(){c.debug("Removing track from VAD detection - ",e.getTrackLabel()),t._vadEmitter&&(t._stopVADEmitter(),t._vadEmitter.destroy(),t._vadEmitter=null);var n=t._detectionServices,r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}o.reset()}}))}}]),t})(r.EventEmitter)}).call(this,"modules/detection/VADAudioAnalyser.js")},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(2),i=n(50),o=(function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,e),this._connection=t.connection,this._mode=t.mode,this._setSessionID(t.sessionID),this.setStatus(t.status)}return _createClass(e,[{key:"getError",value:function(){return this._error}},{key:"getID",value:function(){return this._sessionID}},{key:"getInitiator",value:function(){return this._initiator}},{key:"getLiveStreamViewURL",value:function(){return this._liveStreamViewURL}},{key:"getStatus",value:function(){return this._status}},{key:"getTerminator",value:function(){return this._terminator}},{key:"getMode",value:function(){return this._mode}},{key:"setError",value:function(e){this._error=e}},{key:"setLiveStreamViewURL",value:function(e){this._liveStreamViewURL=e}},{key:"setStatus",value:function(e){this._status=e}},{key:"setInitiator",value:function(e){this._initiator=e}},{key:"setTerminator",value:function(e){this._terminator=e}},{key:"start",value:function(e){var t=this,n=e.appData,r=e.broadcastId,o=e.focusMucJid,a=e.streamId;return new Promise(function(e,s){t._connection.sendIQ(t._createIQ({action:"start",appData:n,focusMucJid:o,broadcastId:r,streamId:a}),function(n){t.setStatus("pending"),t._setSessionID(i.a.getSessionIdFromIq(n)),e()},function(e){t._setErrorFromIq(e),s(e)})})}},{key:"stop",value:function(e){var t=this,n=e.focusMucJid;return new Promise(function(e,r){t._connection.sendIQ(t._createIQ({action:"stop",focusMucJid:n}),e,r)})}},{key:"_createIQ",value:function(e){var t=e.action,n=e.appData,i=e.broadcastId,o=e.focusMucJid,a=e.streamId;return Object(r.$iq)({to:o,type:"set"}).c("jibri",{xmlns:"http://jitsi.org/protocol/jibri",action:t,app_data:n,recording_mode:this._mode,streamid:a,you_tube_broadcast_id:i}).up()}},{key:"_setErrorFromIq",value:function(e){var t=e.getElementsByTagName("error")[0];this.setError(t.children[0].tagName)}},{key:"_setSessionID",value:function(e){this._sessionID=e}}]),e})()},function(e,t,n){"use strict";var r=n(19),i=n.n(r),o=n(53),a=n(12),s=n(3),c=n(5),u=n(8),d=n(6),l=n.n(d);function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.a=new((function(){function e(){var t=this;_classCallCheck(this,e),this._eventEmitter=new i.a,this._grantedPermissions={},a.a.addListener(l.a.DEVICE_LIST_CHANGED,function(e){return t._eventEmitter.emit(o.DEVICE_LIST_CHANGED,e)}),a.a.addListener(l.a.DEVICE_LIST_AVAILABLE,function(e){return t._logOutputDevice(t.getAudioOutputDevice(),e)}),a.a.addListener(l.a.GRANTED_PERMISSIONS,function(e){return t._handleGrantedPermissions(e)}),this._permissionsApiSupported=new Promise(function(e){navigator.permissions?navigator.permissions.query({name:"camera"}).then(function(){return e(!0)},function(){return e(!1)}):e(!1)})}return _createClass(e,[{key:"_handleGrantedPermissions",value:function(e){this._grantedPermissions=(function(e){for(var t=1;t0&&this._logOutputDevice(e,a.a.getCurrentlyAvailableMediaDevices()),a.a.setAudioOutputDevice(e)}},{key:"addEventListener",value:function(e,t){this._eventEmitter.addListener(e,t)}},{key:"removeEventListener",value:function(e,t){this._eventEmitter.removeListener(e,t)}},{key:"emitEvent",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1&&h.push("<"+s.methodName+">: ");var p=h.concat(a);l.bind(d).apply(d,p)}}}function s(e,t,r,i){this.id=t,this.options=i||{},this.transports=r,this.transports||(this.transports=[]),this.level=n[e];for(var o=Object.keys(n),s=0;s0&&t.data.push(e.data)},t},c.prototype.removeTrack=function(e){if(!e.isVideoTrack()){var t,n=this.recorders;for(t=0;t0&&void 0!==arguments[0]?arguments[0]:{};this.xmpp.connect(e.id,e.password)},c.prototype.attach=function(e){this.xmpp.attach(e)},c.prototype.disconnect=function(){var e;return(e=this.xmpp).disconnect.apply(e,arguments)},c.prototype.getJid=function(){return this.xmpp.getJid()},c.prototype.setToken=function(e){this.token=e},c.prototype.initJitsiConference=function(e,t){return new r.a({name:e,config:t,connection:this})},c.prototype.addEventListener=function(e,t){this.xmpp.addListener(e,t)},c.prototype.removeEventListener=function(e,t){this.xmpp.removeListener(e,t)},c.prototype.getConnectionTimes=function(){return this.xmpp.connectionTimes},c.prototype.addFeature=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.xmpp.caps.addFeature(e,t)},c.prototype.removeFeature=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.xmpp.caps.removeFeature(e,t)},c.prototype.getLogs=function(){var e=this.xmpp.getJingleLog(),t={};t.time=new Date,t.url=window.location.href,t.ua=navigator.userAgent;var n=this.xmpp.getXmppLog();return n&&(t.xmpp=n),e.metadata=t,e}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return re});var r=n(19),i=n.n(r),o=n(4),a=n(56),s=n.n(a),c=n(2),u=n(16),d=n(79),l=n(1),h=n(86),p=n(18),f=n(14),m=n(15),v=n(87),g=n(12),y=n(3),_=n(114),S=n(115),E=n(47),b=n(22),C=n(116),T=n(117),R=n(70),A=n(118),k=n(119),w=n(120),I=n(123),P=n(124),D=n(125),O=n(126),N=n(30),M=n(127),L=n(128),x=n(129),F=n(5),j=n(130),U=n.n(j),H=n(11),B=n.n(H),J=n(35),G=n.n(J),V=n(131),q=n(132),K=n(24),z=n(37),W=n(8),Q=n(13),X=n.n(Q),Y=n(7),Z=n(0);function ee(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};t.connection&&(this.connection=t.connection,this.xmpp=this.connection.xmpp,this.eventManager.setupXMPPListeners());var n=this.options.config;if(this._statsCurrentId=n.statisticsId?n.statisticsId:N.a.callStatsUserName,this.room=this.xmpp.createRoom(this.options.name,ee({},n,{statsId:this._statsCurrentId}),re.resourceCreator),this._onIceConnectionInterrupted=this._onIceConnectionInterrupted.bind(this),this.room.addListener(Z.CONNECTION_INTERRUPTED,this._onIceConnectionInterrupted),this._onIceConnectionRestored=this._onIceConnectionRestored.bind(this),this.room.addListener(Z.CONNECTION_RESTORED,this._onIceConnectionRestored),this._onIceConnectionEstablished=this._onIceConnectionEstablished.bind(this),this.room.addListener(Z.CONNECTION_ESTABLISHED,this._onIceConnectionEstablished),this._updateProperties=this._updateProperties.bind(this),this.room.addListener(Z.CONFERENCE_PROPERTIES_CHANGED,this._updateProperties),this._sendConferenceJoinAnalyticsEvent=this._sendConferenceJoinAnalyticsEvent.bind(this),this.room.addListener(Z.MEETING_ID_SET,this._sendConferenceJoinAnalyticsEvent),this.e2eping=new I.a(this,n,function(t,n){try{e.sendMessage(t,n,!0)}catch(t){ne.warn("Failed to send E2E ping request or response.",t&&t.msg)}}),this.rtc||(this.rtc=new g.a(this,t),this.eventManager.setupRTCListeners()),this.qualityController=new D.a(this),this.participantConnectionStatus=new E.b(this.rtc,this,{rtcMuteTimeout:n._peerConnStatusRtcMuteTimeout,outOfLastNTimeout:n._peerConnStatusOutOfLastNTimeout}),this.participantConnectionStatus.init(),this.statistics||(this.statistics=new F.a(this.xmpp,{aliasName:this._statsCurrentId,userName:n.statisticsDisplayName?n.statisticsDisplayName:this.myUserId(),confID:n.confID||this.connection.options.hosts.domain+"/"+this.options.name,siteID:n.siteID,customScriptUrl:n.callStatsCustomScriptUrl,callStatsID:n.callStatsID,callStatsSecret:n.callStatsSecret,callStatsApplicationLogsDisabled:n.callStatsApplicationLogsDisabled,roomName:this.options.name,applicationName:n.applicationName,getWiFiStatsMethod:n.getWiFiStatsMethod}),F.a.analytics.addPermanentProperties({callstats_name:this._statsCurrentId}),n.longTasksStatsInterval&&this.statistics.attachLongTasksStats(this)),this.eventManager.setupChatRoomListeners(),this.eventManager.setupStatisticsListeners(),n.enableTalkWhileMuted&&!y.a.isSafari())if(n.createVADProcessor){ne.info("Using VAD detection for generating talk while muted events"),this._audioAnalyser||(this._audioAnalyser=new R.a(this,n.createVADProcessor));var r=new k.a;r.on(b.VAD_TALK_WHILE_MUTED,function(){return e.eventEmitter.emit(l.TALK_WHILE_MUTED)}),this._audioAnalyser.addVADDetectionService(r)}else ne.warn("No VAD Processor was provided. Talk while muted detection service was not initialized!");if(n.enableNoisyMicDetection&&!y.a.isSafari())if(n.createVADProcessor){this._audioAnalyser||(this._audioAnalyser=new R.a(this,n.createVADProcessor));var i=new A.a;i.on(b.VAD_NOISY_DEVICE,function(){return e.eventEmitter.emit(l.NOISY_MIC)}),this._audioAnalyser.addVADDetectionService(i)}else ne.warn("No VAD Processor was provided. Noisy microphone detection service was not initialized!");n.enableNoAudioDetection&&(this._noAudioSignalDetection=new C.a(this),this._noAudioSignalDetection.on(b.NO_AUDIO_INPUT,function(){e.eventEmitter.emit(l.NO_AUDIO_INPUT)}),this._noAudioSignalDetection.on(b.AUDIO_INPUT_STATE_CHANGE,function(t){e.eventEmitter.emit(l.AUDIO_INPUT_STATE_CHANGE,t)})),"channelLastN"in n&&this.setLastN(n.channelLastN),this.jvb121Status=new P.a(this),this.p2pDominantSpeakerDetection=new T.a(this),n&&n.deploymentInfo&&n.deploymentInfo.userRegion&&this.setLocalParticipantProperty("region",n.deploymentInfo.userRegion)},re.prototype.join=function(e){var t=this;this.room&&this.room.join(e).then(function(){return t._maybeSetSITimeout()})},re.prototype.authenticateAndUpgradeRole=function(e){return v.a.call(this,ee({},e,{onCreateResource:re.resourceCreator}))},re.prototype.isJoined=function(){return this.room&&this.room.joined},re.prototype.isP2PEnabled=function(){return Boolean(this.options.config.p2p&&this.options.config.p2p.enabled)||void 0===this.options.config.p2p},re.prototype.isP2PTestModeEnabled=function(){return Boolean(this.options.config.testing&&this.options.config.testing.p2pTestMode)},re.prototype.leave=function(){var e=this;if(this.participantConnectionStatus&&(this.participantConnectionStatus.dispose(),this.participantConnectionStatus=null),this.avgRtpStatsReporter&&(this.avgRtpStatsReporter.dispose(),this.avgRtpStatsReporter=null),this._audioOutputProblemDetector&&(this._audioOutputProblemDetector.dispose(),this._audioOutputProblemDetector=null),this.e2eping&&(this.e2eping.stop(),this.e2eping=null),this.getLocalTracks().forEach(function(t){return e.onLocalTrackRemoved(t)}),this.rtc.closeBridgeChannel(),this._sendConferenceLeftAnalyticsEvent(),this.statistics&&this.statistics.dispose(),this._delayedIceFailed&&this._delayedIceFailed.cancel(),this.jvbJingleSession&&(this.jvbJingleSession.close(),this.jvbJingleSession=null),this.p2pJingleSession&&(this.p2pJingleSession.close(),this.p2pJingleSession=null),this.room){var t=this.room;return t.removeListener(Z.CONNECTION_INTERRUPTED,this._onIceConnectionInterrupted),t.removeListener(Z.CONNECTION_RESTORED,this._onIceConnectionRestored),t.removeListener(Z.CONNECTION_ESTABLISHED,this._onIceConnectionEstablished),t.removeListener(Z.CONFERENCE_PROPERTIES_CHANGED,this._updateProperties),t.removeListener(Z.MEETING_ID_SET,this._sendConferenceJoinAnalyticsEvent),this.eventManager.removeXMPPListeners(),this.room=null,t.leave().then(function(){e.rtc&&e.rtc.destroy()}).catch(function(t){throw e.getParticipants().forEach(function(t){return e.onMemberLeft(t.getJid())}),t})}return Promise.reject(new Error("The conference is has been already left"))},re.prototype._getActiveMediaSession=function(){return this.isP2PActive()?this.p2pJingleSession:this.jvbJingleSession},re.prototype._getMediaSessions=function(){var e=[];return this.jvbJingleSession&&e.push(this.jvbJingleSession),this.p2pJingleSession&&e.push(this.p2pJingleSession),e},re.prototype.getName=function(){return this.options.name},re.prototype.getConnection=function(){return this.connection},re.prototype.isAuthEnabled=function(){return this.authEnabled},re.prototype.isLoggedIn=function(){return Boolean(this.authIdentity)},re.prototype.getAuthLogin=function(){return this.authIdentity},re.prototype.isExternalAuthEnabled=function(){return this.room&&this.room.moderator.isExternalAuthEnabled()},re.prototype.getExternalAuthUrl=function(e){var t=this;return new Promise(function(n,r){t.isExternalAuthEnabled()?e?t.room.moderator.getPopupLoginUrl(n,r):t.room.moderator.getLoginUrl(n,r):r()})},re.prototype.getLocalTracks=function(e){var t=[];return this.rtc&&(t=this.rtc.getLocalTracks(e)),t},re.prototype.getLocalAudioTrack=function(){return this.rtc?this.rtc.getLocalAudioTrack():null},re.prototype.getLocalVideoTrack=function(){return this.rtc?this.rtc.getLocalVideoTrack():null},re.prototype.getPerformanceStats=function(){return{longTasksStats:this.statistics.getLongTasksStats()}},re.prototype.on=function(e,t){this.eventEmitter&&this.eventEmitter.on(e,t)},re.prototype.off=function(e,t){this.eventEmitter&&this.eventEmitter.removeListener(e,t)},re.prototype.addEventListener=re.prototype.on,re.prototype.removeEventListener=re.prototype.off,re.prototype.addCommandListener=function(e,t){this.room&&this.room.addPresenceListener(e,t)},re.prototype.removeCommandListener=function(e,t){this.room&&this.room.removePresenceListener(e,t)},re.prototype.sendTextMessage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body";if(this.room){var n=(this.room.getFromPresence("nick")||{}).value;this.room.sendMessage(e,t,n)}},re.prototype.sendPrivateTextMessage=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"body";this.room&&this.room.sendPrivateMessage(e,t,n)},re.prototype.sendCommand=function(e,t){this.room?(this.room.addToPresence(e,t),this.room.sendPresence()):ne.warn("Not sending a command, room not initialized.")},re.prototype.sendCommandOnce=function(e,t){this.sendCommand(e,t),this.removeCommand(e)},re.prototype.removeCommand=function(e){this.room&&this.room.removeFromPresence(e)},re.prototype.setDisplayName=function(e){this.room&&(this.room.addToPresence("nick",{attributes:{xmlns:"http://jabber.org/protocol/nick"},value:e}),this.room.sendPresence())},re.prototype.setSubject=function(e){this.room&&this.isModerator()&&this.room.setSubject(e)},re.prototype.getTranscriber=function(){if(void 0===this.transcriber){this.transcriber=new U.a;var e=this.getLocalTracks(W.a),t=Array.isArray(e),n=0;for(e=t?e:e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var r;if(t){if(n>=e.length)break;r=e[n++]}else{if((n=e.next()).done)break;r=n.value}var i=r;this.transcriber.addTrack(i)}var o=this.rtc.getRemoteTracks(W.a),a=Array.isArray(o),s=0;for(o=a?o:o["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var c;if(a){if(s>=o.length)break;c=o[s++]}else{if((s=o.next()).done)break;c=s.value}var u=c;this.transcriber.addTrack(u)}}return this.transcriber},re.prototype.getTranscriptionStatus=function(){return this.room.transcriptionStatus},re.prototype.addTrack=function(e){if(e.isVideoTrack()){var t=this.rtc.getLocalVideoTrack();if(t)return e===t?Promise.resolve(e):Promise.reject(new Error("cannot add second video track to the conference"))}return this.replaceTrack(null,e)},re.prototype._fireAudioLevelChangeEvent=function(e,t){var n=this.getActivePeerConnection();t&&n!==t||this.eventEmitter.emit(l.TRACK_AUDIO_LEVEL_CHANGED,this.myUserId(),e)},re.prototype._fireMuteChangeEvent=function(e){var t;if(this.isMutedByFocus&&e.isAudioTrack()&&!e.isMuted()&&(this.isMutedByFocus=!1,this.room.muteParticipant(this.room.myroomjid,!1)),this.mutedByFocusActor){var n=c.Strophe.getResourceFromJid(this.mutedByFocusActor);t=this.participants[n]}this.eventEmitter.emit(l.TRACK_MUTE_CHANGED,e,t)},re.prototype.onLocalTrackRemoved=function(e){e._setConference(null),this.rtc.removeLocalTrack(e),e.removeEventListener(m.TRACK_MUTE_CHANGED,e.muteHandler),e.removeEventListener(m.TRACK_AUDIO_LEVEL_CHANGED,e.audioLevelHandler),e.isVideoTrack()&&e.videoType===X.a.DESKTOP&&this.statistics.sendScreenSharingEvent(!1),this.eventEmitter.emit(l.TRACK_REMOVED,e)},re.prototype.removeTrack=function(e){return this.replaceTrack(e,null)},re.prototype.replaceTrack=function(e,t){var n=this;return e&&e.disposed||t&&t.disposed?Promise.reject(new p.a(f.TRACK_IS_DISPOSED)):this._doReplaceTrack(e,t).then(function(){return e&&n.onLocalTrackRemoved(e),t&&n._setupNewTrack(t),Promise.resolve()},function(e){return Promise.reject(new Error(e))})},re.prototype._doReplaceTrack=function(e,t){var n=[];return this.jvbJingleSession?n.push(this.jvbJingleSession.replaceTrack(e,t)):ne.info("_doReplaceTrack - no JVB JingleSession"),this.p2pJingleSession?n.push(this.p2pJingleSession.replaceTrack(e,t)):ne.info("_doReplaceTrack - no P2P JingleSession"),Promise.all(n)},re.prototype._setupNewTrack=function(e){if(e.isAudioTrack()||e.isVideoTrack()&&e.videoType!==X.a.DESKTOP){var t=g.a.getCurrentlyAvailableMediaDevices().find(function(t){return t.kind===e.getTrack().kind+"input"&&t.label===e.getTrack().label});t&&F.a.sendActiveDeviceListEvent(g.a.getEventDataForActiveDevice(t))}e.isVideoTrack()&&(this.removeCommand("videoType"),this.sendCommand("videoType",{value:e.videoType,attributes:{xmlns:"http://jitsi.org/jitmeet/video"}})),this.rtc.addLocalTrack(e),e.isAudioTrack()?this.room.setAudioMute(e.isMuted()):this.room.setVideoMute(e.isMuted()),e.muteHandler=this._fireMuteChangeEvent.bind(this,e),e.audioLevelHandler=this._fireAudioLevelChangeEvent.bind(this),e.addEventListener(m.TRACK_MUTE_CHANGED,e.muteHandler),e.addEventListener(m.TRACK_AUDIO_LEVEL_CHANGED,e.audioLevelHandler),e._setConference(this),this.eventEmitter.emit(l.TRACK_ADDED,e)},re.prototype._addLocalTrackAsUnmute=function(e){var t=[];return this.jvbJingleSession?t.push(this.jvbJingleSession.addTrackAsUnmute(e)):ne.info("Add local MediaStream as unmute - no JVB Jingle session started yet"),this.p2pJingleSession?t.push(this.p2pJingleSession.addTrackAsUnmute(e)):ne.info("Add local MediaStream as unmute - no P2P Jingle session started yet"),Promise.all(t)},re.prototype._removeLocalTrackAsMute=function(e){var t=[];return this.jvbJingleSession?t.push(this.jvbJingleSession.removeTrackAsMute(e)):ne.info("Remove local MediaStream - no JVB JingleSession started yet"),this.p2pJingleSession?t.push(this.p2pJingleSession.removeTrackAsMute(e)):ne.info("Remove local MediaStream - no P2P JingleSession started yet"),Promise.all(t)},re.prototype.getRole=function(){return this.room.role},re.prototype.isHidden=function(){return this.connection?c.Strophe.getDomainFromJid(this.connection.getJid())===this.options.config.hiddenDomain:null},re.prototype.isModerator=function(){return this.room?this.room.isModerator():null},re.prototype.lock=function(e){var t=this;return this.isModerator()?new Promise(function(n,r){t.room.lockRoom(e||"",function(){return n()},function(e){return r(e)},function(){return r(u.PASSWORD_NOT_SUPPORTED)})}):Promise.reject(new Error("You are not moderator."))},re.prototype.unlock=function(){return this.lock()},re.prototype.selectParticipant=function(e){this.selectParticipants([e])},re.prototype.selectParticipants=function(e){if(!Array.isArray(e))throw new Error("Invalid argument; participantIds must be an array.");this.rtc.selectEndpoints(e)},re.prototype.pinParticipant=function(e){this.rtc.pinEndpoint(e)},re.prototype.getLastN=function(){return this.rtc.getLastN()},re.prototype.setLastN=function(e){if(!Number.isInteger(e)&&!Number.parseInt(e,10))throw new Error("Invalid value for lastN: "+e);var t=Number(e);if(t<-1)throw new RangeError("lastN cannot be smaller than -1");if(this.rtc.setLastN(t),this.p2pJingleSession){var n=0!==t;this.p2pJingleSession.setMediaTransferActive(!0,n).catch(function(e){ne.error("Failed to adjust video transfer status ("+n+")",e)})}},re.prototype.isInLastN=function(e){return this.rtc.isInLastN(e)},re.prototype.getParticipants=function(){return Object.keys(this.participants).map(function(e){return this.participants[e]},this)},re.prototype.getParticipantCount=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getParticipants();return e||(t=t.filter(function(e){return!e.isHidden()})),t.length+1},re.prototype.getParticipantById=function(e){return this.participants[e]},re.prototype.grantOwner=function(e){var t=this.getParticipantById(e);t&&this.room.setAffiliation(t.getJid(),"owner")},re.prototype.kickParticipant=function(e){var t=this.getParticipantById(e);t&&this.room.kick(t.getJid())},re.prototype._maybeClearSITimeout=function(){this._sessionInitiateTimeout&&(this.jvbJingleSession||this.getParticipantCount()<2)&&(window.clearTimeout(this._sessionInitiateTimeout),this._sessionInitiateTimeout=null)},re.prototype._maybeSetSITimeout=function(){var e=this;!this.jvbJingleSession&&this.getParticipantCount()>=2&&!this._sessionInitiateTimeout&&(this._sessionInitiateTimeout=window.setTimeout(function(){e._sessionInitiateTimeout=null,F.a.sendAnalytics(Object(Y.G)(Y.d,{p2p:!1,value:5e3}))},5e3))},re.prototype.muteParticipant=function(e){var t=this.getParticipantById(e);t&&this.room.muteParticipant(t.getJid(),!0)},re.prototype.onMemberJoined=function(e,t,n,r,i,o,a,s){var u=c.Strophe.getResourceFromJid(e);if("focus"!==u&&this.myUserId()!==u){var d=new h.a(e,this,t,r,i,o,a);d._role=n,d._botType=s,this.participants[u]=d,this.eventEmitter.emit(l.USER_JOINED,u,d),this._updateFeatures(d),this._maybeStartOrStopP2P(),this._maybeSetSITimeout()}},re.prototype._updateFeatures=function(e){var t=this;e.getFeatures().then(function(n){e._supportsDTMF=n.has("urn:xmpp:jingle:dtmf:0"),t.updateDTMFSupport(),n.has("http://jitsi.org/protocol/jigasi")&&e.setProperty("features_jigasi",!0),n.has("https://jitsi.org/meet/e2ee")&&e.setProperty("features_e2ee",!0)}).catch(function(){return!1})},re.prototype._onMemberBotTypeChanged=function(e,t){var n=this.getParticipants().find(function(t){return t.getJid()===e});if(n){n._botType=t;var r=c.Strophe.getResourceFromJid(e);this.eventEmitter.emit(l.BOT_TYPE_CHANGED,r,t)}n._botType||this._maybeStartOrStopP2P()},re.prototype.onMemberLeft=function(e){var t=this,n=c.Strophe.getResourceFromJid(e);if("focus"!==n&&this.myUserId()!==n){var r=this.participants[n];delete this.participants[n],this.rtc.removeRemoteTracks(n).forEach(function(e){return t.eventEmitter.emit(l.TRACK_REMOVED,e)}),r&&this.eventEmitter.emit(l.USER_LEFT,n,r),this._maybeStartOrStopP2P(!0),this._maybeClearSITimeout()}},re.prototype.onMemberKicked=function(e,t,n){if(t!==this.myUserId()){var r=this.participants[t];if(e)return this.eventEmitter.emit(l.KICKED,r),void this.leave();var i=this.participants[n];this.eventEmitter.emit(l.PARTICIPANT_KICKED,r,i)}},re.prototype.onLocalRoleChanged=function(e){this.eventEmitter.emit(l.USER_ROLE_CHANGED,this.myUserId(),e)},re.prototype.onUserRoleChanged=function(e,t){var n=c.Strophe.getResourceFromJid(e),r=this.getParticipantById(n);r&&(r._role=t,this.eventEmitter.emit(l.USER_ROLE_CHANGED,n,t))},re.prototype.onDisplayNameChanged=function(e,t){var n=c.Strophe.getResourceFromJid(e),r=this.getParticipantById(n);r&&r._displayName!==t&&(r._displayName=t,this.eventEmitter.emit(l.DISPLAY_NAME_CHANGED,n,t))},re.prototype.onRemoteTrackAdded=function(e){var t=this;if(!e.isP2P||this.isP2PActive())if(e.isP2P||!this.isP2PActive()){var n=e.getParticipantId(),r=this.getParticipantById(n);if(r){r._tracks.push(e),this.transcriber&&this.transcriber.addTrack(e);var i=this.eventEmitter;e.addEventListener(m.TRACK_MUTE_CHANGED,function(){return i.emit(l.TRACK_MUTE_CHANGED,e)}),e.addEventListener(m.TRACK_AUDIO_LEVEL_CHANGED,function(e,r){t.getActivePeerConnection()===r&&i.emit(l.TRACK_AUDIO_LEVEL_CHANGED,n,e)}),i.emit(l.TRACK_ADDED,e)}else ne.error("No participant found for id: "+n)}else ne.info("Trying to add remote JVB track, when in P2P - IGNORED");else ne.info("Trying to add remote P2P track, when not in P2P - IGNORED")},re.prototype.onCallAccepted=function(e,t){this.p2pJingleSession===e&&(ne.info("P2P setAnswer"),this.p2pJingleSession.setAnswer(t),this.eventEmitter.emit(l._MEDIA_SESSION_STARTED,this.p2pJingleSession))},re.prototype.onTransportInfo=function(e,t){this.p2pJingleSession===e&&(ne.info("P2P addIceCandidates"),this.p2pJingleSession.addIceCandidates(t))},re.prototype.onRemoteTrackRemoved=function(e){var t=this;this.getParticipants().forEach(function(n){for(var r=n.getTracks(),i=0;ibridge-session[xmlns="http://jitsi.org/protocol/focus"]').attr("region");this.eventEmitter.emit(l.SERVER_REGION_CHANGED,i),this._maybeClearSITimeout(),F.a.sendAnalytics(Object(Y.G)(Y.c,{p2p:!1,value:n}));try{e.initialize(this.room,this.rtc,ee({},this.options.config,{enableInsertableStreams:Boolean(this._e2eEncryption)}))}catch(e){B.a.callErrorHandler(e)}this._setBridgeChannel(t,e.peerconnection);var o=this.getLocalTracks();try{e.acceptOffer(t,function(){r.isP2PActive()&&r.jvbJingleSession&&r._suspendMediaTransferForJvbConnection(),r.eventEmitter.emit(l._MEDIA_SESSION_STARTED,e),r.isP2PActive()||r.eventEmitter.emit(l._MEDIA_SESSION_ACTIVE_CHANGED,e)},function(e){B.a.callErrorHandler(e),ne.error("Failed to accept incoming Jingle session",e)},o),ne.info("Starting CallStats for JVB connection..."),this.statistics.startCallStats(this.jvbJingleSession.peerconnection,"jitsi"),this.statistics.startRemoteStats(this.jvbJingleSession.peerconnection)}catch(e){B.a.callErrorHandler(e),ne.error(e)}},re.prototype._setBridgeChannel=function(e,t){var n,r=null,i=$(e).find(">content>transport>web-socket").first();switch(1===i.length&&(r=i[0].getAttribute("url")),this.options.config.openBridgeChannel){case"datachannel":case!0:case void 0:n="datachannel";break;case"websocket":n="websocket"}"datachannel"===n?this.rtc.initializeBridgeChannel(t,null):"websocket"===n&&r&&this.rtc.initializeBridgeChannel(null,r)},re.prototype._rejectIncomingCall=function(e,t){t&&t.errorMsg&&B.a.callErrorHandler(new Error(t.errorMsg)),e.terminate(null,function(e){ne.warn("An error occurred while trying to terminate invalid Jingle session",e)},{reason:t&&t.reason,reasonDescription:t&&t.reasonDescription,sendSessionTerminate:!0})},re.prototype.onCallEnded=function(e,t,n){ne.info("Call ended: "+t+" - "+n+" P2P ?"+e.isP2P),e===this.jvbJingleSession?(this.wasStopped=!0,F.a.sendAnalytics(Object(Y.G)(Y.e,{p2p:!1})),this.statistics&&(this.statistics.stopRemoteStats(this.jvbJingleSession.peerconnection),ne.info("Stopping JVB CallStats"),this.statistics.stopCallStats(this.jvbJingleSession.peerconnection)),this.jvbJingleSession=null,this.rtc.onCallEnded()):e===this.p2pJingleSession?("decline"===t&&"force JVB121"===n?(ne.info("In forced JVB 121 mode..."),F.a.analytics.addPermanentProperties({forceJvb121:!0})):"connectivity-error"===t&&"ICE FAILED"===n&&F.a.analytics.addPermanentProperties({p2pFailed:!0}),this._stopP2PSession()):ne.error("Received onCallEnded for invalid session",e.sid,e.remoteJid,t,n)},re.prototype.onSuspendDetected=function(e){e.isP2P||(this.leave(),this.eventEmitter.emit(l.SUSPEND_DETECTED))},re.prototype.updateDTMFSupport=function(){for(var e=!1,t=this.getParticipants(),n=0;n1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=typeof e;if("object"===r||!n&&"string"===r)if(n)this.sendEndpointMessage(t,e);else{var i=e,o="body";if("object"===r){o="json-message",i.hasOwnProperty(z.b)||(i[z.b]="");try{i=JSON.stringify(i)}catch(e){return void ne.error("Can not send a message, stringify failed: ",e)}}t?this.sendPrivateTextMessage(t,i,o):this.sendTextMessage(i,o)}else ne.error("Can not send a message of type "+r)},re.prototype.isConnectionInterrupted=function(){return this.isP2PActive()?this.isP2PConnectionInterrupted:this.isJvbConnectionInterrupted},re.prototype._onIceConnectionInterrupted=function(e){e.isP2P?this.isP2PConnectionInterrupted=!0:this.isJvbConnectionInterrupted=!0,e.isP2P===this.isP2PActive()&&this.eventEmitter.emit(l.CONNECTION_INTERRUPTED)},re.prototype._onIceConnectionFailed=function(e){e.isP2P?(F.a.analytics.addPermanentProperties({p2pFailed:!0}),this.p2pJingleSession&&F.a.sendAnalyticsAndLog(Object(Y.I)(Y.j,{initiator:this.p2pJingleSession.isInitiator})),this._stopP2PSession("connectivity-error","ICE FAILED")):e&&this.jvbJingleSession===e&&(this._delayedIceFailed=new S.a(this),this._delayedIceFailed.start(e))},re.prototype._onIceConnectionRestored=function(e){e.isP2P?this.isP2PConnectionInterrupted=!1:(this.isJvbConnectionInterrupted=!1,this._delayedIceFailed&&this._delayedIceFailed.cancel()),e.isP2P===this.isP2PActive()&&this.eventEmitter.emit(l.CONNECTION_RESTORED)},re.prototype._acceptP2PIncomingCall=function(e,t){var n=this;this.isP2PConnectionInterrupted=!1,this.p2pJingleSession=e,this._sendConferenceJoinAnalyticsEvent(),this.p2pJingleSession.initialize(this.room,this.rtc,ee({},this.options.config,{enableInsertableStreams:Boolean(this._e2eEncryption)})),ne.info("Starting CallStats for P2P connection...");var r=c.Strophe.getResourceFromJid(this.p2pJingleSession.remoteJid),i=this.participants[r];i&&(r=i.getStatsID()||r),this.statistics.startCallStats(this.p2pJingleSession.peerconnection,r);var o=this.getLocalTracks();this.p2pJingleSession.acceptOffer(t,function(){ne.debug('Got RESULT for P2P "session-accept"'),n.eventEmitter.emit(l._MEDIA_SESSION_STARTED,n.p2pJingleSession)},function(e){ne.error("Failed to accept incoming P2P Jingle session",e)},o)},re.prototype._addRemoteJVBTracks=function(){this._addRemoteTracks("JVB",this.jvbJingleSession.peerconnection.getRemoteTracks())},re.prototype._addRemoteP2PTracks=function(){this._addRemoteTracks("P2P",this.p2pJingleSession.peerconnection.getRemoteTracks())},re.prototype._addRemoteTracks=function(e,t){var n=t,r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;ne.info("Adding remote "+e+" track: "+a),this.onRemoteTrackAdded(a)}},re.prototype._onIceConnectionEstablished=function(e){null!==this.p2pJingleSession&&(this.p2pEstablishmentDuration=this.p2pJingleSession.establishmentDuration),null!==this.jvbJingleSession&&(this.jvbEstablishmentDuration=this.jvbJingleSession.establishmentDuration);var t=!1,n=this.options.config.forceJVB121Ratio;if(e.isP2P?this.p2pJingleSession!==e?(ne.error("CONNECTION_ESTABLISHED - wrong P2P session instance ?!"),t=!0):!e.isInitiator&&"number"==typeof n&&Math.random()0&&void 0!==arguments[0]?arguments[0]:{},t=!s()(e,this.properties);this.properties=e,t&&(this.eventEmitter.emit(l.PROPERTIES_CHANGED,this.properties),["bridge-count","created-ms","octo-enabled"].forEach(function(t){void 0!==e[t]&&F.a.analytics.addPermanentProperties(_defineProperty({},t.replace("-","_"),e[t]))}))},re.prototype.getProperty=function(e){return this.properties[e]},re.prototype._maybeClearDeferredStartP2P=function(){this.deferredStartP2PTask&&(ne.info("Cleared deferred start P2P task"),clearTimeout(this.deferredStartP2PTask),this.deferredStartP2PTask=null)},re.prototype._removeRemoteJVBTracks=function(){this._removeRemoteTracks("JVB",this.jvbJingleSession.peerconnection.getRemoteTracks())},re.prototype._removeRemoteP2PTracks=function(){this._removeRemoteTracks("P2P",this.p2pJingleSession.peerconnection.getRemoteTracks())},re.prototype._removeRemoteTracks=function(e,t){var n=t,r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;ne.info("Removing remote "+e+" track: "+a),this.onRemoteTrackRemoved(a)}},re.prototype._resumeMediaTransferForJvbConnection=function(){ne.info("Resuming media transfer over the JVB connection..."),this.jvbJingleSession.setMediaTransferActive(!0,!0).then(function(){ne.info("Resumed media transfer over the JVB connection!")},function(e){ne.error("Failed to resume media transfer over the JVB connection:",e)})},re.prototype._setP2PStatus=function(e){if(this.p2p!==e){if(this.p2p=e,e){ne.info("Peer to peer connection established!"),F.a.analytics.addPermanentProperties({p2pFailed:!1,forceJvb121:!1});var t=0!==this.rtc.getLastN();this.p2pJingleSession.setMediaTransferActive(!0,t).catch(function(e){ne.error("Failed to sync up P2P video transfer status("+t+")",e)})}else ne.info("Peer to peer connection closed!");this.jvbJingleSession&&this.statistics.sendConnectionResumeOrHoldEvent(this.jvbJingleSession.peerconnection,!e),this.dtmfManager=null,this.eventEmitter.emit(l.P2P_STATUS,this,this.p2p),this.eventEmitter.emit(l._MEDIA_SESSION_ACTIVE_CHANGED,this._getActiveMediaSession()),this.eventEmitter.emit(this.isConnectionInterrupted()?l.CONNECTION_INTERRUPTED:l.CONNECTION_RESTORED)}else ne.debug("Called _setP2PStatus with the same status: "+e)},re.prototype._startP2PSession=function(e){if(this._maybeClearDeferredStartP2P(),this.p2pJingleSession)ne.error("P2P session already started!");else{this.isP2PConnectionInterrupted=!1,this.p2pJingleSession=this.xmpp.connection.jingle.newP2PJingleSession(this.room.myroomjid,e),ne.info("Created new P2P JingleSession",this.room.myroomjid,e),this._sendConferenceJoinAnalyticsEvent(),this.p2pJingleSession.initialize(this.room,this.rtc,ee({},this.options.config,{enableInsertableStreams:Boolean(this._e2eEncryption)})),ne.info("Starting CallStats for P2P connection...");var t=c.Strophe.getResourceFromJid(this.p2pJingleSession.remoteJid),n=this.participants[t];n&&(t=n.getStatsID()||t),this.statistics.startCallStats(this.p2pJingleSession.peerconnection,t);var r=this.getLocalTracks();this.p2pJingleSession.invite(r)}},re.prototype._suspendMediaTransferForJvbConnection=function(){ne.info("Suspending media transfer over the JVB connection..."),this.jvbJingleSession.setMediaTransferActive(!1,!1).then(function(){ne.info("Suspended media transfer over the JVB connection !")},function(e){ne.error("Failed to suspend media transfer over the JVB connection:",e)})},re.prototype._maybeStartOrStopP2P=function(e){if(y.a.supportsP2P()&&this.isP2PEnabled()&&!this.isP2PTestModeEnabled()){var t=this.getParticipants(),n=t.length,r=this._shouldBeInP2PMode();if(!r&&this.deferredStartP2PTask&&this._maybeClearDeferredStartP2P(),!this.p2pJingleSession&&r){var i=n&&t[0],o=this.myUserId(),a=i.getId();if(o>a)return void ne.debug("I'm the bigger peersId - the other peer should start P2P",o,a);if(o===a)return void ne.error("The same IDs ? ",o,a);var s=i.getJid();if(e){if(this.deferredStartP2PTask)return void ne.error("Deferred start P2P task's been set already!");ne.info("Will start P2P with: "+s+" after "+this.backToP2PDelay+" seconds..."),this.deferredStartP2PTask=setTimeout(this._startP2PSession.bind(this,s),1e3*this.backToP2PDelay)}else ne.info("Will start P2P with: "+s),this._startP2PSession(s)}else this.p2pJingleSession&&!r&&(ne.info("Will stop P2P with: "+this.p2pJingleSession.remoteJid),this.p2pJingleSession.isInitiator&&n>1&&F.a.sendAnalyticsAndLog(Object(Y.I)(Y.k)),this._stopP2PSession())}else ne.info("Auto P2P disabled")},re.prototype._shouldBeInP2PMode=function(){var e=this.getParticipants(),t=e.length,n=void 0!==e.find(function(e){return"poltergeist"===e._botType}),r=1===t&&!n;return ne.debug("P2P? peerCount: "+t+", hasBotPeer: "+n+" => "+r),r},re.prototype._stopP2PSession=function(e,t){if(this.p2pJingleSession){var n=this.isP2PActive();n&&(this.jvbJingleSession&&this._resumeMediaTransferForJvbConnection(),this._removeRemoteP2PTracks()),ne.info("Stopping remote stats for P2P connection"),this.statistics.stopRemoteStats(this.p2pJingleSession.peerconnection),ne.info("Stopping CallStats for P2P connection"),this.statistics.stopCallStats(this.p2pJingleSession.peerconnection),this.p2pJingleSession.terminate(function(){ne.info("P2P session terminate RESULT")},function(t){e&&ne.error("An error occurred while trying to terminate P2P Jingle session",t)},{reason:e||"success",reasonDescription:t||"Turing off P2P session",sendSessionTerminate:this.room&&this.getParticipantById(c.Strophe.getResourceFromJid(this.p2pJingleSession.remoteJid))}),this.p2pJingleSession=null,this._setP2PStatus(!1),n&&(this.jvbJingleSession?this._addRemoteJVBTracks():ne.info("Not adding remote JVB tracks - no session yet"))}else ne.error("No P2P session to be stopped!")},re.prototype.isP2PActive=function(){return this.p2p},re.prototype.getP2PConnectionState=function(){return this.isP2PActive()?this.p2pJingleSession.peerconnection.getConnectionState():null},re.prototype.startP2PSession=function(){var e=this.getParticipants();if(1!==e.length)throw new Error("There must be exactly 1 participant to start the P2P session !");var t=e[0].getJid();this._startP2PSession(t)},re.prototype.stopP2PSession=function(){this._stopP2PSession()},re.prototype.getSpeakerStats=function(){return this.speakerStatsCollector.getStats()},re.prototype.setReceiverVideoConstraint=function(e){this.qualityController.setPreferredReceiveMaxFrameHeight(e)},re.prototype.setSenderVideoConstraint=function(e){return this.qualityController.setPreferredSendMaxFrameHeight(e)},re.prototype.createVideoSIPGWSession=function(e,t){return this.room?this.videoSIPGWHandler.createVideoSIPGWSession(e,t):new Error(K.ERROR_NO_CONNECTION)},re.prototype._sendConferenceJoinAnalyticsEvent=function(){var e=this.getMeetingUniqueId();!this._conferenceJoinAnalyticsEventSent&&e&&null!==this.getActivePeerConnection()&&(F.a.sendAnalytics(Object(Y.A)("joined",{meetingId:e,participantId:e+"."+this._statsCurrentId})),this._conferenceJoinAnalyticsEventSent=Date.now())},re.prototype._sendConferenceLeftAnalyticsEvent=function(){var e=this.getMeetingUniqueId();e&&this._conferenceJoinAnalyticsEventSent&&F.a.sendAnalytics(Object(Y.A)("left",{meetingId:e,participantId:e+"."+this._statsCurrentId,stats:{duration:Math.floor((Date.now()-this._conferenceJoinAnalyticsEventSent)/1e3),perf:this.getPerformanceStats()}}))},re.prototype.isE2EESupported=function(){var e=this.options.config;return y.a.supportsInsertableStreams()&&!(e.testing&&e.testing.disableE2EE)},re.prototype._initializeE2EEncryption=function(){this._e2eEncryption=new w.a(this,{salt:this.options.name}),this.p2pJingleSession&&this.stopP2PSession();var e=this.jvbJingleSession;e&&e.terminate(null,function(t){ne.warn("An error occurred while trying to terminate "+e,t)},{reason:"success",reasonDescription:"restart required",requestRestart:!0,sendSessionTerminate:!0}),this._maybeStartOrStopP2P(!1)},re.prototype.setE2EEKey=function(e){this.isE2EESupported()?(this._e2eEncryption||this._initializeE2EEncryption(),this._e2eEncryption.setKey(e)):ne.warn("Cannot set E2EE key: platform is not supported.")},re.prototype.isLobbySupported=function(){return Boolean(this.room&&this.room.getLobby().isSupported())},re.prototype.isMembersOnly=function(){return Boolean(this.room&&this.room.membersOnlyEnabled)},re.prototype.enableLobby=function(){return this.room&&this.isModerator()?this.room.getLobby().enable():Promise.reject(new Error("The conference not started or user is not moderator"))},re.prototype.disableLobby=function(){this.room&&this.isModerator()&&this.room.getLobby().disable()},re.prototype.joinLobby=function(e,t){return this.room?this.room.getLobby().join(e,t):Promise.reject(new Error("The conference not started"))},re.prototype.lobbyDenyAccess=function(e){this.room&&this.room.getLobby().denyAccess(e)},re.prototype.lobbyApproveAccess=function(e){this.room&&this.room.getLobby().approveAccess(e)}}).call(this,"JitsiConference.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return E});var r=n(4),i=n(2),o=n(16),a=n(1),s=n(5),c=n(85),u=n.n(c),d=n(8),l=n(6),h=n.n(l),p=n(13),f=n.n(p),m=n(67),v=n.n(m),g=n(7),y=n(0),_=n.n(y),S=Object(r.getLogger)(e);function E(e){this.conference=e,this.xmppListeners={},e.on(a.TRACK_MUTE_CHANGED,function(t){if(t.isLocal()&&e.statistics){var n=t.isP2P?e.p2pJingleSession:e.jvbJingleSession,r=n&&n.peerconnection||null;e.statistics.sendMuteEvent(r,t.isMuted(),t.getType())}})}E.prototype.setupChatRoomListeners=function(){var e=this,t=this.conference,n=t.room;this.chatRoomForwarder=new u.a(n,this.conference.eventEmitter),n.addListener(_.a.ICE_RESTARTING,function(e){e.isP2P||t.rtc.closeBridgeChannel()}),n.addListener(_.a.ICE_RESTART_SUCCESS,function(e,n){!e.isP2P&&t._setBridgeChannel(n,e.peerconnection)}),n.addListener(_.a.AUDIO_MUTED_BY_FOCUS,function(e){s.a.sendAnalytics(Object(g.K)()),t.mutedByFocusActor=e,t.rtc.setAudioMute(!0).then(function(){t.isMutedByFocus=!0,t.mutedByFocusActor=null}).catch(function(e){t.mutedByFocusActor=null,S.warn("Error while audio muting due to focus request",e)})}),this.chatRoomForwarder.forward(_.a.SUBJECT_CHANGED,a.SUBJECT_CHANGED),this.chatRoomForwarder.forward(_.a.MUC_JOINED,a.CONFERENCE_JOINED),n.addListener(_.a.MUC_JOINED,function(){e.conference.isJvbConnectionInterrupted=!1,Object.keys(n.connectionTimes).forEach(function(e){var t=Object(g.C)("conference_"+e,{value:n.connectionTimes[e]});s.a.sendAnalytics(t)}),Object.keys(n.xmpp.connectionTimes).forEach(function(e){var t=Object(g.C)("xmpp_"+e,{value:n.xmpp.connectionTimes[e]});s.a.sendAnalytics(t)})}),n.addListener(_.a.RENEGOTIATION_FAILED,function(e,n){n.isP2P||t.eventEmitter.emit(a.CONFERENCE_FAILED,o.OFFER_ANSWER_FAILED,e)}),this.chatRoomForwarder.forward(_.a.ROOM_JOIN_ERROR,a.CONFERENCE_FAILED,o.CONNECTION_ERROR),this.chatRoomForwarder.forward(_.a.ROOM_CONNECT_ERROR,a.CONFERENCE_FAILED,o.CONNECTION_ERROR),this.chatRoomForwarder.forward(_.a.ROOM_CONNECT_NOT_ALLOWED_ERROR,a.CONFERENCE_FAILED,o.NOT_ALLOWED_ERROR),this.chatRoomForwarder.forward(_.a.ROOM_CONNECT_MEMBERS_ONLY_ERROR,a.CONFERENCE_FAILED,o.MEMBERS_ONLY_ERROR),this.chatRoomForwarder.forward(_.a.ROOM_MAX_USERS_ERROR,a.CONFERENCE_FAILED,o.CONFERENCE_MAX_USERS),this.chatRoomForwarder.forward(_.a.PASSWORD_REQUIRED,a.CONFERENCE_FAILED,o.PASSWORD_REQUIRED),this.chatRoomForwarder.forward(_.a.AUTHENTICATION_REQUIRED,a.CONFERENCE_FAILED,o.AUTHENTICATION_REQUIRED),this.chatRoomForwarder.forward(_.a.BRIDGE_DOWN,a.CONFERENCE_FAILED,o.VIDEOBRIDGE_NOT_AVAILABLE),n.addListener(_.a.BRIDGE_DOWN,function(){return s.a.sendAnalytics(Object(g.z)())}),this.chatRoomForwarder.forward(_.a.RESERVATION_ERROR,a.CONFERENCE_FAILED,o.RESERVATION_ERROR),this.chatRoomForwarder.forward(_.a.GRACEFUL_SHUTDOWN,a.CONFERENCE_FAILED,o.GRACEFUL_SHUTDOWN),n.addListener(_.a.CONNECTION_ICE_FAILED,function(e){t._onIceConnectionFailed(e)}),this.chatRoomForwarder.forward(_.a.MUC_DESTROYED,a.CONFERENCE_FAILED,o.CONFERENCE_DESTROYED),this.chatRoomForwarder.forward(_.a.CHAT_ERROR_RECEIVED,a.CONFERENCE_ERROR,o.CHAT_ERROR),this.chatRoomForwarder.forward(_.a.FOCUS_DISCONNECTED,a.CONFERENCE_FAILED,o.FOCUS_DISCONNECTED),n.addListener(_.a.FOCUS_LEFT,function(){s.a.sendAnalytics(Object(g.E)()),t.eventEmitter.emit(a.CONFERENCE_FAILED,o.FOCUS_LEFT)}),n.addListener(_.a.SESSION_ACCEPT_TIMEOUT,function(e){s.a.sendAnalyticsAndLog(Object(g.G)(g.b,{p2p:e.isP2P}))}),n.addListener(_.a.RECORDER_STATE_CHANGED,function(e,n){if(n){var r=t.getParticipantById(i.Strophe.getResourceFromJid(n));"off"===e.getStatus()?e.setTerminator(r):"on"===e.getStatus()&&e.setInitiator(r)}t.eventEmitter.emit(a.RECORDER_STATE_CHANGED,e)}),this.chatRoomForwarder.forward(_.a.TRANSCRIPTION_STATUS_CHANGED,a.TRANSCRIPTION_STATUS_CHANGED),this.chatRoomForwarder.forward(_.a.VIDEO_SIP_GW_AVAILABILITY_CHANGED,a.VIDEO_SIP_GW_AVAILABILITY_CHANGED),this.chatRoomForwarder.forward(_.a.VIDEO_SIP_GW_SESSION_STATE_CHANGED,a.VIDEO_SIP_GW_SESSION_STATE_CHANGED),this.chatRoomForwarder.forward(_.a.PHONE_NUMBER_CHANGED,a.PHONE_NUMBER_CHANGED),n.setParticipantPropertyListener(function(e,n){var r=t.getParticipantById(n);r&&r.setProperty(e.tagName.substring("jitsi_participant_".length),e.value)}),n.addListener(_.a.KICKED,t.onMemberKicked.bind(t)),n.addListener(_.a.SUSPEND_DETECTED,t.onSuspendDetected.bind(t)),this.chatRoomForwarder.forward(_.a.MUC_LOCK_CHANGED,a.LOCK_STATE_CHANGED),this.chatRoomForwarder.forward(_.a.MUC_MEMBERS_ONLY_CHANGED,a.MEMBERS_ONLY_CHANGED),n.addListener(_.a.MUC_MEMBER_JOINED,t.onMemberJoined.bind(t)),this.chatRoomForwarder.forward(_.a.MUC_LOBBY_MEMBER_JOINED,a.LOBBY_USER_JOINED),this.chatRoomForwarder.forward(_.a.MUC_LOBBY_MEMBER_UPDATED,a.LOBBY_USER_UPDATED),this.chatRoomForwarder.forward(_.a.MUC_LOBBY_MEMBER_LEFT,a.LOBBY_USER_LEFT),n.addListener(_.a.MUC_MEMBER_BOT_TYPE_CHANGED,t._onMemberBotTypeChanged.bind(t)),n.addListener(_.a.MUC_MEMBER_LEFT,t.onMemberLeft.bind(t)),this.chatRoomForwarder.forward(_.a.MUC_LEFT,a.CONFERENCE_LEFT),this.chatRoomForwarder.forward(_.a.MUC_DENIED_ACCESS,a.CONFERENCE_FAILED,o.CONFERENCE_ACCESS_DENIED),n.addListener(_.a.DISPLAY_NAME_CHANGED,t.onDisplayNameChanged.bind(t)),n.addListener(_.a.LOCAL_ROLE_CHANGED,function(e){t.onLocalRoleChanged(e),t.statistics&&t.isModerator()&&t.on(a.RECORDER_STATE_CHANGED,function(e){var t={error:e.getError(),id:"recorder_status",status:e.getStatus()};s.a.sendLog(JSON.stringify(t))})}),n.addListener(_.a.MUC_ROLE_CHANGED,t.onUserRoleChanged.bind(t)),n.addListener(v.a.IDENTITY_UPDATED,function(e,n){t.authEnabled=e,t.authIdentity=n,t.eventEmitter.emit(a.AUTH_STATUS_CHANGED,e,n)}),n.addListener(_.a.MESSAGE_RECEIVED,function(e,n,r,o,s){var c=i.Strophe.getResourceFromJid(e);t.eventEmitter.emit(a.MESSAGE_RECEIVED,c,r,s,n)}),n.addListener(_.a.PRIVATE_MESSAGE_RECEIVED,function(e,n,r,o,s){var c=i.Strophe.getResourceFromJid(e);t.eventEmitter.emit(a.PRIVATE_MESSAGE_RECEIVED,c,r,s)}),n.addListener(_.a.PRESENCE_STATUS,function(e,n){var r=i.Strophe.getResourceFromJid(e),o=t.getParticipantById(r);o&&o._status!==n&&(o._status=n,t.eventEmitter.emit(a.USER_STATUS_CHANGED,r,n))}),n.addListener(_.a.JSON_MESSAGE_RECEIVED,function(e,n){var r=i.Strophe.getResourceFromJid(e),o=t.getParticipantById(r);o?t.eventEmitter.emit(a.ENDPOINT_MESSAGE_RECEIVED,o,n):S.warn("Ignored XMPPEvents.JSON_MESSAGE_RECEIVED for not existing participant: "+e,n)}),n.addPresenceListener("startmuted",function(e,n){var r=!1;if(t.myUserId()===n&&t.isModerator())r=!0;else{var i=t.getParticipantById(n);i&&i.isModerator()&&(r=!0)}if(r){var o="true"===e.attributes.audio,s="true"===e.attributes.video,c=!1;o!==t.startMutedPolicy.audio&&(t.startMutedPolicy.audio=o,c=!0),s!==t.startMutedPolicy.video&&(t.startMutedPolicy.video=s,c=!0),c&&t.eventEmitter.emit(a.START_MUTED_POLICY_CHANGED,t.startMutedPolicy)}}),t.statistics&&(n.addListener(_.a.CONNECTION_ICE_FAILED,function(e){t.statistics.sendIceConnectionFailedEvent(e.peerconnection)}),n.addListener(_.a.ADD_ICE_CANDIDATE_FAILED,function(e,n){t.statistics.sendAddIceCandidateFailed(e,n)}))},E.prototype.setupRTCListeners=function(){var e=this.conference,t=e.rtc;t.addListener(h.a.REMOTE_TRACK_ADDED,e.onRemoteTrackAdded.bind(e)),t.addListener(h.a.REMOTE_TRACK_REMOVED,e.onRemoteTrackRemoved.bind(e)),t.addListener(h.a.DOMINANT_SPEAKER_CHANGED,function(t){e.lastDominantSpeaker!==t&&e.room&&(e.lastDominantSpeaker=t,e.eventEmitter.emit(a.DOMINANT_SPEAKER_CHANGED,t),e.statistics&&e.myUserId()===t&&e.statistics.sendDominantSpeakerEvent(e.room.roomjid))}),t.addListener(h.a.DATA_CHANNEL_OPEN,function(){var t=window.performance.now(),n="data.channel.opened";S.log("(TIME) data.channel.opened:\t",t),e.room.connectionTimes[n]=t,s.a.sendAnalytics(Object(g.C)(n,{value:t})),e.eventEmitter.emit(a.DATA_CHANNEL_OPENED)}),t.addListener(h.a.ENDPOINT_MESSAGE_RECEIVED,function(t,n){var r=e.getParticipantById(t);r?e.eventEmitter.emit(a.ENDPOINT_MESSAGE_RECEIVED,r,n):S.warn("Ignored ENDPOINT_MESSAGE_RECEIVED for not existing participant: "+t,n)}),t.addListener(h.a.LOCAL_UFRAG_CHANGED,function(e,t){e.isP2P||s.a.sendLog(JSON.stringify({id:"local_ufrag",value:t}))}),t.addListener(h.a.REMOTE_UFRAG_CHANGED,function(e,t){e.isP2P||s.a.sendLog(JSON.stringify({id:"remote_ufrag",value:t}))}),t.addListener(h.a.CREATE_ANSWER_FAILED,function(t,n){e.statistics.sendCreateAnswerFailed(t,n),n.isP2P||e.eventEmitter.emit(a.CONFERENCE_FAILED,o.OFFER_ANSWER_FAILED,t)}),t.addListener(h.a.CREATE_OFFER_FAILED,function(t,n){e.statistics.sendCreateOfferFailed(t,n),n.isP2P||e.eventEmitter.emit(a.CONFERENCE_FAILED,o.OFFER_ANSWER_FAILED,t)}),t.addListener(h.a.SET_LOCAL_DESCRIPTION_FAILED,function(t,n){e.statistics.sendSetLocalDescFailed(t,n),n.isP2P||e.eventEmitter.emit(a.CONFERENCE_FAILED,o.OFFER_ANSWER_FAILED,t)}),t.addListener(h.a.SET_REMOTE_DESCRIPTION_FAILED,function(t,n){e.statistics.sendSetRemoteDescFailed(t,n),n.isP2P||e.eventEmitter.emit(a.CONFERENCE_FAILED,o.OFFER_ANSWER_FAILED,t)}),t.addListener(h.a.LOCAL_TRACK_SSRC_UPDATED,function(t,n){t.isVideoTrack()&&t.videoType===f.a.DESKTOP&&e.statistics.sendScreenSharingEvent(!0,n)})},E.prototype.removeXMPPListeners=function(){var e=this,t=this.conference;t.xmpp.caps.removeListener(_.a.PARTCIPANT_FEATURES_CHANGED,this.xmppListeners[_.a.PARTCIPANT_FEATURES_CHANGED]),delete this.xmppListeners[_.a.PARTCIPANT_FEATURES_CHANGED],Object.keys(this.xmppListeners).forEach(function(n){t.xmpp.removeListener(n,e.xmppListeners[n])}),this.xmppListeners={}},E.prototype.setupXMPPListeners=function(){var e=this.conference,t=function(t){var n=e.getParticipantById(i.Strophe.getResourceFromJid(t));n&&e.eventEmitter.emit(a.PARTCIPANT_FEATURES_CHANGED,n)};e.xmpp.caps.addListener(_.a.PARTCIPANT_FEATURES_CHANGED,t),this.xmppListeners[_.a.PARTCIPANT_FEATURES_CHANGED]=t,this._addConferenceXMPPListener(_.a.CALL_INCOMING,e.onIncomingCall.bind(e)),this._addConferenceXMPPListener(_.a.CALL_ACCEPTED,e.onCallAccepted.bind(e)),this._addConferenceXMPPListener(_.a.TRANSPORT_INFO,e.onTransportInfo.bind(e)),this._addConferenceXMPPListener(_.a.CALL_ENDED,e.onCallEnded.bind(e)),this._addConferenceXMPPListener(_.a.START_MUTED_FROM_FOCUS,function(t,n){e.options.config.ignoreStartMuted||(e.startAudioMuted=t,e.startVideoMuted=n,e.getLocalTracks().forEach(function(t){switch(t.getType()){case d.a:e.startAudioMuted&&t.mute();break;case d.c:e.startVideoMuted&&t.mute()}}),e.eventEmitter.emit(a.STARTED_MUTED))}),this._addConferenceXMPPListener(_.a.CONFERENCE_TIMESTAMP_RECEIVED,function(t){e.eventEmitter.emit(a.CONFERENCE_CREATED_TIMESTAMP,t)})},E.prototype._addConferenceXMPPListener=function(e,t){this.xmppListeners[e]=t,this.conference.xmpp.addListener(e,t)},E.prototype.setupStatisticsListeners=function(){var e=this.conference;e.statistics&&(e.statistics.addAudioLevelListener(function(t,n,r,i){e.rtc.setAudioLevel(t,n,r,i)}),e.statistics.addBeforeDisposedListener(function(){e.eventEmitter.emit(a.BEFORE_STATISTICS_DISPOSED)}),e.options.config.startSilent||e.statistics.addByteSentStatsListener(function(t,n){e.getLocalTracks(d.a).forEach(function(e){var r=t.getLocalSSRC(e);r&&n.hasOwnProperty(r)&&e._onByteSentStatsReceived(t,n[r])})}))}}).call(this,"JitsiConferenceEventManager.js")},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",function(){return s});var i=n(17),o=n(4),a=Object(o.getLogger)(e),s=(function(e){function t(){var e;return _classCallCheck(this,t),e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this)),a.info("This appears to be "+e.getName()+", ver: "+e.getVersion()),e}return _inherits(t,e),_createClass(t,[{key:"doesVideoMuteByStreamRemove",value:function(){return this.isChromiumBased()||this.isSafari()}},{key:"supportsP2P",value:function(){return!this.usesUnifiedPlan()}},{key:"isChromiumBased",value:function(){return this.isChrome()||this.isElectron()||this.isNWJS()||this.isOpera()}},{key:"isSupported",value:function(){return this.isChromiumBased()||this.isFirefox()||this.isReactNative()||this.isSafari()&&!this.isVersionLessThan("12.1")}},{key:"isUserInteractionRequiredForUnmute",value:function(){return this.isFirefox()&&this.isVersionLessThan("68")}},{key:"supportsVideoMuteOnConnInterrupted",value:function(){return this.isChromiumBased()||this.isReactNative()||this.isSafari()}},{key:"supportsBandwidthStatistics",value:function(){return!this.isFirefox()&&!this.isSafari()}},{key:"supportsCodecPreferences",value:function(){return this.usesUnifiedPlan()&&void 0!==window.RTCRtpTransceiver&&Object.keys(window.RTCRtpTransceiver.prototype).indexOf("setCodecPreferences")>-1&&Object.keys(RTCRtpSender.prototype).indexOf("getCapabilities")>-1&&!this.isSafari()}},{key:"supportsDeviceChangeEvent",value:function(){return navigator.mediaDevices&&void 0!==navigator.mediaDevices.ondevicechange&&void 0!==navigator.mediaDevices.addEventListener}},{key:"supportsLocalCandidateRttStatistics",value:function(){return this.isChromiumBased()||this.isReactNative()||this.isSafari()}},{key:"supportsPerformanceObserver",value:function(){return void 0!==window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes.indexOf("longtask")>-1}},{key:"supportsReceiverStats",value:function(){return void 0!==window.RTCRtpReceiver&&Object.keys(RTCRtpReceiver.prototype).indexOf("getSynchronizationSources")>-1}},{key:"supportsRTTStatistics",value:function(){return!this.isFirefox()}},{key:"supportsVideo",value:function(){return!0}},{key:"usesPlanB",value:function(){return!this.usesUnifiedPlan()}},{key:"usesSdpMungingForSimulcast",value:function(){return this.isChromiumBased()||this.isReactNative()||this.isSafari()}},{key:"usesUnifiedPlan",value:function(){return!!this.isFirefox()||!(!this.isSafari()||void 0===window.RTCRtpTransceiver)&&Object.keys(RTCRtpTransceiver.prototype).indexOf("currentDirection")>-1}},{key:"usesNewGumFlow",value:function(){return this.isChrome()?!this.isVersionLessThan(61):!(!this.isFirefox()&&!this.isSafari())||!!this.isChromiumBased()&&this._getChromiumBasedVersion()>=61}},{key:"usesAdapter",value:function(){return this.usesNewGumFlow()}},{key:"usesRidsForSimulcast",value:function(){return!1}},{key:"supportsGetDisplayMedia",value:function(){return void 0!==navigator.getDisplayMedia||void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getDisplayMedia}},{key:"supportsInsertableStreams",value:function(){return Boolean(void 0!==window.RTCRtpSender&&(window.RTCRtpSender.prototype.createEncodedStreams||window.RTCRtpSender.prototype.createEncodedVideoStreams))}},{key:"supportsAudioRed",value:function(){return Boolean(window.RTCRtpSender&&window.RTCRtpSender.getCapabilities&&window.RTCRtpSender.getCapabilities("audio").codecs.some(function(e){return"audio/red"===e.mimeType})&&window.RTCRtpReceiver&&window.RTCRtpReceiver.getCapabilities&&window.RTCRtpReceiver.getCapabilities("audio").codecs.some(function(e){return"audio/red"===e.mimeType}))}},{key:"supportsSdpSemantics",value:function(){return this.isChromiumBased()&&this._getChromiumBasedVersion()>=65}},{key:"_getChromiumBasedVersion",value:function(){if(this.isChromiumBased()){if(this.isNWJS())return Number.parseInt(r.versions.chromium,10);var e=navigator.userAgent;if(e.match(/Chrome/))return Number.parseInt(e.match(/Chrome\/([\d.]+)/)[1],10)}return-1}}]),t})(i.a)}).call(this,"modules/browser/BrowserCapabilities.js",n(55))},function(e,t,n){e.exports=(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&("function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag")&&Object.defineProperty(e,"function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag",{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)})({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=(function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),a=Math.max(i,o),s=0,c=e.map([t,n],function(t){var n=a-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(c[0][a]>c[1][a])return 1;if(c[0][a]===c[1][a]){if(a===s)return 0;a-=1}else if(c[0][a]0){var a=Object.keys(n),s=a.find(function(e){return t.isOS(e)});if(s){var c=this.satisfies(n[s]);if(void 0!==c)return c}var u=a.find(function(e){return t.isPlatform(e)});if(u){var d=this.satisfies(n[u]);if(void 0!==d)return d}}if(o>0){var l=Object.keys(i).find(function(e){return t.isBrowser(e,!0)});if(void 0!==l)return this.compareVersion(i[l])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e){return this.isBrowser(e)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e})();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows/i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=a,e.exports=t.default}})},function(e,t,n){"use strict";(function(e){var r=n(4),i=n(7),o=n(3);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=Object(r.getLogger)(e);t.a=new((function(){function e(){_classCallCheck(this,e),this.reset()}return _createClass(e,[{key:"reset",value:function(){this.disposed=!1,this.analyticsHandlers=new Set,this.cache=[],this.permanentProperties={},this.conferenceName="",this.addPermanentProperties({user_agent:navigator.userAgent,browser_name:o.a.getName()})}},{key:"dispose",value:function(){s.warn("Disposing of analytics adapter."),this.analyticsHandlers&&this.analyticsHandlers.size>0&&this.analyticsHandlers.forEach(function(e){"function"==typeof e.dispose&&e.dispose()}),this.setAnalyticsHandlers([]),this.disposed=!0}},{key:"setAnalyticsHandlers",value:function(e){var t=this;if(!this.disposed){this.analyticsHandlers=new Set(e),this._setUserProperties();var n=this.cache;this.cache=null,n&&n.forEach(function(e){return t._sendEvent(e)})}}},{key:"_setUserProperties",value:function(){var e=this;this.analyticsHandlers.forEach(function(t){try{t.setUserProperties(e.permanentProperties)}catch(t){s.warn("Error in setUserProperties method of one of the analytics handlers: "+t)}})}},{key:"addPermanentProperties",value:function(e){this.permanentProperties=(function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};if(!this.disposed){var n=null;"string"==typeof e?n={type:i.t,action:e,actionSubject:e,source:e,attributes:t}:"object"==typeof e&&(n=e),this._verifyRequiredFields(n)?this._sendEvent(n):s.error("Dropping a mis-formatted event: "+JSON.stringify(n))}}},{key:"_verifyRequiredFields",value:function(e){if(!e)return!1;e.type||(e.type=i.t);var t=e.type;return t!==i.t&&t!==i.u&&t!==i.w&&t!==i.v?(s.error("Unknown event type: "+t),!1):t===i.u?Boolean(e.name):(e.action=e.action||e.name||e.actionSubject,e.actionSubject=e.actionSubject||e.name||e.action,e.source=e.source||e.name||e.action||e.actionSubject,e.action&&e.actionSubject&&e.source?!!(t!==i.v||(e.objectType=e.objectType||"generic-object-type",e.containerType=e.containerType||"conference","conference"!==e.containerType||e.containerId||(e.containerId=this.conferenceName),e.objectType&&e.objectId&&e.containerType&&e.containerId))||(s.error("Required field missing (containerId, containerType, objectId or objectType)"),!1):(s.error("Required field missing (action, actionSubject or source)"),!1))}},{key:"_maybeCacheEvent",value:function(e){return!!this.cache&&(this.cache.push(e),this.cache.length>100&&this.cache.splice(0,1),!0)}},{key:"_sendEvent",value:function(e){this._maybeCacheEvent(e)||this.analyticsHandlers.forEach(function(t){try{t.sendEvent(e)}catch(e){s.warn("Error sending analytics event: "+e)}})}}]),e})())}).call(this,"modules/statistics/AnalyticsAdapter.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return s});var r=n(4),i=n(23),o=n(27),a=Object(r.getLogger)(e),s=(function(){function e(t,n){_classCallCheck(this,e),this.eventEmitter=t,this.longTasks=0,this.maxDuration=0,this.performanceStatsInterval=n,this.stats=new o.a}return _createClass(e,[{key:"getLongTasksStats",value:function(){return{avgRatePerMinute:(60*this.stats.getAverage()).toFixed(2),maxDurationMs:this.maxDuration}}},{key:"startObserver",value:function(){var e=this;this.longTaskEventHandler=function(t){var n=t.getEntries(),r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;e.longTasks++,e.maxDuration=Math.max(e.maxDuration,a.duration).toFixed(3)}},a.info("Creating a Performance Observer for monitoring Long Tasks"),this.observer=new PerformanceObserver(this.longTaskEventHandler),this.observer.observe({type:"longtask",buffered:!0});var t=Date.now();this.longTasksIntervalId=setInterval(function(){var n=Date.now(),r=e._lastTimeStamp?(n-e._lastTimeStamp)/1e3:(n-t)/1e3,o=e.longTasks/r;e.stats.addNext(o),e.eventEmitter.emit(i.e,e.getLongTasksStats()),e.longTasks=0,e._lastTimeStamp=Date.now()},this.performanceStatsInterval)}},{key:"stopObserver",value:function(){this.observer&&this.observer.disconnect(),this.longTaskEventHandler=null,this.longTasksIntervalId&&(clearInterval(this.longTasksIntervalId),this.longTasksIntervalId=null)}}]),e})()}).call(this,"modules/statistics/PerformanceObserverStats.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return f});var r=n(17),i=n(4),o=n(8),a=n(23),s=n(3),c=n(11),u=Object(i.getLogger)(e),d={};function l(e,t){return!t||t<=0||!e||e<=0?0:Math.round(e/t*100)}function h(){this.loss={},this.bitrate={download:0,upload:0},this.resolution={},this.framerate=0,this.codec=""}function p(){this.bandwidth={},this.bitrate={},this.packetLoss=null,this.transport=[]}function f(e,t,n,r){this._browserType=s.a.getName();var i=d[this._browserType];if(!i)throw"The browser type '"+this._browserType+"' isn't supported!";this._usesPromiseGetStats=s.a.isSafari()||s.a.isFirefox(),this._getStatValue=this._usesPromiseGetStats?this._defineNewGetStatValueMethod(i):this._defineGetStatValueMethod(i),this.peerconnection=e,this.baselineAudioLevelsReport=null,this.currentAudioLevelsReport=null,this.currentStatsReport=null,this.previousStatsReport=null,this.audioLevelReportHistory={},this.audioLevelsIntervalId=null,this.eventEmitter=r,this.conferenceStats=new p,this.audioLevelsIntervalMilis=t,this.statsIntervalId=null,this.statsIntervalMilis=n,this.ssrc2stats=new Map}d[r.b.FIREFOX]={ssrc:"ssrc",packetsReceived:"packetsReceived",packetsLost:"packetsLost",packetsSent:"packetsSent",bytesReceived:"bytesReceived",bytesSent:"bytesSent",framerateMean:"framerateMean",ip:"address",port:"port",protocol:"protocol"},d[r.b.CHROME]={receiveBandwidth:"googAvailableReceiveBandwidth",sendBandwidth:"googAvailableSendBandwidth",remoteAddress:"googRemoteAddress",transportType:"googTransportType",localAddress:"googLocalAddress",activeConnection:"googActiveConnection",ssrc:"ssrc",packetsReceived:"packetsReceived",packetsSent:"packetsSent",packetsLost:"packetsLost",bytesReceived:"bytesReceived",bytesSent:"bytesSent",googCodecName:"googCodecName",googFrameHeightReceived:"googFrameHeightReceived",googFrameWidthReceived:"googFrameWidthReceived",googFrameHeightSent:"googFrameHeightSent",googFrameWidthSent:"googFrameWidthSent",googFrameRateReceived:"googFrameRateReceived",googFrameRateSent:"googFrameRateSent",audioInputLevel:"audioInputLevel",audioOutputLevel:"audioOutputLevel",currentRoundTripTime:"googRtt",remoteCandidateType:"googRemoteCandidateType",localCandidateType:"googLocalCandidateType",ip:"ip",port:"port",protocol:"protocol"},d[r.b.OPERA]=d[r.b.CHROME],d[r.b.NWJS]=d[r.b.CHROME],d[r.b.ELECTRON]=d[r.b.CHROME],d[r.b.SAFARI]=d[r.b.CHROME],d[r.b.REACT_NATIVE]=d[r.b.CHROME],h.prototype.setLoss=function(e){this.loss=e||{}},h.prototype.setResolution=function(e){this.resolution=e||{}},h.prototype.addBitrate=function(e){this.bitrate.download+=e.download,this.bitrate.upload+=e.upload},h.prototype.resetBitrate=function(){this.bitrate.download=0,this.bitrate.upload=0},h.prototype.setFramerate=function(e){this.framerate=e||0},h.prototype.setCodec=function(e){this.codec=e||""},f.prototype.stop=function(){this.audioLevelsIntervalId&&(clearInterval(this.audioLevelsIntervalId),this.audioLevelsIntervalId=null),this.statsIntervalId&&(clearInterval(this.statsIntervalId),this.statsIntervalId=null)},f.prototype.errorCallback=function(e){c.callErrorHandler(e),u.error("Get stats error",e),this.stop()},f.prototype.start=function(e){var t=this;e&&(s.a.supportsReceiverStats()&&u.info("Using RTCRtpSynchronizationSource for remote audio levels"),this.audioLevelsIntervalId=setInterval(function(){if(s.a.supportsReceiverStats()){var e=t.peerconnection.getAudioLevels();for(var n in e)if(e.hasOwnProperty(n)){var r=2.5*e[n];t.eventEmitter.emit(a.a,t.peerconnection,Number.parseInt(n,10),r,!1)}}else t.peerconnection.getStats(function(e){var n;n=e&&e.result&&"function"==typeof e.result?e.result():e,t.currentAudioLevelsReport=n,t._usesPromiseGetStats?t.processNewAudioLevelReport():t.processAudioLevelReport(),t.baselineAudioLevelsReport=t.currentAudioLevelsReport},function(e){return t.errorCallback(e)})},this.audioLevelsIntervalMilis)),this.statsIntervalId=setInterval(function(){t.peerconnection.getStats(function(e){var n;n=e&&e.result&&"function"==typeof e.result?e.result():e,t.currentStatsReport=n;try{t._usesPromiseGetStats?t.processNewStatsReport():t.processStatsReport()}catch(e){c.callErrorHandler(e),u.error("Unsupported key:"+e,e)}t.previousStatsReport=t.currentStatsReport},function(e){return t.errorCallback(e)})},this.statsIntervalMilis)},f.prototype._defineGetStatValueMethod=function(e){var t;switch(this._browserType){case r.b.CHROME:case r.b.OPERA:case r.b.NWJS:case r.b.ELECTRON:t=function(e,t){return e.stat(t)};break;case r.b.REACT_NATIVE:t=function(e,t){var n;return e.values.some(function(e){return!!e.hasOwnProperty(t)&&(n=e[t],!0)}),n};break;default:t=function(e,t){return e[t]}}return function(n,r){return t(n,(function(t){var n=e[t];if(n)return n;throw"The property '"+t+"' isn't supported!"})(r))}},f.prototype.getNonNegativeStat=function(e,t){var n=this._getStatValue(e,t);return"number"!=typeof n&&(n=Number(n)),isNaN(n)?0:Math.max(0,n)},f.prototype.processStatsReport=function(){var e=this;if(this.previousStatsReport){var t=this._getStatValue,n={};for(var r in this.currentStatsReport)if(this.currentStatsReport.hasOwnProperty(r)){var i=this.currentStatsReport[r];if(i){try{var o=t(i,"receiveBandwidth"),s=t(i,"sendBandwidth");(o||s)&&(this.conferenceStats.bandwidth={download:Math.round(o/1e3),upload:Math.round(s/1e3)})}catch(t){}if("googCandidatePair"===i.type)if("continue"===(function(){var n=void 0,r=void 0,o=void 0,a=void 0,s=void 0,c=void 0,u=void 0;try{if(!(n=t(i,"activeConnection")))return"continue";r=t(i,"remoteAddress"),u=t(i,"transportType"),a=t(i,"localAddress"),o=t(i,"localCandidateType"),s=t(i,"remoteCandidateType"),c=e.getNonNegativeStat(i,"currentRoundTripTime")}catch(e){}if(!r||!u||!a||"true"!==n)return"continue";var d=e.conferenceStats.transport;return d.some(function(e){return e.ip===r&&e.type===u&&e.localip===a})||d.push({ip:r,type:u,localip:a,p2p:e.peerconnection.isP2P,localCandidateType:o,remoteCandidateType:s,rtt:c}),"continue"})())continue;if("candidatepair"===i.type){if("succeeded"!==i.state||!i.selected)continue;var c=this.currentStatsReport[i.localCandidateId],d=this.currentStatsReport[i.remoteCandidateId];this.conferenceStats.transport.push({ip:d.ipAddress+":"+d.portNumber,type:c.transport,localip:c.ipAddress+":"+c.portNumber,p2p:this.peerconnection.isP2P,localCandidateType:c.candidateType,remoteCandidateType:d.candidateType})}if("ssrc"===i.type||"outboundrtp"===i.type||"inboundrtp"===i.type||"track"===i.type){var l=this.previousStatsReport[r],p=this.getNonNegativeStat(i,"ssrc");if("track"===i.type&&Array.isArray(i.ssrcIds)&&(p=Number(i.ssrcIds[0])),l&&p&&!0!==i.isRemote&&!0!==i.remoteSource){var f=this.ssrc2stats.get(p);f||(f=new h,this.ssrc2stats.set(p,f));var m=!0,v="packetsReceived",g=t(i,v);null!=g&&""!==g||(m=!1,null==(g=t(i,v="packetsSent"))&&u.warn("No packetsReceived nor packetsSent stat found")),(!g||g<0)&&(g=0);var y=this.getNonNegativeStat(l,v),_=Math.max(0,g-y),S=this.getNonNegativeStat(i,"packetsLost"),E=this.getNonNegativeStat(l,"packetsLost"),b=Math.max(0,S-E);f.setLoss({packetsTotal:_+b,packetsLost:b,isDownloadStream:m});var C=this.getNonNegativeStat(i,"bytesReceived"),T=this.getNonNegativeStat(l,"bytesReceived"),R=Math.max(0,C-T),A=0,k=t(i,"bytesSent");"number"!=typeof k&&"string"!=typeof k||(k=Number(k),isNaN(k)||(n[p]=k,k>0&&(A=k-t(l,"bytesSent")))),A=Math.max(0,A);var w=i.timestamp-l.timestamp,I=0,P=0;w>0&&(I=Math.round(8*R/w),P=Math.round(8*A/w)),f.addBitrate({download:I,upload:P});var D={height:null,width:null};try{var O=void 0,N=void 0;((O=t(i,"googFrameHeightReceived"))&&(N=t(i,"googFrameWidthReceived"))||(O=t(i,"googFrameHeightSent"))&&(N=t(i,"googFrameWidthSent")))&&(D.height=O,D.width=N)}catch(t){}var M=void 0,L=void 0;try{M=t(i,"googFrameRateReceived")||t(i,"googFrameRateSent")||0}catch(t){try{M=this.getNonNegativeStat(i,"framerateMean")}catch(t){}}f.setFramerate(Math.round(M||0)),D.height&&D.width?f.setResolution(D):f.setResolution(null);try{L=t(i,"googCodecName")||""}catch(t){}f.setCodec(L)}}}}this.eventEmitter.emit(a.c,this.peerconnection,n),this._processAndEmitReport()}},f.prototype._processAndEmitReport=function(){var e=this,t={download:0,upload:0},n={download:0,upload:0},r=0,i=0,o={},s={},c={},d=0,h=0,p="",f=0,m=0,v="",g=this.ssrc2stats,y=Array.isArray(g),_=0;for(g=y?g:g["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var S;if(y){if(_>=g.length)break;S=g[_++]}else{if((_=g.next()).done)break;S=_.value}var E=_slicedToArray(S,2),b=E[0],C=E[1],T=C.loss,R=T.isDownloadStream?"download":"upload";t[R]+=T.packetsTotal,n[R]+=T.packetsLost,r+=C.bitrate.download,i+=C.bitrate.upload;var A=this.peerconnection.getTrackBySSRC(b);if(A){A.isAudioTrack()?(d+=C.bitrate.download,h+=C.bitrate.upload,p=C.codec):(f+=C.bitrate.download,m+=C.bitrate.upload,v=C.codec);var k=A.getParticipantId();if(k){var w=C.resolution;if(w.width&&w.height&&-1!==w.width&&-1!==w.height){var I=o[k]||{};I[b]=w,o[k]=I}if(0!==C.framerate){var P=s[k]||{};P[b]=C.framerate,s[k]=P}if(p.length&&v.length){var D={audio:p,video:v},O=c[k]||{};O[b]=D,c[k]=O}}else u.error("No participant ID returned by "+A)}C.resetBitrate()}this.conferenceStats.bitrate={upload:i,download:r},this.conferenceStats.bitrate.audio={upload:h,download:d},this.conferenceStats.bitrate.video={upload:m,download:f},this.conferenceStats.packetLoss={total:l(n.download+n.upload,t.download+t.upload),download:l(n.download,t.download),upload:l(n.upload,t.upload)};var N,M={};Object.keys(this.audioLevelReportHistory).forEach(function(t){var n=e.audioLevelReportHistory[t],r=n.data,i=n.isLocal,o=r.reduce(function(e,t){return e+t})/r.length;if(i)N=o;else{var a=e.peerconnection.getTrackBySSRC(Number(t));if(a){var s=a.getParticipantId();s&&(M[s]=o)}}}),this.audioLevelReportHistory={},this.eventEmitter.emit(a.d,this.peerconnection,{bandwidth:this.conferenceStats.bandwidth,bitrate:this.conferenceStats.bitrate,packetLoss:this.conferenceStats.packetLoss,resolution:o,framerate:s,codec:c,transport:this.conferenceStats.transport,localAvgAudioLevels:N,avgAudioLevels:M}),this.conferenceStats.transport=[]},f.prototype.processAudioLevelReport=function(){if(this.baselineAudioLevelsReport){var e=this._getStatValue;for(var t in this.currentAudioLevelsReport)if(this.currentAudioLevelsReport.hasOwnProperty(t)){var n=this.currentAudioLevelsReport[t];if("ssrc"===n.type||"track"===n.type){var r=this.baselineAudioLevelsReport[t],i=void 0,o=this.getNonNegativeStat(n,"ssrc");if(!o&&Array.isArray(n.ssrcIds)&&(o=Number(n.ssrcIds[0])),r)if(o){try{i=e(n,"audioInputLevel")||e(n,"audioOutputLevel")}catch(e){return u.warn("Audio Levels are not available in the statistics."),void clearInterval(this.audioLevelsIntervalId)}if(i){var s;s="ssrc"===n.type?!e(n,"packetsReceived"):!n.remoteSource,i/=32767,o in this.audioLevelReportHistory||(this.audioLevelReportHistory[o]={isLocal:s,data:[]}),this.audioLevelReportHistory[o].data.push(i),this.eventEmitter.emit(a.a,this.peerconnection,o,i,s)}}else Date.now()-n.timestamp<3e3&&u.warn("No ssrc: ");else u.warn(o+" not enough data")}}}},f.prototype._defineNewGetStatValueMethod=function(e){return function(t,n){return t[(function(t){var n=e[t];if(n)return n;throw"The property '"+t+"' isn't supported!"})(n)]}},f.prototype.getNonNegativeValue=function(e){var t=e;return"number"!=typeof t&&(t=Number(t)),isNaN(t)?0:Math.max(0,t)},f.prototype._calculateBitrate=function(e,t,n){var r=this.getNonNegativeValue(e[n]),i=this.getNonNegativeValue(t[n]),o=Math.max(0,r-i),a=e.timestamp-t.timestamp,s=0;return a>0&&(s=Math.round(8*o/a)),s},f.prototype.processNewStatsReport=function(){var e=this;if(this.previousStatsReport){var t=this._getStatValue,n={};this.currentStatsReport.forEach(function(r){if("candidate-pair"===r.type&&r.nominated&&"succeeded"===r.state){var i=r.availableIncomingBitrate,o=r.availableOutgoingBitrate;(i||o)&&(e.conferenceStats.bandwidth={download:Math.round(i/1e3),upload:Math.round(o/1e3)});var a=e.currentStatsReport.get(r.remoteCandidateId),s=e.currentStatsReport.get(r.localCandidateId);if(a&&s){var c=t(a,"ip")+":"+t(a,"port"),u=t(s,"ip")+":"+t(s,"port"),d=t(a,"protocol"),l=e.conferenceStats.transport;l.some(function(e){return e.ip===c&&e.type===d&&e.localip===u})||l.push({ip:c,type:d,localIp:u,p2p:e.peerconnection.isP2P,localCandidateType:s.candidateType,remoteCandidateType:a.candidateType,networkType:s.networkType,rtt:1e3*r.currentRoundTripTime})}}else if("inbound-rtp"===r.type||"outbound-rtp"===r.type){var p=e.previousStatsReport.get(r.id),f=e.getNonNegativeValue(r.ssrc);if(!p||!f)return;var m=e.ssrc2stats.get(f);m||(m=new h,e.ssrc2stats.set(f,m));var v=!0,g="packetsReceived";"outbound-rtp"===r.type&&(v=!1,g="packetsSent");var y=r[g];(!y||y<0)&&(y=0);var _=e.getNonNegativeValue(p[g]),S=Math.max(0,y-_),E=e.getNonNegativeValue(r.packetsLost),b=e.getNonNegativeValue(p.packetsLost),C=Math.max(0,E-b);m.setLoss({packetsTotal:S+C,packetsLost:C,isDownloadStream:v}),"inbound-rtp"===r.type?m.addBitrate({download:e._calculateBitrate(r,p,"bytesReceived"),upload:0}):(n[f]=e.getNonNegativeValue(r.bytesSent),m.addBitrate({download:0,upload:e._calculateBitrate(r,p,"bytesSent")}));var T=r.framerateMean;T&&m.setFramerate(Math.round(T||0))}else if("track"===r.type){var R={height:r.frameHeight,width:r.frameWidth},A=r.framesPerSecond;if(!A){var k=e.previousStatsReport.get(r.id);if(k){var w=r.timestamp-k.timestamp;w>0&&r.framesSent&&(A=(r.framesSent-k.framesSent)/w*1e3)}if(!A)return}var I=r.trackIdentifier,P=e.peerconnection.getSsrcByTrackId(I);if(!P)return;var D=e.ssrc2stats.get(P);D||(D=new h,e.ssrc2stats.set(P,D)),D.setFramerate(Math.round(A||0)),R.height&&R.width?D.setResolution(R):D.setResolution(null)}}),this.eventEmitter.emit(a.c,this.peerconnection,n),this._processAndEmitReport()}},f.prototype.processNewAudioLevelReport=function(){var e=this;this.baselineAudioLevelsReport&&this.currentAudioLevelsReport.forEach(function(t){if("track"===t.type){var n=t.audioLevel;if(n){var r=t.trackIdentifier,i=e.peerconnection.getSsrcByTrackId(r);if(i){var s=i===e.peerconnection.getLocalSSRC(e.peerconnection.getLocalTracks(o.a));e.eventEmitter.emit(a.a,e.peerconnection,i,n,s)}}}})}}).call(this,"modules/statistics/RTPStatsCollector.js")},function(e,t){function n(e,t){if(!e||!t||"function"!=typeof e.addListener||"function"!=typeof t.emit)throw new Error("Invalid arguments passed to EventEmitterForwarder");this.src=e,this.dest=t}n.prototype.forward=function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:5e3;return this._getFeaturesPromise?this._getFeaturesPromise:(this._getFeaturesPromise=this._conference.xmpp.caps.getFeatures(this._jid,t).catch(function(n){return n===s.a?e._conference.xmpp.caps.getFeatures(e._jid,t):(u.warn("Failed to discover features of "+e._jid,n),Promise.reject(n))}),this._getFeaturesPromise.then(function(t){return e._getFeaturesPromise=void 0,t},function(t){throw e._getFeaturesPromise=void 0,t}))}},{key:"getBotType",value:function(){return this._botType}}]),e})()}).call(this,"JitsiParticipant.js")},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(26),i=n(37);function o(e){var t,n=this,o=e.id,a=e.password,s=e.onCreateResource,c=e.onLoginSuccessful,u=e.roomPassword,d=!1,l=new i.c(this.connection.options),h=new Promise(function(e,i){t=i,l.addListener(r.CONNECTION_DISCONNECTED,function(){l=void 0}),l.addListener(r.CONNECTION_ESTABLISHED,function(){d||(c&&c(),l.createRoom(n.options.name,n.options.config,s).moderator.authenticate().then(function(){l&&l.disconnect(),d||(n.join(u),e())}).catch(function(e){var t=e.error,n=e.message;l.disconnect(),i({authenticationError:t,message:n})}))}),l.addListener(r.CONNECTION_FAILED,function(e,t,n){i({connectionError:e,credentials:n,message:t}),l=void 0}),d||l.connect(o,a)});return h.cancel=function(){d=!0,t({}),l&&l.disconnect()},h}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return s});var r=n(4),i=n(48),o=n(89),a=Object(r.getLogger)(e),s=(function(){function e(t){_classCallCheck(this,e),this._stropheConn=t,this._resumeRetryN=0,this._retryDelay=void 0}return _createClass(e,[{key:"schedule",value:function(){var e=this;this._cancelResume(),this._resumeRetryN+=1,this._networkOnlineListener=i.b.addEventListener(i.a,function(t){t.isOnline?e._scheduleResume():e._cancelResume()}),i.b.isOnline()&&this._scheduleResume()}},{key:"_scheduleResume",value:function(){var e=this;this._resumeTimeout||(this._resumeRetryN=Math.min(3,this._resumeRetryN),this._retryDelay=Object(o.a)(this._resumeRetryN,1500*this._resumeRetryN,3),a.info("Will try to resume the XMPP connection in "+this.retryDelay+"ms"),this._resumeTimeout=setTimeout(function(){return e._resumeConnection()},this.retryDelay))}},{key:"_cancelResume",value:function(){this._resumeTimeout&&(a.info("Canceling connection resume task"),clearTimeout(this._resumeTimeout),this._resumeTimeout=void 0,this._retryDelay=void 0)}},{key:"_resumeConnection",value:function(){var e=this._stropheConn.streamManagement,t=e.getResumeToken();if(t){a.info("Trying to resume the XMPP connection");var n=new URL(this._stropheConn.service),r=n.search;r+=-1===r.indexOf("?")?"?previd="+t:"&previd="+t,n.search=r,this._stropheConn.service=n.toString(),e.resume()}}},{key:"cancel",value:function(){this._cancelResume(),this._resumeRetryN=0,this._networkOnlineListener&&(this._networkOnlineListener(),this._networkOnlineListener=null)}},{key:"retryDelay",get:function(){return this._retryDelay}}]),e})()}).call(this,"modules/xmpp/ResumeTask.js")},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;return Math.floor(Math.random()*(1e3*Math.pow(n,e)-t)+t)}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=(function(){function e(){_classCallCheck(this,e),this._lastSuccess=null}return _createClass(e,[{key:"startTracking",value:function(e,t){var n=this,r=t.rawInput;t.rawInput=function(){for(var i=arguments.length,o=new Array(i),a=0;a1&&void 0!==arguments[1]?arguments[1]:1e4;clearInterval(this.intervalId),this.intervalId=window.setInterval(function(){t.ping(e,function(){t.failedPings=0},function(e){t.failedPings+=1;var n="Ping "+(e?"error":"timeout");t.failedPings>=2?(a.a.callErrorHandler(new Error(n)),c.error(n,e),t._onPingThresholdExceeded&&t._onPingThresholdExceeded()):c.warn(n,e)},5e3)},n),c.info("XMPP pings will be sent every "+n+" ms")}},{key:"stopInterval",value:function(){this.intervalId&&(window.clearInterval(this.intervalId),this.intervalId=null,this.failedPings=0,c.info("Ping interval cleared"))}},{key:"_addPingExecutionTimestamp",value:function(){this.pingExecIntervals.push((new Date).getTime()),this.pingExecIntervals.length>12&&this.pingExecIntervals.shift()}},{key:"getPingSuspendTime",value:function(){var e=this.pingExecIntervals.slice();e.push((new Date).getTime());var t=0,n=e[0];return e.forEach(function(e){var r=e-n;r>t&&(t=r),n=e}),t-=1e4,Math.max(t,0)}}]),t})(s.b)}).call(this,"modules/xmpp/strophe.ping.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return d});var r=n(4),i=n(2),o=n(0),a=n.n(o),s=n(93),c=n(36),u=Object(r.getLogger)(e),d=(function(e){function t(e){var n;return _classCallCheck(this,t),(n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this))).xmpp=e,n.rooms={},n}return _inherits(t,e),_createClass(t,[{key:"init",value:function(e){_get(_getPrototypeOf(t.prototype),"init",this).call(this,e),this.connection.addHandler(this.onPresence.bind(this),null,"presence",null,null,null,null),this.connection.addHandler(this.onPresenceUnavailable.bind(this),null,"presence","unavailable",null),this.connection.addHandler(this.onPresenceError.bind(this),null,"presence","error",null),this.connection.addHandler(this.onMessage.bind(this),null,"message",null,null),this.connection.addHandler(this.onMute.bind(this),"http://jitsi.org/jitmeet/audio","iq","set",null,null)}},{key:"createRoom",value:function(e,t,n){var r=i.Strophe.getBareJidFromJid(e);if(this.rooms[r]){var o="You are already in the room!";throw u.error(o),new Error(o)}return this.rooms[r]=new s.a(this.connection,e,t,this.xmpp,n),this.eventEmitter.emit(a.a.EMUC_ROOM_ADDED,this.rooms[r]),this.rooms[r]}},{key:"doLeave",value:function(e){this.eventEmitter.emit(a.a.EMUC_ROOM_REMOVED,this.rooms[e]),delete this.rooms[e]}},{key:"onPresence",value:function(e){var t=e.getAttribute("from");if(e.getAttribute("type"))return!0;var n=this.rooms[i.Strophe.getBareJidFromJid(t)];return!n||($(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="201"]').length&&n.createNonAnonymousRoom(),n.onPresence(e),!0)}},{key:"onPresenceUnavailable",value:function(e){var t=e.getAttribute("from"),n=this.rooms[i.Strophe.getBareJidFromJid(t)];return!n||(n.onPresenceUnavailable(e,t),!0)}},{key:"onPresenceError",value:function(e){var t=e.getAttribute("from"),n=this.rooms[i.Strophe.getBareJidFromJid(t)];return!n||(n.onPresenceError(e,t),!0)}},{key:"onMessage",value:function(e){var t=e.getAttribute("from"),n=this.rooms[i.Strophe.getBareJidFromJid(t)];return!n||(n.onMessage(e,t),!0)}},{key:"onMute",value:function(e){var t=e.getAttribute("from"),n=this.rooms[i.Strophe.getBareJidFromJid(t)];return!n||(n.onMute(e),!0)}}]),t})(c.a)}).call(this,"modules/xmpp/strophe.emuc.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return _});var r=n(4),i=n(2),o=n(60),a=n(8),s=n(0),c=n.n(s),u=n(11),d=n.n(u),l=n(21),h=n(94),p=n(42),f=n(95),m=Object(r.getLogger)(e),v={packet2JSON:function(e,t){for(var n=Array.from(e.children),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};this.presMap.to=this.myroomjid,this.presMap.xns="http://jabber.org/protocol/muc",this.presMap.nodes=[],e.statsId&&this.presMap.nodes.push({tagName:"stats-id",value:e.statsId}),this.addVideoInfoToPresence(!1),e.deploymentInfo&&e.deploymentInfo.userRegion&&this.presMap.nodes.push({tagName:"region",attributes:{id:e.deploymentInfo.userRegion,xmlns:"http://jitsi.org/jitsi-meet"}}),this.presenceUpdateTime=Date.now()}},{key:"join",value:function(e,t){var n=this;return this.password=e,new Promise(function(e){n.options.disableFocus&&m.info("Conference focus disabled for "+n.roomjid),(n.options.disableFocus?Promise.resolve():n.moderator.allocateConferenceFocus()).then(function(){n.sendPresence(!0,t),n._removeConnListeners.push(n.connection.addEventListener(p.a.Events.CONN_STATUS_CHANGED,n.onConnStatusChanged.bind(n))),e()})})}},{key:"sendPresence",value:function(e,t){var n=this.presMap.to;if(this.connection&&this.connection.connected&&n&&(this.joined||e)){var r=Object(i.$pres)({to:n});e&&(r.c("x",{xmlns:this.presMap.xns}),this.password&&r.c("password").t(this.password).up(),t&&Object.keys(t).forEach(function(e){r.c(e).t(t[e]).up()}),r.up()),v.json2packet(this.presMap.nodes,r),this.presenceSyncTime=Date.now(),this.connection.send(r),e&&this.connection.flush()}}},{key:"doLeave",value:function(){m.log("do leave",this.myroomjid);var e=Object(i.$pres)({to:this.myroomjid,type:"unavailable"});this.presMap.length=0,!this.connection.isUsingWebSocket&&this.connection.flush(),this.connection.send(e),this.connection.flush()}},{key:"discoRoomInfo",value:function(){var e=this,t=Object(i.$iq)({type:"get",to:this.roomjid}).c("query",{xmlns:i.Strophe.NS.DISCO_INFO});this.connection.sendIQ(t,function(t){var n=1===$(t).find('>query>feature[var="muc_passwordprotected"]').length;n!==e.locked&&(e.eventEmitter.emit(c.a.MUC_LOCK_CHANGED,n),e.locked=n);var r=$(t).find('>query>x[type="result"]>field[var="muc#roominfo_meetingId"]>value');r.length?e.setMeetingId(r.text()):m.warn("No meeting ID from backend");var i=1===$(t).find('>query>feature[var="muc_membersonly"]').length,o=$(t).find('>query>x[type="result"]>field[var="muc#roominfo_lobbyroom"]>value');e.lobby&&e.lobby.setLobbyRoomJid(o&&o.length?o.text():void 0),i!==e.membersOnlyEnabled&&(e.membersOnlyEnabled=i,e.eventEmitter.emit(c.a.MUC_MEMBERS_ONLY_CHANGED,i))},function(e){d.a.callErrorHandler(e),m.error("Error getting room info: ",e)})}},{key:"setMeetingId",value:function(e){this.meetingId!==e&&(this.meetingId&&m.warn("Meeting Id changed from:"+this.meetingId+" to:"+e),this.meetingId=e,this.eventEmitter.emit(c.a.MEETING_ID_SET,e))}},{key:"createNonAnonymousRoom",value:function(){var e=this;if(!this.options.disableDiscoInfo){var t=Object(i.$iq)({type:"get",to:this.roomjid}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"}).c("x",{xmlns:"jabber:x:data",type:"submit"});this.connection.sendIQ(t,function(t){if(!$(t).find('>query>x[xmlns="jabber:x:data"]>field[var="muc#roomconfig_whois"]').length){var n="non-anonymous rooms not supported";return d.a.callErrorHandler(new Error(n)),void m.error(n)}var r=Object(i.$iq)({to:e.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"});r.c("x",{xmlns:"jabber:x:data",type:"submit"}),r.c("field",{var:"FORM_TYPE"}).c("value").t("http://jabber.org/protocol/muc#roomconfig").up().up(),r.c("field",{var:"muc#roomconfig_whois"}).c("value").t("anyone").up().up(),e.connection.sendIQ(r)},function(e){d.a.callErrorHandler(e),m.error("Error getting room configuration form: ",e)})}}},{key:"onConnStatusChanged",value:function(e){e===p.a.Status.CONNECTED&&this.sendPresence()}},{key:"onPresence",value:function(e){var t=e.getAttribute("from"),n={},r=e.getElementsByTagName("status")[0];r&&(n.status=r.textContent||"");var o=!1,a=!1,s=e.getElementsByTagNameNS("http://jabber.org/protocol/muc#user","x")[0],u=s&&s.getElementsByTagName("item")[0];n.affiliation=u&&u.getAttribute("affiliation"),n.role=u&&u.getAttribute("role");var d=u&&u.getAttribute("jid");n.jid=d,n.isFocus=d&&0===d.indexOf(this.moderator.getFocusUserJid()+"/"),n.isHiddenDomain=d&&d.indexOf("@")>0&&this.options.hiddenDomain===d.substring(d.indexOf("@")+1,d.indexOf("/")),this.eventEmitter.emit(c.a.PRESENCE_RECEIVED,{fromHiddenDomain:n.isHiddenDomain,presence:e});var l=e.querySelector("x");l&&l.remove();var h=[];v.packet2JSON(e,h),this.lastPresences[t]=h;for(var p=function(e){var t={},n=e.children.find(function(e){return"user"===e.tagName});if(n){t.user={};for(var r=function(e){var r=n.children.find(function(t){return t.tagName===e});r&&(t.user[e]=r.value)},i=["id","name","avatar"],o=0;o=this.presenceSyncTime&&this.sendPresence(),this.eventEmitter.emit(c.a.MUC_JOINED),!this.options.disableDiscoInfo&&this.discoRoomInfo()}}else if(void 0===d)m.info("Ignoring member with undefined JID");else if(void 0===this.members[t])this.members[t]=n,m.log("entered",t,n),o=void 0!==n.status,a=void 0!==n.version,n.isFocus?this._initFocus(t,d):(this.eventEmitter.emit(c.a.MUC_MEMBER_JOINED,t,n.nick,n.role,n.isHiddenDomain,n.statsID,n.status,n.identity,n.botType,n.jid),o=!1);else{var C=this.members[t];C.role!==n.role&&(C.role=n.role,this.eventEmitter.emit(c.a.MUC_ROLE_CHANGED,t,n.role)),C.affiliation!==n.affiliation&&(C.affiliation=n.affiliation),C.botType!==n.botType&&(C.botType=n.botType,this.eventEmitter.emit(c.a.MUC_MEMBER_BOT_TYPE_CHANGED,t,n.botType)),n.isFocus&&(C.isFocus=!0,this._initFocus(t,d)),n.displayName&&(C.displayName=n.displayName),C.status!==n.status&&(o=!0,C.status=n.status),C.version!==n.version&&(a=!0,C.version=n.version)}for(var T=0;Tignore[xmlns="http://jitsi.org/jitmeet/"]').length)return!0;var r=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>destroy');if(r.length){var o,a=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>destroy>reason');return a.length&&(o=a.text()),this.eventEmitter.emit(c.a.MUC_DESTROYED,o,r.attr("jid")),this.connection.emuc.doLeave(this.roomjid),!0}var s=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="110"]').length,u=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="307"]').length,d=Object.keys(this.members);if(u){var l,h=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>item>actor');h.length&&(l=h.attr("nick")),this.eventEmitter.emit(c.a.KICKED,s,l,i.Strophe.getResourceFromJid(t))}s?(d.forEach(function(e){var t=n.members[e];delete n.members[e],n.onParticipantLeft(e,t.isFocus)}),this.connection.emuc.doLeave(this.roomjid),u||this.eventEmitter.emit(c.a.MUC_LEFT)):(delete this.members[t],this.onParticipantLeft(t,!1))}},{key:"onMessage",value:function(e,t){var n=$(e).find('>nick[xmlns="http://jabber.org/protocol/nick"]').text()||i.Strophe.getResourceFromJid(t),r=e.getAttribute("type");if("error"===r){var o=$(e).find(">error>text").text();return this.eventEmitter.emit(c.a.CHAT_ERROR_RECEIVED,o),!0}var a=$(e).find(">body").text(),s=$(e).find(">subject");if(s.length){var u=s.text();(u||""===u)&&(this.eventEmitter.emit(c.a.SUBJECT_CHANGED,u),m.log("Subject is changed to "+u))}var d,l=$(e).find(">delay").attr("stamp");if(!l&&(l=$(e).find('>[xmlns="jabber:x:delay"]').attr("stamp"))){var h=l.match(/(\d{4})(\d{2})(\d{2}T\d{2}:\d{2}:\d{2})/);l=h[1]+"-"+h[2]+"-"+h[3]+"Z"}if(t===this.roomjid)if($(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="104"]').length)this.discoRoomInfo();else if((d=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>invite'))&&d.length){var p,f=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>password');f&&f.length&&(p=f.text()),this.eventEmitter.emit(c.a.INVITE_MESSAGE_RECEIVED,t,d.attr("from"),a,p)}var v=$(e).find(">json-message").text(),g=this.xmpp.tryParseJSONAndVerify(v);g&&void 0===l?this.eventEmitter.emit(c.a.JSON_MESSAGE_RECEIVED,t,g):a&&("chat"===r?this.eventEmitter.emit(c.a.PRIVATE_MESSAGE_RECEIVED,t,n,a,this.myroomjid,l):"groupchat"===r&&this.eventEmitter.emit(c.a.MESSAGE_RECEIVED,t,n,a,this.myroomjid,l))}},{key:"onPresenceError",value:function(e,t){if($(e).find('>error[type="auth"]>not-authorized[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length)m.log("on password required",t),this.eventEmitter.emit(c.a.PASSWORD_REQUIRED);else if($(e).find('>error[type="cancel"]>not-allowed[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length)i.Strophe.getDomainFromJid(e.getAttribute("to"))===this.xmpp.options.hosts.anonymousdomain?this.eventEmitter.emit(c.a.ROOM_JOIN_ERROR):(m.warn("onPresError ",e),this.eventEmitter.emit(c.a.ROOM_CONNECT_NOT_ALLOWED_ERROR));else if($(e).find(">error>service-unavailable").length)m.warn("Maximum users limit for the room has been reached",e),this.eventEmitter.emit(c.a.ROOM_MAX_USERS_ERROR);else if($(e).find('>error[type="auth"]>registration-required[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length){var n,r=$(e).find(">lobbyroom");r.length&&(n=r.text()),this.eventEmitter.emit(c.a.ROOM_CONNECT_MEMBERS_ONLY_ERROR,n)}else m.warn("onPresError ",e),this.eventEmitter.emit(c.a.ROOM_CONNECT_ERROR)}},{key:"setAffiliation",value:function(e,t){var n=Object(i.$iq)({to:this.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#admin"}).c("item",{affiliation:t,nick:i.Strophe.getResourceFromJid(e)}).c("reason").t("Your affiliation has been changed to '"+t+"'.").up().up().up();this.connection.sendIQ(n,function(n){return m.log("Set affiliation of participant with jid: ",e,"to",t,n)},function(e){return m.log("Set affiliation of participant error: ",e)})}},{key:"kick",value:function(e){var t=Object(i.$iq)({to:this.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#admin"}).c("item",{nick:i.Strophe.getResourceFromJid(e),role:"none"}).c("reason").t("You have been kicked.").up().up().up();this.connection.sendIQ(t,function(t){return m.log("Kick participant with jid: ",e,t)},function(e){return m.log("Kick participant error: ",e)})}},{key:"lockRoom",value:function(e,t,n,r){var o=this;this.connection.sendIQ(Object(i.$iq)({to:this.roomjid,type:"get"}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"}),function(a){if($(a).find('>query>x[xmlns="jabber:x:data"]>field[var="muc#roomconfig_roomsecret"]').length){var s=Object(i.$iq)({to:o.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"});s.c("x",{xmlns:"jabber:x:data",type:"submit"}),s.c("field",{var:"FORM_TYPE"}).c("value").t("http://jabber.org/protocol/muc#roomconfig").up().up(),s.c("field",{var:"muc#roomconfig_roomsecret"}).c("value").t(e).up().up(),s.c("field",{var:"muc#roomconfig_passwordprotectedroom"}).c("value").t(null===e||0===e.length?"0":"1").up().up(),o.membersOnlyEnabled&&s.c("field",{var:"muc#roomconfig_membersonly"}).c("value").t("true").up().up(),s.c("field",{var:"muc#roomconfig_whois"}).c("value").t("anyone").up().up(),o.connection.sendIQ(s,t,n)}else r()},n)}},{key:"setMembersOnly",value:function(e,t,n){var r=this;e&&Object.values(this.members).filter(function(e){return!e.isFocus}).length&&Object.values(this.members).forEach(function(e){e.jid&&!y.includes(e.affiliation)&&r.xmpp.connection.sendIQ(Object(i.$iq)({to:r.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#admin"}).c("item",{affiliation:"member",jid:e.jid}).up().up())});var o=n||function(){};this.xmpp.connection.sendIQ(Object(i.$iq)({to:this.roomjid,type:"get"}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"}),function(n){if($(n).find('>query>x[xmlns="jabber:x:data"]>field[var="muc#roomconfig_membersonly"]').length){var a=Object(i.$iq)({to:r.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"});a.c("x",{xmlns:"jabber:x:data",type:"submit"}),a.c("field",{var:"FORM_TYPE"}).c("value").t("http://jabber.org/protocol/muc#roomconfig").up().up(),a.c("field",{var:"muc#roomconfig_membersonly"}).c("value").t(e?"true":"false").up().up(),r.locked&&a.c("field",{var:"muc#roomconfig_passwordprotectedroom"}).c("value").t("1").up().up(),r.xmpp.connection.sendIQ(a,t,o)}else o(new Error("Setting members only room not supported!"))},o)}},{key:"addToPresence",value:function(e,t){t.tagName=e,this.removeFromPresence(e),this.presMap.nodes.push(t),this.presenceUpdateTime=Date.now()}},{key:"getFromPresence",value:function(e){return this.presMap.nodes.find(function(t){return e===t.tagName})}},{key:"removeFromPresence",value:function(e){var t=this.presMap.nodes.filter(function(t){return e!==t.tagName});this.presMap.nodes=t,this.presenceUpdateTime=Date.now()}},{key:"addPresenceListener",value:function(e,t){if("function"!=typeof t)throw new Error('"handler" is not a function');var n=this.presHandlers[e];n||(this.presHandlers[e]=n=[]),-1===n.indexOf(t)?n.push(t):m.warn("Trying to add the same handler more than once for: "+e)}},{key:"removePresenceListener",value:function(e,t){var n=this.presHandlers[e],r=n?n.indexOf(t):-1;-1!==r?n.splice(r,1):m.warn("Handler for: "+e+" was not registered")}},{key:"isFocus",value:function(e){var t=this.members[e];return t?t.isFocus:null}},{key:"isModerator",value:function(){return"moderator"===this.role}},{key:"getMemberRole",value:function(e){return this.members[e]?this.members[e].role:null}},{key:"setVideoMute",value:function(e,t){this.sendVideoInfoPresence(e),t&&t(e)}},{key:"setAudioMute",value:function(e,t){return this.sendAudioInfoPresence(e,t)}},{key:"addAudioInfoToPresence",value:function(e){this.addToPresence("audiomuted",{attributes:{xmlns:"http://jitsi.org/jitmeet/audio"},value:e.toString()})}},{key:"sendAudioInfoPresence",value:function(e,t){this.addAudioInfoToPresence(e),this.sendPresence(),t&&t()}},{key:"addVideoInfoToPresence",value:function(e){this.addToPresence("videomuted",{attributes:{xmlns:"http://jitsi.org/jitmeet/video"},value:e.toString()})}},{key:"sendVideoInfoPresence",value:function(e){this.addVideoInfoToPresence(e),this.sendPresence()}},{key:"getMediaPresenceInfo",value:function(e,t){var n=this.lastPresences[this.roomjid+"/"+e];if(!n)return null;var r={muted:!1,videoType:void 0},i=null;if(t===a.a)i=g(n,"audiomuted");else{if(t!==a.c)return m.error("Unsupported media type: "+t),null;i=g(n,"videomuted");var o=g(n,"videoType");o.length>0&&(r.videoType=o[0].value)}return r.muted=i.length>0&&"true"===i[0].value,r}},{key:"isSIPCallingSupported",value:function(){return!!this.moderator&&this.moderator.isSipGatewayEnabled()}},{key:"dial",value:function(e){return this.connection.rayo.dial(e,"fromnumber",i.Strophe.getBareJidFromJid(this.myroomjid),this.password,this.focusMucJid)}},{key:"hangup",value:function(){return this.connection.rayo.hangup()}},{key:"getLobby",value:function(){return this.lobby}},{key:"getPhoneNumber",value:function(){return this.phoneNumber}},{key:"getPhonePin",value:function(){return this.phonePin}},{key:"getMeetingId",value:function(){return this.meetingId}},{key:"muteParticipant",value:function(e,t){m.info("set mute",t);var n=Object(i.$iq)({to:this.focusMucJid,type:"set"}).c("mute",{xmlns:"http://jitsi.org/jitmeet/audio",jid:e}).t(t.toString()).up();this.connection.sendIQ(n,function(e){return m.log("set mute",e)},function(e){return m.log("set mute error",e)})}},{key:"onMute",value:function(e){if(e.getAttribute("from")===this.focusMucJid){var t=$(e).find("mute");t.length&&"true"===t.text()?this.eventEmitter.emit(c.a.AUDIO_MUTED_BY_FOCUS,t.attr("actor")):m.warn("Ignoring a mute request which does not explicitly specify a positive mute command.")}else m.warn("Ignored mute from non focus peer")}},{key:"clean",value:function(){this._removeConnListeners.forEach(function(e){return e()}),this._removeConnListeners=[],this.joined=!1}},{key:"leave",value:function(){var e=this;return new Promise(function(t,n){var r=setTimeout(function(){return o(!0)},5e3),i=e.eventEmitter;function o(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];i.removeListener(c.a.MUC_LEFT,o),clearTimeout(r),e?n(new Error("The timeout for the confirmation about leaving the room expired.")):t()}e.clean(),i.on(c.a.MUC_LEFT,o),e.doLeave()})}}]),t})(l.a)}).call(this,"modules/xmpp/ChatRoom.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return c});var r=n(4),i=n(2),o=n(0),a=n.n(o),s=Object(r.getLogger)(e),c=(function(){function e(t){var n=this;_classCallCheck(this,e),this.xmpp=t.xmpp,this.mainRoom=t;var r=this._maybeJoinLobbyRoom.bind(this);this.mainRoom.addEventListener(a.a.LOCAL_ROLE_CHANGED,r),this.mainRoom.addEventListener(a.a.MUC_MEMBERS_ONLY_CHANGED,r),this.mainRoom.addEventListener(a.a.ROOM_CONNECT_MEMBERS_ONLY_ERROR,function(e){n.lobbyRoomJid=e})}return _createClass(e,[{key:"isSupported",value:function(){return this.xmpp.lobbySupported}},{key:"enable",value:function(){var e=this;return this.isSupported()?new Promise(function(t,n){e.mainRoom.setMembersOnly(!0,t,n)}):Promise.reject(new Error("Lobby not supported!"))}},{key:"disable",value:function(){this.isSupported()&&this.mainRoom.isModerator()&&this.lobbyRoom&&this.mainRoom.membersOnlyEnabled&&this.mainRoom.setMembersOnly(!1)}},{key:"_leaveLobbyRoom",value:function(){var e=this;this.lobbyRoom&&this.lobbyRoom.leave().then(function(){e.lobbyRoom=void 0,s.info("Lobby room left!")}).catch(function(){})}},{key:"setLobbyRoomJid",value:function(e){this.lobbyRoomJid=e}},{key:"_maybeJoinLobbyRoom",value:function(){this.isSupported()&&this.mainRoom.joined&&this.mainRoom.isModerator()&&this.mainRoom.membersOnlyEnabled&&!this.lobbyRoom&&this.join().then(function(){return s.info("Joined lobby room")}).catch(function(e){return s.error("Failed joining lobby",e)})}},{key:"join",value:function(e,t){var n=this,r=this.mainRoom.joined&&this.mainRoom.isModerator();if(!this.lobbyRoomJid)return Promise.reject(new Error("Missing lobbyRoomJid, cannot join lobby room."));var o=i.Strophe.getNodeFromJid(this.lobbyRoomJid),c=i.Strophe.getDomainFromJid(this.lobbyRoomJid);return this.lobbyRoom=this.xmpp.createRoom(o,{customDomain:c,disableDiscoInfo:!0,disableFocus:!0,enableLobby:!1}),e&&(this.lobbyRoom.removeFromPresence("nick"),this.lobbyRoom.addToPresence("nick",{attributes:{xmlns:"http://jabber.org/protocol/nick"},value:e})),r?(this.lobbyRoom.addPresenceListener("email",function(e,t){n.mainRoom.eventEmitter.emit(a.a.MUC_LOBBY_MEMBER_UPDATED,t,{email:e.value})}),this.lobbyRoom.addEventListener(a.a.MUC_MEMBER_JOINED,function(e,t,r,o,s,c,u,d,l){Object.values(n.mainRoom.members).find(function(e){return e.jid===l})||n.mainRoom.eventEmitter.emit(a.a.MUC_LOBBY_MEMBER_JOINED,i.Strophe.getResourceFromJid(e),t,u?u.avatar:void 0)}),this.lobbyRoom.addEventListener(a.a.MUC_MEMBER_LEFT,function(e){n.mainRoom.eventEmitter.emit(a.a.MUC_LOBBY_MEMBER_LEFT,i.Strophe.getResourceFromJid(e))}),this.lobbyRoom.addEventListener(a.a.MUC_DESTROYED,function(){Object.keys(n.lobbyRoom.members).forEach(function(e){return n.mainRoom.eventEmitter.emit(a.a.MUC_LOBBY_MEMBER_LEFT,i.Strophe.getResourceFromJid(e))}),n.lobbyRoom.clean(),n.lobbyRoom=void 0,s.info("Lobby room left(destroyed)!")})):(this.lobbyRoom.addEventListener(a.a.KICKED,function(e){if(e)return n.mainRoom.eventEmitter.emit(a.a.MUC_DENIED_ACCESS),void n.lobbyRoom.clean()}),this.mainRoom.addEventListener(a.a.INVITE_MESSAGE_RECEIVED,function(e,t,r,i){s.debug("Received approval to join "+e+" "+t+" "+r),e===n.mainRoom.roomjid&&(n.mainRoom.join(i),n._leaveLobbyRoom())}),this.lobbyRoom.addEventListener(a.a.MUC_DESTROYED,function(e,t){t&&t===n.mainRoom.roomjid?n.mainRoom.join():(n.lobbyRoom.clean(),n.mainRoom.eventEmitter.emit(a.a.MUC_DESTROYED,e))}),this.mainRoom.addEventListener(a.a.MUC_JOINED,function(){n._leaveLobbyRoom()})),new Promise(function(e,i){n.lobbyRoom.addEventListener(a.a.MUC_JOINED,function(){e(),t&&!r&&(n.lobbyRoom.removeFromPresence("email"),n.lobbyRoom.addToPresence("email",{value:t}),n.lobbyRoom.sendPresence())}),n.lobbyRoom.addEventListener(a.a.ROOM_JOIN_ERROR,i),n.lobbyRoom.addEventListener(a.a.ROOM_CONNECT_NOT_ALLOWED_ERROR,i),n.lobbyRoom.addEventListener(a.a.ROOM_CONNECT_ERROR,i),n.lobbyRoom.join()})}},{key:"denyAccess",value:function(e){if(this.isSupported()&&this.mainRoom.isModerator()){var t=Object.keys(this.lobbyRoom.members).find(function(t){return i.Strophe.getResourceFromJid(t)===e});t?this.lobbyRoom.kick(t):s.error("Not found member for "+e+" in lobby room.")}}},{key:"approveAccess",value:function(e){if(this.isSupported()&&this.mainRoom.isModerator()){var t=Object.keys(this.lobbyRoom.members).find(function(t){return i.Strophe.getResourceFromJid(t)===e});if(t){var n=this.lobbyRoom.members[t].jid,r=Object(i.$msg)({to:this.mainRoom.roomjid}).c("x",{xmlns:"http://jabber.org/protocol/muc#user"}).c("invite",{to:n});this.xmpp.connection.sendIQ(r,function(){},function(e){s.error("Error sending invite for "+n,e)})}else s.error("Not found member for "+t+" in lobby room.")}}}]),e})()}).call(this,"modules/xmpp/Lobby.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return l});var r=n(4),i=n(2),o=n(30),a=n(67),s=n(0),c=n(11),u=Object(r.getLogger)(e);function d(e){var t=1;return function(n){if(!n){var r=Math.pow(2,t-1);return t+=1,r*e}t=1}}function l(e,t,n,r){function i(e){if(e.data&&e.data.sessionId){if(e.origin!==window.location.origin)return void u.warn("Ignoring sessionId from different origin: "+e.origin);o.a.sessionId=e.data.sessionId}}this.roomName=e,this.xmppService=t,this.getNextTimeout=d(1e3),this.getNextErrorTimeout=d(1e3),this.externalAuthEnabled=!1,this.options=r,this.sipGatewayEnabled=this.options.connection.hosts&&void 0!==this.options.connection.hosts.call_control,this.eventEmitter=n,this.connection=this.xmppService.connection,window.addEventListener?window.addEventListener("message",i,!1):window.attachEvent("onmessage",i)}l.prototype.isExternalAuthEnabled=function(){return this.externalAuthEnabled},l.prototype.isSipGatewayEnabled=function(){return this.sipGatewayEnabled},l.prototype.onMucMemberLeft=function(e){u.info("Someone left is it focus ? "+e),"focus"===i.Strophe.getResourceFromJid(e)&&(u.info("Focus has left the room - leaving conference"),this.eventEmitter.emit(s.FOCUS_LEFT))},l.prototype.setFocusUserJid=function(e){this.focusUserJid||(this.focusUserJid=e,u.info("Focus jid set to: "+this.focusUserJid))},l.prototype.getFocusUserJid=function(){return this.focusUserJid},l.prototype.getFocusComponent=function(){var e=this.options.connection.hosts.focus;return e||(e="focus."+this.options.connection.hosts.domain),e},l.prototype.createConferenceIq=function(){var e,t=Object(i.$iq)({to:this.getFocusComponent(),type:"set"}),n=o.a.sessionId,r=o.a.machineId,a=this.options.conference;switch(u.info("Session ID: "+n+" machine UID: "+r),t.c("conference",{xmlns:"http://jitsi.org/protocol/focus",room:this.roomName,"machine-uid":r}),n&&t.attrs({"session-id":n}),void 0!==this.options.connection.enforcedBridge&&t.c("property",{name:"enforcedBridge",value:this.options.connection.enforcedBridge}).up(),void 0!==this.options.connection.hosts&&void 0!==this.options.connection.hosts.call_control&&t.c("property",{name:"call_control",value:this.options.connection.hosts.call_control}).up(),void 0!==a.channelLastN&&t.c("property",{name:"channelLastN",value:a.channelLastN}).up(),t.c("property",{name:"disableRtx",value:Boolean(a.disableRtx)}).up(),void 0!==a.enableTcc&&t.c("property",{name:"enableTcc",value:Boolean(a.enableTcc)}).up(),void 0!==a.enableRemb&&t.c("property",{name:"enableRemb",value:Boolean(a.enableRemb)}).up(),!0===a.enableOpusRed&&t.c("property",{name:"enableOpusRed",value:!0}).up(),void 0!==a.minParticipants&&t.c("property",{name:"minParticipants",value:a.minParticipants}).up(),t.c("property",{name:"enableLipSync",value:!0===this.options.connection.enableLipSync}).up(),void 0!==a.audioPacketDelay&&t.c("property",{name:"audioPacketDelay",value:a.audioPacketDelay}).up(),a.startBitrate&&t.c("property",{name:"startBitrate",value:a.startBitrate}).up(),a.minBitrate&&t.c("property",{name:"minBitrate",value:a.minBitrate}).up(),a.testing&&a.testing.octo&&"number"==typeof a.testing.octo.probability&&Math.random()conference>property[name='authentication'][value='true']").length>0;u.info("Authentication enabled: "+t),this.externalAuthEnabled=$(e).find(">conference>property[name='externalAuth'][value='true']").length>0,u.info("External authentication enabled: "+this.externalAuthEnabled),this.externalAuthEnabled||this.parseSessionId(e);var n=$(e).find(">conference").attr("identity");this.eventEmitter.emit(a.IDENTITY_UPDATED,t,n),$(e).find(">conference>property[name='sipGatewayEnabled'][value='true']").length&&(this.sipGatewayEnabled=!0),u.info("Sip gateway enabled: "+this.sipGatewayEnabled)},l.prototype.allocateConferenceFocus=function(){var e=this;return new Promise(function(t){e.setFocusUserJid(e.options.connection.focusUserJid),e.connection.sendIQ(e.createConferenceIq(),function(n){return e._allocateConferenceFocusSuccess(n,t)},function(n){return e._allocateConferenceFocusError(n,t)}),e.connection.flush()})},l.prototype._allocateConferenceFocusError=function(e,t){var n=this,r=$(e).find(">error>session-invalid").length||$(e).find(">error>not-acceptable").length;if(r&&(u.info("Session expired! - removing"),o.a.sessionId=void 0),$(e).find(">error>graceful-shutdown").length)this.eventEmitter.emit(s.GRACEFUL_SHUTDOWN);else{var a=$(e).find(">error>reservation-error");if(a.length){var d,l=a.attr("error-code"),h=$(e).find(">error>text");return h&&(d=h.text()),void this.eventEmitter.emit(s.RESERVATION_ERROR,l,d)}if($(e).find(">error>not-authorized").length)return u.warn("Unauthorized to start the conference",e),i.Strophe.getDomainFromJid(e.getAttribute("to"))!==this.options.connection.hosts.anonymousdomain&&(this.externalAuthEnabled=!0),void this.eventEmitter.emit(s.AUTHENTICATION_REQUIRED);var p=this.getNextErrorTimeout(),f="Focus error, retry after "+p;c.callErrorHandler(new Error(f)),u.error(f,e);var m=this.getFocusComponent(),v=p/1e3;r||this.eventEmitter.emit(s.FOCUS_DISCONNECTED,m,v),this.getNextTimeout(!0),window.setTimeout(function(){return n.allocateConferenceFocus().then(t)},p)}},l.prototype._allocateConferenceFocusSuccess=function(e,t){var n=this;if(this.parseConfigOptions(e),this.getNextErrorTimeout(!0),"true"===$(e).find("conference").attr("ready"))this.getNextTimeout(!0),t();else{var r=this.getNextTimeout();u.info("Waiting for the focus... "+r),window.setTimeout(function(){return n.allocateConferenceFocus().then(t)},r)}},l.prototype.authenticate=function(){var e=this;return new Promise(function(t,n){e.connection.sendIQ(e.createConferenceIq(),function(n){e.parseSessionId(n),t()},function(e){return n({error:$(e).find("iq>error :first").prop("tagName"),message:$(e).find("iq>error>text").text()})})})},l.prototype.getLoginUrl=function(e,t){this._getLoginUrl(!1,e,t)},l.prototype._getLoginUrl=function(e,t,n){var r=Object(i.$iq)({to:this.getFocusComponent(),type:"get"}),a={xmlns:"http://jitsi.org/protocol/focus",room:this.roomName,"machine-uid":o.a.machineId},s="auth url";function d(e,t){c.callErrorHandler(new Error(e)),u.error(e,t),n(t)}e&&(a.popup=!0,s="POPUP "+s),r.c("login-url",a),this.connection.sendIQ(r,function(e){var n=$(e).find("login-url").attr("url");(n=decodeURIComponent(n))?(u.info("Got "+s+": "+n),t(n)):d("Failed to get "+s+" from the focus",e)},d.bind(void 0,"Get "+s+" error"))},l.prototype.getPopupLoginUrl=function(e,t){this._getLoginUrl(!0,e,t)},l.prototype.logout=function(e){var t=Object(i.$iq)({to:this.getFocusComponent(),type:"set"}),n=o.a.sessionId;n?(t.c("logout",{xmlns:"http://jitsi.org/protocol/focus","session-id":n}),this.connection.sendIQ(t,function(t){var n=$(t).find("logout").attr("logout-url");n&&(n=decodeURIComponent(n)),u.info("Log out OK, url: "+n,t),o.a.sessionId=void 0,e(n)},function(e){c.callErrorHandler(new Error("Logout error")),u.error("Logout error",e)})):e()}}).call(this,"modules/xmpp/moderator.js")},function(e,t,n){var r=n(35),i=["Aaliyah","Aaron","Abagail","Abbey","Abbie","Abbigail","Abby","Abdiel","Abdul","Abdullah","Abe","Abel","Abelardo","Abigail","Abigale","Abigayle","Abner","Abraham","Ada","Adah","Adalberto","Adaline","Adam","Adan","Addie","Addison","Adela","Adelbert","Adele","Adelia","Adeline","Adell","Adella","Adelle","Aditya","Adolf","Adolfo","Adolph","Adolphus","Adonis","Adrain","Adrian","Adriana","Adrianna","Adriel","Adrien","Adrienne","Afton","Aglae","Agnes","Agustin","Agustina","Ahmad","Ahmed","Aida","Aidan","Aiden","Aileen","Aisha","Aiyana","Akeem","Al","Alaina","Alan","Alana","Alanis","Alanna","Alayna","Alba","Albert","Alberta","Albertha","Alberto","Albin","Albina","Alda","Alden","Alec","Aleen","Alejandra","Alejandrin","Alek","Alena","Alene","Alessandra","Alessandro","Alessia","Aletha","Alex","Alexa","Alexander","Alexandra","Alexandre","Alexandrea","Alexandria","Alexandrine","Alexandro","Alexane","Alexanne","Alexie","Alexis","Alexys","Alexzander","Alf","Alfonso","Alfonzo","Alford","Alfred","Alfreda","Alfredo","Ali","Alia","Alice","Alicia","Alisa","Alisha","Alison","Alivia","Aliya","Aliyah","Aliza","Alize","Allan","Allen","Allene","Allie","Allison","Ally","Alphonso","Alta","Althea","Alva","Alvah","Alvena","Alvera","Alverta","Alvina","Alvis","Alyce","Alycia","Alysa","Alysha","Alyson","Alysson","Amalia","Amanda","Amani","Amara","Amari","Amaya","Amber","Ambrose","Amelia","Amelie","Amely","America","Americo","Amie","Amina","Amir","Amira","Amiya","Amos","Amparo","Amy","Amya","Ana","Anabel","Anabelle","Anahi","Anais","Anastacio","Anastasia","Anderson","Andre","Andreane","Andreanne","Andres","Andrew","Andy","Angel","Angela","Angelica","Angelina","Angeline","Angelita","Angelo","Angie","Angus","Anibal","Anika","Anissa","Anita","Aniya","Aniyah","Anjali","Anna","Annabel","Annabell","Annabelle","Annalise","Annamae","Annamarie","Anne","Annetta","Annette","Annie","Ansel","Ansley","Anthony","Antoinette","Antone","Antonetta","Antonette","Antonia","Antonietta","Antonina","Antonio","Antwan","Antwon","Anya","April","Ara","Araceli","Aracely","Arch","Archibald","Ardella","Arden","Ardith","Arely","Ari","Ariane","Arianna","Aric","Ariel","Arielle","Arjun","Arlene","Arlie","Arlo","Armand","Armando","Armani","Arnaldo","Arne","Arno","Arnold","Arnoldo","Arnulfo","Aron","Art","Arthur","Arturo","Arvel","Arvid","Arvilla","Aryanna","Asa","Asha","Ashlee","Ashleigh","Ashley","Ashly","Ashlynn","Ashton","Ashtyn","Asia","Assunta","Astrid","Athena","Aubree","Aubrey","Audie","Audra","Audreanne","Audrey","August","Augusta","Augustine","Augustus","Aurelia","Aurelie","Aurelio","Aurore","Austen","Austin","Austyn","Autumn","Ava","Avery","Avis","Axel","Ayana","Ayden","Ayla","Aylin","Baby","Bailee","Bailey","Barbara","Barney","Baron","Barrett","Barry","Bart","Bartholome","Barton","Baylee","Beatrice","Beau","Beaulah","Bell","Bella","Belle","Ben","Benedict","Benjamin","Bennett","Bennie","Benny","Benton","Berenice","Bernadette","Bernadine","Bernard","Bernardo","Berneice","Bernhard","Bernice","Bernie","Berniece","Bernita","Berry","Bert","Berta","Bertha","Bertram","Bertrand","Beryl","Bessie","Beth","Bethany","Bethel","Betsy","Bette","Bettie","Betty","Bettye","Beulah","Beverly","Bianka","Bill","Billie","Billy","Birdie","Blair","Blaise","Blake","Blanca","Blanche","Blaze","Bo","Bobbie","Bobby","Bonita","Bonnie","Boris","Boyd","Brad","Braden","Bradford","Bradley","Bradly","Brady","Braeden","Brain","Brandi","Brando","Brandon","Brandt","Brandy","Brandyn","Brannon","Branson","Brant","Braulio","Braxton","Brayan","Breana","Breanna","Breanne","Brenda","Brendan","Brenden","Brendon","Brenna","Brennan","Brennon","Brent","Bret","Brett","Bria","Brian","Briana","Brianne","Brice","Bridget","Bridgette","Bridie","Brielle","Brigitte","Brionna","Brisa","Britney","Brittany","Brock","Broderick","Brody","Brook","Brooke","Brooklyn","Brooks","Brown","Bruce","Bryana","Bryce","Brycen","Bryon","Buck","Bud","Buddy","Buford","Bulah","Burdette","Burley","Burnice","Buster","Cade","Caden","Caesar","Caitlyn","Cale","Caleb","Caleigh","Cali","Calista","Callie","Camden","Cameron","Camila","Camilla","Camille","Camren","Camron","Camryn","Camylle","Candace","Candelario","Candice","Candida","Candido","Cara","Carey","Carissa","Carlee","Carleton","Carley","Carli","Carlie","Carlo","Carlos","Carlotta","Carmel","Carmela","Carmella","Carmelo","Carmen","Carmine","Carol","Carolanne","Carole","Carolina","Caroline","Carolyn","Carolyne","Carrie","Carroll","Carson","Carter","Cary","Casandra","Casey","Casimer","Casimir","Casper","Cassandra","Cassandre","Cassidy","Cassie","Catalina","Caterina","Catharine","Catherine","Cathrine","Cathryn","Cathy","Cayla","Ceasar","Cecelia","Cecil","Cecile","Cecilia","Cedrick","Celestine","Celestino","Celia","Celine","Cesar","Chad","Chadd","Chadrick","Chaim","Chance","Chandler","Chanel","Chanelle","Charity","Charlene","Charles","Charley","Charlie","Charlotte","Chase","Chasity","Chauncey","Chaya","Chaz","Chelsea","Chelsey","Chelsie","Chesley","Chester","Chet","Cheyanne","Cheyenne","Chloe","Chris","Christ","Christa","Christelle","Christian","Christiana","Christina","Christine","Christop","Christophe","Christopher","Christy","Chyna","Ciara","Cicero","Cielo","Cierra","Cindy","Citlalli","Clair","Claire","Clara","Clarabelle","Clare","Clarissa","Clark","Claud","Claude","Claudia","Claudie","Claudine","Clay","Clemens","Clement","Clementina","Clementine","Clemmie","Cleo","Cleora","Cleta","Cletus","Cleve","Cleveland","Clifford","Clifton","Clint","Clinton","Clotilde","Clovis","Cloyd","Clyde","Coby","Cody","Colby","Cole","Coleman","Colin","Colleen","Collin","Colt","Colten","Colton","Columbus","Concepcion","Conner","Connie","Connor","Conor","Conrad","Constance","Constantin","Consuelo","Cooper","Cora","Coralie","Corbin","Cordelia","Cordell","Cordia","Cordie","Corene","Corine","Cornelius","Cornell","Corrine","Cortez","Cortney","Cory","Coty","Courtney","Coy","Craig","Crawford","Creola","Cristal","Cristian","Cristina","Cristobal","Cristopher","Cruz","Crystal","Crystel","Cullen","Curt","Curtis","Cydney","Cynthia","Cyril","Cyrus","Dagmar","Dahlia","Daija","Daisha","Daisy","Dakota","Dale","Dallas","Dallin","Dalton","Damaris","Dameon","Damian","Damien","Damion","Damon","Dan","Dana","Dandre","Dane","D'angelo","Dangelo","Danial","Daniela","Daniella","Danielle","Danika","Dannie","Danny","Dante","Danyka","Daphne","Daphnee","Daphney","Darby","Daren","Darian","Dariana","Darien","Dario","Darion","Darius","Darlene","Daron","Darrel","Darrell","Darren","Darrick","Darrin","Darrion","Darron","Darryl","Darwin","Daryl","Dashawn","Dasia","Dave","David","Davin","Davion","Davon","Davonte","Dawn","Dawson","Dax","Dayana","Dayna","Dayne","Dayton","Dean","Deangelo","Deanna","Deborah","Declan","Dedric","Dedrick","Dee","Deion","Deja","Dejah","Dejon","Dejuan","Delaney","Delbert","Delfina","Delia","Delilah","Dell","Della","Delmer","Delores","Delpha","Delphia","Delphine","Delta","Demarco","Demarcus","Demario","Demetris","Demetrius","Demond","Dena","Denis","Dennis","Deon","Deondre","Deontae","Deonte","Dereck","Derek","Derick","Deron","Derrick","Deshaun","Deshawn","Desiree","Desmond","Dessie","Destany","Destin","Destinee","Destiney","Destini","Destiny","Devan","Devante","Deven","Devin","Devon","Devonte","Devyn","Dewayne","Dewitt","Dexter","Diamond","Diana","Dianna","Diego","Dillan","Dillon","Dimitri","Dina","Dino","Dion","Dixie","Dock","Dolly","Dolores","Domenic","Domenica","Domenick","Domenico","Domingo","Dominic","Dominique","Don","Donald","Donato","Donavon","Donna","Donnell","Donnie","Donny","Dora","Dorcas","Dorian","Doris","Dorothea","Dorothy","Dorris","Dortha","Dorthy","Doug","Douglas","Dovie","Doyle","Drake","Drew","Duane","Dudley","Dulce","Duncan","Durward","Dustin","Dusty","Dwight","Dylan","Earl","Earlene","Earline","Earnest","Earnestine","Easter","Easton","Ebba","Ebony","Ed","Eda","Edd","Eddie","Eden","Edgar","Edgardo","Edison","Edmond","Edmund","Edna","Eduardo","Edward","Edwardo","Edwin","Edwina","Edyth","Edythe","Effie","Efrain","Efren","Eileen","Einar","Eino","Eladio","Elaina","Elbert","Elda","Eldon","Eldora","Eldred","Eldridge","Eleanora","Eleanore","Eleazar","Electa","Elena","Elenor","Elenora","Eleonore","Elfrieda","Eli","Elian","Eliane","Elias","Eliezer","Elijah","Elinor","Elinore","Elisa","Elisabeth","Elise","Eliseo","Elisha","Elissa","Eliza","Elizabeth","Ella","Ellen","Ellie","Elliot","Elliott","Ellis","Ellsworth","Elmer","Elmira","Elmo","Elmore","Elna","Elnora","Elody","Eloisa","Eloise","Elouise","Eloy","Elroy","Elsa","Else","Elsie","Elta","Elton","Elva","Elvera","Elvie","Elvis","Elwin","Elwyn","Elyse","Elyssa","Elza","Emanuel","Emelia","Emelie","Emely","Emerald","Emerson","Emery","Emie","Emil","Emile","Emilia","Emiliano","Emilie","Emilio","Emily","Emma","Emmalee","Emmanuel","Emmanuelle","Emmet","Emmett","Emmie","Emmitt","Emmy","Emory","Ena","Enid","Enoch","Enola","Enos","Enrico","Enrique","Ephraim","Era","Eriberto","Eric","Erica","Erich","Erick","Ericka","Erik","Erika","Erin","Erling","Erna","Ernest","Ernestina","Ernestine","Ernesto","Ernie","Ervin","Erwin","Eryn","Esmeralda","Esperanza","Esta","Esteban","Estefania","Estel","Estell","Estella","Estelle","Estevan","Esther","Estrella","Etha","Ethan","Ethel","Ethelyn","Ethyl","Ettie","Eudora","Eugene","Eugenia","Eula","Eulah","Eulalia","Euna","Eunice","Eusebio","Eva","Evalyn","Evan","Evangeline","Evans","Eve","Eveline","Evelyn","Everardo","Everett","Everette","Evert","Evie","Ewald","Ewell","Ezekiel","Ezequiel","Ezra","Fabian","Fabiola","Fae","Fannie","Fanny","Fatima","Faustino","Fausto","Favian","Fay","Faye","Federico","Felicia","Felicita","Felicity","Felipa","Felipe","Felix","Felton","Fermin","Fern","Fernando","Ferne","Fidel","Filiberto","Filomena","Finn","Fiona","Flavie","Flavio","Fleta","Fletcher","Flo","Florence","Florencio","Florian","Florida","Florine","Flossie","Floy","Floyd","Ford","Forest","Forrest","Foster","Frances","Francesca","Francesco","Francis","Francisca","Francisco","Franco","Frank","Frankie","Franz","Fred","Freda","Freddie","Freddy","Frederic","Frederick","Frederik","Frederique","Fredrick","Fredy","Freeda","Freeman","Freida","Frida","Frieda","Friedrich","Fritz","Furman","Gabe","Gabriel","Gabriella","Gabrielle","Gaetano","Gage","Gail","Gardner","Garett","Garfield","Garland","Garnet","Garnett","Garret","Garrett","Garrick","Garrison","Garry","Garth","Gaston","Gavin","Gay","Gayle","Gaylord","Gene","General","Genesis","Genevieve","Gennaro","Genoveva","Geo","Geoffrey","George","Georgette","Georgiana","Georgianna","Geovanni","Geovanny","Geovany","Gerald","Geraldine","Gerard","Gerardo","Gerda","Gerhard","Germaine","German","Gerry","Gerson","Gertrude","Gia","Gianni","Gideon","Gilbert","Gilberto","Gilda","Giles","Gillian","Gina","Gino","Giovani","Giovanna","Giovanni","Giovanny","Gisselle","Giuseppe","Gladyce","Gladys","Glen","Glenda","Glenna","Glennie","Gloria","Godfrey","Golda","Golden","Gonzalo","Gordon","Grace","Gracie","Graciela","Grady","Graham","Grant","Granville","Grayce","Grayson","Green","Greg","Gregg","Gregoria","Gregorio","Gregory","Greta","Gretchen","Greyson","Griffin","Grover","Guadalupe","Gudrun","Guido","Guillermo","Guiseppe","Gunnar","Gunner","Gus","Gussie","Gust","Gustave","Guy","Gwen","Gwendolyn","Hadley","Hailee","Hailey","Hailie","Hal","Haleigh","Haley","Halie","Halle","Hallie","Hank","Hanna","Hannah","Hans","Hardy","Harley","Harmon","Harmony","Harold","Harrison","Harry","Harvey","Haskell","Hassan","Hassie","Hattie","Haven","Hayden","Haylee","Hayley","Haylie","Hazel","Hazle","Heath","Heather","Heaven","Heber","Hector","Heidi","Helen","Helena","Helene","Helga","Hellen","Helmer","Heloise","Henderson","Henri","Henriette","Henry","Herbert","Herman","Hermann","Hermina","Herminia","Herminio","Hershel","Herta","Hertha","Hester","Hettie","Hilario","Hilbert","Hilda","Hildegard","Hillard","Hillary","Hilma","Hilton","Hipolito","Hiram","Hobart","Holden","Hollie","Hollis","Holly","Hope","Horace","Horacio","Hortense","Hosea","Houston","Howard","Howell","Hoyt","Hubert","Hudson","Hugh","Hulda","Humberto","Hunter","Hyman","Ian","Ibrahim","Icie","Ida","Idell","Idella","Ignacio","Ignatius","Ike","Ila","Ilene","Iliana","Ima","Imani","Imelda","Immanuel","Imogene","Ines","Irma","Irving","Irwin","Isaac","Isabel","Isabell","Isabella","Isabelle","Isac","Isadore","Isai","Isaiah","Isaias","Isidro","Ismael","Isobel","Isom","Israel","Issac","Itzel","Iva","Ivah","Ivory","Ivy","Izabella","Izaiah","Jabari","Jace","Jacey","Jacinthe","Jacinto","Jack","Jackeline","Jackie","Jacklyn","Jackson","Jacky","Jaclyn","Jacquelyn","Jacques","Jacynthe","Jada","Jade","Jaden","Jadon","Jadyn","Jaeden","Jaida","Jaiden","Jailyn","Jaime","Jairo","Jakayla","Jake","Jakob","Jaleel","Jalen","Jalon","Jalyn","Jamaal","Jamal","Jamar","Jamarcus","Jamel","Jameson","Jamey","Jamie","Jamil","Jamir","Jamison","Jammie","Jan","Jana","Janae","Jane","Janelle","Janessa","Janet","Janice","Janick","Janie","Janis","Janiya","Jannie","Jany","Jaquan","Jaquelin","Jaqueline","Jared","Jaren","Jarod","Jaron","Jarred","Jarrell","Jarret","Jarrett","Jarrod","Jarvis","Jasen","Jasmin","Jason","Jasper","Jaunita","Javier","Javon","Javonte","Jay","Jayce","Jaycee","Jayda","Jayde","Jayden","Jaydon","Jaylan","Jaylen","Jaylin","Jaylon","Jayme","Jayne","Jayson","Jazlyn","Jazmin","Jazmyn","Jazmyne","Jean","Jeanette","Jeanie","Jeanne","Jed","Jedediah","Jedidiah","Jeff","Jefferey","Jeffery","Jeffrey","Jeffry","Jena","Jenifer","Jennie","Jennifer","Jennings","Jennyfer","Jensen","Jerad","Jerald","Jeramie","Jeramy","Jerel","Jeremie","Jeremy","Jermain","Jermaine","Jermey","Jerod","Jerome","Jeromy","Jerrell","Jerrod","Jerrold","Jerry","Jess","Jesse","Jessica","Jessie","Jessika","Jessy","Jessyca","Jesus","Jett","Jettie","Jevon","Jewel","Jewell","Jillian","Jimmie","Jimmy","Jo","Joan","Joana","Joanie","Joanne","Joannie","Joanny","Joany","Joaquin","Jocelyn","Jodie","Jody","Joe","Joel","Joelle","Joesph","Joey","Johan","Johann","Johanna","Johathan","John","Johnathan","Johnathon","Johnnie","Johnny","Johnpaul","Johnson","Jolie","Jon","Jonas","Jonatan","Jonathan","Jonathon","Jordan","Jordane","Jordi","Jordon","Jordy","Jordyn","Jorge","Jose","Josefa","Josefina","Joseph","Josephine","Josh","Joshua","Joshuah","Josiah","Josiane","Josianne","Josie","Josue","Jovan","Jovani","Jovanny","Jovany","Joy","Joyce","Juana","Juanita","Judah","Judd","Jude","Judge","Judson","Judy","Jules","Julia","Julian","Juliana","Julianne","Julie","Julien","Juliet","Julio","Julius","June","Junior","Junius","Justen","Justice","Justina","Justine","Juston","Justus","Justyn","Juvenal","Juwan","Kacey","Kaci","Kacie","Kade","Kaden","Kadin","Kaela","Kaelyn","Kaia","Kailee","Kailey","Kailyn","Kaitlin","Kaitlyn","Kale","Kaleb","Kaleigh","Kaley","Kali","Kallie","Kameron","Kamille","Kamren","Kamron","Kamryn","Kane","Kara","Kareem","Karelle","Karen","Kari","Kariane","Karianne","Karina","Karine","Karl","Karlee","Karley","Karli","Karlie","Karolann","Karson","Kasandra","Kasey","Kassandra","Katarina","Katelin","Katelyn","Katelynn","Katharina","Katherine","Katheryn","Kathleen","Kathlyn","Kathryn","Kathryne","Katlyn","Katlynn","Katrina","Katrine","Kattie","Kavon","Kay","Kaya","Kaycee","Kayden","Kayla","Kaylah","Kaylee","Kayleigh","Kayley","Kayli","Kaylie","Kaylin","Keagan","Keanu","Keara","Keaton","Keegan","Keeley","Keely","Keenan","Keira","Keith","Kellen","Kelley","Kelli","Kellie","Kelly","Kelsi","Kelsie","Kelton","Kelvin","Ken","Kendall","Kendra","Kendrick","Kenna","Kennedi","Kennedy","Kenneth","Kennith","Kenny","Kenton","Kenya","Kenyatta","Kenyon","Keon","Keshaun","Keshawn","Keven","Kevin","Kevon","Keyon","Keyshawn","Khalid","Khalil","Kian","Kiana","Kianna","Kiara","Kiarra","Kiel","Kiera","Kieran","Kiley","Kim","Kimberly","King","Kip","Kira","Kirk","Kirsten","Kirstin","Kitty","Kobe","Koby","Kody","Kolby","Kole","Korbin","Korey","Kory","Kraig","Kris","Krista","Kristian","Kristin","Kristina","Kristofer","Kristoffer","Kristopher","Kristy","Krystal","Krystel","Krystina","Kurt","Kurtis","Kyla","Kyle","Kylee","Kyleigh","Kyler","Kylie","Kyra","Lacey","Lacy","Ladarius","Lafayette","Laila","Laisha","Lamar","Lambert","Lamont","Lance","Landen","Lane","Laney","Larissa","Laron","Larry","Larue","Laura","Laurel","Lauren","Laurence","Lauretta","Lauriane","Laurianne","Laurie","Laurine","Laury","Lauryn","Lavada","Lavern","Laverna","Laverne","Lavina","Lavinia","Lavon","Lavonne","Lawrence","Lawson","Layla","Layne","Lazaro","Lea","Leann","Leanna","Leanne","Leatha","Leda","Lee","Leif","Leila","Leilani","Lela","Lelah","Leland","Lelia","Lempi","Lemuel","Lenna","Lennie","Lenny","Lenora","Lenore","Leo","Leola","Leon","Leonard","Leonardo","Leone","Leonel","Leonie","Leonor","Leonora","Leopold","Leopoldo","Leora","Lera","Lesley","Leslie","Lesly","Lessie","Lester","Leta","Letha","Letitia","Levi","Lew","Lewis","Lexi","Lexie","Lexus","Lia","Liam","Liana","Libbie","Libby","Lila","Lilian","Liliana","Liliane","Lilla","Lillian","Lilliana","Lillie","Lilly","Lily","Lilyan","Lina","Lincoln","Linda","Lindsay","Lindsey","Linnea","Linnie","Linwood","Lionel","Lisa","Lisandro","Lisette","Litzy","Liza","Lizeth","Lizzie","Llewellyn","Lloyd","Logan","Lois","Lola","Lolita","Loma","Lon","London","Lonie","Lonnie","Lonny","Lonzo","Lora","Loraine","Loren","Lorena","Lorenz","Lorenza","Lorenzo","Lori","Lorine","Lorna","Lottie","Lou","Louie","Louisa","Lourdes","Louvenia","Lowell","Loy","Loyal","Loyce","Lucas","Luciano","Lucie","Lucienne","Lucile","Lucinda","Lucio","Lucious","Lucius","Lucy","Ludie","Ludwig","Lue","Luella","Luigi","Luis","Luisa","Lukas","Lula","Lulu","Luna","Lupe","Lura","Lurline","Luther","Luz","Lyda","Lydia","Lyla","Lynn","Lyric","Lysanne","Mabel","Mabelle","Mable","Mac","Macey","Maci","Macie","Mack","Mackenzie","Macy","Madaline","Madalyn","Maddison","Madeline","Madelyn","Madelynn","Madge","Madie","Madilyn","Madisen","Madison","Madisyn","Madonna","Madyson","Mae","Maegan","Maeve","Mafalda","Magali","Magdalen","Magdalena","Maggie","Magnolia","Magnus","Maia","Maida","Maiya","Major","Makayla","Makenna","Makenzie","Malachi","Malcolm","Malika","Malinda","Mallie","Mallory","Malvina","Mandy","Manley","Manuel","Manuela","Mara","Marc","Marcel","Marcelina","Marcelino","Marcella","Marcelle","Marcellus","Marcelo","Marcia","Marco","Marcos","Marcus","Margaret","Margarete","Margarett","Margaretta","Margarette","Margarita","Marge","Margie","Margot","Margret","Marguerite","Maria","Mariah","Mariam","Marian","Mariana","Mariane","Marianna","Marianne","Mariano","Maribel","Marie","Mariela","Marielle","Marietta","Marilie","Marilou","Marilyne","Marina","Mario","Marion","Marisa","Marisol","Maritza","Marjolaine","Marjorie","Marjory","Mark","Markus","Marlee","Marlen","Marlene","Marley","Marlin","Marlon","Marques","Marquis","Marquise","Marshall","Marta","Martin","Martina","Martine","Marty","Marvin","Mary","Maryam","Maryjane","Maryse","Mason","Mateo","Mathew","Mathias","Mathilde","Matilda","Matilde","Matt","Matteo","Mattie","Maud","Maude","Maudie","Maureen","Maurice","Mauricio","Maurine","Maverick","Mavis","Max","Maxie","Maxime","Maximilian","Maximillia","Maximillian","Maximo","Maximus","Maxine","Maxwell","May","Maya","Maybell","Maybelle","Maye","Maymie","Maynard","Mayra","Mazie","Mckayla","Mckenna","Mckenzie","Meagan","Meaghan","Meda","Megane","Meggie","Meghan","Mekhi","Melany","Melba","Melisa","Melissa","Mellie","Melody","Melvin","Melvina","Melyna","Melyssa","Mercedes","Meredith","Merl","Merle","Merlin","Merritt","Mertie","Mervin","Meta","Mia","Micaela","Micah","Michael","Michaela","Michale","Micheal","Michel","Michele","Michelle","Miguel","Mikayla","Mike","Mikel","Milan","Miles","Milford","Miller","Millie","Milo","Milton","Mina","Minerva","Minnie","Miracle","Mireille","Mireya","Misael","Missouri","Misty","Mitchel","Mitchell","Mittie","Modesta","Modesto","Mohamed","Mohammad","Mohammed","Moises","Mollie","Molly","Mona","Monica","Monique","Monroe","Monserrat","Monserrate","Montana","Monte","Monty","Morgan","Moriah","Morris","Mortimer","Morton","Mose","Moses","Moshe","Mossie","Mozell","Mozelle","Muhammad","Muriel","Murl","Murphy","Murray","Mustafa","Mya","Myah","Mylene","Myles","Myra","Myriam","Myrl","Myrna","Myron","Myrtice","Myrtie","Myrtis","Myrtle","Nadia","Nakia","Name","Nannie","Naomi","Naomie","Napoleon","Narciso","Nash","Nasir","Nat","Natalia","Natalie","Natasha","Nathan","Nathanael","Nathanial","Nathaniel","Nathen","Nayeli","Neal","Ned","Nedra","Neha","Neil","Nelda","Nella","Nelle","Nellie","Nels","Nelson","Neoma","Nestor","Nettie","Neva","Newell","Newton","Nia","Nicholas","Nicholaus","Nichole","Nick","Nicklaus","Nickolas","Nico","Nicola","Nicolas","Nicole","Nicolette","Nigel","Nikita","Nikki","Nikko","Niko","Nikolas","Nils","Nina","Noah","Noble","Noe","Noel","Noelia","Noemi","Noemie","Noemy","Nola","Nolan","Nona","Nora","Norbert","Norberto","Norene","Norma","Norris","Norval","Norwood","Nova","Novella","Nya","Nyah","Nyasia","Obie","Oceane","Ocie","Octavia","Oda","Odell","Odessa","Odie","Ofelia","Okey","Ola","Olaf","Ole","Olen","Oleta","Olga","Olin","Oliver","Ollie","Oma","Omari","Omer","Ona","Onie","Opal","Ophelia","Ora","Oral","Oran","Oren","Orie","Orin","Orion","Orland","Orlando","Orlo","Orpha","Orrin","Orval","Orville","Osbaldo","Osborne","Oscar","Osvaldo","Oswald","Oswaldo","Otha","Otho","Otilia","Otis","Ottilie","Ottis","Otto","Ova","Owen","Ozella","Pablo","Paige","Palma","Pamela","Pansy","Paolo","Paris","Parker","Pascale","Pasquale","Pat","Patience","Patricia","Patrick","Patsy","Pattie","Paul","Paula","Pauline","Paxton","Payton","Pearl","Pearlie","Pearline","Pedro","Peggie","Penelope","Percival","Percy","Perry","Pete","Peter","Petra","Peyton","Philip","Phoebe","Phyllis","Pierce","Pierre","Pietro","Pink","Pinkie","Piper","Polly","Porter","Precious","Presley","Preston","Price","Prince","Princess","Priscilla","Providenci","Prudence","Queen","Queenie","Quentin","Quincy","Quinn","Quinten","Quinton","Rachael","Rachel","Rachelle","Rae","Raegan","Rafael","Rafaela","Raheem","Rahsaan","Rahul","Raina","Raleigh","Ralph","Ramiro","Ramon","Ramona","Randal","Randall","Randi","Randy","Ransom","Raoul","Raphael","Raphaelle","Raquel","Rashad","Rashawn","Rasheed","Raul","Raven","Ray","Raymond","Raymundo","Reagan","Reanna","Reba","Rebeca","Rebecca","Rebeka","Rebekah","Reece","Reed","Reese","Regan","Reggie","Reginald","Reid","Reilly","Reina","Reinhold","Remington","Rene","Renee","Ressie","Reta","Retha","Retta","Reuben","Reva","Rex","Rey","Reyes","Reymundo","Reyna","Reynold","Rhea","Rhett","Rhianna","Rhiannon","Rhoda","Ricardo","Richard","Richie","Richmond","Rick","Rickey","Rickie","Ricky","Rico","Rigoberto","Riley","Rita","River","Robb","Robbie","Robert","Roberta","Roberto","Robin","Robyn","Rocio","Rocky","Rod","Roderick","Rodger","Rodolfo","Rodrick","Rodrigo","Roel","Rogelio","Roger","Rogers","Rolando","Rollin","Roma","Romaine","Roman","Ron","Ronaldo","Ronny","Roosevelt","Rory","Rosa","Rosalee","Rosalia","Rosalind","Rosalinda","Rosalyn","Rosamond","Rosanna","Rosario","Roscoe","Rose","Rosella","Roselyn","Rosemarie","Rosemary","Rosendo","Rosetta","Rosie","Rosina","Roslyn","Ross","Rossie","Rowan","Rowena","Rowland","Roxane","Roxanne","Roy","Royal","Royce","Rozella","Ruben","Rubie","Ruby","Rubye","Rudolph","Rudy","Rupert","Russ","Russel","Russell","Rusty","Ruth","Ruthe","Ruthie","Ryan","Ryann","Ryder","Rylan","Rylee","Ryleigh","Ryley","Sabina","Sabrina","Sabryna","Sadie","Sadye","Sage","Saige","Sallie","Sally","Salma","Salvador","Salvatore","Sam","Samanta","Samantha","Samara","Samir","Sammie","Sammy","Samson","Sandra","Sandrine","Sandy","Sanford","Santa","Santiago","Santina","Santino","Santos","Sarah","Sarai","Sarina","Sasha","Saul","Savanah","Savanna","Savannah","Savion","Scarlett","Schuyler","Scot","Scottie","Scotty","Seamus","Sean","Sebastian","Sedrick","Selena","Selina","Selmer","Serena","Serenity","Seth","Shad","Shaina","Shakira","Shana","Shane","Shanel","Shanelle","Shania","Shanie","Shaniya","Shanna","Shannon","Shanny","Shanon","Shany","Sharon","Shaun","Shawn","Shawna","Shaylee","Shayna","Shayne","Shea","Sheila","Sheldon","Shemar","Sheridan","Sherman","Sherwood","Shirley","Shyann","Shyanne","Sibyl","Sid","Sidney","Sienna","Sierra","Sigmund","Sigrid","Sigurd","Silas","Sim","Simeon","Simone","Sincere","Sister","Skye","Skyla","Skylar","Sofia","Soledad","Solon","Sonia","Sonny","Sonya","Sophia","Sophie","Spencer","Stacey","Stacy","Stan","Stanford","Stanley","Stanton","Stefan","Stefanie","Stella","Stephan","Stephania","Stephanie","Stephany","Stephen","Stephon","Sterling","Steve","Stevie","Stewart","Stone","Stuart","Summer","Sunny","Susan","Susana","Susanna","Susie","Suzanne","Sven","Syble","Sydnee","Sydney","Sydni","Sydnie","Sylvan","Sylvester","Sylvia","Tabitha","Tad","Talia","Talon","Tamara","Tamia","Tania","Tanner","Tanya","Tara","Taryn","Tate","Tatum","Tatyana","Taurean","Tavares","Taya","Taylor","Teagan","Ted","Telly","Terence","Teresa","Terrance","Terrell","Terrence","Terrill","Terry","Tess","Tessie","Tevin","Thad","Thaddeus","Thalia","Thea","Thelma","Theo","Theodora","Theodore","Theresa","Therese","Theresia","Theron","Thomas","Thora","Thurman","Tia","Tiana","Tianna","Tiara","Tierra","Tiffany","Tillman","Timmothy","Timmy","Timothy","Tina","Tito","Titus","Tobin","Toby","Tod","Tom","Tomas","Tomasa","Tommie","Toney","Toni","Tony","Torey","Torrance","Torrey","Toy","Trace","Tracey","Tracy","Travis","Travon","Tre","Tremaine","Tremayne","Trent","Trenton","Tressa","Tressie","Treva","Trever","Trevion","Trevor","Trey","Trinity","Trisha","Tristian","Tristin","Triston","Troy","Trudie","Trycia","Trystan","Turner","Twila","Tyler","Tyra","Tyree","Tyreek","Tyrel","Tyrell","Tyrese","Tyrique","Tyshawn","Tyson","Ubaldo","Ulices","Ulises","Una","Unique","Urban","Uriah","Uriel","Ursula","Vada","Valentin","Valentina","Valentine","Valerie","Vallie","Van","Vance","Vanessa","Vaughn","Veda","Velda","Vella","Velma","Velva","Vena","Verda","Verdie","Vergie","Verla","Verlie","Vern","Verna","Verner","Vernice","Vernie","Vernon","Verona","Veronica","Vesta","Vicenta","Vicente","Vickie","Vicky","Victor","Victoria","Vida","Vidal","Vilma","Vince","Vincent","Vincenza","Vincenzo","Vinnie","Viola","Violet","Violette","Virgie","Virgil","Virginia","Virginie","Vita","Vito","Viva","Vivian","Viviane","Vivianne","Vivien","Vivienne","Vladimir","Wade","Waino","Waldo","Walker","Wallace","Walter","Walton","Wanda","Ward","Warren","Watson","Wava","Waylon","Wayne","Webster","Weldon","Wellington","Wendell","Wendy","Werner","Westley","Weston","Whitney","Wilber","Wilbert","Wilburn","Wiley","Wilford","Wilfred","Wilfredo","Wilfrid","Wilhelm","Wilhelmine","Will","Willa","Willard","William","Willie","Willis","Willow","Willy","Wilma","Wilmer","Wilson","Wilton","Winfield","Winifred","Winnifred","Winona","Winston","Woodrow","Wyatt","Wyman","Xander","Xavier","Xzavier","Yadira","Yasmeen","Yasmin","Yasmine","Yazmin","Yesenia","Yessenia","Yolanda","Yoshiko","Yvette","Yvonne","Zachariah","Zachary","Zachery","Zack","Zackary","Zackery","Zakary","Zander","Zane","Zaria","Zechariah","Zelda","Zella","Zelma","Zena","Zetta","Zion","Zita","Zoe","Zoey","Zoie","Zoila","Zola","Zora","Zula"];e.exports={generateUsername:function(){return r.randomElement(i)+"-"+r.randomAlphanumStr(3)}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return v});var r=n(4),i=n(2),o=n(7),a=n(0),s=n.n(a),c=n(5),u=n(11),d=n.n(u),l=n(35),h=n.n(l),p=n(36),f=n(51),m=Object(r.getLogger)(e),v=(function(e){function t(e,n,r){var i;return _classCallCheck(this,t),(i=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this))).xmpp=e,i.eventEmitter=n,i.sessions={},i.jvbIceConfig=r.jvb,i.p2pIceConfig=r.p2p,i.mediaConstraints={offerToReceiveAudio:!0,offerToReceiveVideo:!0},i}return _inherits(t,e),_createClass(t,[{key:"init",value:function(e){_get(_getPrototypeOf(t.prototype),"init",this).call(this,e),this.connection.addHandler(this.onJingle.bind(this),"urn:xmpp:jingle:1","iq","set",null,null)}},{key:"onJingle",value:function(e){var t=$(e).find("jingle").attr("sid"),n=$(e).find("jingle").attr("action"),r=e.getAttribute("from"),a=Object(i.$iq)({type:"result",to:r,id:e.getAttribute("id")});m.log("on jingle "+n+" from "+r,e);var u=this.sessions[t];if("session-initiate"!==n){if(!u)return a.attrs({type:"error"}),a.c("error",{type:"cancel"}).c("item-not-found",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up().c("unknown-session",{xmlns:"urn:xmpp:jingle:errors:1"}),m.warn("invalid session id",e),this.connection.send(a),!0;if(r!==u.remoteJid)return m.warn("jid mismatch for session id",t,u.remoteJid,e),a.attrs({type:"error"}),a.c("error",{type:"cancel"}).c("item-not-found",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up().c("unknown-session",{xmlns:"urn:xmpp:jingle:errors:1"}),this.connection.send(a),!0}else if(void 0!==u)return a.attrs({type:"error"}),a.c("error",{type:"cancel"}).c("service-unavailable",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up(),m.warn("duplicate session id",t,e),this.connection.send(a),!0;var l=window.performance.now(),h="focus"!==i.Strophe.getResourceFromJid(r);switch(n){case"session-initiate":m.log("(TIME) received session-initiate:\t",l);var p=$(e).find("jingle>startmuted");if(p&&p.length>0){var v=p.attr("audio"),g=p.attr("video");this.eventEmitter.emit(s.a.START_MUTED_FROM_FOCUS,"true"===v,"true"===g)}m.info("Marking session from "+r+" as "+(h?"":"*not*")+" P2P");var y=h?this.p2pIceConfig:this.jvbIceConfig;u=new f.a($(e).find("jingle").attr("sid"),$(e).attr("to"),r,this.connection,this.mediaConstraints,JSON.parse(JSON.stringify(y)),h,!1),this.sessions[u.sid]=u,this.eventEmitter.emit(s.a.CALL_INCOMING,u,$(e).find(">jingle"),l);break;case"session-accept":this.eventEmitter.emit(s.a.CALL_ACCEPTED,u,$(e).find(">jingle"));break;case"content-modify":u.modifyContents($(e).find(">jingle"));break;case"transport-info":this.eventEmitter.emit(s.a.TRANSPORT_INFO,u,$(e).find(">jingle"));break;case"session-terminate":m.log("terminating...",u.sid);var _=null,S=null;$(e).find(">jingle>reason").length&&(_=$(e).find(">jingle>reason>:first")[0].tagName,S=$(e).find(">jingle>reason>text").text()),this.terminate(u.sid,_,S),this.eventEmitter.emit(s.a.CALL_ENDED,u,_,S);break;case"transport-replace":m.info("(TIME) Start transport replace:\t",l),c.a.sendAnalytics(Object(o.G)(o.f,{p2p:h,value:l})),u.replaceTransport($(e).find(">jingle"),function(){var e=window.performance.now();m.info("(TIME) Transport replace success:\t",e),c.a.sendAnalytics(Object(o.G)(o.g,{p2p:h,value:e}))},function(e){d.a.callErrorHandler(e),m.error("Transport replace failed",e),u.sendTransportReject()});break;case"addsource":case"source-add":u.addRemoteStream($(e).find(">jingle>content"));break;case"removesource":case"source-remove":u.removeRemoteStream($(e).find(">jingle>content"));break;default:m.warn("jingle action not implemented",n),a.attrs({type:"error"}),a.c("error",{type:"cancel"}).c("bad-request",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up()}return this.connection.send(a),!0}},{key:"newP2PJingleSession",value:function(e,t){var n=new f.a(h.a.randomHexString(12),e,t,this.connection,this.mediaConstraints,this.p2pIceConfig,!0,!0);return this.sessions[n.sid]=n,n}},{key:"terminate",value:function(e,t,n){this.sessions.hasOwnProperty(e)&&("ended"!==this.sessions[e].state&&this.sessions[e].onTerminated(t,n),delete this.sessions[e])}},{key:"getStunAndTurnCredentials",value:function(){var e=this;this.connection.sendIQ(Object(i.$iq)({type:"get",to:this.connection.domain}).c("services",{xmlns:"urn:xmpp:extdisco:1"}),function(t){var n=[];$(t).find(">services>service").each(function(e,t){var r={},i=(t=$(t)).attr("type");switch(i){case"stun":r.urls="stun:"+t.attr("host"),t.attr("port")&&(r.urls+=":"+t.attr("port")),n.push(r);break;case"turn":case"turns":r.urls=i+":";var o=t.attr("username");if(o){var a=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);a&&parseInt(a[2],10)<28?r.urls+=o+"@":r.username=o}r.urls+=t.attr("host"),t.attr("port")&&(r.urls+=":"+t.attr("port"));var s=t.attr("transport");s&&"udp"!==s&&(r.urls+="?transport="+s),r.credential=t.attr("password")||r.credential,n.push(r)}});for(var r,i=e.xmpp.options,o=n.length-1;o>0;o--){var a=Math.floor(Math.random()*(o+1)),s=n[o];n[o]=n[a],n[a]=s}i.useStunTurn&&(r=i.useTurnUdp?function(e){return e.urls.startsWith("turn")}:function(e){return e.urls.startsWith("turn")&&e.urls.indexOf("transport=tcp")>=0},e.jvbIceConfig.iceServers=n.filter(r));i.p2p&&i.p2p.useStunTurn&&(e.p2pIceConfig.iceServers=n)},function(e){m.warn("getting turn credentials failed",e),m.warn("is mod_turncredentials or similar installed?")})}},{key:"getLog",value:function(){var e=this,t={};return Object.keys(this.sessions).forEach(function(n){var r=e.sessions[n].peerconnection;r&&r.updateLog&&(t["jingle_"+n]={updateLog:r.updateLog,stats:r.stats,url:window.location.href})}),t}}]),t})(p.b)}).call(this,"modules/xmpp/strophe.jingle.js")},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(99),i=n.n(r),o=(function(){function e(){_classCallCheck(this,e),this._queue=i.a.queue(this._processQueueTasks.bind(this),1),this._stopped=!1}return _createClass(e,[{key:"clear",value:function(){this._queue.kill()}},{key:"_processQueueTasks",value:function(e,t){e(t)}},{key:"push",value:function(e,t){this._stopped?t&&t(new Error("The queue has been stopped")):this._queue.push(e,t)}},{key:"shutdown",value:function(){this._stopped=!0}}]),e})()},function(e,t,n){(function(n,r){var i;!(function(){var o,a,s={};function c(e){var t=!1;return function(){if(t)throw new Error("Callback was already called.");t=!0,e.apply(o,arguments)}}null!=(o=this)&&(a=o.async),s.noConflict=function(){return o.async=a,s};var u=Object.prototype.toString,d=Array.isArray||function(e){return"[object Array]"===u.call(e)},l=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n=e.length&&n()}l(e,function(e){t(e,c(i))})},s.forEach=s.each,s.eachSeries=function(e,t,n){if(n=n||function(){},!e.length)return n();var r=0;!(function i(){t(e[r],function(t){t?(n(t),n=function(){}):(r+=1)>=e.length?n():i()})})()},s.forEachSeries=s.eachSeries,s.eachLimit=function(e,t,n,r){f(t).apply(null,[e,n,r])},s.forEachLimit=s.eachLimit;var f=function(e){return function(t,n,r){if(r=r||function(){},!t.length||e<=0)return r();var i=0,o=0,a=0;!(function s(){if(i>=t.length)return r();for(;a=t.length?r():s())})})()}},m=function(e){return function(){var t=Array.prototype.slice.call(arguments);return e.apply(null,[s.each].concat(t))}},v=function(e){return function(){var t=Array.prototype.slice.call(arguments);return e.apply(null,[s.eachSeries].concat(t))}},g=function(e,t,n,r){if(t=h(t,function(e,t){return{index:t,value:e}}),r){var i=[];e(t,function(e,t){n(e.value,function(n,r){i[e.index]=r,t(n)})},function(e){r(e,i)})}else e(t,function(e,t){n(e.value,function(e){t(e)})})};s.map=m(g),s.mapSeries=v(g),s.mapLimit=function(e,t,n,r){return y(t)(e,n,r)};var y=function(e){return(function(e,t){return function(){var n=Array.prototype.slice.call(arguments);return t.apply(null,[f(e)].concat(n))}})(e,g)};s.reduce=function(e,t,n,r){s.eachSeries(e,function(e,r){n(t,e,function(e,n){t=n,r(e)})},function(e){r(e,t)})},s.inject=s.reduce,s.foldl=s.reduce,s.reduceRight=function(e,t,n,r){var i=h(e,function(e){return e}).reverse();s.reduce(i,t,n,r)},s.foldr=s.reduceRight;var _=function(e,t,n,r){var i=[];e(t=h(t,function(e,t){return{index:t,value:e}}),function(e,t){n(e.value,function(n){n&&i.push(e),t()})},function(e){r(h(i.sort(function(e,t){return e.index-t.index}),function(e){return e.value}))})};s.filter=m(_),s.filterSeries=v(_),s.select=s.filter,s.selectSeries=s.filterSeries;var S=function(e,t,n,r){var i=[];e(t=h(t,function(e,t){return{index:t,value:e}}),function(e,t){n(e.value,function(n){n||i.push(e),t()})},function(e){r(h(i.sort(function(e,t){return e.index-t.index}),function(e){return e.value}))})};s.reject=m(S),s.rejectSeries=v(S);var E=function(e,t,n,r){e(t,function(e,t){n(e,function(n){n?(r(e),r=function(){}):t()})},function(e){r()})};s.detect=m(E),s.detectSeries=v(E),s.some=function(e,t,n){s.each(e,function(e,r){t(e,function(e){e&&(n(!0),n=function(){}),r()})},function(e){n(!1)})},s.any=s.some,s.every=function(e,t,n){s.each(e,function(e,r){t(e,function(e){e||(n(!1),n=function(){}),r()})},function(e){n(!0)})},s.all=s.every,s.sortBy=function(e,t,n){s.map(e,function(e,n){t(e,function(t,r){t?n(t):n(null,{value:e,criteria:r})})},function(e,t){if(e)return n(e);n(null,h(t.sort(function(e,t){var n=e.criteria,r=t.criteria;return nr?1:0}),function(e){return e.value}))})},s.auto=function(e,t){t=t||function(){};var n=p(e),r=n.length;if(!r)return t();var i={},o=[],a=function(e){o.unshift(e)},c=function(){r--,l(o.slice(0),function(e){e()})};a(function(){if(!r){var e=t;t=function(){},e(null,i)}}),l(n,function(n){var r=d(e[n])?e[n]:[e[n]],u=function(e){var r=Array.prototype.slice.call(arguments,1);if(r.length<=1&&(r=r[0]),e){var o={};l(p(i),function(e){o[e]=i[e]}),o[n]=r,t(e,o),t=function(){}}else i[n]=r,s.setImmediate(c)},h=r.slice(0,Math.abs(r.length-1))||[],f=function(){return t=function(e,t){return e&&i.hasOwnProperty(t)},r=!0,((e=h).reduce?e.reduce(t,r):(l(e,function(e,n,i){r=t(r,e)}),r))&&!i.hasOwnProperty(n);var e,t,r};if(f())r[r.length-1](u,i);else{a(function e(){f()&&((function(e){for(var t=0;t>>1);n(t,e[o])>=0?r=o:i=o-1}return r})(e.tasks,o,n)+1,0,o),e.saturated&&e.tasks.length===e.concurrency&&e.saturated(),s.setImmediate(e.process)})})(r,e,t,i)},delete r.unshift,r},s.cargo=function(e,t){var n=!1,r=[],i={tasks:r,payload:t,saturated:null,empty:null,drain:null,drained:!0,push:function(e,n){d(e)||(e=[e]),l(e,function(e){r.push({data:e,callback:"function"==typeof n?n:null}),i.drained=!1,i.saturated&&r.length===t&&i.saturated()}),s.setImmediate(i.process)},process:function o(){if(!n){if(0===r.length)return i.drain&&!i.drained&&i.drain(),void(i.drained=!0);var a="number"==typeof t?r.splice(0,t):r.splice(0,r.length),s=h(a,function(e){return e.data});i.empty&&i.empty(),n=!0,e(s,function(){n=!1;var e=arguments;l(a,function(t){t.callback&&t.callback.apply(null,e)}),o()})}},length:function(){return r.length},running:function(){return n}};return i};var T=function(e){return function(t){var n=Array.prototype.slice.call(arguments,1);t.apply(null,n.concat([function(t){var n=Array.prototype.slice.call(arguments,1);"undefined"!=typeof console&&(t?console.error&&console.error(t):console[e]&&l(n,function(t){console[e](t)}))}]))}};s.log=T("log"),s.dir=T("dir"),s.memoize=function(e,t){var n={},r={};t=t||function(e){return e};var i=function(){var i=Array.prototype.slice.call(arguments),o=i.pop(),a=t.apply(null,i);a in n?s.nextTick(function(){o.apply(null,n[a])}):a in r?r[a].push(o):(r[a]=[o],e.apply(null,i.concat([function(){n[a]=arguments;var e=r[a];delete r[a];for(var t=0,i=e.length;t2){var r=Array.prototype.slice.call(arguments,2);return n.apply(this,r)}return n};s.applyEach=m(R),s.applyEachSeries=v(R),s.forever=function(e,t){!(function n(r){if(r){if(t)return t(r);throw r}e(n)})()},e.exports?e.exports=s:void 0===(i=function(){return s}.apply(t,[]))||(e.exports=i)})()}).call(this,n(55),n(150).setImmediate)},function(e,t){e.exports={integerHash:function(e){if(!e)return 0;var t,n=0;for(t=0;t=14393&&-1===e.indexOf("?transport=udp"):(n=!0,!0)}),delete e.url,e.urls=i?r[0]:r,!!r.length}})})(n.iceServers||[],t),this._iceGatherers=[],n.iceCandidatePoolSize)for(var a=n.iceCandidatePoolSize;a>0;a--)this._iceGatherers.push(new e.RTCIceGatherer({iceServers:n.iceServers,gatherPolicy:n.iceTransportPolicy}));else n.iceCandidatePoolSize=0;this._config=n,this.transceivers=[],this._sdpSessionId=r.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(d.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(d.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),d.prototype.onicecandidate=null,d.prototype.onaddstream=null,d.prototype.ontrack=null,d.prototype.onremovestream=null,d.prototype.onsignalingstatechange=null,d.prototype.oniceconnectionstatechange=null,d.prototype.onconnectionstatechange=null,d.prototype.onicegatheringstatechange=null,d.prototype.onnegotiationneeded=null,d.prototype.ondatachannel=null,d.prototype._dispatchEvent=function(e,t){this._isClosed||(this.dispatchEvent(t),"function"==typeof this["on"+e]&&this["on"+e](t))},d.prototype._emitGatheringStateChange=function(){var e=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",e)},d.prototype.getConfiguration=function(){return this._config},d.prototype.getLocalStreams=function(){return this.localStreams},d.prototype.getRemoteStreams=function(){return this.remoteStreams},d.prototype._createTransceiver=function(e,t){var n=this.transceivers.length>0,r={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:e,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&n)r.iceTransport=this.transceivers[0].iceTransport,r.dtlsTransport=this.transceivers[0].dtlsTransport;else{var i=this._createIceAndDtlsTransports();r.iceTransport=i.iceTransport,r.dtlsTransport=i.dtlsTransport}return t||this.transceivers.push(r),r},d.prototype.addTrack=function(t,n){if(this._isClosed)throw c("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var r;if(this.transceivers.find(function(e){return e.track===t}))throw c("InvalidAccessError","Track already exists.");for(var i=0;i=15025)e.getTracks().forEach(function(t){n.addTrack(t,e)});else{var r=e.clone();e.getTracks().forEach(function(e,t){var n=r.getTracks()[t];e.addEventListener("enabled",function(e){n.enabled=e.enabled})}),r.getTracks().forEach(function(e){n.addTrack(e,r)})}},d.prototype.removeTrack=function(t){if(this._isClosed)throw c("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(t instanceof e.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var n=this.transceivers.find(function(e){return e.rtpSender===t});if(!n)throw c("InvalidAccessError","Sender was not created by this connection.");var r=n.stream;n.rtpSender.stop(),n.rtpSender=null,n.track=null,n.stream=null,-1===this.transceivers.map(function(e){return e.stream}).indexOf(r)&&this.localStreams.indexOf(r)>-1&&this.localStreams.splice(this.localStreams.indexOf(r),1),this._maybeFireNegotiationNeeded()},d.prototype.removeStream=function(e){var t=this;e.getTracks().forEach(function(e){var n=t.getSenders().find(function(t){return t.track===e});n&&t.removeTrack(n)})},d.prototype.getSenders=function(){return this.transceivers.filter(function(e){return!!e.rtpSender}).map(function(e){return e.rtpSender})},d.prototype.getReceivers=function(){return this.transceivers.filter(function(e){return!!e.rtpReceiver}).map(function(e){return e.rtpReceiver})},d.prototype._createIceGatherer=function(t,n){var r=this;if(n&&t>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var i=new e.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(i,"state",{value:"new",writable:!0}),this.transceivers[t].bufferedCandidateEvents=[],this.transceivers[t].bufferCandidates=function(e){var n=!e.candidate||0===Object.keys(e.candidate).length;i.state=n?"completed":"gathering",null!==r.transceivers[t].bufferedCandidateEvents&&r.transceivers[t].bufferedCandidateEvents.push(e)},i.addEventListener("localcandidate",this.transceivers[t].bufferCandidates),i},d.prototype._gather=function(t,n){var i=this,o=this.transceivers[n].iceGatherer;if(!o.onlocalcandidate){var a=this.transceivers[n].bufferedCandidateEvents;this.transceivers[n].bufferedCandidateEvents=null,o.removeEventListener("localcandidate",this.transceivers[n].bufferCandidates),o.onlocalcandidate=function(e){if(!(i.usingBundle&&n>0)){var a=new Event("icecandidate");a.candidate={sdpMid:t,sdpMLineIndex:n};var s=e.candidate,c=!s||0===Object.keys(s).length;if(c)"new"!==o.state&&"gathering"!==o.state||(o.state="completed");else{"new"===o.state&&(o.state="gathering"),s.component=1,s.ufrag=o.getLocalParameters().usernameFragment;var u=r.writeCandidate(s);a.candidate=_extends(a.candidate,r.parseCandidate(u)),a.candidate.candidate=u,a.candidate.toJSON=function(){return{candidate:a.candidate.candidate,sdpMid:a.candidate.sdpMid,sdpMLineIndex:a.candidate.sdpMLineIndex,usernameFragment:a.candidate.usernameFragment}}}var d=r.getMediaSections(i._localDescription.sdp);d[a.candidate.sdpMLineIndex]+=c?"a=end-of-candidates\r\n":"a="+a.candidate.candidate+"\r\n",i._localDescription.sdp=r.getDescription(i._localDescription.sdp)+d.join("");var l=i.transceivers.every(function(e){return e.iceGatherer&&"completed"===e.iceGatherer.state});"gathering"!==i.iceGatheringState&&(i.iceGatheringState="gathering",i._emitGatheringStateChange()),c||i._dispatchEvent("icecandidate",a),l&&(i._dispatchEvent("icecandidate",new Event("icecandidate")),i.iceGatheringState="complete",i._emitGatheringStateChange())}},e.setTimeout(function(){a.forEach(function(e){o.onlocalcandidate(e)})},0)}},d.prototype._createIceAndDtlsTransports=function(){var t=this,n=new e.RTCIceTransport(null);n.onicestatechange=function(){t._updateIceConnectionState(),t._updateConnectionState()};var r=new e.RTCDtlsTransport(n);return r.ondtlsstatechange=function(){t._updateConnectionState()},r.onerror=function(){Object.defineProperty(r,"state",{value:"failed",writable:!0}),t._updateConnectionState()},{iceTransport:n,dtlsTransport:r}},d.prototype._disposeIceAndDtlsTransports=function(e){var t=this.transceivers[e].iceGatherer;t&&(delete t.onlocalcandidate,delete this.transceivers[e].iceGatherer);var n=this.transceivers[e].iceTransport;n&&(delete n.onicestatechange,delete this.transceivers[e].iceTransport);var r=this.transceivers[e].dtlsTransport;r&&(delete r.ondtlsstatechange,delete r.onerror,delete this.transceivers[e].dtlsTransport)},d.prototype._transceive=function(e,n,i){var a=o(e.localCapabilities,e.remoteCapabilities);n&&e.rtpSender&&(a.encodings=e.sendEncodingParameters,a.rtcp={cname:r.localCName,compound:e.rtcpParameters.compound},e.recvEncodingParameters.length&&(a.rtcp.ssrc=e.recvEncodingParameters[0].ssrc),e.rtpSender.send(a)),i&&e.rtpReceiver&&a.codecs.length>0&&("video"===e.kind&&e.recvEncodingParameters&&t<15019&&e.recvEncodingParameters.forEach(function(e){delete e.rtx}),e.recvEncodingParameters.length?a.encodings=e.recvEncodingParameters:a.encodings=[{}],a.rtcp={compound:e.rtcpParameters.compound},e.rtcpParameters.cname&&(a.rtcp.cname=e.rtcpParameters.cname),e.sendEncodingParameters.length&&(a.rtcp.ssrc=e.sendEncodingParameters[0].ssrc),e.rtpReceiver.receive(a))},d.prototype.setLocalDescription=function(e){var t,n,i=this;if(-1===["offer","answer"].indexOf(e.type))return Promise.reject(c("TypeError",'Unsupported type "'+e.type+'"'));if(!a("setLocalDescription",e.type,i.signalingState)||i._isClosed)return Promise.reject(c("InvalidStateError","Can not set local "+e.type+" in state "+i.signalingState));if("offer"===e.type)t=r.splitSections(e.sdp),n=t.shift(),t.forEach(function(e,t){var n=r.parseRtpParameters(e);i.transceivers[t].localCapabilities=n}),i.transceivers.forEach(function(e,t){i._gather(e.mid,t)});else if("answer"===e.type){t=r.splitSections(i._remoteDescription.sdp),n=t.shift();var s=r.matchPrefix(n,"a=ice-lite").length>0;t.forEach(function(e,t){var a=i.transceivers[t],c=a.iceGatherer,u=a.iceTransport,d=a.dtlsTransport,l=a.localCapabilities,h=a.remoteCapabilities;if(!(r.isRejected(e)&&0===r.matchPrefix(e,"a=bundle-only").length||a.rejected)){var p=r.getIceParameters(e,n),f=r.getDtlsParameters(e,n);s&&(f.role="server"),i.usingBundle&&0!==t||(i._gather(a.mid,t),"new"===u.state&&u.start(c,p,s?"controlling":"controlled"),"new"===d.state&&d.start(f));var m=o(l,h);i._transceive(a,m.codecs.length>0,!1)}})}return i._localDescription={type:e.type,sdp:e.sdp},"offer"===e.type?i._updateSignalingState("have-local-offer"):i._updateSignalingState("stable"),Promise.resolve()},d.prototype.setRemoteDescription=function(i){var d=this;if(-1===["offer","answer"].indexOf(i.type))return Promise.reject(c("TypeError",'Unsupported type "'+i.type+'"'));if(!a("setRemoteDescription",i.type,d.signalingState)||d._isClosed)return Promise.reject(c("InvalidStateError","Can not set remote "+i.type+" in state "+d.signalingState));var l={};d.remoteStreams.forEach(function(e){l[e.id]=e});var h=[],p=r.splitSections(i.sdp),f=p.shift(),m=r.matchPrefix(f,"a=ice-lite").length>0,v=r.matchPrefix(f,"a=group:BUNDLE ").length>0;d.usingBundle=v;var g=r.matchPrefix(f,"a=ice-options:")[0];return d.canTrickleIceCandidates=!!g&&g.substr(14).split(" ").indexOf("trickle")>=0,p.forEach(function(a,c){var u=r.splitLines(a),p=r.getKind(a),g=r.isRejected(a)&&0===r.matchPrefix(a,"a=bundle-only").length,y=u[0].substr(2).split(" ")[2],_=r.getDirection(a,f),S=r.parseMsid(a),E=r.getMid(a)||r.generateIdentifier();if(g||"application"===p&&("DTLS/SCTP"===y||"UDP/DTLS/SCTP"===y))d.transceivers[c]={mid:E,kind:p,protocol:y,rejected:!0};else{var b,C,T,R,A,k,w,I,P;!g&&d.transceivers[c]&&d.transceivers[c].rejected&&(d.transceivers[c]=d._createTransceiver(p,!0));var D,O,N=r.parseRtpParameters(a);g||(D=r.getIceParameters(a,f),(O=r.getDtlsParameters(a,f)).role="client"),w=r.parseRtpEncodingParameters(a);var M=r.parseRtcpParameters(a),L=r.matchPrefix(a,"a=end-of-candidates",f).length>0,x=r.matchPrefix(a,"a=candidate:").map(function(e){return r.parseCandidate(e)}).filter(function(e){return 1===e.component});if(("offer"===i.type||"answer"===i.type)&&!g&&v&&c>0&&d.transceivers[c]&&(d._disposeIceAndDtlsTransports(c),d.transceivers[c].iceGatherer=d.transceivers[0].iceGatherer,d.transceivers[c].iceTransport=d.transceivers[0].iceTransport,d.transceivers[c].dtlsTransport=d.transceivers[0].dtlsTransport,d.transceivers[c].rtpSender&&d.transceivers[c].rtpSender.setTransport(d.transceivers[0].dtlsTransport),d.transceivers[c].rtpReceiver&&d.transceivers[c].rtpReceiver.setTransport(d.transceivers[0].dtlsTransport)),"offer"!==i.type||g)"answer"!==i.type||g||(C=(b=d.transceivers[c]).iceGatherer,T=b.iceTransport,R=b.dtlsTransport,A=b.rtpReceiver,k=b.sendEncodingParameters,I=b.localCapabilities,d.transceivers[c].recvEncodingParameters=w,d.transceivers[c].remoteCapabilities=N,d.transceivers[c].rtcpParameters=M,x.length&&"new"===T.state&&(!m&&!L||v&&0!==c?x.forEach(function(e){s(b.iceTransport,e)}):T.setRemoteCandidates(x)),v&&0!==c||("new"===T.state&&T.start(C,D,"controlling"),"new"===R.state&&R.start(O)),!o(b.localCapabilities,b.remoteCapabilities).codecs.filter(function(e){return"rtx"===e.name.toLowerCase()}).length&&b.sendEncodingParameters[0].rtx&&delete b.sendEncodingParameters[0].rtx,d._transceive(b,"sendrecv"===_||"recvonly"===_,"sendrecv"===_||"sendonly"===_),!A||"sendrecv"!==_&&"sendonly"!==_?delete b.rtpReceiver:(P=A.track,S?(l[S.stream]||(l[S.stream]=new e.MediaStream),n(P,l[S.stream]),h.push([P,A,l[S.stream]])):(l.default||(l.default=new e.MediaStream),n(P,l.default),h.push([P,A,l.default]))));else{(b=d.transceivers[c]||d._createTransceiver(p)).mid=E,b.iceGatherer||(b.iceGatherer=d._createIceGatherer(c,v)),x.length&&"new"===b.iceTransport.state&&(!L||v&&0!==c?x.forEach(function(e){s(b.iceTransport,e)}):b.iceTransport.setRemoteCandidates(x)),I=e.RTCRtpReceiver.getCapabilities(p),t<15019&&(I.codecs=I.codecs.filter(function(e){return"rtx"!==e.name})),k=b.sendEncodingParameters||[{ssrc:1001*(2*c+2)}];var F,j=!1;"sendrecv"===_||"sendonly"===_?(j=!b.rtpReceiver,A=b.rtpReceiver||new e.RTCRtpReceiver(b.dtlsTransport,p),j&&(P=A.track,S&&"-"===S.stream||(S?(l[S.stream]||(l[S.stream]=new e.MediaStream,Object.defineProperty(l[S.stream],"id",{get:function(){return S.stream}})),Object.defineProperty(P,"id",{get:function(){return S.track}}),F=l[S.stream]):(l.default||(l.default=new e.MediaStream),F=l.default)),F&&(n(P,F),b.associatedRemoteMediaStreams.push(F)),h.push([P,A,F]))):b.rtpReceiver&&b.rtpReceiver.track&&(b.associatedRemoteMediaStreams.forEach(function(t){var n=t.getTracks().find(function(e){return e.id===b.rtpReceiver.track.id});n&&(function(t,n){n.removeTrack(t),n.dispatchEvent(new e.MediaStreamTrackEvent("removetrack",{track:t}))})(n,t)}),b.associatedRemoteMediaStreams=[]),b.localCapabilities=I,b.remoteCapabilities=N,b.rtpReceiver=A,b.rtcpParameters=M,b.sendEncodingParameters=k,b.recvEncodingParameters=w,d._transceive(d.transceivers[c],!1,j)}}}),void 0===d._dtlsRole&&(d._dtlsRole="offer"===i.type?"active":"passive"),d._remoteDescription={type:i.type,sdp:i.sdp},"offer"===i.type?d._updateSignalingState("have-remote-offer"):d._updateSignalingState("stable"),Object.keys(l).forEach(function(t){var n=l[t];if(n.getTracks().length){if(-1===d.remoteStreams.indexOf(n)){d.remoteStreams.push(n);var r=new Event("addstream");r.stream=n,e.setTimeout(function(){d._dispatchEvent("addstream",r)})}h.forEach(function(e){var t=e[0],r=e[1];n.id===e[2].id&&u(d,t,r,[n])})}}),h.forEach(function(e){e[2]||u(d,e[0],e[1],[])}),e.setTimeout(function(){d&&d.transceivers&&d.transceivers.forEach(function(e){e.iceTransport&&"new"===e.iceTransport.state&&e.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),e.iceTransport.addRemoteCandidate({}))})},4e3),Promise.resolve()},d.prototype.close=function(){this.transceivers.forEach(function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()}),this._isClosed=!0,this._updateSignalingState("closed")},d.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",t)},d.prototype._maybeFireNegotiationNeeded=function(){var t=this;"stable"===this.signalingState&&!0!==this.needNegotiation&&(this.needNegotiation=!0,e.setTimeout(function(){if(t.needNegotiation){t.needNegotiation=!1;var e=new Event("negotiationneeded");t._dispatchEvent("negotiationneeded",e)}},0))},d.prototype._updateIceConnectionState=function(){var e,t={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(e){e.iceTransport&&!e.rejected&&t[e.iceTransport.state]++}),e="new",t.failed>0?e="failed":t.checking>0?e="checking":t.disconnected>0?e="disconnected":t.new>0?e="new":t.connected>0?e="connected":t.completed>0&&(e="completed"),e!==this.iceConnectionState){this.iceConnectionState=e;var n=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",n)}},d.prototype._updateConnectionState=function(){var e,t={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(e){e.iceTransport&&e.dtlsTransport&&!e.rejected&&(t[e.iceTransport.state]++,t[e.dtlsTransport.state]++)}),t.connected+=t.completed,e="new",t.failed>0?e="failed":t.connecting>0?e="connecting":t.disconnected>0?e="disconnected":t.new>0?e="new":t.connected>0&&(e="connected"),e!==this.connectionState){this.connectionState=e;var n=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",n)}},d.prototype.createOffer=function(){var n=this;if(n._isClosed)return Promise.reject(c("InvalidStateError","Can not call createOffer after close"));var o=n.transceivers.filter(function(e){return"audio"===e.kind}).length,a=n.transceivers.filter(function(e){return"video"===e.kind}).length,s=arguments[0];if(s){if(s.mandatory||s.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==s.offerToReceiveAudio&&(o=!0===s.offerToReceiveAudio?1:!1===s.offerToReceiveAudio?0:s.offerToReceiveAudio),void 0!==s.offerToReceiveVideo&&(a=!0===s.offerToReceiveVideo?1:!1===s.offerToReceiveVideo?0:s.offerToReceiveVideo)}for(n.transceivers.forEach(function(e){"audio"===e.kind?--o<0&&(e.wantReceive=!1):"video"===e.kind&&--a<0&&(e.wantReceive=!1)});o>0||a>0;)o>0&&(n._createTransceiver("audio"),o--),a>0&&(n._createTransceiver("video"),a--);var u=r.writeSessionBoilerplate(n._sdpSessionId,n._sdpSessionVersion++);n.transceivers.forEach(function(i,o){var a=i.track,s=i.kind,c=i.mid||r.generateIdentifier();i.mid=c,i.iceGatherer||(i.iceGatherer=n._createIceGatherer(o,n.usingBundle));var u=e.RTCRtpSender.getCapabilities(s);t<15019&&(u.codecs=u.codecs.filter(function(e){return"rtx"!==e.name})),u.codecs.forEach(function(e){"H264"===e.name&&void 0===e.parameters["level-asymmetry-allowed"]&&(e.parameters["level-asymmetry-allowed"]="1"),i.remoteCapabilities&&i.remoteCapabilities.codecs&&i.remoteCapabilities.codecs.forEach(function(t){e.name.toLowerCase()===t.name.toLowerCase()&&e.clockRate===t.clockRate&&(e.preferredPayloadType=t.payloadType)})}),u.headerExtensions.forEach(function(e){(i.remoteCapabilities&&i.remoteCapabilities.headerExtensions||[]).forEach(function(t){e.uri===t.uri&&(e.id=t.id)})});var d=i.sendEncodingParameters||[{ssrc:1001*(2*o+1)}];a&&t>=15019&&"video"===s&&!d[0].rtx&&(d[0].rtx={ssrc:d[0].ssrc+1}),i.wantReceive&&(i.rtpReceiver=new e.RTCRtpReceiver(i.dtlsTransport,s)),i.localCapabilities=u,i.sendEncodingParameters=d}),"max-compat"!==n._config.bundlePolicy&&(u+="a=group:BUNDLE "+n.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n"),u+="a=ice-options:trickle\r\n",n.transceivers.forEach(function(e,t){u+=i(e,e.localCapabilities,"offer",e.stream,n._dtlsRole),u+="a=rtcp-rsize\r\n",!e.iceGatherer||"new"===n.iceGatheringState||0!==t&&n.usingBundle||(e.iceGatherer.getLocalCandidates().forEach(function(e){e.component=1,u+="a="+r.writeCandidate(e)+"\r\n"}),"completed"===e.iceGatherer.state&&(u+="a=end-of-candidates\r\n"))});var d=new e.RTCSessionDescription({type:"offer",sdp:u});return Promise.resolve(d)},d.prototype.createAnswer=function(){var n=this;if(n._isClosed)return Promise.reject(c("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==n.signalingState&&"have-local-pranswer"!==n.signalingState)return Promise.reject(c("InvalidStateError","Can not call createAnswer in signalingState "+n.signalingState));var a=r.writeSessionBoilerplate(n._sdpSessionId,n._sdpSessionVersion++);n.usingBundle&&(a+="a=group:BUNDLE "+n.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n"),a+="a=ice-options:trickle\r\n";var s=r.getMediaSections(n._remoteDescription.sdp).length;n.transceivers.forEach(function(e,r){if(!(r+1>s)){if(e.rejected)return"application"===e.kind?"DTLS/SCTP"===e.protocol?a+="m=application 0 DTLS/SCTP 5000\r\n":a+="m=application 0 "+e.protocol+" webrtc-datachannel\r\n":"audio"===e.kind?a+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===e.kind&&(a+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),void(a+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+e.mid+"\r\n");var c;e.stream&&("audio"===e.kind?c=e.stream.getAudioTracks()[0]:"video"===e.kind&&(c=e.stream.getVideoTracks()[0]),c&&t>=15019&&"video"===e.kind&&!e.sendEncodingParameters[0].rtx&&(e.sendEncodingParameters[0].rtx={ssrc:e.sendEncodingParameters[0].ssrc+1}));var u=o(e.localCapabilities,e.remoteCapabilities);!u.codecs.filter(function(e){return"rtx"===e.name.toLowerCase()}).length&&e.sendEncodingParameters[0].rtx&&delete e.sendEncodingParameters[0].rtx,a+=i(e,u,"answer",e.stream,n._dtlsRole),e.rtcpParameters&&e.rtcpParameters.reducedSize&&(a+="a=rtcp-rsize\r\n")}});var u=new e.RTCSessionDescription({type:"answer",sdp:a});return Promise.resolve(u)},d.prototype.addIceCandidate=function(e){var t,n=this;return e&&void 0===e.sdpMLineIndex&&!e.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise(function(i,o){if(!n._remoteDescription)return o(c("InvalidStateError","Can not add ICE candidate without a remote description"));if(e&&""!==e.candidate){var a=e.sdpMLineIndex;if(e.sdpMid)for(var u=0;u0?r.parseCandidate(e.candidate):{};if("tcp"===l.protocol&&(0===l.port||9===l.port))return i();if(l.component&&1!==l.component)return i();if((0===a||a>0&&d.iceTransport!==n.transceivers[0].iceTransport)&&!s(d.iceTransport,l))return o(c("OperationError","Can not add ICE candidate"));var h=e.candidate.trim();0===h.indexOf("a=")&&(h=h.substr(2)),(t=r.getMediaSections(n._remoteDescription.sdp))[a]+="a="+(l.type?h:"end-of-candidates")+"\r\n",n._remoteDescription.sdp=r.getDescription(n._remoteDescription.sdp)+t.join("")}else for(var p=0;pthis.maxstats&&(i.values.shift(),i.times.shift()),i.endTime=o};var k=function(e){return null==e?"":"type: "+e.type+"\r\n"+e.sdp};A.prototype.getConnectionState=function(){var e=this.peerconnection.iceConnectionState;return"completed"===e?"connected":e},A.prototype._getDesiredMediaDirection=function(e){var t=!0;return e===c.a?t=this.audioTransferActive:e===c.c&&(t=this.videoTransferActive),t?this.hasAnyTracksOfType(e)?"sendrecv":"recvonly":"inactive"},A.prototype.isSimulcastOn=function(){return!this.options.disableSimulcast},A.prototype._peerVideoTypeChanged=function(e,t){if(e){var n=this.getRemoteTracks(e,c.c);n.length&&n[0]._setVideoType(t)}else R.error("No endpointID on peerVideoTypeChanged "+this)},A.prototype._peerMutedChanged=function(e,t,n){if(e){var r=this.getRemoteTracks(e,t);r.length&&r[0].setMute(n)}else R.error("On peerMuteChanged - no endpoint ID")},A.prototype.getAudioLevels=function(){var e={};return this.peerconnection.getReceivers().filter(function(e){return e.track&&e.track.kind===c.a}).forEach(function(t){var n=t.getSynchronizationSources();n&&n.length&&(e[n[0].source]=n[0].audioLevel)}),e},A.prototype.getLocalTracks=function(e){var t=Array.from(this.localTracks.values());return void 0!==e&&(t=t.filter(function(t){return t.getType()===e})),t},A.prototype.getLocalVideoTrack=function(){return this.getLocalTracks(c.c)[0]},A.prototype.hasAnyTracksOfType=function(e){if(!e)throw new Error('"mediaType" is required');return this.getLocalTracks(e).length>0},A.prototype.getRemoteTracks=function(e,t){var n=[],r=e?[e]:this.remoteTracks.keys(),i=Array.isArray(r),o=0;for(r=i?r:r["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var a;if(i){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var s=a,c=this.remoteTracks.get(s);if(c){var u=c.keys(),d=Array.isArray(u),l=0;for(u=d?u:u["function"==typeof Symbol&&"function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var h;if(d){if(l>=u.length)break;h=u[l++]}else{if((l=u.next()).done)break;h=l.value}var p=h;if(!t||t===p){var f=c.get(p);f&&n.push(f)}}}}return n},A.prototype.getTrackBySSRC=function(e){if("number"!=typeof e)throw new Error("SSRC "+e+" is not a number");var t=this.localTracks.values(),n=Array.isArray(t),r=0;for(t=n?t:t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}var o=i;if(this.getLocalSSRC(o)===e)return o}var a=this.getRemoteTracks(),s=Array.isArray(a),c=0;for(a=s?a:a["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var u;if(s){if(c>=a.length)break;u=a[c++]}else{if((c=a.next()).done)break;u=c.value}var d=u;if(d.getSSRC()===e)return d}return null},A.prototype.getSsrcByTrackId=function(e){var t=function(t){return t.getTrack().id===e},n=this.getLocalTracks().find(t);if(n)return this.getLocalSSRC(n);var r=this.getRemoteTracks().find(t);return r?r.getSSRC():null},A.prototype._remoteStreamAdded=function(e){var t=this,n=b.a.getStreamID(e);if(b.a.isUserStreamById(n)){p.a.isChromiumBased()&&(e.onaddtrack=function(n){t._remoteTrackAdded(e,n.track)},e.onremovetrack=function(n){t._remoteTrackRemoved(e,n.track)});var r=e.getAudioTracks(),i=Array.isArray(r),o=0;for(r=i?r:r["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var a;if(i){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var s=a;this._remoteTrackAdded(e,s)}var c=e.getVideoTracks(),u=Array.isArray(c),d=0;for(c=u?c:c["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var l;if(u){if(d>=c.length)break;l=c[d++]}else{if((d=c.next()).done)break;l=d.value}var h=l;this._remoteTrackAdded(e,h)}}else R.info(this+" ignored remote 'stream added' event for non-user streamid: "+n)},A.prototype._remoteTrackAdded=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=b.a.getStreamID(e),i=t.kind;if(this.isP2P||b.a.isUserStreamById(r))if(R.info(this+" remote track added:",r,i),i){var o,a=p.a.usesPlanB()?new v.a(this.remoteDescription.sdp):new v.a(this.peerconnection.remoteDescription.sdp);if(p.a.usesUnifiedPlan())if(n&&n.mid){var s=n.mid;o=a.media.filter(function(e){return g.a.findLine(e,"a=mid:"+s)})}else o=a.media.filter(function(e){var t=g.a.findLine(e,"a=msid");return void 0!==t&&r===t.substring(7).split(" ")[0]});else o=a.media.filter(function(e){return e.startsWith("m="+i)});if(o.length){var c=g.a.findLines(o[0],"a=ssrc:");if((c=c.filter(function(e){return-1!==e.indexOf("msid:"+r)})).length){var u=c[0].substring(7).split(" ")[0],d=Number(u),l=this.signalingLayer.getSSRCOwner(d);if(isNaN(d)||d<0)f.callErrorHandler(new Error("Invalid SSRC: "+u+" for remote track, msid: "+r+" media type: "+i));else if(l){R.log(this+" associated ssrc",l,d);var h=this.signalingLayer.getPeerMediaInfo(l,i);if(h){var m=h.muted,y=h.videoType;this._createRemoteTrack(l,e,t,i,y,d,m)}else f.callErrorHandler(new Error(this+": no peer media info available for "+l))}else f.callErrorHandler(new Error("No SSRC owner known for: "+d+" for remote track, msid: "+r+" media type: "+i))}else f.callErrorHandler(new Error("No SSRC lines for streamId "+r+" for remote track, media type: "+i))}else f.callErrorHandler(new Error("No media lines for type "+i+" found in remote SDP for remote track: "+r))}else f.callErrorHandler(new Error("MediaType undefined for remote track, stream id: "+r));else R.info(this+" ignored remote 'stream added' event for non-user streamid: "+r)},A.prototype._createRemoteTrack=function(e,t,n,r,i,o,a){var s=this.remoteTracks.get(e);s||(s=new Map,this.remoteTracks.set(e,s));var c=s.get(r);if(c&&c.getTrack()===n)R.info(this+" ignored duplicated remote track added event for: "+e+", "+r);else{c&&R.error(this+" overwriting remote track for"+e+" "+r);var u=new S.a(this.rtc,this.rtc.conference,e,t,n,r,i,o,a,this.isP2P);s.set(r,u),this.eventEmitter.emit(d.a.REMOTE_TRACK_ADDED,u,this)}},A.prototype._remoteStreamRemoved=function(e){if(b.a.isUserStream(e)){var t=e.getVideoTracks(),n=Array.isArray(t),r=0;for(t=n?t:t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}var o=i;this._remoteTrackRemoved(e,o)}var a=e.getAudioTracks(),s=Array.isArray(a),c=0;for(a=s?a:a["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var u;if(s){if(c>=a.length)break;u=a[c++]}else{if((c=a.next()).done)break;u=c.value}var d=u;this._remoteTrackRemoved(e,d)}}else{var l=b.a.getStreamID(e);R.info("Ignored remote 'stream removed' event for non-user stream "+l)}},A.prototype._remoteTrackRemoved=function(e,t){var n=b.a.getStreamID(e),r=t&&b.a.getTrackID(t);R.info(this+" - remote track removed: "+n+", "+r),n?r?this._removeRemoteTrackById(n,r)||R.warn(this+" Removed track not found for msid: "+n+",\n track id: "+r):f.callErrorHandler(new Error(this+" remote track removal failed - no track ID")):f.callErrorHandler(new Error(this+" remote track removal failed - no stream ID"))},A.prototype._getRemoteTrackById=function(e,t){var n=this.remoteTracks.values(),r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o.values(),s=Array.isArray(a),c=0;for(a=s?a:a["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var u;if(s){if(c>=a.length)break;u=a[c++]}else{if((c=a.next()).done)break;u=c.value}var d=u;if(d.getStreamId()==e&&d.getTrackId()==t)return d}}},A.prototype.removeRemoteTracks=function(e){var t=[],n=this.remoteTracks.get(e);if(n){var r=n.get(c.a),i=n.get(c.c);r&&t.push(r),i&&t.push(i),this.remoteTracks.delete(e)}return R.debug(this+" removed remote tracks for "+e+" count: "+t.length),t},A.prototype._removeRemoteTrack=function(e){e.dispose();var t=e.getParticipantId(),n=this.remoteTracks.get(t);n?n.delete(e.getType())||R.error("Failed to remove "+e+" - type mapping messed up ?"):R.error("removeRemoteTrack: no remote tracks map for "+t),this.eventEmitter.emit(d.a.REMOTE_TRACK_REMOVED,e)},A.prototype._removeRemoteTrackById=function(e,t){var n=this._getRemoteTrackById(e,t);return n&&this._removeRemoteTrack(n),n};var w=function(e){if("object"!=typeof e||null===e||"string"!=typeof e.sdp)return R.warn("An empty description was passed as an argument."),e;var t=n(25),r=t.parse(e.sdp);void 0!==r&&void 0!==r.media&&Array.isArray(r.media)&&r.media.forEach(function(e){var t=[],n=[];if(void 0!==e.ssrcGroups&&Array.isArray(e.ssrcGroups)&&e.ssrcGroups.forEach(function(e){void 0!==e.semantics&&"FID"===e.semantics&&void 0!==e.ssrcs&&t.push(Number(e.ssrcs.split(" ")[0]))}),Array.isArray(e.ssrcs)){var r;for(r=0;r=0&&(n.push(e.ssrcs[r]),delete e.ssrcs[r]);for(r=0;r0&&void 0!==arguments[0]?arguments[0]:[];if(!p.a.isChrome()||!p.a.isVersionGreaterThan(70))return e;var t=_toConsumableArray(e);return e.filter(function(e){return"mslabel"===e.attribute&&"-"===e.value}).map(function(e){return e.id}).forEach(function(e){var n=t.find(function(t){return t.id===e&&"cname"===t.attribute});n.value="recvonly-"+e,(t=t.filter(function(t){return t.id!==e})).push(n)}),t})(n)}});var i=t.write(r);return new RTCSessionDescription({type:e.type,sdp:i})};A.prototype.getLocalSSRC=function(e){var t=this._getSSRC(e.rtcId);return t&&t.ssrcs[0]},A.prototype._injectSsrcGroupForUnifiedSimulcast=function(e){var t=a.a.parse(e.sdp),n=t.media.find(function(e){return"video"===e.type});n.ssrcGroups=n.ssrcGroups||[];var r=n.ssrcGroups.filter(function(e){return"FID"===e.semantics});if(n.simulcast||n.simulcast_03){var i=[];if(r&&r.length?r.forEach(function(e){i.push(e.ssrcs.split(" ")[0])}):n.ssrcs.forEach(function(e){"msid"===e.attribute&&i.push(e.id)}),n.ssrcGroups.find(function(e){return"SIM"===e.semantics}))return e;n.ssrcGroups.push({semantics:"SIM",ssrcs:i.join(" ")})}return new RTCSessionDescription({type:e.type,sdp:a.a.write(t)})};var I={signalingState:function(){return this.peerconnection.signalingState},iceConnectionState:function(){return this.peerconnection.iceConnectionState},localDescription:function(){var e=this.peerconnection.localDescription;return e?(this.trace("getLocalDescription::preTransform",k(e)),p.a.usesUnifiedPlan()?(e=this.interop.toPlanB(e),this.trace("getLocalDescription::postTransform (Plan B)",k(e)),e=this._injectSsrcGroupForUnifiedSimulcast(e),this.trace("getLocalDescription::postTransform (inject ssrc group)",k(e))):(p.a.doesVideoMuteByStreamRemove()&&(e=this.localSdpMunger.maybeAddMutedLocalVideoTracksToSDP(e),R.debug("getLocalDescription::postTransform (munge local SDP)",e)),e=(function(e,t){if(!e)throw new Error("No local description passed in.");var n=new _.a(e.sdp),r=n.selectMedia("audio"),i=!1;r&&"sendrecv"!==r.direction&&(t.startSilent?r.direction="inactive":r.direction="sendrecv",i=!0);var o=n.selectMedia("video");return o&&"sendrecv"!==o.direction&&(o.direction="sendrecv",i=!0),i?new RTCSessionDescription({type:e.type,sdp:n.toRawSDP()}):e})(e,this.options)),e=this.localSdpMunger.transformStreamIdentifiers(e)):(R.debug("getLocalDescription no localDescription found"),{})},remoteDescription:function(){var e=this.peerconnection.remoteDescription;return e?(this.trace("getRemoteDescription::preTransform",k(e)),p.a.usesUnifiedPlan()&&(e=this.interop.toPlanB(e),this.trace("getRemoteDescription::postTransform (Plan B)",k(e))),e):(R.debug("getRemoteDescription no remoteDescription found"),{})}};function P(e){return e.getLocalTracks().some(function(e){return"camera"===e.videoType})}Object.keys(I).forEach(function(e){Object.defineProperty(A.prototype,e,{get:I[e]})}),A.prototype._getSSRC=function(e){return this.localSSRCs.get(e)},A.prototype._mungeCodecOrder=function(e){var t=this;if(!this.codecPreference||p.a.supportsCodecPreferences())return e;var n=a.a.parse(e.sdp),r=n.media.find(function(e){return e.type===t.codecPreference.mediaType});return this.codecPreference.enable?(g.a.preferCodec(r,this.codecPreference.mimeType),this.codecPreference.mimeType===s.H264&&p.a.isReactNative()&&this.isP2P&&g.a.stripCodec(r,this.codecPreference.mimeType,!0)):g.a.stripCodec(r,this.codecPreference.mimeType),new RTCSessionDescription({type:e.type,sdp:a.a.write(n)})},A.prototype.containsTrack=function(e){if(e.isLocal())return this.localTracks.has(e.rtcId);var t=e.getParticipantId(),n=this.remoteTracks.get(t);return Boolean(n&&n.get(e.getType())===e)},A.prototype.addTrack=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.rtcId;if(R.info("add "+e+" to: "+this),this.localTracks.has(n))return Promise.reject(new Error(e+" is already in "+this));if(this.localTracks.set(n,e),p.a.usesUnifiedPlan()&&this.isP2P)this.tpcUtils.addTrack(e,t);else{var r=e.getOriginalStream();if(r)this._addStream(r);else if(!p.a.doesVideoMuteByStreamRemove()||e.isAudioTrack()||e.isVideoTrack()&&!e.isMuted())return Promise.reject(new Error(this+" no WebRTC stream for: "+e));if(p.a.usesPlanB()&&p.a.doesVideoMuteByStreamRemove()&&e.isVideoTrack()&&e.isMuted()){var i=this.generateNewStreamSSRCInfo(e);this.sdpConsistency.setPrimarySsrc(i.ssrcs[0]);var o=i.groups.find(function(e){return"SIM"===e.semantics});o&&this.simulcast.setSsrcCache(o.ssrcs);var a=i.groups.filter(function(e){return"FID"===e.semantics});if(a){var s=new Map;a.forEach(function(e){var t=e.ssrcs[0],n=e.ssrcs[1];s.set(t,n)}),this.rtxModifier.setSsrcCache(s)}}}var c=Promise.resolve();return p.a.isFirefox()&&(c=this.tpcUtils.setEncodings(e)),c},A.prototype.addTrackUnmute=function(e){if(!this._assertTrackBelongs("addTrackUnmute",e))return Promise.reject("Track not found on the peerconnection");R.info("Adding "+e+" as unmute to "+this);var t=e.getOriginalStream();return t?p.a.usesUnifiedPlan()?this.tpcUtils.addTrackUnmute(e):(this._addStream(t),Promise.resolve(!0)):(R.error("Unable to add "+e+" as unmute to "+this+" - no WebRTC stream"),Promise.reject("Stream not found"))},A.prototype._addStream=function(e){this.peerconnection.addStream(e),this._addedStreams.push(e)},A.prototype._removeStream=function(e){this.peerconnection.removeStream(e),this._addedStreams=this._addedStreams.filter(function(t){return t!==e})},A.prototype._assertTrackBelongs=function(e,t){var n=this.localTracks.has(t.rtcId);return n||R.error(e+": "+t+" does not belong to "+this),n},A.prototype.isMediaStreamInPc=function(e){return this._addedStreams.indexOf(e)>-1},A.prototype.removeTrack=function(e){var t=e.getOriginalStream();this.trace("removeStream",e.rtcId,t?t.id:void 0),this._assertTrackBelongs("removeStream",e)&&(this.localTracks.delete(e.rtcId),this.localSSRCs.delete(e.rtcId),t&&this.peerconnection.removeStream(t))},A.prototype.findSenderByKind=function(e){return this.peerconnection.getSenders().find(function(t){return t.track&&t.track.kind===e})},A.prototype.findReceiverForTrack=function(e){return this.peerconnection.getReceivers().find(function(t){return t.track===e})},A.prototype.findSenderForTrack=function(e){return this.peerconnection.getSenders().find(function(t){return t.track===e})},A.prototype.replaceTrack=function(e,t){var n=this;if(p.a.usesUnifiedPlan())return this.tpcUtils.replaceTrack(e,t).then(function(){return n.isSimulcastOn()&&p.a.usesSdpMungingForSimulcast()});var r=Promise.resolve();return e&&this.removeTrack(e),t&&(r=this.addTrack(t)),r.then(function(){return!0})},A.prototype.removeTrackMute=function(e){var t=e.getOriginalStream();return this.trace("removeStreamMute",e.rtcId,t?t.id:null),this._assertTrackBelongs("removeStreamMute",e)?p.a.usesUnifiedPlan()?this.tpcUtils.removeTrackMute(e):t?(R.info("Removing "+e+" as mute from "+this),this._removeStream(t),Promise.resolve(!0)):(R.error("removeStreamMute - no WebRTC stream for "+e),Promise.reject("Stream not found")):Promise.reject("Track not found in the peerconnection")},A.prototype.createDataChannel=function(e,t){return this.trace("createDataChannel",e,t),this.peerconnection.createDataChannel(e,t)},A.prototype._ensureSimulcastGroupIsLast=function(e){var t=e.sdp,n=t.indexOf("m=video"),r=t.indexOf("a=ssrc-group:SIM",n),i=t.lastIndexOf("a=ssrc-group");if(-1===r||-1===i||i===r)return e;var o=t.indexOf("\r\n",r),a=t.substring(r,o+2);i=(t=t.replace(a,"")).lastIndexOf("a=ssrc-group");var s=t.indexOf("\r\n",i);return t=t.slice(0,s)+"\r\n"+a.trim()+t.slice(s),new RTCSessionDescription({type:e.type,sdp:t})},A.prototype._adjustLocalMediaDirection=function(e){var t=new _.a(e.sdp),n=!1,r=t.selectMedia("audio");if(r){var i=this._getDesiredMediaDirection(c.a);r.direction!==i&&(r.direction=i,R.info("Adjusted local audio direction to "+i),n=!0)}else R.warn('No "audio" media found int the local description');var o=t.selectMedia("video");if(o){var a=this._getDesiredMediaDirection(c.c);o.direction!==a&&(o.direction=a,R.info("Adjusted local video direction to "+a),n=!0)}else R.warn('No "video" media found in the local description');return n?new RTCSessionDescription({type:e.type,sdp:t.toRawSDP()}):e},A.prototype.setLocalDescription=function(e){var t=this,n=e;return this.trace("setLocalDescription::preTransform",k(n)),n=this._mungeCodecOrder(n),p.a.usesPlanB()?(n=this._adjustLocalMediaDirection(n),n=this._ensureSimulcastGroupIsLast(n)):(n=this.interop.toUnifiedPlan(n),this.trace("setLocalDescription::postTransform (Unified Plan)",k(n))),new Promise(function(e,r){t.peerconnection.setLocalDescription(n).then(function(){t.trace("setLocalDescriptionOnSuccess");var r=g.a.getUfrag(n.sdp);r!==t.localUfrag&&(t.localUfrag=r,t.eventEmitter.emit(d.a.LOCAL_UFRAG_CHANGED,t,r)),e()},function(e){t.trace("setLocalDescriptionOnFailure",e),t.eventEmitter.emit(d.a.SET_LOCAL_DESCRIPTION_FAILED,e,t),r(e)})})},A.prototype.setAudioTransferActive=function(e){R.debug(this+" audio transfer active: "+e);var t=this.audioTransferActive!==e;return this.audioTransferActive=e,p.a.usesUnifiedPlan()?(this.tpcUtils.setAudioTransferActive(e),!1):t},A.prototype.setSenderVideoDegradationPreference=function(){if(!this.peerconnection.getSenders)return R.debug("Browser does not support RTCRtpSender"),Promise.resolve();var e=this.getLocalVideoTrack(),t=this.findSenderByKind(c.c);if(!t)return Promise.resolve();var n=t.getParameters();if(!n.encodings||!n.encodings.length)return Promise.resolve();for(var r in n.encodings)if(n.encodings.hasOwnProperty(r)){var i=e.videoType===h.CAMERA?"maintain-framerate":"maintain-resolution";R.info("Setting video sender degradation preference on "+this+" to "+i),n.encodings[r].degradationPreference=i}return t.setParameters(n)},A.prototype.setMaxBitRate=function(){if(!this.peerconnection.getSenders)return R.debug("Browser doesn't support RTCRtpSender"),Promise.resolve();var e=this.getLocalVideoTrack();if(!e)return Promise.resolve();var t=e.videoType;if(!(this.options.videoQuality&&this.options.videoQuality.maxBitratesVideo||p.a.usesPlanB()&&this.options.capScreenshareBitrate&&t===h.DESKTOP||p.a.usesUnifiedPlan()))return Promise.resolve();var n=e._originalStream&&e._originalStream.id!==e.getStreamId(),r=this.findSenderByKind(c.c);if(!r)return Promise.resolve();var i=r.getParameters();if(!i.encodings||!i.encodings.length)return Promise.resolve();if(this.isSimulcastOn()){for(var o in i.encodings)if(i.encodings.hasOwnProperty(o)){var a=p.a.usesPlanB()&&t===h.DESKTOP&&this.options.capScreenshareBitrate?n?this.videoBitrates.high:5e5:this.tpcUtils.localStreamEncodingsConfig[o].maxBitrate;R.info(this+" Setting a max bitrate of "+a+" bps on layer "+this.tpcUtils.localStreamEncodingsConfig[o].rid),i.encodings[o].maxBitrate=a}}else{var s=this.videoBitrates.high;if(t===h.CAMERA){var u=this.senderVideoMaxHeight?Math.floor(e.resolution/this.senderVideoMaxHeight):1,d=this.tpcUtils.localStreamEncodingsConfig.find(function(e){return e.scaleResolutionDownBy===u});d&&(R.info(this+" Setting a max bitrate of "+d.maxBitrate+" bps on local video track"),s=d.maxBitrate)}i.encodings[0].maxBitrate=s}return r.setParameters(i)},A.prototype.setRemoteDescription=function(e){var t=this;if(this.trace("setRemoteDescription::preTransform",k(e)),e=this._mungeCodecOrder(e),p.a.usesPlanB())this.isSimulcastOn()&&(e=this.simulcast.mungeRemoteDescription(e),this.trace("setRemoteDescription::postTransform (simulcast)",k(e))),e=w(e);else{var n=this.peerconnection.remoteDescription;e=this.interop.toUnifiedPlan(e,n),this.trace("setRemoteDescription::postTransform (Unified)",k(e)),this.isSimulcastOn()&&(e=this.simulcast.mungeRemoteDescription(e),e=this.tpcUtils.insertUnifiedPlanSimulcastReceive(e),this.trace("setRemoteDescription::postTransform (sim receive)",k(e)),e=this.tpcUtils.ensureCorrectOrderOfSsrcs(e))}return new Promise(function(n,r){t.peerconnection.setRemoteDescription(e).then(function(){t.trace("setRemoteDescriptionOnSuccess");var r=g.a.getUfrag(e.sdp);r!==t.remoteUfrag&&(t.remoteUfrag=r,t.eventEmitter.emit(d.a.REMOTE_UFRAG_CHANGED,t,r)),n()},function(e){t.trace("setRemoteDescriptionOnFailure",e),t.eventEmitter.emit(d.a.SET_REMOTE_DESCRIPTION_FAILED,e,t),r(e)})})},A.prototype.setSenderVideoConstraint=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(t<0)throw new Error("Invalid frameHeight: "+t);if(p.a.isReactNative())return Promise.resolve();var n=null===t?this.senderVideoMaxHeight:t;this.senderVideoMaxHeight=n,R.log(this+" senderVideoMaxHeight: "+n);var r=this.getLocalVideoTrack();if(!r||r.isMuted()||r.videoType!==h.CAMERA)return Promise.resolve();var i=this.findSenderByKind(c.c);if(!i)return Promise.resolve();var o=i.getParameters();if(!o||!o.encodings||!o.encodings.length)return Promise.resolve();if(this.isSimulcastOn()){var a=this.tpcUtils.getLocalStreamHeightConstraints(r.track).map(function(e){return e<=n});for(var s in o.encodings)o.encodings.hasOwnProperty(s)&&(o.encodings[s].active=a[s])}else n>0?(o.encodings[0].scaleResolutionDownBy=r.resolution>=n?Math.floor(r.resolution/n):1,o.encodings[0].active=!0):(o.encodings[0].scaleResolutionDownBy=void 0,o.encodings[0].active=!1);return R.info(this+" setting max height of "+n+", encodings: "+JSON.stringify(o.encodings)),i.setParameters(o).then(function(){if(r.maxEnabledResolution=n,e.eventEmitter.emit(d.a.LOCAL_TRACK_MAX_ENABLED_RESOLUTION_CHANGED,r),e.isP2P||!e.isSimulcastOn())return e.setMaxBitRate()})},A.prototype.setVideoTransferActive=function(e){R.debug(this+" video transfer active: "+e);var t=this.videoTransferActive!==e;return this.videoTransferActive=e,p.a.usesUnifiedPlan()?(this.tpcUtils.setVideoTransferActive(e),!1):t},A.prototype.sendTones=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;if(!this._dtmfSender){if(this.peerconnection.getSenders){var r=this.peerconnection.getSenders().find(function(e){return e.dtmf});this._dtmfSender=r&&r.dtmf,this._dtmfSender&&R.info(this+" initialized DTMFSender using getSenders")}if(!this._dtmfSender){var i=Array.from(this.localTracks.values()).find(function(e){return e.isAudioTrack()});this.peerconnection.createDTMFSender&&i&&(this._dtmfSender=this.peerconnection.createDTMFSender(i.getTrack())),this._dtmfSender&&R.info(this+" initialized DTMFSender using deprecated createDTMFSender")}this._dtmfSender&&(this._dtmfSender.ontonechange=this._onToneChange.bind(this))}if(this._dtmfSender){if(this._dtmfSender.toneBuffer)return void this._dtmfTonesQueue.push({tones:e,duration:t,interToneGap:n});this._dtmfSender.insertDTMF(e,t,n)}else R.warn(this+" sendTones - failed to select DTMFSender")},A.prototype._onToneChange=function(e){if(this._dtmfSender&&""===e.tone&&this._dtmfTonesQueue.length){var t=this._dtmfTonesQueue.shift(),n=t.tones,r=t.duration,i=t.interToneGap;this._dtmfSender.insertDTMF(n,r,i)}},A.prototype.generateRecvonlySsrc=function(){var e=g.a.generateSsrc();R.info(this+" generated new recvonly SSRC: "+e),this.sdpConsistency.setPrimarySsrc(e)},A.prototype.clearRecvonlySsrc=function(){R.info("Clearing primary video SSRC!"),this.sdpConsistency.clearVideoSsrcCache()},A.prototype.close=function(){this.trace("stop"),this.signalingLayer.off(l.a,this._peerMutedChanged),this.signalingLayer.off(l.b,this._peerVideoTypeChanged);var e=this.remoteTracks.values(),t=Array.isArray(e),n=0;for(e=t?e:e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var r;if(t){if(n>=e.length)break;r=e[n++]}else{if((n=e.next()).done)break;r=n.value}var i=r.values(),o=Array.isArray(i),a=0;for(i=o?i:i["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var s;if(o){if(a>=i.length)break;s=i[a++]}else{if((a=i.next()).done)break;s=a.value}var c=s;this._removeRemoteTrack(c)}}this.remoteTracks.clear(),this._addedStreams=[],this._dtmfSender=null,this._dtmfTonesQueue=[],this.rtc._removePeerConnection(this)||R.error("RTC._removePeerConnection returned false"),null!==this.statsinterval&&(window.clearInterval(this.statsinterval),this.statsinterval=null),R.info("Closing "+this+"..."),this.peerconnection.close()},A.prototype.createAnswer=function(e){return this._createOfferOrAnswer(!1,e)},A.prototype.createOffer=function(e){return this._createOfferOrAnswer(!0,e)},A.prototype._createOfferOrAnswer=function(e,t){var n=this,r=e?"Offer":"Answer";this.trace("create"+r,JSON.stringify(t,null," "));var i=function(e,t,i){try{n.trace("create"+r+"OnSuccess::preTransform",k(e)),p.a.usesPlanB()&&(n.hasAnyTracksOfType(c.c)||n.sdpConsistency.hasPrimarySsrcCached()||n.generateRecvonlySsrc(),e=new RTCSessionDescription({type:e.type,sdp:n.sdpConsistency.makeVideoPrimarySsrcsConsistent(e.sdp)}),n.trace("create"+r+"OnSuccess::postTransform (make primary audio/video ssrcs consistent)",k(e))),n.isSimulcastOn()&&p.a.usesSdpMungingForSimulcast()&&(!n.options.capScreenshareBitrate||n.options.capScreenshareBitrate&&P(n))&&(e=n.simulcast.mungeLocalDescription(e),n.trace("create"+r+"OnSuccess::postTransform (simulcast)",k(e))),!n.options.disableRtx&&p.a.usesSdpMungingForSimulcast()&&(e=new RTCSessionDescription({type:e.type,sdp:n.rtxModifier.modifyRtxSsrcs(e.sdp)}),n.trace("create"+r+"OnSuccess::postTransform (rtx modifier)",k(e)));var o=(function(e){var t=new Map,n=new Map;if("object"!=typeof e||null===e||"string"!=typeof e.sdp)return R.warn("An empty description was passed as an argument."),t;var r=a.a.parse(e.sdp);if(!Array.isArray(r.media))return t;var i=r.media,o=Array.isArray(i),s=0;for(i=o?i:i["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var c;if(o){if(s>=i.length)break;c=i[s++]}else{if((s=i.next()).done)break;c=s.value}var u=c;if(Array.isArray(u.ssrcs)){if(Array.isArray(u.ssrcGroups)){var d=u.ssrcGroups,l=Array.isArray(d),h=0;for(d=l?d:d["function"==typeof Symbol&&"function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var p;if(l){if(h>=d.length)break;p=d[h++]}else{if((h=d.next()).done)break;p=h.value}var f=p;if(void 0!==f.semantics&&void 0!==f.ssrcs){var m=f.ssrcs.split(" ").map(function(e){return parseInt(e,10)}),v=m[0];f.ssrcs=m,n.has(v)||n.set(v,[]),n.get(v).push(f)}}}var g=u.ssrcs,y=Array.isArray(g),_=0;for(g=y?g:g["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var S;if(y){if(_>=g.length)break;S=g[_++]}else{if((_=g.next()).done)break;S=_.value}var E=S;if("msid"===E.attribute){var b=E.value,C=t.get(b);C||(C={ssrcs:[],groups:[],msid:b},t.set(b,C));var T=E.id;if(C.ssrcs.push(T),n.has(T)){var A=n.get(T),k=Array.isArray(A),w=0;for(A=k?A:A["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var I;if(k){if(w>=A.length)break;I=A[w++]}else{if((w=A.next()).done)break;I=w.value}var P=I;C.groups.push(P)}}}}}}return t})(e);R.debug("Got local SSRCs MAP: ",o),n._processLocalSSRCsMap(o),t(e)}catch(t){n.trace("create"+r+"OnError",t),n.trace("create"+r+"OnError",k(e)),R.error("create"+r+"OnError",t,k(e)),i(t)}},o=function(t,i){n.trace("create"+r+"OnFailure",t);var o=e?d.a.CREATE_OFFER_FAILED:d.a.CREATE_ANSWER_FAILED;n.eventEmitter.emit(o,t,n),i(t)};return new Promise(function(r,a){(e?n.peerconnection.createOffer(t):n.peerconnection.createAnswer(t)).then(function(e){return i(e,r,a)},function(e){return o(e,a)})})},A.prototype._extractPrimarySSRC=function(e){return e&&e.groups&&e.groups.length?e.groups[0].ssrcs[0]:e&&e.ssrcs&&e.ssrcs.length?e.ssrcs[0]:null},A.prototype._processLocalSSRCsMap=function(e){var t=this.localTracks.values(),n=Array.isArray(t),r=0;for(t=n?t:t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}var o=i,a=o.storedMSID;if(e.has(a)){var s=e.get(a);if(!s)return void R.error("No SSRC found for: "+a+" in "+this);var c=this.localSSRCs.get(o.rtcId),u=this._extractPrimarySSRC(s),l=this._extractPrimarySSRC(c);u!==l?(null===l?R.info("Storing new local SSRC for "+o+" in "+this,s):R.error("Overwriting SSRC for "+o+" "+a+" in "+this+" with: ",s),this.localSSRCs.set(o.rtcId,s),this.eventEmitter.emit(d.a.LOCAL_TRACK_SSRC_UPDATED,o,u)):R.debug("The local SSRC("+u+") for "+o+" "+a+"is still up to date in "+this)}else o.isVideoTrack()||o.isMuted()||R.warn("No SSRCs found in the local SDP for "+o+" MSID: "+a+" in "+this)}},A.prototype.addIceCandidate=function(e){return this.trace("addIceCandidate",JSON.stringify({candidate:e.candidate,sdpMid:e.sdpMid,sdpMLineIndex:e.sdpMLineIndex,usernameFragment:e.usernameFragment},null," ")),this.peerconnection.addIceCandidate(e)},A.prototype.getStats=function(e,t){p.a.isSafari()||p.a.isFirefox()||p.a.isReactNative()?this.peerconnection.getStats().then(e).catch(t||function(){}):this.peerconnection.getStats(e)},A.prototype.generateNewStreamSSRCInfo=function(e){var t=e.rtcId,n=this._getSSRC(t);if(n&&R.error("Will overwrite local SSRCs for track ID: "+t),this.isSimulcastOn()&&(!this.options.capScreenshareBitrate||this.options.capScreenshareBitrate&&P(this))){n={ssrcs:[],groups:[]};for(var r=0;r=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}var u=c,d=e.getSSRCAttrValue(u,"msid"),l=e.getSSRCAttrValue(u,"cname"),h=this.correspondingRtxSsrcs.get(u);if(h)a.debug("Already have an associated rtx ssrc forvideo ssrc "+u+": "+h);else{a.debug("No previously associated rtx ssrc for video ssrc "+u);var p=e.getRtxSSRC(u);p?(a.debug("Rtx stream "+p+" already existed in the sdp as an rtx stream for "+u),h=p):(h=i.a.generateSsrc(),a.debug("Generated rtx ssrc "+h+" for ssrc "+u)),a.debug("Caching rtx ssrc "+h+" for video ssrc "+u),this.correspondingRtxSsrcs.set(u,h)}s(e,{id:u,cname:l,msid:d},h)}return!0}},{key:"stripRtx",value:function(e){var t=new o.a(e),n=t.selectMedia("video");if(!n)return a.debug("No 'video' media found in the sdp: "+e),e;if("recvonly"===n.direction)return a.debug("RtxModifier doing nothing, video m line is recvonly"),e;if(n.getSSRCCount()<1)return a.debug("RtxModifier doing nothing, no video ssrcs present"),e;if(!n.containsAnySSRCGroups())return a.debug("RtxModifier doing nothing, no video ssrcGroups present"),e;var r=n.findGroups("FID");n.removeGroupsBySemantics("FID");var i=r,s=Array.isArray(i),c=0;for(i=s?i:i["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var u;if(s){if(c>=i.length)break;u=i[c++]}else{if((c=i.next()).done)break;u=c.value}var d=u,l=Object(o.c)(d);n.removeSSRC(l)}return t.toRawSDP()}}]),e})()}).call(this,"modules/xmpp/RtxModifier.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return a});var r=n(4),i=n(28),o=Object(r.getLogger)(e),a=(function(){function e(t){_classCallCheck(this,e),this.clearVideoSsrcCache(),this.logPrefix=t}return _createClass(e,[{key:"clearVideoSsrcCache",value:function(){this.cachedPrimarySsrc=null,this.injectRecvOnly=!1}},{key:"setPrimarySsrc",value:function(e){if("number"!=typeof e)throw new Error("Primary SSRC must be a number!");this.cachedPrimarySsrc=e}},{key:"hasPrimarySsrcCached",value:function(){return Boolean(this.cachedPrimarySsrc)}},{key:"makeVideoPrimarySsrcsConsistent",value:function(e){var t=new i.a(e),n=t.selectMedia("video");if(!n)return o.debug(this.logPrefix+" no 'video' media found in the sdp: "+e),e;if("recvonly"===n.direction)this.cachedPrimarySsrc&&this.injectRecvOnly?n.addSSRCAttribute({id:this.cachedPrimarySsrc,attribute:"cname",value:"recvonly-"+this.cachedPrimarySsrc}):o.info(this.logPrefix+" no SSRC found for the recvonly videostream!");else{var r=n.getPrimaryVideoSsrc();if(!r)return o.info(this.logPrefix+" sdp-consistency couldn't parse new primary ssrc"),e;if(this.cachedPrimarySsrc){o.info(this.logPrefix+" sdp-consistency replacing new ssrc"+r+" with cached "+this.cachedPrimarySsrc),n.replaceSSRC(r,this.cachedPrimarySsrc);var a=n.ssrcGroups,s=Array.isArray(a),c=0;for(a=s?a:a["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var u;if(s){if(c>=a.length)break;u=a[c++]}else{if((c=a.next()).done)break;u=c.value}var d=u;if("FID"===d.semantics){var l=Object(i.b)(d),h=Object(i.c)(d);l===r&&(d.ssrcs=this.cachedPrimarySsrc+" "+h)}}}else this.cachedPrimarySsrc=r,o.info(this.logPrefix+" sdp-consistency caching primary ssrc"+this.cachedPrimarySsrc);this.injectRecvOnly=!0}return t.toRawSDP()}}]),e})()}).call(this,"modules/xmpp/SdpConsistency.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return h});var r=n(15),i=n(7),o=n(5),a=n(61),s=n(4).getLogger(e),c=n(6),u=!1,d=!1,l=["abort","canplay","canplaythrough","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","ratechange","stalled","suspend","waiting"],h=(function(e){function t(e,n,r,i,o,a,c,u,d,h){var p;if(_classCallCheck(this,t),(p=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,n,i,o,function(){},a,c))).rtc=e,"number"!=typeof u)throw new TypeError("SSRC "+u+" is not a number");return p.ssrc=u,p.ownerEndpointId=r,p.muted=d,p.isP2P=h,s.debug("New remote track added: "+_assertThisInitialized(_assertThisInitialized(p))),p.hasBeenMuted=d,p.rtc&&p.track&&p._bindTrackHandlers(),p._containerHandlers={},l.forEach(function(e){p._containerHandlers[e]=p._containerEventHandler.bind(_assertThisInitialized(_assertThisInitialized(p)),e)}),_possibleConstructorReturn(p)}return _inherits(t,e),_createClass(t,[{key:"_bindTrackHandlers",value:function(){var e=this;this.track.addEventListener("mute",function(){return e._onTrackMute()}),this.track.addEventListener("unmute",function(){return e._onTrackUnmute()}),this.track.addEventListener("ended",function(){s.debug("\"onended\" event("+Date.now()+"): "+e)})}},{key:"_onTrackMute",value:function(){s.debug("\"onmute\" event("+Date.now()+"): "+this),this.rtc.eventEmitter.emit(c.REMOTE_TRACK_MUTE,this)}},{key:"_onTrackUnmute",value:function(){s.debug("\"onunmute\" event("+Date.now()+"): "+this),this.rtc.eventEmitter.emit(c.REMOTE_TRACK_UNMUTE,this)}},{key:"setMute",value:function(e){this.muted!==e&&(e&&(this.hasBeenMuted=!0),this.stream&&(this.stream.muted=e),this.muted=e,this.emit(r.TRACK_MUTE_CHANGED,this))}},{key:"isMuted",value:function(){return this.muted}},{key:"getParticipantId",value:function(){return this.ownerEndpointId}},{key:"isLocal",value:function(){return!1}},{key:"getSSRC",value:function(){return this.ssrc}},{key:"_setVideoType",value:function(e){this.videoType!==e&&(this.videoType=e,this.emit(r.TRACK_VIDEOTYPE_CHANGED,e))}},{key:"_playCallback",value:function(){var e=this.isVideoTrack()?"video":"audio",t=window.performance.now();console.log("(TIME) Render "+e+":\t",t),this.conference.getConnectionTimes()[e+".render"]=t;var n=window.connectionTimes["obtainPermissions.start"],r=window.connectionTimes["obtainPermissions.end"],a=isNaN(r)||isNaN(n)?0:r-n,s=t-(this.conference.getConnectionTimes()["session.initiate"]-this.conference.getConnectionTimes()["muc.joined"])-a;this.conference.getConnectionTimes()[e+".ttfm"]=s,console.log("(TIME) TTFM "+e+":\t",s),o.a.sendAnalytics(Object(i.N)({media_type:e,muted:this.hasBeenMuted,value:s}))}},{key:"_attachTTFMTracker",value:function(e){u&&this.isAudioTrack()||d&&this.isVideoTrack()||(this.isAudioTrack()&&(u=!0),this.isVideoTrack()&&(d=!0),e.addEventListener("canplay",this._playCallback.bind(this)))}},{key:"_onTrackAttach",value:function(e){var t=this;s.debug("Track has been attached to a container: "+this),l.forEach(function(n){e.addEventListener(n,t._containerHandlers[n])})}},{key:"_onTrackDetach",value:function(e){var t=this;s.debug("Track has been detached from a container: "+this),l.forEach(function(n){e.removeEventListener(n,t._containerHandlers[n])})}},{key:"_containerEventHandler",value:function(e){s.debug(e+" handler was called for a container with attached "+this)}},{key:"_getStatus",value:function(){var e=this.track,t=e.enabled,n=e.muted;return"readyState: "+e.readyState+", muted: "+n+", enabled: "+t}},{key:"toString",value:function(){return"RemoteTrack[userID: "+this.getParticipantId()+", type: "+this.getType()+", ssrc: "+this.getSSRC()+", p2p: "+this.isP2P+", status: "+this._getStatus()+"]"}}]),t})(a.a)}).call(this,"modules/RTC/JitsiRemoteTrack.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return s});var r=n(4),i=n(8),o=n(28),a=Object(r.getLogger)(e),s=(function(){function e(t){_classCallCheck(this,e),this.tpc=t}return _createClass(e,[{key:"_addMutedLocalVideoTracksToSDP",value:function(e){var t=this.tpc.getLocalTracks(i.c);if(!t.length)return!1;1!==t.length&&a.error(this.tpc+" there is more than 1 video track ! Strange things may happen !",t);var n=e.selectMedia("video");if(!n)return a.debug(this.tpc+' unable to hack local video track SDP- no "video" media'),!1;var r=!1,o=t,s=Array.isArray(o),c=0;for(o=s?o:o["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var u;if(s){if(c>=o.length)break;u=o[c++]}else{if((c=o.next()).done)break;u=c.value}var d=u,l=d.isMuted(),h=d.getOriginalStream(),p=h&&this.tpc.isMediaStreamInPc(h),f=l||!p;if(a.debug(this.tpc+" "+d+" muted: "+l+", is in PeerConnection: "+p+" => should fake sdp ? : "+f),f){var m=this.tpc.isSimulcastOn()?this.tpc.simulcast.ssrcCache:[this.tpc.sdpConsistency.cachedPrimarySsrc];if(m.length){r=!0,n.direction="sendrecv";var v="injected-"+m[0],g=m,y=Array.isArray(g),_=0;for(g=y?g:g["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var S;if(y){if(_>=g.length)break;S=g[_++]}else{if((_=g.next()).done)break;S=_.value}var E=S;n.removeSSRC(E),a.debug(this.tpc+" injecting video SSRC: "+E+" for "+d),n.addSSRCAttribute({id:E,attribute:"cname",value:v}),n.addSSRCAttribute({id:E,attribute:"msid",value:d.storedMSID})}if(m.length>1){var b={ssrcs:m.join(" "),semantics:"SIM"};n.findGroup(b.semantics,b.ssrcs)||(a.debug(this.tpc+" injecting SIM group for "+d,b),n.addSSRCGroup(b))}this.tpc.options.disableRtx||this.tpc.rtxModifier.modifyRtxSsrcs2(n)}else a.error("No SSRCs stored for: "+d+" in "+this.tpc)}}return r}},{key:"_transformMediaIdentifiers",value:function(e){var t=this.tpc.id,n=e.ssrcs,r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var s=o;switch(s.attribute){case"cname":case"label":case"mslabel":s.value=s.value&&s.value+"-"+t;break;case"msid":if(s.value){var c=s.value.split(" ");if(2===c.length){var u=c[0],d=c[1];s.value=u+"-"+t+" "+d+"-"+t}else a.warn("Unable to munge local MSID- weird format detected: "+s.value)}}}}},{key:"maybeAddMutedLocalVideoTracksToSDP",value:function(e){if(!e)throw new Error("No local description passed in.");var t=new o.a(e.sdp);return this._addMutedLocalVideoTracksToSDP(t)?new RTCSessionDescription({type:e.type,sdp:t.toRawSDP()}):e}},{key:"transformStreamIdentifiers",value:function(e){if(!e||!e.sdp||!e.type)return e;var t=new o.a(e.sdp),n=t.selectMedia("audio");n&&this._transformMediaIdentifiers(n);var r=t.selectMedia("video");return r&&this._transformMediaIdentifiers(r),new RTCSessionDescription({type:e.type,sdp:t.toRawSDP()})}}]),e})()}).call(this,"modules/RTC/LocalSdpMunger.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return m});var r=n(4),i=n(1),o=n(6),a=n(29),s=n(33),c=n(13),u=n(0),d=Object(r.getLogger)(e),l=[{width:1920,height:1080,layers:3,max:5e3,target:4e3,min:800},{width:1280,height:720,layers:3,max:2500,target:2500,min:600},{width:960,height:540,layers:3,max:900,target:900,min:450},{width:640,height:360,layers:2,max:700,target:500,min:150},{width:480,height:270,layers:2,max:450,target:350,min:150},{width:320,height:180,layers:1,max:200,target:150,min:30}],h=800,p=null;function f(e,t,n){if(n<15e3)return 1;var r=0,i=Math.min(t.height,t.width);if(e){var o=l.find(function(e){return e.height<=i});if(o){var a=function(){var e=i;if(!(o=l.find(function(t){return t.height===e})))return"break";r+=o.target};for(i=o.height;i>=180;i/=2){if("break"===a())break}}}else{var s=t.width*t.height;r=s<=76800?600:s<=307200?1700:s<=518400?2e3:2500}return Math.min(r,(function(e){return e>6e4?Number.MAX_SAFE_INTEGER:h*Math.pow(1.08,e/1e3)})(Math.max(0,n-1e3)))}var m=(function(){function e(t,n,r){var s=this;_classCallCheck(this,e),this.eventEmitter=n,this._conference=t,this._localStats={connectionQuality:100,jvbRTT:void 0},this._lastConnectionQualityUpdate=-1,this._remoteStats={},this._timeIceConnected=-1,this._timeVideoUnmuted=-1,this._timeLastBwCapRemoved=-1,r.config.startBitrate&&r.config.startBitrate>0&&(h=r.config.startBitrate),t.on(i.CONNECTION_INTERRUPTED,function(){s._updateLocalConnectionQuality(0),s.eventEmitter.emit(a.LOCAL_STATS_UPDATED,s._localStats),s._broadcastLocalStats()}),t.room.addListener(u.ICE_CONNECTION_STATE_CHANGED,function(e,t){e.isP2P||"connected"!==t||(s._timeIceConnected=window.performance.now())}),t.on(i.ENDPOINT_MESSAGE_RECEIVED,function(e,t){"stats"===t.type&&s._updateRemoteStats(e.getId(),t.values)}),t.statistics.addConnectionStatsListener(this._updateLocalStats.bind(this)),t.on(i.TRACK_MUTE_CHANGED,function(e){e.isVideoTrack()&&(e.isMuted()?s._timeVideoUnmuted=-1:s._maybeUpdateUnmuteTime())}),t.on(i.TRACK_ADDED,function(e){e.isVideoTrack()&&!e.isMuted()&&s._maybeUpdateUnmuteTime()}),t.rtc.on(o.LOCAL_TRACK_MAX_ENABLED_RESOLUTION_CHANGED,function(e){s._localStats.maxEnabledResolution=e.maxEnabledResolution}),t.on(i.SERVER_REGION_CHANGED,function(e){s._localStats.serverRegion=e}),t.on(i.PROPERTIES_CHANGED,function(e){s._localStats.bridgeCount=Number((e||{})["bridge-count"])})}return _createClass(e,[{key:"_maybeUpdateUnmuteTime",value:function(){this._timeVideoUnmuted<0&&(this._timeVideoUnmuted=window.performance.now())}},{key:"_calculateConnectionQuality",value:function(e,t,n){var r,i=s[n],o=100;if(this._localStats.packetLoss&&(r=this._localStats.packetLoss.upload,t&&(r*=.5)),t||!i||e===c.DESKTOP||this._timeIceConnected<0||this._timeVideoUnmuted<0)void 0===r?(d.error("Cannot calculate connection quality, unknown packet loss."),o=100):o=r<=2?100:r<=4?70:r<=6?50:r<=8?30:r<=12?10:0;else{var a=this._conference.getActivePeerConnection(),u=Boolean(a&&a.isSimulcastOn()),l=a&&a.bandwidthLimiter&&a.bandwidthLimiter.getBandwidthLimit("video");!l&&p&&(this._timeLastBwCapRemoved=window.performance.now(),h=p),p=l;var m=f(u,i,window.performance.now()-Math.max(this._timeVideoUnmuted,this._timeIceConnected,this._timeLastBwCapRemoved));m=Math.min(.9*m,2500),p&&(m=Math.min(m,p)),o=100*this._localStats.bitrate.upload/m,r&&r>=10&&(o=Math.min(o,30))}if(this._lastConnectionQualityUpdate>0){var v=this._localStats.connectionQuality,g=(window.performance.now()-this._lastConnectionQualityUpdate)/1e3;o=Math.min(o,v+2*g)}return Math.min(100,o)}},{key:"_updateLocalConnectionQuality",value:function(e){this._localStats.connectionQuality=e,this._lastConnectionQualityUpdate=window.performance.now()}},{key:"_broadcastLocalStats",value:function(){var e={bitrate:this._localStats.bitrate,packetLoss:this._localStats.packetLoss,connectionQuality:this._localStats.connectionQuality,jvbRTT:this._localStats.jvbRTT,serverRegion:this._localStats.serverRegion,maxEnabledResolution:this._localStats.maxEnabledResolution,avgAudioLevels:this._localStats.localAvgAudioLevels};try{this._conference.broadcastEndpointMessage({type:"stats",values:e})}catch(e){}}},{key:"_updateLocalStats",value:function(e,t){if(!e.isP2P){var n=t.transport&&t.transport.length&&t.transport[0].rtt;this._localStats.jvbRTT=n||void 0}if(e===this._conference.getActivePeerConnection()){var r,i=!this._conference.isConnectionInterrupted(),o=this._conference.getLocalVideoTrack(),s=o?o.videoType:void 0,c=!o||o.isMuted(),u=o?Math.min(o.resolution,o.maxEnabledResolution):null;for(r in c||this._maybeUpdateUnmuteTime(),t)t.hasOwnProperty(r)&&(this._localStats[r]=t[r]);i&&this._updateLocalConnectionQuality(this._calculateConnectionQuality(s,c,u)),this.eventEmitter.emit(a.LOCAL_STATS_UPDATED,this._localStats),this._broadcastLocalStats()}}},{key:"_updateRemoteStats",value:function(e,t){this._remoteStats[e]={bitrate:t.bitrate,packetLoss:t.packetLoss,connectionQuality:t.connectionQuality,jvbRTT:t.jvbRTT,serverRegion:t.serverRegion,maxEnabledResolution:t.maxEnabledResolution,avgAudioLevels:t.avgAudioLevels},this.eventEmitter.emit(a.REMOTE_STATS_UPDATED,e,this._remoteStats[e])}},{key:"getStats",value:function(){return this._localStats}}]),e})()}).call(this,"modules/connectivity/ConnectionQuality.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return s});var r=n(4),i=n(16),o=n(1),a=Object(r.getLogger)(e),s=(function(){function e(t){_classCallCheck(this,e),this._conference=t}return _createClass(e,[{key:"_actOnIceFailed",value:function(){var e=this._conference.options.config.enableIceRestart,t=void 0!==e&&!e,n=this._conference.room.supportsRestartByTerminate(),r=n&&!e;if(a.info("ICE failed, enableIceRestart: "+e+", supports restart by terminate: "+n),t||!e&&!n)return a.info("ICE failed, but ICE restarts are disabled"),void this._conference.eventEmitter.emit(o.CONFERENCE_FAILED,i.ICE_FAILED);var s=this._conference.jvbJingleSession,c=s&&s.getIceConnectionState();s?"connected"===c?a.info("ICE connection restored - not sending ICE failed"):(a.info("Sending ICE failed - the connection did not recover, ICE state: "+c+", use 'session-terminate': "+r),r?this._conference.jvbJingleSession.terminate(function(){a.info("session-terminate for ice restart - done")},function(e){a.error("session-terminate for ice restart - error: "+e.message)},{reason:"connectivity-error",reasonDescription:"ICE FAILED",requestRestart:!0,sendSessionTerminate:!0}):this._conference.jvbJingleSession.sendIceFailedNotification()):a.warn("Not sending ICE failed - no JVB connection")}},{key:"start",value:function(){var e=this;this._conference.xmpp.ping(65e3).then(function(){e._canceled||(e._iceFailedTimeout=window.setTimeout(function(){e._iceFailedTimeout=void 0,e._actOnIceFailed()},2e3))},function(e){a.error("PING error/timeout - not sending ICE failed",e)})}},{key:"cancel",value:function(){this._canceled=!0,window.clearTimeout(this._iceFailedTimeout)}}]),e})()}).call(this,"modules/connectivity/IceFailedHandling.js")},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var r=n(19),i=n.n(r),o=n(1),a=n(15),s=n(3),c=n(22),u=(function(e){function t(e){var n;return _classCallCheck(this,t),(n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this)))._conference=e,n._timeoutTrigger=null,n._hasAudioInput=null,s.a.supportsReceiverStats()||e.statistics.addAudioLevelListener(n._audioLevel.bind(_assertThisInitialized(_assertThisInitialized(n)))),e.on(o.TRACK_ADDED,n._trackAdded.bind(_assertThisInitialized(_assertThisInitialized(n)))),n}return _inherits(t,e),_createClass(t,[{key:"_clearTriggerTimeout",value:function(){clearTimeout(this._timeoutTrigger),this._timeoutTrigger=null}},{key:"_handleAudioInputStateChange",value:function(e){var t=0!==e;null!==this._hasAudioInput&&this._hasAudioInput===t||(this._hasAudioInput=t,this.emit(c.AUDIO_INPUT_STATE_CHANGE,this._hasAudioInput))}},{key:"_handleNoAudioInputDetection",value:function(e){var t=this;this._eventFired||(0!==e||this._timeoutTrigger?0!==e&&this._timeoutTrigger&&this._clearTriggerTimeout():this._timeoutTrigger=setTimeout(function(){t._eventFired=!0,t.emit(c.NO_AUDIO_INPUT)},4e3))}},{key:"_audioLevel",value:function(e,t,n,r){if(r&&this._audioTrack){var i=e.localSSRCs.get(this._audioTrack.rtcId);i&&i.ssrcs.includes(t)&&(this._handleAudioInputStateChange(n),this._handleNoAudioInputDetection(n))}}},{key:"_trackAdded",value:function(e){var t=this;e.isLocalAudioTrack()&&(this._audioTrack=e,this._eventFired=!1,this._clearTriggerTimeout(),s.a.supportsReceiverStats()&&(e.on(a.NO_AUDIO_INPUT,function(e){t._handleNoAudioInputDetection(e)}),e.on(a.TRACK_AUDIO_LEVEL_CHANGED,function(e){t._handleNoAudioInputDetection(e),t._handleAudioInputStateChange(e)})))}}]),t})(i.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n(6),o=n.n(i),a=(function(){function e(t){_classCallCheck(this,e),this.conference=t,t.addEventListener(r.TRACK_AUDIO_LEVEL_CHANGED,this._audioLevel.bind(this)),this.myUserID=this.conference.myUserId()}return _createClass(e,[{key:"_audioLevel",value:function(e,t){!this.conference.isP2PActive()||t<=.6||e===this.myUserID&&this.conference.getLocalAudioTrack().isMuted()||this.conference.rtc.eventEmitter.emit(o.a.DOMINANT_SPEAKER_CHANGED,e)}}]),e})()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(19),i=n(27),o=n(22),a=(function(e){function t(){var e;return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this)))._processing=!1,e._scoreArray=[],e._audioLvlArray=[],e._active=!1,e._calculateNoisyScore=e._calculateNoisyScore.bind(_assertThisInitialized(_assertThisInitialized(e))),e}return _inherits(t,e),_createClass(t,[{key:"_calculateNoisyScore",value:function(){var e=Object(i.b)(this._scoreArray),t=Object(i.b)(this._audioLvlArray);e<.2&&t>.04&&(this.emit(o.VAD_NOISY_DEVICE),this._setActiveState(!1)),this.reset()}},{key:"_recordValues",value:function(e,t){this._scoreArray.push(e),this._audioLvlArray.push(t)}},{key:"_setActiveState",value:function(e){this._active=e,this.emit(o.DETECTOR_STATE_CHANGE,this._active)}},{key:"changeMuteState",value:function(e){this._setActiveState(!e),this.reset()}},{key:"isActive",value:function(){return this._active}},{key:"reset",value:function(){this._processing=!1,this._scoreArray=[],this._audioLvlArray=[],clearTimeout(this._processTimeout)}},{key:"processVADScore",value:function(e){if(this._active)if(this._processing){var t=Object(i.c)(e.pcmData);this._recordValues(e.score,Object(i.b)(t))}else if(e.score<.2){var n=Object(i.c)(e.pcmData),r=Object(i.b)(n);r>.02&&(this._processing=!0,this._recordValues(e.score,r),this._processTimeout=setTimeout(this._calculateNoisyScore,1500))}}}]),t})(r.EventEmitter)},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(19),i=n(27),o=n(22),a=(function(e){function t(){var e;return _classCallCheck(this,t),(e=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this)))._processing=!1,e._scoreArray=[],e._active=!1,e._calculateVADScore=e._calculateVADScore.bind(_assertThisInitialized(_assertThisInitialized(e))),e}return _inherits(t,e),_createClass(t,[{key:"_calculateVADScore",value:function(){Object(i.b)(this._scoreArray)>.6&&(this.emit(o.VAD_TALK_WHILE_MUTED),this._setActiveState(!1)),this.reset()}},{key:"_setActiveState",value:function(e){this._active=e,this.emit(o.DETECTOR_STATE_CHANGE,this._active)}},{key:"changeMuteState",value:function(e){this._setActiveState(e),this.reset()}},{key:"isActive",value:function(){return this._active}},{key:"processVADScore",value:function(e){this._active&&(this._processing?this._scoreArray.push(e.score):e.score>.9&&(this._processing=!0,this._scoreArray.push(e.score),this._processTimeout=setTimeout(this._calculateVADScore,700)))}},{key:"reset",value:function(){this._processing=!1,this._scoreArray=[],clearTimeout(this._processTimeout)}}]),t})(r.EventEmitter)},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return d});var r=n(4),i=n(1),o=n(6),a=n.n(o),s=n(3),c=n(121),u=Object(r.getLogger)(e),d=(function(){function e(t,n){var r=this,o=n.salt;_classCallCheck(this,e),this.conference=t,this._e2eeCtx=new c.a({salt:o}),this.conference.on(i._MEDIA_SESSION_STARTED,this._onMediaSessionStarted.bind(this)),this.conference.on(i.TRACK_ADDED,function(e){return e.isLocal()&&r._onLocalTrackAdded(e)}),this.conference.rtc.on(a.a.REMOTE_TRACK_ADDED,function(e,t){return r._setupReceiverE2EEForTrack(t,e)}),this.conference.on(i.TRACK_MUTE_CHANGED,this._trackMuteChanged.bind(this))}return _createClass(e,[{key:"_onMediaSessionStarted",value:function(e){var t=this.conference.getLocalTracks(),n=Array.isArray(t),r=0;for(t=n?t:t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}var o=i;this._setupSenderE2EEForTrack(e,o)}}},{key:"_onLocalTrackAdded",value:function(e){var t=this.conference._getMediaSessions(),n=Array.isArray(t),r=0;for(t=n?t:t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}var o=i;this._setupSenderE2EEForTrack(o,e)}}},{key:"setKey",value:function(e){this._e2eeCtx.setKey(e)}},{key:"_setupReceiverE2EEForTrack",value:function(e,t){var n=e.findReceiverForTrack(t.track);n?this._e2eeCtx.handleReceiver(n,t.getType(),t.getParticipantId()):u.warn("Could not handle E2EE for "+t+": receiver not found in: "+e)}},{key:"_setupSenderE2EEForTrack",value:function(e,t){var n=e.peerconnection,r=n&&n.findSenderForTrack(t.track);r?this._e2eeCtx.handleSender(r,t.getType(),t.getParticipantId()):u.warn("Could not handle E2EE for "+t+": sender not found in "+n)}},{key:"_trackMuteChanged",value:function(e){if(s.a.doesVideoMuteByStreamRemove()&&e.isLocal()&&e.isVideoTrack()&&!e.isMuted()){var t=this.conference._getMediaSessions(),n=Array.isArray(t),r=0;for(t=n?t:t["function"==typeof Symbol&&"function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}var o=i;this._setupSenderE2EEForTrack(o,e)}}}}]),e})()}).call(this,"modules/e2ee/E2EEncryption.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return s});var r=n(4),i=n(122),o=Object(r.getLogger)(e),a=Symbol("kJitsiE2EE"),s=(function(){function e(t){_classCallCheck(this,e),this._options=t,this._worker=new Worker(Object(i.a)(),{name:"E2EE Worker"}),this._worker.onerror=function(e){return o.onerror(e)};var n=new TextEncoder;this._worker.postMessage({operation:"initialize",salt:n.encode(t.salt)})}return _createClass(e,[{key:"handleReceiver",value:function(e,t,n){var r;e[a]||(e[a]=!0,r=e.createEncodedStreams?e.createEncodedStreams():"video"===t?e.createEncodedVideoStreams():e.createEncodedAudioStreams(),this._worker.postMessage({operation:"decode",readableStream:r.readableStream,writableStream:r.writableStream,participantId:n},[r.readableStream,r.writableStream]))}},{key:"handleSender",value:function(e,t,n){var r;e[a]||(e[a]=!0,r=e.createEncodedStreams?e.createEncodedStreams():"video"===t?e.createEncodedVideoStreams():e.createEncodedAudioStreams(),this._worker.postMessage({operation:"encode",readableStream:r.readableStream,writableStream:r.writableStream,participantId:n},[r.readableStream,r.writableStream]))}},{key:"setKey",value:function(e){var t;t=!!e&&(new TextEncoder).encode(e),this._worker.postMessage({operation:"setKey",key:t})}}]),e})()}).call(this,"modules/e2ee/E2EEContext.js")},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){return URL.createObjectURL(new Blob(["\n // Polyfill RTCEncoded(Audio|Video)Frame.getMetadata() (not available in M83, available M84+).\n // The polyfill can not be done on the prototype since its not exposed in workers. Instead,\n // it is done as another transformation to keep it separate.\n function polyFillEncodedFrameMetadata(encodedFrame, controller) {\n if (!encodedFrame.getMetadata) {\n encodedFrame.getMetadata = function() {\n return {\n // TODO: provide a more complete polyfill based on additionalData for video.\n synchronizationSource: this.synchronizationSource,\n contributingSources: this.contributingSources\n };\n };\n }\n controller.enqueue(encodedFrame);\n }\n\n // We use a ringbuffer of keys so we can change them and still decode packets that were\n // encrypted with an old key.\n // In the future when we dont rely on a globally shared key we will actually use it. For\n // now set the size to 1 which means there is only a single key. This causes some\n // glitches when changing the key but its ok.\n const keyRingSize = 1;\n\n // We use a 96 bit IV for AES GCM. This is signalled in plain together with the\n // packet. See https://developer.mozilla.org/en-US/docs/Web/API/AesGcmParams\n const ivLength = 12;\n\n // We use a 128 bit key for AES GCM.\n const keyGenParameters = {\n name: 'AES-GCM',\n length: 128\n };\n\n // We copy the first bytes of the VP8 payload unencrypted.\n // For keyframes this is 10 bytes, for non-keyframes (delta) 3. See\n // https://tools.ietf.org/html/rfc6386#section-9.1\n // This allows the bridge to continue detecting keyframes (only one byte needed in the JVB)\n // and is also a bit easier for the VP8 decoder (i.e. it generates funny garbage pictures\n // instead of being unable to decode).\n // This is a bit for show and we might want to reduce to 1 unconditionally in the final version.\n //\n // For audio (where frame.type is not set) we do not encrypt the opus TOC byte:\n // https://tools.ietf.org/html/rfc6716#section-3.1\n const unencryptedBytes = {\n key: 10,\n delta: 3,\n undefined: 1 // frame.type is not set on audio\n };\n\n // Salt used in key derivation\n // FIXME: We currently use the MUC room name for this which has the same lifetime\n // as this worker. While not (pseudo)random as recommended in\n // https://developer.mozilla.org/en-US/docs/Web/API/Pbkdf2Params\n // this is easily available and the same for all participants.\n // We currently do not enforce a minimum length of 16 bytes either.\n let keySalt;\n\n // Raw keyBytes used to derive the key.\n let keyBytes;\n\n /**\n * Derives a AES-GCM key from the input using PBKDF2\n * The key length can be configured above and should be either 128 or 256 bits.\n * @param {Uint8Array} keyBytes - Value to derive key from\n * @param {Uint8Array} salt - Salt used in key derivation\n */\n async function deriveKey(keyBytes, salt) {\n // https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey\n const material = await crypto.subtle.importKey('raw', keyBytes,\n 'PBKDF2', false, [ 'deriveBits', 'deriveKey' ]);\n\n // https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/deriveKey#PBKDF2\n return crypto.subtle.deriveKey({\n name: 'PBKDF2',\n salt,\n iterations: 100000,\n hash: 'SHA-256'\n }, material, keyGenParameters, false, [ 'encrypt', 'decrypt' ]);\n }\n\n\n /** Per-participant context holding the cryptographic keys and\n * encode/decode functions\n */\n class Context {\n /**\n * @param {string} id - local muc resourcepart\n */\n constructor(id) {\n // An array (ring) of keys that we use for sending and receiving.\n this._cryptoKeyRing = new Array(keyRingSize);\n\n // A pointer to the currently used key.\n this._currentKeyIndex = -1;\n\n // We keep track of how many frames we have sent per ssrc.\n // Starts with a random offset similar to the RTP sequence number.\n this._sendCounts = new Map();\n\n this._id = id;\n }\n\n /**\n * Derives a per-participant key.\n * @param {Uint8Array} keyBytes - Value to derive key from\n * @param {Uint8Array} salt - Salt used in key derivation\n */\n async deriveKey(keyBytes, salt) {\n const encoder = new TextEncoder();\n const idBytes = encoder.encode(this._id);\n // Separate both parts by a null byte to avoid ambiguity attacks.\n const participantSalt = new Uint8Array(salt.byteLength + idBytes.byteLength + 1);\n participantSalt.set(salt);\n participantSalt.set(idBytes, salt.byteLength + 1);\n\n return deriveKey(keyBytes, participantSalt);\n }\n /**\n * Sets a key and starts using it for encrypting.\n * @param {CryptoKey} key\n */\n setKey(key) {\n this._currentKeyIndex++;\n this._cryptoKeyRing[this._currentKeyIndex % this._cryptoKeyRing.length] = key;\n }\n\n /**\n * Construct the IV used for AES-GCM and sent (in plain) with the packet similar to\n * https://tools.ietf.org/html/rfc7714#section-8.1\n * It concatenates\n * - the 32 bit synchronization source (SSRC) given on the encoded frame,\n * - the 32 bit rtp timestamp given on the encoded frame,\n * - a send counter that is specific to the SSRC. Starts at a random number.\n * The send counter is essentially the pictureId but we currently have to implement this ourselves.\n * There is no XOR with a salt. Note that this IV leaks the SSRC to the receiver but since this is\n * randomly generated and SFUs may not rewrite this is considered acceptable.\n * The SSRC is used to allow demultiplexing multiple streams with the same key, as described in\n * https://tools.ietf.org/html/rfc3711#section-4.1.1\n * The RTP timestamp is 32 bits and advances by the codec clock rate (90khz for video, 48khz for\n * opus audio) every second. For video it rolls over roughly every 13 hours.\n * The send counter will advance at the frame rate (30fps for video, 50fps for 20ms opus audio)\n * every second. It will take a long time to roll over.\n *\n * See also https://developer.mozilla.org/en-US/docs/Web/API/AesGcmParams\n */\n makeIV(synchronizationSource, timestamp) {\n const iv = new ArrayBuffer(ivLength);\n const ivView = new DataView(iv);\n\n // having to keep our own send count (similar to a picture id) is not ideal.\n if (!this._sendCounts.has(synchronizationSource)) {\n // Initialize with a random offset, similar to the RTP sequence number.\n this._sendCounts.set(synchronizationSource, Math.floor(Math.random() * 0xFFFF));\n }\n const sendCount = this._sendCounts.get(synchronizationSource);\n\n ivView.setUint32(0, synchronizationSource);\n ivView.setUint32(4, timestamp);\n ivView.setUint32(8, sendCount % 0xFFFF);\n\n this._sendCounts.set(synchronizationSource, sendCount + 1);\n\n return iv;\n }\n\n /**\n * Function that will be injected in a stream and will encrypt the given encoded frames.\n *\n * @param {RTCEncodedVideoFrame|RTCEncodedAudioFrame} encodedFrame - Encoded video frame.\n * @param {TransformStreamDefaultController} controller - TransportStreamController.\n *\n * The packet format is described below. One of the design goals was to not require\n * changes to the SFU which for video requires not encrypting the keyframe bit of VP8\n * as SFUs need to detect a keyframe (framemarking or the generic frame descriptor will\n * solve this eventually). This also \"hides\" that a client is using E2EE a bit.\n *\n * Note that this operates on the full frame, i.e. for VP8 the data described in\n * https://tools.ietf.org/html/rfc6386#section-9.1\n *\n * The VP8 payload descriptor described in\n * https://tools.ietf.org/html/rfc7741#section-4.2\n * is part of the RTP packet and not part of the frame and is not controllable by us.\n * This is fine as the SFU keeps having access to it for routing.\n *\n * The encrypted frame is formed as follows:\n * 1) Leave the first (10, 3, 1) bytes unencrypted, depending on the frame type and kind.\n * 2) Form the GCM IV for the frame as described above.\n * 3) Encrypt the rest of the frame using AES-GCM.\n * 4) Allocate space for the encrypted frame.\n * 5) Copy the unencrypted bytes to the start of the encrypted frame.\n * 6) Append the ciphertext to the encrypted frame.\n * 7) Append the IV.\n * 8) Append a single byte for the key identifier. TODO: we don't need all the bits.\n * 9) Enqueue the encrypted frame for sending.\n */\n encodeFunction(encodedFrame, controller) {\n const keyIndex = this._currentKeyIndex % this._cryptoKeyRing.length;\n\n if (this._cryptoKeyRing[keyIndex]) {\n const iv = this.makeIV(encodedFrame.getMetadata().synchronizationSource, encodedFrame.timestamp);\n\n return crypto.subtle.encrypt({\n name: 'AES-GCM',\n iv,\n additionalData: new Uint8Array(encodedFrame.data, 0, unencryptedBytes[encodedFrame.type])\n }, this._cryptoKeyRing[keyIndex], new Uint8Array(encodedFrame.data,\n unencryptedBytes[encodedFrame.type]))\n .then(cipherText => {\n const newData = new ArrayBuffer(unencryptedBytes[encodedFrame.type] + cipherText.byteLength\n + iv.byteLength + 1);\n const newUint8 = new Uint8Array(newData);\n\n newUint8.set(\n new Uint8Array(encodedFrame.data, 0, unencryptedBytes[encodedFrame.type])); // copy first bytes.\n newUint8.set(\n new Uint8Array(cipherText), unencryptedBytes[encodedFrame.type]); // add ciphertext.\n newUint8.set(\n new Uint8Array(iv), unencryptedBytes[encodedFrame.type] + cipherText.byteLength); // append IV.\n newUint8[unencryptedBytes[encodedFrame.type] + cipherText.byteLength + ivLength]\n = keyIndex; // set key index.\n\n encodedFrame.data = newData;\n\n return controller.enqueue(encodedFrame);\n }, e => {\n console.error(e);\n\n // We are not enqueuing the frame here on purpose.\n });\n }\n\n /* NOTE WELL:\n * This will send unencrypted data (only protected by DTLS transport encryption) when no key is configured.\n * This is ok for demo purposes but should not be done once this becomes more relied upon.\n */\n controller.enqueue(encodedFrame);\n }\n\n /**\n * Function that will be injected in a stream and will decrypt the given encoded frames.\n *\n * @param {RTCEncodedVideoFrame|RTCEncodedAudioFrame} encodedFrame - Encoded video frame.\n * @param {TransformStreamDefaultController} controller - TransportStreamController.\n *\n * The decrypted frame is formed as follows:\n * 1) Extract the key index from the last byte of the encrypted frame.\n * If there is no key associated with the key index, the frame is enqueued for decoding\n * and these steps terminate.\n * 2) Determine the frame type in order to look up the number of unencrypted header bytes.\n * 2) Extract the 12-byte IV from its position near the end of the packet.\n * Note: the IV is treated as opaque and not reconstructed from the input.\n * 3) Decrypt the encrypted frame content after the unencrypted bytes using AES-GCM.\n * 4) Allocate space for the decrypted frame.\n * 5) Copy the unencrypted bytes from the start of the encrypted frame.\n * 6) Append the plaintext to the decrypted frame.\n * 7) Enqueue the decrypted frame for decoding.\n */\n decodeFunction(encodedFrame, controller) {\n const data = new Uint8Array(encodedFrame.data);\n const keyIndex = data[encodedFrame.data.byteLength - 1];\n\n if (this._cryptoKeyRing[keyIndex]) {\n const iv = new Uint8Array(encodedFrame.data, encodedFrame.data.byteLength - ivLength - 1, ivLength);\n const cipherTextStart = unencryptedBytes[encodedFrame.type];\n const cipherTextLength = encodedFrame.data.byteLength - (unencryptedBytes[encodedFrame.type]\n + ivLength + 1);\n\n return crypto.subtle.decrypt({\n name: 'AES-GCM',\n iv,\n additionalData: new Uint8Array(encodedFrame.data, 0, unencryptedBytes[encodedFrame.type])\n }, this._cryptoKeyRing[keyIndex], new Uint8Array(encodedFrame.data, cipherTextStart, cipherTextLength))\n .then(plainText => {\n const newData = new ArrayBuffer(unencryptedBytes[encodedFrame.type] + plainText.byteLength);\n const newUint8 = new Uint8Array(newData);\n\n newUint8.set(new Uint8Array(encodedFrame.data, 0, unencryptedBytes[encodedFrame.type]));\n newUint8.set(new Uint8Array(plainText), unencryptedBytes[encodedFrame.type]);\n\n encodedFrame.data = newData;\n\n return controller.enqueue(encodedFrame);\n }, e => {\n console.error(e);\n\n // TODO: notify the application about error status.\n\n // TODO: For video we need a better strategy since we do not want to based any\n // non-error frames on a garbage keyframe.\n if (encodedFrame.type === undefined) { // audio, replace with silence.\n // audio, replace with silence.\n const newData = new ArrayBuffer(3);\n const newUint8 = new Uint8Array(newData);\n\n newUint8.set([ 0xd8, 0xff, 0xfe ]); // opus silence frame.\n encodedFrame.data = newData;\n controller.enqueue(encodedFrame);\n }\n });\n } else if (keyIndex >= this._cryptoKeyRing.length\n && this._cryptoKeyRing[this._currentKeyIndex % this._cryptoKeyRing.length]) {\n // If we are encrypting but don't have a key for the remote drop the frame.\n // This is a heuristic since we don't know whether a packet is encrypted,\n // do not have a checksum and do not have signaling for whether a remote participant does\n // encrypt or not.\n return;\n }\n\n // TODO: this just passes through to the decoder. Is that ok? If we don't know the key yet\n // we might want to buffer a bit but it is still unclear how to do that (and for how long etc).\n controller.enqueue(encodedFrame);\n }\n }\n const contexts = new Map(); // Map participant id => context\n\n onmessage = async event => {\n const { operation } = event.data;\n\n if (operation === 'initialize') {\n keySalt = event.data.salt;\n } else if (operation === 'encode') {\n const { readableStream, writableStream, participantId } = event.data;\n\n if (!contexts.has(participantId)) {\n contexts.set(participantId, new Context(participantId));\n }\n const context = contexts.get(participantId);\n const transformStream = new TransformStream({\n transform: context.encodeFunction.bind(context)\n });\n\n readableStream\n .pipeThrough(new TransformStream({\n transform: polyFillEncodedFrameMetadata, // M83 polyfill.\n }))\n .pipeThrough(transformStream)\n .pipeTo(writableStream);\n if (keyBytes) {\n context.setKey(await context.deriveKey(keyBytes, keySalt));\n }\n } else if (operation === 'decode') {\n const { readableStream, writableStream, participantId } = event.data;\n\n if (!contexts.has(participantId)) {\n contexts.set(participantId, new Context(participantId));\n }\n const context = contexts.get(participantId);\n const transformStream = new TransformStream({\n transform: context.decodeFunction.bind(context)\n });\n\n readableStream\n .pipeThrough(new TransformStream({\n transform: polyFillEncodedFrameMetadata, // M83 polyfill.\n }))\n .pipeThrough(transformStream)\n .pipeTo(writableStream);\n if (keyBytes) {\n context.setKey(await context.deriveKey(keyBytes, keySalt));\n }\n } else if (operation === 'setKey') {\n keyBytes = event.data.key;\n contexts.forEach(async context => {\n if (keyBytes) {\n context.setKey(await context.deriveKey(keyBytes, keySalt));\n } else {\n context.setKey(false);\n }\n });\n } else {\n console.error('e2ee worker', operation);\n }\n };\n"],{type:"application/javascript"}))}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return d});var r=n(4),i=n(1),o=n(64),a=n(7),s=n(5),c=Object(r.getLogger)(e),u=(function(){function e(t,n){_classCallCheck(this,e),this.participant=t,this.e2eping=n,this.id=t.getId(),this.requests={},this.lastRequestId=1,this.clearIntervals=this.clearIntervals.bind(this),this.sendRequest=this.sendRequest.bind(this),this.handleResponse=this.handleResponse.bind(this),this.maybeSendAnalytics=this.maybeSendAnalytics.bind(this),this.sendAnalytics=this.sendAnalytics.bind(this),n.isDataChannelOpen&&this.sendRequest(),this.pingInterval=window.setInterval(this.sendRequest,n.pingIntervalMs),this.analyticsInterval=window.setTimeout(this.maybeSendAnalytics,this.e2eping.analyticsIntervalMs)}return _createClass(e,[{key:"clearIntervals",value:function(){this.pingInterval&&window.clearInterval(this.pingInterval),this.analyticsInterval&&window.clearInterval(this.analyticsInterval)}},{key:"sendRequest",value:function(){var e=this.lastRequestId++,t={type:"e2e-ping-request",id:e};this.e2eping.sendMessage(t,this.id),this.requests[e]={id:e,timeSent:window.performance.now()}}},{key:"handleResponse",value:function(e){var t=this.requests[e.id];t&&(t.rtt=window.performance.now()-t.timeSent,this.e2eping.eventEmitter.emit(o.E2E_RTT_CHANGED,this.participant,t.rtt)),this.maybeSendAnalytics()}},{key:"maybeSendAnalytics",value:function(){var e,t,n=window.performance.now(),r=1/0;for(t in this.requests)this.requests.hasOwnProperty(t)&&((e=this.requests[t]).timeSent0&&this.analyticsIntervalMs "+t),this._conference.eventEmitter.emit(i.JVB121_STATUS,e,t))}}]),e})()}).call(this,"modules/event/Jvb121EventGenerator.js")},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(1),i=n(52),o=(function(){function e(t){var n=this;_classCallCheck(this,e),this.conference=t,this.conference.on(r._MEDIA_SESSION_STARTED,function(e){return n._onMediaSessionStarted(e)}),this.conference.on(r._MEDIA_SESSION_ACTIVE_CHANGED,function(){return n._propagateSendMaxFrameHeight()})}return _createClass(e,[{key:"_onMediaSessionStarted",value:function(e){var t=this;e.addListener(i.a.REMOTE_VIDEO_CONSTRAINTS_CHANGED,function(e){e===t.conference._getActiveMediaSession()&&t._propagateSendMaxFrameHeight()}),this.preferredReceiveMaxFrameHeight&&e.setReceiverVideoConstraint(this.preferredReceiveMaxFrameHeight),e.setSenderVideoDegradationPreference(),e.setSenderMaxBitrates()}},{key:"_propagateSendMaxFrameHeight",value:function(){var e=this.selectSendMaxFrameHeight(),t=[];if(e>=0){var n=this.conference._getMediaSessions(),r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol&&"function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;t.push(a.setSenderVideoConstraint(e))}}return Promise.all(t)}},{key:"selectSendMaxFrameHeight",value:function(){var e=this.conference._getActiveMediaSession(),t=e&&e.getRemoteRecvMaxFrameHeight();return this.preferredSendMaxFrameHeight>=0&&t>=0?Math.min(this.preferredSendMaxFrameHeight,t):t>=0?t:this.preferredSendMaxFrameHeight}},{key:"setPreferredReceiveMaxFrameHeight",value:function(e){this.preferredReceiveMaxFrameHeight=e;var t=this.conference._getMediaSessions(),n=Array.isArray(t),r=0;for(t=n?t:t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}e&&i.setReceiverVideoConstraint(e)}}},{key:"setPreferredSendMaxFrameHeight",value:function(e){return this.preferredSendMaxFrameHeight=e,this._propagateSendMaxFrameHeight()}}]),e})()},function(e,t,n){"use strict";(function(e){var r=n(4),i=n(0),o=n.n(i),a=n(71),s=n(50);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=Object(r.getLogger)(e);t.a=(function(){function e(t){_classCallCheck(this,e),this._sessions={},this._chatRoom=t,this.onPresence=this.onPresence.bind(this),this._chatRoom.eventEmitter.addListener(o.a.PRESENCE_RECEIVED,this.onPresence)}return _createClass(e,[{key:"getSession",value:function(e){return this._sessions[e]}},{key:"onPresence",value:function(e){var t=e.fromHiddenDomain,n=e.presence;s.a.isFromFocus(n)?this._handleFocusPresence(n):t&&this._handleJibriPresence(n)}},{key:"startRecording",value:function(e){var t=this,n=new a.a((function(e){for(var t=1;t0&&i.isAudioMuted())){var a=this._localAudioLevelCache[e];Array.isArray(a)&&!a.every(function(e){return 0===e})||(this._audioProblemCandidates[e]={remoteAudioLevels:n,localAudioLevels:[]})}}}},{key:"_onLocalAudioLevelsReport",value:function(e,t){var n=this,r=t.avgAudioLevels;e===this._conference.getActivePeerConnection()&&(Object.keys(r).forEach(function(e){if(-1===n._reportedParticipants.indexOf(e)){var t=n._localAudioLevelCache[e];Array.isArray(t)?t.length>=2&&t.shift():n._localAudioLevelCache[e]=[],n._localAudioLevelCache[e].push(r[e])}}),Object.keys(this._audioProblemCandidates).forEach(function(e){var t=n._audioProblemCandidates[e],i=t.localAudioLevels,o=t.remoteAudioLevels;if(i.push(r[e]),2===i.length){if(i.every(function(e){return void 0===e||0===e})){var a=JSON.stringify(i);c.a.sendAnalytics(Object(s.x)(e,a,o)),u.warn("A potential problem is detected with the audio output for participant "+e+", local audio levels: "+a+", remote audio levels: "+o),n._reportedParticipants.push(e),n._clearUserData(e)}delete n._audioProblemCandidates[e]}}))}},{key:"_clearUserData",value:function(e){delete this._localAudioLevelCache[e]}},{key:"dispose",value:function(){this._conference.off(a.REMOTE_STATS_UPDATED,this._onRemoteAudioLevelReceived),this._conference.off(i.USER_LEFT,this._clearUserData),this._conference.statistics.removeConnectionStatsListener(this._onLocalAudioLevelsReport),this._localAudioLevelCache=void 0,this._audioProblemCandidates=void 0,this._reportedParticipants=void 0,this._numberOfRemoteAudioLevelsReceived=void 0,this._conference=void 0}}]),e})()}).call(this,"modules/statistics/AudioOutputProblemDetector.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return v});var r=n(4),i=n(56),o=n.n(i),a=n(1),s=n(8),c=n(13),u=n(29),d=n(7),l=n(3),h=n(5),p=Object(r.getLogger)(e),f=(function(){function e(t){_classCallCheck(this,e),this.name=t,this.count=0,this.sum=0,this.samples=[]}return _createClass(e,[{key:"addNext",value:function(e){"number"!=typeof e?p.error(this.name+" - invalid value for idx: "+this.count,e):isNaN(e)||(this.sum+=e,this.samples.push(e),this.count+=1)}},{key:"calculate",value:function(){return this.sum/this.count}},{key:"appendReport",value:function(e){e[this.name+"_avg"]=this.calculate(),e[this.name+"_samples"]=JSON.stringify(this.samples)}},{key:"reset",value:function(){this.samples=[],this.sum=0,this.count=0}}]),e})(),m=(function(){function e(t,n,r){var i=this;_classCallCheck(this,e),this.isP2P=n,this._n=r,this._sampleIdx=0,this._avgRTT=new f("rtt"),this._avgRemoteRTTMap=new Map,this._avgRtpStatsReporter=t,this._avgEnd2EndRTT=void 0,this._onConnectionStats=function(e,t){i.isP2P===e.isP2P&&i._calculateAvgStats(t)};var o=t._conference;o.statistics.addConnectionStatsListener(this._onConnectionStats),this.isP2P||(this._onUserLeft=function(e){return i._avgRemoteRTTMap.delete(e)},o.on(a.USER_LEFT,this._onUserLeft),this._onRemoteStatsUpdated=function(e,t){return i._processRemoteStats(e,t)},o.on(u.REMOTE_STATS_UPDATED,this._onRemoteStatsUpdated))}return _createClass(e,[{key:"_calculateAvgStats",value:function(e){if(e){if(l.a.supportsRTTStatistics()&&e.transport&&e.transport.length&&this._avgRTT.addNext(e.transport[0].rtt),this._sampleIdx+=1,this._sampleIdx>=this._n){if(l.a.supportsRTTStatistics()){var t=this._avgRtpStatsReporter._conference,n={p2p:this.isP2P,conference_size:t.getParticipantCount()};if(e.transport&&e.transport.length&&_extends(n,{local_candidate_type:e.transport[0].localCandidateType,remote_candidate_type:e.transport[0].remoteCandidateType,transport_type:e.transport[0].type}),this._avgRTT.appendReport(n),this.isP2P){var r=this._avgRtpStatsReporter.jvbStatsMonitor._avgEnd2EndRTT;isNaN(r)||(n.rtt_diff=this._avgRTT.calculate()-r)}else{var i=this._calculateAvgRemoteRTT(),o=this._avgRTT.calculate();this._avgEnd2EndRTT=o+i,isNaN(o)||isNaN(i)||(n.end2end_rtt_avg=this._avgEnd2EndRTT)}h.a.sendAnalytics(Object(d.L)(n))}this._resetAvgStats()}}else p.error("No stats")}},{key:"_calculateAvgRemoteRTT",value:function(){var e=0,t=0,n=this._avgRemoteRTTMap.values(),r=Array.isArray(n),i=0;for(n=r?n:n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o,s=a.calculate();isNaN(s)||(t+=s,e+=1,a.reset())}return t/e}},{key:"_processRemoteStats",value:function(e,t){var n="number"==typeof t.jvbRTT,r=this._avgRemoteRTTMap.get(e);!r&&n&&(r=new f(e+"_stat_rtt"),this._avgRemoteRTTMap.set(e,r)),n?r.addNext(t.jvbRTT):r&&this._avgRemoteRTTMap.delete(e)}},{key:"_resetAvgStats",value:function(){this._avgRTT.reset(),this._avgRemoteRTTMap&&this._avgRemoteRTTMap.clear(),this._sampleIdx=0}},{key:"dispose",value:function(){var e=this._avgRtpStatsReporter._conference;e.statistics.removeConnectionStatsListener(this._onConnectionStats),this.isP2P||(e.off(u.REMOTE_STATS_UPDATED,this._onRemoteStatsUpdated),e.off(a.USER_LEFT,this._onUserLeft))}}]),e})(),v=(function(){function e(t,n){var r=this;_classCallCheck(this,e),this._n=n,n>0?(p.info("Avg RTP stats will be calculated every "+n+" samples"),this._sampleIdx=0,this._conference=t,this._avgAudioBitrateUp=new f("bitrate_audio_upload"),this._avgAudioBitrateDown=new f("bitrate_audio_download"),this._avgVideoBitrateUp=new f("bitrate_video_upload"),this._avgVideoBitrateDown=new f("bitrate_video_download"),this._avgBandwidthUp=new f("bandwidth_upload"),this._avgBandwidthDown=new f("bandwidth_download"),this._avgPacketLossTotal=new f("packet_loss_total"),this._avgPacketLossUp=new f("packet_loss_upload"),this._avgPacketLossDown=new f("packet_loss_download"),this._avgRemoteFPS=new f("framerate_remote"),this._avgRemoteScreenFPS=new f("framerate_screen_remote"),this._avgLocalFPS=new f("framerate_local"),this._avgLocalScreenFPS=new f("framerate_screen_local"),this._avgRemoteCameraPixels=new f("pixels_remote"),this._avgRemoteScreenPixels=new f("pixels_screen_remote"),this._avgLocalCameraPixels=new f("pixels_local"),this._avgLocalScreenPixels=new f("pixels_screen_local"),this._avgCQ=new f("connection_quality"),this._cachedTransportStats=void 0,this._onLocalStatsUpdated=function(e){r._calculateAvgStats(e),r._maybeSendTransportAnalyticsEvent(e)},t.on(u.LOCAL_STATS_UPDATED,this._onLocalStatsUpdated),this._onP2PStatusChanged=function(){p.debug("Resetting average stats calculation"),r._resetAvgStats(),r.jvbStatsMonitor._resetAvgStats(),r.p2pStatsMonitor._resetAvgStats()},t.on(a.P2P_STATUS,this._onP2PStatusChanged),this._onJvb121StatusChanged=function(e,t){!0===t&&(p.info("Resetting JVB avg RTP stats"),r._resetAvgJvbStats())},t.on(a.JVB121_STATUS,this._onJvb121StatusChanged),this.jvbStatsMonitor=new m(this,!1,n),this.p2pStatsMonitor=new m(this,!0,n)):p.info("Avg RTP stats reports are disabled.")}return _createClass(e,[{key:"_calculateAvgStats",value:function(e){if(e){var t=this._conference.isP2PActive(),n=this._conference.getParticipantCount();if(t||!(n<2)){var r=e.bitrate,i=e.bandwidth,o=e.packetLoss,a=e.framerate,s=e.resolution;if(r)if(i)if(o)if(a)if(s){if(this._avgAudioBitrateUp.addNext(r.audio.upload),this._avgAudioBitrateDown.addNext(r.audio.download),this._avgVideoBitrateUp.addNext(r.video.upload),this._avgVideoBitrateDown.addNext(r.video.download),l.a.supportsBandwidthStatistics()&&(this._avgBandwidthUp.addNext(i.upload),this._avgBandwidthDown.addNext(i.download)),this._avgPacketLossUp.addNext(o.upload),this._avgPacketLossDown.addNext(o.download),this._avgPacketLossTotal.addNext(o.total),this._avgCQ.addNext(e.connectionQuality),a&&(this._avgRemoteFPS.addNext(this._calculateAvgVideoFps(a,!1,c.CAMERA)),this._avgRemoteScreenFPS.addNext(this._calculateAvgVideoFps(a,!1,c.DESKTOP)),this._avgLocalFPS.addNext(this._calculateAvgVideoFps(a,!0,c.CAMERA)),this._avgLocalScreenFPS.addNext(this._calculateAvgVideoFps(a,!0,c.DESKTOP))),s&&(this._avgRemoteCameraPixels.addNext(this._calculateAvgVideoPixels(s,!1,c.CAMERA)),this._avgRemoteScreenPixels.addNext(this._calculateAvgVideoPixels(s,!1,c.DESKTOP)),this._avgLocalCameraPixels.addNext(this._calculateAvgVideoPixels(s,!0,c.CAMERA)),this._avgLocalScreenPixels.addNext(this._calculateAvgVideoPixels(s,!0,c.DESKTOP))),this._sampleIdx+=1,this._sampleIdx>=this._n){var u={p2p:t,conference_size:n};e.transport&&e.transport.length&&_extends(u,{local_candidate_type:e.transport[0].localCandidateType,remote_candidate_type:e.transport[0].remoteCandidateType,transport_type:e.transport[0].type}),this._avgAudioBitrateUp.appendReport(u),this._avgAudioBitrateDown.appendReport(u),this._avgVideoBitrateUp.appendReport(u),this._avgVideoBitrateDown.appendReport(u),l.a.supportsBandwidthStatistics()&&(this._avgBandwidthUp.appendReport(u),this._avgBandwidthDown.appendReport(u)),this._avgPacketLossUp.appendReport(u),this._avgPacketLossDown.appendReport(u),this._avgPacketLossTotal.appendReport(u),this._avgRemoteFPS.appendReport(u),isNaN(this._avgRemoteScreenFPS.calculate())||this._avgRemoteScreenFPS.appendReport(u),this._avgLocalFPS.appendReport(u),isNaN(this._avgLocalScreenFPS.calculate())||this._avgLocalScreenFPS.appendReport(u),this._avgRemoteCameraPixels.appendReport(u),isNaN(this._avgRemoteScreenPixels.calculate())||this._avgRemoteScreenPixels.appendReport(u),this._avgLocalCameraPixels.appendReport(u),isNaN(this._avgLocalScreenPixels.calculate())||this._avgLocalScreenPixels.appendReport(u),this._avgCQ.appendReport(u),h.a.sendAnalytics(Object(d.L)(u)),this._resetAvgStats()}}else p.error("No resolution");else p.error('No "framerate"');else p.error('No "packetloss"');else p.error('No "bandwidth"');else p.error('No "bitrate"')}}else p.error("No stats")}},{key:"_calculateAvgVideoPixels",value:function(e,t,n){for(var r=0,i=0,o=this._conference.myUserId(),a=Object.keys(e),s=0;s=u.length)break;h=u[l++]}else{if((l=u.next()).done)break;h=l.value}var p=h,f=Number(e[p].height)*Number(e[p].width);!isNaN(f)&&f>0&&(a+=f,c+=1)}return a/c}},{key:"_calculateAvgVideoFps",value:function(e,t,n){for(var r=0,i=0,o=this._conference.myUserId(),a=Object.keys(e),s=0;s=u.length)break;h=u[l++]}else{if((l=u.next()).done)break;h=l.value}var p=Number(e[h]);!isNaN(p)&&p>0&&(a+=p,c+=1)}return a/c}},{key:"_maybeSendTransportAnalyticsEvent",value:function(e){if(e&&e.transport&&e.transport.length){var t={p2p:e.transport[0].p2p,local_candidate_type:e.transport[0].localCandidateType,remote_candidate_type:e.transport[0].remoteCandidateType,transport_type:e.transport[0].type};this._cachedTransportStats&&o()(t,this._cachedTransportStats)||(this._cachedTransportStats=t,h.a.sendAnalytics(Object(d.M)(t)))}}},{key:"_resetAvgJvbStats",value:function(){this._resetAvgStats(),this.jvbStatsMonitor._resetAvgStats()}},{key:"_resetAvgStats",value:function(){this._avgAudioBitrateUp.reset(),this._avgAudioBitrateDown.reset(),this._avgVideoBitrateUp.reset(),this._avgVideoBitrateDown.reset(),this._avgBandwidthUp.reset(),this._avgBandwidthDown.reset(),this._avgPacketLossUp.reset(),this._avgPacketLossDown.reset(),this._avgPacketLossTotal.reset(),this._avgRemoteFPS.reset(),this._avgRemoteScreenFPS.reset(),this._avgLocalFPS.reset(),this._avgLocalScreenFPS.reset(),this._avgRemoteCameraPixels.reset(),this._avgRemoteScreenPixels.reset(),this._avgLocalCameraPixels.reset(),this._avgLocalScreenPixels.reset(),this._avgCQ.reset(),this._sampleIdx=0}},{key:"dispose",value:function(){this._conference.off(a.P2P_STATUS,this._onP2PStatusChanged),this._conference.off(u.LOCAL_STATS_UPDATED,this._onLocalStatsUpdated),this._conference.off(a.JVB121_STATUS,this._onJvb121StatusChanged),this.jvbStatsMonitor.dispose(),this.p2pStatsMonitor.dispose()}}]),e})()}).call(this,"modules/statistics/AvgRTPStatsReporter.js")},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(1),i=n(0),o=n.n(i),a=n(66),s=n.n(a),c=(function(){function e(t){_classCallCheck(this,e),this.stats={users:{},dominantSpeakerId:null};var n=t.myUserId();this.stats.users[n]=new s.a(n,null,!0),this.conference=t,t.addEventListener(r.DOMINANT_SPEAKER_CHANGED,this._onDominantSpeaker.bind(this)),t.addEventListener(r.USER_JOINED,this._onUserJoin.bind(this)),t.addEventListener(r.USER_LEFT,this._onUserLeave.bind(this)),t.addEventListener(r.DISPLAY_NAME_CHANGED,this._onDisplayNameChange.bind(this)),t.xmpp&&t.xmpp.addListener(o.a.SPEAKER_STATS_RECEIVED,this._updateStats.bind(this))}return _createClass(e,[{key:"_onDominantSpeaker",value:function(e){var t=this.stats.users[this.stats.dominantSpeakerId],n=this.stats.users[e];t&&t.setDominantSpeaker(!1),n&&n.setDominantSpeaker(!0),this.stats.dominantSpeakerId=e}},{key:"_onUserJoin",value:function(e,t){t.isHidden()||this.stats.users[e]||(this.stats.users[e]=new s.a(e,t.getDisplayName()))}},{key:"_onUserLeave",value:function(e){var t=this.stats.users[e];t&&t.markAsHasLeft()}},{key:"_onDisplayNameChange",value:function(e,t){var n=this.stats.users[e];n&&n.setDisplayName(t)}},{key:"getStats",value:function(){return this.stats.users}},{key:"_updateStats",value:function(e){for(var t in e){var n=void 0,r=this.conference.getParticipantById(t);r&&r.isHidden()||(this.stats.users[t]?(n=this.stats.users[t]).getDisplayName()||n.setDisplayName(e[t].displayName):(n=new s.a(t,e[t].displayName),this.stats.users[t]=n,n.markAsHasLeft())),n.totalDominantSpeakerTime=e[t].totalDominantSpeakerTime}}}]),e})()},function(e,t,n){var r=n(76),i=n(157);function o(){this.audioRecorder=new r,this.transcriptionService=new i,this.counter=null,this.startTime=null,this.transcription=null,this.callback=null,this.results=[],this.state="before",this.lineLength=0}function a(e,t){if(console.log("retrieved an answer from the transcription service. The answer has an array of length: "+t.wordArray.length),t.wordArray.length>0){var n=t.startTime.getUTCMilliseconds()-e.startTime.getUTCMilliseconds();n<0&&(n=0);var r="[";t.wordArray.forEach(function(e){e.begin+=n,e.end+=n,r+=e.word+","}),r+="]",console.log(r),t.wordArray.name=t.name}e.results.push(t.wordArray),e.counter--,console.log("current counter: "+e.counter),e.maybeMerge()}function s(e){for(var t=0;t0}o.prototype.start=function(){if("before"!==this.state)throw new Error("The transcription can only start when it's in the \"before\" state. It's currently in the \""+this.state+"\" state");this.state="recording",this.audioRecorder.start(),this.startTime=new Date},o.prototype.stop=function(e){var t=this;if("recording"!==this.state)throw new Error("The transcription can only stop when it's in the \"recording\" state. It's currently in the \""+this.state+"\" state");console.log("stopping recording and sending audio files"),this.audioRecorder.stop();var n=a.bind(null,this);this.audioRecorder.getRecordingResults().forEach(function(e){t.transcriptionService.send(e,n),t.counter++}),this.state="transcribing",this.callback=e},o.prototype.maybeMerge=function(){"transcribing"===this.state&&0===this.counter&&this.merge()},o.prototype.merge=function(){var e=this;console.log("starting merge process!\n The length of the array: "+this.results.length),this.transcription="";var t=this.results,n=[],r=function(){var n=t[0];t.forEach(function(e){e[0].begin0;){if("break"===i())break}};for(s(t),t.forEach(function(e){return(function(e,t){if(0===e.length)e.push(t);else{if(e[e.length-1].begin<=t.begin)return void e.push(t);for(var n=0;n80&&(this.transcription+="\n ",this.lineLength=4),this.transcription+=" "+e.word,this.lineLength+=e.word.length+1},o.prototype.addTrack=function(e){this.audioRecorder.addTrack(e)},o.prototype.removeTrack=function(e){this.audioRecorder.removeTrack(e)},o.prototype.getTranscription=function(){if("finished"!==this.state)throw new Error("The transcription can only be retrieved when it's in the \"finished\" state. It's currently in the \""+this.state+"\" state");return this.transcription},o.prototype.getState=function(){return this.state},o.prototype.reset=function(){this.state="before",this.counter=null,this.transcription=null,this.startTime=null,this.callback=null,this.results=[],this.lineLength=0},e.exports=o},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return o});var r=n(5),i=n(4).getLogger(e);function o(e){this.versions={},this.conference=e,this.conference.addCommandListener("versions",this.processVersions.bind(this))}o.prototype.processVersions=function(e,t,n){var o=this;if(this.conference._isFocus(n)){var a=[];e.children.forEach(function(e){var t=e.attributes.name,n=e.value;o.versions[t]!==n&&(o.versions[t]=n,i.info("Got "+t+" version: "+n),a.push({id:"component_version",component:t,version:n}))}),a.length>0&&r.a.sendLog(JSON.stringify(a))}else i.warn("Received versions not from the focus user: "+e,n)},o.prototype.getComponentVersion=function(e){return this.versions[e]}}).call(this,"modules/version/ComponentsVersions.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return u});var r=n(4),i=n(0),o=n.n(i),a=n(133),s=n(24),c=Object(r.getLogger)(e),u=(function(){function e(t){_classCallCheck(this,e),this.chatRoom=t,this.eventEmitter=t.eventEmitter,c.debug("creating VideoSIPGW"),this.sessions={},this.sessionStateChangeListener=this.sessionStateChanged.bind(this),t.addPresenceListener("jibri-sip-call-state",this.handleJibriSIPState.bind(this))}return _createClass(e,[{key:"handleJibriSIPState",value:function(e){var t=e.attributes;if(t){c.debug("Handle video sip gw state : ",t);var n=t.state;if(n!==this.state)switch(n){case s.STATE_ON:case s.STATE_OFF:case s.STATE_PENDING:case s.STATE_RETRYING:case s.STATE_FAILED:var r=t.sipaddress;if(!r)return;var i=this.sessions[r];i?i.setState(n,t.failure_reason):c.warn("Video SIP GW session not found:",r)}}}},{key:"createVideoSIPGWSession",value:function(e,t){if(this.sessions[e])return c.warn("There was already a Video SIP GW session for address",e),new Error(s.ERROR_SESSION_EXISTS);var n=new a.a(e,t,this.chatRoom);return n.addStateListener(this.sessionStateChangeListener),this.sessions[e]=n,n}},{key:"sessionStateChanged",value:function(e){var t=e.address;if(e.newState===s.STATE_OFF||e.newState===s.STATE_FAILED){var n=this.sessions[t];if(!n)return void c.error("Missing Video SIP GW session with address:",t);n.removeStateListener(this.sessionStateChangeListener),delete this.sessions[t]}this.eventEmitter.emit(o.a.VIDEO_SIP_GW_SESSION_STATE_CHANGED,e)}}]),e})()}).call(this,"modules/videosipgw/VideoSIPGW.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return c});var r=n(4),i=n(2),o=n(21),a=n(24),s=Object(r.getLogger)(e),c=(function(e){function t(e,n,r){var i;return _classCallCheck(this,t),(i=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this))).sipAddress=e,i.displayName=n,i.chatRoom=r,i.state=void 0,i}return _inherits(t,e),_createClass(t,[{key:"stop",value:function(){this.state!==a.STATE_OFF&&this.state!==a.STATE_FAILED?this._sendJibriIQ("stop"):s.warn("Video SIP GW session already stopped or failed!")}},{key:"start",value:function(){this.state!==a.STATE_ON&&this.state!==a.STATE_OFF&&this.state!==a.STATE_PENDING&&this.state!==a.STATE_RETRYING?this._sendJibriIQ("start"):s.warn("Video SIP GW session already started!")}},{key:"setState",value:function(e,t){if(e!==this.state){var n=this.state;this.state=e,this.eventEmitter.emit("STATE_CHANGED",{address:this.sipAddress,failureReason:t,oldState:n,newState:this.state,displayName:this.displayName})}}},{key:"addStateListener",value:function(e){this.addListener("STATE_CHANGED",e)}},{key:"removeStateListener",value:function(e){this.removeListener("STATE_CHANGED",e)}},{key:"_sendJibriIQ",value:function(e){var t=this,n={xmlns:"http://jitsi.org/protocol/jibri",action:e,sipaddress:this.sipAddress};n.displayname=this.displayName;var r=Object(i.$iq)({to:this.chatRoom.focusMucJid,type:"set"}).c("jibri",n).up();s.debug(e+" video SIP GW session",r.nodeTree),this.chatRoom.connection.sendIQ(r,function(){},function(n){s.error("Failed to "+e+" video SIP GW session, error: ",n),t.setState(a.STATE_FAILED)})}}]),t})(o.a)}).call(this,"modules/videosipgw/JitsiVideoSIPGWSession.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return c});var r=n(4),i=n(15),o=n(12),a=n(5),s=Object(r.getLogger)(e);function c(){return new Promise(function(e){o.a.enumerateDevices(function(t){var n=[],r=t.filter(function(e){return"audioinput"===e.kind}),c=Array.isArray(r),d=0;for(r=c?r:r["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var l;if(c){if(d>=r.length)break;l=r[d++]}else{if((d=r.next()).done)break;l=d.value}var h=l,p=o.a.obtainAudioAndVideoPermissions({devices:["audio"],micDeviceId:h.deviceId}).then(function(e){var t=e[0],n=t.getOriginalStream();return a.a.startLocalStats(n,t.setAudioLevel.bind(t)),t.addEventListener(i.LOCAL_TRACK_STOPPED,function(){a.a.stopLocalStats(n)}),t});n.push(p)}Promise.allSettled(n).then(function(t){var n=t.filter(function(e){return"fulfilled"===e.status}),r=t.filter(function(e){return"rejected"===e.status}),o=n.map(function(e){return e.value}),a=r.map(function(e){return e.value}),c=Array.isArray(a),d=0;for(a=c?a:a["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var l;if(c){if(d>=a.length)break;l=a[d++]}else{if((d=a.next()).done)break;l=d.value}var h=l;s.error("Failed to acquire audio device with error: ",h)}var p=function(t){t.on(i.TRACK_AUDIO_LEVEL_CHANGED,function(n){n>.008&&(u(o),e({deviceId:t.deviceId,deviceLabel:t.track.label}))})},f=o,m=Array.isArray(f),v=0;for(f=m?f:f["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var g;if(m){if(v>=f.length)break;g=f[v++]}else{if((v=f.next()).done)break;g=v.value}p(g)}setTimeout(function(){u(o),e({deviceId:"",deviceLabel:""})},3e3)})})})}function u(e){var t=e,n=Array.isArray(t),r=0;for(t=n?t:t["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}i.stopStream()}}}).call(this,"modules/detection/ActiveDeviceDetector.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return m});var r=n(4),i=n(2),o=n(8),a=n(13),s=n.n(a),c=n(12),u=n(136),d=n(32);function l(e){for(var t=1;t=0||(i[n]=e[n]);return i})(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var f=Object(r.getLogger)(e),m=(function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,e);var n=t.jitsiConnection,r=p(t,["jitsiConnection"]);this._options=l({iceConfig:n&&n.xmpp.connection.jingle.p2pIceConfig},r),this._peerConnection=null,this._onFatalError=this._onFatalError.bind(this),this._onSendMessage=this._onSendMessage.bind(this),this._onRemoteStream=this._onRemoteStream.bind(this)}return _createClass(e,[{key:"processMessage",value:function(e){var t=e.from;if(t)if(this._peerConnection&&this._peerConnection.getPeerJid()!==t)this._onFatalError(t,d.a.CONNECTION_ERROR,"rejected");else{var n=this._convertStringToXML(e.data.iq),r=n&&n.find("jingle"),i=r&&r.attr("action");i===d.a.INITIATE&&(this._peerConnection=this._createPeerConnection(t,{isInitiator:!1,receiveVideo:!0})),this._peerConnection&&this._peerConnection.processMessage(r),i!==d.a.CONNECTION_ERROR&&i!==d.a.UNAVAILABLE&&i!==d.a.TERMINATE||this._selfCloseConnection()}}},{key:"start",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this._peerConnection=this._createPeerConnection(e,{isInitiator:!0,receiveVideo:!1}),this._peerConnection.start(t)}},{key:"stop",value:function(){this._peerConnection&&this._peerConnection.stop(),this._peerConnection=null}},{key:"_convertStringToXML",value:function(e){try{var t=(new DOMParser).parseFromString(e,"text/xml");return $(t)}catch(e){return f.error("Attempted to convert incorrectly formatted xml"),null}}},{key:"_createPeerConnection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("Cannot create ProxyConnectionPC without a peer.");var n=l({iceConfig:this._options.iceConfig,onError:this._onFatalError,onRemoteStream:this._onRemoteStream,onSendMessage:this._onSendMessage,peerJid:e},t);return new u.a(n)}},{key:"_onFatalError",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";f.error("Received a proxy connection error",e,t,n);var r=Object(i.$iq)({to:e,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:t}).c("details").t(n).up();this._onSendMessage(e,r),this._peerConnection&&this._peerConnection.getPeerJid()===e&&this._selfCloseConnection()}},{key:"_onRemoteStream",value:function(e){if(!this._options.onRemoteStream)return f.error("Remote track received without callback."),void e.dispose();var t,n=e.isVideoTrack();n&&(t=this._options.convertVideoToDesktop?s.a.DESKTOP:s.a.CAMERA);var r=e.getOriginalStream(),i=c.a.newCreateLocalTracks([{deviceId:"proxy:"+this._peerConnection.getPeerJid(),mediaType:n?o.c:o.a,sourceType:"proxy",stream:r,track:r.getVideoTracks()[0],videoType:t}]);this._options.onRemoteStream(i[0])}},{key:"_onSendMessage",value:function(e,t){if(this._options.onSendMessage)try{var n=(new XMLSerializer).serializeToString(t.nodeTree||t);this._options.onSendMessage(e,{iq:n})}catch(e){f.error("Attempted to send an incorrectly formatted iq.")}}},{key:"_selfCloseConnection",value:function(){this.stop(),this._options.onConnectionClosed&&this._options.onConnectionClosed()}}]),e})()}).call(this,"modules/proxyconnection/ProxyConnectionService.js")},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return m});var r=n(4),i=n(6),o=n.n(i),a=n(0),s=n.n(a),c=n(12),u=n(51),d=n(37),l=n(32);function h(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,e),this._options=h({iceConfig:{},isInitiator:!1,receiveAudio:!1,receiveVideo:!1},t),this._tracks=[],this._peerConnection=null,this._onError=this._onError.bind(this),this._onRemoteStream=this._onRemoteStream.bind(this),this._onSendMessage=this._onSendMessage.bind(this)}return _createClass(e,[{key:"getPeerJid",value:function(){return this._options.peerJid}},{key:"processMessage",value:function(e){switch(e.attr("action")){case l.a.ACCEPT:this._onSessionAccept(e);break;case l.a.INITIATE:this._onSessionInitiate(e);break;case l.a.TERMINATE:this._onSessionTerminate(e);break;case l.a.TRANSPORT_INFO:this._onTransportInfo(e)}}},{key:"start",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._peerConnection||(this._tracks=this._tracks.concat(e),this._peerConnection=this._createPeerConnection(),this._peerConnection.invite(e))}},{key:"stop",value:function(){this._peerConnection&&this._peerConnection.terminate(),this._onSessionTerminate()}},{key:"_createPeerConnection",value:function(){var e=this,t={connected:!0,jingle:{terminate:function(){}},sendIQ:this._onSendMessage,addEventListener:function(){return function(){}}},n=h({iceServers:d.a},this._options.iceConfig),r={addPresenceListener:function(){},connectionTimes:[],eventEmitter:{emit:function(t){switch(t){case s.a.CONNECTION_ICE_FAILED:case s.a.CONNECTION_FAILED:e._onError(l.a.CONNECTION_ERROR,t)}}},getMediaPresenceInfo:function(){return{}},removePresenceListener:function(){}};this._rtc=new c.a({},{}),this._rtc.addListener(o.a.REMOTE_TRACK_ADDED,this._onRemoteStream);var i=new u.a(void 0,void 0,this._options.peerJid,t,{offerToReceiveAudio:this._options.receiveAudio,offerToReceiveVideo:this._options.receiveVideo},n,!0,this._options.isInitiator);return i.initialize(r,this._rtc,{}),i}},{key:"_onError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this._options.onError(this._options.peerJid,e,t)}},{key:"_onRemoteStream",value:function(e){this._tracks.push(e),this._options.onRemoteStream(e)}},{key:"_onSendMessage",value:function(e){this._options.onSendMessage(this._options.peerJid,e)}},{key:"_onSessionAccept",value:function(e){this._peerConnection?this._peerConnection.setAnswer(e):f.error("Received an answer when no peer connection exists.")}},{key:"_onSessionInitiate",value:function(e){var t=this;this._peerConnection?f.error("Received an offer when an offer was already sent."):(this._peerConnection=this._createPeerConnection(),this._peerConnection.acceptOffer(e,function(){},function(){return t._onError(t._options.peerJid,l.a.CONNECTION_ERROR,"session initiate error")}))}},{key:"_onSessionTerminate",value:function(){this._tracks.forEach(function(e){return e.dispose()}),this._tracks=[],this._peerConnection&&this._peerConnection.onTerminated(),this._rtc&&(this._rtc.removeListener(o.a.REMOTE_TRACK_ADDED,this._onRemoteStream),this._rtc.destroy())}},{key:"_onTransportInfo",value:function(e){this._peerConnection.addIceCandidates(e)}}]),e})()}).call(this,"modules/proxyconnection/ProxyConnectionPC.js")},function(e,t,n){"use strict";t.a={error:{BUSY:"busy",ERROR:"error",RESOURCE_CONSTRAINT:"resource-constraint",SERVICE_UNAVAILABLE:"service-unavailable"},mode:{FILE:"file",STREAM:"stream"},status:{OFF:"off",ON:"on",PENDING:"pending"}}},function(e,t,n){"use strict";var r=n(19),i=n.n(r),o=n(3),a=n(30),s=n(46),c=n.n(s),u=n(58),d=new i.a,l=!1,h=null;t.a={init:function(e){return _regeneratorRuntime.async(function(t){for(;;)switch(t.prev=t.next){case 0:if(!l){t.next=2;break}throw new Error("Precall Test already initialized");case 2:return t.next=4,_regeneratorRuntime.awrap((function(){if(!o.a.isReactNative())return new Promise(function(e){c.a.loadScript(u.a,!0,!0,void 0,e)})})());case 4:return h=new window.callstats,t.abrupt("return",(function(e){return new Promise(function(t,n){if(!e.disableThirdPartyRequests){var r=e.callStatsID,i=e.callStatsSecret,o=e.statisticsId||e.statisticsDisplayName||a.a.callStatsUserName;h.initialize(r,i,o,function(e,r){"success"===e?(h.on("preCallTestResults",function(){for(var e=arguments.length,t=new Array(e),n=0;n=e.length)break;r=e[n++]}else{if((n=e.next()).done)break;r=n.value}var a=r,s=this._audioContext.createMediaStreamSource(a);s.connect(this._mixedMSD),this._streamMSSArray.push(s)}return this._mixedMSD.stream}},{key:"reset",value:function(){this._started=!1,this._streamsToMix=[];var e=this._streamMSSArray,t=Array.isArray(e),n=0;for(e=t?e:e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var r;if(t){if(n>=e.length)break;r=e[n++]}else{if((n=e.next()).done)break;r=n.value}r.disconnect()}this._streamMSSArray=[],this._audioContext&&(this._audioContext=void 0)}}]),e})()}).call(this,"modules/webaudio/AudioMixer.js")},function(e,t,n){"use strict";n.d(t,"a",function(){return m});var r=n(41),i=n.n(r),o=n(25),a=n.n(o),s=function(e,t){return void 0!==e&&void 0!==e.media&&Array.isArray(e.media)&&e.media.forEach(function(e){e.sources&&e.sources.length&&(e.ssrcs=[],e.sources.forEach(function(t){Object.keys(t).forEach(function(n){"id"!==n&&e.ssrcs.push({id:t.id,attribute:n,value:t[n]})})}),delete e.sources),e.ssrcGroups&&e.ssrcGroups.length&&e.ssrcGroups.forEach(function(e){void 0!==e.ssrcs&&Array.isArray(e.ssrcs)&&(e.ssrcs=e.ssrcs.join(" "))})}),a.a.write(e,t)},c=function(e){var t=a.a.parse(e);return void 0!==t&&void 0!==t.media&&Array.isArray(t.media)&&t.media.forEach(function(e){void 0!==e.ssrcs&&Array.isArray(e.ssrcs)&&(e.sources=[],e.ssrcs.forEach(function(t){var n=e.sources.findIndex(function(e){return e.id===t.id});if(n>-1)e.sources[n][t.attribute]=t.value;else{var r={id:t.id};r[t.attribute]=t.value,e.sources.push(r)}}),delete e.ssrcs),void 0!==e.ssrcGroups&&Array.isArray(e.ssrcGroups)&&e.ssrcGroups.forEach(function(e){"string"==typeof e.ssrcs&&(e.ssrcs=e.ssrcs.split(" "))})}),t},u=["audio","video","data"],d=function(e){return e.find(function(e){return"SIM"===e.semantics})},l=function(e){return e.find(function(e){return"FID"===e.semantics})};function h(e,t,n,r){if(e&&t){var i=function(e){return r.find(function(t){return t.id.toString()===e})};t.ssrcs.forEach(function(t){e.sources.push(i(t));var r=n[parseInt(t,10)].find(function(e){return"FID"===e.semantics});if(r){var o=r.ssrcs.find(function(e){return e!==t});e.sources.push(i(o)),e.ssrcGroups.push(r)}}),e.ssrcGroups.push(t)}}function p(e,t,n,r){if(e&&t){if(e.sources=[],e.ssrcGroups=[],!n[t.id])return e.sources.push(t),void(e.msid=t.msid);var i=d(n[t.id]),o=l(n[t.id]);if(i)h(e,i,n,r);else if(o){var a=o.ssrcs.find(function(e){return e!==t}),s=d(n[a]);s?h(e,s,n,r):(o.ssrcs.forEach(function(t){e.sources.push((function(e){return r.find(function(t){return t.id.toString()===e})})(t))}),e.ssrcGroups.push(o))}e.msid=e.sources[0].msid}}function f(e,t,n){if(!n.find(function(t){return!!t.sources&&t.sources.some(function(t){return t.id===e.id})})){if(!t[e.id])return!1;var r=d(t[e.id]),i=l(t[e.id]);return r?n.some(function(e){return e.sources&&e.sources.some(function(e){return e.id.toString()===r.ssrcs[0]})}):!(!i||e.id.toString()===i.ssrcs[0])&&f({id:i.ssrcs[0]},t,n)}return!0}var m=(function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"toPlanB",value:function(e){if(!e||"string"!=typeof e.sdp)return console.warn("An empty description was passed as an argument."),e;var t=c(e.sdp);if(!t.media||!t.media.length)return console.warn("The description has no media."),e;if(t.media.every(function(e){return-1!==u.indexOf(e.mid)}))return console.warn("The description does not look like unified plan sdp"),e;var n={},r=t.media;t.media=[],r.forEach(function(e){var t=e.type;if("application"===t)return e.mid="data",void(n[e.mid]=e);if(void 0===n[t]){var r=i()(e);r.sources&&Array.isArray(r.sources)&&r.sources.forEach(function(t){e.msid?t.msid=e.msid:delete t.msid}),r.ssrcGroups&&e.msid||(r.ssrcGroups=[]),delete r.msid,r.mid=t,n[t]=r}else e.msid&&(e.sources&&Array.isArray(e.sources)&&(n[t].sources=n[t].sources.concat(e.sources)),void 0!==e.ssrcGroups&&Array.isArray(e.ssrcGroups)&&(n[t].ssrcGroups=n[t].ssrcGroups.concat(e.ssrcGroups)))}),t.media=Object.values(n);var o=[];Object.values(n).forEach(function(e){"inactive"!==e.direction&&o.push(e.mid)}),t.groups.forEach(function(e){"BUNDLE"===e.type&&(e.mids=o.join(" "))}),t.msidSemantic={semantic:"WMS",token:"*"};var a=s(t);return new RTCSessionDescription({type:e.type,sdp:a})}},{key:"toUnifiedPlan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e||"string"!=typeof e.sdp)return console.warn("An empty description was passed as an argument."),e;var n=c(e.sdp);if(!n.media||!n.media.length)return console.warn("The description has no media."),e;if(n.media.length>3||n.media.every(function(e){return-1===u.indexOf(e.mid)}))return console.warn("The description does not look like plan-b"),e;var r=t?c(t.sdp):null,o={};n.media.forEach(function(e){var t=e.type;if("application"!==t){var n=(function(e){var t={};return e&&Array.isArray(e)?(e.forEach(function(e){e.ssrcs&&Array.isArray(e.ssrcs)&&e.ssrcs.forEach(function(n){void 0===t[n]&&(t[n]=[]),t[n].push(e)})}),t):t})(e.ssrcGroups);e.sources&&e.sources.forEach(function(a,s){if(a.msid){if(!r||!r.media){if(f(a,n,Object.values(o)))return;var c=i()(e);return c.mid=Object.keys(o).length.toString(),c.direction=s||"sendonly"===e.direction?"sendonly":"sendrecv",c.bundleOnly=void 0,p(c,a,n,e.sources),void(o[c.mid]=c)}if(!f(a,n,r.media)){var u=r.media.findIndex(function(e){return e.direction&&"inactive"===e.direction&&e.type===t});if(u>-1)r.media[u].direction="sendonly",p(r.media[u],a,n,e.sources);else{var d=i()(e);d.mid=r.media.length.toString(),d.direction="sendonly",p(d,a,n,e.sources),r.media.push(d)}}}})}else{if(!r||!r.media){var a=i()(e);return a.mid=Object.keys(o).length.toString(),void(o[e.mid]=a)}var s=r.media.findIndex(function(e){return e.type===t});s&&(r.media[s]=e,r.media[s].mid=s)}}),n.media=r?r.media:Object.values(o);var a=[];n.media.forEach(function(e){a.push(e.mid)}),n.groups.forEach(function(e){"BUNDLE"===e.type&&(e.mids=a.join(" "))}),n.msidSemantic={semantic:"WMS",token:"*"},n.origin.sessionVersion++;var d=s(n);return new RTCSessionDescription({type:e.type,sdp:d})}}]),e})()},function(e,t,n){e.exports=n(143).default},function(e,t,n){"use strict";n.r(t),function(e){var r=n(4),i=n.n(r),o=n(16),a=n(1),s=n(77),c=n(38),u=n(26),d=n(72),l=n(53),h=n(18),p=n(14),f=n(15),m=n(60),v=n(12),g=n(3),y=n(48),_=n(47),S=n(134),E=n(22),b=n(62),C=n(135),T=n(137),R=n(57),A=n(138),k=n(5),w=n(139),I=n.n(w),P=n(11),D=n.n(P),O=n(46),N=n.n(O),M=n(24),L=n(140),x=n(8),F=n(33),j=n.n(F),U=n(29),H=n(64),B=n(7),J=i.a.getLogger(e);function G(e){var t={audio_requested:e.devices.includes("audio"),video_requested:e.devices.includes("video"),screen_sharing_requested:e.devices.includes("desktop")};return t.video_requested&&(t.resolution=e.resolution),t}t.default=(function(e){return"object"==typeof window.JitsiMeetJS?_extends({},window.JitsiMeetJS,e):e})({version:"development",JitsiConnection:s.a,ProxyConnectionService:C.a,constants:{participantConnectionStatus:_.a,recording:T.a,sipVideoGW:M,transcriptionStatus:m},events:{conference:a,connection:u,detection:E,track:f,mediaDevices:l,connectionQuality:U,e2eping:H},errors:{conference:o,connection:c,track:p},errorTypes:{JitsiTrackError:h.a},logLevels:i.a.levels,mediaDevices:d.a,analytics:k.a.analytics,init:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};k.a.init(e),window.connectionTimes||(window.connectionTimes={}),!0!==e.enableAnalyticsLogging&&(J.warn("Analytics disabled, disposing."),this.analytics.dispose()),e.enableWindowOnErrorHandler&&D.a.addHandler(this.getGlobalOnErrorHandler.bind(this));var t=e.deploymentInfo;if(t&&Object.keys(t).length>0){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.id="deployment_info",k.a.sendLog(JSON.stringify(n))}if(this.version){var i={id:"component_version",component:"lib-jitsi-meet",version:this.version};k.a.sendLog(JSON.stringify(i))}return v.a.init(e)},isDesktopSharingEnabled:function(){return v.a.isDesktopSharingEnabled()},isWebRtcSupported:function(){return v.a.isWebRtcSupported()},setLogLevel:function(e){i.a.setLogLevel(e)},setLogLevelById:function(e,t){i.a.setLogLevelById(e,t)},addGlobalLogTransport:function(e){i.a.addGlobalTransport(e)},removeGlobalLogTransport:function(e){i.a.removeGlobalTransport(e)},setGlobalLogOptions:function(e){i.a.setGlobalOptions(e)},createLocalTracks:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=!1;return!0===n&&window.setTimeout(function(){i||d.a.emitEvent(l.PERMISSION_PROMPT_IS_SHOWN,g.a.getName())},1e3),window.connectionTimes||(window.connectionTimes={}),window.connectionTimes["obtainPermissions.start"]=window.performance.now(),v.a.obtainAudioAndVideoPermissions(t).then(function(n){if(i=!0,window.connectionTimes["obtainPermissions.end"]=window.performance.now(),k.a.sendAnalytics(Object(B.F)("success",G(t))),!v.a.options.disableAudioLevels)for(var r=function(e){var t=n[e],r=t.getOriginalStream();t.getType()===x.a&&(k.a.startLocalStats(r,t.setAudioLevel.bind(t)),t.addEventListener(f.LOCAL_TRACK_STOPPED,function(){k.a.stopLocalStats(r)}))},o=0;o=c.length)break;l=c[d++]}else{if((d=c.next()).done)break;l=d.value}var h=l;h.type===x.c&&"desktop"===h.videoType&&e.setVideoTrackContentHints(h.track,"detail")}return n}).catch(function(n){if(i=!0,n.name===p.UNSUPPORTED_RESOLUTION&&!g.a.usesNewGumFlow()){var o=t.resolution||"720",a=(function(e){if(!j.a[e])return null;var t=j.a[e].order,n=null,r=null;return Object.keys(j.a).forEach(function(e){var i=j.a[e];(!n||n.order=this.maxEntryLength&&this._flush(!0,!0)},i.prototype.start=function(){this._reschedulePublishInterval()},i.prototype._reschedulePublishInterval=function(){this.storeLogsIntervalID&&(window.clearTimeout(this.storeLogsIntervalID),this.storeLogsIntervalID=null),this.storeLogsIntervalID=window.setTimeout(this._flush.bind(this,!1,!0),this.storeInterval)},i.prototype.flush=function(){this._flush(!1,!0)},i.prototype._flush=function(e,t){this.totalLen>0&&(this.logStorage.isReady()||e)&&(this.logStorage.isReady()?(this.outputCache.length&&(this.outputCache.forEach(function(e){this.logStorage.storeLogs(e)}.bind(this)),this.outputCache=[]),this.logStorage.storeLogs(this.queue)):this.outputCache.push(this.queue),this.queue=[],this.totalLen=0),t&&this._reschedulePublishInterval()},i.prototype.stop=function(){this._flush(!1,!1)},e.exports=i},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){var r,i;this||window,void 0===(i="function"==typeof(r=function(){var e=/^(interactive|loaded|complete)$/,t=window.location?window.location.href:null,n=t&&t.replace(/#.*$/,"").replace(/\?.*$/,"")||null,r=document.getElementsByTagName("script"),i="readyState"in(r[0]||document.createElement("script")),o=!window.opera||"[object Opera]"!==window.opera.toString(),a="currentScript"in document;"stackTraceLimit"in Error&&Error.stackTraceLimit!==1/0&&(Error.stackTraceLimit,Error.stackTraceLimit=1/0);var s=!1,c=!1;function u(){if(0===r.length)return null;var t,d,l,h,p,f=[],m=u.skipStackDepth||1;for(t=0;t0?e(t.slice(t.indexOf(r[0])+r[0].length),n-1):r[1])),i})(l,m),f))&&n&&h===n&&(p=(function(e){var t,n,i=null;for(t=0,n=(e=e||r).length;t0,this._originalOnStreamFeaturesAfterSASL.apply(this._c,arguments)},statusChanged:function(t){if(this._connectionStatus=t,this.getResumeToken()||t!==e.Strophe.Status.CONNECTED&&t!==e.Strophe.Status.DISCONNECTED)if(t===e.Strophe.Status.BINDREQUIRED){for(var n in this._c.jid=this._storedJid,this._resumeState)this._c[n]=this._resumeState[n];this._c.send(e.$build("resume",{xmlns:this._NS,h:this._clientProcessedStanzasCounter,previd:this._resumeToken})),this._c.flush()}else t===e.Strophe.Status.ERROR&&(this.logging&&e.Strophe.debug("SM cleared resume token on error"),this._resumeToken=void 0);else this.logging&&e.Strophe.debug("SM reset state"),this._serverProcesssedStanzasCounter=0,this._clientProcessedStanzasCounter=0,this._clientSentStanzasCounter=0,this._isStreamManagementEnabled=!1,this._requestResponseIntervalCount=0,this._resuming=!1,t===e.Strophe.Status.DISCONNECTED&&(this._isSupported=!1),this._unacknowledgedStanzas=[],this._requestHandler&&this._c.deleteHandler(this._requestHandler),this._incomingHandler&&this._c.deleteHandler(this._incomingHandler),this._requestHandler=this._c.addHandler(this._handleServerRequestHandler.bind(this),this._NS,"r"),this._ackHandler=this._c.addHandler(this._handleServerAck.bind(this),this._NS,"a"),this._incomingHandler=this._c.addHandler(this._incomingStanzaHandler.bind(this)),this._enabledHandler=this._c._addSysHandler(this._handleEnabled.bind(this),this._NS,"enabled"),this._resumeFailedHandler=this._c._addSysHandler(this._handleResumeFailed.bind(this),this._NS,"failed"),this._resumedHandler=this._c._addSysHandler(this._handleResumed.bind(this),this._NS,"resumed")},xmlOutput:function(t){return(e.Strophe.isTagEqual(t,"iq")||e.Strophe.isTagEqual(t,"presence")||e.Strophe.isTagEqual(t,"message"))&&this._increaseSentStanzasCounter(t),this._originalXMLOutput.call(this._c,t)},_handleEnabled:function(e){return this._isStreamManagementEnabled=!0,this._resumeToken="true"===e.getAttribute("resume")&&e.getAttribute("id"),this._c.resume(),!0},_handleResumeFailed:function(t){var n=t&&t.firstElementChild&&t.firstElementChild.tagName;return this._c._changeConnectStatus(e.Strophe.Status.ERROR,n,t),this._c._doDisconnect(),!0},_handleResumed:function(t){var n=parseInt(t.getAttribute("h"));if(this._handleAcknowledgedStanzas(n,this._serverProcesssedStanzasCounter),this._resuming=!1,this._c.do_bind=!1,this._c.authenticated=!0,this._c.restored=!0,this._unacknowledgedStanzas.length>0){this.logging&&e.Strophe.debug("SM Sending unacknowledged stanzas",this._unacknowledgedStanzas);var r=this._unacknowledgedStanzas,i=Array.isArray(r),o=0;for(r=i?r:r["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();;){var a;if(i){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var s=a;this._c.send(s)}}else this.logging&&e.Strophe.debug("SM No unacknowledged stanzas",this._unacknowledgedStanzas);return this._c._changeConnectStatus(e.Strophe.Status.CONNECTED,null),!0},_incomingStanzaHandler:function(t){return(e.Strophe.isTagEqual(t,"iq")||e.Strophe.isTagEqual(t,"presence")||e.Strophe.isTagEqual(t,"message"))&&(this._increaseReceivedStanzasCounter(),this.autoSendCountOnEveryIncomingStanza&&this._answerProcessedStanzas()),!0},_handleAcknowledgedStanzas:function(t,n){var r=t-n;r<0&&this._throwError("New reported stanza count lower than previous. New: "+t+" - Previous: "+n),r>this._unacknowledgedStanzas.length&&this._throwError("Higher reported acknowledge count than unacknowledged stanzas. Reported Acknowledge Count: "+r+" - Unacknowledge Stanza Count: "+this._unacknowledgedStanzas.length+" - New: "+t+" - Previous: "+n);for(var i=0;i0&&e.Strophe.warn("SM Unacknowledged stanzas",this._unacknowledgedStanzas),this._serverProcesssedStanzasCounter=t,this.requestResponseInterval>0&&(this._requestResponseIntervalCount=0)},_handleServerRequestHandler:function(){return this._answerProcessedStanzas(),!0},_handleServerAck:function(e){var t=parseInt(e.getAttribute("h"));return this._handleAcknowledgedStanzas(t,this._serverProcesssedStanzasCounter),!0},_answerProcessedStanzas:function(){this._isStreamManagementEnabled&&this._c.send(e.$build("a",{xmlns:this._NS,h:this._clientProcessedStanzasCounter}))},_increaseSentStanzasCounter:function(t){var n=this;if(this._isStreamManagementEnabled){if(-1!==this._unacknowledgedStanzas.indexOf(t))return;this._unacknowledgedStanzas.push(t),this._clientSentStanzasCounter++,this.requestResponseInterval>0&&(this._requestResponseIntervalCount++,this._requestResponseIntervalCount===this.requestResponseInterval&&setTimeout(function(){n._connectionStatus===e.Strophe.Status.CONNECTED&&n.requestAcknowledgement()},1))}},_increaseReceivedStanzasCounter:function(){this._isStreamManagementEnabled&&this._clientProcessedStanzasCounter++},_throwError:function(t){throw e.Strophe.error(t),new Error(t)}})})(n(2))},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(151),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(45))},function(e,t,n){(function(e,t){!(function(e,n){"use strict";if(!e.setImmediate){var r,i,o,a,s,c=1,u={},d=!1,l=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){f(e)})}:(function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}})()?(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&f(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){o.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,r=function(e){var t=l.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(f,0,e)},h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n=r)return e;var i=n[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}})},a=function(e,t,n){var r=[e+"="+(t.format instanceof Function?t.format(t.push?n:n[t.name]):t.format)];if(t.names)for(var i=0;i2)return e;if(2==n&&0===r)return e;if(1===n)t=e.ssrcs[0].id;else{var i=e.ssrcGroups.filter(function(e){return"FID"===e.semantics})[0];if(!i)return e;t=parseInt(i.ssrcs.split(" ")[0])}return console.log("SdpSimulcast: current ssrc cache: ",this.ssrcCache),console.log("SdpSimulcast: parsed primary ssrc "+t),-1!==this.ssrcCache.indexOf(t)?(console.log("SdpSimulcast: Have seen primary ssrc before, filling in data from cache"),e=this._fillInSourceDataFromCache(e)):(console.log("SdpSimulcast: Have not seen primary ssrc before, generating source data"),e=this._generateSourceData(e,t)),this.ssrcCache=this._parseSimLayers(e),e},c.prototype.mungeRemoteDescription=function(e){if(!d(e))return e;var t=r.parse(e.sdp),n=this;return u(t,function(e){n.options.explodeRemoteSimulcast?(function(e){if(e&&Array.isArray(e.ssrcGroups))for(var t=o(e),n=[],r=e.ssrcGroups.length;r--;)if("SIM"===e.ssrcGroups[r].semantics){for(var i=e.ssrcGroups[r].ssrcs.split(" "),s=0;s=0)){var i=e[r];Object.keys(i).forEach(function(e){n.push({id:r,attribute:e,value:i[e]})})}})}return n},t.parseSsrcs=function(e){var t={};return void 0!==e.ssrcs&&Array.isArray(e.ssrcs)&&e.ssrcs.forEach(function(e){t[e.id]||(t[e.id]={}),t[e.id][e.attribute]=e.value}),t}},function(e,t){e.exports=function(e,t,n,r){this.blob=e,this.name=t,this.startTime=n,this.wordArray=r}},function(e,t,n){var r=n(158),i=n(76),o=n(159),a=function(){this.url=(function(){var e="config does not contain an url to a Sphinx4 https server";if(void 0===config.sphinxURL)console.log(e);else{var t=config.sphinxURL;if(void 0!==t.includes&&t.includes("https://"))return t;console.log(e)}})()};a.prototype=Object.create(o.prototype),a.constructor=a,a.prototype.sendRequest=function(e,t){console.log("sending an audio file to "+this.url),console.log("the audio file being sent: "+e);var n=new XMLHttpRequest;n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE&&200===n.status)t(n.responseText);else if(n.readyState===XMLHttpRequest.DONE)throw new Error("unable to accept response from sphinx server. status: "+n.status)},n.open("POST",this.url),n.setRequestHeader("Content-Type",i.determineCorrectFileType()),n.send(e),console.log("send "+e)},a.prototype.formatResponse=function(e){var t=JSON.parse(e).objects;t.shift();var n=[];return t.forEach(function(e){return e.filler||n.push(new r(e.word,e.start,e.end))}),n},a.prototype.verify=function(e){if(console.log("response from server:"+e.toString()),"string"!=typeof e)return!1;var t;try{t=JSON.parse(e)}catch(e){return console.log(e),!1}if(void 0===t.objects)return!1;var n=t.objects;return!(!n[0]||!n[0]["session-id"])},e.exports=a},function(e,t){var n=function(e,t,n){this.word=e,this.begin=t,this.end=n};n.prototype.getWord=function(){return this.word},n.prototype.getBeginTime=function(){return this.begin},n.prototype.getEndTime=function(){return this.end},e.exports=n},function(e,t){var n=function(){throw new Error("TranscriptionService is abstract and cannot becreated")};n.prototype.send=function(e,t){var n=this;this.sendRequest(e.blob,function(r){n.verify(r)?e.wordArray=n.formatResponse(r):(console.log("the retrieved response from the server is not valid!"),e.wordArray=[]),t(e)})},n.prototype.sendRequest=function(e,t){throw new Error("TranscriptionService.sendRequest is abstract")},n.prototype.formatResponse=function(e){throw new Error("TranscriptionService.format is abstract")},n.prototype.verify=function(e){throw new Error("TranscriptionService.verify is abstract")},e.exports=n},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"shimGetUserMedia",function(){return E}),n.d(r,"shimGetDisplayMedia",function(){return b}),n.d(r,"shimMediaStream",function(){return C}),n.d(r,"shimOnTrack",function(){return T}),n.d(r,"shimGetSendersWithDtmf",function(){return R}),n.d(r,"shimGetStats",function(){return A}),n.d(r,"shimSenderReceiverGetStats",function(){return k}),n.d(r,"shimAddTrackRemoveTrackWithNative",function(){return w}),n.d(r,"shimAddTrackRemoveTrack",function(){return I}),n.d(r,"shimPeerConnection",function(){return P}),n.d(r,"fixNegotiationNeeded",function(){return D});var i={};n.r(i),n.d(i,"shimGetUserMedia",function(){return M}),n.d(i,"shimGetDisplayMedia",function(){return L}),n.d(i,"shimPeerConnection",function(){return x}),n.d(i,"shimReplaceTrack",function(){return F});var o={};n.r(o),n.d(o,"shimGetUserMedia",function(){return j}),n.d(o,"shimGetDisplayMedia",function(){return U}),n.d(o,"shimOnTrack",function(){return H}),n.d(o,"shimPeerConnection",function(){return B}),n.d(o,"shimSenderGetStats",function(){return J}),n.d(o,"shimReceiverGetStats",function(){return G}),n.d(o,"shimRemoveStream",function(){return V}),n.d(o,"shimRTCDataChannel",function(){return q}),n.d(o,"shimAddTransceiver",function(){return K}),n.d(o,"shimCreateOffer",function(){return z}),n.d(o,"shimCreateAnswer",function(){return W});var a={};n.r(a),n.d(a,"shimLocalStreamsAPI",function(){return $}),n.d(a,"shimRemoteStreamsAPI",function(){return Q}),n.d(a,"shimCallbacksAPI",function(){return X}),n.d(a,"shimGetUserMedia",function(){return Y}),n.d(a,"shimConstraints",function(){return Z}),n.d(a,"shimRTCIceServerUrls",function(){return ee}),n.d(a,"shimTrackEventTransceiver",function(){return te}),n.d(a,"shimCreateOfferLegacy",function(){return ne});var s={};n.r(s),n.d(s,"shimRTCIceCandidate",function(){return oe}),n.d(s,"shimMaxMessageSize",function(){return ae}),n.d(s,"shimSendThrowTypeError",function(){return se}),n.d(s,"shimConnectionState",function(){return ce}),n.d(s,"removeAllowExtmapMixed",function(){return ue});var c=!0,u=!0;function d(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function l(e,t,n){if(e.RTCPeerConnection){var r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);var o=function(e){var t=n(e);t&&r(t)};return this._eventMap=this._eventMap||{},this._eventMap[r]=o,i.apply(this,[e,o])};var o=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[n])return o.apply(this,arguments);var r=this._eventMap[n];return delete this._eventMap[n],o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get:function(){return this["_on"+t]},set:function(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}}function h(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(c=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function p(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(u=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function f(){if("object"==typeof window){if(c)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function m(e,t){u&&console.warn(e+" is deprecated, please use "+t+" instead.")}function v(e){var t=e.navigator,n={browser:null,version:null};if(void 0===e||!e.navigator)return n.browser="Not a browser.",n;if(t.mozGetUserMedia)n.browser="firefox",n.version=d(t.userAgent,/Firefox\/(\d+)\./,1);else if(t.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection&&!e.RTCIceGatherer)n.browser="chrome",n.version=d(t.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(t.mediaDevices&&t.userAgent.match(/Edge\/(\d+).(\d+)$/))n.browser="edge",n.version=d(t.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!e.RTCPeerConnection||!t.userAgent.match(/AppleWebKit\/(\d+)\./))return n.browser="Not a supported browser.",n;n.browser="safari",n.version=d(t.userAgent,/AppleWebKit\/(\d+)\./,1),n.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return n}function g(e){return"[object Object]"===Object.prototype.toString.call(e)}function y(e){return g(e)?Object.keys(e).reduce(function(t,n){var r=g(e[n]),i=r?y(e[n]):e[n],o=r&&!Object.keys(i).length;return void 0===i||o?t:_extends(t,_defineProperty({},n,i))},{}):e}function _(e,t,n){var r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;var o=[];return e.forEach(function(e){"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)}),o.forEach(function(t){e.forEach(function(n){n.type===r&&n.trackId===t.id&&(function e(t,n,r){n&&!r.has(n.id)&&(r.set(n.id,n),Object.keys(n).forEach(function(i){i.endsWith("Id")?e(t,t.get(n[i]),r):i.endsWith("Ids")&&n[i].forEach(function(n){e(t,t.get(n),r)})}))})(e,n,i)})}),i}var S=f;function E(e){var t=e&&e.navigator;if(t.mediaDevices){var n=v(e),r=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;var t={};return Object.keys(e).forEach(function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);var i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];var o={};"number"==typeof r.ideal?(o[i("min",n)]=r.ideal,t.optional.push(o),(o={})[i("max",n)]=r.ideal,t.optional.push(o)):(o[i("",n)]=r.ideal,t.optional.push(o))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",n)]=r.exact):["min","max"].forEach(function(e){void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(n.version>=61)return i(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){var o=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};o((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),o(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"==typeof e.video){var a=e.video.facingMode;a=a&&("object"==typeof a?a:{ideal:a});var s,c=n.version<66;if(a&&("user"===a.exact||"environment"===a.exact||"user"===a.ideal||"environment"===a.ideal)&&(!t.mediaDevices.getSupportedConstraints||!t.mediaDevices.getSupportedConstraints().facingMode||c))if(delete e.video.facingMode,"environment"===a.exact||"environment"===a.ideal?s=["back","rear"]:"user"!==a.exact&&"user"!==a.ideal||(s=["front"]),s)return t.mediaDevices.enumerateDevices().then(function(t){var n=(t=t.filter(function(e){return"videoinput"===e.kind})).find(function(e){return s.some(function(t){return e.label.toLowerCase().includes(t)})});return!n&&t.length&&s.includes("back")&&(n=t[t.length-1]),n&&(e.video.deviceId=a.exact?{exact:n.deviceId}:{ideal:n.deviceId}),e.video=r(e.video),S("chrome: "+JSON.stringify(e)),i(e)});e.video=r(e.video)}return S("chrome: "+JSON.stringify(e)),i(e)},o=function(e){return n.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};if(t.getUserMedia=function(e,n,r){i(e,function(e){t.webkitGetUserMedia(e,n,function(e){r&&r(o(e))})})}.bind(t),t.mediaDevices.getUserMedia){var a=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(e){return i(e,function(e){return a(e).then(function(t){if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length)throw t.getTracks().forEach(function(e){e.stop()}),new DOMException("","NotFoundError");return t},function(e){return Promise.reject(o(e))})})}}}}function b(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&("function"==typeof t?e.navigator.mediaDevices.getDisplayMedia=function(n){return t(n).then(function(t){var r=n.video&&n.video.width,i=n.video&&n.video.height,o=n.video&&n.video.frameRate;return n.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:o||3}},r&&(n.video.mandatory.maxWidth=r),i&&(n.video.mandatory.maxHeight=i),e.navigator.mediaDevices.getUserMedia(n)})}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))}function C(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function T(e){if("object"!=typeof e||!e.RTCPeerConnection||"ontrack"in e.RTCPeerConnection.prototype)l(e,"track",function(e){return e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e});else{Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var n=this;return this._ontrackpoly||(this._ontrackpoly=function(t){t.stream.addEventListener("addtrack",function(r){var i;i=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find(function(e){return e.track&&e.track.id===r.track.id}):{track:r.track};var o=new Event("track");o.track=r.track,o.receiver=i,o.transceiver={receiver:i},o.streams=[t.stream],n.dispatchEvent(o)}),t.stream.getTracks().forEach(function(r){var i;i=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find(function(e){return e.track&&e.track.id===r.id}):{track:r};var o=new Event("track");o.track=r,o.receiver=i,o.transceiver={receiver:i},o.streams=[t.stream],n.dispatchEvent(o)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}}function R(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){var t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){var i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};var r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);var t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}var i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;this._senders=this._senders||[],i.apply(this,[e]),e.getTracks().forEach(function(e){n._senders.push(t(n,e))})};var o=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;this._senders=this._senders||[],o.apply(this,[e]),e.getTracks().forEach(function(e){var n=t._senders.find(function(t){return t.track===e});n&&t._senders.splice(t._senders.indexOf(n),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){var a=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){var e=this,t=a.apply(this,[]);return t.forEach(function(t){return t._pc=e}),t},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function A(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var e=this,n=Array.prototype.slice.call(arguments),r=n[0],i=n[1],o=n[2];if(arguments.length>0&&"function"==typeof r)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!=typeof r))return t.apply(this,[]);var a=function(e){var t={};return e.result().forEach(function(e){var n={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach(function(t){n[t]=e.stat(t)}),t[n.id]=n}),t},s=function(e){return new Map(Object.keys(e).map(function(t){return[t,e[t]]}))};if(arguments.length>=2){return t.apply(this,[function(e){i(s(a(e)))},r])}return new Promise(function(n,r){t.apply(e,[function(e){n(s(a(e)))},r])}).then(i,o)}}}function k(e){if("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver){if(!("getStats"in e.RTCRtpSender.prototype)){var t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,n=t.apply(this,[]);return n.forEach(function(t){return t._pc=e}),n});var n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){var e=this;return this._pc.getStats().then(function(t){return _(t,e.track,!0)})}}if(!("getStats"in e.RTCRtpReceiver.prototype)){var r=e.RTCPeerConnection.prototype.getReceivers;r&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,t=r.apply(this,[]);return t.forEach(function(t){return t._pc=e}),t}),l(e,"track",function(e){return e.receiver._pc=e.srcElement,e}),e.RTCRtpReceiver.prototype.getStats=function(){var e=this;return this._pc.getStats().then(function(t){return _(t,e.track,!1)})}}if("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype){var i=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){var t,n,r,o=arguments[0];return this.getSenders().forEach(function(e){e.track===o&&(t?r=!0:t=e)}),this.getReceivers().forEach(function(e){return e.track===o&&(n?r=!0:n=e),e.track===o}),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return i.apply(this,arguments)}}}}function w(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(function(t){return e._shimmedLocalStreams[t][0]})};var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};var n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var t=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(function(e){if(t.getSenders().find(function(t){return t.track===e}))throw new DOMException("Track already exists.","InvalidAccessError")});var r=this.getSenders();n.apply(this,arguments);var i=this.getSenders().filter(function(e){return-1===r.indexOf(e)});this._shimmedLocalStreams[e.id]=[e].concat(i)};var r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};var i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){var t=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(function(n){var r=t._shimmedLocalStreams[n].indexOf(e);-1!==r&&t._shimmedLocalStreams[n].splice(r,1),1===t._shimmedLocalStreams[n].length&&delete t._shimmedLocalStreams[n]}),i.apply(this,arguments)}}function I(e){if(e.RTCPeerConnection){var t=v(e);if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return w(e);var n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this,t=n.apply(this);return this._reverseStreams=this._reverseStreams||{},t.map(function(t){return e._reverseStreams[t.id]})};var r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){var n=this;if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(function(e){if(n.getSenders().find(function(t){return t.track===e}))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[t.id]){var i=new e.MediaStream(t.getTracks());this._streams[t.id]=i,this._reverseStreams[i.id]=t,t=i}r.apply(this,[t])};var i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){var r=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var i=[].slice.call(arguments,1);if(1!==i.length||!i[0].getTracks().find(function(e){return e===t}))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(function(e){return e.track===t}))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var o=this._streams[n.id];if(o)o.addTrack(t),Promise.resolve().then(function(){r.dispatchEvent(new Event("negotiationneeded"))});else{var a=new e.MediaStream([t]);this._streams[n.id]=a,this._reverseStreams[a.id]=n,this.addStream(a)}return this.getSenders().find(function(e){return e.track===t})},["createOffer","createAnswer"].forEach(function(t){var n=e.RTCPeerConnection.prototype[t],r=_defineProperty({},t,function(){var e=this,t=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[function(n){var r=s(e,n);t[0].apply(null,[r])},function(e){t[1]&&t[1].apply(null,e)},arguments[2]]):n.apply(this,arguments).then(function(t){return s(e,t)})});e.RTCPeerConnection.prototype[t]=r[t]});var o=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=(e=this,t=arguments[0],n=t.sdp,Object.keys(e._reverseStreams||[]).forEach(function(t){var r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})),o.apply(this,arguments)):o.apply(this,arguments);var e,t,n};var a=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get:function(){var e=a.get.apply(this);return""===e.type?e:s(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){var t,n=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(e._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{},Object.keys(this._streams).forEach(function(r){n._streams[r].getTracks().find(function(t){return e.track===t})&&(t=n._streams[r])}),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function s(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(function(t){var r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,"g"),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}}function P(e){var t=v(e);if(!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection){var n=0===e.RTCPeerConnection.prototype.addIceCandidate.length;t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){var n=e.RTCPeerConnection.prototype[t],r=_defineProperty({},t,function(){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)});e.RTCPeerConnection.prototype[t]=r[t]});var r=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){return n||arguments[0]?t.version<78&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():r.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}}function D(e){l(e,"negotiationneeded",function(e){if("stable"===e.target.signalingState)return e})}var O=n(108),N=n.n(O);function M(e){var t=e&&e.navigator,n=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(e){return n(e).catch(function(e){return Promise.reject((function(e){return{name:{PermissionDeniedError:"NotAllowedError"}[e.name]||e.name,message:e.message,constraint:e.constraint,toString:function(){return this.name}}})(e))})}}function L(e){"getDisplayMedia"in e.navigator&&e.navigator.mediaDevices&&(e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||(e.navigator.mediaDevices.getDisplayMedia=e.navigator.getDisplayMedia.bind(e.navigator)))}function x(e){var t=v(e);if(e.RTCIceGatherer&&(e.RTCIceCandidate||(e.RTCIceCandidate=function(e){return e}),e.RTCSessionDescription||(e.RTCSessionDescription=function(e){return e}),t.version<15025)){var n=Object.getOwnPropertyDescriptor(e.MediaStreamTrack.prototype,"enabled");Object.defineProperty(e.MediaStreamTrack.prototype,"enabled",{set:function(e){n.set.call(this,e);var t=new Event("enabled");t.enabled=e,this.dispatchEvent(t)}})}e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)&&Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new e.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null)),this._dtmf}}),e.RTCDtmfSender&&!e.RTCDTMFSender&&(e.RTCDTMFSender=e.RTCDtmfSender);var r=N()(e,t.version);e.RTCPeerConnection=function(e){return e&&e.iceServers&&(e.iceServers=(function(e,t){var n=!1;return(e=JSON.parse(JSON.stringify(e))).filter(function(e){if(e&&(e.urls||e.url)){var t=e.urls||e.url;e.url&&!e.urls&&m("RTCIceServer.url","RTCIceServer.urls");var r="string"==typeof t;return r&&(t=[t]),t=t.filter(function(e){if(0===e.indexOf("stun:"))return!1;var t=e.startsWith("turn")&&!e.startsWith("turn:[")&&e.includes("transport=udp");return t&&!n?(n=!0,!0):t&&!n}),delete e.url,e.urls=r?t[0]:t,!!t.length}})})(e.iceServers,t.version),f("ICE servers after filtering:",e.iceServers)),new r(e)},e.RTCPeerConnection.prototype=r.prototype}function F(e){e.RTCRtpSender&&!("replaceTrack"in e.RTCRtpSender.prototype)&&(e.RTCRtpSender.prototype.replaceTrack=e.RTCRtpSender.prototype.setTrack)}function j(e){var t=v(e),n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){m("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var i=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},o=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(e){return"object"==typeof e&&"object"==typeof e.audio&&(e=JSON.parse(JSON.stringify(e)),i(e.audio,"autoGainControl","mozAutoGainControl"),i(e.audio,"noiseSuppression","mozNoiseSuppression")),o(e)},r&&r.prototype.getSettings){var a=r.prototype.getSettings;r.prototype.getSettings=function(){var e=a.apply(this,arguments);return i(e,"mozAutoGainControl","autoGainControl"),i(e,"mozNoiseSuppression","noiseSuppression"),e}}if(r&&r.prototype.applyConstraints){var s=r.prototype.applyConstraints;r.prototype.applyConstraints=function(e){return"audio"===this.kind&&"object"==typeof e&&(e=JSON.parse(JSON.stringify(e)),i(e,"autoGainControl","mozAutoGainControl"),i(e,"noiseSuppression","mozNoiseSuppression")),s.apply(this,[e])}}}}function U(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){var r=new DOMException("getDisplayMedia without video constraints is undefined");return r.name="NotFoundError",r.code=8,Promise.reject(r)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}function H(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function B(e){var t=v(e);if("object"==typeof e&&(e.RTCPeerConnection||e.mozRTCPeerConnection)){if(!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){var n=e.RTCPeerConnection.prototype[t],r=_defineProperty({},t,function(){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)});e.RTCPeerConnection.prototype[t]=r[t]}),t.version<68){var n=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}var r={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},i=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var e=Array.prototype.slice.call(arguments),n=e[0],o=e[1],a=e[2];return i.apply(this,[n||null]).then(function(e){if(t.version<53&&!o)try{e.forEach(function(e){e.type=r[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach(function(t,n){e.set(n,_extends({},t,{type:r[t.type]||t.type}))})}return e}).then(o,a)}}}function J(e){if("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&!(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)){var t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,n=t.apply(this,[]);return n.forEach(function(t){return t._pc=e}),n});var n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}}function G(e){if("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&!(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)){var t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,n=t.apply(this,[]);return n.forEach(function(t){return t._pc=e}),n}),l(e,"track",function(e){return e.receiver._pc=e.srcElement,e}),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}}function V(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;m("removeStream","removeTrack"),this.getSenders().forEach(function(n){n.track&&e.getTracks().includes(n.track)&&t.removeTrack(n)})})}function q(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function K(e){if("object"==typeof e&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var e=arguments[1],n=e&&"sendEncodings"in e;n&&e.sendEncodings.forEach(function(e){if("rid"in e&&!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});var r=t.apply(this,arguments);if(n){var i=r.sender,o=i.getParameters();"encodings"in o||(o.encodings=e.sendEncodings,this.setParametersPromises.push(i.setParameters(o).catch(function(){})))}return r})}}function z(e){if("object"==typeof e&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){var e=this,n=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return t.apply(e,n)}).finally(function(){e.setParametersPromises=[]}):t.apply(this,arguments)}}}function W(e){if("object"==typeof e&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){var e=this,n=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return t.apply(e,n)}).finally(function(){e.setParametersPromises=[]}):t.apply(this,arguments)}}}function $(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(function(r){return t.call(n,r,e)}),e.getVideoTracks().forEach(function(r){return t.call(n,r,e)})},e.RTCPeerConnection.prototype.addTrack=function(e){var n=arguments[1];return n&&(this._localStreams?this._localStreams.includes(n)||this._localStreams.push(n):this._localStreams=[n]),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;this._localStreams||(this._localStreams=[]);var n=this._localStreams.indexOf(e);if(-1!==n){this._localStreams.splice(n,1);var r=e.getTracks();this.getSenders().forEach(function(e){r.includes(e.track)&&t.removeTrack(e)})}})}}function Q(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(e){var t=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=function(e){e.streams.forEach(function(e){if(t._remoteStreams||(t._remoteStreams=[]),!t._remoteStreams.includes(e)){t._remoteStreams.push(e);var n=new Event("addstream");n.stream=e,t.dispatchEvent(n)}})})}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(function(t){if(e._remoteStreams||(e._remoteStreams=[]),!(e._remoteStreams.indexOf(t)>=0)){e._remoteStreams.push(t);var n=new Event("addstream");n.stream=t,e.dispatchEvent(n)}})}),t.apply(e,arguments)}}}function X(e){if("object"==typeof e&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,o=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){var r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){var n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};var s=function(e,t,n){var r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=s,s=function(e,t,n){var r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=s,s=function(e,t,n){var r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=s}}function Y(e){var t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){var n=t.mediaDevices,r=n.getUserMedia.bind(n);t.mediaDevices.getUserMedia=function(e){return r(Z(e))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function Z(e){return e&&void 0!==e.video?_extends({},e,{video:y(e.video)}):e}function ee(e){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){for(var r=[],i=0;i0?r=parseInt(i[0].substr(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r},a=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){(this._sctp=null,"chrome"===t.browser&&t.version>=76)&&("plan-b"===this.getConfiguration().sdpSemantics&&Object.defineProperty(this,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0}));if(n(arguments[0])){var e,s=r(arguments[0]),c=i(s),u=o(arguments[0],s);e=0===c&&0===u?Number.POSITIVE_INFINITY:0===c||0===u?Math.max(c,u):Math.min(c,u);var d={};Object.defineProperty(d,"maxMessageSize",{get:function(){return e}}),this._sctp=d}return a.apply(this,arguments)}}}function se(e){if(e.RTCPeerConnection&&"createDataChannel"in e.RTCPeerConnection.prototype){var t=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){var e=t.apply(this,arguments);return n(e,this),e},l(e,"datachannel",function(e){return n(e.channel,e.target),e})}function n(e,t){var n=e.send;e.send=function(){var r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}}function ce(e){if(e.RTCPeerConnection&&!("connectionState"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(function(e){var n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=function(e){var t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;var n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}})}}function ue(e){if(e.RTCPeerConnection){var t=v(e);if(!("chrome"===t.browser&&t.version>=71)){var n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(e){return e&&e.sdp&&-1!==e.sdp.indexOf("\na=extmap-allow-mixed")&&(e.sdp=e.sdp.split("\n").filter(function(e){return"a=extmap-allow-mixed"!==e.trim()}).join("\n")),n.apply(this,arguments)}}}}var de=(function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).window,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0},n=f,c=v(e),u={browserDetails:c,commonShim:s,extractVersion:d,disableLog:h,disableWarnings:p};switch(c.browser){case"chrome":if(!P||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),u;n("adapter.js shimming chrome."),u.browserShim=r,E(e),C(e),P(e),T(e),I(e),R(e),A(e),k(e),D(e),oe(e),ce(e),ae(e),se(e),ue(e);break;case"firefox":if(!B||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),u;n("adapter.js shimming firefox."),u.browserShim=o,j(e),B(e),H(e),V(e),J(e),G(e),q(e),K(e),z(e),W(e),oe(e),ce(e),ae(e),se(e);break;case"edge":if(!x||!t.shimEdge)return n("MS edge shim is not included in this adapter release."),u;n("adapter.js shimming edge."),u.browserShim=i,M(e),L(e),x(e),F(e),ae(e),se(e);break;case"safari":if(!t.shimSafari)return n("Safari shim is not included in this adapter release."),u;n("adapter.js shimming safari."),u.browserShim=a,ee(e),ne(e),X(e),$(e),Q(e),te(e),Y(e),oe(e),ae(e),se(e),ue(e);break;default:n("Unsupported browser!")}return u})({window:window});t.default=de}])},"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.JitsiMeetJS=t():e.JitsiMeetJS=t()},517,[270,518,24,46,25,54,8,4,5,6,9,10,31]); __d(function(g,r,i,a,m,e,d){m.exports=function(n){throw new Error("\""+n+"\" is read-only")}},518,[]); __d(function(e,t,n,r,i,o,a){!(function(e,t){"use strict";"object"==typeof i&&"object"==typeof i.exports?i.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)})("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=Object.getPrototypeOf,i=n.slice,o=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},a=n.push,s=n.indexOf,u={},l=u.toString,c=u.hasOwnProperty,f=c.toString,p=f.call(Object),d={},h=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},g=function(e){return null!=e&&e===e.window},v=e.document,y={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||v).createElement("script");if(o.text=e,t)for(r in y)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?u[l.call(e)]||"object":typeof e}var b=function e(t,n){return new e.fn.init(t,n)};function w(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!h(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}b.fn=b.prototype={jquery:"3.5.1",constructor:b,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return b.each(this,e)},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(b.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(b.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),$=new RegExp("[\\x20\\t\\r\\n\\f]|>"),B=new RegExp(R),_=new RegExp("^(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+$"),z={ID:new RegExp("^#((?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+)"),CLASS:new RegExp("^\\.((?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+)"),TAG:new RegExp("^((?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+|[*])"),ATTR:new RegExp("^\\[[\\x20\\t\\r\\n\\f]*((?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|((?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+))|)[\\x20\\t\\r\\n\\f]*\\]"),PSEUDO:new RegExp("^:((?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|((?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)"),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},U=/HTML$/i,X=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,G=/^[^{]+\{\s*\[native \w/,Y=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,J=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),K=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},Z=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ee=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},te=function(){p()},ne=ve(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(j=O.call(w.childNodes),w.childNodes),j[w.childNodes.length].nodeType}catch(e){H={apply:j.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function re(e,t,r,i){var o,s,l,c,f,h,y,m=t&&t.ownerDocument,w=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return r;if(!i&&(p(t),t=t||d,g)){if(11!==w&&(f=Y.exec(e)))if(o=f[1]){if(9===w){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return H.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return H.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!k[e+" "]&&(!v||!v.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(y=e,m=t,1===w&&($.test(e)||W.test(e))){for((m=Q.test(e)&&de(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(Z,ee):t.setAttribute("id",c=b)),s=(h=a(e)).length;s--;)h[s]=(c?"#"+c:":scope")+" "+ge(h[s]);y=h.join(",")}try{return H.apply(r,m.querySelectorAll(y)),r}catch(t){k(e,!0)}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(F,"$1"),t,r,i)}function ie(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function oe(e){return e[b]=!0,e}function ae(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function se(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function ue(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function le(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function ce(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function fe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ne(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function pe(e){return oe(function(t){return t=+t,oe(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function de(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=re.support={},o=re.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!U.test(t||n&&n.nodeName||"HTML")},p=re.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!=d&&9===a.nodeType&&a.documentElement?(h=(d=a).documentElement,g=!o(d),w!=d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",te,!1):i.attachEvent&&i.attachEvent("onunload",te)),n.scope=ae(function(e){return h.appendChild(e).appendChild(d.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),n.attributes=ae(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ae(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=G.test(d.getElementsByClassName),n.getById=ae(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(J,K);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(J,K);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},y=[],v=[],(n.qsa=G.test(d.querySelectorAll))&&(ae(function(e){var t;h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)"),e.querySelectorAll("[id~="+b+"-]").length||v.push("~="),(t=d.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ae(function(e){e.innerHTML="";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(n.matchesSelector=G.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ae(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),y.push("!=",R)}),v=v.length&&new RegExp(v.join("|")),y=y.length&&new RegExp(y.join("|")),t=G.test(h.compareDocumentPosition),x=t||G.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},N=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==d||e.ownerDocument==w&&x(w,e)?-1:t==d||t.ownerDocument==w&&x(w,t)?1:c?P(c,e)-P(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==d?-1:t==d?1:i?-1:o?1:c?P(c,e)-P(c,t):0;if(i===o)return ue(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ue(a[r],s[r]):a[r]==w?-1:s[r]==w?1:0},d):d},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,t){if(p(e),n.matchesSelector&&g&&!k[t+" "]&&(!y||!y.test(t))&&(!v||!v.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){k(t,!0)}return re(t,d,null,[e]).length>0},re.contains=function(e,t){return(e.ownerDocument||e)!=d&&p(e),x(e,t)},re.attr=function(e,t){(e.ownerDocument||e)!=d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&D.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},re.escape=function(e){return(e+"").replace(Z,ee)},re.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},re.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(N),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=re.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=re.selectors={cacheLength:50,createPseudo:oe,match:z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(J,K),e[3]=(e[3]||e[4]||e[5]||"").replace(J,K),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&re.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return z.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&B.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(J,K).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"([\\x20\\t\\r\\n\\f]|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=re.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(M," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,y=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(v){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&m){for(x=(d=(l=(c=(f=(p=v)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&v.childNodes[d];p=++d&&p&&p[g]||(x=d=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)for(;(p=++d&&p&&p[g]||(x=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==y:1!==p.nodeType)||!++x||(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||re.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?oe(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=P(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:oe(function(e){var t=[],n=[],r=s(e.replace(F,"$1"));return r[b]?oe(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:oe(function(e){return function(t){return re(e,t).length>0}}),contains:oe(function(e){return e=e.replace(J,K),function(t){return(t.textContent||i(t)).indexOf(e)>-1}}),lang:oe(function(e){return _.test(e||"")||re.error("unsupported lang: "+e),e=e.replace(J,K).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:fe(!1),disabled:fe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return V.test(e.nodeName)},input:function(e){return X.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:pe(function(){return[0]}),last:pe(function(e,t){return[t-1]}),eq:pe(function(e,t,n){return[n<0?n+t:n]}),even:pe(function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e}),gt:pe(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function me(e,t,n){for(var r=0,i=t.length;r-1&&(o[l]=!(a[l]=f))}}else y=xe(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function we(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=ve(function(e){return e===t},s,!0),f=ve(function(e){return P(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u1&&ye(p),u>1&&ge(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(F,"$1"),n,u0,i=e.length>0,o=function(o,a,s,u,c){var f,h,v,y=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,S=C.length;for(c&&(l=a==d||a||c);m!==S&&null!=(f=C[m]);m++){if(i&&f){for(h=0,a||f.ownerDocument==d||(p(f),s=!g);v=e[h++];)if(v(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!v&&f)&&y--,o&&x.push(f))}if(y+=m,n&&m!==y){for(h=0;v=t[h++];)v(x,b,a,s);if(o){if(y>0)for(;m--;)x[m]||b[m]||(b[m]=q.call(u));b=xe(b)}H.apply(u,b),c&&!o&&b.length>0&&y+t.length>1&&re.uniqueSort(u)}return c&&(T=E,l=w),x};return n?oe(o):o}return he.prototype=r.filters=r.pseudos,r.setFilters=new he,a=re.tokenize=function(e,t){var n,i,o,a,s,u,l,c=S[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=r.preFilter;s;){for(a in n&&!(i=I.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=W.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(F," ")}),s=s.slice(n.length)),r.filter)!(i=z[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?re.error(e):S(e,u).slice(0)},s=re.compile=function(e,t){var n,r=[],i=[],o=A[e+" "];if(!o){for(t||(t=a(e)),n=t.length;n--;)(o=we(t[n]))[b]?r.push(o):i.push(o);(o=A(e,Te(i,r))).selector=e}return o},u=re.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(J,K),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=z.needsContext.test(e)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((f=r.find[c])&&(i=f(l.matches[0].replace(J,K),Q.test(u[0].type)&&de(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ge(u)))return H.apply(n,i),n;break}}return(p||s(e,d))(i,t,!g,n,!t||Q.test(e)&&de(t.parentNode)||t),n},n.sortStable=b.split("").sort(N).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ae(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ae(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||se("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ae(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||se("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ae(function(e){return null==e.getAttribute("disabled")})||se("checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),re})(e);b.find=T,b.expr=T.selectors,b.expr[":"]=b.expr.pseudos,b.uniqueSort=b.unique=T.uniqueSort,b.text=T.getText,b.isXMLDoc=T.isXML,b.contains=T.contains,b.escapeSelector=T.escape;var C=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&b(e).is(n))break;r.push(e)}return r},E=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},S=b.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var k=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function N(e,t,n){return h(t)?b.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?b.grep(e,function(e){return e===t!==n}):"string"!=typeof t?b.grep(e,function(e){return s.call(t,e)>-1!==n}):b.filter(t,e,n)}b.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?b.find.matchesSelector(r,e)?[r]:[]:b.find.matches(e,b.grep(t,function(e){return 1===e.nodeType}))},b.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(b(e).filter(function(){for(t=0;t1?b.uniqueSort(n):n},filter:function(e){return this.pushStack(N(this,e||[],!1))},not:function(e){return this.pushStack(N(this,e||[],!0))},is:function(e){return!!N(this,"string"==typeof e&&S.test(e)?b(e):e||[],!1).length}});var D,j=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(b.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:j.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof b?t[0]:t,b.merge(this,b.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:v,!0)),k.test(r[1])&&b.isPlainObject(t))for(r in t)h(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=v.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):h(e)?void 0!==n.ready?n.ready(e):e(b):b.makeArray(e,this)}).prototype=b.fn,D=b(v);var q=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function H(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}b.fn.extend({has:function(e){var t=b(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&b.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?b.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?s.call(b(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(b.uniqueSort(b.merge(this.get(),b(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return C(e,"parentNode")},parentsUntil:function(e,t,n){return C(e,"parentNode",n)},next:function(e){return H(e,"nextSibling")},prev:function(e){return H(e,"previousSibling")},nextAll:function(e){return C(e,"nextSibling")},prevAll:function(e){return C(e,"previousSibling")},nextUntil:function(e,t,n){return C(e,"nextSibling",n)},prevUntil:function(e,t,n){return C(e,"previousSibling",n)},siblings:function(e){return E((e.parentNode||{}).firstChild,e)},children:function(e){return E(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),b.merge([],e.childNodes))}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),this.length>1&&(L[e]||b.uniqueSort(i),q.test(e)&&i.reverse()),this.pushStack(i)}});var O=/[^\x20\t\r\n\f]+/g;function P(e){var t={};return b.each(e.match(O)||[],function(e,n){t[n]=!0}),t}function R(e){return e}function M(e){throw e}function F(e,t,n,r){var i;try{e&&h(i=e.promise)?i.call(e).done(t).fail(n):e&&h(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}b.Callbacks=function(e){e="string"==typeof e?P(e):b.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?b.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},b.extend({Deferred:function(t){var n=[["notify","progress",b.Callbacks("memory"),b.Callbacks("memory"),2],["resolve","done",b.Callbacks("once memory"),b.Callbacks("once memory"),0,"resolved"],["reject","fail",b.Callbacks("once memory"),b.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return b.Deferred(function(t){b.each(n,function(n,r){var i=h(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&h(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t=o&&(r!==M&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(b.Deferred.getStackHook&&(c.stackTrace=b.Deferred.getStackHook()),e.setTimeout(c))}}return b.Deferred(function(e){n[0][3].add(a(0,e,h(i)?i:R,e.notifyWith)),n[1][3].add(a(0,e,h(t)?t:R)),n[2][3].add(a(0,e,h(r)?r:M))}).promise()},promise:function(e){return null!=e?b.extend(e,i):i}},o={};return b.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),o=i.call(arguments),a=b.Deferred(),s=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?i.call(arguments):n,--t||a.resolveWith(r,o)}};if(t<=1&&(F(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||h(o[n]&&o[n].then)))return a.then();for(;n--;)F(o[n],s(n),a.reject);return a.promise()}});var I=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;b.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&I.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},b.readyException=function(t){e.setTimeout(function(){throw t})};var W=b.Deferred();function $(){v.removeEventListener("DOMContentLoaded",$),e.removeEventListener("load",$),b.ready()}b.fn.ready=function(e){return W.then(e).catch(function(e){b.readyException(e)}),this},b.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--b.readyWait:b.isReady)||(b.isReady=!0,!0!==e&&--b.readyWait>0||W.resolveWith(v,[b]))}}),b.ready.then=W.then,"complete"===v.readyState||"loading"!==v.readyState&&!v.documentElement.doScroll?e.setTimeout(b.ready):(v.addEventListener("DOMContentLoaded",$),e.addEventListener("load",$));var B=function e(t,n,r,i,o,a,s){var u=0,l=t.length,c=null==r;if("object"===x(r))for(u in o=!0,r)e(t,n,u,r[u],!0,a,s);else if(void 0!==i&&(o=!0,h(i)||(s=!0),c&&(s?(n.call(t,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;u1,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),b.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,b.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){b.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:b.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),b.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ve=/^$|^module$|\/(?:java|ecma)script/i;pe=v.createDocumentFragment().appendChild(v.createElement("div")),(de=v.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),pe.appendChild(de),d.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="",d.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue,pe.innerHTML="",d.option=!!pe.lastChild;var ye={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function me(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?b.merge([e],n):n}function xe(e,t){for(var n=0,r=e.length;n",""]);var be=/<|&#?\w+;/;function we(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d-1)i&&i.push(o);else if(l=oe(o),a=me(f.appendChild(o),"script"),l&&xe(a),n)for(c=0;o=a[c++];)ve.test(o.type||"")&&n.push(o);return f}var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function Se(){return!0}function Ae(){return!1}function ke(e,t){return e===Ne()==("focus"===t)}function Ne(){try{return v.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ae;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return b().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=b.guid++)),e.each(function(){b.event.add(this,t,i,r,n)})}function je(e,t,n){n?(Y.set(e,t,!1),b.event.add(e,t,{namespace:!1,handler:function(e){var r,o,a=Y.get(this,t);if(1&e.isTrigger&&this[t]){if(a.length)(b.event.special[t]||{}).delegateType&&e.stopPropagation();else if(a=i.call(arguments),Y.set(this,t,a),r=n(this,t),this[t](),a!==(o=Y.get(this,t))||r?Y.set(this,t,!1):o={},a!==o)return e.stopImmediatePropagation(),e.preventDefault(),o.value}else a.length&&(Y.set(this,t,{value:b.event.trigger(b.extend(a[0],b.Event.prototype),a.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,t)&&b.event.add(e,t,Se)}b.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(e);if(V(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&b.find.matchesSelector(ie,i),n.guid||(n.guid=b.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return void 0!==b&&b.event.triggered!==t.type?b.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(O)||[""]).length;l--;)d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=b.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=b.event.special[d]||{},c=b.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&b.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),b.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(O)||[""]).length;l--;)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=b.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||b.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=b.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=b.event.special[u.type]||{};for(s[0]=u,t=1;t=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:b.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&b(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n1&&"string"==typeof v&&!d.checkClone&&Le.test(v))return e.each(function(i){var o=e.eq(i);y&&(t[0]=v.call(this,i,o.html())),Fe(o,t,n,r)});if(p&&(a=(i=we(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(u=(s=b.map(me(i,"script"),Pe)).length;f0&&xe(a,!f&&me(e,"script")),c},cleanData:function(e){for(var t,n,r,i=b.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?b.event.remove(n,r):b.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),b.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return B(this,function(e){return void 0===e?b.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Fe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Oe(this,e).appendChild(e)})},prepend:function(){return Fe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Oe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Fe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Fe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(b.cleanData(me(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return B(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!qe.test(e)&&!ye[(ge.exec(e)||["",""])[1].toLowerCase()]){e=b.htmlPrefilter(e);try{for(;n3,ie.removeChild(t)),s}}))})();var Xe=["Webkit","Moz","ms"],Ve=v.createElement("div").style,Ge={};function Ye(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Xe.length;n--;)if((e=Xe[n]+t)in Ve)return e}function Qe(e){var t=b.cssProps[e]||Ge[e];return t||(e in Ve?e:Ge[e]=Ye(e)||e)}var Je=/^(none|table(?!-c[ea]).+)/,Ke=/^--/,Ze={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"};function tt(e,t,n){var r=ne.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function nt(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=b.css(e,n+re[a],!0,i)),r?("content"===n&&(u-=b.css(e,"padding"+re[a],!0,i)),"margin"!==n&&(u-=b.css(e,"border"+re[a]+"Width",!0,i))):(u+=b.css(e,"padding"+re[a],!0,i),"padding"!==n?u+=b.css(e,"border"+re[a]+"Width",!0,i):s+=b.css(e,"border"+re[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function rt(e,t,n){var r=$e(e),i=(!d.boxSizingReliable()||n)&&"border-box"===b.css(e,"boxSizing",!1,r),o=i,a=ze(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(We.test(a)){if(!n)return a;a="auto"}return(!d.boxSizingReliable()&&i||!d.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===b.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===b.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+nt(e,t,n||(i?"border":"content"),o,r,a)+"px"}function it(e,t,n,r,i){return new it.prototype.init(e,t,n,r,i)}b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=ze(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Ke.test(t),l=e.style;if(u||(t=Qe(s)),a=b.cssHooks[t]||b.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=ne.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(b.cssNumber[s]?"":"px")),d.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Ke.test(t)||(t=Qe(s)),(a=b.cssHooks[t]||b.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=ze(e,t,r)),"normal"===i&&t in et&&(i=et[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),b.each(["height","width"],function(e,t){b.cssHooks[t]={get:function(e,n,r){if(n)return!Je.test(b.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?rt(e,t,r):Be(e,Ze,function(){return rt(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a=!d.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===b.css(e,"boxSizing",!1,o),u=r?nt(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-nt(e,t,"border",!1,o)-.5)),u&&(i=ne.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=b.css(e,t)),tt(0,n,u)}}}),b.cssHooks.marginLeft=Ue(d.reliableMarginLeft,function(e,t){if(t)return(parseFloat(ze(e,"marginLeft"))||e.getBoundingClientRect().left-Be(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+re[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(b.cssHooks[e+t].set=tt)}),b.fn.extend({css:function(e,t){return B(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a1)}}),b.Tween=it,it.prototype={constructor:it,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||b.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=it.propHooks[this.prop];return e&&e.get?e.get(this):it.propHooks._default.get(this)},run:function(e){var t,n=it.propHooks[this.prop];return this.options.duration?this.pos=t=b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):it.propHooks._default.set(this),this}},it.prototype.init.prototype=it.prototype,it.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=b.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):1!==e.elem.nodeType||!b.cssHooks[e.prop]&&null==e.elem.style[Qe(e.prop)]?e.elem[e.prop]=e.now:b.style(e.elem,e.prop,e.now+e.unit)}}},it.propHooks.scrollTop=it.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},b.fx=it.prototype.init,b.fx.step={};var ot,at,st=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;function lt(){at&&(!1===v.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(lt):e.setTimeout(lt,b.fx.interval),b.fx.tick())}function ct(){return e.setTimeout(function(){ot=void 0}),ot=Date.now()}function ft(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=re[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function pt(e,t,n){for(var r,i=(ht.tweeners[t]||[]).concat(ht.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})}}),b.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?b.prop(e,t,n):(1===o&&b.isXMLDoc(e)||(i=b.attrHooks[t.toLowerCase()]||(b.expr.match.bool.test(t)?gt:void 0)),void 0!==n?null===n?void b.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=b.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!d.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(O);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),gt={set:function(e,t,n){return!1===t?b.removeAttr(e,n):e.setAttribute(n,n),n}},b.each(b.expr.match.bool.source.match(/\w+/g),function(e,t){var n=vt[t]||b.find.attr;vt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=vt[a],vt[a]=i,i=null!=n(e,t,r)?a:null,vt[a]=o),i}});var yt=/^(?:input|select|textarea|button)$/i,mt=/^(?:a|area)$/i;function xt(e){return(e.match(O)||[]).join(" ")}function bt(e){return e.getAttribute&&e.getAttribute("class")||""}function wt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(O)||[]}b.fn.extend({prop:function(e,t){return B(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[b.propFix[e]||e]})}}),b.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&b.isXMLDoc(e)||(t=b.propFix[t]||t,i=b.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=b.find.attr(e,"tabindex");return t?parseInt(t,10):yt.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),d.optSelected||(b.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),b.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){b.propFix[this.toLowerCase()]=this}),b.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(h(e))return this.each(function(t){b(this).addClass(e.call(this,t,bt(this)))});if((t=wt(e)).length)for(;n=this[u++];)if(i=bt(n),r=1===n.nodeType&&" "+xt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=xt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(h(e))return this.each(function(t){b(this).removeClass(e.call(this,t,bt(this)))});if(!arguments.length)return this.attr("class","");if((t=wt(e)).length)for(;n=this[u++];)if(i=bt(n),r=1===n.nodeType&&" "+xt(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=xt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):h(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,bt(this),t),t)}):this.each(function(){var t,i,o,a;if(r)for(i=0,o=b(this),a=wt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=bt(this))&&Y.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+xt(bt(n))+" ").indexOf(t)>-1)return!0;return!1}});var Tt=/\r/g;b.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=h(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,b(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=b.map(i,function(e){return null==e?"":e+""})),(t=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=b.valHooks[i.type]||b.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Tt,""):null==n?"":n:void 0}}),b.extend({valHooks:{option:{get:function(e){var t=b.find.attr(e,"value");return null!=t?t:xt(b.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=b.inArray(b(e).val(),t)>-1}},d.checkOn||(b.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),d.focusin="onfocusin"in e;var Ct=/^(?:focusinfocus|focusoutblur)$/,Et=function(e){e.stopPropagation()};b.extend(b.event,{trigger:function(t,n,r,i){var o,a,s,u,l,f,p,d,y=[r||v],m=c.call(t,"type")?t.type:t,x=c.call(t,"namespace")?t.namespace.split("."):[];if(a=d=s=r=r||v,3!==r.nodeType&&8!==r.nodeType&&!Ct.test(m+b.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),l=m.indexOf(":")<0&&"on"+m,(t=t[b.expando]?t:new b.Event(m,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:b.makeArray(n,[t]),p=b.event.special[m]||{},i||!p.trigger||!1!==p.trigger.apply(r,n))){if(!i&&!p.noBubble&&!g(r)){for(u=p.delegateType||m,Ct.test(u+m)||(a=a.parentNode);a;a=a.parentNode)y.push(a),s=a;s===(r.ownerDocument||v)&&y.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=y[o++])&&!t.isPropagationStopped();)d=a,t.type=o>1?u:p.bindType||m,(f=(Y.get(a,"events")||Object.create(null))[t.type]&&Y.get(a,"handle"))&&f.apply(a,n),(f=l&&a[l])&&f.apply&&V(a)&&(t.result=f.apply(a,n),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(y.pop(),n)||!V(r)||l&&h(r[m])&&!g(r)&&((s=r[l])&&(r[l]=null),b.event.triggered=m,t.isPropagationStopped()&&d.addEventListener(m,Et),r[m](),t.isPropagationStopped()&&d.removeEventListener(m,Et),b.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=b.extend(new b.Event,n,{type:e,isSimulated:!0});b.event.trigger(r,null,t)}}),b.fn.extend({trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return b.event.trigger(e,t,n,!0)}}),d.focusin||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){b.event.simulate(t,e.target,b.event.fix(e))};b.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=Y.access(r,t);i||r.addEventListener(e,n,!0),Y.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Y.access(r,t)-1;i?Y.access(r,t,i):(r.removeEventListener(e,n,!0),Y.remove(r,t))}}});var St=e.location,At={guid:Date.now()},kt=/\?/;b.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+t),n};var Nt=/\[\]$/,Dt=/\r?\n/g,jt=/^(?:submit|button|image|reset|file)$/i,qt=/^(?:input|select|textarea|keygen)/i;function Lt(e,t,n,r){var i;if(Array.isArray(t))b.each(t,function(t,i){n||Nt.test(e)?r(e,i):Lt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)Lt(e+"["+i+"]",t[i],n,r)}b.param=function(e,t){var n,r=[],i=function(e,t){var n=h(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){i(this.name,this.value)});else for(n in e)Lt(n,e[n],t,i);return r.join("&")},b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&qt.test(this.nodeName)&&!jt.test(e)&&(this.checked||!he.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:Array.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var Ht=/%20/g,Ot=/#.*$/,Pt=/([?&])_=[^&]*/,Rt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Mt=/^(?:GET|HEAD)$/,Ft=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=v.createElement("a");function _t(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(O)||[];if(h(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function zt(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,b.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Ut(e,t){var n,r,i=b.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&b.extend(!0,e,r),e}function Xt(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Vt(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}Bt.href=St.href,b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,b.ajaxSettings),t):Ut(b.ajaxSettings,e)},ajaxPrefilter:_t(It),ajaxTransport:_t(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,o,a,s,u,l,c,f,p,d=b.ajaxSetup({},n),h=d.context||d,g=d.context&&(h.nodeType||h.jquery)?b(h):b.event,y=b.Deferred(),m=b.Callbacks("once memory"),x=d.statusCode||{},w={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=Rt.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==l&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),S(0,t),this}};if(y.promise(E),d.url=((t||d.url||St.href)+"").replace(Ft,St.protocol+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(O)||[""],null==d.crossDomain){u=v.createElement("a");try{u.href=d.url,u.href=u.href,d.crossDomain=Bt.protocol+"//"+Bt.host!=u.protocol+"//"+u.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=b.param(d.data,d.traditional)),zt(It,d,n,E),l)return E;for(f in(c=b.event&&d.global)&&0==b.active++&&b.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Mt.test(d.type),i=d.url.replace(Ot,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Ht,"+")):(p=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(kt.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Pt,"$1"),p=(kt.test(i)?"&":"?")+"_="+At.guid+++p),d.url=i+p),d.ifModified&&(b.lastModified[i]&&E.setRequestHeader("If-Modified-Since",b.lastModified[i]),b.etag[i]&&E.setRequestHeader("If-None-Match",b.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||n.contentType)&&E.setRequestHeader("Content-Type",d.contentType),E.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", */*; q=0.01":""):d.accepts["*"]),d.headers)E.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(h,E,d)||l))return E.abort();if(C="abort",m.add(d.complete),E.done(d.success),E.fail(d.error),r=zt(Wt,d,n,E)){if(E.readyState=1,c&&g.trigger("ajaxSend",[E,d]),l)return E;d.async&&d.timeout>0&&(s=e.setTimeout(function(){E.abort("timeout")},d.timeout));try{l=!1,r.send(w,S)}catch(e){if(l)throw e;S(-1,e)}}else S(-1,"No Transport");function S(t,n,a,u){var f,p,v,w,T,C=n;l||(l=!0,s&&e.clearTimeout(s),r=void 0,o=u||"",E.readyState=t>0?4:0,f=t>=200&&t<300||304===t,a&&(w=Xt(d,E,a)),!f&&b.inArray("script",d.dataTypes)>-1&&(d.converters["text script"]=function(){}),w=Vt(d,w,E,f),f?(d.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(b.lastModified[i]=T),(T=E.getResponseHeader("etag"))&&(b.etag[i]=T)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=w.state,p=w.data,f=!(v=w.error))):(v=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",f?y.resolveWith(h,[p,C,E]):y.rejectWith(h,[E,C,v]),E.statusCode(x),x=void 0,c&&g.trigger(f?"ajaxSuccess":"ajaxError",[E,d,f?p:v]),m.fireWith(h,[E,C]),c&&(g.trigger("ajaxComplete",[E,d]),--b.active||b.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return b.get(e,t,n,"json")},getScript:function(e,t){return b.get(e,void 0,t,"script")}}),b.each(["get","post"],function(e,t){b[t]=function(e,n,r,i){return h(n)&&(i=i||r,r=n,n=void 0),b.ajax(b.extend({url:e,type:t,dataType:i,data:n,success:r},b.isPlainObject(e)&&e))}}),b.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),b._evalUrl=function(e,t,n){return b.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){b.globalEval(e,t,n)}})},b.fn.extend({wrapAll:function(e){var t;return this[0]&&(h(e)&&(e=e.call(this[0])),t=b(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return h(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=h(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){b(this).replaceWith(this.childNodes)}),this}}),b.expr.pseudos.hidden=function(e){return!b.expr.pseudos.visible(e)},b.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},b.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Gt={0:200,1223:204},Yt=b.ajaxSettings.xhr();d.cors=!!Yt&&"withCredentials"in Yt,d.ajax=Yt=!!Yt,b.ajaxTransport(function(t){var n,r;if(d.cors||Yt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Gt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),b.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),b.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=b("