@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:
8 lines • 267 kB
JavaScript
function e(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 t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){return n="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},n(e)}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t){if(t&&("object"==n(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 s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function l(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&&c(e,t)}function u(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(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 h(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){d(o,r,i,a,s,"next",e)}function s(e){d(o,r,i,a,s,"throw",e)}a(void 0)})}}function p(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 f(e,t){if(e){if("string"==typeof e)return p(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)?p(e,t):void 0}}function v(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,l=!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){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||f(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.")}()}function g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var m,y={exports:{}};var b=function(){if(m)return y.exports;m=1;var e,t="object"==typeof Reflect?Reflect:null,n=t&&"function"==typeof t.apply?t.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}y.exports=i,y.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))}f(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&f(e,"error",t,n)}(e,i,{once:!0})})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,o,c,l;if(a(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),c=o[t]),void 0===c)c=o[t]=n,++e._eventsCount;else if("function"==typeof c?c=o[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(i=s(e))>0&&c.length>i&&!c.warned){c.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=c.length,l=u,console&&console.warn&&console.warn(l)}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 u(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 d(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):p(i,i.length)}function h(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 p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(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)})}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),i.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},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(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},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);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)n(c,this,t);else{var l=c.length,u=p(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,u(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,u(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,i,o,s;if(a(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){s=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,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.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},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},y.exports}(),_=g(b),w=Object.prototype.hasOwnProperty;function k(e,t,n){for(n of e.keys())if(S(n,t))return n}function S(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--&&S(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=k(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=k(t,i)))return!1;if(!S(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(w.call(e,n)&&++r&&!w.call(t,n))return!1;if(!(n in t)||!S(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}const M={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},E={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},C={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},T={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},O={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"};class P{static getFirstMatch(e,t){const n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){const n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(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}}static getMacOSVersionName(e){const t=e.split(".").splice(0,2).map(e=>parseInt(e,10)||0);t.push(0);const n=t[0],r=t[1];if(10===n)switch(r){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}switch(n){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";default:return}}static getAndroidVersionName(e){const t=e.split(".").splice(0,2).map(e=>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}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,n=!1){const r=P.getVersionPrecision(e),i=P.getVersionPrecision(t);let o=Math.max(r,i),a=0;const s=P.map([e,t],e=>{const t=o-P.getVersionPrecision(e),n=e+new Array(t+1).join(".0");return P.map(n.split("."),e=>new Array(20-e.length).join("0")+e).reverse()});for(n&&(a=o-Math.min(r,i)),o-=1;o>=a;){if(s[0][o]>s[1][o])return 1;if(s[0][o]===s[1][o]){if(o===a)return 0;o-=1}else if(s[0][o]<s[1][o])return-1}}static map(e,t){const n=[];let r;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n}static find(e,t){let n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){const r=e[n];if(t(r,n))return r}}static assign(e,...t){const n=e;let r,i;if(Object.assign)return Object.assign(e,...t);for(r=0,i=t.length;r<i;r+=1){const e=t[r];if("object"==typeof e&&null!==e){Object.keys(e).forEach(t=>{n[t]=e[t]})}}return e}static getBrowserAlias(e){return M[e]}static getBrowserTypeByAlias(e){return E[e]||""}}const A=/version\/(\d+(\.?_?\d+)+)/i,x=[{test:[/gptbot/i],describe(e){const t={name:"GPTBot"},n=P.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/chatgpt-user/i],describe(e){const t={name:"ChatGPT-User"},n=P.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/oai-searchbot/i],describe(e){const t={name:"OAI-SearchBot"},n=P.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe(e){const t={name:"ClaudeBot"},n=P.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/omgilibot/i,/webzio-extended/i],describe(e){const t={name:"Omgilibot"},n=P.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/diffbot/i],describe(e){const t={name:"Diffbot"},n=P.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/perplexitybot/i],describe(e){const t={name:"PerplexityBot"},n=P.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/perplexity-user/i],describe(e){const t={name:"Perplexity-User"},n=P.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/youbot/i],describe(e){const t={name:"YouBot"},n=P.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/meta-webindexer/i],describe(e){const t={name:"Meta-WebIndexer"},n=P.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/meta-externalads/i],describe(e){const t={name:"Meta-ExternalAds"},n=P.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/meta-externalagent/i],describe(e){const t={name:"Meta-ExternalAgent"},n=P.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/meta-externalfetcher/i],describe(e){const t={name:"Meta-ExternalFetcher"},n=P.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=P.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/linespider/i],describe(e){const t={name:"Linespider"},n=P.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/amazonbot/i],describe(e){const t={name:"AmazonBot"},n=P.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/bingbot/i],describe(e){const t={name:"BingCrawler"},n=P.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/baiduspider/i],describe(e){const t={name:"BaiduSpider"},n=P.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/duckduckbot/i],describe(e){const t={name:"DuckDuckBot"},n=P.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/ia_archiver/i],describe(e){const t={name:"InternetArchiveCrawler"},n=P.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:()=>({name:"FacebookExternalHit"})},{test:[/slackbot/i,/slack-imgProxy/i],describe(e){const t={name:"SlackBot"},n=P.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:()=>({name:"YahooSlurp"})},{test:[/yandexbot/i,/yandexmobilebot/i],describe:()=>({name:"YandexBot"})},{test:[/pingdom/i],describe:()=>({name:"PingdomBot"})},{test:[/opera/i],describe(e){const t={name:"Opera"},n=P.getFirstMatch(A,e)||P.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=P.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=P.getFirstMatch(A,e)||P.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=P.getFirstMatch(A,e)||P.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){const t={name:"Pale Moon"},n=P.getFirstMatch(A,e)||P.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=P.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=P.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=P.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=P.getFirstMatch(A,e)||P.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=P.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=P.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=P.getFirstMatch(A,e)||P.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=P.getFirstMatch(A,e)||P.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=P.getFirstMatch(A,e)||P.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=P.getFirstMatch(A,e)||P.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=P.getFirstMatch(A,e)||P.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=P.getFirstMatch(A,e)||P.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=P.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=P.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=P.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=P.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=P.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=P.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=P.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=P.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=P.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=P.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=P.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=P.getFirstMatch(A,e)||P.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=P.getFirstMatch(A,e)||P.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=P.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=P.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=P.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/librewolf/i],describe(e){const t={name:"LibreWolf"},n=P.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=P.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=P.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe(e){const t={name:"Sogou Browser"},n=P.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),r=P.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),i=P.getFirstMatch(/se ([\d.]+)x/i,e),o=n||r||i;return o&&(t.version=o),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=P.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i),describe(e,t){const n={name:"DuckDuckGo"};if(t){const e=t.getBrandVersion("DuckDuckGo");if(e)return n.version=e,n}const r=P.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return r&&(n.version=r),n}},{test:e=>e.hasBrand("Brave"),describe(e,t){const n={name:"Brave"};if(t){const e=t.getBrandVersion("Brave");if(e)return n.version=e,n}return n}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=P.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=P.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=P.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=P.getFirstMatch(A,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:P.getFirstMatch(t,e),version:P.getSecondMatch(t,e)}}}];var j=[{test:[/Roku\/DVP/],describe(e){const t=P.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:T.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=P.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:T.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=P.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=P.getWindowsVersionName(t);return{name:T.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:T.iOS},n=P.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=P.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=P.getMacOSVersionName(t),r={name:T.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=P.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:T.iOS,version:t}}},{test:[/OpenHarmony/i],describe(e){const t=P.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:T.HarmonyOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=P.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=P.getAndroidVersionName(t),r={name:T.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=P.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:T.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=P.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||P.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||P.getFirstMatch(/\bbb(\d+)/i,e);return{name:T.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=P.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:T.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=P.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:T.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:T.Linux})},{test:[/CrOS/],describe:()=>({name:T.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=P.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:T.PlayStation4,version:t}}}],I=[{test:[/googlebot/i],describe:()=>({type:C.bot,vendor:"Google"})},{test:[/linespider/i],describe:()=>({type:C.bot,vendor:"Line"})},{test:[/amazonbot/i],describe:()=>({type:C.bot,vendor:"Amazon"})},{test:[/gptbot/i],describe:()=>({type:C.bot,vendor:"OpenAI"})},{test:[/chatgpt-user/i],describe:()=>({type:C.bot,vendor:"OpenAI"})},{test:[/oai-searchbot/i],describe:()=>({type:C.bot,vendor:"OpenAI"})},{test:[/baiduspider/i],describe:()=>({type:C.bot,vendor:"Baidu"})},{test:[/bingbot/i],describe:()=>({type:C.bot,vendor:"Bing"})},{test:[/duckduckbot/i],describe:()=>({type:C.bot,vendor:"DuckDuckGo"})},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:()=>({type:C.bot,vendor:"Anthropic"})},{test:[/omgilibot/i,/webzio-extended/i],describe:()=>({type:C.bot,vendor:"Webz.io"})},{test:[/diffbot/i],describe:()=>({type:C.bot,vendor:"Diffbot"})},{test:[/perplexitybot/i],describe:()=>({type:C.bot,vendor:"Perplexity AI"})},{test:[/perplexity-user/i],describe:()=>({type:C.bot,vendor:"Perplexity AI"})},{test:[/youbot/i],describe:()=>({type:C.bot,vendor:"You.com"})},{test:[/ia_archiver/i],describe:()=>({type:C.bot,vendor:"Internet Archive"})},{test:[/meta-webindexer/i],describe:()=>({type:C.bot,vendor:"Meta"})},{test:[/meta-externalads/i],describe:()=>({type:C.bot,vendor:"Meta"})},{test:[/meta-externalagent/i],describe:()=>({type:C.bot,vendor:"Meta"})},{test:[/meta-externalfetcher/i],describe:()=>({type:C.bot,vendor:"Meta"})},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:()=>({type:C.bot,vendor:"Meta"})},{test:[/slackbot/i,/slack-imgProxy/i],describe:()=>({type:C.bot,vendor:"Slack"})},{test:[/yahoo/i],describe:()=>({type:C.bot,vendor:"Yahoo"})},{test:[/yandexbot/i,/yandexmobilebot/i],describe:()=>({type:C.bot,vendor:"Yandex"})},{test:[/pingdom/i],describe:()=>({type:C.bot,vendor:"Pingdom"})},{test:[/huawei/i],describe(e){const t=P.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:C.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:C.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:C.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:C.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:C.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:C.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:C.tablet})},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=P.getFirstMatch(/(ipod|iphone)/i,e);return{type:C.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:C.mobile,vendor:"Nexus"})},{test:[/Nokia/i],describe(e){const t=P.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:C.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:()=>({type:C.mobile})},{test:e=>"blackberry"===e.getBrowserName(!0),describe:()=>({type:C.mobile,vendor:"BlackBerry"})},{test:e=>"bada"===e.getBrowserName(!0),describe:()=>({type:C.mobile})},{test:e=>"windows phone"===e.getBrowserName(),describe:()=>({type:C.mobile,vendor:"Microsoft"})},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:()=>({type:C.tablet})},{test:e=>"android"===e.getOSName(!0),describe:()=>({type:C.mobile})},{test:[/smart-?tv|smarttv/i],describe:()=>({type:C.tv})},{test:[/netcast/i],describe:()=>({type:C.tv})},{test:e=>"macos"===e.getOSName(!0),describe:()=>({type:C.desktop,vendor:"Apple"})},{test:e=>"windows"===e.getOSName(!0),describe:()=>({type:C.desktop})},{test:e=>"linux"===e.getOSName(!0),describe:()=>({type:C.desktop})},{test:e=>"playstation 4"===e.getOSName(!0),describe:()=>({type:C.tv})},{test:e=>"roku"===e.getOSName(!0),describe:()=>({type:C.tv})}],L=[{test:e=>"microsoft edge"===e.getBrowserName(!0),describe(e){if(/\sedg\//i.test(e))return{name:O.Blink};const t=P.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:O.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:O.Trident},n=P.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:O.Presto},n=P.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:O.Gecko},n=P.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:O.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:O.WebKit},n=P.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class D{constructor(e,t=!1,n=null){if(null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e;let r=!1;"boolean"==typeof t?(r=t,this._hints=n):this._hints=null!=t&&"object"==typeof t?t:null,this.parsedResult={},!0!==r&&this.parse()}getHints(){return this._hints}hasBrand(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;const t=e.toLowerCase();return this._hints.brands.some(e=>e.brand&&e.brand.toLowerCase()===t)}getBrandVersion(e){if(!this._hints||!Array.isArray(this._hints.brands))return;const t=e.toLowerCase(),n=this._hints.brands.find(e=>e.brand&&e.brand.toLowerCase()===t);return n?n.version:void 0}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=P.find(x,e=>{if("function"==typeof e.test)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA(),this)),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=P.find(j,e=>{if("function"==typeof e.test)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};const e=P.find(I,e=>{if("function"==typeof e.test)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=P.find(L,e=>{if("function"==typeof e.test)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return P.assign({},this.parsedResult)}satisfies(e){const t={};let n=0;const r={};let i=0;if(Object.keys(e).forEach(o=>{const a=e[o];"string"==typeof a?(r[o]=a,i+=1):"object"==typeof a&&(t[o]=a,n+=1)}),n>0){const e=Object.keys(t),n=P.find(e,e=>this.isOS(e));if(n){const e=this.satisfies(t[n]);if(void 0!==e)return e}const r=P.find(e,e=>this.isPlatform(e));if(r){const e=this.satisfies(t[r]);if(void 0!==e)return e}}if(i>0){const e=Object.keys(r),t=P.find(e,e=>this.isBrowser(e,!0));if(void 0!==t)return this.compareVersion(r[t])}}isBrowser(e,t=!1){const n=this.getBrowserName().toLowerCase();let r=e.toLowerCase();const i=P.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1;const 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(P.compareVersions(i,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(e=>this.is(e))}}
/*!
* Bowser - a browser detector
* https://github.com/bowser-js/bowser
* MIT License | (c) Dustin Diaz 2012-2015
* MIT License | (c) Denis Demchenko 2015-2019
*/class N{static getParser(e,t=!1,n=null){if("string"!=typeof e)throw new Error("UserAgent should be a string");return new D(e,t,n)}static parse(e,t=null){return new D(e,t).getResult()}static get BROWSER_MAP(){return E}static get ENGINE_MAP(){return O}static get OS_MAP(){return T}static get PLATFORMS_MAP(){return C}}function F(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(){return Date.now()+Math.random().toString()}function B(){throw new Error("Method must be implemented in subclass")}var U=["daily.co","dailywebrtc.com","dailywebrtc.net"],V=null;function J(){return V}function $(e){(null===e||U.includes(e))&&(V=e)}function q(e){try{var t=new URL(e).hostname;return U.find(function(e){return t===e||t.endsWith(".".concat(e))})||null}catch(e){return null}}function z(e,t){return null!=t&&t.proxyUrl?t.proxyUrl+("/"===t.proxyUrl.slice(-1)?"":"/")+e.substring(8):e}function W(e,t){var n=U.find(function(t){return e.includes(t)});return n?e.replace(n,t):e}function G(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null!=V?V:U[0];if(null!=e&&e.callObjectBundleUrlOverride)return console.warn("The callObjectBundleUrlOverride property is deprecated and will be removed. Please use bundlePathOverride instead. When providing a bundlePathOverride, the URL should point to the directory containing all Daily bundles (call-machine-object-bundle.js and audio-processor-bundle.js)."),W(e.callObjectBundleUrlOverride,t);var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null!=V?V:U[0];if(t&&""!==t.trim()||(t=null!=V?V:U[0]),null!=e&&e.bundlePathOverride){var n=W(e.bundlePathOverride,t);return n.endsWith("/")?n.slice(0,-1):n}if(null!=e&&e.callObjectBundleUrlOverride){var r=W(e.callObjectBundleUrlOverride,t),i=r.substring(0,r.lastIndexOf("/"));return i.endsWith("/")?i.slice(0,-1):i}var o=z("https://c.".concat(t,"/call-machine/versioned/","0.92.2","/static"),e);return o.endsWith("/")?o.slice(0,-1):o}(e,t)+"/call-machine-object-bundle.js";return n}function H(e){var t=(null==e?void 0:e.bundlePathOverride)||(null==e?void 0:e.callObjectBundleUrlOverride);return!(!t||U.some(function(e){return t.includes(e)}))||Boolean((null==e?void 0:e.proxyUrl)||function(){try{return"undefined"!=typeof localStorage&&"1"===localStorage.getItem("daily:disable-base-domain-fallback")}catch(e){return!1}}())}function Q(e){try{var t,n=null!=e?e:window.location.hostname;return null!==(t=U.find(function(e){return n===e||n.endsWith(".".concat(e))}))&&void 0!==t?t:null}catch(e){return null}}function Y(e,t){var n,r=q(e);if(!r||H(t))return[e];var i=null!==(n=null!=V?V:Q())&&void 0!==n?n:U[0];return(i===U[0]?U:[i].concat(F(U.filter(function(e){return e!==i})))).map(function(t){return t===r?e:function(e,t,n){try{var r=new URL(e);return r.hostname.endsWith(".".concat(t))?r.hostname=r.hostname.slice(0,-t.length)+n:r.hostname===t&&(r.hostname=n),r.toString()}catch(t){return e}}(e,r,t)})}function K(e){try{new URL(e)}catch(e){return!1}return!0}const X="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Z="8.55.2",ee=globalThis;function te(e,t,n){const r=n||ee,i=r.__SENTRY__=r.__SENTRY__||{},o=i[Z]=i[Z]||{};return o[e]||(o[e]=t())}const ne="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,re=["debug","info","warn","error","log","assert","trace"],ie={};function oe(e){if(!("console"in ee))return e();const t=ee.console,n={},r=Object.keys(ie);r.forEach(e=>{const r=ie[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}const ae=te("logger",function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ne?re.forEach(n=>{t[n]=(...t)=>{e&&oe(()=>{ee.console[n](`Sentry Logger [${n}]:`,...t)})}}):re.forEach(e=>{t[e]=()=>{}}),t}),se="?",ce=/\(error: (.*)\)/,le=/captureMessage|captureException/;function ue(e){return e[e.length-1]||{}}const de="<anonymous>";function he(e){try{return e&&"function"==typeof e&&e.name||de}catch(e){return de}}function pe(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 fe={},ve={};function ge(e,t){fe[e]=fe[e]||[],fe[e].push(t)}function me(e,t){if(!ve[e]){ve[e]=!0;try{t()}catch(t){ne&&ae.error(`Error while instrumenting ${e}`,t)}}}function ye(e,t){const n=e&&fe[e];if(n)for(const r of n)try{r(t)}catch(t){ne&&ae.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${he(r)}\nError:`,t)}}let be=null;function _e(){be=ee.onerror,ee.onerror=function(e,t,n,r,i){return ye("error",{column:r,error:i,line:n,msg:e,url:t}),!!be&&be.apply(this,arguments)},ee.onerror.__SENTRY_INSTRUMENTED__=!0}let we=null;function ke(){we=ee.onunhandledrejection,ee.onunhandledrejection=function(e){return ye("unhandledrejection",e),!we||we.apply(this,arguments)},ee.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Se(){return Me(ee),ee}function Me(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Z,t[Z]=t[Z]||{}}const Ee=Object.prototype.toString;function Ce(e){switch(Ee.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ne(e,Error)}}function Te(e,t){return Ee.call(e)===`[object ${t}]`}function Oe(e){return Te(e,"ErrorEvent")}function Pe(e){return Te(e,"DOMError")}function Ae(e){return Te(e,"String")}function xe(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function je(e){return null===e||xe(e)||"object"!=typeof e&&"function"!=typeof e}function Ie(e){return Te(e,"Object")}function Le(e){return"undefined"!=typeof Event&&Ne(e,Event)}function De(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Ne(e,t){try{return e instanceof t}catch(e){return!1}}function Fe(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const Re=ee;function Be(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 l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(l=Ue(n,u),!("html"===l||o>1&&a+i.length*c+l.length>=d));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(s)}catch(e){return"<unknown>"}}function Ue(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(Re.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&&Ae(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 Ve(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function Je(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{Fe(r)?n.push("[VueViewModel]"):n.push(String(r))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function $e(e,t,n=!1){return!!Ae(e)&&(Te(t,"RegExp")?t.test(e):!!Ae(t)&&(n?e===t:e.includes(t)))}function qe(e,t=[],n=!1){return t.some(t=>$e(e,t,n))}function ze(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);"function"==typeof i&&Ge(i,r);try{e[t]=i}catch(n){ne&&ae.log(`Failed to replace method "${t}" in object`,e)}}function We(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){ne&&ae.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Ge(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,We(e,"__sentry_original__",t)}catch(e){}}function He(e){return e.__sentry_original__}function Qe(e){if(Ce(e))return{message:e.message,name:e.name,stack:e.stack,...Ke(e)};if(Le(e)){const t={type:e.type,target:Ye(e.target),currentTarget:Ye(e.currentTarget),...Ke(e)};return"undefined"!=typeof CustomEvent&&Ne(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Ye(e){try{return t=e,"undefined"!=typeof Element&&Ne(t,Element)?Be(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}var t}function Ke(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 Xe(e){return Ze(e,new Map)}function Ze(e,t){if(function(e){if(!Ie(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]=Ze(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(Ze(e,t))}),r}return e}function et(){return Date.now()/1e3}const tt=function(){const{performance:e}=ee;if(!e||!e.now)return et;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function nt(){const e=ee,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 rt(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function it(e){const{message:t,event_id:n}=e;if(t)return t;const r=rt(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function ot(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 at(e,t){const n=rt(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 st(e){if(function(e){try{return e.__sentry_captured__}catch(e){}}(e))return!0;try{We(e,"__sentry_captured__",!0)}catch(e){}return!1}var ct;function lt(e){return new dt(t=>{t(e)})}function ut(e){return new dt((t,n)=>{n(e)})}(()=>{const{performance:e}=ee;if(!e||!e.now)return;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&&e.timeOrigin)})(),function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(ct||(ct={}));class dt{constructor(e){dt.prototype.__init.call(this),dt.prototype.__init2.call(this),dt.prototype.__init3.call(this),dt.prototype.__init4.call(this),this._state=ct.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new dt((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 dt((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(ct.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(ct.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===ct.PENDING&&(De(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===ct.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===ct.RESOLVED&&e[1](this._value),this._state===ct.REJECTED&&e[2](this._value),e[0]=!0)})}}}function ht(e){const t=tt(),n={sid:nt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Xe({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&&pt(n,e),n}function pt(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||tt(),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:nt()),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 ft(){return nt()}function vt(){return nt().substring(16)}function gt(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]=gt(r[e],t[e],n-1));return r}const mt="_sentrySpan";function yt(e,t){t?We(e,mt,t):delete e[mt]}function bt(e){return e[mt]}class _t{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:ft(),spanId:vt()}}clone(){const e=new _t;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,yt(e,bt(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&&pt(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 wt?[t.getScopeData(),t.getRequestSession()]:Ie(t)?[e,e.requestSession]:[],{tags:i,extra:o,user:a,contexts:s,level:c,fingerprint:l=[],propagationContext:u}=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),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),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,yt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ft()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:et(),...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:bt(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=gt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:vt(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:nt();if(!this._client)return ae.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:nt();if(!this._client)return ae.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:nt();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(ae.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 wt=_t;class kt{constructor(e,t){let n,r;n=e||new wt,r=t||new wt,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 De(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 St(){const e=Me(Se());return e.stack=e.stack||new kt(te("defaultCurrentScope",()=>new wt),te("defaultIsolationScope",()=>new wt))}function Mt(e){return St().withScope(e)}function Et(e,t){const n=St();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Ct(e){return St().withScope(()=>e(St().getIsolationScope()))}function Tt(e){const t=Me(e);return t.acs?t.acs:{withIsolationScope:Ct,withScope:Mt,withSetScope:Et,withSetIsolationScope:(e,t)=>Ct(t),getCurrentScope:()=>St().getScope(),getIsolationScope:()=>St().getIsolationScope()}}function Ot(){return Tt(Se()).getCurrentScope()}function Pt(){return Tt(Se()).getIsolationScope()}function At(){return Ot().getClient()}function xt(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:i}=t;return Xe({trace_id:n,span_id:r,parent_span_id:i})}function jt(e){const t=e._sentryMetrics;if(!t)return;const n={};for(const[,[e,r]]of t){(n[e]||(n[e]=[])).push(Xe(r))}return n}const It=/^sentry-/;function Lt(e){const t=function(e){if(!e||!Ae(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce((e,t)=>{const n=Dt(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{});return Dt(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(It)){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function Dt(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}let Nt=!1;function Ft(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return Xe({parent_span_id:r?t:Ut(e).parent_span_id,span_id:r?vt():t,trace_id:n})}function Rt(e){return"number"==typeof e?Bt(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Bt(e.getTime()):tt()}function Bt(e){return e>9999999999?e/1e3:e}function Ut(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 Xe({span_id:t,trace_id:n,data:r,description:o,parent_span_id:s,start_timestamp:Rt(i),timestamp:Rt(a)||void 0,status:Vt(c),op:r["sentry.op"],origin:r["sentry.origin"],_metrics_summary:jt(e)})}return{span_id:t,trace_id:n}}catch(e){return{}}}function Vt(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}function Jt(e){return e._sentryRootSpan||e}function $t(){Nt||(oe(()=>{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.")}),Nt=!0)}const qt="production";function zt(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=Xe({environment:n.environment||qt,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function Wt(e){const t=At();if(!t)return{};const n=Jt(e),r=n._frozenDsc;if(r)return r;const i=n.spanContext().traceState,o=i&&i.get("sentry.dsc"),a=o&&Lt(o);if(a)return a;const s=zt(e.spanContext().traceId,t),c=Ut(n),l=c.data||{},u=l["sentry.sample_rate"];null!=u&&(s.sample_rate=`${u}`);const d=l["sentry.source"],h=c.description;return"url"!==d&&h&&(s.transaction=h),function(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=At(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}()&&(s.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n))),t.emit("createDsc",s,n),s}const Gt=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ht(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 Qt(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Yt(e){const t="string"==typeof e?function(e){const t=Gt.exec(e);if(!t)return void oe(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,i="",o="",a="",s=""]=t.slice(1);let c="",l=s;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return Qt({host:o,pass:i,path:c,projectId:l,port:a,protocol:n,publicKey:r})}(e):Qt(e);if(t&&function(e){if(!ne)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(ae.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(ae.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(ae.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(ae.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function Kt(e,t=100,n=1/0){try{return Zt("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Xt(e,t=3,n=102400){const r=Kt(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?Xt(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 global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(Fe(t))return"[VueViewModel]";if(Ie(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: ${he(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 l=t;if(l&&"function"==typeof l.toJSON)try{return Zt("",l.toJSON(),c-1,r,i)}catch(e){}const u=Array.isArray(t)?[]:{};let d=0;const h=Qe(t);for(const e in h){if(!Object.prototype.hasOwnProperty.call(h,e))continue;if(d>=r){u[e]="[MaxProperties ~]";break}const t=h[e];u[e]=Zt(e,t,c-1,r,i),d++}return a(t),u}function en(e,t=[]){return[e,t]}function tn(e,t){const[n,r]=e;return[n,[...r,t]]}function nn(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function rn(e){return ee.__SENTRY__&&ee.__SENTRY__.encodePolyfill?ee.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function on(e){const[t,n]=e;let r=JSON.stringify(t);function i(e){"string"==typeof r?r="string"==typeof e?r+e:[rn(r),e]:r.push("string"==typeof e?rn(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(Kt(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 an(e){const t="string"==typeof e.data?rn(e.data):e.data;return[Xe({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const sn={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 cn(e){return sn[e]}function ln(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function un(e,t,n,r){const i=ln(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:Ht(r)},...i&&{trace:Xe({...i})}}}(e,i,r,t);delete e.sdkProcessingMetadata;return en(a,[[{type:o},e]])}function dn(e,t,n,r=0){return new dt((i,o)=>{const a=e[r];if(null===t||"function"!=typeof a)i(t);else{const s=a({...t},n);X&&a.id&&null===s&&ae.log(`Event processor "${a.id}" dropped event`),De(s)?s.then(t=>dn(e,t,n,r+1).then(i)).then(null,o):dn(e,s,n,r+1).then(i).then(null,o)}})}let hn,pn,fn;function vn(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=Xe(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=Xe(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const u=Xe(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});const d=Xe(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:Ft(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Wt(t),...e.sdkProcessingMetadata};const n=Jt(t),r=Ut(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(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)}function gn(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:h,transactionName:p,span:f}=t;mn(e,"extra",n),mn(e,"tags",r),mn(e,"user",i),mn(e,"contexts",o),e.sdkProcessingMetadata=gt(e.sdkProcessingMetadata,s,2),a&&(e.level=a),p&&(e.transactionName=p),f&&(e.span=f),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...h}}function mn(e,t,n){e[t]=gt(e[t],n,1)}function yn(e,t,n,r,i,o){const{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||nt(),timestamp:t.timestamp||et()},l=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||qt,!e.release&&r&&(e.release=r);!e.dist&&i&&(e.dist=i);e.message&&(e.message=Ve(e.message,o));const a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=Ve(a.value,o));const s=e.request;s&&s.url&&(s.url=Ve(s.url,o))}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,l),i&&i.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=ee._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return fn&&n.length===pn||(pn=n.length,fn=n.reduce((n,r)=>{hn||(hn={});const i=hn[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,hn[r]=[a,s];break}}}return n},{})),fn}(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 u=function(e,t){if(!t)return e;const n=e?e.clone():new wt;return n.update(t),n}(r,n.captureContext);n.mechanism&&at(c,n.mechanism);const d=i?i.getEventProcessors():[],h=te("globalScope",()=>new wt).getScopeData();if(o){gn(h,o.getScopeData())}if(u){gn(h,u.getScopeData())}const p=[...n.attachments||[],...h.attachments];p.length&&(n.attachments=p),vn(c,h);return dn([...d,...h.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:Kt(e.data,t,n)}}))},...e.user&&{user:Kt(e.user,t,n)},...e.contexts&&{contexts:Kt(e.contexts,t,n)},...e.extra&&{extra:Kt(e.extra,t,n)}};e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Kt(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Kt(e.data,t,n)}})));e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=Kt(e.contexts.flags,3,n));return r}(e,a,s):e))}function bn(e){if(e)return function(e){return e instanceof wt||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>_n.includes(e))}(e)?{captureContext:e}:e}const _n=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function wn(e,t){return Ot().captureEvent(e,t)}function kn(e){const t=At(),n=Pt(),r=Ot(),{release:i,environment:o=qt}=t&&t.getOptions()||{},{userAgent:a}=ee.navigator||{},s=ht({release:i,environment:o,user:r.getUser()||n.getUser(),...a&&{userAgent:a},...e}),c=n.getSession();return c&&"ok"===c.status&&pt(c,{status:"exited"}),Sn(),n.setSession(s),r.setSession(s),s}function Sn(){const e=Pt(),t=Ot(),n=t.getSession()||e.getSession();n&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),pt(e,n)}(n),Mn(),e.setSession(),t.setSession()}function Mn(){const e=Pt(),t=Ot(),n=At(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function En(e=!1){e?Sn():Mn()}function Cn(e,t,n){return t||`${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/`}(e)}?${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()}(e,n)}`}const Tn=[];function On(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Pn(e,t,n){if(n[t.name])X&&ae.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===Tn.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),Tn.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)}X&&ae.log(`Integration installed: ${t.name}`)}}class An extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}const xn="Not capturing exception because it's already been captured.";class jn{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Yt(e.dsn):X&&ae.warn("No DSN provided, client will not send events."),this._dsn){const t=Cn(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}const t=["enableTracing","tracesSampleRate","tracesSampler"].find(t=>t in e&&null==e[t]);t&&oe(()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` 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=nt();if(st(e))return X&&ae.log(xn),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:nt(),...n},o=xe(e)?e:String(e),a=je(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=nt();if(t&&t.originalException&&st(t.originalException))return X&&ae.log(xn),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?X&&ae.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),pt(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))):lt(!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];Pn(this,e,this._integrations),t||On(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=un(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=tn(n,an(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=ln(n);return en({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Ht(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}`;X&&ae.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=>(X&&ae.error("Error while sending envelope:",e),e)):(X&&ae.error("Transport disabled"),lt({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t&&Pn(e,t,n)}),n}(this,e),On(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)&&(pt(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new dt(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=Ot(),r=Pt()){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),yn(i,e,t,n,this,r).then(e=>{if(null===e)return e;e.contexts={trace:xt(n),...e.contexts};const t=function(e,t){const n=t.getPropagationContext();return n.dsc||zt(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=>{X&&(e instanceof An&&"log"===e.logLevel?ae.log(e.message):ae.warn(e))})}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:i}=r,o=Ln(e),a=In(e),s=e.type||"error",c=`before send for type \`${s}\``,l=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;X&&ae.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 l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",e),ut(new An(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const u="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",u,e),new An("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(In(n)&&i)return i(n,r);if(Ln(n)){if(n.spans&&a){const t=[];for(const r of n.spans){const n=a(r);n?t.push(n):($t(),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(De(e))return e.then(e=>{if(!Ie(e)&&null!==e)throw new An(n);return e},e=>{throw new An(`${t} rejected with ${e}`)});if(!Ie(e)&&null!==e)throw new An(n);return e}(i,c)}).then(r=>{if(null===r){if(this.recordDroppedEvent("before_send",u,e),o){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new An(`${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 An)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new An(`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(){X&&ae.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(X&&ae.log("No outcomes to send"));if(!this._dsn)return void(X&&ae.log("No dsn provided, will not send outcomes"));X&&ae.log("Sending outcomes:",e);const t=(n=e,en((r=this._options.tunnel&&Ht(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:i||et(),discarded_events:n}]]));var n,r,i;this.sendEnvelope(t)}}function In(e){return void 0===e.type}function Ln(e){return"transaction"===e.type}function Dn(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 An("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 dt((n,r)=>{let i=t.length;if(!i)return n(!0);const o=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{lt(e).then(()=>{--i||(clearTimeout(o),n(!0))},r)})})}}}function Nn(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}function Fn(e,t,n=Dn(e.bufferSize||64)){let r={};return{send:function(i){const o=[];if(nn(i,(t,n)=>{const i=cn(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=Rn(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r)}else o.push(t)}),0===o.length)return lt({});const a=en(i[0],o),s=t=>{nn(a,(n,r)=>{const i=Rn(n,r);e.recordDroppedEvent(t,cn(r),i)})};return n.add(()=>t({body:on(a)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&X&&ae.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Nn(r,e),e),e=>{throw s("network_error"),e})).then(e=>e,e=>{if(e instanceof An)return X&&ae.error("Skipped sending event because buffer is full."),s("queue_overflow"),lt({});throw e})},flush:e=>n.drain(e)}}function Rn(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}const Bn=100;function Un(e,t){const n=At(),r=Pt();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Bn}=n.getOptions();if(o<=0)return;const a={timestamp:et(),...e},s=i?oe(()=>i(a,t)):a;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,o))}let Vn;const Jn=new WeakMap,$n=()=>({name:"FunctionToString",setupOnce(){Vn=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=He(this),n=Jn.has(At())&&void 0!==t?t:this;return Vn.apply(n,e)}}catch(e){}},setup(e){Jn.set(e,!0)}}),qn=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,"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+$/,/^Java exception was raised during method invocation$/],zn=(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?[]:qn],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,i);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e))return X&&ae.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${it(e)}`),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return function(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch(e){}n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`));return t}(e).some(e=>qe(e,t))}(e,t.ignoreErrors))return X&&ae.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${it(e)}`),!0;if(function(e){if(e.type)return!1;if(!e.exception||!e.exception.values||0===e.exception.values.length)return!1;return!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(e))return X&&ae.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${it(e)}`),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&qe(n,t)}(e,t.ignoreTransactions))return X&&ae.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${it(e)}`),!0;if(function(e,t){if(!t||!t.length)return!1;const n=Wn(e);return!!n&&qe(n,t)}(e,t.denyUrls))return X&&ae.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${it(e)}.\nUrl: ${Wn(e)}`),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=Wn(e);return!n||qe(n,t)}(e,t.allowUrls))return X&&ae.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${it(e)}.\nUrl: ${Wn(e)}`),!0;return!1}(t,o)?null:t}});function Wn(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 X&&ae.error(`Cannot extract url for event ${it(e)}`),null}}function Gn(e,t,n=250,r,i,o,a){if(!(o.exception&&o.exception.values&&a&&Ne(a.originalException,Error)))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var c,l;s&&(o.exception.values=(c=Hn(e,t,i,a.originalException,r,o.exception.values,s,0),l=n,c.map(e=>(e.value&&(e.value=Ve(e.value,l)),e))))}function Hn(e,t,n,r,i,o,a,s){if(o.length>=n+1)return o;let c=[...o];if(Ne(r[i],Error)){Qn(a,s);const o=e(t,r[i]),l=c.length;Yn(o,i,l,s),c=Hn(e,t,n,r[i],i,[o,...c],o,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,o)=>{if(Ne(r,Error)){Qn(a,s);const l=e(t,r),u=c.length;Yn(l,`errors[${o}]`,u,s),c=Hn(e,t,n,r,i,[l,...c],l,u)}}),c}function Qn(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 Yn(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}}function Kn(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}}function Xn(){"console"in ee&&re.forEach(function(e){e in ee.console&&ze(ee.console,e,function(t){return ie[e]=t,function(...t){ye("console",{args:t,level:e});const n=ie[e];n&&n.apply(ee.console,t)}})})}function Zn(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const er=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!nr(e,t))return!1;if(!tr(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=rr(t),r=rr(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!nr(e,t))return!1;if(!tr(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return X&&ae.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}};function tr(e,t){let n=pe(e),r=pe(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 nr(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 rr(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ir(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const or=ee;function ar(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function sr(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in or))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}())return!1;if(ar(or.fetch))return!0;let e=!1;const t=or.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=ar(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){ne&&ae.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}function cr(e,t){const n="fetch";ge(n,e),me(n,()=>function(e,t=!1){if(t&&!sr())return;ze(ee,"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:ur(t),method:lr(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:ur(t),method:lr(t,"method")?String(t.method).toUpperCase():"GET"}}(n),a={args:n,fetchData:{method:i,url:o},startTimestamp:1e3*tt(),virtualError:r};return e||ye("fetch",{...a}),t.apply(ee,n).then(async t=>(e?e(t):ye("fetch",{...a,endTimestamp:1e3*tt(),response:t}),t),e=>{throw ye("fetch",{...a,endTimestamp:1e3*tt(),error:e}),Ce(e)&&void 0===e.stack&&(e.stack=r.stack,We(e,"framesToPop",1)),e})}})}(void 0,t))}function lr(e,t){return!!e&&"object"==typeof e&&!!e[t]}function ur(e){return"string"==typeof e?e:e?lr(e,"url")?e.url:e.toString?e.toString():"":""}const dr=ee;const hr=ee;let pr=0;function fr(){return pr>0}function vr(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(He(e))return e}catch(t){return e}const n=function(...n){try{const r=n.map(e=>vr(e,t));return e.apply(this,r)}catch(e){throw pr++,setTimeout(()=>{pr--}),function(...e){const t=Tt(Se());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}(r=>{var i,o;r.addEventProcessor(e=>(t.mechanism&&(ot(e,void 0,void 0),at(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),i=e,Ot().captureException(i,bn(o))}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch(e){}Ge(n,e),We(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch(e){}return n}const gr="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function mr(e,t){const n=_r(e,t),r={type:Sr(t),value:Mr(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function yr(e,t,n,r){const i=At(),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}return}(t),s={__serialized__:Xt(t,o)};if(a)return{exception:{values:[mr(e,a)]},extra:s};const c={exception:{values:[{type:Le(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Tr(t,{isUnhandledRejection:r})}]},extra:s};if(n){const t=_r(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function br(e,t){return{exception:{values:[mr(e,t)]}}}function _r(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&wr.test(e.message))return 1;return 0}(t),i=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,i)}catch(e){}return[]}const wr=/Minified React error #\d+;/i;function kr(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function Sr(e){const t=e&&e.name;if(!t&&kr(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function Mr(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:kr(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function Er(e,t,n,r,i){let o;if(Oe(t)&&t.error){return br(e,t.error)}if(Pe(t)||Te(t,"DOMException")){const i=t;if("stack"in t)o=br(e,t);else{const t=i.name||(Pe(i)?"DOMError":"DOMException"),a=i.message?`${t}: ${i.message}`:t;o=Cr(e,a,n,r),ot(o,a)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}if(Ce(t))return br(e,t);if(Ie(t)||Le(t)){return o=yr(e,t,n,i),at(o,{synthetic:!0}),o}return o=Cr(e,t,n,r),ot(o,`${t}`,void 0),at(o,{synthetic:!0}),o}function Cr(e,t,n,r){const i={};if(r&&n){const r=_r(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),at(i,{synthetic:!0})}if(xe(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 Tr(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(Qe(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Ve(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:Ve(r,t)}return""}(e),r=t?"promise rejection":"exception";if(Oe(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(Le(e)){return`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}`}return`Object captured as ${r} with keys: ${n}`}class Or extends jn{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:Z})),version:Z}),e._metadata=i}(t,"browser",["browser"],hr.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&hr.document&&hr.document.addEventListener("visibilitychange",()=>{"hidden"===hr.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){const i=Er(e,t,n&&n.syntheticException||void 0,r);return at(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),lt(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const o=Cr(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),lt(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(gr&&ae.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:Ht(r)}},o=function(e){return[{type:"user_report"},e]}(e);return en(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 Pr="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ar=ee;let xr,jr,Ir,Lr;function Dr(){if(!Ar.document)return;const e=ye.bind(null,"dom"),t=Nr(e,!0);Ar.document.addEventListener("click",t,!1),Ar.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Ar[t],r=n&&n.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(ze(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=Nr(e);o.handler=r,t.call(this,n,r,i)}o.refCount++}catch(e){}return t.call(this,n,r,i)}}),ze(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 Nr(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;We(n,"_sentryCaptured",!0),r&&!r._sentryId&&We(r,"_sentryId",nt());const i="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==jr)return!1;try{if(!e.target||e.target._sentryId!==Ir)return!1}catch(e){}return!0}(n)){e({event:n,name:i,global:t}),jr=n.type,Ir=r?r._sentryId:void 0}clearTimeout(xr),xr=Ar.setTimeout(()=>{Ir=void 0,jr=void 0},1e3)}}function Fr(e){const t="history";ge(t,e),me(t,Rr)}function Rr(){if(!function(){const e=dr.chrome,t=e&&e.app&&e.app.runtime,n="history"in dr&&!!dr.history.pushState&&!!dr.history.replaceState;return!t&&n}())return;const e=Ar.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=Lr,t=String(n);Lr=t;ye("history",{from:e,to:t})}return e.apply(this,t)}}Ar.onpopstate=function(...t){const n=Ar.location.href,r=Lr;Lr=n;if(ye("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},ze(Ar.history,"pushState",t),ze(Ar.history,"replaceState",t)}const Br={};function Ur(e){Br[e]=void 0}const Vr="__sentry_xhr_v3__";function Jr(){if(!Ar.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,i=1e3*tt(),o=Ae(n[0])?n[0].toUpperCase():void 0,a=function(e){if(Ae(e))return e;try{return e.toString()}catch(e){}return}(n[1]);if(!o||!a)return e.apply(t,n);t[Vr]={method:o,url:a,request_headers:{}},"POST"===o&&a.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const s=()=>{const e=t[Vr];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}ye("xhr",{endTimestamp:1e3*tt(),startTimestamp:i,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(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[Vr];return o&&Ae(r)&&Ae(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[Vr];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return ye("xhr",{startTimestamp:1e3*tt(),xhr:t}),e.apply(t,n)}})}function $r(e,t=function(e){const t=Br[e];if(t)return t;let n=Ar[e];if(ar(n))return Br[e]=n.bind(Ar);const r=Ar.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){Pr&&ae.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?Br[e]=n.bind(Ar):n}("fetch")){let n=0,r=0;return Fn(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 Ur("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 Ur("fetch"),n-=o,r--,ut(e)}})}function qr(e,t,n,r){const i={filename:e,function:"<anonymous>"===t?se:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const zr=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Wr=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Gr=/\((\S*)(?::(\d+))(?::(\d+))\)/,Hr=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Qr=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Yr=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=ce.test(n)?n.replace(ce,"$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);/sentryWrapped/.test(ue(t).function||"")&&t.pop();t.reverse(),le.test(ue(t).function||"")&&(t.pop(),le.test(ue(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||ue(t).filename,function:e.function||se}))}(i.slice(r))}}(...[[30,e=>{const t=zr.exec(e);if(t){const[,e,n,r]=t;return qr(e,se,+n,+r)}const n=Wr.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=Gr.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=Kr(n[1]||se,n[2]);return qr(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=Hr.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Qr.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]||se;return[n,e]=Kr(n,e),qr(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),Kr=(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]:se,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Xr=1024,Zr=(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";ge(t,e),me(t,Xn)}(function(e){return function(t){if(At()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:Zn(t.level),message:Je(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${Je(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Un(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(At()!==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>Xr&&(gr&&ae.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=Xr),"string"==typeof o&&(o=[o]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=Be(t,{keyAttrs:o,maxStringLength:a}),i=function(e){if(!Re.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}),Un(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),ge("dom",n),me("dom",Dr)),t.xhr&&function(e){ge("xhr",e),me("xhr",Jr)}(function(e){return function(t){if(At()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Vr];if(!n||!r||!i)return;const{method:o,url:a,status_code:s,body:c}=i,l={method:o,url:a,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};Un({category:"xhr",data:l,type:"http",level:ir(s)},u)}}(e)),t.fetch&&cr(function(e){return function(t){if(At()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){Un({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};Un({category:"fetch",data:i,type:"http",level:ir(i.status_code)},o)}}}(e)),t.history&&Fr(function(e){return function(t){if(At()!==e)return;let n=t.from,r=t.to;const i=Kn(hr.location.href);let o=n?Kn(n):void 0;const a=Kn(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),Un({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){At()===e&&Un({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:it(t)},{event:t})}}(e))}}};const ei=["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"],ti=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&ze(hr,"setTimeout",ni),t.setInterval&&ze(hr,"setInterval",ni),t.requestAnimationFrame&&ze(hr,"requestAnimationFrame",ri),t.XMLHttpRequest&&"XMLHttpRequest"in hr&&ze(XMLHttpRequest.prototype,"send",ii);const e=t.eventTarget;if(e){(Array.isArray(e)?e:ei).forEach(oi)}}}};function ni(e){return function(...t){const n=t[0];return t[0]=vr(n,{mechanism:{data:{function:he(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function ri(e){return function(t){return e.apply(this,[vr(t,{mechanism:{data:{function:"requestAnimationFrame",handler:he(e)},handled:!1,type:"instrument"}})])}}function ii(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&ze(n,e,function(t){const n={mechanism:{data:{function:e,handler:he(t)},handled:!1,type:"instrument"}},r=He(t);return r&&(n.mechanism.data.handler=he(r)),vr(t,n)})}),e.apply(this,t)}}function oi(e){const t=hr[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(ze(n,"addEventListener",function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=vr(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:he(r),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,vr(r,{mechanism:{data:{function:"addEventListener",handler:he(r),target:e},handled:!1,type:"instrument"}}),i])}}),ze(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)}}))}const ai=()=>({name:"BrowserSession",setupOnce(){void 0!==hr.document?(kn({ignoreDuration:!0}),En(),Fr(({from:e,to:t})=>{void 0!==e&&e!==t&&(kn({ignoreDuration:!0}),En())})):gr&&ae.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),si=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){!function(e){const t="error";ge(t,e),me(t,_e)}(t=>{const{stackParser:n,attachStacktrace:r}=li();if(At()!==e||fr())return;const{msg:i,url:o,line:a,column:s,error:c}=t,l=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||[],l=r,u=n,d=Ae(t)&&t.length>0?t:function(){try{return Re.document.location.href}catch(e){return""}}();0===c.length&&c.push({colno:l,filename:d,function:se,in_app:!0,lineno:u});return e}(Er(n,c||i,void 0,r,!1),o,a,s);l.level="error",wn(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}(e),ci("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";ge(t,e),me(t,ke)}(t=>{const{stackParser:n,attachStacktrace:r}=li();if(At()!==e||fr())return;const i=function(e){if(je(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=je(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:Er(n,i,void 0,r,!0);o.level="error",wn(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(e),ci("onunhandledrejection"))}}};function ci(e){gr&&ae.log(`Global Handler attached: ${e}`)}function li(){const e=At();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const ui=()=>({name:"HttpContext",preprocessEvent(e){if(!hr.navigator&&!hr.location&&!hr.document)return;const t=e.request&&e.request.url||hr.location&&hr.location.href,{referrer:n}=hr.document||{},{userAgent:r}=hr.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}}),di=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,i){const o=i.getOptions();Gn(mr,o.stackParser,o.maxValueLength,n,t,e,r)}}};var hi="new",pi="loading",fi="loaded",vi="joining-meeting",gi="joined-meeting",mi="left-meeting",yi="error",bi="blocked",_i="off",wi="sendable",ki="loading",Si="interrupted",Mi="playable",Ei="unknown",Ci="full",Ti="lobby",Oi="none",Pi="base",Ai="*",xi="ejected",ji="nbf-room",Ii="nbf-token",Li="exp-room",Di="exp-token",Ni="no-room",Fi="meeting-full",Ri="end-of-life",Bi="not-allowed",Ui="connection-error",Vi="cam-in-use",Ji="mic-in-use",$i="cam-mic-in-use",qi="permissions",zi="undefined-mediadevices",Wi="not-found",Gi="constraints",Hi="unknown",Qi="iframe-ready-for-launch-config",Yi="iframe-launch-config",Ki="theme-updated",Xi="loading",Zi="load-attempt-failed",eo="loaded",to="started-camera",no="camera-error",ro="joining-meeting",io="joined-meeting",oo="left-meeting",ao="participant-joined",so="participant-updated",co="participant-left",lo="participant-counts-updated",uo="access-state-updated",ho="meeting-session-summary-updated",po="meeting-session-state-updated",fo="meeting-session-data-error",vo="waiting-participant-added",go="waiting-participant-updated",mo="waiting-participant-removed",yo="track-started",bo="track-stopped",_o="transcription-started",wo="transcription-stopped",ko="transcription-error",So="recording-started",Mo="recording-stopped",Eo="recording-stats",Co="recording-error",To="recording-upload-completed",Oo="recording-data",Po="app-message",Ao="transcription-message",xo="remote-media-player-started",jo="remote-media-player-updated",Io="remote-media-player-stopped",Lo="local-screen-share-started",Do="local-screen-share-stopped",No="local-screen-share-canceled",Fo="active-speaker-change",Ro="active-speaker-mode-change",Bo="network-quality-change",Uo="network-connection",Vo="cpu-load-change",Jo="face-counts-updated",$o="fullscreen",qo="exited-fullscreen",zo="live-streaming-started",Wo="live-streaming-updated",Go="live-streaming-stopped",Ho="live-streaming-error",Qo="lang-updated",Yo="receive-settings-updated",Ko="input-settings-updated",Xo="nonfatal-error",Zo="error",ea=4096,ta=102400,na="iframe-call-message",ra="local-screen-start",ia="daily-method-update-live-streaming-endpoints",oa="transmit-log",aa="daily-custom-track",sa={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},ca={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},la={PLAY:"play",PAUSE:"pause"},ua="daily",da="signalwire",ha=["jpg","png","jpeg"],pa="add-endpoints",fa="remove-endpoints",va="sip-call-transfer";function ga(){return!ma()&&"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function ma(){return"undefined"!=typeof navigator&&navigator.product&&"ReactNative"===navigator.product}function ya(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function ba(){return!!(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}(Aa(),xa())||ma())}function _a(){if(ma())return!1;if(!document)return!1;var e=document.createElement("iframe");return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var wa="none",ka="software",Sa="hardware";var Ma=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?ka:Sa:wa}catch(e){return wa}}();function Ea(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!ma()&&(Ma!==wa&&(e?function(){if(Pa())return!1;return["Chrome","Firefox"].includes(Aa())}():function(){if(Pa())return!1;var e=Aa();if("Safari"===e){var t=Da();if(t.major<15||15===t.major&&t.minor<4)return!1}if("Chrome"===e){return ja().major>=77}if("Firefox"===e){return Na().major>=97}return["Chrome","Firefox","Safari"].includes(e)}()))}function Ca(){if(ma())return!1;if(Oa())return!1;if("undefined"==typeof AudioWorkletNode)return!1;switch(Aa()){case"Chrome":case"Firefox":return!0;case"Safari":var e=xa();return e.major>17||17===e.major&&e.minor>=4}return!1}function Ta(){return ya()&&"undefined"!=typeof MediaStreamTrack&&!function(){var e,t=Aa();if(!ga())return!0;switch(t){case"Chrome":return(e=ja()).major&&e.major>0&&e.major<75;case"Firefox":return(e=Na()).major<91;case"Safari":return(e=Da()).major<13||13===e.major&&e.minor<1;default:return!0}}()}function Oa(){return ga().match(/Linux; Android/)}function Pa(){var e,t=ga(),n=t.match(/Mac/)&&(!ma()&&"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)||(!!ga().match(/DailyAnd\//)||void 0)}function Aa(){if("undefined"!=typeof window){var e=ga();return Ia()?"Safari":e.indexOf("Edge")>-1?"Edge":e.match(/Chrome\//)?"Chrome":e.indexOf("Safari")>-1||La()?"Safari":e.indexOf("Firefox")>-1?"Firefox":e.indexOf("MSIE")>-1||e.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function xa(){switch(Aa()){case"Chrome":return ja();case"Safari":return Da();case"Firefox":return Na();case"Edge":return function(){var e=0,t=0;if("undefined"!=typeof window){var n=ga().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}()}}function ja(){var e=0,t=0,n=0,r=0,i=!1;if("undefined"!=typeof window){var o=ga(),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 Ia(){return!!ga().match(/\((iPad|iPhone|iPod)/i)&&ya()}function La(){return ga().indexOf("AppleWebKit/605.1.15")>-1}function Da(){var e=0,t=0,n=0;if("undefined"!=typeof window){var r=ga().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch(e){}else(Ia()||La())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Na(){var e=0,t=0;if("undefined"!=typeof window){var n=ga().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}var Fa=function(){return o(function e(){t(this,e)},[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){B()}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){B()}},{key:"sendMessageToCallMachine",value:function(e,t,n,r){B()}},{key:"sendMessageToDailyJs",value:function(e,t){B()}},{key:"removeListener",value:function(e){B()}}])}();function Ra(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 Ba(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ra(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ra(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ua(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ua=function(){return!!e})()}var Va=function(){function e(){var n,r,i,o;return t(this,e),r=this,i=s(i=e),(n=a(r,Ua()?Reflect.construct(i,o||[],s(r).constructor):i.apply(r,o)))._wrappedListeners={},n._messageCallbacks={},n}return l(e,Fa),o(e,[{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=Ba({},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!==na||!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=Ba({},e);if(i.what=na,i.from="module",i.callClientId=n,t){var o=R();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=na,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=Ba({},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}}])}();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 $a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($a=function(){return!!e})()}var qa=function(){function e(){var n,r,i,o;return t(this,e),r=this,i=s(i=e),n=a(r,$a()?Reflect.construct(i,o||[],s(r).constructor):i.apply(r,o)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new b.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new b.EventEmitter,n._wrappedListeners={},n._messageCallbacks={},n}return l(e,Fa),o(e,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){this._addListener(e,global.callMachineToDailyJsEmitter,t,n,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){this._addListener(e,global.dailyJsToCallMachineEmitter,t,n,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(e,t,n){this._sendMessage(e,global.dailyJsToCallMachineEmitter,n,t,"sending message to call machine")}},{key:"sendMessageToDailyJs",value:function(e,t){this._sendMessage(e,global.callMachineToDailyJsEmitter,t,null,"sending message to daily-js")}},{key:"removeListener",value:function(e){var t=this._wrappedListeners[e];t&&(global.callMachineToDailyJsEmitter.removeListener("message",t),global.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?Ja(Object(n),!0).forEach(function(t){u(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}({},e);if(o.callClientId=n,r){var a=R();this._messageCallbacks[a]=r,o.callbackStamp=a}t.emit("message",o)}}])}(),za="replace",Wa="shallow-merge",Ga=[za,Wa];var Ha=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.data,i=n.mergeStrategy,o=void 0===i?za:i;t(this,e),e._validateMergeStrategy(o),e._validateData(r,o),this.mergeStrategy=o,this.data=r}return o(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===Wa}},{key:"_validateMergeStrategy",value:function(e){if(!Ga.includes(e))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(Ga,"]"))}},{key:"_validateData",value:function(e,t){if(!function(e){if(null==e||"object"!==n(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 r;try{if(r=JSON.stringify(e),t===za){var i=JSON.parse(r);S(i,e)||console.warn("The meeting session data provided will be modified when serialized.",i,e)}else if(t===Wa)for(var o in e)if(Object.hasOwnProperty.call(e,o)&&void 0!==e[o]){var a=JSON.parse(JSON.stringify(e[o]));S(e[o],a)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",a,e[o])}}catch(e){throw Error("Meeting session data must be serializable to JSON: ".concat(e))}if(r.length>ta)throw Error("Meeting session data is too large (".concat(r.length," characters). Maximum size suppported is ").concat(ta,"."))}}])}();function Qa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qa=function(){return!!e})()}function Ya(e){var t="function"==typeof Map?new Map:void 0;return Ya=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(Qa())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&c(i,n.prototype),i}(e,arguments,s(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)},Ya(e)}function Ka(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ka=function(){return!!e})()}function Xa(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 Za=function(){return o(function e(n){t(this,e),this._currentLoad=null,this._callClientId=n,this._publicPath=null},[{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(),window._daily.instances[this._callClientId].publicPath=this._publicPath,void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new es(n,function(e){var n=e.substring(0,e.lastIndexOf("/"));n.length&&"/"!==n.slice(-1)&&(n+="/"),t._publicPath=n,window._daily.instances[t._callClientId].publicPath=n,$(q(e)),r(!1)},function(e,n){n||Xa(t._callClientId),i(e,n)}),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),Xa(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])}(),es=function(){return o(function e(){var 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;t(this,e),this._dailyConfig=n,this._successCallback=r,this._failureCallback=i,this._urls=function(e){var t;if(H(e))return[G(e)];var n=null!==(t=null!=V?V:Q())&&void 0!==t?t:U[0];return(n===U[0]?U:[n].concat(F(U.filter(function(e){return e!==n})))).map(function(t){return G(e,t)})}(n),this._networkTimeoutMs=ns,this._passesRemaining=3,this._urlIndex=0,this._currentAttempt=null},[{key:"start",value:function(){this._currentAttempt||this._startAttempt()}},{key:"_startAttempt",value:function(){this._currentAttempt=new rs(this._dailyConfig,this._urls[this._urlIndex],this._networkTimeoutMs,this._successCallback,this._retryOrFailureCallback.bind(this)),this._currentAttempt.start()}},{key:"_retryOrFailureCallback",value:function(e){var t=this;if(!this._currentAttempt.cancelled){this._urlIndex++;var n=this._urlIndex<this._urls.length,r=this._passesRemaining>1,i=n||r;this._failureCallback(e,i),i&&(n?this._startAttempt():(this._passesRemaining--,this._urlIndex=0,setTimeout(function(){t._currentAttempt.cancelled||t._startAttempt()},3e3)))}}},{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}}])}(),ts=function(){function e(){return t(this,e),n=this,i=arguments,r=s(r=e),a(n,Ka()?Reflect.construct(r,i||[],s(n).constructor):r.apply(n,i));var n,r,i}return l(e,Ya(Error)),o(e)}(),ns=2e4,rs=function(){return o(function e(n,r,i,o,a){t(this,e),this._loadAttemptImpl=ma()||!n.avoidEval?new is(n,r,i,o,a):new os(n,r,i,o,a)},[{key:"start",value:(e=h(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}(),is=function(){return o(function e(n,r,i,o,a){t(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._networkTimeoutMs=i,this._iosCache="undefined"!=typeof iOSCallObjectBundleCache&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=n,this._url=r,this._successCallback=o,this._failureCallback=a},[{key:"start",value:(i=h(function*(){var e=this._url;!(yield this._tryLoadFromIOSCache(e))&&this._loadFromNetwork(e)}),function(){return i.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(r=h(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(e),!0):(this._refetchHeaders=t.refetchHeaders,!1))}catch(e){return!1}}),function(e){return r.apply(this,arguments)})},{key:"_loadFromNetwork",value:(n=h(function*(e){var t=this;this._networkTimeout=setTimeout(function(){t._networkTimedOut=!0,t._failureCallback({msg:"Timed out (>".concat(t._networkTimeoutMs," ms) when loading call object bundle ").concat(e),type:"timeout"})},this._networkTimeoutMs);try{var n=this._refetchHeaders?{headers:this._refetchHeaders}:{},r=yield fetch(e,n);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new ts;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new ts;Function('"use strict";'+i)(),this._iosCache&&this._iosCache.set(e,i,r.headers),this.succeeded=!0,this._successCallback(e)}catch(t){if(clearTimeout(this._networkTimeout),t instanceof ts||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(e,": ").concat(t),type:t.message})}}),function(e){return n.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(e=h(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,n,r,i}(),os=function(){return o(function e(n,r,i,o,a){t(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=n,this._url=r,this._networkTimeoutMs=i,this._successCallback=o,this._failureCallback=a,this._attemptId=R(),this._networkTimeout=null,this._scriptElement=null},[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=this._url;"object"===("undefined"==typeof document?"undefined":n(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(t._networkTimeoutMs," ms) when loading call object bundle ").concat(e),type:"timeout"})},this._networkTimeoutMs);var n=document.getElementsByTagName("head")[0],r=document.createElement("script");this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback(e)},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)}}])}(),as=function(e,t,n){return!0===ls(e.local,t,n)},ss=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]},cs=function(e,t,n,r){var i=us(e,t,n,r);return i&&i.pendingTrack},ls=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)},us=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]},ds=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function hs(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],l="cam"===o?c:"screen".concat(c.charAt(0).toUpperCase()+c.slice(1)),u=e.tracks[l];if(u){var d=e.local?ss(n,o,c):cs(n,e.session_id,o,c);"playable"===u.state&&(u.track=d),u.persistentTrack=d}}}function ps(e,t){try{var n=t.getState();for(var r in e.tracks)if(!fs(r)){var i=e.tracks[r].kind;if(i){var o=e.tracks[r];if(o){var a=e.local?ds(n,r):cs(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 fs(e){return["video","audio","screenVideo","screenAudio"].includes(e)}function vs(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{r.streams;if(e.audio&&as(r,e.session_id,"cam-audio")){var a=cs(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&&as(r,e.session_id,"cam-video")){var s=cs(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&&as(r,e.session_id,"screen-audio")){var c=cs(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&&as(r,e.session_id,"screen-video")){var l=cs(r,e.session_id,"screen","video");l&&(t&&t.screenVideoTrack&&t.screenVideoTrack.id===l.id?e.screenVideoTrack=l:l.muted||(e.screenVideoTrack=l))}e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch(e){console.error("unexpected error matching up tracks",e)}}}function gs(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 ms(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)?ms(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 ms(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 ys=new Map,bs=null;function _s(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 ws(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)?ws(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 ws(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 ks=new Map,Ss=null;function Ms(e){Cs()?function(e){ys.has(e)||(ys.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){ys.has(e)&&(ys.get(e).lastDevicesString=JSON.stringify(t),bs||(bs=function(){var e=h(function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=gs(ys.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==ys.get(r).lastDevicesString&&(ys.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",bs)))}).catch(function(){}))}(e):function(e){ks.has(e)||(ks.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){ks.has(e)&&(ks.get(e).lastDevicesString=JSON.stringify(t),Ss||(Ss=setInterval(h(function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=_s(ks.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==ks.get(r).lastDevicesString&&(ks.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}}),3e3)))}))}(e)}function Es(e){Cs()?function(e){ys.has(e)&&(ys.delete(e),0===ys.size&&bs&&(navigator.mediaDevices.removeEventListener("devicechange",bs),bs=null))}(e):function(e){ks.has(e)&&(ks.delete(e),0===ks.size&&Ss&&(clearInterval(Ss),Ss=null))}(e)}function Cs(){var e;return ma()||void 0!==(null===(e=navigator.mediaDevices)||void 0===e?void 0:e.ondevicechange)}var Ts=new Set;function Os(e,t){var n=t.isLocalScreenVideo;return e&&"live"===e.readyState&&!function(e,t){return(!t.isLocalScreenVideo||"Chrome"!==Aa())&&e.muted&&!Ts.has(e.id)}(e,{isLocalScreenVideo:n})}function Ps(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 As(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ps(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ps(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var xs=Object.freeze({VIDEO:"video",AUDIO:"audio",SCREEN_VIDEO:"screenVideo",SCREEN_AUDIO:"screenAudio",CUSTOM_VIDEO:"customVideo",CUSTOM_AUDIO:"customAudio"}),js=Object.freeze({PARTICIPANTS:"participants",STREAMING:"streaming",TRANSCRIPTION:"transcription"}),Is=Object.values(xs),Ls=["v","a","sv","sa","cv","ca"];Object.freeze(Is.reduce(function(e,t,n){return e[t]=Ls[n],e},{})),Object.freeze(Ls.reduce(function(e,t,n){return e[t]=Is[n],e},{}));var Ds=[xs.VIDEO,xs.AUDIO,xs.SCREEN_VIDEO,xs.SCREEN_AUDIO],Ns=Object.values(js),Fs=["p","s","t"];Object.freeze(Ns.reduce(function(e,t,n){return e[t]=Fs[n],e},{})),Object.freeze(Fs.reduce(function(e,t,n){return e[t]=Ns[n],e},{}));var Rs=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.base,i=n.byUserId,o=n.byParticipantId;t(this,e),this.base=r,this.byUserId=i,this.byParticipantId=o}return o(e,[{key:"clone",value:function(){var t=new e;if(this.base instanceof Bs?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 Bs?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 Bs?o.clone():o}return t}},{key:"toJSONObject",value:function(){var e={};if("boolean"==typeof this.base?e.base=this.base:this.base instanceof Bs&&(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 Bs?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 Bs?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 Bs&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map(function(e){var t=v(e,2),n=t[0],r=t[1];return[n,r instanceof Bs?r.normalize():r]}))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map(function(e){var t=v(e,2),n=t[0],r=t[1];return[n,r instanceof Bs?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:Bs.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:Bs.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:Bs.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:Bs.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:Bs.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:Bs.fromMinifiedJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:"validateJSONObject",value:function(e){if("object"!==n(e))return[!1,"canReceive must be an object"];for(var t=["base","byUserId","byParticipantId"],r=0,i=Object.keys(e);r<i.length;r++){var o=i[r];if(!t.includes(o))return[!1,"canReceive can only contain keys (".concat(t.join(", "),")")];if("base"===o){var a=v(Bs.validateJSONObject(e.base,!0),2),s=a[0],c=a[1];if(!s)return[!1,c]}else{if("object"!==n(e[o]))return[!1,"invalid (non-object) value for field '".concat(o,"' in canReceive")];for(var l=0,u=Object.values(e[o]);l<u.length;l++){var d=u[l],h=v(Bs.validateJSONObject(d),2),p=h[0],f=h[1];if(!p)return[!1,f]}}}return[!0]}}])}(),Bs=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.video,i=n.audio,o=n.screenVideo,a=n.screenAudio,s=n.customVideo,c=n.customAudio;t(this,e),this.video=r,this.audio=i,this.screenVideo=o,this.screenAudio=a,this.customVideo=s,this.customAudio=c}return o(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=As({},this.customVideo)),void 0!==this.customAudio&&(t.customAudio=As({},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=As({},this.customVideo)),void 0!==this.customAudio&&(e.customAudio=As({},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=As({},this.customVideo)),void 0!==this.customAudio&&(e.ca=As({},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?As({},t.customVideo):void 0,customAudio:void 0!==t.customAudio?As({},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"!==n(e))return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var r=Object.keys(e),i=0,o=r;i<o.length;i++){var a=o[i];if(!Is.includes(a))return[!1,"invalid media type '".concat(a,"' in canReceive")];if(Ds.includes(a)){if("boolean"!=typeof e[a])return[!1,"invalid (non-boolean) value for media type '".concat(a,"' in canReceive")]}else{if("object"!==n(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&&r.length!==Is.length?[!1,'canReceive "base" permission must specify all media types: '.concat(Is.join(", ")," (or be set to a boolean shorthand)")]:[!0]}}])}(),Us=["result"],Vs=["preserveIframe"];function Js(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 $s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Js(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Js(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qs=function(){return!!e})()}function zs(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 Ws(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)?Ws(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 Ws(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 Gs={};var Hs="video",Qs="voice",Ys=ma()?{data:{}}:{data:{},topology:"none"},Ks={present:0,hidden:0},Xs={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},Zs=Object.keys(Xs),ec=["state","volume","simulcastEncodings"],tc={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},nc={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string",visualState:"'default' | 'sidebar-open' | 'active'"}},rc={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"}},ic=/^[a-zA-Z0-9_-]+$/;function oc(e){if(null!=e&&"object"===n(e)&&!Array.isArray(e)){var t,r={},i=zs(Object.entries(e).slice(0,10));try{for(i.s();!(t=i.n()).done;){var o=v(t.value,2),a=o[0],s=o[1];"string"!=typeof a||a.length>64||ic.test(a)&&"string"==typeof s&&(r[a]=s.slice(0,256))}}catch(e){i.e(e)}finally{i.f()}return Object.keys(r).length?r:void 0}}var ac={customIntegrations:{validate:xc,help:Pc()},customTrayButtons:{validate:Ac,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(nc))},url:{validate:function(e){return"string"==typeof e},help:"url should be a string"},baseUrl:{validate:function(e){return console.warn("baseUrl is deprecated and has no effect"),"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 jc(e,tc)},help:"reactNativeConfig should look like ".concat(JSON.stringify(tc),", all fields optional")},lang:{validate:function(e){return["cs","da","de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sk","sv","tr","user"].includes(e)},help:"language not supported. Options are: cs, da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sk, sv, tr, user"},userName:!0,userData:{validate:function(e){try{return _c(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:aa};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:aa};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"],r=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"===n(e)&&("light"in e&&"dark"in e||"colors"in e)?"light"in e&&"dark"in e?"colors"in e.light?"colors"in e.dark?r(e.light.colors)&&r(e.dark.colors):(console.error('Dark theme is missing "colors" property.',e),!1):(console.error('Light theme is missing "colors" property.',e),!1):r(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 wc(e,{allowAllParticipantsKey:!1})},help:Oc({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!!kc(e)&&(t._inputSettings||(t._inputSettings={}),Sc(e,null===(n=t.properties)||void 0===n?void 0:n.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:Tc()},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"},aboutClient:{validate:function(e){if(null==e)return!0;if("object"!==n(e)||Array.isArray(e))return!1;var t=Object.entries(e);if(t.length>10)return!1;for(var r=0,i=t;r<i.length;r++){var o=v(i[r],2),a=o[0],s=o[1];if("string"!=typeof a||a.length>64)return!1;if(!ic.test(a))return!1;if("string"!=typeof s||s.length>256)return!1}return!0},help:"aboutClient must be an object with up to ".concat(10," entries; keys must be strings made up of characters (a-z, 0-9, _, -) and a max length of ").concat(64,"; values must be strings with a max length of ").concat(256)},proxy:{queryString:"proxy"},strictMode:!0,allowMultipleCallInstances:!0},sc={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)||!ma()&&"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(ma()?"":" | '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=v(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=zs(o);try{for(c.s();!(a=c.n()).done;){var l=a.value;if(!s.includes(l))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 u=v(Rs.validateJSONObject(o),2),d=u[0],h=u[1];if(!d)return console.error(h),!1;break;case"canAdmin":if(o instanceof Set||o instanceof Array||Array.isArray(o)){var p,f=["participants","streaming","transcription"],g=zs(o);try{for(g.s();!(p=g.n()).done;){var m=p.value;if(!f.includes(m))return!1}}catch(e){g.e(e)}finally{g.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=h(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 cc=function(){function r(e){var n,i,o,c,l,d,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,r),o=this,c=s(c=r),u(i=a(o,qs()?Reflect.construct(c,l||[],s(o).constructor):c.apply(o,l)),"startListeningForDeviceChanges",function(){Ms(i.handleDeviceChange)}),u(i,"stopListeningForDeviceChanges",function(){Es(i.handleDeviceChange)}),u(i,"handleDeviceChange",function(e){e=e.map(function(e){return JSON.parse(JSON.stringify(e))}),i.emitDailyJSEvent({action:"available-devices-updated",availableDevices:e})}),u(i,"handleNativeAppStateChange",function(){var e=h(function*(e){if("destroyed"===e)return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield i.destroy());var t="active"===e;i.disableReactNativeAutoDeviceManagement("video")||(t?i.camUnmutedBeforeLosingNativeActiveState&&i.setLocalVideo(!0):(i.camUnmutedBeforeLosingNativeActiveState=i.localVideo(),i.camUnmutedBeforeLosingNativeActiveState&&i.setLocalVideo(!1)))});return function(t){return e.apply(this,arguments)}}()),u(i,"handleNativeAudioFocusChange",function(e){i.disableReactNativeAutoDeviceManagement("audio")||(i._hasNativeAudioFocus=e,i.toggleParticipantAudioBasedOnNativeAudioFocus(),i._hasNativeAudioFocus?i.micUnmutedBeforeLosingNativeAudioFocus&&i.setLocalAudio(!0):(i.micUnmutedBeforeLosingNativeAudioFocus=i.localAudio(),i.setLocalAudio(!1)))}),u(i,"handleNativeSystemScreenCaptureStop",function(){i.stopScreenShare()}),!Ta()&&!ma())throw new Error("WebRTC not supported or suppressed");if(i.strictMode=void 0===p.strictMode||p.strictMode,i.allowMultipleCallInstances=null!==(n=p.allowMultipleCallInstances)&&void 0!==n&&n,Object.keys(Gs).length&&(i._logDuplicateInstanceAttempt(),!i.allowMultipleCallInstances)){if(i.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:{}}),i.callClientId=R(),Gs[(d=i).callClientId]=d,window._daily.instances[i.callClientId]={},i._sharedTracks={},window._daily.instances[i.callClientId].tracks=i._sharedTracks,p.dailyJsVersion=r.version(),void 0!==p.aboutClient&&(p.aboutClient=oc(p.aboutClient)),i._iframe=e,i._callObjectMode="none"===p.layout&&!i._iframe,i._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},void 0!==p.showLocalVideo?i._callObjectMode?console.error("showLocalVideo is not available in call object mode"):i._showLocalVideo=!!p.showLocalVideo:i._showLocalVideo=!0,void 0!==p.showParticipantsBar?i._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):i._showParticipantsBar=!!p.showParticipantsBar:i._showParticipantsBar=!0,void 0!==p.customIntegrations?i._callObjectMode?console.error("customIntegrations is not available in call object mode"):i._customIntegrations=p.customIntegrations:i._customIntegrations={},void 0!==p.customTrayButtons?i._callObjectMode?console.error("customTrayButtons is not available in call object mode"):i._customTrayButtons=p.customTrayButtons:i._customTrayButtons={},void 0!==p.activeSpeakerMode?i._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):i._activeSpeakerMode=!!p.activeSpeakerMode:i._activeSpeakerMode=!1,p.receiveSettings?i._callObjectMode?i._receiveSettings=p.receiveSettings:console.error("receiveSettings is only available in call object mode"):i._receiveSettings={},i.validateProperties(p),i.properties=$s({},p),void 0!==i.properties.aboutClient&&(i.properties.aboutClient=oc(i.properties.aboutClient)),i._inputSettings||(i._inputSettings={}),i._callObjectLoader=i._callObjectMode?new Za(i.callClientId):null,i._callState=hi,i._isPreparingToJoin=!1,i._accessState={access:Ei},i._meetingSessionSummary={},i._finalSummaryOfPrevSession={},i._meetingSessionState=Nc(Ys,i._callObjectMode),i._nativeInCallAudioMode=Hs,i._participants={},i._isScreenSharing=!1,i._participantCounts=Ks,i._rmpPlayerState={},i._waitingParticipants={},i._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},i._activeSpeaker={},i._localAudioLevel=0,i._isLocalAudioLevelObserverRunning=!1,i._remoteParticipantsAudioLevel={},i._isRemoteParticipantsAudioLevelObserverRunning=!1,i._maxAppMessageSize=ea,i._messageChannel=ma()?new qa:new Va,i._iframe&&(i._iframe.requestFullscreen?i._iframe.addEventListener("fullscreenchange",function(){document.fullscreenElement===i._iframe?(i.emitDailyJSEvent({action:$o}),i.sendMessageToCallMachine({action:$o})):(i.emitDailyJSEvent({action:qo}),i.sendMessageToCallMachine({action:qo}))}):i._iframe.webkitRequestFullscreen&&i._iframe.addEventListener("webkitfullscreenchange",function(){document.webkitFullscreenElement===i._iframe?(i.emitDailyJSEvent({action:$o}),i.sendMessageToCallMachine({action:$o})):(i.emitDailyJSEvent({action:qo}),i.sendMessageToCallMachine({action:qo}))})),ma()){var f=i.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"),i._hasNativeAudioFocus=!0,f.addAudioFocusChangeListener(i.handleNativeAudioFocusChange),f.addAppStateChangeListener(i.handleNativeAppStateChange),f.addSystemScreenCaptureStopListener(i.handleNativeSystemScreenCaptureStop)}return i._callObjectMode&&i.startListeningForDeviceChanges(),i._messageChannel.addListenerForMessagesFromCallMachine(i.handleMessageFromCallMachine,i.callClientId,i),i}return l(r,_),o(r,[{key:"destroy",value:(oe=h(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),ma()){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 Gs[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 oe.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 yc(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:"iframe",value:function(){return yc(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return gc(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return gc(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(e,t){for(var n in t){if(!sc[n])throw new Error("unrecognized updateParticipant property ".concat(n));if(sc[n].validate&&!sc[n].validate(t[n],this,this._participants[e]))throw new Error(sc[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:(ie=h(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(gc(this._callObjectMode,"updateWaitingParticipant()"),dc(this._callState,"updateWaitingParticipant()"),"string"!=typeof t||"object"!==n(r))throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise(function(n,i){e.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:t,updates:r},function(e){e.error&&i(e.error),e.id||i(new Error("unknown error in updateWaitingParticipant()")),n({id:e.id})})})}),function(){return ie.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(re=h(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(gc(this._callObjectMode,"updateWaitingParticipants()"),dc(this._callState,"updateWaitingParticipants()"),"object"!==n(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 re.apply(this,arguments)})},{key:"requestAccess",value:(ne=h(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.access,r=void 0===n?{level:Ci}:n,i=t.name,o=void 0===i?"":i;return gc(this._callObjectMode,"requestAccess()"),dc(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 ne.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&&(ma()?(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:(te=h(function*(e){var t=this,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).showInheritedValues,i=void 0!==r&&r;if(gc(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(n(e)){case"string":return new Promise(function(n){t.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:e,showInheritedValues:i},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 te.apply(this,arguments)})},{key:"updateReceiveSettings",value:(ee=h(function*(e){var t=this;if(gc(this._callObjectMode,"updateReceiveSettings()"),!wc(e,{allowAllParticipantsKey:!0}))throw new Error(Oc({allowAllParticipantsKey:!0}));return dc(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 ee.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:$s({},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=$s({},e.audio.processor);delete s._isDefaultWhenNone,n.audio=$s($s({},n.audio),{},{processor:s})}}if(e.video){var c,l,u;e.video.settings&&(!Object.keys(e.video.settings).length&&t||(n.video={settings:$s({},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===(l=e.video.processor)||void 0===l?void 0:l.type)&&(null===(u=e.video.processor)||void 0===u?void 0:u._isDefaultWhenNone);if(e.video.processor&&!d){var h=$s({},e.video.processor);delete h._isDefaultWhenNone,n.video=$s($s({},n.video),{},{processor:h})}}return n}}},{key:"getInputSettings",value:function(){var e=this;return yc(),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=this._inputSettings||{},r={};if(e.video){var i,o,a;if(r.video={},e.video.settings)r.video.settings={},t||e.video.settings.customTrack||null===(a=n.video)||void 0===a||!a.settings?r.video.settings=e.video.settings:r.video.settings=$s($s({},n.video.settings),e.video.settings),Object.keys(r.video.settings).length||delete r.video.settings;else null!==(i=n.video)&&void 0!==i&&i.settings&&(r.video.settings=n.video.settings);e.video.processor?r.video.processor=e.video.processor:null!==(o=n.video)&&void 0!==o&&o.processor&&(r.video.processor=n.video.processor)}else n.video&&(r.video=n.video);if(e.audio){var s,c,l;if(r.audio={},e.audio.settings)r.audio.settings={},t||e.audio.settings.customTrack||null===(l=n.audio)||void 0===l||!l.settings?r.audio.settings=e.audio.settings:r.audio.settings=$s($s({},n.audio.settings),e.audio.settings),Object.keys(r.audio.settings).length||delete r.audio.settings;else null!==(s=n.audio)&&void 0!==s&&s.settings&&(r.audio.settings=n.audio.settings);e.audio.processor?r.audio.processor=e.audio.processor:null!==(c=n.audio)&&void 0!==c&&c.processor&&(r.audio.processor=n.audio.processor)}else n.audio&&(r.audio=n.audio);this._maybeUpdateInputSettings(r)}},{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:(Z=h(function*(e){var t=this;return yc(),kc(e)?e.video||e.audio?(Sc(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(Tc()),Promise.reject(Tc()))}),function(e){return Z.apply(this,arguments)})},{key:"setBandwidth",value:function(e){var t=e.kbs,n=e.trackConstraints;if(yc(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:t,trackConstraints:n}),this}},{key:"getDailyLang",value:function(){var e=this;if(yc(),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 yc(),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[mi,yi].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(X=h(function*(){var e=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),dc(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 X.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return dc(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"replace";gc(this._callObjectMode,"setMeetingSessionData()"),dc(this._callState,"setMeetingSessionData");try{!function(e,t){new Ha({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:ma()||!!t&&!!t.thisMeetingOnly},function(e){delete e.action,delete e.callbackStamp,r(e)})})}},{key:"setUserData",value:(K=h(function*(e){var t=this;try{_c(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 K.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&&!ma())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:(Q=h(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(gc(this._callObjectMode,"startCamera()"),pc(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=$s($s({},this.properties),t)}return new Promise(function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:"start-camera",properties:uc(e.properties,e.callClientId),preloadCache:uc(e._preloadCache,e.callClientId)},function(e){e.error?n(e.error):t({camera:e.camera,mic:e.mic,speaker:e.speaker})})})}),function(){return Q.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&&["audio","video","cam-audio","cam-video","screenVideo","screenAudio","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: audio, video, cam-audio, cam-video, screenVideo, screenAudio, screen-video, screen-audio, rmpAudio, rmpVideo, customVideoDefaults");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,ignoreAudioLevel:ignoreAudioLevel};return yc(),dc(this._callState,"startCustomTrack()"),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise(function(n,r){e._sharedTracks.customTrack=t.track,t.track=aa,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 yc(),dc(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 bc(),fc(this._callMachineInitialized,"setCamera()"),new Promise(function(n){t.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:e},function(e){n({device:e.device})})})}},{key:"setAudioDevice",value:(H=h(function*(e){return bc(),this.nativeUtils().setAudioDevice(e),{deviceId:yield this.nativeUtils().getAudioDevice()}}),function(e){return H.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 yc(),new Promise(function(t){e.sendMessageToCallMachine({action:"cycle-mic"},function(e){t({device:e.device})})})}},{key:"getCameraFacingMode",value:function(){var e=this;return bc(),new Promise(function(t){e.sendMessageToCallMachine({action:"get-camera-facing-mode"},function(e){t(e.facingMode)})})}},{key:"setInputDevicesAsync",value:(W=h(function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,o=e.videoSource;if(yc(),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=aa,a.audio={settings:{customTrack:n}}):(delete this._sharedTracks.audioTrack,a.audio={settings:{deviceId:n}})),r&&(r instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=r,r=aa,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 W.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(V=h(function*(e){var t=this,n=e.outputDeviceId;if(yc(),!n||"string"!=typeof n)throw new Error("outputDeviceId must be provided and must be a valid device id");return this._preloadCache.outputDeviceId=n,this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(e,r){t.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:n},function(n){if(delete n.action,delete n.callbackStamp,n.error){var i=new Error(n.error.message);return i.type=n.error.type,void r(i)}n.returnPreloadCache?e(t._devicesFromInputSettings(t._inputSettings)):e(n)})})}),function(e){return V.apply(this,arguments)})},{key:"getInputDevices",value:(U=h(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 U.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return bc(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(e){if(bc(),[Hs,Qs].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement("audio")&&hc(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",e)}},{key:"preAuth",value:(B=h(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(gc(this._callObjectMode,"preAuth()"),pc(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=$s($s({},this.properties),t),new Promise(function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:"daily-method-preauth",properties:uc(e.properties,e.callClientId),preloadCache:uc(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:(F=h(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=$s($s({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");if(this._updateCallState(pi),this.emitDailyJSEvent({action:Xi}),this._callObjectMode)return 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(fi),n&&t.emitDailyJSEvent({action:eo}),e()},function(e,r){t.emitDailyJSEvent({action:Zi}),r||(t._handleFatalError({action:Zo,errorMsg:e.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:e,bundleUrl:G(t.properties.dailyConfig)}}}),n(e.msg))})});var n=Y(this.assembleMeetingUrl(),this.properties.dailyConfig);return new Promise(function(e,r){var i=0,o=function(){if(i>=n.length){var a="Timed out attempting to load the call. Please check your network connection and try again.";return t._iframe.srcdoc=(s=a,'<!DOCTYPE html>\n<html>\n<head>\n<meta charset="utf-8">\n<style>\n html { font-size: 12px; }\n * { box-sizing: border-box; margin: 0; padding: 0; }\n body {\n background: #1f2d3d;\n color: #fff;\n font-family: GraphikRegular, "Helvetica Neue", Helvetica, Arial, sans-serif;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n }\n .card {\n background: #121a24;\n border: 1px solid #2b3f56;\n border-radius: 4px;\n padding: 32px 40px;\n width: 100%;\n max-width: 65ch;\n text-align: center;\n }\n h1 { color: #f63135; font-size: 1.333rem; font-weight: 600; margin-bottom: 12px; }\n p { font-size: 1rem; line-height: 1.5; color: rgba(255,255,255,0.9); }\n</style>\n</head>\n<body>\n<div class="card"><h1>'.concat("Failed to load","</h1><p>").concat(s,"</p></div>\n</body>\n</html>")),t._handleFatalError({action:Zo,errorMsg:a,error:{type:"connection-error",msg:a,details:{on:"load",sourceError:{msg:"Timed out (>".concat(25e3," ms) when loading call frame"),type:"timeout"},candidateCount:n.length}},preserveIframe:!0}),void r(a)}var s,c=n[i++];t._iframe.src=z(c,t.properties.dailyConfig);var l=setTimeout(function(){t._loadedCallback&&(t._loadedCallback=null,o())},25e3);t._loadedCallback=function(n){clearTimeout(l),t._callState!==yi?($(q(c)),t._updateCallState(fi),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),e()):r(n)}};o()})}}),function(e){return F.apply(this,arguments)})},{key:"join",value:(D=h(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._testCallInProgress&&this.stopTestCallQuality(),!t.url&&!this.properties.url){var n="No room URL has been provided";return console.error(n),Promise.reject(new Error(n))}var r=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(t)}catch(e){return this.updateIsPreparingToJoin(!1),Promise.reject(e)}}else{if(r=!(!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=$s($s({},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===gi||this._callState===vi?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(vi,!1),this.emitDailyJSEvent({action:ro}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:uc(this.properties,this.callClientId),preloadCache:uc(this._preloadCache,this.callClientId)},function(t){t.error&&e._joinedCallback&&(e._joinedCallback(null,t.error),e._joinedCallback=null)}),new Promise(function(t,n){e._joinedCallback=function(i,o){if(e._callState!==yi){if(o)return e._updateCallState(mi),void n(o);if(e._updateCallState(gi),i)for(var a in i){if(e._callObjectMode){var s=e._callMachine().store;hs(i[a],s),ps(i[a],s),vs(i[a],e._participants[a],s)}e._participants[a]=$s({},i[a]),e.toggleParticipantAudioBasedOnNativeAudioFocus()}r&&e.loadCss(e.properties),t(i)}else n(o)}}))}),function(){return D.apply(this,arguments)})},{key:"leave",value:(L=h(function*(){var e=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise(function(t){e._callState===mi||e._callState===yi?t():e._callObjectLoader&&!e._callObjectLoader.loaded?(e._callObjectLoader.cancel(),e._updateCallState(mi),e.resetMeetingDependentVars(),e.emitDailyJSEvent({action:mi}),t()):(e._resolveLeave=t,e.sendMessageToCallMachine({action:"leave-meeting"}))})}),function(){return L.apply(this,arguments)})},{key:"startScreenShare",value:(I=h(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(fc(this._callMachineInitialized,"startScreenShare()"),t.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",t.screenVideoSendSettings),t.mediaStream&&(this._sharedTracks.screenMediaStream=t.mediaStream,t.mediaStream=aa),"undefined"!=typeof DailyNativeUtils&&void 0!==DailyNativeUtils.isIOS&&DailyNativeUtils.isIOS){var n=this.nativeUtils();if(yield n.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:Xo,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:ra,captureOptions:t})}),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:ra,captureOptions:t})}),function(){return I.apply(this,arguments)})},{key:"stopScreenShare",value:function(){fc(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&&"cloud-audio-only"!==t&&"raw-tracks"!==t&&"local"!==t)throw new Error("invalid type: ".concat(t,", allowed values 'cloud', 'cloud-audio-only', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine($s({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($s({action:"local-recording-stop"},e))}},{key:"startLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine($s({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:ia,endpointsOp:pa,endpoints:t,instanceId:n})}},{key:"removeLiveStreamingEndpoints",value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:ia,endpointsOp:fa,endpoints:t,instanceId:n})}},{key:"stopLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine($s({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."),Oa()&&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(!Dc(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(Zs.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(!Dc(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(Zs));if(n&&!i.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(j=h(function*(e){var t=this,n=e.url,r=e.settings,i=void 0===r?{state:la.PLAY}:r;try{!function(e){if("string"!=typeof e)throw new Error('url parameter must be "string" type')}(n),Lc(i),function(e){for(var t in e)if(!ec.includes(t))throw new Error("Invalid key ".concat(t,", valid keys are: ").concat(ec));e.simulcastEncodings&&this.validateSimulcastEncodings(e.simulcastEncodings,Xs,!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 j.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(x=h(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 x.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(A=h(function*(e){var t=this,n=e.session_id,r=e.settings;try{Lc(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 A.apply(this,arguments)})},{key:"startTranscription",value:function(e){dc(this._callState,"startTranscription()"),this.sendMessageToCallMachine($s({action:"daily-method-start-transcription"},e))}},{key:"updateTranscription",value:function(e){if(dc(this._callState,"updateTranscription()"),!e)throw new Error("updateTranscription Error: options is mandatory");if("object"!==n(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($s({action:"daily-method-update-transcription"},e))}},{key:"stopTranscription",value:function(e){if(dc(this._callState,"stopTranscription()"),e&&"object"!==n(e))throw new Error("stopTranscription Error: options must be object type");if(e&&!e.instanceId)throw new Error('"instanceId" not provided');this.sendMessageToCallMachine($s({action:"daily-method-stop-transcription"},e))}},{key:"startDialOut",value:(P=h(function*(e){var t=this;dc(this._callState,"startDialOut()");var r=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");if(void 0!==e.videoSettings){if("object"!==n(e.videoSettings)||null===e.videoSettings)throw new Error("Error starting dial out: videoSettings must be an object");if(!e.video)throw new Error("Error starting dial out: videoSettings provided but video is not enabled");var i=e.videoSettings;if(void 0!==i.width){if(!Number.isInteger(i.width)||i.width<=0)throw new Error("Error starting dial out: videoSettings.width must be a positive integer");if(i.width>1280)throw new Error("Error starting dial out: videoSettings.width must be less than or equal to 1280")}if(void 0!==i.height){if(!Number.isInteger(i.height)||i.height<=0)throw new Error("Error starting dial out: videoSettings.height must be a positive integer");if(i.height>720)throw new Error("Error starting dial out: videoSettings.height must be less than or equal to 720")}if(void 0!==i.fps){if(!Number.isInteger(i.fps)||i.fps<=0)throw new Error("Error starting dial out: videoSettings.fps must be a positive integer");if(i.fps>30)throw new Error("Error starting dial out: videoSettings.fps must be less than or equal to 30")}if(void 0!==i.videoBitrate){if(!Number.isInteger(i.videoBitrate)||i.videoBitrate<=0)throw new Error("Error starting dial out: videoSettings.videoBitrate must be a positive integer");if(i.videoBitrate>1e3)throw new Error("Error starting dial out: videoSettings.videoBitrate must be less than or equal to 1000 kbps")}}!function(e){if(e&&(r(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&&r(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")}if(lc(e),e.permissions&&e.permissions.canReceive){var o=v(Rs.validateJSONObject(e.permissions.canReceive),2),a=o[0],s=o[1];if(!a)throw new Error(s)}if(e.provider){if(e.provider!==ua&&e.provider!==da)throw new Error("Error: provider can be set only to '".concat(ua,"' or '").concat(da,"', got: ").concat(e.provider));if(e.phoneNumber)throw new Error("Error starting dial out: provider valid only for sipUri, not phoneNumber");e.provider===ua&&console.warn("(pre-beta) provider=".concat(ua," is currently in pre-beta, things might break!"))}else e.provider=da;return new Promise(function(n,r){t.sendMessageToCallMachine($s({action:"dialout-start"},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return P.apply(this,arguments)})},{key:"startDialIn",value:(O=h(function*(e){var t=this;if(dc(this._callState,"startDialIn()"),!e||"object"!==n(e))throw new Error("Error starting dial in: args must be an object");if("string"!=typeof e.displayName||0===e.displayName.length)throw new Error("Error starting dial in: displayName is required and must be a non-empty string");if(e.displayName.length>=200)throw new Error("Error starting dial in: displayName length must be less than 200");if(void 0!==e.userId&&"string"!=typeof e.userId)throw new Error("Error starting dial in: userId must be a string");if(void 0!==e.userId&&e.userId.length>36)throw new Error("Error starting dial in: userId length must be less than or equal to 36");if(void 0!==e.video&&"boolean"!=typeof e.video)throw new Error("Error starting dial in: video must be a boolean");if(void 0!==e.sipEndpoint&&"string"!=typeof e.sipEndpoint)throw new Error("Error starting dial in: sipEndpoint must be a string");if(void 0!==e.codecs&&("object"!==n(e.codecs)||null===e.codecs))throw new Error("Error starting dial in: codecs must be an object");if(void 0!==e.permissions&&("object"!==n(e.permissions)||null===e.permissions))throw new Error("Error starting dial in: permissions must be an object");if(e.provider){if(e.provider!==ua&&e.provider!==da)throw new Error("Error starting dial in: provider must be '".concat(ua,"' or '").concat(da,"'"))}else e=$s($s({},e),{},{provider:da});return new Promise(function(n,r){t.sendMessageToCallMachine($s({action:"dialin-start",sipMode:"dial-in"},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return O.apply(this,arguments)})},{key:"stopDialOut",value:function(e){var t=this;return dc(this._callState,"stopDialOut()"),new Promise(function(n,r){t.sendMessageToCallMachine($s({action:"dialout-stop"},e),function(e){e.error?r(e.error):n(e)})})}},{key:"sipCallTransfer",value:(T=h(function*(e){var t=this;if(dc(this._callState,"sipCallTransfer()"),!e)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return e.useSipRefer=!1,Ic(e,"sipCallTransfer"),lc(e),new Promise(function(n,r){t.sendMessageToCallMachine($s({action:va},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return T.apply(this,arguments)})},{key:"sipRefer",value:(C=h(function*(e){var t=this;if(dc(this._callState,"sipRefer()"),!e)throw new Error("sessionId and toEndPoint are mandatory parameter");return e.useSipRefer=!0,Ic(e,"sipRefer"),new Promise(function(n,r){t.sendMessageToCallMachine($s({action:va},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return C.apply(this,arguments)})},{key:"sendDTMF",value:(E=h(function*(e){var t=this;return dc(this._callState,"sendDTMF()"),function(e){var t=e.sessionId,n=e.tones,r=e.method,i=e.digitDurationMs;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 o=/[^0-9A-D*#]/g,a=n.match(o);if(a&&a[0])throw new Error("".concat(a[0]," is not valid DTMF tone"));if(r&&!["sip-info","telephone-event","auto"].includes(r))throw new Error("method must be one of 'sip-info', 'telephone-event', or 'auto'");if(void 0!==i){if("number"!=typeof i)throw new Error("digitDurationMs must be a number");if(!Number.isFinite(i)||!Number.isInteger(i))throw new Error("digitDurationMs must be a finite integer number");if(i<50||i>2e3)throw new Error("digitDurationMs must be between 50ms and 2000ms")}}(e),e.method=e.method||"auto",e.digitDurationMs=e.digitDurationMs||500,new Promise(function(n,r){t.sendMessageToCallMachine($s({action:"send-dtmf"},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return E.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var e=this;if(this._callState!==gi){return Promise.resolve($s({stats:{latest:{}}},this._network))}return new Promise(function(t){e.sendMessageToCallMachine({action:"get-calc-stats"},function(n){t($s($s({},e._network),{},{stats:n.stats}))})})}},{key:"testWebsocketConnectivity",value:(M=h(function*(){var e=this;if(vc(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 M.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(e){return e?e instanceof MediaStreamTrack?!!Os(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:(k=h(function*(){var t=this;yc(),gc(this._callObjectMode,"testCallQuality()"),fc(this._callMachineInitialized,"testCallQuality()",null,!0),pc(this._callState,this._isPreparingToJoin,"testCallQuality()");var n=this._testCallAlreadyInProgress,r=function(e){n||(t._testCallInProgress=e)};if(r(!0),this.needsLoad())try{var i=this._callState;yield this.load(),this._callState=i}catch(e){return r(!1),Promise.reject(e)}return new Promise(function(n){t.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:t.properties.dailyJsVersion},function(i){var o=i.results,a=o.result,s=e(o,Us);if("failed"===a){var c,l=$s({},s);null!==(c=s.error)&&void 0!==c&&c.details?(s.error.details=JSON.parse(s.error.details),l.error=$s($s({},l.error),{},{details:$s({},l.error.details)}),l.error.details.duringTest="testCallQuality"):(l.error=l.error?$s({},l.error):{},l.error.details={duringTest:"testCallQuality"}),t._maybeSendToSentry(l)}r(!1),n($s({result:a},s))})})}),function(){return k.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(w=h(function*(e){var t;ma()?(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 w.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(b=h(function*(e){var t=this;if(vc(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 b.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){ma()?(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:(y=h(function*(e){var t=this;if(vc(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 y.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){if(e._callState===gi){e.sendMessageToCallMachine({action:"get-cpu-load-stats"},function(e){t(e.cpuStats)})}else 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(Zs))}},{key:"_validateVideoSendSettings",value:function(e,t){var r="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"],i="Video send settings should be either an object or one of the supported presets: ".concat(r.join());if("string"==typeof t){if(!r.includes(t))throw new Error(i)}else{if("object"!==n(t))throw new Error(i);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 o=!1;switch(Object.keys(t.encodings).length){case 1:o=!t.encodings.low;break;case 2:o=!t.encodings.low||!t.encodings.medium;break;case 3:o=!t.encodings.low||!t.encodings.medium||!t.encodings.high;break;default:o=!0}if(o)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=v(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 yc(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(e){return yc(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:e}),this}},{key:"activeSpeakerMode",value:function(){return yc(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(e){return dc(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:(m=h(function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return"Firefox"===Aa()&&xa().major>115&&xa().major<123&&(t=t.filter(function(e){return"audiooutput"!==e.kind})),{devices:t.map(function(e){var t=JSON.parse(JSON.stringify(e));if(!ma()&&"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 m.apply(this,arguments)})},{key:"sendAppMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*";if(dc(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 yc(),dc(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine($s({action:"add-fake-participant"},e)),this}},{key:"setShowNamesMode",value:function(e){return mc(this._callObjectMode,"setShowNamesMode()"),yc(),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 mc(this._callObjectMode,"setShowLocalVideo()"),yc(),dc(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 mc(this._callObjectMode,"showLocalVideo()"),yc(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return mc(this._callObjectMode,"setShowParticipantsBar()"),yc(),dc(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 mc(this._callObjectMode,"showParticipantsBar()"),yc(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return yc(),mc(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(e){return yc(),mc(this._callObjectMode,"setCustomIntegrations()"),dc(this._callState,"setCustomIntegrations()"),xc(e)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:e}),this._customIntegrations=e,this):this}},{key:"startCustomIntegrations",value:function(e){var t=this;if(yc(),mc(this._callObjectMode,"startCustomIntegrations()"),dc(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(yc(),mc(this._callObjectMode,"stopCustomIntegrations()"),dc(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 mc(this._callObjectMode,"customTrayButtons()"),yc(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(e){return mc(this._callObjectMode,"updateCustomTrayButtons()"),yc(),dc(this._callState,"updateCustomTrayButtons()"),Ac(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(nc))),this)}},{key:"theme",value:function(){return mc(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(e){var t=this;return mc(this._callObjectMode,"setTheme()"),new Promise(function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=$s({},e),t.sendMessageToCallMachine({action:"set-theme",theme:t.properties.theme});try{t.emitDailyJSEvent({action:Ki,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=h(function*(){if(yc(),this._iframe&&!document.fullscreenElement&&_a())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(){yc(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(f=h(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 f.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:(p=h(function*(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).includeRoomConfigDefaults,n=void 0===t||t;return this._accessState.access===Ei||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 p.apply(this,arguments)})},{key:"geo",value:(d=h(function*(){return console.error("The geo() function is no longer supported. Geographical decisions now depend upon domain and room settings."),{current:""}}),function(){return d.apply(this,arguments)})},{key:"setNetworkTopology",value:(c=h(function*(e){var t=this;return yc(),dc(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 c.apply(this,arguments)})},{key:"getNetworkTopology",value:(i=h(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 i.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(e){if(yc(),"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;ma()||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=$s($s({},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;ma()||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=$s($s({},c.video.settings),e.dailyConfig.userMediaVideoConstraints),e.inputSettings=c,delete e.dailyConfig.userMediaVideoConstraints}for(var l in e)if(ac[l]){if(ac[l].validate&&!ac[l].validate(e[l],this))throw new Error("property '".concat(l,"': ").concat(ac[l].help))}else console.warn("Ignoring unrecognized property '".concat(l,"'")),delete e[l]}},{key:"assembleMeetingUrl",value:function(){var e,t,n=$s($s({},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(ac).filter(function(e){return ac[e].queryString&&void 0!==n[e]}).map(function(e){return"".concat(ac[e].queryString,"=").concat(n[e])}).join("&")}},{key:"needsLoad",value:function(){return[hi,pi,mi,yi].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 Qi:this.sendMessageToCallMachine($s({action:Yi},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var t=J(),n={action:oa,level:"log",code:1011,stats:{event:"bundle load",time:"no-op"===this._bundleLoadTime?0:this._bundleLoadTime,preLoaded:"no-op"===this._bundleLoadTime,url:G(this.properties.dailyConfig),resolvedBaseDomain:t,failedOver:null!=t&&"daily.co"!==t}};this.sendMessageToCallMachine(n),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case eo:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(e);break;case io:var r,i=$s({},e);delete i.internal,this._maxAppMessageSize=(null===(r=e.internal)||void 0===r?void 0:r._maxAppMessageSize)||ea,this._joinedCallback&&(this._joinedCallback(e.participants),this._joinedCallback=null),this.emitDailyJSEvent(i);break;case ao:case so:if(this._callState===mi)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;hs(e.participant,a),ps(e.participant,a),vs(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]=$s({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(e))}break;case co: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 lo:S(this._participantCounts,e.participantCounts)||(this._participantCounts=e.participantCounts,this.emitDailyJSEvent(e));break;case uo:var c={access:e.access};e.awaitingAccess&&(c.awaitingAccess=e.awaitingAccess),S(this._accessState,c)||(this._accessState=c,this.emitDailyJSEvent(e));break;case ho:if(e.meetingSession){this._meetingSessionSummary=e.meetingSession,this.emitDailyJSEvent(e);var l=$s($s({},e),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(l)}break;case Zo:this._handleFatalError(e);break;case oo:this._callState!==yi&&this._updateCallState(mi),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(e);break;case"selected-devices-updated":e.devices&&this.emitDailyJSEvent(e);break;case Bo:var u=e.state,d=e.threshold,h=e.quality,p=u.state,f=u.reasons;p===this._network.networkState&&S(f,this._network.networkStateReasons)&&d===this._network.threshold&&h===this._network.quality||(this._network.networkState=p,this._network.networkStateReasons=f,this._network.quality=h,this._network.threshold=d,e.networkState=p,f.length&&(e.networkStateReasons=f),delete e.state,this.emitDailyJSEvent(e));break;case Vo:e&&e.cpuLoadState&&this.emitDailyJSEvent(e);break;case Jo:e&&void 0!==e.faceCounts&&this.emitDailyJSEvent(e);break;case Fo:var v=e.activeSpeaker;this._activeSpeaker.peerId!==v.peerId&&(this._activeSpeaker.peerId=v.peerId,this.emitDailyJSEvent({action:e.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var g=e.show;this._showLocalVideo=g,this.emitDailyJSEvent({action:e.action,show:g});break;case Ro:var m=e.enabled;this._activeSpeakerMode!==m&&(this._activeSpeakerMode=m,this.emitDailyJSEvent({action:e.action,enabled:this._activeSpeakerMode}));break;case vo:case go:case mo:this._waitingParticipants=e.allWaitingParticipants,this.emitDailyJSEvent({action:e.action,participant:e.participant});break;case Yo:S(this._receiveSettings,e.receiveSettings)||(this._receiveSettings=e.receiveSettings,this.emitDailyJSEvent({action:e.action,receiveSettings:e.receiveSettings}));break;case Ko:this._maybeUpdateInputSettings(e.inputSettings);break;case"send-settings-updated":S(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 xo:var y=e.session_id;this._rmpPlayerState[y]=e.playerState,this.emitDailyJSEvent(e);break;case Io:delete this._rmpPlayerState[e.session_id],this.emitDailyJSEvent(e);break;case jo:var b=e.session_id,_=this._rmpPlayerState[b];_&&this.compareEqualForRMPUpdateEvent(_,e.remoteMediaPlayerState)||(this._rmpPlayerState[b]=e.remoteMediaPlayerState,this.emitDailyJSEvent(e));break;case"custom-button-click":case"sidebar-view-changed":case"pip-started":case"pip-stopped":this.emitDailyJSEvent(e);break;case po:var w=this._meetingSessionState.topology!==(e.meetingSessionState&&e.meetingSessionState.topology);this._meetingSessionState=Nc(e.meetingSessionState,this._callObjectMode),(this._callObjectMode||w)&&this.emitDailyJSEvent(e);break;case Lo:this._isScreenSharing=!0,this.emitDailyJSEvent(e);break;case Do:case No:this._isScreenSharing=!1,this.emitDailyJSEvent(e);break;case So:case Mo:case Eo:case Co:case To:case _o:case wo:case ko:case to:case no:case Po:case Ao:case"test-completed":case Uo:case Oo:case zo:case Wo:case Go:case Ho:case Xo:case Qo:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dtmf-event":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:Mo}))}},{key:"maybeEventRecordingStarted",value:function(e,t){var n="record";e&&(t.local||!0!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:So}))}},{key:"_trackStatePlayable",value:function(e){return!(!e||e.state!==Mi)}},{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),l=this._trackStatePlayable(a),u=this._trackChanged(s,null==a?void 0:a.track);c&&(l&&!u||this.emitDailyJSEvent({action:bo,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),l=this._trackStatePlayable(a),u=this._trackChanged(null==o?void 0:o.track,s);l&&(c&&!u||this.emitDailyJSEvent({action:yo,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!!S(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 ma()?"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===gi;this.updateShowAndroidOngoingMeetingNotification(i);var o=hc(n,r),a=hc(this._callState,this._isPreparingToJoin);o!==a&&(this.updateKeepDeviceAwake(a),this.updateDeviceAudioMode(a),this.updateNoOpRecordingEnsuringBackgroundContinuity(a))}}},{key:"_handleFatalError",value:function(t){var n;this._iframe&&!t.preserveIframe&&(this._iframe.src=""),this._updateCallState(yi),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(t.errorMsg),this._loadedCallback=null),t.preserveIframe;var r=e(t,Vs);"string"==typeof(null==r||null===(n=r.error)||void 0===n?void 0:n.details)&&(r.error.details=JSON.parse(r.error.details)),this._maybeSendToSentry(t),this._joinedCallback&&(this._joinedCallback(null,r),this._joinedCallback=null),this.emitDailyJSEvent(r)}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=Ks,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Ei},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Nc(Ys,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=ea,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(e){ma()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(e){if(ma()&&!this.disableReactNativeAutoDeviceManagement("audio")){var t=e?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(t)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(e){if(ma()&&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){ma()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var e;if(ma()){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(Gs)[0];if(this.needsLoad()){if(e&&!e.needsLoad()){var t={action:oa,level:"error",code:this.strictMode?9995:9997};e.sendMessageToCallMachine(t)}else if(!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:oa,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(Gs);e<t.length;e++){var n=t[e];n._callMachineInitialized?(n.sendMessageToCallMachine({action:oa,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),n._delayDuplicateInstanceLog=!1):n._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(e){var t,n,i,o,a;if(null!==(t=e.error)&&void 0!==t&&t.type){if(![Ui,Ri,Ni].includes(e.error.type))return;if(e.error.type===Ni&&e.error.msg.includes("deleted"))return}var s=null!==(n=this.properties)&&void 0!==n&&n.url?new URL(this.properties.url):void 0,c="production";s&&s.host.includes(".staging.daily")&&(c="staging");var l,u,d,h,p,f=function(e){const t=[zn(),$n(),ti(),Zr(),si(),di(),er(),ui()];return!1!==e.autoSessionTracking&&t.push(ai()),t}({}).filter(function(e){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(e.name)}),v=new Or({dsn:"https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844",transport:$r,stackParser:Yr,integrations:f,environment:c}),g=new wt;if(g.setClient(v),v.init(),(null===(i=this._participants)||void 0===i||null===(i=i.local)||void 0===i?void 0:i.session_id)&&g.setExtra("sessionId",this._participants.local.session_id),this.properties){var m=$s({},this.properties);m.userName=m.userName?"[Filtered]":void 0,m.userData=m.userData?"[Filtered]":void 0,m.token=m.token?"[Filtered]":void 0,g.setExtra("properties",m)}if(s){var y=s.searchParams.get("domain");if(!y){var b=s.host.match(/(.*?)\./);y=b&&b[1]||""}y&&g.setTag("domain",y)}e.error&&(g.setTag("fatalErrorType",e.error.type),g.setExtra("errorDetails",e.error.details),(null===(l=e.error.details)||void 0===l?void 0:l.uri)&&g.setTag("serverAddress",e.error.details.uri),(null===(u=e.error.details)||void 0===u?void 0:u.workerGroup)&&g.setTag("workerGroup",e.error.details.workerGroup),(null===(d=e.error.details)||void 0===d?void 0:d.geoGroup)&&g.setTag("geoGroup",e.error.details.geoGroup),(null===(h=e.error.details)||void 0===h?void 0:h.on)&&g.setTag("connectionAttempt",e.error.details.on),null!==(p=e.error.details)&&void 0!==p&&p.bundleUrl&&(g.setTag("bundleUrl",e.error.details.bundleUrl),g.setTag("bundleError",e.error.details.sourceError.type)));g.setTags({callMode:this._callObjectMode?ma()?"reactNative":null!==(o=this.properties)&&void 0!==o&&null!==(o=o.dailyConfig)&&void 0!==o&&null!==(o=o.callMode)&&void 0!==o&&o.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:r.version()});var _=(null===(a=e.error)||void 0===a?void 0:a.msg)||e.errorMsg;g.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(!S(this._inputSettings,e)){var t=this._getInputSettings();this._inputSettings=e;var n=this._getInputSettings();S(t,n)||this.emitDailyJSEvent({action:Ko,inputSettings:n})}}}],[{key:"supportedBrowser",value:function(){if(ma())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var e=N.getParser(ga());return{supported:!!Ta(),mobile:"mobile"===e.getPlatformType(),name:e.getBrowserName(),version:e.getBrowserVersion(),supportsFullscreen:!!_a(),supportsScreenShare:!!ba(),supportsSfu:!!Ta(),supportsVideoProcessing:Ea(),supportsAudioProcessing:Ca()}}},{key:"version",value:function(){return"0.92.2"}},{key:"createCallObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.layout="none",new r(null,e)}},{key:"wrap",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(yc(),!e||!e.contentWindow||"string"!=typeof e.src)throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return t.layout||(t.customLayout?t.layout="custom-v1":t.layout="browser"),new r(e,t)}},{key:"createFrame",value:function(e,t){var n,i;yc(),e&&t?(n=e,i=t):e&&e.append?(n=e,i={}):(n=document.body,i=e||{});var o=i.iframeStyle;o||(o=n===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; compute-pressure;",a.style.visibility="hidden",n.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 r(a,i)}catch(e){throw n.removeChild(a),e}}},{key:"createTransparentFrame",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};yc();var t=document.createElement("iframe");return t.allow="microphone; camera; autoplay",t.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(t),e.layout||(e.layout="custom-v1"),r.wrap(t,e)}},{key:"getCallInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e?Gs[e]:Object.values(Gs)[0]}}]);var i,c,d,p,f,g,m,y,b,w,k,M,E,C,T,O,P,A,x,j,I,L,D,F,B,U,V,W,H,Q,K,X,Z,ee,te,ne,re,ie,oe}();function lc(e){if(e.extension){if("string"!=typeof e.extension)throw new Error("Error starting dial out: extension must be a string");if(e.extension.length>20)throw new Error("Error starting dial out: extension length must be less than or equal to 20")}if(e.waitBeforeExtensionDialSec){if("number"!=typeof e.waitBeforeExtensionDialSec)throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be a number");if(e.waitBeforeExtensionDialSec>60)throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60");if(!e.extension)throw new Error("Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension")}}function uc(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]=aa;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 dc(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==gi){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 hc(e,t){return[vi,gi].includes(e)||t}function pc(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(hc(e,t)){var i="".concat(n," not supported after joining a meeting.");throw r&&(i+=" ".concat(r)),console.error(i),new Error(i)}}function fc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method",n=arguments.length>2?arguments[2]:void 0;if(!e){var r="".concat(t,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 n&&(r+=" ".concat(n)),console.error(r),new Error(r)}}function vc(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 gc(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 mc(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 yc(){if(ma())throw new Error("This daily-js method is not currently supported in React Native")}function bc(){if(!ma())throw new Error("This daily-js method is only supported in React Native")}function _c(e){if(void 0===e)return!0;var t;if("string"==typeof e)t=e;else try{t=JSON.stringify(e),S(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 wc(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=v(s[a],2),l=c[0],u=c[1];if(!r(l)||!o(u))return!1}return!0}function kc(e){if("object"!==n(e))return!1;for(var t=0,r=Object.entries(e);t<r.length;t++){var i=v(r[t],2),o=i[0],a=i[1];switch(o){case"video":if("object"!==n(a))return!1;for(var s=0,c=Object.entries(a);s<c.length;s++){var l=v(c[s],2),u=l[0],d=l[1];switch(u){case"processor":if(!Ec(d))return!1;break;case"settings":if(!Cc(d))return!1;break;default:return!1}}break;case"audio":if("object"!==n(a))return!1;for(var h=0,p=Object.entries(a);h<p.length;h++){var f=v(p[h],2),g=f[0],m=f[1];switch(g){case"processor":if(!Mc(m))return!1;break;case"settings":if(!Cc(m))return!1;break;default:return!1}}break;default:return!1}}return!0}function Sc(e,t,n){var r,i=[];e.video&&e.video.processor&&(Ea(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&&(Ca()||(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:aa}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:aa}):delete n.videoTrack)}function Mc(e){if(ma())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type"];return!!e&&("object"===n(e)&&(Object.keys(e).filter(function(e){return!t.includes(e)}).forEach(function(t){console.warn("invalid key inputSettings -> audio -> processor : ".concat(t)),delete e[t]}),!!function(e){if("string"!=typeof e)return!1;if(!Object.values(ca).includes(e))return console.error("inputSettings audio processor type invalid"),!1;return!0}(e.type)))}function Ec(e){if(ma())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type","config"];if(!e)return!1;if("object"!==n(e))return!1;if(!function(e){if("string"!=typeof e)return!1;if(!Object.values(sa).includes(e))return console.error("inputSettings video processor type invalid"),!1;return!0}(e.type))return!1;if(e.config){if("object"!==n(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 sa.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 sa.BGIMAGE:return!(void 0!==t.source&&!function(e){if("default"===e.source)return e.type="default",!0;if(e.source instanceof ArrayBuffer)return!0;if(K(e.source))return 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 ha.includes(r)}catch(e){return console.error("failed to deduce blob content type",e),!1}var i=n.split(".").at(-1).toLowerCase().trim();return ha.includes(i)}(e.source)||(console.error("invalid image type; supported types: [".concat(ha.join(", "),"]")),!1);return 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!t.includes(e)}).forEach(function(t){console.warn("invalid key inputSettings -> video -> processor : ".concat(t)),delete e[t]}),!0}function Cc(e){return"object"===n(e)&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function Tc(){var e=Object.values(sa).join(" | "),t=Object.values(ca).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(e," ], config?: {} } }, audio?: { processor: {type: [ ").concat(t," ] } } }")}function Oc(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(Pi).concat(t?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function Pc(){return"customIntegrations should be an object of type ".concat(JSON.stringify(rc),".")}function Ac(e){if(e&&"object"!==n(e)||Array.isArray(e))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(nc),".")),!1;if(e)for(var t=0,r=Object.entries(e);t<r.length;t++)for(var i=v(r[t],1)[0],o=0,a=Object.entries(e[i]);o<a.length;o++){var s=v(a[o],2),c=s[0],l=s[1],u=nc.id[c];if(!u)return console.error("customTrayButton does not support key ".concat(c)),!1;switch(c){case"iconPath":case"iconPathDarkMode":if(!K(l))return console.error("customTrayButton ".concat(c," should be a url.")),!1;break;case"visualState":if(!["default","sidebar-open","active"].includes(l))return console.error("customTrayButton ".concat(c," should be ").concat(u,". Got: ").concat(l)),!1;break;default:if(n(l)!==u)return console.error("customTrayButton ".concat(c," should be a ").concat(u,".")),!1}}return!0}function xc(e){if(!e||e&&"object"!==n(e)||Array.isArray(e))return console.error(Pc()),!1;for(var t=function(e){return"".concat(e," should be ").concat(rc.id[e])},r=function(e,t){return console.error("customIntegration ".concat(e,": ").concat(t))},i=0,o=Object.entries(e);i<o.length;i++){var a=v(o[i],1)[0];if(!("label"in e[a]))return r(a,"label is required"),!1;if(!("location"in e[a]))return r(a,"location is required"),!1;if(!("src"in e[a])&&!("srcdoc"in e[a]))return r(a,"src or srcdoc is required"),!1;for(var s=0,c=Object.entries(e[a]);s<c.length;s++){var l=v(c[s],2),u=l[0],d=l[1];switch(u){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if("string"!=typeof d)return r(a,t(u)),!1;break;case"iconURL":if(!K(d))return r(a,"".concat(u," should be a url")),!1;break;case"src":if("srcdoc"in e[a])return r(a,"cannot have both src and srcdoc"),!1;if(!K(d))return r(a,'src "'.concat(d,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in e[a])return r(a,"cannot have both src and srcdoc"),!1;if("string"!=typeof d)return r(a,t(u)),!1;break;case"location":if(!["main","sidebar"].includes(d))return r(a,t(u)),!1;break;case"controlledBy":if("*"!==d&&"owners"!==d&&(!Array.isArray(d)||d.some(function(e){return"string"!=typeof e})))return r(a,t(u)),!1;break;case"shared":if((!Array.isArray(d)||d.some(function(e){return"string"!=typeof e}))&&"owners"!==d&&"boolean"!=typeof d)return r(a,t(u)),!1;break;default:if(!rc.id[u])return console.error("customIntegration does not support key ".concat(u)),!1}}}return!0}function jc(e,t){if(void 0===t)return!1;switch(n(t)){case"string":return n(e)===t;case"object":if("object"!==n(e))return!1;for(var r in e)if(!jc(e[r],t[r]))return!1;return!0;default:return!1}}function Ic(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 Lc(e){if("object"!==n(e))throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(e.state&&!Object.values(la).includes(e.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(la));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 Dc(e,t,n){return!("number"!=typeof e||e<t||e>n)}function Nc(e,t){return e&&!t&&delete e.data,e}export{Ci as DAILY_ACCESS_LEVEL_FULL,Ti as DAILY_ACCESS_LEVEL_LOBBY,Oi as DAILY_ACCESS_LEVEL_NONE,Ei as DAILY_ACCESS_UNKNOWN,U as DAILY_BASE_DOMAINS,$i as DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE,Vi as DAILY_CAMERA_ERROR_CAM_IN_USE,Gi as DAILY_CAMERA_ERROR_CONSTRAINTS,Ji as DAILY_CAMERA_ERROR_MIC_IN_USE,Wi as DAILY_CAMERA_ERROR_NOT_FOUND,qi as DAILY_CAMERA_ERROR_PERMISSIONS,zi as DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES,Hi as DAILY_CAMERA_ERROR_UNKNOWN,uo as DAILY_EVENT_ACCESS_STATE_UPDATED,Fo as DAILY_EVENT_ACTIVE_SPEAKER_CHANGE,Ro as DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE,Po as DAILY_EVENT_APP_MSG,no as DAILY_EVENT_CAMERA_ERROR,Vo as DAILY_EVENT_CPU_LOAD_CHANGE,Zo as DAILY_EVENT_ERROR,qo as DAILY_EVENT_EXIT_FULLSCREEN,Jo as DAILY_EVENT_FACE_COUNTS_UPDATED,$o as DAILY_EVENT_FULLSCREEN,Yi as DAILY_EVENT_IFRAME_LAUNCH_CONFIG,Qi as DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG,Ko as DAILY_EVENT_INPUT_SETTINGS_UPDATED,io as DAILY_EVENT_JOINED_MEETING,ro as DAILY_EVENT_JOINING_MEETING,Qo as DAILY_EVENT_LANG_UPDATED,oo as DAILY_EVENT_LEFT_MEETING,Ho as DAILY_EVENT_LIVE_STREAMING_ERROR,zo as DAILY_EVENT_LIVE_STREAMING_STARTED,Go as DAILY_EVENT_LIVE_STREAMING_STOPPED,Wo as DAILY_EVENT_LIVE_STREAMING_UPDATED,eo as DAILY_EVENT_LOADED,Xi as DAILY_EVENT_LOADING,Zi as DAILY_EVENT_LOAD_ATTEMPT_FAILED,No as DAILY_EVENT_LOCAL_SCREEN_SHARE_CANCELED,Lo as DAILY_EVENT_LOCAL_SCREEN_SHARE_STARTED,Do as DAILY_EVENT_LOCAL_SCREEN_SHARE_STOPPED,fo as DAILY_EVENT_MEETING_SESSION_DATA_ERROR,po as DAILY_EVENT_MEETING_SESSION_STATE_UPDATED,ho as DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED,Uo as DAILY_EVENT_NETWORK_CONNECTION,Bo as DAILY_EVENT_NETWORK_QUALITY_CHANGE,Xo as DAILY_EVENT_NONFATAL_ERROR,lo as DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED,ao as DAILY_EVENT_PARTICIPANT_JOINED,co as DAILY_EVENT_PARTICIPANT_LEFT,so as DAILY_EVENT_PARTICIPANT_UPDATED,Yo as DAILY_EVENT_RECEIVE_SETTINGS_UPDATED,Oo as DAILY_EVENT_RECORDING_DATA,Co as DAILY_EVENT_RECORDING_ERROR,So as DAILY_EVENT_RECORDING_STARTED,Eo as DAILY_EVENT_RECORDING_STATS,Mo as DAILY_EVENT_RECORDING_STOPPED,To as DAILY_EVENT_RECORDING_UPLOAD_COMPLETED,xo as DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED,Io as DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED,jo as DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED,to as DAILY_EVENT_STARTED_CAMERA,Ki as DAILY_EVENT_THEME_UPDATED,yo as DAILY_EVENT_TRACK_STARTED,bo as DAILY_EVENT_TRACK_STOPPED,ko as DAILY_EVENT_TRANSCRIPTION_ERROR,Ao as DAILY_EVENT_TRANSCRIPTION_MSG,_o as DAILY_EVENT_TRANSCRIPTION_STARTED,wo as DAILY_EVENT_TRANSCRIPTION_STOPPED,vo as DAILY_EVENT_WAITING_PARTICIPANT_ADDED,mo as DAILY_EVENT_WAITING_PARTICIPANT_REMOVED,go as DAILY_EVENT_WAITING_PARTICIPANT_UPDATED,Ui as DAILY_FATAL_ERROR_CONNECTION,xi as DAILY_FATAL_ERROR_EJECTED,Ri as DAILY_FATAL_ERROR_EOL,Li as DAILY_FATAL_ERROR_EXP_ROOM,Di as DAILY_FATAL_ERROR_EXP_TOKEN,Fi as DAILY_FATAL_ERROR_MEETING_FULL,ji as DAILY_FATAL_ERROR_NBF_ROOM,Ii as DAILY_FATAL_ERROR_NBF_TOKEN,Bi as DAILY_FATAL_ERROR_NOT_ALLOWED,Ni as DAILY_FATAL_ERROR_NO_ROOM,Ai as DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY,Pi as DAILY_RECEIVE_SETTINGS_BASE_KEY,yi as DAILY_STATE_ERROR,gi as DAILY_STATE_JOINED,vi as DAILY_STATE_JOINING,mi as DAILY_STATE_LEFT,hi as DAILY_STATE_NEW,bi as DAILY_TRACK_STATE_BLOCKED,Si as DAILY_TRACK_STATE_INTERRUPTED,ki as DAILY_TRACK_STATE_LOADING,_i as DAILY_TRACK_STATE_OFF,Mi as DAILY_TRACK_STATE_PLAYABLE,wi as DAILY_TRACK_STATE_SENDABLE,cc as default};