(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{box-sizing:border-box}.vapi-relative{position:relative}.vapi-z-10{z-index:10}.vapi-mx-auto{margin-left:auto;margin-right:auto}.vapi-my-3{margin-top:.75rem;margin-bottom:.75rem}.vapi-mb-0\\.5{margin-bottom:.125rem}.vapi-mb-1{margin-bottom:.25rem}.vapi-mb-3{margin-bottom:.75rem}.vapi-mb-4{margin-bottom:1rem}.vapi-ml-0\\.5{margin-left:.125rem}.vapi-inline-block{display:inline-block}.vapi-flex{display:flex}.vapi-h-10{height:2.5rem}.vapi-h-12{height:3rem}.vapi-h-16{height:4rem}.vapi-h-20{height:5rem}.vapi-h-4{height:1rem}.vapi-h-5{height:1.25rem}.vapi-h-8{height:2rem}.vapi-w-0\\.5{width:.125rem}.vapi-w-1\\.5{width:.375rem}.vapi-w-10{width:2.5rem}.vapi-w-12{width:3rem}.vapi-w-16{width:4rem}.vapi-w-20{width:5rem}.vapi-w-4{width:1rem}.vapi-w-5{width:1.25rem}.vapi-w-8{width:2rem}.vapi-max-w-xs{max-width:20rem}.vapi-flex-1{flex:1 1 0%}@keyframes vapi-pulse{50%{opacity:.5}}.vapi-animate-pulse{animation:vapi-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes vapi-spin{to{transform:rotate(360deg)}}.vapi-animate-spin{animation:vapi-spin 1s linear infinite}.vapi-cursor-not-allowed{cursor:not-allowed}.vapi-list-inside{list-style-position:inside}.vapi-list-decimal{list-style-type:decimal}.vapi-list-disc{list-style-type:disc}.vapi-items-center{align-items:center}.vapi-justify-start{justify-content:flex-start}.vapi-justify-end{justify-content:flex-end}.vapi-justify-center{justify-content:center}.vapi-justify-between{justify-content:space-between}.vapi-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.vapi-space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.vapi-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.vapi-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.vapi-overflow-x-auto{overflow-x:auto}.vapi-rounded{border-radius:.25rem}.vapi-rounded-full{border-radius:9999px}.vapi-rounded-lg{border-radius:.5rem}.vapi-border{border-width:1px}.vapi-border-2{border-width:2px}.vapi-border-b{border-bottom-width:1px}.vapi-border-l-2{border-left-width:2px}.vapi-border-current{border-color:currentColor}.vapi-border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.vapi-border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.vapi-border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.vapi-border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.vapi-border-t-transparent{border-top-color:transparent}.vapi-bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.vapi-bg-current{background-color:currentColor}.vapi-bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.vapi-bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.vapi-bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.vapi-bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.vapi-bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity))}.vapi-bg-opacity-10{--tw-bg-opacity: .1}.vapi-p-2{padding:.5rem}.vapi-p-4{padding:1rem}.vapi-px-1{padding-left:.25rem;padding-right:.25rem}.vapi-px-3{padding-left:.75rem;padding-right:.75rem}.vapi-px-6{padding-left:1.5rem;padding-right:1.5rem}.vapi-py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.vapi-py-2{padding-top:.5rem;padding-bottom:.5rem}.vapi-py-3{padding-top:.75rem;padding-bottom:.75rem}.vapi-pl-2{padding-left:.5rem}.vapi-text-center{text-align:center}.vapi-text-base{font-size:1rem;line-height:1.5rem}.vapi-text-lg{font-size:1.125rem;line-height:1.75rem}.vapi-text-sm{font-size:.875rem;line-height:1.25rem}.vapi-font-bold{font-weight:700}.vapi-font-medium{font-weight:500}.vapi-font-semibold{font-weight:600}.vapi-italic{font-style:italic}.vapi-text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.vapi-text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.vapi-text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.vapi-text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.vapi-text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.vapi-text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.vapi-text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.vapi-text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.vapi-underline{text-decoration-line:underline}.vapi-placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.vapi-placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.vapi-placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.vapi-placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.vapi-opacity-50{opacity:.5}.vapi-opacity-80{opacity:.8}.vapi-shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.vapi-shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.vapi-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.vapi-duration-150{transition-duration:.15s}.vapi-conversation-area{scrollbar-width:none}.vapi-conversation-area::-webkit-scrollbar{display:none}.last\\:vapi-mb-0:last-child{margin-bottom:0}.hover\\:vapi--translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:vapi-scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:vapi-opacity-80:hover{opacity:.8}.hover\\:vapi-opacity-90:hover{opacity:.9}.hover\\:vapi-shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:vapi-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:vapi-ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.active\\:vapi-scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@keyframes blink{0%,50%{opacity:1}51%,to{opacity:0}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes glow{0%,to{box-shadow:0 0 0 4px #ef44444d,0 0 25px #ef444480}50%{box-shadow:0 0 0 8px #ef44444d,0 0 40px #ef4444b3}}.animate-pulse{animation:pulse 1s cubic-bezier(.4,0,.6,1) infinite}.animate-blink{animation:blink 1s steps(1,start) infinite}.animate-spin{animation:spin 1s linear infinite}.animate-glow{animation:glow 2s ease-in-out infinite}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})(); (function(hr,fo){typeof exports=="object"&&typeof module<"u"?module.exports=fo():typeof define=="function"&&define.amd?define(fo):(hr=typeof globalThis<"u"?globalThis:hr||self,hr.WidgetLoader=fo())})(this,function(){"use strict";function hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fo(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function o(){var a=!1;try{a=this instanceof o}catch{}return a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var a=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,a.get?a:{enumerable:!0,get:function(){return e[o]}})}),r}var xl={exports:{}},je={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var mf;function s1(){if(mf)return je;mf=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function E(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,b={};function O(I,J,d){this.props=I,this.context=J,this.refs=b,this.updater=d||k}O.prototype.isReactComponent={},O.prototype.setState=function(I,J){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,J,"setState")},O.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function M(){}M.prototype=O.prototype;function V(I,J,d){this.props=I,this.context=J,this.refs=b,this.updater=d||k}var j=V.prototype=new M;j.constructor=V,A(j,O.prototype),j.isPureReactComponent=!0;var R=Array.isArray,N=Object.prototype.hasOwnProperty,L={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function Y(I,J,d){var _,w={},C=null,T=null;if(J!=null)for(_ in J.ref!==void 0&&(T=J.ref),J.key!==void 0&&(C=""+J.key),J)N.call(J,_)&&!q.hasOwnProperty(_)&&(w[_]=J[_]);var B=arguments.length-2;if(B===1)w.children=d;else if(1>>1,J=K[I];if(0>>1;Ia(w,x))Ca(T,w)?(K[I]=T,K[C]=x,I=C):(K[I]=w,K[_]=x,I=_);else if(Ca(T,x))K[I]=T,K[C]=x,I=C;else break e}}return de}function a(K,de){var x=K.sortIndex-de.sortIndex;return x!==0?x:K.id-de.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var p=[],m=[],v=1,y=null,E=3,k=!1,A=!1,b=!1,O=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j(K){for(var de=r(m);de!==null;){if(de.callback===null)o(m);else if(de.startTime<=K)o(m),de.sortIndex=de.expirationTime,t(p,de);else break;de=r(m)}}function R(K){if(b=!1,j(K),!A)if(r(p)!==null)A=!0,Se(N);else{var de=r(m);de!==null&&Me(R,de.startTime-K)}}function N(K,de){A=!1,b&&(b=!1,M(Y),Y=-1),k=!0;var x=E;try{for(j(de),y=r(p);y!==null&&(!(y.expirationTime>de)||K&&!se());){var I=y.callback;if(typeof I=="function"){y.callback=null,E=y.priorityLevel;var J=I(y.expirationTime<=de);de=e.unstable_now(),typeof J=="function"?y.callback=J:y===r(p)&&o(p),j(de)}else o(p);y=r(p)}if(y!==null)var d=!0;else{var _=r(m);_!==null&&Me(R,_.startTime-de),d=!1}return d}finally{y=null,E=x,k=!1}}var L=!1,q=null,Y=-1,re=5,oe=-1;function se(){return!(e.unstable_now()-oeK||125I?(K.sortIndex=x,t(m,K),r(p)===null&&K===r(m)&&(b?(M(Y),Y=-1):b=!0,Me(R,x-I))):(K.sortIndex=J,t(p,K),A||k||(A=!0,Se(N))),K},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(K){var de=E;return function(){var x=E;E=de;try{return K.apply(this,arguments)}finally{E=x}}}}(Pl)),Pl}var yf;function c1(){return yf||(yf=1,Ml.exports=u1()),Ml.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var wf;function d1(){if(wf)return $t;wf=1;var e=Tl(),t=c1();function r(n){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+n,l=1;l"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},y={};function E(n){return p.call(y,n)?!0:p.call(v,n)?!1:m.test(n)?y[n]=!0:(v[n]=!0,!1)}function k(n,i,l,c){if(l!==null&&l.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return c?!1:l!==null?!l.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function A(n,i,l,c){if(i===null||typeof i>"u"||k(n,i,l,c))return!0;if(c)return!1;if(l!==null)switch(l.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function b(n,i,l,c,h,g,S){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=c,this.attributeNamespace=h,this.mustUseProperty=l,this.propertyName=n,this.type=i,this.sanitizeURL=g,this.removeEmptyString=S}var O={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){O[n]=new b(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var i=n[0];O[i]=new b(i,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){O[n]=new b(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){O[n]=new b(n,2,!1,n,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){O[n]=new b(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){O[n]=new b(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){O[n]=new b(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){O[n]=new b(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){O[n]=new b(n,5,!1,n.toLowerCase(),null,!1,!1)});var M=/[\-:]([a-z])/g;function V(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var i=n.replace(M,V);O[i]=new b(i,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var i=n.replace(M,V);O[i]=new b(i,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var i=n.replace(M,V);O[i]=new b(i,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){O[n]=new b(n,1,!1,n.toLowerCase(),null,!1,!1)}),O.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){O[n]=new b(n,1,!1,n.toLowerCase(),null,!0,!0)});function j(n,i,l,c){var h=O.hasOwnProperty(i)?O[i]:null;(h!==null?h.type!==0:c||!(2P||h[S]!==g[P]){var D=` `+h[S].replace(" at new "," at ");return n.displayName&&D.includes("")&&(D=D.replace("",n.displayName)),D}while(1<=S&&0<=P);break}}}finally{d=!1,Error.prepareStackTrace=l}return(n=n?n.displayName||n.name:"")?J(n):""}function w(n){switch(n.tag){case 5:return J(n.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return n=_(n.type,!1),n;case 11:return n=_(n.type.render,!1),n;case 1:return n=_(n.type,!0),n;default:return""}}function C(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case q:return"Fragment";case L:return"Portal";case re:return"Profiler";case Y:return"StrictMode";case ie:return"Suspense";case le:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case se:return(n.displayName||"Context")+".Consumer";case oe:return(n._context.displayName||"Context")+".Provider";case fe:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case he:return i=n.displayName||null,i!==null?i:C(n.type)||"Memo";case Se:i=n._payload,n=n._init;try{return C(n(i))}catch{}}return null}function T(n){var i=n.type;switch(n.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=i.render,n=n.displayName||n.name||"",i.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return C(i);case 8:return i===Y?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function B(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function W(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Q(n){var i=W(n)?"checked":"value",l=Object.getOwnPropertyDescriptor(n.constructor.prototype,i),c=""+n[i];if(!n.hasOwnProperty(i)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var h=l.get,g=l.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return h.call(this)},set:function(S){c=""+S,g.call(this,S)}}),Object.defineProperty(n,i,{enumerable:l.enumerable}),{getValue:function(){return c},setValue:function(S){c=""+S},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function pe(n){n._valueTracker||(n._valueTracker=Q(n))}function Ce(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var l=i.getValue(),c="";return n&&(c=W(n)?n.checked?"true":"false":n.value),n=c,n!==l?(i.setValue(n),!0):!1}function Oe(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function ut(n,i){var l=i.checked;return x({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l??n._wrapperState.initialChecked})}function St(n,i){var l=i.defaultValue==null?"":i.defaultValue,c=i.checked!=null?i.checked:i.defaultChecked;l=B(i.value!=null?i.value:l),n._wrapperState={initialChecked:c,initialValue:l,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function sn(n,i){i=i.checked,i!=null&&j(n,"checked",i,!1)}function qe(n,i){sn(n,i);var l=B(i.value),c=i.type;if(l!=null)c==="number"?(l===0&&n.value===""||n.value!=l)&&(n.value=""+l):n.value!==""+l&&(n.value=""+l);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}i.hasOwnProperty("value")?vt(n,i.type,l):i.hasOwnProperty("defaultValue")&&vt(n,i.type,B(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(n.defaultChecked=!!i.defaultChecked)}function rt(n,i,l){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var c=i.type;if(!(c!=="submit"&&c!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+n._wrapperState.initialValue,l||i===n.value||(n.value=i),n.defaultValue=i}l=n.name,l!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,l!==""&&(n.name=l)}function vt(n,i,l){(i!=="number"||Oe(n.ownerDocument)!==n)&&(l==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+l&&(n.defaultValue=""+l))}var Et=Array.isArray;function dt(n,i,l,c){if(n=n.options,i){i={};for(var h=0;h"+i.valueOf().toString()+"",i=xe.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;i.firstChild;)n.appendChild(i.firstChild)}});function Re(n,i){if(i){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=i;return}}n.textContent=i}var ft={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yn=["Webkit","ms","Moz","O"];Object.keys(ft).forEach(function(n){yn.forEach(function(i){i=i+n.charAt(0).toUpperCase()+n.substring(1),ft[i]=ft[n]})});function Vt(n,i,l){return i==null||typeof i=="boolean"||i===""?"":l||typeof i!="number"||i===0||ft.hasOwnProperty(n)&&ft[n]?(""+i).trim():i+"px"}function Ln(n,i){n=n.style;for(var l in i)if(i.hasOwnProperty(l)){var c=l.indexOf("--")===0,h=Vt(l,i[l],c);l==="float"&&(l="cssFloat"),c?n.setProperty(l,h):n[l]=h}}var Hn=x({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function pt(n,i){if(i){if(Hn[n]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(r(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(r(61))}if(i.style!=null&&typeof i.style!="object")throw Error(r(62))}}function Yt(n,i){if(n.indexOf("-")===-1)return typeof i.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bt=null;function zo(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Vo=null,Jn=null,xr=null;function gs(n){if(n=sa(n)){if(typeof Vo!="function")throw Error(r(280));var i=n.stateNode;i&&(i=Bs(i),Vo(n.stateNode,n.type,i))}}function Bo(n){Jn?xr?xr.push(n):xr=[n]:Jn=n}function ke(){if(Jn){var n=Jn,i=xr;if(xr=Jn=null,gs(n),i)for(n=0;n>>=0,n===0?32:31-(Qb(n)/Zb|0)|0}var Es=64,bs=4194304;function $o(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Cs(n,i){var l=n.pendingLanes;if(l===0)return 0;var c=0,h=n.suspendedLanes,g=n.pingedLanes,S=l&268435455;if(S!==0){var P=S&~h;P!==0?c=$o(P):(g&=S,g!==0&&(c=$o(g)))}else S=l&~h,S!==0?c=$o(S):g!==0&&(c=$o(g));if(c===0)return 0;if(i!==0&&i!==c&&(i&h)===0&&(h=c&-c,g=i&-i,h>=g||h===16&&(g&4194240)!==0))return i;if((c&4)!==0&&(c|=l&16),i=n.entangledLanes,i!==0)for(n=n.entanglements,i&=c;0l;l++)i.push(n);return i}function qo(n,i,l){n.pendingLanes|=i,i!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,i=31-On(i),n[i]=l}function tC(n,i){var l=n.pendingLanes&~i;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=i,n.mutableReadLanes&=i,n.entangledLanes&=i,i=n.entanglements;var c=n.eventTimes;for(n=n.expirationTimes;0=Ko),ey=" ",ty=!1;function ny(n,i){switch(n){case"keyup":return MC.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ry(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Hi=!1;function LC(n,i){switch(n){case"compositionend":return ry(i);case"keypress":return i.which!==32?null:(ty=!0,ey);case"textInput":return n=i.data,n===ey&&ty?null:n;default:return null}}function OC(n,i){if(Hi)return n==="compositionend"||!Yc&&ny(n,i)?(n=Yv(),Ps=Uc=Ir=null,Hi=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:l,offset:i-n};n=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=cy(l)}}function fy(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?fy(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function py(){for(var n=window,i=Oe();i instanceof n.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)n=i.contentWindow;else break;i=Oe(n.document)}return i}function Zc(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}function BC(n){var i=py(),l=n.focusedElem,c=n.selectionRange;if(i!==l&&l&&l.ownerDocument&&fy(l.ownerDocument.documentElement,l)){if(c!==null&&Zc(l)){if(i=c.start,n=c.end,n===void 0&&(n=i),"selectionStart"in l)l.selectionStart=i,l.selectionEnd=Math.min(n,l.value.length);else if(n=(i=l.ownerDocument||document)&&i.defaultView||window,n.getSelection){n=n.getSelection();var h=l.textContent.length,g=Math.min(c.start,h);c=c.end===void 0?g:Math.min(c.end,h),!n.extend&&g>c&&(h=c,c=g,g=h),h=dy(l,g);var S=dy(l,c);h&&S&&(n.rangeCount!==1||n.anchorNode!==h.node||n.anchorOffset!==h.offset||n.focusNode!==S.node||n.focusOffset!==S.offset)&&(i=i.createRange(),i.setStart(h.node,h.offset),n.removeAllRanges(),g>c?(n.addRange(i),n.extend(S.node,S.offset)):(i.setEnd(S.node,S.offset),n.addRange(i)))}}for(i=[],n=l;n=n.parentNode;)n.nodeType===1&&i.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l=document.documentMode,Ji=null,Kc=null,na=null,Xc=!1;function hy(n,i,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Xc||Ji==null||Ji!==Oe(c)||(c=Ji,"selectionStart"in c&&Zc(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),na&&ta(na,c)||(na=c,c=Fs(Kc,"onSelect"),0Zi||(n.current=dd[Zi],dd[Zi]=null,Zi--)}function Ze(n,i){Zi++,dd[Zi]=n.current,n.current=i}var Rr={},It=Dr(Rr),Gt=Dr(!1),fi=Rr;function Ki(n,i){var l=n.type.contextTypes;if(!l)return Rr;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===i)return c.__reactInternalMemoizedMaskedChildContext;var h={},g;for(g in l)h[g]=i[g];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=i,n.__reactInternalMemoizedMaskedChildContext=h),h}function Qt(n){return n=n.childContextTypes,n!=null}function Us(){Xe(Gt),Xe(It)}function My(n,i,l){if(It.current!==Rr)throw Error(r(168));Ze(It,i),Ze(Gt,l)}function Py(n,i,l){var c=n.stateNode;if(i=i.childContextTypes,typeof c.getChildContext!="function")return l;c=c.getChildContext();for(var h in c)if(!(h in i))throw Error(r(108,T(n)||"Unknown",h));return x({},l,c)}function $s(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||Rr,fi=It.current,Ze(It,n),Ze(Gt,Gt.current),!0}function Ly(n,i,l){var c=n.stateNode;if(!c)throw Error(r(169));l?(n=Py(n,i,fi),c.__reactInternalMemoizedMergedChildContext=n,Xe(Gt),Xe(It),Ze(It,n)):Xe(Gt),Ze(Gt,l)}var sr=null,qs=!1,fd=!1;function Oy(n){sr===null?sr=[n]:sr.push(n)}function XC(n){qs=!0,Oy(n)}function Fr(){if(!fd&&sr!==null){fd=!0;var n=0,i=He;try{var l=sr;for(He=1;n>=S,h-=S,lr=1<<32-On(i)+h|l<Pe?(_t=be,be=null):_t=be.sibling;var Be=ee(U,be,$[Pe],ue);if(Be===null){be===null&&(be=_t);break}n&&be&&Be.alternate===null&&i(U,be),z=g(Be,z,Pe),Ee===null?we=Be:Ee.sibling=Be,Ee=Be,be=_t}if(Pe===$.length)return l(U,be),et&&hi(U,Pe),we;if(be===null){for(;Pe<$.length;Pe++)be=ne(U,$[Pe],ue),be!==null&&(z=g(be,z,Pe),Ee===null?we=be:Ee.sibling=be,Ee=be);return et&&hi(U,Pe),we}for(be=c(U,be);Pe<$.length;Pe++)_t=me(be,U,Pe,$[Pe],ue),_t!==null&&(n&&_t.alternate!==null&&be.delete(_t.key===null?Pe:_t.key),z=g(_t,z,Pe),Ee===null?we=_t:Ee.sibling=_t,Ee=_t);return n&&be.forEach(function(Wr){return i(U,Wr)}),et&&hi(U,Pe),we}function ye(U,z,$,ue){var we=de($);if(typeof we!="function")throw Error(r(150));if($=we.call($),$==null)throw Error(r(151));for(var Ee=we=null,be=z,Pe=z=0,_t=null,Be=$.next();be!==null&&!Be.done;Pe++,Be=$.next()){be.index>Pe?(_t=be,be=null):_t=be.sibling;var Wr=ee(U,be,Be.value,ue);if(Wr===null){be===null&&(be=_t);break}n&&be&&Wr.alternate===null&&i(U,be),z=g(Wr,z,Pe),Ee===null?we=Wr:Ee.sibling=Wr,Ee=Wr,be=_t}if(Be.done)return l(U,be),et&&hi(U,Pe),we;if(be===null){for(;!Be.done;Pe++,Be=$.next())Be=ne(U,Be.value,ue),Be!==null&&(z=g(Be,z,Pe),Ee===null?we=Be:Ee.sibling=Be,Ee=Be);return et&&hi(U,Pe),we}for(be=c(U,be);!Be.done;Pe++,Be=$.next())Be=me(be,U,Pe,Be.value,ue),Be!==null&&(n&&Be.alternate!==null&&be.delete(Be.key===null?Pe:Be.key),z=g(Be,z,Pe),Ee===null?we=Be:Ee.sibling=Be,Ee=Be);return n&&be.forEach(function(Ix){return i(U,Ix)}),et&&hi(U,Pe),we}function st(U,z,$,ue){if(typeof $=="object"&&$!==null&&$.type===q&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case N:e:{for(var we=$.key,Ee=z;Ee!==null;){if(Ee.key===we){if(we=$.type,we===q){if(Ee.tag===7){l(U,Ee.sibling),z=h(Ee,$.props.children),z.return=U,U=z;break e}}else if(Ee.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===Se&&Fy(we)===Ee.type){l(U,Ee.sibling),z=h(Ee,$.props),z.ref=la(U,Ee,$),z.return=U,U=z;break e}l(U,Ee);break}else i(U,Ee);Ee=Ee.sibling}$.type===q?(z=Si($.props.children,U.mode,ue,$.key),z.return=U,U=z):(ue=yl($.type,$.key,$.props,null,U.mode,ue),ue.ref=la(U,z,$),ue.return=U,U=ue)}return S(U);case L:e:{for(Ee=$.key;z!==null;){if(z.key===Ee)if(z.tag===4&&z.stateNode.containerInfo===$.containerInfo&&z.stateNode.implementation===$.implementation){l(U,z.sibling),z=h(z,$.children||[]),z.return=U,U=z;break e}else{l(U,z);break}else i(U,z);z=z.sibling}z=cf($,U.mode,ue),z.return=U,U=z}return S(U);case Se:return Ee=$._init,st(U,z,Ee($._payload),ue)}if(Et($))return ve(U,z,$,ue);if(de($))return ye(U,z,$,ue);Ys(U,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,z!==null&&z.tag===6?(l(U,z.sibling),z=h(z,$),z.return=U,U=z):(l(U,z),z=uf($,U.mode,ue),z.return=U,U=z),S(U)):l(U,z)}return st}var no=zy(!0),Vy=zy(!1),Gs=Dr(null),Qs=null,ro=null,yd=null;function wd(){yd=ro=Qs=null}function _d(n){var i=Gs.current;Xe(Gs),n._currentValue=i}function kd(n,i,l){for(;n!==null;){var c=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),n===l)break;n=n.return}}function io(n,i){Qs=n,yd=ro=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&i)!==0&&(Zt=!0),n.firstContext=null)}function En(n){var i=n._currentValue;if(yd!==n)if(n={context:n,memoizedValue:i,next:null},ro===null){if(Qs===null)throw Error(r(308));ro=n,Qs.dependencies={lanes:0,firstContext:n}}else ro=ro.next=n;return i}var mi=null;function Sd(n){mi===null?mi=[n]:mi.push(n)}function By(n,i,l,c){var h=i.interleaved;return h===null?(l.next=l,Sd(i)):(l.next=h.next,h.next=l),i.interleaved=l,cr(n,c)}function cr(n,i){n.lanes|=i;var l=n.alternate;for(l!==null&&(l.lanes|=i),l=n,n=n.return;n!==null;)n.childLanes|=i,l=n.alternate,l!==null&&(l.childLanes|=i),l=n,n=n.return;return l.tag===3?l.stateNode:null}var zr=!1;function Ed(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Uy(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function dr(n,i){return{eventTime:n,lane:i,tag:0,payload:null,callback:null,next:null}}function Vr(n,i,l){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(Ve&2)!==0){var h=c.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),c.pending=i,cr(n,l)}return h=c.interleaved,h===null?(i.next=i,Sd(c)):(i.next=h.next,h.next=i),c.interleaved=i,cr(n,l)}function Zs(n,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194240)!==0)){var c=i.lanes;c&=n.pendingLanes,l|=c,i.lanes=l,Rc(n,l)}}function $y(n,i){var l=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var h=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var S={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};g===null?h=g=S:g=g.next=S,l=l.next}while(l!==null);g===null?h=g=i:g=g.next=i}else h=g=i;l={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:c.shared,effects:c.effects},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=i:n.next=i,l.lastBaseUpdate=i}function Ks(n,i,l,c){var h=n.updateQueue;zr=!1;var g=h.firstBaseUpdate,S=h.lastBaseUpdate,P=h.shared.pending;if(P!==null){h.shared.pending=null;var D=P,H=D.next;D.next=null,S===null?g=H:S.next=H,S=D;var te=n.alternate;te!==null&&(te=te.updateQueue,P=te.lastBaseUpdate,P!==S&&(P===null?te.firstBaseUpdate=H:P.next=H,te.lastBaseUpdate=D))}if(g!==null){var ne=h.baseState;S=0,te=H=D=null,P=g;do{var ee=P.lane,me=P.eventTime;if((c&ee)===ee){te!==null&&(te=te.next={eventTime:me,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var ve=n,ye=P;switch(ee=i,me=l,ye.tag){case 1:if(ve=ye.payload,typeof ve=="function"){ne=ve.call(me,ne,ee);break e}ne=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=ye.payload,ee=typeof ve=="function"?ve.call(me,ne,ee):ve,ee==null)break e;ne=x({},ne,ee);break e;case 2:zr=!0}}P.callback!==null&&P.lane!==0&&(n.flags|=64,ee=h.effects,ee===null?h.effects=[P]:ee.push(P))}else me={eventTime:me,lane:ee,tag:P.tag,payload:P.payload,callback:P.callback,next:null},te===null?(H=te=me,D=ne):te=te.next=me,S|=ee;if(P=P.next,P===null){if(P=h.shared.pending,P===null)break;ee=P,P=ee.next,ee.next=null,h.lastBaseUpdate=ee,h.shared.pending=null}}while(!0);if(te===null&&(D=ne),h.baseState=D,h.firstBaseUpdate=H,h.lastBaseUpdate=te,i=h.shared.interleaved,i!==null){h=i;do S|=h.lane,h=h.next;while(h!==i)}else g===null&&(h.shared.lanes=0);yi|=S,n.lanes=S,n.memoizedState=ne}}function qy(n,i,l){if(n=i.effects,i.effects=null,n!==null)for(i=0;il?l:4,n(!0);var c=Ad.transition;Ad.transition={};try{n(!1),i()}finally{He=l,Ad.transition=c}}function u0(){return bn().memoizedState}function rx(n,i,l){var c=qr(n);if(l={lane:c,action:l,hasEagerState:!1,eagerState:null,next:null},c0(n))d0(i,l);else if(l=By(n,i,l,c),l!==null){var h=Ut();Fn(l,n,c,h),f0(l,i,c)}}function ix(n,i,l){var c=qr(n),h={lane:c,action:l,hasEagerState:!1,eagerState:null,next:null};if(c0(n))d0(i,h);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var S=i.lastRenderedState,P=g(S,l);if(h.hasEagerState=!0,h.eagerState=P,In(P,S)){var D=i.interleaved;D===null?(h.next=h,Sd(i)):(h.next=D.next,D.next=h),i.interleaved=h;return}}catch{}finally{}l=By(n,i,h,c),l!==null&&(h=Ut(),Fn(l,n,c,h),f0(l,i,c))}}function c0(n){var i=n.alternate;return n===nt||i!==null&&i===nt}function d0(n,i){fa=tl=!0;var l=n.pending;l===null?i.next=i:(i.next=l.next,l.next=i),n.pending=i}function f0(n,i,l){if((l&4194240)!==0){var c=i.lanes;c&=n.pendingLanes,l|=c,i.lanes=l,Rc(n,l)}}var il={readContext:En,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useInsertionEffect:Nt,useLayoutEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useMutableSource:Nt,useSyncExternalStore:Nt,useId:Nt,unstable_isNewReconciler:!1},ox={readContext:En,useCallback:function(n,i){return Qn().memoizedState=[n,i===void 0?null:i],n},useContext:En,useEffect:t0,useImperativeHandle:function(n,i,l){return l=l!=null?l.concat([n]):null,nl(4194308,4,i0.bind(null,i,n),l)},useLayoutEffect:function(n,i){return nl(4194308,4,n,i)},useInsertionEffect:function(n,i){return nl(4,2,n,i)},useMemo:function(n,i){var l=Qn();return i=i===void 0?null:i,n=n(),l.memoizedState=[n,i],n},useReducer:function(n,i,l){var c=Qn();return i=l!==void 0?l(i):i,c.memoizedState=c.baseState=i,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:i},c.queue=n,n=n.dispatch=rx.bind(null,nt,n),[c.memoizedState,n]},useRef:function(n){var i=Qn();return n={current:n},i.memoizedState=n},useState:Xy,useDebugValue:jd,useDeferredValue:function(n){return Qn().memoizedState=n},useTransition:function(){var n=Xy(!1),i=n[0];return n=nx.bind(null,n[1]),Qn().memoizedState=n,[i,n]},useMutableSource:function(){},useSyncExternalStore:function(n,i,l){var c=nt,h=Qn();if(et){if(l===void 0)throw Error(r(407));l=l()}else{if(l=i(),wt===null)throw Error(r(349));(vi&30)!==0||Yy(c,i,l)}h.memoizedState=l;var g={value:l,getSnapshot:i};return h.queue=g,t0(Qy.bind(null,c,g,n),[n]),c.flags|=2048,ma(9,Gy.bind(null,c,g,l,i),void 0,null),l},useId:function(){var n=Qn(),i=wt.identifierPrefix;if(et){var l=ur,c=lr;l=(c&~(1<<32-On(c)-1)).toString(32)+l,i=":"+i+"R"+l,l=pa++,0<\/script>",n=n.removeChild(n.firstChild)):typeof c.is=="string"?n=S.createElement(l,{is:c.is}):(n=S.createElement(l),l==="select"&&(S=n,c.multiple?S.multiple=!0:c.size&&(S.size=c.size))):n=S.createElementNS(n,l),n[Yn]=i,n[aa]=c,O0(n,i,!1,!1),i.stateNode=n;e:{switch(S=Yt(l,c),l){case"dialog":Ke("cancel",n),Ke("close",n),h=c;break;case"iframe":case"object":case"embed":Ke("load",n),h=c;break;case"video":case"audio":for(h=0;huo&&(i.flags|=128,c=!0,ga(g,!1),i.lanes=4194304)}else{if(!c)if(n=Xs(S),n!==null){if(i.flags|=128,c=!0,l=n.updateQueue,l!==null&&(i.updateQueue=l,i.flags|=4),ga(g,!0),g.tail===null&&g.tailMode==="hidden"&&!S.alternate&&!et)return jt(i),null}else 2*at()-g.renderingStartTime>uo&&l!==1073741824&&(i.flags|=128,c=!0,ga(g,!1),i.lanes=4194304);g.isBackwards?(S.sibling=i.child,i.child=S):(l=g.last,l!==null?l.sibling=S:i.child=S,g.last=S)}return g.tail!==null?(i=g.tail,g.rendering=i,g.tail=i.sibling,g.renderingStartTime=at(),i.sibling=null,l=tt.current,Ze(tt,c?l&1|2:l&1),i):(jt(i),null);case 22:case 23:return af(),c=i.memoizedState!==null,n!==null&&n.memoizedState!==null!==c&&(i.flags|=8192),c&&(i.mode&1)!==0?(fn&1073741824)!==0&&(jt(i),i.subtreeFlags&6&&(i.flags|=8192)):jt(i),null;case 24:return null;case 25:return null}throw Error(r(156,i.tag))}function px(n,i){switch(hd(i),i.tag){case 1:return Qt(i.type)&&Us(),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return oo(),Xe(Gt),Xe(It),Td(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 5:return Cd(i),null;case 13:if(Xe(tt),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(r(340));to()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return Xe(tt),null;case 4:return oo(),null;case 10:return _d(i.type._context),null;case 22:case 23:return af(),null;case 24:return null;default:return null}}var ll=!1,Dt=!1,hx=typeof WeakSet=="function"?WeakSet:Set,ge=null;function so(n,i){var l=n.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(c){it(n,i,c)}else l.current=null}function Wd(n,i,l){try{l()}catch(c){it(n,i,c)}}var j0=!1;function mx(n,i){if(od=As,n=py(),Zc(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var h=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break e}var S=0,P=-1,D=-1,H=0,te=0,ne=n,ee=null;t:for(;;){for(var me;ne!==l||h!==0&&ne.nodeType!==3||(P=S+h),ne!==g||c!==0&&ne.nodeType!==3||(D=S+c),ne.nodeType===3&&(S+=ne.nodeValue.length),(me=ne.firstChild)!==null;)ee=ne,ne=me;for(;;){if(ne===n)break t;if(ee===l&&++H===h&&(P=S),ee===g&&++te===c&&(D=S),(me=ne.nextSibling)!==null)break;ne=ee,ee=ne.parentNode}ne=me}l=P===-1||D===-1?null:{start:P,end:D}}else l=null}l=l||{start:0,end:0}}else l=null;for(ad={focusedElem:n,selectionRange:l},As=!1,ge=i;ge!==null;)if(i=ge,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,ge=n;else for(;ge!==null;){i=ge;try{var ve=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(ve!==null){var ye=ve.memoizedProps,st=ve.memoizedState,U=i.stateNode,z=U.getSnapshotBeforeUpdate(i.elementType===i.type?ye:jn(i.type,ye),st);U.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var $=i.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ue){it(i,i.return,ue)}if(n=i.sibling,n!==null){n.return=i.return,ge=n;break}ge=i.return}return ve=j0,j0=!1,ve}function va(n,i,l){var c=i.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&n)===n){var g=h.destroy;h.destroy=void 0,g!==void 0&&Wd(i,l,g)}h=h.next}while(h!==c)}}function ul(n,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var l=i=i.next;do{if((l.tag&n)===n){var c=l.create;l.destroy=c()}l=l.next}while(l!==i)}}function Yd(n){var i=n.ref;if(i!==null){var l=n.stateNode;switch(n.tag){case 5:n=l;break;default:n=l}typeof i=="function"?i(n):i.current=n}}function D0(n){var i=n.alternate;i!==null&&(n.alternate=null,D0(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&(delete i[Yn],delete i[aa],delete i[cd],delete i[ZC],delete i[KC])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function R0(n){return n.tag===5||n.tag===3||n.tag===4}function F0(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||R0(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Gd(n,i,l){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?l.nodeType===8?l.parentNode.insertBefore(n,i):l.insertBefore(n,i):(l.nodeType===8?(i=l.parentNode,i.insertBefore(n,l)):(i=l,i.appendChild(n)),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=Vs));else if(c!==4&&(n=n.child,n!==null))for(Gd(n,i,l),n=n.sibling;n!==null;)Gd(n,i,l),n=n.sibling}function Qd(n,i,l){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?l.insertBefore(n,i):l.appendChild(n);else if(c!==4&&(n=n.child,n!==null))for(Qd(n,i,l),n=n.sibling;n!==null;)Qd(n,i,l),n=n.sibling}var Tt=null,Dn=!1;function Br(n,i,l){for(l=l.child;l!==null;)z0(n,i,l),l=l.sibling}function z0(n,i,l){if(Wn&&typeof Wn.onCommitFiberUnmount=="function")try{Wn.onCommitFiberUnmount(Ss,l)}catch{}switch(l.tag){case 5:Dt||so(l,i);case 6:var c=Tt,h=Dn;Tt=null,Br(n,i,l),Tt=c,Dn=h,Tt!==null&&(Dn?(n=Tt,l=l.stateNode,n.nodeType===8?n.parentNode.removeChild(l):n.removeChild(l)):Tt.removeChild(l.stateNode));break;case 18:Tt!==null&&(Dn?(n=Tt,l=l.stateNode,n.nodeType===8?ud(n.parentNode,l):n.nodeType===1&&ud(n,l),Go(n)):ud(Tt,l.stateNode));break;case 4:c=Tt,h=Dn,Tt=l.stateNode.containerInfo,Dn=!0,Br(n,i,l),Tt=c,Dn=h;break;case 0:case 11:case 14:case 15:if(!Dt&&(c=l.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){h=c=c.next;do{var g=h,S=g.destroy;g=g.tag,S!==void 0&&((g&2)!==0||(g&4)!==0)&&Wd(l,i,S),h=h.next}while(h!==c)}Br(n,i,l);break;case 1:if(!Dt&&(so(l,i),c=l.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=l.memoizedProps,c.state=l.memoizedState,c.componentWillUnmount()}catch(P){it(l,i,P)}Br(n,i,l);break;case 21:Br(n,i,l);break;case 22:l.mode&1?(Dt=(c=Dt)||l.memoizedState!==null,Br(n,i,l),Dt=c):Br(n,i,l);break;default:Br(n,i,l)}}function V0(n){var i=n.updateQueue;if(i!==null){n.updateQueue=null;var l=n.stateNode;l===null&&(l=n.stateNode=new hx),i.forEach(function(c){var h=bx.bind(null,n,c);l.has(c)||(l.add(c),c.then(h,h))})}}function Rn(n,i){var l=i.deletions;if(l!==null)for(var c=0;ch&&(h=S),c&=~g}if(c=h,c=at()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*vx(c/1960))-c,10n?16:n,$r===null)var c=!1;else{if(n=$r,$r=null,hl=0,(Ve&6)!==0)throw Error(r(331));var h=Ve;for(Ve|=4,ge=n.current;ge!==null;){var g=ge,S=g.child;if((ge.flags&16)!==0){var P=g.deletions;if(P!==null){for(var D=0;Dat()-Xd?_i(n,0):Kd|=l),Xt(n,i)}function X0(n,i){i===0&&((n.mode&1)===0?i=1:(i=bs,bs<<=1,(bs&130023424)===0&&(bs=4194304)));var l=Ut();n=cr(n,i),n!==null&&(qo(n,i,l),Xt(n,l))}function Ex(n){var i=n.memoizedState,l=0;i!==null&&(l=i.retryLane),X0(n,l)}function bx(n,i){var l=0;switch(n.tag){case 13:var c=n.stateNode,h=n.memoizedState;h!==null&&(l=h.retryLane);break;case 19:c=n.stateNode;break;default:throw Error(r(314))}c!==null&&c.delete(i),X0(n,l)}var e1;e1=function(n,i,l){if(n!==null)if(n.memoizedProps!==i.pendingProps||Gt.current)Zt=!0;else{if((n.lanes&l)===0&&(i.flags&128)===0)return Zt=!1,dx(n,i,l);Zt=(n.flags&131072)!==0}else Zt=!1,et&&(i.flags&1048576)!==0&&Iy(i,Js,i.index);switch(i.lanes=0,i.tag){case 2:var c=i.type;sl(n,i),n=i.pendingProps;var h=Ki(i,It.current);io(i,l),h=Pd(null,i,c,n,h,l);var g=Ld();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Qt(c)?(g=!0,$s(i)):g=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,Ed(i),h.updater=ol,i.stateNode=h,h._reactInternals=i,Rd(i,c,n,l),i=Bd(null,i,c,!0,g,l)):(i.tag=0,et&&g&&pd(i),Bt(null,i,h,l),i=i.child),i;case 16:c=i.elementType;e:{switch(sl(n,i),n=i.pendingProps,h=c._init,c=h(c._payload),i.type=c,h=i.tag=xx(c),n=jn(c,n),h){case 0:i=Vd(null,i,c,n,l);break e;case 1:i=x0(null,i,c,n,l);break e;case 11:i=k0(null,i,c,n,l);break e;case 14:i=S0(null,i,c,jn(c.type,n),l);break e}throw Error(r(306,c,""))}return i;case 0:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:jn(c,h),Vd(n,i,c,h,l);case 1:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:jn(c,h),x0(n,i,c,h,l);case 3:e:{if(T0(i),n===null)throw Error(r(387));c=i.pendingProps,g=i.memoizedState,h=g.element,Uy(n,i),Ks(i,c,null,l);var S=i.memoizedState;if(c=S.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){h=ao(Error(r(423)),i),i=A0(n,i,c,l,h);break e}else if(c!==h){h=ao(Error(r(424)),i),i=A0(n,i,c,l,h);break e}else for(dn=jr(i.stateNode.containerInfo.firstChild),cn=i,et=!0,Nn=null,l=Vy(i,null,c,l),i.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(to(),c===h){i=fr(n,i,l);break e}Bt(n,i,c,l)}i=i.child}return i;case 5:return Hy(i),n===null&&gd(i),c=i.type,h=i.pendingProps,g=n!==null?n.memoizedProps:null,S=h.children,sd(c,h)?S=null:g!==null&&sd(c,g)&&(i.flags|=32),C0(n,i),Bt(n,i,S,l),i.child;case 6:return n===null&&gd(i),null;case 13:return M0(n,i,l);case 4:return bd(i,i.stateNode.containerInfo),c=i.pendingProps,n===null?i.child=no(i,null,c,l):Bt(n,i,c,l),i.child;case 11:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:jn(c,h),k0(n,i,c,h,l);case 7:return Bt(n,i,i.pendingProps,l),i.child;case 8:return Bt(n,i,i.pendingProps.children,l),i.child;case 12:return Bt(n,i,i.pendingProps.children,l),i.child;case 10:e:{if(c=i.type._context,h=i.pendingProps,g=i.memoizedProps,S=h.value,Ze(Gs,c._currentValue),c._currentValue=S,g!==null)if(In(g.value,S)){if(g.children===h.children&&!Gt.current){i=fr(n,i,l);break e}}else for(g=i.child,g!==null&&(g.return=i);g!==null;){var P=g.dependencies;if(P!==null){S=g.child;for(var D=P.firstContext;D!==null;){if(D.context===c){if(g.tag===1){D=dr(-1,l&-l),D.tag=2;var H=g.updateQueue;if(H!==null){H=H.shared;var te=H.pending;te===null?D.next=D:(D.next=te.next,te.next=D),H.pending=D}}g.lanes|=l,D=g.alternate,D!==null&&(D.lanes|=l),kd(g.return,l,i),P.lanes|=l;break}D=D.next}}else if(g.tag===10)S=g.type===i.type?null:g.child;else if(g.tag===18){if(S=g.return,S===null)throw Error(r(341));S.lanes|=l,P=S.alternate,P!==null&&(P.lanes|=l),kd(S,l,i),S=g.sibling}else S=g.child;if(S!==null)S.return=g;else for(S=g;S!==null;){if(S===i){S=null;break}if(g=S.sibling,g!==null){g.return=S.return,S=g;break}S=S.return}g=S}Bt(n,i,h.children,l),i=i.child}return i;case 9:return h=i.type,c=i.pendingProps.children,io(i,l),h=En(h),c=c(h),i.flags|=1,Bt(n,i,c,l),i.child;case 14:return c=i.type,h=jn(c,i.pendingProps),h=jn(c.type,h),S0(n,i,c,h,l);case 15:return E0(n,i,i.type,i.pendingProps,l);case 17:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:jn(c,h),sl(n,i),i.tag=1,Qt(c)?(n=!0,$s(i)):n=!1,io(i,l),h0(i,c,h),Rd(i,c,h,l),Bd(null,i,c,!0,n,l);case 19:return L0(n,i,l);case 22:return b0(n,i,l)}throw Error(r(156,i.tag))};function t1(n,i){return Ar(n,i)}function Cx(n,i,l,c){this.tag=n,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xn(n,i,l,c){return new Cx(n,i,l,c)}function lf(n){return n=n.prototype,!(!n||!n.isReactComponent)}function xx(n){if(typeof n=="function")return lf(n)?1:0;if(n!=null){if(n=n.$$typeof,n===fe)return 11;if(n===he)return 14}return 2}function Jr(n,i){var l=n.alternate;return l===null?(l=xn(n.tag,i,n.key,n.mode),l.elementType=n.elementType,l.type=n.type,l.stateNode=n.stateNode,l.alternate=n,n.alternate=l):(l.pendingProps=i,l.type=n.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=n.flags&14680064,l.childLanes=n.childLanes,l.lanes=n.lanes,l.child=n.child,l.memoizedProps=n.memoizedProps,l.memoizedState=n.memoizedState,l.updateQueue=n.updateQueue,i=n.dependencies,l.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},l.sibling=n.sibling,l.index=n.index,l.ref=n.ref,l}function yl(n,i,l,c,h,g){var S=2;if(c=n,typeof n=="function")lf(n)&&(S=1);else if(typeof n=="string")S=5;else e:switch(n){case q:return Si(l.children,h,g,i);case Y:S=8,h|=8;break;case re:return n=xn(12,l,i,h|2),n.elementType=re,n.lanes=g,n;case ie:return n=xn(13,l,i,h),n.elementType=ie,n.lanes=g,n;case le:return n=xn(19,l,i,h),n.elementType=le,n.lanes=g,n;case Me:return wl(l,h,g,i);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case oe:S=10;break e;case se:S=9;break e;case fe:S=11;break e;case he:S=14;break e;case Se:S=16,c=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return i=xn(S,l,i,h),i.elementType=n,i.type=c,i.lanes=g,i}function Si(n,i,l,c){return n=xn(7,n,c,i),n.lanes=l,n}function wl(n,i,l,c){return n=xn(22,n,c,i),n.elementType=Me,n.lanes=l,n.stateNode={isHidden:!1},n}function uf(n,i,l){return n=xn(6,n,null,i),n.lanes=l,n}function cf(n,i,l){return i=xn(4,n.children!==null?n.children:[],n.key,i),i.lanes=l,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}function Tx(n,i,l,c,h){this.tag=i,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Dc(0),this.expirationTimes=Dc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dc(0),this.identifierPrefix=c,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function df(n,i,l,c,h,g,S,P,D){return n=new Tx(n,i,l,P,D),i===1?(i=1,g===!0&&(i|=8)):i=0,g=xn(3,null,null,i),n.current=g,g.stateNode=n,g.memoizedState={element:c,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ed(g),n}function Ax(n,i,l){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Al.exports=d1(),Al.exports}var kf;function p1(){if(kf)return Sa;kf=1;var e=f1();return Sa.createRoot=e.createRoot,Sa.hydrateRoot=e.hydrateRoot,Sa}var h1=p1(),Ll={exports:{}},po={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Sf;function m1(){if(Sf)return po;Sf=1;var e=Tl(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function u(f,p,m){var v,y={},E=null,k=null;m!==void 0&&(E=""+m),p.key!==void 0&&(E=""+p.key),p.ref!==void 0&&(k=p.ref);for(v in p)o.call(p,v)&&!s.hasOwnProperty(v)&&(y[v]=p[v]);if(f&&f.defaultProps)for(v in p=f.defaultProps,p)y[v]===void 0&&(y[v]=p[v]);return{$$typeof:t,type:f,key:E,ref:k,props:y,_owner:a.current}}return po.Fragment=r,po.jsx=u,po.jsxs=u,po}var Ef;function g1(){return Ef||(Ef=1,Ll.exports=m1()),Ll.exports}var Z=g1(),Ei={};function bf(e,t){if(e==null)return{};var r,o,a=function(u,f){if(u==null)return{};var p={};for(var m in u)if({}.hasOwnProperty.call(u,m)){if(f.indexOf(m)!==-1)continue;p[m]=u[m]}return p}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;oe.length)&&(t=e.length);for(var r=0,o=Array(t);r0&&N.length>j&&!N.warned){N.warned=!0;var q=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(O)+" listeners added. Use emitter.setMaxListeners() to increase limit");q.name="MaxListenersExceededWarning",q.emitter=b,q.type=O,q.count=N.length,L=q,console&&console.warn&&console.warn(L)}return b}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function v(b,O,M){var V={fired:!1,wrapFn:void 0,target:b,type:O,listener:M},j=m.bind(V);return j.listener=M,V.wrapFn=j,j}function y(b,O,M){var V=b._events;if(V===void 0)return[];var j=V[O];return j===void 0?[]:typeof j=="function"?M?[j.listener||j]:[j]:M?function(R){for(var N=new Array(R.length),L=0;L0&&(R=O[0]),R instanceof Error)throw R;var N=new Error("Unhandled error."+(R?" ("+R.message+")":""));throw N.context=R,N}var L=j[b];if(L===void 0)return!1;if(typeof L=="function")r(L,this,O);else{var q=L.length,Y=k(L,q);for(M=0;M=0;R--)if(M[R]===O||M[R].listener===O){N=M[R].listener,j=R;break}if(j<0)return this;j===0?M.shift():function(L,q){for(;q+1=0;V--)this.removeListener(b,O[V]);return this},a.prototype.listeners=function(b){return y(this,b,!0)},a.prototype.rawListeners=function(b){return y(this,b,!1)},a.listenerCount=function(b,O){return typeof b.listenerCount=="function"?b.listenerCount(O):E.call(b,O)},a.prototype.listenerCount=E,a.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},Ca.exports}(),xa=v1(Ol),Pf=Object.prototype.hasOwnProperty;function Lf(e,t,r){for(r of e.keys())if(Rt(r,t))return r}function Rt(e,t){var r,o,a;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((o=e.length)===t.length)for(;o--&&Rt(e[o],t[o]););return o===-1}if(r===Set){if(e.size!==t.size)return!1;for(o of e)if((a=o)&&typeof a=="object"&&!(a=Lf(t,a))||!t.has(a))return!1;return!0}if(r===Map){if(e.size!==t.size)return!1;for(o of e)if((a=o[0])&&typeof a=="object"&&!(a=Lf(t,a))||!Rt(o[1],t.get(a)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((o=e.byteLength)===t.byteLength)for(;o--&&e.getInt8(o)===t.getInt8(o););return o===-1}if(ArrayBuffer.isView(e)){if((o=e.byteLength)===t.byteLength)for(;o--&&e[o]===t[o];);return o===-1}if(!r||typeof e=="object"){for(r in o=0,e)if(Pf.call(e,r)&&++o&&!Pf.call(t,r)||!(r in t)||!Rt(e[r],t[r]))return!1;return Object.keys(t).length===o}}return e!=e&&t!=t}const y1={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},Of={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},ot={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Ft={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},mr={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class X{static getFirstMatch(t,r){const o=r.match(t);return o&&o.length>0&&o[1]||""}static getSecondMatch(t,r){const o=r.match(t);return o&&o.length>1&&o[2]||""}static matchAndReturnConst(t,r,o){if(t.test(r))return o}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const r=t.split(".").splice(0,2).map(o=>parseInt(o,10)||0);if(r.push(0),r[0]===10)switch(r[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const r=t.split(".").splice(0,2).map(o=>parseInt(o,10)||0);if(r.push(0),!(r[0]===1&&r[1]<5))return r[0]===1&&r[1]<6?"Cupcake":r[0]===1&&r[1]>=6?"Donut":r[0]===2&&r[1]<2?"Eclair":r[0]===2&&r[1]===2?"Froyo":r[0]===2&&r[1]>2?"Gingerbread":r[0]===3?"Honeycomb":r[0]===4&&r[1]<1?"Ice Cream Sandwich":r[0]===4&&r[1]<4?"Jelly Bean":r[0]===4&&r[1]>=4?"KitKat":r[0]===5?"Lollipop":r[0]===6?"Marshmallow":r[0]===7?"Nougat":r[0]===8?"Oreo":r[0]===9?"Pie":void 0}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,r,o=!1){const a=X.getVersionPrecision(t),s=X.getVersionPrecision(r);let u=Math.max(a,s),f=0;const p=X.map([t,r],m=>{const v=u-X.getVersionPrecision(m),y=m+new Array(v+1).join(".0");return X.map(y.split("."),E=>new Array(20-E.length).join("0")+E).reverse()});for(o&&(f=u-Math.min(a,s)),u-=1;u>=f;){if(p[0][u]>p[1][u])return 1;if(p[0][u]===p[1][u]){if(u===f)return 0;u-=1}else if(p[0][u]{o[f]=u[f]})}return t}static getBrowserAlias(t){return y1[t]}static getBrowserTypeByAlias(t){return Of[t]||""}}const Je=/version\/(\d+(\.?_?\d+)+)/i,w1=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},r=X.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},r=X.getFirstMatch(Je,e)||X.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},r=X.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},r=X.getFirstMatch(Je,e)||X.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},r=X.getFirstMatch(Je,e)||X.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},r=X.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},r=X.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},r=X.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},r=X.getFirstMatch(Je,e)||X.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},r=X.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},r=X.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},r=X.getFirstMatch(Je,e)||X.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},r=X.getFirstMatch(Je,e)||X.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},r=X.getFirstMatch(Je,e)||X.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},r=X.getFirstMatch(Je,e)||X.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},r=X.getFirstMatch(Je,e)||X.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},r=X.getFirstMatch(Je,e)||X.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},r=X.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=X.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},r=X.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},r=X.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},r=X.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},r=X.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},r=X.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},r=X.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},r=X.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},r=X.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},r=X.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},r=X.getFirstMatch(Je,e)||X.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},r=X.getFirstMatch(Je,e)||X.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},r=X.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},r=X.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},r=X.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},r=X.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},r=X.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},r=X.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},r=X.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},r=X.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},r=X.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test(e){const t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe(e){const t={name:"Android Browser"},r=X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},r=X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},r=X.getFirstMatch(Je,e);return r&&(t.version=r),t}},{test:[/.*/i],describe(e){const t=e.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:X.getFirstMatch(t,e),version:X.getSecondMatch(t,e)}}}];var _1=[{test:[/Roku\/DVP/],describe(e){const t=X.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Ft.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=X.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Ft.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=X.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=X.getWindowsVersionName(t);return{name:Ft.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Ft.iOS},r=X.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe(e){const t=X.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=X.getMacOSVersionName(t),o={name:Ft.MacOS,version:t};return r&&(o.versionName=r),o}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=X.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Ft.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe(e){const t=X.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=X.getAndroidVersionName(t),o={name:Ft.Android,version:t};return r&&(o.versionName=r),o}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=X.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:Ft.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=X.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||X.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||X.getFirstMatch(/\bbb(\d+)/i,e);return{name:Ft.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=X.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Ft.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=X.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Ft.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:Ft.Linux})},{test:[/CrOS/],describe:()=>({name:Ft.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=X.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Ft.PlayStation4,version:t}}}],k1=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){const t=X.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:ot.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:ot.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:ot.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:ot.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:ot.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:ot.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:ot.tablet})},{test(e){const t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe(e){const t=X.getFirstMatch(/(ipod|iphone)/i,e);return{type:ot.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:ot.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:ot.mobile})},{test:e=>e.getBrowserName(!0)==="blackberry",describe:()=>({type:ot.mobile,vendor:"BlackBerry"})},{test:e=>e.getBrowserName(!0)==="bada",describe:()=>({type:ot.mobile})},{test:e=>e.getBrowserName()==="windows phone",describe:()=>({type:ot.mobile,vendor:"Microsoft"})},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe:()=>({type:ot.tablet})},{test:e=>e.getOSName(!0)==="android",describe:()=>({type:ot.mobile})},{test:e=>e.getOSName(!0)==="macos",describe:()=>({type:ot.desktop,vendor:"Apple"})},{test:e=>e.getOSName(!0)==="windows",describe:()=>({type:ot.desktop})},{test:e=>e.getOSName(!0)==="linux",describe:()=>({type:ot.desktop})},{test:e=>e.getOSName(!0)==="playstation 4",describe:()=>({type:ot.tv})},{test:e=>e.getOSName(!0)==="roku",describe:()=>({type:ot.tv})}],S1=[{test:e=>e.getBrowserName(!0)==="microsoft edge",describe(e){if(/\sedg\//i.test(e))return{name:mr.Blink};const t=X.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:mr.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:mr.Trident},r=X.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:mr.Presto},r=X.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test(e){const t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe(e){const t={name:mr.Gecko},r=X.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:mr.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:mr.WebKit},r=X.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];class If{constructor(t,r=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},r!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=X.find(w1,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(o=>this.test(o));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=X.find(_1,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(o=>this.test(o));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:r}=this.getOS();return t?String(r).toLowerCase()||"":r||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:r}=this.getPlatform();return t?String(r).toLowerCase()||"":r||""}parsePlatform(){this.parsedResult.platform={};const t=X.find(k1,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(o=>this.test(o));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=X.find(S1,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(o=>this.test(o));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return X.assign({},this.parsedResult)}satisfies(t){const r={};let o=0;const a={};let s=0;if(Object.keys(t).forEach(u=>{const f=t[u];typeof f=="string"?(a[u]=f,s+=1):typeof f=="object"&&(r[u]=f,o+=1)}),o>0){const u=Object.keys(r),f=X.find(u,m=>this.isOS(m));if(f){const m=this.satisfies(r[f]);if(m!==void 0)return m}const p=X.find(u,m=>this.isPlatform(m));if(p){const m=this.satisfies(r[p]);if(m!==void 0)return m}}if(s>0){const u=Object.keys(a),f=X.find(u,p=>this.isBrowser(p,!0));if(f!==void 0)return this.compareVersion(a[f])}}isBrowser(t,r=!1){const o=this.getBrowserName().toLowerCase();let a=t.toLowerCase();const s=X.getBrowserTypeByAlias(a);return r&&s&&(a=s.toLowerCase()),a===o}compareVersion(t){let r=[0],o=t,a=!1;const s=this.getBrowserVersion();if(typeof s=="string")return t[0]===">"||t[0]==="<"?(o=t.substr(1),t[1]==="="?(a=!0,o=t.substr(2)):r=[],t[0]===">"?r.push(1):r.push(-1)):t[0]==="="?o=t.substr(1):t[0]==="~"&&(a=!0,o=t.substr(1)),r.indexOf(X.compareVersions(s,o,a))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,r=!1){return this.isBrowser(t,r)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(r=>this.is(r))}}/*! * Bowser - a browser detector * https://github.com/lancedikson/bowser * MIT License | (c) Dustin Diaz 2012-2015 * MIT License | (c) Denis Demchenko 2015-2019 */class E1{static getParser(t,r=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new If(t,r)}static parse(t){return new If(t).getResult()}static get BROWSER_MAP(){return Of}static get ENGINE_MAP(){return mr}static get OS_MAP(){return Ft}static get PLATFORMS_MAP(){return ot}}function Ta(){return Date.now()+Math.random().toString()}function mo(){throw new Error("Method must be implemented in subclass")}function Nf(e,t){return t!=null&&t.proxyUrl?t.proxyUrl+(t.proxyUrl.slice(-1)==="/"?"":"/")+e.substring(8):e}function Aa(e){return e!=null&&e.callObjectBundleUrlOverride?e.callObjectBundleUrlOverride:Nf("https://c.daily.co/call-machine/versioned/".concat("0.80.0","/static/call-machine-object-bundle.js"),e)}function Ma(e){try{new URL(e)}catch{return!1}return!0}const Ye=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Yr="8.55.0",Ue=globalThis;function Pa(e,t,r){const o=Ue,a=o.__SENTRY__=o.__SENTRY__||{},s=a[Yr]=a[Yr]||{};return s[e]||(s[e]=t())}const Gr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Il=["debug","info","warn","error","log","assert","trace"],La={};function go(e){if(!("console"in Ue))return e();const t=Ue.console,r={},o=Object.keys(La);o.forEach(a=>{const s=La[a];r[a]=t[a],t[a]=s});try{return e()}finally{o.forEach(a=>{t[a]=r[a]})}}const Le=Pa("logger",function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Gr?Il.forEach(r=>{t[r]=(...o)=>{e&&go(()=>{Ue.console[r](`Sentry Logger [${r}]:`,...o)})}}):Il.forEach(r=>{t[r]=()=>{}}),t}),Qr="?",jf=/\(error: (.*)\)/,Df=/captureMessage|captureException/;function Oa(e){return e[e.length-1]||{}}const Rf="";function gr(e){try{return e&&typeof e=="function"&&e.name||Rf}catch{return Rf}}function Ff(e){const t=e.exception;if(t){const r=[];try{return t.values.forEach(o=>{o.stacktrace.frames&&r.push(...o.stacktrace.frames)}),r}catch{return}}}const Ia={},zf={};function Zr(e,t){Ia[e]=Ia[e]||[],Ia[e].push(t)}function Kr(e,t){if(!zf[e]){zf[e]=!0;try{t()}catch(r){Gr&&Le.error(`Error while instrumenting ${e}`,r)}}}function An(e,t){const r=e&&Ia[e];if(r)for(const o of r)try{o(t)}catch(a){Gr&&Le.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${gr(o)} Error:`,a)}}let Nl=null;function b1(){Nl=Ue.onerror,Ue.onerror=function(e,t,r,o,a){return An("error",{column:o,error:a,line:r,msg:e,url:t}),!!Nl&&Nl.apply(this,arguments)},Ue.onerror.__SENTRY_INSTRUMENTED__=!0}let jl=null;function C1(){jl=Ue.onunhandledrejection,Ue.onunhandledrejection=function(e){return An("unhandledrejection",e),!jl||jl.apply(this,arguments)},Ue.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Na(){return Dl(Ue),Ue}function Dl(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Yr,t[Yr]=t[Yr]||{}}const Vf=Object.prototype.toString;function Rl(e){switch(Vf.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Xr(e,Error)}}function bi(e,t){return Vf.call(e)===`[object ${t}]`}function Bf(e){return bi(e,"ErrorEvent")}function Uf(e){return bi(e,"DOMError")}function Kn(e){return bi(e,"String")}function Fl(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function zl(e){return e===null||Fl(e)||typeof e!="object"&&typeof e!="function"}function Ci(e){return bi(e,"Object")}function ja(e){return typeof Event<"u"&&Xr(e,Event)}function Da(e){return!!(e&&e.then&&typeof e.then=="function")}function Xr(e,t){try{return e instanceof t}catch{return!1}}function $f(e){return!(typeof e!="object"||e===null||!e.__isVue&&!e._isVue)}const Vl=Ue;function qf(e,t={}){if(!e)return"";try{let r=e;const o=5,a=[];let s=0,u=0;const f=" > ",p=f.length;let m;const v=Array.isArray(t)?t:t.keyAttrs,y=!Array.isArray(t)&&t.maxStringLength||80;for(;r&&s++1&&u+a.length*p+m.length>=y));)a.push(m),u+=m.length,r=r.parentNode;return a.reverse().join(f)}catch{return""}}function x1(e,t){const r=e,o=[];if(!r||!r.tagName)return"";if(Vl.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}o.push(r.tagName.toLowerCase());const a=t&&t.length?t.filter(u=>r.getAttribute(u)).map(u=>[u,r.getAttribute(u)]):null;if(a&&a.length)a.forEach(u=>{o.push(`[${u[0]}="${u[1]}"]`)});else{r.id&&o.push(`#${r.id}`);const u=r.className;if(u&&Kn(u)){const f=u.split(/\s+/);for(const p of f)o.push(`.${p}`)}}const s=["aria-label","type","name","title","alt"];for(const u of s){const f=r.getAttribute(u);f&&o.push(`[${u}="${f}"]`)}return o.join("")}function xi(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Hf(e,t){if(!Array.isArray(e))return"";const r=[];for(let o=0;oT1(e,o,r))}function nn(e,t,r){if(!(t in e))return;const o=e[t],a=r(o);typeof a=="function"&&Jf(a,o);try{e[t]=a}catch{Gr&&Le.log(`Failed to replace method "${t}" in object`,e)}}function ei(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{Gr&&Le.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Jf(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,ei(e,"__sentry_original__",t)}catch{}}function Bl(e){return e.__sentry_original__}function Wf(e){if(Rl(e))return{message:e.message,name:e.name,stack:e.stack,...Gf(e)};if(ja(e)){const t={type:e.type,target:Yf(e.target),currentTarget:Yf(e.currentTarget),...Gf(e)};return typeof CustomEvent<"u"&&Xr(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Yf(e){try{return t=e,typeof Element<"u"&&Xr(t,Element)?qf(e):Object.prototype.toString.call(e)}catch{return""}var t}function Gf(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}return{}}function pn(e){return Ul(e,new Map)}function Ul(e,t){if(function(r){if(!Ci(r))return!1;try{const o=Object.getPrototypeOf(r).constructor.name;return!o||o==="Object"}catch{return!0}}(e)){const r=t.get(e);if(r!==void 0)return r;const o={};t.set(e,o);for(const a of Object.getOwnPropertyNames(e))e[a]!==void 0&&(o[a]=Ul(e[a],t));return o}if(Array.isArray(e)){const r=t.get(e);if(r!==void 0)return r;const o=[];return t.set(e,o),e.forEach(a=>{o.push(Ul(a,t))}),o}return e}function vo(){return Date.now()/1e3}const Xn=function(){const{performance:e}=Ue;if(!e||!e.now)return vo;const t=Date.now()-e.now(),r=e.timeOrigin==null?t:e.timeOrigin;return()=>(r+e.now())/1e3}();function hn(){const e=Ue,t=e.crypto||e.msCrypto;let r=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{const o=new Uint8Array(1);return t.getRandomValues(o),o[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,o=>(o^(15&r())>>o/4).toString(16))}function Qf(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function vr(e){const{message:t,event_id:r}=e;if(t)return t;const o=Qf(e);return o?o.type&&o.value?`${o.type}: ${o.value}`:o.type||o.value||r||"":r||""}function $l(e,t,r){const o=e.exception=e.exception||{},a=o.values=o.values||[],s=a[0]=a[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function Ti(e,t){const r=Qf(e);if(!r)return;const o=r.mechanism;if(r.mechanism={type:"generic",handled:!0,...o,...t},t&&"data"in t){const a={...o&&o.data,...t.data};r.mechanism.data=a}}function Zf(e){if(function(t){try{return t.__sentry_captured__}catch{}}(e))return!0;try{ei(e,"__sentry_captured__",!0)}catch{}return!1}var er;function ti(e){return new mn(t=>{t(e)})}function Fa(e){return new mn((t,r)=>{r(e)})}(()=>{const{performance:e}=Ue;!e||!e.now||(e.now(),e.timing&&e.timing.navigationStart)})(),function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"}(er||(er={}));class mn{constructor(t){mn.prototype.__init.call(this),mn.prototype.__init2.call(this),mn.prototype.__init3.call(this),mn.prototype.__init4.call(this),this._state=er.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}then(t,r){return new mn((o,a)=>{this._handlers.push([!1,s=>{if(t)try{o(t(s))}catch(u){a(u)}else o(s)},s=>{if(r)try{o(r(s))}catch(u){a(u)}else a(s)}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new mn((r,o)=>{let a,s;return this.then(u=>{s=!1,a=u,t&&t()},u=>{s=!0,a=u,t&&t()}).then(()=>{s?o(a):r(a)})})}__init(){this._resolve=t=>{this._setResult(er.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(er.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{this._state===er.PENDING&&(Da(r)?r.then(this._resolve,this._reject):(this._state=t,this._value=r,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===er.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===er.RESOLVED&&r[1](this._value),this._state===er.REJECTED&&r[2](this._value),r[0]=!0)})}}}function A1(e){const t=Xn(),r={sid:hn(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(o){return pn({sid:`${o.sid}`,init:o.init,started:new Date(1e3*o.started).toISOString(),timestamp:new Date(1e3*o.timestamp).toISOString(),status:o.status,errors:o.errors,did:typeof o.did=="number"||typeof o.did=="string"?`${o.did}`:void 0,duration:o.duration,abnormal_mechanism:o.abnormal_mechanism,attrs:{release:o.release,environment:o.environment,ip_address:o.ipAddress,user_agent:o.userAgent}})}(r)};return e&&Ai(r,e),r}function Ai(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||Xn(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:hn()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r: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),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Kf(){return hn()}function ql(){return hn().substring(16)}function za(e,t,r=2){if(!t||typeof t!="object"||r<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const o={...e};for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(o[a]=za(o[a],t[a],r-1));return o}const Hl="_sentrySpan";function Xf(e,t){t?ei(e,Hl,t):delete e[Hl]}function ep(e){return e[Hl]}class Jl{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:Kf(),spanId:ql()}}clone(){const t=new Jl;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Xf(t,ep(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Ai(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this._tags={...this._tags,[t]:r},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t,[o,a]=r instanceof yr?[r.getScopeData(),r.getRequestSession()]:Ci(r)?[t,t.requestSession]:[],{tags:s,extra:u,user:f,contexts:p,level:m,fingerprint:v=[],propagationContext:y}=o||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...u},this._contexts={...this._contexts,...p},f&&Object.keys(f).length&&(this._user=f),m&&(this._level=m),v.length&&(this._fingerprint=v),y&&(this._propagationContext=y),a&&(this._requestSession=a),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,Xf(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Kf()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){const o=typeof r=="number"?r:100;if(o<=0)return this;const a={timestamp:vo(),...t};return this._breadcrumbs.push(a),this._breadcrumbs.length>o&&(this._breadcrumbs=this._breadcrumbs.slice(-o),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(t){return this._attachments.push(t),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:ep(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=za(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:ql(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,r){const o=r&&r.event_id?r.event_id:hn();if(!this._client)return Le.warn("No client configured on scope - will not capture exception!"),o;const a=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:a,...r,event_id:o},this),o}captureMessage(t,r,o){const a=o&&o.event_id?o.event_id:hn();if(!this._client)return Le.warn("No client configured on scope - will not capture message!"),a;const s=new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:s,...o,event_id:a},this),a}captureEvent(t,r){const o=r&&r.event_id?r.event_id:hn();return this._client?(this._client.captureEvent(t,{...r,event_id:o},this),o):(Le.warn("No client configured on scope - will not capture event!"),o)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const yr=Jl;class M1{constructor(t,r){let o,a;o=t||new yr,a=r||new yr,this._stack=[{scope:o}],this._isolationScope=a}withScope(t){const r=this._pushScope();let o;try{o=t(r)}catch(a){throw this._popScope(),a}return Da(o)?o.then(a=>(this._popScope(),a),a=>{throw this._popScope(),a}):(this._popScope(),o)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Mi(){const e=Dl(Na());return e.stack=e.stack||new M1(Pa("defaultCurrentScope",()=>new yr),Pa("defaultIsolationScope",()=>new yr))}function P1(e){return Mi().withScope(e)}function L1(e,t){const r=Mi();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function tp(e){return Mi().withScope(()=>e(Mi().getIsolationScope()))}function Wl(e){const t=Dl(e);return t.acs?t.acs:{withIsolationScope:tp,withScope:P1,withSetScope:L1,withSetIsolationScope:(r,o)=>tp(o),getCurrentScope:()=>Mi().getScope(),getIsolationScope:()=>Mi().getIsolationScope()}}function ni(){return Wl(Na()).getCurrentScope()}function yo(){return Wl(Na()).getIsolationScope()}function Pt(){return ni().getClient()}function O1(e){const t=e.getPropagationContext(),{traceId:r,spanId:o,parentSpanId:a}=t;return pn({trace_id:r,span_id:o,parent_span_id:a})}function I1(e){const t=e._sentryMetrics;if(!t)return;const r={};for(const[,[o,a]]of t)(r[o]||(r[o]=[])).push(pn(a));return r}const N1=/^sentry-/;function j1(e){const t=function(o){if(!(!o||!Kn(o)&&!Array.isArray(o)))return Array.isArray(o)?o.reduce((a,s)=>{const u=np(s);return Object.entries(u).forEach(([f,p])=>{a[f]=p}),a},{}):np(o)}(e);if(!t)return;const r=Object.entries(t).reduce((o,[a,s])=>(a.match(N1)&&(o[a.slice(7)]=s),o),{});return Object.keys(r).length>0?r:void 0}function np(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,o])=>(r&&o&&(t[r]=o),t),{})}let rp=!1;function D1(e){const{spanId:t,traceId:r,isRemote:o}=e.spanContext();return pn({parent_span_id:o?t:Yl(e).parent_span_id,span_id:o?ql():t,trace_id:r})}function ip(e){return typeof e=="number"?op(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?op(e.getTime()):Xn()}function op(e){return e>9999999999?e/1e3:e}function Yl(e){if(function(t){return typeof t.getSpanJSON=="function"}(e))return e.getSpanJSON();try{const{spanId:t,traceId:r}=e.spanContext();if(function(o){const a=o;return!!(a.attributes&&a.startTime&&a.name&&a.endTime&&a.status)}(e)){const{attributes:o,startTime:a,name:s,endTime:u,parentSpanId:f,status:p}=e;return pn({span_id:t,trace_id:r,data:o,description:s,parent_span_id:f,start_timestamp:ip(a),timestamp:ip(u)||void 0,status:R1(p),op:o["sentry.op"],origin:o["sentry.origin"],_metrics_summary:I1(e)})}return{span_id:t,trace_id:r}}catch{return{}}}function R1(e){if(e&&e.code!==0)return e.code===1?"ok":e.message||"unknown_error"}function ap(e){return e._sentryRootSpan||e}function F1(){rp||(go(()=>{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.")}),rp=!0)}const Gl="production";function sp(e,t){const r=t.getOptions(),{publicKey:o}=t.getDsn()||{},a=pn({environment:r.environment||Gl,release:r.release,public_key:o,trace_id:e});return t.emit("createDsc",a),a}function z1(e){const t=Pt();if(!t)return{};const r=ap(e),o=r._frozenDsc;if(o)return o;const a=r.spanContext().traceState,s=a&&a.get("sentry.dsc"),u=s&&j1(s);if(u)return u;const f=sp(e.spanContext().traceId,t),p=Yl(r),m=p.data||{},v=m["sentry.sample_rate"];v!=null&&(f.sample_rate=`${v}`);const y=m["sentry.source"],E=p.description;return y!=="url"&&E&&(f.transaction=E),function(k){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const A=Pt(),b=A&&A.getOptions();return!!b&&(b.enableTracing||"tracesSampleRate"in b||"tracesSampler"in b)}()&&(f.sampled=String(function(k){const{traceFlags:A}=k.spanContext();return A===1}(r))),t.emit("createDsc",f,r),f}const V1=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Va(e,t=!1){const{host:r,path:o,pass:a,port:s,projectId:u,protocol:f,publicKey:p}=e;return`${f}://${p}${t&&a?`:${a}`:""}@${r}${s?`:${s}`:""}/${o&&`${o}/`}${u}`}function lp(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function B1(e){const t=typeof e=="string"?function(r){const o=V1.exec(r);if(!o)return void go(()=>{console.error(`Invalid Sentry Dsn: ${r}`)});const[a,s,u="",f="",p="",m=""]=o.slice(1);let v="",y=m;const E=y.split("/");if(E.length>1&&(v=E.slice(0,-1).join("/"),y=E.pop()),y){const k=y.match(/^\d+/);k&&(y=k[0])}return lp({host:f,pass:u,path:v,projectId:y,port:p,protocol:a,publicKey:s})}(e):lp(e);if(t&&function(r){if(!Gr)return!0;const{port:o,projectId:a,protocol:s}=r;return!(["protocol","publicKey","host","projectId"].find(u=>!r[u]&&(Le.error(`Invalid Sentry Dsn: ${u} missing`),!0))||(a.match(/^\d+$/)?function(u){return u==="http"||u==="https"}(s)?o&&isNaN(parseInt(o,10))&&(Le.error(`Invalid Sentry Dsn: Invalid port ${o}`),1):(Le.error(`Invalid Sentry Dsn: Invalid protocol ${s}`),1):(Le.error(`Invalid Sentry Dsn: Invalid projectId ${a}`),1)))}(t))return t}function tr(e,t=100,r=1/0){try{return Ql("",e,t,r)}catch(o){return{ERROR:`**non-serializable** (${o})`}}}function up(e,t=3,r=102400){const o=tr(e,t);return a=o,function(s){return~-encodeURI(s).split(/%..|./).length}(JSON.stringify(a))>r?up(e,t-1,r):o;var a}function Ql(e,t,r=1/0,o=1/0,a=function(){const s=typeof WeakSet=="function",u=s?new WeakSet:[];return[function(f){if(s)return!!u.has(f)||(u.add(f),!1);for(let p=0;p=o){v[k]="[MaxProperties ~]";break}const A=E[k];v[k]=Ql(k,A,p-1,o,a),y++}return u(t),v}function wo(e,t=[]){return[e,t]}function U1(e,t){const[r,o]=e;return[r,[...o,t]]}function cp(e,t){const r=e[1];for(const o of r)if(t(o,o[0].type))return!0;return!1}function Zl(e){return Ue.__SENTRY__&&Ue.__SENTRY__.encodePolyfill?Ue.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function $1(e){const[t,r]=e;let o=JSON.stringify(t);function a(s){typeof o=="string"?o=typeof s=="string"?o+s:[Zl(o),s]:o.push(typeof s=="string"?Zl(s):s)}for(const s of r){const[u,f]=s;if(a(` ${JSON.stringify(u)} `),typeof f=="string"||f instanceof Uint8Array)a(f);else{let p;try{p=JSON.stringify(f)}catch{p=JSON.stringify(tr(f))}a(p)}}return typeof o=="string"?o:function(s){const u=s.reduce((m,v)=>m+v.length,0),f=new Uint8Array(u);let p=0;for(const m of s)f.set(m,p),p+=m.length;return f}(o)}function q1(e){const t=typeof e.data=="string"?Zl(e.data):e.data;return[pn({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const H1={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 dp(e){return H1[e]}function fp(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function J1(e,t,r,o){const a=fp(r),s=e.type&&e.type!=="replay_event"?e.type:"event";(function(f,p){p&&(f.sdk=f.sdk||{},f.sdk.name=f.sdk.name||p.name,f.sdk.version=f.sdk.version||p.version,f.sdk.integrations=[...f.sdk.integrations||[],...p.integrations||[]],f.sdk.packages=[...f.sdk.packages||[],...p.packages||[]])})(e,r&&r.sdk);const u=function(f,p,m,v){const y=f.sdkProcessingMetadata&&f.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:f.event_id,sent_at:new Date().toISOString(),...p&&{sdk:p},...!!m&&v&&{dsn:Va(v)},...y&&{trace:pn({...y})}}}(e,a,o,t);return delete e.sdkProcessingMetadata,wo(u,[[{type:s},e]])}function Kl(e,t,r,o=0){return new mn((a,s)=>{const u=e[o];if(t===null||typeof u!="function")a(t);else{const f=u({...t},r);Ye&&u.id&&f===null&&Le.log(`Event processor "${u.id}" dropped event`),Da(f)?f.then(p=>Kl(e,p,r,o+1).then(a)).then(null,s):Kl(e,f,r,o+1).then(a).then(null,s)}})}let Ba,pp,Xl;function W1(e,t){const{fingerprint:r,span:o,breadcrumbs:a,sdkProcessingMetadata:s}=t;(function(u,f){const{extra:p,tags:m,user:v,contexts:y,level:E,transactionName:k}=f,A=pn(p);A&&Object.keys(A).length&&(u.extra={...A,...u.extra});const b=pn(m);b&&Object.keys(b).length&&(u.tags={...b,...u.tags});const O=pn(v);O&&Object.keys(O).length&&(u.user={...O,...u.user});const M=pn(y);M&&Object.keys(M).length&&(u.contexts={...M,...u.contexts}),E&&(u.level=E),k&&u.type!=="transaction"&&(u.transaction=k)})(e,t),o&&function(u,f){u.contexts={trace:D1(f),...u.contexts},u.sdkProcessingMetadata={dynamicSamplingContext:z1(f),...u.sdkProcessingMetadata};const p=ap(f),m=Yl(p).description;m&&!u.transaction&&u.type==="transaction"&&(u.transaction=m)}(e,o),function(u,f){u.fingerprint=u.fingerprint?Array.isArray(u.fingerprint)?u.fingerprint:[u.fingerprint]:[],f&&(u.fingerprint=u.fingerprint.concat(f)),u.fingerprint&&!u.fingerprint.length&&delete u.fingerprint}(e,r),function(u,f){const p=[...u.breadcrumbs||[],...f];u.breadcrumbs=p.length?p:void 0}(e,a),function(u,f){u.sdkProcessingMetadata={...u.sdkProcessingMetadata,...f}}(e,s)}function hp(e,t){const{extra:r,tags:o,user:a,contexts:s,level:u,sdkProcessingMetadata:f,breadcrumbs:p,fingerprint:m,eventProcessors:v,attachments:y,propagationContext:E,transactionName:k,span:A}=t;Ua(e,"extra",r),Ua(e,"tags",o),Ua(e,"user",a),Ua(e,"contexts",s),e.sdkProcessingMetadata=za(e.sdkProcessingMetadata,f,2),u&&(e.level=u),k&&(e.transactionName=k),A&&(e.span=A),p.length&&(e.breadcrumbs=[...e.breadcrumbs,...p]),m.length&&(e.fingerprint=[...e.fingerprint,...m]),v.length&&(e.eventProcessors=[...e.eventProcessors,...v]),y.length&&(e.attachments=[...e.attachments,...y]),e.propagationContext={...e.propagationContext,...E}}function Ua(e,t,r){e[t]=za(e[t],r,1)}function Y1(e,t,r,o,a,s){const{normalizeDepth:u=3,normalizeMaxBreadth:f=1e3}=e,p={...t,event_id:t.event_id||r.event_id||hn(),timestamp:t.timestamp||vo()},m=r.integrations||e.integrations.map(A=>A.name);(function(A,b){const{environment:O,release:M,dist:V,maxValueLength:j=250}=b;A.environment=A.environment||O||Gl,!A.release&&M&&(A.release=M),!A.dist&&V&&(A.dist=V),A.message&&(A.message=xi(A.message,j));const R=A.exception&&A.exception.values&&A.exception.values[0];R&&R.value&&(R.value=xi(R.value,j));const N=A.request;N&&N.url&&(N.url=xi(N.url,j))})(p,e),function(A,b){b.length>0&&(A.sdk=A.sdk||{},A.sdk.integrations=[...A.sdk.integrations||[],...b])}(p,m),a&&a.emit("applyFrameMetadata",t),t.type===void 0&&function(A,b){const O=function(M){const V=Ue._sentryDebugIds;if(!V)return{};const j=Object.keys(V);return Xl&&j.length===pp||(pp=j.length,Xl=j.reduce((R,N)=>{Ba||(Ba={});const L=Ba[N];if(L)R[L[0]]=L[1];else{const q=M(N);for(let Y=q.length-1;Y>=0;Y--){const re=q[Y],oe=re&&re.filename,se=V[N];if(oe&&se){R[oe]=se,Ba[N]=[oe,se];break}}}return R},{})),Xl}(b);try{A.exception.values.forEach(M=>{M.stacktrace.frames.forEach(V=>{O&&V.filename&&(V.debug_id=O[V.filename])})})}catch{}}(p,e.stackParser);const v=function(A,b){if(!b)return A;const O=A?A.clone():new yr;return O.update(b),O}(o,r.captureContext);r.mechanism&&Ti(p,r.mechanism);const y=a?a.getEventProcessors():[],E=Pa("globalScope",()=>new yr).getScopeData();s&&hp(E,s.getScopeData()),v&&hp(E,v.getScopeData());const k=[...r.attachments||[],...E.attachments];return k.length&&(r.attachments=k),W1(p,E),Kl([...y,...E.eventProcessors],p,r).then(A=>(A&&function(b){const O={};try{b.exception.values.forEach(V=>{V.stacktrace.frames.forEach(j=>{j.debug_id&&(j.abs_path?O[j.abs_path]=j.debug_id:j.filename&&(O[j.filename]=j.debug_id),delete j.debug_id)})})}catch{}if(Object.keys(O).length===0)return;b.debug_meta=b.debug_meta||{},b.debug_meta.images=b.debug_meta.images||[];const M=b.debug_meta.images;Object.entries(O).forEach(([V,j])=>{M.push({type:"sourcemap",code_file:V,debug_id:j})})}(A),typeof u=="number"&&u>0?function(b,O,M){if(!b)return null;const V={...b,...b.breadcrumbs&&{breadcrumbs:b.breadcrumbs.map(j=>({...j,...j.data&&{data:tr(j.data,O,M)}}))},...b.user&&{user:tr(b.user,O,M)},...b.contexts&&{contexts:tr(b.contexts,O,M)},...b.extra&&{extra:tr(b.extra,O,M)}};return b.contexts&&b.contexts.trace&&V.contexts&&(V.contexts.trace=b.contexts.trace,b.contexts.trace.data&&(V.contexts.trace.data=tr(b.contexts.trace.data,O,M))),b.spans&&(V.spans=b.spans.map(j=>({...j,...j.data&&{data:tr(j.data,O,M)}}))),b.contexts&&b.contexts.flags&&V.contexts&&(V.contexts.flags=tr(b.contexts.flags,3,M)),V}(A,u,f):A))}function Nx(e){}function mp(e,t){return ni().captureEvent(e,t)}function gp(e){const t=Pt(),r=yo(),o=ni(),{release:a,environment:s=Gl}=t&&t.getOptions()||{},{userAgent:u}=Ue.navigator||{},f=A1({release:a,environment:s,user:o.getUser()||r.getUser(),...u&&{userAgent:u},...e}),p=r.getSession();return p&&p.status==="ok"&&Ai(p,{status:"exited"}),vp(),r.setSession(f),o.setSession(f),f}function vp(){const e=yo(),t=ni(),r=t.getSession()||e.getSession();r&&function(o,a){let s={};o.status==="ok"&&(s={status:"exited"}),Ai(o,s)}(r),yp(),e.setSession(),t.setSession()}function yp(){const e=yo(),t=ni(),r=Pt(),o=t.getSession()||e.getSession();o&&r&&r.captureSession(o)}function wp(e=!1){e?vp():yp()}function G1(e,t,r){return t||`${function(o){return`${function(a){const s=a.protocol?`${a.protocol}:`:"",u=a.port?`:${a.port}`:"";return`${s}//${a.host}${u}${a.path?`/${a.path}`:""}/api/`}(o)}${o.projectId}/envelope/`}(e)}?${function(o,a){const s={sentry_version:"7"};return o.publicKey&&(s.sentry_key=o.publicKey),a&&(s.sentry_client=`${a.name}/${a.version}`),new URLSearchParams(s).toString()}(e,r)}`}const _p=[];function kp(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function Sp(e,t,r){if(r[t.name])Ye&&Le.log(`Integration skipped because it was already installed: ${t.name}`);else{if(r[t.name]=t,_p.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),_p.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const o=t.preprocessEvent.bind(t);e.on("preprocessEvent",(a,s)=>o(a,s,e))}if(typeof t.processEvent=="function"){const o=t.processEvent.bind(t),a=Object.assign((s,u)=>o(s,u,e),{id:t.name});e.addEventProcessor(a)}Ye&&Le.log(`Integration installed: ${t.name}`)}}class Mn extends Error{constructor(t,r="warn"){super(t),this.message=t,this.logLevel=r}}const Ep="Not capturing exception because it's already been captured.";class Q1{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=B1(t.dsn):Ye&&Le.warn("No DSN provided, client will not send events."),this._dsn){const o=G1(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:o})}const r=["enableTracing","tracesSampleRate","tracesSampler"].find(o=>o in t&&t[o]==null);r&&go(()=>{console.warn(`[Sentry] Deprecation warning: \`${r}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(t,r,o){const a=hn();if(Zf(t))return Ye&&Le.log(Ep),a;const s={event_id:a,...r};return this._process(this.eventFromException(t,s).then(u=>this._captureEvent(u,s,o))),s.event_id}captureMessage(t,r,o,a){const s={event_id:hn(),...o},u=Fl(t)?t:String(t),f=zl(t)?this.eventFromMessage(u,r,s):this.eventFromException(t,s);return this._process(f.then(p=>this._captureEvent(p,s,a))),s.event_id}captureEvent(t,r,o){const a=hn();if(r&&r.originalException&&Zf(r.originalException))return Ye&&Le.log(Ep),a;const s={event_id:a,...r},u=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,s,u||o)),s.event_id}captureSession(t){typeof t.release!="string"?Ye&&Le.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Ai(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const r=this._transport;return r?(this.emit("flush"),this._isClientDoneProcessing(t).then(o=>r.flush(t).then(a=>o&&a))):ti(!0)}close(t){return this.flush(t).then(r=>(this.getOptions().enabled=!1,this.emit("close"),r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const r=this._integrations[t.name];Sp(this,t,this._integrations),r||kp(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let o=J1(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of r.attachments||[])o=U1(o,q1(s));const a=this.sendEnvelope(o);a&&a.then(s=>this.emit("afterSendEvent",t,s),null)}sendSession(t){const r=function(o,a,s,u){const f=fp(s);return wo({sent_at:new Date().toISOString(),...f&&{sdk:f},...!!u&&a&&{dsn:Va(a)}},["aggregates"in o?[{type:"sessions"},o]:[{type:"session"},o.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,r,o){if(this._options.sendClientReports){const a=typeof o=="number"?o:1,s=`${t}:${r}`;Ye&&Le.log(`Recording outcome: "${s}"${a>1?` (${a} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+a}}on(t,r){const o=this._hooks[t]=this._hooks[t]||[];return o.push(r),()=>{const a=o.indexOf(r);a>-1&&o.splice(a,1)}}emit(t,...r){const o=this._hooks[t];o&&o.forEach(a=>a(...r))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,r=>(Ye&&Le.error("Error while sending envelope:",r),r)):(Ye&&Le.error("Transport disabled"),ti({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=function(r,o){const a={};return o.forEach(s=>{s&&Sp(r,s,a)}),a}(this,t),kp(this,t)}_updateSessionFromEvent(t,r){let o=r.level==="fatal",a=!1;const s=r.exception&&r.exception.values;if(s){a=!0;for(const f of s){const p=f.mechanism;if(p&&p.handled===!1){o=!0;break}}}const u=t.status==="ok";(u&&t.errors===0||u&&o)&&(Ai(t,{...o&&{status:"crashed"},errors:t.errors||Number(a||o)}),this.captureSession(t))}_isClientDoneProcessing(t){return new mn(r=>{let o=0;const a=setInterval(()=>{this._numProcessing==0?(clearInterval(a),r(!0)):(o+=1,t&&o>=t&&(clearInterval(a),r(!1)))},1)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,o=ni(),a=yo()){const s=this.getOptions(),u=Object.keys(this._integrations);return!r.integrations&&u.length>0&&(r.integrations=u),this.emit("preprocessEvent",t,r),t.type||a.setLastEventId(t.event_id||r.event_id),Y1(s,t,r,o,this,a).then(f=>{if(f===null)return f;f.contexts={trace:O1(o),...f.contexts};const p=function(m,v){const y=v.getPropagationContext();return y.dsc||sp(y.traceId,m)}(this,o);return f.sdkProcessingMetadata={dynamicSamplingContext:p,...f.sdkProcessingMetadata},f})}_captureEvent(t,r={},o){return this._processEvent(t,r,o).then(a=>a.event_id,a=>{Ye&&(a instanceof Mn&&a.logLevel==="log"?Le.log(a.message):Le.warn(a))})}_processEvent(t,r,o){const a=this.getOptions(),{sampleRate:s}=a,u=Cp(t),f=bp(t),p=t.type||"error",m=`before send for type \`${p}\``,v=s===void 0?void 0:function(k){if(typeof k=="boolean")return Number(k);const A=typeof k=="string"?parseFloat(k):k;if(!(typeof A!="number"||isNaN(A)||A<0||A>1))return A;Ye&&Le.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(k)} of type ${JSON.stringify(typeof k)}.`)}(s);if(f&&typeof v=="number"&&Math.random()>v)return this.recordDroppedEvent("sample_rate","error",t),Fa(new Mn(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const y=p==="replay_event"?"replay":p,E=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,r,o,E).then(k=>{if(k===null)throw this.recordDroppedEvent("event_processor",y,t),new Mn("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return k;const A=function(b,O,M,V){const{beforeSend:j,beforeSendTransaction:R,beforeSendSpan:N}=O;if(bp(M)&&j)return j(M,V);if(Cp(M)){if(M.spans&&N){const L=[];for(const q of M.spans){const Y=N(q);Y?L.push(Y):(F1(),b.recordDroppedEvent("before_send","span"))}M.spans=L}if(R){if(M.spans){const L=M.spans.length;M.sdkProcessingMetadata={...M.sdkProcessingMetadata,spanCountBeforeProcessing:L}}return R(M,V)}}return M}(this,a,k,r);return function(b,O){const M=`${O} must return \`null\` or a valid event.`;if(Da(b))return b.then(V=>{if(!Ci(V)&&V!==null)throw new Mn(M);return V},V=>{throw new Mn(`${O} rejected with ${V}`)});if(!Ci(b)&&b!==null)throw new Mn(M);return b}(A,m)}).then(k=>{if(k===null){if(this.recordDroppedEvent("before_send",y,t),u){const O=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",O)}throw new Mn(`${m} returned \`null\`, will not send event.`,"log")}const A=o&&o.getSession();if(!u&&A&&this._updateSessionFromEvent(A,k),u){const O=(k.sdkProcessingMetadata&&k.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(k.spans?k.spans.length:0);O>0&&this.recordDroppedEvent("before_send","span",O)}const b=k.transaction_info;if(u&&b&&k.transaction!==t.transaction){const O="custom";k.transaction_info={...b,source:O}}return this.sendEvent(k,r),k}).then(null,k=>{throw k instanceof Mn?k:(this.captureException(k,{data:{__sentry__:!0},originalException:k}),new Mn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${k}`))})}_process(t){this._numProcessing++,t.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([r,o])=>{const[a,s]=r.split(":");return{reason:a,category:s,quantity:o}})}_flushOutcomes(){Ye&&Le.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0)return void(Ye&&Le.log("No outcomes to send"));if(!this._dsn)return void(Ye&&Le.log("No dsn provided, will not send outcomes"));Ye&&Le.log("Sending outcomes:",t);const r=(o=t,wo((a=this._options.tunnel&&Va(this._dsn))?{dsn:a}:{},[[{type:"client_report"},{timestamp:s||vo(),discarded_events:o}]]));var o,a,s;this.sendEnvelope(r)}}function bp(e){return e.type===void 0}function Cp(e){return e.type==="transaction"}function Z1(e){const t=[];function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(o){if(!(e===void 0||t.lengthr(a)).then(null,()=>r(a).then(null,()=>{})),a},drain:function(o){return new mn((a,s)=>{let u=t.length;if(!u)return a(!0);const f=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(p=>{ti(p).then(()=>{--u||(clearTimeout(f),a(!0))},s)})})}}}function K1(e,{statusCode:t,headers:r},o=Date.now()){const a={...e},s=r&&r["x-sentry-rate-limits"],u=r&&r["retry-after"];if(s)for(const f of s.trim().split(",")){const[p,m,,,v]=f.split(":",5),y=parseInt(p,10),E=1e3*(isNaN(y)?60:y);if(m)for(const k of m.split(";"))k==="metric_bucket"&&v&&!v.split(";").includes("custom")||(a[k]=o+E);else a.all=o+E}else u?a.all=o+function(f,p=Date.now()){const m=parseInt(`${f}`,10);if(!isNaN(m))return 1e3*m;const v=Date.parse(`${f}`);return isNaN(v)?6e4:v-p}(u,o):t===429&&(a.all=o+6e4);return a}function X1(e,t,r=Z1(e.bufferSize||64)){let o={};return{send:function(a){const s=[];if(cp(a,(p,m)=>{const v=dp(m);if(function(y,E,k=Date.now()){return function(A,b){return A[b]||A.all||0}(y,E)>k}(o,v)){const y=xp(p,m);e.recordDroppedEvent("ratelimit_backoff",v,y)}else s.push(p)}),s.length===0)return ti({});const u=wo(a[0],s),f=p=>{cp(u,(m,v)=>{const y=xp(m,v);e.recordDroppedEvent(p,dp(v),y)})};return r.add(()=>t({body:$1(u)}).then(p=>(p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&Ye&&Le.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),o=K1(o,p),p),p=>{throw f("network_error"),p})).then(p=>p,p=>{if(p instanceof Mn)return Ye&&Le.error("Skipped sending event because buffer is full."),f("queue_overflow"),ti({});throw p})},flush:a=>r.drain(a)}}function xp(e,t){if(t==="event"||t==="transaction")return Array.isArray(e)?e[1]:void 0}const ew=100;function ri(e,t){const r=Pt(),o=yo();if(!r)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:s=ew}=r.getOptions();if(s<=0)return;const u={timestamp:vo(),...e},f=a?go(()=>a(u,t)):u;f!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",f,t),o.addBreadcrumb(f,s))}let Tp;const Ap=new WeakMap,tw=()=>({name:"FunctionToString",setupOnce(){Tp=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Bl(this),r=Ap.has(Pt())&&t!==void 0?t:this;return Tp.apply(r,e)}}catch{}},setup(e){Ap.set(e,!0)}}),nw=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],rw=(e={})=>({name:"InboundFilters",processEvent(t,r,o){const a=o.getOptions(),s=function(u={},f={}){return{allowUrls:[...u.allowUrls||[],...f.allowUrls||[]],denyUrls:[...u.denyUrls||[],...f.denyUrls||[]],ignoreErrors:[...u.ignoreErrors||[],...f.ignoreErrors||[],...u.disableErrorDefaults?[]:nw],ignoreTransactions:[...u.ignoreTransactions||[],...f.ignoreTransactions||[]],ignoreInternal:u.ignoreInternal===void 0||u.ignoreInternal}}(e,a);return function(u,f){return f.ignoreInternal&&function(p){try{return p.exception.values[0].type==="SentryError"}catch{}return!1}(u)?(Ye&&Le.warn(`Event dropped due to being internal Sentry Error. Event: ${vr(u)}`),!0):function(p,m){return p.type||!m||!m.length?!1:function(v){const y=[];v.message&&y.push(v.message);let E;try{E=v.exception.values[v.exception.values.length-1]}catch{}return E&&E.value&&(y.push(E.value),E.type&&y.push(`${E.type}: ${E.value}`)),y}(p).some(v=>Ra(v,m))}(u,f.ignoreErrors)?(Ye&&Le.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${vr(u)}`),!0):function(p){return p.type||!p.exception||!p.exception.values||p.exception.values.length===0?!1:!p.message&&!p.exception.values.some(m=>m.stacktrace||m.type&&m.type!=="Error"||m.value)}(u)?(Ye&&Le.warn(`Event dropped due to not having an error message, error type or stacktrace. Event: ${vr(u)}`),!0):function(p,m){if(p.type!=="transaction"||!m||!m.length)return!1;const v=p.transaction;return!!v&&Ra(v,m)}(u,f.ignoreTransactions)?(Ye&&Le.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. Event: ${vr(u)}`),!0):function(p,m){if(!m||!m.length)return!1;const v=$a(p);return!!v&&Ra(v,m)}(u,f.denyUrls)?(Ye&&Le.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${vr(u)}. Url: ${$a(u)}`),!0):function(p,m){if(!m||!m.length)return!0;const v=$a(p);return!v||Ra(v,m)}(u,f.allowUrls)?!1:(Ye&&Le.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${vr(u)}. Url: ${$a(u)}`),!0)}(t,s)?null:t}});function $a(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?function(r=[]){for(let o=r.length-1;o>=0;o--){const a=r[o];if(a&&a.filename!==""&&a.filename!=="[native code]")return a.filename||null}return null}(t):null}catch{return Ye&&Le.error(`Cannot extract url for event ${vr(e)}`),null}}function iw(e,t,r=250,o,a,s,u){if(!(s.exception&&s.exception.values&&u&&Xr(u.originalException,Error)))return;const f=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;var p,m;f&&(s.exception.values=(p=eu(e,t,a,u.originalException,o,s.exception.values,f,0),m=r,p.map(v=>(v.value&&(v.value=xi(v.value,m)),v))))}function eu(e,t,r,o,a,s,u,f){if(s.length>=r+1)return s;let p=[...s];if(Xr(o[a],Error)){Mp(u,f);const m=e(t,o[a]),v=p.length;Pp(m,a,v,f),p=eu(e,t,r,o[a],a,[m,...p],m,v)}return Array.isArray(o.errors)&&o.errors.forEach((m,v)=>{if(Xr(m,Error)){Mp(u,f);const y=e(t,m),E=p.length;Pp(y,`errors[${v}]`,E,f),p=eu(e,t,r,m,a,[y,...p],y,E)}}),p}function Mp(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Pp(e,t,r,o){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:o}}function tu(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",o=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:o,relative:t[5]+r+o}}function ow(){"console"in Ue&&Il.forEach(function(e){e in Ue.console&&nn(Ue.console,e,function(t){return La[e]=t,function(...r){An("console",{args:r,level:e});const o=La[e];o&&o.apply(Ue.console,r)}})})}function aw(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const sw=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(r,o){return o?!!(function(a,s){const u=a.message,f=s.message;return!(!u&&!f||u&&!f||!u&&f||u!==f||!Op(a,s)||!Lp(a,s))}(r,o)||function(a,s){const u=Ip(s),f=Ip(a);return!(!u||!f||u.type!==f.type||u.value!==f.value||!Op(a,s)||!Lp(a,s))}(r,o)):!1}(t,e))return Ye&&Le.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function Lp(e,t){let r=Ff(e),o=Ff(t);if(!r&&!o)return!0;if(r&&!o||!r&&o||o.length!==r.length)return!1;for(let a=0;a=400&&e<500?"warning":e>=500?"error":void 0}const nu=Ue;function ru(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function lw(){if(typeof EdgeRuntime=="string")return!0;if(!function(){if(!("fetch"in nu))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}())return!1;if(ru(nu.fetch))return!0;let e=!1;const t=nu.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=ru(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){Gr&&Le.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function uw(e,t){const r="fetch";Zr(r,e),Kr(r,()=>function(o,a=!1){a&&!lw()||nn(Ue,"fetch",function(s){return function(...u){const f=new Error,{method:p,url:m}=function(y){if(y.length===0)return{method:"GET",url:""};if(y.length===2){const[k,A]=y;return{url:jp(k),method:iu(A,"method")?String(A.method).toUpperCase():"GET"}}const E=y[0];return{url:jp(E),method:iu(E,"method")?String(E.method).toUpperCase():"GET"}}(u),v={args:u,fetchData:{method:p,url:m},startTimestamp:1e3*Xn(),virtualError:f};return o||An("fetch",{...v}),s.apply(Ue,u).then(async y=>(o?o(y):An("fetch",{...v,endTimestamp:1e3*Xn(),response:y}),y),y=>{throw An("fetch",{...v,endTimestamp:1e3*Xn(),error:y}),Rl(y)&&y.stack===void 0&&(y.stack=f.stack,ei(y,"framesToPop",1)),y})}})}(void 0,t))}function iu(e,t){return!!e&&typeof e=="object"&&!!e[t]}function jp(e){return typeof e=="string"?e:e?iu(e,"url")?e.url:e.toString?e.toString():"":""}const qa=Ue,gt=Ue;let ou=0;function Dp(){return ou>0}function Pi(e,t={}){if(!function(o){return typeof o=="function"}(e))return e;try{const o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(Bl(e))return e}catch{return e}const r=function(...o){try{const a=o.map(s=>Pi(s,t));return e.apply(this,a)}catch(a){throw ou++,setTimeout(()=>{ou--}),function(...s){const u=Wl(Na());if(s.length===2){const[f,p]=s;return f?u.withSetScope(f,p):u.withScope(p)}u.withScope(s[0])}(s=>{var u;s.addEventProcessor(f=>(t.mechanism&&($l(f,void 0),Ti(f,t.mechanism)),f.extra={...f.extra,arguments:o},f)),u=a,ni().captureException(u,void 0)}),a}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}Jf(r,e),ei(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch{}return r}const Ha=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function au(e,t){const r=lu(e,t),o={type:fw(t),value:pw(t)};return r.length&&(o.stacktrace={frames:r}),o.type===void 0&&o.value===""&&(o.value="Unrecoverable error caught"),o}function cw(e,t,r,o){const a=Pt(),s=a&&a.getOptions().normalizeDepth,u=function(m){for(const v in m)if(Object.prototype.hasOwnProperty.call(m,v)){const y=m[v];if(y instanceof Error)return y}}(t),f={__serialized__:up(t,s)};if(u)return{exception:{values:[au(e,u)]},extra:f};const p={exception:{values:[{type:ja(t)?t.constructor.name:o?"UnhandledRejection":"Error",value:hw(t,{isUnhandledRejection:o})}]},extra:f};if(r){const m=lu(e,r);m.length&&(p.exception.values[0].stacktrace={frames:m})}return p}function su(e,t){return{exception:{values:[au(e,t)]}}}function lu(e,t){const r=t.stacktrace||t.stack||"",o=function(s){return s&&dw.test(s.message)?1:0}(t),a=function(s){return typeof s.framesToPop=="number"?s.framesToPop:0}(t);try{return e(r,o,a)}catch{}return[]}const dw=/Minified React error #\d+;/i;function Rp(e){return typeof WebAssembly<"u"&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function fw(e){const t=e&&e.name;return!t&&Rp(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function pw(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:Rp(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function uu(e,t,r,o,a){let s;if(Bf(t)&&t.error)return su(e,t.error);if(Uf(t)||bi(t,"DOMException")){const u=t;if("stack"in t)s=su(e,t);else{const f=u.name||(Uf(u)?"DOMError":"DOMException"),p=u.message?`${f}: ${u.message}`:f;s=cu(e,p,r,o),$l(s,p)}return"code"in u&&(s.tags={...s.tags,"DOMException.code":`${u.code}`}),s}return Rl(t)?su(e,t):Ci(t)||ja(t)?(s=cw(e,t,r,a),Ti(s,{synthetic:!0}),s):(s=cu(e,t,r,o),$l(s,`${t}`),Ti(s,{synthetic:!0}),s)}function cu(e,t,r,o){const a={};if(o&&r){const s=lu(e,r);s.length&&(a.exception={values:[{value:t,stacktrace:{frames:s}}]}),Ti(a,{synthetic:!0})}if(Fl(t)){const{__sentry_template_string__:s,__sentry_template_values__:u}=t;return a.logentry={message:s,params:u},a}return a.message=t,a}function hw(e,{isUnhandledRejection:t}){const r=function(a,s=40){const u=Object.keys(Wf(a));u.sort();const f=u[0];if(!f)return"[object has no keys]";if(f.length>=s)return xi(f,s);for(let p=u.length;p>0;p--){const m=u.slice(0,p).join(", ");if(!(m.length>s))return p===u.length?m:xi(m,s)}return""}(e),o=t?"promise rejection":"exception";return Bf(e)?`Event \`ErrorEvent\` captured as ${o} with message \`${e.message}\``:ja(e)?`Event \`${function(a){try{const s=Object.getPrototypeOf(a);return s?s.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${o}`:`Object captured as ${o} with keys: ${r}`}class mw extends Q1{constructor(t){const r={parentSpanIsAlwaysRootSpan:!0,...t};(function(o,a,s=[a],u="npm"){const f=o._metadata||{};f.sdk||(f.sdk={name:`sentry.javascript.${a}`,packages:s.map(p=>({name:`${u}:@sentry/${p}`,version:Yr})),version:Yr}),o._metadata=f})(r,"browser",["browser"],gt.SENTRY_SDK_SOURCE||"npm"),super(r),r.sendClientReports&>.document&>.document.addEventListener("visibilitychange",()=>{gt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,r){return function(o,a,s,u){const f=uu(o,a,s&&s.syntheticException||void 0,u);return Ti(f),f.level="error",s&&s.event_id&&(f.event_id=s.event_id),ti(f)}(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",o){return function(a,s,u="info",f,p){const m=cu(a,s,f&&f.syntheticException||void 0,p);return m.level=u,f&&f.event_id&&(m.event_id=f.event_id),ti(m)}(this._options.stackParser,t,r,o,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled())return void(Ha&&Le.warn("SDK not enabled, will not capture user feedback."));const r=function(o,{metadata:a,tunnel:s,dsn:u}){const f={event_id:o.event_id,sent_at:new Date().toISOString(),...a&&a.sdk&&{sdk:{name:a.sdk.name,version:a.sdk.version}},...!!s&&!!u&&{dsn:Va(u)}};return wo(f,[function(m){return[{type:"user_report"},m]}(o)])}(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(r)}_prepareEvent(t,r,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,o)}}const gw=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,zt=Ue;let Fp,du,fu,Ja;function vw(){if(!zt.document)return;const e=An.bind(null,"dom"),t=zp(e,!0);zt.document.addEventListener("click",t,!1),zt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{const o=zt[r],a=o&&o.prototype;a&&a.hasOwnProperty&&a.hasOwnProperty("addEventListener")&&(nn(a,"addEventListener",function(s){return function(u,f,p){if(u==="click"||u=="keypress")try{const m=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},v=m[u]=m[u]||{refCount:0};if(!v.handler){const y=zp(e);v.handler=y,s.call(this,u,y,p)}v.refCount++}catch{}return s.call(this,u,f,p)}}),nn(a,"removeEventListener",function(s){return function(u,f,p){if(u==="click"||u=="keypress")try{const m=this.__sentry_instrumentation_handlers__||{},v=m[u];v&&(v.refCount--,v.refCount<=0&&(s.call(this,u,v.handler,p),v.handler=void 0,delete m[u]),Object.keys(m).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,u,f,p)}}))})}function zp(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const o=function(s){try{return s.target}catch{return null}}(r);if(function(s,u){return s==="keypress"&&(!u||!u.tagName||u.tagName!=="INPUT"&&u.tagName!=="TEXTAREA"&&!u.isContentEditable)}(r.type,o))return;ei(r,"_sentryCaptured",!0),o&&!o._sentryId&&ei(o,"_sentryId",hn());const a=r.type==="keypress"?"input":r.type;(function(s){if(s.type!==du)return!1;try{if(!s.target||s.target._sentryId!==fu)return!1}catch{}return!0})(r)||(e({event:r,name:a,global:t}),du=r.type,fu=o?o._sentryId:void 0),clearTimeout(Fp),Fp=zt.setTimeout(()=>{fu=void 0,du=void 0},1e3)}}function Vp(e){const t="history";Zr(t,e),Kr(t,yw)}function yw(){if(!function(){const r=qa.chrome,o=r&&r.app&&r.app.runtime,a="history"in qa&&!!qa.history.pushState&&!!qa.history.replaceState;return!o&&a}())return;const e=zt.onpopstate;function t(r){return function(...o){const a=o.length>2?o[2]:void 0;if(a){const s=Ja,u=String(a);Ja=u,An("history",{from:s,to:u})}return r.apply(this,o)}}zt.onpopstate=function(...r){const o=zt.location.href,a=Ja;if(Ja=o,An("history",{from:a,to:o}),e)try{return e.apply(this,r)}catch{}},nn(zt.history,"pushState",t),nn(zt.history,"replaceState",t)}const Wa={};function Bp(e){Wa[e]=void 0}const _o="__sentry_xhr_v3__";function ww(){if(!zt.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,o){const a=new Error,s=1e3*Xn(),u=Kn(o[0])?o[0].toUpperCase():void 0,f=function(m){if(Kn(m))return m;try{return m.toString()}catch{}}(o[1]);if(!u||!f)return t.apply(r,o);r[_o]={method:u,url:f,request_headers:{}},u==="POST"&&f.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const p=()=>{const m=r[_o];if(m&&r.readyState===4){try{m.status_code=r.status}catch{}An("xhr",{endTimestamp:1e3*Xn(),startTimestamp:s,xhr:r,virtualError:a})}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply:(m,v,y)=>(p(),m.apply(v,y))}):r.addEventListener("readystatechange",p),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(m,v,y){const[E,k]=y,A=v[_o];return A&&Kn(E)&&Kn(k)&&(A.request_headers[E.toLowerCase()]=k),m.apply(v,y)}}),t.apply(r,o)}}),e.send=new Proxy(e.send,{apply(t,r,o){const a=r[_o];return a?(o[0]!==void 0&&(a.body=o[0]),An("xhr",{startTimestamp:1e3*Xn(),xhr:r}),t.apply(r,o)):t.apply(r,o)}})}function _w(e,t=function(r){const o=Wa[r];if(o)return o;let a=zt[r];if(ru(a))return Wa[r]=a.bind(zt);const s=zt.document;if(s&&typeof s.createElement=="function")try{const u=s.createElement("iframe");u.hidden=!0,s.head.appendChild(u);const f=u.contentWindow;f&&f[r]&&(a=f[r]),s.head.removeChild(u)}catch(u){gw&&Le.warn(`Could not create sandbox iframe for ${r} check, bailing to window.${r}: `,u)}return a&&(Wa[r]=a.bind(zt))}("fetch")){let r=0,o=0;return X1(e,function(a){const s=a.body.length;r+=s,o++;const u={body:a.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&o<15,...e.fetchOptions};if(!t)return Bp("fetch"),Fa("No fetch implementation available");try{return t(e.url,u).then(f=>(r-=s,o--,{statusCode:f.status,headers:{"x-sentry-rate-limits":f.headers.get("X-Sentry-Rate-Limits"),"retry-after":f.headers.get("Retry-After")}}))}catch(f){return Bp("fetch"),r-=s,o--,Fa(f)}})}function pu(e,t,r,o){const a={filename:e,function:t===""?Qr:t,in_app:!0};return r!==void 0&&(a.lineno=r),o!==void 0&&(a.colno=o),a}const kw=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Sw=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ew=/\((\S*)(?::(\d+))(?::(\d+))\)/,bw=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Cw=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,xw=function(...e){const t=e.sort((r,o)=>r[0]-o[0]).map(r=>r[1]);return(r,o=0,a=0)=>{const s=[],u=r.split(` `);for(let f=o;f1024)continue;const m=jf.test(p)?p.replace(jf,"$1"):p;if(!m.match(/\S*Error: /)){for(const v of t){const y=v(m);if(y){s.push(y);break}}if(s.length>=50+a)break}}return function(f){if(!f.length)return[];const p=Array.from(f);return/sentryWrapped/.test(Oa(p).function||"")&&p.pop(),p.reverse(),Df.test(Oa(p).function||"")&&(p.pop(),Df.test(Oa(p).function||"")&&p.pop()),p.slice(0,50).map(m=>({...m,filename:m.filename||Oa(p).filename,function:m.function||Qr}))}(s.slice(a))}}([30,e=>{const t=kw.exec(e);if(t){const[,o,a,s]=t;return pu(o,Qr,+a,+s)}const r=Sw.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const s=Ew.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}const[o,a]=Up(r[1]||Qr,r[2]);return pu(a,o,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,e=>{const t=bw.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const a=Cw.exec(t[3]);a&&(t[1]=t[1]||"eval",t[3]=a[1],t[4]=a[2],t[5]="")}let r=t[3],o=t[1]||Qr;return[o,r]=Up(o,r),pu(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Up=(e,t)=>{const r=e.indexOf("safari-extension")!==-1,o=e.indexOf("safari-web-extension")!==-1;return r||o?[e.indexOf("@")!==-1?e.split("@")[0]:Qr,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},$p=1024,Tw=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(r){var o;t.console&&function(a){const s="console";Zr(s,a),Kr(s,ow)}(function(a){return function(s){if(Pt()!==a)return;const u={category:"console",data:{arguments:s.args,logger:"console"},level:aw(s.level),message:Hf(s.args," ")};if(s.level==="assert"){if(s.args[0]!==!1)return;u.message=`Assertion failed: ${Hf(s.args.slice(1)," ")||"console.assert"}`,u.data.arguments=s.args.slice(1)}ri(u,{input:s.args,level:s.level})}}(r)),t.dom&&(o=function(a,s){return function(u){if(Pt()!==a)return;let f,p,m=typeof s=="object"?s.serializeAttribute:void 0,v=typeof s=="object"&&typeof s.maxStringLength=="number"?s.maxStringLength:void 0;v&&v>$p&&(Ha&&Le.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${v} was configured. Sentry will use 1024 instead.`),v=$p),typeof m=="string"&&(m=[m]);try{const E=u.event,k=function(A){return!!A&&!!A.target}(E)?E.target:E;f=qf(k,{keyAttrs:m,maxStringLength:v}),p=function(A){if(!Vl.HTMLElement)return null;let b=A;for(let O=0;O<5;O++){if(!b)return null;if(b instanceof HTMLElement){if(b.dataset.sentryComponent)return b.dataset.sentryComponent;if(b.dataset.sentryElement)return b.dataset.sentryElement}b=b.parentNode}return null}(k)}catch{f=""}if(f.length===0)return;const y={category:`ui.${u.name}`,message:f};p&&(y.data={"ui.component_name":p}),ri(y,{event:u.event,name:u.name,global:u.global})}}(r,t.dom),Zr("dom",o),Kr("dom",vw)),t.xhr&&function(a){Zr("xhr",a),Kr("xhr",ww)}(function(a){return function(s){if(Pt()!==a)return;const{startTimestamp:u,endTimestamp:f}=s,p=s.xhr[_o];if(!u||!f||!p)return;const{method:m,url:v,status_code:y,body:E}=p,k={method:m,url:v,status_code:y},A={xhr:s.xhr,input:E,startTimestamp:u,endTimestamp:f};ri({category:"xhr",data:k,type:"http",level:Np(y)},A)}}(r)),t.fetch&&uw(function(a){return function(s){if(Pt()!==a)return;const{startTimestamp:u,endTimestamp:f}=s;if(f&&(!s.fetchData.url.match(/sentry_key/)||s.fetchData.method!=="POST"))if(s.error)ri({category:"fetch",data:s.fetchData,level:"error",type:"http"},{data:s.error,input:s.args,startTimestamp:u,endTimestamp:f});else{const p=s.response,m={...s.fetchData,status_code:p&&p.status},v={input:s.args,response:p,startTimestamp:u,endTimestamp:f};ri({category:"fetch",data:m,type:"http",level:Np(m.status_code)},v)}}}(r)),t.history&&Vp(function(a){return function(s){if(Pt()!==a)return;let u=s.from,f=s.to;const p=tu(gt.location.href);let m=u?tu(u):void 0;const v=tu(f);m&&m.path||(m=p),p.protocol===v.protocol&&p.host===v.host&&(f=v.relative),p.protocol===m.protocol&&p.host===m.host&&(u=m.relative),ri({category:"navigation",data:{from:u,to:f}})}}(r)),t.sentry&&r.on("beforeSendEvent",function(a){return function(s){Pt()===a&&ri({category:"sentry."+(s.type==="transaction"?"transaction":"event"),event_id:s.event_id,level:s.level,message:vr(s)},{event:s})}}(r))}}},Aw=["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"],Mw=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&nn(gt,"setTimeout",qp),t.setInterval&&nn(gt,"setInterval",qp),t.requestAnimationFrame&&nn(gt,"requestAnimationFrame",Pw),t.XMLHttpRequest&&"XMLHttpRequest"in gt&&nn(XMLHttpRequest.prototype,"send",Lw);const r=t.eventTarget;r&&(Array.isArray(r)?r:Aw).forEach(Ow)}}};function qp(e){return function(...t){const r=t[0];return t[0]=Pi(r,{mechanism:{data:{function:gr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Pw(e){return function(t){return e.apply(this,[Pi(t,{mechanism:{data:{function:"requestAnimationFrame",handler:gr(e)},handled:!1,type:"instrument"}})])}}function Lw(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&&nn(r,o,function(a){const s={mechanism:{data:{function:o,handler:gr(a)},handled:!1,type:"instrument"}},u=Bl(a);return u&&(s.mechanism.data.handler=gr(u)),Pi(a,s)})}),e.apply(this,t)}}function Ow(e){const t=gt[e],r=t&&t.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(nn(r,"addEventListener",function(o){return function(a,s,u){try{typeof s.handleEvent=="function"&&(s.handleEvent=Pi(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:gr(s),target:e},handled:!1,type:"instrument"}}))}catch{}return o.apply(this,[a,Pi(s,{mechanism:{data:{function:"addEventListener",handler:gr(s),target:e},handled:!1,type:"instrument"}}),u])}}),nn(r,"removeEventListener",function(o){return function(a,s,u){try{const f=s.__sentry_wrapped__;f&&o.call(this,a,f,u)}catch{}return o.call(this,a,s,u)}}))}const Iw=()=>({name:"BrowserSession",setupOnce(){gt.document!==void 0?(gp({ignoreDuration:!0}),wp(),Vp(({from:e,to:t})=>{e!==void 0&&e!==t&&(gp({ignoreDuration:!0}),wp())})):Ha&&Le.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),Nw=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(function(o){(function(a){const s="error";Zr(s,a),Kr(s,b1)})(a=>{const{stackParser:s,attachStacktrace:u}=Jp();if(Pt()!==o||Dp())return;const{msg:f,url:p,line:m,column:v,error:y}=a,E=function(k,A,b,O){const M=k.exception=k.exception||{},V=M.values=M.values||[],j=V[0]=V[0]||{},R=j.stacktrace=j.stacktrace||{},N=R.frames=R.frames||[],L=O,q=b,Y=Kn(A)&&A.length>0?A:function(){try{return Vl.document.location.href}catch{return""}}();return N.length===0&&N.push({colno:L,filename:Y,function:Qr,in_app:!0,lineno:q}),k}(uu(s,y||f,void 0,u,!1),p,m,v);E.level="error",mp(E,{originalException:y,mechanism:{handled:!1,type:"onerror"}})})}(r),Hp("onerror")),t.onunhandledrejection&&(function(o){(function(a){const s="unhandledrejection";Zr(s,a),Kr(s,C1)})(a=>{const{stackParser:s,attachStacktrace:u}=Jp();if(Pt()!==o||Dp())return;const f=function(m){if(zl(m))return m;try{if("reason"in m)return m.reason;if("detail"in m&&"reason"in m.detail)return m.detail.reason}catch{}return m}(a),p=zl(f)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(f)}`}]}}:uu(s,f,void 0,u,!0);p.level="error",mp(p,{originalException:f,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(r),Hp("onunhandledrejection"))}}};function Hp(e){Ha&&Le.log(`Global Handler attached: ${e}`)}function Jp(){const e=Pt();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const jw=()=>({name:"HttpContext",preprocessEvent(e){if(!gt.navigator&&!gt.location&&!gt.document)return;const t=e.request&&e.request.url||gt.location&>.location.href,{referrer:r}=gt.document||{},{userAgent:o}=gt.navigator||{},a={...e.request&&e.request.headers,...r&&{Referer:r},...o&&{"User-Agent":o}},s={...e.request,...t&&{url:t},headers:a};e.request=s}}),Dw=(e={})=>{const t=e.limit||5,r=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(o,a,s){const u=s.getOptions();iw(au,u.stackParser,u.maxValueLength,r,t,o,a)}}};var hu="new",Wp="loading",Yp="loaded",Ya="joining-meeting",wr="joined-meeting",_r="left-meeting",nr="error",Rw="blocked",Fw="off",zw="sendable",Vw="loading",Bw="interrupted",Gp="playable",Ga="unknown",Qp="full",Uw="lobby",$w="none",Zp="base",qw="*",Hw="ejected",Jw="nbf-room",Ww="nbf-token",Yw="exp-room",Gw="exp-token",mu="no-room",Qw="meeting-full",Kp="end-of-life",Zw="not-allowed",Xp="connection-error",Kw="cam-in-use",Xw="mic-in-use",e_="cam-mic-in-use",t_="permissions",n_="undefined-mediadevices",r_="not-found",i_="constraints",o_="unknown",eh="iframe-ready-for-launch-config",th="iframe-launch-config",nh="theme-updated",rh="loading",ih="load-attempt-failed",gu="loaded",oh="started-camera",ah="camera-error",sh="joining-meeting",lh="joined-meeting",uh="left-meeting",ch="participant-joined",dh="participant-updated",fh="participant-left",ph="participant-counts-updated",hh="access-state-updated",mh="meeting-session-summary-updated",gh="meeting-session-state-updated",a_="meeting-session-data-error",vh="waiting-participant-added",yh="waiting-participant-updated",wh="waiting-participant-removed",_h="track-started",kh="track-stopped",Sh="transcription-started",Eh="transcription-stopped",bh="transcription-error",vu="recording-started",yu="recording-stopped",Ch="recording-stats",xh="recording-error",Th="recording-upload-completed",Ah="recording-data",Mh="app-message",Ph="transcription-message",Lh="remote-media-player-started",Oh="remote-media-player-updated",Ih="remote-media-player-stopped",Nh="local-screen-share-started",jh="local-screen-share-stopped",Dh="local-screen-share-canceled",Rh="active-speaker-change",Fh="active-speaker-mode-change",zh="network-quality-change",Vh="network-connection",Bh="cpu-load-change",Uh="face-counts-updated",ko="fullscreen",So="exited-fullscreen",$h="live-streaming-started",qh="live-streaming-updated",Hh="live-streaming-stopped",Jh="live-streaming-error",Wh="lang-updated",Yh="receive-settings-updated",wu="input-settings-updated",_u="nonfatal-error",ku="error",Su=4096,Gh=102400,Eu="iframe-call-message",Qh="local-screen-start",Zh="daily-method-update-live-streaming-endpoints",Qa="transmit-log",rr="daily-custom-track",Za={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},Kh={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},bu={PLAY:"play",PAUSE:"pause"},Cu=["jpg","png","jpeg"],s_="add-endpoints",l_="remove-endpoints",Xh="sip-call-transfer";function gn(){return!Fe()&&typeof window<"u"&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function Fe(){return typeof navigator<"u"&&navigator.product&&navigator.product==="ReactNative"}function em(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function u_(){return!!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)&&(function(e,t){if(!e||!t)return!0;switch(e){case"Chrome":return t.major>=75;case"Safari":return RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection")&&!(t.major===13&&t.minor===0&&t.point===0);case"Firefox":return t.major>=67}return!0}(ii(),Ka())||Fe())}function tm(){if(Fe()||!document)return!1;var e=document.createElement("iframe");return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var xu="none",c_="software",d_="hardware",f_=function(){try{var e,t=document.createElement("canvas"),r=!1;(e=t.getContext("webgl2",{failIfMajorPerformanceCaveat:!0}))||(r=!0,e=t.getContext("webgl2"));var o=e!=null;return t.remove(),o?r?c_:d_:xu}catch{return xu}}();function nm(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!Fe()&&f_!==xu&&(e?function(){return am()?!1:["Chrome","Firefox"].includes(ii())}():function(){if(am())return!1;var t=ii();if(t==="Safari"){var r=Au();if(r.major<15||r.major===15&&r.minor<4)return!1}return t==="Chrome"?Tu().major>=77:t==="Firefox"?Mu().major>=97:["Chrome","Firefox","Safari"].includes(t)}())}function rm(){if(Fe()||om()||typeof AudioWorkletNode>"u")return!1;switch(ii()){case"Chrome":case"Firefox":return!0;case"Safari":var e=Ka();return e.major>17||e.major===17&&e.minor>=4}return!1}function im(){return em()&&!function(){var e,t=ii();if(!gn())return!0;switch(t){case"Chrome":return(e=Tu()).major&&e.major>0&&e.major<75;case"Firefox":return(e=Mu()).major<91;case"Safari":return(e=Au()).major<13||e.major===13&&e.minor<1;default:return!0}}()}function om(){return gn().match(/Linux; Android/)}function am(){var e,t=gn(),r=t.match(/Mac/)&&(!Fe()&&typeof window<"u"&&(e=window)!==null&&e!==void 0&&(e=e.navigator)!==null&&e!==void 0&&e.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(t.match(/Mobi/)||t.match(/Android/)||r)||!!gn().match(/DailyAnd\//)||void 0}function ii(){if(typeof window<"u"){var e=gn();return sm()?"Safari":e.indexOf("Edge")>-1?"Edge":e.match(/Chrome\//)?"Chrome":e.indexOf("Safari")>-1||lm()?"Safari":e.indexOf("Firefox")>-1?"Firefox":e.indexOf("MSIE")>-1||e.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function Ka(){switch(ii()){case"Chrome":return Tu();case"Safari":return Au();case"Firefox":return Mu();case"Edge":return function(){var e=0,t=0;if(typeof window<"u"){var r=gn().match(/Edge\/(\d+).(\d+)/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2])}catch{}}return{major:e,minor:t}}()}}function Tu(){var e=0,t=0,r=0,o=0,a=!1;if(typeof window<"u"){var s=gn(),u=s.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(u)try{e=parseInt(u[1]),t=parseInt(u[2]),r=parseInt(u[3]),o=parseInt(u[4]),a=s.indexOf("OPR/")>-1}catch{}}return{major:e,minor:t,build:r,patch:o,opera:a}}function sm(){return!!gn().match(/iPad|iPhone|iPod/i)&&em()}function lm(){return gn().indexOf("AppleWebKit/605.1.15")>-1}function Au(){var e=0,t=0,r=0;if(typeof window<"u"){var o=gn().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(o)try{e=parseInt(o[1]),t=parseInt(o[2]),r=parseInt(o[4])}catch{}else(sm()||lm())&&(e=14,t=0,r=3)}return{major:e,minor:t,point:r}}function Mu(){var e=0,t=0;if(typeof window<"u"){var r=gn().match(/Firefox\/(\d+).(\d+)/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2])}catch{}}return{major:e,minor:t}}var um=function(){return tn(function e(){en(this,e)},[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,r){mo()}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,r){mo()}},{key:"sendMessageToCallMachine",value:function(e,t,r,o){mo()}},{key:"sendMessageToDailyJs",value:function(e,t){mo()}},{key:"removeListener",value:function(e){mo()}}])}();function cm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,o)}return r}function Pu(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{},r=t.data,o=t.mergeStrategy,a=o===void 0?Lu:o;en(this,e),e._validateMergeStrategy(a),e._validateData(r,a),this.mergeStrategy=a,this.data=r}return tn(e,[{key:"isNoOp",value:function(){return e.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(t,r){return Object.keys(t).length===0&&r===Ou}},{key:"_validateMergeStrategy",value:function(t){if(!hm.includes(t))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(hm,"]"))}},{key:"_validateData",value:function(t,r){if(!function(f){if(f==null||ze(f)!=="object")return!1;var p=Object.getPrototypeOf(f);return p==null||p===Object.prototype}(t))throw Error("Meeting session data must be a plain (map-like) object");var o;try{if(o=JSON.stringify(t),r===Lu){var a=JSON.parse(o);Rt(a,t)||console.warn("The meeting session data provided will be modified when serialized.",a,t)}else if(r===Ou){for(var s in t)if(Object.hasOwnProperty.call(t,s)&&t[s]!==void 0){var u=JSON.parse(JSON.stringify(t[s]));Rt(t[s],u)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",u,t[s])}}}catch(f){throw Error("Meeting session data must be serializable to JSON: ".concat(f))}if(o.length>Gh)throw Error("Meeting session data is too large (".concat(o.length," characters). Maximum size suppported is ").concat(Gh,"."))}}])}();function mm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mm=function(){return!!e})()}function Iu(e){var t=typeof Map=="function"?new Map:void 0;return Iu=function(r){if(r===null||!function(a){try{return Function.toString.call(a).indexOf("[native code]")!==-1}catch{return typeof a=="function"}}(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,o)}function o(){return function(a,s,u){if(mm())return Reflect.construct.apply(null,arguments);var f=[null];f.push.apply(f,s);var p=new(a.bind.apply(a,f));return u&&ho(p,u.prototype),p}(r,arguments,Tn(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),ho(o,r)},Iu(e)}function gm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gm=function(){return!!e})()}function vm(e){var t,r=(t=window._daily)===null||t===void 0?void 0:t.pendings;if(r){var o=r.indexOf(e);o!==-1&&r.splice(o,1)}}var g_=function(){return tn(function e(t){en(this,e),this._currentLoad=null,this._callClientId=t},[{key:"load",value:function(){var e,t=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),void o(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new v_(r,function(){o(!1)},function(s,u){u||vm(t._callClientId),a(s,u)}),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),vm(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])}(),v_=function(){return tn(function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;en(this,e),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=t,this._successCallback=r,this._failureCallback=o},[{key:"start",value:function(){var e=this;if(!this._currentAttempt){var t=function(r){e._currentAttempt.cancelled||(e._attemptsRemaining--,e._failureCallback(r,e._attemptsRemaining>0),e._attemptsRemaining<=0||setTimeout(function(){e._currentAttempt.cancelled||(e._currentAttempt=new ym(e._dailyConfig,e._successCallback,t),e._currentAttempt.start())},3e3))};this._currentAttempt=new ym(this._dailyConfig,this._successCallback,t),this._currentAttempt.start()}}},{key:"cancel",value:function(){this._currentAttempt&&this._currentAttempt.cancel()}},{key:"cancelled",get:function(){return this._currentAttempt&&this._currentAttempt.cancelled}},{key:"succeeded",get:function(){return this._currentAttempt&&this._currentAttempt.succeeded}}])}(),Nu=function(){function e(){return en(this,e),t=this,o=arguments,r=Tn(r=e),Ea(t,gm()?Reflect.construct(r,o||[],Tn(t).constructor):r.apply(t,o));var t,r,o}return ba(e,Iu(Error)),tn(e)}(),Xa=2e4,ym=function(){return tn(function t(r,o,a){en(this,t),this._loadAttemptImpl=Fe()||!r.avoidEval?new y_(r,o,a):new w_(r,o,a)},[{key:"start",value:(e=Te(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}(),y_=function(){return tn(function a(s,u,f){en(this,a),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache=typeof iOSCallObjectBundleCache<"u"&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=s,this._successCallback=u,this._failureCallback=f},[{key:"start",value:(o=Te(function*(){var a=Aa(this._dailyConfig);!(yield this._tryLoadFromIOSCache(a))&&this._loadFromNetwork(a)}),function(){return o.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(r=Te(function*(a){if(!this._iosCache)return!1;try{var s=yield this._iosCache.get(a);return!!this.cancelled||!!s&&(s.code?(Function('"use strict";'+s.code)(),this.succeeded=!0,this._successCallback(),!0):(this._refetchHeaders=s.refetchHeaders,!1))}catch{return!1}}),function(a){return r.apply(this,arguments)})},{key:"_loadFromNetwork",value:(t=Te(function*(a){var s=this;this._networkTimeout=setTimeout(function(){s._networkTimedOut=!0,s._failureCallback({msg:"Timed out (>".concat(Xa," ms) when loading call object bundle ").concat(a),type:"timeout"})},Xa);try{var u=this._refetchHeaders?{headers:this._refetchHeaders}:{},f=yield fetch(a,u);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Nu;var p=yield this._getBundleCodeFromResponse(a,f);if(this.cancelled)throw new Nu;Function('"use strict";'+p)(),this._iosCache&&this._iosCache.set(a,p,f.headers),this.succeeded=!0,this._successCallback()}catch(m){if(clearTimeout(this._networkTimeout),m instanceof Nu||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(a,": ").concat(m),type:m.message})}}),function(a){return t.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(e=Te(function*(a,s){if(s.ok)return yield s.text();if(this._iosCache&&s.status===304)return(yield this._iosCache.renew(a,s.headers)).code;throw new Error("Received ".concat(s.status," response"))}),function(a,s){return e.apply(this,arguments)})}]);var e,t,r,o}(),w_=function(){return tn(function e(t,r,o){en(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._successCallback=r,this._failureCallback=o,this._attemptId=Ta(),this._networkTimeout=null,this._scriptElement=null},[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=Aa(this._dailyConfig);(typeof document>"u"?"undefined":ze(document))==="object"?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(Xa," ms) when loading call object bundle ").concat(e),type:"timeout"})},Xa);var r=document.getElementsByTagName("head")[0],o=document.createElement("script");this._scriptElement=o,o.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback()},o.onerror=function(a){t._stopLoading(),t._failureCallback({msg:"Failed to load call object bundle ".concat(a.target.src),type:a.message})},o.src=e,r.appendChild(o)}},{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)}}])}(),es=function(e,t,r){return k_(e.local,t,r)===!0},__=function(e,t,r){return e.local.streams&&e.local.streams[t]&&e.local.streams[t].stream&&e.local.streams[t].stream["get".concat(r==="video"?"Video":"Audio","Tracks")]()[0]},Li=function(e,t,r,o){var a=S_(e,t,r,o);return a&&a.pendingTrack},k_=function(e,t,r){if(!e)return!1;var o=function(s){switch(s){case"avatar":return!0;case"staged":return s;default:return!!s}},a=e.public.subscribedTracks;return a&&a[t]?["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo"].indexOf(r)===-1&&a[t].custom?[!0,"staged"].includes(a[t].custom)?o(a[t].custom):o(a[t].custom[r]):o(a[t][r]):!a||o(a.ALL)},S_=function(e,t,r,o){var a=Object.values(e.streams||{}).filter(function(s){return s.participantId===t&&s.type===r&&s.pendingTrack&&s.pendingTrack.kind===o}).sort(function(s,u){return new Date(u.starttime)-new Date(s.starttime)});return a&&a[0]},E_=function(e,t){var r=e.local.public.customTracks;if(r&&r[t])return r[t].track};function wm(e,t){for(var r=t.getState(),o=0,a=["cam","screen"];o=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(p){throw p},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,u=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return u=p.done,p},e:function(p){f=!0,s=p},f:function(){try{u||r.return==null||r.return()}finally{if(f)throw s}}}}function Sm(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(p){throw p},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,u=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return u=p.done,p},e:function(p){f=!0,s=p},f:function(){try{u||r.return==null||r.return()}finally{if(f)throw s}}}}function Em(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r0&&arguments[0]!==void 0?arguments[0]:{},r=t.base,o=t.byUserId,a=t.byParticipantId;en(this,e),this.base=r,this.byUserId=o,this.byParticipantId=a}return tn(e,[{key:"clone",value:function(){var t=new e;if(this.base instanceof kt?t.base=this.base.clone():t.base=this.base,this.byUserId!==void 0)for(var r in t.byUserId={},this.byUserId){var o=this.byUserId[r];t.byUserId[r]=o instanceof kt?o.clone():o}if(this.byParticipantId!==void 0)for(var a in t.byParticipantId={},this.byParticipantId){var s=this.byParticipantId[a];t.byParticipantId[a]=s instanceof kt?s.clone():s}return t}},{key:"toJSONObject",value:function(){var t={};if(typeof this.base=="boolean"?t.base=this.base:this.base instanceof kt&&(t.base=this.base.toJSONObject()),this.byUserId!==void 0)for(var r in t.byUserId={},this.byUserId){var o=this.byUserId[r];t.byUserId[r]=o instanceof kt?o.toJSONObject():o}if(this.byParticipantId!==void 0)for(var a in t.byParticipantId={},this.byParticipantId){var s=this.byParticipantId[a];t.byParticipantId[a]=s instanceof kt?s.toJSONObject():s}return t}},{key:"toMinifiedJSONObject",value:function(){var t={};if(this.base!==void 0&&(typeof this.base=="boolean"?t.b=this.base:t.b=this.base.toMinifiedJSONObject()),this.byUserId!==void 0)for(var r in t.u={},this.byUserId){var o=this.byUserId[r];t.u[r]=typeof o=="boolean"?o:o.toMinifiedJSONObject()}if(this.byParticipantId!==void 0)for(var a in t.p={},this.byParticipantId){var s=this.byParticipantId[a];t.p[a]=typeof s=="boolean"?s:s.toMinifiedJSONObject()}return t}},{key:"normalize",value:function(){return this.base instanceof kt&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map(function(t){var r=Mt(t,2),o=r[0],a=r[1];return[o,a instanceof kt?a.normalize():a]}))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map(function(t){var r=Mt(t,2),o=r[0],a=r[1];return[o,a instanceof kt?a.normalize():a]}))),this}}],[{key:"fromJSONObject",value:function(t){var r,o,a;if(t.base!==void 0&&(r=typeof t.base=="boolean"?t.base:kt.fromJSONObject(t.base)),t.byUserId!==void 0)for(var s in o={},t.byUserId){var u=t.byUserId[s];o[s]=typeof u=="boolean"?u:kt.fromJSONObject(u)}if(t.byParticipantId!==void 0)for(var f in a={},t.byParticipantId){var p=t.byParticipantId[f];a[f]=typeof p=="boolean"?p:kt.fromJSONObject(p)}return new e({base:r,byUserId:o,byParticipantId:a})}},{key:"fromMinifiedJSONObject",value:function(t){var r,o,a;if(t.b!==void 0&&(r=typeof t.b=="boolean"?t.b:kt.fromMinifiedJSONObject(t.b)),t.u!==void 0)for(var s in o={},t.u){var u=t.u[s];o[s]=typeof u=="boolean"?u:kt.fromMinifiedJSONObject(u)}if(t.p!==void 0)for(var f in a={},t.p){var p=t.p[f];a[f]=typeof p=="boolean"?p:kt.fromMinifiedJSONObject(p)}return new e({base:r,byUserId:o,byParticipantId:a})}},{key:"validateJSONObject",value:function(t){if(ze(t)!=="object")return[!1,"canReceive must be an object"];for(var r=["base","byUserId","byParticipantId"],o=0,a=Object.keys(t);o0&&arguments[0]!==void 0?arguments[0]:{},r=t.video,o=t.audio,a=t.screenVideo,s=t.screenAudio,u=t.customVideo,f=t.customAudio;en(this,e),this.video=r,this.audio=o,this.screenVideo=a,this.screenAudio=s,this.customVideo=u,this.customAudio=f}return tn(e,[{key:"clone",value:function(){var t=new e;return this.video!==void 0&&(t.video=this.video),this.audio!==void 0&&(t.audio=this.audio),this.screenVideo!==void 0&&(t.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(t.screenAudio=this.screenAudio),this.customVideo!==void 0&&(t.customVideo=kr({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=kr({},this.customAudio)),t}},{key:"toJSONObject",value:function(){var t={};return this.video!==void 0&&(t.video=this.video),this.audio!==void 0&&(t.audio=this.audio),this.screenVideo!==void 0&&(t.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(t.screenAudio=this.screenAudio),this.customVideo!==void 0&&(t.customVideo=kr({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=kr({},this.customAudio)),t}},{key:"toMinifiedJSONObject",value:function(){var t={};return this.video!==void 0&&(t.v=this.video),this.audio!==void 0&&(t.a=this.audio),this.screenVideo!==void 0&&(t.sv=this.screenVideo),this.screenAudio!==void 0&&(t.sa=this.screenAudio),this.customVideo!==void 0&&(t.cv=kr({},this.customVideo)),this.customAudio!==void 0&&(t.ca=kr({},this.customAudio)),t}},{key:"normalize",value:function(){function t(r,o){return r&&Object.keys(r).length===1&&r["*"]===o}return!(this.video!==!0||this.audio!==!0||this.screenVideo!==!0||this.screenAudio!==!0||!t(this.customVideo,!0)||!t(this.customAudio,!0))||(this.video!==!1||this.audio!==!1||this.screenVideo!==!1||this.screenAudio!==!1||!t(this.customVideo,!1)||!t(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:t.customVideo!==void 0?kr({},t.customVideo):void 0,customAudio:t.customAudio!==void 0?kr({},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(t,r){if(typeof t=="boolean")return[!0];if(ze(t)!=="object")return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var o=Object.keys(t),a=0,s=o;a=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(p){throw p},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,u=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return u=p.done,p},e:function(p){f=!0,s=p},f:function(){try{u||r.return==null||r.return()}finally{if(f)throw s}}}}function Im(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r49)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 Bm(e,{allowAllParticipantsKey:!1})},help:Hm({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!function(r,o){try{return o.validateUpdateSendSettings(r),!0}catch(a){return console.error("Failed to validate send settings",a),!1}}(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(e,t){var r;return!!Um(e)&&(t._inputSettings||(t._inputSettings={}),$m(e,(r=t.properties)===null||r===void 0?void 0:r.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:zu()},layout:{validate:function(e){return e==="custom-v1"||e==="browser"||e==="none"},help:'layout may only be set to "custom-v1"',queryString:"layout"},emb:{queryString:"emb"},embHref:{queryString:"embHref"},dailyJsVersion:{queryString:"dailyJsVersion"},proxy:{queryString:"proxy"},strictMode:!0,allowMultipleCallInstances:!0},ns={styles:{validate:function(e){for(var t in e)if(t!=="cam"&&t!=="screen")return!1;if(e.cam){for(var r in e.cam)if(r!=="div"&&r!=="video")return!1}if(e.screen){for(var o in e.screen)if(o!=="div"&&o!=="video")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 r=[!0,!1,"staged"];if(r.includes(e)||!Fe()&&e==="avatar")return!0;var o=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"],a=function(s){var u=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var f in s)if(f==="custom"){if(!r.includes(s[f])&&!a(s[f],!0))return!1}else{var p=!u&&!o.includes(f),m=!r.includes(s[f]);if(p||m)return!1}return!0};return a(e)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(Fe()?"":" | '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 e===!1},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,r=Object.entries(e);t1&&arguments[1]!==void 0?arguments[1]:{};if(en(this,e),C=this,T=Tn(T=e),zn(w=Ea(C,Lm()?Reflect.construct(T,[],Tn(C).constructor):T.apply(C,B)),"startListeningForDeviceChanges",function(){T_(w.handleDeviceChange)}),zn(w,"stopListeningForDeviceChanges",function(){A_(w.handleDeviceChange)}),zn(w,"handleDeviceChange",function(Ce){Ce=Ce.map(function(Oe){return JSON.parse(JSON.stringify(Oe))}),w.emitDailyJSEvent({action:"available-devices-updated",availableDevices:Ce})}),zn(w,"handleNativeAppStateChange",function(){var Ce=Te(function*(Oe){if(Oe==="destroyed")return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield w.destroy());var ut=Oe==="active";w.disableReactNativeAutoDeviceManagement("video")||(ut?w.camUnmutedBeforeLosingNativeActiveState&&w.setLocalVideo(!0):(w.camUnmutedBeforeLosingNativeActiveState=w.localVideo(),w.camUnmutedBeforeLosingNativeActiveState&&w.setLocalVideo(!1)))});return function(Oe){return Ce.apply(this,arguments)}}()),zn(w,"handleNativeAudioFocusChange",function(Ce){w.disableReactNativeAutoDeviceManagement("audio")||(w._hasNativeAudioFocus=Ce,w.toggleParticipantAudioBasedOnNativeAudioFocus(),w._hasNativeAudioFocus?w.micUnmutedBeforeLosingNativeAudioFocus&&w.setLocalAudio(!0):(w.micUnmutedBeforeLosingNativeAudioFocus=w.localAudio(),w.setLocalAudio(!1)))}),zn(w,"handleNativeSystemScreenCaptureStop",function(){w.stopScreenShare()}),w.strictMode=Q.strictMode===void 0||Q.strictMode,w.allowMultipleCallInstances=(_=Q.allowMultipleCallInstances)!==null&&_!==void 0&&_,Object.keys(oi).length&&(w._logDuplicateInstanceAttempt(),!w.allowMultipleCallInstances)){if(w.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:{}}),w.callClientId=Ta(),oi[(W=w).callClientId]=W,window._daily.instances[w.callClientId]={},w._sharedTracks={},window._daily.instances[w.callClientId].tracks=w._sharedTracks,Q.dailyJsVersion=e.version(),w._iframe=d,w._callObjectMode=Q.layout==="none"&&!w._iframe,w._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},Q.showLocalVideo!==void 0?w._callObjectMode?console.error("showLocalVideo is not available in call object mode"):w._showLocalVideo=!!Q.showLocalVideo:w._showLocalVideo=!0,Q.showParticipantsBar!==void 0?w._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):w._showParticipantsBar=!!Q.showParticipantsBar:w._showParticipantsBar=!0,Q.customIntegrations!==void 0?w._callObjectMode?console.error("customIntegrations is not available in call object mode"):w._customIntegrations=Q.customIntegrations:w._customIntegrations={},Q.customTrayButtons!==void 0?w._callObjectMode?console.error("customTrayButtons is not available in call object mode"):w._customTrayButtons=Q.customTrayButtons:w._customTrayButtons={},Q.activeSpeakerMode!==void 0?w._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):w._activeSpeakerMode=!!Q.activeSpeakerMode:w._activeSpeakerMode=!1,Q.receiveSettings?w._callObjectMode?w._receiveSettings=Q.receiveSettings:console.error("receiveSettings is only available in call object mode"):w._receiveSettings={},w.validateProperties(Q),w.properties=_e({},Q),w._inputSettings||(w._inputSettings={}),w._callObjectLoader=w._callObjectMode?new g_(w.callClientId):null,w._callState=hu,w._isPreparingToJoin=!1,w._accessState={access:Ga},w._meetingSessionSummary={},w._finalSummaryOfPrevSession={},w._meetingSessionState=Vu(jm,w._callObjectMode),w._nativeInCallAudioMode=Nm,w._participants={},w._isScreenSharing=!1,w._participantCounts=Dm,w._rmpPlayerState={},w._waitingParticipants={},w._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},w._activeSpeaker={},w._localAudioLevel=0,w._isLocalAudioLevelObserverRunning=!1,w._remoteParticipantsAudioLevel={},w._isRemoteParticipantsAudioLevelObserverRunning=!1,w._maxAppMessageSize=Su,w._messageChannel=Fe()?new h_:new p_,w._iframe&&(w._iframe.requestFullscreen?w._iframe.addEventListener("fullscreenchange",function(){document.fullscreenElement===w._iframe?(w.emitDailyJSEvent({action:ko}),w.sendMessageToCallMachine({action:ko})):(w.emitDailyJSEvent({action:So}),w.sendMessageToCallMachine({action:So}))}):w._iframe.webkitRequestFullscreen&&w._iframe.addEventListener("webkitfullscreenchange",function(){document.webkitFullscreenElement===w._iframe?(w.emitDailyJSEvent({action:ko}),w.sendMessageToCallMachine({action:ko})):(w.emitDailyJSEvent({action:So}),w.sendMessageToCallMachine({action:So}))})),Fe()){var pe=w.nativeUtils();pe.addAudioFocusChangeListener&&pe.removeAudioFocusChangeListener&&pe.addAppStateChangeListener&&pe.removeAppStateChangeListener&&pe.addSystemScreenCaptureStopListener&&pe.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),w._hasNativeAudioFocus=!0,pe.addAudioFocusChangeListener(w.handleNativeAudioFocusChange),pe.addAppStateChangeListener(w.handleNativeAppStateChange),pe.addSystemScreenCaptureStopListener(w.handleNativeSystemScreenCaptureStop)}return w._callObjectMode&&w.startListeningForDeviceChanges(),w._messageChannel.addListenerForMessagesFromCallMachine(w.handleMessageFromCallMachine,w.callClientId,w),w}return ba(e,xa),tn(e,[{key:"destroy",value:(J=Te(function*(){var d;try{yield this.leave()}catch{}var _=this._iframe;if(_){var w=_.parentElement;w&&w.removeChild(_)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),Fe()){var C=this.nativeUtils();C.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),C.removeAppStateChangeListener(this.handleNativeAppStateChange),C.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete oi[this.callClientId],!((d=window)===null||d===void 0||(d=d._daily)===null||d===void 0)&&d.instances&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)}),function(){return J.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(d){var _=d.bodyClass,w=d.cssFile,C=d.cssText;return De(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(w),bodyClass:_,cssText:C}),this}},{key:"iframe",value:function(){return De(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return Pn(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return Pn(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(d,_){for(var w in _){if(!ns[w])throw new Error("unrecognized updateParticipant property ".concat(w));if(ns[w].validate&&!ns[w].validate(_[w],this,this._participants[d]))throw new Error(ns[w].help)}}},{key:"updateParticipant",value:function(d,_){return this._participants.local&&this._participants.local.session_id===d&&(d="local"),d&&_&&(this.validateParticipantProperties(d,_),this.sendMessageToCallMachine({action:"update-participant",id:d,properties:_})),this}},{key:"updateParticipants",value:function(d){var _=this._participants.local&&this._participants.local.session_id;for(var w in d)w===_&&(w="local"),w&&d[w]&&this.validateParticipantProperties(w,d[w]);return this.sendMessageToCallMachine({action:"update-participants",participants:d}),this}},{key:"updateWaitingParticipant",value:(I=Te(function*(){var d=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Pn(this._callObjectMode,"updateWaitingParticipant()"),We(this._callState,"updateWaitingParticipant()"),typeof _!="string"||ze(w)!=="object")throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise(function(C,T){d.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:_,updates:w},function(B){B.error&&T(B.error),B.id||T(new Error("unknown error in updateWaitingParticipant()")),C({id:B.id})})})}),function(){return I.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(x=Te(function*(){var d=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Pn(this._callObjectMode,"updateWaitingParticipants()"),We(this._callState,"updateWaitingParticipants()"),ze(_)!=="object")throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise(function(w,C){d.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updatesById:_},function(T){T.error&&C(T.error),T.ids||C(new Error("unknown error in updateWaitingParticipants()")),w({ids:T.ids})})})}),function(){return x.apply(this,arguments)})},{key:"requestAccess",value:(de=Te(function*(){var d=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},w=_.access,C=w===void 0?{level:Qp}:w,T=_.name,B=T===void 0?"":T;return Pn(this._callObjectMode,"requestAccess()"),We(this._callState,"requestAccess()"),new Promise(function(W,Q){d.sendMessageToCallMachine({action:"daily-method-request-access",access:C,name:B},function(pe){pe.error&&Q(pe.error),pe.access||Q(new Error("unknown error in requestAccess()")),W({access:pe.access,granted:pe.granted})})})}),function(){return de.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(d){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return"forceDiscardTrack"in _&&(Fe()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),_={}):d&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),_={})),this.sendMessageToCallMachine({action:"local-audio",state:d,options:_}),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(d){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:d}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(d){return this.sendMessageToCallMachine({action:"local-video",state:d}),this}},{key:"_setAllowLocalAudio",value:function(d){if(this._preloadCache.allowLocalAudio=d,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-audio",state:d}),this}},{key:"_setAllowLocalVideo",value:function(d){if(this._preloadCache.allowLocalVideo=d,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-video",state:d}),this}},{key:"getReceiveSettings",value:(K=Te(function*(d){var _=this,w=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,C=w!==void 0&&w;if(Pn(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(ze(d)){case"string":return new Promise(function(T){_.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:d,showInheritedValues:C},function(B){T(B.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(d){return K.apply(this,arguments)})},{key:"updateReceiveSettings",value:(Me=Te(function*(d){var _=this;if(Pn(this._callObjectMode,"updateReceiveSettings()"),!Bm(d,{allowAllParticipantsKey:!0}))throw new Error(Hm({allowAllParticipantsKey:!0}));return We(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise(function(w){_.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:d},function(C){w({receiveSettings:C.receiveSettings})})})}),function(d){return Me.apply(this,arguments)})},{key:"_prepInputSettingsForSharing",value:function(d,_){if(d){var w={};if(d.audio){var C,T,B;d.audio.settings&&(!Object.keys(d.audio.settings).length&&_||(w.audio={settings:_e({},d.audio.settings)})),_&&(C=w.audio)!==null&&C!==void 0&&(C=C.settings)!==null&&C!==void 0&&C.customTrack&&(w.audio.settings={customTrack:this._sharedTracks.audioTrack});var W=((T=d.audio.processor)===null||T===void 0?void 0:T.type)==="none"&&((B=d.audio.processor)===null||B===void 0?void 0:B._isDefaultWhenNone);if(d.audio.processor&&!W){var Q=_e({},d.audio.processor);delete Q._isDefaultWhenNone,w.audio=_e(_e({},w.audio),{},{processor:Q})}}if(d.video){var pe,Ce,Oe;d.video.settings&&(!Object.keys(d.video.settings).length&&_||(w.video={settings:_e({},d.video.settings)})),_&&(pe=w.video)!==null&&pe!==void 0&&(pe=pe.settings)!==null&&pe!==void 0&&pe.customTrack&&(w.video.settings={customTrack:this._sharedTracks.videoTrack});var ut=((Ce=d.video.processor)===null||Ce===void 0?void 0:Ce.type)==="none"&&((Oe=d.video.processor)===null||Oe===void 0?void 0:Oe._isDefaultWhenNone);if(d.video.processor&&!ut){var St=_e({},d.video.processor);delete St._isDefaultWhenNone,w.video=_e(_e({},w.video),{},{processor:St})}}return w}}},{key:"getInputSettings",value:function(){var d=this;return De(),new Promise(function(_){_(d._getInputSettings())})}},{key:"_getInputSettings",value:function(){var d,_,w,C,T,B,W={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(d=((w=this._inputSettings)===null||w===void 0?void 0:w.video)||W,_=((C=this._inputSettings)===null||C===void 0?void 0:C.audio)||W):(d=((T=this._preloadCache)===null||T===void 0||(T=T.inputSettings)===null||T===void 0?void 0:T.video)||W,_=((B=this._preloadCache)===null||B===void 0||(B=B.inputSettings)===null||B===void 0?void 0:B.audio)||W);var Q={audio:_,video:d};return this._prepInputSettingsForSharing(Q,!0)}},{key:"_updatePreloadCacheInputSettings",value:function(d,_){var w=this._inputSettings||{},C={};if(d.video){var T,B,W;C.video={},d.video.settings?(C.video.settings={},_||d.video.settings.customTrack||(W=w.video)===null||W===void 0||!W.settings?C.video.settings=d.video.settings:C.video.settings=_e(_e({},w.video.settings),d.video.settings),Object.keys(C.video.settings).length||delete C.video.settings):(T=w.video)!==null&&T!==void 0&&T.settings&&(C.video.settings=w.video.settings),d.video.processor?C.video.processor=d.video.processor:(B=w.video)!==null&&B!==void 0&&B.processor&&(C.video.processor=w.video.processor)}else w.video&&(C.video=w.video);if(d.audio){var Q,pe,Ce;C.audio={},d.audio.settings?(C.audio.settings={},_||d.audio.settings.customTrack||(Ce=w.audio)===null||Ce===void 0||!Ce.settings?C.audio.settings=d.audio.settings:C.audio.settings=_e(_e({},w.audio.settings),d.audio.settings),Object.keys(C.audio.settings).length||delete C.audio.settings):(Q=w.audio)!==null&&Q!==void 0&&Q.settings&&(C.audio.settings=w.audio.settings),d.audio.processor?C.audio.processor=d.audio.processor:(pe=w.audio)!==null&&pe!==void 0&&pe.processor&&(C.audio.processor=w.audio.processor)}else w.audio&&(C.audio=w.audio);this._maybeUpdateInputSettings(C)}},{key:"_devicesFromInputSettings",value:function(d){var _,w,C=(d==null||(_=d.video)===null||_===void 0||(_=_.settings)===null||_===void 0?void 0:_.deviceId)||null,T=(d==null||(w=d.audio)===null||w===void 0||(w=w.settings)===null||w===void 0?void 0:w.deviceId)||null,B=this._preloadCache.outputDeviceId||null;return{camera:C?{deviceId:C}:{},mic:T?{deviceId:T}:{},speaker:B?{deviceId:B}:{}}}},{key:"updateInputSettings",value:(Se=Te(function*(d){var _=this;return De(),Um(d)?d.video||d.audio?($m(d,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(d,!0),this._getInputSettings()):new Promise(function(w,C){_.sendMessageToCallMachine({action:"update-input-settings",inputSettings:d},function(T){if(T.error)C(T.error);else{if(T.returnPreloadCache)return _._updatePreloadCacheInputSettings(d,!0),void w(_._getInputSettings());_._maybeUpdateInputSettings(T.inputSettings),w(_._prepInputSettingsForSharing(T.inputSettings,!0))}})})):this._getInputSettings():(console.error(zu()),Promise.reject(zu()))}),function(d){return Se.apply(this,arguments)})},{key:"setBandwidth",value:function(d){var _=d.kbs,w=d.trackConstraints;if(De(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:_,trackConstraints:w}),this}},{key:"getDailyLang",value:function(){var d=this;if(De(),this._callMachineInitialized)return new Promise(function(_){d.sendMessageToCallMachine({action:"get-daily-lang"},function(w){delete w.action,delete w.callbackStamp,_(w)})})}},{key:"setDailyLang",value:function(d){return De(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:d}),this}},{key:"setProxyUrl",value:function(d){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:d}),this}},{key:"setIceConfig",value:function(d){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:d}),this}},{key:"meetingSessionSummary",value:function(){return[_r,nr].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(he=Te(function*(){var d=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),We(this._callState,"getMeetingSession()"),new Promise(function(_){d.sendMessageToCallMachine({action:"get-meeting-session"},function(w){delete w.action,delete w.callbackStamp,_(w)})})}),function(){return he.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return We(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(d){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"replace";Pn(this._callObjectMode,"setMeetingSessionData()"),We(this._callState,"setMeetingSessionData");try{(function(w,C){new m_({data:w,mergeStrategy:C})})(d,_)}catch(w){throw console.error(w),w}try{this.sendMessageToCallMachine({action:"set-session-data",data:d,mergeStrategy:_})}catch(w){throw new Error("Error setting meeting session data: ".concat(w))}}},{key:"setUserName",value:function(d,_){var w=this;return this.properties.userName=d,new Promise(function(C){w.sendMessageToCallMachine({action:"set-user-name",name:d??"",thisMeetingOnly:Fe()||!!_&&!!_.thisMeetingOnly},function(T){delete T.action,delete T.callbackStamp,C(T)})})}},{key:"setUserData",value:(le=Te(function*(d){var _=this;try{Vm(d)}catch(w){throw console.error(w),w}if(this.properties.userData=d,this._callMachineInitialized)return new Promise(function(w){try{_.sendMessageToCallMachine({action:"set-user-data",userData:d},function(C){delete C.action,delete C.callbackStamp,w(C)})}catch(C){throw new Error("Error setting user data: ".concat(C))}})}),function(d){return le.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(d){if(d&&(d<100||typeof d!="number"))throw new Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(d){var _=this;if(typeof AudioWorkletNode>"u"&&!Fe())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(d),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise(function(w,C){_.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:d},function(T){_._isLocalAudioLevelObserverRunning=!T.error,T.error?C({error:T.error}):w()})});this._preloadCache.localAudioLevelObserver={enabled:!0,interval:d}}},{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(d){var _=this;if(this.validateAudioLevelInterval(d),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise(function(w,C){_.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:d},function(T){_._isRemoteParticipantsAudioLevelObserverRunning=!T.error,T.error?C({error:T.error}):w()})});this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:d}}},{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:(ie=Te(function*(){var d=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Pn(this._callObjectMode,"startCamera()"),Ru(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),this.needsLoad())try{yield this.load(_)}catch(w){return Promise.reject(w)}else{if(this._didPreAuth){if(_.url&&_.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(_.token&&_.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(_),this.properties=_e(_e({},this.properties),_)}return new Promise(function(w){d._preloadCache.inputSettings=d._prepInputSettingsForSharing(d._inputSettings,!1),d.sendMessageToCallMachine({action:"start-camera",properties:Ii(d.properties,d.callClientId),preloadCache:Ii(d._preloadCache,d.callClientId)},function(C){w({camera:C.camera,mic:C.mic,speaker:C.speaker})})})}),function(){return ie.apply(this,arguments)})},{key:"validateCustomTrack",value:function(d,_,w){if(w&&w.length>50)throw new Error("Custom track `trackName` must not be more than 50 characters");if(_&&_!=="music"&&_!=="speech"&&!(_ instanceof Object))throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(w&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(w))throw new Error("Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo");if(!(d instanceof MediaStreamTrack))throw new Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var d=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName};return De(),We(this._callState,"startCustomTrack()"),this.validateCustomTrack(_.track,_.mode,_.trackName),new Promise(function(w,C){d._sharedTracks.customTrack=_.track,_.track=rr,d.sendMessageToCallMachine({action:"start-custom-track",properties:_},function(T){T.error?C({error:T.error}):w(T.mediaTag)})})}},{key:"stopCustomTrack",value:function(d){var _=this;return De(),We(this._callState,"stopCustomTrack()"),new Promise(function(w){_.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:d},function(C){w(C.mediaTag)})})}},{key:"setCamera",value:function(d){var _=this;return xo(),is(this._callMachineInitialized,"setCamera()"),new Promise(function(w){_.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:d},function(C){w({device:C.device})})})}},{key:"setAudioDevice",value:(fe=Te(function*(d){return xo(),this.nativeUtils().setAudioDevice(d),{deviceId:yield this.nativeUtils().getAudioDevice()}}),function(d){return fe.apply(this,arguments)})},{key:"cycleCamera",value:function(){var d=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise(function(w){d.sendMessageToCallMachine({action:"cycle-camera",properties:_},function(C){w({device:C.device})})})}},{key:"cycleMic",value:function(){var d=this;return De(),new Promise(function(_){d.sendMessageToCallMachine({action:"cycle-mic"},function(w){_({device:w.device})})})}},{key:"getCameraFacingMode",value:function(){var d=this;return xo(),new Promise(function(_){d.sendMessageToCallMachine({action:"get-camera-facing-mode"},function(w){_(w.facingMode)})})}},{key:"setInputDevicesAsync",value:(se=Te(function*(d){var _=this,w=d.audioDeviceId,C=d.videoDeviceId,T=d.audioSource,B=d.videoSource;if(De(),T!==void 0&&(w=T),B!==void 0&&(C=B),typeof w=="boolean"&&(this._setAllowLocalAudio(w),w=void 0),typeof C=="boolean"&&(this._setAllowLocalVideo(C),C=void 0),!w&&!C)return yield this.getInputDevices();var W={};return w&&(w instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=w,w=rr,W.audio={settings:{customTrack:w}}):(delete this._sharedTracks.audioTrack,W.audio={settings:{deviceId:w}})),C&&(C instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=C,C=rr,W.video={settings:{customTrack:C}}):(delete this._sharedTracks.videoTrack,W.video={settings:{deviceId:C}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(W,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise(function(Q){_.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:w,videoDeviceId:C},function(pe){if(delete pe.action,delete pe.callbackStamp,pe.returnPreloadCache)return _._updatePreloadCacheInputSettings(W,!1),void Q(_._devicesFromInputSettings(_._inputSettings));Q(pe)})})}),function(d){return se.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(oe=Te(function*(d){var _=this,w=d.outputDeviceId;return De(),w&&(this._preloadCache.outputDeviceId=w),this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(C){_.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:w},function(T){delete T.action,delete T.callbackStamp,T.returnPreloadCache?C(_._devicesFromInputSettings(_._inputSettings)):C(T)})})}),function(d){return oe.apply(this,arguments)})},{key:"getInputDevices",value:(re=Te(function*(){var d=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(_){d.sendMessageToCallMachine({action:"get-input-devices"},function(w){w.returnPreloadCache?_(d._devicesFromInputSettings(d._inputSettings)):_({camera:w.camera,mic:w.mic,speaker:w.speaker})})})}),function(){return re.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return xo(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(d){if(xo(),[Nm,j_].includes(d)){if(d!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=d,!this.disableReactNativeAutoDeviceManagement("audio")&&rs(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",d)}},{key:"preAuth",value:(Y=Te(function*(){var d=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Pn(this._callObjectMode,"preAuth()"),Ru(this._callState,this._isPreparingToJoin,"preAuth()"),this.needsLoad()&&(yield this.load(_)),!_.url)throw new Error("preAuth() requires at least a url to be provided");return this.validateProperties(_),this.properties=_e(_e({},this.properties),_),new Promise(function(w,C){d._preloadCache.inputSettings=d._prepInputSettingsForSharing(d._inputSettings,!1),d.sendMessageToCallMachine({action:"daily-method-preauth",properties:Ii(d.properties,d.callClientId),preloadCache:Ii(d._preloadCache,d.callClientId)},function(T){return T.error?C(T.error):T.access?(d._didPreAuth=!0,void w({access:T.access})):C(new Error("unknown error in preAuth()"))})})}),function(){return Y.apply(this,arguments)})},{key:"load",value:(q=Te(function*(d){var _=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");if(d&&(this.validateProperties(d),this.properties=_e(_e({},this.properties),d)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(Wp),this.emitDailyJSEvent({action:rh}),this._callObjectMode?new Promise(function(w,C){_._callObjectLoader.cancel();var T=Date.now();_._callObjectLoader.load(_.properties.dailyConfig,function(B){_._bundleLoadTime=B?"no-op":Date.now()-T,_._updateCallState(Yp),B&&_.emitDailyJSEvent({action:gu}),w()},function(B,W){if(_.emitDailyJSEvent({action:ih}),!W){_._updateCallState(nr),_.resetMeetingDependentVars();var Q={action:ku,errorMsg:B.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:B,bundleUrl:Aa(_.properties.dailyConfig)}}};_._maybeSendToSentry(Q),_.emitDailyJSEvent(Q),C(B.msg)}})}):(this._iframe.src=Nf(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise(function(w,C){_._loadedCallback=function(T){_._callState!==nr?(_._updateCallState(Yp),(_.properties.cssFile||_.properties.cssText)&&_.loadCss(_.properties),w()):C(T)}}))}}),function(d){return q.apply(this,arguments)})},{key:"join",value:(L=Te(function*(){var d=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();var w=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(_)}catch(C){return this.updateIsPreparingToJoin(!1),Promise.reject(C)}}else{if(w=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(_.url&&_.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(_.token&&_.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(_.url&&!this._callObjectMode&&_.url&&_.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(_.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(_),this.properties=_e(_e({},this.properties),_)}return _.showLocalVideo!==void 0&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!_.showLocalVideo),_.showParticipantsBar!==void 0&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!_.showParticipantsBar),this._callState===wr||this._callState===Ya?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(Ya,!1),this.emitDailyJSEvent({action:sh}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:Ii(this.properties,this.callClientId),preloadCache:Ii(this._preloadCache,this.callClientId)}),new Promise(function(C,T){d._joinedCallback=function(B,W){if(d._callState!==nr){if(d._updateCallState(wr),B)for(var Q in B){if(d._callObjectMode){var pe=d._callMachine().store;wm(B[Q],pe),_m(B[Q],pe),km(B[Q],d._participants[Q],pe)}d._participants[Q]=_e({},B[Q]),d.toggleParticipantAudioBasedOnNativeAudioFocus()}w&&d.loadCss(d.properties),C(B)}else T(W)}}))}),function(){return L.apply(this,arguments)})},{key:"leave",value:(N=Te(function*(){var d=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise(function(_){d._callState===_r||d._callState===nr?_():d._callObjectLoader&&!d._callObjectLoader.loaded?(d._callObjectLoader.cancel(),d._updateCallState(_r),d.resetMeetingDependentVars(),d.emitDailyJSEvent({action:_r}),_()):(d._resolveLeave=_,d.sendMessageToCallMachine({action:"leave-meeting"}))})}),function(){return N.apply(this,arguments)})},{key:"startScreenShare",value:(R=Te(function*(){var d=this,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(is(this._callMachineInitialized,"startScreenShare()"),_.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",_.screenVideoSendSettings),_.mediaStream&&(this._sharedTracks.screenMediaStream=_.mediaStream,_.mediaStream=rr),typeof DailyNativeUtils<"u"&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var w=this.nativeUtils();if(yield w.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:_u,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});w.setSystemScreenCaptureStartCallback(function(){w.setSystemScreenCaptureStartCallback(null),d.sendMessageToCallMachine({action:Qh,captureOptions:_})}),w.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:Qh,captureOptions:_})}),function(){return R.apply(this,arguments)})},{key:"stopScreenShare",value:function(){is(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=d.type;if(_&&_!=="cloud"&&_!=="raw-tracks"&&_!=="local")throw new Error("invalid type: ".concat(_,", allowed values 'cloud', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine(_e({action:"local-recording-start"},d))}},{key:"updateRecording",value:function(d){var _=d.layout,w=_===void 0?{preset:"default"}:_,C=d.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:w,instanceId:C})}},{key:"stopRecording",value:function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(_e({action:"local-recording-stop"},d))}},{key:"startLiveStreaming",value:function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(_e({action:"daily-method-start-live-streaming"},d))}},{key:"updateLiveStreaming",value:function(d){var _=d.layout,w=_===void 0?{preset:"default"}:_,C=d.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:w,instanceId:C})}},{key:"addLiveStreamingEndpoints",value:function(d){var _=d.endpoints,w=d.instanceId;this.sendMessageToCallMachine({action:Zh,endpointsOp:s_,endpoints:_,instanceId:w})}},{key:"removeLiveStreamingEndpoints",value:function(d){var _=d.endpoints,w=d.instanceId;this.sendMessageToCallMachine({action:Zh,endpointsOp:l_,endpoints:_,instanceId:w})}},{key:"stopLiveStreaming",value:function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(_e({action:"daily-method-stop-live-streaming"},d))}},{key:"validateDailyConfig",value:function(d){d.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(d.camSimulcastEncodings)),d.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),om()&&d.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(d){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,w=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(d){if(!(d instanceof Array||Array.isArray(d)))throw new Error("encodings must be an Array");if(!Km(d.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var C=0;C=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(d.userId){if(typeof d.userId!="string")throw new Error("Error starting dial out: userId must be a string");if(d.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}if(d.permissions&&d.permissions.canReceive){var C=Mt(Mm.validateJSONObject(d.permissions.canReceive),2),T=C[0],B=C[1];if(!T)throw new Error(B)}return new Promise(function(W,Q){_.sendMessageToCallMachine(_e({action:"dialout-start"},d),function(pe){pe.error?Q(pe.error):W(pe)})})}),function(d){return O.apply(this,arguments)})},{key:"stopDialOut",value:function(d){var _=this;return We(this._callState,"stopDialOut()"),new Promise(function(w,C){_.sendMessageToCallMachine(_e({action:"dialout-stop"},d),function(T){T.error?C(T.error):w(T)})})}},{key:"sipCallTransfer",value:(b=Te(function*(d){var _=this;if(We(this._callState,"sipCallTransfer()"),!d)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return d.useSipRefer=!1,Qm(d,"sipCallTransfer"),new Promise(function(w,C){_.sendMessageToCallMachine(_e({action:Xh},d),function(T){T.error?C(T.error):w(T)})})}),function(d){return b.apply(this,arguments)})},{key:"sipRefer",value:(A=Te(function*(d){var _=this;if(We(this._callState,"sipRefer()"),!d)throw new Error("sessionId and toEndPoint are mandatory parameter");return d.useSipRefer=!0,Qm(d,"sipRefer"),new Promise(function(w,C){_.sendMessageToCallMachine(_e({action:Xh},d),function(T){T.error?C(T.error):w(T)})})}),function(d){return A.apply(this,arguments)})},{key:"sendDTMF",value:(k=Te(function*(d){var _=this;return We(this._callState,"sendDTMF()"),function(w){var C=w.sessionId,T=w.tones;if(!C||!T)throw new Error("sessionId and tones are mandatory parameter");if(typeof C!="string"||typeof T!="string")throw new Error("sessionId and tones should be of string type");if(T.length>20)throw new Error("tones string must be upto 20 characters");var B=/[^0-9A-D*#]/g,W=T.match(B);if(W&&W[0])throw new Error("".concat(W[0]," is not valid DTMF tone"))}(d),new Promise(function(w,C){_.sendMessageToCallMachine(_e({action:"send-dtmf"},d),function(T){T.error?C(T.error):w(T)})})}),function(d){return k.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var d=this;return this._callState!==wr?Promise.resolve(_e({stats:{latest:{}}},this._network)):new Promise(function(_){d.sendMessageToCallMachine({action:"get-calc-stats"},function(w){_(_e(_e({},d._network),{},{stats:w.stats}))})})}},{key:"testWebsocketConnectivity",value:(E=Te(function*(){var d=this;if(Fu(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(_){return Promise.reject(_)}return new Promise(function(_,w){d.sendMessageToCallMachine({action:"test-websocket-connectivity"},function(C){C.error?w(C.error):_(C.results)})})}),function(){return E.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(d){return d?d instanceof MediaStreamTrack?!!P_(d)||(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:(y=Te(function*(){var d=this;De(),Pn(this._callObjectMode,"testCallQuality()"),is(this._callMachineInitialized,"testCallQuality()",null,!0),Ru(this._callState,this._isPreparingToJoin,"testCallQuality()");var _=this._testCallAlreadyInProgress,w=function(T){_||(d._testCallInProgress=T)};if(w(!0),this.needsLoad())try{var C=this._callState;yield this.load(),this._callState=C}catch(T){return w(!1),Promise.reject(T)}return new Promise(function(T){d.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:d.properties.dailyJsVersion},function(B){var W=B.results,Q=W.result,pe=bf(W,I_);if(Q==="failed"){var Ce,Oe=_e({},pe);(Ce=pe.error)!==null&&Ce!==void 0&&Ce.details?(pe.error.details=JSON.parse(pe.error.details),Oe.error=_e(_e({},Oe.error),{},{details:_e({},Oe.error.details)}),Oe.error.details.duringTest="testCallQuality"):(Oe.error=Oe.error?_e({},Oe.error):{},Oe.error.details={duringTest:"testCallQuality"}),d._maybeSendToSentry(Oe)}w(!1),T(_e({result:Q},pe))})})}),function(){return y.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(v=Te(function*(d){var _;Fe()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),_=yield this.testPeerToPeerCallQuality(d)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),_=yield this.testCallQuality());var w={result:_.result,secondsElapsed:_.secondsElapsed};return _.data&&(w.data={maxRTT:_.data.maxRoundTripTime,packetLoss:_.data.avgRecvPacketLoss}),w}),function(d){return v.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(m=Te(function*(d){var _=this;if(Fu(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(T){return Promise.reject(T)}var w=d.videoTrack,C=d.duration;if(!this._validateVideoTrackForNetworkTests(w))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=w,new Promise(function(T,B){_.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:C},function(W){W.error?B(W.error):T(W.results)})})}),function(d){return m.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){Fe()?(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:(p=Te(function*(d){var _=this;if(Fu(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(w){return Promise.reject(w)}if(!this._validateVideoTrackForNetworkTests(d))throw new Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=d,new Promise(function(w,C){_.sendMessageToCallMachine({action:"test-network-connectivity"},function(T){T.error?C(T.error):w(T.results)})})}),function(d){return p.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var d=this;return new Promise(function(_){d._callState===wr?d.sendMessageToCallMachine({action:"get-cpu-load-stats"},function(w){_(w.cpuStats)}):_({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})})}},{key:"_validateEncodingLayerHasValidProperties",value:function(d){var _;if(!(((_=Object.keys(d))===null||_===void 0?void 0:_.length)>0))throw new Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(ju))}},{key:"_validateVideoSendSettings",value:function(d,_){var w=d==="screenVideo"?["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"],C="Video send settings should be either an object or one of the supported presets: ".concat(w.join());if(typeof _=="string"){if(!w.includes(_))throw new Error(C)}else{if(ze(_)!=="object")throw new Error(C);if(!_.maxQuality&&!_.encodings&&_.allowAdaptiveLayers===void 0)throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(_.maxQuality&&["low","medium","high"].indexOf(_.maxQuality)===-1)throw new Error("maxQuality must be either low, medium or high");if(_.encodings){var T=!1;switch(Object.keys(_.encodings).length){case 1:T=!_.encodings.low;break;case 2:T=!_.encodings.low||!_.encodings.medium;break;case 3:T=!_.encodings.low||!_.encodings.medium||!_.encodings.high;break;default:T=!0}if(T)throw new Error("Encodings must be defined as: low, low and medium, or low, medium and high.");_.encodings.low&&this._validateEncodingLayerHasValidProperties(_.encodings.low),_.encodings.medium&&this._validateEncodingLayerHasValidProperties(_.encodings.medium),_.encodings.high&&this._validateEncodingLayerHasValidProperties(_.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(d){var _=this;if(!d||Object.keys(d).length===0)throw new Error("Send settings must contain at least information for one track!");Object.entries(d).forEach(function(w){var C=Mt(w,2),T=C[0],B=C[1];_._validateVideoSendSettings(T,B)})}},{key:"updateSendSettings",value:function(d){var _=this;return this.validateUpdateSendSettings(d),this.needsLoad()?(this._preloadCache.sendSettings=d,{sendSettings:this._preloadCache.sendSettings}):new Promise(function(w,C){_.sendMessageToCallMachine({action:"update-send-settings",sendSettings:d},function(T){T.error?C(T.error):w(T.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 De(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(d){return De(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:d}),this}},{key:"activeSpeakerMode",value:function(){return De(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(d){return We(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=d,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:d}),this}},{key:"enumerateDevices",value:(f=Te(function*(){var d=this;if(this._callObjectMode){var _=yield navigator.mediaDevices.enumerateDevices();return ii()==="Firefox"&&Ka().major>115&&Ka().major<123&&(_=_.filter(function(w){return w.kind!=="audiooutput"})),{devices:_.map(function(w){var C=JSON.parse(JSON.stringify(w));if(!Fe()&&w.kind==="videoinput"&&w.getCapabilities){var T,B=w.getCapabilities();C.facing=(B==null||(T=B.facingMode)===null||T===void 0?void 0:T.length)>=1?B.facingMode[0]:void 0}return C})}}return new Promise(function(w){d.sendMessageToCallMachine({action:"enumerate-devices"},function(C){w({devices:C.devices})})})}),function(){return f.apply(this,arguments)})},{key:"sendAppMessage",value:function(d){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"*";if(We(this._callState,"sendAppMessage()"),JSON.stringify(d).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:d,to:_}),this}},{key:"addFakeParticipant",value:function(d){return De(),We(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(_e({action:"add-fake-participant"},d)),this}},{key:"setShowNamesMode",value:function(d){return rn(this._callObjectMode,"setShowNamesMode()"),De(),d&&d!=="always"&&d!=="never"?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:d}),this)}},{key:"setShowLocalVideo",value:function(){var d=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return rn(this._callObjectMode,"setShowLocalVideo()"),De(),We(this._callState,"setShowLocalVideo()"),typeof d!="boolean"?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:d}),this._showLocalVideo=d,this)}},{key:"showLocalVideo",value:function(){return rn(this._callObjectMode,"showLocalVideo()"),De(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var d=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return rn(this._callObjectMode,"setShowParticipantsBar()"),De(),We(this._callState,"setShowParticipantsBar()"),typeof d!="boolean"?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:d}),this._showParticipantsBar=d,this)}},{key:"showParticipantsBar",value:function(){return rn(this._callObjectMode,"showParticipantsBar()"),De(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return De(),rn(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(d){return De(),rn(this._callObjectMode,"setCustomIntegrations()"),We(this._callState,"setCustomIntegrations()"),Ym(d)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:d}),this._customIntegrations=d,this):this}},{key:"startCustomIntegrations",value:function(d){var _=this;if(De(),rn(this._callObjectMode,"startCustomIntegrations()"),We(this._callState,"startCustomIntegrations()"),Array.isArray(d)&&d.some(function(T){return typeof T!="string"})||!Array.isArray(d)&&typeof d!="string")return console.error("startCustomIntegrations() only accepts string | string[]"),this;var w=typeof d=="string"?[d]:d,C=w.filter(function(T){return!(T in _._customIntegrations)});return C.length?(console.error(`Can't find custom integration(s): "`.concat(C.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:w}),this)}},{key:"stopCustomIntegrations",value:function(d){var _=this;if(De(),rn(this._callObjectMode,"stopCustomIntegrations()"),We(this._callState,"stopCustomIntegrations()"),Array.isArray(d)&&d.some(function(T){return typeof T!="string"})||!Array.isArray(d)&&typeof d!="string")return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var w=typeof d=="string"?[d]:d,C=w.filter(function(T){return!(T in _._customIntegrations)});return C.length?(console.error(`Can't find custom integration(s): "`.concat(C.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:w}),this)}},{key:"customTrayButtons",value:function(){return rn(this._callObjectMode,"customTrayButtons()"),De(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(d){return rn(this._callObjectMode,"updateCustomTrayButtons()"),De(),We(this._callState,"updateCustomTrayButtons()"),Wm(d)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:d}),this._customTrayButtons=d,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(ts))),this)}},{key:"theme",value:function(){return rn(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(d){var _=this;return rn(this._callObjectMode,"setTheme()"),new Promise(function(w,C){try{_.validateProperties({theme:d}),_.properties.theme=_e({},d),_.sendMessageToCallMachine({action:"set-theme",theme:_.properties.theme});try{_.emitDailyJSEvent({action:nh,theme:_.properties.theme})}catch(T){console.log("could not emit 'theme-updated'",T)}w(_.properties.theme)}catch(T){C(T)}})}},{key:"requestFullscreen",value:(u=Te(function*(){if(De(),this._iframe&&!document.fullscreenElement&&tm())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(d){console.log("could not make video call fullscreen",d)}}),function(){return u.apply(this,arguments)})},{key:"exitFullscreen",value:function(){De(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(s=Te(function*(){var d=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise(function(_){d.sendMessageToCallMachine({action:"get-sidebar-view"},function(w){_(w.view)})})}),function(){return s.apply(this,arguments)})},{key:"setSidebarView",value:function(d){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:d}),this)}},{key:"room",value:(a=Te(function*(){var d=this,_=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,w=_===void 0||_;return this._accessState.access===Ga||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise(function(C){d.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:w},function(T){delete T.action,delete T.callbackStamp,C(T)})})}),function(){return a.apply(this,arguments)})},{key:"geo",value:(o=Te(function*(){try{var d=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield d.json()).geo}}catch(_){return console.error("geo lookup failed",_),{current:""}}}),function(){return o.apply(this,arguments)})},{key:"setNetworkTopology",value:(r=Te(function*(d){var _=this;return De(),We(this._callState,"setNetworkTopology()"),new Promise(function(w,C){_.sendMessageToCallMachine({action:"set-network-topology",opts:d},function(T){T.error?C({error:T.error}):w({workerId:T.workerId})})})}),function(d){return r.apply(this,arguments)})},{key:"getNetworkTopology",value:(t=Te(function*(){var d=this;return new Promise(function(_,w){d.needsLoad()&&_({topology:"none"}),d.sendMessageToCallMachine({action:"get-network-topology"},function(C){C.error?w({error:C.error}):_({topology:C.topology})})})}),function(){return t.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(d){if(De(),typeof d!="number"&&d!==!0&&d!==!1)throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(d));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:d})}},{key:"on",value:function(d,_){return xa.prototype.on.call(this,d,_)}},{key:"once",value:function(d,_){return xa.prototype.once.call(this,d,_)}},{key:"off",value:function(d,_){return xa.prototype.off.call(this,d,_)}},{key:"validateProperties",value:function(d){var _,w;if(d!=null&&(_=d.dailyConfig)!==null&&_!==void 0&&_.userMediaAudioConstraints){var C,T;Fe()||console.warn("userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.");var B=d.inputSettings||{};B.audio=((C=d.inputSettings)===null||C===void 0?void 0:C.audio)||{},B.audio.settings=((T=d.inputSettings)===null||T===void 0||(T=T.audio)===null||T===void 0?void 0:T.settings)||{},B.audio.settings=_e(_e({},B.audio.settings),d.dailyConfig.userMediaAudioConstraints),d.inputSettings=B,delete d.dailyConfig.userMediaAudioConstraints}if(d!=null&&(w=d.dailyConfig)!==null&&w!==void 0&&w.userMediaVideoConstraints){var W,Q;Fe()||console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");var pe=d.inputSettings||{};pe.video=((W=d.inputSettings)===null||W===void 0?void 0:W.video)||{},pe.video.settings=((Q=d.inputSettings)===null||Q===void 0||(Q=Q.video)===null||Q===void 0?void 0:Q.settings)||{},pe.video.settings=_e(_e({},pe.video.settings),d.dailyConfig.userMediaVideoConstraints),d.inputSettings=pe,delete d.dailyConfig.userMediaVideoConstraints}for(var Ce in d){if(!ai[Ce])throw new Error("unrecognized property '".concat(Ce,"'"));if(ai[Ce].validate&&!ai[Ce].validate(d[Ce],this))throw new Error("property '".concat(Ce,"': ").concat(ai[Ce].help))}}},{key:"assembleMeetingUrl",value:function(){var d,_,w=_e(_e({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:(d=this.properties.dailyConfig)!==null&&d!==void 0&&d.proxyUrl?encodeURIComponent((_=this.properties.dailyConfig)===null||_===void 0?void 0:_.proxyUrl):void 0}),C=w.url.match(/\?/)?"&":"?";return w.url+C+Object.keys(ai).filter(function(T){return ai[T].queryString&&w[T]!==void 0}).map(function(T){return"".concat(ai[T].queryString,"=").concat(w[T])}).join("&")}},{key:"needsLoad",value:function(){return[hu,Wp,_r,nr].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(d,_){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(d,_,this.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(d){this._messageChannel.forwardPackagedMessageToCallMachine(d,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(d){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(d,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(d){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(d)}},{key:"handleMessageFromCallMachine",value:function(d){switch(d.action){case eh:this.sendMessageToCallMachine(_e({action:th},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var _={action:Qa,level:"log",code:1011,stats:{event:"bundle load",time:this._bundleLoadTime==="no-op"?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime==="no-op",url:Aa(this.properties.dailyConfig)}};this.sendMessageToCallMachine(_),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case gu:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(d);break;case lh:var w,C=_e({},d);delete C.internal,this._maxAppMessageSize=((w=d.internal)===null||w===void 0?void 0:w._maxAppMessageSize)||Su,this._joinedCallback&&(this._joinedCallback(d.participants),this._joinedCallback=null),this.emitDailyJSEvent(C);break;case ch:case dh:if(this._callState===_r)return;if(d.participant&&d.participant.session_id){var T=d.participant.local?"local":d.participant.session_id;if(this._callObjectMode){var B=this._callMachine().store;wm(d.participant,B),_m(d.participant,B),km(d.participant,this._participants[T],B)}try{this.maybeParticipantTracksStopped(this._participants[T],d.participant),this.maybeParticipantTracksStarted(this._participants[T],d.participant),this.maybeEventRecordingStopped(this._participants[T],d.participant),this.maybeEventRecordingStarted(this._participants[T],d.participant)}catch(G){console.error("track events error",G)}this.compareEqualForParticipantUpdateEvent(d.participant,this._participants[T])||(this._participants[T]=_e({},d.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(d))}break;case fh:if(d.participant&&d.participant.session_id){var W=this._participants[d.participant.session_id];W&&this.maybeParticipantTracksStopped(W,null),delete this._participants[d.participant.session_id],this.emitDailyJSEvent(d)}break;case ph:Rt(this._participantCounts,d.participantCounts)||(this._participantCounts=d.participantCounts,this.emitDailyJSEvent(d));break;case hh:var Q={access:d.access};d.awaitingAccess&&(Q.awaitingAccess=d.awaitingAccess),Rt(this._accessState,Q)||(this._accessState=Q,this.emitDailyJSEvent(d));break;case mh:if(d.meetingSession){this._meetingSessionSummary=d.meetingSession,this.emitDailyJSEvent(d);var pe=_e(_e({},d),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(pe)}break;case ku:var Ce;this._iframe&&!d.preserveIframe&&(this._iframe.src=""),this._updateCallState(nr),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(d.errorMsg),this._loadedCallback=null),d.preserveIframe;var Oe=bf(d,N_);Oe!=null&&(Ce=Oe.error)!==null&&Ce!==void 0&&Ce.details&&(Oe.error.details=JSON.parse(Oe.error.details)),this._maybeSendToSentry(d),this._joinedCallback&&(this._joinedCallback(null,Oe),this._joinedCallback=null),this.emitDailyJSEvent(Oe);break;case uh:this._callState!==nr&&this._updateCallState(_r),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(d);break;case"selected-devices-updated":d.devices&&this.emitDailyJSEvent(d);break;case zh:var ut=d.state,St=d.threshold,sn=d.quality,qe=ut.state,rt=ut.reasons;qe===this._network.networkState&&Rt(rt,this._network.networkStateReasons)&&St===this._network.threshold&&sn===this._network.quality||(this._network.networkState=qe,this._network.networkStateReasons=rt,this._network.quality=sn,this._network.threshold=St,d.networkState=qe,rt.length&&(d.networkStateReasons=rt),delete d.state,this.emitDailyJSEvent(d));break;case Bh:d&&d.cpuLoadState&&this.emitDailyJSEvent(d);break;case Uh:d&&d.faceCounts!==void 0&&this.emitDailyJSEvent(d);break;case Rh:var vt=d.activeSpeaker;this._activeSpeaker.peerId!==vt.peerId&&(this._activeSpeaker.peerId=vt.peerId,this.emitDailyJSEvent({action:d.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var Et=d.show;this._showLocalVideo=Et,this.emitDailyJSEvent({action:d.action,show:Et});break;case Fh:var dt=d.enabled;this._activeSpeakerMode!==dt&&(this._activeSpeakerMode=dt,this.emitDailyJSEvent({action:d.action,enabled:this._activeSpeakerMode}));break;case vh:case yh:case wh:this._waitingParticipants=d.allWaitingParticipants,this.emitDailyJSEvent({action:d.action,participant:d.participant});break;case Yh:Rt(this._receiveSettings,d.receiveSettings)||(this._receiveSettings=d.receiveSettings,this.emitDailyJSEvent({action:d.action,receiveSettings:d.receiveSettings}));break;case wu:this._maybeUpdateInputSettings(d.inputSettings);break;case"send-settings-updated":Rt(this._sendSettings,d.sendSettings)||(this._sendSettings=d.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:d.action,sendSettings:d.sendSettings}));break;case"local-audio-level":this._localAudioLevel=d.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(d);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=d.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(d);break;case Lh:var ln=d.session_id;this._rmpPlayerState[ln]=d.playerState,this.emitDailyJSEvent(d);break;case Ih:delete this._rmpPlayerState[d.session_id],this.emitDailyJSEvent(d);break;case Oh:var Wt=d.session_id,or=this._rmpPlayerState[Wt];or&&this.compareEqualForRMPUpdateEvent(or,d.remoteMediaPlayerState)||(this._rmpPlayerState[Wt]=d.remoteMediaPlayerState,this.emitDailyJSEvent(d));break;case"custom-button-click":case"sidebar-view-changed":this.emitDailyJSEvent(d);break;case gh:var Cr=this._meetingSessionState.topology!==(d.meetingSessionState&&d.meetingSessionState.topology);this._meetingSessionState=Vu(d.meetingSessionState,this._callObjectMode),(this._callObjectMode||Cr)&&this.emitDailyJSEvent(d);break;case Nh:this._isScreenSharing=!0,this.emitDailyJSEvent(d);break;case jh:case Dh:this._isScreenSharing=!1,this.emitDailyJSEvent(d);break;case vu:case yu:case Ch:case xh:case Th:case Sh:case Eh:case bh:case oh:case ah:case Mh:case Ph:case"test-completed":case Vh:case Ah:case $h:case qh:case Hh:case Jh:case _u:case Wh:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-answered":case"dialout-error":case"dialout-stopped":case"dialout-warning":this.emitDailyJSEvent(d);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(d,_){var w="record";d&&(_.local||_[w]!==!1||d[w]===_[w]||this.emitDailyJSEvent({action:yu}))}},{key:"maybeEventRecordingStarted",value:function(d,_){var w="record";d&&(_.local||_[w]!==!0||d[w]===_[w]||this.emitDailyJSEvent({action:vu}))}},{key:"_trackStatePlayable",value:function(d){return!(!d||d.state!==Gp)}},{key:"_trackChanged",value:function(d,_){return d?.id!==_?.id}},{key:"maybeEventTrackStopped",value:function(d,_,w){var C,T,B=(C=_?.tracks[d])!==null&&C!==void 0?C:null,W=(T=w?.tracks[d])!==null&&T!==void 0?T:null,Q=B?.track;if(Q){var pe=this._trackStatePlayable(B),Ce=this._trackStatePlayable(W),Oe=this._trackChanged(Q,W?.track);pe&&(Ce&&!Oe||this.emitDailyJSEvent({action:kh,track:Q,participant:w??_,type:d}))}}},{key:"maybeEventTrackStarted",value:function(d,_,w){var C,T,B=(C=_?.tracks[d])!==null&&C!==void 0?C:null,W=(T=w?.tracks[d])!==null&&T!==void 0?T:null,Q=W?.track;if(Q){var pe=this._trackStatePlayable(B),Ce=this._trackStatePlayable(W),Oe=this._trackChanged(B?.track,Q);Ce&&(pe&&!Oe||this.emitDailyJSEvent({action:_h,track:Q,participant:w,type:d}))}}},{key:"maybeParticipantTracksStopped",value:function(d,_){if(d)for(var w in d.tracks)this.maybeEventTrackStopped(w,d,_)}},{key:"maybeParticipantTracksStarted",value:function(d,_){if(_)for(var w in _.tracks)this.maybeEventTrackStarted(w,d,_)}},{key:"compareEqualForRMPUpdateEvent",value:function(d,_){var w,C;return d.state===_.state&&((w=d.settings)===null||w===void 0?void 0:w.volume)===((C=_.settings)===null||C===void 0?void 0:C.volume)}},{key:"emitDailyJSEvent",value:function(d){try{d.callClientId=this.callClientId,this.emit(d.action,d)}catch(_){console.log("could not emit",d,_)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(d,_){return!!Rt(d,_)&&(!d.videoTrack||!_.videoTrack||d.videoTrack.id===_.videoTrack.id&&d.videoTrack.muted===_.videoTrack.muted&&d.videoTrack.enabled===_.videoTrack.enabled)&&(!d.audioTrack||!_.audioTrack||d.audioTrack.id===_.audioTrack.id&&d.audioTrack.muted===_.audioTrack.muted&&d.audioTrack.enabled===_.audioTrack.enabled)}},{key:"nativeUtils",value:function(){return Fe()?typeof DailyNativeUtils>"u"?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(d){this._updateCallState(this._callState,d)}},{key:"_updateCallState",value:function(d){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(d!==this._callState||_!==this._isPreparingToJoin){var w=this._callState,C=this._isPreparingToJoin;this._callState=d,this._isPreparingToJoin=_;var T=this._callState===wr;this.updateShowAndroidOngoingMeetingNotification(T);var B=rs(w,C),W=rs(this._callState,this._isPreparingToJoin);B!==W&&(this.updateKeepDeviceAwake(W),this.updateDeviceAudioMode(W),this.updateNoOpRecordingEnsuringBackgroundContinuity(W))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=Dm,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Ga},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Vu(jm,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=Su,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(d){Fe()&&this.nativeUtils().setKeepDeviceAwake(d,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(d){if(Fe()&&!this.disableReactNativeAutoDeviceManagement("audio")){var _=d?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(_)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(d){if(Fe()&&this.nativeUtils().setShowOngoingMeetingNotification){var _,w,C,T;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var B=this.properties.reactNativeConfig.androidInCallNotification;_=B.title,w=B.subtitle,C=B.iconName,T=B.disableForCustomOverride}T&&(d=!1),this.nativeUtils().setShowOngoingMeetingNotification(d,_,w,C,this.callClientId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(d){Fe()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(d)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var d;if(Fe()){var _=(d=this._callMachine())===null||d===void 0||(d=d.store)===null||d===void 0?void 0:d.getState();for(var w in _?.streams){var C=_.streams[w];C&&C.pendingTrack&&C.pendingTrack.kind==="audio"&&(C.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(d){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[d]}},{key:"absoluteUrl",value:function(d){if(d!==void 0){var _=document.createElement("a");return _.href=d,_.href}}},{key:"sayHello",value:function(){var d="hello, world.";return console.log(d),d}},{key:"_logUseAfterDestroy",value:function(){var d=Object.values(oi)[0];if(this.needsLoad())if(d&&!d.needsLoad()){var _={action:Qa,level:"error",code:this.strictMode?9995:9997};d.sendMessageToCallMachine(_)}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 w={action:Qa,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(w,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var d=0,_=Object.values(oi);d<_.length;d++){var w=_[d];w._callMachineInitialized?(w.sendMessageToCallMachine({action:Qa,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),w._delayDuplicateInstanceLog=!1):w._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(d){var _,w,C,T;if(!((_=d.error)!==null&&_!==void 0&&_.type&&(![Xp,Kp,mu].includes(d.error.type)||d.error.type===mu&&d.error.msg.includes("deleted")))){var B=(w=this.properties)!==null&&w!==void 0&&w.url?new URL(this.properties.url):void 0,W="production";B&&B.host.includes(".staging.daily")&&(W="staging");var Q,pe,Ce,Oe,ut,St=function(ln){const Wt=[rw(),tw(),Mw(),Tw(),Nw(),Dw(),sw(),jw()];return ln.autoSessionTracking!==!1&&Wt.push(Iw()),Wt}({}).filter(function(ln){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(ln.name)}),sn=new mw({dsn:"https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844",transport:_w,stackParser:xw,integrations:St,environment:W}),qe=new yr;if(qe.setClient(sn),sn.init(),this.session_id&&qe.setExtra("sessionId",this.session_id),this.properties){var rt=_e({},this.properties);rt.userName=rt.userName?"[Filtered]":void 0,rt.userData=rt.userData?"[Filtered]":void 0,rt.token=rt.token?"[Filtered]":void 0,qe.setExtra("properties",rt)}if(B){var vt=B.searchParams.get("domain");if(!vt){var Et=B.host.match(/(.*?)\./);vt=Et&&Et[1]||""}vt&&qe.setTag("domain",vt)}d.error&&(qe.setTag("fatalErrorType",d.error.type),qe.setExtra("errorDetails",d.error.details),!((Q=d.error.details)===null||Q===void 0)&&Q.uri&&qe.setTag("serverAddress",d.error.details.uri),!((pe=d.error.details)===null||pe===void 0)&&pe.workerGroup&&qe.setTag("workerGroup",d.error.details.workerGroup),!((Ce=d.error.details)===null||Ce===void 0)&&Ce.geoGroup&&qe.setTag("geoGroup",d.error.details.geoGroup),!((Oe=d.error.details)===null||Oe===void 0)&&Oe.on&&qe.setTag("connectionAttempt",d.error.details.on),(ut=d.error.details)!==null&&ut!==void 0&&ut.bundleUrl&&(qe.setTag("bundleUrl",d.error.details.bundleUrl),qe.setTag("bundleError",d.error.details.sourceError.type))),qe.setTags({callMode:this._callObjectMode?Fe()?"reactNative":(C=this.properties)!==null&&C!==void 0&&(C=C.dailyConfig)!==null&&C!==void 0&&(C=C.callMode)!==null&&C!==void 0&&C.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:e.version()});var dt=((T=d.error)===null||T===void 0?void 0:T.msg)||d.errorMsg;qe.captureException(new Error(dt))}}},{key:"_callMachine",value:function(){var d;return(d=window._daily)===null||d===void 0||(d=d.instances)===null||d===void 0||(d=d[this.callClientId])===null||d===void 0?void 0:d.callMachine}},{key:"_maybeUpdateInputSettings",value:function(d){if(!Rt(this._inputSettings,d)){var _=this._getInputSettings();this._inputSettings=d;var w=this._getInputSettings();Rt(_,w)||this.emitDailyJSEvent({action:wu,inputSettings:w})}}}],[{key:"supportedBrowser",value:function(){if(Fe())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var d=E1.getParser(gn());return{supported:!!im(),mobile:d.getPlatformType()==="mobile",name:d.getBrowserName(),version:d.getBrowserVersion(),supportsFullscreen:!!tm(),supportsScreenShare:!!u_(),supportsSfu:!!im(),supportsVideoProcessing:nm(),supportsAudioProcessing:rm()}}},{key:"version",value:function(){return"0.80.0"}},{key:"createCallObject",value:function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return d.layout="none",new e(null,d)}},{key:"wrap",value:function(d){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(De(),!d||!d.contentWindow||typeof d.src!="string")throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return _.layout||(_.customLayout?_.layout="custom-v1":_.layout="browser"),new e(d,_)}},{key:"createFrame",value:function(d,_){var w,C;De(),d&&_?(w=d,C=_):d&&d.append?(w=d,C={}):(w=document.body,C=d||{});var T=C.iframeStyle;T||(T=w===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 B=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?B.allow="microphone, camera":B.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",B.style.visibility="hidden",w.appendChild(B),B.style.visibility=null,Object.keys(T).forEach(function(W){return B.style[W]=T[W]}),C.layout||(C.customLayout?C.layout="custom-v1":C.layout="browser");try{return new e(B,C)}catch(W){throw w.removeChild(B),W}}},{key:"createTransparentFrame",value:function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};De();var _=document.createElement("iframe");return _.allow="microphone; camera; autoplay",_.style.cssText=` position: fixed; top: 0; left: 0; width: 100%; height: 100%; border: 0; pointer-events: none; `,document.body.appendChild(_),d.layout||(d.layout="custom-v1"),e.wrap(_,d)}},{key:"getCallInstance",value:function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return d?oi[d]:Object.values(oi)[0]}}]);var t,r,o,a,s,u,f,p,m,v,y,E,k,A,b,O,M,V,j,R,N,L,q,Y,re,oe,se,fe,ie,le,he,Se,Me,K,de,x,I,J}();function Ii(e,t){var r={};for(var o in e)if(e[o]instanceof MediaStreamTrack)console.warn("MediaStreamTrack found in props or cache.",o),r[o]=rr;else if(o==="dailyConfig"){if(e[o].modifyLocalSdpHook){var a=window._daily.instances[t].customCallbacks||{};a.modifyLocalSdpHook=e[o].modifyLocalSdpHook,window._daily.instances[t].customCallbacks=a,delete e[o].modifyLocalSdpHook}if(e[o].modifyRemoteSdpHook){var s=window._daily.instances[t].customCallbacks||{};s.modifyRemoteSdpHook=e[o].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=s,delete e[o].modifyRemoteSdpHook}r[o]=e[o]}else r[o]=e[o];return r}function We(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==wr){var r="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," only supported after join.");throw t&&(r+=" ".concat(t)),console.error(r),new Error(r)}}function rs(e,t){return[Ya,wr].includes(e)||t}function Ru(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"This daily-js method",o=arguments.length>3?arguments[3]:void 0;if(rs(e,t)){var a="".concat(r," not supported after joining a meeting.");throw o&&(a+=" ".concat(o)),console.error(a),new Error(a)}}function is(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method",r=arguments.length>2?arguments[2]:void 0;if(!e){var o="".concat(t,arguments.length>3&&arguments[3]!==void 0&&arguments[3]?" requires preAuth() or startCamera() to initialize call state.":" requires preAuth(), startCamera(), or join() to initialize call state.");throw r&&(o+=" ".concat(r)),console.error(o),new Error(o)}}function Fu(e){if(e){var t="A pre-call quality test is in progress. Please try ".concat(arguments.length>1&&arguments[1]!==void 0?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 Pn(e){if(!e){var t="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(t),new Error(t)}}function rn(e){if(e){var t="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported as part of Daily's Prebuilt");throw console.error(t),new Error(t)}}function De(){if(Fe())throw new Error("This daily-js method is not currently supported in React Native")}function xo(){if(!Fe())throw new Error("This daily-js method is only supported in React Native")}function Vm(e){if(e===void 0)return!0;var t;if(typeof e=="string")t=e;else try{t=JSON.stringify(e),Rt(JSON.parse(t),e)||console.warn("The userData provided will be modified when serialized.")}catch(r){throw Error("userData must be serializable to JSON: ".concat(r))}if(t.length>4096)throw Error("userData is too large (".concat(t.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function Bm(e,t){for(var r=t.allowAllParticipantsKey,o=function(y){var E=["local"];return r||E.push("*"),y&&!E.includes(y)},a=function(y){return!!(y.layer===void 0||Number.isInteger(y.layer)&&y.layer>=0||y.layer==="inherit")},s=function(y){return!!y&&!(y.video&&!a(y.video))&&!(y.screenVideo&&!a(y.screenVideo))},u=0,f=Object.entries(e);u0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(a.join(", "))),e.audio&&e.audio.settings&&(e.audio.settings.customTrack?(r.audioTrack=e.audio.settings.customTrack,e.audio.settings={customTrack:rr}):delete r.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(r.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:rr}):delete r.videoTrack)}function R_(e){if(Fe())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type"];return!!e&&ze(e)==="object"&&(Object.keys(e).filter(function(r){return!t.includes(r)}).forEach(function(r){console.warn("invalid key inputSettings -> audio -> processor : ".concat(r)),delete e[r]}),!!function(r){return typeof r!="string"?!1:Object.values(Kh).includes(r)?!0:(console.error("inputSettings audio processor type invalid"),!1)}(e.type))}function F_(e){if(Fe())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type","config"];return!e||ze(e)!=="object"||!function(r){return typeof r!="string"?!1:Object.values(Za).includes(r)?!0:(console.error("inputSettings video processor type invalid"),!1)}(e.type)||e.config&&(ze(e.config)!=="object"||!function(r,o){var a=Object.keys(o);if(a.length===0)return!0;var s="invalid object in inputSettings -> video -> processor -> config";switch(r){case Za.BGBLUR:return a.length>1||a[0]!=="strength"?(console.error(s),!1):!(typeof o.strength!="number"||o.strength<=0||o.strength>1||isNaN(o.strength))||(console.error("".concat(s,"; expected: {0 < strength <= 1}, got: ").concat(o.strength)),!1);case Za.BGIMAGE:return!(o.source!==void 0&&!function(u){if(u.source==="default")return u.type="default",!0;if(u.source instanceof ArrayBuffer)return!0;if(Ma(u.source))return u.type="url",!!function(m){var v=new URL(m),y=v.pathname;if(v.protocol==="data:")try{var E=y.substring(y.indexOf(":")+1,y.indexOf(";")).split("/")[1];return Cu.includes(E)}catch(A){return console.error("failed to deduce blob content type",A),!1}var k=y.split(".").at(-1).toLowerCase().trim();return Cu.includes(k)}(u.source)||(console.error("invalid image type; supported types: [".concat(Cu.join(", "),"]")),!1);return f=u.source,p=Number(f),isNaN(p)||!Number.isInteger(p)||p<=0||p>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(u.type="daily-preselect",!0);var f,p}(o));default:return!0}}(e.type,e.config))?!1:(Object.keys(e).filter(function(r){return!t.includes(r)}).forEach(function(r){console.warn("invalid key inputSettings -> video -> processor : ".concat(r)),delete e[r]}),!0)}function qm(e){return ze(e)==="object"&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function zu(){var e=Object.values(Za).join(" | "),t=Object.values(Kh).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(e," ], config?: {} } }, audio?: { processor: {type: [ ").concat(t," ] } } }")}function Hm(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [ | ".concat(Zp).concat(t?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [ | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [ | "inherit"] } | "inherit"]] }}}'}function Jm(){return"customIntegrations should be an object of type ".concat(JSON.stringify(Du),".")}function Wm(e){if(e&&ze(e)!=="object"||Array.isArray(e))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(ts),".")),!1;if(e)for(var t=0,r=Object.entries(e);t2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function Km(e,t,r){return!(typeof e!="number"||er)}function Vu(e,t){return e&&!t&&delete e.data,e}const z_=fo(Object.freeze(Object.defineProperty({__proto__:null,DAILY_ACCESS_LEVEL_FULL:Qp,DAILY_ACCESS_LEVEL_LOBBY:Uw,DAILY_ACCESS_LEVEL_NONE:$w,DAILY_ACCESS_UNKNOWN:Ga,DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE:e_,DAILY_CAMERA_ERROR_CAM_IN_USE:Kw,DAILY_CAMERA_ERROR_CONSTRAINTS:i_,DAILY_CAMERA_ERROR_MIC_IN_USE:Xw,DAILY_CAMERA_ERROR_NOT_FOUND:r_,DAILY_CAMERA_ERROR_PERMISSIONS:t_,DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES:n_,DAILY_CAMERA_ERROR_UNKNOWN:o_,DAILY_EVENT_ACCESS_STATE_UPDATED:hh,DAILY_EVENT_ACTIVE_SPEAKER_CHANGE:Rh,DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE:Fh,DAILY_EVENT_APP_MSG:Mh,DAILY_EVENT_CAMERA_ERROR:ah,DAILY_EVENT_CPU_LOAD_CHANGE:Bh,DAILY_EVENT_ERROR:ku,DAILY_EVENT_EXIT_FULLSCREEN:So,DAILY_EVENT_FACE_COUNTS_UPDATED:Uh,DAILY_EVENT_FULLSCREEN:ko,DAILY_EVENT_IFRAME_LAUNCH_CONFIG:th,DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG:eh,DAILY_EVENT_INPUT_SETTINGS_UPDATED:wu,DAILY_EVENT_JOINED_MEETING:lh,DAILY_EVENT_JOINING_MEETING:sh,DAILY_EVENT_LANG_UPDATED:Wh,DAILY_EVENT_LEFT_MEETING:uh,DAILY_EVENT_LIVE_STREAMING_ERROR:Jh,DAILY_EVENT_LIVE_STREAMING_STARTED:$h,DAILY_EVENT_LIVE_STREAMING_STOPPED:Hh,DAILY_EVENT_LIVE_STREAMING_UPDATED:qh,DAILY_EVENT_LOADED:gu,DAILY_EVENT_LOADING:rh,DAILY_EVENT_LOAD_ATTEMPT_FAILED:ih,DAILY_EVENT_LOCAL_SCREEN_SHARE_CANCELED:Dh,DAILY_EVENT_LOCAL_SCREEN_SHARE_STARTED:Nh,DAILY_EVENT_LOCAL_SCREEN_SHARE_STOPPED:jh,DAILY_EVENT_MEETING_SESSION_DATA_ERROR:a_,DAILY_EVENT_MEETING_SESSION_STATE_UPDATED:gh,DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED:mh,DAILY_EVENT_NETWORK_CONNECTION:Vh,DAILY_EVENT_NETWORK_QUALITY_CHANGE:zh,DAILY_EVENT_NONFATAL_ERROR:_u,DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED:ph,DAILY_EVENT_PARTICIPANT_JOINED:ch,DAILY_EVENT_PARTICIPANT_LEFT:fh,DAILY_EVENT_PARTICIPANT_UPDATED:dh,DAILY_EVENT_RECEIVE_SETTINGS_UPDATED:Yh,DAILY_EVENT_RECORDING_DATA:Ah,DAILY_EVENT_RECORDING_ERROR:xh,DAILY_EVENT_RECORDING_STARTED:vu,DAILY_EVENT_RECORDING_STATS:Ch,DAILY_EVENT_RECORDING_STOPPED:yu,DAILY_EVENT_RECORDING_UPLOAD_COMPLETED:Th,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED:Lh,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED:Ih,DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED:Oh,DAILY_EVENT_STARTED_CAMERA:oh,DAILY_EVENT_THEME_UPDATED:nh,DAILY_EVENT_TRACK_STARTED:_h,DAILY_EVENT_TRACK_STOPPED:kh,DAILY_EVENT_TRANSCRIPTION_ERROR:bh,DAILY_EVENT_TRANSCRIPTION_MSG:Ph,DAILY_EVENT_TRANSCRIPTION_STARTED:Sh,DAILY_EVENT_TRANSCRIPTION_STOPPED:Eh,DAILY_EVENT_WAITING_PARTICIPANT_ADDED:vh,DAILY_EVENT_WAITING_PARTICIPANT_REMOVED:wh,DAILY_EVENT_WAITING_PARTICIPANT_UPDATED:yh,DAILY_FATAL_ERROR_CONNECTION:Xp,DAILY_FATAL_ERROR_EJECTED:Hw,DAILY_FATAL_ERROR_EOL:Kp,DAILY_FATAL_ERROR_EXP_ROOM:Yw,DAILY_FATAL_ERROR_EXP_TOKEN:Gw,DAILY_FATAL_ERROR_MEETING_FULL:Qw,DAILY_FATAL_ERROR_NBF_ROOM:Jw,DAILY_FATAL_ERROR_NBF_TOKEN:Ww,DAILY_FATAL_ERROR_NOT_ALLOWED:Zw,DAILY_FATAL_ERROR_NO_ROOM:mu,DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY:qw,DAILY_RECEIVE_SETTINGS_BASE_KEY:Zp,DAILY_STATE_ERROR:nr,DAILY_STATE_JOINED:wr,DAILY_STATE_JOINING:Ya,DAILY_STATE_LEFT:_r,DAILY_STATE_NEW:hu,DAILY_TRACK_STATE_BLOCKED:Rw,DAILY_TRACK_STATE_INTERRUPTED:Bw,DAILY_TRACK_STATE_LOADING:Vw,DAILY_TRACK_STATE_OFF:Fw,DAILY_TRACK_STATE_PLAYABLE:Gp,DAILY_TRACK_STATE_SENDABLE:zw,default:D_},Symbol.toStringTag,{value:"Module"})));var os={exports:{}},Xm;function V_(){if(Xm)return os.exports;Xm=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(N,L,q){return Function.prototype.apply.call(N,L,q)},r;e&&typeof e.ownKeys=="function"?r=e.ownKeys:Object.getOwnPropertySymbols?r=function(N){return Object.getOwnPropertyNames(N).concat(Object.getOwnPropertySymbols(N))}:r=function(N){return Object.getOwnPropertyNames(N)};function o(R){console&&console.warn&&console.warn(R)}var a=Number.isNaN||function(N){return N!==N};function s(){s.init.call(this)}os.exports=s,os.exports.once=M,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function f(R){if(typeof R!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof R)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(R){if(typeof R!="number"||R<0||a(R))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+R+".");u=R}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(N){if(typeof N!="number"||N<0||a(N))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+N+".");return this._maxListeners=N,this};function p(R){return R._maxListeners===void 0?s.defaultMaxListeners:R._maxListeners}s.prototype.getMaxListeners=function(){return p(this)},s.prototype.emit=function(N){for(var L=[],q=1;q0&&(oe=L[0]),oe instanceof Error)throw oe;var se=new Error("Unhandled error."+(oe?" ("+oe.message+")":""));throw se.context=oe,se}var fe=re[N];if(fe===void 0)return!1;if(typeof fe=="function")t(fe,this,L);else for(var ie=fe.length,le=A(fe,ie),q=0;q0&&oe.length>Y&&!oe.warned){oe.warned=!0;var se=new Error("Possible EventEmitter memory leak detected. "+oe.length+" "+String(N)+" listeners added. Use emitter.setMaxListeners() to increase limit");se.name="MaxListenersExceededWarning",se.emitter=R,se.type=N,se.count=oe.length,o(se)}return R}s.prototype.addListener=function(N,L){return m(this,N,L,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(N,L){return m(this,N,L,!0)};function v(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function y(R,N,L){var q={fired:!1,wrapFn:void 0,target:R,type:N,listener:L},Y=v.bind(q);return Y.listener=L,q.wrapFn=Y,Y}s.prototype.once=function(N,L){return f(L),this.on(N,y(this,N,L)),this},s.prototype.prependOnceListener=function(N,L){return f(L),this.prependListener(N,y(this,N,L)),this},s.prototype.removeListener=function(N,L){var q,Y,re,oe,se;if(f(L),Y=this._events,Y===void 0)return this;if(q=Y[N],q===void 0)return this;if(q===L||q.listener===L)--this._eventsCount===0?this._events=Object.create(null):(delete Y[N],Y.removeListener&&this.emit("removeListener",N,q.listener||L));else if(typeof q!="function"){for(re=-1,oe=q.length-1;oe>=0;oe--)if(q[oe]===L||q[oe].listener===L){se=q[oe].listener,re=oe;break}if(re<0)return this;re===0?q.shift():b(q,re),q.length===1&&(Y[N]=q[0]),Y.removeListener!==void 0&&this.emit("removeListener",N,se||L)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(N){var L,q,Y;if(q=this._events,q===void 0)return this;if(q.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):q[N]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete q[N]),this;if(arguments.length===0){var re=Object.keys(q),oe;for(Y=0;Y=0;Y--)this.removeListener(N,L[Y]);return this};function E(R,N,L){var q=R._events;if(q===void 0)return[];var Y=q[N];return Y===void 0?[]:typeof Y=="function"?L?[Y.listener||Y]:[Y]:L?O(Y):A(Y,Y.length)}s.prototype.listeners=function(N){return E(this,N,!0)},s.prototype.rawListeners=function(N){return E(this,N,!1)},s.listenerCount=function(R,N){return typeof R.listenerCount=="function"?R.listenerCount(N):k.call(R,N)},s.prototype.listenerCount=k;function k(R){var N=this._events;if(N!==void 0){var L=N[R];if(typeof L=="function")return 1;if(L!==void 0)return L.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function A(R,N){for(var L=new Array(N),q=0;qfetch(...a);baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"};constructor(a={}){Object.assign(this,a)}setSecurityData=a=>{this.securityData=a};encodeQueryParam(a,s){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof s=="number"?s:`${s}`)}`}addQueryParam(a,s){return this.encodeQueryParam(s,a[s])}addArrayQueryParam(a,s){return a[s].map(f=>this.encodeQueryParam(s,f)).join("&")}toQueryString(a){const s=a||{};return Object.keys(s).filter(f=>typeof s[f]<"u").map(f=>Array.isArray(s[f])?this.addArrayQueryParam(s,f):this.addQueryParam(s,f)).join("&")}addQueryParams(a){const s=this.toQueryString(a);return s?`?${s}`:""}contentFormatters={[e.Json]:a=>a!==null&&(typeof a=="object"||typeof a=="string")?JSON.stringify(a):a,[e.JsonApi]:a=>a!==null&&(typeof a=="object"||typeof a=="string")?JSON.stringify(a):a,[e.Text]:a=>a!==null&&typeof a!="string"?JSON.stringify(a):a,[e.FormData]:a=>Object.keys(a||{}).reduce((s,u)=>{const f=a[u];return s.append(u,f instanceof Blob?f:typeof f=="object"&&f!==null?JSON.stringify(f):`${f}`),s},new FormData),[e.UrlEncoded]:a=>this.toQueryString(a)};mergeRequestParams(a,s){return{...this.baseApiParams,...a,...s||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...s&&s.headers||{}}}}createAbortSignal=a=>{if(this.abortControllers.has(a)){const u=this.abortControllers.get(a);return u?u.signal:void 0}const s=new AbortController;return this.abortControllers.set(a,s),s.signal};abortRequest=a=>{const s=this.abortControllers.get(a);s&&(s.abort(),this.abortControllers.delete(a))};request=async({body:a,secure:s,path:u,type:f,query:p,format:m,baseUrl:v,cancelToken:y,...E})=>{const k=(typeof s=="boolean"?s:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},A=this.mergeRequestParams(E,k),b=p&&this.toQueryString(p),O=this.contentFormatters[f||e.Json],M=m||A.format;return this.customFetch(`${v||this.baseUrl||""}${u}${b?`?${b}`:""}`,{...A,headers:{...A.headers||{},...f&&f!==e.FormData?{"Content-Type":f}:{}},signal:(y?this.createAbortSignal(y):A.signal)||null,body:typeof a>"u"||a===null?null:O(a)}).then(async V=>{const j=V.clone();j.data=null,j.error=null;const R=M?await V[M]().then(N=>(j.ok?j.data=N:j.error=N,j)).catch(N=>(j.error=N,j)):j;if(y&&this.abortControllers.delete(y),!V.ok)throw R;return R})}}ir.HttpClient=t;class r extends t{call={callControllerCreate:(a,s={})=>this.request({path:"/call",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),callControllerFindAll:(a,s={})=>this.request({path:"/call",method:"GET",query:a,secure:!0,format:"json",...s}),callControllerFindOne:(a,s={})=>this.request({path:`/call/${a}`,method:"GET",secure:!0,format:"json",...s}),callControllerUpdate:(a,s,u={})=>this.request({path:`/call/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),callControllerDeleteCallData:(a,s={})=>this.request({path:`/call/${a}`,method:"DELETE",secure:!0,format:"json",...s}),callControllerCreatePhoneCall:(a,s={})=>this.request({path:"/call/phone",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),callControllerCreateWebCall:(a,s={})=>this.request({path:"/call/web",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s})};v2={callControllerExportCalls:(a,s={})=>this.request({path:"/v2/call/export",method:"GET",query:a,secure:!0,...s}),callControllerFindAllPaginated:(a,s={})=>this.request({path:"/v2/call",method:"GET",query:a,secure:!0,format:"json",...s}),callControllerFindAllMetadataPaginated:(a,s={})=>this.request({path:"/v2/call/metadata",method:"GET",query:a,secure:!0,format:"json",...s}),assistantControllerFindAllPaginated:(a,s={})=>this.request({path:"/v2/assistant",method:"GET",query:a,secure:!0,format:"json",...s}),phoneNumberControllerFindAllPaginated:(a,s={})=>this.request({path:"/v2/phone-number",method:"GET",query:a,secure:!0,format:"json",...s})};chat={chatControllerListChats:(a,s={})=>this.request({path:"/chat",method:"GET",query:a,secure:!0,format:"json",...s}),chatControllerCreateChat:(a,s={})=>this.request({path:"/chat",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),chatControllerGetChat:(a,s={})=>this.request({path:`/chat/${a}`,method:"GET",secure:!0,format:"json",...s}),chatControllerDeleteChat:(a,s={})=>this.request({path:`/chat/${a}`,method:"DELETE",secure:!0,format:"json",...s}),chatControllerCreateOpenAiChat:(a,s={})=>this.request({path:"/chat/responses",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),chatControllerCreateWebChat:(a,s={})=>this.request({path:"/chat/web",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),chatControllerCreateOpenAiWebChat:(a,s={})=>this.request({path:"/chat/web/responses",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s})};campaign={campaignControllerCreate:(a,s={})=>this.request({path:"/campaign",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),campaignControllerFindAll:(a,s={})=>this.request({path:"/campaign",method:"GET",query:a,secure:!0,format:"json",...s}),campaignControllerFindAllPaginated:(a,s={})=>this.request({path:"/campaign/paginated",method:"GET",query:a,secure:!0,format:"json",...s}),campaignControllerFindOne:(a,s={})=>this.request({path:`/campaign/${a}`,method:"GET",secure:!0,format:"json",...s}),campaignControllerUpdate:(a,s,u={})=>this.request({path:`/campaign/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),campaignControllerRemove:(a,s={})=>this.request({path:`/campaign/${a}`,method:"DELETE",secure:!0,format:"json",...s})};session={sessionControllerCreate:(a,s={})=>this.request({path:"/session",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),sessionControllerFindAllPaginated:(a,s={})=>this.request({path:"/session",method:"GET",query:a,secure:!0,format:"json",...s}),sessionControllerFindOne:(a,s={})=>this.request({path:`/session/${a}`,method:"GET",secure:!0,format:"json",...s}),sessionControllerUpdate:(a,s,u={})=>this.request({path:`/session/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),sessionControllerRemove:(a,s={})=>this.request({path:`/session/${a}`,method:"DELETE",secure:!0,format:"json",...s})};support={supportControllerCreateTicket:(a,s={})=>this.request({path:"/support/ticket",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s})};assistant={assistantControllerCreate:(a,s={})=>this.request({path:"/assistant",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),assistantControllerFindAll:(a,s={})=>this.request({path:"/assistant",method:"GET",query:a,secure:!0,format:"json",...s}),assistantControllerFindOne:(a,s={})=>this.request({path:`/assistant/${a}`,method:"GET",secure:!0,format:"json",...s}),assistantControllerUpdate:(a,s,u={})=>this.request({path:`/assistant/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),assistantControllerReplace:(a,s,u={})=>this.request({path:`/assistant/${a}`,method:"PUT",body:s,secure:!0,type:e.Json,format:"json",...u}),assistantControllerRemove:(a,s={})=>this.request({path:`/assistant/${a}`,method:"DELETE",secure:!0,format:"json",...s}),assistantControllerFindVersions:(a,s,u={})=>this.request({path:`/assistant/${a}/version`,method:"GET",query:s,secure:!0,format:"json",...u})};phoneNumber={phoneNumberControllerImportTwilio:(a,s={})=>this.request({path:"/phone-number/import/twilio",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),phoneNumberControllerImportVonage:(a,s={})=>this.request({path:"/phone-number/import/vonage",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),phoneNumberControllerCreate:(a,s={})=>this.request({path:"/phone-number",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),phoneNumberControllerFindAll:(a,s={})=>this.request({path:"/phone-number",method:"GET",query:a,secure:!0,format:"json",...s}),phoneNumberControllerFindOne:(a,s={})=>this.request({path:`/phone-number/${a}`,method:"GET",secure:!0,format:"json",...s}),phoneNumberControllerUpdate:(a,s,u={})=>this.request({path:`/phone-number/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),phoneNumberControllerRemove:(a,s={})=>this.request({path:`/phone-number/${a}`,method:"DELETE",secure:!0,format:"json",...s})};tool={toolControllerCreate:(a,s={})=>this.request({path:"/tool",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),toolControllerFindAll:(a,s={})=>this.request({path:"/tool",method:"GET",query:a,secure:!0,format:"json",...s}),toolControllerFindOne:(a,s={})=>this.request({path:`/tool/${a}`,method:"GET",secure:!0,format:"json",...s}),toolControllerUpdate:(a,s,u={})=>this.request({path:`/tool/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),toolControllerRemove:(a,s={})=>this.request({path:`/tool/${a}`,method:"DELETE",secure:!0,format:"json",...s})};file={fileControllerCreateDeprecated:(a,s={})=>this.request({path:"/file/upload",method:"POST",body:a,secure:!0,type:e.FormData,format:"json",...s}),fileControllerCreate:(a,s={})=>this.request({path:"/file",method:"POST",body:a,secure:!0,type:e.FormData,format:"json",...s}),fileControllerFindAll:(a={})=>this.request({path:"/file",method:"GET",secure:!0,format:"json",...a}),fileControllerFindOne:(a,s={})=>this.request({path:`/file/${a}`,method:"GET",secure:!0,format:"json",...s}),fileControllerUpdate:(a,s,u={})=>this.request({path:`/file/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),fileControllerRemove:(a,s={})=>this.request({path:`/file/${a}`,method:"DELETE",secure:!0,format:"json",...s})};knowledgeBase={knowledgeBaseControllerCreate:(a,s={})=>this.request({path:"/knowledge-base",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),knowledgeBaseControllerFindAll:(a,s={})=>this.request({path:"/knowledge-base",method:"GET",query:a,secure:!0,format:"json",...s}),knowledgeBaseControllerFindOne:(a,s={})=>this.request({path:`/knowledge-base/${a}`,method:"GET",secure:!0,format:"json",...s}),knowledgeBaseControllerUpdate:(a,s,u={})=>this.request({path:`/knowledge-base/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),knowledgeBaseControllerRemove:(a,s={})=>this.request({path:`/knowledge-base/${a}`,method:"DELETE",secure:!0,format:"json",...s})};workflow={workflowControllerFindAll:(a={})=>this.request({path:"/workflow",method:"GET",secure:!0,format:"json",...a}),workflowControllerCreate:(a,s={})=>this.request({path:"/workflow",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),workflowControllerFindOne:(a,s={})=>this.request({path:`/workflow/${a}`,method:"GET",secure:!0,format:"json",...s}),workflowControllerDelete:(a,s={})=>this.request({path:`/workflow/${a}`,method:"DELETE",secure:!0,format:"json",...s}),workflowControllerUpdate:(a,s,u={})=>this.request({path:`/workflow/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),workflowControllerGenerateFromTranscripts:(a,s={})=>this.request({path:"/workflow/generate",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s})};squad={squadControllerCreate:(a,s={})=>this.request({path:"/squad",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),squadControllerFindAll:(a,s={})=>this.request({path:"/squad",method:"GET",query:a,secure:!0,format:"json",...s}),squadControllerFindOne:(a,s={})=>this.request({path:`/squad/${a}`,method:"GET",secure:!0,format:"json",...s}),squadControllerUpdate:(a,s,u={})=>this.request({path:`/squad/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),squadControllerRemove:(a,s={})=>this.request({path:`/squad/${a}`,method:"DELETE",secure:!0,format:"json",...s})};testSuite={testSuiteControllerFindAllPaginated:(a,s={})=>this.request({path:"/test-suite",method:"GET",query:a,secure:!0,format:"json",...s}),testSuiteControllerCreate:(a,s={})=>this.request({path:"/test-suite",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),testSuiteControllerFindOne:(a,s={})=>this.request({path:`/test-suite/${a}`,method:"GET",secure:!0,format:"json",...s}),testSuiteControllerUpdate:(a,s,u={})=>this.request({path:`/test-suite/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),testSuiteControllerRemove:(a,s={})=>this.request({path:`/test-suite/${a}`,method:"DELETE",secure:!0,format:"json",...s}),testSuiteTestControllerFindAllPaginated:(a,s,u={})=>this.request({path:`/test-suite/${a}/test`,method:"GET",query:s,secure:!0,format:"json",...u}),testSuiteTestControllerCreate:(a,s,u={})=>this.request({path:`/test-suite/${a}/test`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...u}),testSuiteTestControllerFindOne:(a,s,u={})=>this.request({path:`/test-suite/${a}/test/${s}`,method:"GET",secure:!0,format:"json",...u}),testSuiteTestControllerUpdate:(a,s,u,f={})=>this.request({path:`/test-suite/${a}/test/${s}`,method:"PATCH",body:u,secure:!0,type:e.Json,format:"json",...f}),testSuiteTestControllerRemove:(a,s,u={})=>this.request({path:`/test-suite/${a}/test/${s}`,method:"DELETE",secure:!0,format:"json",...u}),testSuiteRunControllerFindAllPaginated:(a,s,u={})=>this.request({path:`/test-suite/${a}/run`,method:"GET",query:s,secure:!0,format:"json",...u}),testSuiteRunControllerCreate:(a,s,u={})=>this.request({path:`/test-suite/${a}/run`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...u}),testSuiteRunControllerFindOne:(a,s,u={})=>this.request({path:`/test-suite/${a}/run/${s}`,method:"GET",secure:!0,format:"json",...u}),testSuiteRunControllerUpdate:(a,s,u,f={})=>this.request({path:`/test-suite/${a}/run/${s}`,method:"PATCH",body:u,secure:!0,type:e.Json,format:"json",...f}),testSuiteRunControllerRemove:(a,s,u={})=>this.request({path:`/test-suite/${a}/run/${s}`,method:"DELETE",secure:!0,format:"json",...u})};analytics={analyticsControllerQuery:(a,s={})=>this.request({path:"/analytics",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s})};log={loggingControllerCallLogsQuery:(a,s={})=>this.request({path:"/log",method:"GET",query:a,secure:!0,format:"json",...s}),loggingControllerCallLogsDeleteQuery:(a,s={})=>this.request({path:"/log",method:"DELETE",query:a,secure:!0,...s})};logs={loggingControllerLogsQuery:(a,s={})=>this.request({path:"/logs",method:"GET",query:a,secure:!0,format:"json",...s}),loggingControllerLogsDeleteQuery:(a,s={})=>this.request({path:"/logs",method:"DELETE",query:a,secure:!0,...s})};org={orgControllerCreate:(a,s={})=>this.request({path:"/org",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),orgControllerFindAll:(a={})=>this.request({path:"/org",method:"GET",secure:!0,format:"json",...a}),orgControllerFindOne:(a,s={})=>this.request({path:`/org/${a}`,method:"GET",secure:!0,format:"json",...s}),orgControllerUpdate:(a,s,u={})=>this.request({path:`/org/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),orgControllerDeleteOrg:(a,s={})=>this.request({path:`/org/${a}`,method:"DELETE",secure:!0,...s}),orgControllerFindAllUsers:(a,s={})=>this.request({path:`/org/${a}/user`,method:"GET",secure:!0,format:"json",...s}),orgControllerOrgLeave:(a,s={})=>this.request({path:`/org/${a}/leave`,method:"DELETE",secure:!0,...s}),orgControllerOrgRemoveUser:(a,s,u={})=>this.request({path:`/org/${a}/member/${s}/leave`,method:"DELETE",secure:!0,...u}),orgControllerUsersInvite:(a,s,u={})=>this.request({path:`/org/${a}/invite`,method:"POST",body:s,secure:!0,type:e.Json,...u}),orgControllerUserUpdate:(a,s,u={})=>this.request({path:`/org/${a}/role`,method:"PATCH",body:s,secure:!0,type:e.Json,...u}),orgControllerOrgToken:(a,s={})=>this.request({path:`/org/${a}/auth`,method:"GET",secure:!0,format:"json",...s})};token={tokenControllerCreate:(a,s={})=>this.request({path:"/token",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),tokenControllerFindAll:(a,s={})=>this.request({path:"/token",method:"GET",query:a,secure:!0,format:"json",...s}),tokenControllerFindOne:(a,s={})=>this.request({path:`/token/${a}`,method:"GET",secure:!0,format:"json",...s}),tokenControllerUpdate:(a,s,u={})=>this.request({path:`/token/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),tokenControllerRemove:(a,s={})=>this.request({path:`/token/${a}`,method:"DELETE",secure:!0,format:"json",...s})};credential={credentialControllerCreate:(a,s={})=>this.request({path:"/credential",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),credentialControllerFindAll:(a,s={})=>this.request({path:"/credential",method:"GET",query:a,secure:!0,format:"json",...s}),credentialControllerFindOne:(a,s={})=>this.request({path:`/credential/${a}`,method:"GET",secure:!0,format:"json",...s}),credentialControllerUpdate:(a,s,u={})=>this.request({path:`/credential/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),credentialControllerRemove:(a,s={})=>this.request({path:`/credential/${a}`,method:"DELETE",secure:!0,format:"json",...s}),credentialControllerGenerateSession:(a,s={})=>this.request({path:"/credential/session",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),credentialControllerHandleWebhook:(a,s={})=>this.request({path:"/credential/webhook",method:"POST",body:a,type:e.Json,...s}),credentialControllerCredentialActionTrigger:(a,s={})=>this.request({path:"/credential/trigger",method:"POST",body:a,secure:!0,type:e.Json,...s})};template={templateControllerCreate:(a,s={})=>this.request({path:"/template",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),templateControllerFindAll:(a,s={})=>this.request({path:"/template",method:"GET",query:a,secure:!0,format:"json",...s}),templateControllerFindAllPinned:(a={})=>this.request({path:"/template/pinned",method:"GET",secure:!0,format:"json",...a}),templateControllerFindOne:(a,s={})=>this.request({path:`/template/${a}`,method:"GET",secure:!0,format:"json",...s}),templateControllerUpdate:(a,s,u={})=>this.request({path:`/template/${a}`,method:"PATCH",body:s,secure:!0,type:e.Json,format:"json",...u}),templateControllerRemove:(a,s={})=>this.request({path:`/template/${a}`,method:"DELETE",secure:!0,format:"json",...s})};voiceLibrary={voiceLibraryControllerVoiceGetByProvider:(a,s,u={})=>this.request({path:`/voice-library/${a}`,method:"GET",query:s,secure:!0,format:"json",...u}),voiceLibraryControllerVoiceGetAccentsByProvider:(a,s={})=>this.request({path:`/voice-library/${a}/accents`,method:"GET",secure:!0,format:"json",...s}),voiceLibraryControllerVoiceLibrarySyncByProvider:(a,s={})=>this.request({path:`/voice-library/sync/${a}`,method:"POST",secure:!0,format:"json",...s}),voiceLibraryControllerVoiceLibrarySyncDefaultVoices:(a,s={})=>this.request({path:"/voice-library/sync",method:"POST",body:a,secure:!0,type:e.Json,format:"json",...s}),voiceLibraryControllerVoiceLibraryCreateSesameVoice:(a,s={})=>this.request({path:"/voice-library/create-sesame-voice",method:"POST",body:a,secure:!0,type:e.Json,...s})};provider={providerControllerGetWorkflows:(a,s,u={})=>this.request({path:`/${a}/workflows`,method:"GET",query:s,secure:!0,format:"json",...u}),providerControllerGetWorkflowTriggerHook:(a,s,u={})=>this.request({path:`/${a}/workflows/${s}/hooks`,method:"GET",secure:!0,format:"json",...u}),providerControllerGetLocations:(a,s={})=>this.request({path:`/${a}/locations`,method:"GET",secure:!0,format:"json",...s}),voiceProviderControllerSearchVoices:(a,s,u={})=>this.request({path:`/${a}/voices/search`,method:"GET",query:s,secure:!0,format:"json",...u}),voiceProviderControllerSearchVoice:(a,s,u={})=>this.request({path:`/${a}/voice/search`,method:"GET",query:s,secure:!0,format:"json",...u}),voiceProviderControllerAddVoices:(a,s,u={})=>this.request({path:`/${a}/voices/add`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...u}),voiceProviderControllerAddVoice:(a,s,u={})=>this.request({path:`/${a}/voice/add`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...u})};v11Labs={voiceProviderControllerCloneVoices:(a,s={})=>this.request({path:"/11labs/voice/clone",method:"POST",body:a,secure:!0,type:e.FormData,...s})}}return ir.Api=r,ir}var tg;function U_(){if(tg)return To;tg=1,Object.defineProperty(To,"__esModule",{value:!0}),To.client=void 0;const e=B_(),t=new e.Api({baseUrl:"https://api.vapi.ai",baseApiParams:{secure:!0},securityWorker:async r=>{if(r)return{headers:{Authorization:`Bearer ${r}`}}}});return To.client=t,To}var ng;function $_(){if(ng)return Ei;ng=1;var e=Ei&&Ei.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(Ei,"__esModule",{value:!0});const t=e(z_),r=e(V_()),o=U_();async function a(v,y){v.muted=!1,v.autoplay=!0,y!=null&&(v.srcObject=new MediaStream([y]),await v.play())}async function s(v,y){const E=document.createElement("audio");return E.dataset.participantId=y,document.body.appendChild(E),await a(E,v),E}function u(v){document.querySelector(`audio[data-participant-id="${v}"]`)?.remove()}function f(v,y,E,k){v.participant.local||y.updateParticipant(v.participant.session_id,{setSubscribedTracks:{audio:!0,video:E||k}})}class p extends r.default{on(y,E){return super.on(y,E),this}once(y,E){return super.once(y,E),this}emit(y,...E){return super.emit(y,...E)}removeListener(y,E){return super.removeListener(y,E),this}removeAllListeners(y){return super.removeAllListeners(y),this}}class m extends p{started=!1;call=null;speakingTimeout=null;dailyCallConfig={};dailyCallObject={};hasEmittedCallEndedStatus=!1;constructor(y,E,k,A){super(),o.client.baseUrl=E??"https://api.vapi.ai",o.client.setSecurityData(y),this.dailyCallConfig=k??{},this.dailyCallObject=A??{}}cleanup(){this.started=!1,this.hasEmittedCallEndedStatus=!1,this.call?.destroy(),this.call=null,this.speakingTimeout=null}isMobileDevice(){if(typeof navigator>"u")return!1;const y=navigator.userAgent;return/android|iphone|ipad|ipod|iemobile|blackberry|bada/i.test(y.toLowerCase())}async sleep(y){return new Promise(E=>setTimeout(E,y))}async start(y,E,k,A,b){if(!y&&!k&&!A)throw new Error("Assistant or Squad or Workflow must be provided.");if(this.started)return null;this.started=!0;try{const O=(await o.client.call.callControllerCreateWebCall({assistant:typeof y=="string"?void 0:y,assistantId:typeof y=="string"?y:void 0,assistantOverrides:E,squad:typeof k=="string"?void 0:k,squadId:typeof k=="string"?k:void 0,workflow:typeof A=="string"?void 0:A,workflowId:typeof A=="string"?A:void 0,workflowOverrides:b})).data;this.call&&this.cleanup();const M=O?.artifactPlan?.videoRecordingEnabled??!1,V=O?.assistant?.voice?.provider==="tavus";if(this.call=t.default.createCallObject({audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??M,dailyConfig:this.dailyCallConfig}),this.call.iframe()?.style.setProperty("display","none"),this.call.on("left-meeting",()=>{this.emit("call-end"),this.hasEmittedCallEndedStatus||(this.emit("message",{type:"status-update",status:"ended",endedReason:"customer-ended-call"}),this.hasEmittedCallEndedStatus=!0),M&&this.call?.stopRecording(),this.cleanup()}),this.call.on("error",j=>{this.emit("error",j),M&&this.call?.stopRecording()}),this.call.on("camera-error",j=>{this.emit("error",j)}),this.call.on("track-started",async j=>{!j||!j.participant||j.participant?.local||j.participant?.user_name==="Vapi Speaker"&&(j.track.kind==="video"&&this.emit("video",j.track),j.track.kind==="audio"&&await s(j.track,j.participant.session_id),this.call?.sendAppMessage("playable"))}),this.call.on("participant-joined",j=>{!j||!this.call||f(j,this.call,M,V)}),this.call.on("participant-updated",j=>{j&&this.emit("daily-participant-updated",j.participant)}),this.call.on("participant-left",j=>{j&&u(j.participant.session_id)}),this.isMobileDevice()&&await this.sleep(1e3),await this.call.join({url:O.webCallUrl,subscribeToTracksAutomatically:!1}),M){const j=new Date().getTime();this.call.startRecording({width:1280,height:720,backgroundColor:"#FF1F2D3D",layout:{preset:"default"}}),this.call.on("recording-started",()=>{this.send({type:"control",control:"say-first-message",videoRecordingStartDelaySeconds:(new Date().getTime()-j)/1e3})})}return this.call.startRemoteParticipantsAudioLevelObserver(100),this.call.on("remote-participants-audio-level",j=>{j&&this.handleRemoteParticipantsAudioLevel(j)}),this.call.on("app-message",j=>this.onAppMessage(j)),this.call.on("nonfatal-error",j=>{j?.type==="audio-processor-error"&&this.call?.updateInputSettings({audio:{processor:{type:"none"}}}).then(()=>{this.call?.setLocalAudio(!0)})}),this.call.updateInputSettings({audio:{processor:{type:"noise-cancellation"}}}),O}catch(O){return console.error(O),this.emit("error",O),this.cleanup(),null}}onAppMessage(y){if(y)try{if(y.data==="listening")return this.emit("call-start");try{const E=JSON.parse(y.data);this.emit("message",E),E&&"type"in E&&"status"in E&&E.type==="status-update"&&E.status==="ended"&&(this.hasEmittedCallEndedStatus=!0)}catch(E){console.log("Error parsing message data: ",E)}}catch(E){console.error(E)}}handleRemoteParticipantsAudioLevel(y){const E=Object.values(y.participantsAudioLevel).reduce((A,b)=>A+b,0);this.emit("volume-level",Math.min(1,E/.15)),E>.01&&(this.speakingTimeout?(clearTimeout(this.speakingTimeout),this.speakingTimeout=null):this.emit("speech-start"),this.speakingTimeout=setTimeout(()=>{this.emit("speech-end"),this.speakingTimeout=null},1e3))}stop(){this.started=!1,this.call?.destroy(),this.call=null}send(y){this.call?.sendAppMessage(JSON.stringify(y))}setMuted(y){if(!this.call)throw new Error("Call object is not available.");this.call.setLocalAudio(!y)}isMuted(){return this.call?this.call.localAudio()===!1:!1}say(y,E,k,A){this.send({type:"say",message:y,endCallAfterSpoken:E,interruptionsEnabled:k??!1,interruptAssistantEnabled:A??!1})}setInputDevicesAsync(y){this.call?.setInputDevicesAsync(y)}async increaseMicLevel(y){if(!this.call)throw new Error("Call object is not available.");try{const E=await navigator.mediaDevices.getUserMedia({audio:!0}),k=new AudioContext,A=k.createMediaStreamSource(E),b=k.createGain();b.gain.value=y,A.connect(b);const O=k.createMediaStreamDestination();b.connect(O);const[M]=O.stream.getAudioTracks();await this.call.setInputDevicesAsync({audioSource:M})}catch(E){console.error("Error adjusting microphone level:",E)}}setOutputDeviceAsync(y){this.call?.setOutputDeviceAsync(y)}getDailyCallObject(){return this.call}startScreenSharing(y,E){this.call?.startScreenShare({displayMediaOptions:y,screenVideoSendSettings:E})}stopScreenSharing(){this.call?.stopScreenShare()}}return Ei.default=m,Ei}var q_=$_();const H_=hr(q_),J_=({publicKey:e,callOptions:t,apiUrl:r,enabled:o=!0,onCallStart:a,onCallEnd:s,onMessage:u,onError:f,onTranscript:p})=>{const[m]=F.useState(()=>e?new H_(e,r):null),[v,y]=F.useState(!1),[E,k]=F.useState(!1),[A,b]=F.useState(!1),[O,M]=F.useState(0),[V,j]=F.useState("disconnected"),R=F.useRef({onCallStart:a,onCallEnd:s,onMessage:u,onError:f,onTranscript:p});F.useEffect(()=>{R.current={onCallStart:a,onCallEnd:s,onMessage:u,onError:f,onTranscript:p}}),F.useEffect(()=>{if(!m)return;const re=()=>{y(!0),j("connected"),R.current.onCallStart?.()},oe=()=>{y(!1),j("disconnected"),M(0),k(!1),b(!1),R.current.onCallEnd?.()},se=()=>{k(!0)},fe=()=>{k(!1)},ie=Se=>{M(Se)},le=Se=>{Se.type==="transcript"&&Se.transcriptType==="final"&&(Se.role==="user"||Se.role==="assistant")&&R.current.onTranscript?.({role:Se.role,text:Se.transcript,timestamp:new Date}),R.current.onMessage?.(Se)},he=Se=>{console.error("Vapi error:",Se),j("disconnected"),y(!1),k(!1),R.current.onError?.(Se)};return m.on("call-start",re),m.on("call-end",oe),m.on("speech-start",se),m.on("speech-end",fe),m.on("volume-level",ie),m.on("message",le),m.on("error",he),()=>{m.removeListener("call-start",re),m.removeListener("call-end",oe),m.removeListener("speech-start",se),m.removeListener("speech-end",fe),m.removeListener("volume-level",ie),m.removeListener("message",le),m.removeListener("error",he)}},[m]),F.useEffect(()=>()=>{m&&m.stop()},[m]);const N=F.useCallback(async()=>{if(!m||!o){console.error("Cannot start call: no vapi instance or not enabled");return}try{console.log("Starting call with options:",t),j("connecting"),await m.start(t)}catch(re){console.error("Error starting call:",re),j("disconnected"),R.current.onError?.(re)}},[m,t,o]),L=F.useCallback(async()=>{if(!m){console.log("Cannot end call: no vapi instance");return}console.log("Ending call"),m.stop()},[m]),q=F.useCallback(async()=>{v?await L():await N()},[v,N,L]),Y=F.useCallback(()=>{if(!m||!v){console.log("Cannot toggle mute: no vapi instance or call not active");return}const re=!A;m.setMuted(re),b(re)},[m,v,A]);return{isCallActive:v,isSpeaking:E,volumeLevel:O,connectionStatus:V,isMuted:A,startCall:N,endCall:L,toggleCall:q,toggleMute:Y}};async function W_(e,t){const r=e.getReader();let o;for(;!(o=await r.read()).done;)t(o.value)}function Y_(e){let t,r,o,a=!1;return function(u){t===void 0?(t=u,r=0,o=-1):t=Q_(t,u);const f=t.length;let p=0;for(;r0){const p=a.decode(u.subarray(0,f)),m=f+(u[f+1]===32?2:1),v=a.decode(u.subarray(m));switch(p){case"data":o.data=o.data?o.data+` `+v:v;break;case"event":o.event=v;break;case"id":e(o.id=v);break;case"retry":const y=parseInt(v,10);isNaN(y)||t(o.retry=y);break}}}}function Q_(e,t){const r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function rg(){return{data:"",event:"",id:"",retry:void 0}}var Z_=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a{const k=Object.assign({},o);k.accept||(k.accept=Bu);let A;function b(){A.abort(),document.hidden||N()}p||document.addEventListener("visibilitychange",b);let O=K_,M=0;function V(){document.removeEventListener("visibilitychange",b),window.clearTimeout(M),A.abort()}r?.addEventListener("abort",()=>{V(),y()});const j=m??window.fetch,R=a??ek;async function N(){var L;A=new AbortController;try{const q=await j(e,Object.assign(Object.assign({},v),{headers:k,signal:A.signal}));await R(q),await W_(q.body,Y_(G_(Y=>{Y?k[ig]=Y:delete k[ig]},Y=>{O=Y},s))),u?.(),V(),y()}catch(q){if(!A.signal.aborted)try{const Y=(L=f?.(q))!==null&&L!==void 0?L:O;window.clearTimeout(M),M=window.setTimeout(N,Y)}catch(Y){V(),E(Y)}}}N()})}function ek(e){const t=e.headers.get("content-type");if(!t?.startsWith(Bu))throw new Error(`Expected content-type to be ${Bu}, Actual: ${t}`)}class tk extends Error{}class og extends Error{}class nk{apiUrl;publicKey;abortController=null;constructor(t){this.publicKey=t.publicKey,this.apiUrl=t.apiUrl||"https://api.vapi.ai"}async streamChat(t,r,o,a){this.abort(),this.abortController=new AbortController;try{await X_(`${this.apiUrl}/chat/web`,{method:"POST",headers:{Authorization:`Bearer ${this.publicKey}`,"Content-Type":"application/json","X-Client-ID":"vapi-widget"},body:JSON.stringify({...t,stream:!0}),signal:this.abortController.signal,async onopen(s){if(!(s.ok&&s.headers.get("content-type")?.includes("text/event-stream")))throw s.status>=400&&s.status<500&&s.status!==429?new og(`HTTP error! status: ${s.status}`):new tk(`HTTP error! status: ${s.status}`)},onmessage(s){if(s.data!=="[DONE]")try{const u=JSON.parse(s.data);(u.delta!==void 0||u.output!==void 0||u.path!==void 0)&&r(u)}catch{console.warn(`Failed to parse SSE data: ${s.data}`)}},onclose(){a?.()},onerror(s){if(s instanceof og)throw o?.(s),s;if(s instanceof Error&&s.name==="AbortError")throw a?.(),s;console.warn("Retriable error occurred, retrying...",s)}})}catch(s){s instanceof Error&&s.name!=="AbortError"&&o?.(s)}return()=>this.abort()}abort(){this.abortController&&(this.abortController.abort(),this.abortController=null)}}function rk(e){return e.delta&&e.path==="chat.output[0].content"?e.delta:e.output!==void 0?e.output:null}const ik=(e,t,r,o,a)=>{if(!t||!e.trim())throw new Error("Chat is disabled or message is empty");if(!r||!o)throw new Error("Missing required configuration: publicKey and assistantId");if(!a)throw new Error("Chat client not initialized")},ok=e=>({role:"user",content:e.trim(),timestamp:new Date}),ak=e=>({role:"assistant",content:e,timestamp:new Date}),ag=(e,t)=>{e.current="",t.current=null},sk=(e,t)=>{t(r=>{const o=[...r];return e.current=o.length,o.push({role:"assistant",content:"",timestamp:new Date}),o})},lk=(e,t,r,o)=>{console.error("Stream error:",e),t(!1),r.current=null,o?.(e)},uk=(e,t,r,o,a,s)=>{e.sessionId&&e.sessionId!==t&&r(e.sessionId);const u=rk(e);if(u&&(o.current+=u,a.current!==null)){const f=a.current;s(p=>{const m=[...p];return f{if(e(!1),t.current=null,r.current){const a=ak(r.current);o?.(a)}},dk=({enabled:e=!0,publicKey:t,assistantId:r,assistantOverrides:o,apiUrl:a,sessionId:s,firstChatMessage:u,onMessage:f,onError:p})=>{const[m,v]=F.useState(()=>e&&u?[{role:"assistant",content:u,timestamp:new Date}]:[]),[y,E]=F.useState(!1),[k,A]=F.useState(!1),[b,O]=F.useState(s),M=F.useRef(null),V=F.useRef(null),j=F.useRef(""),R=F.useRef(null);F.useEffect(()=>(t&&e&&(M.current=new nk({publicKey:t,apiUrl:a})),()=>{V.current?.()}),[t,a,e]),F.useEffect(()=>{s&&O(s)},[s]);const N=F.useCallback(Y=>{v(re=>[...re,Y]),f?.(Y)},[f]),L=F.useCallback(async Y=>{try{ik(Y,e,t,r,M.current),A(!0);const re=ok(Y);N(re),ag(j,R),sk(R,v),E(!0);const oe=he=>lk(he,E,R,p),se=he=>uk(he,b,O,j,R,v),fe=()=>ck(E,R,j,f);let ie;u&&u.trim()!==""&&m.length===1&&m[0].role==="assistant"?ie=[{role:"assistant",content:u},{role:"user",content:Y.trim()}]:ie=Y.trim();const le=await M.current.streamChat({input:ie,assistantId:r,assistantOverrides:o,sessionId:b,stream:!0},se,oe,fe);V.current=le}catch(re){throw console.error("Error sending message:",re),E(!1),R.current=null,p?.(re),re}finally{A(!1)}},[e,t,r,o,b,N,p,f,u,m]),q=F.useCallback(()=>{v(e&&u?[{role:"assistant",content:u,timestamp:new Date}]:[]),V.current?.(),E(!1),A(!1),ag(j,R),O(void 0)},[e,u]);return{messages:m,isTyping:y,isLoading:k,sessionId:b,isEnabled:e,sendMessage:L,clearMessages:q}},fk=({mode:e,publicKey:t,assistantId:r,assistant:o,assistantOverrides:a,apiUrl:s,firstChatMessage:u,onCallStart:f,onCallEnd:p,onMessage:m,onError:v})=>{const[y,E]=F.useState(null),[k,A]=F.useState(!1),[b,O]=F.useState([]),M=()=>{if(o)return o;if(r)return a?{assistantId:r,assistantOverrides:a}:r},V=e==="voice"||e==="hybrid",j=J_({publicKey:t,callOptions:M(),apiUrl:s,enabled:V,onCallStart:()=>{e==="hybrid"&&(N.clearMessages(),O([])),E("voice"),A(!1),f?.()},onCallEnd:()=>{E(null),p?.()},onMessage:m,onError:v,onTranscript:ie=>{const le={role:ie.role,content:ie.text,timestamp:ie.timestamp};O(he=>[...he,le])}}),R=e==="chat"||e==="hybrid",N=dk({enabled:R,publicKey:R?t:void 0,assistantId:R?r:void 0,assistantOverrides:R?a:void 0,apiUrl:s,onMessage:m,onError:v,firstChatMessage:u}),L=e==="voice"?b:e==="chat"?N.messages:[...b,...N.messages].sort((ie,le)=>ie.timestamp.getTime()-le.timestamp.getTime()),q=F.useCallback(ie=>{A(ie.length>0)},[]),Y=F.useCallback(async ie=>{e==="hybrid"&&(j.isCallActive&&await j.endCall(),y!=="chat"&&(O([]),N.clearMessages()),E("chat")),await N.sendMessage(ie)},[e,N,j,y]),re=F.useCallback(async()=>{e==="hybrid"&&!j.isCallActive&&(N.clearMessages(),O([]),E("voice"),A(!1)),await j.toggleCall()},[e,j,N]),oe=F.useCallback(()=>{O([]),N.clearMessages(),E(null),A(!1)},[N]),se=V&&!j.isCallActive&&!N.isLoading,fe=R&&!N.isLoading;return{mode:e,activeMode:y,conversation:L,voice:{...j,isAvailable:se,toggleCall:re},chat:{...N,isAvailable:fe,sendMessage:Y,handleInput:q},clearConversation:oe,isUserTyping:k}},sg={tiny:{button:{width:"3rem",height:"3rem"},expanded:{width:"18rem",height:"20rem"},icon:{width:"1.25rem",height:"1.25rem"}},compact:{button:{paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.75rem",paddingBottom:"0.75rem",height:"3rem"},expanded:{width:"24rem",height:"32rem"},icon:{width:"1.25rem",height:"1.25rem"}},full:{button:{paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"1rem",paddingBottom:"1rem",height:"3.5rem"},expanded:{width:"28rem",height:"40rem"},icon:{width:"1.5rem",height:"1.5rem"}}},pk={none:{borderRadius:"0"},small:{borderRadius:"0.5rem"},medium:{borderRadius:"1rem"},large:{borderRadius:"1.5rem"}},hk={none:{borderRadius:"0"},small:{borderRadius:"0.5rem"},medium:{borderRadius:"1rem"},large:{borderRadius:"1.5rem"}},mk={none:"rounded-none",small:"rounded-md",medium:"rounded-lg",large:"rounded-xl"},gk={"bottom-right":{bottom:"1.5rem",right:"1.5rem"},"bottom-left":{bottom:"1.5rem",left:"1.5rem"},"top-right":{top:"1.5rem",right:"1.5rem"},"top-left":{top:"1.5rem",left:"1.5rem"},"bottom-center":{bottom:"1.5rem",left:"50%",transform:"translateX(-50%)"}},Uu={none:{borderRadius:"0"},small:{borderRadius:"0.5rem"},medium:{borderRadius:"1rem"},large:{borderRadius:"1.5rem"}},vk=({consentTitle:e="Terms and conditions",consentContent:t,onAccept:r,onCancel:o,colors:a,styles:s,radius:u})=>{const f=s.theme==="dark",p=f?"#1F2937":"#E5E7EB",m=f?"#FFFFFF":"#111827",v=f?"#D1D5DB":"#4B5563",y={...Uu[u],backgroundColor:a.baseColor,border:`1px solid ${p}`,boxShadow:f?"0 25px 50px -12px rgba(0, 0, 0, 0.5)":"0 25px 50px -12px rgb(0 0 0 / 0.25)",padding:"1rem",maxWidth:"360px",minWidth:"300px"},E={color:m,fontSize:"1rem",fontWeight:"600",marginBottom:"0.75rem",margin:"0 0 0.75rem 0"},k={color:v,fontSize:"0.75rem",lineHeight:"1.5",marginBottom:"1rem",maxHeight:"120px",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:f?"#4B5563 transparent":"#CBD5E1 transparent"},A={display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"0.5rem"},b={...Uu[u],backgroundColor:"transparent",border:f?"none":"1px solid #D1D5DB",color:f?"#9CA3AF":"#4B5563",padding:"0.5rem 1rem",fontSize:"0.75rem",fontWeight:"500",cursor:"pointer",transition:"all 0.2s ease-in-out"},O={...Uu[u],backgroundColor:f?a.ctaButtonTextColor||"#FFFFFF":a.ctaButtonColor||"#000000",color:f?a.ctaButtonColor||"#000000":a.ctaButtonTextColor||"#FFFFFF",border:"none",padding:"0.5rem 1rem",fontSize:"0.75rem",fontWeight:"500",cursor:"pointer",transition:"all 0.2s ease-in-out"};return Z.jsxs("div",{style:y,children:[Z.jsx("style",{children:` /* Custom scrollbar styles for webkit browsers */ .consent-terms-content::-webkit-scrollbar { width: 6px; } .consent-terms-content::-webkit-scrollbar-track { background: transparent; } .consent-terms-content::-webkit-scrollbar-thumb { background: ${f?"#4B5563":"#CBD5E1"}; border-radius: 3px; } .consent-terms-content::-webkit-scrollbar-thumb:hover { background: ${f?"#6B7280":"#94A3B8"}; } .consent-cancel-button:hover { background-color: ${f?"#1F2937":"#F9FAFB"} !important; ${f?"":"border-color: #9CA3AF !important;"} } .consent-accept-button:hover { opacity: 0.9; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); } `}),Z.jsx("h3",{style:E,children:e}),Z.jsx("div",{className:"consent-terms-content",style:k,dangerouslySetInnerHTML:{__html:t}}),Z.jsxs("div",{style:A,children:[Z.jsx("button",{className:"consent-cancel-button",onClick:o,style:b,children:"Cancel"}),Z.jsx("button",{className:"consent-accept-button",onClick:r,style:O,children:"Accept"})]})]})},as=({size:e=40,connectionStatus:t,isCallActive:r,isSpeaking:o,isTyping:a,isError:s,volumeLevel:u=0,baseColor:f="#9CA3AF",animationType:p,animationSpeed:m,colors:v,barCount:y=17,barWidthRatio:E=.08,barHeightRatio:k=.19,className:A=""})=>{const[b,O]=F.useState(0),M=r,V=M?5:y,R=s?{animationType:"pulse",colors:"#EF4444",animationSpeed:300}:t==="connecting"?{animationType:"spin",colors:"#FCD34D",animationSpeed:1e3}:r&&o?{animationType:"scale",colors:"#F87171",animationSpeed:600}:r?{animationType:"none",colors:"#62F6B5",animationSpeed:1e3}:a?{animationType:"sequential",colors:"#60A5FA",animationSpeed:1e3}:{animationType:"none",colors:f,animationSpeed:3e3},N=p??R.animationType,L=m??R.animationSpeed,q=v??R.colors;F.useEffect(()=>{if(N!=="none"){const K=Date.now();let de;const x=()=>{O((Date.now()-K)/L),de=requestAnimationFrame(x)};return de=requestAnimationFrame(x),()=>cancelAnimationFrame(de)}},[N,L]);const Y=M?24:253,oe=(()=>{const K=Y/2,de=Y/2,x=Y*.38;return Array.from({length:V},(I,J)=>{const d=J/V*2*Math.PI-Math.PI/2,_=K+x*Math.cos(d),w=de+x*Math.sin(d),C=d*180/Math.PI+90;return{x:_,y:w,rotate:C}})})(),se=()=>{const de=[.5,.75,1,.75,.5];return Array.from({length:5},(x,I)=>{const _=de[I];return{x:1+I*4.8,y:6,width:2.8,baseHeight:16*_,maxHeight:22,delay:I===2?0:Math.abs(I-2)*.2,rotate:0}})},fe=K=>Array.isArray(q)?q[K%q.length]:q,ie=(K,de)=>{const x=b%1;switch(N){case"rotate-fade":{const I=V,J=x*I%I,_=Math.min(Math.abs(K-J),Math.abs(K-J+I),Math.abs(K-J-I))/(I/2);return{opacity:Math.max(.14,1-_*.86),transform:""}}case"scale":{if(M&&"delay"in de){const I=de,J=Math.max(0,Math.min(1,u)),d=[{sensitivity:.8,frequency:1.2,baseActivity:.3},{sensitivity:1,frequency:1.8,baseActivity:.4},{sensitivity:1.2,frequency:2.5,baseActivity:.5},{sensitivity:1,frequency:2,baseActivity:.4},{sensitivity:.9,frequency:1.5,baseActivity:.35}],_=d[K]||d[2],C=b%1*_.frequency%1,T=Math.sin(C*2*Math.PI)*.3+Math.sin(C*6*Math.PI)*.2+Math.sin(C*12*Math.PI)*.1,B=J*_.sensitivity,W=Math.max(0,Math.min(1,_.baseActivity+B*.6+T*J*.4)),Q=.7+W*1.1,pe=I.baseHeight*Q,Ce=12-pe/2;return{opacity:.4+W*.6,height:pe,y:Ce,transform:""}}if(!M){const I=Math.max(0,Math.min(1,u)),J=b%1,d=K/V*2*Math.PI,_=Math.sin(J*4*Math.PI+d)*.3+Math.sin(J*8*Math.PI+d*2)*.2+Math.sin(J*16*Math.PI+d*3)*.1,w=.7+.3*Math.sin(d+Math.PI/4),C=Math.max(0,Math.min(1,.3+I*w*.5+_*I*.2));return{opacity:.4+C*.6,transform:C>.5?`scale(${1+(C-.5)*.4})`:""}}return{opacity:1,transform:""}}case"spin":{const I=x*2*Math.PI%(2*Math.PI),J=K/V*2*Math.PI;return{opacity:.3+.7*(1-Math.abs((I-J+Math.PI)%(2*Math.PI)-Math.PI)/Math.PI),transform:""}}case"pulse":return{opacity:.5+.5*Math.sin(x*2*Math.PI),transform:""};case"sequential":{const I=Math.floor(x*V)%V;return{opacity:K===I||K===(I+1)%V?1:.3,transform:""}}case"wave":{const I=x*2*Math.PI,J=K/V*2*Math.PI;return{opacity:.5+.5*Math.sin(I+J),transform:""}}default:return{opacity:1,transform:""}}},le=M?2.8:Y*E,he=M?12:Y*k,Se=le/2,Me=M?se():oe;return Z.jsx("div",{className:`relative ${A}`,style:{width:e,height:e},children:Z.jsxs("svg",{width:e,height:e,viewBox:`0 0 ${Y} ${M?24:Y+1}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[!M&&Z.jsx("circle",{cx:Y/2,cy:Y/2,r:Y*.38,fill:"none",stroke:f,strokeWidth:"1",opacity:"0.05"}),Me.map((K,de)=>{const x=N!=="none",I=x?ie(de,K):{opacity:1},J=x?fe(de):q===f?f:fe(de);if(M&&"width"in K){const d=K,_=I.y!==void 0?I.y:12-d.baseHeight/2;return Z.jsx("rect",{x:d.x,y:_,width:d.width,height:I.height!==void 0?I.height:d.baseHeight,fill:J,opacity:I.opacity,rx:d.width/2},de)}else{const d=K;let _=he;if(N==="rotate-fade"){const T=V,B=b%1*T,Q=Math.min(Math.abs(de-B),Math.abs(de-B+T),Math.abs(de-B-T))/(T/2),pe=.4+.6*(1-Q),Ce=Math.sin(Q*Math.PI)*.2;_=he*(pe+Ce)}else{const B=.7+.3*(1-Math.min(de,V-de)/(V/2));_=he*B}const w=d.x-le/2,C=d.y-_/2;return Z.jsx("rect",{x:w,y:C,width:le,height:_,rx:Se,fill:J,opacity:I.opacity,transform:d.rotate!==0?`rotate(${d.rotate} ${d.x} ${d.y})`:void 0,style:{transition:N==="sequential"?"opacity 0.1s ease-in-out":void 0}},de)}})]})})},lg=({size:e=16,color:t="#2D303D",backgroundColor:r="#FFFFFF",className:o=""})=>Z.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",width:e,height:e,viewBox:"0 0 16 16",className:o,children:[Z.jsx("defs",{children:Z.jsx("clipPath",{id:`master_svg0_agent_icon_${e}`,children:Z.jsx("rect",{x:"0",y:"0",width:"16",height:"16",rx:"0"})})}),Z.jsxs("g",{clipPath:`url(#master_svg0_agent_icon_${e})`,children:[Z.jsx("rect",{x:"0",y:"0",width:"16",height:"16",rx:"0",fill:r,fillOpacity:"1"}),Z.jsx("g",{children:Z.jsx("path",{d:"M8.0000605119812,0.4443359375C4.712874911981201,0.4443359375,2.021052311981201,2.9933877375,1.7934282119812013,6.2226562375L1.4900019119812011,6.2226562375C0.9984684019812011,6.2226562375,0.6000018119812012,6.6211233375,0.6000018119812012,7.1126566375L0.6000018119812012,9.2361164375C0.6000018119812012,10.7628059375,1.8376292119812012,12.0004339375,3.364319811981201,12.0004339375C3.8012183119812013,12.0004339375,4.155394811981202,11.6462579375,4.155394811981202,11.2093579375L4.155394811981202,9.7111110375L5.933951811981201,9.7111110375L6.642694911981201,10.5970399375C6.678404311981201,10.6416769375,6.720309211981201,10.6809819375,6.7671385119812015,10.7137619375C7.038608111981201,10.9037909375,7.412726411981201,10.8377699375,7.602755111981201,10.5662999375L8.698806311981201,9.0005121375L9.0871396119812,9.4859285375C9.2010026119812,9.6282577375,9.3733897119812,9.7111110375,9.5556607119812,9.7111110375L11.8400028119812,9.7111110375L11.8400028119812,11.2095789375C11.8400028119812,11.5772799375,12.090941811981201,11.8863709375,12.430910811981201,11.9749369375Q12.397504811981202,12.0501919375,12.361336811981202,12.1227459375Q11.9623638119812,12.9231089375,11.217902811981201,13.4064919375Q10.464771711981202,13.8955039375,9.347753011981201,14.0697159375C9.164969011981201,13.7775529375,8.8446250119812,13.6000979375,8.499995711981201,13.6000979375L7.499995711981201,13.6000979375C6.947711011981201,13.6000979375,6.499995711981201,14.0478129375,6.499995711981201,14.6000979375C6.499995711981201,15.1523819375,6.947711011981201,15.6000979375,7.499995711981201,15.6000979375L8.499995711981201,15.6000979375C8.867357711981201,15.6000979375,9.205142511981201,15.3986739375,9.379777411981202,15.0754769375Q10.789143811981202,14.8771949375,11.7624808119812,14.2452009375Q12.735667811981202,13.6133069375,13.2563028119812,12.5688779375Q13.426279811981201,12.2278969375,13.546219811981201,11.8452929375C14.623171811981202,11.4675219375,15.395394811981202,10.4418907375,15.395394811981202,9.2358961375L15.395394811981202,7.1115455375C15.395394811981202,6.6206255375,14.997426811981201,6.2226562375,14.5065068119812,6.2226562375L14.2066928119812,6.2226562375C13.979067811981201,2.9933877375,11.287245811981201,0.4443359375,8.0000605119812,0.4443359375ZM3.2653947119812012,6.2226562375L3.1256022119812013,6.2226562375Q3.2673826119812013,4.4805894375,4.540736711981201,3.2072351375Q5.973635211981201,1.7743364375,8.0000605119812,1.7743365375Q10.026485011981201,1.7743359375,11.4593848119812,3.2072348375Q12.7327378119812,4.4805898375,12.8745188119812,6.2226562375L12.730002811981201,6.2226562375C12.2384698119812,6.2226562375,11.8400028119812,6.6211233375,11.8400028119812,7.1126566375L11.8400028119812,8.5111112375L9.844035611981202,8.5111112375L9.135293511981201,7.6251831375C9.035886311981201,7.5009231375,8.891187211981201,7.4212427375,8.733030811981202,7.4036703375C8.5748739119812,7.3860969375,8.416214511981202,7.4320712375,8.291955011981202,7.5314788375C8.247317811981201,7.5671882375,8.208013011981201,7.6090927375,8.175232911981201,7.6559229375L7.079181211981201,9.2217102375L6.690847911981201,8.7362938375C6.576983911981201,8.5939655375,6.404596811981201,8.5111112375,6.222326711981201,8.5111112375L4.155394811981202,8.5111112375L4.155394811981202,7.1126566375C4.155394811981202,6.6211233375,3.756928411981201,6.2226562375,3.2653947119812012,6.2226562375ZM1.8000020119812012,9.2361164375Q1.8000020119812012,9.8840780375,2.2581801119812015,10.3422565375Q2.5644011119812014,10.6484779375,2.955394711981201,10.7500369375L2.955394711981201,7.4226565375L1.800002111981201,7.4226565375L1.8000020119812012,9.2361164375ZM13.040002811981202,7.4226565375L13.040002811981202,10.7499879375Q13.430952811981202,10.6483919375,13.737153811981202,10.3421917375Q14.1953948119812,9.8839492375,14.1953948119812,9.2358961375L14.1953948119812,7.4226565375L13.040002811981202,7.4226565375Z",fillRule:"evenodd",fill:t,fillOpacity:"1"})})]})]}),yk=({isCallActive:e,connectionStatus:t,isSpeaking:r,isTyping:o,volumeLevel:a,onClick:s,onToggleCall:u,mainLabel:f,ctaTitle:p,ctaSubtitle:m,colors:v,styles:y,mode:E})=>{const k=E==="voice"&&y.size==="tiny",A=()=>{k&&u?u():s()},b=p||f,O={...k&&e?{width:"5rem",height:"5rem"}:sg[y.size].button,...hk[y.radius],backgroundColor:e&&k?"#ef4444":v.ctaButtonColor,boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...m&&(y.size==="compact"||y.size==="full")&&!k?{height:y.size==="compact"?"4rem":"4.5rem"}:{}};return Z.jsx("div",{id:"vapi-widget-floating-button",className:`hover:vapi-scale-105 hover:vapi--translate-y-1 hover:vapi-shadow-xl ${k&&e?"vapi-animate-glow":""}`,style:O,onClick:A,children:Z.jsxs("div",{className:"vapi-flex vapi-items-center vapi-space-x-2",style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[e||o||r||t==="connecting"?Z.jsx(as,{size:k&&e?48:y.size==="tiny"?24:28,connectionStatus:t,isCallActive:e,isSpeaking:r,isTyping:o,baseColor:v.accentColor,colors:v.accentColor,volumeLevel:a}):Z.jsx(lg,{size:k&&e?48:y.size==="tiny"?24:28,color:v.accentColor,backgroundColor:"transparent"}),(y.size==="compact"||y.size==="full")&&!k&&Z.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},children:[Z.jsx("span",{style:{color:v.ctaButtonTextColor,fontSize:"0.875rem",fontWeight:"500",lineHeight:"1.2"},children:b}),m&&Z.jsx("span",{style:{color:v.ctaButtonTextColor,fontSize:"0.75rem",fontWeight:"400",opacity:.8,lineHeight:"1.2",marginTop:"0.125rem"},children:m})]})]})})},wk=new Map([["bold",F.createElement(F.Fragment,null,F.createElement("path",{d:"M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z"}))],["duotone",F.createElement(F.Fragment,null,F.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),F.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["fill",F.createElement(F.Fragment,null,F.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["light",F.createElement(F.Fragment,null,F.createElement("path",{d:"M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z"}))],["regular",F.createElement(F.Fragment,null,F.createElement("path",{d:"M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"}))],["thin",F.createElement(F.Fragment,null,F.createElement("path",{d:"M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z"}))]]),_k=new Map([["bold",F.createElement(F.Fragment,null,F.createElement("path",{d:"M128,20A108,108,0,0,0,31.85,177.23L21,209.66A20,20,0,0,0,46.34,235l32.43-10.81A108,108,0,1,0,128,20Zm0,192a84,84,0,0,1-42.06-11.27,12,12,0,0,0-6-1.62,12.1,12.1,0,0,0-3.8.62l-29.79,9.93,9.93-29.79a12,12,0,0,0-1-9.81A84,84,0,1,1,128,212Z"}))],["duotone",F.createElement(F.Fragment,null,F.createElement("path",{d:"M224,128A96,96,0,0,1,79.93,211.11h0L42.54,223.58a8,8,0,0,1-10.12-10.12l12.47-37.39h0A96,96,0,1,1,224,128Z",opacity:"0.2"}),F.createElement("path",{d:"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-6.54-.67L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Z"}))],["fill",F.createElement(F.Fragment,null,F.createElement("path",{d:"M232,128A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Z"}))],["light",F.createElement(F.Fragment,null,F.createElement("path",{d:"M128,26A102,102,0,0,0,38.35,176.69L26.73,211.56a14,14,0,0,0,17.71,17.71l34.87-11.62A102,102,0,1,0,128,26Zm0,192a90,90,0,0,1-45.06-12.08,6.09,6.09,0,0,0-3-.81,6.2,6.2,0,0,0-1.9.31L40.65,217.88a2,2,0,0,1-2.53-2.53L50.58,178a6,6,0,0,0-.5-4.91A90,90,0,1,1,128,218Z"}))],["regular",F.createElement(F.Fragment,null,F.createElement("path",{d:"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-6.54-.67L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Z"}))],["thin",F.createElement(F.Fragment,null,F.createElement("path",{d:"M128,28A100,100,0,0,0,40.53,176.5l-11.9,35.69a12,12,0,0,0,15.18,15.18l35.69-11.9A100,100,0,1,0,128,28Zm0,192a92,92,0,0,1-46.07-12.35,4.05,4.05,0,0,0-2-.54,3.93,3.93,0,0,0-1.27.21L41.28,219.78a4,4,0,0,1-5.06-5.06l12.46-37.38a4,4,0,0,0-.33-3.27A92,92,0,1,1,128,220Z"}))]]),kk=new Map([["bold",F.createElement(F.Fragment,null,F.createElement("path",{d:"M128,180a52.06,52.06,0,0,0,52-52V64A52,52,0,0,0,76,64v64A52.06,52.06,0,0,0,128,180ZM100,64a28,28,0,0,1,56,0v64a28,28,0,0,1-56,0Zm40,155.22V240a12,12,0,0,1-24,0V219.22A92.14,92.14,0,0,1,36,128a12,12,0,0,1,24,0,68,68,0,0,0,136,0,12,12,0,0,1,24,0A92.14,92.14,0,0,1,140,219.22Z"}))],["duotone",F.createElement(F.Fragment,null,F.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),F.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["fill",F.createElement(F.Fragment,null,F.createElement("path",{d:"M80,128V64a48,48,0,0,1,96,0v64a48,48,0,0,1-96,0Zm128,0a8,8,0,0,0-16,0,64,64,0,0,1-128,0,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.6A80.11,80.11,0,0,0,208,128Z"}))],["light",F.createElement(F.Fragment,null,F.createElement("path",{d:"M128,174a46.06,46.06,0,0,0,46-46V64a46,46,0,0,0-92,0v64A46.06,46.06,0,0,0,128,174ZM94,64a34,34,0,0,1,68,0v64a34,34,0,0,1-68,0Zm40,141.75V240a6,6,0,0,1-12,0V205.75A78.09,78.09,0,0,1,50,128a6,6,0,0,1,12,0,66,66,0,0,0,132,0,6,6,0,0,1,12,0A78.09,78.09,0,0,1,134,205.75Z"}))],["regular",F.createElement(F.Fragment,null,F.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["thin",F.createElement(F.Fragment,null,F.createElement("path",{d:"M128,172a44.05,44.05,0,0,0,44-44V64a44,44,0,0,0-88,0v64A44.05,44.05,0,0,0,128,172ZM92,64a36,36,0,0,1,72,0v64a36,36,0,0,1-72,0Zm40,139.89V240a4,4,0,0,1-8,0V203.89A76.09,76.09,0,0,1,52,128a4,4,0,0,1,8,0,68,68,0,0,0,136,0,4,4,0,0,1,8,0A76.09,76.09,0,0,1,132,203.89Z"}))]]),Sk=new Map([["bold",F.createElement(F.Fragment,null,F.createElement("path",{d:"M56.88,39.93A12,12,0,1,0,39.12,56.07L76,96.64V128a52,52,0,0,0,72.11,48l11.26,12.39A67.34,67.34,0,0,1,128,196a68.07,68.07,0,0,1-68-68,12,12,0,0,0-24,0,92.14,92.14,0,0,0,80,91.22V240a12,12,0,0,0,24,0V219.23a90.39,90.39,0,0,0,35.92-12.68l23.2,25.52a12,12,0,0,0,17.76-16.14ZM128,156a28,28,0,0,1-28-28v-5l29.9,32.89C129.27,156,128.64,156,128,156Zm63-2.42A67.63,67.63,0,0,0,196,128a12,12,0,0,1,24,0,91.48,91.48,0,0,1-6.74,34.61,12,12,0,0,1-22.23-9ZM85.7,33.75A52,52,0,0,1,180,64v56.54a12,12,0,0,1-24,0V64a28,28,0,0,0-50.79-16.28,12,12,0,0,1-19.51-14Z"}))],["duotone",F.createElement(F.Fragment,null,F.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),F.createElement("path",{d:"M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z"}))],["fill",F.createElement(F.Fragment,null,F.createElement("path",{d:"M213.38,229.92a8,8,0,0,1-11.3-.54l-30.92-34A78.83,78.83,0,0,1,136,207.59V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64.07,64.07,0,0,0,64,64,63.41,63.41,0,0,0,32.21-8.68l-11.1-12.2A48,48,0,0,1,80,128V95.09L42.08,53.38A8,8,0,0,1,53.92,42.62l160,176A8,8,0,0,1,213.38,229.92Zm-24.19-63.13a7.88,7.88,0,0,0,3.51.82,8,8,0,0,0,7.19-4.49A79.16,79.16,0,0,0,208,128a8,8,0,0,0-16,0,63.32,63.32,0,0,1-6.48,28.09A8,8,0,0,0,189.19,166.79Zm-27.33-29.22A8,8,0,0,0,175.74,133a49.49,49.49,0,0,0,.26-5V64A48,48,0,0,0,84,44.87a8,8,0,0,0,1.41,8.57Z"}))],["light",F.createElement(F.Fragment,null,F.createElement("path",{d:"M212.44,220,52.44,44A6,6,0,0,0,43.56,52L82,94.32V128a46,46,0,0,0,67.56,40.64l13.75,15.12A65.26,65.26,0,0,1,128,194a66.08,66.08,0,0,1-66-66,6,6,0,0,0-12,0,78.09,78.09,0,0,0,72,77.75V240a6,6,0,0,0,12,0V205.77a76.93,76.93,0,0,0,37.48-13L203.56,228a6,6,0,0,0,8.88-8.08ZM128,162a34,34,0,0,1-34-34V107.52l47.12,51.84A33.82,33.82,0,0,1,128,162Zm59.32-5A65.38,65.38,0,0,0,194,128a6,6,0,0,1,12,0,77.33,77.33,0,0,1-7.9,34.25A6,6,0,1,1,187.32,157ZM85.8,45.67A46,46,0,0,1,174,64v64a45.17,45.17,0,0,1-.25,4.81,6,6,0,0,1-6,5.38q-.31,0-.63,0a6,6,0,0,1-5.34-6.59A35.41,35.41,0,0,0,162,128V64A34,34,0,0,0,96.8,50.45a6,6,0,0,1-11-4.78Z"}))],["regular",F.createElement(F.Fragment,null,F.createElement("path",{d:"M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z"}))],["thin",F.createElement(F.Fragment,null,F.createElement("path",{d:"M211,221.31,51,45.31A4,4,0,0,0,45,50.69L84,93.55V128a44,44,0,0,0,66,38.12l16.38,18A67.21,67.21,0,0,1,128,196a68.07,68.07,0,0,1-68-68,4,4,0,0,0-8,0,76.09,76.09,0,0,0,72,75.89V240a4,4,0,0,0,8,0V203.89a75.1,75.1,0,0,0,39.79-13.77L205,226.69a4,4,0,1,0,5.92-5.38ZM128,164a36,36,0,0,1-36-36V102.35L144.43,160A35.83,35.83,0,0,1,128,164Zm61.12-6.15A67.44,67.44,0,0,0,196,128a4,4,0,0,1,8,0,75.28,75.28,0,0,1-7.7,33.37,4,4,0,0,1-7.18-3.52ZM87.63,46.46A44,44,0,0,1,172,64v64a44.2,44.2,0,0,1-.24,4.61,4,4,0,0,1-4,3.58l-.42,0a4,4,0,0,1-3.57-4.39A36.67,36.67,0,0,0,164,128V64A36,36,0,0,0,95,49.66a4,4,0,0,1-7.34-3.2Z"}))]]),Ek=new Map([["bold",F.createElement(F.Fragment,null,F.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",F.createElement(F.Fragment,null,F.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),F.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",F.createElement(F.Fragment,null,F.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",F.createElement(F.Fragment,null,F.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",F.createElement(F.Fragment,null,F.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",F.createElement(F.Fragment,null,F.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]),bk=new Map([["bold",F.createElement(F.Fragment,null,F.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,160H60V60H196Z"}))],["duotone",F.createElement(F.Fragment,null,F.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),F.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z"}))],["fill",F.createElement(F.Fragment,null,F.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z"}))],["light",F.createElement(F.Fragment,null,F.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,158a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2Z"}))],["regular",F.createElement(F.Fragment,null,F.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z"}))],["thin",F.createElement(F.Fragment,null,F.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,156a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4Z"}))]]),Ck=new Map([["bold",F.createElement(F.Fragment,null,F.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",F.createElement(F.Fragment,null,F.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),F.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",F.createElement(F.Fragment,null,F.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",F.createElement(F.Fragment,null,F.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",F.createElement(F.Fragment,null,F.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",F.createElement(F.Fragment,null,F.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),xk=F.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Sr=F.forwardRef((e,t)=>{const{alt:r,color:o,size:a,weight:s,mirrored:u,children:f,weights:p,...m}=e,{color:v="currentColor",size:y,weight:E="regular",mirrored:k=!1,...A}=F.useContext(xk);return F.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:a??y,height:a??y,fill:o??v,viewBox:"0 0 256 256",transform:u||k?"scale(-1, 1)":void 0,...A,...m},!!r&&F.createElement("title",null,r),f,p.get(s??E))});Sr.displayName="IconBase";const ug=F.forwardRef((e,t)=>F.createElement(Sr,{ref:t,...e,weights:wk}));ug.displayName="ArrowsClockwiseIcon";const cg=F.forwardRef((e,t)=>F.createElement(Sr,{ref:t,...e,weights:_k}));cg.displayName="ChatCircleIcon";const Ni=F.forwardRef((e,t)=>F.createElement(Sr,{ref:t,...e,weights:kk}));Ni.displayName="MicrophoneIcon";const $u=F.forwardRef((e,t)=>F.createElement(Sr,{ref:t,...e,weights:Sk}));$u.displayName="MicrophoneSlashIcon";const qu=F.forwardRef((e,t)=>F.createElement(Sr,{ref:t,...e,weights:Ek}));qu.displayName="PaperPlaneTiltIcon";const Hu=F.forwardRef((e,t)=>F.createElement(Sr,{ref:t,...e,weights:bk}));Hu.displayName="StopIcon";const dg=F.forwardRef((e,t)=>F.createElement(Sr,{ref:t,...e,weights:Ck}));dg.displayName="XIcon";const Tk=({mode:e,connectionStatus:t,isCallActive:r,isSpeaking:o,isTyping:a,hasActiveConversation:s,mainLabel:u,onClose:f,onReset:p,colors:m,styles:v})=>{const y=()=>t==="connecting"?"Connecting...":r?o?"Assistant Speaking...":"Listening...":a?"Assistant is typing...":s?e==="chat"?"Chat active":e==="hybrid"?"Ready to assist":"Connected":e==="voice"?"Click the microphone to start":e==="chat"?"Type a message below":"Choose voice or text";return Z.jsxs("div",{className:`vapi-relative vapi-z-10 vapi-p-4 vapi-flex vapi-items-center vapi-justify-between vapi-border-b ${v.theme==="dark"?"vapi-text-white vapi-border-gray-800 vapi-shadow-lg":"vapi-text-gray-900 vapi-border-gray-200 vapi-shadow-sm"}`,style:{backgroundColor:m.baseColor},children:[Z.jsxs("div",{className:"vapi-flex vapi-items-center vapi-space-x-3",children:[r||a||o||t==="connecting"?Z.jsx(as,{size:40,connectionStatus:t,isCallActive:r,isSpeaking:o,isTyping:a,baseColor:m.accentColor,colors:m.accentColor}):Z.jsx(lg,{size:40,color:m.accentColor,backgroundColor:"transparent"}),Z.jsxs("div",{children:[Z.jsx("div",{className:"vapi-font-medium",children:u}),Z.jsx("div",{className:`vapi-text-sm ${v.theme==="dark"?"vapi-text-gray-300":"vapi-text-gray-600"}`,children:y()})]})]}),Z.jsxs("div",{className:"vapi-flex vapi-items-center vapi-space-x-2",children:[Z.jsx("button",{onClick:p,className:"vapi-w-8 vapi-h-8 vapi-rounded-full vapi-flex vapi-items-center vapi-justify-center vapi-transition-all}",title:"Reset conversation",children:Z.jsx(ug,{size:16,weight:"bold"})}),Z.jsx("button",{onClick:f,className:"vapi-w-8 vapi-h-8 vapi-rounded-full vapi-flex vapi-items-center vapi-justify-center vapi-transition-all",children:Z.jsx(dg,{size:16,weight:"bold"})})]})]})};function Dx(){}function Rx(){}function Ak(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const Mk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lk={};function fg(e,t){return(Lk.jsx?Pk:Mk).test(e)}const Ok=/[ \t\n\f\r]/g;function Ik(e){return typeof e=="object"?e.type==="text"?pg(e.value):!1:pg(e)}function pg(e){return e.replace(Ok,"")===""}class Ao{constructor(t,r,o){this.normal=r,this.property=t,o&&(this.space=o)}}Ao.prototype.normal={},Ao.prototype.property={},Ao.prototype.space=void 0;function hg(e,t){const r={},o={};for(const a of e)Object.assign(r,a.property),Object.assign(o,a.normal);return new Ao(r,o,t)}function Ju(e){return e.toLowerCase()}class qt{constructor(t,r){this.attribute=r,this.property=t}}qt.prototype.attribute="",qt.prototype.booleanish=!1,qt.prototype.boolean=!1,qt.prototype.commaOrSpaceSeparated=!1,qt.prototype.commaSeparated=!1,qt.prototype.defined=!1,qt.prototype.mustUseProperty=!1,qt.prototype.number=!1,qt.prototype.overloadedBoolean=!1,qt.prototype.property="",qt.prototype.spaceSeparated=!1,qt.prototype.space=void 0;let Nk=0;const Ie=si(),lt=si(),Wu=si(),ae=si(),Ge=si(),ji=si(),on=si();function si(){return 2**++Nk}const Yu=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:lt,commaOrSpaceSeparated:on,commaSeparated:ji,number:ae,overloadedBoolean:Wu,spaceSeparated:Ge},Symbol.toStringTag,{value:"Module"})),Gu=Object.keys(Yu);class Qu extends qt{constructor(t,r,o,a){let s=-1;if(super(t,r),mg(this,"space",a),typeof o=="number")for(;++s4&&r.slice(0,4)==="data"&&zk.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Sg,Uk);o="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Sg.test(s)){let u=s.replace(Fk,Bk);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}a=Qu}return new a(o,t)}function Bk(e){return"-"+e.toLowerCase()}function Uk(e){return e.charAt(1).toUpperCase()}const $k=hg([gg,jk,wg,_g,kg],"html"),Zu=hg([gg,Dk,wg,_g,kg],"svg");function qk(e){return e.join(" ").trim()}var Ri={},Ku,Eg;function Hk(){if(Eg)return Ku;Eg=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,f=/^\s+|\s+$/g,p=` `,m="/",v="*",y="",E="comment",k="declaration";Ku=function(b,O){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];O=O||{};var M=1,V=1;function j(ie){var le=ie.match(t);le&&(M+=le.length);var he=ie.lastIndexOf(p);V=~he?ie.length-he:V+ie.length}function R(){var ie={line:M,column:V};return function(le){return le.position=new N(ie),Y(),le}}function N(ie){this.start=ie,this.end={line:M,column:V},this.source=O.source}N.prototype.content=b;function L(ie){var le=new Error(O.source+":"+M+":"+V+": "+ie);if(le.reason=ie,le.filename=O.source,le.line=M,le.column=V,le.source=b,!O.silent)throw le}function q(ie){var le=ie.exec(b);if(le){var he=le[0];return j(he),b=b.slice(he.length),le}}function Y(){q(r)}function re(ie){var le;for(ie=ie||[];le=oe();)le!==!1&&ie.push(le);return ie}function oe(){var ie=R();if(!(m!=b.charAt(0)||v!=b.charAt(1))){for(var le=2;y!=b.charAt(le)&&(v!=b.charAt(le)||m!=b.charAt(le+1));)++le;if(le+=2,y===b.charAt(le-1))return L("End of comment missing");var he=b.slice(2,le-2);return V+=2,j(he),b=b.slice(le),V+=2,ie({type:E,comment:he})}}function se(){var ie=R(),le=q(o);if(le){if(oe(),!q(a))return L("property missing ':'");var he=q(s),Se=ie({type:k,property:A(le[0].replace(e,y)),value:he?A(he[0].replace(e,y)):y});return q(u),Se}}function fe(){var ie=[];re(ie);for(var le;le=se();)le!==!1&&(ie.push(le),re(ie));return ie}return Y(),fe()};function A(b){return b?b.replace(f,y):y}return Ku}var bg;function Jk(){if(bg)return Ri;bg=1;var e=Ri&&Ri.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.default=r;var t=e(Hk());function r(o,a){var s=null;if(!o||typeof o!="string")return s;var u=(0,t.default)(o),f=typeof a=="function";return u.forEach(function(p){if(p.type==="declaration"){var m=p.property,v=p.value;f?a(m,v,p):v&&(s=s||{},s[m]=v)}}),s}return Ri}var Mo={},Cg;function Wk(){if(Cg)return Mo;Cg=1,Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(m){return!m||r.test(m)||e.test(m)},u=function(m,v){return v.toUpperCase()},f=function(m,v){return"".concat(v,"-")},p=function(m,v){return v===void 0&&(v={}),s(m)?m:(m=m.toLowerCase(),v.reactCompat?m=m.replace(a,f):m=m.replace(o,f),m.replace(t,u))};return Mo.camelCase=p,Mo}var Po,xg;function Yk(){if(xg)return Po;xg=1;var e=Po&&Po.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Jk()),r=Wk();function o(a,s){var u={};return!a||typeof a!="string"||(0,t.default)(a,function(f,p){f&&p&&(u[(0,r.camelCase)(f,s)]=p)}),u}return o.default=o,Po=o,Po}var Gk=Yk();const Qk=hr(Gk),Tg=Ag("end"),Xu=Ag("start");function Ag(e){return t;function t(r){const o=r&&r.position&&r.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function Zk(e){const t=Xu(e),r=Tg(e);if(t&&r)return{start:t,end:r}}function Lo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Mg(e.position):"start"in e||"end"in e?Mg(e):"line"in e||"column"in e?ec(e):""}function ec(e){return Pg(e&&e.line)+":"+Pg(e&&e.column)}function Mg(e){return ec(e&&e.start)+"-"+ec(e&&e.end)}function Pg(e){return e&&typeof e=="number"?e:1}class Lt extends Error{constructor(t,r,o){super(),typeof r=="string"&&(o=r,r=void 0);let a="",s={},u=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof t=="string"?a=t:!s.cause&&t&&(u=!0,a=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof o=="string"){const p=o.indexOf(":");p===-1?s.ruleId=o:(s.source=o.slice(0,p),s.ruleId=o.slice(p+1))}if(!s.place&&s.ancestors&&s.ancestors){const p=s.ancestors[s.ancestors.length-1];p&&(s.place=p.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file,this.message=a,this.line=f?f.line:void 0,this.name=Lo(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=u&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}Lt.prototype.file="",Lt.prototype.name="",Lt.prototype.reason="",Lt.prototype.message="",Lt.prototype.stack="",Lt.prototype.column=void 0,Lt.prototype.line=void 0,Lt.prototype.ancestors=void 0,Lt.prototype.cause=void 0,Lt.prototype.fatal=void 0,Lt.prototype.place=void 0,Lt.prototype.ruleId=void 0,Lt.prototype.source=void 0;const tc={}.hasOwnProperty,Kk=new Map,Xk=/[A-Z]/g,eS=new Set(["table","tbody","thead","tfoot","tr"]),tS=new Set(["td","th"]),Lg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function nS(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=cS(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=uS(r,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Zu:$k,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Og(a,e,void 0);return s&&typeof s!="string"?s:a.create(e,a.Fragment,{children:s||void 0},void 0)}function Og(e,t,r){if(t.type==="element")return rS(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return iS(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return aS(e,t,r);if(t.type==="mdxjsEsm")return oS(e,t);if(t.type==="root")return sS(e,t,r);if(t.type==="text")return lS(e,t)}function rS(e,t,r){const o=e.schema;let a=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(a=Zu,e.schema=a),e.ancestors.push(t);const s=Ng(e,t.tagName,!1),u=dS(e,t);let f=rc(e,t);return eS.has(t.tagName)&&(f=f.filter(function(p){return typeof p=="string"?!Ik(p):!0})),Ig(e,u,s,t),nc(u,f),e.ancestors.pop(),e.schema=o,e.create(t,s,u,r)}function iS(e,t){if(t.data&&t.data.estree&&e.evaluater){const o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}Oo(e,t.position)}function oS(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Oo(e,t.position)}function aS(e,t,r){const o=e.schema;let a=o;t.name==="svg"&&o.space==="html"&&(a=Zu,e.schema=a),e.ancestors.push(t);const s=t.name===null?e.Fragment:Ng(e,t.name,!0),u=fS(e,t),f=rc(e,t);return Ig(e,u,s,t),nc(u,f),e.ancestors.pop(),e.schema=o,e.create(t,s,u,r)}function sS(e,t,r){const o={};return nc(o,rc(e,t)),e.create(t,e.Fragment,o,r)}function lS(e,t){return t.value}function Ig(e,t,r,o){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=o)}function nc(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function uS(e,t,r){return o;function o(a,s,u,f){const m=Array.isArray(u.children)?r:t;return f?m(s,u,f):m(s,u)}}function cS(e,t){return r;function r(o,a,s,u){const f=Array.isArray(s.children),p=Xu(o);return t(a,s,u,f,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function dS(e,t){const r={};let o,a;for(a in t.properties)if(a!=="children"&&tc.call(t.properties,a)){const s=pS(e,a,t.properties[a]);if(s){const[u,f]=s;e.tableCellAlignToStyle&&u==="align"&&typeof f=="string"&&tS.has(t.tagName)?o=f:r[u]=f}}if(o){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return r}function fS(e,t){const r={};for(const o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){const s=o.data.estree.body[0];s.type;const u=s.expression;u.type;const f=u.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else Oo(e,t.position);else{const a=o.name;let s;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){const f=o.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else Oo(e,t.position);else s=o.value===null?!0:o.value;r[a]=s}return r}function rc(e,t){const r=[];let o=-1;const a=e.passKeys?new Map:Kk;for(;++oa?0:a+t:t=t>a?a:t,r=r>0?r:0,o.length<1e4)u=Array.from(o),u.unshift(t,r),e.splice(...u);else for(r&&e.splice(t,r);s0?(Un(e,e.length,0,t),e):t}const Fg={}.hasOwnProperty;function kS(e){const t={};let r=-1;for(;++r13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Fi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const $n=Er(/[A-Za-z]/),an=Er(/[\dA-Za-z]/),bS=Er(/[#-'*+\--9=?A-Z^-~]/);function ac(e){return e!==null&&(e<32||e===127)}const sc=Er(/\d/),CS=Er(/[\dA-Fa-f]/),xS=Er(/[!-/:-@[-`{-~]/);function Ae(e){return e!==null&&e<-2}function Ht(e){return e!==null&&(e<0||e===32)}function $e(e){return e===-2||e===-1||e===32}const TS=Er(new RegExp("\\p{P}|\\p{S}","u")),AS=Er(/\s/);function Er(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function zi(e){const t=[];let r=-1,o=0,a=0;for(;++r55295&&s<57344){const f=e.charCodeAt(r+1);s<56320&&f>56319&&f<57344?(u=String.fromCharCode(s,f),a=1):u="�"}else u=String.fromCharCode(s);u&&(t.push(e.slice(o,r),encodeURIComponent(u)),o=r+a+1,u=""),a&&(r+=a,a=0)}return t.join("")+e.slice(o)}function Qe(e,t,r,o){const a=o?o-1:Number.POSITIVE_INFINITY;let s=0;return u;function u(p){return $e(p)?(e.enter(r),f(p)):t(p)}function f(p){return $e(p)&&s++u))return;const q=t.events.length;let Y=q,re,oe;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){if(re){oe=t.events[Y][1].end;break}re=!0}for(M(o),L=q;Lj;){const N=r[R];t.containerState=N[1],N[0].exit.call(t,e)}r.length=j}function V(){a.write([null]),s=void 0,a=void 0,t.containerState._closeFlow=void 0}}function IS(e,t,r){return Qe(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Bg(e){if(e===null||Ht(e)||AS(e))return 1;if(TS(e))return 2}function lc(e,t,r){const o=[];let a=-1;for(;++a1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const y={...e[o][1].end},E={...e[r][1].start};Ug(y,-p),Ug(E,p),u={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...e[o][1].end}},f={type:p>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:E},s={type:p>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[r][1].start}},a={type:p>1?"strong":"emphasis",start:{...u.start},end:{...f.end}},e[o][1].end={...u.start},e[r][1].start={...f.end},m=[],e[o][1].end.offset-e[o][1].start.offset&&(m=vn(m,[["enter",e[o][1],t],["exit",e[o][1],t]])),m=vn(m,[["enter",a,t],["enter",u,t],["exit",u,t],["enter",s,t]]),m=vn(m,lc(t.parser.constructs.insideSpan.null,e.slice(o+1,r),t)),m=vn(m,[["exit",s,t],["enter",f,t],["exit",f,t],["exit",a,t]]),e[r][1].end.offset-e[r][1].start.offset?(v=2,m=vn(m,[["enter",e[r][1],t],["exit",e[r][1],t]])):v=0,Un(e,o-1,r-o+3,m),r=o+m.length-v-2;break}}for(r=-1;++r0&&$e(L)?Qe(e,V,"linePrefix",s+1)(L):V(L)}function V(L){return L===null||Ae(L)?e.check(Jg,b,R)(L):(e.enter("codeFlowValue"),j(L))}function j(L){return L===null||Ae(L)?(e.exit("codeFlowValue"),V(L)):(e.consume(L),j)}function R(L){return e.exit("codeFenced"),t(L)}function N(L,q,Y){let re=0;return oe;function oe(he){return L.enter("lineEnding"),L.consume(he),L.exit("lineEnding"),se}function se(he){return L.enter("codeFencedFence"),$e(he)?Qe(L,fe,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(he):fe(he)}function fe(he){return he===f?(L.enter("codeFencedFenceSequence"),ie(he)):Y(he)}function ie(he){return he===f?(re++,L.consume(he),ie):re>=u?(L.exit("codeFencedFenceSequence"),$e(he)?Qe(L,le,"whitespace")(he):le(he)):Y(he)}function le(he){return he===null||Ae(he)?(L.exit("codeFencedFence"),q(he)):Y(he)}}}function HS(e,t,r){const o=this;return a;function a(u){return u===null?r(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s)}function s(u){return o.parser.lazy[o.now().line]?r(u):t(u)}}const cc={name:"codeIndented",tokenize:WS},JS={partial:!0,tokenize:YS};function WS(e,t,r){const o=this;return a;function a(m){return e.enter("codeIndented"),Qe(e,s,"linePrefix",5)(m)}function s(m){const v=o.events[o.events.length-1];return v&&v[1].type==="linePrefix"&&v[2].sliceSerialize(v[1],!0).length>=4?u(m):r(m)}function u(m){return m===null?p(m):Ae(m)?e.attempt(JS,u,p)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||Ae(m)?(e.exit("codeFlowValue"),u(m)):(e.consume(m),f)}function p(m){return e.exit("codeIndented"),t(m)}}function YS(e,t,r){const o=this;return a;function a(u){return o.parser.lazy[o.now().line]?r(u):Ae(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):Qe(e,s,"linePrefix",5)(u)}function s(u){const f=o.events[o.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):Ae(u)?a(u):r(u)}}const GS={name:"codeText",previous:ZS,resolve:QS,tokenize:KS};function QS(e){let t=e.length-4,r=3,o,a;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=r;++o=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,r,o){const a=r||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return o&&Io(this.left,o),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Io(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Io(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(u):e.interrupt(o.parser.constructs.flow,r,t)(u)}}function Gg(e,t,r,o,a,s,u,f,p){const m=p||Number.POSITIVE_INFINITY;let v=0;return y;function y(M){return M===60?(e.enter(o),e.enter(a),e.enter(s),e.consume(M),e.exit(s),E):M===null||M===32||M===41||ac(M)?r(M):(e.enter(o),e.enter(u),e.enter(f),e.enter("chunkString",{contentType:"string"}),b(M))}function E(M){return M===62?(e.enter(s),e.consume(M),e.exit(s),e.exit(a),e.exit(o),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),k(M))}function k(M){return M===62?(e.exit("chunkString"),e.exit(f),E(M)):M===null||M===60||Ae(M)?r(M):(e.consume(M),M===92?A:k)}function A(M){return M===60||M===62||M===92?(e.consume(M),k):k(M)}function b(M){return!v&&(M===null||M===41||Ht(M))?(e.exit("chunkString"),e.exit(f),e.exit(u),e.exit(o),t(M)):v999||k===null||k===91||k===93&&!p||k===94&&!f&&"_hiddenFootnoteSupport"in u.parser.constructs?r(k):k===93?(e.exit(s),e.enter(a),e.consume(k),e.exit(a),e.exit(o),t):Ae(k)?(e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),v):(e.enter("chunkString",{contentType:"string"}),y(k))}function y(k){return k===null||k===91||k===93||Ae(k)||f++>999?(e.exit("chunkString"),v(k)):(e.consume(k),p||(p=!$e(k)),k===92?E:y)}function E(k){return k===91||k===92||k===93?(e.consume(k),f++,y):y(k)}}function Zg(e,t,r,o,a,s){let u;return f;function f(E){return E===34||E===39||E===40?(e.enter(o),e.enter(a),e.consume(E),e.exit(a),u=E===40?41:E,p):r(E)}function p(E){return E===u?(e.enter(a),e.consume(E),e.exit(a),e.exit(o),t):(e.enter(s),m(E))}function m(E){return E===u?(e.exit(s),p(u)):E===null?r(E):Ae(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),Qe(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),v(E))}function v(E){return E===u||E===null||Ae(E)?(e.exit("chunkString"),m(E)):(e.consume(E),E===92?y:v)}function y(E){return E===u||E===92?(e.consume(E),v):v(E)}}function No(e,t){let r;return o;function o(a){return Ae(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),r=!0,o):$e(a)?Qe(e,o,r?"linePrefix":"lineSuffix")(a):t(a)}}const aE={name:"definition",tokenize:lE},sE={partial:!0,tokenize:uE};function lE(e,t,r){const o=this;let a;return s;function s(k){return e.enter("definition"),u(k)}function u(k){return Qg.call(o,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(k)}function f(k){return a=Fi(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),p):r(k)}function p(k){return Ht(k)?No(e,m)(k):m(k)}function m(k){return Gg(e,v,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(k)}function v(k){return e.attempt(sE,y,y)(k)}function y(k){return $e(k)?Qe(e,E,"whitespace")(k):E(k)}function E(k){return k===null||Ae(k)?(e.exit("definition"),o.parser.defined.push(a),t(k)):r(k)}}function uE(e,t,r){return o;function o(f){return Ht(f)?No(e,a)(f):r(f)}function a(f){return Zg(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return $e(f)?Qe(e,u,"whitespace")(f):u(f)}function u(f){return f===null||Ae(f)?t(f):r(f)}}const cE={name:"hardBreakEscape",tokenize:dE};function dE(e,t,r){return o;function o(s){return e.enter("hardBreakEscape"),e.consume(s),a}function a(s){return Ae(s)?(e.exit("hardBreakEscape"),t(s)):r(s)}}const fE={name:"headingAtx",resolve:pE,tokenize:hE};function pE(e,t){let r=e.length-2,o=3,a,s;return e[o][1].type==="whitespace"&&(o+=2),r-2>o&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(o===r-1||r-4>o&&e[r-2][1].type==="whitespace")&&(r-=o+1===r?2:4),r>o&&(a={type:"atxHeadingText",start:e[o][1].start,end:e[r][1].end},s={type:"chunkText",start:e[o][1].start,end:e[r][1].end,contentType:"text"},Un(e,o,r-o+1,[["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t]])),e}function hE(e,t,r){let o=0;return a;function a(v){return e.enter("atxHeading"),s(v)}function s(v){return e.enter("atxHeadingSequence"),u(v)}function u(v){return v===35&&o++<6?(e.consume(v),u):v===null||Ht(v)?(e.exit("atxHeadingSequence"),f(v)):r(v)}function f(v){return v===35?(e.enter("atxHeadingSequence"),p(v)):v===null||Ae(v)?(e.exit("atxHeading"),t(v)):$e(v)?Qe(e,f,"whitespace")(v):(e.enter("atxHeadingText"),m(v))}function p(v){return v===35?(e.consume(v),p):(e.exit("atxHeadingSequence"),f(v))}function m(v){return v===null||v===35||Ht(v)?(e.exit("atxHeadingText"),f(v)):(e.consume(v),m)}}const mE=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Kg=["pre","script","style","textarea"],gE={concrete:!0,name:"htmlFlow",resolveTo:wE,tokenize:_E},vE={partial:!0,tokenize:SE},yE={partial:!0,tokenize:kE};function wE(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function _E(e,t,r){const o=this;let a,s,u,f,p;return m;function m(d){return v(d)}function v(d){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(d),y}function y(d){return d===33?(e.consume(d),E):d===47?(e.consume(d),s=!0,b):d===63?(e.consume(d),a=3,o.interrupt?t:x):$n(d)?(e.consume(d),u=String.fromCharCode(d),O):r(d)}function E(d){return d===45?(e.consume(d),a=2,k):d===91?(e.consume(d),a=5,f=0,A):$n(d)?(e.consume(d),a=4,o.interrupt?t:x):r(d)}function k(d){return d===45?(e.consume(d),o.interrupt?t:x):r(d)}function A(d){const _="CDATA[";return d===_.charCodeAt(f++)?(e.consume(d),f===_.length?o.interrupt?t:fe:A):r(d)}function b(d){return $n(d)?(e.consume(d),u=String.fromCharCode(d),O):r(d)}function O(d){if(d===null||d===47||d===62||Ht(d)){const _=d===47,w=u.toLowerCase();return!_&&!s&&Kg.includes(w)?(a=1,o.interrupt?t(d):fe(d)):mE.includes(u.toLowerCase())?(a=6,_?(e.consume(d),M):o.interrupt?t(d):fe(d)):(a=7,o.interrupt&&!o.parser.lazy[o.now().line]?r(d):s?V(d):j(d))}return d===45||an(d)?(e.consume(d),u+=String.fromCharCode(d),O):r(d)}function M(d){return d===62?(e.consume(d),o.interrupt?t:fe):r(d)}function V(d){return $e(d)?(e.consume(d),V):oe(d)}function j(d){return d===47?(e.consume(d),oe):d===58||d===95||$n(d)?(e.consume(d),R):$e(d)?(e.consume(d),j):oe(d)}function R(d){return d===45||d===46||d===58||d===95||an(d)?(e.consume(d),R):N(d)}function N(d){return d===61?(e.consume(d),L):$e(d)?(e.consume(d),N):j(d)}function L(d){return d===null||d===60||d===61||d===62||d===96?r(d):d===34||d===39?(e.consume(d),p=d,q):$e(d)?(e.consume(d),L):Y(d)}function q(d){return d===p?(e.consume(d),p=null,re):d===null||Ae(d)?r(d):(e.consume(d),q)}function Y(d){return d===null||d===34||d===39||d===47||d===60||d===61||d===62||d===96||Ht(d)?N(d):(e.consume(d),Y)}function re(d){return d===47||d===62||$e(d)?j(d):r(d)}function oe(d){return d===62?(e.consume(d),se):r(d)}function se(d){return d===null||Ae(d)?fe(d):$e(d)?(e.consume(d),se):r(d)}function fe(d){return d===45&&a===2?(e.consume(d),Se):d===60&&a===1?(e.consume(d),Me):d===62&&a===4?(e.consume(d),I):d===63&&a===3?(e.consume(d),x):d===93&&a===5?(e.consume(d),de):Ae(d)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(vE,J,ie)(d)):d===null||Ae(d)?(e.exit("htmlFlowData"),ie(d)):(e.consume(d),fe)}function ie(d){return e.check(yE,le,J)(d)}function le(d){return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),he}function he(d){return d===null||Ae(d)?ie(d):(e.enter("htmlFlowData"),fe(d))}function Se(d){return d===45?(e.consume(d),x):fe(d)}function Me(d){return d===47?(e.consume(d),u="",K):fe(d)}function K(d){if(d===62){const _=u.toLowerCase();return Kg.includes(_)?(e.consume(d),I):fe(d)}return $n(d)&&u.length<8?(e.consume(d),u+=String.fromCharCode(d),K):fe(d)}function de(d){return d===93?(e.consume(d),x):fe(d)}function x(d){return d===62?(e.consume(d),I):d===45&&a===2?(e.consume(d),x):fe(d)}function I(d){return d===null||Ae(d)?(e.exit("htmlFlowData"),J(d)):(e.consume(d),I)}function J(d){return e.exit("htmlFlow"),t(d)}}function kE(e,t,r){const o=this;return a;function a(u){return Ae(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):r(u)}function s(u){return o.parser.lazy[o.now().line]?r(u):t(u)}}function SE(e,t,r){return o;function o(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(ss,t,r)}}const EE={name:"htmlText",tokenize:bE};function bE(e,t,r){const o=this;let a,s,u;return f;function f(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),p}function p(x){return x===33?(e.consume(x),m):x===47?(e.consume(x),N):x===63?(e.consume(x),j):$n(x)?(e.consume(x),Y):r(x)}function m(x){return x===45?(e.consume(x),v):x===91?(e.consume(x),s=0,A):$n(x)?(e.consume(x),V):r(x)}function v(x){return x===45?(e.consume(x),k):r(x)}function y(x){return x===null?r(x):x===45?(e.consume(x),E):Ae(x)?(u=y,Me(x)):(e.consume(x),y)}function E(x){return x===45?(e.consume(x),k):y(x)}function k(x){return x===62?Se(x):x===45?E(x):y(x)}function A(x){const I="CDATA[";return x===I.charCodeAt(s++)?(e.consume(x),s===I.length?b:A):r(x)}function b(x){return x===null?r(x):x===93?(e.consume(x),O):Ae(x)?(u=b,Me(x)):(e.consume(x),b)}function O(x){return x===93?(e.consume(x),M):b(x)}function M(x){return x===62?Se(x):x===93?(e.consume(x),M):b(x)}function V(x){return x===null||x===62?Se(x):Ae(x)?(u=V,Me(x)):(e.consume(x),V)}function j(x){return x===null?r(x):x===63?(e.consume(x),R):Ae(x)?(u=j,Me(x)):(e.consume(x),j)}function R(x){return x===62?Se(x):j(x)}function N(x){return $n(x)?(e.consume(x),L):r(x)}function L(x){return x===45||an(x)?(e.consume(x),L):q(x)}function q(x){return Ae(x)?(u=q,Me(x)):$e(x)?(e.consume(x),q):Se(x)}function Y(x){return x===45||an(x)?(e.consume(x),Y):x===47||x===62||Ht(x)?re(x):r(x)}function re(x){return x===47?(e.consume(x),Se):x===58||x===95||$n(x)?(e.consume(x),oe):Ae(x)?(u=re,Me(x)):$e(x)?(e.consume(x),re):Se(x)}function oe(x){return x===45||x===46||x===58||x===95||an(x)?(e.consume(x),oe):se(x)}function se(x){return x===61?(e.consume(x),fe):Ae(x)?(u=se,Me(x)):$e(x)?(e.consume(x),se):re(x)}function fe(x){return x===null||x===60||x===61||x===62||x===96?r(x):x===34||x===39?(e.consume(x),a=x,ie):Ae(x)?(u=fe,Me(x)):$e(x)?(e.consume(x),fe):(e.consume(x),le)}function ie(x){return x===a?(e.consume(x),a=void 0,he):x===null?r(x):Ae(x)?(u=ie,Me(x)):(e.consume(x),ie)}function le(x){return x===null||x===34||x===39||x===60||x===61||x===96?r(x):x===47||x===62||Ht(x)?re(x):(e.consume(x),le)}function he(x){return x===47||x===62||Ht(x)?re(x):r(x)}function Se(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):r(x)}function Me(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),K}function K(x){return $e(x)?Qe(e,de,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):de(x)}function de(x){return e.enter("htmlTextData"),u(x)}}const dc={name:"labelEnd",resolveAll:AE,resolveTo:ME,tokenize:PE},CE={tokenize:LE},xE={tokenize:OE},TE={tokenize:IE};function AE(e){let t=-1;const r=[];for(;++t=3&&(m===null||Ae(m))?(e.exit("thematicBreak"),t(m)):r(m)}function p(m){return m===a?(e.consume(m),o++,p):(e.exit("thematicBreakSequence"),$e(m)?Qe(e,f,"whitespace")(m):f(m))}}const Jt={continuation:{tokenize:$E},exit:HE,name:"list",tokenize:UE},VE={partial:!0,tokenize:JE},BE={partial:!0,tokenize:qE};function UE(e,t,r){const o=this,a=o.events[o.events.length-1];let s=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,u=0;return f;function f(k){const A=o.containerState.type||(k===42||k===43||k===45?"listUnordered":"listOrdered");if(A==="listUnordered"?!o.containerState.marker||k===o.containerState.marker:sc(k)){if(o.containerState.type||(o.containerState.type=A,e.enter(A,{_container:!0})),A==="listUnordered")return e.enter("listItemPrefix"),k===42||k===45?e.check(ls,r,m)(k):m(k);if(!o.interrupt||k===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(k)}return r(k)}function p(k){return sc(k)&&++u<10?(e.consume(k),p):(!o.interrupt||u<2)&&(o.containerState.marker?k===o.containerState.marker:k===41||k===46)?(e.exit("listItemValue"),m(k)):r(k)}function m(k){return e.enter("listItemMarker"),e.consume(k),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||k,e.check(ss,o.interrupt?r:v,e.attempt(VE,E,y))}function v(k){return o.containerState.initialBlankLine=!0,s++,E(k)}function y(k){return $e(k)?(e.enter("listItemPrefixWhitespace"),e.consume(k),e.exit("listItemPrefixWhitespace"),E):r(k)}function E(k){return o.containerState.size=s+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(k)}}function $E(e,t,r){const o=this;return o.containerState._closeFlow=void 0,e.check(ss,a,s);function a(f){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Qe(e,t,"listItemIndent",o.containerState.size+1)(f)}function s(f){return o.containerState.furtherBlankLines||!$e(f)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,u(f)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(BE,t,u)(f))}function u(f){return o.containerState._closeFlow=!0,o.interrupt=void 0,Qe(e,e.attempt(Jt,t,r),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function qE(e,t,r){const o=this;return Qe(e,a,"listItemIndent",o.containerState.size+1);function a(s){const u=o.events[o.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===o.containerState.size?t(s):r(s)}}function HE(e){e.exit(this.containerState.type)}function JE(e,t,r){const o=this;return Qe(e,a,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(s){const u=o.events[o.events.length-1];return!$e(s)&&u&&u[1].type==="listItemPrefixWhitespace"?t(s):r(s)}}const Xg={name:"setextUnderline",resolveTo:WE,tokenize:YE};function WE(e,t){let r=e.length,o,a,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){o=r;break}e[r][1].type==="paragraph"&&(a=r)}else e[r][1].type==="content"&&e.splice(r,1),!s&&e[r][1].type==="definition"&&(s=r);const u={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",s?(e.splice(a,0,["enter",u,t]),e.splice(s+1,0,["exit",e[o][1],t]),e[o][1].end={...e[s][1].end}):e[o][1]=u,e.push(["exit",u,t]),e}function YE(e,t,r){const o=this;let a;return s;function s(m){let v=o.events.length,y;for(;v--;)if(o.events[v][1].type!=="lineEnding"&&o.events[v][1].type!=="linePrefix"&&o.events[v][1].type!=="content"){y=o.events[v][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||y)?(e.enter("setextHeadingLine"),a=m,u(m)):r(m)}function u(m){return e.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===a?(e.consume(m),f):(e.exit("setextHeadingLineSequence"),$e(m)?Qe(e,p,"lineSuffix")(m):p(m))}function p(m){return m===null||Ae(m)?(e.exit("setextHeadingLine"),t(m)):r(m)}}const GE={tokenize:QE};function QE(e){const t=this,r=e.attempt(ss,o,e.attempt(this.parser.constructs.flowInitial,a,Qe(e,e.attempt(this.parser.constructs.flow,a,e.attempt(tE,a)),"linePrefix")));return r;function o(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function a(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const ZE={resolveAll:tv()},KE=ev("string"),XE=ev("text");function ev(e){return{resolveAll:tv(e==="text"?e2:void 0),tokenize:t};function t(r){const o=this,a=this.parser.constructs[e],s=r.attempt(a,u,f);return u;function u(v){return m(v)?s(v):f(v)}function f(v){if(v===null){r.consume(v);return}return r.enter("data"),r.consume(v),p}function p(v){return m(v)?(r.exit("data"),s(v)):(r.consume(v),p)}function m(v){if(v===null)return!0;const y=a[v];let E=-1;if(y)for(;++E-1){const f=u[0];typeof f=="string"?u[0]=f.slice(o):u.shift()}s>0&&u.push(e[a].slice(0,s))}return u}function i2(e,t){let r=-1;const o=[];let a;for(;++r0){const ft=xe.tokenStack[xe.tokenStack.length-1];(ft[1]||ov).call(xe,void 0,ft[0])}for(ce.position={start:br(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:br(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},Re=-1;++Re1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,m),e.applyData(t,m)}function k2(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function S2(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function av(e,t){const r=t.referenceType;let o="]";if(r==="collapsed"?o+="[]":r==="full"&&(o+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+o}];const a=e.all(t),s=a[0];s&&s.type==="text"?s.value="["+s.value:a.unshift({type:"text",value:"["});const u=a[a.length-1];return u&&u.type==="text"?u.value+=o:a.push({type:"text",value:o}),a}function E2(e,t){const r=String(t.identifier).toUpperCase(),o=e.definitionById.get(r);if(!o)return av(e,t);const a={src:zi(o.url||""),alt:t.alt};o.title!==null&&o.title!==void 0&&(a.title=o.title);const s={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,s),e.applyData(t,s)}function b2(e,t){const r={src:zi(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const o={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,o),e.applyData(t,o)}function C2(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const o={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,o),e.applyData(t,o)}function x2(e,t){const r=String(t.identifier).toUpperCase(),o=e.definitionById.get(r);if(!o)return av(e,t);const a={href:zi(o.url||"")};o.title!==null&&o.title!==void 0&&(a.title=o.title);const s={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function T2(e,t){const r={href:zi(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const o={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function A2(e,t,r){const o=e.all(t),a=r?M2(r):sv(t),s={},u=[];if(typeof t.checked=="boolean"){const v=o[0];let y;v&&v.type==="element"&&v.tagName==="p"?y=v:(y={type:"element",tagName:"p",properties:{},children:[]},o.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f1}function P2(e,t){const r={},o=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++a0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=Xu(t.children[1]),p=Tg(t.children[t.children.length-1]);f&&p&&(u.position={start:f,end:p}),a.push(u)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)}function j2(e,t,r){const o=r?r.children:void 0,s=(o?o.indexOf(t):1)===0?"th":"td",u=r&&r.type==="table"?r.align:void 0,f=u?u.length:t.children.length;let p=-1;const m=[];for(;++p0,!0),o[0]),a=o.index+o[0].length,o=r.exec(t);return s.push(cv(t.slice(a),a>0,!1)),s.join("")}function cv(e,t,r){let o=0,a=e.length;if(t){let s=e.codePointAt(o);for(;s===lv||s===uv;)o++,s=e.codePointAt(o)}if(r){let s=e.codePointAt(a-1);for(;s===lv||s===uv;)a--,s=e.codePointAt(a-1)}return a>o?e.slice(o,a):""}function F2(e,t){const r={type:"text",value:R2(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function z2(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const V2={blockquote:m2,break:g2,code:v2,delete:y2,emphasis:w2,footnoteReference:_2,heading:k2,html:S2,imageReference:E2,image:b2,inlineCode:C2,linkReference:x2,link:T2,listItem:A2,list:P2,paragraph:L2,root:O2,strong:I2,table:N2,tableCell:D2,tableRow:j2,text:F2,thematicBreak:z2,toml:us,yaml:us,definition:us,footnoteDefinition:us};function us(){}const dv=-1,cs=0,jo=1,ds=2,pc=3,hc=4,mc=5,gc=6,fv=7,pv=8,hv=typeof self=="object"?self:globalThis,B2=(e,t)=>{const r=(a,s)=>(e.set(s,a),a),o=a=>{if(e.has(a))return e.get(a);const[s,u]=t[a];switch(s){case cs:case dv:return r(u,a);case jo:{const f=r([],a);for(const p of u)f.push(o(p));return f}case ds:{const f=r({},a);for(const[p,m]of u)f[o(p)]=o(m);return f}case pc:return r(new Date(u),a);case hc:{const{source:f,flags:p}=u;return r(new RegExp(f,p),a)}case mc:{const f=r(new Map,a);for(const[p,m]of u)f.set(o(p),o(m));return f}case gc:{const f=r(new Set,a);for(const p of u)f.add(o(p));return f}case fv:{const{name:f,message:p}=u;return r(new hv[f](p),a)}case pv:return r(BigInt(u),a);case"BigInt":return r(Object(BigInt(u)),a);case"ArrayBuffer":return r(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:f}=new Uint8Array(u);return r(new DataView(f),u)}}return r(new hv[s](u),a)};return o},mv=e=>B2(new Map,e)(0),Vi="",{toString:U2}={},{keys:$2}=Object,Do=e=>{const t=typeof e;if(t!=="object"||!e)return[cs,t];const r=U2.call(e).slice(8,-1);switch(r){case"Array":return[jo,Vi];case"Object":return[ds,Vi];case"Date":return[pc,Vi];case"RegExp":return[hc,Vi];case"Map":return[mc,Vi];case"Set":return[gc,Vi];case"DataView":return[jo,r]}return r.includes("Array")?[jo,r]:r.includes("Error")?[fv,r]:[ds,r]},fs=([e,t])=>e===cs&&(t==="function"||t==="symbol"),q2=(e,t,r,o)=>{const a=(u,f)=>{const p=o.push(u)-1;return r.set(f,p),p},s=u=>{if(r.has(u))return r.get(u);let[f,p]=Do(u);switch(f){case cs:{let v=u;switch(p){case"bigint":f=pv,v=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);v=null;break;case"undefined":return a([dv],u)}return a([f,v],u)}case jo:{if(p){let E=u;return p==="DataView"?E=new Uint8Array(u.buffer):p==="ArrayBuffer"&&(E=new Uint8Array(u)),a([p,[...E]],u)}const v=[],y=a([f,v],u);for(const E of u)v.push(s(E));return y}case ds:{if(p)switch(p){case"BigInt":return a([p,u.toString()],u);case"Boolean":case"Number":case"String":return a([p,u.valueOf()],u)}if(t&&"toJSON"in u)return s(u.toJSON());const v=[],y=a([f,v],u);for(const E of $2(u))(e||!fs(Do(u[E])))&&v.push([s(E),s(u[E])]);return y}case pc:return a([f,u.toISOString()],u);case hc:{const{source:v,flags:y}=u;return a([f,{source:v,flags:y}],u)}case mc:{const v=[],y=a([f,v],u);for(const[E,k]of u)(e||!(fs(Do(E))||fs(Do(k))))&&v.push([s(E),s(k)]);return y}case gc:{const v=[],y=a([f,v],u);for(const E of u)(e||!fs(Do(E)))&&v.push(s(E));return y}}const{message:m}=u;return a([f,{name:p,message:m}],u)};return s},gv=(e,{json:t,lossy:r}={})=>{const o=[];return q2(!(t||r),!!t,new Map,o)(e),o},ps=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?mv(gv(e,t)):structuredClone(e):(e,t)=>mv(gv(e,t));function H2(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function J2(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function W2(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||H2,o=e.options.footnoteBackLabel||J2,a=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let p=-1;for(;++p0&&A.push({type:"text",value:" "});let V=typeof r=="string"?r:r(p,k);typeof V=="string"&&(V={type:"text",value:V}),A.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+E+(k>1?"-"+k:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(p,k),className:["data-footnote-backref"]},children:Array.isArray(V)?V:[V]})}const O=v[v.length-1];if(O&&O.type==="element"&&O.tagName==="p"){const V=O.children[O.children.length-1];V&&V.type==="text"?V.value+=" ":O.children.push({type:"text",value:" "}),O.children.push(...A)}else v.push(...A);const M={type:"element",tagName:"li",properties:{id:t+"fn-"+E},children:e.wrap(v,!0)};e.patch(m,M),f.push(M)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...ps(u),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:` `}]}}const vv=function(e){if(e==null)return Z2;if(typeof e=="function")return hs(e);if(typeof e=="object")return Array.isArray(e)?Y2(e):G2(e);if(typeof e=="string")return Q2(e);throw new Error("Expected function, string, or object as test")};function Y2(e){const t=[];let r=-1;for(;++r":""))+")"})}return E;function E(){let k=yv,A,b,O;if((!t||s(p,m,v[v.length-1]||void 0))&&(k=nb(r(p,v)),k[0]===wv))return k;if("children"in p&&p.children){const M=p;if(M.children&&k[0]!==eb)for(b=(o?M.children.length:-1)+u,O=v.concat(M);b>-1&&b0&&r.push({type:"text",value:` `}),r}function kv(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Sv(e,t){const r=ib(e,t),o=r.one(e,void 0),a=W2(r),s=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return a&&s.children.push({type:"text",value:` `},a),s}function ub(e,t){return e&&"run"in e?async function(r,o){const a=Sv(r,{file:o,...t});await e.run(a,o)}:function(r,o){return Sv(r,{file:o,...e||t})}}function Ev(e){if(e)throw e}var yc,bv;function cb(){if(bv)return yc;bv=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},s=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var v=e.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!v&&!y)return!1;var E;for(E in m);return typeof E>"u"||e.call(m,E)},u=function(m,v){r&&v.name==="__proto__"?r(m,v.name,{enumerable:!0,configurable:!0,value:v.newValue,writable:!0}):m[v.name]=v.newValue},f=function(m,v){if(v==="__proto__")if(e.call(m,v)){if(o)return o(m,v).value}else return;return m[v]};return yc=function p(){var m,v,y,E,k,A,b=arguments[0],O=1,M=arguments.length,V=!1;for(typeof b=="boolean"&&(V=b,b=arguments[1]||{},O=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});Ou.length;let p;f&&u.push(a);try{p=e.apply(this,u)}catch(m){const v=m;if(f&&r)throw v;return a(v)}f||(p&&p.then&&typeof p.then=="function"?p.then(s,a):p instanceof Error?a(p):s(p))}function a(u,...f){r||(r=!0,t(u,...f))}function s(u){a(null,u)}}const qn={basename:hb,dirname:mb,extname:gb,join:vb,sep:"/"};function hb(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ro(e);let r=0,o=-1,a=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(s){r=a+1;break}}else o<0&&(s=!0,o=a+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let u=-1,f=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(s){r=a+1;break}}else u<0&&(s=!0,u=a+1),f>-1&&(e.codePointAt(a)===t.codePointAt(f--)?f<0&&(o=a):(f=-1,o=u));return r===o?o=u:o<0&&(o=e.length),e.slice(r,o)}function mb(e){if(Ro(e),e.length===0)return".";let t=-1,r=e.length,o;for(;--r;)if(e.codePointAt(r)===47){if(o){t=r;break}}else o||(o=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gb(e){Ro(e);let t=e.length,r=-1,o=0,a=-1,s=0,u;for(;t--;){const f=e.codePointAt(t);if(f===47){if(u){o=t+1;break}continue}r<0&&(u=!0,r=t+1),f===46?a<0?a=t:s!==1&&(s=1):a>-1&&(s=-1)}return a<0||r<0||s===0||s===1&&a===r-1&&a===o+1?"":e.slice(a,r)}function vb(...e){let t=-1,r;for(;++t0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function wb(e,t){let r="",o=0,a=-1,s=0,u=-1,f,p;for(;++u<=e.length;){if(u2){if(p=r.lastIndexOf("/"),p!==r.length-1){p<0?(r="",o=0):(r=r.slice(0,p),o=r.length-1-r.lastIndexOf("/")),a=u,s=0;continue}}else if(r.length>0){r="",o=0,a=u,s=0;continue}}t&&(r=r.length>0?r+"/..":"..",o=2)}else r.length>0?r+="/"+e.slice(a+1,u):r=e.slice(a+1,u),o=u-a-1;a=u,s=0}else f===46&&s>-1?s++:s=-1}return r}function Ro(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _b={cwd:kb};function kb(){return"/"}function kc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Sb(e){if(typeof e=="string")e=new URL(e);else if(!kc(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Eb(e)}function Eb(e){if(e.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const t=e.pathname;let r=-1;for(;++r0){let[k,...A]=v;const b=o[E][1];_c(b)&&_c(k)&&(k=wc(!0,b,k)),o[E]=[m,k,...A]}}}}const Tb=new Cc().freeze();function xc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Tc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ac(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Tv(e){if(!_c(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Av(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ms(e){return Ab(e)?e:new Cv(e)}function Ab(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Mb(e){return typeof e=="string"||Pb(e)}function Pb(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Lb="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Mv=[],Pv={allowDangerousHtml:!0},Ob=/^(https?|ircs?|mailto|xmpp)$/i,Ib=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Nb(e){const t=jb(e),r=Db(e);return Rb(t.runSync(t.parse(r),r),e)}function jb(e){const t=e.rehypePlugins||Mv,r=e.remarkPlugins||Mv,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Pv}:Pv;return Tb().use(h2).use(r).use(ub,o).use(t)}function Db(e){const t=e.children||"",r=new Cv;return typeof t=="string"&&(r.value=t),r}function Rb(e,t){const r=t.allowedElements,o=t.allowElement,a=t.components,s=t.disallowedElements,u=t.skipHtml,f=t.unwrapDisallowed,p=t.urlTransform||Fb;for(const v of Ib)Object.hasOwn(t,v.from)&&(""+v.from+(v.to?"use `"+v.to+"` instead":"remove it")+Lb+v.id,void 0);return _v(e,m),nS(e,{Fragment:Z.Fragment,components:a,ignoreInvalidStyle:!0,jsx:Z.jsx,jsxs:Z.jsxs,passKeys:!0,passNode:!0});function m(v,y,E){if(v.type==="raw"&&E&&typeof y=="number")return u?E.children.splice(y,1):E.children[y]={type:"text",value:v.value},y;if(v.type==="element"){let k;for(k in ic)if(Object.hasOwn(ic,k)&&Object.hasOwn(v.properties,k)){const A=v.properties[k],b=ic[k];(b===null||b.includes(v.tagName))&&(v.properties[k]=p(String(A||""),k,v))}}if(v.type==="element"){let k=r?!r.includes(v.tagName):s?s.includes(v.tagName):!1;if(!k&&o&&typeof y=="number"&&(k=!o(v,y,E)),k&&E&&typeof y=="number")return f&&v.children?E.children.splice(y,1,...v.children):E.children.splice(y,1),y}}}function Fb(e){const t=e.indexOf(":"),r=e.indexOf("?"),o=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||r!==-1&&t>r||o!==-1&&t>o||Ob.test(e.slice(0,t))?e:""}const zb=({content:e,isLoading:t,role:r})=>Z.jsxs("div",{className:"markdown-content",children:[Z.jsx(Nb,{components:{p:({children:o})=>Z.jsx("p",{className:"vapi-mb-3 last:vapi-mb-0",children:o}),ul:({children:o})=>Z.jsx("ul",{className:"vapi-list-disc vapi-list-inside vapi-mb-3 last:vapi-mb-0",children:o}),ol:({children:o})=>Z.jsx("ol",{className:"vapi-list-decimal vapi-list-inside vapi-mb-3 last:vapi-mb-0",children:o}),li:({children:o})=>Z.jsx("li",{className:"vapi-mb-0.5",children:o}),code:({children:o,...a})=>!("inline"in a)||a.inline?Z.jsx("code",{className:"vapi-px-1 vapi-py-0.5 vapi-rounded vapi-bg-black vapi-bg-opacity-10 vapi-text-sm",children:o}):Z.jsx("pre",{className:"vapi-p-2 vapi-rounded vapi-bg-black vapi-bg-opacity-10 vapi-overflow-x-auto vapi-text-sm",children:Z.jsx("code",{children:o})}),a:({children:o,href:a})=>Z.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"vapi-underline hover:vapi-opacity-80",children:o}),strong:({children:o})=>Z.jsx("strong",{className:"vapi-font-semibold",children:o}),em:({children:o})=>Z.jsx("em",{className:"vapi-italic",children:o}),h1:({children:o})=>Z.jsx("h1",{className:"vapi-text-lg vapi-font-bold vapi-mb-1",children:o}),h2:({children:o})=>Z.jsx("h2",{className:"vapi-text-base vapi-font-bold vapi-mb-1",children:o}),h3:({children:o})=>Z.jsx("h3",{className:"vapi-text-sm vapi-font-bold vapi-mb-1",children:o}),blockquote:({children:o})=>Z.jsx("blockquote",{className:"vapi-border-l-2 vapi-pl-2 vapi-my-3 vapi-opacity-80",children:o})},children:e}),t&&r==="assistant"&&Z.jsx("span",{className:"vapi-inline-block vapi-w-0.5 vapi-h-4 vapi-ml-0.5 vapi-bg-current vapi-animate-blink"})]}),Vb=({role:e,content:t,colors:r,styles:o,isLoading:a=!1})=>Z.jsx("div",{className:`vapi-flex ${e==="user"?"vapi-justify-end":"vapi-justify-start"}`,children:Z.jsx("div",{className:`vapi-max-w-xs vapi-px-3 vapi-py-2 ${mk[o.radius]} vapi-text-sm`,style:{backgroundColor:e==="user"?r.accentColor:(o.theme==="dark",r.baseColor),color:e==="user"||o.theme==="dark"?"#FFFFFF":"#1F2937",...e==="assistant"&&{filter:o.theme==="dark"?"brightness(1.5) contrast(0.9)":"brightness(0.95) contrast(1.05)"}},children:Z.jsx(zb,{content:t,isLoading:a,role:e})})}),Lv=({mode:e,isCallActive:t,theme:r,voiceEmptyMessage:o,voiceActiveEmptyMessage:a,chatEmptyMessage:s,hybridEmptyMessage:u})=>Z.jsxs("div",{className:"vapi-text-center",children:[Z.jsx("div",{className:`vapi-w-16 vapi-h-16 vapi-rounded-full vapi-flex vapi-items-center vapi-justify-center vapi-mx-auto vapi-mb-4 ${r==="dark"?"vapi-bg-gray-700":"vapi-bg-gray-100"}`,children:e==="voice"?Z.jsx(Ni,{size:32,className:"vapi-text-gray-400"}):Z.jsx(cg,{size:32,className:"vapi-text-gray-400"})}),Z.jsx("p",{className:`vapi-text-sm ${r==="dark"?"vapi-text-gray-400":"vapi-text-gray-500"}`,children:e==="voice"?t?a:o:e==="chat"?s:u})]}),Bb=({isCallActive:e,connectionStatus:t,isAvailable:r,isMuted:o,onToggleCall:a,onToggleMute:s,startButtonText:u,endButtonText:f,colors:p})=>Z.jsxs("div",{className:"vapi-flex vapi-items-center vapi-justify-center vapi-space-x-2",children:[e&&t==="connected"&&Z.jsx("button",{onClick:s,className:"vapi-h-12 vapi-w-12 vapi-flex vapi-items-center vapi-justify-center vapi-rounded-full vapi-transition-all hover:vapi-opacity-90 active:vapi-scale-95",style:{backgroundColor:o?"#ef4444":p.accentColor,color:p.ctaButtonTextColor||"white"},title:o?"Unmute microphone":"Mute microphone",children:o?Z.jsx($u,{size:20,weight:"fill"}):Z.jsx(Ni,{size:20,weight:"fill"})}),Z.jsx("button",{id:"vapi-voice-button",onClick:a,disabled:!r&&!e,className:`vapi-px-6 vapi-py-3 vapi-rounded-full vapi-font-medium vapi-transition-all vapi-flex vapi-items-center vapi-space-x-2 ${!r&&!e?"vapi-opacity-50 vapi-cursor-not-allowed":"hover:vapi-opacity-90 active:vapi-scale-95"}`,style:{backgroundColor:e?"#ef4444":p.accentColor,color:p.ctaButtonTextColor||"white"},children:t==="connecting"?Z.jsxs(Z.Fragment,{children:[Z.jsx("div",{className:"vapi-animate-spin vapi-w-4 vapi-h-4 vapi-border-2 vapi-border-current vapi-border-t-transparent vapi-rounded-full"}),Z.jsx("span",{children:"Connecting..."})]}):e?Z.jsxs(Z.Fragment,{children:[Z.jsx(Hu,{size:16,weight:"fill"}),Z.jsx("span",{children:f})]}):Z.jsxs(Z.Fragment,{children:[Z.jsx(Ni,{size:16,weight:"fill"}),Z.jsx("span",{children:u})]})})]}),Ub=({chatInput:e,isAvailable:t,onInputChange:r,onSendMessage:o,colors:a,styles:s,inputRef:u,placeholder:f="Type your message..."})=>Z.jsxs("div",{className:"vapi-flex vapi-items-center vapi-space-x-2",children:[Z.jsx("input",{ref:u,type:"text",value:e,onChange:r,onKeyPress:p=>p.key==="Enter"&&t&&o(),placeholder:f,className:`vapi-flex-1 vapi-px-3 vapi-py-2 vapi-rounded-lg vapi-border ${s.theme==="dark"?"vapi-border-gray-600 vapi-text-white vapi-placeholder-gray-400":"vapi-border-gray-300 vapi-text-gray-900 vapi-placeholder-gray-500"} focus:vapi-outline-none focus:vapi-ring-2`,style:{"--tw-ring-color":s.theme==="dark"?`${a.accentColor}33`:`${a.accentColor}80`,backgroundColor:a.baseColor,filter:s.theme==="dark"?"brightness(1.8)":"brightness(0.98)"}}),Z.jsx("button",{id:"vapi-chat-button",onClick:o,disabled:!e.trim()||!t,className:`vapi-h-10 vapi-w-10 vapi-flex vapi-items-center vapi-justify-center vapi-rounded-lg vapi-transition-all ${!e.trim()||!t?"vapi-opacity-50 vapi-cursor-not-allowed":"hover:vapi-opacity-90 active:vapi-scale-95"}`,style:{backgroundColor:a.accentColor,color:a.ctaButtonTextColor||"white"},children:Z.jsx(qu,{size:20,weight:"fill"})})]}),$b=({chatInput:e,isCallActive:t,connectionStatus:r,isChatAvailable:o,isVoiceAvailable:a,isMuted:s,onInputChange:u,onSendMessage:f,onToggleCall:p,onToggleMute:m,colors:v,styles:y,inputRef:E,placeholder:k="Type your message..."})=>Z.jsxs("div",{className:"vapi-flex vapi-items-center vapi-space-x-2",children:[Z.jsx("input",{ref:E,type:"text",value:e,onChange:u,onKeyPress:A=>A.key==="Enter"&&o&&!t&&f(),placeholder:k,disabled:t,className:`vapi-flex-1 vapi-px-3 vapi-py-2 vapi-rounded-lg vapi-border ${y.theme==="dark"?"vapi-border-gray-600 vapi-text-white vapi-placeholder-gray-400":"vapi-border-gray-300 vapi-text-gray-900 vapi-placeholder-gray-500"} focus:vapi-outline-none focus:vapi-ring-2 ${t?"vapi-opacity-50 vapi-cursor-not-allowed":""}`,style:{"--tw-ring-color":y.theme==="dark"?`${v.accentColor}33`:`${v.accentColor}80`,backgroundColor:v.baseColor,filter:y.theme==="dark"?"brightness(1.8)":"brightness(0.98)"}}),Z.jsx("button",{id:"vapi-chat-button",onClick:f,disabled:!e.trim()||!o||t,className:`vapi-h-10 vapi-w-10 vapi-flex vapi-items-center vapi-justify-center vapi-rounded-lg vapi-transition-all ${!e.trim()||!o||t?"vapi-opacity-50 vapi-cursor-not-allowed":"hover:vapi-opacity-90 active:vapi-scale-95"}`,style:{backgroundColor:v.accentColor,color:v.ctaButtonTextColor||"white"},title:"Send message",children:Z.jsx(qu,{size:20,weight:"fill"})}),t&&r==="connected"&&Z.jsx("button",{onClick:m,className:"vapi-h-10 vapi-w-10 vapi-flex vapi-items-center vapi-justify-center vapi-rounded-lg vapi-transition-all hover:vapi-opacity-90 active:vapi-scale-95",style:{backgroundColor:s?"#ef4444":v.accentColor,color:v.ctaButtonTextColor||"white"},title:s?"Unmute microphone":"Mute microphone",children:s?Z.jsx($u,{size:20,weight:"fill"}):Z.jsx(Ni,{size:20,weight:"fill"})}),Z.jsx("button",{id:"vapi-voice-button",onClick:p,disabled:!a&&!t,className:`vapi-h-10 vapi-w-10 vapi-flex vapi-items-center vapi-justify-center vapi-rounded-lg vapi-transition-all ${!a&&!t?"vapi-opacity-50 vapi-cursor-not-allowed":"hover:vapi-opacity-90 active:vapi-scale-95"}`,style:{backgroundColor:t?"#ef4444":v.accentColor,color:v.ctaButtonTextColor||"white"},title:r==="connecting"?"Connecting...":t?"Stop voice call":"Start voice call",children:r==="connecting"?Z.jsx("div",{className:"vapi-animate-spin vapi-w-5 vapi-h-5 vapi-border-2 vapi-border-current vapi-border-t-transparent vapi-rounded-full"}):t?Z.jsx(Hu,{size:20,weight:"fill"}):Z.jsx(Ni,{size:20,weight:"fill"})})]}),Ov={VapiWidget:({publicKey:e,assistantId:t,assistant:r,assistantOverrides:o,apiUrl:a,position:s="bottom-right",size:u="full",borderRadius:f,radius:p="medium",mode:m="chat",theme:v="light",baseBgColor:y,baseColor:E,accentColor:k,ctaButtonColor:A,buttonBaseColor:b,ctaButtonTextColor:O,buttonAccentColor:M,title:V,mainLabel:j,startButtonText:R,endButtonText:N,ctaTitle:L,ctaSubtitle:q,voiceEmptyMessage:Y,emptyVoiceMessage:re="Click the start button to begin a conversation",voiceActiveEmptyMessage:oe,emptyVoiceActiveMessage:se="Listening...",chatEmptyMessage:fe,emptyChatMessage:ie="Type a message to start chatting",hybridEmptyMessage:le,emptyHybridMessage:he="Use voice or text to communicate",chatFirstMessage:Se,firstChatMessage:Me,chatPlaceholder:K,voiceShowTranscript:de,showTranscript:x=!1,consentRequired:I,requireConsent:J=!1,consentTitle:d,consentContent:_,termsContent:w='By clicking "Agree," and each time I interact with this AI agent, I consent to the recording, storage, and sharing of my communications with third-party service providers, and as otherwise described in our Terms of Service.',consentStorageKey:C,localStorageKey:T="vapi_widget_consent",onVoiceStart:B,onCallStart:W,onVoiceEnd:Q,onCallEnd:pe,onMessage:Ce,onError:Oe})=>{const[ut,St]=F.useState(!1),[sn,qe]=F.useState(!1),[rt,vt]=F.useState(""),Et=F.useRef(null),dt=F.useRef(null),ln=f??p,Wt=y??E,or=k??"#14B8A6",Cr=b??A??"#000000",G=M??O??"#FFFFFF",ce=V??j??"Talk with AI",xe=L??ce,Ne=q,Re=R??"Start",ft=N??"End Call",yn=Y??re,Vt=oe??se,Ln=fe??ie,Hn=le??he,pt=Se??Me,Yt=de??x,bt=I??J,zo=d,Vo=_??w,Jn=C??T,xr=B??W,gs=Q??pe,Bo=K??"Type your message...",ke=fk({mode:m,publicKey:e,assistantId:t,assistant:r,assistantOverrides:o,apiUrl:a,firstChatMessage:pt,onCallStart:xr,onCallEnd:gs,onMessage:Ce,onError:Oe}),Ct={baseColor:Wt?v==="dark"&&Wt==="#FFFFFF"?"#000000":Wt:v==="dark"?"#000000":"#FFFFFF",accentColor:or,ctaButtonColor:Cr,ctaButtonTextColor:G},xt={size:m!=="voice"&&u==="tiny"?"compact":u,radius:ln,theme:v},vs=ut&&!(m==="voice"&&u==="tiny"),li=()=>({...sg[u].expanded,...pk[p],backgroundColor:Ct.baseColor,border:`1px solid ${xt.theme==="dark"?"#1F2937":"#E5E7EB"}`,display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:xt.theme==="dark"?"0 25px 50px -12px rgba(0, 0, 0, 0.5)":"0 25px 50px -12px rgb(0 0 0 / 0.25)"}),Uo=()=>({flex:"1 1 0%",padding:"1rem",overflowY:"auto",backgroundColor:Ct.baseColor,...xt.theme==="dark"?{filter:"brightness(1.1)"}:{}}),ui=()=>({padding:"1rem",borderTop:`1px solid ${xt.theme==="dark"?"#1F2937":"#E5E7EB"}`,backgroundColor:Ct.baseColor,...xt.theme==="dark"?{filter:"brightness(1.05)"}:{filter:"brightness(0.97)"}}),Pc=()=>{const Ot=ke.conversation.length===0,_n=!Yt&&ke.voice.isCallActive&&(m==="voice"||m==="hybrid"),Ar=m==="voice"&&!ke.voice.isCallActive;return Ot||_n||Ar?{display:"flex",alignItems:"center",justifyContent:"center"}:{display:"flex",flexDirection:"column",gap:"0.75rem"}};F.useEffect(()=>{if(bt){const _n=localStorage.getItem(Jn)==="true";qe(_n)}else qe(!0)},[bt,Jn]),F.useEffect(()=>{Et.current?.scrollIntoView({behavior:"smooth"})},[ke.conversation,ke.chat.isTyping]),F.useEffect(()=>{ut&&(m==="chat"||m==="hybrid")&&setTimeout(()=>{dt.current?.focus()},100)},[ut,m]);const ci=()=>{localStorage.setItem(Jn,"true"),qe(!0)},Bi=()=>{St(!1)},Tr=async()=>{await ke.voice.toggleCall()},Ui=async()=>{if(!rt.trim())return;const Ot=rt.trim();vt(""),await ke.chat.sendMessage(Ot),dt.current?.focus()},ys=Ot=>{const _n=Ot.target.value;vt(_n),ke.chat.handleInput(_n)},Lc=()=>{ke.clearConversation(),ke.voice.isCallActive&&ke.voice.endCall(),vt(""),(m==="chat"||m==="hybrid")&&setTimeout(()=>{dt.current?.focus()},100)},Oc=()=>{St(!0)},wn=()=>ke.conversation.length===0?Z.jsx(Lv,{mode:m,isCallActive:ke.voice.isCallActive,theme:xt.theme,voiceEmptyMessage:yn,voiceActiveEmptyMessage:Vt,chatEmptyMessage:Ln,hybridEmptyMessage:Hn}):Z.jsxs(Z.Fragment,{children:[ke.conversation.map((Ot,_n)=>{try{const Ar=Ot?.id||`${Ot.role}-${_n}`;return Z.jsx(Vb,{role:Ot.role,content:Ot.content||"",colors:Ct,styles:xt,isLoading:_n===ke.conversation.length-1&&Ot.role==="assistant"&&ke.chat.isTyping},Ar)}catch(Ar){return console.error("Error rendering message:",Ar,Ot),null}}),Z.jsx("div",{ref:Et})]}),ws=()=>m==="chat"?wn():m==="hybrid"?ke.voice.isCallActive?Yt?wn():Z.jsx(as,{size:150,connectionStatus:ke.voice.connectionStatus,isCallActive:ke.voice.isCallActive,isSpeaking:ke.voice.isSpeaking,isTyping:ke.chat.isTyping,volumeLevel:ke.voice.volumeLevel,baseColor:Ct.accentColor,colors:Ct.accentColor}):wn():m==="voice"&&ke.voice.isCallActive?Yt?wn():Z.jsx(as,{size:150,connectionStatus:ke.voice.connectionStatus,isCallActive:ke.voice.isCallActive,isSpeaking:ke.voice.isSpeaking,isTyping:ke.chat.isTyping,volumeLevel:ke.voice.volumeLevel,baseColor:Ct.accentColor,colors:Ct.accentColor}):Z.jsx(Lv,{mode:m,isCallActive:ke.voice.isCallActive,theme:xt.theme,voiceEmptyMessage:yn,voiceActiveEmptyMessage:Vt,chatEmptyMessage:Ln,hybridEmptyMessage:Hn}),_s=()=>m==="voice"?Z.jsx(Bb,{isCallActive:ke.voice.isCallActive,connectionStatus:ke.voice.connectionStatus,isAvailable:ke.voice.isAvailable,isMuted:ke.voice.isMuted,onToggleCall:Tr,onToggleMute:ke.voice.toggleMute,startButtonText:Re,endButtonText:ft,colors:Ct}):m==="chat"?Z.jsx(Ub,{chatInput:rt,isAvailable:ke.chat.isAvailable,onInputChange:ys,onSendMessage:Ui,colors:Ct,styles:xt,inputRef:dt,placeholder:Bo}):m==="hybrid"?Z.jsx($b,{chatInput:rt,isCallActive:ke.voice.isCallActive,connectionStatus:ke.voice.connectionStatus,isChatAvailable:ke.chat.isAvailable,isVoiceAvailable:ke.voice.isAvailable,isMuted:ke.voice.isMuted,onInputChange:ys,onSendMessage:Ui,onToggleCall:Tr,onToggleMute:ke.voice.toggleMute,colors:Ct,styles:xt,inputRef:dt,placeholder:Bo}):null,Ic=()=>bt&&!sn?Z.jsx(vk,{consentTitle:zo,consentContent:Vo,onAccept:ci,onCancel:Bi,colors:Ct,styles:xt,radius:p}):Z.jsxs("div",{style:li(),children:[Z.jsx(Tk,{mode:m,connectionStatus:ke.voice.connectionStatus,isCallActive:ke.voice.isCallActive,isSpeaking:ke.voice.isSpeaking,isTyping:ke.chat.isTyping,hasActiveConversation:ke.conversation.length>0,mainLabel:ce,onClose:()=>St(!1),onReset:Lc,colors:Ct,styles:xt}),Z.jsx("div",{className:"vapi-conversation-area",style:{...Uo(),...Pc()},children:ws()}),Z.jsx("div",{style:ui(),children:_s()})]});return Z.jsx("div",{className:"vapi-widget-wrapper",children:Z.jsx("div",{style:{position:"fixed",zIndex:9999,...gk[s]},children:vs?Ic():Z.jsx(yk,{isCallActive:ke.voice.isCallActive,connectionStatus:ke.voice.connectionStatus,isSpeaking:ke.voice.isSpeaking,isTyping:ke.chat.isTyping,volumeLevel:ke.voice.volumeLevel,onClick:Oc,onToggleCall:Tr,mainLabel:ce,ctaTitle:xe,ctaSubtitle:Ne,colors:Ct,styles:xt,mode:m})})})}};class Fo{root;container;constructor(t){if(this.container=typeof t.container=="string"?document.querySelector(t.container):t.container,!this.container)throw new Error("Container element not found");const r=Ov[t.component];if(!r)throw new Error(`Component "${t.component}" not found`);this.root=h1.createRoot(this.container),this.root.render(l1.createElement(r,t.props||{}))}destroy(){this.root&&(this.root.unmount(),this.root=null)}}function qb(e){return e.replace(/-([a-z])/g,t=>t[1].toUpperCase())}function Iv(e){return e==="true"?!0:e==="false"?!1:!isNaN(Number(e))&&e!==""?Number(e):e}function Nv(){document.querySelectorAll('[data-client-widget="VapiWidget"]').forEach(o=>{const a=o;let s={};const u=a.getAttribute("data-props");if(u)try{s=JSON.parse(u)}catch(f){console.error("Failed to parse data-props:",f)}Array.from(a.attributes).forEach(f=>{if(f.name.startsWith("data-")&&f.name!=="data-client-widget"&&f.name!=="data-props"){const p=qb(f.name.replace("data-",""));if(p==="assistantOverrides"||p==="assistant")try{s[p]=JSON.parse(f.value)}catch(m){console.warn(`Failed to parse ${f.name} JSON:`,m),s[p]=f.value}else s[p]=Iv(f.value)}}),s.publicKey||(console.warn("VapiWidget: publicKey is required but not provided"),s.publicKey="demo-key"),s.assistantId||(console.warn("VapiWidget: assistantId is required but not provided"),s.assistantId="demo-assistant");try{new Fo({container:a,component:"VapiWidget",props:s})}catch(f){console.error("Failed to initialize VapiWidget:",f)}}),document.querySelectorAll("vapi-widget").forEach(o=>{const a=o,s={};Object.entries({mode:"mode",theme:"theme",position:"position",size:"size","border-radius":"borderRadius",radius:"radius","base-bg-color":"baseBgColor","accent-color":"accentColor","cta-button-color":"ctaButtonColor","cta-button-text-color":"ctaButtonTextColor",title:"title","cta-title":"ctaTitle","cta-subtitle":"ctaSubtitle","start-button-text":"startButtonText","end-button-text":"endButtonText","voice-empty-message":"voiceEmptyMessage","voice-active-empty-message":"voiceActiveEmptyMessage","chat-empty-message":"chatEmptyMessage","hybrid-empty-message":"hybridEmptyMessage","chat-first-message":"chatFirstMessage","chat-placeholder":"chatPlaceholder","voice-show-transcript":"voiceShowTranscript","consent-required":"consentRequired","consent-title":"consentTitle","consent-content":"consentContent","consent-storage-key":"consentStorageKey","api-url":"apiUrl","public-key":"publicKey","assistant-id":"assistantId","assistant-overrides":"assistantOverrides",assistant:"assistant","base-color":"baseColor","button-base-color":"buttonBaseColor","button-accent-color":"buttonAccentColor","main-label":"mainLabel","empty-voice-message":"emptyVoiceMessage","empty-voice-active-message":"emptyVoiceActiveMessage","empty-chat-message":"emptyChatMessage","empty-hybrid-message":"emptyHybridMessage","first-chat-message":"firstChatMessage","show-transcript":"showTranscript","require-consent":"requireConsent","terms-content":"termsContent","local-storage-key":"localStorageKey"}).forEach(([f,p])=>{const m=a.getAttribute(f);if(m!==null)if(p==="assistantOverrides"||p==="assistant")try{s[p]=JSON.parse(m)}catch(v){console.warn(`Failed to parse ${f} JSON:`,v)}else s[p]=Iv(m)}),s.publicKey||(console.warn("VapiWidget: publicKey is required but not provided"),s.publicKey="demo-key"),s.assistantId||(console.warn("VapiWidget: assistantId is required but not provided"),s.assistantId="demo-assistant");try{new Fo({container:a,component:"VapiWidget",props:s})}catch(f){console.error("Failed to initialize VapiWidget from custom element:",f)}}),document.querySelectorAll("[data-client-widget]").forEach(o=>{const a=o,s=a.getAttribute("data-client-widget");if(s!=="VapiWidget"&&s&&s in Ov){const u=a.getAttribute("data-props");let f={};if(u)try{f=JSON.parse(u)}catch(p){console.error("Failed to parse data-props:",p)}try{new Fo({container:a,component:s,props:f})}catch(p){console.error(`Failed to initialize ${s}:`,p)}}})}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Nv):Nv(),typeof window<"u"&&(window.WidgetLoader=Fo),Fo});