@daily-co/daily-js
Version:
Please check our [our documentation site](https://docs.daily.co/) to get started. If you're building a web app with our `daily-js` front-end JavaScript library, you may be particularly interested in:
1 lines • 254 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Daily=t():e.Daily=t()}(this,(function(){return function(){var e={7:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}v(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&v(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var i,o,a,u;if(s(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=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){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 d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.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;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var u=c.length,l=h(c,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,a;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=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<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},781:function(e,t,n){var r=n(948);e.exports=r.default},880:function(e){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&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.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":case"NT 5.1":return"XP";case"NT 5.0":return"2000";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]<c[1][a])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var s=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(){}var t,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,n=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],null&&a(t.prototype,null),n&&a(t,n),e}();t.default=s,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),o=c(n(94)),a=c(n(95)),s=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach((function(t){var a=e[t];"string"==typeof a?(i[t]=a,o+=1):"object"==typeof a&&(n[t]=a,r+=1)})),r>0){var a=Object.keys(n),c=s.default.find(a,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var l=s.default.find(a,(function(e){return t.isPlatform(e)}));if(l){var d=this.satisfies(n[l]);if(void 0!==d)return d}}if(o>0){var f=Object.keys(i),p=s.default.find(f,(function(e){return t.isBrowser(e,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},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,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||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:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,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:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\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(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{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:[/Macintosh(.*?) FxiOS(.*?)\//],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}})},948:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function c(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function p(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){h(o,r,i,a,s,"next",e)}function s(e){h(o,r,i,a,s,"throw",e)}a(void 0)}))}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}n.r(t),n.d(t,{DAILY_ACCESS_LEVEL_FULL:function(){return Yr},DAILY_ACCESS_LEVEL_LOBBY:function(){return $r},DAILY_ACCESS_LEVEL_NONE:function(){return qr},DAILY_ACCESS_UNKNOWN:function(){return Jr},DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE:function(){return ai},DAILY_CAMERA_ERROR_CAM_IN_USE:function(){return ii},DAILY_CAMERA_ERROR_CONSTRAINTS:function(){return li},DAILY_CAMERA_ERROR_MIC_IN_USE:function(){return oi},DAILY_CAMERA_ERROR_NOT_FOUND:function(){return ui},DAILY_CAMERA_ERROR_PERMISSIONS:function(){return si},DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES:function(){return ci},DAILY_CAMERA_ERROR_UNKNOWN:function(){return di},DAILY_EVENT_ACCESS_STATE_UPDATED:function(){return Ai},DAILY_EVENT_ACTIVE_SPEAKER_CHANGE:function(){return Zi},DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE:function(){return eo},DAILY_EVENT_APP_MSG:function(){return qi},DAILY_EVENT_CAMERA_ERROR:function(){return _i},DAILY_EVENT_CPU_LOAD_CHANGE:function(){return ro},DAILY_EVENT_ERROR:function(){return go},DAILY_EVENT_EXIT_FULLSCREEN:function(){return ao},DAILY_EVENT_FACE_COUNTS_UPDATED:function(){return io},DAILY_EVENT_FULLSCREEN:function(){return oo},DAILY_EVENT_IFRAME_LAUNCH_CONFIG:function(){return pi},DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG:function(){return fi},DAILY_EVENT_INPUT_SETTINGS_UPDATED:function(){return ho},DAILY_EVENT_JOINED_MEETING:function(){return Si},DAILY_EVENT_JOINING_MEETING:function(){return bi},DAILY_EVENT_LANG_UPDATED:function(){return fo},DAILY_EVENT_LEFT_MEETING:function(){return wi},DAILY_EVENT_LIVE_STREAMING_ERROR:function(){return lo},DAILY_EVENT_LIVE_STREAMING_STARTED:function(){return so},DAILY_EVENT_LIVE_STREAMING_STOPPED:function(){return uo},DAILY_EVENT_LIVE_STREAMING_UPDATED:function(){return co},DAILY_EVENT_LOADED:function(){return mi},DAILY_EVENT_LOADING:function(){return vi},DAILY_EVENT_LOAD_ATTEMPT_FAILED:function(){return gi},DAILY_EVENT_LOCAL_SCREEN_SHARE_CANCELED:function(){return Xi},DAILY_EVENT_LOCAL_SCREEN_SHARE_STARTED:function(){return Ki},DAILY_EVENT_LOCAL_SCREEN_SHARE_STOPPED:function(){return Qi},DAILY_EVENT_MEETING_SESSION_DATA_ERROR:function(){return Pi},DAILY_EVENT_MEETING_SESSION_STATE_UPDATED:function(){return Oi},DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED:function(){return Ci},DAILY_EVENT_NETWORK_CONNECTION:function(){return no},DAILY_EVENT_NETWORK_QUALITY_CHANGE:function(){return to},DAILY_EVENT_NONFATAL_ERROR:function(){return vo},DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED:function(){return Mi},DAILY_EVENT_PARTICIPANT_JOINED:function(){return ki},DAILY_EVENT_PARTICIPANT_LEFT:function(){return Ti},DAILY_EVENT_PARTICIPANT_UPDATED:function(){return Ei},DAILY_EVENT_RECEIVE_SETTINGS_UPDATED:function(){return po},DAILY_EVENT_RECORDING_DATA:function(){return $i},DAILY_EVENT_RECORDING_ERROR:function(){return Ji},DAILY_EVENT_RECORDING_STARTED:function(){return Vi},DAILY_EVENT_RECORDING_STATS:function(){return Bi},DAILY_EVENT_RECORDING_STOPPED:function(){return Ui},DAILY_EVENT_RECORDING_UPLOAD_COMPLETED:function(){return Yi},DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED:function(){return Gi},DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED:function(){return Hi},DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED:function(){return zi},DAILY_EVENT_STARTED_CAMERA:function(){return yi},DAILY_EVENT_THEME_UPDATED:function(){return hi},DAILY_EVENT_TRACK_STARTED:function(){return Di},DAILY_EVENT_TRACK_STOPPED:function(){return ji},DAILY_EVENT_TRANSCRIPTION_ERROR:function(){return Fi},DAILY_EVENT_TRANSCRIPTION_MSG:function(){return Wi},DAILY_EVENT_TRANSCRIPTION_STARTED:function(){return Ri},DAILY_EVENT_TRANSCRIPTION_STOPPED:function(){return xi},DAILY_EVENT_WAITING_PARTICIPANT_ADDED:function(){return Ii},DAILY_EVENT_WAITING_PARTICIPANT_REMOVED:function(){return Ni},DAILY_EVENT_WAITING_PARTICIPANT_UPDATED:function(){return Li},DAILY_FATAL_ERROR_CONNECTION:function(){return ri},DAILY_FATAL_ERROR_EJECTED:function(){return zr},DAILY_FATAL_ERROR_EOL:function(){return ti},DAILY_FATAL_ERROR_EXP_ROOM:function(){return Qr},DAILY_FATAL_ERROR_EXP_TOKEN:function(){return Xr},DAILY_FATAL_ERROR_MEETING_FULL:function(){return ei},DAILY_FATAL_ERROR_NBF_ROOM:function(){return Hr},DAILY_FATAL_ERROR_NBF_TOKEN:function(){return Kr},DAILY_FATAL_ERROR_NOT_ALLOWED:function(){return ni},DAILY_FATAL_ERROR_NO_ROOM:function(){return Zr},DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY:function(){return Gr},DAILY_RECEIVE_SETTINGS_BASE_KEY:function(){return Wr},DAILY_STATE_ERROR:function(){return jr},DAILY_STATE_JOINED:function(){return Nr},DAILY_STATE_JOINING:function(){return Lr},DAILY_STATE_LEFT:function(){return Dr},DAILY_STATE_NEW:function(){return Or},DAILY_TRACK_STATE_BLOCKED:function(){return Rr},DAILY_TRACK_STATE_INTERRUPTED:function(){return Ur},DAILY_TRACK_STATE_LOADING:function(){return Vr},DAILY_TRACK_STATE_OFF:function(){return xr},DAILY_TRACK_STATE_PLAYABLE:function(){return Br},DAILY_TRACK_STATE_SENDABLE:function(){return Fr},default:function(){return fs}});var y=n(7),_=n.n(y),b=Object.prototype.hasOwnProperty;function S(e,t,n){for(n of e.keys())if(w(n,t))return n}function w(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&w(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((i=r)&&"object"==typeof i&&!(i=S(t,i)))return!1;if(!t.has(i))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((i=r[0])&&"object"==typeof i&&!(i=S(t,i)))return!1;if(!w(r[1],t.get(i)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(b.call(e,n)&&++r&&!b.call(t,n))return!1;if(!(n in t)||!w(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}var k=n(880),E=n.n(k);function T(){return Date.now()+Math.random().toString()}function M(){throw new Error("Method must be implemented in subclass")}function A(e,t){return null!=t&&t.proxyUrl?t.proxyUrl+("/"===t.proxyUrl.slice(-1)?"":"/")+e.substring(8):e}function C(e){return null!=e&&e.callObjectBundleUrlOverride?e.callObjectBundleUrlOverride:A("https://c.daily.co/call-machine/versioned/".concat("0.79.0","/static/call-machine-object-bundle.js"),e)}function O(e){try{new URL(e)}catch(e){return!1}return!0}const P="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,I="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,L="8.55.0",N=globalThis;function D(e,t,n){const r=n||N,i=r.__SENTRY__=r.__SENTRY__||{},o=i[L]=i[L]||{};return o[e]||(o[e]=t())}const j=["debug","info","warn","error","log","assert","trace"],R={};function x(e){if(!("console"in N))return e();const t=N.console,n={},r=Object.keys(R);r.forEach((e=>{const r=R[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}const F=D("logger",(function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return I?j.forEach((n=>{t[n]=(...t)=>{e&&x((()=>{N.console[n](`Sentry Logger [${n}]:`,...t)}))}})):j.forEach((e=>{t[e]=()=>{}})),t})),V=[];function U(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function B(e,t,n){if(n[t.name])P&&F.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===V.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),V.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}P&&F.log(`Integration installed: ${t.name}`)}}const J=Object.prototype.toString;function Y(e){switch(J.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Z(e,Error)}}function $(e,t){return J.call(e)===`[object ${t}]`}function q(e){return $(e,"ErrorEvent")}function W(e){return $(e,"DOMError")}function G(e){return $(e,"String")}function z(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function H(e){return null===e||z(e)||"object"!=typeof e&&"function"!=typeof e}function K(e){return $(e,"Object")}function Q(e){return"undefined"!=typeof Event&&Z(e,Event)}function X(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Z(e,t){try{return e instanceof t}catch(e){return!1}}function ee(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const te=N;function ne(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,a=0;const s=" > ",c=s.length;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(u=re(n,l),!("html"===u||o>1&&a+i.length*c+u.length>=d));)i.push(u),a+=u.length,n=n.parentNode;return i.reverse().join(s)}catch(e){return"<unknown>"}}function re(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(te.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(i&&i.length)i.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&G(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const o=["aria-label","type","name","title","alt"];for(const e of o){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function ie(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function oe(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{ee(r)?n.push("[VueViewModel]"):n.push(String(r))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function ae(e,t=[],n=!1){return t.some((t=>function(e,t,n=!1){return!!G(e)&&($(t,"RegExp")?t.test(e):!!G(t)&&(n?e===t:e.includes(t)))}(e,t,n)))}function se(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);"function"==typeof i&&ue(i,r);try{e[t]=i}catch(n){I&&F.log(`Failed to replace method "${t}" in object`,e)}}function ce(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){I&&F.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function ue(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,ce(e,"__sentry_original__",t)}catch(e){}}function le(e){return e.__sentry_original__}function de(e){if(Y(e))return{message:e.message,name:e.name,stack:e.stack,...pe(e)};if(Q(e)){const t={type:e.type,target:fe(e.target),currentTarget:fe(e.currentTarget),...pe(e)};return"undefined"!=typeof CustomEvent&&Z(e,CustomEvent)&&(t.detail=e.detail),t}return e}function fe(e){try{return"undefined"!=typeof Element&&Z(e,Element)?ne(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function pe(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function he(e){return ve(e,new Map)}function ve(e,t){if(function(e){if(!K(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.getOwnPropertyNames(e))void 0!==e[n]&&(r[n]=ve(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(ve(e,t))})),r}return e}function ge(){const e=N,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function me(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ye(e){const{message:t,event_id:n}=e;if(t)return t;const r=me(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function _e(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function be(e,t){const n=me(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function Se(e){if(function(e){try{return e.__sentry_captured__}catch(e){}}(e))return!0;try{ce(e,"__sentry_captured__",!0)}catch(e){}return!1}const we=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],ke=(e={})=>({name:"InboundFilters",processEvent(t,n,r){const i=r.getOptions(),o=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:we],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,i);return function(e,t){return t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e)?(P&&F.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${ye(e)}`),!0):function(e,t){return!(e.type||!t||!t.length)&&function(e){const t=[];let n;e.message&&t.push(e.message);try{n=e.exception.values[e.exception.values.length-1]}catch(e){}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}(e).some((e=>ae(e,t)))}(e,t.ignoreErrors)?(P&&F.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${ye(e)}`),!0):function(e){return!e.type&&(!(!e.exception||!e.exception.values||0===e.exception.values.length)&&(!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))))}(e)?(P&&F.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${ye(e)}`),!0):function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&ae(n,t)}(e,t.ignoreTransactions)?(P&&F.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${ye(e)}`),!0):function(e,t){if(!t||!t.length)return!1;const n=Ee(e);return!!n&&ae(n,t)}(e,t.denyUrls)?(P&&F.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${ye(e)}.\nUrl: ${Ee(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;const n=Ee(e);return!n||ae(n,t)}(e,t.allowUrls)&&(P&&F.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${ye(e)}.\nUrl: ${Ee(e)}`),!0)}(t,o)?null:t}});function Ee(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return P&&F.error(`Cannot extract url for event ${ye(e)}`),null}}function Te(){return Me(N),N}function Me(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||L,t[L]=t[L]||{}}function Ae(){return Date.now()/1e3}const Ce=function(){const{performance:e}=N;if(!e||!e.now)return Ae;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();let Oe;function Pe(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Ce(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:ge()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Ie(){return ge()}function Le(){return ge().substring(16)}function Ne(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Ne(r[e],t[e],n-1));return r}(()=>{const{performance:e}=N;if(!e||!e.now)return void(Oe="none");const t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,a=e.timing&&e.timing.navigationStart,s="number"==typeof a?Math.abs(a+n-r):t;o||s<t?i<=s?(Oe="timeOrigin",e.timeOrigin):Oe="navigationStart":Oe="dateNow"})();const De="_sentrySpan";function je(e,t){t?ce(e,De,t):delete e[De]}function Re(e){return e[De]}class xe{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ie(),spanId:Le()}}clone(){const e=new xe;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,je(e,Re(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Pe(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof Fe?[t.getScopeData(),t.getRequestSession()]:K(t)?[e,e.requestSession]:[],{tags:i,extra:o,user:a,contexts:s,level:c,fingerprint:u=[],propagationContext:l}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...s},a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),u.length&&(this._fingerprint=u),l&&(this._propagationContext=l),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,je(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ie()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Ae(),...e};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Re(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Ne(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Le(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:ge();if(!this._client)return F.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:ge();if(!this._client)return F.warn("No client configured on scope - will not capture message!"),r;const i=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:ge();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(F.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const Fe=xe;class Ve{constructor(e,t){let n,r;n=e||new Fe,r=t||new Fe,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return X(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1||!this._stack.pop())}}function Ue(){const e=Me(Te());return e.stack=e.stack||new Ve(D("defaultCurrentScope",(()=>new Fe)),D("defaultIsolationScope",(()=>new Fe)))}function Be(e){return Ue().withScope(e)}function Je(e,t){const n=Ue();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function Ye(e){return Ue().withScope((()=>e(Ue().getIsolationScope())))}function $e(e){const t=Me(e);return t.acs?t.acs:{withIsolationScope:Ye,withScope:Be,withSetScope:Je,withSetIsolationScope:(e,t)=>Ye(t),getCurrentScope:()=>Ue().getScope(),getIsolationScope:()=>Ue().getIsolationScope()}}function qe(){return $e(Te()).getCurrentScope()}function We(){return $e(Te()).getIsolationScope()}function Ge(){return qe().getClient()}function ze(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:i}=t;return he({trace_id:n,span_id:r,parent_span_id:i})}let He;const Ke=new WeakMap,Qe=()=>({name:"FunctionToString",setupOnce(){He=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=le(this),n=Ke.has(Ge())&&void 0!==t?t:this;return He.apply(n,e)}}catch(e){}},setup(e){Ke.set(e,!0)}}),Xe="?",Ze=/\(error: (.*)\)/,et=/captureMessage|captureException/;function tt(e){return e[e.length-1]||{}}const nt="<anonymous>";function rt(e){try{return e&&"function"==typeof e&&e.name||nt}catch(e){return nt}}function it(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch(e){return}}}const ot=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){return!!t&&(!!function(e,t){const n=e.message,r=t.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!st(e,t)&&!!at(e,t))))}(e,t)||!!function(e,t){const n=ct(t),r=ct(e);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!st(e,t)&&!!at(e,t)))}(e,t))}(t,e))return P&&F.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}};function at(e,t){let n=it(e),r=it(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function st(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(e){return!1}}function ct(e){return e.exception&&e.exception.values&&e.exception.values[0]}const ut={},lt={};function dt(e,t){ut[e]=ut[e]||[],ut[e].push(t)}function ft(e,t){if(!lt[e]){lt[e]=!0;try{t()}catch(t){I&&F.error(`Error while instrumenting ${e}`,t)}}}function pt(e,t){const n=e&&ut[e];if(n)for(const r of n)try{r(t)}catch(t){I&&F.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${rt(r)}\nError:`,t)}}const ht=N;let vt,gt,mt;function yt(){if(!ht.document)return;const e=pt.bind(null,"dom"),t=_t(e,!0);ht.document.addEventListener("click",t,!1),ht.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=ht[t],r=n&&n.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(se(r,"addEventListener",(function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=r[n]=r[n]||{refCount:0};if(!o.handler){const r=_t(e);o.handler=r,t.call(this,n,r,i)}o.refCount++}catch(e){}return t.call(this,n,r,i)}})),se(r,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))}))}function _t(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;ce(n,"_sentryCaptured",!0),r&&!r._sentryId&&ce(r,"_sentryId",ge());const i="keypress"===n.type?"input":n.type;(function(e){if(e.type!==gt)return!1;try{if(!e.target||e.target._sentryId!==mt)return!1}catch(e){}return!0})(n)||(e({event:n,name:i,global:t}),gt=n.type,mt=r?r._sentryId:void 0),clearTimeout(vt),vt=ht.setTimeout((()=>{mt=void 0,gt=void 0}),1e3)}}const bt="__sentry_xhr_v3__";function St(){if(!ht.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,i=1e3*Ce(),o=G(n[0])?n[0].toUpperCase():void 0,a=function(e){if(G(e))return e;try{return e.toString()}catch(e){}}(n[1]);if(!o||!a)return e.apply(t,n);t[bt]={method:o,url:a,request_headers:{}},"POST"===o&&a.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const s=()=>{const e=t[bt];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}pt("xhr",{endTimestamp:1e3*Ce(),startTimestamp:i,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener("readystatechange",s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,i]=n,o=t[bt];return o&&G(r)&&G(i)&&(o.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[bt];return r?(void 0!==n[0]&&(r.body=n[0]),pt("xhr",{startTimestamp:1e3*Ce(),xhr:t}),e.apply(t,n)):e.apply(t,n)}})}const wt=N;let kt;function Et(e){const t="history";dt(t,e),ft(t,Tt)}function Tt(){if(!function(){const e=wt.chrome,t=e&&e.app&&e.app.runtime,n="history"in wt&&!!wt.history.pushState&&!!wt.history.replaceState;return!t&&n}())return;const e=ht.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=kt,t=String(n);kt=t,pt("history",{from:e,to:t})}return e.apply(this,t)}}ht.onpopstate=function(...t){const n=ht.location.href,r=kt;if(kt=n,pt("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},se(ht.history,"pushState",t),se(ht.history,"replaceState",t)}function Mt(){"console"in N&&j.forEach((function(e){e in N.console&&se(N.console,e,(function(t){return R[e]=t,function(...t){pt("console",{args:t,level:e});const n=R[e];n&&n.apply(N.console,t)}}))}))}const At=N;function Ct(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Ot(e,t=!1){t&&!function(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in At))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}())return!1;if(Ct(At.fetch))return!0;let e=!1;const t=At.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Ct(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){I&&F.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}()||se(N,"fetch",(function(t){return function(...n){const r=new Error,{method:i,url:o}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:It(t),method:Pt(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:It(t),method:Pt(t,"method")?String(t.method).toUpperCase():"GET"}}(n),a={args:n,fetchData:{method:i,url:o},startTimestamp:1e3*Ce(),virtualError:r};return e||pt("fetch",{...a}),t.apply(N,n).then((async t=>(e?e(t):pt("fetch",{...a,endTimestamp:1e3*Ce(),response:t}),t)),(e=>{throw pt("fetch",{...a,endTimestamp:1e3*Ce(),error:e}),Y(e)&&void 0===e.stack&&(e.stack=r.stack,ce(e,"framesToPop",1)),e}))}}))}function Pt(e,t){return!!e&&"object"==typeof e&&!!e[t]}function It(e){return"string"==typeof e?e:e?Pt(e,"url")?e.url:e.toString?e.toString():"":""}const Lt=100;function Nt(e,t){const n=Ge(),r=We();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Lt}=n.getOptions();if(o<=0)return;const a={timestamp:Ae(),...e},s=i?x((()=>i(a,t))):a;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,o))}function Dt(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}function jt(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const Rt="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,xt="production";var Ft;function Vt(e){return new Bt((t=>{t(e)}))}function Ut(e){return new Bt(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"}(Ft||(Ft={}));class Bt{constructor(e){Bt.prototype.__init.call(this),Bt.prototype.__init2.call(this),Bt.prototype.__init3.call(this),Bt.prototype.__init4.call(this),this._state=Ft.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new Bt(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new Bt(((t,n)=>{let r,i;return this.then((t=>{i=!1,r=t,e&&e()}),(t=>{i=!0,r=t,e&&e()})).then((()=>{i?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(Ft.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Ft.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===Ft.PENDING&&(X(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Ft.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===Ft.RESOLVED&&e[1](this._value),this._state===Ft.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function Jt(e,t,n,r=0){return new Bt(((i,o)=>{const a=e[r];if(null===t||"function"!=typeof a)i(t);else{const s=a({...t},n);P&&a.id&&null===s&&F.log(`Event processor "${a.id}" dropped event`),X(s)?s.then((t=>Jt(e,t,n,r+1).then(i))).then(null,o):Jt(e,s,n,r+1).then(i).then(null,o)}}))}let Yt,$t,qt;function Wt(e,t=100,n=1/0){try{return zt("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Gt(e,t=3,n=102400){const r=Wt(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?Gt(e,t-1,n):r;var i}function zt(e,t,n=1/0,r=1/0,i=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[o,a]=i;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const s=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof window&&t===window)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(ee(t))return"[VueViewModel]";if(K(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${rt(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return s.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&"function"==typeof u.toJSON)try{return zt("",u.toJSON(),c-1,r,i)}catch(e){}const l=Array.isArray(t)?[]:{};let d=0;const f=de(t);for(const e in f){if(!Object.prototype.hasOwnProperty.call(f,e))continue;if(d>=r){l[e]="[MaxProperties ~]";break}const t=f[e];l[e]=zt(e,t,c-1,r,i),d++}return a(t),l}const Ht=/^sentry-/;function Kt(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}function Qt(e){const t=e._sentryMetrics;if(!t)return;const n={};for(const[,[e,r]]of t)(n[e]||(n[e]=[])).push(he(r));return n}let Xt=!1;function Zt(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return he({parent_span_id:r?t:nn(e).parent_span_id,span_id:r?Le():t,trace_id:n})}function en(e){return"number"==typeof e?tn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?tn(e.getTime()):Ce()}function tn(e){return e>9999999999?e/1e3:e}function nn(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:i,name:o,endTime:a,parentSpanId:s,status:c}=e;return he({span_id:t,trace_id:n,data:r,description:o,parent_span_id:s,start_timestamp:en(i),timestamp:en(a)||void 0,status:rn(c),op:r["sentry.op"],origin:r["sentry.origin"],_metrics_summary:Qt(e)})}return{span_id:t,trace_id:n}}catch(e){return{}}}function rn(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}function on(e){return e._sentryRootSpan||e}function an(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=he({environment:n.environment||xt,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function sn(e){const t=Ge();if(!t)return{};const n=on(e),r=n._frozenDsc;if(r)return r;const i=n.spanContext().traceState,o=i&&i.get("sentry.dsc"),a=o&&function(e){const t=function(e){if(e&&(G(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce(((e,t)=>{const n=Kt(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{}):Kt(e)}(e);if(!t)return;const n=Object.entries(t).reduce(((e,[t,n])=>(t.match(Ht)&&(e[t.slice(7)]=n),e)),{});return Object.keys(n).length>0?n:void 0}(o);if(a)return a;const s=an(e.spanContext().traceId,t),c=nn(n),u=c.data||{},l=u["sentry.sample_rate"];null!=l&&(s.sample_rate=`${l}`);const d=u["sentry.source"],f=c.description;return"url"!==d&&f&&(s.transaction=f),function(){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=Ge(),t=e&&e.getOptions();return!!t&&(t.enableTracing||"tracesSampleRate"in t||"tracesSampler"in t)}()&&(s.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n))),t.emit("createDsc",s,n),s}function cn(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:f,transactionName:p,span:h}=t;un(e,"extra",n),un(e,"tags",r),un(e,"user",i),un(e,"contexts",o),e.sdkProcessingMetadata=Ne(e.sdkProcessingMetadata,s,2),a&&(e.level=a),p&&(e.transactionName=p),h&&(e.span=h),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function un(e,t,n){e[t]=Ne(e[t],n,1)}function ln(e,t,n,r,i,o){const{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ge(),timestamp:t.timestamp||Ae()},u=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;e.environment=e.environment||n||xt,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i),e.message&&(e.message=ie(e.message,o));const a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=ie(a.value,o));const s=e.request;s&&s.url&&(s.url=ie(s.url,o))}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,u),i&&i.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=N._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return qt&&n.length===$t||($t=n.length,qt=n.reduce(((n,r)=>{Yt||(Yt={});const i=Yt[r];if(i)n[i[0]]=i[1];else{const i=e(r);for(let e=i.length-1;e>=0;e--){const o=i[e],a=o&&o.filename,s=t[r];if(a&&s){n[a]=s,Yt[r]=[a,s];break}}}return n}),{})),qt}(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{n&&e.filename&&(e.debug_id=n[e.filename])}))}))}catch(e){}}(c,e.stackParser);const l=function(e,t){if(!t)return e;const n=e?e.clone():new Fe;return n.update(t),n}(r,n.captureContext);n.mechanism&&be(c,n.mechanism);const d=i?i.getEventProcessors():[],f=D("globalScope",(()=>new Fe)).getScopeData();o&&cn(f,o.getScopeData()),l&&cn(f,l.getScopeData());const p=[...n.attachments||[],...f.attachments];return p.length&&(n.attachments=p),function(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;!function(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,transactionName:s}=t,c=he(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const u=he(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const l=he(i);l&&Object.keys(l).length&&(e.user={...l,...e.user});const d=he(o);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),a&&(e.level=a),s&&"transaction"!==e.type&&(e.transaction=s)}(e,t),r&&function(e,t){e.contexts={trace:Zt(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:sn(t),...e.sdkProcessingMetadata};const n=nn(on(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,o)}(c,f),Jt([...d,...f.eventProcessors],c,n).then((e=>(e&&function(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})}))}(e),"number"==typeof a&&a>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:Wt(e.data,t,n)}})))},...e.user&&{user:Wt(e.user,t,n)},...e.contexts&&{contexts:Wt(e.contexts,t,n)},...e.extra&&{extra:Wt(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Wt(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:Wt(e.data,t,n)}})))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=Wt(e.contexts.flags,3,n)),r}(e,a,s):e)))}const dn=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function fn(e,t){return qe().captureEvent(e,t)}function pn(e){const t=Ge(),n=We(),r=qe(),{release:i,environment:o=xt}=t&&t.getOptions()||{},{userAgent:a}=N.navigator||{},s=function(e){const t=Ce(),n={sid:ge(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return he({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&Pe(n,e),n}({release:i,environment:o,user:r.getUser()||n.getUser(),...a&&{userAgent:a},...e}),c=n.getSession();return c&&"ok"===c.status&&Pe(c,{status:"exited"}),hn(),n.setSession(s),r.setSession(s),s}function hn(){const e=We(),t=qe(),n=t.getSession()||e.getSession();n&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),Pe(e,t)}(n),vn(),e.setSession(),t.setSession()}function vn(){const e=We(),t=qe(),n=Ge(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function gn(e=!1){e?hn():vn()}const mn=N;let yn=0;function _n(){return yn>0}function bn(e,t={}){if(!function(e){return"function"==typeof e}(e))return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(le(e))return e}catch(t){return e}const n=function(...n){try{const r=n.map((e=>bn(e,t)));return e.apply(this,r)}catch(e){throw yn++,setTimeout((()=>{yn--})),function(...e){const t=$e(Te());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}((r=>{var i;r.addEventProcessor((e=>(t.mechanism&&(_e(e,void 0,void 0),be(e,t.mechanism)),e.extra={...e.extra,arguments:n},e))),i=e,qe().captureException(i,function(e){if(e)return function(e){return e instanceof Fe||"function"==typeof e}(e)||function(e){return Object.keys(e).some((e=>dn.includes(e)))}(e)?{captureContext:e}:e}(undefined))})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch(e){}ue(n,e),ce(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch(e){}return n}const Sn=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){const t="console";dt(t,e),ft(t,Mt)}(function(e){return function(t){if(Ge()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:(r=t.level,"warn"===r?"warning":["fatal","error","warning","log","info","debug"].includes(r)?r:"log"),message:oe(t.args," ")};var r;if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${oe(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Nt(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(Ge()!==e)return;let r,i,o="object"==typeof t?t.serializeAttribute:void 0,a="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;a&&a>1024&&(Rt&&F.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=1024),"string"==typeof o&&(o=[o]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=ne(t,{keyAttrs:o,maxStringLength:a}),i=function(e){if(!te.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}(t)}catch(e){r="<unknown>"}if(0===r.length)return;const s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),Nt(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),dt("dom",n),ft("dom",yt)),t.xhr&&function(e){dt("xhr",e),ft("xhr",St)}(function(e){return function(t){if(Ge()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[bt];if(!n||!r||!i)return;const{method:o,url:a,status_code:s,body:c}=i,u={method:o,url:a,status_code:s},l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};Nt({category:"xhr",data:u,type:"http",level:Dt(s)},l)}}(e)),t.fetch&&function(e){const t="fetch";dt(t,e),ft(t,(()=>Ot(void 0,undefined)))}(function(e){return function(t){if(Ge()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error)Nt({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r});else{const e=t.response,i={...t.fetchData,status_code:e&&e.status},o={input:t.args,response:e,startTimestamp:n,endTimestamp:r};Nt({category:"fetch",data:i,type:"http",level:Dt(i.status_code)},o)}}}(e)),t.history&&Et(function(e){return function(t){if(Ge()!==e)return;let n=t.from,r=t.to;const i=jt(mn.location.href);let o=n?jt(n):void 0;const a=jt(r);o&&o.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),Nt({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){Ge()===e&&Nt({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:ye(t)},{event:t})}}(e))}}},wn=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],kn=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&se(mn,"setTimeout",En),t.setInterval&&se(mn,"setInterval",En),t.requestAnimationFrame&&se(mn,"requestAnimationFrame",Tn),t.XMLHttpRequest&&"XMLHttpRequest"in mn&&se(XMLHttpRequest.prototype,"send",Mn);const e=t.eventTarget;e&&(Array.isArray(e)?e:wn).forEach(An)}}};function En(e){return function(...t){const n=t[0];return t[0]=bn(n,{mechanism:{data:{function:rt(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Tn(e){return function(t){return e.apply(this,[bn(t,{mechanism:{data:{function:"requestAnimationFrame",handler:rt(e)},handled:!1,type:"instrument"}})])}}function Mn(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&se(n,e,(function(t){const n={mechanism:{data:{function:e,handler:rt(t)},handled:!1,type:"instrument"}},r=le(t);return r&&(n.mechanism.data.handler=rt(r)),bn(t,n)}))})),e.apply(this,t)}}function An(e){const t=mn[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(se(n,"addEventListener",(function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=bn(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:rt(r),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,bn(r,{mechanism:{data:{function:"addEventListener",handler:rt(r),target:e},handled:!1,type:"instrument"}}),i])}})),se(n,"removeEventListener",(function(e){return function(t,n,r){try{const i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch(e){}return e.call(this,t,n,r)}})))}let Cn=null;function On(){Cn=N.onerror,N.onerror=function(e,t,n,r,i){return pt("error",{column:r,error:i,line:n,msg:e,url:t}),!!Cn&&Cn.apply(this,arguments)},N.onerror.__SENTRY_INSTRUMENTED__=!0}let Pn=null;function In(){Pn=N.onunhandledrejection,N.onunhandledrejection=function(e){return pt("unhandledrejection",e),!Pn||Pn.apply(this,arguments)},N.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ln(e,t){const n=Dn(e,t),r={type:xn(t),value:Fn(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Nn(e,t){return{exception:{values:[Ln(e,t)]}}}function Dn(e,t){const n=t.stacktrace||t.stack||"",r=function(e){return e&&jn.test(e.message)?1:0}(t),i=function(e){return"number"==typeof e.framesToPop?e.framesToPop:0}(t);try{return e(n,r,i)}catch(e){}return[]}const jn=/Minified React error #\d+;/i;function Rn(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function xn(e){const t=e&&e.name;return!t&&Rn(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function Fn(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:Rn(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function Vn(e,t,n,r,i){let o;if(q(t)&&t.error)return Nn(e,t.error);if(W(t)||$(t,"DOMException")){const i=t;if("stack"in t)o=Nn(e,t);else{const t=i.name||(W(i)?"DOMError":"DOMException"),a=i.message?`${t}: ${i.message}`:t;o=Un(e,a,n,r),_e(o,a)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return Y(t)?Nn(e,t):K(t)||Q(t)?(o=function(e,t,n,r){const i=Ge(),o=i&&i.getOptions().normalizeDepth,a=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}(t),s={__serialized__:Gt(t,o)};if(a)return{exception:{values:[Ln(e,a)]},extra:s};const c={exception:{values:[{type:Q(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Bn(t,{isUnhandledRejection:r})}]},extra:s};if(n){const t=Dn(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}(e,t,n,i),be(o,{synthetic:!0}),o):(o=Un(e,t,n,r),_e(o,`${t}`,void 0),be(o,{synthetic:!0}),o)}function Un(e,t,n,r){const i={};if(r&&n){const r=Dn(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),be(i,{synthetic:!0})}if(z(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function Bn(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(de(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return ie(r,t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:ie(r,t)}return""}(e),r=t?"promise rejection":"exception";return q(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Q(e)?`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}const Jn=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(function(e){!function(){const t="error";dt(t,(t=>{const{stackParser:n,attachStacktrace:r}=$n();if(Ge()!==e||_n())return;const{msg:i,url:o,line:a,column:s,error:c}=t,u=function(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},s=a.stacktrace=a.stacktrace||{},c=s.frames=s.frames||[],u=r,l=n,d=G(t)&&t.length>0?t:function(){try{return te.document.location.href}catch(e){return""}}();return 0===c.length&&c.push({colno:u,filename:d,function:Xe,in_app:!0,lineno:l}),e}(Vn(n,c||i,void 0,r,!1),o,a,s);u.level="error",fn(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})),ft(t,On)}()}(e),Yn("onerror")),t.onunhandledrejection&&(function(e){!function(){const t="unhandledrejection";dt(t,(t=>{const{stackParser:n,attachStacktrace:r}=$n();if(Ge()!==e||_n())return;const i=function(e){if(H(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}(t),o=H(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:Vn(n,i,void 0,r,!0);o.level="error",fn(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})),ft(t,In)}()}(e),Yn("onunhandledrejection"))}}};function Yn(e){Rt&&F.log(`Global Handler attached: ${e}`)}function $n(){const e=Ge();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function qn(e,t,n=250,r,i,o,a){if(!(o.exception&&o.exception.values&&a&&Z(a.originalException,Error)))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var c,u;s&&(o.exception.values=(c=Wn(e,t,i,a.originalException,r,o.exception.values,s,0),u=n,c.map((e=>(e.value&&(e.value=ie(e.value,u)),e)))))}function Wn(e,t,n,r,i,o,a,s){if(o.length>=n+1)return o;let c=[...o];if(Z(r[i],Error)){Gn(a,s);const o=e(t,r[i]),u=c.length;zn(o,i,u,s),c=Wn(e,t,n,r[i],i,[o,...c],o,u)}return Array.isArray(r.errors)&&r.errors.forEach(((r,o)=>{if(Z(r,Error)){Gn(a,s);const u=e(t,r),l=c.length;zn(u,`errors[${o}]`,l,s),c=Wn(e,t,n,r,i,[u,...c],u,l)}})),c}function Gn(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function zn(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const Hn=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,i){const o=i.getOptions();qn(Ln,o.stackParser,o.maxValueLength,n,t,e,r)}}};function Kn(e){const t=[ke(),Qe(),kn(),Sn(),Jn(),Hn(),ot(),{name:"HttpContext",preprocessEvent(e){if(!mn.navigator&&!mn.location&&!mn.document)return;const t=e.request&&e.request.url||mn.location&&mn.location.href,{referrer:n}=mn.document||{},{userAgent:r}=mn.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:i};e.request=o}}];return!1!==e.autoSessionTracking&&t.push({name:"BrowserSession",setupOnce(){void 0!==mn.document?(pn({ignoreDuration:!0}),gn(),Et((({from:e,to:t})=>{void 0!==e&&e!==t&&(pn({ignoreDuration:!0}),gn())}))):Rt&&F.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),t}const Qn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Xn(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r?`${r}/`:r}${a}`}function Zn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function er(e,t=[]){return[e,t]}function tr(e,t){const[n,r]=e;return[n,[...r,t]]}function nr(e,t){const n=e[1];for(const e of n)if(t(e,e[0].type))return!0;return!1}function rr(e){return N.__SENTRY__&&N.__SENTRY__.encodePolyfill?N.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function ir(e){const[t,n]=e;let r=JSON.stringify(t);function i(e){"string"==typeof r?r="string"==typeof e?r+e:[rr(r),e]:r.push("string"==typeof e?rr(e):e)}for(const e of n){const[t,n]=e;if(i(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(Wt(n))}i(e)}}return"string"==typeof r?r:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(r)}function or(e){const t="string"==typeof e.data?rr(e.data):e.data;return[he({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const ar={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function sr(e){return ar[e]}function cr(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}class ur extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}const lr="Not capturing exception because it's already been captured.";class dr{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=function(e){const t="string"==typeof e?function(e){const t=Qn.exec(e);if(!t)return void x((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));const[n,r,i="",o="",a="",s=""]=t.slice(1);let c="",u=s;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const e=u.match(/^\d+/);e&&(u=e[0])}return Zn({host:o,pass:i,path:c,projectId:u,port:a,protocol:n,publicKey:r})}(e):Zn(e);if(t&&function(e){if(!I)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(F.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(F.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(F.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(F.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}(e.dsn):P&&F.warn("No DSN provided, client will not send events."),this._dsn){const i=(t=this._dsn,n=e.tunnel,r=e._metadata?e._metadata.sdk:void 0,n||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(t)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(t,r)}`);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:i})}var t,n,r;const i=["enableTracing","tracesSampleRate","tracesSampler"].find((t=>t in e&&null==e[t]));i&&x((()=>{console.warn(`[Sentry] Deprecation warning: \`${i}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(e,t,n){const r=ge();if(Se(e))return P&&F.log(lr),r;const i={event_id:r,...t};return this._process(this.eventFromException(e,i).then((e=>this._captureEvent(e,i,n)))),i.event_id}captureMessage(e,t,n,r){const i={event_id:ge(),...n},o=z(e)?e:String(e),a=H(e)?this.eventFromMessage(o,t,i):this.eventFromException(e,i);return this._process(a.then((e=>this._captureEvent(e,i,r)))),i.event_id}captureEvent(e,t,n){const r=ge();if(t&&t.originalException&&Se(t.originalException))return P&&F.log(lr),r;const i={event_id:r,...t},o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,o||n)),i.event_id}captureSession(e){"string"!=typeof e.release?P&&F.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Pe(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):Vt(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];B(this,e,this._integrations),t||U(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){const i=cr(n),o=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const a=function(e,t,n,r){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Xn(r)},...i&&{trace:he({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,er(a,[[{type:o},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=tr(n,or(e));const r=this.sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=function(e,t,n,r){const i=cr(n);return er({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Xn(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const r="number"==typeof n?n:1,i=`${e}:${t}`;P&&F.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(P&&F.error("Error while sending envelope:",e),e))):(P&&F.error("Transport disabled"),Vt({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach((t=>{t&&B(e,t,n)})),n}(this,e),U(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const i=t.exception&&t.exception.values;if(i){r=!0;for(const e of i){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(Pe(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Bt((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n=qe(),r=We()){const i=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),ln(i,e,t,n,this,r).then((e=>{if(null===e)return e;e.contexts={trace:ze(n),...e.contexts};const t=function(e,t){const n=t.getPropagationContext();return n.dsc||an(n.traceId,e)}(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:t,...e.sdkProcessingMetadata},e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{P&&(e instanceof ur&&"log"===e.logLevel?F.log(e.message):F.warn(e))}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:i}=r,o=pr(e),a=fr(e),s=e.type||"error",c=`before send for type \`${s}\``,u=void 0===i?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;P&&F.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}(i);if(a&&"number"==typeof u&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error",e),Ut(new ur(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l="replay_event"===s?"replay":s,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,e),new ur("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const i=function(e,t,n,r){const{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:a}=t;if(fr(n)&&i)return i(n,r);if(pr(n)){if(n.spans&&a){const t=[];for(const r of n.spans){const n=a(r);n?t.push(n):(Xt||(x((()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")})),Xt=!0),e.recordDroppedEvent("before_send","span"))}n.spans=t}if(o){if(n.spans){const e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return o(n,r)}}return n}(this,r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(X(e))return e.then((e=>{if(!K(e)&&null!==e)throw new ur(n);return e}),(e=>{throw new ur(`${t} rejected with ${e}`)}));if(!K(e)&&null!==e)throw new ur(n);return e}(i,c)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",l,e),o){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new ur(`${c} returned \`null\`, will not send event.`,"log")}const i=n&&n.getSession();if(!o&&i&&this._updateSessionFromEvent(i,r),o){const e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const a=r.transaction_info;if(o&&a&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...a,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof ur)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new ur(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}}))}_flushOutcomes(){P&&F.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(P&&F.log("No outcomes to send"));if(!this._dsn)return void(P&&F.log("No dsn provided, will not send outcomes"));P&&F.log("Sending outcomes:",e);const t=(n=e,er((r=this._options.tunnel&&Xn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:Ae(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}}function fr(e){return void 0===e.type}function pr(e){return"transaction"===e.type}class hr extends dr{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};!function(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:L}))),version:L}),e._metadata=i}(t,"browser",["browser"],mn.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&mn.document&&mn.document.addEventListener("visibilitychange",(()=>{"hidden"===mn.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const i=Vn(e,t,n&&n.syntheticException||void 0,r);return be(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Vt(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const o=Un(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Vt(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Rt&&F.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Xn(r)}},o=function(e){return[{type:"user_report"},e]}(e);return er(i,[o])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}}const vr="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,gr={};function mr(e){gr[e]=void 0}function yr(e,t,n=function(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return Ut(new ur("Not adding Promise because buffer limit was reached."));const i=r();return-1===t.indexOf(i)&&t.push(i),i.then((()=>n(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(e){return new Bt(((n,r)=>{let i=t.length;if(!i)return n(!0);const o=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{Vt(e).then((()=>{--i||(clearTimeout(o),n(!0))}),r)}))}))}}}(e.bufferSize||64)){let r={};return{send:function(i){const o=[];if(nr(i,((t,n)=>{const i=sr(n);if(function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)){const r=_r(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r)}else o.push(t)})),0===o.length)return Vt({});const a=er(i[0],o),s=t=>{nr(a,((n,r)=>{const i=_r(n,r);e.recordDroppedEvent(t,sr(r),i)}))};return n.add((()=>t({body:ir(a)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&P&&F.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=function(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),a=parseInt(t,10),s=1e3*(isNaN(a)?60:a);if(n)for(const e of n.split(";"))"metric_bucket"===e&&o&&!o.split(";").includes("custom")||(i[e]=r+s);else i.all=r+s}else a?i.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(a,r):429===t&&(i.all=r+6e4);return i}(r,e),e)),(e=>{throw s("network_error"),e})))).then((e=>e),(e=>{if(e instanceof ur)return P&&F.error("Skipped sending event because buffer is full."),s("queue_overflow"),Vt({});throw e}))},flush:e=>n.drain(e)}}function _r(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function br(e,t=function(e){const t=gr[e];if(t)return t;let n=ht[e];if(Ct(n))return gr[e]=n.bind(ht);const r=ht.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const i=t.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){vr&&F.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?gr[e]=n.bind(ht):n}("fetch")){let n=0,r=0;return yr(e,(function(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return mr("fetch"),Ut("No fetch implementation available");try{return t(e.url,a).then((e=>(n-=o,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return mr("fetch"),n-=o,r--,Ut(e)}}))}function Sr(e,t,n,r){const i={filename:e,function:"<anonymous>"===t?Xe:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const wr=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,kr=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Er=/\((\S*)(?::(\d+))(?::(\d+))\)/,Tr=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Mr=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ar=function(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0,r=0)=>{const i=[],o=e.split("\n");for(let e=n;e<o.length;e++){const n=o[e];if(n.length>1024)continue;const a=Ze.test(n)?n.replace(Ze,"$1"):n;if(!a.match(/\S*Error: /)){for(const e of t){const t=e(a);if(t){i.push(t);break}}if(i.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(tt(t).function||"")&&t.pop(),t.reverse(),et.test(tt(t).function||"")&&(t.pop(),et.test(tt(t).function||"")&&t.pop()),t.slice(0,50).map((e=>({...e,filename:e.filename||tt(t).filename,function:e.function||Xe})))}(i.slice(r))}}([30,e=>{const t=wr.exec(e);if(t){const[,e,n,r]=t;return Sr(e,Xe,+n,+r)}const n=kr.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=Er.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=Cr(n[1]||Xe,n[2]);return Sr(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=Tr.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Mr.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||Xe;return[n,e]=Cr(n,e),Sr(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Cr=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Xe,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var Or="new",Pr="loading",Ir="loaded",Lr="joining-meeting",Nr="joined-meeting",Dr="left-meeting",jr="error",Rr="blocked",xr="off",Fr="sendable",Vr="loading",Ur="interrupted",Br="playable",Jr="unknown",Yr="full",$r="lobby",qr="none",Wr="base",Gr="*",zr="ejected",Hr="nbf-room",Kr="nbf-token",Qr="exp-room",Xr="exp-token",Zr="no-room",ei="meeting-full",ti="end-of-life",ni="not-allowed",ri="connection-error",ii="cam-in-use",oi="mic-in-use",ai="cam-mic-in-use",si="permissions",ci="undefined-mediadevices",ui="not-found",li="constraints",di="unknown",fi="iframe-ready-for-launch-config",pi="iframe-launch-config",hi="theme-updated",vi="loading",gi="load-attempt-failed",mi="loaded",yi="started-camera",_i="camera-error",bi="joining-meeting",Si="joined-meeting",wi="left-meeting",ki="participant-joined",Ei="participant-updated",Ti="participant-left",Mi="participant-counts-updated",Ai="access-state-updated",Ci="meeting-session-summary-updated",Oi="meeting-session-state-updated",Pi="meeting-session-data-error",Ii="waiting-participant-added",Li="waiting-participant-updated",Ni="waiting-participant-removed",Di="track-started",ji="track-stopped",Ri="transcription-started",xi="transcription-stopped",Fi="transcription-error",Vi="recording-started",Ui="recording-stopped",Bi="recording-stats",Ji="recording-error",Yi="recording-upload-completed",$i="recording-data",qi="app-message",Wi="transcription-message",Gi="remote-media-player-started",zi="remote-media-player-updated",Hi="remote-media-player-stopped",Ki="local-screen-share-started",Qi="local-screen-share-stopped",Xi="local-screen-share-canceled",Zi="active-speaker-change",eo="active-speaker-mode-change",to="network-quality-change",no="network-connection",ro="cpu-load-change",io="face-counts-updated",oo="fullscreen",ao="exited-fullscreen",so="live-streaming-started",co="live-streaming-updated",uo="live-streaming-stopped",lo="live-streaming-error",fo="lang-updated",po="receive-settings-updated",ho="input-settings-updated",vo="nonfatal-error",go="error",mo=4096,yo=102400,_o="iframe-call-message",bo="local-screen-start",So="daily-method-update-live-streaming-endpoints",wo="transmit-log",ko="daily-custom-track",Eo={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},To={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},Mo={PLAY:"play",PAUSE:"pause"},Ao=["jpg","png","jpeg"],Co="sip-call-transfer";function Oo(){return!Po()&&"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function Po(){return"undefined"!=typeof navigator&&navigator.product&&"ReactNative"===navigator.product}function Io(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function Lo(){if(Po())return!1;if(!document)return!1;var e=document.createElement("iframe");return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var No="none",Do=function(){try{var e,t=document.createElement("canvas"),n=!1;(e=t.getContext("webgl2",{failIfMajorPerformanceCaveat:!0}))||(n=!0,e=t.getContext("webgl2"));var r=null!=e;return t.remove(),r?n?"software":"hardware":No}catch(e){return No}}();function jo(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!Po()&&!(Do===No)&&(e?!Vo()&&["Chrome","Firefox"].includes(Uo()):function(){if(Vo())return!1;var e=Uo();if("Safari"===e){var t=qo();if(t.major<15||15===t.major&&t.minor<4)return!1}return"Chrome"===e?Jo().major>=77:"Firefox"===e?Wo().major>=97:["Chrome","Firefox","Safari"].includes(e)}())}function Ro(){if(Po())return!1;if(Fo())return!1;if("undefined"==typeof AudioWorkletNode)return!1;switch(Uo()){case"Chrome":case"Firefox":return!0;case"Safari":var e=Bo();return e.major>17||17===e.major&&e.minor>=4}return!1}function xo(){return Io()&&!function(){var e,t=Uo();if(!Oo())return!0;switch(t){case"Chrome":return(e=Jo()).major&&e.major>0&&e.major<75;case"Firefox":return(e=Wo()).major<91;case"Safari":return(e=qo()).major<13||13===e.major&&e.minor<1;default:return!0}}()}function Fo(){return Oo().match(/Linux; Android/)}function Vo(){var e,t=Oo(),n=t.match(/Mac/)&&(!Po()&&"undefined"!=typeof window&&null!==(e=window)&&void 0!==e&&null!==(e=e.navigator)&&void 0!==e&&e.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(t.match(/Mobi/)||t.match(/Android/)||n)||!!Oo().match(/DailyAnd\//)||void 0}function Uo(){if("undefined"!=typeof window){var e=Oo();return Yo()?"Safari":e.indexOf("Edge")>-1?"Edge":e.match(/Chrome\//)?"Chrome":e.indexOf("Safari")>-1||$o()?"Safari":e.indexOf("Firefox")>-1?"Firefox":e.indexOf("MSIE")>-1||e.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function Bo(){switch(Uo()){case"Chrome":return Jo();case"Safari":return qo();case"Firefox":return Wo();case"Edge":return function(){var e=0,t=0;if("undefined"!=typeof window){var n=Oo().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}()}}function Jo(){var e=0,t=0,n=0,r=0,i=!1;if("undefined"!=typeof window){var o=Oo(),a=o.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(a)try{e=parseInt(a[1]),t=parseInt(a[2]),n=parseInt(a[3]),r=parseInt(a[4]),i=o.indexOf("OPR/")>-1}catch(e){}}return{major:e,minor:t,build:n,patch:r,opera:i}}function Yo(){return!!Oo().match(/iPad|iPhone|iPod/i)&&Io()}function $o(){return Oo().indexOf("AppleWebKit/605.1.15")>-1}function qo(){var e=0,t=0,n=0;if("undefined"!=typeof window){var r=Oo().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch(e){}else(Yo()||$o())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Wo(){var e=0,t=0;if("undefined"!=typeof window){var n=Oo().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}var Go=function(){return c((function e(){i(this,e)}),[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){M()}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){M()}},{key:"sendMessageToCallMachine",value:function(e,t,n,r){M()}},{key:"sendMessageToDailyJs",value:function(e,t){M()}},{key:"removeListener",value:function(e){M()}}])}();function zo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ho(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zo(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ko(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ko=function(){return!!e})()}var Qo=function(e){function t(){var e,n,r,o;return i(this,t),n=this,r=l(r=t),(e=u(n,Ko()?Reflect.construct(r,[],l(n).constructor):r.apply(n,o)))._wrappedListeners={},e._messageCallbacks={},e}return f(t,e),c(t,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){var r=this,i=function(i){if(i.data&&"iframe-call-message"===i.data.what&&(!i.data.callClientId||i.data.callClientId===t)&&(!i.data.from||"module"!==i.data.from)){var o=Ho({},i.data);if(delete o.from,o.callbackStamp&&r._messageCallbacks[o.callbackStamp]){var a=o.callbackStamp;r._messageCallbacks[a].call(n,o),delete r._messageCallbacks[a]}delete o.what,delete o.callbackStamp,e.call(n,o)}};this._wrappedListeners[e]=i,window.addEventListener("message",i)}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){var r=function(r){var i;if(!(!r.data||r.data.what!==_o||!r.data.action||r.data.from&&"module"!==r.data.from||r.data.callClientId&&t&&r.data.callClientId!==t||null!=r&&null!==(i=r.data)&&void 0!==i&&i.callFrameId)){var o=r.data;e.call(n,o)}};this._wrappedListeners[e]=r,window.addEventListener("message",r)}},{key:"sendMessageToCallMachine",value:function(e,t,n,r){if(!n)throw new Error("undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?");var i=Ho({},e);if(i.what=_o,i.from="module",i.callClientId=n,t){var o=T();this._messageCallbacks[o]=t,i.callbackStamp=o}var a=r?r.contentWindow:window,s=this._callMachineTargetOrigin(r);s&&a.postMessage(i,s)}},{key:"sendMessageToDailyJs",value:function(e,t){e.what=_o,e.callClientId=t,e.from="embedded",window.postMessage(e,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener("message",t),delete this._wrappedListeners[e])}},{key:"forwardPackagedMessageToCallMachine",value:function(e,t,n){var r=Ho({},e);r.callClientId=n;var i=t?t.contentWindow:window,o=this._callMachineTargetOrigin(t);o&&i.postMessage(r,o)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e,t){var n=function(n){if(n.data&&"iframe-call-message"===n.data.what&&(!n.data.callClientId||n.data.callClientId===t)&&(!n.data.from||"module"!==n.data.from)){var r=n.data;e(r)}};return this._wrappedListeners[e]=n,window.addEventListener("message",n),e}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener("message",t),delete this._wrappedListeners[e])}},{key:"_callMachineTargetOrigin",value:function(e){return e?e.src?new URL(e.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return"file:"===window.location.protocol?"*":window.location.origin}}])}(Go);function Xo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Zo=function(){return!!e})()}var ea=function(e){function t(){var e,n,r,o;return i(this,t),n=this,r=l(r=t),e=u(n,Zo()?Reflect.construct(r,[],l(n).constructor):r.apply(n,o)),window.callMachineToDailyJsEmitter=window.callMachineToDailyJsEmitter||new y.EventEmitter,window.dailyJsToCallMachineEmitter=window.dailyJsToCallMachineEmitter||new y.EventEmitter,e._wrappedListeners={},e._messageCallbacks={},e}return f(t,e),c(t,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){this._addListener(e,window.callMachineToDailyJsEmitter,t,n,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){this._addListener(e,window.dailyJsToCallMachineEmitter,t,n,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(e,t,n){this._sendMessage(e,window.dailyJsToCallMachineEmitter,n,t,"sending message to call machine")}},{key:"sendMessageToDailyJs",value:function(e,t){this._sendMessage(e,window.callMachineToDailyJsEmitter,t,null,"sending message to daily-js")}},{key:"removeListener",value:function(e){var t=this._wrappedListeners[e];t&&(window.callMachineToDailyJsEmitter.removeListener("message",t),window.dailyJsToCallMachineEmitter.removeListener("message",t),delete this._wrappedListeners[e])}},{key:"_addListener",value:function(e,t,n,r,i){var o=this,a=function(t){if(t.callClientId===n){if(t.callbackStamp&&o._messageCallbacks[t.callbackStamp]){var i=t.callbackStamp;o._messageCallbacks[i].call(r,t),delete o._messageCallbacks[i]}e.call(r,t)}};this._wrappedListeners[e]=a,t.addListener("message",a)}},{key:"_sendMessage",value:function(e,t,n,r,i){var o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xo(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);if(o.callClientId=n,r){var a=T();this._messageCallbacks[a]=r,o.callbackStamp=a}t.emit("message",o)}}])}(Go),ta="replace",na="shallow-merge",ra=[ta,na];var ia=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.data,r=t.mergeStrategy,o=void 0===r?ta:r;i(this,e),e._validateMergeStrategy(o),e._validateData(n,o),this.mergeStrategy=o,this.data=n}return c(e,[{key:"isNoOp",value:function(){return e.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(e,t){return 0===Object.keys(e).length&&t===na}},{key:"_validateMergeStrategy",value:function(e){if(!ra.includes(e))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(ra,"]"))}},{key:"_validateData",value:function(e,t){if(!function(e){if(null==e||"object"!==o(e))return!1;var t=Object.getPrototypeOf(e);return null==t||t===Object.prototype}(e))throw Error("Meeting session data must be a plain (map-like) object");var n;try{if(n=JSON.stringify(e),t===ta){var r=JSON.parse(n);w(r,e)||console.warn("The meeting session data provided will be modified when serialized.",r,e)}else if(t===na)for(var i in e)if(Object.hasOwnProperty.call(e,i)&&void 0!==e[i]){var a=JSON.parse(JSON.stringify(e[i]));w(e[i],a)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",a,e[i])}}catch(e){throw Error("Meeting session data must be serializable to JSON: ".concat(e))}if(n.length>yo)throw Error("Meeting session data is too large (".concat(n.length," characters). Maximum size suppported is ").concat(yo,"."))}}])}();function oa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(oa=function(){return!!e})()}function aa(e){var t="function"==typeof Map?new Map:void 0;return aa=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(oa())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&d(i,n.prototype),i}(e,arguments,l(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),d(n,e)},aa(e)}function sa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(sa=function(){return!!e})()}function ca(e){var t,n=null===(t=window._daily)||void 0===t?void 0:t.pendings;if(n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}var ua=function(){return c((function e(t){i(this,e),this._currentLoad=null,this._callClientId=t}),[{key:"load",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new la(n,(function(){r(!1)}),(function(e,n){n||ca(t._callClientId),i(e,n)})),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),ca(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])}(),la=function(){return c((function e(){var 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(this,e),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r}),[{key:"start",value:function(){var e=this;if(!this._currentAttempt){var t=function(n){e._currentAttempt.cancelled||(e._attemptsRemaining--,e._failureCallback(n,e._attemptsRemaining>0),e._attemptsRemaining<=0||setTimeout((function(){e._currentAttempt.cancelled||(e._currentAttempt=new pa(e._dailyConfig,e._successCallback,t),e._currentAttempt.start())}),3e3))};this._currentAttempt=new pa(this._dailyConfig,this._successCallback,t),this._currentAttempt.start()}}},{key:"cancel",value:function(){this._currentAttempt&&this._currentAttempt.cancel()}},{key:"cancelled",get:function(){return this._currentAttempt&&this._currentAttempt.cancelled}},{key:"succeeded",get:function(){return this._currentAttempt&&this._currentAttempt.succeeded}}])}(),da=function(e){function t(){return i(this,t),e=this,r=arguments,n=l(n=t),u(e,sa()?Reflect.construct(n,r||[],l(e).constructor):n.apply(e,r));var e,n,r}return f(t,e),c(t)}(aa(Error)),fa=2e4,pa=function(){return c((function e(t,n,r){i(this,e),this._loadAttemptImpl=Po()||!t.avoidEval?new ha(t,n,r):new va(t,n,r)}),[{key:"start",value:(e=v((function*(){return this._loadAttemptImpl.start()})),function(){return e.apply(this,arguments)})},{key:"cancel",value:function(){this._loadAttemptImpl.cancel()}},{key:"cancelled",get:function(){return this._loadAttemptImpl.cancelled}},{key:"succeeded",get:function(){return this._loadAttemptImpl.succeeded}}]);var e}(),ha=function(){return c((function e(t,n,r){i(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache="undefined"!=typeof iOSCallObjectBundleCache&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r}),[{key:"start",value:(r=v((function*(){var e=C(this._dailyConfig);!(yield this._tryLoadFromIOSCache(e))&&this._loadFromNetwork(e)})),function(){return r.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(n=v((function*(e){if(!this._iosCache)return!1;try{var t=yield this._iosCache.get(e);return!!this.cancelled||!!t&&(t.code?(Function('"use strict";'+t.code)(),this.succeeded=!0,this._successCallback(),!0):(this._refetchHeaders=t.refetchHeaders,!1))}catch(e){return!1}})),function(e){return n.apply(this,arguments)})},{key:"_loadFromNetwork",value:(t=v((function*(e){var t=this;this._networkTimeout=setTimeout((function(){t._networkTimedOut=!0,t._failureCallback({msg:"Timed out (>".concat(fa," ms) when loading call object bundle ").concat(e),type:"timeout"})}),fa);try{var n=this._refetchHeaders?{headers:this._refetchHeaders}:{},r=yield fetch(e,n);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new da;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new da;Function('"use strict";'+i)(),this._iosCache&&this._iosCache.set(e,i,r.headers),this.succeeded=!0,this._successCallback()}catch(t){if(clearTimeout(this._networkTimeout),t instanceof da||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(e,": ").concat(t),type:t.message})}})),function(e){return t.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(e=v((function*(e,t){if(t.ok)return yield t.text();if(this._iosCache&&304===t.status)return(yield this._iosCache.renew(e,t.headers)).code;throw new Error("Received ".concat(t.status," response"))})),function(t,n){return e.apply(this,arguments)})}]);var e,t,n,r}(),va=function(){return c((function e(t,n,r){i(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._attemptId=T(),this._networkTimeout=null,this._scriptElement=null}),[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=C(this._dailyConfig);"object"===("undefined"==typeof document?"undefined":o(document))?this._startLoading(e):this._failureCallback({msg:"Call object bundle must be loaded in a DOM/web context",type:"missing context"})}},{key:"cancel",value:function(){this._stopLoading(),this.cancelled=!0}},{key:"_startLoading",value:function(e){var t=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout((function(){t._stopLoading(),t._failureCallback({msg:"Timed out (>".concat(fa," ms) when loading call object bundle ").concat(e),type:"timeout"})}),fa);var n=document.getElementsByTagName("head")[0],r=document.createElement("script");this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback()},r.onerror=function(e){t._stopLoading(),t._failureCallback({msg:"Failed to load call object bundle ".concat(e.target.src),type:e.message})},r.src=e,n.appendChild(r)}},{key:"_stopLoading",value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:"_signUpForCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:"_withdrawFromCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}])}(),ga=function(e,t,n){return!0===_a(e.local,t,n)},ma=function(e,t,n){return e.local.streams&&e.local.streams[t]&&e.local.streams[t].stream&&e.local.streams[t].stream["get".concat("video"===n?"Video":"Audio","Tracks")]()[0]},ya=function(e,t,n,r){var i=ba(e,t,n,r);return i&&i.pendingTrack},_a=function(e,t,n){if(!e)return!1;var r=function(e){switch(e){case"avatar":return!0;case"staged":return e;default:return!!e}},i=e.public.subscribedTracks;return i&&i[t]?-1===["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo"].indexOf(n)&&i[t].custom?[!0,"staged"].includes(i[t].custom)?r(i[t].custom):r(i[t].custom[n]):r(i[t][n]):!i||r(i.ALL)},ba=function(e,t,n,r){var i=Object.values(e.streams||{}).filter((function(e){return e.participantId===t&&e.type===n&&e.pendingTrack&&e.pendingTrack.kind===r})).sort((function(e,t){return new Date(t.starttime)-new Date(e.starttime)}));return i&&i[0]},Sa=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function wa(e,t){for(var n=t.getState(),r=0,i=["cam","screen"];r<i.length;r++)for(var o=i[r],a=0,s=["video","audio"];a<s.length;a++){var c=s[a],u="cam"===o?c:"screen".concat(c.charAt(0).toUpperCase()+c.slice(1)),l=e.tracks[u];if(l){var d=e.local?ma(n,o,c):ya(n,e.session_id,o,c);"playable"===l.state&&(l.track=d),l.persistentTrack=d}}}function ka(e,t){try{var n=t.getState();for(var r in e.tracks)if(!Ea(r)){var i=e.tracks[r].kind;if(i){var o=e.tracks[r];if(o){var a=e.local?Sa(n,r):ya(n,e.session_id,r,i);"playable"===o.state&&(e.tracks[r].track=a),o.persistentTrack=a}}else console.error("unknown type for custom track")}}catch(e){console.error(e)}}function Ea(e){return["video","audio","screenVideo","screenAudio"].includes(e)}function Ta(e,t,n){var r=n.getState();if(e.local){if(e.audio)try{e.audioTrack=r.local.streams.cam.stream.getAudioTracks()[0],e.audioTrack||(e.audio=!1)}catch(e){}if(e.video)try{e.videoTrack=r.local.streams.cam.stream.getVideoTracks()[0],e.videoTrack||(e.video=!1)}catch(e){}if(e.screen)try{e.screenVideoTrack=r.local.streams.screen.stream.getVideoTracks()[0],e.screenAudioTrack=r.local.streams.screen.stream.getAudioTracks()[0],e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch(e){}}else{var i=!0;try{var o=r.participants[e.session_id];o&&o.public&&o.public.rtcType&&"peer-to-peer"===o.public.rtcType.impl&&o.private&&!["connected","completed"].includes(o.private.peeringState)&&(i=!1)}catch(e){console.error(e)}if(!i)return e.audio=!1,e.audioTrack=!1,e.video=!1,e.videoTrack=!1,e.screen=!1,void(e.screenTrack=!1);try{if(r.streams,e.audio&&ga(r,e.session_id,"cam-audio")){var a=ya(r,e.session_id,"cam","audio");a&&(t&&t.audioTrack&&t.audioTrack.id===a.id?e.audioTrack=a:a.muted||(e.audioTrack=a)),e.audioTrack||(e.audio=!1)}if(e.video&&ga(r,e.session_id,"cam-video")){var s=ya(r,e.session_id,"cam","video");s&&(t&&t.videoTrack&&t.videoTrack.id===s.id?e.videoTrack=s:s.muted||(e.videoTrack=s)),e.videoTrack||(e.video=!1)}if(e.screen&&ga(r,e.session_id,"screen-audio")){var c=ya(r,e.session_id,"screen","audio");c&&(t&&t.screenAudioTrack&&t.screenAudioTrack.id===c.id?e.screenAudioTrack=c:c.muted||(e.screenAudioTrack=c))}if(e.screen&&ga(r,e.session_id,"screen-video")){var u=ya(r,e.session_id,"screen","video");u&&(t&&t.screenVideoTrack&&t.screenVideoTrack.id===u.id?e.screenVideoTrack=u:u.muted||(e.screenVideoTrack=u))}e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch(e){console.error("unexpected error matching up tracks",e)}}}function Ma(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Aa=new Map,Ca=null;function Oa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Pa=new Map,Ia=null;function La(e){Na()?function(e){Aa.has(e)||(Aa.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(t){Aa.has(e)&&(Aa.get(e).lastDevicesString=JSON.stringify(t),Ca||(Ca=function(){var e=v((function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ma(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ma(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(Aa.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==Aa.get(r).lastDevicesString&&(Aa.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}}));return function(){return e.apply(this,arguments)}}(),navigator.mediaDevices.addEventListener("devicechange",Ca)))})).catch((function(){})))}(e):function(e){Pa.has(e)||(Pa.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(t){Pa.has(e)&&(Pa.get(e).lastDevicesString=JSON.stringify(t),Ia||(Ia=setInterval(v((function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Oa(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oa(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(Pa.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==Pa.get(r).lastDevicesString&&(Pa.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}})),3e3)))})))}(e)}function Na(){var e;return Po()||void 0!==(null===(e=navigator.mediaDevices)||void 0===e?void 0:e.ondevicechange)}var Da=new Set;function ja(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ra(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ja(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ja(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xa=Object.freeze({VIDEO:"video",AUDIO:"audio",SCREEN_VIDEO:"screenVideo",SCREEN_AUDIO:"screenAudio",CUSTOM_VIDEO:"customVideo",CUSTOM_AUDIO:"customAudio"}),Fa=Object.freeze({PARTICIPANTS:"participants",STREAMING:"streaming",TRANSCRIPTION:"transcription"}),Va=Object.values(xa),Ua=["v","a","sv","sa","cv","ca"],Ba=(Object.freeze(Va.reduce((function(e,t,n){return e[t]=Ua[n],e}),{})),Object.freeze(Ua.reduce((function(e,t,n){return e[t]=Va[n],e}),{})),[xa.VIDEO,xa.AUDIO,xa.SCREEN_VIDEO,xa.SCREEN_AUDIO]),Ja=Object.values(Fa),Ya=["p","s","t"],$a=(Object.freeze(Ja.reduce((function(e,t,n){return e[t]=Ya[n],e}),{})),Object.freeze(Ya.reduce((function(e,t,n){return e[t]=Ja[n],e}),{})),function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.base,r=t.byUserId,o=t.byParticipantId;i(this,e),this.base=n,this.byUserId=r,this.byParticipantId=o}return c(e,[{key:"clone",value:function(){var t=new e;if(this.base instanceof qa?t.base=this.base.clone():t.base=this.base,void 0!==this.byUserId)for(var n in t.byUserId={},this.byUserId){var r=this.byUserId[n];t.byUserId[n]=r instanceof qa?r.clone():r}if(void 0!==this.byParticipantId)for(var i in t.byParticipantId={},this.byParticipantId){var o=this.byParticipantId[i];t.byParticipantId[i]=o instanceof qa?o.clone():o}return t}},{key:"toJSONObject",value:function(){var e={};if("boolean"==typeof this.base?e.base=this.base:this.base instanceof qa&&(e.base=this.base.toJSONObject()),void 0!==this.byUserId)for(var t in e.byUserId={},this.byUserId){var n=this.byUserId[t];e.byUserId[t]=n instanceof qa?n.toJSONObject():n}if(void 0!==this.byParticipantId)for(var r in e.byParticipantId={},this.byParticipantId){var i=this.byParticipantId[r];e.byParticipantId[r]=i instanceof qa?i.toJSONObject():i}return e}},{key:"toMinifiedJSONObject",value:function(){var e={};if(void 0!==this.base&&("boolean"==typeof this.base?e.b=this.base:e.b=this.base.toMinifiedJSONObject()),void 0!==this.byUserId)for(var t in e.u={},this.byUserId){var n=this.byUserId[t];e.u[t]="boolean"==typeof n?n:n.toMinifiedJSONObject()}if(void 0!==this.byParticipantId)for(var r in e.p={},this.byParticipantId){var i=this.byParticipantId[r];e.p[r]="boolean"==typeof i?i:i.toMinifiedJSONObject()}return e}},{key:"normalize",value:function(){return this.base instanceof qa&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map((function(e){var t=m(e,2),n=t[0],r=t[1];return[n,r instanceof qa?r.normalize():r]})))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map((function(e){var t=m(e,2),n=t[0],r=t[1];return[n,r instanceof qa?r.normalize():r]})))),this}}],[{key:"fromJSONObject",value:function(t){var n,r,i;if(void 0!==t.base&&(n="boolean"==typeof t.base?t.base:qa.fromJSONObject(t.base)),void 0!==t.byUserId)for(var o in r={},t.byUserId){var a=t.byUserId[o];r[o]="boolean"==typeof a?a:qa.fromJSONObject(a)}if(void 0!==t.byParticipantId)for(var s in i={},t.byParticipantId){var c=t.byParticipantId[s];i[s]="boolean"==typeof c?c:qa.fromJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:"fromMinifiedJSONObject",value:function(t){var n,r,i;if(void 0!==t.b&&(n="boolean"==typeof t.b?t.b:qa.fromMinifiedJSONObject(t.b)),void 0!==t.u)for(var o in r={},t.u){var a=t.u[o];r[o]="boolean"==typeof a?a:qa.fromMinifiedJSONObject(a)}if(void 0!==t.p)for(var s in i={},t.p){var c=t.p[s];i[s]="boolean"==typeof c?c:qa.fromMinifiedJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:"validateJSONObject",value:function(e){if("object"!==o(e))return[!1,"canReceive must be an object"];for(var t=["base","byUserId","byParticipantId"],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!t.includes(i))return[!1,"canReceive can only contain keys (".concat(t.join(", "),")")];if("base"===i){var a=m(qa.validateJSONObject(e.base,!0),2),s=a[0],c=a[1];if(!s)return[!1,c]}else{if("object"!==o(e[i]))return[!1,"invalid (non-object) value for field '".concat(i,"' in canReceive")];for(var u=0,l=Object.values(e[i]);u<l.length;u++){var d=l[u],f=m(qa.validateJSONObject(d),2),p=f[0],h=f[1];if(!p)return[!1,h]}}}return[!0]}}])}()),qa=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.video,r=t.audio,o=t.screenVideo,a=t.screenAudio,s=t.customVideo,c=t.customAudio;i(this,e),this.video=n,this.audio=r,this.screenVideo=o,this.screenAudio=a,this.customVideo=s,this.customAudio=c}return c(e,[{key:"clone",value:function(){var t=new e;return void 0!==this.video&&(t.video=this.video),void 0!==this.audio&&(t.audio=this.audio),void 0!==this.screenVideo&&(t.screenVideo=this.screenVideo),void 0!==this.screenAudio&&(t.screenAudio=this.screenAudio),void 0!==this.customVideo&&(t.customVideo=Ra({},this.customVideo)),void 0!==this.customAudio&&(t.customAudio=Ra({},this.customAudio)),t}},{key:"toJSONObject",value:function(){var e={};return void 0!==this.video&&(e.video=this.video),void 0!==this.audio&&(e.audio=this.audio),void 0!==this.screenVideo&&(e.screenVideo=this.screenVideo),void 0!==this.screenAudio&&(e.screenAudio=this.screenAudio),void 0!==this.customVideo&&(e.customVideo=Ra({},this.customVideo)),void 0!==this.customAudio&&(e.customAudio=Ra({},this.customAudio)),e}},{key:"toMinifiedJSONObject",value:function(){var e={};return void 0!==this.video&&(e.v=this.video),void 0!==this.audio&&(e.a=this.audio),void 0!==this.screenVideo&&(e.sv=this.screenVideo),void 0!==this.screenAudio&&(e.sa=this.screenAudio),void 0!==this.customVideo&&(e.cv=Ra({},this.customVideo)),void 0!==this.customAudio&&(e.ca=Ra({},this.customAudio)),e}},{key:"normalize",value:function(){function e(e,t){return e&&1===Object.keys(e).length&&e["*"]===t}return!(!0!==this.video||!0!==this.audio||!0!==this.screenVideo||!0!==this.screenAudio||!e(this.customVideo,!0)||!e(this.customAudio,!0))||(!1!==this.video||!1!==this.audio||!1!==this.screenVideo||!1!==this.screenAudio||!e(this.customVideo,!1)||!e(this.customAudio,!1))&&this}}],[{key:"fromBoolean",value:function(t){return new e({video:t,audio:t,screenVideo:t,screenAudio:t,customVideo:{"*":t},customAudio:{"*":t}})}},{key:"fromJSONObject",value:function(t){return new e({video:t.video,audio:t.audio,screenVideo:t.screenVideo,screenAudio:t.screenAudio,customVideo:void 0!==t.customVideo?Ra({},t.customVideo):void 0,customAudio:void 0!==t.customAudio?Ra({},t.customAudio):void 0})}},{key:"fromMinifiedJSONObject",value:function(t){return new e({video:t.v,audio:t.a,screenVideo:t.sv,screenAudio:t.sa,customVideo:t.cv,customAudio:t.ca})}},{key:"validateJSONObject",value:function(e,t){if("boolean"==typeof e)return[!0];if("object"!==o(e))return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var n=Object.keys(e),r=0,i=n;r<i.length;r++){var a=i[r];if(!Va.includes(a))return[!1,"invalid media type '".concat(a,"' in canReceive")];if(Ba.includes(a)){if("boolean"!=typeof e[a])return[!1,"invalid (non-boolean) value for media type '".concat(a,"' in canReceive")]}else{if("object"!==o(e[a]))return[!1,"invalid (non-object) value for media type '".concat(a,"' in canReceive")];for(var s=0,c=Object.values(e[a]);s<c.length;s++)if("boolean"!=typeof c[s])return[!1,"invalid (non-boolean) value for entry within '".concat(a,"' in canReceive")];if(t&&void 0===e[a]["*"])return[!1,'canReceive "base" permission must specify "*" as an entry within \''.concat(a,"'")]}}return t&&n.length!==Va.length?[!1,'canReceive "base" permission must specify all media types: '.concat(Va.join(", ")," (or be set to a boolean shorthand)")]:[!0]}}])}(),Wa=["result"],Ga=["preserveIframe"];function za(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ha(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?za(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):za(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ka(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ka=function(){return!!e})()}function Qa(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Xa(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xa(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Xa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Za={},es="video",ts="voice",ns=Po()?{data:{}}:{data:{},topology:"none"},rs={present:0,hidden:0},is={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},os=Object.keys(is),as=["state","volume","simulcastEncodings"],ss={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},cs={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string",visualState:"'default' | 'sidebar-open' | 'active'"}},us={id:{allow:"string",controlledBy:"'*' | 'owners' | string[]",csp:"string",iconURL:"string",label:"string",loading:"'eager' | 'lazy'",location:"'main' | 'sidebar'",name:"string",referrerPolicy:"string",sandbox:"string",src:"string",srcdoc:"string",shared:"string[] | 'owners' | boolean"}},ls={customIntegrations:{validate:Ds,help:Ls()},customTrayButtons:{validate:Ns,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(cs))},url:{validate:function(e){return"string"==typeof e},help:"url should be a string"},baseUrl:{validate:function(e){return"string"==typeof e},help:"baseUrl should be a string"},token:{validate:function(e){return"string"==typeof e},help:"token should be a string",queryString:"t"},dailyConfig:{validate:function(e,t){try{return t.validateDailyConfig(e),!0}catch(e){console.error("Failed to validate dailyConfig",e)}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(e){return js(e,ss)},help:"reactNativeConfig should look like ".concat(JSON.stringify(ss),", all fields optional")},lang:{validate:function(e){return["da","de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sv","tr","user"].includes(e)},help:"language not supported. Options are: da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sv, tr, user"},userName:!0,userData:{validate:function(e){try{return ks(e),!0}catch(e){return console.error(e),!1}},help:"invalid userData type provided"},startVideoOff:!0,startAudioOff:!0,allowLocalVideo:!0,allowLocalAudio:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(e,t){if("boolean"==typeof e)return t._preloadCache.allowLocalVideo=e,!0;var n;if(e instanceof MediaStreamTrack)t._sharedTracks.videoTrack=e,n={customTrack:ko};else{if(delete t._sharedTracks.videoTrack,"string"!=typeof e)return console.error("videoSource must be a MediaStreamTrack, boolean, or a string"),!1;n={deviceId:e}}return t._updatePreloadCacheInputSettings({video:{settings:n}},!1),!0}},audioSource:{validate:function(e,t){if("boolean"==typeof e)return t._preloadCache.allowLocalAudio=e,!0;var n;if(e instanceof MediaStreamTrack)t._sharedTracks.audioTrack=e,n={customTrack:ko};else{if(delete t._sharedTracks.audioTrack,"string"!=typeof e)return console.error("audioSource must be a MediaStreamTrack, boolean, or a string"),!1;n={deviceId:e}}return t._updatePreloadCacheInputSettings({audio:{settings:n}},!1),!0}},subscribeToTracksAutomatically:{validate:function(e,t){return t._preloadCache.subscribeToTracksAutomatically=e,!0}},theme:{validate:function(e){var t=["accent","accentText","background","backgroundAccent","baseText","border","mainAreaBg","mainAreaBgAccent","mainAreaText","supportiveText"],n=function(e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!t.includes(i))return console.error('unsupported color "'.concat(i,'". Valid colors: ').concat(t.join(", "))),!1;if(!e[i].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error("".concat(i,' theme color should be provided in valid hex color format. Received: "').concat(e[i],'"')),!1}return!0};return"object"===o(e)&&("light"in e&&"dark"in e||"colors"in e)?"light"in e&&"dark"in e?"colors"in e.light?"colors"in e.dark?n(e.light.colors)&&n(e.dark.colors):(console.error('Dark theme is missing "colors" property.',e),!1):(console.error('Light theme is missing "colors" property.',e),!1):n(e.colors):(console.error('Theme must contain either both "light" and "dark" properties, or "colors".',e),!1)},help:"unsupported theme configuration. Check error logs for detailed info."},layoutConfig:{validate:function(e){if("grid"in e){var t=e.grid;if("maxTilesPerPage"in t){if(!Number.isInteger(t.maxTilesPerPage))return console.error("grid.maxTilesPerPage should be an integer. You passed ".concat(t.maxTilesPerPage,".")),!1;if(t.maxTilesPerPage>49)return console.error("grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case."),!1}if("minTilesPerPage"in t){if(!Number.isInteger(t.minTilesPerPage))return console.error("grid.minTilesPerPage should be an integer. You passed ".concat(t.minTilesPerPage,".")),!1;if(t.minTilesPerPage<1)return console.error("grid.minTilesPerPage can't be lower than 1."),!1;if("maxTilesPerPage"in t&&t.minTilesPerPage>t.maxTilesPerPage)return console.error("grid.minTilesPerPage can't be higher than grid.maxTilesPerPage."),!1}}return!0},help:"unsupported layoutConfig. Check error logs for detailed info."},receiveSettings:{validate:function(e){return Es(e,{allowAllParticipantsKey:!1})},help:Is({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!function(e,t){try{return t.validateUpdateSendSettings(e),!0}catch(e){return console.error("Failed to validate send settings",e),!1}}(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(e,t){var n;return!!Ts(e)&&(t._inputSettings||(t._inputSettings={}),Ms(e,null===(n=t.properties)||void 0===n?void 0:n.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:Ps()},layout:{validate:function(e){return"custom-v1"===e||"browser"===e||"none"===e},help:'layout may only be set to "custom-v1"',queryString:"layout"},emb:{queryString:"emb"},embHref:{queryString:"embHref"},dailyJsVersion:{queryString:"dailyJsVersion"},proxy:{queryString:"proxy"},strictMode:!0,allowMultipleCallInstances:!0},ds={styles:{validate:function(e){for(var t in e)if("cam"!==t&&"screen"!==t)return!1;if(e.cam)for(var n in e.cam)if("div"!==n&&"video"!==n)return!1;if(e.screen)for(var r in e.screen)if("div"!==r&&"video"!==r)return!1;return!0},help:"styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }"},setSubscribedTracks:{validate:function(e,t){if(t._preloadCache.subscribeToTracksAutomatically)return!1;var n=[!0,!1,"staged"];if(n.includes(e)||!Po()&&"avatar"===e)return!0;var r=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"],i=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var o in e)if("custom"===o){if(!n.includes(e[o])&&!i(e[o],!0))return!1}else{var a=!t&&!r.includes(o),s=!n.includes(e[o]);if(a||s)return!1}return!0};return i(e)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(Po()?"":" | 'avatar'"," | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }")},setAudio:!0,setVideo:!0,setScreenShare:{validate:function(e){return!1===e},help:"setScreenShare must be false, as it's only meant for stopping remote participants' screen shares"},eject:!0,updatePermissions:{validate:function(e){for(var t=0,n=Object.entries(e);t<n.length;t++){var r=m(n[t],2),i=r[0],o=r[1];switch(i){case"hasPresence":if("boolean"!=typeof o)return!1;break;case"canSend":if(o instanceof Set||o instanceof Array||Array.isArray(o)){var a,s=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],c=Qa(o);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(!s.includes(u))return!1}}catch(e){c.e(e)}finally{c.f()}}else if("boolean"!=typeof o)return!1;(o instanceof Array||Array.isArray(o))&&(e.canSend=new Set(o));break;case"canReceive":var l=m($a.validateJSONObject(o),2),d=l[0],f=l[1];if(!d)return console.error(f),!1;break;case"canAdmin":if(o instanceof Set||o instanceof Array||Array.isArray(o)){var p,h=["participants","streaming","transcription"],v=Qa(o);try{for(v.s();!(p=v.n()).done;){var g=p.value;if(!h.includes(g))return!1}}catch(e){v.e(e)}finally{v.f()}}else if("boolean"!=typeof o)return!1;(o instanceof Array||Array.isArray(o))&&(e.canAdmin=new Set(o));break;default:return!1}}return!0},help:"updatePermissions can take hasPresence, canSend, canReceive, and canAdmin permissions. hasPresence must be a boolean. canSend can be a boolean or an Array or Set of media types (video, audio, screenVideo, screenAudio, customVideo, customAudio). canReceive must be an object specifying base, byUserId, and/or byParticipantId fields (see documentation for more details). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription)."}};Promise.any||(Promise.any=function(){var e=v((function*(e){return new Promise((function(t,n){var r=[];e.forEach((function(i){return Promise.resolve(i).then((function(e){t(e)})).catch((function(t){r.push(t),r.length===e.length&&n(r)}))}))}))}));return function(t){return e.apply(this,arguments)}}());var fs=function(e){function t(e){var n,r,o,a,s,c,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i(this,t),o=this,a=l(a=t),p(r=u(o,Ka()?Reflect.construct(a,[],l(o).constructor):a.apply(o,s)),"startListeningForDeviceChanges",(function(){La(r.handleDeviceChange)})),p(r,"stopListeningForDeviceChanges",(function(){var e;e=r.handleDeviceChange,Na()?function(e){Aa.has(e)&&(Aa.delete(e),0===Aa.size&&Ca&&(navigator.mediaDevices.removeEventListener("devicechange",Ca),Ca=null))}(e):function(e){Pa.has(e)&&(Pa.delete(e),0===Pa.size&&Ia&&(clearInterval(Ia),Ia=null))}(e)})),p(r,"handleDeviceChange",(function(e){e=e.map((function(e){return JSON.parse(JSON.stringify(e))})),r.emitDailyJSEvent({action:"available-devices-updated",availableDevices:e})})),p(r,"handleNativeAppStateChange",function(){var e=v((function*(e){if("destroyed"===e)return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield r.destroy());var t="active"===e;r.disableReactNativeAutoDeviceManagement("video")||(t?r.camUnmutedBeforeLosingNativeActiveState&&r.setLocalVideo(!0):(r.camUnmutedBeforeLosingNativeActiveState=r.localVideo(),r.camUnmutedBeforeLosingNativeActiveState&&r.setLocalVideo(!1)))}));return function(t){return e.apply(this,arguments)}}()),p(r,"handleNativeAudioFocusChange",(function(e){r.disableReactNativeAutoDeviceManagement("audio")||(r._hasNativeAudioFocus=e,r.toggleParticipantAudioBasedOnNativeAudioFocus(),r._hasNativeAudioFocus?r.micUnmutedBeforeLosingNativeAudioFocus&&r.setLocalAudio(!0):(r.micUnmutedBeforeLosingNativeAudioFocus=r.localAudio(),r.setLocalAudio(!1)))})),p(r,"handleNativeSystemScreenCaptureStop",(function(){r.stopScreenShare()})),r.strictMode=void 0===d.strictMode||d.strictMode,r.allowMultipleCallInstances=null!==(n=d.allowMultipleCallInstances)&&void 0!==n&&n,Object.keys(Za).length&&(r._logDuplicateInstanceAttempt(),!r.allowMultipleCallInstances)){if(r.strictMode)throw new Error("Duplicate DailyIframe instances are not allowed");console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`")}if(window._daily||(window._daily={pendings:[],instances:{}}),r.callClientId=T(),Za[(c=r).callClientId]=c,window._daily.instances[r.callClientId]={},r._sharedTracks={},window._daily.instances[r.callClientId].tracks=r._sharedTracks,d.dailyJsVersion=t.version(),r._iframe=e,r._callObjectMode="none"===d.layout&&!r._iframe,r._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},void 0!==d.showLocalVideo?r._callObjectMode?console.error("showLocalVideo is not available in call object mode"):r._showLocalVideo=!!d.showLocalVideo:r._showLocalVideo=!0,void 0!==d.showParticipantsBar?r._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):r._showParticipantsBar=!!d.showParticipantsBar:r._showParticipantsBar=!0,void 0!==d.customIntegrations?r._callObjectMode?console.error("customIntegrations is not available in call object mode"):r._customIntegrations=d.customIntegrations:r._customIntegrations={},void 0!==d.customTrayButtons?r._callObjectMode?console.error("customTrayButtons is not available in call object mode"):r._customTrayButtons=d.customTrayButtons:r._customTrayButtons={},void 0!==d.activeSpeakerMode?r._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):r._activeSpeakerMode=!!d.activeSpeakerMode:r._activeSpeakerMode=!1,d.receiveSettings?r._callObjectMode?r._receiveSettings=d.receiveSettings:console.error("receiveSettings is only available in call object mode"):r._receiveSettings={},r.validateProperties(d),r.properties=Ha({},d),r._inputSettings||(r._inputSettings={}),r._callObjectLoader=r._callObjectMode?new ua(r.callClientId):null,r._callState=Or,r._isPreparingToJoin=!1,r._accessState={access:Jr},r._meetingSessionSummary={},r._finalSummaryOfPrevSession={},r._meetingSessionState=Vs(ns,r._callObjectMode),r._nativeInCallAudioMode=es,r._participants={},r._isScreenSharing=!1,r._participantCounts=rs,r._rmpPlayerState={},r._waitingParticipants={},r._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},r._activeSpeaker={},r._localAudioLevel=0,r._isLocalAudioLevelObserverRunning=!1,r._remoteParticipantsAudioLevel={},r._isRemoteParticipantsAudioLevelObserverRunning=!1,r._maxAppMessageSize=mo,r._messageChannel=Po()?new ea:new Qo,r._iframe&&(r._iframe.requestFullscreen?r._iframe.addEventListener("fullscreenchange",(function(){document.fullscreenElement===r._iframe?(r.emitDailyJSEvent({action:oo}),r.sendMessageToCallMachine({action:oo})):(r.emitDailyJSEvent({action:ao}),r.sendMessageToCallMachine({action:ao}))})):r._iframe.webkitRequestFullscreen&&r._iframe.addEventListener("webkitfullscreenchange",(function(){document.webkitFullscreenElement===r._iframe?(r.emitDailyJSEvent({action:oo}),r.sendMessageToCallMachine({action:oo})):(r.emitDailyJSEvent({action:ao}),r.sendMessageToCallMachine({action:ao}))}))),Po()){var f=r.nativeUtils();f.addAudioFocusChangeListener&&f.removeAudioFocusChangeListener&&f.addAppStateChangeListener&&f.removeAppStateChangeListener&&f.addSystemScreenCaptureStopListener&&f.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),r._hasNativeAudioFocus=!0,f.addAudioFocusChangeListener(r.handleNativeAudioFocusChange),f.addAppStateChangeListener(r.handleNativeAppStateChange),f.addSystemScreenCaptureStopListener(r.handleNativeSystemScreenCaptureStop)}return r._callObjectMode&&r.startListeningForDeviceChanges(),r._messageChannel.addListenerForMessagesFromCallMachine(r.handleMessageFromCallMachine,r.callClientId,r),r}return f(t,e),c(t,[{key:"destroy",value:(te=v((function*(){var e;try{yield this.leave()}catch(e){}var t=this._iframe;if(t){var n=t.parentElement;n&&n.removeChild(t)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),Po()){var r=this.nativeUtils();r.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),r.removeAppStateChangeListener(this.handleNativeAppStateChange),r.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete Za[this.callClientId],(null===(e=window)||void 0===e||null===(e=e._daily)||void 0===e?void 0:e.instances)&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)})),function(){return te.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(e){var t=e.bodyClass,n=e.cssFile,r=e.cssText;return Ss(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:"iframe",value:function(){return Ss(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return _s(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return _s(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(e,t){for(var n in t){if(!ds[n])throw new Error("unrecognized updateParticipant property ".concat(n));if(ds[n].validate&&!ds[n].validate(t[n],this,this._participants[e]))throw new Error(ds[n].help)}}},{key:"updateParticipant",value:function(e,t){return this._participants.local&&this._participants.local.session_id===e&&(e="local"),e&&t&&(this.validateParticipantProperties(e,t),this.sendMessageToCallMachine({action:"update-participant",id:e,properties:t})),this}},{key:"updateParticipants",value:function(e){var t=this._participants.local&&this._participants.local.session_id;for(var n in e)n===t&&(n="local"),n&&e[n]&&this.validateParticipantProperties(n,e[n]);return this.sendMessageToCallMachine({action:"update-participants",participants:e}),this}},{key:"updateWaitingParticipant",value:(ee=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_s(this._callObjectMode,"updateWaitingParticipant()"),hs(this._callState,"updateWaitingParticipant()"),"string"!=typeof t||"object"!==o(n))throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise((function(r,i){e.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:t,updates:n},(function(e){e.error&&i(e.error),e.id||i(new Error("unknown error in updateWaitingParticipant()")),r({id:e.id})}))}))})),function(){return ee.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(Z=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(_s(this._callObjectMode,"updateWaitingParticipants()"),hs(this._callState,"updateWaitingParticipants()"),"object"!==o(t))throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise((function(n,r){e.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updatesById:t},(function(e){e.error&&r(e.error),e.ids||r(new Error("unknown error in updateWaitingParticipants()")),n({ids:e.ids})}))}))})),function(){return Z.apply(this,arguments)})},{key:"requestAccess",value:(X=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.access,r=void 0===n?{level:Yr}:n,i=t.name,o=void 0===i?"":i;return _s(this._callObjectMode,"requestAccess()"),hs(this._callState,"requestAccess()"),new Promise((function(t,n){e.sendMessageToCallMachine({action:"daily-method-request-access",access:r,name:o},(function(e){e.error&&n(e.error),e.access||n(new Error("unknown error in requestAccess()")),t({access:e.access,granted:e.granted})}))}))})),function(){return X.apply(this,arguments)})},{key:"localAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.audio.state):null}},{key:"localVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.video.state):null}},{key:"setLocalAudio",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"forceDiscardTrack"in t&&(Po()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),t={}):e&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),t={})),this.sendMessageToCallMachine({action:"local-audio",state:e,options:t}),this}},{key:"localScreenAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenAudio.state):null}},{key:"localScreenVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenVideo.state):null}},{key:"updateScreenShare",value:function(e){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:e}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(e){return this.sendMessageToCallMachine({action:"local-video",state:e}),this}},{key:"_setAllowLocalAudio",value:function(e){if(this._preloadCache.allowLocalAudio=e,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-audio",state:e}),this}},{key:"_setAllowLocalVideo",value:function(e){if(this._preloadCache.allowLocalVideo=e,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-video",state:e}),this}},{key:"getReceiveSettings",value:(Q=v((function*(e){var t=this,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).showInheritedValues,r=void 0!==n&&n;if(_s(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(o(e)){case"string":return new Promise((function(n){t.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:e,showInheritedValues:r},(function(e){n(e.receiveSettings)}))}));case"undefined":return this._receiveSettings;default:throw new Error('first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments')}})),function(e){return Q.apply(this,arguments)})},{key:"updateReceiveSettings",value:(K=v((function*(e){var t=this;if(_s(this._callObjectMode,"updateReceiveSettings()"),!Es(e,{allowAllParticipantsKey:!0}))throw new Error(Is({allowAllParticipantsKey:!0}));return hs(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise((function(n){t.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:e},(function(e){n({receiveSettings:e.receiveSettings})}))}))})),function(e){return K.apply(this,arguments)})},{key:"_prepInputSettingsForSharing",value:function(e,t){if(e){var n={};if(e.audio){var r,i,o;e.audio.settings&&(!Object.keys(e.audio.settings).length&&t||(n.audio={settings:Ha({},e.audio.settings)})),t&&null!==(r=n.audio)&&void 0!==r&&null!==(r=r.settings)&&void 0!==r&&r.customTrack&&(n.audio.settings={customTrack:this._sharedTracks.audioTrack});var a="none"===(null===(i=e.audio.processor)||void 0===i?void 0:i.type)&&(null===(o=e.audio.processor)||void 0===o?void 0:o._isDefaultWhenNone);if(e.audio.processor&&!a){var s=Ha({},e.audio.processor);delete s._isDefaultWhenNone,n.audio=Ha(Ha({},n.audio),{},{processor:s})}}if(e.video){var c,u,l;e.video.settings&&(!Object.keys(e.video.settings).length&&t||(n.video={settings:Ha({},e.video.settings)})),t&&null!==(c=n.video)&&void 0!==c&&null!==(c=c.settings)&&void 0!==c&&c.customTrack&&(n.video.settings={customTrack:this._sharedTracks.videoTrack});var d="none"===(null===(u=e.video.processor)||void 0===u?void 0:u.type)&&(null===(l=e.video.processor)||void 0===l?void 0:l._isDefaultWhenNone);if(e.video.processor&&!d){var f=Ha({},e.video.processor);delete f._isDefaultWhenNone,n.video=Ha(Ha({},n.video),{},{processor:f})}}return n}}},{key:"getInputSettings",value:function(){var e=this;return Ss(),new Promise((function(t){t(e._getInputSettings())}))}},{key:"_getInputSettings",value:function(){var e,t,n,r,i,o,a={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(e=(null===(n=this._inputSettings)||void 0===n?void 0:n.video)||a,t=(null===(r=this._inputSettings)||void 0===r?void 0:r.audio)||a):(e=(null===(i=this._preloadCache)||void 0===i||null===(i=i.inputSettings)||void 0===i?void 0:i.video)||a,t=(null===(o=this._preloadCache)||void 0===o||null===(o=o.inputSettings)||void 0===o?void 0:o.audio)||a);var s={audio:t,video:e};return this._prepInputSettingsForSharing(s,!0)}},{key:"_updatePreloadCacheInputSettings",value:function(e,t){var n,r,i,o,a,s,c=this._inputSettings||{},u={};e.video?(u.video={},e.video.settings?(u.video.settings={},t||e.video.settings.customTrack||null===(i=c.video)||void 0===i||!i.settings?u.video.settings=e.video.settings:u.video.settings=Ha(Ha({},c.video.settings),e.video.settings),Object.keys(u.video.settings).length||delete u.video.settings):null!==(n=c.video)&&void 0!==n&&n.settings&&(u.video.settings=c.video.settings),e.video.processor?u.video.processor=e.video.processor:null!==(r=c.video)&&void 0!==r&&r.processor&&(u.video.processor=c.video.processor)):c.video&&(u.video=c.video);e.audio?(u.audio={},e.audio.settings?(u.audio.settings={},t||e.audio.settings.customTrack||null===(s=c.audio)||void 0===s||!s.settings?u.audio.settings=e.audio.settings:u.audio.settings=Ha(Ha({},c.audio.settings),e.audio.settings),Object.keys(u.audio.settings).length||delete u.audio.settings):null!==(o=c.audio)&&void 0!==o&&o.settings&&(u.audio.settings=c.audio.settings),e.audio.processor?u.audio.processor=e.audio.processor:null!==(a=c.audio)&&void 0!==a&&a.processor&&(u.audio.processor=c.audio.processor)):c.audio&&(u.audio=c.audio);this._maybeUpdateInputSettings(u)}},{key:"_devicesFromInputSettings",value:function(e){var t,n,r=(null==e||null===(t=e.video)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.deviceId)||null,i=(null==e||null===(n=e.audio)||void 0===n||null===(n=n.settings)||void 0===n?void 0:n.deviceId)||null,o=this._preloadCache.outputDeviceId||null;return{camera:r?{deviceId:r}:{},mic:i?{deviceId:i}:{},speaker:o?{deviceId:o}:{}}}},{key:"updateInputSettings",value:(H=v((function*(e){var t=this;return Ss(),Ts(e)?e.video||e.audio?(Ms(e,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(e,!0),this._getInputSettings()):new Promise((function(n,r){t.sendMessageToCallMachine({action:"update-input-settings",inputSettings:e},(function(i){if(i.error)r(i.error);else{if(i.returnPreloadCache)return t._updatePreloadCacheInputSettings(e,!0),void n(t._getInputSettings());t._maybeUpdateInputSettings(i.inputSettings),n(t._prepInputSettingsForSharing(i.inputSettings,!0))}}))}))):this._getInputSettings():(console.error(Ps()),Promise.reject(Ps()))})),function(e){return H.apply(this,arguments)})},{key:"setBandwidth",value:function(e){var t=e.kbs,n=e.trackConstraints;if(Ss(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:t,trackConstraints:n}),this}},{key:"getDailyLang",value:function(){var e=this;if(Ss(),this._callMachineInitialized)return new Promise((function(t){e.sendMessageToCallMachine({action:"get-daily-lang"},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))}},{key:"setDailyLang",value:function(e){return Ss(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:e}),this}},{key:"setProxyUrl",value:function(e){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:e}),this}},{key:"setIceConfig",value:function(e){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:e}),this}},{key:"meetingSessionSummary",value:function(){return[Dr,jr].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(z=v((function*(){var e=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),hs(this._callState,"getMeetingSession()"),new Promise((function(t){e.sendMessageToCallMachine({action:"get-meeting-session"},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return z.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return hs(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"replace";_s(this._callObjectMode,"setMeetingSessionData()"),hs(this._callState,"setMeetingSessionData");try{!function(e,t){new ia({data:e,mergeStrategy:t})}(e,t)}catch(e){throw console.error(e),e}try{this.sendMessageToCallMachine({action:"set-session-data",data:e,mergeStrategy:t})}catch(e){throw new Error("Error setting meeting session data: ".concat(e))}}},{key:"setUserName",value:function(e,t){var n=this;return this.properties.userName=e,new Promise((function(r){n.sendMessageToCallMachine({action:"set-user-name",name:null!=e?e:"",thisMeetingOnly:Po()||!!t&&!!t.thisMeetingOnly},(function(e){delete e.action,delete e.callbackStamp,r(e)}))}))}},{key:"setUserData",value:(G=v((function*(e){var t=this;try{ks(e)}catch(e){throw console.error(e),e}if(this.properties.userData=e,this._callMachineInitialized)return new Promise((function(n){try{t.sendMessageToCallMachine({action:"set-user-data",userData:e},(function(e){delete e.action,delete e.callbackStamp,n(e)}))}catch(e){throw new Error("Error setting user data: ".concat(e))}}))})),function(e){return G.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(e){if(e&&(e<100||"number"!=typeof e))throw new Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(e){var t=this;if("undefined"==typeof AudioWorkletNode&&!Po())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:e},(function(e){t._isLocalAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:e}}},{key:"isLocalAudioLevelObserverRunning",value:function(){return this._isLocalAudioLevelObserverRunning}},{key:"stopLocalAudioLevelObserver",value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-local-audio-level-observer"})}},{key:"startRemoteParticipantsAudioLevelObserver",value:function(e){var t=this;if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:e},(function(e){t._isRemoteParticipantsAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:e}}},{key:"isRemoteParticipantsAudioLevelObserverRunning",value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:"stopRemoteParticipantsAudioLevelObserver",value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-remote-participants-audio-level-observer"})}},{key:"startCamera",value:(W=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(_s(this._callObjectMode,"startCamera()"),gs(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),this.needsLoad())try{yield this.load(t)}catch(e){return Promise.reject(e)}else{if(this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(t),this.properties=Ha(Ha({},this.properties),t)}return new Promise((function(t){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:"start-camera",properties:ps(e.properties,e.callClientId),preloadCache:ps(e._preloadCache,e.callClientId)},(function(e){t({camera:e.camera,mic:e.mic,speaker:e.speaker})}))}))})),function(){return W.apply(this,arguments)})},{key:"validateCustomTrack",value:function(e,t,n){if(n&&n.length>50)throw new Error("Custom track `trackName` must not be more than 50 characters");if(t&&"music"!==t&&"speech"!==t&&!(t instanceof Object))throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(n&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(n))throw new Error("Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo");if(!(e instanceof MediaStreamTrack))throw new Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{track:track,mode:mode,trackName:trackName};return Ss(),hs(this._callState,"startCustomTrack()"),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise((function(n,r){e._sharedTracks.customTrack=t.track,t.track=ko,e.sendMessageToCallMachine({action:"start-custom-track",properties:t},(function(e){e.error?r({error:e.error}):n(e.mediaTag)}))}))}},{key:"stopCustomTrack",value:function(e){var t=this;return Ss(),hs(this._callState,"stopCustomTrack()"),new Promise((function(n){t.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:e},(function(e){n(e.mediaTag)}))}))}},{key:"setCamera",value:function(e){var t=this;return ws(),ms(this._callMachineInitialized,"setCamera()"),new Promise((function(n){t.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:e},(function(e){n({device:e.device})}))}))}},{key:"setAudioDevice",value:(q=v((function*(e){return ws(),this.nativeUtils().setAudioDevice(e),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(e){return q.apply(this,arguments)})},{key:"cycleCamera",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(n){e.sendMessageToCallMachine({action:"cycle-camera",properties:t},(function(e){n({device:e.device})}))}))}},{key:"cycleMic",value:function(){var e=this;return Ss(),new Promise((function(t){e.sendMessageToCallMachine({action:"cycle-mic"},(function(e){t({device:e.device})}))}))}},{key:"getCameraFacingMode",value:function(){var e=this;return ws(),new Promise((function(t){e.sendMessageToCallMachine({action:"get-camera-facing-mode"},(function(e){t(e.facingMode)}))}))}},{key:"setInputDevicesAsync",value:($=v((function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,o=e.videoSource;if(Ss(),void 0!==i&&(n=i),void 0!==o&&(r=o),"boolean"==typeof n&&(this._setAllowLocalAudio(n),n=void 0),"boolean"==typeof r&&(this._setAllowLocalVideo(r),r=void 0),!n&&!r)return yield this.getInputDevices();var a={};return n&&(n instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=n,n=ko,a.audio={settings:{customTrack:n}}):(delete this._sharedTracks.audioTrack,a.audio={settings:{deviceId:n}})),r&&(r instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=r,r=ko,a.video={settings:{customTrack:r}}):(delete this._sharedTracks.videoTrack,a.video={settings:{deviceId:r}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(a,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise((function(e){t.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:n,videoDeviceId:r},(function(n){if(delete n.action,delete n.callbackStamp,n.returnPreloadCache)return t._updatePreloadCacheInputSettings(a,!1),void e(t._devicesFromInputSettings(t._inputSettings));e(n)}))}))})),function(e){return $.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(Y=v((function*(e){var t=this,n=e.outputDeviceId;return Ss(),n&&(this._preloadCache.outputDeviceId=n),this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(e){t.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:n},(function(n){delete n.action,delete n.callbackStamp,n.returnPreloadCache?e(t._devicesFromInputSettings(t._inputSettings)):e(n)}))}))})),function(e){return Y.apply(this,arguments)})},{key:"getInputDevices",value:(J=v((function*(){var e=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(t){e.sendMessageToCallMachine({action:"get-input-devices"},(function(n){n.returnPreloadCache?t(e._devicesFromInputSettings(e._inputSettings)):t({camera:n.camera,mic:n.mic,speaker:n.speaker})}))}))})),function(){return J.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return ws(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(e){if(ws(),[es,ts].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement("audio")&&vs(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",e)}},{key:"preAuth",value:(B=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(_s(this._callObjectMode,"preAuth()"),gs(this._callState,this._isPreparingToJoin,"preAuth()"),this.needsLoad()&&(yield this.load(t)),!t.url)throw new Error("preAuth() requires at least a url to be provided");return this.validateProperties(t),this.properties=Ha(Ha({},this.properties),t),new Promise((function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:"daily-method-preauth",properties:ps(e.properties,e.callClientId),preloadCache:ps(e._preloadCache,e.callClientId)},(function(r){return r.error?n(r.error):r.access?(e._didPreAuth=!0,void t({access:r.access})):n(new Error("unknown error in preAuth()"))}))}))})),function(){return B.apply(this,arguments)})},{key:"load",value:(U=v((function*(e){var t=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");if(e&&(this.validateProperties(e),this.properties=Ha(Ha({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(Pr),this.emitDailyJSEvent({action:vi}),this._callObjectMode?new Promise((function(e,n){t._callObjectLoader.cancel();var r=Date.now();t._callObjectLoader.load(t.properties.dailyConfig,(function(n){t._bundleLoadTime=n?"no-op":Date.now()-r,t._updateCallState(Ir),n&&t.emitDailyJSEvent({action:mi}),e()}),(function(e,r){if(t.emitDailyJSEvent({action:gi}),!r){t._updateCallState(jr),t.resetMeetingDependentVars();var i={action:go,errorMsg:e.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:e,bundleUrl:C(t.properties.dailyConfig)}}};t._maybeSendToSentry(i),t.emitDailyJSEvent(i),n(e.msg)}}))})):(this._iframe.src=A(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise((function(e,n){t._loadedCallback=function(r){t._callState!==jr?(t._updateCallState(Ir),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),e()):n(r)}})))}})),function(e){return U.apply(this,arguments)})},{key:"join",value:(V=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();var n=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(t)}catch(e){return this.updateIsPreparingToJoin(!1),Promise.reject(e)}}else{if(n=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(t.url&&!this._callObjectMode&&t.url&&t.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(t.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(t),this.properties=Ha(Ha({},this.properties),t)}return void 0!==t.showLocalVideo&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!t.showLocalVideo),void 0!==t.showParticipantsBar&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!t.showParticipantsBar),this._callState===Nr||this._callState===Lr?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(Lr,!1),this.emitDailyJSEvent({action:bi}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:ps(this.properties,this.callClientId),preloadCache:ps(this._preloadCache,this.callClientId)}),new Promise((function(t,r){e._joinedCallback=function(i,o){if(e._callState!==jr){if(e._updateCallState(Nr),i)for(var a in i){if(e._callObjectMode){var s=e._callMachine().store;wa(i[a],s),ka(i[a],s),Ta(i[a],e._participants[a],s)}e._participants[a]=Ha({},i[a]),e.toggleParticipantAudioBasedOnNativeAudioFocus()}n&&e.loadCss(e.properties),t(i)}else r(o)}})))})),function(){return V.apply(this,arguments)})},{key:"leave",value:(F=v((function*(){var e=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise((function(t){e._callState===Dr||e._callState===jr?t():e._callObjectLoader&&!e._callObjectLoader.loaded?(e._callObjectLoader.cancel(),e._updateCallState(Dr),e.resetMeetingDependentVars(),e.emitDailyJSEvent({action:Dr}),t()):(e._resolveLeave=t,e.sendMessageToCallMachine({action:"leave-meeting"}))}))})),function(){return F.apply(this,arguments)})},{key:"startScreenShare",value:(x=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(ms(this._callMachineInitialized,"startScreenShare()"),t.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",t.screenVideoSendSettings),t.mediaStream&&(this._sharedTracks.screenMediaStream=t.mediaStream,t.mediaStream=ko),"undefined"!=typeof DailyNativeUtils&&void 0!==DailyNativeUtils.isIOS&&DailyNativeUtils.isIOS){var n=this.nativeUtils();if(yield n.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:vo,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});n.setSystemScreenCaptureStartCallback((function(){n.setSystemScreenCaptureStartCallback(null),e.sendMessageToCallMachine({action:bo,captureOptions:t})})),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:bo,captureOptions:t})})),function(){return x.apply(this,arguments)})},{key:"stopScreenShare",value:function(){ms(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type;if(t&&"cloud"!==t&&"raw-tracks"!==t&&"local"!==t)throw new Error("invalid type: ".concat(t,", allowed values 'cloud', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine(Ha({action:"local-recording-start"},e))}},{key:"updateRecording",value:function(e){var t=e.layout,n=void 0===t?{preset:"default"}:t,r=e.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:n,instanceId:r})}},{key:"stopRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(Ha({action:"local-recording-stop"},e))}},{key:"startLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(Ha({action:"daily-method-start-live-streaming"},e))}},{key:"updateLiveStreaming",value:function(e){var t=e.layout,n=void 0===t?{preset:"default"}:t,r=e.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:n,instanceId:r})}},{key:"addLiveStreamingEndpoints",value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:So,endpointsOp:"add-endpoints",endpoints:t,instanceId:n})}},{key:"removeLiveStreamingEndpoints",value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:So,endpointsOp:"remove-endpoints",endpoints:t,instanceId:n})}},{key:"stopLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(Ha({action:"daily-method-stop-live-streaming"},e))}},{key:"validateDailyConfig",value:function(e){e.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(e.camSimulcastEncodings)),e.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),Fo()&&e.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e){if(!(e instanceof Array||Array.isArray(e)))throw new Error("encodings must be an Array");if(!Fs(e.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var r=0;r<e.length;r++){var i=e[r];for(var o in this._validateEncodingLayerHasValidProperties(i),i)if(os.includes(o)){if("number"!=typeof i[o])throw new Error("".concat(o," must be a number"));if(t){var a=t[o],s=a.min,c=a.max;if(!Fs(i[o],s,c))throw new Error("".concat(o," value not in range. valid range: ").concat(s," to ").concat(c))}}else if(!["active","scalabilityMode"].includes(o))throw new Error("Invalid key ".concat(o,", valid keys are:")+Object.values(os));if(n&&!i.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(R=v((function*(e){var t=this,n=e.url,r=e.settings,i=void 0===r?{state:Mo.PLAY}:r;try{!function(e){if("string"!=typeof e)throw new Error('url parameter must be "string" type')}(n),xs(i),function(e){for(var t in e)if(!as.includes(t))throw new Error("Invalid key ".concat(t,", valid keys are: ").concat(as));e.simulcastEncodings&&this.validateSimulcastEncodings(e.simulcastEncodings,is,!0)}(i)}catch(e){throw console.error("invalid argument Error: ".concat(e)),console.error('startRemoteMediaPlayer arguments must be of the form:\n { url: "playback url",\n settings?:\n {state: "play"|"pause", simulcastEncodings?: [{}] } }'),e}return new Promise((function(e,r){t.sendMessageToCallMachine({action:"daily-method-start-remote-media-player",url:n,settings:i},(function(t){t.error?r({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})}))}))})),function(e){return R.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(j=v((function*(e){var t=this;if("string"!=typeof e)throw new Error(" remotePlayerID must be of type string");return new Promise((function(n,r){t.sendMessageToCallMachine({action:"daily-method-stop-remote-media-player",session_id:e},(function(e){e.error?r({error:e.error,errorMsg:e.errorMsg}):n()}))}))})),function(e){return j.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(D=v((function*(e){var t=this,n=e.session_id,r=e.settings;try{xs(r)}catch(e){throw console.error("invalid argument Error: ".concat(e)),console.error('updateRemoteMediaPlayer arguments must be of the form:\n session_id: "participant session",\n { settings?: {state: "play"|"pause"} }'),e}return new Promise((function(e,i){t.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:n,settings:r},(function(t){t.error?i({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})}))}))})),function(e){return D.apply(this,arguments)})},{key:"startTranscription",value:function(e){hs(this._callState,"startTranscription()"),this.sendMessageToCallMachine(Ha({action:"daily-method-start-transcription"},e))}},{key:"updateTranscription",value:function(e){if(hs(this._callState,"updateTranscription()"),!e)throw new Error("updateTranscription Error: options is mandatory");if("object"!==o(e))throw new Error("updateTranscription Error: options must be object type");if(e.participants&&!Array.isArray(e.participants))throw new Error("updateTranscription Error: participants must be an array");this.sendMessageToCallMachine(Ha({action:"daily-method-update-transcription"},e))}},{key:"stopTranscription",value:function(e){if(hs(this._callState,"stopTranscription()"),e&&"object"!==o(e))throw new Error("stopTranscription Error: options must be object type");if(e&&!e.instanceId)throw new Error('"instanceId" not provided');this.sendMessageToCallMachine(Ha({action:"daily-method-stop-transcription"},e))}},{key:"startDialOut",value:(N=v((function*(e){var t=this;hs(this._callState,"startDialOut()");var n=function(e){if(e){if(!Array.isArray(e))throw new Error("Error starting dial out: audio codec must be an array");if(e.length<=0)throw new Error("Error starting dial out: audio codec array specified but empty");e.forEach((function(e){if("string"!=typeof e)throw new Error("Error starting dial out: audio codec must be a string");if("OPUS"!==e&&"PCMU"!==e&&"PCMA"!==e&&"G722"!==e)throw new Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")}))}};if(!e.sipUri&&!e.phoneNumber)throw new Error("Error starting dial out: either a sip uri or phone number must be provided");if(e.sipUri&&e.phoneNumber)throw new Error("Error starting dial out: only one of sip uri or phone number must be provided");if(e.sipUri){if("string"!=typeof e.sipUri)throw new Error("Error starting dial out: sipUri must be a string");if(!e.sipUri.startsWith("sip:"))throw new Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(e.video&&"boolean"!=typeof e.video)throw new Error("Error starting dial out: video must be a boolean value");!function(e){if(e&&(n(e.audio),e.video)){if(!Array.isArray(e.video))throw new Error("Error starting dial out: video codec must be an array");if(e.video.length<=0)throw new Error("Error starting dial out: video codec array specified but empty");e.video.forEach((function(e){if("string"!=typeof e)throw new Error("Error starting dial out: video codec must be a string");if("H264"!==e&&"VP8"!==e)throw new Error("Error starting dial out: video codec must be H264 or VP8")}))}}(e.codecs)}if(e.phoneNumber){if("string"!=typeof e.phoneNumber)throw new Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(e.phoneNumber))throw new Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");e.codecs&&n(e.codecs.audio)}if(e.callerId){if("string"!=typeof e.callerId)throw new Error("Error starting dial out: callerId must be a string");if(e.sipUri)throw new Error("Error starting dial out: callerId not allowed with sipUri")}if(e.displayName){if("string"!=typeof e.displayName)throw new Error("Error starting dial out: displayName must be a string");if(e.displayName.length>=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(e.userId){if("string"!=typeof e.userId)throw new Error("Error starting dial out: userId must be a string");if(e.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}return new Promise((function(n,r){t.sendMessageToCallMachine(Ha({action:"dialout-start"},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return N.apply(this,arguments)})},{key:"stopDialOut",value:function(e){var t=this;return hs(this._callState,"stopDialOut()"),new Promise((function(n,r){t.sendMessageToCallMachine(Ha({action:"dialout-stop"},e),(function(e){e.error?r(e.error):n(e)}))}))}},{key:"sipCallTransfer",value:(L=v((function*(e){var t=this;if(hs(this._callState,"sipCallTransfer()"),!e)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return e.useSipRefer=!1,Rs(e,"sipCallTransfer"),new Promise((function(n,r){t.sendMessageToCallMachine(Ha({action:Co},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return L.apply(this,arguments)})},{key:"sipRefer",value:(I=v((function*(e){var t=this;if(hs(this._callState,"sipRefer()"),!e)throw new Error("sessionId and toEndPoint are mandatory parameter");return e.useSipRefer=!0,Rs(e,"sipRefer"),new Promise((function(n,r){t.sendMessageToCallMachine(Ha({action:Co},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return I.apply(this,arguments)})},{key:"sendDTMF",value:(P=v((function*(e){var t=this;return hs(this._callState,"sendDTMF()"),function(e){var t=e.sessionId,n=e.tones;if(!t||!n)throw new Error("sessionId and tones are mandatory parameter");if("string"!=typeof t||"string"!=typeof n)throw new Error("sessionId and tones should be of string type");if(n.length>20)throw new Error("tones string must be upto 20 characters");var r=n.match(/[^0-9A-D*#]/g);if(r&&r[0])throw new Error("".concat(r[0]," is not valid DTMF tone"))}(e),new Promise((function(n,r){t.sendMessageToCallMachine(Ha({action:"send-dtmf"},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return P.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var e=this;return this._callState!==Nr?Promise.resolve(Ha({stats:{latest:{}}},this._network)):new Promise((function(t){e.sendMessageToCallMachine({action:"get-calc-stats"},(function(n){t(Ha(Ha({},e._network),{},{stats:n.stats}))}))}))}},{key:"testWebsocketConnectivity",value:(O=v((function*(){var e=this;if(ys(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}return new Promise((function(t,n){e.sendMessageToCallMachine({action:"test-websocket-connectivity"},(function(e){e.error?n(e.error):t(e.results)}))}))})),function(){return O.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(e){return e?e instanceof MediaStreamTrack?!!function(e,t){var n=t.isLocalScreenVideo;return e&&"live"===e.readyState&&!function(e,t){return(!t.isLocalScreenVideo||"Chrome"!==Uo())&&e.muted&&!Da.has(e.id)}(e,{isLocalScreenVideo:n})}(e,{isLocalScreenVideo:!1})||(console.error("Video track is not playable. This test needs a live video track."),!1):(console.error("Video track needs to be of type `MediaStreamTrack`."),!1):(console.error("Missing video track. You must provide a video track in order to run this test."),!1)}},{key:"testCallQuality",value:(M=v((function*(){var e=this;Ss(),_s(this._callObjectMode,"testCallQuality()"),ms(this._callMachineInitialized,"testCallQuality()",null,!0),gs(this._callState,this._isPreparingToJoin,"testCallQuality()");var t=this._testCallAlreadyInProgress,n=function(n){t||(e._testCallInProgress=n)};if(n(!0),this.needsLoad())try{var i=this._callState;yield this.load(),this._callState=i}catch(e){return n(!1),Promise.reject(e)}return new Promise((function(t){e.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:e.properties.dailyJsVersion},(function(i){var o=i.results,a=o.result,s=r(o,Wa);if("failed"===a){var c,u=Ha({},s);null!==(c=s.error)&&void 0!==c&&c.details?(s.error.details=JSON.parse(s.error.details),u.error=Ha(Ha({},u.error),{},{details:Ha({},u.error.details)}),u.error.details.duringTest="testCallQuality"):(u.error=u.error?Ha({},u.error):{},u.error.details={duringTest:"testCallQuality"}),e._maybeSendToSentry(u)}n(!1),t(Ha({result:a},s))}))}))})),function(){return M.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(k=v((function*(e){var t;Po()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),t=yield this.testPeerToPeerCallQuality(e)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),t=yield this.testCallQuality());var n={result:t.result,secondsElapsed:t.secondsElapsed};return t.data&&(n.data={maxRTT:t.data.maxRoundTripTime,packetLoss:t.data.avgRecvPacketLoss}),n})),function(e){return k.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(S=v((function*(e){var t=this;if(ys(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}var n=e.videoTrack,r=e.duration;if(!this._validateVideoTrackForNetworkTests(n))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=n,new Promise((function(e,n){t.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:r},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return S.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){Po()?(console.warn("stopTestConnectionQuality() is deprecated: use testPeerToPeerCallQuality() and stopTestPeerToPeerCallQuality() instead"),this.stopTestPeerToPeerCallQuality()):(console.warn("stopTestConnectionQuality() is deprecated: use testCallQuality() and stopTestCallQuality() instead"),this.stopTestCallQuality())}},{key:"stopTestPeerToPeerCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-p2p-call-quality"})}},{key:"testNetworkConnectivity",value:(b=v((function*(e){var t=this;if(ys(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}if(!this._validateVideoTrackForNetworkTests(e))throw new Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=e,new Promise((function(e,n){t.sendMessageToCallMachine({action:"test-network-connectivity"},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return b.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var e=this;return new Promise((function(t){e._callState===Nr?e.sendMessageToCallMachine({action:"get-cpu-load-stats"},(function(e){t(e.cpuStats)})):t({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})}))}},{key:"_validateEncodingLayerHasValidProperties",value:function(e){var t;if(!((null===(t=Object.keys(e))||void 0===t?void 0:t.length)>0))throw new Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(os))}},{key:"_validateVideoSendSettings",value:function(e,t){var n="screenVideo"===e?["default-screen-video","detail-optimized","motion-optimized","motion-and-detail-balanced"]:["default-video","bandwidth-optimized","bandwidth-and-quality-balanced","quality-optimized","adaptive-2-layers","adaptive-3-layers"],r="Video send settings should be either an object or one of the supported presets: ".concat(n.join());if("string"==typeof t){if(!n.includes(t))throw new Error(r)}else{if("object"!==o(t))throw new Error(r);if(!t.maxQuality&&!t.encodings&&void 0===t.allowAdaptiveLayers)throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(t.maxQuality&&-1===["low","medium","high"].indexOf(t.maxQuality))throw new Error("maxQuality must be either low, medium or high");if(t.encodings){var i=!1;switch(Object.keys(t.encodings).length){case 1:i=!t.encodings.low;break;case 2:i=!t.encodings.low||!t.encodings.medium;break;case 3:i=!t.encodings.low||!t.encodings.medium||!t.encodings.high;break;default:i=!0}if(i)throw new Error("Encodings must be defined as: low, low and medium, or low, medium and high.");t.encodings.low&&this._validateEncodingLayerHasValidProperties(t.encodings.low),t.encodings.medium&&this._validateEncodingLayerHasValidProperties(t.encodings.medium),t.encodings.high&&this._validateEncodingLayerHasValidProperties(t.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(e){var t=this;if(!e||0===Object.keys(e).length)throw new Error("Send settings must contain at least information for one track!");Object.entries(e).forEach((function(e){var n=m(e,2),r=n[0],i=n[1];t._validateVideoSendSettings(r,i)}))}},{key:"updateSendSettings",value:function(e){var t=this;return this.validateUpdateSendSettings(e),this.needsLoad()?(this._preloadCache.sendSettings=e,{sendSettings:this._preloadCache.sendSettings}):new Promise((function(n,r){t.sendMessageToCallMachine({action:"update-send-settings",sendSettings:e},(function(e){e.error?r(e.error):n(e.sendSettings)}))}))}},{key:"getSendSettings",value:function(){return this._sendSettings||this._preloadCache.sendSettings}},{key:"getLocalAudioLevel",value:function(){return this._localAudioLevel}},{key:"getRemoteParticipantsAudioLevel",value:function(){return this._remoteParticipantsAudioLevel}},{key:"getActiveSpeaker",value:function(){return Ss(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(e){return Ss(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:e}),this}},{key:"activeSpeakerMode",value:function(){return Ss(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(e){return hs(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=e,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:e}),this}},{key:"enumerateDevices",value:(y=v((function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return"Firefox"===Uo()&&Bo().major>115&&Bo().major<123&&(t=t.filter((function(e){return"audiooutput"!==e.kind}))),{devices:t.map((function(e){var t=JSON.parse(JSON.stringify(e));if(!Po()&&"videoinput"===e.kind&&e.getCapabilities){var n,r=e.getCapabilities();t.facing=(null==r||null===(n=r.facingMode)||void 0===n?void 0:n.length)>=1?r.facingMode[0]:void 0}return t}))}}return new Promise((function(t){e.sendMessageToCallMachine({action:"enumerate-devices"},(function(e){t({devices:e.devices})}))}))})),function(){return y.apply(this,arguments)})},{key:"sendAppMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*";if(hs(this._callState,"sendAppMessage()"),JSON.stringify(e).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:e,to:t}),this}},{key:"addFakeParticipant",value:function(e){return Ss(),hs(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(Ha({action:"add-fake-participant"},e)),this}},{key:"setShowNamesMode",value:function(e){return bs(this._callObjectMode,"setShowNamesMode()"),Ss(),e&&"always"!==e&&"never"!==e?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:e}),this)}},{key:"setShowLocalVideo",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return bs(this._callObjectMode,"setShowLocalVideo()"),Ss(),hs(this._callState,"setShowLocalVideo()"),"boolean"!=typeof e?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:e}),this._showLocalVideo=e,this)}},{key:"showLocalVideo",value:function(){return bs(this._callObjectMode,"showLocalVideo()"),Ss(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return bs(this._callObjectMode,"setShowParticipantsBar()"),Ss(),hs(this._callState,"setShowParticipantsBar()"),"boolean"!=typeof e?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:e}),this._showParticipantsBar=e,this)}},{key:"showParticipantsBar",value:function(){return bs(this._callObjectMode,"showParticipantsBar()"),Ss(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return Ss(),bs(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(e){return Ss(),bs(this._callObjectMode,"setCustomIntegrations()"),hs(this._callState,"setCustomIntegrations()"),Ds(e)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:e}),this._customIntegrations=e,this):this}},{key:"startCustomIntegrations",value:function(e){var t=this;if(Ss(),bs(this._callObjectMode,"startCustomIntegrations()"),hs(this._callState,"startCustomIntegrations()"),Array.isArray(e)&&e.some((function(e){return"string"!=typeof e}))||!Array.isArray(e)&&"string"!=typeof e)return console.error("startCustomIntegrations() only accepts string | string[]"),this;var n="string"==typeof e?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error("Can't find custom integration(s): \"".concat(r.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:n}),this)}},{key:"stopCustomIntegrations",value:function(e){var t=this;if(Ss(),bs(this._callObjectMode,"stopCustomIntegrations()"),hs(this._callState,"stopCustomIntegrations()"),Array.isArray(e)&&e.some((function(e){return"string"!=typeof e}))||!Array.isArray(e)&&"string"!=typeof e)return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var n="string"==typeof e?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error("Can't find custom integration(s): \"".concat(r.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:n}),this)}},{key:"customTrayButtons",value:function(){return bs(this._callObjectMode,"customTrayButtons()"),Ss(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(e){return bs(this._callObjectMode,"updateCustomTrayButtons()"),Ss(),hs(this._callState,"updateCustomTrayButtons()"),Ns(e)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:e}),this._customTrayButtons=e,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(cs))),this)}},{key:"theme",value:function(){return bs(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(e){var t=this;return bs(this._callObjectMode,"setTheme()"),new Promise((function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=Ha({},e),t.sendMessageToCallMachine({action:"set-theme",theme:t.properties.theme});try{t.emitDailyJSEvent({action:hi,theme:t.properties.theme})}catch(e){console.log("could not emit 'theme-updated'",e)}n(t.properties.theme)}catch(e){r(e)}}))}},{key:"requestFullscreen",value:(g=v((function*(){if(Ss(),this._iframe&&!document.fullscreenElement&&Lo())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(e){console.log("could not make video call fullscreen",e)}})),function(){return g.apply(this,arguments)})},{key:"exitFullscreen",value:function(){Ss(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(h=v((function*(){var e=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise((function(t){e.sendMessageToCallMachine({action:"get-sidebar-view"},(function(e){t(e.view)}))}))})),function(){return h.apply(this,arguments)})},{key:"setSidebarView",value:function(e){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:e}),this)}},{key:"room",value:(d=v((function*(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).includeRoomConfigDefaults,n=void 0===t||t;return this._accessState.access===Jr||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise((function(t){e.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:n},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return d.apply(this,arguments)})},{key:"geo",value:(s=v((function*(){try{var e=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield e.json()).geo}}catch(e){return console.error("geo lookup failed",e),{current:""}}})),function(){return s.apply(this,arguments)})},{key:"setNetworkTopology",value:(a=v((function*(e){var t=this;return Ss(),hs(this._callState,"setNetworkTopology()"),new Promise((function(n,r){t.sendMessageToCallMachine({action:"set-network-topology",opts:e},(function(e){e.error?r({error:e.error}):n({workerId:e.workerId})}))}))})),function(e){return a.apply(this,arguments)})},{key:"getNetworkTopology",value:(n=v((function*(){var e=this;return new Promise((function(t,n){e.needsLoad()&&t({topology:"none"}),e.sendMessageToCallMachine({action:"get-network-topology"},(function(e){e.error?n({error:e.error}):t({topology:e.topology})}))}))})),function(){return n.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(e){if(Ss(),"number"!=typeof e&&!0!==e&&!1!==e)throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(e));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:e})}},{key:"on",value:function(e,t){return _().prototype.on.call(this,e,t)}},{key:"once",value:function(e,t){return _().prototype.once.call(this,e,t)}},{key:"off",value:function(e,t){return _().prototype.off.call(this,e,t)}},{key:"validateProperties",value:function(e){var t,n;if(null!=e&&null!==(t=e.dailyConfig)&&void 0!==t&&t.userMediaAudioConstraints){var r,i;Po()||console.warn("userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.");var o=e.inputSettings||{};o.audio=(null===(r=e.inputSettings)||void 0===r?void 0:r.audio)||{},o.audio.settings=(null===(i=e.inputSettings)||void 0===i||null===(i=i.audio)||void 0===i?void 0:i.settings)||{},o.audio.settings=Ha(Ha({},o.audio.settings),e.dailyConfig.userMediaAudioConstraints),e.inputSettings=o,delete e.dailyConfig.userMediaAudioConstraints}if(null!=e&&null!==(n=e.dailyConfig)&&void 0!==n&&n.userMediaVideoConstraints){var a,s;Po()||console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");var c=e.inputSettings||{};c.video=(null===(a=e.inputSettings)||void 0===a?void 0:a.video)||{},c.video.settings=(null===(s=e.inputSettings)||void 0===s||null===(s=s.video)||void 0===s?void 0:s.settings)||{},c.video.settings=Ha(Ha({},c.video.settings),e.dailyConfig.userMediaVideoConstraints),e.inputSettings=c,delete e.dailyConfig.userMediaVideoConstraints}for(var u in e){if(!ls[u])throw new Error("unrecognized property '".concat(u,"'"));if(ls[u].validate&&!ls[u].validate(e[u],this))throw new Error("property '".concat(u,"': ").concat(ls[u].help))}}},{key:"assembleMeetingUrl",value:function(){var e,t,n=Ha(Ha({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:null!==(e=this.properties.dailyConfig)&&void 0!==e&&e.proxyUrl?encodeURIComponent(null===(t=this.properties.dailyConfig)||void 0===t?void 0:t.proxyUrl):void 0}),r=n.url.match(/\?/)?"&":"?";return n.url+r+Object.keys(ls).filter((function(e){return ls[e].queryString&&void 0!==n[e]})).map((function(e){return"".concat(ls[e].queryString,"=").concat(n[e])})).join("&")}},{key:"needsLoad",value:function(){return[Or,Pr,Dr,jr].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(e,t){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(e,t,this.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(e){this._messageChannel.forwardPackagedMessageToCallMachine(e,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(e,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(e)}},{key:"handleMessageFromCallMachine",value:function(e){switch(e.action){case fi:this.sendMessageToCallMachine(Ha({action:pi},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var t={action:wo,level:"log",code:1011,stats:{event:"bundle load",time:"no-op"===this._bundleLoadTime?0:this._bundleLoadTime,preLoaded:"no-op"===this._bundleLoadTime,url:C(this.properties.dailyConfig)}};this.sendMessageToCallMachine(t),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case mi:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(e);break;case Si:var n,i=Ha({},e);delete i.internal,this._maxAppMessageSize=(null===(n=e.internal)||void 0===n?void 0:n._maxAppMessageSize)||mo,this._joinedCallback&&(this._joinedCallback(e.participants),this._joinedCallback=null),this.emitDailyJSEvent(i);break;case ki:case Ei:if(this._callState===Dr)return;if(e.participant&&e.participant.session_id){var o=e.participant.local?"local":e.participant.session_id;if(this._callObjectMode){var a=this._callMachine().store;wa(e.participant,a),ka(e.participant,a),Ta(e.participant,this._participants[o],a)}try{this.maybeParticipantTracksStopped(this._participants[o],e.participant),this.maybeParticipantTracksStarted(this._participants[o],e.participant),this.maybeEventRecordingStopped(this._participants[o],e.participant),this.maybeEventRecordingStarted(this._participants[o],e.participant)}catch(e){console.error("track events error",e)}this.compareEqualForParticipantUpdateEvent(e.participant,this._participants[o])||(this._participants[o]=Ha({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(e))}break;case Ti:if(e.participant&&e.participant.session_id){var s=this._participants[e.participant.session_id];s&&this.maybeParticipantTracksStopped(s,null),delete this._participants[e.participant.session_id],this.emitDailyJSEvent(e)}break;case Mi:w(this._participantCounts,e.participantCounts)||(this._participantCounts=e.participantCounts,this.emitDailyJSEvent(e));break;case Ai:var c={access:e.access};e.awaitingAccess&&(c.awaitingAccess=e.awaitingAccess),w(this._accessState,c)||(this._accessState=c,this.emitDailyJSEvent(e));break;case Ci:if(e.meetingSession){this._meetingSessionSummary=e.meetingSession,this.emitDailyJSEvent(e);var u=Ha(Ha({},e),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(u)}break;case go:var l;this._iframe&&!e.preserveIframe&&(this._iframe.src=""),this._updateCallState(jr),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(e.errorMsg),this._loadedCallback=null),e.preserveIframe;var d=r(e,Ga);null!=d&&null!==(l=d.error)&&void 0!==l&&l.details&&(d.error.details=JSON.parse(d.error.details)),this._maybeSendToSentry(e),this._joinedCallback&&(this._joinedCallback(null,d),this._joinedCallback=null),this.emitDailyJSEvent(d);break;case wi:this._callState!==jr&&this._updateCallState(Dr),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(e);break;case"selected-devices-updated":e.devices&&this.emitDailyJSEvent(e);break;case to:var f=e.state,p=e.threshold,h=e.quality,v=f.state,g=f.reasons;v===this._network.networkState&&w(g,this._network.networkStateReasons)&&p===this._network.threshold&&h===this._network.quality||(this._network.networkState=v,this._network.networkStateReasons=g,this._network.quality=h,this._network.threshold=p,e.networkState=v,g.length&&(e.networkStateReasons=g),delete e.state,this.emitDailyJSEvent(e));break;case ro:e&&e.cpuLoadState&&this.emitDailyJSEvent(e);break;case io:e&&void 0!==e.faceCounts&&this.emitDailyJSEvent(e);break;case Zi:var m=e.activeSpeaker;this._activeSpeaker.peerId!==m.peerId&&(this._activeSpeaker.peerId=m.peerId,this.emitDailyJSEvent({action:e.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var y=e.show;this._showLocalVideo=y,this.emitDailyJSEvent({action:e.action,show:y});break;case eo:var _=e.enabled;this._activeSpeakerMode!==_&&(this._activeSpeakerMode=_,this.emitDailyJSEvent({action:e.action,enabled:this._activeSpeakerMode}));break;case Ii:case Li:case Ni:this._waitingParticipants=e.allWaitingParticipants,this.emitDailyJSEvent({action:e.action,participant:e.participant});break;case po:w(this._receiveSettings,e.receiveSettings)||(this._receiveSettings=e.receiveSettings,this.emitDailyJSEvent({action:e.action,receiveSettings:e.receiveSettings}));break;case ho:this._maybeUpdateInputSettings(e.inputSettings);break;case"send-settings-updated":w(this._sendSettings,e.sendSettings)||(this._sendSettings=e.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:e.action,sendSettings:e.sendSettings}));break;case"local-audio-level":this._localAudioLevel=e.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=e.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case Gi:var b=e.session_id;this._rmpPlayerState[b]=e.playerState,this.emitDailyJSEvent(e);break;case Hi:delete this._rmpPlayerState[e.session_id],this.emitDailyJSEvent(e);break;case zi:var S=e.session_id,k=this._rmpPlayerState[S];k&&this.compareEqualForRMPUpdateEvent(k,e.remoteMediaPlayerState)||(this._rmpPlayerState[S]=e.remoteMediaPlayerState,this.emitDailyJSEvent(e));break;case"custom-button-click":case"sidebar-view-changed":this.emitDailyJSEvent(e);break;case Oi:var E=this._meetingSessionState.topology!==(e.meetingSessionState&&e.meetingSessionState.topology);this._meetingSessionState=Vs(e.meetingSessionState,this._callObjectMode),(this._callObjectMode||E)&&this.emitDailyJSEvent(e);break;case Ki:this._isScreenSharing=!0,this.emitDailyJSEvent(e);break;case Qi:case Xi:this._isScreenSharing=!1,this.emitDailyJSEvent(e);break;case Vi:case Ui:case Bi:case Ji:case Yi:case Ri:case xi:case Fi:case yi:case _i:case qi:case Wi:case"test-completed":case no:case $i:case so:case co:case uo:case lo:case vo:case fo:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-answered":case"dialout-error":case"dialout-stopped":case"dialout-warning":this.emitDailyJSEvent(e);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(e,t){var n="record";e&&(t.local||!1!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:Ui}))}},{key:"maybeEventRecordingStarted",value:function(e,t){var n="record";e&&(t.local||!0!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:Vi}))}},{key:"_trackStatePlayable",value:function(e){return!(!e||e.state!==Br)}},{key:"_trackChanged",value:function(e,t){return!((null==e?void 0:e.id)===(null==t?void 0:t.id))}},{key:"maybeEventTrackStopped",value:function(e,t,n){var r,i,o=null!==(r=null==t?void 0:t.tracks[e])&&void 0!==r?r:null,a=null!==(i=null==n?void 0:n.tracks[e])&&void 0!==i?i:null,s=null==o?void 0:o.track;if(s){var c=this._trackStatePlayable(o),u=this._trackStatePlayable(a),l=this._trackChanged(s,null==a?void 0:a.track);c&&(u&&!l||this.emitDailyJSEvent({action:ji,track:s,participant:null!=n?n:t,type:e}))}}},{key:"maybeEventTrackStarted",value:function(e,t,n){var r,i,o=null!==(r=null==t?void 0:t.tracks[e])&&void 0!==r?r:null,a=null!==(i=null==n?void 0:n.tracks[e])&&void 0!==i?i:null,s=null==a?void 0:a.track;if(s){var c=this._trackStatePlayable(o),u=this._trackStatePlayable(a),l=this._trackChanged(null==o?void 0:o.track,s);u&&(c&&!l||this.emitDailyJSEvent({action:Di,track:s,participant:n,type:e}))}}},{key:"maybeParticipantTracksStopped",value:function(e,t){if(e)for(var n in e.tracks)this.maybeEventTrackStopped(n,e,t)}},{key:"maybeParticipantTracksStarted",value:function(e,t){if(t)for(var n in t.tracks)this.maybeEventTrackStarted(n,e,t)}},{key:"compareEqualForRMPUpdateEvent",value:function(e,t){var n,r;return e.state===t.state&&(null===(n=e.settings)||void 0===n?void 0:n.volume)===(null===(r=t.settings)||void 0===r?void 0:r.volume)}},{key:"emitDailyJSEvent",value:function(e){try{e.callClientId=this.callClientId,this.emit(e.action,e)}catch(t){console.log("could not emit",e,t)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(e,t){return!(!w(e,t)||e.videoTrack&&t.videoTrack&&(e.videoTrack.id!==t.videoTrack.id||e.videoTrack.muted!==t.videoTrack.muted||e.videoTrack.enabled!==t.videoTrack.enabled)||e.audioTrack&&t.audioTrack&&(e.audioTrack.id!==t.audioTrack.id||e.audioTrack.muted!==t.audioTrack.muted||e.audioTrack.enabled!==t.audioTrack.enabled))}},{key:"nativeUtils",value:function(){return Po()?"undefined"==typeof DailyNativeUtils?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(e){this._updateCallState(this._callState,e)}},{key:"_updateCallState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._isPreparingToJoin;if(e!==this._callState||t!==this._isPreparingToJoin){var n=this._callState,r=this._isPreparingToJoin;this._callState=e,this._isPreparingToJoin=t;var i=this._callState===Nr;this.updateShowAndroidOngoingMeetingNotification(i);var o=vs(n,r),a=vs(this._callState,this._isPreparingToJoin);o!==a&&(this.updateKeepDeviceAwake(a),this.updateDeviceAudioMode(a),this.updateNoOpRecordingEnsuringBackgroundContinuity(a))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=rs,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Jr},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Vs(ns,this._callObjectMode),this._isScreenSharing=!1,this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this._maxAppMessageSize=mo,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(e){Po()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(e){if(Po()&&!this.disableReactNativeAutoDeviceManagement("audio")){var t=e?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(t)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(e){if(Po()&&this.nativeUtils().setShowOngoingMeetingNotification){var t,n,r,i;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var o=this.properties.reactNativeConfig.androidInCallNotification;t=o.title,n=o.subtitle,r=o.iconName,i=o.disableForCustomOverride}i&&(e=!1),this.nativeUtils().setShowOngoingMeetingNotification(e,t,n,r,this.callClientId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(e){Po()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var e;if(Po()){var t=null===(e=this._callMachine())||void 0===e||null===(e=e.store)||void 0===e?void 0:e.getState();for(var n in null==t?void 0:t.streams){var r=t.streams[n];r&&r.pendingTrack&&"audio"===r.pendingTrack.kind&&(r.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(e){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[e]}},{key:"absoluteUrl",value:function(e){if(void 0!==e){var t=document.createElement("a");return t.href=e,t.href}}},{key:"sayHello",value:function(){var e="hello, world.";return console.log(e),e}},{key:"_logUseAfterDestroy",value:function(){var e=Object.values(Za)[0];if(this.needsLoad())if(e&&!e.needsLoad()){var t={action:wo,level:"error",code:this.strictMode?9995:9997};e.sendMessageToCallMachine(t)}else this.strictMode||console.error("You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.");else{var n={action:wo,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(n,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var e=0,t=Object.values(Za);e<t.length;e++){var n=t[e];n._callMachineInitialized?(n.sendMessageToCallMachine({action:wo,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),n._delayDuplicateInstanceLog=!1):n._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(e){var n,r,i,o;if(null!==(n=e.error)&&void 0!==n&&n.type){if(![ri,ti,Zr].includes(e.error.type))return;if(e.error.type===Zr&&e.error.msg.includes("deleted"))return}var a=null!==(r=this.properties)&&void 0!==r&&r.url?new URL(this.properties.url):void 0,s="production";a&&a.host.includes(".staging.daily")&&(s="staging");var c,u,l,d,f,p=Kn({}).filter((function(e){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(e.name)})),h=new hr({dsn:"https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844",transport:br,stackParser:Ar,integrations:p,environment:s}),v=new Fe;if(v.setClient(h),h.init(),this.session_id&&v.setExtra("sessionId",this.session_id),this.properties){var g=Ha({},this.properties);g.userName=g.userName?"[Filtered]":void 0,g.userData=g.userData?"[Filtered]":void 0,g.token=g.token?"[Filtered]":void 0,v.setExtra("properties",g)}if(a){var m=a.searchParams.get("domain");if(!m){var y=a.host.match(/(.*?)\./);m=y&&y[1]||""}m&&v.setTag("domain",m)}e.error&&(v.setTag("fatalErrorType",e.error.type),v.setExtra("errorDetails",e.error.details),(null===(c=e.error.details)||void 0===c?void 0:c.uri)&&v.setTag("serverAddress",e.error.details.uri),(null===(u=e.error.details)||void 0===u?void 0:u.workerGroup)&&v.setTag("workerGroup",e.error.details.workerGroup),(null===(l=e.error.details)||void 0===l?void 0:l.geoGroup)&&v.setTag("geoGroup",e.error.details.geoGroup),(null===(d=e.error.details)||void 0===d?void 0:d.on)&&v.setTag("connectionAttempt",e.error.details.on),null!==(f=e.error.details)&&void 0!==f&&f.bundleUrl&&(v.setTag("bundleUrl",e.error.details.bundleUrl),v.setTag("bundleError",e.error.details.sourceError.type))),v.setTags({callMode:this._callObjectMode?Po()?"reactNative":null!==(i=this.properties)&&void 0!==i&&null!==(i=i.dailyConfig)&&void 0!==i&&null!==(i=i.callMode)&&void 0!==i&&i.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:t.version()});var _=(null===(o=e.error)||void 0===o?void 0:o.msg)||e.errorMsg;v.captureException(new Error(_))}},{key:"_callMachine",value:function(){var e;return null===(e=window._daily)||void 0===e||null===(e=e.instances)||void 0===e||null===(e=e[this.callClientId])||void 0===e?void 0:e.callMachine}},{key:"_maybeUpdateInputSettings",value:function(e){if(!w(this._inputSettings,e)){var t=this._getInputSettings();this._inputSettings=e;var n=this._getInputSettings();w(t,n)||this.emitDailyJSEvent({action:ho,inputSettings:n})}}}],[{key:"supportedBrowser",value:function(){if(Po())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var e=E().getParser(Oo());return{supported:!!xo(),mobile:"mobile"===e.getPlatformType(),name:e.getBrowserName(),version:e.getBrowserVersion(),supportsFullscreen:!!Lo(),supportsScreenShare:!!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia&&(function(e,t){if(!e||!t)return!0;switch(e){case"Chrome":return t.major>=75;case"Safari":return RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection")&&!(13===t.major&&0===t.minor&&0===t.point);case"Firefox":return t.major>=67}return!0}(Uo(),Bo())||Po())),supportsSfu:!!xo(),supportsVideoProcessing:jo(),supportsAudioProcessing:Ro()}}},{key:"version",value:function(){return"0.79.0"}},{key:"createCallObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.layout="none",new t(null,e)}},{key:"wrap",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ss(),!e||!e.contentWindow||"string"!=typeof e.src)throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return n.layout||(n.customLayout?n.layout="custom-v1":n.layout="browser"),new t(e,n)}},{key:"createFrame",value:function(e,n){var r,i;Ss(),e&&n?(r=e,i=n):e&&e.append?(r=e,i={}):(r=document.body,i=e||{});var o=i.iframeStyle;o||(o=r===document.body?{position:"fixed",border:"1px solid black",backgroundColor:"white",width:"375px",height:"450px",right:"1em",bottom:"1em"}:{border:0,width:"100%",height:"100%"});var a=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?a.allow="microphone, camera":a.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",a.style.visibility="hidden",r.appendChild(a),a.style.visibility=null,Object.keys(o).forEach((function(e){return a.style[e]=o[e]})),i.layout||(i.customLayout?i.layout="custom-v1":i.layout="browser");try{return new t(a,i)}catch(e){throw r.removeChild(a),e}}},{key:"createTransparentFrame",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ss();var n=document.createElement("iframe");return n.allow="microphone; camera; autoplay",n.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 0;\n pointer-events: none;\n ",document.body.appendChild(n),e.layout||(e.layout="custom-v1"),t.wrap(n,e)}},{key:"getCallInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e?Za[e]:Object.values(Za)[0]}}]);var n,a,s,d,h,g,y,b,S,k,M,O,P,I,L,N,D,j,R,x,F,V,U,B,J,Y,$,q,W,G,z,H,K,Q,X,Z,ee,te}(_());function ps(e,t){var n={};for(var r in e)if(e[r]instanceof MediaStreamTrack)console.warn("MediaStreamTrack found in props or cache.",r),n[r]=ko;else if("dailyConfig"===r){if(e[r].modifyLocalSdpHook){var i=window._daily.instances[t].customCallbacks||{};i.modifyLocalSdpHook=e[r].modifyLocalSdpHook,window._daily.instances[t].customCallbacks=i,delete e[r].modifyLocalSdpHook}if(e[r].modifyRemoteSdpHook){var o=window._daily.instances[t].customCallbacks||{};o.modifyRemoteSdpHook=e[r].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=o,delete e[r].modifyRemoteSdpHook}n[r]=e[r]}else n[r]=e[r];return n}function hs(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==Nr){var n="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," only supported after join.");throw t&&(n+=" ".concat(t)),console.error(n),new Error(n)}}function vs(e,t){return[Lr,Nr].includes(e)||t}function gs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"This daily-js method",r=arguments.length>3?arguments[3]:void 0;if(vs(e,t)){var i="".concat(n," not supported after joining a meeting.");throw r&&(i+=" ".concat(r)),console.error(i),new Error(i)}}function ms(e){var t=arguments.length>2?arguments[2]:void 0;if(!e){var n="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method",arguments.length>3&&void 0!==arguments[3]&&arguments[3]?" requires preAuth() or startCamera() to initialize call state.":" requires preAuth(), startCamera(), or join() to initialize call state.");throw t&&(n+=" ".concat(t)),console.error(n),new Error(n)}}function ys(e){if(e){var t="A pre-call quality test is in progress. Please try ".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," again once testing has completed. Use stopTestCallQuality() to end it early.");throw console.error(t),new Error(t)}}function _s(e){if(!e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(t),new Error(t)}}function bs(e){if(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," is only supported as part of Daily's Prebuilt");throw console.error(t),new Error(t)}}function Ss(){if(Po())throw new Error("This daily-js method is not currently supported in React Native")}function ws(){if(!Po())throw new Error("This daily-js method is only supported in React Native")}function ks(e){if(void 0===e)return!0;var t;if("string"==typeof e)t=e;else try{t=JSON.stringify(e),w(JSON.parse(t),e)||console.warn("The userData provided will be modified when serialized.")}catch(e){throw Error("userData must be serializable to JSON: ".concat(e))}if(t.length>4096)throw Error("userData is too large (".concat(t.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function Es(e,t){for(var n=t.allowAllParticipantsKey,r=function(e){var t=["local"];return n||t.push("*"),e&&!t.includes(e)},i=function(e){return!!(void 0===e.layer||Number.isInteger(e.layer)&&e.layer>=0||"inherit"===e.layer)},o=function(e){return!(!e||e.video&&!i(e.video)||e.screenVideo&&!i(e.screenVideo))},a=0,s=Object.entries(e);a<s.length;a++){var c=m(s[a],2),u=c[0],l=c[1];if(!r(u)||!o(l))return!1}return!0}function Ts(e){if("object"!==o(e))return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=m(n[t],2),i=r[0],a=r[1];switch(i){case"video":if("object"!==o(a))return!1;for(var s=0,c=Object.entries(a);s<c.length;s++){var u=m(c[s],2),l=u[0],d=u[1];switch(l){case"processor":if(!Cs(d))return!1;break;case"settings":if(!Os(d))return!1;break;default:return!1}}break;case"audio":if("object"!==o(a))return!1;for(var f=0,p=Object.entries(a);f<p.length;f++){var h=m(p[f],2),v=h[0],g=h[1];switch(v){case"processor":if(!As(g))return!1;break;case"settings":if(!Os(g))return!1;break;default:return!1}}break;default:return!1}}return!0}function Ms(e,t,n){var r,i=[];e.video&&e.video.processor&&(jo(null!==(r=null==t?void 0:t.useLegacyVideoProcessor)&&void 0!==r&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push("video"))),e.audio&&e.audio.processor&&(Ro()||(e.audio.settings?delete e.audio.processor:delete e.audio,i.push("audio"))),i.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(i.join(", "))),e.audio&&e.audio.settings&&(e.audio.settings.customTrack?(n.audioTrack=e.audio.settings.customTrack,e.audio.settings={customTrack:ko}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:ko}):delete n.videoTrack)}function As(e){if(Po())return console.warn("Video processing is not yet supported in React Native"),!1;var t,n=["type"];return!(!e||"object"!==o(e)||(Object.keys(e).filter((function(e){return!n.includes(e)})).forEach((function(t){console.warn("invalid key inputSettings -> audio -> processor : ".concat(t)),delete e[t]})),t=e.type,"string"!=typeof t||!Object.values(To).includes(t)&&(console.error("inputSettings audio processor type invalid"),1)))}function Cs(e){if(Po())return console.warn("Video processing is not yet supported in React Native"),!1;var t,n=["type","config"];if(!e)return!1;if("object"!==o(e))return!1;if("string"!=typeof(t=e.type)||!Object.values(Eo).includes(t)&&(console.error("inputSettings video processor type invalid"),1))return!1;if(e.config){if("object"!==o(e.config))return!1;if(!function(e,t){var n=Object.keys(t);if(0===n.length)return!0;var r="invalid object in inputSettings -> video -> processor -> config";switch(e){case Eo.BGBLUR:return n.length>1||"strength"!==n[0]?(console.error(r),!1):!("number"!=typeof t.strength||t.strength<=0||t.strength>1||isNaN(t.strength))||(console.error("".concat(r,"; expected: {0 < strength <= 1}, got: ").concat(t.strength)),!1);case Eo.BGIMAGE:return!(void 0!==t.source&&!function(e){return"default"===e.source?(e.type="default",!0):e.source instanceof ArrayBuffer||(O(e.source)?(e.type="url",!!function(e){var t=new URL(e),n=t.pathname;if("data:"===t.protocol)try{var r=n.substring(n.indexOf(":")+1,n.indexOf(";")).split("/")[1];return Ao.includes(r)}catch(e){return console.error("failed to deduce blob content type",e),!1}var i=n.split(".").at(-1).toLowerCase().trim();return Ao.includes(i)}(e.source)||(console.error("invalid image type; supported types: [".concat(Ao.join(", "),"]")),!1)):(t=e.source,n=Number(t),isNaN(n)||!Number.isInteger(n)||n<=0||n>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(e.type="daily-preselect",!0)));var t,n}(t));default:return!0}}(e.type,e.config))return!1}return Object.keys(e).filter((function(e){return!n.includes(e)})).forEach((function(t){console.warn("invalid key inputSettings -> video -> processor : ".concat(t)),delete e[t]})),!0}function Os(e){return"object"===o(e)&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function Ps(){var e=Object.values(Eo).join(" | "),t=Object.values(To).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(e," ], config?: {} } }, audio?: { processor: {type: [ ").concat(t," ] } } }")}function Is(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(Wr).concat(t?' | "'.concat(Gr,'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function Ls(){return"customIntegrations should be an object of type ".concat(JSON.stringify(us),".")}function Ns(e){if(e&&"object"!==o(e)||Array.isArray(e))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(cs),".")),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=m(n[t],1)[0],i=0,a=Object.entries(e[r]);i<a.length;i++){var s=m(a[i],2),c=s[0],u=s[1],l=cs.id[c];if(!l)return console.error("customTrayButton does not support key ".concat(c)),!1;switch(c){case"iconPath":case"iconPathDarkMode":if(!O(u))return console.error("customTrayButton ".concat(c," should be a url.")),!1;break;case"visualState":if(!["default","sidebar-open","active"].includes(u))return console.error("customTrayButton ".concat(c," should be ").concat(l,". Got: ").concat(u)),!1;break;default:if(o(u)!==l)return console.error("customTrayButton ".concat(c," should be a ").concat(l,".")),!1}}return!0}function Ds(e){if(!e||e&&"object"!==o(e)||Array.isArray(e))return console.error(Ls()),!1;for(var t=function(e){return"".concat(e," should be ").concat(us.id[e])},n=function(e,t){return console.error("customIntegration ".concat(e,": ").concat(t))},r=0,i=Object.entries(e);r<i.length;r++){var a=m(i[r],1)[0];if(!("label"in e[a]))return n(a,"label is required"),!1;if(!("location"in e[a]))return n(a,"location is required"),!1;if(!("src"in e[a])&&!("srcdoc"in e[a]))return n(a,"src or srcdoc is required"),!1;for(var s=0,c=Object.entries(e[a]);s<c.length;s++){var u=m(c[s],2),l=u[0],d=u[1];switch(l){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if("string"!=typeof d)return n(a,t(l)),!1;break;case"iconURL":if(!O(d))return n(a,"".concat(l," should be a url")),!1;break;case"src":if("srcdoc"in e[a])return n(a,"cannot have both src and srcdoc"),!1;if(!O(d))return n(a,'src "'.concat(d,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in e[a])return n(a,"cannot have both src and srcdoc"),!1;if("string"!=typeof d)return n(a,t(l)),!1;break;case"location":if(!["main","sidebar"].includes(d))return n(a,t(l)),!1;break;case"controlledBy":if("*"!==d&&"owners"!==d&&(!Array.isArray(d)||d.some((function(e){return"string"!=typeof e}))))return n(a,t(l)),!1;break;case"shared":if((!Array.isArray(d)||d.some((function(e){return"string"!=typeof e})))&&"owners"!==d&&"boolean"!=typeof d)return n(a,t(l)),!1;break;default:if(!us.id[l])return console.error("customIntegration does not support key ".concat(l)),!1}}}return!0}function js(e,t){if(void 0===t)return!1;switch(o(t)){case"string":return o(e)===t;case"object":if("object"!==o(e))return!1;for(var n in e)if(!js(e[n],t[n]))return!1;return!0;default:return!1}}function Rs(e,t){var n=e.sessionId,r=e.toEndPoint,i=e.callerId,o=e.useSipRefer;if(!n||!r)throw new Error("".concat(t,"() requires a sessionId and toEndPoint"));if("string"!=typeof n||"string"!=typeof r)throw new Error("Invalid paramater: sessionId and toEndPoint must be of type string");if(o&&!r.startsWith("sip:"))throw new Error('"toEndPoint" must be a "sip" address');if(!r.startsWith("sip:")&&!r.startsWith("+"))throw new Error("toEndPoint: ".concat(r,' must starts with either "sip:" or "+"'));if(i&&"string"!=typeof i)throw new Error("callerId must be of type string");if(i&&!r.startsWith("+"))throw new Error("callerId is only valid when transferring to a PSTN number")}function xs(e){if("object"!==o(e))throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(e.state&&!Object.values(Mo).includes(e.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(Mo));if(e.volume){if("number"!=typeof e.volume)throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(e.volume<0||e.volume>2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function Fs(e,t,n){return!("number"!=typeof e||e<t||e>n)}function Vs(e,t){return e&&!t&&delete e.data,e}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}return n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(781)}()})),globalThis&&globalThis.Daily&&(globalThis.DailyIframe=globalThis.Daily);