UNPKG

@daily-co/daily-js

Version:

Please check our [our documentation site](https://docs.daily.co/) to get started. If you're building a web app with our `daily-js` front-end JavaScript library, you may be particularly interested in:

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