PageSourceSearch

https://fancy-medovik-8adafb.netlify.app/assets/index-BOPgKFmj.js

js fancy-medovik-8adafb.netlify.app collected 2026-10-03 10:43:25 UTC 654,530 bytes, 302 lines download raw bytes

vendor: 4,966 bytes, lines 1-9
1var Xw=Object.defineProperty;var Zw=(t,e,r)=>e in t?Xw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Y=(t,e,r)=>Zw(t,typeof e!="symbol"?e+"":e,r);function e_(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var ft=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function t_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Gm(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Ym={exports:{}},qa={},Km={exports:{}},ee={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var Ws=Symbol.for("react.element"),r_=Symbol.for("react.portal"),n_=Symbol.for("react.fragment"),i_=Symbol.for("react.strict_mode"),s_=Symbol.for("react.profiler"),o_=Symbol.for("react.provider"),a_=Symbol.for("react.context"),l_=Symbol.for("react.forward_ref"),c_=Symbol.for("react.suspense"),u_=Symbol.for("react.memo"),d_=Symbol.for("react.lazy"),Eh=Symbol.iterator;function h_(t){return t===null||typeof t!="object"?null:(t=Eh&&t[Eh]||t["@@iterator"],typeof t=="function"?t:null)}var Qm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Xm=Object.assign,Zm={};function Ii(t,e,r){this.props=t,this.context=e,this.refs=Zm,this.updater=r||Qm}Ii.prototype.isReactComponent={};Ii.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};Ii.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function eg(){}eg.prototype=Ii.prototype;function ad(t,e,r){this.props=t,this.context=e,this.refs=Zm,this.updater=r||Qm}var ld=ad.prototype=new eg;ld.constructor=ad;Xm(ld,Ii.prototype);ld.isPureReactComponent=!0;var Ch=Array.isArray,tg=Object.prototype.hasOwnProperty,cd={current:null},rg={key:!0,ref:!0,__self:!0,__source:!0};function ng(t,e,r){var n,i={},s=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)tg.call(e,n)&&!rg.hasOwnProperty(n)&&(i[n]=e[n]);var a=arguments.length-2;if(a===1)i.children=r;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(t&&t.defaultProps)for(n in a=t.defaultProps,a)i[n]===void 0&&(i[n]=a[n]);return{$$typeof:Ws,type:t,key:s,ref:o,props:i,_owner:cd.current}}function f_(t,e){return{$$typeof:Ws,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function ud(t){return typeof t=="object"&&t!==null&&t.$$typeof===Ws}function p_(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var jh=/\/+/g;function El(t,e){return typeof t=="object"&&t!==null&&t.key!=null?p_(""+t.key):e.toString(36)}function zo(t,e,r,n,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Ws:case r_:o=!0}}if(o)return o=t,i=i(o),t=n===""?"."+El(o,0):n,Ch(i)?(r="",t!=null&&(r=t.replace(jh,"$&/")+"/"),zo(i,e,r,"",function(u){return u})):i!=null&&(ud(i)&&(i=f_(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(jh,"$&/")+"/")+t)),e.push(i)),1;if(o=0,n=n===""?".":n+":",Ch(t))for(var a=0;a<t.length;a++){s=t[a];var l=n+El(s,a);o+=zo(s,e,r,l,i)}
vendor: 4,237 bytes, lines 9-17
9else if(l=h_(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=n+El(s,a++),o+=zo(s,e,r,l,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function oo(t,e,r){if(t==null)return t;var n=[],i=0;return zo(t,n,"","",function(s){return e.call(r,s,i++)}),n}function m_(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var it={current:null},Vo={transition:null},g_={ReactCurrentDispatcher:it,ReactCurrentBatchConfig:Vo,ReactCurrentOwner:cd};function ig(){throw Error("act(...) is not supported in production builds of React.")}ee.Children={map:oo,forEach:function(t,e,r){oo(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return oo(t,function(){e++}),e},toArray:function(t){return oo(t,function(e){return e})||[]},only:function(t){if(!ud(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};ee.Component=Ii;ee.Fragment=n_;ee.Profiler=s_;ee.PureComponent=ad;ee.StrictMode=i_;ee.Suspense=c_;ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g_;ee.act=ig;ee.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=Xm({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=cd.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)tg.call(e,l)&&!rg.hasOwnProperty(l)&&(n[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:Ws,type:t.type,key:i,ref:s,props:n,_owner:o}};ee.createContext=function(t){return t={$$typeof:a_,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:o_,_context:t},t.Consumer=t};ee.createElement=ng;ee.createFactory=function(t){var e=ng.bind(null,t);return e.type=t,e};ee.createRef=function(){return{current:null}};ee.forwardRef=function(t){return{$$typeof:l_,render:t}};ee.isValidElement=ud;ee.lazy=function(t){return{$$typeof:d_,_payload:{_status:-1,_result:t},_init:m_}};ee.memo=function(t,e){return{$$typeof:u_,type:t,compare:e===void 0?null:e}};ee.startTransition=function(t){var e=Vo.transition;Vo.transition={};try{t()}finally{Vo.transition=e}};ee.unstable_act=ig;ee.useCallback=function(t,e){return it.current.useCallback(t,e)};ee.useContext=function(t){return it.current.useContext(t)};ee.useDebugValue=function(){};ee.useDeferredValue=function(t){return it.current.useDeferredValue(t)};ee.useEffect=function(t,e){return it.current.useEffect(t,e)};ee.useId=function(){return it.current.useId()};ee.useImperativeHandle=function(t,e,r){return it.current.useImperativeHandle(t,e,r)};ee.useInsertionEffect=function(t,e){return it.current.useInsertionEffect(t,e)};ee.useLayoutEffect=function(t,e){return it.current.useLayoutEffect(t,e)};ee.useMemo=function(t,e){return it.current.useMemo(t,e)};ee.useReducer=function(t,e,r){return it.current.useReducer(t,e,r)};ee.useRef=function(t){return it.current.useRef(t)};ee.useState=function(t){return it.current.useState(t)};ee.useSyncExternalStore=function(t,e,r){return it.current.useSyncExternalStore(t,e,r)};ee.useTransition=function(){return it.current.useTransition()};ee.version="18.3.1";Km.exports=ee;var O=Km.exports;const v_=t_(O),y_=e_({__proto__:null,default:v_},[O]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var w_=O,__=Symbol.for("react.element"),b_=Symbol.for("react.fragment"),x_=Object.prototype.hasOwnProperty,k_=w_.__SECRET_INT
vendor: 8,869 bytes, lines 17-33
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S_={key:!0,ref:!0,__self:!0,__source:!0};function sg(t,e,r){var n,i={},s=null,o=null;r!==void 0&&(s=""+r),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)x_.call(e,n)&&!S_.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:__,type:t,key:s,ref:o,props:i,_owner:k_.current}}qa.Fragment=b_;qa.jsx=sg;qa.jsxs=sg;Ym.exports=qa;var h=Ym.exports,og={exports:{}},_t={},ag={exports:{}},lg={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(t){function e($,V){var q=$.length;$.push(V);e:for(;0<q;){var ce=q-1>>>1,ke=$[ce];if(0<i(ke,V))$[ce]=V,$[q]=ke,q=ce;else break e}}function r($){return $.length===0?null:$[0]}function n($){if($.length===0)return null;var V=$[0],q=$.pop();if(q!==V){$[0]=q;e:for(var ce=0,ke=$.length,c=ke>>>1;ce<c;){var m=2*(ce+1)-1,p=$[m],S=m+1,C=$[S];if(0>i(p,q))S<ke&&0>i(C,p)?($[ce]=C,$[S]=q,ce=S):($[ce]=p,$[m]=q,ce=m);else if(S<ke&&0>i(C,q))$[ce]=C,$[S]=q,ce=S;else break e}}return V}function i($,V){var q=$.sortIndex-V.sortIndex;return q!==0?q:$.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],d=1,f=null,_=3,x=!1,k=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y($){for(var V=r(u);V!==null;){if(V.callback===null)n(u);else if(V.startTime<=$)n(u),V.sortIndex=V.expirationTime,e(l,V);else break;V=r(u)}}function E($){if(v=!1,y($),!k)if(r(l)!==null)k=!0,ye(j);else{var V=r(u);V!==null&&Me(E,V.startTime-$)}}function j($,V){k=!1,v&&(v=!1,g(D),D=-1),x=!0;var q=_;try{for(y(V),f=r(l);f!==null&&(!(f.expirationTime>V)||$&&!G());){var ce=f.callback;if(typeof ce=="function"){f.callback=null,_=f.priorityLevel;var ke=ce(f.expirationTime<=V);V=t.unstable_now(),typeof ke=="function"?f.callback=ke:f===r(l)&&n(l),y(V)}else n(l);f=r(l)}if(f!==null)var c=!0;else{var m=r(u);m!==null&&Me(E,m.startTime-V),c=!1}return c}finally{f=null,_=q,x=!1}}var T=!1,P=null,D=-1,Q=5,A=-1;function G(){return!(t.unstable_now()-A<Q)}function J(){if(P!==null){var $=t.unstable_now();A=$;var V=!0;try{V=P(!0,$)}finally{V?le():(T=!1,P=null)}}else T=!1}var le;if(typeof w=="function")le=function(){w(J)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,Ie=xe.port2;xe.port1.onmessage=J,le=function(){Ie.postMessage(null)}}else le=function(){b(J,0)};function ye($){P=$,T||(T=!0,le())}function Me($,V){D=b(function(){$(t.unstable_now())},V)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function($){$.callback=null},t.unstable_continueExecution=function(){k||x||(k=!0,ye(j))},t.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<$?Math.floor(1e3/$):5},t.unstable_getCurrentPriorityLevel=function(){return _},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function($){switch(_){case 1:case 2:case 3:var V=3;break;default:V=_}var q=_;_=V;try{return $()}finally{_=q}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function($,V){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var q=_;_=$;try{return V()}finally{_=q}},t.unstable_scheduleCallback=function($,V,q){var ce=t.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?ce+q:ce):q=ce,$){case 1:var ke=-1;break;case 2:ke=250;break;case 5:ke=1073741823;break;case 4:ke=1e4;break;default:ke=5e3}return ke=q+ke,$={id:d++,callback:V,priorityLevel:$,startTime:q,expirationTime:ke,sortIndex:-1},q>ce?($.sortIndex=q,e(u,$),r(l)===null&&$===r(u)&&(v?(g(D),D=-1):v=!0,Me(E,q-ce))):($.sortIndex=ke,e(l,$),k||x||(k=!0,ye(j))),$},t.unstable_shouldYield=G,t.unstable_wrapCallback=function($){var V=_;return function(){var q=_;_=V;try{return $.apply(this,arguments)}finally{_=q}}}})(lg);ag.exports=lg;var E_=ag.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var C_=O,wt=E_;function L(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var cg=new Set,Ss={};function Ln(t,e){_i(t,e),_i(t+"Capture",e)}function _i(t,e){for(Ss[t]=e,t=0;t<e.length;t++)cg.add(e[t])}var vr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sc=Object.prototype.hasOwnProperty,j_=/^[: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]*$/,Th={},Ph={};function T_(t){return Sc.call(Ph,t)?!0:Sc.call(Th,t)?!1:j_.test(t)?Ph[t]=!0:(Th[t]=!0,!1)}function P_(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function O_(t,e,r,n){if(e===null||typeof e>"u"||P_(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function st(t,e,r,n,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Je={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Je[t]=new st(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Je[e]=new st(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Je[t]=new st(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Je[t]=new st(t,2,!1,t,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(t){Je[t]=new st(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Je[t]=new st(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Je[t]=new st(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Je[t]=new st(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Je[t]=new st(t,5,!1,t.toLowerCase(),null,!1,!1)});var dd=/[\-:]([a-z])/g;function hd(t){return t[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
33-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(t){var e=t.replace(dd,hd);Je[e]=new st(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(dd,hd);Je[e]=new st(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(dd,hd);Je[e]=new st(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Je[t]=new st(t,1,!1,t.toLowerCase(),null,!1,!1)});Je.xlinkHref=new st("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Je[t]=new st(t,1,!1,t.toLowerCase(),null,!0,!0)});function fd(t,e,r,n){var i=Je.hasOwnProperty(e)?Je[e]:null;(i!==null?i.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(O_(e,r,i,n)&&(r=null),n||i===null?T_(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):i.mustUseProperty?t[i.propertyName]=r===null?i.type===3?!1:"":r:(e=i.attributeName,n=i.attributeNamespace,r===null?t.removeAttribute(e):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var br=C_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ao=Symbol.for("react.element"),Qn=Symbol.for("react.portal"),Xn=Symbol.for("react.fragment"),pd=Symbol.for("react.strict_mode"),Ec=Symbol.for("react.profiler"),ug=Symbol.for("react.provider"),dg=Symbol.for("react.context"),md=Symbol.for("react.forward_ref"),Cc=Symbol.for("react.suspense"),jc=Symbol.for("react.suspense_list"),gd=Symbol.for("react.memo"),jr=Symbol.for("react.lazy"),hg=Symbol.for("react.offscreen"),Oh=Symbol.iterator;function qi(t){return t===null||typeof t!="object"?null:(t=Oh&&t[Oh]||t["@@iterator"],typeof t=="function"?t:null)}var Ce=Object.assign,Cl;function ts(t){if(Cl===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);Cl=e&&e[1]||""}return`
34`+Cl+t}var jl=!1;function Tl(t,e){if(!t||jl)return"";jl=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var n=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){n=u}t.call(e.prototype)}else{try{throw Error()}catch(u){n=u}t()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split(`
35`),s=n.stack.split(`
36`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
37`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{jl=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?ts(t):""}function N_(t){switch(t.tag){case 5:return ts(t.type);case 16:return ts("Lazy");case 13:return ts("Suspense");case 19:return ts("SuspenseList");case 0:case 2:case 15:return t=Tl(t.type,!1),t;case 11:return t=Tl(t.type.render,!1),t;case 1:return t=Tl(t.type,!0),t;default:return""}}function Tc(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Xn:return"Fragment";case Qn:return"Portal";case Ec:return"Profiler";case pd:return"StrictMode";case Cc:return"Suspense";case jc:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case dg:return(t.displayName||"Context")+".Consumer";case ug:return(t._context.displayName||"Context")+".Provider";case md:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case gd:return e=t.displayName||null,e!==null?e:Tc(t.type)||"Memo";case jr:e=t._payload,t=t._init;try{return Tc(t(e))}catch{}}return null}function A_(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Tc(e);case 8:return e===pd?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Gr(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function fg(t){var e=t.type;
vendor: 14,320 bytes, line 37
37return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function I_(t){var e=fg(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function lo(t){t._valueTracker||(t._valueTracker=I_(t))}function pg(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=fg(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function oa(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Pc(t,e){var r=e.checked;return Ce({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function Nh(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Gr(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function mg(t,e){e=e.checked,e!=null&&fd(t,"checked",e,!1)}function Oc(t,e){mg(t,e);var r=Gr(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Nc(t,e.type,r):e.hasOwnProperty("defaultValue")&&Nc(t,e.type,Gr(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Ah(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Nc(t,e,r){(e!=="number"||oa(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var rs=Array.isArray;function ui(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e["$"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty("$"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=""+Gr(r),e=null,i=0;i<t.length;i++){if(t[i].value===r){t[i].selected=!0,n&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function Ac(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(L(91));return Ce({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Ih(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(L(92));if(rs(r)){if(1<r.length)throw Error(L(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:Gr(r)}}function gg(t,e){var r=Gr(e.value),n=Gr(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function Mh(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function vg(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ic(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?vg(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var co,yg=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(co=co||document.createElement("div"),co.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=co.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Es(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var us={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},M_=["Webkit","ms","Moz","O"];Object.keys(us).forEach(function(t){M_.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),us[e]=us[t]})});function wg(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||us.hasOwnProperty(t)&&us[t]?(""+e).trim():e+"px"}function _g(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=wg(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var L_=Ce({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 Mc(t,e){if(e){if(L_[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(L(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(L(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(L(61))}if(e.style!=null&&typeof e.style!="object")throw Error(L(62))}}function Lc(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Rc=null;function vd(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Dc=null,di=null,hi=null;function Lh(t){if(t=Ys(t)){if(typeof Dc!="function")throw Error(L(280));var e=t.stateNode;e&&(e=Ya(e),Dc(t.stateNode,t.type,e))}}function bg(t){di?hi?hi.push(t):hi=[t]:di=t}function xg(){if(di){var t=di,e=hi;if(hi=di=null,Lh(t),e)for(t=0;t<e.length;t++)Lh(e[t])}}function kg(t,e){return t(e)}function Sg(){}var Pl=!1;function Eg(t,e,r){if(Pl)return t(e,r);Pl=!0;try{return kg(t,e,r)}finally{Pl=!1,(di!==null||hi!==null)&&(Sg(),xg())}}function Cs(t,e){var r=t.stateNode;if(r===null)return null;var n=Ya(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(L(231,e,typeof r));return r}var $c=!1;if(vr)try{var Ji={};Object.defineProperty(Ji,"passive",{get:function(){$c=!0}}),window.addEventListener("test",Ji,Ji),window.removeEventListener("test",Ji,Ji)}catch{$c=!1}function R_(t,e,r,n,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(r,u)}catch(d){this.onError(d)}}var ds=!1,aa=null,la=!1,Uc=null,D_={onError:function(t){ds=!0,aa=t}};function $_(t,e,r,n,i,s,o,a,l){ds=!1,aa=null,R_.apply(D_,arguments)}function U_(t,e,r,n,i,s,o,a,l){if($_.apply(this,arguments),ds){if(ds){var u=aa;ds=!1,aa=null}else throw Error(L(198));la||(la=!0,Uc=u)}}function Rn(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function Cg(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Rh(t){if(Rn(t)!==t)throw Error(L(188))}function F_(t){var e=t.alternate;if(!e){if(e=Rn(t),e===null)throw Error(L(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(i===null)break;var s=i.alternate;if(s===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return Rh(i),t;if(s===n)return Rh(i),e;s=s.sibling}throw Error(L(188))}if(r.return!==n.return)r=i,n=s;else{for(var o=!1,a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o)throw Error(L(189))}}if(r.alternate!==n)throw Error(L(190))}if(r.tag!==3)throw Error(L(188));return r.stateNode.current===r?t:e}function jg(t){return t=F_(t),t!==null?Tg(t):null}function Tg(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Tg(t);if(e!==null)return e;t=t.sibling}return null}var Pg=wt.unstable_scheduleCallback,Dh=wt.unstable_cancelCallback,B_=wt.unstable_shouldYield,z_=wt.unstable_requestPaint,Oe=wt.unstable_now,V_=wt.unstable_getCurrentPriorityLevel,yd=wt.unstable_ImmediatePriority,Og=wt.unstable_UserBlockingPriority,ca=wt.unstable_NormalPriority,q_=wt.unstable_LowPriority,Ng=wt.unstable_IdlePriority,Ja=null,tr=null;function J_(t){if(tr&&typeof tr.onCommitFiberRoot=="function")try{tr.onCommitFiberRoot(Ja,t,void 0,(t.current.flags&128)===128)}catch{}}var Vt=Math.clz32?Math.clz32:G_,W_=Math.log,H_=Math.LN2;function G_(t){return t>>>=0,t===0?32:31-(W_(t)/H_|0)|0}var uo=64,ho=4194304;function ns(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ua(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,s=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;a!==0?n=ns(a):(s&=o,s!==0&&(n=ns(s)))}else o=r&~i,o!==0?n=ns(o):s!==0&&(n=ns(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-Vt(e),i=1<<r,n|=t[r],e&=~i;return n}function Y_(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 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 e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function K_(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Vt(s),a=1<<o,l=i[o];l===-1?(!(a&r)||a&n)&&(i[o]=Y_(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function Fc(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Ag(){var t=uo;return uo<<=1,!(uo&4194240)&&(uo=64),t}function Ol(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function Hs(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Vt(e),t[e]=r}function Q_(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var i=31-Vt(r),s=1<<i;e[i]=0,n[i]=-1,t[i]=-1,r&=~s}}function wd(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-Vt(r),i=1<<n;i&e|t[n]&e&&(t[n]|=e),r&=~i}}var ue=0;function Ig(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Mg,_d,Lg,Rg,Dg,Bc=!1,fo=[],$r=null,Ur=null,Fr=null,js=new Map,Ts=new Map,Nr=[],X_="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function $h(t,e){switch(t){case"focusin":case"focusout":$r=null;break;case"dragenter":case"dragleave":Ur=null;break;case"mouseover":case"mouseout":Fr=null;break;case"pointerover":case"pointerout":js.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ts.delete(e.pointerId)}}function Wi(t,e,r,n,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:s,targetContainers:[i]},e!==null&&(e=Ys(e),e!==null&&_d(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function Z_(t,e,r,n,i){switch(e){case"focusin":return $r=Wi($r,t,e,r,n,i),!0;case"dragenter":return Ur=Wi(Ur,t,e,r,n,i),!0;case"mouseover":return Fr=Wi(Fr,t,e,r,n,i),!0;case"pointerover":var s=i.pointerId;return js.set(s,Wi(js.get(s)||null,t,e,r,n,i)),!0;case"gotpointercapture":return s=i.pointerId,Ts.set(s,Wi(Ts.get(s)||null,t,e,r,n,i)),!0}return!1}function $g(t){var e=pn(t.target);if(e!==null){var r=Rn(e);if(r!==null){if(e=r.tag,e===13){if(e=Cg(r),e!==null){t.blockedOn=e,Dg(t.priority,function(){Lg(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function qo(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=zc(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);Rc=n,r.target.dispatchEvent(n),Rc=null}else return e=Ys(r),e!==null&&_d(e),t.blockedOn=r,!1;e.shift()}return!0}function Uh(t,e,r){qo(t)&&r.delete(e)}function eb(){Bc=!1,$r!==null&&qo($r)&&($r=null),Ur!==null&&qo(Ur)&&(Ur=null),Fr!==null&&qo(Fr)&&(Fr=null),js.forEach(Uh),Ts.forEac
vendor: 11,826 bytes, line 37
37h(Uh)}function Hi(t,e){t.blockedOn===e&&(t.blockedOn=null,Bc||(Bc=!0,wt.unstable_scheduleCallback(wt.unstable_NormalPriority,eb)))}function Ps(t){function e(i){return Hi(i,t)}if(0<fo.length){Hi(fo[0],t);for(var r=1;r<fo.length;r++){var n=fo[r];n.blockedOn===t&&(n.blockedOn=null)}}for($r!==null&&Hi($r,t),Ur!==null&&Hi(Ur,t),Fr!==null&&Hi(Fr,t),js.forEach(e),Ts.forEach(e),r=0;r<Nr.length;r++)n=Nr[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<Nr.length&&(r=Nr[0],r.blockedOn===null);)$g(r),r.blockedOn===null&&Nr.shift()}var fi=br.ReactCurrentBatchConfig,da=!0;function tb(t,e,r,n){var i=ue,s=fi.transition;fi.transition=null;try{ue=1,bd(t,e,r,n)}finally{ue=i,fi.transition=s}}function rb(t,e,r,n){var i=ue,s=fi.transition;fi.transition=null;try{ue=4,bd(t,e,r,n)}finally{ue=i,fi.transition=s}}function bd(t,e,r,n){if(da){var i=zc(t,e,r,n);if(i===null)Fl(t,e,n,ha,r),$h(t,n);else if(Z_(i,t,e,r,n))n.stopPropagation();else if($h(t,n),e&4&&-1<X_.indexOf(t)){for(;i!==null;){var s=Ys(i);if(s!==null&&Mg(s),s=zc(t,e,r,n),s===null&&Fl(t,e,n,ha,r),s===i)break;i=s}i!==null&&n.stopPropagation()}else Fl(t,e,n,null,r)}}var ha=null;function zc(t,e,r,n){if(ha=null,t=vd(n),t=pn(t),t!==null)if(e=Rn(t),e===null)t=null;else if(r=e.tag,r===13){if(t=Cg(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return ha=t,null}function Ug(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(V_()){case yd:return 1;case Og:return 4;case ca:case q_:return 16;case Ng:return 536870912;default:return 16}default:return 16}}var Lr=null,xd=null,Jo=null;function Fg(){if(Jo)return Jo;var t,e=xd,r=e.length,n,i="value"in Lr?Lr.value:Lr.textContent,s=i.length;for(t=0;t<r&&e[t]===i[t];t++);var o=r-t;for(n=1;n<=o&&e[r-n]===i[s-n];n++);return Jo=i.slice(t,1<n?1-n:void 0)}function Wo(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function po(){return!0}function Fh(){return!1}function bt(t){function e(r,n,i,s,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(r=t[a],this[a]=r?r(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?po:Fh,this.isPropagationStopped=Fh,this}return Ce(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=po)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=po)},persist:function(){},isPersistent:po}),e}var Mi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kd=bt(Mi),Gs=Ce({},Mi,{view:0,detail:0}),nb=bt(Gs),Nl,Al,Gi,Wa=Ce({},Gs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sd,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Gi&&(Gi&&t.type==="mousemove"?(Nl=t.screenX-Gi.screenX,Al=t.screenY-Gi.screenY):Al=Nl=0,Gi=t),Nl)},movementY:function(t){return"movementY"in t?t.movementY:Al}}),Bh=bt(Wa),ib=Ce({},Wa,{dataTransfer:0}),sb=bt(ib),ob=Ce({},Gs,{relatedTarget:0}),Il=bt(ob),ab=Ce({},Mi,{animationName:0,elapsedTime:0,pseudoElement:0}),lb=bt(ab),cb=Ce({},Mi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),ub=bt(cb),db=Ce({},Mi,{data:0}),zh=bt(db),hb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fb={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},pb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mb(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=pb[t])?!!e[t]:!1}function Sd(){return mb}var gb=Ce({},Gs,{key:function(t){if(t.key){var e=hb[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Wo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?fb[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sd,charCode:function(t){return t.type==="keypress"?Wo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Wo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),vb=bt(gb),yb=Ce({},Wa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vh=bt(yb),wb=Ce({},Gs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sd}),_b=bt(wb),bb=Ce({},Mi,{propertyName:0,elapsedTime:0,pseudoElement:0}),xb=bt(bb),kb=Ce({},Wa,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Sb=bt(kb),Eb=[9,13,27,32],Ed=vr&&"CompositionEvent"in window,hs=null;vr&&"documentMode"in document&&(hs=document.documentMode);var Cb=vr&&"TextEvent"in window&&!hs,Bg=vr&&(!Ed||hs&&8<hs&&11>=hs),qh=" ",Jh=!1;function zg(t,e){switch(t){case"keyup":return Eb.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Zn=!1;function jb(t,e){switch(t){case"compositionend":return Vg(e);case"keypress":return e.which!==32?null:(Jh=!0,qh);case"textInput":return t=e.data,t===qh&&Jh?null:t;default:return null}}function Tb(t,e){if(Zn)return t==="compositionend"||!Ed&&zg(t,e)?(t=Fg(),Jo=xd=Lr=null,Zn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Bg&&e.locale!=="ko"?null:e.data;default:return null}}var Pb={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Pb[t.type]:e==="textarea"}function qg(t,e,r,n){bg(n),e=fa(e,"onChange"),0<e.length&&(r=new kd("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var fs=null,Os=null;function Ob(t){tv(t,0)}function Ha(t){var e=ri(t);if(pg(e))return t}function Nb(t,e){if(t==="change")return e}var Jg=!1;if(vr){var Ml;if(vr){var Ll="oninput"in document;if(!Ll){var Hh=document.createElement("div");Hh.setAttribute("oninput","return;"),Ll=typeof Hh.oninput=="function"}Ml=Ll}else Ml=!1;Jg=Ml&&(!document.documentMode||9<document.documentMode)}function Gh(){fs&&(fs.detachEvent("onpropertychange",Wg),Os=fs=null)}function Wg(t){if(t.propertyName==="value"&&Ha(Os)){var e=[];qg(e,Os,t,vd(t)),Eg(Ob,e)}}function Ab(t,e,r){t==="focusin"?(Gh(),fs=e,Os=r,fs.attachEvent("onpropertychange",Wg)):t==="focusout"&&Gh()}function Ib(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ha(Os)}function Mb(t,e){if(t==="click")return Ha(e)}function Lb(t,e){if(t==="input"||t==="change")return Ha(e)}function Rb(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Wt=typeof Object.is=="function"?Object.is:Rb;function Ns(t,e){if(Wt(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!Sc.call(e,i)||!Wt(t[i],e[i]))return!1}return!0}function Yh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Kh(t,e){var r=Yh(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Yh(r)}}function Hg(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Hg(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Gg(){for(var t=window,e=oa();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=oa(t.document)}return e}function Cd(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Db(t){var e=Gg(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&Hg(r.ownerDocument.documentElement,r)){if(n!==null&&Cd(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!t.extend&&s>n&&(i=n,n=s,s=i),i=Kh(r,s);var o=Kh(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var $b=vr&&"documentMode"in document&&11>=document.documentMode,ei=null,Vc=null,ps=null,qc=!1;function Qh(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;qc||ei==null||ei!==oa(n)||(n=ei,"selectionStart"in n&&Cd(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,383 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),ps&&Ns(ps,n)||(ps=n,n=fa(Vc,"onSelect"),0<n.length&&(e=new kd("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=ei)))}function mo(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var ti={animationend:mo("Animation","AnimationEnd"),animationiteration:mo("Animation","AnimationIteration"),animationstart:mo("Animation","AnimationStart"),transitionend:mo("Transition","TransitionEnd")},Rl={},Yg={};vr&&(Yg=document.createElement("div").style,"AnimationEvent"in window||(delete ti.animationend.animation,delete ti.animationiteration.animation,delete ti.animationstart.animation),"TransitionEvent"in window||delete ti.transitionend.transition);function Ga(t){if(Rl[t])return Rl[t];if(!ti[t])return t;var e=ti[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in Yg)return Rl[t]=e[r];return t}var Kg=Ga("animationend"),Qg=Ga("animationiteration"),Xg=Ga("animationstart"),Zg=Ga("transitionend"),ev=new Map,Xh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Zr(t,e){ev.set(t,e),Ln(e,[t])}for(var Dl=0;Dl<Xh.length;Dl++){var $l=Xh[Dl],Ub=$l.toLowerCase(),Fb=$l[0].toUpperCase()+$l.slice(1);Zr(Ub,"on"+Fb)}Zr(Kg,"onAnimationEnd");Zr(Qg,"onAnimationIteration");Zr(Xg,"onAnimationStart");Zr("dblclick","onDoubleClick");Zr("focusin","onFocus");Zr("focusout","onBlur");Zr(Zg,"onTransitionEnd");_i("onMouseEnter",["mouseout","mouseover"]);_i("onMouseLeave",["mouseout","mouseover"]);_i("onPointerEnter",["pointerout","pointerover"]);_i("onPointerLeave",["pointerout","pointerover"]);Ln("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ln("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ln("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ln("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ln("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ln("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var is="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Bb=new Set("cancel close invalid load scroll toggle".split(" ").concat(is));function Zh(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,U_(n,e,void 0,t),t.currentTarget=null}function tv(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;e:{var s=void 0;if(e)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;Zh(i,a,u),s=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;Zh(i,a,u),s=l}}}if(la)throw t=Uc,la=!1,Uc=null,t}function we(t,e){var r=e[Yc];r===void 0&&(r=e[Yc]=new Set);var n=t+"__bubble";r.has(n)||(rv(e,t,2,!1),r.add(n))}function Ul(t,e,r){var n=0;e&&(n|=4),rv(r,t,n,e)}var go="_reactListening"+Math.random().toString(36).slice(2);function As(t){if(!t[go]){t[go]=!0,cg.forEach(function(r){r!=="selectionchange"&&(Bb.has(r)||Ul(r,!1,t),Ul(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[go]||(e[go]=!0,Ul("selectionchange",!1,e))}}function rv(t,e,r,n){switch(Ug(e)){case 1:var i=tb;break;case 4:i=rb;break;default:i=bd}r=i.bind(null,e,r,t),i=void 0,!$c||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),n?i!==void 0?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):i!==void 0?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function Fl(t,e,r,n,i){var s=n;
vendor: 5,434 bytes, lines 37-38
37if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=pn(a),o===null)return;if(l=o.tag,l===5||l===6){n=s=o;continue e}a=a.parentNode}}n=n.return}Eg(function(){var u=s,d=vd(r),f=[];e:{var _=ev.get(t);if(_!==void 0){var x=kd,k=t;switch(t){case"keypress":if(Wo(r)===0)break e;case"keydown":case"keyup":x=vb;break;case"focusin":k="focus",x=Il;break;case"focusout":k="blur",x=Il;break;case"beforeblur":case"afterblur":x=Il;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=Bh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=sb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=_b;break;case Kg:case Qg:case Xg:x=lb;break;case Zg:x=xb;break;case"scroll":x=nb;break;case"wheel":x=Sb;break;case"copy":case"cut":case"paste":x=ub;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=Vh}var v=(e&4)!==0,b=!v&&t==="scroll",g=v?_!==null?_+"Capture":null:_;v=[];for(var w=u,y;w!==null;){y=w;var E=y.stateNode;if(y.tag===5&&E!==null&&(y=E,g!==null&&(E=Cs(w,g),E!=null&&v.push(Is(w,E,y)))),b)break;w=w.return}0<v.length&&(_=new x(_,k,null,r,d),f.push({event:_,listeners:v}))}}if(!(e&7)){e:{if(_=t==="mouseover"||t==="pointerover",x=t==="mouseout"||t==="pointerout",_&&r!==Rc&&(k=r.relatedTarget||r.fromElement)&&(pn(k)||k[yr]))break e;if((x||_)&&(_=d.window===d?d:(_=d.ownerDocument)?_.defaultView||_.parentWindow:window,x?(k=r.relatedTarget||r.toElement,x=u,k=k?pn(k):null,k!==null&&(b=Rn(k),k!==b||k.tag!==5&&k.tag!==6)&&(k=null)):(x=null,k=u),x!==k)){if(v=Bh,E="onMouseLeave",g="onMouseEnter",w="mouse",(t==="pointerout"||t==="pointerover")&&(v=Vh,E="onPointerLeave",g="onPointerEnter",w="pointer"),b=x==null?_:ri(x),y=k==null?_:ri(k),_=new v(E,w+"leave",x,r,d),_.target=b,_.relatedTarget=y,E=null,pn(d)===u&&(v=new v(g,w+"enter",k,r,d),v.target=y,v.relatedTarget=b,E=v),b=E,x&&k)t:{for(v=x,g=k,w=0,y=v;y;y=zn(y))w++;for(y=0,E=g;E;E=zn(E))y++;for(;0<w-y;)v=zn(v),w--;for(;0<y-w;)g=zn(g),y--;for(;w--;){if(v===g||g!==null&&v===g.alternate)break t;v=zn(v),g=zn(g)}v=null}else v=null;x!==null&&ef(f,_,x,v,!1),k!==null&&b!==null&&ef(f,b,k,v,!0)}}e:{if(_=u?ri(u):window,x=_.nodeName&&_.nodeName.toLowerCase(),x==="select"||x==="input"&&_.type==="file")var j=Nb;else if(Wh(_))if(Jg)j=Lb;else{j=Ib;var T=Ab}else(x=_.nodeName)&&x.toLowerCase()==="input"&&(_.type==="checkbox"||_.type==="radio")&&(j=Mb);if(j&&(j=j(t,u))){qg(f,j,r,d);break e}T&&T(t,_,u),t==="focusout"&&(T=_._wrapperState)&&T.controlled&&_.type==="number"&&Nc(_,"number",_.value)}switch(T=u?ri(u):window,t){case"focusin":(Wh(T)||T.contentEditable==="true")&&(ei=T,Vc=u,ps=null);break;case"focusout":ps=Vc=ei=null;break;case"mousedown":qc=!0;break;case"contextmenu":case"mouseup":case"dragend":qc=!1,Qh(f,r,d);break;case"selectionchange":if($b)break;case"keydown":case"keyup":Qh(f,r,d)}var P;if(Ed)e:{switch(t){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else Zn?zg(t,r)&&(D="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(D="onCompositionStart");D&&(Bg&&r.locale!=="ko"&&(Zn||D!=="onCompositionStart"?D==="onCompositionEnd"&&Zn&&(P=Fg()):(Lr=d,xd="value"in Lr?Lr.value:Lr.textContent,Zn=!0)),T=fa(u,D),0<T.length&&(D=new zh(D,t,null,r,d),f.push({event:D,listeners:T}),P?D.data=P:(P=Vg(r),P!==null&&(D.data=P)))),(P=Cb?jb(t,r):Tb(t,r))&&(u=fa(u,"onBeforeInput"),0<u.length&&(d=new zh("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:u}),d.data=P))}tv(f,e)})}function Is(t,e,r){return{instance:t,listener:e,currentTarget:r}}function fa(t,e){for(var r=e+"Capture",n=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Cs(t,r),s!=null&&n.unshift(Is(t,s,i)),s=Cs(t,e),s!=null&&n.push(Is(t,s,i))),t=t.return}return n}function zn(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function ef(t,e,r,n,i){for(var s=e._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,i?(l=Cs(r,s),l!=null&&o.unshift(Is(r,l,a))):i||(l=Cs(r,s),l!=null&&o.push(Is(r,l,a)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}var zb=/\r\n?/g,Vb=/\u0000|\uFFFD/g;function tf(t){return(typeof t=="string"?t:""+t).replace(zb,`
38`).replace(Vb,"")}function vo(t,e,r){if(e=tf(e),tf(t)!==e&&r)throw Error(L(425))}function pa(){}var Jc=null,Wc=null;function Hc(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Gc=typeof setTimeout=="function"?setTimeout:void 0,qb=typeof clearTimeout=="function"?clearTimeout:void 0,rf=typeof Promise=="function"?Promise:void 0,Jb=typeof queueMicrotask=="function"?queueMicrotask:typeof rf<"u"?function(t){return rf.resolve(null).then(t).cat
vendor: 4,672 bytes, line 38
38ch(Wb)}:Gc;function Wb(t){setTimeout(function(){throw t})}function Bl(t,e){var r=e,n=0;do{var i=r.nextSibling;if(t.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){t.removeChild(i),Ps(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);Ps(e)}function Br(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function nf(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var Li=Math.random().toString(36).slice(2),er="__reactFiber$"+Li,Ms="__reactProps$"+Li,yr="__reactContainer$"+Li,Yc="__reactEvents$"+Li,Hb="__reactListeners$"+Li,Gb="__reactHandles$"+Li;function pn(t){var e=t[er];if(e)return e;for(var r=t.parentNode;r;){if(e=r[yr]||r[er]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=nf(t);t!==null;){if(r=t[er])return r;t=nf(t)}return e}t=r,r=t.parentNode}return null}function Ys(t){return t=t[er]||t[yr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ri(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(L(33))}function Ya(t){return t[Ms]||null}var Kc=[],ni=-1;function en(t){return{current:t}}function _e(t){0>ni||(t.current=Kc[ni],Kc[ni]=null,ni--)}function ve(t,e){ni++,Kc[ni]=t.current,t.current=e}var Yr={},Qe=en(Yr),ut=en(!1),kn=Yr;function bi(t,e){var r=t.type.contextTypes;if(!r)return Yr;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=e[s];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function dt(t){return t=t.childContextTypes,t!=null}function ma(){_e(ut),_e(Qe)}function sf(t,e,r){if(Qe.current!==Yr)throw Error(L(168));ve(Qe,e),ve(ut,r)}function nv(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(L(108,A_(t)||"Unknown",i));return Ce({},r,n)}function ga(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Yr,kn=Qe.current,ve(Qe,t),ve(ut,ut.current),!0}function of(t,e,r){var n=t.stateNode;if(!n)throw Error(L(169));r?(t=nv(t,e,kn),n.__reactInternalMemoizedMergedChildContext=t,_e(ut),_e(Qe),ve(Qe,t)):_e(ut),ve(ut,r)}var ur=null,Ka=!1,zl=!1;function iv(t){ur===null?ur=[t]:ur.push(t)}function Yb(t){Ka=!0,iv(t)}function tn(){if(!zl&&ur!==null){zl=!0;var t=0,e=ue;try{var r=ur;for(ue=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}ur=null,Ka=!1}catch(i){throw ur!==null&&(ur=ur.slice(t+1)),Pg(yd,tn),i}finally{ue=e,zl=!1}}return null}var ii=[],si=0,va=null,ya=0,Et=[],Ct=0,Sn=null,dr=1,hr="";function un(t,e){ii[si++]=ya,ii[si++]=va,va=t,ya=e}function sv(t,e,r){Et[Ct++]=dr,Et[Ct++]=hr,Et[Ct++]=Sn,Sn=t;var n=dr;t=hr;var i=32-Vt(n)-1;n&=~(1<<i),r+=1;var s=32-Vt(e)+i;if(30<s){var o=i-i%5;s=(n&(1<<o)-1).toString(32),n>>=o,i-=o,dr=1<<32-Vt(e)+i|r<<i|n,hr=s+t}else dr=1<<s|r<<i|n,hr=t}function jd(t){t.return!==null&&(un(t,1),sv(t,1,0))}function Td(t){for(;t===va;)va=ii[--si],ii[si]=null,ya=ii[--si],ii[si]=null;for(;t===Sn;)Sn=Et[--Ct],Et[Ct]=null,hr=Et[--Ct],Et[Ct]=null,dr=Et[--Ct],Et[Ct]=null}var yt=null,gt=null,be=!1,zt=null;function ov(t,e){var r=Tt(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function af(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,yt=t,gt=Br(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,yt=t,gt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=Sn!==null?{id:dr,overflow:hr}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=Tt(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,yt=t,gt=null,!0):!1;default:return!1}}function Qc(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Xc(t){if(be){var e=gt;if(e){var r=e;if(!af(t,e)){if(Qc(t))throw Error(L(418));e=Br(r.nextSibling);var n=yt;e&&af(t,e)?ov(n,r):(t.flags=t.flags&-4097|2,be=!1,yt=t)}}else{if(Qc(t))throw Error(L(418));t.flags=t.flags&-4097|2,be=!1,yt=t}}}function lf(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;yt=t}function yo(t){if(t!==yt)return!1;if(!be)return lf(t),be=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Hc(t.type,t.memoizedProps)),e&&(e=gt)){if(Qc(t))throw av(),Error(L(418));for(;e;
vendor: 12,629 bytes, line 38
38)ov(t,e),e=Br(e.nextSibling)}if(lf(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(L(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){gt=Br(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}gt=null}}else gt=yt?Br(t.stateNode.nextSibling):null;return!0}function av(){for(var t=gt;t;)t=Br(t.nextSibling)}function xi(){gt=yt=null,be=!1}function Pd(t){zt===null?zt=[t]:zt.push(t)}var Kb=br.ReactCurrentBatchConfig;function Yi(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(L(309));var n=r.stateNode}if(!n)throw Error(L(147,t));var i=n,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(L(284));if(!r._owner)throw Error(L(290,t))}return t}function wo(t,e){throw t=Object.prototype.toString.call(e),Error(L(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function cf(t){var e=t._init;return e(t._payload)}function lv(t){function e(g,w){if(t){var y=g.deletions;y===null?(g.deletions=[w],g.flags|=16):y.push(w)}}function r(g,w){if(!t)return null;for(;w!==null;)e(g,w),w=w.sibling;return null}function n(g,w){for(g=new Map;w!==null;)w.key!==null?g.set(w.key,w):g.set(w.index,w),w=w.sibling;return g}function i(g,w){return g=Jr(g,w),g.index=0,g.sibling=null,g}function s(g,w,y){return g.index=y,t?(y=g.alternate,y!==null?(y=y.index,y<w?(g.flags|=2,w):y):(g.flags|=2,w)):(g.flags|=1048576,w)}function o(g){return t&&g.alternate===null&&(g.flags|=2),g}function a(g,w,y,E){return w===null||w.tag!==6?(w=Yl(y,g.mode,E),w.return=g,w):(w=i(w,y),w.return=g,w)}function l(g,w,y,E){var j=y.type;return j===Xn?d(g,w,y.props.children,E,y.key):w!==null&&(w.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===jr&&cf(j)===w.type)?(E=i(w,y.props),E.ref=Yi(g,w,y),E.return=g,E):(E=Zo(y.type,y.key,y.props,null,g.mode,E),E.ref=Yi(g,w,y),E.return=g,E)}function u(g,w,y,E){return w===null||w.tag!==4||w.stateNode.containerInfo!==y.containerInfo||w.stateNode.implementation!==y.implementation?(w=Kl(y,g.mode,E),w.return=g,w):(w=i(w,y.children||[]),w.return=g,w)}function d(g,w,y,E,j){return w===null||w.tag!==7?(w=wn(y,g.mode,E,j),w.return=g,w):(w=i(w,y),w.return=g,w)}function f(g,w,y){if(typeof w=="string"&&w!==""||typeof w=="number")return w=Yl(""+w,g.mode,y),w.return=g,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ao:return y=Zo(w.type,w.key,w.props,null,g.mode,y),y.ref=Yi(g,null,w),y.return=g,y;case Qn:return w=Kl(w,g.mode,y),w.return=g,w;case jr:var E=w._init;return f(g,E(w._payload),y)}if(rs(w)||qi(w))return w=wn(w,g.mode,y,null),w.return=g,w;wo(g,w)}return null}function _(g,w,y,E){var j=w!==null?w.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return j!==null?null:a(g,w,""+y,E);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ao:return y.key===j?l(g,w,y,E):null;case Qn:return y.key===j?u(g,w,y,E):null;case jr:return j=y._init,_(g,w,j(y._payload),E)}if(rs(y)||qi(y))return j!==null?null:d(g,w,y,E,null);wo(g,y)}return null}function x(g,w,y,E,j){if(typeof E=="string"&&E!==""||typeof E=="number")return g=g.get(y)||null,a(w,g,""+E,j);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case ao:return g=g.get(E.key===null?y:E.key)||null,l(w,g,E,j);case Qn:return g=g.get(E.key===null?y:E.key)||null,u(w,g,E,j);case jr:var T=E._init;return x(g,w,y,T(E._payload),j)}if(rs(E)||qi(E))return g=g.get(y)||null,d(w,g,E,j,null);wo(w,E)}return null}function k(g,w,y,E){for(var j=null,T=null,P=w,D=w=0,Q=null;P!==null&&D<y.length;D++){P.index>D?(Q=P,P=null):Q=P.sibling;var A=_(g,P,y[D],E);if(A===null){P===null&&(P=Q);break}t&&P&&A.alternate===null&&e(g,P),w=s(A,w,D),T===null?j=A:T.sibling=A,T=A,P=Q}if(D===y.length)return r(g,P),be&&un(g,D),j;if(P===null){for(;D<y.length;D++)P=f(g,y[D],E),P!==null&&(w=s(P,w,D),T===null?j=P:T.sibling=P,T=P);return be&&un(g,D),j}for(P=n(g,P);D<y.length;D++)Q=x(P,g,D,y[D],E),Q!==null&&(t&&Q.alternate!==null&&P.delete(Q.key===null?D:Q.key),w=s(Q,w,D),T===null?j=Q:T.sibling=Q,T=Q);return t&&P.forEach(function(G){return e(g,G)}),be&&un(g,D),j}function v(g,w,y,E){var j=qi(y);if(typeof j!="function")throw Error(L(150));if(y=j.call(y),y==null)throw Error(L(151));for(var T=j=null,P=w,D=w=0,Q=null,A=y.next();P!==null&&!A.done;D++,A=y.next()){P.index>D?(Q=P,P=null):Q=P.sibling;var G=_(g,P,A.value,E);if(G===null){P===null&&(P=Q);break}t&&P&&G.alternate===null&&e(g,P),w=s(G,w,D),T===null?j=G:T.sibling=G,T=G,P=Q}if(A.done)return r(g,P),be&&un(g,D),j;if(P===null){for(;!A.done;D++,A=y.next())A=f(g,A.value,E),A!==null&&(w=s(A,w,D),T===null?j=A:T.sibling=A,T=A);return be&&un(g,D),j}for(P=n(g,P);!A.done;D++,A=y.next())A=x(P,g,D,A.value,E),A!==null&&(t&&A.alternate!==null&&P.delete(A.key===null?D:A.key),w=s(A,w,D),T===null?j=A:T.sibling=A,T=A);return t&&P.forEach(function(J){return e(g,J)}),be&&un(g,D),j}function b(g,w,y,E){if(typeof y=="object"&&y!==null&&y.type===Xn&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ao:e:{for(var j=y.key,T=w;T!==null;){if(T.key===j){if(j=y.type,j===Xn){if(T.tag===7){r(g,T.sibling),w=i(T,y.props.children),w.return=g,g=w;break e}}else if(T.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===jr&&cf(j)===T.type){r(g,T.sibling),w=i(T,y.props),w.ref=Yi(g,T,y),w.return=g,g=w;break e}r(g,T);break}else e(g,T);T=T.sibling}y.type===Xn?(w=wn(y.props.children,g.mode,E,y.key),w.return=g,g=w):(E=Zo(y.type,y.key,y.props,null,g.mode,E),E.ref=Yi(g,w,y),E.return=g,g=E)}return o(g);case Qn:e:{for(T=y.key;w!==null;){if(w.key===T)if(w.tag===4&&w.stateNode.containerInfo===y.containerInfo&&w.stateNode.implementation===y.implementation){r(g,w.sibling),w=i(w,y.children||[]),w.return=g,g=w;break e}else{r(g,w);break}else e(g,w);w=w.sibling}w=Kl(y,g.mode,E),w.return=g,g=w}return o(g);case jr:return T=y._init,b(g,w,T(y._payload),E)}if(rs(y))return k(g,w,y,E);if(qi(y))return v(g,w,y,E);wo(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,w!==null&&w.tag===6?(r(g,w.sibling),w=i(w,y),w.return=g,g=w):(r(g,w),w=Yl(y,g.mode,E),w.return=g,g=w),o(g)):r(g,w)}return b}var ki=lv(!0),cv=lv(!1),wa=en(null),_a=null,oi=null,Od=null;function Nd(){Od=oi=_a=null}function Ad(t){var e=wa.current;_e(wa),t._currentValue=e}function Zc(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function pi(t,e){_a=t,Od=oi=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(ct=!0),t.firstContext=null)}function At(t){var e=t._currentValue;if(Od!==t)if(t={context:t,memoizedValue:e,next:null},oi===null){if(_a===null)throw Error(L(308));oi=t,_a.dependencies={lanes:0,firstContext:t}}else oi=oi.next=t;return e}var mn=null;function Id(t){mn===null?mn=[t]:mn.push(t)}function uv(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,Id(e)):(r.next=i.next,i.next=r),e.interleaved=r,wr(t,n)}function wr(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var Tr=!1;function Md(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function dv(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function mr(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function zr(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,oe&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,wr(t,r)}return i=n.interleaved,i===null?(e.next=e,Id(n)):(e.next=i.next,i.next=e),n.interleaved=e,wr(t,r)}function Ho(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,wd(t,r)}}function uf(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=o:s=s.next=o,r=r.next}while(r!==null);s===null?i=s=e:s=s.next=e}else i=s=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function ba(t,e,r,n){var i=t.updateQueue;Tr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var d=t.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,d=u=l=null,a=s;do{var _=a.lane,x=a.eventTime;if((n&_)===_){d!==null&&(d=d.next={eventTime:x,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var k=t,v=a;switch(_=e,x=r,v.tag){case 1:if(k=v.payload,typeof k=="function"){f=k.call(x,f,_);break e}f=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=v.payload,_=typeof k=="function"?k.call(x,f,_):k,_==null)break e;f=Ce({},f,_);break e;case 2:Tr=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,_=i.effects,_===null?i.effects=[a]:_.push(a))}else x={eventTime:x,lane:_,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=x,l=f):d=d.next=x,o|=_;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;_=a,a=_.next,_.next=null,i.lastBaseUpdate=_,i.shared.pending=null}}while(!0);if(d===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Cn|=o,t.lanes=o,t.memoizedState=f}}function df(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(L(191,i));i.call(n)}}}var Ks={},rr=en(Ks),Ls=en(Ks),Rs=en(Ks);function gn(t){if(t===Ks)throw Error(L(174));return t}function Ld(t,e){switch(ve(Rs,e),ve(Ls,t),ve(rr,Ks),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ic(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Ic(e,t)}_e(rr),ve(rr,e)}function Si(){_e(rr),_e(Ls),_e(Rs)}function hv(t){gn(Rs.current);var e=gn(rr.current),r=Ic(e,t.type);e!==r&&(ve(Ls,t),ve(rr,r))}function Rd(t){Ls.current===t&&(_e(rr),_e(Ls))}var Se=en(0);function xa(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Vl=[];function Dd(){for(var t=0;t<Vl.length;t++)Vl[t]._workInProgressVersionPrimary=null;Vl.length=0}var Go=br.ReactCurrentDispatcher,ql=br.ReactCurrentBatchConfig,En=0,Ee=null,Le=null,Ue=null,ka=!1,ms=!1,Ds=0,Qb=0;function We(){throw Error(L(321))}function $d(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!Wt(t[r],e[r]))return!1;return!0}function Ud(t,e,r,n,i,s){if(En=s,Ee=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Go.current=t===null||t.memoizedState===null?t1:r1,t=r(n,i),ms){s=0;do{if(ms=!1,Ds=0,25<=s)throw Error(L(301));s+=1,Ue=Le=null,e.updateQueue=null,Go.current=n1,t=r(n,i)}while(ms)}if(Go.current=Sa,e=Le!==null&&Le.next!==null,En=0,Ue=Le=Ee=null,ka=!1,e)throw Error(L(300));return t}function Fd(){var t=Ds!==0;return Ds=0,t}function Kt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ue===null?Ee.memoizedState=Ue=t:Ue=Ue.next=t,Ue}function It(){if(Le===null){var t=Ee.alternate;t=t!==null?t.memoizedState:null}else t=Le.next;var e=Ue===null?Ee.memoizedState:Ue.next;if(e!==null)Ue=e,Le=t;else{if(t===null)throw Error(L(310));Le=t,t={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},Ue===null?Ee.memoizedState=Ue=t:Ue=Ue.next=t}return Ue}function $s(t,e){return typeof e=="function"?e(t):e}function Jl(t){var e=It(),r=e.queue;if(r===null)throw Error(L(311));r.lastRenderedReducer=t;
vendor: 3,604 bytes, line 38
38var n=Le,i=n.baseQueue,s=r.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}n.baseQueue=i=s,r.pending=null}if(i!==null){s=i.next,n=n.baseState;var a=o=null,l=null,u=s;do{var d=u.lane;if((En&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:t(n,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,o=n):l=l.next=f,Ee.lanes|=d,Cn|=d}u=u.next}while(u!==null&&u!==s);l===null?o=n:l.next=a,Wt(n,e.memoizedState)||(ct=!0),e.memoizedState=n,e.baseState=o,e.baseQueue=l,r.lastRenderedState=n}if(t=r.interleaved,t!==null){i=t;do s=i.lane,Ee.lanes|=s,Cn|=s,i=i.next;while(i!==t)}else i===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function Wl(t){var e=It(),r=e.queue;if(r===null)throw Error(L(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,s=e.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);Wt(s,e.memoizedState)||(ct=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),r.lastRenderedState=s}return[s,n]}function fv(){}function pv(t,e){var r=Ee,n=It(),i=e(),s=!Wt(n.memoizedState,i);if(s&&(n.memoizedState=i,ct=!0),n=n.queue,Bd(vv.bind(null,r,n,t),[t]),n.getSnapshot!==e||s||Ue!==null&&Ue.memoizedState.tag&1){if(r.flags|=2048,Us(9,gv.bind(null,r,n,i,e),void 0,null),Be===null)throw Error(L(349));En&30||mv(r,e,i)}return i}function mv(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=Ee.updateQueue,e===null?(e={lastEffect:null,stores:null},Ee.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function gv(t,e,r,n){e.value=r,e.getSnapshot=n,yv(e)&&wv(t)}function vv(t,e,r){return r(function(){yv(e)&&wv(t)})}function yv(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Wt(t,r)}catch{return!0}}function wv(t){var e=wr(t,1);e!==null&&qt(e,t,1,-1)}function hf(t){var e=Kt();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$s,lastRenderedState:t},e.queue=t,t=t.dispatch=e1.bind(null,Ee,t),[e.memoizedState,t]}function Us(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=Ee.updateQueue,e===null?(e={lastEffect:null,stores:null},Ee.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function _v(){return It().memoizedState}function Yo(t,e,r,n){var i=Kt();Ee.flags|=t,i.memoizedState=Us(1|e,r,void 0,n===void 0?null:n)}function Qa(t,e,r,n){var i=It();n=n===void 0?null:n;var s=void 0;if(Le!==null){var o=Le.memoizedState;if(s=o.destroy,n!==null&&$d(n,o.deps)){i.memoizedState=Us(e,r,s,n);return}}Ee.flags|=t,i.memoizedState=Us(1|e,r,s,n)}function ff(t,e){return Yo(8390656,8,t,e)}function Bd(t,e){return Qa(2048,8,t,e)}function bv(t,e){return Qa(4,2,t,e)}function xv(t,e){return Qa(4,4,t,e)}function kv(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Sv(t,e,r){return r=r!=null?r.concat([t]):null,Qa(4,4,kv.bind(null,e,t),r)}function zd(){}function Ev(t,e){var r=It();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&$d(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function Cv(t,e){var r=It();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&$d(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function jv(t,e,r){return En&21?(Wt(r,e)||(r=Ag(),Ee.lanes|=r,Cn|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,
vendor: 9,515 bytes, lines 38-40
38ct=!0),t.memoizedState=r)}function Xb(t,e){var r=ue;ue=r!==0&&4>r?r:4,t(!0);var n=ql.transition;ql.transition={};try{t(!1),e()}finally{ue=r,ql.transition=n}}function Tv(){return It().memoizedState}function Zb(t,e,r){var n=qr(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Pv(t))Ov(e,r);else if(r=uv(t,e,r,n),r!==null){var i=nt();qt(r,t,n,i),Nv(r,e,n)}}function e1(t,e,r){var n=qr(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Pv(t))Ov(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,r);if(i.hasEagerState=!0,i.eagerState=a,Wt(a,o)){var l=e.interleaved;l===null?(i.next=i,Id(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=uv(t,e,i,n),r!==null&&(i=nt(),qt(r,t,n,i),Nv(r,e,n))}}function Pv(t){var e=t.alternate;return t===Ee||e!==null&&e===Ee}function Ov(t,e){ms=ka=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function Nv(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,wd(t,r)}}var Sa={readContext:At,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useInsertionEffect:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useSyncExternalStore:We,useId:We,unstable_isNewReconciler:!1},t1={readContext:At,useCallback:function(t,e){return Kt().memoizedState=[t,e===void 0?null:e],t},useContext:At,useEffect:ff,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Yo(4194308,4,kv.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Yo(4194308,4,t,e)},useInsertionEffect:function(t,e){return Yo(4,2,t,e)},useMemo:function(t,e){var r=Kt();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Kt();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=Zb.bind(null,Ee,t),[n.memoizedState,t]},useRef:function(t){var e=Kt();return t={current:t},e.memoizedState=t},useState:hf,useDebugValue:zd,useDeferredValue:function(t){return Kt().memoizedState=t},useTransition:function(){var t=hf(!1),e=t[0];return t=Xb.bind(null,t[1]),Kt().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Ee,i=Kt();if(be){if(r===void 0)throw Error(L(407));r=r()}else{if(r=e(),Be===null)throw Error(L(349));En&30||mv(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,ff(vv.bind(null,n,s,t),[t]),n.flags|=2048,Us(9,gv.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=Kt(),e=Be.identifierPrefix;if(be){var r=hr,n=dr;r=(n&~(1<<32-Vt(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Ds++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=Qb++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},r1={readContext:At,useCallback:Ev,useContext:At,useEffect:Bd,useImperativeHandle:Sv,useInsertionEffect:bv,useLayoutEffect:xv,useMemo:Cv,useReducer:Jl,useRef:_v,useState:function(){return Jl($s)},useDebugValue:zd,useDeferredValue:function(t){var e=It();return jv(e,Le.memoizedState,t)},useTransition:function(){var t=Jl($s)[0],e=It().memoizedState;return[t,e]},useMutableSource:fv,useSyncExternalStore:pv,useId:Tv,unstable_isNewReconciler:!1},n1={readContext:At,useCallback:Ev,useContext:At,useEffect:Bd,useImperativeHandle:Sv,useInsertionEffect:bv,useLayoutEffect:xv,useMemo:Cv,useReducer:Wl,useRef:_v,useState:function(){return Wl($s)},useDebugValue:zd,useDeferredValue:function(t){var e=It();return Le===null?e.memoizedState=t:jv(e,Le.memoizedState,t)},useTransition:function(){var t=Wl($s)[0],e=It().memoizedState;return[t,e]},useMutableSource:fv,useSyncExternalStore:pv,useId:Tv,unstable_isNewReconciler:!1};function Ut(t,e){if(t&&t.defaultProps){e=Ce({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function eu(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:Ce({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var Xa={isMounted:function(t){return(t=t._reactInternals)?Rn(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=nt(),i=qr(t),s=mr(n,i);s.payload=e,r!=null&&(s.callback=r),e=zr(t,s,i),e!==null&&(qt(e,t,i,n),Ho(e,t,i))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=nt(),i=qr(t),s=mr(n,i);s.tag=1,s.payload=e,r!=null&&(s.callback=r),e=zr(t,s,i),e!==null&&(qt(e,t,i,n),Ho(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=nt(),n=qr(t),i=mr(r,n);i.tag=2,e!=null&&(i.callback=e),e=zr(t,i,n),e!==null&&(qt(e,t,n,r),Ho(e,t,n))}};function pf(t,e,r,n,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,s,o):e.prototype&&e.prototype.isPureReactComponent?!Ns(r,n)||!Ns(i,s):!0}function Av(t,e,r){var n=!1,i=Yr,s=e.contextType;return typeof s=="object"&&s!==null?s=At(s):(i=dt(e)?kn:Qe.current,n=e.contextTypes,s=(n=n!=null)?bi(t,i):Yr),e=new e(r,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Xa,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function mf(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&Xa.enqueueReplaceState(e,e.state,null)}function tu(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs={},Md(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=At(s):(s=dt(e)?kn:Qe.current,i.context=bi(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(eu(t,e,s,r),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&Xa.enqueueReplaceState(i,i.state,null),ba(t,r,i,n),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function Ei(t,e){try{var r="",n=e;do r+=N_(n),n=n.return;while(n);var i=r}catch(s){i=`
39Error generating stack: `+s.message+`
40`+s.stack}return{value:t,source:e,stack:i,digest:null}}function Hl(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function ru(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var i1=typeof WeakMap=="function"?WeakMap:Map;function Iv(t,e,r){r=mr(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Ca||(Ca=!0,hu=n),ru(t,e)},r}function Mv(t,e,r){r=mr(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){ru(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){ru(t,e),typeof n!="function"&&(Vr===null?Vr=new Set([this]):Vr.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function gf(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new i1;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=y1.bind(null,t,e,r),e.then(t,t))}function vf(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function yf(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=mr(-1,1),e.tag=2,zr(r,e,1))),r.lanes|=1),t)}var s1=br.ReactCurrentOwner,ct=!1;function et(t,e,r,n){e.child=t===null?cv(e,null,r,n):ki(e,t.child,r,n)}function wf(t,e,r,n,i){r=r.render;var s=e.ref;return pi(e,i),n=Ud(t,e,r,n,s,i),r=Fd(),t!==null&&!ct?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,_r(t,e,i)):(be&&r&&jd(e),e.flags|=1,et(t,e,n,i),e.child)}function _f(t,e,r,n,i){if(t===null){var s=r.type;return typeof s=="function"&&!Kd(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=s,Lv(t,e,s,n,i)):(t=Zo(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(r=r.compare,r=r!==null?r:Ns,r(o,n)&&t.ref===e.ref)return _r(t,e,i)}return e.flags|=1,t=Jr(s,n),t.ref=e.ref,t.return=e,e.child=t}function Lv(t,e,r,n,i){if(t!==null){var s=t.memoizedProps;if(Ns(s,n)&&t.ref===e.ref)if(ct=!1,e.pendingProps=n=s,(t.lanes&i)!==0)t.flags&131072&&(ct=!0);else return e.lanes=t.lanes,_r(t,e,i)}return nu(t,e,r,n,i)}function Rv(t,e,r){var n=e.pendingProps,i=n.children,s=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ve(li,mt),mt|=r;else{if(!(r&1073741824))return t=s!==null?s.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ve(li,mt),mt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,ve(li,mt),mt|=n}else s!==null?(n=s.baseLanes|r,e.memoizedState=null):n=r,ve(li,mt),mt|=n;return et(t,e,i,r),e.child}function Dv(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}
vendor: 4,711 bytes, line 40
40function nu(t,e,r,n,i){var s=dt(r)?kn:Qe.current;return s=bi(e,s),pi(e,i),r=Ud(t,e,r,n,s,i),n=Fd(),t!==null&&!ct?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,_r(t,e,i)):(be&&n&&jd(e),e.flags|=1,et(t,e,r,i),e.child)}function bf(t,e,r,n,i){if(dt(r)){var s=!0;ga(e)}else s=!1;if(pi(e,i),e.stateNode===null)Ko(t,e),Av(e,r,n),tu(e,r,n,i),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=At(u):(u=dt(r)?kn:Qe.current,u=bi(e,u));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==u)&&mf(e,o,n,u),Tr=!1;var _=e.memoizedState;o.state=_,ba(e,n,o,i),l=e.memoizedState,a!==n||_!==l||ut.current||Tr?(typeof d=="function"&&(eu(e,r,d,n),l=e.memoizedState),(a=Tr||pf(e,r,a,n,_,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=u,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,dv(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:Ut(e.type,a),o.props=u,f=e.pendingProps,_=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=At(l):(l=dt(r)?kn:Qe.current,l=bi(e,l));var x=r.getDerivedStateFromProps;(d=typeof x=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||_!==l)&&mf(e,o,n,l),Tr=!1,_=e.memoizedState,o.state=_,ba(e,n,o,i);var k=e.memoizedState;a!==f||_!==k||ut.current||Tr?(typeof x=="function"&&(eu(e,r,x,n),k=e.memoizedState),(u=Tr||pf(e,r,u,n,_,k,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,k,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,k,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=k),o.props=n,o.state=k,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),n=!1)}return iu(t,e,r,n,s,i)}function iu(t,e,r,n,i,s){Dv(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return i&&of(e,r,!1),_r(t,e,s);n=e.stateNode,s1.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=ki(e,t.child,null,s),e.child=ki(e,null,a,s)):et(t,e,a,s),e.memoizedState=n.state,i&&of(e,r,!0),e.child}function $v(t){var e=t.stateNode;e.pendingContext?sf(t,e.pendingContext,e.pendingContext!==e.context):e.context&&sf(t,e.context,!1),Ld(t,e.containerInfo)}function xf(t,e,r,n,i){return xi(),Pd(i),e.flags|=256,et(t,e,r,n),e.child}var su={dehydrated:null,treeContext:null,retryLane:0};function ou(t){return{baseLanes:t,cachePool:null,transitions:null}}function Uv(t,e,r){var n=e.pendingProps,i=Se.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),ve(Se,i&1),t===null)return Xc(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,s?(n=e.mode,s=e.child,o={mode:"hidden",children:o},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=tl(o,n,0,null),t=wn(t,n,r,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=ou(r),e.memoizedState=su,t):Vd(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return o1(t,e,o,n,a,i,r);if(s){s=n.fallback,o=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=Jr(i,l),n.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Jr(a,s):(s=wn(s,o,r,null),s.flags|=2),s.return=e,n.return=e,n.sibling=s,e.child=n,n=s,s=e.child,o=t.child.memoizedState,o=o===null?ou(r):{base
vendor: 4,933 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~r,e.memoizedState=su,n}return s=t.child,t=s.sibling,n=Jr(s,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function Vd(t,e){return e=tl({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function _o(t,e,r,n){return n!==null&&Pd(n),ki(e,t.child,null,r),t=Vd(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function o1(t,e,r,n,i,s,o){if(r)return e.flags&256?(e.flags&=-257,n=Hl(Error(L(422))),_o(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=n.fallback,i=e.mode,n=tl({mode:"visible",children:n.children},i,0,null),s=wn(s,i,o,null),s.flags|=2,n.return=e,s.return=e,n.sibling=s,e.child=n,e.mode&1&&ki(e,t.child,null,o),e.child.memoizedState=ou(o),e.memoizedState=su,s);if(!(e.mode&1))return _o(t,e,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var a=n.dgst;return n=a,s=Error(L(419)),n=Hl(s,n,void 0),_o(t,e,o,n)}if(a=(o&t.childLanes)!==0,ct||a){if(n=Be,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,wr(t,i),qt(n,t,i,-1))}return Yd(),n=Hl(Error(L(421))),_o(t,e,o,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=w1.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,gt=Br(i.nextSibling),yt=e,be=!0,zt=null,t!==null&&(Et[Ct++]=dr,Et[Ct++]=hr,Et[Ct++]=Sn,dr=t.id,hr=t.overflow,Sn=e),e=Vd(e,n.children),e.flags|=4096,e)}function kf(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Zc(t.return,e,r)}function Gl(t,e,r,n,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function Fv(t,e,r){var n=e.pendingProps,i=n.revealOrder,s=n.tail;if(et(t,e,n.children,r),n=Se.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&kf(t,r,e);else if(t.tag===19)kf(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(ve(Se,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&xa(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),Gl(e,!1,i,r,s);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&xa(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}Gl(e,!0,r,null,s);break;case"together":Gl(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Ko(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function _r(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Cn|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(L(153));if(e.child!==null){for(t=e.child,r=Jr(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=Jr(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function a1(t,e,r){switch(e.tag){case 3:$v(e),xi();break;case 5:hv(e);break;case 1:dt(e.type)&&ga(e);break;case 4:Ld(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;ve(wa,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(ve(Se,Se.current&1),e.flags|=128,null):r&e.child.childLanes?Uv(t,e,r):(ve(Se,Se.current&1),t=_r(t,e,r),t!==null?t.sibling:null);ve(Se,Se.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return Fv(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ve(Se,Se.current),n)break;return null;case 22:case 23:return e.lanes=0,Rv(t,e,r)}return _r(t,e,r)}var Bv,au,zv,Vv;Bv=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};au=function(){};zv=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,gn(rr.current);var s=null;switch(r){case"input":i=Pc(t,i),n=Pc(t,n),s=[];break;case"select":i=Ce({},i,{value:void 0}),n=Ce({},n,{value:void 0}),s=[];break;
vendor: 4,232 bytes, line 40
40case"textarea":i=Ac(t,i),n=Ac(t,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=pa)}Mc(r,n);var o;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ss.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in n){var l=n[u];if(a=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(s||(s=[]),s.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ss.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&we("scroll",t),s||a===l||(s=[])):(s=s||[]).push(u,l))}r&&(s=s||[]).push("style",r);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};Vv=function(t,e,r,n){r!==n&&(e.flags|=4)};function Ki(t,e){if(!be)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function He(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function l1(t,e,r){var n=e.pendingProps;switch(Td(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return He(e),null;case 1:return dt(e.type)&&ma(),He(e),null;case 3:return n=e.stateNode,Si(),_e(ut),_e(Qe),Dd(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(yo(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,zt!==null&&(mu(zt),zt=null))),au(t,e),He(e),null;case 5:Rd(e);var i=gn(Rs.current);if(r=e.type,t!==null&&e.stateNode!=null)zv(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(L(166));return He(e),null}if(t=gn(rr.current),yo(e)){n=e.stateNode,r=e.type;var s=e.memoizedProps;switch(n[er]=e,n[Ms]=s,t=(e.mode&1)!==0,r){case"dialog":we("cancel",n),we("close",n);break;case"iframe":case"object":case"embed":we("load",n);break;case"video":case"audio":for(i=0;i<is.length;i++)we(is[i],n);break;case"source":we("error",n);break;case"img":case"image":case"link":we("error",n),we("load",n);break;case"details":we("toggle",n);break;case"input":Nh(n,s),we("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},we("invalid",n);break;case"textarea":Ih(n,s),we("invalid",n)}Mc(r,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?n.textContent!==a&&(s.suppressHydrationWarning!==!0&&vo(n.textContent,a,t),i=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&vo(n.textContent,a,t),i=["children",""+a]):Ss.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&we("scroll",n)}switch(r){case"input":lo(n),Ah(n,s,!0);break;case"textarea":lo(n),Mh(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=pa)}n=i,e.updateQueue=n,n!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=vg(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[er]=e,t[Ms]=n,Bv(t,e,!1,!1),e.stateNode=t;
vendor: 32,263 bytes, line 40
40e:{switch(o=Lc(r,n),r){case"dialog":we("cancel",t),we("close",t),i=n;break;case"iframe":case"object":case"embed":we("load",t),i=n;break;case"video":case"audio":for(i=0;i<is.length;i++)we(is[i],t);i=n;break;case"source":we("error",t),i=n;break;case"img":case"image":case"link":we("error",t),we("load",t),i=n;break;case"details":we("toggle",t),i=n;break;case"input":Nh(t,n),i=Pc(t,n),we("invalid",t);break;case"option":i=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=Ce({},n,{value:void 0}),we("invalid",t);break;case"textarea":Ih(t,n),i=Ac(t,n),we("invalid",t);break;default:i=n}Mc(r,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?_g(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&yg(t,l)):s==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Es(t,l):typeof l=="number"&&Es(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Ss.hasOwnProperty(s)?l!=null&&s==="onScroll"&&we("scroll",t):l!=null&&fd(t,s,l,o))}switch(r){case"input":lo(t),Ah(t,n,!1);break;case"textarea":lo(t),Mh(t);break;case"option":n.value!=null&&t.setAttribute("value",""+Gr(n.value));break;case"select":t.multiple=!!n.multiple,s=n.value,s!=null?ui(t,!!n.multiple,s,!1):n.defaultValue!=null&&ui(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=pa)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return He(e),null;case 6:if(t&&e.stateNode!=null)Vv(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(L(166));if(r=gn(Rs.current),gn(rr.current),yo(e)){if(n=e.stateNode,r=e.memoizedProps,n[er]=e,(s=n.nodeValue!==r)&&(t=yt,t!==null))switch(t.tag){case 3:vo(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&vo(n.nodeValue,r,(t.mode&1)!==0)}s&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[er]=e,e.stateNode=n}return He(e),null;case 13:if(_e(Se),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(be&&gt!==null&&e.mode&1&&!(e.flags&128))av(),xi(),e.flags|=98560,s=!1;else if(s=yo(e),n!==null&&n.dehydrated!==null){if(t===null){if(!s)throw Error(L(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(L(317));s[er]=e}else xi(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;He(e),s=!1}else zt!==null&&(mu(zt),zt=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||Se.current&1?Re===0&&(Re=3):Yd())),e.updateQueue!==null&&(e.flags|=4),He(e),null);case 4:return Si(),au(t,e),t===null&&As(e.stateNode.containerInfo),He(e),null;case 10:return Ad(e.type._context),He(e),null;case 17:return dt(e.type)&&ma(),He(e),null;case 19:if(_e(Se),s=e.memoizedState,s===null)return He(e),null;if(n=(e.flags&128)!==0,o=s.rendering,o===null)if(n)Ki(s,!1);else{if(Re!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=xa(t),o!==null){for(e.flags|=128,Ki(s,!1),n=o.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)s=r,t=n,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return ve(Se,Se.current&1|2),e.child}t=t.sibling}s.tail!==null&&Oe()>Ci&&(e.flags|=128,n=!0,Ki(s,!1),e.lanes=4194304)}else{if(!n)if(t=xa(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Ki(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!be)return He(e),null}else 2*Oe()-s.renderingStartTime>Ci&&r!==1073741824&&(e.flags|=128,n=!0,Ki(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(r=s.last,r!==null?r.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Oe(),e.sibling=null,r=Se.current,ve(Se,n?r&1|2:r&1),e):(He(e),null);case 22:case 23:return Gd(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?mt&1073741824&&(He(e),e.subtreeFlags&6&&(e.flags|=8192)):He(e),null;case 24:return null;case 25:return null}throw Error(L(156,e.tag))}function c1(t,e){switch(Td(e),e.tag){case 1:return dt(e.type)&&ma(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Si(),_e(ut),_e(Qe),Dd(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Rd(e),null;case 13:if(_e(Se),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(L(340));xi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return _e(Se),null;case 4:return Si(),null;case 10:return Ad(e.type._context),null;case 22:case 23:return Gd(),null;case 24:return null;default:return null}}var bo=!1,Ge=!1,u1=typeof WeakSet=="function"?WeakSet:Set,F=null;function ai(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){je(t,e,n)}else r.current=null}function lu(t,e,r){try{r()}catch(n){je(t,e,n)}}var Sf=!1;function d1(t,e){if(Jc=da,t=Gg(),Cd(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,u=0,d=0,f=t,_=null;t:for(;;){for(var x;f!==r||i!==0&&f.nodeType!==3||(a=o+i),f!==s||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(x=f.firstChild)!==null;)_=f,f=x;for(;;){if(f===t)break t;if(_===r&&++u===i&&(a=o),_===s&&++d===n&&(l=o),(x=f.nextSibling)!==null)break;f=_,_=f.parentNode}f=x}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Wc={focusedElem:t,selectionRange:r},da=!1,F=e;F!==null;)if(e=F,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,F=t;else for(;F!==null;){e=F;try{var k=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var v=k.memoizedProps,b=k.memoizedState,g=e.stateNode,w=g.getSnapshotBeforeUpdate(e.elementType===e.type?v:Ut(e.type,v),b);g.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var y=e.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(E){je(e,e.return,E)}if(t=e.sibling,t!==null){t.return=e.return,F=t;break}F=e.return}return k=Sf,Sf=!1,k}function gs(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&lu(e,r,s)}i=i.next}while(i!==n)}}function Za(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function cu(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function qv(t){var e=t.alternate;e!==null&&(t.alternate=null,qv(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[er],delete e[Ms],delete e[Yc],delete e[Hb],delete e[Gb])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Jv(t){return t.tag===5||t.tag===3||t.tag===4}function Ef(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Jv(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function uu(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=pa));else if(n!==4&&(t=t.child,t!==null))for(uu(t,e,r),t=t.sibling;t!==null;)uu(t,e,r),t=t.sibling}function du(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(du(t,e,r),t=t.sibling;t!==null;)du(t,e,r),t=t.sibling}var Ve=null,Ft=!1;function xr(t,e,r){for(r=r.child;r!==null;)Wv(t,e,r),r=r.sibling}function Wv(t,e,r){if(tr&&typeof tr.onCommitFiberUnmount=="function")try{tr.onCommitFiberUnmount(Ja,r)}catch{}switch(r.tag){case 5:Ge||ai(r,e);case 6:var n=Ve,i=Ft;Ve=null,xr(t,e,r),Ve=n,Ft=i,Ve!==null&&(Ft?(t=Ve,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Ve.removeChild(r.stateNode));break;case 18:Ve!==null&&(Ft?(t=Ve,r=r.stateNode,t.nodeType===8?Bl(t.parentNode,r):t.nodeType===1&&Bl(t,r),Ps(t)):Bl(Ve,r.stateNode));break;case 4:n=Ve,i=Ft,Ve=r.stateNode.containerInfo,Ft=!0,xr(t,e,r),Ve=n,Ft=i;break;case 0:case 11:case 14:case 15:if(!Ge&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&lu(r,e,o),i=i.next}while(i!==n)}xr(t,e,r);break;case 1:if(!Ge&&(ai(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){je(r,e,a)}xr(t,e,r);break;case 21:xr(t,e,r);break;case 22:r.mode&1?(Ge=(n=Ge)||r.memoizedState!==null,xr(t,e,r),Ge=n):xr(t,e,r);break;default:xr(t,e,r)}}function Cf(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new u1),e.forEach(function(n){var i=_1.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Lt(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ve=a.stateNode,Ft=!1;break e;case 3:Ve=a.stateNode.containerInfo,Ft=!0;break e;case 4:Ve=a.stateNode.containerInfo,Ft=!0;break e}a=a.return}if(Ve===null)throw Error(L(160));Wv(s,o,i),Ve=null,Ft=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){je(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)Hv(e,t),e=e.sibling}function Hv(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Lt(e,t),Yt(t),n&4){try{gs(3,t,t.return),Za(3,t)}catch(v){je(t,t.return,v)}try{gs(5,t,t.return)}catch(v){je(t,t.return,v)}}break;case 1:Lt(e,t),Yt(t),n&512&&r!==null&&ai(r,r.return);break;case 5:if(Lt(e,t),Yt(t),n&512&&r!==null&&ai(r,r.return),t.flags&32){var i=t.stateNode;try{Es(i,"")}catch(v){je(t,t.return,v)}}if(n&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=r!==null?r.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&mg(i,s),Lc(a,o);var u=Lc(a,s);for(o=0;o<l.length;o+=2){var d=l[o],f=l[o+1];d==="style"?_g(i,f):d==="dangerouslySetInnerHTML"?yg(i,f):d==="children"?Es(i,f):fd(i,d,f,u)}switch(a){case"input":Oc(i,s);break;case"textarea":gg(i,s);break;case"select":var _=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var x=s.value;x!=null?ui(i,!!s.multiple,x,!1):_!==!!s.multiple&&(s.defaultValue!=null?ui(i,!!s.multiple,s.defaultValue,!0):ui(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ms]=s}catch(v){je(t,t.return,v)}}break;case 6:if(Lt(e,t),Yt(t),n&4){if(t.stateNode===null)throw Error(L(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(v){je(t,t.return,v)}}break;case 3:if(Lt(e,t),Yt(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ps(e.containerInfo)}catch(v){je(t,t.return,v)}break;case 4:Lt(e,t),Yt(t);break;case 13:Lt(e,t),Yt(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Wd=Oe())),n&4&&Cf(t);break;case 22:if(d=r!==null&&r.memoizedState!==null,t.mode&1?(Ge=(u=Ge)||d,Lt(e,t),Ge=u):Lt(e,t),Yt(t),n&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!d&&t.mode&1)for(F=t,d=t.child;d!==null;){for(f=F=d;F!==null;){switch(_=F,x=_.child,_.tag){case 0:case 11:case 14:case 15:gs(4,_,_.return);break;case 1:ai(_,_.return);var k=_.stateNode;if(typeof k.componentWillUnmount=="function"){n=_,r=_.return;try{e=n,k.props=e.memoizedProps,k.state=e.memoizedState,k.componentWillUnmount()}catch(v){je(n,r,v)}}break;case 5:ai(_,_.return);break;case 22:if(_.memoizedState!==null){Tf(f);continue}}x!==null?(x.return=_,F=x):Tf(f)}d=d.sibling}e:for(d=null,f=t;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=wg("display",o))}catch(v){je(t,t.return,v)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(v){je(t,t.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Lt(e,t),Yt(t),n&4&&Cf(t);break;case 21:break;default:Lt(e,t),Yt(t)}}function Yt(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(Jv(r)){var n=r;break e}r=r.return}throw Error(L(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Es(i,""),n.flags&=-33);var s=Ef(t);du(t,s,i);break;case 3:case 4:var o=n.stateNode.containerInfo,a=Ef(t);uu(t,a,o);break;default:throw Error(L(161))}}catch(l){je(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function h1(t,e,r){F=t,Gv(t)}function Gv(t,e,r){for(var n=(t.mode&1)!==0;F!==null;){var i=F,s=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||bo;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||Ge;a=bo;var u=Ge;if(bo=o,(Ge=l)&&!u)for(F=i;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?Pf(i):l!==null?(l.return=o,F=l):Pf(i);for(;s!==null;)F=s,Gv(s),s=s.sibling;F=i,bo=a,Ge=u}jf(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,F=s):jf(t)}}function jf(t){for(;F!==null;){var e=F;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ge||Za(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!Ge)if(r===null)n.componentDidMount();else{var i=e.elementType===e.type?r.memoizedProps:Ut(e.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&df(e,s,n);break;case 3:var o=e.updateQueue;if(o!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}df(e,o,r)}break;case 5:var a=e.stateNode;if(r===null&&e.flags&4){r=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Ps(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}Ge||e.flags&512&&cu(e)}catch(_){je(e,e.return,_)}}if(e===t){F=null;break}if(r=e.sibling,r!==null){r.return=e.return,F=r;break}F=e.return}}function Tf(t){for(;F!==null;){var e=F;if(e===t){F=null;break}var r=e.sibling;if(r!==null){r.return=e.return,F=r;break}F=e.return}}function Pf(t){for(;F!==null;){var e=F;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{Za(4,e)}catch(l){je(e,r,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var i=e.return;try{n.componentDidMount()}catch(l){je(e,i,l)}}var s=e.return;try{cu(e)}catch(l){je(e,s,l)}break;case 5:var o=e.return;try{cu(e)}catch(l){je(e,o,l)}}}catch(l){je(e,e.return,l)}if(e===t){F=null;break}var a=e.sibling;if(a!==null){a.return=e.return,F=a;break}F=e.return}}var f1=Math.ceil,Ea=br.ReactCurrentDispatcher,qd=br.ReactCurrentOwner,Ot=br.ReactCurrentBatchConfig,oe=0,Be=null,Ne=null,qe=0,mt=0,li=en(0),Re=0,Fs=null,Cn=0,el=0,Jd=0,vs=null,at=null,Wd=0,Ci=1/0,or=null,Ca=!1,hu=null,Vr=null,xo=!1,Rr=null,ja=0,ys=0,fu=null,Qo=-1,Xo=0;function nt(){return oe&6?Oe():Qo!==-1?Qo:Qo=Oe()}function qr(t){return t.mode&1?oe&2&&qe!==0?qe&-qe:Kb.transition!==null?(Xo===0&&(Xo=Ag()),Xo):(t=ue,t!==0||(t=window.event,t=t===void 0?16:Ug(t.type)),t):1}function qt(t,e,r,n){if(50<ys)throw ys=0,fu=null,Error(L(185));Hs(t,r,n),(!(oe&2)||t!==Be)&&(t===Be&&(!(oe&2)&&(el|=r),Re===4&&Ar(t,qe)),ht(t,n),r===1&&oe===0&&!(e.mode&1)&&(Ci=Oe()+500,Ka&&tn()))}function ht(t,e){var r=t.callbackNode;K_(t,e);var n=ua(t,t===Be?qe:0);if(n===0)r!==null&&Dh(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&Dh(r),e===1)t.tag===0?Yb(Of.bind(null,t)):iv(Of.bind(null,t)),Jb(function(){!(oe&6)&&tn()}),r=null;else{switch(Ig(n)){case 1:r=yd;break;case 4:r=Og;break;case 16:r=ca;break;case 536870912:r=Ng;break;default:r=ca}r=ry(r,Yv.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function Yv(t,e){if(Qo=-1,Xo=0,oe&6)throw Error(L(327));var r=t.callbackNode;if(mi()&&t.callbackNode!==r)return null;var n=ua(t,t===Be?qe:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=Ta(t,n);else{e=n;var i=oe;oe|=2;var s=Qv();(Be!==t||qe!==e)&&(or=null,Ci=Oe()+500,yn(t,e));do try{g1();break}catch(a){Kv(t,a)}while(!0);Nd(),Ea.current=s,oe=i,Ne!==null?e=0:(Be=null,qe=0,e=Re)}if(e!==0){if(e===2&&(i=Fc(t),i!==0&&(n=i,e=pu(t,i))),e===1)throw r=Fs,yn(t,0),Ar(t,n),ht(t,Oe()),r;if(e===6)Ar(t,n);else{if(i=t.current.alternate,!(n&30)&&!p1(i)&&(e=Ta(t,n),e===2&&(s=Fc(t),s!==0&&(n=s,e=pu(t,s))),e===1))throw r=Fs,yn(t,0),Ar(t,n),ht(t,Oe()),r;switch(t.finishedWork=i,t.finishedLanes=n,e){case 0:case 1:throw Error(L(345));case 2:dn(t,at,or);break;case 3:if(Ar(t,n),(n&130023424)===n&&(e=Wd+500-Oe(),10<e)){if(ua(t,0)!==0)break;if(i=t.suspendedLanes,(i&n)!==n){nt(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Gc(dn.bind(null,t,at,or),e);break}dn(t,at,or);break;case 4:if(Ar(t,n),(n&4194240)===n)break;for(e=t.eventTimes,i=-1;0<n;){var o=31-Vt(n);s=1<<o,o=e[o],o>i&&(i=o),n&=~s}if(n=i,n=Oe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*f1(n/1960))-n,10<n){t.timeoutHandle=Gc(dn.bind(null,t,at,or),n);break}dn(t,at,or);break;case 5:dn(t,at,or);break;default:throw Error(L(329))}}}return ht(t,Oe()),t.callbackNode===r?Yv.bind(null,t):null}function pu(t,e){var r=vs;return t.current.memoizedState.isDehydrated&&(yn(t,e).flags|=256),t=Ta(t,e),t!==2&&(e=at,at=r,e!==null&&mu(e)),t}function mu(t){at===null?at=t:at.push.apply(at,t)}function p1(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],s=i.getSnapshot;i=i.value;try{if(!Wt(s(),i))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Ar(t,e){for(e&=~Jd,e&=~el,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-Vt(e),n=1<<r;t[r]=-1,e&=~n}}function Of(t){if(oe&6)throw Error(L(327));mi();var e=ua(t,0);if(!(e&1))return ht(t,Oe()),null;var r=Ta(t,e);if(t.tag!==0&&r===2){var n=Fc(t);n!==0&&(e=n,r=pu(t,n))}if(r===1)throw r=Fs,yn(t,0),Ar(t,e),ht(t,Oe()),r;if(r===6)throw Error(L(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,dn(t,at,or),ht(t,Oe()),null}function Hd(t,e){var r=oe;oe|=1;try{return t(e)}finally{oe=r,oe===0&&(Ci=Oe()+500,Ka&&tn())}}function jn(t){Rr!==null&&Rr.tag===0&&!(oe&6)&&mi();var e=oe;oe|=1;var r=Ot.transition,n=ue;try{if(Ot.transition=null,ue=1,t)return t()}finally{ue=n,Ot.transition=r,oe=e,!(oe&6)&&tn()}}function Gd(){mt=li.current,_e(li)}function yn(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,qb(r)),Ne!==null)for(r=Ne.return;r!==null;){var n=r;switch(Td(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&ma();break;case 3:Si(),_e(ut),_e(Qe),Dd();break;case 5:Rd(n);break;case 4:Si();break;case 13:_e(Se);break;case 19:_e(Se);break;case 10:Ad(n.type._context);break;case 22:case 23:Gd()}r=r.return}if(Be=t,Ne=t=Jr(t.current,null),qe=mt=e,Re=0,Fs=null,Jd=el=Cn=0,at=vs=null,mn!==null){for(e=0;e<mn.length;e++)if(r=mn[e],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,s=r.pending;if(s!==null){var o=s.next;s.next=i,n.next=o}r.pending=n}mn=null}return t}function Kv(t,e){do{var r=Ne;try{if(Nd(),Go.current=Sa,ka){for(var n=Ee.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}ka=!1}if(En=0,Ue=Le=Ee=null,ms=!1,Ds=0,qd.current=null,r===null||r.return===null){Re=1,Fs=e,Ne=null;break}e:{var s=t,o=r.return,a=r,l=e;if(e=qe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var _=d.alternate;_?(d.updateQueue=_.updateQueue,d.memoizedState=_.memoizedState,d.lanes=_.lanes):(d.updateQueue=null,d.memoizedState=null)}var x=vf(o);if(x!==null){x.flags&=-257,yf(x,o,a,s,e),x.mode&1&&gf(s,u,e),e=x,l=u;var k=e.updateQueue;if(k===null){var v=new Set;v.add(l),e.updateQueue=v}else k.add(l);break e}else{if(!(e&1)){gf(s,u,e),Yd();break e}l=Error(L(426))}}else if(be&&a.mode&1){var b=vf(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),yf(b,o,a,s,e),Pd(Ei(l,a));break e}}s=l=Ei(l,a),Re!==4&&(Re=2),vs===null?vs=[s]:vs.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var g=Iv(s,l,e);uf(s,g);break e;case 1:a=l;var w=s.type,y=s.stateNode;if(!(s.flags&128)&&(typeof w.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Vr===null||!Vr.has(y)))){s.flags|=65536,e&=-e,s.lanes|=e;var E=Mv(s,a,e);uf(s,E);break e}}s=s.return}while(s!==null)}Zv(r)}catch(j){e=j,Ne===r&&r!==null&&(Ne=r=r.return);continue}break}while(!0)}function Qv(){var t=Ea.current;return Ea.current=Sa,t===null?Sa:t}function Yd(){(Re===0||Re===3||Re===2)&&(Re=4),Be===null||!(Cn&268435455)&&!(el&268435455)||Ar(Be,qe)}function Ta(t,e){var r=oe;oe|=2;var n=Qv();(Be!==t||qe!==e)&&(or=null,yn(t,e));do try{m1();break}catch(i){Kv(t,i)}while(!0);if(Nd(),oe=r,Ea.current=n,Ne!==null)throw Error(L(261));return Be=null,qe=0,Re}function m1(){for(;Ne!==null;)Xv(Ne)}function g1(){for(;Ne!==null&&!B_();)Xv(Ne)}function Xv(t){var e=ty(t.alternate,t,mt);t.memoizedProps=t.pendingProps,e===null?Zv(t):Ne=e,qd.current=null}function Zv(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=c1(r,e),r!==null){r.flags&=32767,Ne=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Re=6,Ne=null;return}}else if(r=l1(r,e,mt),r!==null){Ne=r;return}if(e=e.sibling,e!==null){Ne=e;return}Ne=e=t}while(e!==null);Re===0&&(Re=5)}function dn(t,e,r){var n=ue,i=Ot.transition;try{Ot.transition=null,ue=1,v1(t,e,r,n)}finally{Ot.transition=i,ue=n}return null}function v1(t,e,r,n){do mi();while(Rr!==null);if(oe&6)throw Error(L(327));r=t.finishedWork;var i=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(L(177));t.callbackNode=null,t.callbackPriority=0;var s=r.lanes|r.childLanes;if(Q_(t,s),t===Be&&(Ne=Be=null,qe=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||xo||(xo=!0,ry(ca,function(){return mi(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=Ot.transition,Ot.transition=null;var o=ue;ue=1;var a=oe;oe|=4,qd.current=null,d1(t,r),Hv(r,t),Db(Wc),da=!!Jc,Wc=Jc=null,t.current=r,h1(r),z_(),oe=a,ue=o,Ot.transition=s}else t.current=r;if(xo&&(xo=!1,Rr=t,ja=i),s=t.pendingLanes,s===0&&(Vr=null),J_(r.stateNode),ht(t,Oe()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)i=e[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(Ca)throw Ca=!1,t=hu,hu=null,t;return ja&1&&t.tag!==0&&mi(),s=t.pendingLanes,s&1?t===fu?ys++:(ys=0,fu=t):ys=0,tn(),null}function mi(){if(Rr!==null){var t=Ig(ja),e=Ot.transition,r=ue;try{if(Ot.transition=null,ue=16>t?16:t,Rr===null)var n=!1;else{if(t=Rr,Rr=null,ja=0,oe&6)throw Error(L(331));var i=oe;for(oe|=4,F=t.current;F!==null;){var s=F,o=s.child;if(F.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(F=u;F!==null;){var d=F;switch(d.tag){case 0:case 11:case 15:gs(8,d,s)}var f=d.child;if(f!==null)f.return=d,F=f;else for(;F!==null;){d=F;var _=d.sibling,x=d.return;if(qv(d),d===u){F=null;break}if(_!==null){_.return=x,F=_;break}F=x}}}var k=s.alternate;if(k!==null){var v=k.child;if(v!==null){k.child=null;do{var b=v.sibling;v.sibling=null,v=b}while(v!==null)}}F=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,F=o;else e:for(;F!==null;){if(s=F,s.flags&2048)switch(s.tag){case 0:case 11:case 15:gs(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,F=g;break e}F=s.return}}var w=t.current;for(F=w;F!==null;){o=F;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,F=y;else e:for(o=w;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Za(9,a)}}catch(j){je(a,a.return,j)}if(a===o){F=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,F=E;break e}F=a.return}}if(oe=i,tn(),tr&&typeof tr.onPostCommitFiberRoot=="function")try{tr.onPostCommitFiberRoot(Ja,t)}catch{}n=!0}return n}finally{ue=r,Ot.transition=e}}return!1}function Nf(t,e,r){e=Ei(r,e),e=Iv(t,e,1),t=zr(t,e,1),e=nt(),t!==null&&(Hs(t,1,e),ht(t,e))}function je(t,e,r){if(t.tag===3)Nf(t,t,r);else for(;e!==null;){if(e.tag===3){Nf(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Vr===null||!Vr.has(n))){t=Ei(r,t),t=Mv(e,t,1),e=zr(e,t,1),t=nt(),e!==null&&(Hs(e,1,t),ht(e,t));break}}e=e.return}}function y1(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=nt(),t.pingedLanes|=t.suspendedLanes&r,Be===t&&(qe&r)===r&&(Re===4||Re===3&&(qe&130023424)===qe&&500>Oe()-Wd?yn(t,0):Jd|=r),ht(t,e)}function ey(t,e){e===0&&(t.mode&1?(e=ho,ho<<=1,!(ho&130023424)&&(ho=4194304)):e=1);var r=nt();t=wr(t,e),t!==null&&(Hs(t,e,r),ht(t,r))}function w1(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),ey(t,r)}function _1(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(L(314))}n!==null&&n.delete(e),ey(t,r)}var ty;ty=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||ut.current)ct=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return ct=!1,a1(t,e,r);ct=!!(t.flags&131072)}else ct=!1,be&&e.flags&1048576&&sv(e,ya,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Ko(t,e),t=e.pendingProps;var i=bi(e,Qe.current);pi(e,r),i=Ud(null,e,n,t,i,r);var s=Fd();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,dt(n)?(s=!0,ga(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Md(e),i.updater=Xa,e.stateNode=i,i._reactInternals=e,tu(e,n,t,r),e=iu(null,e,n,!0,s,r)):(e.tag=0,be&&s&&jd(e),et(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Ko(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=x1(n),t=Ut(n,t),i){case 0:e=nu(null,e,n,t,r);break e;case 1:e=bf(null,e,n,t,r);break e;case 11:e=wf(null,e,n,t,r);break e;case 14:e=_f(null,e,n,Ut(n.type,t),r);break e}throw Error(L(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ut(n,i),nu(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ut(n,i),bf(t,e,n,i,r);case 3:e:{if($v(e),t===null)throw Error(L(387));n=e.pendingProps,s=e.memoizedState,i=s.element,dv(t,e),ba(e,n,null,r);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=Ei(Error(L(423)),e),e=xf(t,e,n,r,i);break e}else if(n!==i){i=Ei(Error(L(424)),e),e=xf(t,e,n,r,i);break e}else for(gt=Br(e.stateNode.containerInfo.firstChild),yt=e,be=!0,zt=null,r=cv(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(xi(),n===i){e=_r(t,e,r);break e}et(t,e,n,r)}e=e.child}return e;case 5:return hv(e),t===null&&Xc(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,Hc(n,i)?o=null:s!==null&&Hc(n,s)&&(e.flags|=32),Dv(t,e),et(t,e,o,r),e.child;case 6:return t===null&&Xc(e),null;case 13:return Uv(t,e,r);case 4:return Ld(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=ki(e,null,n,r):et(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ut(n,i),wf(t,e,n,i,r);case 7:return et(t,e,e.pendingProps,r),e.child;case 8:return et(t,e,e.pendingProps.children,r),e.child;case 12:return et(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,ve(wa,n._currentValue),n._currentValue=o,s!==null)if(Wt(s.value,o)){if(s.children===i.children&&!ut.current){e=_r(t,e,r);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=mr(-1,r&-r),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),Zc(s.return,r,e),a.lanes|=r;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(L(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Zc(o,r,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}et(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,pi(e,r),i=At(i),n=n(i),e.flags|=1,et(t,e,n,r),e.child;case 14:return n=e.type,i=Ut(n,e.pendingProps),i=Ut(n.type,i),_f(t,e,n,i,r);case 15:return Lv(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ut(n,i),Ko(t,e),e.tag=1,dt(n)?(t=!0,ga(e)):t=!1,pi(e,r),Av(e,n,i),tu(e,n,i,r),iu(null,e,n,!0,t,r);case 19:return Fv(t,e,r);case 22:return Rv(t,e,r)}throw Error(L(156,e.tag))};function ry(t,e){return Pg(t,e)}function b1(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tt(t,e,r,n){return new b1(t,e,r,n)}function Kd(t){return t=t.prototype,!(!t||!t.isReactComponent)}function x1(t){if(typeof t=="function")return Kd(t)?1:0;if(t!=null){if(t=t.$$typeof,t===md)return 11;if(t===gd)return 14}return 2}function Jr(t,e){var r=t.alternate;return r===null?(r=Tt(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Zo(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")Kd(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Xn:return wn(r.children,i,s,e);case pd:o=8,i|=8;break;case Ec:return t=Tt(12,r,e,i|2),t.elementType=Ec,t.lanes=s,t;case Cc:return t=Tt(13,r,e,i),t.elementType=Cc,t.lanes=s,t;case jc:return t=Tt(19,r,e,i),t.elementType=jc,t.lanes=s,t;case hg:return tl(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case ug:
vendor: 6,046 bytes, line 40
40o=10;break e;case dg:o=9;break e;case md:o=11;break e;case gd:o=14;break e;case jr:o=16,n=null;break e}throw Error(L(130,t==null?t:typeof t,""))}return e=Tt(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function wn(t,e,r,n){return t=Tt(7,t,n,e),t.lanes=r,t}function tl(t,e,r,n){return t=Tt(22,t,n,e),t.elementType=hg,t.lanes=r,t.stateNode={isHidden:!1},t}function Yl(t,e,r){return t=Tt(6,t,null,e),t.lanes=r,t}function Kl(t,e,r){return e=Tt(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function k1(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ol(0),this.expirationTimes=Ol(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ol(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Qd(t,e,r,n,i,s,o,a,l){return t=new k1(t,e,r,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Tt(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Md(s),t}function S1(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Qn,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function ny(t){if(!t)return Yr;t=t._reactInternals;e:{if(Rn(t)!==t||t.tag!==1)throw Error(L(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(dt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(L(171))}if(t.tag===1){var r=t.type;if(dt(r))return nv(t,r,e)}return e}function iy(t,e,r,n,i,s,o,a,l){return t=Qd(r,n,!0,t,i,s,o,a,l),t.context=ny(null),r=t.current,n=nt(),i=qr(r),s=mr(n,i),s.callback=e??null,zr(r,s,i),t.current.lanes=i,Hs(t,i,n),ht(t,n),t}function rl(t,e,r,n){var i=e.current,s=nt(),o=qr(i);return r=ny(r),e.context===null?e.context=r:e.pendingContext=r,e=mr(s,o),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=zr(i,e,o),t!==null&&(qt(t,i,o,s),Ho(t,i,o)),o}function Pa(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Af(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function Xd(t,e){Af(t,e),(t=t.alternate)&&Af(t,e)}function E1(){return null}var sy=typeof reportError=="function"?reportError:function(t){console.error(t)};function Zd(t){this._internalRoot=t}nl.prototype.render=Zd.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(L(409));rl(t,e,null,null)};nl.prototype.unmount=Zd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;jn(function(){rl(null,t,null,null)}),e[yr]=null}};function nl(t){this._internalRoot=t}nl.prototype.unstable_scheduleHydration=function(t){if(t){var e=Rg();t={blockedOn:null,target:t,priority:e};for(var r=0;r<Nr.length&&e!==0&&e<Nr[r].priority;r++);Nr.splice(r,0,t),r===0&&$g(t)}};function eh(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function il(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function If(){}function C1(t,e,r,n,i){if(i){if(typeof n=="function"){var s=n;n=function(){var u=Pa(o);s.call(u)}}var o=iy(e,n,t,0,null,!1,!1,"",If);return t._reactRootContainer=o,t[yr]=o.current,As(t.nodeType===8?t.parentNode:t),jn(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof n=="function"){var a=n;n=function(){var u=Pa(l);a.call(u)}}var l=Qd(t,0,!1,null,null,!1,!1,"",If);return t._reactRootContainer=l,t[yr]=l.current,As(t.nodeType===8?t.parentNode:t),jn(function(){rl(e,l,r,n)}),l}function sl(t,e,r,n,i){var s=r._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=Pa(o);a.call(l)}}rl(e,o,t,i)}else o=C1(r,e,t,i,n);return Pa(o)}Mg=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=ns(e.pendingLanes);r!==0&&(wd(e,r|1),ht(e,Oe()),!(oe&6)&&(Ci=Oe()+500,tn()))}break;case 13:jn(function(){var n=wr(t,1);if(n!==null){var i=nt();qt(n,t,1,i)}}),Xd(t,1)}};_d=function(t){if(t.tag===13){var e=wr(t,134217728);if(e!==null){var r=nt();qt(e,t,134217728,r)}Xd(t,134217728)}};Lg=function(t){if(t.tag===13){var e=qr(t),r=wr(t,e);if(r!==null){var n=nt();qt(r,t,e,n)}Xd(t,e)}};Rg=function(){return ue};Dg=function(t,e){var r=ue;try{return ue=t,e()}finally{ue=r}};Dc=function(t,e,r){switch(e){case"input":if(Oc(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=Ya(n);if(!i)throw Error(L(90));pg(n),Oc(n,i)}}}break;case"textarea":gg(t,r);break;case"select":e=r.value,e!=null&&ui(t,!!r.multiple,e,!1)}};kg=Hd;Sg=jn;var j1={usingClientEntryPoint:!1,Events:[Ys,ri,Ya,bg,xg,Hd]},Qi={findFiberByHostInstance:pn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},T1={bundleType:Qi.bundleType,version:Qi.version,rendererPackageName:Qi.rendererPackageName,rendererConfig:Qi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:br.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=jg(t),t===null?null:t.stateNode},findFiberByHostInstance:Qi.findFiberByHostInstance||E1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ko=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ko.isDisabled&&ko.supportsFiber)try{Ja=ko.inject(T1),tr=ko}catch{}}_t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j1;_t.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!eh(e))throw Error(L(200));return S1(t,e,null,r)};_t.createRoot=function(t,e){if(!eh(t))throw Error(L(299));var r=!1,n="",i=sy;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=Qd(t,1,!1,null,null,r,!1,n,i),t[yr]=e.current,As(t.nodeType===8?t.parentNode:t),new Zd(e)};_t.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(L(188)):(t=Object.keys(t).join(","),Error(L(268,t)));return t=jg(e),t=t===null?null:t.stateNode,t};_t.flushSync=function(t){return jn(t)};_t.hydrate=function(t,e,r){if(!il(e))throw Error(L(200));return sl(null,t,e,!0,r)};_t.hydrateRoot=function(t,e,r){if(!eh(t))throw Error(L(405));var n=r!=null&&r.hydratedSources||null,i=!1,s="",o=sy;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),e=iy(e,null,t,1,r??null,i,!1,s,o),t[yr]=e.current,As(t),n)for(t=0;t<n.length;t++)r=n[t],i=r._getVersion,i=i(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,i]:e.mutableSourceEagerHydrationData.push(r,i);return new nl(e)};_t.render=function(t,e,r){if(!il(e))throw Error(L(200));return sl(null,t,e,!1,r)};_t.unmountComponentAtNode=function(t){if(!il(t))throw Error(L(40));return t._reactRootContainer?(jn(function(){sl(null,null,t,!1,function(){t._reactRootContainer=null,t[yr]=null})}),!0):!1};_t.unstable_batchedUpdates=Hd;_t.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!il(r))throw Error(L(200));if(t==null||t._reactInternals===void 0)throw Error(L(38));return sl(t,e,r,!1,n)};_t.version="18.3.1-next-f1338f8080-20240426";function oy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(oy)}catch(t){console.error(t)}}oy(),og.exports=_t;var P1=og.exports,ay,Mf=P1;ay=Mf.createRoot,Mf.hydrateRoot;/**
41 * @remix-run/router v1.23.0
42 *
43 * Copyright (c) Remix Software Inc.
44 *
45 * This source code is licensed under the MIT license found in the
46 * LICENSE.md file in the root directory of this source tree.
47 *
48 * @license MIT
49 */function Bs(){return Bs=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Bs.apply(this,arguments)}var Dr;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Dr||(Dr={}));const Lf="popstate";function O1(t){t===void 0&&(t={});function e(n,i){let{pathname:s,search:o,hash:a}=n.location;return gu("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Oa(i)}return A1(e,r,null,t)}function Ae(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function ly(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function N1(){return Math.random().toString(36).substr(2,8)}function Rf(t,e){return{usr:t.state,key:t.key,idx:e}}function gu(t,e,r,n){return r===void 0&&(r=null),Bs({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ri(e):e,{state:r,key:e&&e.key||n||N1()})}function Oa(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ri(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function A1(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:s=!1}=n,o=i.history,a=Dr.Pop,l=null,u=d();u==null&&(u=0,o.replaceState(Bs({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=Dr.Pop;let b=d(),g=b==null?null:b-u;u=b,l&&l({action:a,location:v.location,delta:g})}function _(b,g){a=Dr.Push;let w=gu(v.location,b,g);u=d()+1;let y=Rf(w,u),E=v.createHref(w);try{o.pushState(y,"",E)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(E)}s&&l&&l({action:a,location:v.location,delta:1})}function x(b,g){a=Dr.Replace;let w=gu(v.location,b,g);u=d();let y=Rf(w,u),E=v.createHref(w);o.replaceState(y,"",E),s&&l&&l({action:a,location:v.location,delta:0})}function k(b){let g=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof b=="string"?b:Oa(b);
vendor: 2,909 bytes, line 49
49return w=w.replace(/ $/,"%20"),Ae(g,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,g)}let v={get action(){return a},get location(){return t(i,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Lf,f),l=b,()=>{i.removeEventListener(Lf,f),l=null}},createHref(b){return e(i,b)},createURL:k,encodeLocation(b){let g=k(b);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:_,replace:x,go(b){return o.go(b)}};return v}var Df;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Df||(Df={}));function I1(t,e,r){return r===void 0&&(r="/"),M1(t,e,r,!1)}function M1(t,e,r,n){let i=typeof e=="string"?Ri(e):e,s=th(i.pathname||"/",r);if(s==null)return null;let o=cy(t);L1(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=W1(s);a=q1(o[l],u,n)}return a}function cy(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Ae(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Wr([n,l.relativePath]),d=r.concat(l);s.children&&s.children.length>0&&(Ae(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),cy(s.children,e,d,u)),!(s.path==null&&!s.index)&&e.push({path:u,score:z1(u,s.index),routesMeta:d})};return t.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of uy(s.path))i(s,o,l)}),e}function uy(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let o=uy(n.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function L1(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:V1(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const R1=/^:[\w-]+$/,D1=3,$1=2,U1=1,F1=10,B1=-2,$f=t=>t==="*";function z1(t,e){let r=t.split("/"),n=r.length;return r.some($f)&&(n+=B1),e&&(n+=$1),r.filter(i=>!$f(i)).reduce((i,s)=>i+(R1.test(s)?D1:s===""?U1:F1),n)}function V1(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function q1(t,e,r){let{routesMeta:n}=t,i={},s="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,d=s==="/"?e:e.slice(s.length)||"/",f=Uf({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),_=l.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=Uf({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;
vendor: 9,412 bytes, lines 49-58
49Object.assign(i,f.params),o.push({params:i,pathname:Wr([s,f.pathname]),pathnameBase:K1(Wr([s,f.pathnameBase])),route:_}),f.pathnameBase!=="/"&&(s=Wr([s,f.pathnameBase]))}return o}function Uf(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=J1(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:n.reduce((u,d,f)=>{let{paramName:_,isOptional:x}=d;if(_==="*"){let v=a[f]||"";o=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const k=a[f];return x&&!k?u[_]=void 0:u[_]=(k||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:t}}function J1(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),ly(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function W1(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return ly(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function th(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function H1(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Ri(t):t;return{pathname:r?r.startsWith("/")?r:G1(r,e):e,search:Q1(n),hash:X1(i)}}function G1(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Ql(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Y1(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function dy(t,e){let r=Y1(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function hy(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Ri(t):(i=Bs({},t),Ae(!i.pathname||!i.pathname.includes("?"),Ql("?","pathname","search",i)),Ae(!i.pathname||!i.pathname.includes("#"),Ql("#","pathname","hash",i)),Ae(!i.search||!i.search.includes("#"),Ql("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=r;else{let f=e.length-1;if(!n&&o.startsWith("..")){let _=o.split("/");for(;_[0]==="..";)_.shift(),f-=1;i.pathname=_.join("/")}a=f>=0?e[f]:"/"}let l=H1(i,a),u=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Wr=t=>t.join("/").replace(/\/\/+/g,"/"),K1=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Q1=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,X1=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Z1(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const fy=["post","put","patch","delete"];new Set(fy);const ex=["get",...fy];new Set(ex);/**
50 * React Router v6.30.1
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */function zs(){return zs=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zs.apply(this,arguments)}const rh=O.createContext(null),tx=O.createContext(null),Dn=O.createContext(null),ol=O.createContext(null),$n=O.createContext({outlet:null,matches:[],isDataRoute:!1}),py=O.createContext(null);function rx(t,e){let{relative:r}=e===void 0?{}:e;Qs()||Ae(!1);let{basename:n,navigator:i}=O.useContext(Dn),{hash:s,pathname:o,search:a}=gy(t,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:Wr([n,o])),i.createHref({pathname:l,search:a,hash:s})}function Qs(){return O.useContext(ol)!=null}function al(){return Qs()||Ae(!1),O.useContext(ol).location}function my(t){O.useContext(Dn).static||O.useLayoutEffect(t)}function nh(){let{isDataRoute:t}=O.useContext($n);return t?mx():nx()}function nx(){Qs()||Ae(!1);let t=O.useContext(rh),{basename:e,future:r,navigator:n}=O.useContext(Dn),{matches:i}=O.useContext($n),{pathname:s}=al(),o=JSON.stringify(dy(i,r.v7_relativeSplatPath)),a=O.useRef(!1);return my(()=>{a.current=!0}),O.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let f=hy(u,JSON.parse(o),s,d.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Wr([e,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[e,n,o,s,t])}function gy(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=O.useContext(Dn),{matches:i}=O.useContext($n),{pathname:s}=al(),o=JSON.stringify(dy(i,n.v7_relativeSplatPath));return O.useMemo(()=>hy(t,JSON.parse(o),s,r==="path"),[t,o,s,r])}function ix(t,e){return sx(t,e)}function sx(t,e,r,n){Qs()||Ae(!1);let{navigator:i}=O.useContext(Dn),{matches:s}=O.useContext($n),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=al(),d;if(e){var f;let b=typeof e=="string"?Ri(e):e;l==="/"||(f=b.pathname)!=null&&f.startsWith(l)||Ae(!1),d=b}else d=u;let _=d.pathname||"/",x=_;if(l!=="/"){let b=l.replace(/^\//,"").split("/");x="/"+_.replace(/^\//,"").split("/").slice(b.length).join("/")}let k=I1(t,{pathname:x}),v=ux(k&&k.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Wr([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Wr([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,r,n);return e&&v?O.createElement(ol.Provider,{value:{location:zs({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Dr.Pop}},v):v}function ox(){let t=px(),e=Z1(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},e),r?O.createElement("pre",{style:i},r):null,null)}const ax=O.createElement(ox,null);class lx extends O.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?O.createElement($n.Provider,{value:this.props.routeContext},O.createElement(py.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function cx(t){let{routeContext:e,match:r,children:n}=t,i=O.useContext(rh);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),O.createElement($n.Provider,{value:e},n)}function ux(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var s;if(!r)return null;if(r.errors)t=r.matches;else if((s=n)!=null&&s.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,a=(i=r)==null?void 0:i.errors;if(a!=null){let d=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||Ae(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:_,errors:x}=r,k=f.route.loader&&_[f.route.id]===void 0&&(!x||x[f.route.id]===void 0);if(f.route.lazy||k){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,_)=>{let x,k=!1,v=null,b=null;r&&(x=a&&f.route.id?a[f.route.id]:void 0,v=f.route.errorElement||ax,l&&(u<0&&_===0?(k=!0,b=null):u===_&&(k=!0,b=f.route.hydrateFallbackElement||null)));let g=e.concat(o.slice(0,_+1)),w=()=>{let y;return x?y=v:k?y=b:f.route.Component?y=O.createElement(f.route.Component,null):f.route.element?y=f.route.element:y=d,O.createElement(cx,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:r!=null},children:y})};return r&&(f.route.ErrorBoundary||f.route.errorElement||_===0)?O.createElement(lx,{location:r.location,revalidation:r.revalidation,component:v,error:x,children:w(),routeC
58ontext:{outlet:null,matches:g,isDataRoute:!0}}):w()},null)}var vy=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(vy||{}),Na=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Na||{});function dx(t){let e=O.useContext(rh);return e||Ae(!1),e}function hx(t){let e=O.useContext(tx);return e||Ae(!1),e}function fx(t){let e=O.useContext($n);return e||Ae(!1),e}function yy(t){let e=fx(),r=e.matches[e.matches.length-1];return r.route.id||Ae(!1),r.route.id}function px(){var t;let e=O.useContext(py),r=hx(Na.UseRouteError),n=yy(Na.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function mx(){let{router:t}=dx(vy.UseNavigateStable),e=yy(Na.UseNavigateStable),r=O.useRef(!1);return my(()=>{r.current=!0}),O.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,zs({fromRouteId:e},s)))},[t,e])}function gx(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function nr(t){Ae(!1)}function vx(t){let{basename:e="/",children:r=null,location:n,navigationType:i=Dr.Pop,navigator:s,static:o=!1,future:a}=t;Qs()&&Ae(!1);let l=e.replace(/^\/*/,"/"),u=O.useMemo(()=>({basename:l,navigator:s,static:o,future:zs({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof n=="string"&&(n=Ri(n));let{pathname:d="/",search:f="",hash:_="",state:x=null,key:k="default"}=n,v=O.useMemo(()=>{let b=th(d,l);return b==null?null:{location:{pathname:b,search:f,hash:_,state:x,key:k},navigationType:i}},[l,d,f,_,x,k,i]);return v==null?null:O.createElement(Dn.Provider,{value:u},O.createElement(ol.Provider,{children:r,value:v}))}function yx(t){let{children:e,location:r}=t;return ix(vu(e),r)}new Promise(()=>{});function vu(t,e){e===void 0&&(e=[]);let r=[];return O.Children.forEach(t,(n,i)=>{if(!O.isValidElement(n))return;let s=[...e,i];if(n.type===O.Fragment){r.push.apply(r,vu(n.props.children,s));return}n.type!==nr&&Ae(!1),!n.props.index||!n.props.children||Ae(!1);let o={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=vu(n.props.children,s)),r.push(o)}),r}/**
59 * React Router DOM v6.30.1
60 *
61 * Copyright (c) Remix Software Inc.
62 *
63 * This source code is licensed under the MIT license found in the
64 * LICENSE.md file in the root directory of this source tree.
65 *
66 * @license MIT
67 */function yu(){return yu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},yu.apply(this,arguments)}function wx(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function _x(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function bx(t,e){return t.button===0&&(!e||e==="_self")&&!_x(t)}const xx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],kx="6";try{window.__reactRouterVersion=kx}catch{}const Sx="startTransition",Ff=y_[Sx];function Ex(t){let{basename:e,children:r,future:n,window:i}=t,s=O.useRef();s.current==null&&(s.current=O1({window:i,v5Compat:!0}));let o=s.current,[a,l]=O.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},d=O.useCallback(f=>{u&&Ff?Ff(()=>l(f)):l(f)},[l,u]);return O.useLayoutEffect(()=>o.listen(d),[o,d]),O.useEffect(()=>gx(n),[n]),O.createElement(vx,{basename:e,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}const Cx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",jx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pe=O.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:d,viewTransition:f}=e,_=wx(e,xx),{basename:x}=O.useContext(Dn),k,v=!1;if(typeof u=="string"&&jx.test(u)&&(k=u,Cx))try{let y=new URL(window.location.href),E=u.startsWith("//")?new URL(y.protocol+u):new URL(u),j=th(E.pathname,x);E.origin===y.origin&&j!=null?u=j+E.search+E.hash:v=!0}catch{}let b=rx(u,{relative:i}),g=Tx(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:f});function w(y){n&&n(y),y.defaultPrevented||g(y)}return O.createElement("a",yu({},_,{href:k||b,onClick:v||s?n:w,ref:r,target:l}))});var Bf;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Bf||(Bf={}));var zf;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(zf||(zf={}));function Tx(t,e){let{target:r,replace:n,state:i,preventScrollReset:s,relative:o,viewTransition:a}=e===void 0?{}:e,l=nh(),u=al(),d=gy(t,{relative:o});return O.useCallback(f=>{if(bx(f,r)){f.preventDefault();let _=n!==void 0?n:Oa(u)===Oa(d);l(t,{replace:_,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,d,n,i,r,t,s,o,a])}/**
68 * @license lucide-react v0.344.0 - ISC
69 *
70 * This source code is licensed under the ISC license.
71 * See the LICENSE file in the root directory of this source tree.
72 */var Px={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
73 * @license lucide-react v0.344.0 - ISC
74 *
75 * This source code is licensed under the ISC license.
76 * See the LICENSE file in the root directory of this source tree.
77 */const Ox=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),te=(t,e)=>{const r=O.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:l,...u},d)=>O.createElement("svg",{ref:d,...Px,width:i,height:i,stroke:n,strokeWidth:o?Number(s)*24/Number(i):s,className:["lucide",`lucide-${Ox(t)}`,a].join(" "),...u},[...e.map(([f,_])=>O.createElement(f,_)),...Array.isArray(l)?l:[l]]));return r.displayName=`${t}`,r};/**
78 * @license lucide-react v0.344.0 - ISC
79 *
80 * This source code is licensed under the ISC license.
81 * See the LICENSE file in the root directory of this source tree.
82 */const Nx=te("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
83 * @license lucide-react v0.344.0 - ISC
84 *
85 * This source code is licensed under the ISC license.
86 * See the LICENSE file in the root directory of this source tree.
87 */const wy=te("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/**
88 * @license lucide-react v0.344.0 - ISC
89 *
90 * This source code is licensed under the ISC license.
91 * See the LICENSE file in the root directory of this source tree.
92 */const Ax=te("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
93 * @license lucide-react v0.344.0 - ISC
94 *
95 * This source code is licensed under the ISC license.
96 * See the LICENSE file in the root directory of this source tree.
97 */const Vn=te("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
98 * @license lucide-react v0.344.0 - ISC
99 *
100 * This source code is licensed under the ISC license.
101 * See the LICENSE file in the root directory of this source tree.
102 */const Ix=te("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
103 * @license lucide-react v0.344.0 - ISC
104 *
105 * This source code is licensed under the ISC license.
106 * See the LICENSE file in the root directory of this source tree.
107 */const Mx=te("Compass",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76",key:"m9r19z"}]]);/**
108 * @license lucide-react v0.344.0 - ISC
109 *
110 * This source code is licensed under the ISC license.
111 * See the LICENSE file in the root directory of this source tree.
112 */const Lx=te("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
113 * @license lucide-react v0.344.0 - ISC
114 *
115 * This source code is licensed under the ISC license.
116 * See the LICENSE file in the root directory of this source tree.
117 */const _y=te("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
118 * @license lucide-react v0.344.0 - ISC
119 *
120 * This source code is licensed under the ISC license.
121 * See the LICENSE file in the root directory of this source tree.
122 */const Rx=te("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
123 * @license lucide-react v0.344.0 - ISC
124 *
125 * This source code is licensed under the ISC license.
126 * See the LICENSE file in the root directory of this source tree.
127 */const Dx=te("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
128 * @license lucide-react v0.344.0 - ISC
129 *
130 * This source code is licensed under the ISC license.
131 * See the LICENSE file in the root directory of this source tree.
132 */const by=te("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
133 * @license lucide-react v0.344.0 - ISC
134 *
135 * This source code is licensed under the ISC license.
136 * See the LICENSE file in the root directory of this source tree.
137 */const $x=te("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
138 * @license lucide-react v0.344.0 - ISC
139 *
140 * This source code is licensed under the ISC license.
141 * See the LICENSE file in the root directory of this source tree.
142 */const Ux=te("Handshake",[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]]);/**
143 * @license lucide-react v0.344.0 - ISC
144 *
145 * This source code is licensed under the ISC license.
146 * See the LICENSE file in the root directory of this source tree.
147 */const Fx=te("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
148 * @license lucide-react v0.344.0 - ISC
149 *
150 * This source code is licensed under the ISC license.
151 * See the LICENSE file in the root directory of this source tree.
152 */const Tn=te("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
153 * @license lucide-react v0.344.0 - ISC
154 *
155 * This source code is licensed under the ISC license.
156 * See the LICENSE file in the root directory of this source tree.
157 */const Bx=te("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
158 * @license lucide-react v0.344.0 - ISC
159 *
160 * This source code is licensed under the ISC license.
161 * See the LICENSE file in the root directory of this source tree.
162 */const wu=te("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
163 * @license lucide-react v0.344.0 - ISC
164 *
165 * This source code is licensed under the ISC license.
166 * See the LICENSE file in the root directory of this source tree.
167 */const zx=te("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",ke
167y:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/**
168 * @license lucide-react v0.344.0 - ISC
169 *
170 * This source code is licensed under the ISC license.
171 * See the LICENSE file in the root directory of this source tree.
172 */const Vx=te("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
173 * @license lucide-react v0.344.0 - ISC
174 *
175 * This source code is licensed under the ISC license.
176 * See the LICENSE file in the root directory of this source tree.
177 */const qx=te("MessageSquareHeart",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M14.8 7.5a1.84 1.84 0 0 0-2.6 0l-.2.3-.3-.3a1.84 1.84 0 1 0-2.4 2.8L12 13l2.7-2.7c.9-.9.8-2.1.1-2.8",key:"1blaws"}]]);/**
178 * @license lucide-react v0.344.0 - ISC
179 *
180 * This source code is licensed under the ISC license.
181 * See the LICENSE file in the root directory of this source tree.
182 */const Kr=te("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
183 * @license lucide-react v0.344.0 - ISC
184 *
185 * This source code is licensed under the ISC license.
186 * See the LICENSE file in the root directory of this source tree.
187 */const Vf=te("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
188 * @license lucide-react v0.344.0 - ISC
189 *
190 * This source code is licensed under the ISC license.
191 * See the LICENSE file in the root directory of this source tree.
192 */const Pn=te("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
193 * @license lucide-react v0.344.0 - ISC
194 *
195 * This source code is licensed under the ISC license.
196 * See the LICENSE file in the root directory of this source tree.
197 */const On=te("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
198 * @license lucide-react v0.344.0 - ISC
199 *
200 * This source code is licensed under the ISC license.
201 * See the LICENSE file in the root directory of this source tree.
202 */const _u=te("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
203 * @license lucide-react v0.344.0 - ISC
204 *
205 * This source code is licensed under the ISC license.
206 * See the LICENSE file in the root directory of this source tree.
207 */const xy=te("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
208 * @license lucide-react v0.344.0 - ISC
209 *
210 * This source code is licensed under the ISC license.
211 * See the LICENSE file in the root directory of this source tree.
212 */const ky=te("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
213 * @license lucide-react v0.344.0 - ISC
214 *
215 * This source code is licensed under the ISC license.
216 * See the LICENSE file in the root directory of this source tree.
217 */const Jx=te("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
218 * @license lucide-react v0.344.0 - ISC
219 *
220 * This source code is licensed under the ISC license.
221 * See the LICENSE file in the root directory of this source tree.
222 */const Wx=te("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
222],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
223 * @license lucide-react v0.344.0 - ISC
224 *
225 * This source code is licensed under the ISC license.
226 * See the LICENSE file in the root directory of this source tree.
227 */const Hx=te("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
228 * @license lucide-react v0.344.0 - ISC
229 *
230 * This source code is licensed under the ISC license.
231 * See the LICENSE file in the root directory of this source tree.
232 */const Gx=te("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
233 * @license lucide-react v0.344.0 - ISC
234 *
235 * This source code is licensed under the ISC license.
236 * See the LICENSE file in the root directory of this source tree.
237 */const Yx=te("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
238 * @license lucide-react v0.344.0 - ISC
239 *
240 * This source code is licensed under the ISC license.
241 * See the LICENSE file in the root directory of this source tree.
242 */const Kx=te("Volume2",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",key:"ltjumu"}],["path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",key:"1kegas"}]]);/**
243 * @license lucide-react v0.344.0 - ISC
244 *
245 * This source code is licensed under the ISC license.
246 * See the LICENSE file in the root directory of this source tree.
247 */const Qx=te("VolumeX",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
248 * @license lucide-react v0.344.0 - ISC
249 *
250 * This source code is licensed under the ISC license.
251 * See the LICENSE file in the root directory of this source tree.
252 */const qn=te("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
253 * @license lucide-react v0.344.0 - ISC
254 *
255 * This source code is licensed under the ISC license.
256 * See the LICENSE file in the root directory of this source tree.
257 */const Sy=te("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Xx="modulepreload",Zx=function(t){return"/"+t},qf={},Xs=function(e,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=Zx(l),l in qf)return;qf[l]=!0;const u=l.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":Xx,u||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((_,x)=>{f.addEventListener("load",_),f.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})},ek=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Xs(async()=>{const{default:n}=await Promise.resolve().then(()=>Di);return{default:n}},void 0).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)};class ih extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}}class tk extends ih{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class rk extends ih{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class nk extends ih{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var bu;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(bu||(bu={}));var ik=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{u(n.next(d))}catch(f){o(f)}}function l(d){try{u(n.throw(d))}catch(f){o(f)}}function u(d){d.done?s(d.value):i(d.value).then(a,l)}u((n=n.apply(t,e||[])).next())})};class sk{constructor(e,{headers:r={},customFetch:n,region:i=bu.Any}={}){this.url=e,this.headers=r,this.region=i,this.fetch=ek(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,r={}){var n;return ik(this,void 0,void 0,function*(){try{const{headers:i,method:s,body:o}=r;let a={},{region:l}=r;l||(l=this.region),l&&l!=="any"&&(a["x-region"]=l);let u;o&&(i&&!Object.prototype.hasOwnProperty.call(i,"Content-Type")||!i)&&(typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",u=o):typeof o=="str
257ing"?(a["Content-Type"]="text/plain",u=o):typeof FormData<"u"&&o instanceof FormData?u=o:(a["Content-Type"]="application/json",u=JSON.stringify(o)));const d=yield this.fetch(`${this.url}/${e}`,{method:s||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),i),body:u}).catch(k=>{throw new tk(k)}),f=d.headers.get("x-relay-error");if(f&&f==="true")throw new rk(d);if(!d.ok)throw new nk(d);let _=((n=d.headers.get("Content-Type"))!==null&&n!==void 0?n:"text/plain").split(";")[0].trim(),x;return _==="application/json"?x=yield d.json():_==="application/octet-stream"?x=yield d.blob():_==="text/event-stream"?x=d:_==="multipart/form-data"?x=yield d.formData():x=yield d.text(),{data:x,error:null}}catch(i){return{data:null,error:i}}})}}var lt={},sh={},ll={},Zs={},cl={},ul={},ok=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},ji=ok();const ak=ji.fetch,Ey=ji.fetch.bind(ji),Cy=ji.Headers,lk=ji.Request,ck=ji.Response,Di=Object.freeze(Object.defineProperty({__proto__:null,Headers:Cy,Request:lk,Response:ck,default:Ey,fetch:ak},Symbol.toStringTag,{value:"Module"})),uk=Gm(Di);var dl={};Object.defineProperty(dl,"__esModule",{value:!0});let dk=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
257de=e.code}};dl.default=dk;var jy=ft&&ft.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ul,"__esModule",{value:!0});const hk=jy(uk),fk=jy(dl);let pk=class{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:typeof fetch>"u"?this.fetch=hk.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,r){return this.headers=Object.assign({},this.headers),this.headers[e]=r,this}then(e,r){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const n=this.fetch;let i=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async s=>{var o,a,l;let u=null,d=null,f=null,_=s.status,x=s.statusText;if(s.ok){if(this.method!=="HEAD"){const g=await s.text();g===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?d=g:d=JSON.parse(g))}const v=(o=this.headers.Prefer)===null||o===void 0?void 0:o.match(/count=(exact|planned|estimated)/),b=(a=s.headers.get("content-range"))===null||a===void 0?void 0:a.split("/");v&&b&&b.length>1&&(f=parseInt(b[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(d)&&(d.length>1?(u={code:"PGRST116",details:`Results contain ${d.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},d=null,f=null,_=406,x="Not Acceptable"):d.length===1?d=d[0]:d=null)}else{const v=await s.text();try{u=JSON.parse(v),Array.isArray(u)&&s.status===404&&(d=[],u=null,_=200,x="OK")}catch{s.status===404&&v===""?(_=204,x="No Content"):u={message:v}}if(u&&this.isMaybeSingle&&(!((l=u==null?void 0:u.details)===null||l===void 0)&&l.includes("0 rows"))&&(u=null,_=200,x="OK"),u&&this.shouldThrowOnError)throw new fk.default(u)}return{error:u,data:d,count:f,status:_,statusText:x}});return this.shouldThrowOnError||(i=i.catch(s=>{var o,a,l;return{error:{message:`${(o=s==null?void 0:s.name)!==null&&o!==void 0?o:"FetchError"}: ${s==null?void 0:s.message}`,details:`${(a=s==null?void 0:s.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=s==null?void 0:s.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),i.then(e,r)}returns(){return this}overrideTypes(){return this}};ul.default=pk;var mk=ft&&ft.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cl,"__esModule",{value:!0});const gk=mk(ul);let vk=class extends gk.default{select(e){let r=!1;const n=(e??"*").split("").map(i=>/\s/.test(i)&&!r?"":(i==='"'&&(r=!r),i)).join("");return this.url.searchParams.set("select",n),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:r=!0,nullsFirst:n,foreignTable:i,referencedTable:s=i}={}){const o=s?`${s}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${e}.${r?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:r,referencedTable:n=r}={}){const i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(i,`${e}`),this}range(e,r,{foreignTable:n,referencedTable:i=n}={}){const s=typeof i>"u"?"offset":`${i}.offset`,o=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(o,`${r-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}
257explain({analyze:e=!1,verbose:r=!1,settings:n=!1,buffers:i=!1,wal:s=!1,format:o="text"}={}){var a;const l=[e?"analyze":null,r?"verbose":null,n?"settings":null,i?"buffers":null,s?"wal":null].filter(Boolean).join("|"),u=(a=this.headers.Accept)!==null&&a!==void 0?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${o}; for="${u}"; options=${l};`,o==="json"?this:this}rollback(){var e;return((e=this.headers.Prefer)!==null&&e!==void 0?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};cl.default=vk;var yk=ft&&ft.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Zs,"__esModule",{value:!0});const wk=yk(cl);let _k=class extends wk.default{eq(e,r){return this.url.searchParams.append(e,`eq.${r}`),this}neq(e,r){return this.url.searchParams.append(e,`neq.${r}`),this}gt(e,r){return this.url.searchParams.append(e,`gt.${r}`),this}gte(e,r){return this.url.searchParams.append(e,`gte.${r}`),this}lt(e,r){return this.url.searchParams.append(e,`lt.${r}`),this}lte(e,r){return this.url.searchParams.append(e,`lte.${r}`),this}like(e,r){return this.url.searchParams.append(e,`like.${r}`),this}likeAllOf(e,r){return this.url.searchParams.append(e,`like(all).{${r.join(",")}}`),this}likeAnyOf(e,r){return this.url.searchParams.append(e,`like(any).{${r.join(",")}}`),this}ilike(e,r){return this.url.searchParams.append(e,`ilike.${r}`),this}ilikeAllOf(e,r){return this.url.searchParams.append(e,`ilike(all).{${r.join(",")}}`),this}ilikeAnyOf(e,r){return this.url.searchParams.append(e,`ilike(any).{${r.join(",")}}`),this}is(e,r){return this.url.searchParams.append(e,`is.${r}`),this}in(e,r){const n=Array.from(new Set(r)).map(i=>typeof i=="string"&&new RegExp("[,()]").test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}contains(e,r){return typeof r=="string"?this.url.searchParams.append(e,`cs.${r}`):Array.isArray(r)?this.url.searchParams.append(e,`cs.{${r.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(r)}`),this}containedBy(e,r){return typeof r=="string"?this.url.searchParams.append(e,`cd.${r}`):Array.isArray(r)?this.url.searchParams.append(e,`cd.{${r.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(r)}`),this}rangeGt(e,r){return this.url.searchParams.append(e,`sr.${r}`),this}rangeGte(e,r){return this.url.searchParams.append(e,`nxl.${r}`),this}rangeLt(e,r){return this.url.searchParams.append(e,`sl.${r}`),this}rangeLte(e,r){return this.url.searchParams.append(e,`nxr.${r}`),this}rangeAdjacent(e,r){return this.url.searchParams.append(e,`adj.${r}`),this}overlaps(e,r){return typeof r=="string"?this.url.searchParams.append(e,`ov.${r}`):this.url.searchParams.append(e,`ov.{${r.join(",")}}`),this}textSearch(e,r,{config:n,type:i}={}){let s="";i==="plain"?s="pl":i==="phrase"?s="ph":i==="websearch"&&(s="w");const o=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${o}.${r}`),this}match(e){return Object.entries(e).forEach(([r,n])=>{this.url.searchParams.append(r,`eq.${n}`)}),this}not(e,r,n){return this.url.searchParams.append(e,`not.${r}.${n}`),this}or(e,{foreignTable:r,referencedTable:n=r}={}){const i=n?`${n}.or`:"or";return this.url.searchParams.append(i,`(${e})`),this}filter(e,r,n){return this.url.searchParams.append(e,`${r}.${n}`),this}};Zs.default=_k;var bk=ft&&ft.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};
257Object.defineProperty(ll,"__esModule",{value:!0});const Xi=bk(Zs);let xk=class{constructor(e,{headers:r={},schema:n,fetch:i}){this.url=e,this.headers=r,this.schema=n,this.fetch=i}select(e,{head:r=!1,count:n}={}){const i=r?"HEAD":"GET";let s=!1;const o=(e??"*").split("").map(a=>/\s/.test(a)&&!s?"":(a==='"'&&(s=!s),a)).join("");return this.url.searchParams.set("select",o),n&&(this.headers.Prefer=`count=${n}`),new Xi.default({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:r,defaultToNull:n=!0}={}){const i="POST",s=[];if(this.headers.Prefer&&s.push(this.headers.Prefer),r&&s.push(`count=${r}`),n||s.push("missing=default"),this.headers.Prefer=s.join(","),Array.isArray(e)){const o=e.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(o.length>0){const a=[...new Set(o)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new Xi.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:r,ignoreDuplicates:n=!1,count:i,defaultToNull:s=!0}={}){const o="POST",a=[`resolution=${n?"ignore":"merge"}-duplicates`];if(r!==void 0&&this.url.searchParams.set("on_conflict",r),this.headers.Prefer&&a.push(this.headers.Prefer),i&&a.push(`count=${i}`),s||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(e)){const l=e.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(l.length>0){const u=[...new Set(l)].map(d=>`"${d}"`);this.url.searchParams.set("columns",u.join(","))}}return new Xi.default({method:o,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:r}={}){const n="PATCH",i=[];return this.headers.Prefer&&i.push(this.headers.Prefer),r&&i.push(`count=${r}`),this.headers.Prefer=i.join(","),new Xi.default({method:n,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){const r="DELETE",n=[];return e&&n.push(`count=${e}`),this.headers.Prefer&&n.unshift(this.headers.Prefer),this.headers.Prefer=n.join(","),new Xi.default({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};ll.default=xk;var hl={},fl={};Object.defineProperty(fl,"__esModule",{value:!0});fl.version=void 0;fl.version="0.0.0-automated";Object.defineProperty(hl,"__esModule",{value:!0});hl.DEFAULT_HEADERS=void 0;const kk=fl;hl.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${kk.version}`};var Ty=ft&&ft.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sh,"__esModule",{value:!0});const Sk=Ty(ll),Ek=Ty(Zs),Ck=hl;let jk=class Py{constructor(e,{headers:r={},schema:n,fetch:i}={}){this.url=e,this.headers=Object.assign(Object.assign({},Ck.DEFAULT_HEADERS),r),this.schemaName=n,this.fetch=i}from(e){const r=new URL(`${this.url}/${e}`);return new Sk.default(r,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new Py(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,r={},{head:n=!1,get:i=!1,count:s}={}){let o;const a=new URL(`${this.url}/rpc/${e}`);let l;n||i?(o=n?"HEAD":"GET",Object.entries(r).filter(([d,f])=>f!==void 0).map(([d,f])=>[d,Array.isArray(f)?`{${f.join(",")}}`:`${f}`]).forEach(([d,f])=>{a.searchParams.append(d,f)})):(o="POST",l=r);const u=Object.assign({},this.headers);return s&&(u.Prefer=`count=${s}`),new Ek.default({method:o,url:a,headers:u,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}};sh.default=jk;var $i=ft&&ft.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lt,"__esModule",{value:!0});lt.PostgrestError=lt.PostgrestBuilder=lt.PostgrestTransformBuilder=lt.PostgrestFilterBuilder=lt.PostgrestQueryBuilder=lt.PostgrestClient=void 0;const Oy=$i(sh);lt.PostgrestClient=Oy.default;const Ny=$i(ll);lt.PostgrestQueryBuilder=Ny.default;const Ay=$i(Zs);lt.PostgrestFilterBuilder=Ay.default;const Iy=$i(cl);lt.PostgrestTransformBuilder=Iy.default;const My=$i(ul);lt.PostgrestBuilder=My.default;const Ly=$i(dl);lt.PostgrestError=Ly.default;var Tk=lt.default={PostgrestClient:Oy.default,PostgrestQueryBuilder:Ny.default,PostgrestFilterBuilder:Ay.default,PostgrestTransformBuilder:Iy.default,PostgrestBuilder:My.default,PostgrestError:Ly.default};const{PostgrestClient:Pk,PostgrestQueryBuilder:NT,PostgrestFilterBuilder:AT,PostgrestTransformBuilder:IT,PostgrestBuilder:MT,PostgrestError:LT}=Tk;let xu;typeof window>"u"?xu=require("ws"):xu=window.WebSocket;const Ok=xu,Nk="2.11.10",Ak={"X-Client-Info":`realtime-js/${Nk}`},Ik="1.0.0",Ry=1e4,Mk=1e3;var gi;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(gi||(gi={}));var Ze;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(Ze||(Ze={}));var Bt;(function(t){t.close="phx_close",t.error="phx_error",t.join="phx_join",t.reply="phx_reply",t.leave="phx_leave",t.access_token="access_token"})(Bt||(Bt={}));var ku;(function(t){t.websocket="websocket"})(ku||(ku={}));var fn;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})(fn||(fn={}));class Lk{constructor(){this.HEADER_LENGTH=1}decode(e,r){return e.constructor===ArrayBuffer?r(this._binaryDecode(e)):r(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const r=new DataView(e),n=new TextDecoder;return this._decodeBroadcast(e,r,n)}_decodeBroadcast(e,r,n){const i=r.getUint8(1),s=r.getUint8(2);let o=this.HEADER_LENGTH+2;const a=n.decode(e.slice(o,o+i));o=o+i;const l=n.decode(e.slice(o,o+s));o=o+s;const u=JSON.parse(n.decode(e.slice(o,e.byteLength)));return{ref:null,topic:a,event:l,payload:u}}}class Dy{constructor(e,r){this.callback=e,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var me;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.t
vendor: 10,645 bytes, line 257
257srange="tsrange",t.tstzrange="tstzrange"})(me||(me={}));const Jf=(t,e,r={})=>{var n;const i=(n=r.skipTypes)!==null&&n!==void 0?n:[];return Object.keys(e).reduce((s,o)=>(s[o]=Rk(o,t,e,i),s),{})},Rk=(t,e,r,n)=>{const i=e.find(a=>a.name===t),s=i==null?void 0:i.type,o=r[t];return s&&!n.includes(s)?$y(s,o):Su(o)},$y=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return Fk(e,r)}switch(t){case me.bool:return Dk(e);case me.float4:case me.float8:case me.int2:case me.int4:case me.int8:case me.numeric:case me.oid:return $k(e);case me.json:case me.jsonb:return Uk(e);case me.timestamp:return Bk(e);case me.abstime:case me.date:case me.daterange:case me.int4range:case me.int8range:case me.money:case me.reltime:case me.text:case me.time:case me.timestamptz:case me.timetz:case me.tsrange:case me.tstzrange:return Su(e);default:return Su(e)}},Su=t=>t,Dk=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},$k=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},Uk=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch(e){return console.log(`JSON parse error: ${e}`),t}return t},Fk=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let s;const o=t.slice(1,r);try{s=JSON.parse("["+o+"]")}catch{s=o?o.split(","):[]}return s.map(a=>$y(e,a))}return t},Bk=t=>typeof t=="string"?t.replace(" ","T"):t,Uy=t=>{let e=t;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")};class Xl{constructor(e,r,n={},i=Ry){this.channel=e,this.event=r,this.payload=n,this.timeout=i,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,r){var n;return this._hasReceived(e)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:e,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(r))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var Wf;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Wf||(Wf={}));class ws{constructor(e,r){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},i=>{const{onJoin:s,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=ws.syncState(this.state,i,s,o),this.pendingDiffs.forEach(l=>{this.state=ws.syncDiff(this.state,l,s,o)}),this.pendingDiffs=[],a()}),this.channel._on(n.diff,{},i=>{const{onJoin:s,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=ws.syncDiff(this.state,i,s,o),a())}),this.onJoin((i,s,o)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:s,newPresences:o})}),this.onLeave((i,s,o)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:s,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,r,n,i){const s=this.cloneDeep(e),o=this.transformState(r),a={},l={};return this.map(s,(u,d)=>{o[u]||(l[u]=d)}),this.map(o,(u,d)=>{const f=s[u];if(f){const _=d.map(b=>b.presence_ref),x=f.map(b=>b.presence_ref),k=d.filter(b=>x.indexOf(b.presence_ref)<0),v=f.filter(b=>_.indexOf(b.presence_ref)<0);k.length>0&&(a[u]=k),v.length>0&&(l[u]=v)}else a[u]=d}),this.syncDiff(s,{joins:a,leaves:l},n,i)}static syncDiff(e,r,n,i){const{joins:s,leaves:o}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),i||(i=()=>{}),this.map(s,(a,l)=>{var u;const d=(u=e[a])!==null&&u!==void 0?u:[];if(e[a]=this.cloneDeep(l),d.length>0){const f=e[a].map(x=>x.presence_ref),_=d.filter(x=>f.indexOf(x.presence_ref)<0);e[a].unshift(..._)}n(a,d,l)}),this.map(o,(a,l)=>{let u=e[a];if(!u)return;const d=l.map(f=>f.presence_ref);u=u.filter(f=>d.indexOf(f.presence_ref)<0),e[a]=u,i(a,u,l),u.length===0&&delete e[a]}),e}static map(e,r){return Object.getOwnPropertyNames(e).map(n=>r(n,e[n]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const i=e[n];return"metas"in i?r[n]=i.metas.map(s=>(s.presence_ref=s.phx_ref,delete s.phx_ref,delete s.phx_ref_prev,s)):r[n]=i,r},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Hf;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(Hf||(Hf={}));var Gf;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Gf||(Gf={}));var ar;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(ar||(ar={}));class oh{constructor(e,r={config:{}},n){this.topic=e,this.params=r,this.socket=n,this.bindings={},this.state=Ze.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new Xl(this,Bt.join,this.params,this.timeout),this.rejoinTimer=new Dy(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Ze.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Ze.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Ze.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Ze.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Bt.reply,{},(i,s)=>{this._trigger(this._replyEventName(s),i)}),this.presence=new ws(this),this.broadcastEndpointURL=Uy(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(e,r=this.timeout){var n,i;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:s,presence:o,private:a}}=this.params;this._onError(d=>e==null?void 0:e(ar.CHANNEL_ERROR,d)),this._onClose(()=>e==null?void 0:e(ar.CLOSED));const l={},u={broadcast:s,presence:o,postgres_changes:(i=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(d=>d.filter))!==null&&i!==void 0?i:[],private:a};this.socket.accessTokenValue&&(l.access_token=this.socket.accessTokenValue),this.updateJoinPayload(Object.assign({config:u},l)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:d})=>{var f;if(this.socket.setAuth(),d===void 0){e==null||e(ar.SUBSCRIBED);return}else{const _=this.bindings.postgres_changes,x=(f=_==null?void 0:_.length)!==null&&f!==void 0?f:0,k=[];for(let v=0;v<x;v++){const b=_[v],{filter:{event:g,schema:w,table:y,filter:E}}=b,j=d&&d[v];if(j&&j.event===g&&j.schema===w&&j.table===y&&j.filter===E)k.push(Object.assign(Object.assign({},b),{id:j.id}));else{this.unsubscribe(),this.state=Ze.errored,e==null||e(ar.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=k,e&&e(ar.SUBSCRIBED);return}}).receive("error",d=>{this.state=Ze.errored,e==null||e(ar.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(d).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(ar.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,n){return this._on(e,r,n)}async send(e,r={}){var n,i;if(!this._canPush()&&e.type==="broadcast"){const{event:s,payload:o}=e,l={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((i=u.body)===null||i===void 0?void 0:i.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var o,a,l;const u=this._push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&s("ok"),u.receive("ok",()=>s("ok")),u.receive("error",()=>s("error")),u.receive("timeout",()=>s("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Ze.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Bt.close,"leave",this._joinRef())};return this.joinPush.destroy(),new Promise(n=>{const i=new Xl(this,Bt.leave,{},e);i.receive("ok",()=>{r(),n("ok")}).receive("timeout",()=>{r(),n("timed out")}).receive("error",()=>{n("error")}),i.send(),this._canPush()||i.trigger("ok",{})})}
257teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.rejoinTimer&&clearTimeout(this.rejoinTimer.timer),this.joinPush.destroy()}async _fetchWithTimeout(e,r,n){const i=new AbortController,s=setTimeout(()=>i.abort(),n),o=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:i.signal}));return clearTimeout(s),o}_push(e,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new Xl(this,e,r,n);return this._canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}_onMessage(e,r,n){return r}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,r,n){var i,s;const o=e.toLocaleLowerCase(),{close:a,error:l,leave:u,join:d}=Bt;if(n&&[a,l,u,d].indexOf(o)>=0&&n!==this._joinRef())return;let _=this._onMessage(o,r,n);if(r&&!_)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(x=>{var k,v,b;return((k=x.filter)===null||k===void 0?void 0:k.event)==="*"||((b=(v=x.filter)===null||v===void 0?void 0:v.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===o}).map(x=>x.callback(_,n)):(s=this.bindings[o])===null||s===void 0||s.filter(x=>{var k,v,b,g,w,y;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in x){const E=x.id,j=(k=x.filter)===null||k===void 0?void 0:k.event;return E&&((v=r.ids)===null||v===void 0?void 0:v.includes(E))&&(j==="*"||(j==null?void 0:j.toLocaleLowerCase())===((b=r.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const E=(w=(g=x==null?void 0:x.filter)===null||g===void 0?void 0:g.event)===null||w===void 0?void 0:w.toLocaleLowerCase();return E==="*"||E===((y=r==null?void 0:r.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return x.type.toLocaleLowerCase()===o}).map(x=>{if(typeof _=="object"&&"ids"in _){const k=_.data,{schema:v,table:b,commit_timestamp:g,type:w,errors:y}=k;_=Object.assign(Object.assign({},{schema:v,table:b,commit_timestamp:g,eventType:w,new:{},old:{},errors:y}),this._getPayloadRecords(k))}x.callback(_,n)})}_isClosed(){return this.state===Ze.closed}_isJoined(){return this.state===Ze.joined}_isJoining(){return this.state===Ze.joining}_isLeaving(){return this.state===Ze.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,r,n){const i=e.toLocaleLowerCase(),s={type:i,filter:r,callback:n};return this.bindings[i]?this.bindings[i].push(s):this.bindings[i]=[s],this}_off(e,r){const n=e.toLocaleLowerCase();return this.bindings[n]=this.bindings[n].filter(i=>{var s;return!(((s=i.type)===null||s===void 0?void 0:s.toLocaleLowerCase())===n&&oh.isEqual(i.filter,r))}),this}static isEqual(e,r){if(Object.keys(e).length!==Object.keys(r).length)return!1;for(const n in e)if(e[n]!==r[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(Bt.close,{},e)}_onError(e){this._on(Bt.error,{},r=>e(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Ze.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=Jf(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=Jf(e.columns,e.old_record)),r}}const Yf=()=>{},zk=`
258  addEventListener("message", (e) => {
259    if (e.data.event === "start") {
260      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
261    }
262  });`;class Vk{constructor(e,r){var n;this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers=Ak,this.params={},this.timeout=Ry,this.heartbeatIntervalMs=25e3,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Yf,this.ref=0,this.logger=Yf,this.conn=null,this.sendBuffer=[],this.serializer=new Lk,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._resolveFetch=s=>{let o;return s?o=s:typeof fetch>"u"?o=(...a)=>Xs(async()=>{const{default:l}=await Promise.resolve().then(()=>Di);return{default:l}},void 0).then(({default:l})=>l(...a)):o=fetch,(...a)=>o(...a)},this.endPoint=`${e}/${ku.websocket}`,this.httpEndpoint=Uy(e),r!=null&&r.transport?this.transport=r.transport:this.transport=null,r!=null&&r.params&&(this.params=r.params),r!=null&&r.headers&&(this.headers=Object.assign(Object.assign({},this.headers),r.headers)),r!=null&&r.timeout&&(this.timeout=r.timeout),r!=null&&r.logger&&(this.logger=r.logger),(r!=null&&r.logLevel||r!=null&&r.log_level)&&(this.logLevel=r.logLevel||r.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),r!=null&&r.heartbeatIntervalMs&&(this.heartbeatIntervalMs=r.heartbeatIntervalMs);const i=(n=r==null?void 0:r.params)===null||n===void 0?void 0:n.apikey;if(i&&(this.accessTokenValue=i,this.apiKey=i),this.reconnectAfterMs=r!=null&&r.reconnectAfterMs?r.reconnectAfterMs:s=>[1e3,2e3,5e3,1e4][s-1]||1e4,this.encode=r!=null&&r.encode?r.encode:(s,o)=>o(JSON.stringify(s)),this.decode=r!=null&&r.decode?r.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new Dy(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(r==null?void 0:r.fetch),r!=null&&r.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.worker=(r==null?void 0:r.worker)||!1,this.workerUrl=r==null?void 0:r.workerUrl}this.accessToken=(r==null?void 0:r.accessToken)||null}connect(){if(!this.conn){if(this.transport||(this.transport=Ok),this.transport){typeof window<"u"&&this.transport===window.WebSocket?this.conn=new this.transport(this.endpointURL()):this.conn=new this.transport(this.endpointURL(),void 0,{headers:this.headers}),this.setupConnection();return}this.conn=new qk(this.endpointURL(),void 0,{close:()=>{this.conn=null}})}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:Ik}))}
262disconnect(e,r){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,r??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset(),this.channels.forEach(n=>n.teardown()))}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return this.channels=this.channels.filter(n=>n._joinRef!==e._joinRef),this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const e=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,r,n){this.logger(e,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case gi.connecting:return fn.Connecting;case gi.open:return fn.Open;case gi.closing:return fn.Closing;default:return fn.Closed}}isConnected(){return this.connectionState()===fn.Open}channel(e,r={config:{}}){const n=`realtime:${e}`,i=this.getChannels().find(s=>s.topic===n);if(i)return i;{const s=new oh(`realtime:${e}`,r,this);return this.channels.push(s),s}}push(e){const{topic:r,event:n,payload:i,ref:s}=e,o=()=>{this.encode(e,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${r} ${n} (${s})`,i),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(e=null){let r=e||this.accessToken&&await this.accessToken()||this.accessTokenValue;this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(n=>{r&&n.updateJoinPayload({access_token:r,version:this.headers&&this.headers["X-Client-Info"]}),n.joinedOnce&&n._isJoined()&&n._push(Bt.access_token,{access_token:r})}))}async sendHeartbeat(){var e;if(!this.isConnected()){this.heartbeatCallback("disconnected");return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.heartbeatCallback("timeout"),(e=this.conn)===null||e===void 0||e.close(Mk,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatCallback("sent"),await this.setAuth()}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let r=this.channels.find(n=>n.topic===e&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${e}"`),r.unsubscribe())}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic)}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_onConnMessage(e){this.decode(e.data,r=>{let{topic:n,event:i,payload:s,ref:o}=r;n==="phoenix"&&i==="phx_reply"&&this.heartbeatCallback(r.payload.status=="ok"?"ok":"error"),o&&o===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null),this.log("receive",`${s.status||""} ${n} ${i} ${o&&"("+o+")"||""}`,s),Array.from(this.channels).filter(a=>a._isMember(n)).forEach(a=>a._trigger(i,s,o)),this.stateChangeCallbacks.message.forEach(a=>a(r))})}_onConnOpen(){if(this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this.reconnectTimer.reset(),!this.worker)this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs);else{this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this.workerRef.terminate()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}this.stateChangeCallbacks.open.forEach(e=>e())}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(r=>r(e))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(r=>r(e))}
262_triggerChanError(){this.channels.forEach(e=>e._trigger(Bt.error))}_appendParams(e,r){if(Object.keys(r).length===0)return e;const n=e.match(/\?/)?"&":"?",i=new URLSearchParams(r);return`${e}${n}${i}`}_workerObjectUrl(e){let r;if(e)r=e;else{const n=new Blob([zk],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}}class qk{constructor(e,r,n){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=gi.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=n.close}}class ah extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function $e(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}class Jk extends ah{constructor(e,r){super(e),this.name="StorageApiError",this.status=r}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class Eu extends ah{constructor(e,r){super(e),this.name="StorageUnknownError",this.originalError=r}}var Wk=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{u(n.next(d))}catch(f){o(f)}}function l(d){try{u(n.throw(d))}catch(f){o(f)}}function u(d){d.done?s(d.value):i(d.value).then(a,l)}u((n=n.apply(t,e||[])).next())})};const Fy=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Xs(async()=>{const{default:n}=await Promise.resolve().then(()=>Di);return{default:n}},void 0).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)},Hk=()=>Wk(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Xs(()=>Promise.resolve().then(()=>Di),void 0)).Response:Response}),Cu=t=>{if(Array.isArray(t))return t.map(r=>Cu(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const i=r.replace(/([-_][a-z])/gi,s=>s.toUpperCase().replace(/[-_]/g,""));e[i]=Cu(n)}),e};var Un=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{u(n.next(d))}catch(f){o(f)}}function l(d){try{u(n.throw(d))}catch(f){o(f)}}function u(d){d.done?s(d.value):i(d.value).then(a,l)}u((n=n.apply(t,e||[])).next())})};const Zl=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),Gk=(t,e,r)=>Un(void 0,void 0,void 0,function*(){const n=yield Hk();t instanceof n&&!(r!=null&&r.noResolveJson)?t.json().then(i=>{e(new Jk(Zl(i),t.status||500))}).catch(i=>{e(new Eu(Zl(i),i))}):e(new Eu(Zl(t),t))}),Yk=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),n&&(i.body=JSON.stringify(n)),Object.assign(Object.assign({},i),r))};function eo(t,e,r,n,i,s){return Un(this,void 0,void 0,function*(){return new Promise((o,a)=>{t(r,Yk(e,n,i,s)).then(l=>{if(!l.ok)throw l;return n!=null&&n.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>Gk(l,a,n))})})}function Aa(t,e,r,n){return Un(this,void 0,void 0,function*(){return eo(t,"GET",e,r,n)})}function Pr(t,e,r,n,i){return Un(this,void 0,void 0,function*(){return eo(t,"POST",e,n,i,r)})}function Kk(t,e,r,n,i){return Un(this,void 0,void 0,function*(){return eo(t,"PUT",e,n,i,r)})}function Qk(t,e,r,n){return Un(this,void 0,void 0,function*(){return eo(t,"HEAD",e,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}function By(t,e,r,n,i){return Un(this,void 0,void 0,function*(){return eo(t,"DELETE",e,n,i,r)})}var ot=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{u(n.next(d))}catch(f){o(f)}}function l(d){try{u(n.throw(d))}catch(f){o(f)}}function u(d){d.done?s(d.value):i(d.value).then(a,l)}u((n=n.apply(t,e||[])).next())})};const Xk={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Kf={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class Zk{constructor(e,r={},n,i){this.url=e,this.headers=r,this.bucketId=n,this.fetch=Fy(i)}uploadOrUpdate(e,r,n,i){return ot(this,void 0,void 0,function*(){try{let s;const o=Object.assign(Object.assign({},Kf),i);let a=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&n instanceof Blob?(s=new FormData,s.append("cacheControl",o.cacheControl),l&&s.append("metadata",this.encodeMetadata(l)),s.append("",n)):typeof FormData<"u"&&n instanceof FormData?(s=n,s.append("cacheControl",o.cacheControl),l&&s.append("metadata",this.encodeMetadata(l))):(s=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),i!=null&&i.headers&&(a=Object.assign(Object.assign({},a),i.headers));const u=this._removeEmptyFolders(r),d=this._getFinalPath(u),f=yield this.fetch(`${this.url}/object/${d}`,Object.assign({method:e,body:s,headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{})),_=yield f.json();return f.ok?{data:{path:u,id:_.Id,fullPath:_.Key},error:null}:{data:null,error:_}}catch(s){if($e(s))return{data:null,error:s};throw s}})}upload(e,r,n){return ot(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,r,n)})}uploadToSignedUrl(e,r,n,i){return ot(this,void 0,void 0,function*(){const s=this._removeEmptyFolders(e),o=this._getFinalPath(s),a=new URL(this.url+`/object/upload/sign/${o}`);a.searchParams.set("token",r);try{let l;const u=Object.assign({upsert:Kf.upsert},i),d=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",u.cacheControl)):(l=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType);const f=yield this.fetch(a.toString(),{method:"PUT",body:l,headers:d}),_=yield f.json();return f.ok?{data:{path:s,fullPath:_.Key},error:null}:{data:null,error:_}}catch(l){if($e(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(e,r){return ot(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e);const i=Object.assign({},this.headers);r!=null&&r.upsert&&(i["x-upsert"]="true");const s=yield Pr(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:i}),o=new URL(this.url+s.url),a=o.searchParams.get("token");if(!a)throw new ah("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:a},error:null}}catch(n){if($e(n))return{data:null,error:n};throw n}})}update(e,r,n){return ot(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,r,n)})}move(e,r,n){return ot(this,void 0,void 0,function*(){try{return{data:yield Pr(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers}),error:null}}catch(i){if($e(i))return{data:null,error:i};throw i}})}copy(e,r,n){return ot(this,void 0,void 0,function*(){try{return{data:{path:(yield Pr(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers})).Key},error:null}}catch(i){if($e(i))return{data:null,error:i};throw i}})}createSignedUrl(e,r,n){return ot(this,void 0,void 0,function*(){try{let i=this._getFinalPath(e),s=yield Pr(this.fetch,`${this.url}/object/sign/${i}
262`,Object.assign({expiresIn:r},n!=null&&n.transform?{transform:n.transform}:{}),{headers:this.headers});const o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return s={signedUrl:encodeURI(`${this.url}${s.signedURL}${o}`)},{data:s,error:null}}catch(i){if($e(i))return{data:null,error:i};throw i}})}createSignedUrls(e,r,n){return ot(this,void 0,void 0,function*(){try{const i=yield Pr(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:e},{headers:this.headers}),s=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{data:i.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${s}`):null})),error:null}}catch(i){if($e(i))return{data:null,error:i};throw i}})}download(e,r){return ot(this,void 0,void 0,function*(){const i=typeof(r==null?void 0:r.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((r==null?void 0:r.transform)||{}),o=s?`?${s}`:"";try{const a=this._getFinalPath(e);return{data:yield(yield Aa(this.fetch,`${this.url}/${i}/${a}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if($e(a))return{data:null,error:a};throw a}})}info(e){return ot(this,void 0,void 0,function*(){const r=this._getFinalPath(e);try{const n=yield Aa(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:Cu(n),error:null}}catch(n){if($e(n))return{data:null,error:n};throw n}})}exists(e){return ot(this,void 0,void 0,function*(){const r=this._getFinalPath(e);try{return yield Qk(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if($e(n)&&n instanceof Eu){const i=n.originalError;if([400,404].includes(i==null?void 0:i.status))return{data:!1,error:n}}throw n}})}getPublicUrl(e,r){const n=this._getFinalPath(e),i=[],s=r!=null&&r.download?`download=${r.download===!0?"":r.download}`:"";s!==""&&i.push(s);const a=typeof(r==null?void 0:r.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((r==null?void 0:r.transform)||{});l!==""&&i.push(l);let u=i.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}${u}`)}}}remove(e){return ot(this,void 0,void 0,function*(){try{return{data:yield By(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(r){if($e(r))return{data:null,error:r};throw r}})}list(e,r,n){return ot(this,void 0,void 0,function*(){try{const i=Object.assign(Object.assign(Object.assign({},Xk),r),{prefix:e||""});return{data:yield Pr(this.fetch,`${this.url}/object/list/${this.bucketId}`,i,{headers:this.headers},n),error:null}}catch(i){if($e(i))return{data:null,error:i};throw i}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const r=[];return e.width&&r.push(`width=${e.width}`),e.height&&r.push(`height=${e.height}`),e.resize&&r.push(`resize=${e.resize}`),e.format&&r.push(`format=${e.format}`),e.quality&&r.push(`quality=${e.quality}`),r.join("&")}}const eS="2.7.1",tS={"X-Client-Info":`storage-js/${eS}`};var Jn=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{u(n.next(d))}catch(f){o(f)}}function l(d){try{u(n.throw(d))}catch(f){o(f)}}function u(d){d.done?s(d.value):i(d.value).then(a,l)}u((n=n.apply(t,e||[])).next())})};class rS{constructor(e,r={},n){this.url=e,this.headers=Object.assign(Object.assign({},tS),r),this.fetch=Fy(n)}listBuckets(){return Jn(this,void 0,void 0,function*(){try{return{data:yield Aa(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if($e(e))return{data:null,error:e};throw e}})}getBucket(e){return Jn(this,void 0,void 0,function*(){try{return{data:yield Aa(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(r){if($e(r))return{data:null,error:r};throw r}})}createBucket(e,r={public:!1}){return Jn(this,void 0,void 0,function*(){try{return{data:yield Pr(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if($e(n))return{data:null,error:n};throw n}})}updateBucket(e,r){return Jn(this,void 0,void 0,function*(){try{return{data:yield Kk(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if($e(n))return{data:null,error:n};throw n}})}emptyBucket(e){return Jn(this,void 0,void 0,function*(){try{return{data:yield Pr(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(r){if($e(r))return{data:null,error:r};throw r}})}deleteBucket(e){return Jn(this,void 0,void 0,function*(){try{return{data:yield By(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(r){if($e(r))return{data:null,error:r};throw r}})}}class nS extends rS{constructor(e,r={},n){super(e,r,n)}from(e){return new Zk(this.url,this.headers,e,this.fetch)}}const iS="2.50.0";let ss="";typeof Deno<"u"?ss="deno":typeof document<"u"?ss="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ss="react-native":ss="node";const sS={"X-Client-Info":`supabase-js-${ss}/${iS}`},oS={headers:sS},aS={schema:"public"},lS={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},cS={};var uS=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{u(n.next(d))}catch(f){o(f)}}function l(d){try{u(n.throw(d))}catch(f){o(f)}}function u(d){d.done?s(d.value):i(d.value).then(a,l)}u((n=n.apply(t,e||[])).next())})};const dS=t=>{let e;return t?e=t:typeof fetch>"u"?e=Ey:e=fetch,(...r)=>e(...r)},hS=()=>typeof Headers>"u"?Cy:Headers,fS=(t,e,r)=>{const n=dS(r),i=hS();return(s,o)=>uS(void 0,void 0,void 0,function*(){var a;const l=(a=yield e())!==null&&a!==void 0?a:t;let u=new i(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",t),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),n(s,Object.assign(Object.assign({},o),{headers:u}))})};var pS=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{u(n.next(d))}catch(f){o(f)}}function l(d){try{u(n.throw(d))}catch(f){o(f)}}function u(d){d.done?s(d.value):i(d.value).then(a,l)}u((n=n.apply(t,e||[])).next())})};function mS(t){return t.endsWith("/")?t:t+"/"}function gS(t,e){var r,n;const{db:i,auth:s,realtime:o,global:a}=t,{db:l,auth:u,realtime:d,global:f}=e,_={db:Object.assign(Object.assign({},l),i),auth:Object.assign(Object.assign({},u),s),realtime:Object.assign(Object.assign({},d),o),global:Object.assign(Object.assign(Object.assign({},f),a),{headers:Object.assign(Object.assign({},(r=f==null?void 0:f.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:()=>pS(this,void 0,void 0,function*(){return""})};return t.accessToken?_.accessToken=t.accessToken:delete _.accessToken,_}const zy="2.70.0",Kn=30*1e3,ju=3,ec=ju*Kn,vS="http://localhost:9999",yS="supabase.auth.token",wS={"X-Client-Info":`gotrue-js/${zy}`},Tu="X-Supabase-Api-Version",Vy={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},_S=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,bS=6e5;
262class lh extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function K(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class xS extends lh{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function kS(t){return K(t)&&t.name==="AuthApiError"}class qy extends lh{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class rn extends lh{constructor(e,r,n,i){super(e,n,i),this.name=r,this.status=n}}class Sr extends rn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function SS(t){return K(t)&&t.name==="AuthSessionMissingError"}class So extends rn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Eo extends rn{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Co extends rn{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function ES(t){return K(t)&&t.name==="AuthImplicitGrantRedirectError"}class Qf extends rn{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Pu extends rn{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function tc(t){return K(t)&&t.name==="AuthRetryableFetchError"}class Xf extends rn{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class _s extends rn{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Ia="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Zf=` 	
263\r=`.split(""),CS=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Zf.length;e+=1)t[Zf[e].charCodeAt(0)]=-2;for(let e=0;e<Ia.length;e+=1)t[Ia[e].charCodeAt(0)]=e;return t})();function ep(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(Ia[n]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(Ia[n]),e.queuedBits-=6}}function Jy(t,e,r){const n=CS[t];if(n>-1)for(e.queue=e.queue<<6|n,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function tp(t){const e=[],r=o=>{e.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},s=o=>{PS(o,n,r)};for(let o=0;o<t.length;o+=1)Jy(t.charCodeAt(o),i,s);return e.join("")}function jS(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function TS(t,e){for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n>55295&&n<=56319){const i=(n-55296)*1024&65535;n=(t.charCodeAt(r+1)-56320&65535|i)+65536,r+=1}jS(n,e)}}function PS(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let n=1;n<6;n+=1)if(!(t>>7-n&1)){e.utf8seq=n;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function OS(t){const e=[],r={queue:0,queuedBits:0},n=i=>{e.push(i)};for(let i=0;i<t.length;i+=1)Jy(t.charCodeAt(i),r,n);return new Uint8Array(e)}function NS(t){const e=[];return TS(t,r=>e.push(r)),new Uint8Array(e)}function AS(t){const e=[],r={queue:0,queuedBits:0},n=i=>{e.push(i)};return t.forEach(i=>ep(i,r,n)),ep(null,r,n),e.join("")}function IS(t){return Math.round(Date.now()/1e3)+t}function MS(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}const Dt=()=>typeof window<"u"&&typeof document<"u",on={tested:!1,writable:!1},bs=()=>
263{if(!Dt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(on.tested)return on.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),on.tested=!0,on.writable=!0}catch{on.tested=!0,on.writable=!1}return on.writable};function LS(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((i,s)=>{e[s]=i})}catch{}return r.searchParams.forEach((n,i)=>{e[i]=n}),e}const Wy=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Xs(async()=>{const{default:n}=await Promise.resolve().then(()=>Di);return{default:n}},void 0).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)},RS=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Hy=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},jo=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return r}},To=async(t,e)=>{await t.removeItem(e)};class pl{constructor(){this.promise=new pl.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}pl.promiseConstructor=Promise;function rc(t){const e=t.split(".");if(e.length!==3)throw new _s("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!_S.test(e[n]))throw new _s("JWT not in base64url format");return{header:JSON.parse(tp(e[0])),payload:JSON.parse(tp(e[1])),signature:OS(e[2]),raw:{header:e[0],payload:e[1]}}}async function DS(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function $S(t,e){return new Promise((n,i)=>{(async()=>{for(let s=0;s<1/0;s++)try{const o=await t(s);if(!e(s,null,o)){n(o);return}}catch(o){if(!e(s,o)){i(o);return}}})()})}function US(t){return("0"+t.toString(16)).substr(-2)}function FS(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let i="";for(let s=0;s<56;s++)i+=r.charAt(Math.floor(Math.random()*n));return i}return crypto.getRandomValues(e),Array.from(e,US).join("")}async function BS(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),i=new Uint8Array(n);return Array.from(i).map(s=>String.fromCharCode(s)).join("")}async function zS(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const r=await BS(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Wn(t,e,r=!1){const n=FS();let i=n;r&&(i+="/PASSWORD_RECOVERY"),await Hy(t,`${e}-code-verifier`,i);const s=await zS(n);return[s,n===s?"plain":"s256"]}const VS=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function qS(t){const e=t.headers.get(Tu);if(!e||!e.match(VS))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function JS(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function WS(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const HS=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Hn(t){if(!HS.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}var GS=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const hn=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),YS=[502,503,504];async function rp(t){var e;if(!RS(t))throw new Pu(hn(t),0);if(YS.includes(t.status))throw new Pu(hn(t),t.status);let r;try{r=await t.json()}catch(s){throw new qy(hn(s),s)}let n;const i=qS(t);if(i&&i.getTime()>=Vy["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new Xf(hn(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new Sr}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((s,o)=>
263s&&typeof o=="string",!0))throw new Xf(hn(r),t.status,r.weak_password.reasons);throw new xS(hn(r),t.status||500,n)}const KS=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function Z(t,e,r,n){var i;const s=Object.assign({},n==null?void 0:n.headers);s[Tu]||(s[Tu]=Vy["2024-01-01"].name),n!=null&&n.jwt&&(s.Authorization=`Bearer ${n.jwt}`);const o=(i=n==null?void 0:n.query)!==null&&i!==void 0?i:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await QS(t,e,r+a,{headers:s,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function QS(t,e,r,n,i,s){const o=KS(e,n,i,s);let a;try{a=await t(r,Object.assign({},o))}catch(l){throw console.error(l),new Pu(hn(l),0)}if(a.ok||await rp(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await rp(l)}}function ir(t){var e;let r=null;tE(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=IS(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:r,user:n},error:null}}function np(t){const e=ir(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Ir(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function XS(t){return{data:t,error:null}}function ZS(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:s}=t,o=GS(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:s},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function eE(t){return t}function tE(t){return t.access_token&&t.refresh_token&&t.expires_in}const nc=["global","local","others"];var rE=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};class nE{constructor({url:e="",headers:r={},fetch:n}){this.url=e,this.headers=r,this.fetch=Wy(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e,r=nc[0]){if(nc.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${nc.join(", ")}`);try{return await Z(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(K(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await Z(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Ir})}catch(n){if(K(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=rE(e,["options"]),i=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(i.new_email=n==null?void 0:n.newEmail,delete i.newEmail),await Z(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:ZS,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(K(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await Z(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Ir})}catch(r){if(K(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,i,s,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},d=await Z(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(s=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:""},xform:eE});if(d.error)throw d.error;const f=await d.json(),_=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,x=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return x.length>
2630&&(x.forEach(k=>{const v=parseInt(k.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(k.split(";")[1].split("=")[1]);u[`${b}Page`]=v}),u.total=parseInt(_)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(K(u))return{data:{users:[]},error:u};throw u}}async getUserById(e){Hn(e);try{return await Z(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Ir})}catch(r){if(K(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){Hn(e);try{return await Z(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:Ir})}catch(n){if(K(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){Hn(e);try{return await Z(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:Ir})}catch(n){if(K(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){Hn(e.userId);try{const{data:r,error:n}=await Z(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:r,error:n}}catch(r){if(K(r))return{data:null,error:r};throw r}}async _deleteFactor(e){Hn(e.userId),Hn(e.id);try{return{data:await Z(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(K(r))return{data:null,error:r};throw r}}}const iE={getItem:t=>bs()?globalThis.localStorage.getItem(t):null,setItem:(t,e)=>{bs()&&globalThis.localStorage.setItem(t,e)},removeItem:t=>{bs()&&globalThis.localStorage.removeItem(t)}};function ip(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}function sE(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const Gn={debug:!!(globalThis&&bs()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Gy extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class oE extends Gy{}async function aE(t,e,r){Gn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;return e>0&&setTimeout(()=>{n.abort(),Gn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async i=>{if(i){Gn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,i.name);try{return await r()}finally{Gn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,i.name)}}else{if(e===0)throw Gn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new oE(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(Gn.debug)try{const s=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(s,null,"  "))}catch(s){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",s)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}sE();const lE={url:vS,storageKey:yS,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:wS,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function sp(t,e,r){return await r()}class Vs{constructor(e){var r,n;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=Vs.nextInstanceID,Vs.nextInstanceID+=1,this.instanceID>0&&Dt()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const i=Object.assign(Object.assign({},lE),e);if(this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.persistSession=i.persistSession,this.storageKey=i.storageKey,this.autoRefreshToken=i.autoRefreshToken,this.admin=new nE({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=Wy(i.fetch),this.lock=i.lock||sp,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,i.lock?this.lock=i.lock:Dt()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=aE:this.lock=sp,this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?i.storage?this.storage=i.storage:bs()?this.storage=iE:(this.memoryStorage={},this.storage=ip(this.memoryStorage)):(this.memoryStorage={},this.storage=ip(this.memoryStorage)),Dt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(s){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",s)}(n=this.broadcastChannel)===null||n===void 0||n.addEventListener("message",async s=>{this._debug("received broadcast notification from other tab or client",s),await this._notifyAllSubscribers(s.data.event,s.data.session,!1)})}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${zy}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{const r=LS(window.location.href);let n="none";if(this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce"),Dt()&&this.detectSessionInUrl&&n!=="none"){const{data:i,error:s}=await this._getSessionFromURL(r,n);if(s){if(this._debug("#_initialize()","error detecting session from URL",s),ES(s)){const l=(e=s.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:s}}return await this._removeSession(),{error:s}}const{session:o,redirectType:a}=i;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return K(r)?{error:r}:{error:new qy("Unexpected error during initialization",r)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,i;try{const s=await Z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(i=e==null?void 0:e.options)===null||i===void 0?void 0:i.captchaToken}},xform:ir}),{data:o,error:a}=s;
263if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(s){if(K(s))return{data:{user:null,session:null},error:s};throw s}}async signUp(e){var r,n,i;try{let s;if("email"in e){const{email:d,password:f,options:_}=e;let x=null,k=null;this.flowType==="pkce"&&([x,k]=await Wn(this.storage,this.storageKey)),s=await Z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:_==null?void 0:_.emailRedirectTo,body:{email:d,password:f,data:(r=_==null?void 0:_.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:_==null?void 0:_.captchaToken},code_challenge:x,code_challenge_method:k},xform:ir})}else if("phone"in e){const{phone:d,password:f,options:_}=e;s=await Z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:f,data:(n=_==null?void 0:_.data)!==null&&n!==void 0?n:{},channel:(i=_==null?void 0:_.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:_==null?void 0:_.captchaToken}},xform:ir})}else throw new Eo("You must provide either an email or phone number and a password");const{data:o,error:a}=s;
263if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(s){if(K(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithPassword(e){try{let r;if("email"in e){const{email:s,password:o,options:a}=e;r=await Z(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:np})}else if("phone"in e){const{phone:s,password:o,options:a}=e;r=await Z(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:np})}else throw new Eo("You must provide either an email or phone number and a password");const{data:n,error:i}=r;return i?{data:{user:null,session:null},error:i}:!n||!n.session||!n.user?{data:{user:null,session:null},error:new So}:(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:i})}catch(r){if(K(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOAuth(e){var r,n,i,s;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(i=e.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(s=e.options)===null||s===void 0?void 0:s.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;if(r==="solana")return await this.signInWithSolana(e);throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}async signInWithSolana(e){var r,n,i,s,o,a,l,u,d,f,_,x;let k,v;if("message"in e)k=e.message,v=e.signature;else{const{chain:b,wallet:g,statement:w,options:y}=e;let E;if(Dt())if(typeof g=="object")E=g;else{const T=window;if("solana"in T&&typeof T.solana=="object"&&("signIn"in T.solana&&typeof T.solana.signIn=="function"||"signMessage"in T.solana&&typeof T.solana.signMessage=="function"))E=T.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof g!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");E=g}const j=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in E&&E.signIn){const T=await E.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},y==null?void 0:y.signInWithSolana),{version:"1",domain:j.host,uri:j.href}),w?{statement:w}:null));let P;if(Array.isArray(T)&&T[0]&&typeof T[0]=="object")P=T[0];else if(T&&typeof T=="object"&&"signedMessage"in T&&"signature"in T)P=T;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in P&&"signature"in P&&(typeof P.signedMessage=="string"||P.signedMessage instanceof Uint8Array)&&P.signature instanceof Uint8Array)k=typeof P.signedMessage=="string"?P.signedMessage:new TextDecoder().decode(P.signedMessage),v=P.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in E)||typeof E.signMessage!="function"||!("publicKey"in E)||typeof E!="object"||!E.publicKey||!("toBase58"in E.publicKey)||typeof E.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");k=[`${j.host} wants you to sign in with your Solana account:`,E.publicKey.toBase58(),...w?["",w,""]:[""],"Version: 1",`URI: ${j.href}`,`Issued At: ${(i=(n=y==null?void 0:y.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((s=y==null?void 0:y.signInWithSolana)===null||s===void 0)&&s.notBefore?[`Not Before: ${y.signInWithSolana.notBefore}`]:[],...!((o=y==null?void 0:y.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${y.signInWithSolana.expirationTime}`]:[],...!((a=y==null?void 0:y.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${y.signInWithSolana.chainId}`]:[],...!((l=y==null?void 0:y.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${y.signInWithSolana.nonce}`]:[],...!((u=y==null?void 0:y.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${y.signInWithSolana.requestId}`]:[],...!((f=(d=y==null?void 0:y.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||f===void 0)&&f.length?["Resources",...y.signInWithSolana.resources.map(P=>`- ${P}`)]:[]].join(`
264`);const T=await E.signMessage(new TextEncoder().encode(k),"utf8");if(!T||!(T instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");v=T}}try{const{data:b,error:g}=await Z(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:k,signature:AS(v)},!((_=e.options)===null||_===void 0)&&_.captchaToken?{gotrue_meta_security:{captcha_token:(x=e.options)===null||x===void 0?void 0:x.captchaToken}}:null),xform:ir});if(g)throw g;return!b||!b.session||!b.user?{data:{user:null,session:null},error:new So}:(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),{data:Object.assign({},b),error:g})}catch(b){if(K(b))return{data:{user:null,session:null},error:b};throw b}}async _exchangeCodeForSession(e){const r=await jo(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{const{data:s,error:o}=await Z(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:ir});if(await To(this.storage,`${this.storageKey}-code-verifier`),o)throw o;return!s||!s.session||!s.user?{data:{user:null,session:null,redirectType:null},error:new So}:(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:Object.assign(Object.assign({},s),{redirectType:i??null}),error:o})}catch(s){if(K(s))return{data:{user:null,session:null,redirectType:null},error:s};throw s}}async signInWithIdToken(e){try{const{options:r,provider:n,token:i,access_token:s,nonce:o}=e,a=await Z(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:i,access_token:s,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:ir}),{data:l,error:u}=a;return u?{data:{user:null,session:null},error:u}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new So}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:u})}catch(r){if(K(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOtp(e){var r,n,i,s,o;try{if("email"in e){const{email:a,options:l}=e;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await Wn(this.storage,this.storageKey));const{error:f}=await Z(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:f}}if("phone"in e){const{phone:a,options:l}=e,{data:u,error:d}=await Z(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(s=l==null?void 0:l.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d}}throw new Eo("You must provide either an email or phone number.")}catch(a){if(K(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(e){var r,n;try{let i,s;"options"in e&&(i=(r=e.options)===null||r===void 0?void 0:r.redirectTo,s=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await Z(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:s}}),redirectTo:i,xform:ir});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(i){if(K(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithSSO(e){var r,n,i;try{let s=null,o=null;return this.flowType==="pkce"&&([s,o]=await Wn(this.storage,this.storageKey)),await Z(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((i=e==null?void 0:e.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:s,code_challenge_method:o}),headers:this.headers,xform:XS})}catch(s){if(K(s))return{data:null,error:s};throw s}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new Sr;const{error:i}=await Z(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return{data:{user:null,session:null},error:i}})}catch(e){if(K(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:i,options:s}=e,{error:o}=await Z(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},redirectTo:s==null?void 0:s.emailRedirectTo});return{data:{user:null,session:null},error:o}}else if("phone"in e){const{phone:n,type:i,options:s}=e,{data:o,error:a}=await Z(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a}}throw new Eo("You must provide either an email or phone number and a type")}catch(r){if(K(r))return{data:{user:null,session:null},error:r};throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const r=await jo(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not val
264id"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<ec:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.storage.isServer){let o=this.suppressGetSessionWarning;e=new Proxy(e,{get:(l,u,d)=>(!o&&u==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),o=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,u,d))})}return{data:{session:e},error:null}}const{session:i,error:s}=await this._callRefreshToken(e.refresh_token);return s?{data:{session:null},error:s}:{data:{session:i},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await Z(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Ir}):await this._useSession(async r=>{var n,i,s;const{data:o,error:a}=r;if(a)throw a;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Sr}:await Z(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(i=o.session)===null||i===void 0?void 0:i.access_token)!==null&&s!==void 0?s:void 0,xform:Ir})})}catch(r){if(K(r))return SS(r)&&(await this._removeSession(),await To(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:r};throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:i,error:s}=n;if(s)throw s;if(!i.session)throw new Sr;const o=i.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await Wn(this.storage,this.storageKey));const{data:u,error:d}=await Z(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Ir});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(n){if(K(n))return{data:{user:null},error:n};throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Sr;const r=Date.now()/1e3;let n=r,i=!0,s=null;const{payload:o}=rc(e.access_token);if(o.exp&&(n=o.exp,i=n<=r),i){const{session:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!a)return{data:{user:null,session:null},error:null};s=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)throw l;s={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)}return{data:{user:s.user,session:s},error:null}}catch(r){if(K(r))return{data:{session:null,user:null},error:r};throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:o,error:a}=r;if(a)throw a;e=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new Sr;const{session:i,error:s}=await this._callRefreshToken(e.refresh_token);return s?{data:{user:null,session:null},error:s}:i?{data:{user:i.user,session:i},error:null}:{data:{user:null,session:null},error:null}})}catch(r){if(K(r))return{data:{user:null,session:null},error:r};throw r}}async _getSessionFromURL(e,r){try{if(!Dt())throw new Co("No browser detected.");
264if(e.error||e.error_description||e.error_code)throw new Co(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Qf("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Co("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Qf("No code detected.");const{data:w,error:y}=await this._exchangeCodeForSession(e.code);if(y)throw y;const E=new URL(window.location.href);return E.searchParams.delete("code"),window.history.replaceState(window.history.state,"",E.toString()),{data:{session:w.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:i,access_token:s,refresh_token:o,expires_in:a,expires_at:l,token_type:u}=e;if(!s||!a||!o||!u)throw new Co("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(a);let _=d+f;l&&(_=parseInt(l));const x=_-d;x*1e3<=Kn&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${x}s, should have been closer to ${f}s`);const k=_-f;d-k>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",k,_,d):d-k<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",k,_,d);const{data:v,error:b}=await this._getUser(s);if(b)throw b;const g={provider_token:n,provider_refresh_token:i,access_token:s,expires_in:f,expires_at:_,refresh_token:o,token_type:u,user:v.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:g,redirectType:e.type},error:null}}catch(n){if(K(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await jo(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:i,error:s}=r;if(s)return{error:s};const o=(n=i.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:a}=await this.admin.signOut(o,e);if(a&&!(kS(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return e!=="others"&&(await this._removeSession(),await To(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(e){const r=MS(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,i;try{const{data:{session:s},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",s)),this._debug("INITIAL_SESSION","callback id",e,"session",s)}catch(s){await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",s),console.error(s)}})}async resetPasswordForEmail(e,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await Wn(this.storage,this.storageKey,!0));try{return await Z(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:i,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(s){if(K(s))return{data:null,error:s};throw s}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return{data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(r){if(K(r))return{data:null,error:r};throw r}}async linkIdentity(e){var r;try{const{data:n,error:i}=await this._useSession(async s=>{var o,a,l,u,d;const{data:f,error:_}=s;if(_)throw _;const x=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await Z(this.fetch,"GET",x,{headers:this.headers,jwt:(d=(u=f.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(i)throw i;return Dt()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),{data:{provider:e.provider,url:n==null?void 0:n.url},error:null}}catch(n){if(K(n))return{data:{provider:e.provider,url:null},error:n};throw n}}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,i;const{data:s,error:o}=r;if(o)throw o;
264return await Z(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(i=(n=s.session)===null||n===void 0?void 0:n.access_token)!==null&&i!==void 0?i:void 0})})}catch(r){if(K(r))return{data:null,error:r};throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await $S(async i=>(i>0&&await DS(200*Math.pow(2,i-1)),this._debug(r,"refreshing attempt",i),await Z(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:ir})),(i,s)=>{const o=200*Math.pow(2,i);return s&&tc(s)&&Date.now()+o-n<Kn})}catch(n){if(this._debug(r,"error",n),K(n))return{data:{session:null,user:null},error:n};throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),Dt()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const n=await jo(this.storage,this.storageKey);if(this._debug(r,"session from storage",n),!this._isValidSession(n)){this._debug(r,"session is not valid"),n!==null&&await this._removeSession();return}const i=((e=n.expires_at)!==null&&e!==void 0?e:1/0)*1e3-Date.now()<ec;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${ec}s`),i){if(this.autoRefreshToken&&n.refresh_token){const{error:s}=await this._callRefreshToken(n.refresh_token);s&&(console.error(s),tc(s)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",s),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",n)}catch(n){this._debug(r,"error",n),console.error(n);return}finally{this._debug(r,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new Sr;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new pl;const{data:s,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!s.session)throw new Sr;await this._saveSession(s.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",s.session);const a={session:s.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(s){if(this._debug(i,"error",s),K(s)){const o={session:null,error:s};return tc(s)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(s),s}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(e,r,n=!0){const i=`#_notifyAllSubscribers(${e})`;this._debug(i,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const s=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,r)}catch(l){s.push(l)}});if(await Promise.all(o),s.length>0){for(let a=0;a<s.length;a+=1)console.error(s[a]);throw s[0]}}finally{this._debug(i,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await Hy(this.storage,this.storageKey,e)}async _removeSession(){this._debug("#_removeSession()"),await To(this.storage,this.storageKey),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Dt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Kn);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((n.expires_at*1e3-e)/Kn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Kn}ms, refresh threshold is ${ju} ticks`),i<=ju&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof Gy)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Dt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(
264await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,n){const i=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&i.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&i.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[s,o]=await Wn(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(o)}`});i.push(a.toString())}if(n!=null&&n.queryParams){const s=new URLSearchParams(n.queryParams);i.push(s.toString())}return n!=null&&n.skipBrowserRedirect&&i.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${i.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:i,error:s}=r;return s?{data:null,error:s}:await Z(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(K(r))return{data:null,error:r};throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,i;const{data:s,error:o}=r;if(o)return{data:null,error:o};const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:{issuer:e.issuer}),{data:l,error:u}=await Z(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return u?{data:null,error:u}:(e.factorType==="totp"&&(!((i=l==null?void 0:l.totp)===null||i===void 0)&&i.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})})}catch(r){if(K(r))return{data:null,error:r};throw r}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:s}=r;if(s)return{data:null,error:s};const{data:o,error:a}=await Z(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:a})})}catch(r){if(K(r))return{data:null,error:r};throw r}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:s}=r;return s?{data:null,error:s}:await Z(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(K(r))return{data:null,error:r};throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?{data:null,error:n}:await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){const{data:{user:e},error:r}=await this.getUser();if(r)return{data:null,error:r};const n=(e==null?void 0:e.factors)||[],i=n.filter(o=>o.factor_type==="totp"&&o.status==="verified"),s=n.filter(o=>o.factor_type==="phone"&&o.status==="verified");return{data:{all:n,totp:i,phone:s},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var r,n;const{data:{session:i},error:s}=e;if(s)return{data:null,error:s};if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=rc(i.access_token);let a=null;o.aal&&(a=o.aal);let l=a;((n=(r=i.user.factors)===null||r===void 0?void 0:r.filter(f=>f.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(l="aal2");const d=o.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:d},error:null}}))}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(o=>o.kid===e);if(n||(n=this.jwks.keys.find(o=>o.kid===e),n&&this.jwks_cached_at+bS>Date.now()))return n;const{data:i,error:s}=await Z(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(s)throw s;if(!i.keys||i.keys.length===0)throw new _s("JWKS is empty");if(this.jwks=i,this.jwks_cached_at=Date.now(),n=i.keys.find(o=>o.kid===e),!n)throw new _s("No matching signing key found in JWKS");return n}async getClaims(e,r={keys:[]}){try{let n=e;if(!n){const{data:x,error:k}
264=await this.getSession();if(k||!x.session)return{data:null,error:k};n=x.session.access_token}const{header:i,payload:s,signature:o,raw:{header:a,payload:l}}=rc(n);if(JS(s.exp),!i.kid||i.alg==="HS256"||!("crypto"in globalThis&&"subtle"in globalThis.crypto)){const{error:x}=await this.getUser(n);if(x)throw x;return{data:{claims:s,header:i,signature:o},error:null}}const u=WS(i.alg),d=await this.fetchJwk(i.kid,r),f=await crypto.subtle.importKey("jwk",d,u,!0,["verify"]);if(!await crypto.subtle.verify(u,f,o,NS(`${a}.${l}`)))throw new _s("Invalid JWT signature");return{data:{claims:s,header:i,signature:o},error:null}}catch(n){if(K(n))return{data:null,error:n};throw n}}}Vs.nextInstanceID=0;const cE=Vs;class uE extends cE{constructor(e){super(e)}}var dE=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{u(n.next(d))}catch(f){o(f)}}function l(d){try{u(n.throw(d))}catch(f){o(f)}}function u(d){d.done?s(d.value):i(d.value).then(a,l)}u((n=n.apply(t,e||[])).next())})};class hE{constructor(e,r,n){var i,s,o;if(this.supabaseUrl=e,this.supabaseKey=r,!e)throw new Error("supabaseUrl is required.");if(!r)throw new Error("supabaseKey is required.");const a=mS(e),l=new URL(a);this.realtimeUrl=new URL("realtime/v1",l),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",l),this.storageUrl=new URL("storage/v1",l),this.functionsUrl=new URL("functions/v1",l);const u=`sb-${l.hostname.split(".")[0]}-auth-token`,d={db:aS,realtime:cS,auth:Object.assign(Object.assign({},lS),{storageKey:u}),global:oS},f=gS(n??{},d);this.storageKey=(i=f.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(s=f.global.headers)!==null&&s!==void 0?s:{},f.accessToken?(this.accessToken=f.accessToken,this.auth=new Proxy({},{get:(_,x)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(x)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=f.auth)!==null&&o!==void 0?o:{},this.headers,f.global.fetch),this.fetch=fS(r,this._getAccessToken.bind(this),f.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},f.realtime)),this.rest=new Pk(new URL("rest/v1",l).href,{headers:this.headers,schema:f.db.schema,fetch:this.fetch}),f.accessToken||this._listenForAuthEvents()}get functions(){return new sk(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}get storage(){return new nS(this.storageUrl.href,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,r={},n={}){return this.rest.rpc(e,r,n)}channel(e,r={config:{}}){return this.realtime.channel(e,r)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,r;return dE(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:n}=yield this.auth.getSession();return(r=(e=n.session)===null||e===void 0?void 0:e.access_token)!==null&&r!==void 0?r:null})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:i,storageKey:s,flowType:o,lock:a,debug:l},u,d){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new uE({url:this.authUrl.href,headers:Object.assign(Object.assign({},f),u),storageKey:s,autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:i,flowType:o,lock:a,debug:l,fetch:d,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(e){return new Vk(this.realtimeUrl.href,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(e,r,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?this.changedAccessToken=n:e==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const fE=(t,e,r)=>new hE(t,e,r),pE="https://wzpaiwbqzgulvdmnjjcf.supabase.co",mE="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Ind6cGFpd2Jxemd1bHZkbW5qamNmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDk5NjA2MjIsImV4cCI6MjA2NTUzNjYyMn0.lXZ-5bt3Eb_a9cPLOq80ekVW3srmJ2ifyoy875fpfa4",Pe=fE(pE,mE),Yy=O.createContext(null),to=()=>{const t=O.useContext(Yy);if(!t)throw new Error("useAuth must be used within an AuthProvider");return t},gE=({children:t})=>{const[e,r]=O.useState(null),[n,i]=O.useState(null),[s,o]=O.useState(!0),[a,l]=O.useState(null),[u,d]=O.useState(!1);O.useEffect(()=>{let y=!0,E;(async()=>
264{if(!u)try{console.log("Initializing auth..."),E=setTimeout(()=>{y&&(console.log("Auth initialization timeout"),l("Authentication initialization timeout"),o(!1),d(!0))},1e4);const{data:{session:P},error:D}=await Pe.auth.getSession();if(!y)return;if(D){console.error("Error getting session:",D),l(`Session error: ${D.message}`),o(!1),d(!0);return}if(r((P==null?void 0:P.user)??null),P!=null&&P.user)try{await f(P.user.id)}catch(Q){console.error("Profile fetch error:",Q),i(null)}clearTimeout(E),o(!1),d(!0),console.log("Auth initialized successfully")}catch(P){y&&(console.error("Auth initialization error:",P),l(`Auth initialization failed: ${P instanceof Error?P.message:"Unknown error"}`),o(!1),d(!0))}})();const{data:{subscription:T}}=Pe.auth.onAuthStateChange(async(P,D)=>{if(!(!y||!u)){console.log("Auth state changed:",P);try{r((D==null?void 0:D.user)??null),D!=null&&D.user&&P==="SIGNED_IN"?await f(D.user.id):D!=null&&D.user||i(null)}catch(Q){console.error("Error handling auth state change:",Q)}}});return()=>{y=!1,E&&clearTimeout(E),T.unsubscribe()}},[u]);const f=async y=>{try{console.log("Fetching user profile for:",y);const{data:E,error:j}=await Pe.from("user_profiles").select("*").eq("id",y).single();if(j){if(j.code==="PGRST116"){console.log("No user profile found"),i(null);return}throw new Error(`Profile fetch error: ${j.message}`)}console.log("User profile fetched successfully"),i(E)}catch(E){throw console.error("Error fetching user profile:",E),i(null),E}},_=y=>{if(y.length<10)return"Password must be at least 10 characters long";const E=/[A-Z]/.test(y),j=/[a-z]/.test(y),T=/\d/.test(y);return E?j?T?null:"Password must contain at least one number":"Password must contain at least one lowercase letter":"Password must contain at least one uppercase letter"},x=y=>y.length<3?"Username must be at least 3 characters long":y.length>20?"Username must be no more than 20 characters long":/^[a-zA-Z0-9_]+$/.test(y)?null:"Username can only contain letters, numbers, and underscores",k=async y=>{try{const{data:E,error:j}=await Pe.from("user_profiles").select("username").eq("username",y);if(j)throw console.error("Error checking username availability:",j),new Error("Failed to check username availability");return E.length===0}catch(E){throw console.error("Error in checkUsernameAvailability:",E),E}},w={user:e,userProfile:n,login:async(y,E)=>{const j=`${y}@ellis.local`;console.log("Attempting login for:",y);const{data:T,error:P}=await Pe.auth.signInWithPassword({email:j,password:E});if(P)throw console.error("Login error:",P),P.message.includes("Invalid login credentials")?new Error("Invalid username or password"):P;if(!T.user)throw new Error("Login failed");console.log("User logged in successfully:",T.user.id)},signup:async(y,E)=>{const j=x(y);if(j)throw new Error(j);const T=_(E);if(T)throw new Error(T);if(!await k(y))throw new Error("Username is already taken");const D=`${y}@ellis.local`,{data:Q,error:A}=await Pe.auth.signUp({email:D,password:E,options:{data:{username:y}}});if(A)throw console.error("Signup error:",A),A;if(!Q.user)throw new Error("Failed to create user");console.log("User signed up successfully:",Q.user.id)},logout:async()=>{console.log("Attempting logout...");try{const{error:y}=await Pe.auth.signOut();y&&console.error("Logout error:",y)}catch(y){console.error("Error during logout:",y)}finally{r(null),i(null),l(null)}},loading:s,error:a};return h.jsx(Yy.Provider,{value:w,children:t})},vE=()=>{const[t,e]=O.useState(!1),{user:r,logout:n}=to(),i=()=>{e(!t)},s=async()=>{try{await n()}catch(o){console.error("Logout failed:",o)}};return h.jsxs("nav",{className:"bg-white shadow-md",children:[h.jsx("div",{className:"max-w-7xl mx-auto px-6 sm:px-8 lg:px-12",children:h.jsxs("div",{className:"flex justify-between h-18",children:[h.jsx("div",{className:"flex items-center",children:h.jsxs(pe,{to:"/",className:"flex-shrink-0 flex items-center",children:[h.jsx(qx,{className:"h-7 w-7 text-lavender-600 mr-2"}),h.jsx("span",{className:"text-xl font-bold font-serif text-gray-900",children:"Ellis"})]})}),h.jsxs("div",{className:"hidden md:flex md:items-center md:space-x-6",children:[h.jsx(pe,{to:"/",className:"px-3 py-2 text-gray-700 hover:text-lavender-600 transition-colors font-light text-sm",children:"Home"}),h.jsx(pe,{to:"/about",className:"px-3 py-2 text-gray-700 hover:text-lavender-600 transition-colors font-light text-sm",children:"About Us"}),h.jsx(pe,{to:"/resources",className:"px-3 py-2 text-gray-700 hover:text-lavender-600 transition-colors font-light text-sm",children:"Resources"}),r?h.jsxs(h.Fragment,{children:[h.jsx(pe,{to:"/dashboard",className:"px-3 py-2 text-gray-700 hover:text-lavender-600 transition-colors font-light text-sm",children:"Dashboard"}),h.jsx("button",{onClick:s,className:"px-3 py-2 text-gray-700 hover:text-lavender-600 transition-colors font-light text-sm",children:"Logout"})]}):h.jsx(pe,{to:"/login",className:"px-3 py-2 text-gray-700 hover:text-lavender-600 transition-colors font-light text-sm",children:"Login"}),h.jsxs("a",{href:"https://gofund.me/2ca79e7a",target:"_blank",rel:"noopener noreferrer",className:"flex items-center px-3 py-2 text-white bg-lavender-600 rounded-md hover:bg-lavender-700 transition-all duration-200 font-serif font-medium text-sm",children:[h.jsx(Tn,{size:16,className:"mr-1"})," Donate"]}),h.jsxs("a",{href:"tel:+14752430824",className:"flex items-center px-3 py-2 text-white bg-lavender-600 rounded-md hover:bg-lavender-700 transition-all duration-200 font-serif font-medium text-sm",children:[h.jsx(On,{size:16,className:"mr-1"})," Call"]}),h.jsxs(pe,{to:"/chat",className:"flex items-center px-3 py-2 text-white bg-lavender-600 rounded-md hover:bg-lavender-700 transition-all duration-200 font-serif font-medium text-sm",children:[h.jsx(Kr,{size:16,className:"mr-1"})," Message"]}),h.jsxs(pe,{to:"/speak-with-ellis",className:"flex items-center px-3 py-2 text-white bg-lavender-600 rounded-md hover:bg-lavender-700 transition-all duration-200 font-serif font-medium text-sm",children:[h.jsx(Pn,{size:16,className:"mr-1"})," Speak"]})]}),h.jsx("div",{className:"flex md:hidden items-center",children:h.jsx("button",{onClick:i,className:"inline-flex items-center justify-center p-2 rounded-md text-gray-700 hover:text-lavender-600 focus:outline-none",children:t?h.jsx(Sy,{size:24}):h.jsx(Vx,{size:24})})})]})}),t&&h.jsx("div",{className:"md:hidden",children:h.jsxs("div",{className:"px-2 pt-2 pb-3 space-y-1 sm:px-3",children:[h.jsx(pe,{to:"/",className:"block px-4 py-3 text-gray-700 hover:text-lavender-600 transition-colors font-medium",onClick:i,children:"Home"}),h.jsx(pe,{to:"/about",className:"block px-4 py-3 text-gray-700 hover:text-lavender-600 transition-colors font-medium",onClick:i,children:"About Us"}),h.jsx(pe,{to:"/resources",className:"block px-4 py-3 text-gray-700 hover:text-lavender-600 transition-colors font-medium",onClick:i,children:"Resources"}),r?h.jsxs(h.Fragment,{children:[h.jsx(pe,{to:"/dashboard",className:"block px-4 py-3 text-gray-700 hover:text-lavender-600 transition-colors font-medium",onClick:i,children:"Dashboard"}),h.jsx("button",{onClick:async()=>{await s(),i()},className:"block w-full text-left px-4 py-3 text-gray-700 hover:text-lavender-600 transition-colors font-medium",children:"Logout"})]}):h.jsx(pe,{to:"/login",className:"block px-4 py-3 text-gray-700 hover:text-lavender-600 transition-colors font-medium",onClick:i,children:"Login"}),h.jsxs("a",{href:"https://gofund.me/2ca79e7a",target:"_blank",rel:"noopener noreferrer",className:"flex items-center px-4 py-3 text-white bg-lavender-600 rounded-lg hover:bg-lavender-700 transition-all duration-200 font-serif font-medium mx-2 my-1",onClick:i,children:[h.jsx(Tn,{size:18,className:"mr-2"})," Donate"]}),h.jsxs("a",{href:"tel:+14752430824",className:"flex items-center px-4 py-3 text-white bg-lavender-600 rounded-lg hover:bg-lavender-700 transition-all duration-200 font-serif font-medium mx-2 my-1",onClick:i,children:[h.jsx(On,{size:18,className:"mr-2"})," Call Ellis"]}),h.jsxs(pe,{to:"/chat",className:"flex items-center px-4 py-3 text-white bg-lavender-600 rounded-lg hover:bg-lavender-700 transition-all duration-200 font-serif font-medium mx-2 my-1",onClick:i,children:[h.jsx(Kr,{size:18,className:"mr-2"})," Message Ellis"]}),h.jsxs(pe,{to:"/speak-with-ellis",className:"flex items-center px-4 py-3 text-white bg-lavender-600 rounded-lg hover:bg-lavender-700 transition-all duration-200 font-serif font-medium mx-2 my-1",onClick:i,children:[h.jsx(Pn,{size:18,className:"mr-2"})," Speak with Ellis"]})]})})]})},yE="/assets/patty-zavala-DAA6PTVYKz4-unsplash-DRTqm848.jpg",wE="/assets/kamran-abdullayev-t20aK682La0-unsplash-GDJEk-Vk.jpg",_E=()=>h.jsxs("div",{className:"bg-white",children:[h.jsxs("section",{className:"relative py-20 lg:py-24 overflow-hidden",children:[h.jsxs("div",{className:"absolute inset-0",children:[h.jsx("img",{src:yE,alt:"Person on phone call",className:"w-full h-full object-cover"}),h.jsx("div",{className:"absolute inset-0 bg-black bg-opacity-40"})]}),h.jsx("div",{className:"max-w-7xl mx-auto px-6 sm:px-8 lg:px-12",children:h.jsxs("div",{className:"relative text-center z-10",children:[h.jsx("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-serif font-bold text-white mb-6 text-balance leading-tight relative inline-block",children:h.jsx("span",{className:"relative z-10 drop-shadow-lg text-white",style:{textShadow:"0 0 30px rgba(255,255,255,0.8), 0 0 60px rgba(255,255,255,0.4), 0 0 90px rgba(255,255,255,0.2), 0 2px 4px rgba(0,0,0,0.3)",backdropFilter:"blur(1px)"},children:`"Tell Me What You're Going Through."`})}),h.jsx("p",{className:"text-lg md:text-xl text-white mb-4 max-w-3xl mx-auto leading-relaxed drop-shadow-md",children:"Ellis 
264is your AI-enhanced social worker, ready to listen and connect you with the resources you need."}),h.jsx("p",{className:"text-base md:text-lg text-white font-medium mb-8 max-w-2xl mx-auto drop-shadow-md",children:"Join our pilot phase starting in the San Francisco Bay Area today."}),h.jsxs("div",{className:"flex flex-col sm:flex-row justify-center gap-4 mb-8",children:[h.jsxs("a",{href:"tel:+14752430824",className:"flex items-center justify-center px-6 py-3 bg-lavender-600/80 backdrop-blur-md text-white rounded-lg hover:bg-lavender-600/95 hover:-translate-y-1 transition-all duration-300 shadow-lg hover:shadow-2xl font-serif font-light text-base border border-lavender-400/30",children:[h.jsx(On,{size:18,className:"mr-2"})," Call Ellis"]}),h.jsxs(pe,{to:"/chat",className:"flex items-center justify-center px-6 py-3 bg-lavender-600/80 backdrop-blur-md text-white rounded-lg hover:bg-lavender-600/95 hover:-translate-y-1 transition-all duration-300 shadow-lg hover:shadow-2xl font-serif font-light text-base border border-lavender-400/30",children:[h.jsx(Kr,{size:18,className:"mr-2"})," Message Ellis"]}),h.jsxs(pe,{to:"/speak-with-ellis",className:"flex items-center justify-center px-6 py-3 bg-lavender-600/80 backdrop-blur-md text-white rounded-lg hover:bg-lavender-600/95 hover:-translate-y-1 transition-all duration-300 shadow-lg hover:shadow-2xl font-serif font-light text-base border border-lavender-400/30",children:[h.jsx(Pn,{size:18,className:"mr-2"})," Speak with Ellis"]})]}),h.jsxs("div",{className:"bg-white/15 backdrop-blur-md rounded-xl p-6 max-w-xl mx-auto border border-white/20",children:[h.jsx("h3",{className:"text-xl font-serif text-white mb-3",children:"Help Us Expand Our Mission"}),h.jsx("p",{className:"text-white/80 mb-4 leading-relaxed text-sm",children:"Support Ellis in reaching more people who need compassionate assistance and resources."}),h.jsxs("a",{href:"https://gofund.me/2ca79e7a",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-6 py-3 bg-lavender-600/80 backdrop-blur-md text-white rounded-lg hover:bg-lavender-600/95 hover:-translate-y-1 transition-all duration-300 shadow-lg hover:shadow-2xl font-serif font-light text-base border border-lavender-400/30",children:[h.jsx(Tn,{size:18,className:"mr-2"})," Donate to Ellis"]})]})]})})]}),h.jsx("section",{className:"py-20 lg:py-24",children:h.jsxs("div",{className:"max-w-7xl mx-auto px-6 sm:px-8 lg:px-12 text-center",children:[h.jsx("h2",{className:"text-3xl lg:text-4xl font-serif text-gray-900 mb-12 text-balance",children:"How Ellis Can Help You"}),h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[h.jsxs("div",{className:"bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition-all duration-300 hover:-translate-y-1",children:[h.jsx("div",{className:"flex justify-center mb-4",children:h.jsx("div",{className:"p-3 bg-lavender-100 rounded-xl",children:h.jsx(Ix,{className:"h-8 w-8 text-lavender-600"})})}),h.jsx("h3",{className:"text-xl font-serif mb-3 text-gray-900",children:"24/7 Personalized Support"}),h.jsx("p",{className:"text-gray-600 leading-relaxed text-sm",children:"Ellis is always available to listen and provide support whenever you need it, day or night."})]}),h.jsxs("div",{className:"bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition-all duration-300 hover:-translate-y-1",children:[h.jsx("div",{className:"flex justify-center mb-4",children:h.jsx("div",{className:"p-3 bg-lavender-100 rounded-xl",children:h.jsx(Mx,{className:"h-8 w-8 text-lavender-600"})})}),h.jsx("h3",{className:"text-xl font-serif mb-3 text-gray-900",children:"Resource Connection"}),h.jsx("p",{className:"text-gray-600 leading-relaxed text-sm",children:"Get connected to public benefits, free or low-cost resources, and local nonprofits that can help."})]}),h.jsxs("div",{className:"bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition-all duration-300 hover:-translate-y-1",children:[h.jsx("div",{className:"flex justify-center mb-4",children:h.jsx("div",{className:"p-3 bg-lavender-100 rounded-xl",children:h.jsx(Fx,{className:"h-8 w-8 text-lavender-600"})})}),h.jsx("h3",{className:"text-xl font-serif mb-3 text-gray-900",children:"Active Listening"}),h.jsx("p",{className:"text-gray-600 leading-relaxed text-sm",children:"Ellis provides empathetic, judgment-free listening to understand your unique situation."})]})]})]})}),h.jsx("section",{className:"bg-lavender-600 py-20 lg:py-24",children:h.jsxs("div",{className:"max-w-7xl mx-auto px-6 sm:px-8 lg:px-12 text-center",children:[h.jsx("h2",{className:"text-3xl lg:text-4xl font-serif text-white mb-6 text-balance",children:"Ready to Get Support?"}),h.jsx("p",{className:"text-lg md:text-xl text-lavender-100 mb-8 max-w-3xl mx-auto leading-relaxed",children:"No sign-up required to start talking with Ellis. Create an account on Perplexity.ai only if you want to save your text conversations."}),h.jsxs("div",{className:"flex flex-col sm:flex-row justify-center gap-4",children:[h.jsxs("a",{href:"tel:+14752430824",className:"flex items-center justify-center px-6 py-3 bg-white text-lavender-600 rounded-lg hover:-translate-y-1 transition-all duration-300 shadow-lg hover:shadow-2xl font-serif font-medium text-base border border-white/20",children:[h.jsx(On,{size:18,className:"mr-2"})," Call Ellis Now"]}),h.jsx("a",{href:"https://www.perplexity.ai/collections/ellis-ivvzOnI6T9OzkrOOgFtabw",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center px-6 py-3 bg-white text-lavender-600 rounded-lg hover:-translate-y-1 transition-all duration-300 shadow-lg hover:shadow-2xl font-serif font-medium text-base border border-white/20",children:"Chat on Perplexity"})]})]})}),h.jsxs("section",{className:"py-20 lg:py-24 relative overflow-hidden",children:[h.jsxs("div",{className:"absolute inset-0",children:[h.jsx("img",{src:wE,alt:"Person using smartphone",className:"w-full h-full object-cover"}),h.jsx("div",{className:"absolute inset-0 bg-black/60"})]}),h.jsxs("div",{className:"max-w-7xl mx-auto px-6 sm:px-8 lg:px-12 relative z-10",children:[h.jsx("h2",{className:"text-3xl lg:text-4xl font-serif text-white mb-12 text-center text-balance",children:"How Ellis Has Helped"}),h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[h.jsxs("div",{className:"bg-white/15 backdrop-blur-md p-6 rounded-xl border border-white/20",children:[h.jsx("p",{className:"text-white/90 mb-4 leading-relaxed text-base",children:'"Ellis helped me find housing assistance when I was facing eviction. The resources provided were exactly what I needed during a difficult time."'}),h.jsx("p",{className:"font-medium text-white/70 text-sm",children:"- Housing Support Client"})]}),h.jsxs("div",{className:"bg-white/15 backdrop-blur-md p-6 rounded-xl border border-white/20",children:[h.jsx("p",{className:"text-white/90 mb-4 leading-relaxed text-base",children:`"When I was struggling with food insecurity, Ellis connected me with local food banks and assistance programs I didn't know existed."`}),h.jsx("p",{className:"font-medium text-white/70 text-sm",children:"- Food Assistance Client"})]}),h.jsxs("div",{className:"bg-white/15 backdrop-blur-md p-6 rounded-xl border border-white/20",children:[h.jsx("p",{className:"text-white/90 mb-4 leading-relaxed text-base",children:'"I just needed 
264someone to listen during a difficult time. Ellis was there for me and helped me find mental health resources in my area."'}),h.jsx("p",{className:"font-medium text-white/70 text-sm",children:"- Mental Health Support Client"})]}),h.jsxs("div",{className:"bg-white/15 backdrop-blur-md p-6 rounded-xl border border-white/20",children:[h.jsx("p",{className:"text-white/90 mb-4 leading-relaxed text-base",children:'"After losing my job, I felt completely overwhelmed. Ellis walked me through applying for unemployment benefits and even helped me find job training programs nearby. I felt supported every step of the way."'}),h.jsx("p",{className:"font-medium text-white/70 text-sm",children:"- Employment Support Client"})]})]})]})]})]}),bE="/assets/Sphere-Northampton_theresa-CEgWgeAK.jpg",xE=()=>h.jsxs("div",{className:"bg-white",children:[h.jsx("section",{className:"bg-gradient-to-r from-lavender-50 to-lavender-100 py-20",children:h.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:h.jsxs("div",{className:"text-center",children:[h.jsx("h1",{className:"text-4xl md:text-5xl font-serif text-gray-900 mb-6",children:"About Ellis"}),h.jsx("p",{className:"text-xl text-gray-600 mb-6 max-w-3xl mx-auto",children:"Ellis is an AI-enhanced social worker designed to provide empathetic support and connect people with vital resources."})]})})}),h.jsx("section",{className:"py-16",children:h.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:h.jsxs("div",{className:"grid grid-cols-1 gap-12",children:[h.jsxs("div",{className:"relative rounded-lg shadow-md overflow-hidden",children:[h.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:"url('/o.jpg')"}}),h.jsx("div",{className:"absolute inset-0 bg-gray-900/80"}),h.jsxs("div",{className:"relative p-8",children:[h.jsxs("h2",{className:"text-3xl font-serif text-white mb-6 flex items-center",children:[h.jsx(Tn,{className:"h-8 w-8 text-lavender-400 mr-3"})," Our Mission"]}),h.jsxs("blockquote",{className:"italic text-gray-300 border-l-4 border-lavender-400 pl-4 mb-8 max-w-xl",children:['"Give me your tired, your poor,',h.jsx("br",{}),"Your huddled masses yearning to breathe free,",h.jsx("br",{}),"The wretched refuse of your teeming shore.",h.jsx("br",{}),"Send these, the homeless, tempest-tossed to me,",h.jsx("br",{}),'I lift my lamp beside the golden door!"',h.jsx("br",{}),h.jsx("br",{}),'-"The New Colossus", Emma Lazarus, 1883']}),h.jsxs("div",{className:"text-gray-200 space-y-4",children:[h.jsx("p",{children:"Ellis pays homage in part to Ellis Island, the historic gateway where generations of new Americans found hope, opportunity, and a fresh start. In that spirit, Ellis welcomes all who seek stability, belonging, and a path forward. Our primary inspiration, however, comes from Ellis Street in San Francisco's Tenderloin district, a neighborhood at the heart of the city's struggle with poverty and homelessness and home to many frontline nonprofits and service providers."}),h.jsx("p",{children:"The founder's first time in the Tenderloin was a stop at Glide Memorial Church and Resource Center, located on Ellis St., to inquire about housing resources. Our mission is to harness technology to deliver compassionate, accessible, and personalized support to those experiencing homelessness, at risk of losing their homes, or struggling to make ends meet."}),h.jsx("p",{children:'Rooted in the meaning of "kind and benevolent" in both Hebrew and Welsh, our project is committed to treating every person with empathy and respect, regardless of their background or circumstance. Through innovative technology and deep community partnerships, Ellis strives to be a beacon of support and a bridge to brighter futures.'}),h.jsx("p",{children:"By connecting individuals to public benefits, free and low-cost resources, and community organizations, we aim to lower barriers and restore dignity for our most vulnerable neighbors."})]})]})]}),h.jsxs("div",{className:"bg-lavender-50 p-8 rounded-lg shadow-md",children:[h.jsxs("h2",{className:"text-3xl font-serif text-gray-900 mb-6 flex items-center",children:[h.jsx(Bx,{className:"h-8 w-8 text-lavender-500 mr-3"})," Our Vision"]}),h.jsx("p",{className:"text-gray-600 mb-4",children:"We envision a world where everyone-regardless of circumstance-can easily access the support, resources, and opportunities they need to thrive."}),h.jsx("p",{className:"text-gray-600 mb-4",children:"Ellis will help transform the way human services are delivered, breaking down barriers to care and empowering individuals to find stability and dignity."}),h.jsx("p",{className:"text-gray-600",children:"By leveraging technology and deep community partnerships, we aim to make compassionate, personalized assistance universally available-so that no one is left behind, and every person is wel
264comed with kindness and hope."})]})]})})}),h.jsx("section",{className:"py-16 bg-lavender-50",children:h.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[h.jsx("h2",{className:"text-3xl font-serif text-gray-900 mb-12 text-center",children:"Our Values"}),h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[h.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md hover:bg-lavender-50 transition-colors",children:[h.jsx("div",{className:"flex justify-center mb-4",children:h.jsx("div",{className:"p-3 bg-lavender-100 rounded-full",children:h.jsx(Tn,{className:"h-8 w-8 text-lavender-600"})})}),h.jsx("h3",{className:"text-xl font-serif mb-3 text-center",children:"Empathy First"}),h.jsx("p",{className:"text-gray-600 text-center",children:"We believe in the power of empathetic listening and understanding as the foundation of effective support."})]}),h.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md hover:bg-lavender-50 transition-colors",children:[h.jsx("div",{className:"flex justify-center mb-4",children:h.jsx("div",{className:"p-3 bg-lavender-100 rounded-full",children:h.jsx(Yx,{className:"h-8 w-8 text-lavender-600"})})}),h.jsx("h3",{className:"text-xl font-serif mb-3 text-center",children:"Accessibility"}),h.jsx("p",{className:"text-gray-600 text-center",children:"Support should be available to everyone, regardless of their background, location, or circumstances."})]}),h.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md hover:bg-lavender-50 transition-colors",children:[h.jsx("div",{className:"flex justify-center mb-4",children:h.jsx("div",{className:"p-3 bg-lavender-100 rounded-full",children:h.jsx(Jx,{className:"h-8 w-8 text-lavender-600"})})}),h.jsx("h3",{className:"text-xl font-serif mb-3 text-center",children:"Privacy & Trust"}),h.jsx("p",{className:"text-gray-600 text-center",children:"We respect your privacy and are committed to creating a safe, trustworthy environment for sharing."})]}),h.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md hover:bg-lavender-50 transition-colors",children:[h.jsx("div",{className:"flex justify-center mb-4",children:h.jsx("div",{className:"p-3 bg-lavender-100 rounded-full",children:h.jsx(Ux,{className:"h-8 w-8 text-lavender-600"})})}),h.jsx("h3",{className:"text-xl font-serif mb-3 text-center",children:"Community Partnership"}),h.jsx("p",{className:"text-gray-600 text-center",children:"We work hand in hand with local organizations, nonprofits, and service providers to strengthen the safety net for those who need it most."})]})]})]})}),h.jsx("section",{className:"py-16",children:h.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[h.jsx("h2",{className:"text-3xl font-serif text-gray-900 mb-6",children:"About the Founder"}),h.jsx("div",{className:"bg-lavender-50 p-8 rounded-lg shadow-md",children:h.jsxs("div",{className:"flex gap-8 items-start",children:[h.jsxs("div",{className:"flex-1",children:[h.jsx("p",{className:"text-gray-600 mb-4",children:"I'm Theresa, the Founder and CEO of Ellis. I was born and raised in MA and am a Cornell University alum. I have always had a passion for helping others and having an impact on my community."}),h.jsxs("p",{className:"text-gray-600",children:["Before founding Ellis, I've worked with organizations like Black Futures Lab, GetThru, Teach for America, and Care2. Connect with me online here: "," ",h.jsx("a",{href:"https://linkedin.com/in/Theresa-anoje",target:"_blank",rel:"noopener noreferrer",className:"text-lavender-600 hover:text-lavender-800",children:"linkedin.com/in/Theresa-anoje"})]})]}),h.jsx("img",{src:bE,alt:"Theresa Anoje",className:"w-64 rounded-lg shadow-md"})]})})]})})]}),ic=[{id:"housing",name:"Housing & Shelter",resources:[{name:"Eviction Prevention",url:"https://www.sfserviceguide.org/housing/eviction-prevention"},{name:"Emergency Shelter",url:"https://www.sfserviceguide.org/housing/emergency-shelter"},{name:"Rental Assistance",url:"https://www.sfserviceguide.org/housing/rental-assistance"},{name:"Affordable Housing",url:"https://www.sfserviceguide.org/housing/affordable-housing"},{name:"Homelessness Services",url:"https://www.sfserviceguide.org/housing/homelessness-services"}]},{id:"food",name:"Food & Nutrition",resources:[{name:"Food Banks",url:"https://www.sfserviceguide.org/food/food-banks"},{name:"SNAP/Food Stamps",url:"https://www.sfserviceguide.org/food/snap-benefits"},{name:"Meal Programs",url:"https://www.sfserviceguide.org/food/meal-programs"},{name:"WIC Program",url:"https://www.sfserviceguide.org/food/wic-program"},{name:"Senior Nutrition",url:"https://www.sfserviceguide.org/food/senior-nutrition"}]},{id:"health",name:"Healthcare",resources:[{name:"Medical Insurance",url:"https://www.sfserviceguide.org/health/medical-insurance"},{name:"Community Clinics",url:"https://www.sfserviceguide.org/health/community-clinics"},{name:"Mental Health Services",url:"https://www.sfserviceguide.org/health/mental-health"},{name:"Substance Use Treatment",url:"https://www.sfserviceguide.org/health/substance-use"},{name:"Prescription Assistance",url:"https://www.sfserviceguide.org/health/prescription-assistance"}]},{id:"employment",name:"Employment & Income",resources:[{name:"Job Training",url:"https://www.sfserviceguide.org/employment/job-training"},{name:"Job Search Assistance",url:"https://www.sfserviceguide.org/employment/job-search"},{name:"Unemployment Benefits",url:"https://www.sfserviceguide.org/employment/unemployment"},{name:"Cash Assistance",url:"https://www.sfserviceguide.org/employment/cash-assistance"},{name:"Financial Counseling",url:"https://www.sfserviceguide.org/employment/financial-counseling"}]},{id:"legal",name:"Legal Services",resources:[{name:"Legal Aid",url:"https://www.sfserviceguide.org/legal/legal-aid"},{name:"Immigration Services",url:"https://www.sfserviceguide.org/legal/immigration"},{name:"Tenant Rights",url:"https://www.sfserviceguide.org/legal/tenant-rights"},{name:"Family Law",url:"https://www.sfserviceguide.org/legal/family-law"},{name:"Criminal Record Expungement",url:"https://www.sfserviceguide.org/legal/record-expungement"}]},{id:"crisis",name:"Crisis Support",resources:[{name:"Domestic Violence",url:"https://www.sfserviceguide.org/crisis/domestic-violence"},{name:"Suicide Prevention",url:"https://www.sfserviceguide.org/crisis/suicide-prevention"},{name:"Emergency Financial Assistance",url:"https://www.sfserviceguide.org/crisis/emergency-financial"},{name:"Disaster Relief",url:"https://www.sfserviceguide.org/crisis/disaster-relief"},{name:"Crisis Hotlines",url:"https://www.sfserviceguide.org/crisis/hotlines"}]}
264],kE=[{name:"211",description:"Connects people to local resources",url:"https://www.211.org/"},{name:"National Alliance on Mental Illness (NAMI)",description:"Mental health resources and support",url:"https://www.nami.org/"},{name:"Feeding America",description:"Nationwide network of food banks",url:"https://www.feedingamerica.org/"},{name:"National Domestic Violence Hotline",description:"24/7 crisis support",url:"https://www.thehotline.org/"},{name:"Benefits.gov",description:"Official benefits website of the U.S. government",url:"https://www.benefits.gov/"},{name:"Healthcare.gov",description:"Official healthcare marketplace",url:"https://www.healthcare.gov/"}],SE=()=>{const[t,e]=O.useState(""),[r,n]=O.useState("all"),i=r==="all"?ic:ic.filter(a=>a.id===r),s=i.flatMap(a=>a.resources.filter(l=>l.name.toLowerCase().includes(t.toLowerCase()))),o=kE.filter(a=>a.name.toLowerCase().includes(t.toLowerCase())||a.description.toLowerCase().includes(t.toLowerCase()));return h.jsxs("div",{className:"bg-white min-h-screen",children:[h.jsx("section",{className:"bg-gradient-to-r from-lavender-50 to-lavender-100 py-16",children:h.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:h.jsxs("div",{className:"text-center",children:[h.jsx("h1",{className:"text-4xl font-serif text-gray-900 mb-6",children:"Resource Directory"}),h.jsx("p",{className:"text-xl text-gray-600 mb-8 max-w-3xl mx-auto",children:"Find support services, public benefits, and nonprofit resources to help with your needs."}),h.jsx("div",{className:"max-w-2xl mx-auto",children:h.jsxs("div",{className:"relative",children:[h.jsx("input",{type:"text",placeholder:"Search for resources...",className:"w-full px-4 py-3 pl-12 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-lavender-500 focus:border-transparent",value:t,onChange:a=>e(a.target.value)}),h.jsx(xy,{className:"absolute left-4 top-3.5 h-5 w-5 text-gray-400"})]})})]})})}),h.jsx("section",{className:"py-12",children:h.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[h.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mb-8",children:[h.jsx("button",{className:`px-4 py-2 rounded-full ${r==="all"?"bg-lavender-600 text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"} font-serif transition-colors`,onClick:()=>n("all"),children:"All Categories"}),ic.map(a=>h.jsx("button",{className:`px-4 py-2 rounded-full ${r===a.id?"bg-lavender-600 text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"} font-serif transition-colors`,onClick:()=>n(a.id),children:a.name},a.id))]}),h.jsxs("div",{className:"space-y-8",children:[i.map(a=>{const l=a.resources.filter(u=>u.name.toLowerCase().includes(t.toLowerCase()));return l.length===0?null:h.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[h.jsx("h2",{className:"text-2xl font-serif text-gray-900 mb-4",children:a.name}),h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:l.map((u,d)=>h.jsx("a",{href:u.url,target:"_blank",rel:"noopener noreferrer",className:"p-4 border border-gray-200 rounded-lg hover:bg-lavender-50 hover:border-lavender-300 transition-colors",children:h.jsx("h3",{className:"font-medium text-lavender-600",children:u.name})},d))})]},a.id)}),s.length===0&&h.jsx("div",{className:"text-center py-8",children:h.jsx("p",{className:"text-gray-600",children:"No resources found matching your search. Try different keywords or categories."})})]}),o.length>0&&h.jsxs("div",{className:"mt-12 bg-white p-6 rounded-lg shadow-md",children:[h.jsx("h2",{className:"text-2xl font-serif text-gray-900 mb-4",children:"National Organizations"}),h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:o.map((a,l)=>h.jsxs("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",className:"p-4 border border-gray-200 rounded-lg hover:bg-lavender-50 hover:border-lavender-300 transition-colors",children:[h.jsx("h3",{className:"font-medium text-lavender-600",children:a.name}),h.jsx("p",{className:"text-gray-600 text-sm mt-1",children:a.description})]},l))})]})]})})]})},EE=()=>{const[t,e]=O.useState(!0),[r,n]=O.useState(""),[i,s]=O.useState(""),[o,a]=O.useState(!1),[l,u]=O.useState(""),{login:d,signup:f}=to(),_=nh(),x=E=>({length:E.length>=10,uppercase:/[A-Z]/.test(E),lowercase:/[a-z]/.test(E),numbers:/\d/.test(E)}),k=E=>({length:E.length>=3&&E.length<=20,format:/^[a-zA-Z0-9_]+$/.test(E)}),v=x(i),b=k(r),g=Object.values(v).every(Boolean),w=Object.values(b).every(Boolean),y=async E=>{E.preventDefault(),u("");try{if(t)await d(r,i);else{if(!w)throw new Error("Please fix username requirements");if(!g)throw new Error("Please fix password requirements");await f(r,i)}_("/dashboard")}catch(j){u(j instanceof Error?j.message:"An error occurred")}};return h.jsxs("div",{className:"min-h-screen bg-gray-50 flex flex-col justify-center py-12 sm:px-6 lg:px-8",children:[h.jsxs("div",{className:"sm:mx-auto sm:w-full sm:max-w-md",children:[h.jsx("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900",children:t?"Sign in to your account":"Create a new account"}),h.jsxs("p",{className:"mt-2 text-center text-sm text-gray-600",children:[t?"Don't have an account? ":"Already have an account? ",h.jsx("button",{onClick:()=>{e(!t),u("")},className:"font-medium text-lavender-600 hover:text-lavender-500",children:t?"Sign up":"Sign in"})]})]}),h.jsx("div",{className:"mt-8 sm:mx-auto sm:w-full sm:max-w-md",children:h.jsxs("div",{className:"bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10",children:[l&&h.jsx("div",{className:"mb-4 bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded",children:l}),h.jsxs("form",{className:"space-y-6",onSubmit:y,children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"username",className:"block text-sm font-medium text-gray-700",children:"Username"}),h.jsx("div",{className:"mt-1",children:h.jsx("input",{id:"username",name:"username",type:"text",autoComplete:"username",required:!0,value:r,onChange:E=>n(E.target.value),className:"appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-lavender-500 focus:border-lavender-500",placeholder:"Enter your username"})}),!t&&r&&h.jsxs("div",{className:"mt-2 space-y-1",children:[h.jsxs("div",{className:`flex items-center text-xs ${b.length?"text-green-600":"text-red-600"}`,children:[b.length?h.jsx(Vn,{className:"h-3 w-3 mr-1"}
264):h.jsx(qn,{className:"h-3 w-3 mr-1"}),"3-20 characters long"]}),h.jsxs("div",{className:`flex items-center text-xs ${b.format?"text-green-600":"text-red-600"}`,children:[b.format?h.jsx(Vn,{className:"h-3 w-3 mr-1"}):h.jsx(qn,{className:"h-3 w-3 mr-1"}),"Only letters, numbers, and underscores"]})]})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700",children:"Password"}),h.jsxs("div",{className:"mt-1 relative",children:[h.jsx("input",{id:"password",name:"password",type:o?"text":"password",autoComplete:t?"current-password":"new-password",required:!0,value:i,onChange:E=>s(E.target.value),className:"appearance-none block w-full px-3 py-2 pr-10 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-lavender-500 focus:border-lavender-500",placeholder:t?"Enter your password":"Create a strong password"}),h.jsx("button",{type:"button",className:"absolute inset-y-0 right-0 pr-3 flex items-center",onClick:()=>a(!o),children:o?h.jsx(Rx,{className:"h-4 w-4 text-gray-400"}):h.jsx(Dx,{className:"h-4 w-4 text-gray-400"})})]}),!t&&i&&h.jsxs("div",{className:"mt-2 space-y-1",children:[h.jsxs("div",{className:`flex items-center text-xs ${v.length?"text-green-600":"text-red-600"}`,children:[v.length?h.jsx(Vn,{className:"h-3 w-3 mr-1"}):h.jsx(qn,{className:"h-3 w-3 mr-1"}),"At least 10 characters"]}),h.jsxs("div",{className:`flex items-center text-xs ${v.uppercase?"text-green-600":"text-red-600"}`,children:[v.uppercase?h.jsx(Vn,{className:"h-3 w-3 mr-1"}):h.jsx(qn,{className:"h-3 w-3 mr-1"}),"At least one uppercase letter"]}),h.jsxs("div",{className:`flex items-center text-xs ${v.lowercase?"text-green-600":"text-red-600"}`,children:[v.lowercase?h.jsx(Vn,{className:"h-3 w-3 mr-1"}):h.jsx(qn,{className:"h-3 w-3 mr-1"}),"At least one lowercase letter"]}),h.jsxs("div",{className:`flex items-center text-xs ${v.numbers?"text-green-600":"text-red-600"}`,children:[v.numbers?h.jsx(Vn,{className:"h-3 w-3 mr-1"}):h.jsx(qn,{className:"h-3 w-3 mr-1"}),"At least one number"]})]})]}),h.jsx("div",{children:h.jsx("button",{type:"submit",disabled:!t&&(!w||!g),className:`w-full flex justify-center items-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-serif font-medium text-white bg-lavender-600 hover:bg-lavender-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-lavender-500 ${!t&&(!w||!g)?"opacity-70 cursor-not-allowed":""}`,children:t?h.jsxs(h.Fragment,{children:[h.jsx(zx,{className:"h-4 w-4 mr-2"})," Sign in"]}):h.jsxs(h.Fragment,{children:[h.jsx(Hx,{className:"h-4 w-4 mr-2"})," Create account"]})})})]}),h.jsxs("div",{className:"mt-6",children:[h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"absolute inset-0 flex items-center",children:h.jsx("div",{className:"w-full border-t border-gray-300"})}),h.jsx("div",{className:"relative flex justify-center text-sm",children:h.jsx("span",{className:"px-2 bg-white text-gray-500",children:"Or continue without an account"})})]}),h.jsxs("div",{className:"mt-6 grid grid-cols-1 gap-3",children:[h.jsx("a",{href:"tel:+14752430824",className:"w-full flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-serif font-medium text-gray-700 hover:bg-gray-50",children:"Call Ellis directly"}),h.jsx("div",{className:"text-xs text-center text-gray-500 mt-2",children:"No account needed to speak with Ellis, but your conversations won't be saved."})]})]})]})})]})},CE=()=>{const{user:t}=to(),[e,r]=O.useState([]),[n,i]=O.useState(!1),[s,o]=O.useState(null),[a,l]=O.useState(!1);return O.useEffect(()=>{let x=!0,k;return(async()=>{if(!t||a){t||(r([]),l(!1),o(null));return}i(!0),o(null),k=setTimeout(()=>{x&&n&&(console.log("Bookmarks loading timeout"),o("Bookmarks loading timeout"),i(!1),l(!0))},8e3);try{console.log("Fetching bookmarks for user:",t.id);const{data:b,error:g}=await Pe.from("bookmarks").select("*").eq("user_id",t.id).order("created_at",{ascending:!1});if(!x)return;if(g){console.error("Error fetching bookmarks:",g),o(`Failed to load bookmarks: ${g.message}`),r([]);return}console.log("Bookmarks fetched successfully:",(b==null?void 0:b.length)||0);const w=(b||[]).map(y=>
264({id:y.id,url:y.url||"",title:y.title,description:y.description||"",dateAdded:y.created_at}));r(w),clearTimeout(k)}catch(b){x&&(console.error("Error fetching bookmarks:",b),o(`Failed to load bookmarks: ${b instanceof Error?b.message:"Unknown error"}`),r([]))}finally{x&&(i(!1),l(!0))}})(),()=>{x=!1,k&&clearTimeout(k)}},[t==null?void 0:t.id]),{bookmarks:e,addBookmark:async(x,k,v)=>{if(!t)throw new Error("You must be logged in to save bookmarks");try{console.log("Adding bookmark:",{user_id:t.id,title:k,url:x,description:v});const{data:b,error:g}=await Pe.from("bookmarks").insert([{user_id:t.id,title:k.trim(),url:x.trim()||null,description:v.trim()||null}]).select().single();if(g)throw console.error("Error adding bookmark:",g),new Error(`Failed to add bookmark: ${g.message}`);console.log("Bookmark added successfully:",b);const w={id:b.id,url:b.url||"",title:b.title,description:b.description||"",dateAdded:b.created_at};return r(y=>[w,...y]),w}catch(b){throw console.error("Error adding bookmark:",b),b}},removeBookmark:async x=>{if(t)try{console.log("Removing bookmark:",x);const{error:k}=await Pe.from("bookmarks").delete().eq("id",x).eq("user_id",t.id);if(k)throw console.error("Error removing bookmark:",k),new Error("Failed to remove bookmark");r(v=>v.filter(b=>b.id!==x)),console.log("Bookmark removed successfully")}catch(k){throw console.error("Error removing bookmark:",k),k}},updateBookmark:async(x,k)=>{if(t)try{console.log("Updating bookmark:",x,k);const{data:v,error:b}=await Pe.from("bookmarks").update({title:k.title,url:k.url||null,description:k.description||null}).eq("id",x).eq("user_id",t.id).select().single();if(b)throw console.error("Error updating bookmark:",b),new Error("Failed to update bookmark");r(g=>g.map(w=>w.id===x?{...w,title:v.title,url:v.url||"",description:v.description||""}:w)),console.log("Bookmark updated successfully")}catch(v){throw console.error("Error updating bookmark:",v),v}},refetch:async()=>{t&&l(!1)},loading:n,error:s}},jE=({onAdd:t,onCancel:e})=>{const[r,n]=O.useState(""),[i,s]=O.useState(""),[o,a]=O.useState(""),[l,u]=O.useState(""),d=async x=>{if(x.preventDefault(),!!r.trim()){u("");try{const k=i.trim()?f(i.trim()):"";await t(k,r.trim(),o.trim()),n(""),s(""),a("")}catch(k){console.error("Error saving bookmark:",k),u(k instanceof Error?k.message:"Failed to save bookmark")}}},f=x=>x&&(!x.startsWith("http://")&&!x.startsWith("https://")?`https://${x}`:x),_=x=>{if(!x)return!0;try{return new URL(f(x)),!0}catch{return!1}};return h.jsxs("div",{className:"bg-white border border-lavender-200 rounded-lg p-6 shadow-md",children:[h.jsxs("div",{className:"flex items-center justify-between mb-4",children:[h.jsxs("h3",{className:"text-lg font-serif text-gray-900 flex items-center",children:[h.jsx(wy,{className:"h-5 w-5 mr-2 text-lavender-600"}),"Add New Bookmark"]}),h.jsx("button",{onClick:e,className:"text-gray-400 hover:text-gray-600 transition-colors",children:h.jsx(Sy,{className:"h-5 w-5"})})]}),l&&h.jsx("div",{className:"mb-4 bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded",children:l}),h.jsxs("form",{onSubmit:d,className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700 mb-1",children:"Title *"}),h.jsx("input",{type:"text",id:"title",value:r,onChange:x=>n(x.target.value),placeholder:"Resource title",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-lavender-500 focus:border-lavender-500",required:!0})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"url",className:"block text-sm font-medium text-gray-700 mb-1",children:"URL"}),h.jsx("input",{type:"url",id:"url",value:i,onChange:x=>s(x.target.value),onBlur:x=>s(x.target.value?f(x.target.value):""),placeholder:"https://example.com (optional)",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-lavender-500 focus:border-lavender-500"}),i&&!_(i)&&h.jsx("p",{className:"text-sm text-red-600 mt-1",children:"Please enter a valid URL"})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),h.jsx("textarea",{id:"description",value:o,onChange:x=>a(x.target.value),placeholder:"Brief description of this resource...",rows:3,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-lavender-500 focus:border-lavender-500"})]}),h.jsxs("div",{className:"flex gap-3 pt-2",children:[h.jsxs("button",{type:"submit",disabled:!r.trim()||i&&!_(i),className:"flex items-center px-4 py-2 bg-lavender-600 text-white rounded-md hover:bg-lavender-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-serif",children:[h.jsx(_u,{className:"h-4 w-4 mr-2"}),"Add Bookmark"]}),h.jsx("button",{type:"button",onClick:e,className:"px-4 py-2 border border-gray-300 text-gray-700 rounded-md hover:bg-gray-50 transition-colors font-serif",children:"Cancel"})]})]})]})},TE=({bookmark:t,onUpdate:e,onDelete:r})=>{const[n,i]=O.useState(!1),[s,o]=O.useState(t.title),[a,l]=O.useState(t.url),[u,d]=O.useState(t.description),f=()=>{const g=a.trim()?x(a.trim()):"";e(t.id,{title:s.trim(),url:g,description:u.trim()}),i(!1)},_=()=>{o(t.title),l(t.url),d(t.description),i(!1)},x=g=>g&&(!g.startsWith("http://")&&!g.startsWith("https://")?`https://${g}`:g),k=g=>new Date(g).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),v=g=>{if(!g)return null;try{return new URL(g).hostname.replace("www.","")}catch{return g}},b=g=>{if(!g)return!0;try{return new URL(x(g)),!0}catch{return!1}};return n?h.jsx("div",{className:"bg-white border border-lavender-200 rounded-lg p-4 shadow-sm",children:h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Title *"}),h.jsx("input",{type:"text",value:s,onChange:g=>o(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-lavender-500 focus:border-lavender-500",required:!0})]}),h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"URL"}),h.jsx("input",{type:"url",value:a,onChange:g=>l(g.target.value),onBlur:g=>l(g.target.value?x(g.target.value):""),placeholder:"https://example.com (optional)",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-lavender-500 focus:border-lavender-500"}),a&&!b(a)&&h.jsx("p",{className:"text-sm text-red-600 mt-1",children:"Please enter a valid URL"})]}),h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),h.jsx("textarea",{value:u,onChange:g=>d(g.target.value),rows:2,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-lavender-500 focus:border-lavender-500"})]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("button",{onClick:f,disabled:!s.trim()||a&&!b(a),className:"px-3 py-1 bg-lavender-600 text-white text-sm rounded hover:bg-lavender-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-serif",children:"Save"}),h.jsx("button",{onClick:_,className:"px-3 py-1 border border-gray-300 text-gray-700 text-sm rounded hover:bg-gray-50 transition-colors font-serif",children:"Cancel"})]})]})}):h.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-4 shadow-sm hover:shadow-md transition-shadow",children:h.jsxs("div",{className:"flex items-start justify-between mb-2",children:[h.jsxs("div",{className:"flex-1",children:[h.jsx("h3",{className:"font-medium text-gray-900 mb-1",children:t.title}),t.url?h.jsx("p",{className:"text-sm text-lavender-600 mb-2",children:v(t.url)}):h.jsxs("div",{className:"flex items-center text-sm text-gray-500 mb-2",children:[h.jsx(by,{className:"h-3 w-3 mr-1"}),h.jsx("span",{children:"No URL"})]}),t.description&&h.jsx("p",{className:"text-sm text-gray-600 mb-3",children:t.description}),h.jsxs("div",{className:"flex items-center text-xs text-gray-500",children:[h.jsx(Ax,{className:"h-3 w-3 mr-1"}),"Added ",k(t.dateAdded)]})]}),h.jsxs("div",{className:"flex items-center gap-2 ml-4",children:[t.url&&h.jsx("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"p-1 text-gray-400 hover:text-lavender-600 transition-colors",title:"Open link",children:h.jsx(_y,{className:"h-4 w-4"})}),h.jsx("button",{onClick:()=>i(!0),className:"p-1 text-gray-400 hover:text-blue-600 transition-colors",title:"Edit bookmark",children:h.jsx(Lx,{className:"h-4 w-4"})}),h.jsx("button",{onClick:()=>r(t.id),className:"p-1 text-gray-400 hover:text-red-600 transition-colors",title:"Delete bookmark",children:h.jsx(Wx,{className:"h-4 w-4"})})]})]})})},PE=()=>{const{user:t,userProfile:e,loading:r,error:n}=to(),i=nh(),{bookmarks:s,addBookmark:o,removeBookmark:a,updateBookmark:l,loading:u}=CE(),[d,f]=O.useState(!1),[_,x]=O.useState(""),[k,v]=O.useState(""),[b,g]=O.useState(!1);if(O.useEffect(()=>{const E=setTimeout(()=>{r&&g(!0)},8e3);return()=>clearTimeout(E)},[r]),O.useEffect(()=>{!r&&!t&&!n&&i("/login")},[t,r,n,i]),n||b)return h.jsx("div",{className:"bg-gray-50 min-h-screen flex items-center justify-center",children:h.jsxs("div",{className:"text-center max-w-md mx-auto p-6",children:[h.jsx(Nx,{className:"h-12 w-12 text-red-500 mx-auto mb-4"}),h.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:b?"Loading Timeout":"Authentication 
264Error"}),h.jsx("p",{className:"text-gray-600 mb-6",children:n||"The application took too long to load. Please try refreshing the page."}),h.jsxs("div",{className:"space-y-3",children:[h.jsx("button",{onClick:()=>window.location.reload(),className:"w-full px-4 py-2 bg-lavender-600 text-white rounded-md hover:bg-lavender-700 transition-colors font-serif",children:"Refresh Page"}),h.jsx("button",{onClick:()=>i("/login"),className:"w-full px-4 py-2 border border-gray-300 text-gray-700 rounded-md hover:bg-gray-50 transition-colors font-serif",children:"Go to Login"})]})]})});if(r)return h.jsx("div",{className:"bg-gray-50 min-h-screen flex items-center justify-center",children:h.jsxs("div",{className:"text-center",children:[h.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-lavender-600 mx-auto mb-4"}),h.jsx("p",{className:"text-gray-600",children:"Loading..."})]})});if(!t)return null;const w=async(E,j,T)=>{try{v(""),console.log("Dashboard: Adding bookmark...",{url:E,title:j,description:T}),await o(E,j,T),f(!1),console.log("Dashboard: Bookmark added successfully")}catch(P){throw console.error("Dashboard: Failed to add bookmark:",P),v(P instanceof Error?P.message:"Failed to add bookmark"),P}},y=s.filter(E=>E.title.toLowerCase().includes(_.toLowerCase())||E.description.toLowerCase().includes(_.toLowerCase())||E.url.toLowerCase().includes(_.toLowerCase()));return h.jsx("div",{className:"bg-gray-50 min-h-screen",children:h.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10",children:h.jsxs("div",{className:"bg-white shadow-md rounded-lg overflow-hidden",children:[h.jsx("div",{className:"bg-gradient-to-r from-lavender-600 to-lavender-700 px-6 py-8",children:h.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center lg:justify-between",children:[h.jsxs("div",{className:"mb-6 lg:mb-0",children:[h.jsx("h1",{className:"text-2xl font-bold text-white",children:"Your Dashboard"}),h.jsxs("p",{className:"text-lavender-100 mt-1",children:["Welcome back, ",(e==null?void 0:e.username)||"User","! Manage your saved bookmarks and resources."]}),t&&h.jsxs("p",{className:"text-lavender-200 text-sm mt-1",children:["User ID: ",t.id]})]}),h.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[h.jsxs("a",{href:"tel:+14752430824",className:"flex items-center justify-center px-4 py-2 bg-white text-lavender-600 rounded-md hover:bg-lavender-50 transition-colors shadow-sm font-serif",children:[h.jsx(On,{size:18,className:"mr-2"})," Call Ellis"]}),h.jsxs(pe,{to:"/chat",className:"flex items-center justify-center px-4 py-2 bg-white text-lavender-600 rounded-md hover:bg-lavender-50 transition-colors shadow-sm font-serif",children:[h.jsx(Kr,{size:18,className:"mr-2"})," Message Ellis"]}),h.jsxs(pe,{to:"/speak-with-ellis",className:"flex items-center justify-center px-4 py-2 bg-white text-lavender-600 rounded-md hover:bg-lavender-50 transition-colors shadow-sm font-serif",children:[h.jsx(Pn,{size:18,className:"mr-2"})," Speak with Ellis"]})]})]})}),h.jsxs("div",{className:"p-6",children:[k&&h.jsx("div",{className:"mb-6 bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded",children:k}),h.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between mb-6",children:[h.jsxs("div",{className:"mb-4 sm:mb-0",children:[h.jsx("h2",{className:"text-lg font-medium text-gray-900 mb-2",children:"Your Bookmarks"}),h.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Save resources you discover to access them later. Bookmark helpful links from:"}),h.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-gray-500",children:[h.jsxs("div",{className:"flex items-center",children:[h.jsx(Kr,{className:"h-4 w-4 mr-1 text-lavender-500"}),h.jsx(pe,{to:"/chat",className:"hover:text-lavender-600 underline",children:"Chat conversations with Ellis"})]}),h.jsxs("div",{className:"flex items-center",children:[h.jsx(by,{className:"h-4 w-4 mr-1 text-lavender-500"}),h.jsx("span",{children:"Our Resource Guide"})]}),h.jsxs("div",{className:"flex items-center",children:[h.jsx(_y,{className:"h-4 w-4 mr-1 text-lavender-500"}),h.jsx("span",{children:"Websites around the web"})]})]})]}),h.jsxs("button",{onClick:()=>{console.log("Add bookmark button clicked"),f(!0)},disabled:d,className:"flex items-center px-4 py-2 bg-lavender-600 text-white rounded-md hover:bg-lavender-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed font-serif",children:[h.jsx(_u,{className:"h-4 w-4 mr-2"}),"Add Bookmark"]})]}),s.length>0&&h.jsx("div",{className:"mb-6",children:h.jsxs("div",{className:"relative max-w-md",children:[h.jsx("input",{type:"text",placeholder:"Search bookmarks...",value:_,onCh
264ange:E=>x(E.target.value),className:"w-full px-4 py-2 pl-10 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-lavender-500 focus:border-lavender-500"}),h.jsx(xy,{className:"absolute left-3 top-2.5 h-4 w-4 text-gray-400"})]})}),d&&h.jsx("div",{className:"mb-6",children:h.jsx(jE,{onAdd:w,onCancel:()=>{console.log("Canceling bookmark form"),f(!1),v("")}})}),u&&h.jsxs("div",{className:"text-center py-8",children:[h.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-lavender-600 mx-auto mb-4"}),h.jsx("p",{className:"text-gray-500",children:"Loading bookmarks..."})]}),!u&&h.jsx(h.Fragment,{children:y.length>0?h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:y.map(E=>h.jsx(TE,{bookmark:E,onUpdate:l,onDelete:a},E.id))}):s.length>0?h.jsx("div",{className:"text-center py-8",children:h.jsx("p",{className:"text-gray-500",children:"No bookmarks match your search."})}):h.jsxs("div",{className:"text-center py-12",children:[h.jsx(wy,{className:"h-12 w-12 text-gray-300 mx-auto mb-4"}),h.jsx("p",{className:"text-gray-500 mb-2",children:"No bookmarks saved yet."}),h.jsx("p",{className:"text-sm text-gray-400 mb-6 max-w-md mx-auto",children:"Start saving useful resources! You can bookmark links from your conversations with Ellis, pages from our Resource Guide, or any helpful websites you find."}),!d&&h.jsxs("button",{onClick:()=>f(!0),className:"inline-flex items-center px-4 py-2 bg-lavender-600 text-white rounded-md hover:bg-lavender-700 transition-colors font-serif",children:[h.jsx(_u,{className:"h-4 w-4 mr-2"}),"Add Your First Bookmark"]})]})})]})]})})})};var Ky={};function op(t,e){if(t==null)return{};var r,n,i=function(o,a){if(o==null)return{};var l={};for(var u in o)if({}.hasOwnProperty.call(o,u)){if(a.indexOf(u)!==-1)continue;l[u]=o[u]}return l}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function xt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function se(t){return se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},se(t)}function Qy(t){var e=function(r,n){if(se(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var s=i.call(r,n||"default");if(se(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}(t,"string");return se(e)=="symbol"?e:e+""}function ap(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qy(n.key),n)}}function kt(t,e,r){return e&&ap(t.prototype,e),r&&ap(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ml(t,e){if(e&&(se(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Ht(t){return Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ht(t)}function qs(t,e){return qs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},qs(t,e)}function gl(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qs(t,e)}function Zt(t,e,r){return(e=Qy(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lp(t,e,r,n,i,s,o){try{var a=t[s](o),l=a.value}catch(u){return void r(u)}a.done?e(l):Promise.resolve(l).then(n,i)}function W(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function o(l){lp(s,n,i,o,a,"next",l)}
vendor: 5,847 bytes, lines 264-265
264function a(l){lp(s,n,i,o,a,"throw",l)}o(void 0)})}}function cp(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Ke(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var s,o,a,l,u=[],d=!0,f=!1;try{if(a=(i=i.call(r)).next,n===0){if(Object(i)!==i)return;d=!1}else for(;!(d=(s=a.call(i)).done)&&(u.push(s.value),u.length!==n);d=!0);}catch(_){f=!0,o=_}finally{try{if(!d&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(f)throw o}}return u}}(t,e)||function(r,n){if(r){if(typeof r=="string")return cp(r,n);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?cp(r,n):void 0}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
265In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function OE(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var up,Po={exports:{}},Ou=function(){if(up)return Po.exports;up=1;var t,e=typeof Reflect=="object"?Reflect:null,r=e&&typeof e.apply=="function"?e.apply:function(v,b,g){return Function.prototype.apply.call(v,b,g)};t=e&&typeof e.ownKeys=="function"?e.ownKeys:Object.getOwnPropertySymbols?function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:function(v){return Object.getOwnPropertyNames(v)};var n=Number.isNaN||function(v){return v!=v};function i(){i.init.call(this)}Po.exports=i,Po.exports.once=function(v,b){return new Promise(function(g,w){function y(j){v.removeListener(b,E),w(j)}function E(){typeof v.removeListener=="function"&&v.removeListener("error",y),g([].slice.call(arguments))}k(v,b,E,{once:!0}),b!=="error"&&function(j,T,P){typeof j.on=="function"&&k(j,"error",T,P)}(v,y,{once:!0})})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function o(v){if(typeof v!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof v)}function a(v){return v._maxListeners===void 0?i.defaultMaxListeners:v._maxListeners}function l(v,b,g,w){var y,E,j,T;if(o(g),(E=v._events)===void 0?(E=v._events=Object.create(null),v._eventsCount=0):(E.newListener!==void 0&&(v.emit("newListener",b,g.listener?g.listener:g),E=v._events),j=E[b]),j===void 0)j=E[b]=g,++v._eventsCount;else if(typeof j=="function"?j=E[b]=w?[g,j]:[j,g]:w?j.unshift(g):j.push(g),(y=a(v))>0&&j.length>y&&!j.warned){j.warned=!0;var P=new Error("Possible EventEmitter memory leak detected. "+j.length+" "+String(b)+" listeners added. Use emitter.setMaxListeners() to increase limit");P.name="MaxListenersExceededWarning",P.emitter=v,P.type=b,P.count=j.length,T=P,console&&console.warn&&console.warn(T)}return v}function u(){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 d(v,b,g){var w={fired:!1,wrapFn:void 0,target:v,type:b,listener:g},y=u.bind(w);return y.listener=g,w.wrapFn=y,y}function f(v,b,g){var w=v._events;if(w===void 0)return[];var y=w[b];return y===void 0?[]:typeof y=="function"?g?[y.listener||y]:[y]:g?function(E){for(var j=new Array(E.length),T=0;T<j.length;++T)j[T]=E[T].listener||E[T];return j}(y):x(y,y.length)}function _(v){var b=this._events;if(b!==void 0){var g=b[v];if(typeof g=="function")return 1;if(g!==void 0)return g.length}return 0}function x(v,b){for(var g=new Array(b),w=0;w<b;++w)g[w]=v[w];return g}function k(v,b,g,w){if(typeof v.on=="function")w.once?v.once(b,g):v.on(b,g);else{if(typeof v.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof v);v.addEventListener(b,function y(E){w.once&&v.removeEventListener(b,y),g(E)})}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(v){if(typeof v!="number"||v<0||n(v))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+v+".");s=v}}),i.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},i.prototype.setMaxListeners=function(v){if(typeof v!="number"||v<0||n(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this},i.prototype.getMaxListeners=function(){return a(this)},i.prototype.emit=function(v){for(var b=[],g=1;g<arguments.length;g++)b.push(arguments[g]);var w=v==="error",y=this._events;if(y!==void 0)w=w&&y.error===void 0;else if(!w)return!1;if(w){var E;if(b.length>0&&(E=b[0]),E instanceof Error)throw E;var j=new Error("Unhandled error."+(E?" ("+E.message+")":""));throw j.context=E,j}var T=y[v];if(T===void 0)return!1;if(typeof T=="function")r(T,this,b);else{var P=T.length,D=x(T,P);for(g=0;g<P;++g)r(D[g],this,b)}return!0},i.prototype.addListener=function(v,b){return l(this,v,b,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(v,b){return l(this,v,b,!0)},i.prototype.once=function(v,b){return o(b),this.on(v,d(this,v,b)),this},i.prototype.prependOnceListener=function(v,b){return o(b),this.prependListener(v,d(this,v,b)),this},i.prototype.removeListener=function(v,b){var g,w,y,E,j;if(o(b),(w=this._events)===void 0)return this;if((g=w[v])===void 0)return this;if(g===b||g.listener===b)--this._eventsCount==0?this._events=Object.create(null):(delete w[v],w.removeListener&&this.emit
265("removeListener",v,g.listener||b));else if(typeof g!="function"){for(y=-1,E=g.length-1;E>=0;E--)if(g[E]===b||g[E].listener===b){j=g[E].listener,y=E;break}if(y<0)return this;y===0?g.shift():function(T,P){for(;P+1<T.length;P++)T[P]=T[P+1];T.pop()}(g,y),g.length===1&&(w[v]=g[0]),w.removeListener!==void 0&&this.emit("removeListener",v,j||b)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(v){var b,g,w;if((g=this._events)===void 0)return this;if(g.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):g[v]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete g[v]),this;if(arguments.length===0){var y,E=Object.keys(g);for(w=0;w<E.length;++w)(y=E[w])!=="removeListener"&&this.removeAllListeners(y);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(b=g[v])=="function")this.removeListener(v,b);else if(b!==void 0)for(w=b.length-1;w>=0;w--)this.removeListener(v,b[w]);return this},i.prototype.listeners=function(v){return f(this,v,!0)},i.prototype.rawListeners=function(v){return f(this,v,!1)},i.listenerCount=function(v,b){return typeof v.listenerCount=="function"?v.listenerCount(b):_.call(v,b)},i.prototype.listenerCount=_,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]},Po.exports}(),Oo=OE(Ou),dp=Object.prototype.hasOwnProperty;function hp(t,e,r){for(r of t.keys())if(tt(r,e))return r}function tt(t,e){var r,n,i;if(t===e)return!0;if(t&&e&&(r=t.constructor)===e.constructor){if(r===Date)return t.getTime()===e.getTime();if(r===RegExp)return t.toString()===e.toString();if(r===Array){if((n=t.length)===e.length)for(;n--&&tt(t[n],e[n]););return n===-1}if(r===Set){if(t.size!==e.size)return!1;for(n of t)if((i=n)&&typeof i=="object"&&!(i=hp(e,i))||!e.has(i))return!1;return!0}if(r===Map){if(t.size!==e.size)return!1;for(n of t)if((i=n[0])&&typeof i=="object"&&!(i=hp(e,i))||!tt(n[1],e.get(i)))return!1;return!0}if(r===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(r===DataView){if((n=t.byteLength)===e.byteLength)for(;n--&&t.getInt8(n)===e.getInt8(n););return n===-1}if(ArrayBuffer.isView(t)){if((n=t.byteLength)===e.byteLength)for(;n--&&t[n]===e[n];);return n===-1}if(!r||typeof t=="object"){for(r in n=0,t)if(dp.call(t,r)&&++n&&!dp.call(e,r)||!(r in e)||!tt(t[r],e[r]))return!1;return Object.keys(e).length===n}}return t!=t&&e!=e}const NE={"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"},Xy={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"},Te={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Xe={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"},Er={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class I{static getFirstMatch(e,r){const n=r.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,r){const n=r.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,r,n){if(e.test(r))return n}
265static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){const r=e.split(".").splice(0,2).map(n=>parseInt(n,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(e){const r=e.split(".").splice(0,2).map(n=>parseInt(n,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(e){return e.split(".").length}static compareVersions(e,r,n=!1){const i=I.getVersionPrecision(e),s=I.getVersionPrecision(r);let o=Math.max(i,s),a=0;const l=I.map([e,r],u=>{const d=o-I.getVersionPrecision(u),f=u+new Array(d+1).join(".0");return I.map(f.split("."),_=>new Array(20-_.length).join("0")+_).reverse()});for(n&&(a=o-Math.min(i,s)),o-=1;o>=a;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===a)return 0;o-=1}else if(l[0][o]<l[1][o])return-1}}static map(e,r){const n=[];let i;if(Array.prototype.map)return Array.prototype.map.call(e,r);for(i=0;i<e.length;i+=1)n.push(r(e[i]));return n}static find(e,r){let n,i;if(Array.prototype.find)return Array.prototype.find.call(e,r);for(n=0,i=e.length;n<i;n+=1){const s=e[n];if(r(s,n))return s}}static assign(e,...r){const n=e;let i,s;if(Object.assign)return Object.assign(e,...r);for(i=0,s=r.length;i<s;i+=1){const o=r[i];typeof o=="object"&&o!==null&&Object.keys(o).forEach(a=>{n[a]=o[a]})}return e}static getBrowserAlias(e){return NE[e]}static getBrowserTypeByAlias(e){return Xy[e]||""}}const he=/version\/(\d+(\.?_?\d+)+)/i,AE=[{test:[/googlebot/i],describe(t){const e={name:"Googlebot"},r=I.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/opera/i],describe(t){const e={name:"Opera"},r=I.getFirstMatch(he,t)||I.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opr\/|opios/i],describe(t){const e={name:"Opera"},r=I.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/SamsungBrowser/i],describe(t){const e={name:"Samsung Internet for Android"},r=I.getFirstMatch(he,t)||I.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Whale/i],describe(t){const e={name:"NAVER Whale Browser"},r=I.getFirstMatch(he,t)||I.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MZBrowser/i],describe(t){const e={name:"MZ Browser"},r=I.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/focus/i],describe(t){const e={name:"Focus"},r=I.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/swing/i],describe(t){const e={name:"Swing"},r=I.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/coast/i],describe(t){const e={name:"Opera Coast"},r=I.getFirstMatch(he,t)||I.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){const e={name:"Opera Touch"},r=I.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/yabrowser/i],describe(t){const e={name:"Yandex Browser"},r=I.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/ucbrowser/i],describe(t){const e={name:"UC Browser"},r=I.getFirstMatch(he,t)||I.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Maxthon|mxios/i],describe(t){const e={name:"Maxthon"}
vendor: 6,788 bytes, line 265
265,r=I.getFirstMatch(he,t)||I.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/epiphany/i],describe(t){const e={name:"Epiphany"},r=I.getFirstMatch(he,t)||I.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/puffin/i],describe(t){const e={name:"Puffin"},r=I.getFirstMatch(he,t)||I.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sleipnir/i],describe(t){const e={name:"Sleipnir"},r=I.getFirstMatch(he,t)||I.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/k-meleon/i],describe(t){const e={name:"K-Meleon"},r=I.getFirstMatch(he,t)||I.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/micromessenger/i],describe(t){const e={name:"WeChat"},r=I.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/qqbrowser/i],describe(t){const e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},r=I.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/msie|trident/i],describe(t){const e={name:"Internet Explorer"},r=I.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/\sedg\//i],describe(t){const e={name:"Microsoft Edge"},r=I.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/edg([ea]|ios)/i],describe(t){const e={name:"Microsoft Edge"},r=I.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/vivaldi/i],describe(t){const e={name:"Vivaldi"},r=I.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/seamonkey/i],describe(t){const e={name:"SeaMonkey"},r=I.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sailfish/i],describe(t){const e={name:"Sailfish"},r=I.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return r&&(e.version=r),e}},{test:[/silk/i],describe(t){const e={name:"Amazon Silk"},r=I.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/phantom/i],describe(t){const e={name:"PhantomJS"},r=I.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/slimerjs/i],describe(t){const e={name:"SlimerJS"},r=I.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e={name:"BlackBerry"},r=I.getFirstMatch(he,t)||I.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(web|hpw)[o0]s/i],describe(t){const e={name:"WebOS Browser"},r=I.getFirstMatch(he,t)||I.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/bada/i],describe(t){const e={name:"Bada"},r=I.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/tizen/i],describe(t){const e={name:"Tizen"},r=I.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/qupzilla/i],describe(t){const e={name:"QupZilla"},r=I.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){const e={name:"Firefox"},r=I.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/electron/i],describe(t){const e={name:"Electron"},r=I.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MiuiBrowser/i],describe(t){const e={name:"Miui"},r=I.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/chromium/i],describe(t){const e={name:"Chromium"},r=I.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/chrome|crios|crmo/i],describe(t){const e={name:"Chrome"},r=I.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/GSA/i],describe(t){const e={name:"Google Search"},r=I.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e={name:"Android Browser"},r=I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/playstation 4/i],describe(t){const e={name:"PlayStation 4"},r=I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/safari|applewebkit/i],describe(t){const e={name:"Safari"},r=I.getFirstMatch(he,t);return r&&(e.version=r),e}},{test:[/.*/i],describe(t){const e=t.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:I.getFirstMatch(e,t),version:I.getSecondMatch(e,t)}}}];var IE=[{test:[/Roku\/DVP/],describe(t){const e=I.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:Xe.Roku,version:e}}},{test:[/windows phone/i],describe(t){const e=I.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:Xe.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){const e=I.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),r=I.getWindowsVersionName(e);return{name:Xe.Windows,version:e,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){const e={name:Xe.iOS},r=I.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return r&&(e.version=r),e}},{test:[/macintosh/i],describe(t){const e=I.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),r=I.getMacOSVersionName(e),n={name:Xe.MacOS,version:e};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe(t){const e=I.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:Xe.iOS,version:e}}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e=I.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),r=I.getAndroidVersionName(e),n={name:Xe.Android,version:e};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe(t){const e=I.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),r={name:Xe.WebOS};return e&&e.length&&(r.version=e),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e=I.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||I.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||I.getFirstMatch(/\bbb(\d+)/i,t);return{name:Xe.BlackBerry,version:e}}},{test:[/bada/i],describe(t){const e=I.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:Xe.Bada,version:e}}},{test:[/tizen/i],describe(t){const e=I.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:Xe.Tizen,version:e}}},{test:[/linux/i],describe:()=>({name:Xe.Linux})},{test:[/CrOS/],describe:()=>({name:Xe.ChromeOS})},{test:[/PlayStation 4/],describe(t){const e=I.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);
265return{name:Xe.PlayStation4,version:e}}}],ME=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(t){const e=I.getFirstMatch(/(can-l01)/i,t)&&"Nova",r={type:Te.mobile,vendor:"Huawei"};return e&&(r.model=e),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:Te.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:Te.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:Te.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:Te.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:Te.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:Te.tablet})},{test(t){const e=t.test(/ipod|iphone/i),r=t.test(/like (ipod|iphone)/i);return e&&!r},describe(t){const e=I.getFirstMatch(/(ipod|iphone)/i,t);return{type:Te.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:Te.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:Te.mobile})},{test:t=>t.getBrowserName(!0)==="blackberry",describe:()=>({type:Te.mobile,vendor:"BlackBerry"})},{test:t=>t.getBrowserName(!0)==="bada",describe:()=>({type:Te.mobile})},{test:t=>t.getBrowserName()==="windows phone",describe:()=>({type:Te.mobile,vendor:"Microsoft"})}
265,{test(t){const e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe:()=>({type:Te.tablet})},{test:t=>t.getOSName(!0)==="android",describe:()=>({type:Te.mobile})},{test:t=>t.getOSName(!0)==="macos",describe:()=>({type:Te.desktop,vendor:"Apple"})},{test:t=>t.getOSName(!0)==="windows",describe:()=>({type:Te.desktop})},{test:t=>t.getOSName(!0)==="linux",describe:()=>({type:Te.desktop})},{test:t=>t.getOSName(!0)==="playstation 4",describe:()=>({type:Te.tv})},{test:t=>t.getOSName(!0)==="roku",describe:()=>({type:Te.tv})}],LE=[{test:t=>t.getBrowserName(!0)==="microsoft edge",describe(t){if(/\sedg\//i.test(t))return{name:Er.Blink};const e=I.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:Er.EdgeHTML,version:e}}},{test:[/trident/i],describe(t){const e={name:Er.Trident},r=I.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:t=>t.test(/presto/i),describe(t){const e={name:Er.Presto},r=I.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=t.test(/gecko/i),r=t.test(/like gecko/i);return e&&!r},describe(t){const e={name:Er.Gecko},r=I.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:Er.Blink})},{test:[/(apple)?webkit/i],describe(t){const e={name:Er.WebKit},r=I.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}}];class fp{constructor(e,r=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},r!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=I.find(AE,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=I.find(IE,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:r}=this.getOS();return e?String(r).toLowerCase()||"":r||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:r}=this.getPlatform();return e?String(r).toLowerCase()||"":r||""}parsePlatform(){this.parsedResult.platform={};const e=I.find(ME,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=I.find(LE,r=>{if(typeof r.test=="function")return r.test(this);if(r.test instanceof Array)return r.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return I.assign({},this.parsedResult)}satisfies(e){const r={};let n=0;const i={};let s=0;if(Object.keys(e).forEach(o=>{const a=e[o];typeof a=="string"?(i[o]=a,s+=1):typeof a=="object"&&(r[o]=a,n+=1)}),n>0){const o=Object.keys(r),a=I.find(o,u=>this.isOS(u));if(a){const u=this.satisfies(r[a]);if(u!==void 0)return u}const l=I.find(o,u=>this.isPlatform(u));if(l){const u=this.satisfies(r[l]);if(u!==void 0)return u}}if(s>0){const o=Object.keys(i),a=I.find(o,l=>this.isBrowser(l,!0));if(a!==void 0)return this.compareVersion(i[a])}}isBrowser(e,r=!1){const n=this.getBrowserName().toLowerCase();let i=e.toLowerCase();const s=I.getBrowserTypeByAlias(i);return r&&s&&(i=s.toLowerCase()),i===n}
265compareVersion(e){let r=[0],n=e,i=!1;const s=this.getBrowserVersion();if(typeof s=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(i=!0,n=e.substr(2)):r=[],e[0]===">"?r.push(1):r.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(i=!0,n=e.substr(1)),r.indexOf(I.compareVersions(s,n,i))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,r=!1){return this.isBrowser(e,r)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(r=>this.is(r))}}/*!
266 * Bowser - a browser detector
267 * https://github.com/lancedikson/bowser
268 * MIT License | (c) Dustin Diaz 2012-2015
269 * MIT License | (c) Denis Demchenko 2015-2019
270 */class RE{static getParser(e,r=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new fp(e,r)}static parse(e){return new fp(e).getResult()}static get BROWSER_MAP(){return Xy}static get ENGINE_MAP(){return Er}static get OS_MAP(){return Xe}static get PLATFORMS_MAP(){return Te}}function vl(){return Date.now()+Math.random().toString()}function Zi(){throw new Error("Method must be implemented in subclass")}function Zy(t,e){return e!=null&&e.proxyUrl?e.proxyUrl+(e.proxyUrl.slice(-1)==="/"?"":"/")+t.substring(8):t}function Ma(t){return t!=null&&t.callObjectBundleUrlOverride?t.callObjectBundleUrlOverride:Zy("https://c.daily.co/call-machine/versioned/".concat("0.80.0","/static/call-machine-object-bundle.js"),t)}function La(t){try{new URL(t)}catch{return!1}return!0}const ge=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,_n="8.55.0",ae=globalThis;function Ra(t,e,r){const n=ae,i=n.__SENTRY__=n.__SENTRY__||{},s=i[_n]=i[_n]||{};return s[t]||(s[t]=e())}const Fn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Nu=["debug","info","warn","error","log","assert","trace"],Da={};function ro(t){if(!("console"in ae))return t();const e=ae.console,r={},n=Object.keys(Da);n.forEach(i=>{const s=Da[i];r[i]=e[i],e[i]=s});try{return t()}finally{n.forEach(i=>{e[i]=r[i]})}}const H=Ra("logger",function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Fn?Nu.forEach(r=>{e[r]=(...n)=>{t&&ro(()=>{ae.console[r](`Sentry Logger [${r}]:`,...n)})}}):Nu.forEach(r=>{e[r]=()=>{}}),e}),vn="?",pp=/\(error: (.*)\)/,mp=/captureMessage|captureException/;function No(t){return t[t.length-1]||{}}const gp="<anonymous>";function Qr(t){try{return t&&typeof t=="function"&&t.name||gp}catch{return gp}}function vp(t){const e=t.exception;if(e){const r=[];try{return e.values.forEach(n=>{n.stacktrace.frames&&r.push(...n.stacktrace.frames)}),r}catch{return}}}const ea={},yp={};function bn(t,e){ea[t]=ea[t]||[],ea[t].push(e)}function xn(t,e){if(!yp[t]){yp[t]=!0;try{e()}catch(r){Fn&&H.error(`Error while instrumenting ${t}`,r)}}}function Jt(t,e){const r=t&&ea[t];if(r)for(const n of r)try{n(e)}catch(i){Fn&&H.error(`Error while triggering instrumentation handler.
271Type: ${t}
272Name: ${Qr(n)}
273Error:`,i)}}let sc=null;function DE(){sc=ae.onerror,ae.onerror=function(t,e,r,n,i){return Jt("error",{column:n,error:i,line:r,msg:t,url:e}),!!sc&&sc.apply(this,arguments)},ae.onerror.__SENTRY_INSTRUMENTED__=!0}let oc=null;function $E(){oc=ae.onunhandledrejection,ae.onunhandledrejection=function(t){return Jt("unhandledrejection",t),!oc||oc.apply(this,arguments)},ae.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function yl(){return ch(ae),ae}function ch(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||_n,e[_n]=e[_n]||{}}const e0=Object.prototype.toString;function uh(t){switch(e0.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Nn(t,Error)}}function Ui(t,e){return e0.call(t)===`[object ${e}]`}function t0(t){return Ui(t,"ErrorEvent")}function wp(t){return Ui(t,"DOMError")}function fr(t){return Ui(t,"String")}function dh(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function Au(t){return t===null||dh(t)||typeof t!="object"&&typeof t!="function"}function Ti(t){return Ui(t,"Object")}function wl(t){return typeof Event<"u"&&Nn(t,Event)}function _l(t){return!!(t&&t.then&&typeof t.then=="function")}function Nn(t,e){try{return t instanceof e}catch{return!1}}function r0(t){return!(typeof t!="object"||t===null||!t.__isVue&&!t._isVue)}const hh=ae;function n0(t,e={}){if(!t)return"<unknown>";try{let r=t;const n=5,i=[];let s=0,o=0;const a=" > ",l=a.length;let u;const d=Array.isArray(e)?e:e.keyAttrs,f=!Array.isArray(e)&&e.maxStringLength||80;for(;r&&s++<n&&(u=UE(r,d),!(u==="html"||s>1&&o+i.length*l+u.length>=f));)i.push(u),o+=u.length,r=r.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function UE(t,e){const r=t,n=[];if(!r||!r.tagName)return"";if(hh.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());const i=e&&e.length?e.filter(o=>r.getAttribute(o)).map(o=>[o,r.getAttribute(o)]):null;if(i&&i.length)i.forEach(o=>{n.push(`[${o[0]}="${o[1]}"]`)});else{r.id&&n.push(`#${r.id}`);const o=r.className;if(o&&fr(o)){const a=o.split(/\s+/);for(const l of a)n.push(`.${l}`)}}const s=["aria-label","type","name","title","alt"];for(const o of s){const a=r.getAttribute(o);a&&n.push(`[${o}="${a}"]`)}return n.join("")}function vi(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function _p(t,e){if(!Array.isArray(t))return"";const r=[];for(let n=0;n<t.length;n++){const i=t[n];try{r0(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(e)}function FE(t,e,r=!1){return!!fr(t)&&(Ui(e,"RegExp")?e.test(t):!!fr(e)&&(r?t===e:t.includes(e)))}function Ao(t,e=[],r=!1){return e.some(n=>FE(t,n,r))}function vt(t,e,r){if(!(e in t))return;const n=t[e],i=r(n);typeof i=="function"&&i0(i,n);try{t[e]=i}catch{Fn&&H.log(`Failed to replace method "${e}" in object`,t)}}function An(t,e,r){try{Object.defineProperty(t,e,{value:r,writable:!0,configurable:!0})}catch{Fn&&H.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function i0(t,e){try{const r=e.prototype||{};t.prototype=e.prototype=r,An(t,"__sentry_original__",e)}catch{}}function fh(t){return t.__sentry_original__}function s0(t){if(uh(t))return{message:t.message,name:t.name,stack:t.stack,...xp(t)};if(wl(t)){const e={type:t.type,target:bp(t.target),currentTarget:bp(t.currentTarget),...xp(t)};return typeof CustomEvent<"u"&&Nn(t,CustomEvent)&&(e.detail=t.detail),e}return t}function bp(t){try{return e=t,typeof Element<"u"&&Nn(e,Element)?n0(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}var e}function xp(t){if(typeof t=="object"&&t!==null){const e={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}return{}}function Pt(t){return Iu(t,new Map)}function Iu(t,e){if(function(r){if(!Ti(r))return!1;try{const n=Object.getPrototypeOf(r).constructor.name;return!n||n==="Object"}catch{return!0}}(t)){const r=e.get(t);if(r!==void 0)return r;const n={};e.set(t,n);for(const i of Object.getOwnPropertyNames(t))t[i]!==void 0&&(n[i]=Iu(t[i],e));return n}if(Array.isArray(t)){const r=e.get(t);if(r!==void 0)return r;const n=[];return e.set(t,n),t.forEach(i=>
vendor: 15,037 bytes, line 273
273{n.push(Iu(i,e))}),n}return t}function no(){return Date.now()/1e3}const gr=function(){const{performance:t}=ae;if(!t||!t.now)return no;const e=Date.now()-t.now(),r=t.timeOrigin==null?e:t.timeOrigin;return()=>(r+t.now())/1e3}();function Nt(){const t=ae,e=t.crypto||t.msCrypto;let r=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(r=()=>{const n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(15&r())>>n/4).toString(16))}function o0(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Or(t){const{message:e,event_id:r}=t;if(e)return e;const n=o0(t);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Mu(t,e,r){const n=t.exception=t.exception||{},i=n.values=n.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type="Error")}function Pi(t,e){const r=o0(t);if(!r)return;const n=r.mechanism;if(r.mechanism={type:"generic",handled:!0,...n,...e},e&&"data"in e){const i={...n&&n.data,...e.data};r.mechanism.data=i}}function kp(t){if(function(e){try{return e.__sentry_captured__}catch{}}(t))return!0;try{An(t,"__sentry_captured__",!0)}catch{}return!1}var lr;function In(t){return new jt(e=>{e(t)})}function $a(t){return new jt((e,r)=>{r(t)})}(()=>{const{performance:t}=ae;if(!t||!t.now)return;const e=36e5,r=t.now(),n=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+r-n):e,s=i<e,o=t.timing&&t.timing.navigationStart,a=typeof o=="number"?Math.abs(o+r-n):e;(s||a<e)&&i<=a&&t.timeOrigin})(),function(t){t[t.PENDING=0]="PENDING",t[t.RESOLVED=1]="RESOLVED",t[t.REJECTED=2]="REJECTED"}(lr||(lr={}));class jt{constructor(e){jt.prototype.__init.call(this),jt.prototype.__init2.call(this),jt.prototype.__init3.call(this),jt.prototype.__init4.call(this),this._state=lr.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(r){this._reject(r)}}then(e,r){return new jt((n,i)=>{this._handlers.push([!1,s=>{if(e)try{n(e(s))}catch(o){i(o)}else n(s)},s=>{if(r)try{n(r(s))}catch(o){i(o)}else i(s)}]),this._executeHandlers()})}catch(e){return this.then(r=>r,e)}finally(e){return new jt((r,n)=>{let i,s;return this.then(o=>{s=!1,i=o,e&&e()},o=>{s=!0,i=o,e&&e()}).then(()=>{s?n(i):r(i)})})}__init(){this._resolve=e=>{this._setResult(lr.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(lr.REJECTED,e)}}__init3(){this._setResult=(e,r)=>{this._state===lr.PENDING&&(_l(r)?r.then(this._resolve,this._reject):(this._state=e,this._value=r,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===lr.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(r=>{r[0]||(this._state===lr.RESOLVED&&r[1](this._value),this._state===lr.REJECTED&&r[2](this._value),r[0]=!0)})}}}function BE(t){const e=gr(),r={sid:Nt(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(n){return Pt({sid:`${n.sid}`,init:n.init,started:new Date(1e3*n.started).toISOString(),timestamp:new Date(1e3*n.timestamp).toISOString(),status:n.status,errors:n.errors,did:typeof n.did=="number"||typeof n.did=="string"?`${n.did}`:void 0,duration:n.duration,abnormal_mechanism:n.abnormal_mechanism,attrs:{release:n.release,environment:n.environment,ip_address:n.ipAddress,user_agent:n.userAgent}})}(r)};return t&&Oi(r,t),r}function Oi(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||gr(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:Nt()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{const r=t.timestamp-t.started;t.duration=r>=0?r:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Sp(){return Nt()}function Lu(){return Nt().substring(16)}function bl(t,e,r=2){if(!e||typeof e!="object"||r<=0)return e;if(t&&e&&Object.keys(e).length===0)return t;const n={...t};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=bl(n[i],e[i],r-1));return n}const Ru="_sentrySpan";function Ep(t,e){e?An(t,Ru,e):delete t[Ru]}function Cp(t){return t[Ru]}class ph{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:Sp(),spanId:Lu()}}clone(){const e=new ph;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,Ep(e,Cp(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Oi(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,r){return this._tags={...this._tags,[e]:r},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,r){return this._extra={...this._extra,[e]:r},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,r){return r===null?delete this._contexts[e]:this._contexts[e]=r,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const r=typeof e=="function"?e(this):e,[n,i]=r instanceof Xr?[r.getScopeData(),r.getRequestSession()]:Ti(r)?[e,e.requestSession]:[],{tags:s,extra:o,user:a,contexts:l,level:u,fingerprint:d=[],propagationContext:f}=n||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...l},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),d.length&&(this._fingerprint=d),f&&(this._propagationContext=f),i&&(this._requestSession=i),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,Ep(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Sp()}),this._notifyScopeListeners(),this}addBreadcrumb(e,r){const n=typeof r=="number"?r:100;if(n<=0)return this;const i={timestamp:no(),...e};return this._breadcrumbs.push(i),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Cp(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=bl(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Lu(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,r){const n=r&&r.event_id?r.event_id:Nt();if(!this._client)return H.warn("No client configured on scope - will not capture exception!"),n;const i=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:i,...r,event_id:n},this),n}captureMessage(e,r,n){const i=n&&n.event_id?n.event_id:Nt();if(!this._client)return H.warn("No client configured on scope - will not capture message!"),i;const s=new Error(e);return this._client.captureMessage(e,r,{originalException:e,syntheticException:s,...n,event_id:i},this),i}captureEvent(e,r){const n=r&&r.event_id?r.event_id:Nt();return this._client?(this._client.captureEvent(e,{...r,event_id:n},this),n):(H.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}const Xr=ph;class zE{constructor(e,r){let n,i;n=e||new Xr,i=r||new Xr,this._stack=[{scope:n}],this._isolationScope=i}withScope(e){const r=this._pushScope();let n;try{n=e(r)}catch(i){throw this._popScope(),i}return _l(n)?n.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Ni(){const t=ch(yl());return t.stack=t.stack||new zE(Ra("defaultCurrentScope",()=>new Xr),Ra("defaultIsolationScope",()=>new Xr))}function VE(t){return Ni().withScope(t)}function qE(t,e){const r=Ni();return r.withScope(()=>(r.getStackTop().scope=t,e(t)))}function jp(t){return Ni().withScope(()=>t(Ni().getIsolationScope()))}function mh(t){const e=ch(t);return e.acs?e.acs:{withIsolationScope:jp,withScope:VE,withSetScope:qE,withSetIsolationScope:(r,n)=>jp(n),getCurrentScope:()=>Ni().getScope(),getIsolationScope:()=>Ni().getIsolationScope()}}function Bn(){return mh(yl()).getCurrentScope()}function io(){return mh(yl()).getIsolationScope()}function Ye(){return Bn().getClient()}function JE(t){const e=t.getPropagationContext(),{traceId:r,spanId:n,parentSpanId:i}=e;return Pt({trace_id:r,span_id:n,parent_span_id:i})}function WE(t){const e=t._sentryMetrics;if(!e)return;const r={};for(const[,[n,i]]of e)(r[n]||(r[n]=[])).push(Pt(i));return r}const HE=/^sentry-/;function GE(t){const e=function(n){if(!(!n||!fr(n)&&!Array.isArray(n)))return Array.isArray(n)?n.reduce((i,s)=>{const o=Tp(s);return Object.entries(o).forEach(([a,l])=>{i[a]=l}),i},{}):Tp(n)}(t);if(!e)return;const r=Object.entries(e).reduce((n,[i,s])=>(i.match(HE)&&(n[i.slice(7)]=s),n),{});return Object.keys(r).length>0?r:void 0}function Tp(t){return t.split(",").map(e=>e.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((e,[r,n])=>(r&&n&&(e[r]=n),e),{})}let Pp=!1;function YE(t){const{spanId:e,traceId:r,isRemote:n}=t.spanContext();return Pt({parent_span_id:n?e:gh(t).parent_span_id,span_id:n?Lu():e,trace_id:r})}function Op(t){return typeof t=="number"?Np(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Np(t.getTime()):gr()}function Np(t){return t>9999999999?t/1e3:t}function gh(t){if(function(e){return typeof e.getSpanJSON=="function"}(t))return t.getSpanJSON();try{const{spanId:e,traceId:r}=t.spanContext();if(function(n){const i=n;return!!(i.attributes&&i.startTime&&i.name&&i.endTime&&i.status)}(t)){const{attributes:n,startTime:i,name:s,endTime:o,parentSpanId:a,status:l}=t;return Pt({span_id:e,trace_id:r,data:n,description:s,parent_span_id:a,start_timestamp:Op(i),timestamp:Op(o)||void 0,status:KE(l),op:n["sentry.op"],origin:n["sentry.origin"],_metrics_summary:WE(t)})}return{span_id:e,trace_id:r}}catch{return{}}}function KE(t){if(t&&t.code!==0)return t.code===1?"ok":t.message||"unknown_error"}function a0(t){return t._sentryRootSpan||t}function QE(){Pp||(ro(()=>{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.")}),Pp=!0)}const vh="production";function l0(t,e){const r=e.getOptions(),{publicKey:n}=e.getDsn()||{},i=Pt({environment:r.environment||vh,release:r.release,public_key:n,trace_id:t});return e.emit("createDsc",i),i}function XE(t){const e=Ye();if(!e)return{};const r=a0(t),n=r._frozenDsc;if(n)return n;const i=r.spanContext().traceState,s=i&&i.get("sentry.dsc"),o=s&&GE(s);if(o)return o;const a=l0(t.spanContext().traceId,e),l=gh(r),u=l.data||{},d=u["sentry.sample_rate"];d!=null&&(a.sample_rate=`${d}`);const f=u["sentry.source"],_=l.description;return f!=="url"&&_&&(a.transaction=_),function(x){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const k=Ye(),v=k&&k.getOptions();return!!v&&(v.enableTracing||"tracesSampleRate"in v||"tracesSampler"in v)}()&&(a.sampled=String(function(x){const{traceFlags:k}=x.spanContext();return k===1}(r))),e.emit("createDsc",a,r),a}const ZE=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ua(t,e=!1){const{host:r,path:n,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=t;return`${a}://${l}${e&&i?`:${i}`:""}@${r}${s?`:${s}`:""}/${n&&`${n}/`}${o}`}function Ap(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function eC(t){const e=typeof t=="string"?function(r){const n=ZE.exec(r);if(!n)return void ro(()=>{console.error(`Invalid Sentry Dsn: ${r}`)});const[i,s,o="",a="",l="",u=""]=n.slice(1);let d="",f=u;const _=f.split("/");if(_.length>1&&(d=_.slice(0,-1).join("/"),f=_.pop()),f){const x=f.match(/^\d+/);x&&(f=x[0])}return Ap({host:a,pass:o,path:d,projectId:f,port:l,protocol:i,publicKey:s})}(t):Ap(t);
273if(e&&function(r){if(!Fn)return!0;const{port:n,projectId:i,protocol:s}=r;return!(["protocol","publicKey","host","projectId"].find(o=>!r[o]&&(H.error(`Invalid Sentry Dsn: ${o} missing`),!0))||(i.match(/^\d+$/)?function(o){return o==="http"||o==="https"}(s)?n&&isNaN(parseInt(n,10))&&(H.error(`Invalid Sentry Dsn: Invalid port ${n}`),1):(H.error(`Invalid Sentry Dsn: Invalid protocol ${s}`),1):(H.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),1)))}(e))return e}function cr(t,e=100,r=1/0){try{return Du("",t,e,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function c0(t,e=3,r=102400){const n=cr(t,e);return i=n,function(s){return~-encodeURI(s).split(/%..|./).length}(JSON.stringify(i))>r?c0(t,e-1,r):n;var i}function Du(t,e,r=1/0,n=1/0,i=function(){const s=typeof WeakSet=="function",o=s?new WeakSet:[];return[function(a){if(s)return!!o.has(a)||(o.add(a),!1);for(let l=0;l<o.length;l++)if(o[l]===a)return!0;return o.push(a),!1},function(a){if(s)o.delete(a);else for(let l=0;l<o.length;l++)if(o[l]===a){o.splice(l,1);break}}]}()){const[s,o]=i;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const a=function(x,k){try{if(x==="domain"&&k&&typeof k=="object"&&k._events)return"[Domain]";if(x==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&k===global)return"[Global]";if(typeof window<"u"&&k===window)return"[Window]";if(typeof document<"u"&&k===document)return"[Document]";if(r0(k))return"[VueViewModel]";if(Ti(v=k)&&"nativeEvent"in v&&"preventDefault"in v&&"stopPropagation"in v)return"[SyntheticEvent]";if(typeof k=="number"&&!Number.isFinite(k))return`[${k}]`;if(typeof k=="function")return`[Function: ${Qr(k)}]`;if(typeof k=="symbol")return`[${String(k)}]`;if(typeof k=="bigint")return`[BigInt: ${String(k)}]`;const b=function(g){const w=Object.getPrototypeOf(g);return w?w.constructor.name:"null prototype"}(k);return/^HTML(\w*)Element$/.test(b)?`[HTMLElement: ${b}]`:`[object ${b}]`}catch(b){return`**non-serializable** (${b})`}var v}(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;const l=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:r;if(l===0)return a.replace("object ","");if(s(e))return"[Circular ~]";const u=e;if(u&&typeof u.toJSON=="function")try{return Du("",u.toJSON(),l-1,n,i)}catch{}const d=Array.isArray(e)?[]:{};let f=0;const _=s0(e);for(const x in _){if(!Object.prototype.hasOwnProperty.call(_,x))continue;if(f>=n){d[x]="[MaxProperties ~]";break}const k=_[x];d[x]=Du(x,k,l-1,n,i),f++}return o(e),d}function Js(t,e=[]){return[t,e]}function tC(t,e){const[r,n]=t;return[r,[...n,e]]}function Ip(t,e){const r=t[1];for(const n of r)if(e(n,n[0].type))return!0;return!1}function $u(t){return ae.__SENTRY__&&ae.__SENTRY__.encodePolyfill?ae.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function rC(t){const[e,r]=t;let n=JSON.stringify(e);function i(s){typeof n=="string"?n=typeof s=="string"?n+s:[$u(n),s]:n.push(typeof s=="string"?$u(s):s)}for(const s of r){const[o,a]=s;if(i(`
274${JSON.stringify(o)}
275`),typeof a=="string"||a instanceof Uint8Array)i(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(cr(a))}i(l)}}return typeof n=="string"?n:function(s){const o=s.reduce((u,d)=>u+d.length,0),a=new Uint8Array(o);let l=0;for(const u of s)a.set(u,l),l+=u.length;return a}(n)}function nC(t){const e=typeof t.data=="string"?$u(t.data):t.data;return[Pt({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}const iC={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 Mp(t){return iC[t]}function u0(t){if(!t||!t.sdk)return;const{name:e,version:r}=t.sdk;return{name:e,version:r}}function sC(t,e,r,n){const i=u0(r),s=t.type&&t.type!=="replay_event"?t.type:"event";(function(a,l){l&&(a.sdk=a.sdk||{},a.sdk.name=a.sdk.name||l.name,a.sdk.version=a.sdk.version||l.version,a.sdk.integrations=[...a.sdk.integrations||[],...l.integrations||[]],a.sdk.packages=[...a.sdk.packages||[],...l.packages||[]])})(t,r&&r.sdk);const o=function(a,l,u,d){const f=a.sdkProcessingMetadata&&a.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:a.event_id,sent_at:new Date().toISOString(),...l&&{sdk:l},...!!u&&d&&{dsn:Ua(d)},...f&&{trace:Pt({...f})}}}(t,i,n,e);return delete t.sdkProcessingMetadata,Js(o,[[{type:s},t]])}function Uu(t,e,r,n=0){return new jt((i,s)=>{const o=t[n];if(e===null||typeof o!="function")i(e);else{const a=o({...e},r);ge&&o.id&&a===null&&H.log(`Event processor "${o.id}" dropped event`),_l(a)?a.then(l=>Uu(t,l,r,n+1).then(i)).then(null,s):Uu(t,a,r,n+1).then(i).then(null,s)}})}let Io,Lp,ac;function oC(t,e){const{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:s}=e;(function(o,a){const{extra:l,tags:u,user:d,contexts:f,level:_,transactionName:x}=a,k=Pt(l);k&&Object.keys(k).length&&(o.extra={...k,...o.extra});const v=Pt(u);v&&Object.keys(v).length&&(o.tags={...v,...o.tags});const b=Pt(d);b&&Object.keys(b).length&&(o.user={...b,...o.user});const g=Pt(f);g&&Object.keys(g).length&&(o.contexts={...g,...o.contexts}),_&&(o.level=_),x&&o.type!=="transaction"&&(o.transaction=x)})(t,e),n&&function(o,a){o.contexts={trace:YE(a),...o.contexts},o.sdkProcessingMetadata={dynamicSamplingContext:XE(a),...o.sdkProcessingMetadata};const l=a0(a),u=gh(l).description;u&&!o.transaction&&o.type==="transaction"&&(o.transaction=u)}(t,n),function(o,a){o.fingerprint=o.fingerprint?Array.isArray(o.fingerprint)?o.fingerprint:[o.fingerprint]:[],a&&(o.fingerprint=o.fingerprint.concat(a)),o.fingerprint&&!o.fingerprint.length&&delete o.fingerprint}(t,r),function(o,a){const l=[...o.breadcrumbs||[],...a];o.breadcrumbs=l.length?l:void 0}(t,i),function(o,a){o.sdkProcessingMetadata={...o.sdkProcessingMetadata,...a}}(t,s)}function Rp(t,e){const{extra:r,tags:n,user:i,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:_,transactionName:x,span:k}=e;Mo(t,"extra",r),Mo(t,"tags",n),Mo(t,"user",i),Mo(t,"contexts",s),t.sdkProcessingMetadata=bl(t.sdkProcessingMetadata,a,2),o&&(t.level=o),x&&(t.transactionName=x),k&&(t.span=k),l.length&&(t.breadcrumbs=[...t.breadcrumbs,...l]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),d.length&&(t.eventProcessors=[...t.eventProcessors,...d]),f.length&&(t.attachments=[...t.attachments,...f]),t.propagationContext={...t.propagationContext,..._}}function Mo(t,e,r){t[e]=bl(t[e],r,1)}function aC(t,e,r,n,i,s){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=t,l={...e,event_id:e.event_id||r.event_id||Nt(),timestamp:e.timestamp||no()},u=r.integrations||t.integrations.map(k=>k.name);(function(k,v){const{environment:b,release:g,dist:w,maxValueLength:y=250}=v;k.environment=k.environment||b||vh,!k.release&&g&&(k.release=g),!k.dist&&w&&(k.dist=w),k.message&&(k.message=vi(k.message,y));const E=k.exception&&k.exception.values&&k.exception.values[0];E&&E.value&&(E.value=vi(E.value,y));const j=k.request;j&&j.url&&(j.url=vi(j.url,y))})(l,t),function(k,v){v.length>0&&(k.sdk=k.sdk||{},k.sdk.integrations=[...k.sdk.integrations||[],...v])}(l,u),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&function(k,v){const b=function(g){const w=ae._sentryDebugIds;if(!w)return{};const y=Object.keys(w);
275return ac&&y.length===Lp||(Lp=y.length,ac=y.reduce((E,j)=>{Io||(Io={});const T=Io[j];if(T)E[T[0]]=T[1];else{const P=g(j);for(let D=P.length-1;D>=0;D--){const Q=P[D],A=Q&&Q.filename,G=w[j];if(A&&G){E[A]=G,Io[j]=[A,G];break}}}return E},{})),ac}(v);try{k.exception.values.forEach(g=>{g.stacktrace.frames.forEach(w=>{b&&w.filename&&(w.debug_id=b[w.filename])})})}catch{}}(l,t.stackParser);const d=function(k,v){if(!v)return k;const b=k?k.clone():new Xr;return b.update(v),b}(n,r.captureContext);r.mechanism&&Pi(l,r.mechanism);const f=i?i.getEventProcessors():[],_=Ra("globalScope",()=>new Xr).getScopeData();s&&Rp(_,s.getScopeData()),d&&Rp(_,d.getScopeData());const x=[...r.attachments||[],..._.attachments];return x.length&&(r.attachments=x),oC(l,_),Uu([...f,..._.eventProcessors],l,r).then(k=>(k&&function(v){const b={};try{v.exception.values.forEach(w=>{w.stacktrace.frames.forEach(y=>{y.debug_id&&(y.abs_path?b[y.abs_path]=y.debug_id:y.filename&&(b[y.filename]=y.debug_id),delete y.debug_id)})})}catch{}if(Object.keys(b).length===0)return;v.debug_meta=v.debug_meta||{},v.debug_meta.images=v.debug_meta.images||[];const g=v.debug_meta.images;Object.entries(b).forEach(([w,y])=>{g.push({type:"sourcemap",code_file:w,debug_id:y})})}(k),typeof o=="number"&&o>0?function(v,b,g){if(!v)return null;const w={...v,...v.breadcrumbs&&{breadcrumbs:v.breadcrumbs.map(y=>({...y,...y.data&&{data:cr(y.data,b,g)}}))},...v.user&&{user:cr(v.user,b,g)},...v.contexts&&{contexts:cr(v.contexts,b,g)},...v.extra&&{extra:cr(v.extra,b,g)}};return v.contexts&&v.contexts.trace&&w.contexts&&(w.contexts.trace=v.contexts.trace,v.contexts.trace.data&&(w.contexts.trace.data=cr(v.contexts.trace.data,b,g))),v.spans&&(w.spans=v.spans.map(y=>({...y,...y.data&&{data:cr(y.data,b,g)}}))),v.contexts&&v.contexts.flags&&w.contexts&&(w.contexts.flags=cr(v.contexts.flags,3,g)),w}(k,o,a):k))}function Dp(t,e){return Bn().captureEvent(t,e)}function $p(t){const e=Ye(),r=io(),n=Bn(),{release:i,environment:s=vh}=e&&e.getOptions()||{},{userAgent:o}=ae.navigator||{},a=BE({release:i,environment:s,user:n.getUser()||r.getUser(),...o&&{userAgent:o},...t}),l=r.getSession();return l&&l.status==="ok"&&Oi(l,{status:"exited"}),d0(),r.setSession(a),n.setSession(a),a}function d0(){const t=io(),e=Bn(),r=e.getSession()||t.getSession();r&&function(n,i){let s={};n.status==="ok"&&(s={status:"exited"}),Oi(n,s)}(r),h0(),t.setSession(),e.setSession()}function h0(){const t=io(),e=Bn(),r=Ye(),n=e.getSession()||t.getSession();n&&r&&r.captureSession(n)}function Up(t=!1){t?d0():h0()}function lC(t,e,r){return e||`${function(n){return`${function(i){const s=i.protocol?`${i.protocol}:`:"",o=i.port?`:${i.port}`:"";return`${s}//${i.host}${o}${i.path?`/${i.path}`:""}/api/`}(n)}${n.projectId}/envelope/`}(t)}?${function(n,i){const s={sentry_version:"7"};return n.publicKey&&(s.sentry_key=n.publicKey),i&&(s.sentry_client=`${i.name}/${i.version}`),new URLSearchParams(s).toString()}(t,r)}`}const Fp=[];function Bp(t,e){for(const r of e)r&&r.afterAllSetup&&r.afterAllSetup(t)}function zp(t,e,r){if(r[e.name])ge&&H.log(`Integration skipped because it was already installed: ${e.name}`);else{if(r[e.name]=e,Fp.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),Fp.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){const n=e.preprocessEvent.bind(e);t.on("preprocessEvent",(i,s)=>n(i,s,t))}if(typeof e.processEvent=="function"){const n=e.processEvent.bind(e),i=Object.assign((s,o)=>n(s,o,t),{id:e.name});t.addEventProcessor(i)}ge&&H.log(`Integration installed: ${e.name}`)}}class $t extends Error{constructor(e,r="warn"){super(e),this.message=e,this.logLevel=r}}const Vp="Not capturing exception because it's already been captured.";class cC{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=eC(e.dsn):ge&&H.warn("No DSN provided, client will not send events."),this._dsn){const n=lC(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}const r=["enableTracing","tracesSampleRate","tracesSampler"].find(n=>n in e&&e[n]==null);r&&ro(()=>{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(e,r,n){const i=Nt();if(kp(e))return ge&&H.log(Vp),i;const s={event_id:i,...r};return this._process(this.eventFromException(e,s).then(o=>
275this._captureEvent(o,s,n))),s.event_id}captureMessage(e,r,n,i){const s={event_id:Nt(),...n},o=dh(e)?e:String(e),a=Au(e)?this.eventFromMessage(o,r,s):this.eventFromException(e,s);return this._process(a.then(l=>this._captureEvent(l,s,i))),s.event_id}captureEvent(e,r,n){const i=Nt();if(r&&r.originalException&&kp(r.originalException))return ge&&H.log(Vp),i;const s={event_id:i,...r},o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,s,o||n)),s.event_id}captureSession(e){typeof e.release!="string"?ge&&H.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Oi(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const r=this._transport;return r?(this.emit("flush"),this._isClientDoneProcessing(e).then(n=>r.flush(e).then(i=>n&&i))):In(!0)}close(e){return this.flush(e).then(r=>(this.getOptions().enabled=!1,this.emit("close"),r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const r=this._integrations[e.name];zp(this,e,this._integrations),r||Bp(this,[e])}sendEvent(e,r={}){this.emit("beforeSendEvent",e,r);let n=sC(e,this._dsn,this._options._metadata,this._options.tunnel);for(const s of r.attachments||[])n=tC(n,nC(s));const i=this.sendEnvelope(n);i&&i.then(s=>this.emit("afterSendEvent",e,s),null)}sendSession(e){const r=function(n,i,s,o){const a=u0(s);return Js({sent_at:new Date().toISOString(),...a&&{sdk:a},...!!o&&i&&{dsn:Ua(i)}},["aggregates"in n?[{type:"sessions"},n]:[{type:"session"},n.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,r,n){if(this._options.sendClientReports){const i=typeof n=="number"?n:1,s=`${e}:${r}`;ge&&H.log(`Recording outcome: "${s}"${i>1?` (${i} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+i}}on(e,r){const n=this._hooks[e]=this._hooks[e]||[];return n.push(r),()=>{const i=n.indexOf(r);i>-1&&n.splice(i,1)}}emit(e,...r){const n=this._hooks[e];n&&n.forEach(i=>i(...r))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,r=>(ge&&H.error("Error while sending envelope:",r),r)):(ge&&H.error("Transport disabled"),In({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(r,n){const i={};return n.forEach(s=>{s&&zp(r,s,i)}),i}(this,e),Bp(this,e)}_updateSessionFromEvent(e,r){let n=r.level==="fatal",i=!1;const s=r.exception&&r.exception.values;if(s){i=!0;for(const a of s){const l=a.mechanism;if(l&&l.handled===!1){n=!0;break}}}const o=e.status==="ok";(o&&e.errors===0||o&&n)&&(Oi(e,{...n&&{status:"crashed"},errors:e.errors||Number(i||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new jt(r=>{let n=0;const i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),r(!0)):(n+=1,e&&n>=e&&(clearInterval(i),r(!1)))},1)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,r,n=Bn(),i=io()){const s=this.getOptions(),o=Object.keys(this._integrations);return!r.integrations&&o.length>0&&(r.integrations=o),this.emit("preprocessEvent",e,r),e.type||i.setLastEventId(e.event_id||r.event_id),aC(s,e,r,n,this,i).then(a=>{if(a===null)return a;a.contexts={trace:JE(n),...a.contexts};const l=function(u,d){const f=d.getPropagationContext();return f.dsc||l0(f.traceId,u)}(this,n);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(e,r={},n){return this._processEvent(e,r,n).then(i=>i.event_id,i=>{ge&&(i instanceof $t&&i.logLevel==="log"?H.log(i.message):H.warn(i))})}_processEvent(e,r,n){const i=this.getOptions(),{sampleRate:s}=i,o=Jp(e),a=qp(e),l=e.type||"error",u=`before send for type \`${l}\``,d=s===void 0?void 0:function(x){if(typeof x=="boolean")return Number(x);
275const k=typeof x=="string"?parseFloat(x):x;if(!(typeof k!="number"||isNaN(k)||k<0||k>1))return k;ge&&H.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(x)} of type ${JSON.stringify(typeof x)}.`)}(s);if(a&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",e),$a(new $t(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const f=l==="replay_event"?"replay":l,_=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,r,n,_).then(x=>{if(x===null)throw this.recordDroppedEvent("event_processor",f,e),new $t("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return x;const k=function(v,b,g,w){const{beforeSend:y,beforeSendTransaction:E,beforeSendSpan:j}=b;if(qp(g)&&y)return y(g,w);if(Jp(g)){if(g.spans&&j){const T=[];for(const P of g.spans){const D=j(P);D?T.push(D):(QE(),v.recordDroppedEvent("before_send","span"))}g.spans=T}if(E){if(g.spans){const T=g.spans.length;g.sdkProcessingMetadata={...g.sdkProcessingMetadata,spanCountBeforeProcessing:T}}return E(g,w)}}return g}(this,i,x,r);return function(v,b){const g=`${b} must return \`null\` or a valid event.`;if(_l(v))return v.then(w=>{if(!Ti(w)&&w!==null)throw new $t(g);return w},w=>{throw new $t(`${b} rejected with ${w}`)});if(!Ti(v)&&v!==null)throw new $t(g);return v}(k,u)}).then(x=>{if(x===null){if(this.recordDroppedEvent("before_send",f,e),o){const b=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw new $t(`${u} returned \`null\`, will not send event.`,"log")}const k=n&&n.getSession();if(!o&&k&&this._updateSessionFromEvent(k,x),o){const b=(x.sdkProcessingMetadata&&x.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(x.spans?x.spans.length:0);b>0&&this.recordDroppedEvent("before_send","span",b)}const v=x.transaction_info;if(o&&v&&x.transaction!==e.transaction){const b="custom";x.transaction_info={...v,source:b}}return this.sendEvent(x,r),x}).then(null,x=>{throw x instanceof $t?x:(this.captureException(x,{data:{__sentry__:!0},originalException:x}),new $t(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
276Reason: ${x}`))})}_process(e){this._numProcessing++,e.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([r,n])=>{const[i,s]=r.split(":");return{reason:i,category:s,quantity:n}})}_flushOutcomes(){ge&&H.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0)return void(ge&&H.log("No outcomes to send"));if(!this._dsn)return void(ge&&H.log("No dsn provided, will not send outcomes"));ge&&H.log("Sending outcomes:",e);const r=(n=e,Js((i=this._options.tunnel&&Ua(this._dsn))?{dsn:i}:{},[[{type:"client_report"},{timestamp:s||no(),discarded_events:n}]]));var n,i,s;this.sendEnvelope(r)}}function qp(t){return t.type===void 0}function Jp(t){return t.type==="transaction"}function uC(t){const e=[];function r(n){return e.splice(e.indexOf(n),1)[0]||Promise.resolve(void 0)}return{$:e,add:function(n){if(!(t===void 0||e.length<t))return $a(new $t("Not adding Promise because buffer limit was reached."));const i=n();return e.indexOf(i)===-1&&e.push(i),i.then(()=>r(i)).then(null,()=>r(i).then(null,()=>{})),i},drain:function(n){return new jt((i,s)=>{let o=e.length;if(!o)return i(!0);const a=setTimeout(()=>{n&&n>0&&i(!1)},n);e.forEach(l=>{In(l).then(()=>{--o||(clearTimeout(a),i(!0))},s)})})}}}function dC(t,{statusCode:e,headers:r},n=Date.now()){const i={...t},s=r&&r["x-sentry-rate-limits"],o=r&&r["retry-after"];if(s)for(const a of s.trim().split(",")){const[l,u,,,d]=a.split(":",5),f=parseInt(l,10),_=1e3*(isNaN(f)?60:f);if(u)for(const x of u.split(";"))x==="metric_bucket"&&d&&!d.split(";").includes("custom")||(i[x]=n+_);else i.all=n+_}else o?i.all=n+function(a,l=Date.now()){const u=parseInt(`${a}`,10);if(!isNaN(u))return 1e3*u;const d=Date.parse(`${a}`);return isNaN(d)?6e4:d-l}(o,n):e===429&&(i.all=n+6e4);return i}function hC(t,e,r=uC(t.bufferSize||64)){let n={};return{send:function(i){const s=[];if(Ip(i,(l,u)=>{const d=Mp(u);if(function(f,_,x=Date.now()){return function(k,v){return k[v]||k.all||0}(f,_)>x}(n,d)){const f=Wp(l,u);t.recordDroppedEvent("ratelimit_backoff",d,f)}else s.push(l)}),s.length===0)return In({});const o=Js(i[0],s),a=l=>{Ip(o,(u,d)=>{const f=Wp(u,d);t.recordDroppedEvent(l,Mp(d),f)})};return r.add(()=>e({body:rC(o)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&ge&&H.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),n=dC(n,l),l),l=>{throw a("network_error"),l})).then(l=>l,l=>{if(l instanceof $t)return ge&&H.error("Skipped sending event because buffer is full."),a("queue_overflow"),In({});throw l})},flush:i=>r.drain(i)}}function Wp(t,e){if(e==="event"||e==="transaction")return Array.isArray(t)?t[1]:void 0}const fC=100;function an(t,e){const r=Ye(),n=io();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=fC}=r.getOptions();if(s<=0)return;const o={timestamp:no(),...t},a=i?ro(()=>i(o,e)):o;a!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",a,e),n.addBreadcrumb(a,s))}let Hp;const Gp=new WeakMap,pC=()=>({name:"FunctionToString",setupOnce(){Hp=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=fh(this),r=Gp.has(Ye())&&e!==void 0?e:this;return Hp.apply(r,t)}}catch{}},setup(t){Gp.set(t,!0)}}),mC=[/^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+$/],gC=(t={})=>({name:"InboundFilters",processEvent(e,r,n){const i=n.getOptions(),s=function(o={},a={}){return{allowUrls:[...o.allowUrls||[],...a.allowUrls||[]],denyUrls:[...o.denyUrls||[],...a.denyUrls||[]],ignoreErrors:[...o.ignoreErrors||[],...a.ignoreErrors||[],...o.disableErrorDefaults?[]:mC],ignoreTransactions:[...o.ignoreTransactions||[],...a.ignoreTransactions||[]],ignoreInternal:o.ignoreInternal===void 0||o.ignoreInternal}}(t,i);return function(o,a){return a.ignoreInternal&&function(l){try{return l.exception.values[0].type==="SentryError"}catch{}return!1}(o)?(ge&&H.warn(`Event dropped due to being internal Sentry Error.
277Event: ${Or(o)}`),!0):function(l,u){return l.type||!u||!u.length?!1:function(d){const f=[];
277d.message&&f.push(d.message);let _;try{_=d.exception.values[d.exception.values.length-1]}catch{}return _&&_.value&&(f.push(_.value),_.type&&f.push(`${_.type}: ${_.value}`)),f}(l).some(d=>Ao(d,u))}(o,a.ignoreErrors)?(ge&&H.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
278Event: ${Or(o)}`),!0):function(l){return l.type||!l.exception||!l.exception.values||l.exception.values.length===0?!1:!l.message&&!l.exception.values.some(u=>u.stacktrace||u.type&&u.type!=="Error"||u.value)}(o)?(ge&&H.warn(`Event dropped due to not having an error message, error type or stacktrace.
279Event: ${Or(o)}`),!0):function(l,u){if(l.type!=="transaction"||!u||!u.length)return!1;const d=l.transaction;return!!d&&Ao(d,u)}(o,a.ignoreTransactions)?(ge&&H.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
280Event: ${Or(o)}`),!0):function(l,u){if(!u||!u.length)return!1;const d=Lo(l);return!!d&&Ao(d,u)}(o,a.denyUrls)?(ge&&H.warn(`Event dropped due to being matched by \`denyUrls\` option.
281Event: ${Or(o)}.
282Url: ${Lo(o)}`),!0):function(l,u){if(!u||!u.length)return!0;const d=Lo(l);return!d||Ao(d,u)}(o,a.allowUrls)?!1:(ge&&H.warn(`Event dropped due to not being matched by \`allowUrls\` option.
283Event: ${Or(o)}.
284Url: ${Lo(o)}`),!0)}(e,s)?null:e}});function Lo(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?function(r=[]){for(let n=r.length-1;n>=0;n--){const i=r[n];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null}(e):null}catch{return ge&&H.error(`Cannot extract url for event ${Or(t)}`),null}}function vC(t,e,r=250,n,i,s,o){if(!(s.exception&&s.exception.values&&o&&Nn(o.originalException,Error)))return;const a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;var l,u;a&&(s.exception.values=(l=Fu(t,e,i,o.originalException,n,s.exception.values,a,0),u=r,l.map(d=>(d.value&&(d.value=vi(d.value,u)),d))))}function Fu(t,e,r,n,i,s,o,a){if(s.length>=r+1)return s;let l=[...s];if(Nn(n[i],Error)){Yp(o,a);const u=t(e,n[i]),d=l.length;Kp(u,i,d,a),l=Fu(t,e,r,n[i],i,[u,...l],u,d)}return Array.isArray(n.errors)&&n.errors.forEach((u,d)=>{if(Nn(u,Error)){Yp(o,a);const f=t(e,u),_=l.length;Kp(f,`errors[${d}]`,_,a),l=Fu(t,e,r,u,i,[f,...l],f,_)}}),l}function Yp(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function Kp(t,e,r,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:r,parent_id:n}}function lc(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const r=e[6]||"",n=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:r,hash:n,relative:e[5]+r+n}}function yC(){"console"in ae&&Nu.forEach(function(t){t in ae.console&&vt(ae.console,t,function(e){return Da[t]=e,function(...r){Jt("console",{args:r,level:t});const n=Da[t];n&&n.apply(ae.console,r)}})})}function wC(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const _C=()=>{let t;return{name:"Dedupe",processEvent(e){if(e.type)return e;try{if(function(r,n){return n?!!(function(i,s){const o=i.message,a=s.message;return!(!o&&!a||o&&!a||!o&&a||o!==a||!Xp(i,s)||!Qp(i,s))}(r,n)||function(i,s){const o=Zp(s),a=Zp(i);return!(!o||!a||o.type!==a.type||o.value!==a.value||!Xp(i,s)||!Qp(i,s))}(r,n)):!1}(e,t))return ge&&H.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}};function Qp(t,e){let r=vp(t),n=vp(e);if(!r&&!n)return!0;if(r&&!n||!r&&n||n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const s=n[i],o=r[i];if(s.filename!==o.filename||s.lineno!==o.lineno||s.colno!==o.colno||s.function!==o.function)return!1}return!0}function Xp(t,e){let r=t.fingerprint,n=e.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;try{return r.join("")===n.join("")}catch{return!1}}function Zp(t){return t.exception&&t.exception.values&&t.exception.values[0]}function em(t){return t===void 0?void 0:t>=400&&t<500?"warning":t>=500?"error":void 0}const cc=ae;function Bu(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function bC(){if(typeof EdgeRuntime=="string")return!0;
284if(!function(){if(!("fetch"in cc))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}())return!1;if(Bu(cc.fetch))return!0;let t=!1;const e=cc.document;if(e&&typeof e.createElement=="function")try{const r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=Bu(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){Fn&&H.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}function xC(t,e){const r="fetch";bn(r,t),xn(r,()=>function(n,i=!1){i&&!bC()||vt(ae,"fetch",function(s){return function(...o){const a=new Error,{method:l,url:u}=function(f){if(f.length===0)return{method:"GET",url:""};if(f.length===2){const[x,k]=f;return{url:tm(x),method:zu(k,"method")?String(k.method).toUpperCase():"GET"}}const _=f[0];return{url:tm(_),method:zu(_,"method")?String(_.method).toUpperCase():"GET"}}(o),d={args:o,fetchData:{method:l,url:u},startTimestamp:1e3*gr(),virtualError:a};return n||Jt("fetch",{...d}),s.apply(ae,o).then(async f=>(n?n(f):Jt("fetch",{...d,endTimestamp:1e3*gr(),response:f}),f),f=>{throw Jt("fetch",{...d,endTimestamp:1e3*gr(),error:f}),uh(f)&&f.stack===void 0&&(f.stack=a.stack,An(f,"framesToPop",1)),f})}})}(void 0,e))}function zu(t,e){return!!t&&typeof t=="object"&&!!t[e]}function tm(t){return typeof t=="string"?t:t?zu(t,"url")?t.url:t.toString?t.toString():"":""}const Ro=ae,Fe=ae;let Vu=0;function rm(){return Vu>0}function Ai(t,e={}){if(!function(n){return typeof n=="function"}(t))return t;try{const n=t.__sentry_wrapped__;if(n)return typeof n=="function"?n:t;if(fh(t))return t}catch{return t}const r=function(...n){try{const i=n.map(s=>Ai(s,e));return t.apply(this,i)}catch(i){throw Vu++,setTimeout(()=>{Vu--}),function(...s){const o=mh(yl());if(s.length===2){const[a,l]=s;return a?o.withSetScope(a,l):o.withScope(l)}o.withScope(s[0])}(s=>{var o;s.addEventProcessor(a=>(e.mechanism&&(Mu(a,void 0),Pi(a,e.mechanism)),a.extra={...a.extra,arguments:n},a)),o=i,Bn().captureException(o,void 0)}),i}};try{for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}catch{}i0(r,t),An(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>t.name})}catch{}return r}const xl=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function yh(t,e){const r=wh(t,e),n={type:EC(e),value:CC(e)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function kC(t,e,r,n){const i=Ye(),s=i&&i.getOptions().normalizeDepth,o=function(u){for(const d in u)if(Object.prototype.hasOwnProperty.call(u,d)){const f=u[d];if(f instanceof Error)return f}}(e),a={__serialized__:c0(e,s)};if(o)return{exception:{values:[yh(t,o)]},extra:a};const l={exception:{values:[{type:wl(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:jC(e,{isUnhandledRejection:n})}]},extra:a};if(r){const u=wh(t,r);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function uc(t,e){return{exception:{values:[yh(t,e)]}}}function wh(t,e){const r=e.stacktrace||e.stack||"",n=function(s){return s&&SC.test(s.message)?1:0}(e),i=function(s){return typeof s.framesToPop=="number"?s.framesToPop:0}(e);try{return t(r,n,i)}catch{}return[]}const SC=/Minified React error #\d+;/i;function f0(t){return typeof WebAssembly<"u"&&WebAssembly.Exception!==void 0&&t instanceof WebAssembly.Exception}function EC(t){const e=t&&t.name;return!e&&f0(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function CC(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:f0(t)&&Array.isArray(t.message)&&t.message.length==2?t.message[1]:e:"No error message"}function qu(t,e,r,n,i){let s;if(t0(e)&&e.error)return uc(t,e.error);if(wp(e)||Ui(e,"DOMException")){const o=e;if("stack"in e)s=uc(t,e);else{const a=o.name||(wp(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;s=Ju(t,l,r,n),Mu(s,l)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return uh(e)?uc(t,e):Ti(e)||wl(e)?(s=kC(t,e,r,i),Pi(s,{synthetic:!0}),s):(s=Ju(t,e,r,n),Mu(s,`${e}`),Pi(s,{synthetic:!0}),s)}function Ju(t,e,r,n){const i={};if(n&&r){const s=wh(t,r);s.length&&(i.exception={values:[{value:e,stacktrace:{frames:s}}]}),Pi(i,{synthetic:!0})}
284if(dh(e)){const{__sentry_template_string__:s,__sentry_template_values__:o}=e;return i.logentry={message:s,params:o},i}return i.message=e,i}function jC(t,{isUnhandledRejection:e}){const r=function(i,s=40){const o=Object.keys(s0(i));o.sort();const a=o[0];if(!a)return"[object has no keys]";if(a.length>=s)return vi(a,s);for(let l=o.length;l>0;l--){const u=o.slice(0,l).join(", ");if(!(u.length>s))return l===o.length?u:vi(u,s)}return""}(t),n=e?"promise rejection":"exception";return t0(t)?`Event \`ErrorEvent\` captured as ${n} with message \`${t.message}\``:wl(t)?`Event \`${function(i){try{const s=Object.getPrototypeOf(i);return s?s.constructor.name:void 0}catch{}}(t)}\` (type=${t.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}class TC extends cC{constructor(e){const r={parentSpanIsAlwaysRootSpan:!0,...e};(function(n,i,s=[i],o="npm"){const a=n._metadata||{};a.sdk||(a.sdk={name:`sentry.javascript.${i}`,packages:s.map(l=>({name:`${o}:@sentry/${l}`,version:_n})),version:_n}),n._metadata=a})(r,"browser",["browser"],Fe.SENTRY_SDK_SOURCE||"npm"),super(r),r.sendClientReports&&Fe.document&&Fe.document.addEventListener("visibilitychange",()=>{Fe.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,r){return function(n,i,s,o){const a=qu(n,i,s&&s.syntheticException||void 0,o);return Pi(a),a.level="error",s&&s.event_id&&(a.event_id=s.event_id),In(a)}(this._options.stackParser,e,r,this._options.attachStacktrace)}eventFromMessage(e,r="info",n){return function(i,s,o="info",a,l){const u=Ju(i,s,a&&a.syntheticException||void 0,l);return u.level=o,a&&a.event_id&&(u.event_id=a.event_id),In(u)}(this._options.stackParser,e,r,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(xl&&H.warn("SDK not enabled, will not capture user feedback."));const r=function(n,{metadata:i,tunnel:s,dsn:o}){const a={event_id:n.event_id,sent_at:new Date().toISOString(),...i&&i.sdk&&{sdk:{name:i.sdk.name,version:i.sdk.version}},...!!s&&!!o&&{dsn:Ua(o)}};return Js(a,[function(u){return[{type:"user_report"},u]}(n)])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(r)}_prepareEvent(e,r,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,r,n)}}const PC=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,rt=ae;let nm,dc,hc,Do;function OC(){if(!rt.document)return;const t=Jt.bind(null,"dom"),e=im(t,!0);rt.document.addEventListener("click",e,!1),rt.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(r=>{const n=rt[r],i=n&&n.prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&(vt(i,"addEventListener",function(s){return function(o,a,l){if(o==="click"||o=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=u[o]=u[o]||{refCount:0};if(!d.handler){const f=im(t);d.handler=f,s.call(this,o,f,l)}d.refCount++}catch{}return s.call(this,o,a,l)}}),vt(i,"removeEventListener",function(s){return function(o,a,l){if(o==="click"||o=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},d=u[o];d&&(d.refCount--,d.refCount<=0&&(s.call(this,o,d.handler,l),d.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,o,a,l)}}))})}function im(t,e=!1){return r=>{if(!r||r._sentryCaptured)return;const n=function(s){try{return s.target}catch{return null}}(r);if(function(s,o){return s==="keypress"&&(!o||!o.tagName||o.tagName!=="INPUT"&&o.tagName!=="TEXTAREA"&&!o.isContentEditable)}(r.type,n))return;An(r,"_sentryCaptured",!0),n&&!n._sentryId&&An(n,"_sentryId",Nt());const i=r.type==="keypress"?"input":r.type;(function(s){if(s.type!==dc)return!1;try{if(!s.target||s.target._sentryId!==hc)return!1}catch{}return!0})(r)||(t({event:r,name:i,global:e}),dc=r.type,hc=n?n._sentryId:void 0),clearTimeout(nm),nm=rt.setTimeout(()=>{hc=void 0,dc=void 0},1e3)}}function p0(t){const e="history";bn(e,t),xn(e,NC)}function NC(){if(!function(){const r=Ro.chrome,n=r&&r.app&&r.app.runtime,i="history"in Ro&&!!Ro.history.pushState&&!!Ro.history.replaceState;return!n&&i}())return;const t=rt.onpopstate;function e(r){return function(...n){const i=n.length>2?n[2]:void 0;if(i){const s=Do,o=String(i);Do=o,Jt("history",{from:s,to:o})}return r.apply(this,n)}}rt.onpopstate=function(...r){const n=rt.location.href,i=Do;if(Do=n,Jt("history",{from:i,to:n}),t)try{return t.apply(this,r)}catch{}},vt(rt.history,"pushState",e),vt(rt.history,"replaceState",e)}const ta={};function sm(t){ta[t]=void 0}const os="__sentry_xhr_v3__";function AC(){if(!rt.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,r,n){const i=new Error,s=1e3*gr(),o=fr(n[0])?n[0].toUpperCase():void 0,a=function(u){if(fr(u))return u;try{return u.toString()}catch{}}(n[1]);if(!o||!a)return e.apply(r,n);r[os]={method:o,url:a,request_headers:{}}
284,o==="POST"&&a.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const l=()=>{const u=r[os];if(u&&r.readyState===4){try{u.status_code=r.status}catch{}Jt("xhr",{endTimestamp:1e3*gr(),startTimestamp:s,xhr:r,virtualError:i})}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply:(u,d,f)=>(l(),u.apply(d,f))}):r.addEventListener("readystatechange",l),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(u,d,f){const[_,x]=f,k=d[os];return k&&fr(_)&&fr(x)&&(k.request_headers[_.toLowerCase()]=x),u.apply(d,f)}}),e.apply(r,n)}}),t.send=new Proxy(t.send,{apply(e,r,n){const i=r[os];return i?(n[0]!==void 0&&(i.body=n[0]),Jt("xhr",{startTimestamp:1e3*gr(),xhr:r}),e.apply(r,n)):e.apply(r,n)}})}function IC(t,e=function(r){const n=ta[r];if(n)return n;let i=rt[r];if(Bu(i))return ta[r]=i.bind(rt);const s=rt.document;if(s&&typeof s.createElement=="function")try{const o=s.createElement("iframe");o.hidden=!0,s.head.appendChild(o);const a=o.contentWindow;a&&a[r]&&(i=a[r]),s.head.removeChild(o)}catch(o){PC&&H.warn(`Could not create sandbox iframe for ${r} check, bailing to window.${r}: `,o)}return i&&(ta[r]=i.bind(rt))}("fetch")){let r=0,n=0;return hC(t,function(i){const s=i.body.length;r+=s,n++;const o={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:r<=6e4&&n<15,...t.fetchOptions};if(!e)return sm("fetch"),$a("No fetch implementation available");try{return e(t.url,o).then(a=>(r-=s,n--,{statusCode:a.status,headers:{"x-sentry-rate-limits":a.headers.get("X-Sentry-Rate-Limits"),"retry-after":a.headers.get("Retry-After")}}))}catch(a){return sm("fetch"),r-=s,n--,$a(a)}})}function fc(t,e,r,n){const i={filename:t,function:e==="<anonymous>"?vn:e,in_app:!0};return r!==void 0&&(i.lineno=r),n!==void 0&&(i.colno=n),i}const MC=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,LC=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,RC=/\((\S*)(?::(\d+))(?::(\d+))\)/,DC=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,$C=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,UC=function(...t){const e=t.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,i=0)=>{const s=[],o=r.split(`
285`);for(let a=n;a<o.length;a++){const l=o[a];if(l.length>1024)continue;const u=pp.test(l)?l.replace(pp,"$1"):l;if(!u.match(/\S*Error: /)){for(const d of e){const f=d(u);if(f){s.push(f);break}}if(s.length>=50+i)break}}return function(a){if(!a.length)return[];const l=Array.from(a);return/sentryWrapped/.test(No(l).function||"")&&l.pop(),l.reverse(),mp.test(No(l).function||"")&&(l.pop(),mp.test(No(l).function||"")&&l.pop()),l.slice(0,50).map(u=>({...u,filename:u.filename||No(l).filename,function:u.function||vn}))}(s.slice(i))}}([30,t=>{const e=MC.exec(t);if(e){const[,n,i,s]=e;return fc(n,vn,+i,+s)}const r=LC.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){const s=RC.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}const[n,i]=om(r[1]||vn,r[2]);return fc(i,n,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,t=>{const e=DC.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const i=$C.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],n=e[1]||vn;return[n,r]=om(n,r),fc(r,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}]),om=(t,e)=>{const r=t.indexOf("safari-extension")!==-1,n=t.indexOf("safari-web-extension")!==-1;return r||n?[t.indexOf("@")!==-1?t.split("@")[0]:vn,r?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},am=1024,FC=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:"Breadcrumbs",setup(r){var n;e.console&&function(i){const s="console";bn(s,i),xn(s,yC)}(function(i){return function(s){if(Ye()!==i)return;const o={category:"console",data:{arguments:s.args,logger:"console"},level:wC(s.level),message:_p(s.args," ")};if(s.level==="assert"){if(s.args[0]!==!1)return;o.message=`Assertion failed: ${_p(s.args.slice(1)," ")||"console.assert"}`,o.data.arguments=s.args.slice(1)}an(o,{input:s.args,level:s.level})}}
285(r)),e.dom&&(n=function(i,s){return function(o){if(Ye()!==i)return;let a,l,u=typeof s=="object"?s.serializeAttribute:void 0,d=typeof s=="object"&&typeof s.maxStringLength=="number"?s.maxStringLength:void 0;d&&d>am&&(xl&&H.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${d} was configured. Sentry will use 1024 instead.`),d=am),typeof u=="string"&&(u=[u]);try{const _=o.event,x=function(k){return!!k&&!!k.target}(_)?_.target:_;a=n0(x,{keyAttrs:u,maxStringLength:d}),l=function(k){if(!hh.HTMLElement)return null;let v=k;for(let b=0;b<5;b++){if(!v)return null;if(v instanceof HTMLElement){if(v.dataset.sentryComponent)return v.dataset.sentryComponent;if(v.dataset.sentryElement)return v.dataset.sentryElement}v=v.parentNode}return null}(x)}catch{a="<unknown>"}if(a.length===0)return;const f={category:`ui.${o.name}`,message:a};l&&(f.data={"ui.component_name":l}),an(f,{event:o.event,name:o.name,global:o.global})}}(r,e.dom),bn("dom",n),xn("dom",OC)),e.xhr&&function(i){bn("xhr",i),xn("xhr",AC)}(function(i){return function(s){if(Ye()!==i)return;const{startTimestamp:o,endTimestamp:a}=s,l=s.xhr[os];if(!o||!a||!l)return;const{method:u,url:d,status_code:f,body:_}=l,x={method:u,url:d,status_code:f},k={xhr:s.xhr,input:_,startTimestamp:o,endTimestamp:a};an({category:"xhr",data:x,type:"http",level:em(f)},k)}}(r)),e.fetch&&xC(function(i){return function(s){if(Ye()!==i)return;const{startTimestamp:o,endTimestamp:a}=s;if(a&&(!s.fetchData.url.match(/sentry_key/)||s.fetchData.method!=="POST"))if(s.error)an({category:"fetch",data:s.fetchData,level:"error",type:"http"},{data:s.error,input:s.args,startTimestamp:o,endTimestamp:a});else{const l=s.response,u={...s.fetchData,status_code:l&&l.status},d={input:s.args,response:l,startTimestamp:o,endTimestamp:a};an({category:"fetch",data:u,type:"http",level:em(u.status_code)},d)}}}(r)),e.history&&p0(function(i){return function(s){if(Ye()!==i)return;let o=s.from,a=s.to;const l=lc(Fe.location.href);let u=o?lc(o):void 0;const d=lc(a);u&&u.path||(u=l),l.protocol===d.protocol&&l.host===d.host&&(a=d.relative),l.protocol===u.protocol&&l.host===u.host&&(o=u.relative),an({category:"navigation",data:{from:o,to:a}})}}(r)),e.sentry&&r.on("beforeSendEvent",function(i){return function(s){Ye()===i&&an({category:"sentry."+(s.type==="transaction"?"transaction":"event"),event_id:s.event_id,level:s.level,message:Or(s)},{event:s})}}(r))}}},BC=["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"],zC=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:"BrowserApiErrors",setupOnce(){e.setTimeout&&vt(Fe,"setTimeout",lm),e.setInterval&&vt(Fe,"setInterval",lm),e.requestAnimationFrame&&vt(Fe,"requestAnimationFrame",VC),e.XMLHttpRequest&&"XMLHttpRequest"in Fe&&vt(XMLHttpRequest.prototype,"send",qC);const r=e.eventTarget;r&&(Array.isArray(r)?r:BC).forEach(JC)}}};function lm(t){return function(...e){const r=e[0];return e[0]=Ai(r,{mechanism:{data:{function:Qr(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function VC(t){return function(e){return t.apply(this,[Ai(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Qr(t)},handled:!1,type:"instrument"}})])}}function qC(t){return function(...e){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(n=>{n in r&&typeof r[n]=="function"&&vt(r,n,function(i){const s={mechanism:{data:{function:n,handler:Qr(i)},handled:!1,type:"instrument"}},o=fh(i);return o&&(s.mechanism.data.handler=Qr(o)),Ai(i,s)})}),t.apply(this,e)}}function JC(t){const e=Fe[t],r=e&&e.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(vt(r,"addEventListener",function(n){return function(i,s,o){try{typeof s.handleEvent=="function"&&(s.handleEvent=Ai(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Qr(s),target:t},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[i,Ai(s,{mechanism:{data:{function:"addEventListener",handler:Qr(s),target:t},handled:!1,type:"instrument"}}),o])}}),vt(r,"removeEventListener",function(n){return function(i,s,o){try{const a=s.__sentry_wrapped__;a&&n.call(this,i,a,o)}catch{}return n.call(this,i,s,o)}}))}const WC=()=>({name:"BrowserSession",setupOnce(){Fe.document!==void 0?($p({ignoreDuration:!0}),Up(),p0(({from:t,to:e})=>{t!==void 0&&t!==e&&($p({ignoreDuration:!0}),Up())})):xl&&H.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),HC=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(r){e.onerror&&(function(n){(function(i){const s="error";bn(s,i),xn(s,DE)})(i=>{const{stackParser:s,attachStacktrace:o}=um();if(Ye()!==n||rm())return;const{msg:a,url:l,line:u,column:d,error:f}=i,_=function(x,k,v,b){const g=x.exception=x.exception||{},w=g.values=g.values||[],y=w[0]=w[0]||{},E=y.stacktrace=y.stacktrace||{},j=E.frames=E.frames||[],T=b,P=v,D=fr(k)&&k.length>0?k:function(){try{return hh.document.location.href}catch{return""}}();return j.length===0&&j.push({colno:T,filename:D,function:vn,in_app:!0,lineno:P}),x}(qu(s,f||a,void 0,o,!1),l,u,d);_.level="error",Dp(_,{originalException:f,mechanism:{handled:!1,type:"onerror"}})})}(r),cm("onerror")),e.onunhandledrejection&&(function(n){(function(i){const s="unhandledrejection";bn(s,i),xn(s,$E)})(i=>{const{stackParser:s,attachStacktrace:o}=um();if(Ye()!==n||rm())return;const a=function(u){if(Au(u))return u;try{if("reason"in u)return u.reason;if("detail"in u&&"reason"in u.detail)return u.detail.reason}catch{}return u}(i),l=Au(a)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(a)}`}]}}:qu(s,a,void 0,o,!0);l.level="error",Dp(l,{originalException:a,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(r),cm("onunhandledrejection"))}}};function cm(t){xl&&H.log(`Global Handler attached: ${t}`)}function um(){const t=Ye();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const GC=()=>({name:"HttpContext",preprocessEvent(t){if(!Fe.navigator&&!Fe.location&&!Fe.document)return;const e=t.request&&t.request.url||Fe.location&&Fe.location.href,{referrer:r}=Fe.document||{},{userAgent:n}
vendor: 2,293 bytes, line 285
285=Fe.navigator||{},i={...t.request&&t.request.headers,...r&&{Referer:r},...n&&{"User-Agent":n}},s={...t.request,...e&&{url:e},headers:i};t.request=s}}),YC=(t={})=>{const e=t.limit||5,r=t.key||"cause";return{name:"LinkedErrors",preprocessEvent(n,i,s){const o=s.getOptions();vC(yh,o.stackParser,o.maxValueLength,r,e,n,i)}}};var Wu="new",dm="loading",hm="loaded",Fa="joining-meeting",Mr="joined-meeting",Cr="left-meeting",sr="error",KC="blocked",QC="off",XC="sendable",ZC="loading",ej="interrupted",m0="playable",ra="unknown",g0="full",tj="lobby",rj="none",v0="base",nj="*",ij="ejected",sj="nbf-room",oj="nbf-token",aj="exp-room",lj="exp-token",Hu="no-room",cj="meeting-full",y0="end-of-life",uj="not-allowed",w0="connection-error",dj="cam-in-use",hj="mic-in-use",fj="cam-mic-in-use",pj="permissions",mj="undefined-mediadevices",gj="not-found",vj="constraints",yj="unknown",_0="iframe-ready-for-launch-config",b0="iframe-launch-config",x0="theme-updated",k0="loading",S0="load-attempt-failed",Gu="loaded",E0="started-camera",C0="camera-error",j0="joining-meeting",T0="joined-meeting",P0="left-meeting",O0="participant-joined",N0="participant-updated",A0="participant-left",I0="participant-counts-updated",M0="access-state-updated",L0="meeting-session-summary-updated",R0="meeting-session-state-updated",wj="meeting-session-data-error",D0="waiting-participant-added",$0="waiting-participant-updated",U0="waiting-participant-removed",F0="track-started",B0="track-stopped",z0="transcription-started",V0="transcription-stopped",q0="transcription-error",Yu="recording-started",Ku="recording-stopped",J0="recording-stats",W0="recording-error",H0="recording-upload-completed",G0="recording-data",Y0="app-message",K0="transcription-message",Q0="remote-media-player-started",X0="remote-media-player-updated",Z0="remote-media-player-stopped",ew="local-screen-share-started",tw="local-screen-share-stopped",rw="local-screen-share-canceled",nw="active-speaker-change",iw="active-speaker-mode-change",sw="network-quality-change",ow="network-connection",aw="cpu-load-change",lw="face-counts-updated",as="fullscreen",ls="exited-fullscreen",cw="live-streaming-started",uw="live-streaming-updated",dw="live-streaming-stopped",hw="live-streaming-error",fw="lang-updated",pw="receive-settings-updated",Qu="input-sett
285ings-updated",Xu="nonfatal-error",Zu="error",pc=4096,fm=102400,mc="iframe-call-message",pm="local-screen-start",mm="daily-method-update-live-streaming-endpoints",$o="transmit-log",pr="daily-custom-track",na={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},mw={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},ed={PLAY:"play",PAUSE:"pause"},gc=["jpg","png","jpeg"],_j="add-endpoints",bj="remove-endpoints",gm="sip-call-transfer";function Mt(){return!ie()&&typeof window<"u"&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function ie(){return typeof navigator<"u"&&navigator.product&&navigator.product==="ReactNative"}function gw(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function xj(){return!!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)&&(function(t,e){if(!t||!e)return!0;switch(t){case"Chrome":return e.major>=75;case"Safari":return RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection")&&!(e.major===13&&e.minor===0&&e.point===0);case"Firefox":return e.major>=67}return!0}(Mn(),Ba())||ie())}function vm(){if(ie()||!document)return!1;var t=document.createElement("iframe");return!!t.requestFullscreen||!!t.webkitRequestFullscreen}var td="none",kj="software",Sj="hardware",Ej=function(){try{var t,e=document.createElement("canvas"),r=!1;(t=e.getContext("webgl2",{failIfMajorPerformanceCaveat:!0}))||(r=!0,t=e.getContext("webgl2"));var n=t!=null;return e.remove(),n?r?kj:Sj:td}catch{return td}}();function vw(){var t=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!ie()&&Ej!==td&&(t?function(){return wm()?!1:["Chrome","Firefox"].includes(Mn())}():function(){if(wm())return!1;var e=Mn();if(e==="Safari"){var r=bh();if(r.major<15||r.major===15&&r.minor<4)return!1}return e==="Chrome"?_h().major>=77:e==="Firefox"?xh().major>=97:["Chrome","Firefox","Safari"].includes(e)}())}function yw(){if(ie()||ww()||typeof AudioWorkletNode>"u")return!1;switch(Mn()){case"Chrome":case"Firefox":return!0;case"Safari":var t=Ba();return t.major>17||t.major===17&&t.minor>=4}return!1}function ym(){return gw()&&!function(){var t,e=Mn();if(!Mt())return!0;switch(e){case"Chrome":return(t=_h()).major&&t.major>0&&t.major<75;case"Firefox":return(t=xh()).major<91;case"Safari":return(t=bh()).major<13||t.major===13&&t.minor<1;default:return!0}}()}function ww(){return Mt().match(/Linux; Android/)}function wm(){var t,e=Mt(),r=e.match(/Mac/)&&(!ie()&&typeof window<"u"&&(t=window)!==null&&t!==void 0&&(t=t.navigator)!==null&&t!==void 0&&t.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(e.match(/Mobi/)||e.match(/Android/)||r)||!!Mt().match(/DailyAnd\//)||void 0}function Mn(){if(typeof window<"u"){var t=Mt();return _w()?"Safari":t.indexOf("Edge")>-1?"Edge":t.match(/Chrome\//)?"Chrome":t.indexOf("Safari")>-1||bw()?"Safari":t.indexOf("Firefox")>-1?"Firefox":t.indexOf("MSIE")>-1||t.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function Ba(){switch(Mn()){case"Chrome":return _h();case"Safari":return bh();case"Firefox":return xh();case"Edge":return function(){var t=0,e=0;if(typeof window<"u"){var r=Mt().match(/Edge\/(\d+).(\d+)/);if(r)try{t=parseInt(r[1]),e=parseInt(r[2])}catch{}}return{major:t,minor:e}}()}}function _h(){var t=0,e=0,r=0,n=0,i=!1;if(typeof window<"u"){var s=Mt(),o=s.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(o)try{t=parseInt(o[1]),e=parseInt(o[2]),r=parseInt(o[3]),n=parseInt(o[4]),i=s.indexOf("OPR/")>-1}catch{}}return{major:t,minor:e,build:r,patch:n,opera:i}}function _w(){return!!Mt().match(/iPad|iPhone|iPod/i)&&gw()}function bw(){return Mt().indexOf("AppleWebKit/605.1.15")>-1}function bh(){var t=0,e=0,r=0;if(typeof window<"u"){var n=Mt().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(n)try{t=parseInt(n[1]),e=parseInt(n[2]),r=parseInt(n[4])}catch{}else(_w()||bw())&&(t=14,e=0,r=3)}return{major:t,minor:e,point:r}}function xh(){var t=0,e=0;if(typeof window<"u"){var r=Mt().match(/Firefox\/(\d+).(\d+)/);if(r)try{t=parseInt(r[1]),e=parseInt(r[2])}catch{}}return{major:t,minor:e}}var xw=function(){return kt(function t(){xt(this,t)},[{key:"addListenerForMessagesFromCallMachine",value:function(t,e,r){Zi()}},{key:"addListenerForMessagesFromDailyJs",value:function(t,e,r){Zi()}},{key:"sendMessageToCallMachine",value:function(t,e,r,n){Zi()}},{key:"sendMessageToDailyJs",value:function(t,e){Zi()}},{key:"removeListener",value:function(t){Zi()}}])}();function _m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function vc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};
vendor: 5,222 bytes, line 285
285e%2?_m(Object(r),!0).forEach(function(n){Zt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_m(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function kw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kw=function(){return!!t})()}var Cj=function(){function t(){var e,r,n,i;return xt(this,t),r=this,n=Ht(n=t),(e=ml(r,kw()?Reflect.construct(n,[],Ht(r).constructor):n.apply(r,i)))._wrappedListeners={},e._messageCallbacks={},e}return gl(t,xw),kt(t,[{key:"addListenerForMessagesFromCallMachine",value:function(e,r,n){var i=this,s=function(o){if(o.data&&o.data.what==="iframe-call-message"&&(!o.data.callClientId||o.data.callClientId===r)&&(!o.data.from||o.data.from!=="module")){var a=vc({},o.data);if(delete a.from,a.callbackStamp&&i._messageCallbacks[a.callbackStamp]){var l=a.callbackStamp;i._messageCallbacks[l].call(n,a),delete i._messageCallbacks[l]}delete a.what,delete a.callbackStamp,e.call(n,a)}};this._wrappedListeners[e]=s,window.addEventListener("message",s)}},{key:"addListenerForMessagesFromDailyJs",value:function(e,r,n){var i=function(s){var o;if(!(!s.data||s.data.what!==mc||!s.data.action||s.data.from&&s.data.from!=="module"||s.data.callClientId&&r&&s.data.callClientId!==r||s!=null&&(o=s.data)!==null&&o!==void 0&&o.callFrameId)){var a=s.data;e.call(n,a)}};this._wrappedListeners[e]=i,window.addEventListener("message",i)}},{key:"sendMessageToCallMachine",value:function(e,r,n,i){if(!n)throw new Error("undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?");var s=vc({},e);if(s.what=mc,s.from="module",s.callClientId=n,r){var o=vl();this._messageCallbacks[o]=r,s.callbackStamp=o}var a=i?i.contentWindow:window,l=this._callMachineTargetOrigin(i);l&&a.postMessage(s,l)}},{key:"sendMessageToDailyJs",value:function(e,r){e.what=mc,e.callClientId=r,e.from="embedded",window.postMessage(e,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(e){var r=this._wrappedListeners[e];r&&(window.removeEventListener("message",r),delete this._wrappedListeners[e])}},{key:"forwardPackagedMessageToCallMachine",value:function(e,r,n){var i=vc({},e);i.callClientId=n;var s=r?r.contentWindow:window,o=this._callMachineTargetOrigin(r);o&&s.postMessage(i,o)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e,r){var n=function(i){if(i.data&&i.data.what==="iframe-call-message"&&(!i.data.callClientId||i.data.callClientId===r)&&(!i.data.from||i.data.from!=="module")){var s=i.data;e(s)}};return this._wrappedListeners[e]=n,window.addEventListener("message",n),e}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){var r=this._wrappedListeners[e];r&&(window.removeEventListener("message",r),delete this._wrappedListeners[e])}},{key:"_callMachineTargetOrigin",value:function(e){return e?e.src?new URL(e.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return window.location.protocol==="file:"?"*":window.location.origin}}])}();function bm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Sw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Sw=function(){return!!t})()}var jj=function(){function t(){var e,r,n,i;return xt(this,t),r=this,n=Ht(n=t),e=ml(r,Sw()?Reflect.construct(n,[],Ht(r).constructor):n.apply(r,i)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new Ou.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new Ou.EventEmitter,e._wrappedListeners={},e._messageCallbacks={},e}return gl(t,xw),kt(t,[{key:"addListenerForMessagesFromCallMachine",value:function(e,r,n){this._addListener(e,global.callMachineToDailyJsEmitter,r,n,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(e,r,n){this._addListener(e,global.dailyJsToCallMachineEmitter,r,n,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(e,r,n){this._sendMessage(e,global.dailyJsToCallMachineEmitter,n,r,"sending message to call machine")}},{key:"sendMessageToDailyJs",value:function(e,r){this._sendMessage(e,global.callMachineToDailyJsEmitter,r,null,"sending message to daily-js")}},{key:"removeListener",value:function(e){var r=this._wrappedListeners[e];r&&(global.callMachineToDailyJsEmitter.removeListener("message",r),global.dailyJsToCallMachineEmitter.removeListener("message",r),delete this._wrappedListeners[e])}},{key:"_addListener",value:function(e,r,n,i,s){var o=this,a=function(l){if(l.callClientId===n){if(l.callbackStamp&&o._messageCallbacks[l.callbackStamp]){var u=l.callbackStamp;o._messageCallbacks[u].call(i,l),delete o._messageCallbacks[u]}e.call(i,l)}};this._wrappedListeners[e]=a,r.addListener("message",a)}},{key:"_sendMessage",value:function(e,r,n,i,s){var o=function(l){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};
285u%2?bm(Object(d),!0).forEach(function(f){Zt(l,f,d[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(d)):bm(Object(d)).forEach(function(f){Object.defineProperty(l,f,Object.getOwnPropertyDescriptor(d,f))})}return l}({},e);if(o.callClientId=n,i){var a=vl();this._messageCallbacks[a]=i,o.callbackStamp=a}r.emit("message",o)}}])}(),rd="replace",nd="shallow-merge",xm=[rd,nd],Tj=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.data,n=e.mergeStrategy,i=n===void 0?rd:n;xt(this,t),t._validateMergeStrategy(i),t._validateData(r,i),this.mergeStrategy=i,this.data=r}return kt(t,[{key:"isNoOp",value:function(){return t.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(e,r){return Object.keys(e).length===0&&r===nd}},{key:"_validateMergeStrategy",value:function(e){if(!xm.includes(e))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(xm,"]"))}},{key:"_validateData",value:function(e,r){if(!function(a){if(a==null||se(a)!=="object")return!1;var l=Object.getPrototypeOf(a);return l==null||l===Object.prototype}(e))throw Error("Meeting session data must be a plain (map-like) object");var n;try{if(n=JSON.stringify(e),r===rd){var i=JSON.parse(n);tt(i,e)||console.warn("The meeting session data provided will be modified when serialized.",i,e)}else if(r===nd){for(var s in e)if(Object.hasOwnProperty.call(e,s)&&e[s]!==void 0){var o=JSON.parse(JSON.stringify(e[s]));tt(e[s],o)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",o,e[s])}}}catch(a){throw Error("Meeting session data must be serializable to JSON: ".concat(a))}if(n.length>fm)throw Error("Meeting session data is too large (".concat(n.length," characters). Maximum size suppported is ").concat(fm,"."))}}])}();function Ew(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ew=function(){return!!t})()}function id(t){var e=typeof Map=="function"?new Map:void 0;return id=function(r){if(r===null||!function(i){try{return Function.toString.call(i).indexOf("[native code]")!==-1}catch{return typeof i=="function"}}(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,n)}function n(){return function(i,s,o){if(Ew())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,s);var l=new(i.bind.apply(i,a));return o&&qs(l,o.prototype),l}(r,arguments,Ht(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),qs(n,r)},id(t)}function Cw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Cw=function(){return!!t})()}function km(t){var e,r=(e=window._daily)===null||e===void 0?void 0:e.pendings;if(r){var n=r.indexOf(t);n!==-1&&r.splice(n,1)}}var Pj=function(){return kt(function t(e){xt(this,t),this._currentLoad=null,this._callClientId=e},[{key:"load",value:function(){var t,e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),void n(!0);t=this._callClientId,window._daily.pendings.push(t),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Oj(r,function(){n(!1)},function(s,o){o||km(e._callClientId),i(s,o)}),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),km(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])}(),Oj=function(){return kt(function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;xt(this,t),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=e,this._successCallback=r,this._failureCallback=n},[{key:"start",value:function(){var t=this;if(!this._currentAttempt){var e=function(r){t._currentAttempt.cancelled||(t._attemptsRemaining--,t._failureCallback(r,t._attemptsRemaining>0),t._attemptsRemaining<=0||setTimeout(function(){t._currentAttempt.cancelled||(t._currentAttempt=new Sm(t._dailyConfig,t._successCallback,e),t._currentAttempt.start())},3e3))};this._currentAttempt=new Sm(this._dailyConfig,this._successCallback,e),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}}])}(),yc=function(){function t(){return xt(this,t),e=this,n=arguments,r=Ht(r=t),ml(e,Cw()?Reflect.construct(r,n||[],Ht(e).constructor):r.apply(e,n));var e,r,n}return gl(t,id(Error)),kt(t)}(),za=2e4,Sm=function(){return kt(function e(r,n,i){xt(this,e),this._loadAttemptImpl=ie()||!r.avoidEval?new Nj(r,n,i):new Aj(r,n,i)},[{key:"start",value:(t=W(function*(){return this._loadAttemptImpl.start()}),function(){return t.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 t}(),Nj=function(){return kt(function i(s,o,a){xt(this,i),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=o,this._failureCallback=a},[{key:"start",value:(n=W(function*(){var i=Ma(this._dailyConfig);!(yield this._tryLoadFromIOSCache(i))&&this._loadFromNetwork(i)}),function(){return n.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}}
285,{key:"_tryLoadFromIOSCache",value:(r=W(function*(i){if(!this._iosCache)return!1;try{var s=yield this._iosCache.get(i);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(i){return r.apply(this,arguments)})},{key:"_loadFromNetwork",value:(e=W(function*(i){var s=this;this._networkTimeout=setTimeout(function(){s._networkTimedOut=!0,s._failureCallback({msg:"Timed out (>".concat(za," ms) when loading call object bundle ").concat(i),type:"timeout"})},za);try{var o=this._refetchHeaders?{headers:this._refetchHeaders}:{},a=yield fetch(i,o);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new yc;var l=yield this._getBundleCodeFromResponse(i,a);if(this.cancelled)throw new yc;Function('"use strict";'+l)(),this._iosCache&&this._iosCache.set(i,l,a.headers),this.succeeded=!0,this._successCallback()}catch(u){if(clearTimeout(this._networkTimeout),u instanceof yc||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(i,": ").concat(u),type:u.message})}}),function(i){return e.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(t=W(function*(i,s){if(s.ok)return yield s.text();if(this._iosCache&&s.status===304)return(yield this._iosCache.renew(i,s.headers)).code;throw new Error("Received ".concat(s.status," response"))}),function(i,s){return t.apply(this,arguments)})}]);var t,e,r,n}(),Aj=function(){return kt(function t(e,r,n){xt(this,t),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=e,this._successCallback=r,this._failureCallback=n,this._attemptId=vl(),this._networkTimeout=null,this._scriptElement=null},[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var t=Ma(this._dailyConfig);(typeof document>"u"?"undefined":se(document))==="object"?this._startLoading(t):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(t){var e=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout(function(){e._stopLoading(),e._failureCallback({msg:"Timed out (>".concat(za," ms) when loading call object bundle ").concat(t),type:"timeout"})},za);var r=document.getElementsByTagName("head")[0],n=document.createElement("script");this._scriptElement=n,n.onload=function(){e._stopLoading(),e.succeeded=!0,e._successCallback()},n.onerror=function(i){e._stopLoading(),e._failureCallback({msg:"Failed to load call object bundle ".concat(i.target.src),type:i.message})},n.src=t,r.appendChild(n)}},{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)}}])}(),Uo=function(t,e,r){return Mj(t.local,e,r)===!0},Ij=function(t,e,r){return t.local.streams&&t.local.streams[e]&&t.local.streams[e].stream&&t.local.streams[e].stream["get".concat(r==="video"?"Video":"Audio","Tracks")]()[0]},ci=function(t,e,r,n){var i=Lj(t,e,r,n);return i&&i.pendingTrack},Mj=function(t,e,r){if(!t)return!1;var n=function(s){switch(s){case"avatar":return!0;case"staged":return s;default:return!!s}},i=t.public.subscribedTracks;return i&&i[e]?["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo"].indexOf(r)===-1&&i[e].custom?[!0,"staged"].includes(i[e].custom)?n(i[e].custom):n(i[e].custom[r]):n(i[e][r]):!i||n(i.ALL)},Lj=function(t,e,r,n){var i=Object.values(t.streams||{}).filter(function(s){return s.participantId===e&&s.type===r&&s.pendingTrack&&s.pendingTrack.kind===n}).sort(function(s,o){return new Date(o.starttime)-new Date(s.starttime)});return i&&i[0]},Rj=function(t,e){var r=t.local.public.customTracks;
285if(r&&r[e])return r[e].track};function Em(t,e){for(var r=e.getState(),n=0,i=["cam","screen"];n<i.length;n++)for(var s=i[n],o=0,a=["video","audio"];o<a.length;o++){var l=a[o],u=s==="cam"?l:"screen".concat(l.charAt(0).toUpperCase()+l.slice(1)),d=t.tracks[u];if(d){var f=t.local?Ij(r,s,l):ci(r,t.session_id,s,l);d.state==="playable"&&(d.track=f),d.persistentTrack=f}}}function Cm(t,e){try{var r=e.getState();for(var n in t.tracks)if(!Dj(n)){var i=t.tracks[n].kind;if(i){var s=t.tracks[n];if(s){var o=t.local?Rj(r,n):ci(r,t.session_id,n,i);s.state==="playable"&&(t.tracks[n].track=o),s.persistentTrack=o}}else console.error("unknown type for custom track")}}catch(a){console.error(a)}}function Dj(t){return["video","audio","screenVideo","screenAudio"].includes(t)}function jm(t,e,r){var n=r.getState();if(t.local){if(t.audio)try{t.audioTrack=n.local.streams.cam.stream.getAudioTracks()[0],t.audioTrack||(t.audio=!1)}catch{}if(t.video)try{t.videoTrack=n.local.streams.cam.stream.getVideoTracks()[0],t.videoTrack||(t.video=!1)}catch{}if(t.screen)try{t.screenVideoTrack=n.local.streams.screen.stream.getVideoTracks()[0],t.screenAudioTrack=n.local.streams.screen.stream.getAudioTracks()[0],t.screenVideoTrack||t.screenAudioTrack||(t.screen=!1)}catch{}}else{var i=!0;try{var s=n.participants[t.session_id];s&&s.public&&s.public.rtcType&&s.public.rtcType.impl==="peer-to-peer"&&s.private&&!["connected","completed"].includes(s.private.peeringState)&&(i=!1)}catch(d){console.error(d)}if(!i)return t.audio=!1,t.audioTrack=!1,t.video=!1,t.videoTrack=!1,t.screen=!1,void(t.screenTrack=!1);try{if(n.streams,t.audio&&Uo(n,t.session_id,"cam-audio")){var o=ci(n,t.session_id,"cam","audio");o&&(e&&e.audioTrack&&e.audioTrack.id===o.id?t.audioTrack=o:o.muted||(t.audioTrack=o)),t.audioTrack||(t.audio=!1)}if(t.video&&Uo(n,t.session_id,"cam-video")){var a=ci(n,t.session_id,"cam","video");a&&(e&&e.videoTrack&&e.videoTrack.id===a.id?t.videoTrack=a:a.muted||(t.videoTrack=a)),t.videoTrack||(t.video=!1)}if(t.screen&&Uo(n,t.session_id,"screen-audio")){var l=ci(n,t.session_id,"screen","audio");l&&(e&&e.screenAudioTrack&&e.screenAudioTrack.id===l.id?t.screenAudioTrack=l:l.muted||(t.screenAudioTrack=l))}if(t.screen&&Uo(n,t.session_id,"screen-video")){var u=ci(n,t.session_id,"screen","video");u&&(e&&e.screenVideoTrack&&e.screenVideoTrack.id===u.id?t.screenVideoTrack=u:u.muted||(t.screenVideoTrack=u))}t.screenVideoTrack||t.screenAudioTrack||(t.screen=!1)}catch(d){console.error("unexpected error matching up tracks",d)}}}function $j(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(l,u){if(l){if(typeof l=="string")return Tm(l,u);var d={}.toString.call(l).slice(8,-1);return d==="Object"&&l.constructor&&(d=l.constructor.name),d==="Map"||d==="Set"?Array.from(l):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Tm(l,u):void 0}}(t))||e){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
286In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,o=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return o=l.done,l},e:function(l){a=!0,s=l},f:function(){try{o||r.return==null||r.return()}finally{if(a)throw s}}}}function Tm(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var Qt=new Map,yi=null;function Uj(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(l,u){if(l){if(typeof l=="string")return Pm(l,u);var d={}.toString.call(l).slice(8,-1);return d==="Object"&&l.constructor&&(d=l.constructor.name),d==="Map"||d==="Set"?Array.from(l):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Pm(l,u):void 0}}(t))||e){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
287In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,o=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return o=l.done,l},e:function(l){a=!0,s=l},f:function(){try{o||r.return==null||r.return()}finally{if(a)throw s}}}}function Pm(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var Xt=new Map,xs=null;function Fj(t){jw()?function(e){Qt.has(e)||(Qt.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(r){Qt.has(e)&&(Qt.get(e).lastDevicesString=JSON.stringify(r),yi||(yi=function(){var n=W(function*(){var i,s=yield navigator.mediaDevices.enumerateDevices(),o=$j(Qt.keys());try{for(o.s();!(i=o.n()).done;){var a=i.value,l=JSON.stringify(s);l!==Qt.get(a).lastDevicesString&&(Qt.get(a).lastDevicesString=l,a(s))}}catch(u){o.e(u)}finally{o.f()}});return function(){return n.apply(this,arguments)}}(),navigator.mediaDevices.addEventListener("devicechange",yi)))}).catch(function(){}))}(t):function(e){Xt.has(e)||(Xt.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(r){Xt.has(e)&&(Xt.get(e).lastDevicesString=JSON.stringify(r),xs||(xs=setInterval(W(function*(){var n,i=yield navigator.mediaDevices.enumerateDevices(),s=Uj(Xt.keys());try{for(s.s();!(n=s.n()).done;){var o=n.value,a=JSON.stringify(i);a!==Xt.get(o).lastDevicesString&&(Xt.get(o).lastDevicesString=a,o(i))}}catch(l){s.e(l)}finally{s.f()}}),3e3)))}))}(t)}function Bj(t){jw()?function(e){Qt.has(e)&&(Qt.delete(e),Qt.size===0&&yi&&(navigator.mediaDevices.removeEventListener("devicechange",yi),yi=null))}(t):function(e){Xt.has(e)&&(Xt.delete(e),Xt.size===0&&xs&&(clearInterval(xs),xs=null))}(t)}function jw(){var t;return ie()||((t=navigator.mediaDevices)===null||t===void 0?void 0:t.ondevicechange)!==void 0}var zj=new Set;function Vj(t,e){return t&&t.readyState==="live"&&!function(r,n){return r.muted&&!zj.has(r.id)}(t)}
287function Om(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function kr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Om(Object(r),!0).forEach(function(n){Zt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Om(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var cs=Object.freeze({VIDEO:"video",AUDIO:"audio",SCREEN_VIDEO:"screenVideo",SCREEN_AUDIO:"screenAudio",CUSTOM_VIDEO:"customVideo",CUSTOM_AUDIO:"customAudio"}),qj=Object.freeze({PARTICIPANTS:"participants",STREAMING:"streaming",TRANSCRIPTION:"transcription"}),ks=Object.values(cs),Nm=["v","a","sv","sa","cv","ca"];Object.freeze(ks.reduce(function(t,e,r){return t[e]=Nm[r],t},{})),Object.freeze(Nm.reduce(function(t,e,r){return t[e]=ks[r],t},{}));var Jj=[cs.VIDEO,cs.AUDIO,cs.SCREEN_VIDEO,cs.SCREEN_AUDIO],Am=Object.values(qj),Im=["p","s","t"];Object.freeze(Am.reduce(function(t,e,r){return t[e]=Im[r],t},{})),Object.freeze(Im.reduce(function(t,e,r){return t[e]=Am[r],t},{}));var Tw=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.base,n=e.byUserId,i=e.byParticipantId;xt(this,t),this.base=r,this.byUserId=n,this.byParticipantId=i}return kt(t,[{key:"clone",value:function(){var e=new t;if(this.base instanceof ze?e.base=this.base.clone():e.base=this.base,this.byUserId!==void 0)for(var r in e.byUserId={},this.byUserId){var n=this.byUserId[r];e.byUserId[r]=n instanceof ze?n.clone():n}if(this.byParticipantId!==void 0)for(var i in e.byParticipantId={},this.byParticipantId){var s=this.byParticipantId[i];e.byParticipantId[i]=s instanceof ze?s.clone():s}return e}},{key:"toJSONObject",value:function(){var e={};if(typeof this.base=="boolean"?e.base=this.base:this.base instanceof ze&&(e.base=this.base.toJSONObject()),this.byUserId!==void 0)for(var r in e.byUserId={},this.byUserId){var n=this.byUserId[r];e.byUserId[r]=n instanceof ze?n.toJSONObject():n}if(this.byParticipantId!==void 0)for(var i in e.byParticipantId={},this.byParticipantId){var s=this.byParticipantId[i];e.byParticipantId[i]=s instanceof ze?s.toJSONObject():s}return e}},{key:"toMinifiedJSONObject",value:function(){var e={};if(this.base!==void 0&&(typeof this.base=="boolean"?e.b=this.base:e.b=this.base.toMinifiedJSONObject()),this.byUserId!==void 0)for(var r in e.u={},this.byUserId){var n=this.byUserId[r];e.u[r]=typeof n=="boolean"?n:n.toMinifiedJSONObject()}if(this.byParticipantId!==void 0)for(var i in e.p={},this.byParticipantId){var s=this.byParticipantId[i];e.p[i]=typeof s=="boolean"?s:s.toMinifiedJSONObject()}return e}},{key:"normalize",value:function(){return this.base instanceof ze&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map(function(e){var r=Ke(e,2),n=r[0],i=r[1];return[n,i instanceof ze?i.normalize():i]}))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map(function(e){var r=Ke(e,2),n=r[0],i=r[1];return[n,i instanceof ze?i.normalize():i]}))),this}}],[{key:"fromJSONObject",value:function(e){var r,n,i;if(e.base!==void 0&&(r=typeof e.base=="boolean"?e.base:ze.fromJSONObject(e.base)),e.byUserId!==void 0)for(var s in n={},e.byUserId){var o=e.byUserId[s];n[s]=typeof o=="boolean"?o:ze.fromJSONObject(o)}if(e.byParticipantId!==void 0)for(var a in i={},e.byParticipantId){var l=e.byParticipantId[a];i[a]=typeof l=="boolean"?l:ze.fromJSONObject(l)}return new t({base:r,byUserId:n,byParticipantId:i})}},{key:"fromMinifiedJSONObject",value:function(e){var r,n,i;if(e.b!==void 0&&(r=typeof e.b=="boolean"?e.b:ze.fromMinifiedJSONObject(e.b)),e.u!==void 0)for(var s in n={},e.u){var o=e.u[s];n[s]=typeof o=="boolean"?o:ze.fromMinifiedJSONObject(o)}if(e.p!==void 0)for(var a in i={},e.p){var l=e.p[a];i[a]=typeof l=="boolean"?l:ze.fromMinifiedJSONObject(l)}return new t({base:r,byUserId:n,byParticipantId:i})}},{key:"validateJSONObject",value:function(e){if(se(e)!=="object")return[!1,"canReceive must be an object"];for(var r=["base","byUserId","byParticipantId"],n=0,i=Object.keys(e);n<i.length;n++){var s=i[n];if(!r.includes(s))return[!1,"canReceive can only contain keys (".concat(r.join(", "),")")];if(s==="base"){var o=Ke(ze.validateJSONObject(e.base,!0),2),a=o[0],l=o[1];if(!a)return[!1,l]}else{if(se(e[s])!=="object")return[!1,"invalid (non-object) value for field '".concat(s,"' in canReceive")];for(var u=0,d=Object.values(e[s]);
287u<d.length;u++){var f=d[u],_=Ke(ze.validateJSONObject(f),2),x=_[0],k=_[1];if(!x)return[!1,k]}}}return[!0]}}])}(),ze=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.video,n=e.audio,i=e.screenVideo,s=e.screenAudio,o=e.customVideo,a=e.customAudio;xt(this,t),this.video=r,this.audio=n,this.screenVideo=i,this.screenAudio=s,this.customVideo=o,this.customAudio=a}return kt(t,[{key:"clone",value:function(){var e=new t;return this.video!==void 0&&(e.video=this.video),this.audio!==void 0&&(e.audio=this.audio),this.screenVideo!==void 0&&(e.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(e.screenAudio=this.screenAudio),this.customVideo!==void 0&&(e.customVideo=kr({},this.customVideo)),this.customAudio!==void 0&&(e.customAudio=kr({},this.customAudio)),e}},{key:"toJSONObject",value:function(){var e={};return this.video!==void 0&&(e.video=this.video),this.audio!==void 0&&(e.audio=this.audio),this.screenVideo!==void 0&&(e.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(e.screenAudio=this.screenAudio),this.customVideo!==void 0&&(e.customVideo=kr({},this.customVideo)),this.customAudio!==void 0&&(e.customAudio=kr({},this.customAudio)),e}},{key:"toMinifiedJSONObject",value:function(){var e={};return this.video!==void 0&&(e.v=this.video),this.audio!==void 0&&(e.a=this.audio),this.screenVideo!==void 0&&(e.sv=this.screenVideo),this.screenAudio!==void 0&&(e.sa=this.screenAudio),this.customVideo!==void 0&&(e.cv=kr({},this.customVideo)),this.customAudio!==void 0&&(e.ca=kr({},this.customAudio)),e}},{key:"normalize",value:function(){function e(r,n){return r&&Object.keys(r).length===1&&r["*"]===n}return!(this.video!==!0||this.audio!==!0||this.screenVideo!==!0||this.screenAudio!==!0||!e(this.customVideo,!0)||!e(this.customAudio,!0))||(this.video!==!1||this.audio!==!1||this.screenVideo!==!1||this.screenAudio!==!1||!e(this.customVideo,!1)||!e(this.customAudio,!1))&&this}}],[{key:"fromBoolean",value:function(e){return new t({video:e,audio:e,screenVideo:e,screenAudio:e,customVideo:{"*":e},customAudio:{"*":e}})}},{key:"fromJSONObject",value:function(e){return new t({video:e.video,audio:e.audio,screenVideo:e.screenVideo,screenAudio:e.screenAudio,customVideo:e.customVideo!==void 0?kr({},e.customVideo):void 0,customAudio:e.customAudio!==void 0?kr({},e.customAudio):void 0})}},{key:"fromMinifiedJSONObject",value:function(e){return new t({video:e.v,audio:e.a,screenVideo:e.sv,screenAudio:e.sa,customVideo:e.cv,customAudio:e.ca})}},{key:"validateJSONObject",value:function(e,r){if(typeof e=="boolean")return[!0];if(se(e)!=="object")return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var n=Object.keys(e),i=0,s=n;i<s.length;i++){var o=s[i];if(!ks.includes(o))return[!1,"invalid media type '".concat(o,"' in canReceive")];if(Jj.includes(o)){if(typeof e[o]!="boolean")return[!1,"invalid (non-boolean) value for media type '".concat(o,"' in canReceive")]}else{if(se(e[o])!=="object")return[!1,"invalid (non-object) value for media type '".concat(o,"' in canReceive")];for(var a=0,l=Object.values(e[o]);a<l.length;a++)if(typeof l[a]!="boolean")return[!1,"invalid (non-boolean) value for entry within '".concat(o,"' in canReceive")];if(r&&e[o]["*"]===void 0)return[!1,`canReceive "base" permission must specify "*" as an entry within '`.concat(o,"'")]}}return r&&n.length!==ks.length?[!1,'canReceive "base" permission must specify all media types: '.concat(ks.join(", ")," (or be set to a boolean shorthand)")]:[!0]}}])}(),Wj=["result"],Hj=["preserveIframe"];function Mm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function z(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mm(Object(r),!0).forEach(function(n){Zt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mm(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Pw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Pw=function(){return!!t})()}function Lm(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(l,u){if(l){if(typeof l=="string")return Rm(l,u);var d={}.toString.call(l).slice(8,-1);return d==="Object"&&l.constructor&&(d=l.constructor.name),d==="Map"||d==="Set"?Array.from(l):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Rm(l,u):void 0}}(t))||e){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:i}
vendor: 10,099 bytes, lines 287-288
287}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
288In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,o=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return o=l.done,l},e:function(l){a=!0,s=l},f:function(){try{o||r.return==null||r.return()}finally{if(a)throw s}}}}function Rm(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var ln={},Dm="video",Gj="voice",$m=ie()?{data:{}}:{data:{},topology:"none"},Um={present:0,hidden:0},Ow={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},wc=Object.keys(Ow),Fm=["state","volume","simulcastEncodings"],Bm={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},Va={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string",visualState:"'default' | 'sidebar-open' | 'active'"}},sd={id:{allow:"string",controlledBy:"'*' | 'owners' | string[]",csp:"string",iconURL:"string",label:"string",loading:"'eager' | 'lazy'",location:"'main' | 'sidebar'",name:"string",referrerPolicy:"string",sandbox:"string",src:"string",srcdoc:"string",shared:"string[] | 'owners' | boolean"}},cn={customIntegrations:{validate:$w,help:Rw()},customTrayButtons:{validate:Dw,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(Va))},url:{validate:function(t){return typeof t=="string"},help:"url should be a string"},baseUrl:{validate:function(t){return typeof t=="string"},help:"baseUrl should be a string"},token:{validate:function(t){return typeof t=="string"},help:"token should be a string",queryString:"t"},dailyConfig:{validate:function(t,e){try{return e.validateDailyConfig(t),!0}catch(r){console.error("Failed to validate dailyConfig",r)}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(t){return Uw(t,Bm)},help:"reactNativeConfig should look like ".concat(JSON.stringify(Bm),", all fields optional")},lang:{validate:function(t){return["da","de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sv","tr","user"].includes(t)},help:"language not supported. Options are: da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sv, tr, user"},userName:!0,userData:{validate:function(t){try{return Nw(t),!0}catch(e){return console.error(e),!1}},help:"invalid userData type provided"},startVideoOff:!0,startAudioOff:!0,allowLocalVideo:!0,allowLocalAudio:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(t,e){if(typeof t=="boolean")return e._preloadCache.allowLocalVideo=t,!0;var r;if(t instanceof MediaStreamTrack)e._sharedTracks.videoTrack=t,r={customTrack:pr};else{if(delete e._sharedTracks.videoTrack,typeof t!="string")return console.error("videoSource must be a MediaStreamTrack, boolean, or a string"),!1;r={deviceId:t}}return e._updatePreloadCacheInputSettings({video:{settings:r}},!1),!0}},audioSource:{validate:function(t,e){if(typeof t=="boolean")return e._preloadCache.allowLocalAudio=t,!0;var r;if(t instanceof MediaStreamTrack)e._sharedTracks.audioTrack=t,r={customTrack:pr};else{if(delete e._sharedTracks.audioTrack,typeof t!="string")return console.error("audioSource must be a MediaStreamTrack, boolean, or a string"),!1;r={deviceId:t}}return e._updatePreloadCacheInputSettings({audio:{settings:r}},!1),!0}},subscribeToTracksAutomatically:{validate:function(t,e){return e._preloadCache.subscribeToTracksAutomatically=t,!0}},theme:{validate:function(t){var e=["accent","accentText","background","backgroundAccent","baseText","border","mainAreaBg","mainAreaBgAccent","mainAreaText","supportiveText"],r=function(n){for(var i=0,s=Object.keys(n);i<s.length;i++){var o=s[i];if(!e.includes(o))return console.error('unsupported color "'.concat(o,'". Valid colors: ').concat(e.join(", "))),!1;if(!n[o].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error("".concat(o,' theme color should be provided in valid hex color format. Received: "').concat(n[o],'"')),!1}return!0};return se(t)==="object"&&("light"in t&&"dark"in t||"colors"in t)?"light"in t&&"dark"in t?"colors"in t.light?"colors"in t.dark?r(t.light.colors)&&r(t.dark.colors):(console.error('Dark theme is missing "colors" property.',t),!1):(console.error('Light theme is missing "colors" property.',t),!1):r(t.colors):(console.error('Theme must contain either both "light" and "dark" properties, or "colors".',t),!1)},help:"unsupported theme configuration. Check error logs for detailed info."},layoutConfig:{validate:function(t){if("grid"in t){var e=t.grid;if("maxTilesPerPage"in e){if(!Number.isInteger(e.maxTilesPerPage))return console.error("grid.maxTilesPerPage should be an integer. You passed ".concat(e.maxTilesPerPage,".")),!1;if(e.maxTilesPerPage>49)return console.error("grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case."),!1}if("minTilesPerPage"in e){if(!Number.isInteger(e.minTilesPerPage))return console.error("grid.minTilesPerPage should be an integer. You passed ".concat(e.minTilesPerPage,".")),!1;if(e.minTilesPerPage<1)return console.error("grid.minTilesPerPage can't be lower than 1."),!1;if("maxTilesPerPage"in e&&e.minTilesPerPage>e.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(t){return Aw(t,{allowAllParticipantsKey:!1})},help:Lw({allowAllParticipantsKey:!1})},sendSettings:{validate:function(t,e){return!!function(r,n){try{return n.validateUpdateSendSettings(r),!0}catch(i){return console.error("Failed to validate send settings",i),!1}}(t,e)&&(e._preloadCache.sendSettings=t,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(t,e){var r;return!!Iw(t)&&(e._inputSettings||(e._inputSettings={}),Mw(t,(r=e.properties)===null||r===void 0?void 0:r.dailyConfig,e._sharedTracks),e._updatePreloadCacheInputSettings(t,!0),!0)},help:od()},layout:{validate:function(t){return t==="custom-v1"||t==="browser"||t==="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},Fo={styles:{validate:function(t){for(var e in t)if(e!=="cam"&&e!=="screen")return!1;if(t.cam){for(var r in t.cam)if(r!=="div"&&r!=="video")return!1}if(t.screen){for(var n in t.screen)if(n!=="div"&&n!=="video")return!1}return!0},help:"styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }"},setSubscribedTracks:{validate:function(t,e){if(e._preloadCache.subscribeToTracksAutomatically)return!1;var r=[!0,!1,"staged"];if(r.includes(t)||!ie()&&t==="avatar")return!0;var n=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"],i=function(s){var o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var a in s)if(a==="custom"){if(!r.includes(s[a])&&!i(s[a],!0))return!1}else{var l=!o&&!n.includes(a),u=!r.includes(s[a]);if(l||u)return!1}return!0};return i(t)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(ie()?"":" | '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(t){return t===!1},help:"setScreenShare must be false, as it's only meant for stopping remote participants' screen shares"},eject:!0,updatePermissions:{validate:function(t){for(var e=0,r=Object.entries(t);e<r.length;e++){var n=Ke(r[e],2),i=n[0],s=n[1];switch(i){case"hasPresence":if(typeof s!="boolean")return!1;break;case"canSend":if(s instanceof Set||s instanceof Array||Array.isArray(s)){var o,a=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],l=Lm(s);try{for(l.s();!(o=l.n()).done;){var u=o.value;if(!a.includes(u))return!1}}catch(g){l.e(g)}finally{l.f()}}else if(typeof s!="boolean")return!1;(s instanceof Array||Array.isArray(s))&&(t.canSend=new Set(s));break;case"canReceive":var d=Ke(Tw.validateJSONObject(s),2),f=d[0],_=d[1];if(!f)return console.error(_),!1;break;case"canAdmin":if(s instanceof Set||s instanceof Array||Array.isArray(s)){var x,k=["participants","streaming","transcription"],v=Lm(s);try{for(v.s();!(x=v.n()).done;){var b=x.value;if(!k.includes(b))return!1}}catch(g){v.e(g)}finally{v.f()}}else if(typeof s!="boolean")return!1;(s instanceof Array||Array.isArray(s))&&(t.canAdmin=new Set(s));break;default:return!1}}return!0},help:"updatePermissions can take hasPresence, canSend, canReceive, and canAdmin permissions. hasPresence must be a boolean. canSend can be a boolean or an Array or Set of media types (video, audio, screenVideo, screenAudio, customVideo, customAudio). canReceive must be an object specifying base, byUserId, and/or byParticipantId fields (see documentation for more details). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription)."}};Promise.any||(Promise.any=function(){var t=W(function*(e){return new Promise(function(r,n){var i=[];e.forEach(function(s){return Promise.resolve(s).then(function(o){r(o)}).catch(function(o){i.push(o),i.length===e.length&&n(i)})})})});return function(e){return t.apply(this,arguments)}}());var Yj=function(){function t(c){var m,p,S,C,N,M,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(xt(this,t),S=this,C=Ht(C=t),Zt(p=ml(S,Pw()?Reflect.construct(C,[],Ht(S).constructor):C.apply(S,N)
288),"startListeningForDeviceChanges",function(){Fj(p.handleDeviceChange)}),Zt(p,"stopListeningForDeviceChanges",function(){Bj(p.handleDeviceChange)}),Zt(p,"handleDeviceChange",function(X){X=X.map(function(ne){return JSON.parse(JSON.stringify(ne))}),p.emitDailyJSEvent({action:"available-devices-updated",availableDevices:X})}),Zt(p,"handleNativeAppStateChange",function(){var X=W(function*(ne){if(ne==="destroyed")return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield p.destroy());var Gt=ne==="active";p.disableReactNativeAutoDeviceManagement("video")||(Gt?p.camUnmutedBeforeLosingNativeActiveState&&p.setLocalVideo(!0):(p.camUnmutedBeforeLosingNativeActiveState=p.localVideo(),p.camUnmutedBeforeLosingNativeActiveState&&p.setLocalVideo(!1)))});return function(ne){return X.apply(this,arguments)}}()),Zt(p,"handleNativeAudioFocusChange",function(X){p.disableReactNativeAutoDeviceManagement("audio")||(p._hasNativeAudioFocus=X,p.toggleParticipantAudioBasedOnNativeAudioFocus(),p._hasNativeAudioFocus?p.micUnmutedBeforeLosingNativeAudioFocus&&p.setLocalAudio(!0):(p.micUnmutedBeforeLosingNativeAudioFocus=p.localAudio(),p.setLocalAudio(!1)))}),Zt(p,"handleNativeSystemScreenCaptureStop",function(){p.stopScreenShare()}),p.strictMode=R.strictMode===void 0||R.strictMode,p.allowMultipleCallInstances=(m=R.allowMultipleCallInstances)!==null&&m!==void 0&&m,Object.keys(ln).length&&(p._logDuplicateInstanceAttempt(),!p.allowMultipleCallInstances)){if(p.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:{}}),p.callClientId=vl(),ln[(M=p).callClientId]=M,window._daily.instances[p.callClientId]={},p._sharedTracks={},window._daily.instances[p.callClientId].tracks=p._sharedTracks,R.dailyJsVersion=t.version(),p._iframe=c,p._callObjectMode=R.layout==="none"&&!p._iframe,p._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},R.showLocalVideo!==void 0?p._callObjectMode?console.error("showLocalVideo is not available in call object mode"):p._showLocalVideo=!!R.showLocalVideo:p._showLocalVideo=!0,R.showParticipantsBar!==void 0?p._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):p._showParticipantsBar=!!R.showParticipantsBar:p._showParticipantsBar=!0,R.customIntegrations!==void 0?p._callObjectMode?console.error("customIntegrations is not available in call object mode"):p._customIntegrations=R.customIntegrations:p._customIntegrations={},R.customTrayButtons!==void 0?p._callObjectMode?console.error("customTrayButtons is not available in call object mode"):p._customTrayButtons=R.customTrayButtons:p._customTrayButtons={},R.activeSpeakerMode!==void 0?p._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):p._activeSpeakerMode=!!R.activeSpeakerMode:p._activeSpeakerMode=!1,R.receiveSettings?p._callObjectMode?p._receiveSettings=R.receiveSettings:console.error("receiveSettings is only available in call object mode"):p._receiveSettings={},p.validateProperties(R),p.properties=z({},R),p._inputSettings||(p._inputSettings={}),p._callObjectLoader=p._callObjectMode?new Pj(p.callClientId):null,p._callState=Wu,p._isPreparingToJoin=!1,p._accessState={access:ra},p._meetingSessionSummary={},p._finalSummaryOfPrevSession={},p._meetingSessionState=xc($m,p._callObjectMode),p._nativeInCallAudioMode=Dm,p._participants={},p._isScreenSharing=!1,p._participantCounts=Um,p._rmpPlayerState={},p._waitingParticipants={},p._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},p._activeSpeaker={},p._localAudioLevel=0,p._isLocalAudioLevelObserverRunning=!1,p._remoteParticipantsAudioLevel={},p._isRemoteParticipantsAudioLevelObserverRunning=!1,p._maxAppMessageSize=pc,p._messageChannel=ie()?new jj:new Cj,p._iframe&&(p._iframe.requestFullscreen?p._iframe.addEventListener("fullscreenchange",function(){document.fullscreenElement===p._iframe?(p.emitDailyJSEvent({action:as}),p.sendMessageToCallMachine({action:as})):(p.emitDailyJSEvent({action:ls}),p.sendMessageToCallMachine({action:ls}))}):p._iframe.webkitRequestFullscreen&&p._iframe.addEventListener("webkitfullscreenchange",function(){document.webkitFullscreenElement===p._iframe?(p.emitDailyJSEvent({action:as}),p.sendMessageToCallMachine({action:as})):(p.emitDailyJSEvent({action:ls}),p.sendMessageToCallMachine({action:ls}))})),ie()){var B=p.nativeUtils();B.addAudioFocusChangeListener&&B.removeAudioFocusChangeListener&&B.addAppStateChangeListener&&B.removeAppStateChangeListener&&B.addSystemScreenCaptureStopListener&&B.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),p._hasNativeAudioFocus=!0,B.addAudioFocusChangeListener(p.handleNativeAudioFocusChange),B.addAppStateChangeListener(p.handleNativeAppStateChange),B.addSystemScreenCaptureStopListener(p.handleNativeSystemScreenCaptureStop)}return p._callObjectMode&&p.startListeningForDeviceChanges(),p._messageChannel.addListenerForMessagesFromCallMachine(p.handleMessageFromCallMachine,p.callClientId,p),p}
vendor: 4,961 bytes, line 288
288return gl(t,Oo),kt(t,[{key:"destroy",value:(ke=W(function*(){var c;try{yield this.leave()}catch{}var m=this._iframe;if(m){var p=m.parentElement;p&&p.removeChild(m)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),ie()){var S=this.nativeUtils();S.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),S.removeAppStateChangeListener(this.handleNativeAppStateChange),S.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete ln[this.callClientId],!((c=window)===null||c===void 0||(c=c._daily)===null||c===void 0)&&c.instances&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)}),function(){return ke.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(c){var m=c.bodyClass,p=c.cssFile,S=c.cssText;return re(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(p),bodyClass:m,cssText:S}),this}},{key:"iframe",value:function(){return re(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return Rt(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return Rt(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(c,m){for(var p in m){if(!Fo[p])throw new Error("unrecognized updateParticipant property ".concat(p));if(Fo[p].validate&&!Fo[p].validate(m[p],this,this._participants[c]))throw new Error(Fo[p].help)}}},{key:"updateParticipant",value:function(c,m){return this._participants.local&&this._participants.local.session_id===c&&(c="local"),c&&m&&(this.validateParticipantProperties(c,m),this.sendMessageToCallMachine({action:"update-participant",id:c,properties:m})),this}},{key:"updateParticipants",value:function(c){var m=this._participants.local&&this._participants.local.session_id;for(var p in c)p===m&&(p="local"),p&&c[p]&&this.validateParticipantProperties(p,c[p]);return this.sendMessageToCallMachine({action:"update-participants",participants:c}),this}},{key:"updateWaitingParticipant",value:(ce=W(function*(){var c=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Rt(this._callObjectMode,"updateWaitingParticipant()"),fe(this._callState,"updateWaitingParticipant()"),typeof m!="string"||se(p)!=="object")throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise(function(S,C){c.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:m,updates:p},function(N){N.error&&C(N.error),N.id||C(new Error("unknown error in updateWaitingParticipant()")),S({id:N.id})})})}),function(){return ce.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(q=W(function*(){var c=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Rt(this._callObjectMode,"updateWaitingParticipants()"),fe(this._callState,"updateWaitingParticipants()"),se(m)!=="object")throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise(function(p,S){c.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updatesById:m},function(C){C.error&&S(C.error),C.ids||S(new Error("unknown error in updateWaitingParticipants()")),p({ids:C.ids})})})}),function(){return q.apply(this,arguments)})},{key:"requestAccess",value:(V=W(function*(){var c=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=m.access,S=p===void 0?{level:g0}:p,C=m.name,N=C===void 0?"":C;return Rt(this._callObjectMode,"requestAccess()"),fe(this._callState,"requestAccess()"),new Promise(function(M,R){c.sendMessageToCallMachine({action:"daily-method-request-access",access:S,name:N},function(B){B.error&&R(B.error),B.access||R(new Error("unknown error in requestAccess()")),M({access:B.access,granted:B.granted})})})}),function(){return V.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(c){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return"forceDiscardTrack"in m&&(ie()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),m={}):c&&(console.warn("forceDiscardTrack option only supported when calling set
288LocalAudio(false); ignoring"),m={})),this.sendMessageToCallMachine({action:"local-audio",state:c,options:m}),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(c){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:c}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(c){return this.sendMessageToCallMachine({action:"local-video",state:c}),this}},{key:"_setAllowLocalAudio",value:function(c){if(this._preloadCache.allowLocalAudio=c,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-audio",state:c}),this}},{key:"_setAllowLocalVideo",value:function(c){if(this._preloadCache.allowLocalVideo=c,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-video",state:c}),this}},{key:"getReceiveSettings",value:($=W(function*(c){var m=this,p=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,S=p!==void 0&&p;if(Rt(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(se(c)){case"string":return new Promise(function(C){m.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:c,showInheritedValues:S},function(N){C(N.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(c){return $.apply(this,arguments)})},{key:"updateReceiveSettings",value:(Me=W(function*(c){var m=this;if(Rt(this._callObjectMode,"updateReceiveSettings()"),!Aw(c,{allowAllParticipantsKey:!0}))throw new Error(Lw({allowAllParticipantsKey:!0}));return fe(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise(function(p){m.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:c},function(S){p({receiveSettings:S.receiveSettings})})})}),function(c){return Me.apply(this,arguments)})},{key:"_prepInputSettingsForSharing",value:function(c,m){if(c){var p={};if(c.audio){var S,C,N;c.audio.settings&&(!Object.keys(c.audio.settings).length&&m||(p.audio={settings:z({},c.audio.settings)})),m&&(S=p.audio)!==null&&S!==void 0&&(S=S.settings)!==null&&S!==void 0&&S.customTrack&&(p.audio.settings={customTrack:this._sharedTracks.audioTrack});var M=((C=c.audio.processor)===null||C===void 0?void 0:C.type)==="none"&&((N=c.audio.processor)===null||N===void 0?void 0:N._isDefaultWhenNone);if(c.audio.processor&&!M){var R=z({},c.audio.processor);delete R._isDefaultWhenNone,p.audio=z(z({},p.audio),{},{processor:R})}}if(c.video){var B,X,ne;c.video.settings&&(!Object.keys(c.video.settings).length&&m||(p.video={settings:z({},c.video.settings)})),m&&(B=p.video)!==null&&B!==void 0&&(B=B.settings)!==null&&B!==void 0&&B.customTrack&&(p.video.settings={customTrack:this._sharedTracks.videoTrack});var Gt=((X=c.video.processor)===null||X===void 0?void 0:X.type)==="none"&&((ne=c.video.processor)===null||ne===void 0?void 0:ne._isDefaultWhenNone);if(c.video.processor&&!Gt){var nn=z({},c.video.processor);delete nn._isDefaultWhenNone,p.video=z(z({},p.video),{},{processor:nn})}}return p}}},{key:"getInputSettings",value:function(){var c=this;return re(),new Promise(function(m){m(c._getInputSettings())})}},{key:"_getInputSettings",value:function(){var c,m,p,S,C,N,M={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(c=((p=this._inputSettings)===null||p===void 0?void 0:p.video)||M,m=((S=this._inputSettings)===null||S===void 0?void 0:S.audio)||M):(c=((C=this._preloadCache)===null||C===void 0||(C=C.inputSettings)===null||C===void 0?void 0:C.video)||M,m=((N=this._preloadCache)===null||N===void 0||(N=N.inputSettings)===null||N===void 0?void 0:N.audio)||M);var R={audio:m,video:c};return this._prepInputSettingsForSharing(R,!0)}},{key:"_updatePreloadCacheInputSettings",value:function(c,m){var p=this._inputSettings||{},S={};if(c.video){var C,N,M;S.video={},c.video.settings?(S.video.settings={},m||c.video.settings.customTrack||(M=p.video)===null||M===void 0||!M.settings?S.video.settings=c.video.settings:S.video.settings=z(z({},p.video.settings),c.video.settings),Object.keys(S.video.settings).length||delete S.video.settings):(C=p.video)!==null&&C!==void 0&&C.settings&&(S.video.settings=p.video.settings),c.video.processor?S.video.processor=c.video.processor:(N=p.video)!==null&&N!==void 0&&N.processor&&(S.video.processor=p.video.processor)}else p.video&&(S.video=p.video);if(c.audio){var R,B,X;S.audio={},c.audio.settings?(S.audio.settings={},m||c.audio.settings.customTrack||(X=p.audio)===null||X===void 0||!X.settings?S.audio.settings=c.audio.settings:S.audio.settings=z(z({},p.audio.settings),c.audio.settings),Object.keys(S.audio.settings).length||delete S.audio.settings):(R=p.audio)!==null&&R!==void 0&&R.settings&&(S.audio.settings=p.audio.settings),c.audio.processor?S.audio.processor=c.audio.processor:(B=p.audio)!==null&&B!==void 0&&B.processor&&(S.audio.processor=p.audio.processor)}else p.audio&&(S.audio=p.audio);this._maybeUpdateInputSettings(S)}},{key:"_devicesFromInputSettings",value:function(c){var m,p,S=(c==null||(m=c.video)===null||m===void 0||(m=m.settings)===null||m===void 0?void 0:m.deviceId)||null,C=(c==null||(p=c.audio)===null||p===void 0||(p=p.settings)===null||p===void 0?void 0:p.deviceId)||null,N=this._preloadCache.outputDeviceId||null;return{camera:S?{deviceId:S}:{},mic:C?{deviceId:C}:{},speaker:N?{deviceId:N}:{}}}},{key:"updateInputSettings",value:(ye=W(function*(c){var m=this;return re(),Iw(c)?c.video||c.audio?(Mw(c,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(c,!0),this._getInputSettings()):new Promise(function(p,S){m.sendMessageToCallMachine({action:"update-input-sett
288ings",inputSettings:c},function(C){if(C.error)S(C.error);else{if(C.returnPreloadCache)return m._updatePreloadCacheInputSettings(c,!0),void p(m._getInputSettings());m._maybeUpdateInputSettings(C.inputSettings),p(m._prepInputSettingsForSharing(C.inputSettings,!0))}})})):this._getInputSettings():(console.error(od()),Promise.reject(od()))}),function(c){return ye.apply(this,arguments)})},{key:"setBandwidth",value:function(c){var m=c.kbs,p=c.trackConstraints;if(re(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:m,trackConstraints:p}),this}},{key:"getDailyLang",value:function(){var c=this;if(re(),this._callMachineInitialized)return new Promise(function(m){c.sendMessageToCallMachine({action:"get-daily-lang"},function(p){delete p.action,delete p.callbackStamp,m(p)})})}},{key:"setDailyLang",value:function(c){return re(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:c}),this}},{key:"setProxyUrl",value:function(c){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:c}),this}},{key:"setIceConfig",value:function(c){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:c}),this}},{key:"meetingSessionSummary",value:function(){return[Cr,sr].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(Ie=W(function*(){var c=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),fe(this._callState,"getMeetingSession()"),new Promise(function(m){c.sendMessageToCallMachine({action:"get-meeting-session"},function(p){delete p.action,delete p.callbackStamp,m(p)})})}),function(){return Ie.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return fe(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(c){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"replace";Rt(this._callObjectMode,"setMeetingSessionData()"),fe(this._callState,"setMeetingSessionData");try{(function(p,S){new Tj({data:p,mergeStrategy:S})})(c,m)}catch(p){throw console.error(p),p}try{this.sendMessageToCallMachine({action:"set-session-data",data:c,mergeStrategy:m})}catch(p){throw new Error("Error setting meeting session data: ".concat(p))}}},{key:"setUserName",value:function(c,m){var p=this;return this.properties.userName=c,new Promise(function(S){p.sendMessageToCallMachine({action:"set-user-name",name:c??"",thisMeetingOnly:ie()||!!m&&!!m.thisMeetingOnly},function(C){delete C.action,delete C.callbackStamp,S(C)})})}},{key:"setUserData",value:(xe=W(function*(c){var m=this;try{Nw(c)}catch(p){throw console.error(p),p}if(this.properties.userData=c,this._callMachineInitialized)return new Promise(function(p){try{m.sendMessageToCallMachine({action:"set-user-data",userData:c},function(S){delete S.action,delete S.callbackStamp,p(S)})}catch(S){throw new Error("Error setting user data: ".concat(S))}})}),function(c){return xe.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(c){if(c&&(c<100||typeof c!="number"))throw new Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(c){var m=this;if(typeof AudioWorkletNode>"u"&&!ie())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(c),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise(function(p,S){m.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:c},function(C){m._isLocalAudioLevelObserverRunning=!C.error,C.error?S({error:C.error}):p()})});this._preloadCache.localAudioLevelObserver={enabled:!0,interval:c}}},{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(c){var m=this;if(this.validateAudioLevelInterval(c),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise(function(p,S){m.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:c},function(C){m._isRemoteParticipantsAudioLevelObserverRunning=!C.error,C.error?S({error:C.error}):p()})});this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:c}}},{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:(le=W(function*(){var c=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Rt(this._callObjectMode,"startCamera()"),_c(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or set
288LocalVideo() instead?"),this.needsLoad())try{yield this.load(m)}catch(p){return Promise.reject(p)}else{if(this._didPreAuth){if(m.url&&m.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(m.token&&m.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(m),this.properties=z(z({},this.properties),m)}return new Promise(function(p){c._preloadCache.inputSettings=c._prepInputSettingsForSharing(c._inputSettings,!1),c.sendMessageToCallMachine({action:"start-camera",properties:Yn(c.properties,c.callClientId),preloadCache:Yn(c._preloadCache,c.callClientId)},function(S){p({camera:S.camera,mic:S.mic,speaker:S.speaker})})})}),function(){return le.apply(this,arguments)})},{key:"validateCustomTrack",value:function(c,m,p){if(p&&p.length>50)throw new Error("Custom track `trackName` must not be more than 50 characters");if(m&&m!=="music"&&m!=="speech"&&!(m instanceof Object))throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(p&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(p))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(!(c instanceof MediaStreamTrack))throw new Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var c=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName};return re(),fe(this._callState,"startCustomTrack()"),this.validateCustomTrack(m.track,m.mode,m.trackName),new Promise(function(p,S){c._sharedTracks.customTrack=m.track,m.track=pr,c.sendMessageToCallMachine({action:"start-custom-track",properties:m},function(C){C.error?S({error:C.error}):p(C.mediaTag)})})}},{key:"stopCustomTrack",value:function(c){var m=this;return re(),fe(this._callState,"stopCustomTrack()"),new Promise(function(p){m.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:c},function(S){p(S.mediaTag)})})}},{key:"setCamera",value:function(c){var m=this;return es(),Bo(this._callMachineInitialized,"setCamera()"),new Promise(function(p){m.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:c},function(S){p({device:S.device})})})}},{key:"setAudioDevice",value:(J=W(function*(c){return es(),this.nativeUtils().setAudioDevice(c),{deviceId:yield this.nativeUtils().getAudioDevice()}}),function(c){return J.apply(this,arguments)})},{key:"cycleCamera",value:function(){var c=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise(function(p){c.sendMessageToCallMachine({action:"cycle-camera",properties:m},function(S){p({device:S.device})})})}},{key:"cycleMic",value:function(){var c=this;return re(),new Promise(function(m){c.sendMessageToCallMachine({action:"cycle-mic"},function(p){m({device:p.device})})})}},{key:"getCameraFacingMode",value:function(){var c=this;return es(),new Promise(function(m){c.sendMessageToCallMachine({action:"get-camera-facing-mode"},function(p){m(p.facingMode)})})}},{key:"setInputDevicesAsync",value:(G=W(function*(c){var m=this,p=c.audioDeviceId,S=c.videoDeviceId,C=c.audioSource,N=c.videoSource;if(re(),C!==void 0&&(p=C),N!==void 0&&(S=N),typeof p=="boolean"&&(this._setAllowLocalAudio(p),p=void 0),typeof S=="boolean"&&(this._setAllowLocalVideo(S),S=void 0),!p&&!S)return yield this.getInputDevices();var M={};return p&&(p instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=p,p=pr,M.audio={settings:{customTrack:p}}):(delete this._sharedTracks.audioTrack,M.audio={settings:{deviceId:p}})),S&&(S instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=S,S=pr,M.video={settings:{customTrack:S}}):(delete this._sharedTracks.videoTrack,M.video={settings:{deviceId:S}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(M,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise(function(R){m.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:p,videoDeviceId:S},function(B){if(delete B.action,delete B.callbackStamp,B.returnPreloadCache)return m._updatePreloadCacheInputSettings(M,!1),void R(m._devicesFromInputSettings(m._inputSettings));R(B)})})}),function(c){return G.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(A=W(function*(c){var m=this,p=c.outputDeviceId;return re(),p&&(this._preloadCache.outputDeviceId=p),this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(S){m.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:p},function(C){delete C.action,delete C.callbackStamp,C.returnPreloadCache?S(m._devicesFromInputSettings(m._inputSettings)):S(C)})})}),function(c){return A.apply(this,arguments)})},{key:"getInputDevices",value:(Q=W(function*(){var c=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(m){c.sendMessageToCallMachine({action:"get-input-devices"},function(p){p.returnPreloadCache?m(c._devicesFromInputSettings(c._inputSettings)):m({camera:p.camera,mic:p.mic,speaker:p.speaker})})})}),function(){return Q.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return es(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(c){if(es(),[Dm,Gj].includes(c)){if(c!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=c,!this.disableReactNativeAutoDeviceManagement("audio")&&ia(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMo
vendor: 5,246 bytes, line 288
288de(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",c)}},{key:"preAuth",value:(D=W(function*(){var c=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Rt(this._callObjectMode,"preAuth()"),_c(this._callState,this._isPreparingToJoin,"preAuth()"),this.needsLoad()&&(yield this.load(m)),!m.url)throw new Error("preAuth() requires at least a url to be provided");return this.validateProperties(m),this.properties=z(z({},this.properties),m),new Promise(function(p,S){c._preloadCache.inputSettings=c._prepInputSettingsForSharing(c._inputSettings,!1),c.sendMessageToCallMachine({action:"daily-method-preauth",properties:Yn(c.properties,c.callClientId),preloadCache:Yn(c._preloadCache,c.callClientId)},function(C){return C.error?S(C.error):C.access?(c._didPreAuth=!0,void p({access:C.access})):S(new Error("unknown error in preAuth()"))})})}),function(){return D.apply(this,arguments)})},{key:"load",value:(P=W(function*(c){var m=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");if(c&&(this.validateProperties(c),this.properties=z(z({},this.properties),c)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(dm),this.emitDailyJSEvent({action:k0}),this._callObjectMode?new Promise(function(p,S){m._callObjectLoader.cancel();var C=Date.now();m._callObjectLoader.load(m.properties.dailyConfig,function(N){m._bundleLoadTime=N?"no-op":Date.now()-C,m._updateCallState(hm),N&&m.emitDailyJSEvent({action:Gu}),p()},function(N,M){if(m.emitDailyJSEvent({action:S0}),!M){m._updateCallState(sr),m.resetMeetingDependentVars();var R={action:Zu,errorMsg:N.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:N,bundleUrl:Ma(m.properties.dailyConfig)}}};m._maybeSendToSentry(R),m.emitDailyJSEvent(R),S(N.msg)}})}):(this._iframe.src=Zy(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise(function(p,S){m._loadedCallback=function(C){m._callState!==sr?(m._updateCallState(hm),(m.properties.cssFile||m.properties.cssText)&&m.loadCss(m.properties),p()):S(C)}}))}}),function(c){return P.apply(this,arguments)})},{key:"join",value:(T=W(function*(){var c=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();var p=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(m)}catch(S){return this.updateIsPreparingToJoin(!1),Promise.reject(S)}}else{if(p=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(m.url&&m.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(m.token&&m.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(m.url&&!this._callObjectMode&&m.url&&m.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(m.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(m),this.properties=z(z({},this.properties),m)}return m.showLocalVideo!==void 0&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!m.showLocalVideo),m.showParticipantsBar!==void 0&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!m.showParticipantsBar),this._callState===Mr||this._callState===Fa?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(Fa,!1),this.emitDailyJSEvent({action:j0}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:Yn(this.properties,this.callClientId),preloadCache:Yn(this._preloadCache,this.callClientId)}),new Promise(function(S,C){c._joinedCallback=function(N,M){if(c._callState!==sr){if(c._updateCallState(Mr),N)for(var R in N){if(c._callObjectMode){var B=c._callMachine().store;Em(N[R],B),Cm(N[R],B),jm(N[R],c._participants[R],B)}c._participants[R]=z({},N[R]),c.toggleParticipantAudioBasedOnNativeAudioFocus()}p&&c.loadCss(c.properties),S(N)}else C(M)}}))}),function(){return T.apply(this,arguments)})},{key:"leave",value:(j=W(function*(){var c=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise(function(m){c._callState===Cr||c._callState===sr?m():c._callObjectLoader&&!c._callObjectLoader.loaded?(c._callObjectLoader.cancel(),c._updateCallState(Cr),c.resetMeetingDependentVars(),c.emitDailyJSEvent({action:Cr}),m()):(c._resolveLeave=m,c.sendMessageToCallMachine({action:"leave-meeting"}))})}),function(){return j.apply(this,arguments)})},{key:"startScreenShare",value:(E=W(function*(){var c=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Bo(this._callMachineInitialized,"startScreenShare()"),m.screenVideoSendSettings&&this._val
288idateVideoSendSettings("screenVideo",m.screenVideoSendSettings),m.mediaStream&&(this._sharedTracks.screenMediaStream=m.mediaStream,m.mediaStream=pr),typeof DailyNativeUtils<"u"&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var p=this.nativeUtils();if(yield p.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:Xu,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});p.setSystemScreenCaptureStartCallback(function(){p.setSystemScreenCaptureStartCallback(null),c.sendMessageToCallMachine({action:pm,captureOptions:m})}),p.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:pm,captureOptions:m})}),function(){return E.apply(this,arguments)})},{key:"stopScreenShare",value:function(){Bo(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=c.type;if(m&&m!=="cloud"&&m!=="raw-tracks"&&m!=="local")throw new Error("invalid type: ".concat(m,", allowed values 'cloud', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine(z({action:"local-recording-start"},c))}},{key:"updateRecording",value:function(c){var m=c.layout,p=m===void 0?{preset:"default"}:m,S=c.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:p,instanceId:S})}},{key:"stopRecording",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(z({action:"local-recording-stop"},c))}},{key:"startLiveStreaming",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(z({action:"daily-method-start-live-streaming"},c))}},{key:"updateLiveStreaming",value:function(c){var m=c.layout,p=m===void 0?{preset:"default"}:m,S=c.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:p,instanceId:S})}},{key:"addLiveStreamingEndpoints",value:function(c){var m=c.endpoints,p=c.instanceId;this.sendMessageToCallMachine({action:mm,endpointsOp:_j,endpoints:m,instanceId:p})}},{key:"removeLiveStreamingEndpoints",value:function(c){var m=c.endpoints,p=c.instanceId;this.sendMessageToCallMachine({action:mm,endpointsOp:bj,endpoints:m,instanceId:p})}},{key:"stopLiveStreaming",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};
288this.sendMessageToCallMachine(z({action:"daily-method-stop-live-streaming"},c))}},{key:"validateDailyConfig",value:function(c){c.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(c.camSimulcastEncodings)),c.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),ww()&&c.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(c){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,p=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(c){if(!(c instanceof Array||Array.isArray(c)))throw new Error("encodings must be an Array");if(!Jm(c.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var S=0;S<c.length;S++){var C=c[S];for(var N in this._validateEncodingLayerHasValidProperties(C),C)if(wc.includes(N)){if(typeof C[N]!="number")throw new Error("".concat(N," must be a number"));if(m){var M=m[N],R=M.min,B=M.max;if(!Jm(C[N],R,B))throw new Error("".concat(N," value not in range. valid range: ").concat(R," to ").concat(B))}}else if(!["active","scalabilityMode"].includes(N))throw new Error("Invalid key ".concat(N,", valid keys are:")+Object.values(wc));if(p&&!C.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(y=W(function*(c){var m=this,p=c.url,S=c.settings,C=S===void 0?{state:ed.PLAY}:S;try{(function(N){if(typeof N!="string")throw new Error('url parameter must be "string" type')})(p),qm(C),function(N){for(var M in N)if(!Fm.includes(M))throw new Error("Invalid key ".concat(M,", valid keys are: ").concat(Fm));N.simulcastEncodings&&this.validateSimulcastEncodings(N.simulcastEncodings,Ow,!0)}(C)}catch(N){throw console.error("invalid argument Error: ".concat(N)),console.error(`startRemoteMediaPlayer arguments must be of the form:
289  { url: "playback url",
290  settings?:
291  {state: "play"|"pause", simulcastEncodings?: [{}] } }`),N}return new Promise(function(N,M){m.sendMessageToCallMachine({action:"daily-method-start-remote-media-player",url:p,settings:C},function(R){R.error?M({error:R.error,errorMsg:R.errorMsg}):N({session_id:R.session_id,remoteMediaPlayerState:{state:R.state,settings:R.settings}})})})}),function(c){return y.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(w=W(function*(c){var m=this;if(typeof c!="string")throw new Error(" remotePlayerID must be of type string");return new Promise(function(p,S){m.sendMessageToCallMachine({action:"daily-method-stop-remote-media-player",session_id:c},function(C){C.error?S({error:C.error,errorMsg:C.errorMsg}):p()})})}),function(c){return w.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(g=W(function*(c){var m=this,p=c.session_id,S=c.settings;try{qm(S)}catch(C){throw console.error("invalid argument Error: ".concat(C)),c
291onsole.error(`updateRemoteMediaPlayer arguments must be of the form:
292  session_id: "participant session",
293  { settings?: {state: "play"|"pause"} }`),C}return new Promise(function(C,N){m.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:p,settings:S},function(M){M.error?N({error:M.error,errorMsg:M.errorMsg}):C({session_id:M.session_id,remoteMediaPlayerState:{state:M.state,settings:M.settings}})})})}),function(c){return g.apply(this,arguments)})},{key:"startTranscription",value:function(c){fe(this._callState,"startTranscription()"),this.sendMessageToCallMachine(z({action:"daily-method-start-transcription"},c))}},{key:"updateTranscription",value:function(c){if(fe(this._callState,"updateTranscription()"),!c)throw new Error("updateTranscription Error: options is mandatory");if(se(c)!=="object")throw new Error("updateTranscription Error: options must be object type");if(c.participants&&!Array.isArray(c.participants))throw new Error("updateTranscription Error: participants must be an array");this.sendMessageToCallMachine(z({action:"daily-method-update-transcription"},c))}},{key:"stopTranscription",value:function(c){if(fe(this._callState,"stopTranscription()"),c&&se(c)!=="object")throw new Error("stopTranscription Error: options must be object type");if(c&&!c.instanceId)throw new Error('"instanceId" not provided');this.sendMessageToCallMachine(z({action:"daily-method-stop-transcription"},c))}},{key:"startDialOut",value:(b=W(function*(c){var m=this;fe(this._callState,"startDialOut()");var p=function(M){if(M){if(!Array.isArray(M))throw new Error("Error starting dial out: audio codec must be an array");if(M.length<=0)throw new Error("Error starting dial out: audio codec array specified but empty");M.forEach(function(R){if(typeof R!="string")throw new Error("Error starting dial out: audio codec must be a string");if(R!=="OPUS"&&R!=="PCMU"&&R!=="PCMA"&&R!=="G722")throw new Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")})}};if(!c.sipUri&&!c.phoneNumber)throw new Error("Error starting dial out: either a sip uri or phone number must be provided");if(c.sipUri&&c.phoneNumber)throw new Error("Error starting dial out: only one of sip uri or phone number must be provided");
vendor: 6,100 bytes, line 293
293if(c.sipUri){if(typeof c.sipUri!="string")throw new Error("Error starting dial out: sipUri must be a string");if(!c.sipUri.startsWith("sip:"))throw new Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(c.video&&typeof c.video!="boolean")throw new Error("Error starting dial out: video must be a boolean value");(function(M){if(M&&(p(M.audio),M.video)){if(!Array.isArray(M.video))throw new Error("Error starting dial out: video codec must be an array");if(M.video.length<=0)throw new Error("Error starting dial out: video codec array specified but empty");M.video.forEach(function(R){if(typeof R!="string")throw new Error("Error starting dial out: video codec must be a string");if(R!=="H264"&&R!=="VP8")throw new Error("Error starting dial out: video codec must be H264 or VP8")})}})(c.codecs)}if(c.phoneNumber){if(typeof c.phoneNumber!="string")throw new Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(c.phoneNumber))throw new Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");c.codecs&&p(c.codecs.audio)}if(c.callerId){if(typeof c.callerId!="string")throw new Error("Error starting dial out: callerId must be a string");if(c.sipUri)throw new Error("Error starting dial out: callerId not allowed with sipUri")}if(c.displayName){if(typeof c.displayName!="string")throw new Error("Error starting dial out: displayName must be a string");if(c.displayName.length>=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(c.userId){if(typeof c.userId!="string")throw new Error("Error starting dial out: userId must be a string");if(c.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}if(c.permissions&&c.permissions.canReceive){var S=Ke(Tw.validateJSONObject(c.permissions.canReceive),2),C=S[0],N=S[1];if(!C)throw new Error(N)}return new Promise(function(M,R){m.sendMessageToCallMachine(z({action:"dialout-start"},c),function(B){B.error?R(B.error):M(B)})})}),function(c){return b.apply(this,arguments)})},{key:"stopDialOut",value:function(c){var m=this;return fe(this._callState,"stopDialOut()"),new Promise(function(p,S){m.sendMessageToCallMachine(z({action:"dialout-stop"},c),function(C){C.error?S(C.error):p(C)})})}},{key:"sipCallTransfer",value:(v=W(function*(c){var m=this;if(fe(this._callState,"sipCallTransfer()"),!c)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return c.useSipRefer=!1,Vm(c,"sipCallTransfer"),new Promise(function(p,S){m.sendMessageToCallMachine(z({action:gm},c),function(C){C.error?S(C.error):p(C)})})}),function(c){return v.apply(this,arguments)})},{key:"sipRefer",value:(k=W(function*(c){var m=this;if(fe(this._callState,"sipRefer()"),!c)throw new Error("sessionId and toEndPoint are mandatory parameter");return c.useSipRefer=!0,Vm(c,"sipRefer"),new Promise(function(p,S){m.sendMessageToCallMachine(z({action:gm},c),function(C){C.error?S(C.error):p(C)})})}),function(c){return k.apply(this,arguments)})},{key:"sendDTMF",value:(x=W(function*(c){var m=this;return fe(this._callState,"sendDTMF()"),function(p){var S=p.sessionId,C=p.tones;if(!S||!C)throw new Error("sessionId and tones are mandatory parameter");if(typeof S!="string"||typeof C!="string")throw new Error("sessionId and tones should be of string type");if(C.length>20)throw new Error("tones string must be upto 20 characters");var N=/[^0-9A-D*#]/g,M=C.match(N);if(M&&M[0])throw new Error("".concat(M[0]," is not valid DTMF tone"))}(c),new Promise(function(p,S){m.sendMessageToCallMachine(z({action:"send-dtmf"},c),function(C){C.error?S(C.error):p(C)})})}),function(c){return x.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var c=this;return this._callState!==Mr?Promise.resolve(z({stats:{latest:{}}},this._network)):new Promise(function(m){c.sendMessageToCallMachine({action:"get-calc-stats"},function(p){m(z(z({},c._network),{},{stats:p.stats}))})})}},{key:"testWebsocketConnectivity",value:(_=W(function*(){var c=this;if(bc(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(m){return Promise.reject(m)}return new Promise(function(m,p){c.sendMessageToCallMachine({action:"test-websocket-connectivity"},function(S){S.error?p(S.error):m(S.results)})})}),function(){return _.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(c){return c?c instanceof MediaStreamTrack?!!Vj(c)||(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:(f=W(function*(){var c=this;re(),Rt(this._callObjectMode,"testCallQuality()"),Bo(this._callMachineInitialized,"testCallQuality()",null,!0),_c(this._callState,this._isPreparingToJoin,"testCallQuality()");var m=this._testCallAlreadyInProgress,p=function(C){m||(c._testCallInProgress=C)};if(p(!0),this.needsLoad())try{var S=this._callState;yield this.load(),this._callState=S}catch(C){return p(!1),Promise.reject(C)}return new Promise(function(C){c.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:c.properties.dailyJsVersion},function(N){var M=N.results,R=M.result,B=op(M,Wj);if(R==="failed"){var X,ne=z({},B);(X=B.error)!==null&&X!==void 0&&X.details?(B.error.details=JSON.parse(B.error.details),ne.error=z(z({},ne.error),{},{details:z({},ne.error.details)}),ne.error.details.duringTest="testCallQuality"):(ne.error=ne.error?z({},ne.error):{},ne.error.details={duringTest:"testCallQuality"}),c._maybeSendToSentry(ne)}p(!1),C(z({result:R},B))})})}),function(){return f.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(d=W(function*(c){var m;
293ie()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),m=yield this.testPeerToPeerCallQuality(c)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),m=yield this.testCallQuality());var p={result:m.result,secondsElapsed:m.secondsElapsed};return m.data&&(p.data={maxRTT:m.data.maxRoundTripTime,packetLoss:m.data.avgRecvPacketLoss}),p}),function(c){return d.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(u=W(function*(c){var m=this;if(bc(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(C){return Promise.reject(C)}var p=c.videoTrack,S=c.duration;if(!this._validateVideoTrackForNetworkTests(p))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=p,new Promise(function(C,N){m.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:S},function(M){M.error?N(M.error):C(M.results)})})}),function(c){return u.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){ie()?(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:(l=W(function*(c){var m=this;if(bc(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(p){return Promise.reject(p)}if(!this._validateVideoTrackForNetworkTests(c))throw new Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=c,new Promise(function(p,S){m.sendMessageToCallMachine({action:"test-network-connectivity"},function(C){C.error?S(C.error):p(C.results)})})}),function(c){return l.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var c=this;return new Promise(function(m){c._callState===Mr?c.sendMessageToCallMachine({action:"get-cpu-load-stats"},function(p){m(p.cpuStats)}):m({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})})}},{key:"_validateEncodingLayerHasValidProperties",value:function(c){var m;if(!(((m=Object.keys(c))===null||m===void 0?void 0:m.length)>0))throw new Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(wc))}},{key:"_validateVideoSendSettings",value:function(c,m){var p=c==="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"],S="Video send settings should be either an object or one of the supported presets: ".concat(p.join());if(typeof m=="string"){if(!p.includes(m))throw new Error(S)}else{if(se(m)!=="object")throw new Error(S);if(!m.maxQuality&&!m.encodings&&m.allowAdaptiveLayers===void 0)throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(m.maxQuality&&["low","medium","high"].indexOf(m.maxQuality)===-1)throw new Error("maxQuality must be either low, medium or high");if(m.encodings){var C=!1;switch(Object.keys(m.encodings).length){case 1:C=!m.encodings.low;break;case 2:C=!m.encodings.low||!m.encodings.medium;break;case 3:C=!m.encodings.low||!m.encodings.medium||!m.encodings.high;break;default:C=!0}if(C)throw new Error("Encodings must be defined as: low, low and medium, or low, medium and high.");m.encodings.low&&this._validateEncodingLayerHasValidProperties(m.encodings.low),m.encodings.medium&&this._validateEncodingLayerHasValidProperties(m.encodings.medium),m.encodings.high&&this._validateEncodingLayerHasValidProperties(m.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(c){var m=this;if(!c||Object.keys(c).length===0)throw new Error("Send settings must contain at least information for one track!");
vendor: 14,538 bytes, line 293
293Object.entries(c).forEach(function(p){var S=Ke(p,2),C=S[0],N=S[1];m._validateVideoSendSettings(C,N)})}},{key:"updateSendSettings",value:function(c){var m=this;return this.validateUpdateSendSettings(c),this.needsLoad()?(this._preloadCache.sendSettings=c,{sendSettings:this._preloadCache.sendSettings}):new Promise(function(p,S){m.sendMessageToCallMachine({action:"update-send-settings",sendSettings:c},function(C){C.error?S(C.error):p(C.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 re(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(c){return re(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:c}),this}},{key:"activeSpeakerMode",value:function(){return re(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(c){return fe(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=c,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:c}),this}},{key:"enumerateDevices",value:(a=W(function*(){var c=this;if(this._callObjectMode){var m=yield navigator.mediaDevices.enumerateDevices();return Mn()==="Firefox"&&Ba().major>115&&Ba().major<123&&(m=m.filter(function(p){return p.kind!=="audiooutput"})),{devices:m.map(function(p){var S=JSON.parse(JSON.stringify(p));if(!ie()&&p.kind==="videoinput"&&p.getCapabilities){var C,N=p.getCapabilities();S.facing=(N==null||(C=N.facingMode)===null||C===void 0?void 0:C.length)>=1?N.facingMode[0]:void 0}return S})}}return new Promise(function(p){c.sendMessageToCallMachine({action:"enumerate-devices"},function(S){p({devices:S.devices})})})}),function(){return a.apply(this,arguments)})},{key:"sendAppMessage",value:function(c){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"*";if(fe(this._callState,"sendAppMessage()"),JSON.stringify(c).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:c,to:m}),this}},{key:"addFakeParticipant",value:function(c){return re(),fe(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(z({action:"add-fake-participant"},c)),this}},{key:"setShowNamesMode",value:function(c){return pt(this._callObjectMode,"setShowNamesMode()"),re(),c&&c!=="always"&&c!=="never"?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:c}),this)}},{key:"setShowLocalVideo",value:function(){var c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return pt(this._callObjectMode,"setShowLocalVideo()"),re(),fe(this._callState,"setShowLocalVideo()"),typeof c!="boolean"?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:c}),this._showLocalVideo=c,this)}},{key:"showLocalVideo",value:function(){return pt(this._callObjectMode,"showLocalVideo()"),re(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return pt(this._callObjectMode,"setShowParticipantsBar()"),re(),fe(this._callState,"setShowParticipantsBar()"),typeof c!="boolean"?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:c}),this._showParticipantsBar=c,this)}},{key:"showParticipantsBar",value:function(){return pt(this._callObjectMode,"showParticipantsBar()"),re(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return re(),pt(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(c){return re(),pt(this._callObjectMode,"setCustomIntegrations()"),fe(this._callState,"setCustomIntegrations()"),$w(c)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:c}),this._customIntegrations=c,this):this}},{key:"startCustomIntegrations",value:function(c){var m=this;if(re(),pt(this._callObjectMode,"startCustomIntegrations()"),fe(this._callState,"startCustomIntegrations()"),Array.isArray(c)&&c.some(function(C){return typeof C!="string"})||!Array.isArray(c)&&typeof c!="string")return console.error("startCustomIntegrations() only accepts string | string[]"),this;var p=typeof c=="string"?[c]:c,S=p.filter(function(C){return!(C in m._customIntegrations)});return S.length?(console.error(`Can't find custom integration(s): "`.concat(S.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:p}),this)}},{key:"stopCustomIntegrations",value:function(c){var m=this;if(re(),pt(this._callObjectMode,"stopCustomIntegrations()"),fe(this._callState,"stopCustomIntegrations()"),Array.isArray(c)&&c.some(function(C){return typeof C!="string"})||!Array.isArray(c)&&typeof c!="string")return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var p=typeof c=="string"?[c]:c,S=p.filter(function(C){return!(C in m._customIntegrations)});return S.length?(console.error(`Can't find custom integration(s): "`.concat(S.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:p}),this)}},{key:"customTrayButtons",value:function(){return pt(this._callObjectMode,"customTrayButtons()"),re(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(c){return pt(this._callObjectMode,"updateCustomTrayButtons()"),re(),fe(this._callState,"updateCustomTrayButtons()"),Dw(c)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:c}),this._customTrayButtons=c,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(Va))),this)}},{key:"theme",value:function(){return pt(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(c){var m=this;return pt(this._callObjectMode,"setTheme()"),new Promise(function(p,S){try{m.validateProperties({theme:c}),m.properties.theme=z({},c),m.sendMessageToCallMachine({action:"set-theme",theme:m.properties.theme});try{m.emitDailyJSEvent({action:x0,theme:m.properties.theme})}catch(C){console.log("could not emit 'theme-updated'",C)}p(m.properties.theme)}catch(C){S(C)}})}},{key:"requestFullscreen",value:(o=W(function*(){if(re(),this._iframe&&!document.fullscreenElement&&vm())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(c){console.log("could not make video call fullscreen",c)}}),function(){return o.apply(this,arguments)})},{key:"exitFullscreen",value:function(){re(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(s=W(function*(){var c=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise(function(m){c.sendMessageToCallMachine({action:"get-sidebar-view"},function(p){m(p.view)})})}),function(){return s.apply(this,arguments)})},{key:"setSidebarView",value:function(c){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:c}),this)}},{key:"room",value:(i=W(function*(){var c=this,m=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,p=m===void 0||m;return this._accessState.access===ra||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise(function(S){c.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:p},function(C){delete C.action,delete C.callbackStamp,S(C)})})}),function(){return i.apply(this,arguments)})},{key:"geo",value:(n=W(function*(){try{var c=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield c.json()).geo}}catch(m){return console.error("geo lookup failed",m),{current:""}}}),function(){return n.apply(this,arguments)})},{key:"setNetworkTopology",value:(r=W(function*(c){var m=this;return re(),fe(this._callState,"setNetworkTopology()"),new Promise(function(p,S){m.sendMessageToCallMachine({action:"set-network-topology",opts:c},function(C){C.error?S({error:C.error}):p({workerId:C.workerId})})})}),function(c){return r.apply(this,arguments)})},{key:"getNetworkTopology",value:(e=W(function*(){var c=this;return new Promise(function(m,p){c.needsLoad()&&m({topology:"none"}),c.sendMessageToCallMachine({action:"get-network-topology"},function(S){S.error?p({error:S.error}):m({topology:S.topology})})})}),function(){return e.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(c){if(re(),typeof c!="number"&&c!==!0&&c!==!1)throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(c));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:c})}},{key:"on",value:function(c,m){return Oo.prototype.on.call(this,c,m)}},{key:"once",value:function(c,m){return Oo.prototype.once.call(this,c,m)}},{key:"off",value:function(c,m){return Oo.prototype.off.call(this,c,m)}},{key:"validateProperties",value:function(c){var m,p;if(c!=null&&(m=c.dailyConfig)!==null&&m!==void 0&&m.userMediaAudioConstraints){var S,C;ie()||console.warn("userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.");var N=c.inputSettings||{};N.audio=((S=c.inputSettings)===null||S===void 0?void 0:S.audio)||{},N.audio.settings=((C=c.inputSettings)===null||C===void 0||(C=C.audio)===null||C===void 0?void 0:C.settings)||{},N.audio.settings=z(z({},N.audio.settings),c.dailyConfig.userMediaAudioConstraints),c.inputSettings=N,delete c.dailyConfig.userMediaAudioConstraints}if(c!=null&&(p=c.dailyConfig)!==null&&p!==void 0&&p.userMediaVideoConstraints){var M,R;ie()||console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");var B=c.inputSettings||{};B.video=((M=c.inputSettings)===null||M===void 0?void 0:M.video)||{},B.video.settings=((R=c.inputSettings)===null||R===void 0||(R=R.video)===null||R===void 0?void 0:R.settings)||{},B.video.settings=z(z({},B.video.settings),c.dailyConfig.userMediaVideoConstraints),c.inputSettings=B,delete c.dailyConfig.userMediaVideoConstraints}for(var X in c){if(!cn[X])throw new Error("unrecognized property '".concat(X,"'"));if(cn[X].validate&&!cn[X].validate(c[X],this))throw new Error("property '".concat(X,"': ").concat(cn[X].help))}}},{key:"assembleMeetingUrl",value:function(){var c,m,p=z(z({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:(c=this.properties.dailyConfig)!==null&&c!==void 0&&c.proxyUrl?encodeURIComponent((m=this.properties.dailyConfig)===null||m===void 0?void 0:m.proxyUrl):void 0}),S=p.url.match(/\?/)?"&":"?";return p.url+S+Object.keys(cn).filter(function(C){return cn[C].queryString&&p[C]!==void 0}).map(function(C){return"".concat(cn[C].queryString,"=").concat(p[C])}).join("&")}},{key:"needsLoad",value:function(){return[Wu,dm,Cr,sr].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(c,m){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(c,m,this.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(c){this._messageChannel.forwardPackagedMessageToCallMachine(c,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(c){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(c,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(c){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(c)}},{key:"handleMessageFromCallMachine",value:function(c){switch(c.action){case _0:this.sendMessageToCallMachine(z({action:b0},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var m={action:$o,level:"log",code:1011,stats:{event:"bundle load",time:this._bundleLoadTime==="no-op"?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime==="no-op",url:Ma(this.properties.dailyConfig)}};this.sendMessageToCallMachine(m),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case Gu:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(c);break;case T0:var p,S=z({},c);delete S.internal,this._maxAppMessageSize=((p=c.internal)===null||p===void 0?void 0:p._maxAppMessageSize)||pc,this._joinedCallback&&(this._joinedCallback(c.participants),this._joinedCallback=null),this.emitDailyJSEvent(S);break;case O0:case N0:if(this._callState===Cr)return;if(c.participant&&c.participant.session_id){var C=c.participant.local?"local":c.participant.session_id;if(this._callObjectMode){var N=this._callMachine().store;Em(c.participant,N),Cm(c.participant,N),jm(c.participant,this._participants[C],N)}try{this.maybeParticipantTracksStopped(this._participants[C],c.participant),this.maybeParticipantTracksStarted(this._participants[C],c.participant),this.maybeEventRecordingStopped(this._participants[C],c.participant),this.maybeEventRecordingStarted(this._participants[C],c.participant)}catch(Qw){console.error("track events error",Qw)}this.compareEqualForParticipantUpdateEvent(c.participant,this._participants[C])||(this._participants[C]=z({},c.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(c))}break;case A0:if(c.participant&&c.participant.session_id){var M=this._participants[c.participant.session_id];M&&this.maybeParticipantTracksStopped(M,null),delete this._participants[c.participant.session_id],this.emitDailyJSEvent(c)}break;case I0:tt(this._participantCounts,c.participantCounts)||(this._participantCounts=c.participantCounts,this.emitDailyJSEvent(c));break;case M0:var R={access:c.access}
293;c.awaitingAccess&&(R.awaitingAccess=c.awaitingAccess),tt(this._accessState,R)||(this._accessState=R,this.emitDailyJSEvent(c));break;case L0:if(c.meetingSession){this._meetingSessionSummary=c.meetingSession,this.emitDailyJSEvent(c);var B=z(z({},c),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(B)}break;case Zu:var X;this._iframe&&!c.preserveIframe&&(this._iframe.src=""),this._updateCallState(sr),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(c.errorMsg),this._loadedCallback=null),c.preserveIframe;var ne=op(c,Hj);ne!=null&&(X=ne.error)!==null&&X!==void 0&&X.details&&(ne.error.details=JSON.parse(ne.error.details)),this._maybeSendToSentry(c),this._joinedCallback&&(this._joinedCallback(null,ne),this._joinedCallback=null),this.emitDailyJSEvent(ne);break;case P0:this._callState!==sr&&this._updateCallState(Cr),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(c);break;case"selected-devices-updated":c.devices&&this.emitDailyJSEvent(c);break;case sw:var Gt=c.state,nn=c.threshold,Fi=c.quality,De=Gt.state,St=Gt.reasons;De===this._network.networkState&&tt(St,this._network.networkStateReasons)&&nn===this._network.threshold&&Fi===this._network.quality||(this._network.networkState=De,this._network.networkStateReasons=St,this._network.quality=Fi,this._network.threshold=nn,c.networkState=De,St.length&&(c.networkStateReasons=St),delete c.state,this.emitDailyJSEvent(c));break;case aw:c&&c.cpuLoadState&&this.emitDailyJSEvent(c);break;case lw:c&&c.faceCounts!==void 0&&this.emitDailyJSEvent(c);break;case nw:var sn=c.activeSpeaker;this._activeSpeaker.peerId!==sn.peerId&&(this._activeSpeaker.peerId=sn.peerId,this.emitDailyJSEvent({action:c.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var Bi=c.show;this._showLocalVideo=Bi,this.emitDailyJSEvent({action:c.action,show:Bi});break;case iw:var so=c.enabled;this._activeSpeakerMode!==so&&(this._activeSpeakerMode=so,this.emitDailyJSEvent({action:c.action,enabled:this._activeSpeakerMode}));break;case D0:case $0:case U0:this._waitingParticipants=c.allWaitingParticipants,this.emitDailyJSEvent({action:c.action,participant:c.participant});break;case pw:tt(this._receiveSettings,c.receiveSettings)||(this._receiveSettings=c.receiveSettings,this.emitDailyJSEvent({action:c.action,receiveSettings:c.receiveSettings}));break;case Qu:this._maybeUpdateInputSettings(c.inputSettings);break;case"send-settings-updated":tt(this._sendSettings,c.sendSettings)||(this._sendSettings=c.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:c.action,sendSettings:c.sendSettings}));break;case"local-audio-level":this._localAudioLevel=c.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(c);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=c.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(c);break;case Q0:var zi=c.session_id;this._rmpPlayerState[zi]=c.playerState,this.emitDailyJSEvent(c);break;case Z0:delete this._rmpPlayerState[c.session_id],this.emitDailyJSEvent(c);break;case X0:var Vi=c.session_id,Sh=this._rmpPlayerState[Vi];Sh&&this.compareEqualForRMPUpdateEvent(Sh,c.remoteMediaPlayerState)||(this._rmpPlayerState[Vi]=c.remoteMediaPlayerState,this.emitDailyJSEvent(c));break;case"custom-button-click":case"sidebar-view-changed":this.emitDailyJSEvent(c);break;case R0:var Kw=this._meetingSessionState.topology!==(c.meetingSessionState&&c.meetingSessionState.topology);this._meetingSessionState=xc(c.meetingSessionState,this._callObjectMode),(this._callObjectMode||Kw)&&this.emitDailyJSEvent(c);break;case ew:this._isScreenSharing=!0,this.emitDailyJSEvent(c);break;case tw:case rw:this._isScreenSharing=!1,this.emitDailyJSEvent(c);break;case Yu:case Ku:case J0:case W0:case H0:case z0:case V0:case q0:case E0:case C0:case Y0:case K0:case"test-completed":case ow:case G0:case cw:case uw:case dw:case hw:case Xu:case fw: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(c);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(c,m){var p="record";c&&(m.local||m[p]!==!1||c[p]===m[p]||this.emitDailyJSEvent({action:Ku}))}},{key:"maybeEventRecordingStarted",value:function(c,m){var p="record";c&&(m.local||m[p]!==!0||c[p]===m[p]||this.emitDailyJSEvent({action:Yu}))}},{key:"_trackStatePlayable",value:function(c){return!(!c||c.state!==m0)}},{key:"_trackChanged",value:function(c,m){return(c==null?void 0:c.id)!==(m==null?void 0:m.id)}},{key:"maybeEventTrackStopped",value:function(c,m,p){var S,C,N=(S=m==null?void 0:m.tracks[c])!==null&&S!==void 0?S:null,M=(C=p==null?void 0:p.tracks[c])!==null&&C!==void 0?C:null,R=N==null?void 0:N.track;if(R){var B=this._trackStatePlayable(N),X=this._trackStatePlayable(M),ne=this._trackChanged(R,M==null?void 0:M.track);B&&(X&&!ne||this.emitDailyJSEvent({action:B0,track:R,participant:p??m,type:c}))}}},{key:"maybeEventTrackStarted",value:function(c,m,p){var S,C,N=(S=m==null?void 0:m.tracks[c])!==null&&S!==void 0?S:null,M=(C=p==null?void 0:p.tracks[c])!==null&&C!==void 0?C:null,R=M==null?void 0:M.track;if(R){var B=this._trackStatePlayable(N),X=this._trackStatePlayable(M),ne=this._trackChanged(N==null?void 0:N.track,R);X&&(B&&!ne||this.emitDailyJSEvent({action:F0,track:R,participant:p,type:c}))}}},{key:"maybeParticipantTracksStopped",value:function(c,m){if(c)for(var p in c.tracks)this.maybeEventTrackStopped(p,c,m)}},{key:"maybeParticipantTracksStarted",value:function(c,m){if(m)for(var p in m.tracks)this.maybeEventTrackStarted(p,c,m)}},{key:"compareEqualForRMPUpdateEvent",value:function(c,m){var p,S;return c.state===m.state&&((p=c.settings)===null||p===void 0?void 0:p.volume)===((S=m.settings)===null||S===void 0?void 0:S.volume)}},{key:"emitDailyJSEvent",value:function(c){try{c.callClientId=this.callClientId,this.emit
293(c.action,c)}catch(m){console.log("could not emit",c,m)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(c,m){return!!tt(c,m)&&(!c.videoTrack||!m.videoTrack||c.videoTrack.id===m.videoTrack.id&&c.videoTrack.muted===m.videoTrack.muted&&c.videoTrack.enabled===m.videoTrack.enabled)&&(!c.audioTrack||!m.audioTrack||c.audioTrack.id===m.audioTrack.id&&c.audioTrack.muted===m.audioTrack.muted&&c.audioTrack.enabled===m.audioTrack.enabled)}},{key:"nativeUtils",value:function(){return ie()?typeof DailyNativeUtils>"u"?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(c){this._updateCallState(this._callState,c)}},{key:"_updateCallState",value:function(c){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(c!==this._callState||m!==this._isPreparingToJoin){var p=this._callState,S=this._isPreparingToJoin;this._callState=c,this._isPreparingToJoin=m;var C=this._callState===Mr;this.updateShowAndroidOngoingMeetingNotification(C);var N=ia(p,S),M=ia(this._callState,this._isPreparingToJoin);N!==M&&(this.updateKeepDeviceAwake(M),this.updateDeviceAudioMode(M),this.updateNoOpRecordingEnsuringBackgroun
vendor: 1,530 bytes, line 293
293dContinuity(M))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=Um,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:ra},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=xc($m,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=pc,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(c){ie()&&this.nativeUtils().setKeepDeviceAwake(c,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(c){if(ie()&&!this.disableReactNativeAutoDeviceManagement("audio")){var m=c?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(m)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(c){if(ie()&&this.nativeUtils().setShowOngoingMeetingNotification){var m,p,S,C;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var N=this.properties.reactNativeConfig.androidInCallNotification;m=N.title,p=N.subtitle,S=N.iconName,C=N.disableForCustomOverride}C&&(c=!1),this.nativeUtils().setShowOngoingMeetingNotification(c,m,p,S,this.callClientId)}}}
293,{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(c){ie()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(c)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var c;if(ie()){var m=(c=this._callMachine())===null||c===void 0||(c=c.store)===null||c===void 0?void 0:c.getState();for(var p in m==null?void 0:m.streams){var S=m.streams[p];S&&S.pendingTrack&&S.pendingTrack.kind==="audio"&&(S.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(c){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[c]}},{key:"absoluteUrl",value:function(c){if(c!==void 0){var m=document.createElement("a");return m.href=c,m.href}}},{key:"sayHello",value:function(){var c="hello, world.";return console.log(c),c}},{key:"_logUseAfterDestroy",value:function(){var c=Object.values(ln)[0];if(this.needsLoad())if(c&&!c.needsLoad()){var m={action:$o,level:"error",code:this.strictMode?9995:9997};c.sendMessageToCallMachine(m)}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 p={action:$o,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(p,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var c=0,m=Object.values(ln);c<m.length;c++){var p=m[c];p._callMachineInitialized?(p.sendMessageToCallMachine({action:$o,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),p._delayDuplicateInstanceLog=!1):p._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(c){var m,p,S,C;if(!((m=c.error)!==null&&m!==void 0&&m.type&&(![w0,y0,Hu].includes(c.error.type)||c.error.type===Hu&&c.error.msg.includes("deleted")))){var N=(p=this.properties)!==null&&p!==void 0&&p.url?new URL(this.properties.url):void 0,M="production";N&&N.host.includes(".staging.daily")&&(M="staging");var R,B,X,ne,Gt,nn=function(zi){const Vi=[gC(),pC(),zC(),FC(),HC(),YC(),_C(),GC()];return zi.autoSessionTracking!==!1&&Vi.push(WC()),Vi}({}).filter(function(zi){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(zi.name)}),Fi=new TC({dsn:"https://[email protected]/168844",transport:IC,stackParser:UC,integrations:nn,environment:M}),De=new Xr;if(De.setClient(Fi),Fi.init(),this.session_id&&De.setExtra("sessionId",this.session_id),this.properties){var St=z({},this.properties);St.userName=St.userName?"[Filtered]":void 0,St.userData=St.userData?"[Filtered]":void 0,St.token=St.token?"[Filtered]":void 0,De.setExtra("properties",St)}if(N){var sn=N.searchParams.get("domain");if(!sn){var Bi=N.host.match(/(.*?)\./);sn=Bi&&Bi[1]||""}sn&&De.setTag("domain",sn)}c.error&&(De.setTag("fatalErrorType",c.error.type),De.setExtra("errorDetails",c.error.details),!((R=c.error.details)===null||R===void 0)&&R.uri&&De.setTag("serverAddress",c.error.details.uri),!((B=c.error.details)===null||B===void 0)&&B.workerGroup&&De.setTag("workerGroup",c.error.details.workerGroup),!((X=c.error.details)===null||X===void 0)&&X.geoGroup&&De.setTag("geoGroup",c.error.details.geoGroup),!((ne=c.error.details)===null||ne===void 0)&&ne.on&&De.setTag("connectionAttempt",c.error.details.on),(Gt=c.error.details)!==null&&Gt!==void 0&&Gt.bundleUrl&&(De.setTag("bundleUrl",c.error.details.bundleUrl),De.setTag("bundleError",c.error.details.sourceError.type))),De.setTags({callMode:this._callObjectMode?ie()?"reactNative":(S=this.properties)!==null&&S!==void 0&&(S=S.dailyConfig)!==null&&S!==void 0&&(S=S.callMode)!==null&&S!==void 0&&S.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:t.version()});var so=((C=c.error)===null||C===void 0?void 0:C.msg)||c.errorMsg;De.captureException(new Error(so))}}},{key:"_callMachine",value:function(){var c;return(c=window._daily)===null||c===void 0||(c=c.instances)===null||c===void 0||(c=c[this.callClientId])===null||c===void 0?void 0:c.callMachine}},{key:"_maybeUpdateInputSettings",value:function(c){if(!tt(this._inputSettings,c)){var m=this._getInputSettings();this._inputSettings=c;var p=this._getInputSettings();tt(m,p)||this.emitDailyJSEvent({action:Qu,inputSettings:p})}}}],[{key:"supportedBrowser",value:function(){if(ie())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var c=RE.getParser(Mt());return{supported:!!ym(),mobile:c.getPlatformType()==="mobile",name:c.getBrowserName(),version:c.getBrowserVersion(),supportsFullscreen:!!vm(),supportsScreenShare:!!xj(),supportsSfu:!!ym(),supportsVideoProcessing:vw(),supportsAudioProcessing:yw()}}},{key:"version",value:function(){return"0.80.0"}},{key:"createCallObject",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return c.layout="none",new t(null,c)}},{key:"wrap",value:function(c){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(re(),!c||!c.contentWindow||typeof c.src!="string")throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return m.layout||(m.customLayout?m.layout="custom-v1":m.layout="browser"),new t(c,m)}},{key:"createFrame",value:function(c,m){var p,S;re(),c&&m?(p=c,S=m):c&&c.append?(p=c,S={}):(p=document.body,S=c||{});
vendor: 6,262 bytes, lines 293-301
293var C=S.iframeStyle;C||(C=p===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 N=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?N.allow="microphone, camera":N.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",N.style.visibility="hidden",p.appendChild(N),N.style.visibility=null,Object.keys(C).forEach(function(M){return N.style[M]=C[M]}),S.layout||(S.customLayout?S.layout="custom-v1":S.layout="browser");try{return new t(N,S)}catch(M){throw p.removeChild(N),M}}},{key:"createTransparentFrame",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};re();var m=document.createElement("iframe");return m.allow="microphone; camera; autoplay",m.style.cssText=`
294      position: fixed;
295      top: 0;
296      left: 0;
297      width: 100%;
298      height: 100%;
299      border: 0;
300      pointer-events: none;
301    `,document.body.appendChild(m),c.layout||(c.layout="custom-v1"),t.wrap(m,c)}},{key:"getCallInstance",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return c?ln[c]:Object.values(ln)[0]}}]);var e,r,n,i,s,o,a,l,u,d,f,_,x,k,v,b,g,w,y,E,j,T,P,D,Q,A,G,J,le,xe,Ie,ye,Me,$,V,q,ce,ke}();function Yn(t,e){var r={};for(var n in t)if(t[n]instanceof MediaStreamTrack)console.warn("MediaStreamTrack found in props or cache.",n),r[n]=pr;else if(n==="dailyConfig"){if(t[n].modifyLocalSdpHook){var i=window._daily.instances[e].customCallbacks||{};i.modifyLocalSdpHook=t[n].modifyLocalSdpHook,window._daily.instances[e].customCallbacks=i,delete t[n].modifyLocalSdpHook}if(t[n].modifyRemoteSdpHook){var s=window._daily.instances[e].customCallbacks||{};s.modifyRemoteSdpHook=t[n].modifyRemoteSdpHook,window._daily.instances[e].customCallbacks=s,delete t[n].modifyRemoteSdpHook}r[n]=t[n]}else r[n]=t[n];return r}function fe(t){var e=arguments.length>2?arguments[2]:void 0;if(t!==Mr){var r="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," only supported after join.");throw e&&(r+=" ".concat(e)),console.error(r),new Error(r)}}function ia(t,e){return[Fa,Mr].includes(t)||e}function _c(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"This daily-js method",n=arguments.length>3?arguments[3]:void 0;if(ia(t,e)){var i="".concat(r," not supported after joining a meeting.");throw n&&(i+=" ".concat(n)),console.error(i),new Error(i)}}function Bo(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method",r=arguments.length>2?arguments[2]:void 0;if(!t){var n="".concat(e,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&&(n+=" ".concat(r)),console.error(n),new Error(n)}}function bc(t){if(t){var e="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(e),new Error(e)}}function Rt(t){if(!t){var e="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(e),new Error(e)}}function pt(t){if(t){var e="".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(e),new Error(e)}}function re(){if(ie())throw new Error("This daily-js method is not currently supported in React Native")}function es(){if(!ie())throw new Error("This daily-js method is only supported in React Native")}function Nw(t){if(t===void 0)return!0;var e;if(typeof t=="string")e=t;else try{e=JSON.stringify(t),tt(JSON.parse(e),t)||console.warn("The userData provided will be modified when serialized.")}catch(r){throw Error("userData must be serializable to JSON: ".concat(r))}if(e.length>4096)throw Error("userData is too large (".concat(e.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function Aw(t,e){for(var r=e.allowAllParticipantsKey,n=function(f){var _=["local"];return r||_.push("*"),f&&!_.includes(f)},i=function(f){return!!(f.layer===void 0||Number.isInteger(f.layer)&&f.layer>=0||f.layer==="inherit")},s=function(f){return!!f&&!(f.video&&!i(f.video))&&!(f.screenVideo&&!i(f.screenVideo))},o=0,a=Object.entries(t);o<a.length;o++){var l=Ke(a[o],2),u=l[0],d=l[1];if(!n(u)||!s(d))return!1}return!0}function Iw(t){if(se(t)!=="object")return!1;for(var e=0,r=Object.entries(t);e<r.length;e++){var n=Ke(r[e],2),i=n[0],s=n[1];switch(i){case"video":if(se(s)!=="object")return!1;for(var o=0,a=Object.entries(s);o<a.length;o++){var l=Ke(a[o],2),u=l[0],d=l[1];switch(u){case"processor":if(!Qj(d))return!1;break;case"settings":if(!zm(d))return!1;break;default:return!1}}break;case"audio":if(se(s)!=="object")return!1;for(var f=0,_=Object.entries(s);f<_.length;f++){var x=Ke(_[f],2),k=x[0],v=x[1];switch(k){case"processor":if(!Kj(v))return!1;break;case"settings":if(!zm(v))return!1;break;default:return!1}}break;default:return!1}}return!0}function Mw(t,e,r){var n,i=[];t.video&&t.video.processor&&(vw((n=e==null?void 0:e.useLegacyVideoProcessor)!==null&&n!==void 0&&n)||(t.video.settings?delete t.video.processor:delete t.video,i.push("video"))),t.audio&&t.audio.processor&&(yw()||(t.audio.settings?delete t.audio.processor:delete t.audio,i.push("audio"))),i.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(i.join(", "))),t.audio&&t.audio.settings&&(t.audio.settings.customTrack?(r.audioTrack=t.audio.settings.customTrack,t.audio.settings={customTrack:pr}):delete r.audioTrack),t.video&&t.video.settings&&(t.video.settings.customTrack?(r.videoTrack=t.video.settings.customTrack,t.video.settings={customTrack:pr}):delete r.videoTrack)}function Kj(t){if(ie())return console.warn("Video processing is not yet supported in React Native"),!1;var e=["type"];return!!t&&se(t)==="object"&&(Object.keys(t).filter(function(r){return!e.includes(r)}
301).forEach(function(r){console.warn("invalid key inputSettings -> audio -> processor : ".concat(r)),delete t[r]}),!!function(r){return typeof r!="string"?!1:Object.values(mw).includes(r)?!0:(console.error("inputSettings audio processor type invalid"),!1)}(t.type))}function Qj(t){if(ie())return console.warn("Video processing is not yet supported in React Native"),!1;var e=["type","config"];return!t||se(t)!=="object"||!function(r){return typeof r!="string"?!1:Object.values(na).includes(r)?!0:(console.error("inputSettings video processor type invalid"),!1)}(t.type)||t.config&&(se(t.config)!=="object"||!function(r,n){var i=Object.keys(n);if(i.length===0)return!0;var s="invalid object in inputSettings -> video -> processor -> config";switch(r){case na.BGBLUR:return i.length>1||i[0]!=="strength"?(console.error(s),!1):!(typeof n.strength!="number"||n.strength<=0||n.strength>1||isNaN(n.strength))||(console.error("".concat(s,"; expected: {0 < strength <= 1}, got: ").concat(n.strength)),!1);case na.BGIMAGE:return!(n.source!==void 0&&!function(o){if(o.source==="default")return o.type="default",!0;if(o.source instanceof ArrayBuffer)return!0;if(La(o.source))return o.type="url",!!function(u){var d=new URL(u),f=d.pathname;if(d.protocol==="data:")try{var _=f.substring(f.indexOf(":")+1,f.indexOf(";")).split("/")[1];return gc.includes(_)}catch(k){return console.error("failed to deduce blob content type",k),!1}var x=f.split(".").at(-1).toLowerCase().trim();return gc.includes(x)}(o.source)||(console.error("invalid image type; supported types: [".concat(gc.join(", "),"]")),!1);return a=o.source,l=Number(a),isNaN(l)||!Number.isInteger(l)||l<=0||l>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(o.type="daily-preselect",!0);var a,l}(n));default:return!0}}(t.type,t.config))?!1:(Object.keys(t).filter(function(r){return!e.includes(r)}).forEach(function(r){console.warn("invalid key inputSettings -> video -> processor : ".concat(r)),delete t[r]}),!0)}function zm(t){return se(t)==="object"&&(!t.customTrack||t.customTrack instanceof MediaStreamTrack)}function od(){var t=Object.values(na).join(" | "),e=Object.values(mw).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(t," ], config?: {} } }, audio?: { processor: {type: [ ").concat(e," ] } } }")}function Lw(t){var e=t.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(v0).concat(e?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function Rw(){return"customIntegrations should be an object of type ".concat(JSON.stringify(sd),".")}function Dw(t){if(t&&se(t)!=="object"||Array.isArray(t))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(Va),".")),!1;if(t)for(var e=0,r=Object.entries(t);e<r.length;e++)for(var n=Ke(r[e],1)[0],i=0,s=Object.entries(t[n]);i<s.length;i++){var o=Ke(s[i],2),a=o[0],l=o[1],u=Va.id[a];if(!u)return console.error("customTrayButton does not support key ".concat(a)),!1;switch(a){case"iconPath":case"iconPathDarkMode":if(!La(l))return console.error("customTrayButton ".concat(a," should be a url.")),!1;break;case"visualState":if(!["default","sidebar-open","active"].includes(l))return console.error("customTrayButton ".concat(a," should be ").concat(u,". Got: ").concat(l)),!1;break;default:if(se(l)!==u)return console.error("customTrayButton ".concat(a," should be a ").concat(u,".")),!1}}return!0}function $w(t){if(!t||t&&se(t)!=="object"||Array.isArray(t))return console.error(Rw()),!1;for(var e=function(f){return"".concat(f," should be ").concat(sd.id[f])},r=function(f,_){return console.error("customIntegration ".concat(f,": ").concat(_))},n=0,i=Object.entries(t);n<i.length;n++){var s=Ke(i[n],1)[0];if(!("label"in t[s]))return r(s,"label is required"),!1;if(!("location"in t[s]))return r(s,"location is required"),!1;if(!("src"in t[s])&&!("srcdoc"in t[s]))return r(s,"src or srcdoc is required"),!1;for(var o=0,a=Object.entries(t[s]);o<a.length;o++){var l=Ke(a[o],2),u=l[0],d=l[1];switch(u){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if(typeof d!="string")return r(s,e(u)),!1;break;case"iconURL":if(!La(d))return r(s,"".concat(u," should be a url")),!1;break;case"src":if("srcdoc"in t[s])return r(s,"cannot have both src and srcdoc"),!1;if(!La(d))return r(s,'src "'.concat(d,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in t[s])return r(s,"cannot have both src and srcdoc"),!1;if(typeof d!="string")return r(s,e(u)),!1;break;case"location":if(!["main","sidebar"].includes(d))return r(s,e(u)),!1;break;case"controlledBy":if(d!=="*"&&d!=="owners"&&(!Array.isArray(d)||d.some(function(f){return typeof f!="string"})))return r(s,e(u)),!1;break;case"shared":if((!Array.isArray(d)||d.some(function(f){return typeof f!="string"}))&&d!=="owners"&&typeof d!="boolean")return r(s,e(u)),!1;break;default:if(!sd.id[u])return console.error("customIntegration does not support key ".concat(u)),!1}}}return!0}function Uw(t,e){if(e===void 0)return!1;switch(se(e)){case"string":return se(t)===e;case"object":if(se(t)!=="object")return!1;for(var r in t)if(!Uw(t[r],e[r]))return!1;return!0;default:return!1}}function Vm(t,e){var r=t.sessionId,n=t.toEndPoint,i=t.callerId,s=t.useSipRefer;if(!r||!n)throw new Error("".concat(e,"() requires a sessionId and toEndPoint"));
301if(typeof r!="string"||typeof n!="string")throw new Error("Invalid paramater: sessionId and toEndPoint must be of type string");if(s&&!n.startsWith("sip:"))throw new Error('"toEndPoint" must be a "sip" address');if(!n.startsWith("sip:")&&!n.startsWith("+"))throw new Error("toEndPoint: ".concat(n,' must starts with either "sip:" or "+"'));if(i&&typeof i!="string")throw new Error("callerId must be of type string");if(i&&!n.startsWith("+"))throw new Error("callerId is only valid when transferring to a PSTN number")}function qm(t){if(se(t)!=="object")throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(t.state&&!Object.values(ed).includes(t.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(ed));if(t.volume){if(typeof t.volume!="number")throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(t.volume<0||t.volume>2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function Jm(t,e,r){return!(typeof t!="number"||t<e||t>r)}function xc(t,e){return t&&!e&&delete t.data,t}const Xj=Object.freeze(Object.defineProperty({__proto__:null,DAILY_ACCESS_LEVEL_FULL:g0,DAILY_ACCESS_LEVEL_LOBBY:tj,DAILY_ACCESS_LEVEL_NONE:rj,DAILY_ACCESS_UNKNOWN:ra,DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE:fj,DAILY_CAMERA_ERROR_CAM_IN_USE:dj,DAILY_CAMERA_ERROR_CONSTRAINTS:vj,DAILY_CAMERA_ERROR_MIC_IN_USE:hj,DAILY_CAMERA_ERROR_NOT_FOUND:gj,DAILY_CAMERA_ERROR_PERMISSIONS:pj,DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES:mj,DAILY_CAMERA_ERROR_UNKNOWN:yj,DAILY_EVENT_ACCESS_STATE_UPDATED:M0,DAILY_EVENT_ACTIVE_SPEAKER_CHANGE:nw,DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE:iw,DAILY_EVENT_APP_MSG:Y0,DAILY_EVENT_CAMERA_ERROR:C0,DAILY_EVENT_CPU_LOAD_CHANGE:aw,DAILY_EVENT_ERROR:Zu,DAILY_EVENT_EXIT_FULLSCREEN:ls,DAILY_EVENT_FACE_COUNTS_UPDATED:lw,DAILY_EVENT_FULLSCREEN:as,DAILY_EVENT_IFRAME_LAUNCH_CONFIG:b0,DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG:_0,DAILY_EVENT_INPUT_SETTINGS_UPDATED:Qu,DAILY_EVENT_JOINED_MEETING:T0,DAILY_EVENT_JOINING_MEETING:j0,DAILY_EVENT_LANG_UPDATED:fw,DAILY_EVENT_LEFT_MEETING:P0,DAILY_EVENT_LIVE_STREAMING_ERROR:hw,DAILY_EVENT_LIVE_STREAMING_STARTED:cw,DAILY_EVENT_LIVE_STREAMING_STOPPED:dw,DAILY_EVENT_LIVE_STREAMING_UPDATED:uw,DAILY_EVENT_LOADED:Gu,DAILY_EVENT_LOADING:k0,DAILY_EVENT_LOAD_ATTEMPT_FAILED:S0,DAILY_EVENT_LOCAL_SCREEN_SHARE_CANCELED:rw,DAILY_EVENT_LOCAL_SCREEN_SHARE_STARTED:ew,DAILY_EVENT_LOCAL_SCREEN_SHARE_STOPPED:tw,DAILY_EVENT_MEETING_SESSION_DATA_ERROR:wj,DAILY_EVENT_MEETING_SESSION_STATE_UPDATED:R0,DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED:L0,DAILY_EVENT_NETWORK_CONNECTION:ow,DAILY_EVENT_NETWORK_QUALITY_CHANGE:sw,DAILY_EVENT_NONFATAL_ERROR:Xu,DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED:I0,DAILY_EVENT_PARTICIPANT_JOINED:O0,DAILY_EVENT_PARTICIPANT_LEFT:A0,DAILY_EVENT_PARTICIPANT_UPDATED:N0,DAILY_EVENT_RECEIVE_SETTINGS_UPDATED:pw,DAILY_EVENT_RECORDING_DATA:G0,DAILY_EVENT_RECORDING_ERROR:W0,DAILY_EVENT_RECORDING_STARTED:Yu,DAILY_EVENT_RECORDING_STATS:J0,DAILY_EVENT_RECORDING_STOPPED:Ku,DAILY_EVENT_RECORDING_UPLOAD_COMPLETED:H0,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED:Q0,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED:Z0,DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED:X0,DAILY_EVENT_STARTED_CAMERA:E0,DAILY_EVENT_THEME_UPDATED:x0,DAILY_EVENT_TRACK_STARTED:F0,DAILY_EVENT_TRACK_STOPPED:B0,DAILY_EVENT_TRANSCRIPTION_ERROR:q0,DAILY_EVENT_TRANSCRIPTION_MSG:K0,DAILY_EVENT_TRANSCRIPTION_STARTED:z0,DAILY_EVENT_TRANSCRIPTION_STOPPED:V0,DAILY_EVENT_WAITING_PARTICIPANT_ADDED:D0,DAILY_EVENT_WAITING_PARTICIPANT_REMOVED:U0,DAILY_EVENT_WAITING_PARTICIPANT_UPDATED:$0,DAILY_FATAL_ERROR_CONNECTION:w0,DAILY_FATAL_ERROR_EJECTED:ij,DAILY_FATAL_ERROR_EOL:y0,DAILY_FATAL_ERROR_EXP_ROOM:aj,DAILY_FATAL_ERROR_EXP_TOKEN:lj,DAILY_FATAL_ERROR_MEETING_FULL:cj,DAILY_FATAL_ERROR_NBF_ROOM:sj,DAILY_FATAL_ERROR_NBF_TOKEN:oj,DAILY_FATAL_ERROR_NOT_ALLOWED:uj,DAILY_FATAL_ERROR_NO_ROOM:Hu,DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY:nj,DAILY_RECEIVE_SETTINGS_BASE_KEY:v0,DAILY_STATE_ERROR:sr,DAILY_STATE_JOINED:Mr,DAILY_STATE_JOINING:Fa,DAILY_STATE_LEFT:Cr,DAILY_STATE_NEW:Wu,DAILY_TRACK_STATE_BLOCKED:KC,DAILY_TRACK_STATE_INTERRUPTED:ej,DAILY_TRACK_STATE_LOADING:ZC,DAILY_TRACK_STATE_OFF:QC,DAILY_TRACK_STATE_PLAYABLE:m0,DAILY_TRACK_STATE_SENDABLE:XC,default:Yj},Symbol.toStringTag,{value:"Module"})),Zj=Gm(Xj);var kh={exports:{}}
vendor: 6,150 bytes, line 301
301,wi=typeof Reflect=="object"?Reflect:null,Wm=wi&&typeof wi.apply=="function"?wi.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},sa;wi&&typeof wi.ownKeys=="function"?sa=wi.ownKeys:Object.getOwnPropertySymbols?sa=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:sa=function(e){return Object.getOwnPropertyNames(e)};function eT(t){console&&console.warn&&console.warn(t)}var Fw=Number.isNaN||function(e){return e!==e};function de(){de.init.call(this)}kh.exports=de;kh.exports.once=iT;de.EventEmitter=de;de.prototype._events=void 0;de.prototype._eventsCount=0;de.prototype._maxListeners=void 0;var Hm=10;function kl(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(de,"defaultMaxListeners",{enumerable:!0,get:function(){return Hm},set:function(t){if(typeof t!="number"||t<0||Fw(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Hm=t}});de.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};de.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Fw(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Bw(t){return t._maxListeners===void 0?de.defaultMaxListeners:t._maxListeners}de.prototype.getMaxListeners=function(){return Bw(this)};de.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=e==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var o;if(r.length>0&&(o=r[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=s[e];if(l===void 0)return!1;if(typeof l=="function")Wm(l,this,r);else for(var u=l.length,d=Ww(l,u),n=0;n<u;++n)Wm(d[n],this,r);return!0};function zw(t,e,r,n){var i,s,o;if(kl(r),s=t._events,s===void 0?(s=t._events=Object.create(null),t._eventsCount=0):(s.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),o=s[e]),o===void 0)o=s[e]=r,++t._eventsCount;else if(typeof o=="function"?o=s[e]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),i=Bw(t),i>0&&o.length>i&&!o.warned){o.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=o.length,eT(a)}return t}de.prototype.addListener=function(e,r){return zw(this,e,r,!1)};de.prototype.on=de.prototype.addListener;de.prototype.prependListener=function(e,r){return zw(this,e,r,!0)};function tT(){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 Vw(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=tT.bind(n);return i.listener=r,n.wrapFn=i,i}de.prototype.once=function(e,r){return kl(r),this.on(e,Vw(this,e,r)),this};de.prototype.prependOnceListener=function(e,r){return kl(r),this.prependListener(e,Vw(this,e,r)),this};de.prototype.removeListener=function(e,r){var n,i,s,o,a;if(kl(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){a=n[o].listener,s=o;break}if(s<0)return this;s===0?n.shift():rT(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,a||r)}return this};de.prototype.off=de.prototype.removeListener;de.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),o;for(i=0;i<s.length;++i)o=s[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(e,r[i]);return this};function qw(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?nT(i):Ww(i,i.length)}de.prototype.listeners=function(e){return qw(this,e,!0)};de.prototype.rawListeners=function(e){return qw(this,e,!1)};de.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):Jw.call(t,e)};de.prototype.listenerCount=Jw;function Jw(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}de.prototype.eventNames=function(){return this._eventsCount>0?sa(this._events):[]};function Ww(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function rT(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function nT(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function iT(t,e){return new Promise(function(r,n){function i(o){t.removeListener(e,s),n(o)}function s(){typeof t.removeListener=="function"&&t.removeListener("error",i),r([].slice.call(arguments))}Hw(t,e,s,{once:!0}),e!=="error"&&sT(t,i,{once:!0})})}function sT(t,e,r){typeof t.on=="function"&&Hw(t,"error",e,r)}function Hw(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(s){n.once&&t.removeEventListener(e,i),r(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var oT=kh.exports,Sl={},Hr={};
301Object.defineProperty(Hr,"__esModule",{value:!0});Hr.Api=Hr.HttpClient=Hr.ContentType=void 0;var U;(function(t){t.Json="application/json",t.JsonApi="application/vnd.api+json",t.FormData="multipart/form-data",t.UrlEncoded="application/x-www-form-urlencoded",t.Text="text/plain"})(U||(Hr.ContentType=U={}));class Gw{constructor(e={}){Y(this,"baseUrl","https://api.vapi.ai");Y(this,"securityData",null);Y(this,"securityWorker");Y(this,"abortControllers",new Map);Y(this,"customFetch",(...e)=>fetch(...e));Y(this,"baseApiParams",{credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"});Y(this,"setSecurityData",e=>{this.securityData=e});Y(this,"contentFormatters",{[U.Json]:e=>e!==null&&(typeof e=="object"||typeof e=="string")?JSON.stringify(e):e,[U.JsonApi]:e=>e!==null&&(typeof e=="object"||typeof e=="string")?JSON.stringify(e):e,[U.Text]:e=>e!==null&&typeof e!="string"?JSON.stringify(e):e,[U.FormData]:e=>Object.keys(e||{}).reduce((r,n)=>{const i=e[n];return r.append(n,i instanceof Blob?i:typeof i=="object"&&i!==null?JSON.stringify(i):`${i}`),r},new FormData),[U.UrlEncoded]:e=>this.toQueryString(e)});Y(this,"createAbortSignal",e=>{if(this.abortControllers.has(e)){const n=this.abortControllers.get(e);return n?n.signal:void 0}const r=new AbortController;return this.abortControllers.set(e,r),r.signal});Y(this,"abortRequest",e=>{const r=this.abortControllers.get(e);r&&(r.abort(),this.abortControllers.delete(e))});Y(this,"request",async({body:e,secure:r,path:n,type:i,query:s,format:o,baseUrl:a,cancelToken:l,...u})=>{const d=(typeof r=="boolean"?r:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{}
301,f=this.mergeRequestParams(u,d),_=s&&this.toQueryString(s),x=this.contentFormatters[i||U.Json],k=o||f.format;return this.customFetch(`${a||this.baseUrl||""}${n}${_?`?${_}`:""}`,{...f,headers:{...f.headers||{},...i&&i!==U.FormData?{"Content-Type":i}:{}},signal:(l?this.createAbortSignal(l):f.signal)||null,body:typeof e>"u"||e===null?null:x(e)}).then(async v=>{const b=v.clone();b.data=null,b.error=null;const g=k?await v[k]().then(w=>(b.ok?b.data=w:b.error=w,b)).catch(w=>(b.error=w,b)):b;if(l&&this.abortControllers.delete(l),!v.ok)throw g;return g})});Object.assign(this,e)}encodeQueryParam(e,r){return`${encodeURIComponent(e)}=${encodeURIComponent(typeof r=="number"?r:`${r}`)}`}addQueryParam(e,r){return this.encodeQueryParam(r,e[r])}addArrayQueryParam(e,r){return e[r].map(i=>this.encodeQueryParam(r,i)).join("&")}toQueryString(e){const r=e||{};return Object.keys(r).filter(i=>typeof r[i]<"u").map(i=>Array.isArray(r[i])?this.addArrayQueryParam(r,i):this.addQueryParam(r,i)).join("&")}addQueryParams(e){const r=this.toQueryString(e);return r?`?${r}`:""}
301mergeRequestParams(e,r){return{...this.baseApiParams,...e,...r||{},headers:{...this.baseApiParams.headers||{},...e.headers||{},...r&&r.headers||{}}}}}Hr.HttpClient=Gw;class aT extends Gw{constructor(){super(...arguments);Y(this,"call",{callControllerCreate:(r,n={})=>this.request({path:"/call",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),callControllerFindAll:(r,n={})=>this.request({path:"/call",method:"GET",query:r,secure:!0,format:"json",...n}),callControllerFindOne:(r,n={})=>this.request({path:`/call/${r}`,method:"GET",secure:!0,format:"json",...n}),callControllerUpdate:(r,n,i={})=>this.request({path:`/call/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),callControllerDeleteCallData:(r,n={})=>this.request({path:`/call/${r}`,method:"DELETE",secure:!0,format:"json",...n}),callControllerCreatePhoneCall:(r,n={})=>this.request({path:"/call/phone",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),callControllerCreateWebCall:(r,n={})=>this.request({path:"/call/web",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n})});Y(this,"v2",{callControllerExportCalls:(r,n={})=>this.request({path:"/v2/call/export",method:"GET",query:r,secure:!0,...n}),callControllerFindAllPaginated:(r,n={})=>this.request({path:"/v2/call",method:"GET",query:r,secure:!0,format:"json",...n}),callControllerFindAllMetadataPaginated:(r,n={})=>this.request({path:"/v2/call/metadata",method:"GET",query:r,secure:!0,format:"json",...n}),assistantControllerFindAllPaginated:(r,n={})=>this.request({path:"/v2/assistant",method:"GET",query:r,secure:!0,format:"json",...n}),phoneNumberControllerFindAllPaginated:(r,n={})=>this.request({path:"/v2/phone-number",method:"GET",query:r,secure:!0,format:"json",...n})});Y(this,"chat",{chatControllerListChats:(r,n={})=>this.request({path:"/chat",method:"GET",query:r,secure:!0,format:"json",...n}),chatControllerCreateChat:(r,n={})=>this.request({path:"/chat",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),chatControllerGetChat:(r,n={})=>this.request({path:`/chat/${r}`,method:"GET",secure:!0,format:"json",...n}),chatControllerDeleteChat:(r,n={})=>this.request({path:`/chat/${r}`,method:"DELETE",secure:!0,format:"json",...n}),chatControllerCreateOpenAiChat:(r,n={})=>this.request({path:"/chat/responses",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),chatControllerCreateWebChat:(r,n={})=>this.request({path:"/chat/web",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),chatControllerCreateOpenAiWebChat:(r,n={})=>this.request({path:"/chat/web/responses",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n})});Y(this,"campaign",{campaignControllerCreate:(r,n={})=>this.request({path:"/campaign",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),campaignControllerFindAll:(r,n={})=>this.request({path:"/campaign",method:"GET",query:r,secure:!0,format:"json",...n}),campaignControllerFindAllPaginated:(r,n={})=>this.request({path:"/campaign/paginated",method:"GET",query:r,secure:!0,format:"json",...n}),campaignControllerFindOne:(r,n={})=>this.request({path:`/campaign/${r}`,method:"GET",secure:!0,format:"json",...n}),campaignControllerUpdate:(r,n,i={})=>this.request({path:`/campaign/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),campaignControllerRemove:(r,n={})=>this.request({path:`/campaign/${r}`,method:"DELETE",secure:!0,format:"json",...n})});Y(this,"session",{sessionControllerCreate:(r,n={})=>this.request({path:"/session",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),sessionControllerFindAllPaginated:(r,n={})=>this.request({path:"/session",method:"GET",query:r,secure:!0,format:"json",...n}),sessionControllerFindOne:(r,n={})=>this.request({path:`/session/${r}`,method:"GET",secure:!0,format:"json",...n}),sessionControllerUpdate:(r,n,i={})=>this.request({path:`/session/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),sessionControllerRemove:(r,n={})=>this.request({path:`/session/${r}`,method:"DELETE",secure:!0,format:"json",...n})});Y(this,"support",{supportControllerCreateTicket:(r,n={})=>this.request({path:"/support/ticket",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n})});Y(this,"assistant",{assistantControllerCreate:(r,n={})=>this.request({path:"/assistant",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),assistantControllerFindAll:(r,n={})=>this.request({path:"/assistant",method:"GET",query:r,secure:!0,format:"json",...n}),assistantControllerFindOne:(r,n={})=>this.request({path:`/assistant/${r}`,method:"GET",secure:!0,format:"json",...n}),assistantControllerUpdate:(r,n,i={})=>this.request({path:`/assistant/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),assistantControllerReplace:(r,n,i={})=>this.request({path:`/assistant/${r}`,method:"PUT",body:n,secure:!0,type:U.Json,format:"json",...i}),assistantControllerRemove:(r,n={})=>this.request({path:`/assistant/${r}`,method:"DELETE",secure:!0,format:"json",...n}),assistantControllerFindVersions:(r,n,i={})=>this.request({path:`/assistant/${r}/version`,method:"GET",query:n,secure:!0,format:"json",...i})});Y(this,"phoneNumber",{phoneNumberControllerImportTwilio:(r,n={})=>this.request({path:"/phone-number/import/twilio",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),phoneNumberControllerImportVonage:(r,n={})=>this.request({path:"/phone-number/import/vonage",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),phoneNumberControllerCreate:(r,n={})=>this.request({path:"/phone-number",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),phoneNumberControllerFindAll:(r,n={})=>this.request({path:"/phone-number",method:"GET",query:r,secure:!0,format:"json",...n}),phoneNumberControllerFindOne:(r,n={})=>this.request({path:`/phone-number/${r}`,method:"GET",secure:!0,format:"json",...n}),phoneNumberControllerUpdate:(r,n,i={})=>this.request({path:`/phone-number/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),phoneNumberControllerRemove:(r,n={})=>this.request({path:`/phone-number/${r}`,method:"DELETE",secure:!0,format:"json",...n})});Y(this,"tool",{toolControllerCreate:(r,n={})=>this.request({path:"/tool",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),toolControllerFindAll:(r,n={})=>this.request({path:"/tool",method:"GET",query:r,secure:!0,format:"json",...n}),toolControllerFindOne:(r,n={})=>this.request({path:`/tool/${r}`,method:"GET",secure:!0,format:"json",...n}),toolControllerUpdate:(r,n,i={})=>this.request({path:`/tool/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),toolControllerRemove:(r,n={})=>this.request({path:`/tool/${r}`,method:"DELETE",secure:!0,format:"json",...n})});Y(this,"file",{fileControllerCreateDeprecated:(r,n={})=>this.request({path:"/file/upload",method:"POST",body:r,secure:!0,type:U.FormData,format:"json",...n}),fileControllerCreate:(r,n={})=>this.request({path:"/file",method:"POST",body:r,secure:!0,type:U.FormData,format:"json",...n}),fileControllerFindAll:(r={})=>this.request({path:"/file",method:"GET",secure:!0,format:"json",...r}),fileControllerFindOne:(r,n={})=>this.request({path:`/file/${r}`,method:"GET",secure:!0,format:"json",...n}),fileControllerUpdate:(r,n,i={})=>this.request({path:`/file/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),fileControllerRemove:(r,n={})=>this.request({path:`/file/${r}`,method:"DELETE",secure:!0,format:"json",...n})});Y(this,"knowledgeBase",{knowledgeBaseControllerCreate:(r,n={})=>this.request({path:"/knowledge-base",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),knowledgeBaseControllerFindAll:(r,n={})=>this.request({path:"/knowledge-base",method:"GET",query:r,secure:!0,format:"json",...n}),knowledgeBaseControllerFindOne:(r,n={})=>this.request({path:`/knowledge-base/${r}`,method:"GET",secure:!0,format:"json",...n}),knowledgeBaseControllerUpdate:(r,n,i={})=>this.request({path:`/knowledge-base/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),knowledgeBaseControllerRemove:(r,n={})=>this.request({path:`/knowledge-base/${r}`,method:"DELETE",secure:!0,format:"json",...n})});Y(this,"workflow",{workflowControllerFindAll:(r={})=>this.request({path:"/workflow",method:"GET",secure:!0,format:"json",...r}),workflowControllerCreate:(r,n={})=>this.request({path:"/workflow",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),workflowControllerFindOne:(r,n={})=>this.request({path:`/workflow/${r}`,method:"GET",secure:!0,format:"json",...n}),workflowControllerDelete:(r,n={})=>this.request({path:`/workflow/${r}`,method:"DELETE",secure:!0,format:"json",...n}),workflowControllerUpdate:(r,n,i={})=>this.request({path:`/workflow/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),workflowControllerGenerateFromTranscripts:(r,n={})=>this.request({path:"/workflow/generate",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n})});Y(this,"squad",{squadControllerCreate:(r,n={})=>this.request({path:"/squad",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),squadControllerFindAll:(r,n={})=>this.request({path:"/squad",method:"GET",query:r,secure:!0,format:"json",...n}),squadControllerFindOne:(r,n={})=>this.request({path:`/squad/${r}`,method:"GET",secure:!0,format:"json",...n}),squadControllerUpdate:(r,n,i={})=>this.request({path:`/squad/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),squadControllerRemove:(r,n={})=>this.request({path:`/squad/${r}`,method:"DELETE",secure:!0,format:"json",...n})});Y(this,"testSuite",{testSuiteControllerFindAllPaginated:(r,n={})=>this.request({path:"/test-suite",method:"GET",query:r,secure:!0,format:"json",...n}),testSuiteControllerCreate:(r,n={})=>this.request({path:"/test-suite",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),testSuiteControllerFindOne:(r,n={})=>this.request({path:`/test-suite/${r}`,method:"GET",secure:!0,format:"json",...n}),testSuiteControllerUpdate:(r,n,i={})=>this.request({path:`/test-suite/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),testSuiteControllerRemove:(r,n={})=>this.request({path:`/test-suite/${r}`,method:"DELETE",secure:!0,format:"json",...n}),testSuiteTestControllerFindAllPaginated:(r,n,i={})=>this.request({path:`/test-suite/${r}/test`,method:"GET",query:n,secure:!0,format:"json",...i}),testSuiteTestControllerCreate:(r,n,i={})=>this.request({path:`/test-suite/${r}/test`,method:"POST",body:n,secure:!0,type:U.Json,format:"json",...i}),testSuiteTestControllerFindOne:(r,n,i={})=>this.request({path:`/test-suite/${r}/test/${n}`,method:"GET",secure:!0,format:"json",...i}),testSuiteTestControllerUpdate:(r,n,i,s={})=>this.request({path:`/test-suite/${r}/test/${n}`,method:"PATCH",body:i,secure:!0,type:U.Json,format:"json",...s}),testSuiteTestControllerRemove:(r,n,i={})=>this.request({path:`/test-suite/${r}/test/${n}`,method:"DELETE",secure:!0,format:"json",...i}),testSuiteRunControllerFindAllPaginated:(r,n,i={})=>this.request({path:`/test-suite/${r}/run`,method:"GET",query:n,secure:!0,format:"json",...i}),testSuiteRunControllerCreate:(r,n,i={})=>this.request({path:`/test-suite/${r}/run`,method:"POST",body:n,secure:!0,type:U.Json,format:"json",...i}),testSuiteRunControllerFindOne:(r,n,i={})=>this.request({path:`/test-suite/${r}/run/${n}`,method:"GET",secure:!0,format:"json",...i}),testSuiteRunControllerUpdate:(r,n,i,s={})=>this.request({path:`/test-suite/${r}/run/${n}`,method:"PATCH",body:i,secure:!0,type:U.Json,format:"json",...s}),testSuiteRunControllerRemove:(r,n,i={})=>this.request({path:`/test-suite/${r}/run/${n}`,method:"DELETE",secure:!0,format:"json",...i})});Y(this,"analytics",{analyticsControllerQuery:(r,n={})=>this.request({path:"/analytics",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n})});Y(this,"log",{loggingControllerCallLogsQuery:(r,n={})=>this.request({path:"/log",method:"GET",query:r,secure:!0,format:"json",...n}),loggingControllerCallLogsDeleteQuery:(r,n={})=>this.request({path:"/log",method:"DELETE",query:r,secure:!0,...n})});Y(this,"logs",{loggingControllerLogsQuery:(r,n={})=>this.request({path:"/logs",method:"GET",query:r,secure:!0,format:"json",...n}),loggingControllerLogsDeleteQuery:(r,n={})=>this.request({path:"/logs",method:"DELETE",query:r,secure:!0,...n})});Y(this,"org",{orgControllerCreate:(r,n={})=>this.request({path:"/org",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),orgControllerFindAll:(r={})=>this.request({path:"/org",method:"GET",secure:!0,format:"json",...r}),orgControllerFindOne:(r,n={})=>this.request({path:`/org/${r}`,method:"GET",secure:!0,format:"json",...n}),orgControllerUpdate:(r,n,i={})=>this.request({path:`/org/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),orgControllerDeleteOrg:(r,n={})=>this.request({path:`/org/${r}`,method:"DELETE",secure:!0,...n}),orgControllerFindAllUsers:(r,n={})=>this.request({path:`/org/${r}/user`,method:"GET",secure:!0,format:"json",...n}),orgControllerOrgLeave:(r,n={})=>this.request({path:`/org/${r}/leave`,method:"DELETE",secure:!0,...n}),orgControllerOrgRemoveUser:(r,n,i={})=>this.request({path:`/org/${r}/member/${n}/leave`,method:"DELETE",secure:!0,...i}),orgControllerUsersInvite:(r,n,i={})=>this.request({path:`/org/${r}/invite`,method:"POST",body:n,secure:!0,type:U.Json,...i}),orgControllerUserUpdate:(r,n,i={})=>this.request({path:`/org/${r}/role`,method:"PATCH",body:n,secure:!0,type:U.Json,...i}),orgControllerOrgToken:(r,n={})=>this.request({path:`/org/${r}/auth`,method:"GET",secure:!0,format:"json",...n})});Y(this,"token",{tokenControllerCreate:(r,n={})=>this.request({path:"/token",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),tokenControllerFindAll:(r,n={})=>this.request({path:"/token",method:"GET",query:r,secure:!0,format:"json",...n}),tokenControllerFindOne:(r,n={})=>this.request({path:`/token/${r}`,method:"GET",secure:!0,format:"json",...n}),tokenControllerUpdate:(r,n,i={})=>this.request({path:`/token/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),tokenControllerRemove:(r,n={})=>this.request({path:`/token/${r}`,method:"DELETE",secure:!0,format:"json",...n})});Y(this,"credential",{credentialControllerCreate:(r,n={})=>this.request({path:"/credential",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),credentialControllerFindAll:(r,n={})=>this.request({path:"/credential",method:"GET",query:r,secure:!0,format:"json",...n}),credentialControllerFindOne:(r,n={})=>this.request({path:`/credential/${r}`,method:"GET",secure:!0,format:"json",...n}),credentialControllerUpdate:(r,n,i={})=>this.request({path:`/credential/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),credentialControllerRemove:(r,n={})=>this.request({path:`/credential/${r}`,method:"DELETE",secure:!0,format:"json",...n}),credentialControllerGenerateSession:(r,n={})=>this.request({path:"/credential/session",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),credentialControllerHandleWebhook:(r,n={})=>this.request({path:"/credential/webhook",method:"POST",body:r,type:U.Json,...n}),credentialControllerCredentialActionTrigger:(r,n={})=>this.request({path:"/credential/trigger",method:"POST",body:r,secure:!0,type:U.Json,...n})});Y(this,"template",{templateControllerCreate:(r,n={})=>this.request({path:"/template",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),templateControllerFindAll:(r,n={})=>this.request({path:"/template",method:"GET",query:r,secure:!0,format:"json",...n}),templateControllerFindAllPinned:(r={})=>this.request({path:"/template/pinned",method:"GET",secure:!0,format:"json",...r}),templateControllerFindOne:(r,n={})=>this.request({path:`/template/${r}`,method:"GET",secure:!0,format:"json",...n}),templateControllerUpdate:(r,n,i={})=>this.request({path:`/template/${r}`,method:"PATCH",body:n,secure:!0,type:U.Json,format:"json",...i}),templateControllerRemove:(r,n={})=>this.request({path:`/template/${r}`,method:"DELETE",secure:!0,format:"json",...n})});Y(this,"voiceLibrary",{voiceLibraryControllerVoiceGetByProvider:(r,n,i={})=>this.request({path:`/voice-library/${r}`,method:"GET",query:n,secure:!0,format:"json",...i}),voiceLibraryControllerVoiceGetAccentsByProvider:(r,n={})=>this.request({path:`/voice-library/${r}/accents`,method:"GET",secure:!0,format:"js
301on",...n}),voiceLibraryControllerVoiceLibrarySyncByProvider:(r,n={})=>this.request({path:`/voice-library/sync/${r}`,method:"POST",secure:!0,format:"json",...n}),voiceLibraryControllerVoiceLibrarySyncDefaultVoices:(r,n={})=>this.request({path:"/voice-library/sync",method:"POST",body:r,secure:!0,type:U.Json,format:"json",...n}),voiceLibraryControllerVoiceLibraryCreateSesameVoice:(r,n={})=>this.request({path:"/voice-library/create-sesame-voice",method:"POST",body:r,secure:!0,type:U.Json,...n})});Y(this,"provider",{providerControllerGetWorkflows:(r,n,i={})=>this.request({path:`/${r}/workflows`,method:"GET",query:n,secure:!0,format:"json",...i}),providerControllerGetWorkflowTriggerHook:(r,n,i={})=>this.request({path:`/${r}/workflows/${n}/hooks`,method:"GET",secure:!0,format:"json",...i}),providerControllerGetLocations:(r,n={})=>this.request({path:`/${r}/locations`,method:"GET",secure:!0,format:"json",...n}),voiceProviderControllerSearchVoices:(r,n,i={})=>this.request({path:`/${r}/voices/search`,method:"GET",query:n,secure:!0,format:"json",...i}),voiceProviderControllerSearchVoice:(r,n,i={})=>this.request({path:`/${r}/voice/search`,method:"GET",query:n,secure:!0,format:"json",...i}),voiceProviderControllerAddVoices:(r,n,i={})=>this.request({path:`/${r}/voices/add`,method:"POST",body:n,secure:!0,type:U.Json,format:"json",...i}),voiceProviderControllerAddVoice:(r,n,i={})=>this.request({path:`/${r}/voice/add`,method:"POST",body:n,secure:!0,type:U.Json,format:"json",...i})});Y(this,"v11Labs",{voiceProviderControllerCloneVoices:(r,n={})=>this.request({path:"/11labs/voice/clone",method:"POST",body:r,secure:!0,type:U.FormData,...n})})}}Hr.Api=aT;Object.defineProperty(Sl,"__esModule",{value:!0});Sl.client=void 0;const lT=Hr,cT=new lT.Api({baseUrl:"https://api.vapi.ai",baseApiParams:{secure:!0},securityWorker:async t=>{if(t)return{headers:{Authorization:`Bearer ${t}`}}}});Sl.client=cT;var Yw=ft&&ft.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ky,"__esModule",{value:!0});const uT=Yw(Zj),dT=Yw(oT),kc=Sl;async function hT(t,e){t.muted=!1,t.autoplay=!0,e!=null&&(t.srcObject=new MediaStream([e]),await t.play())}async function fT(t,e){const r=document.createElement("audio");return r.dataset.participantId=e,document.body.appendChild(r),await hT(r,t),r}function pT(t){const e=document.querySelector(`audio[data-participant-id="${t}"]`);e==null||e.remove()}function mT(t,e,r,n){t.participant.local||e.updateParticipant(t.participant.session_id,{setSubscribedTracks:{audio:!0,video:r||n}})}class gT extends dT.default{on(e,r){return super.on(e,r),this}once(e,r){return super.once(e,r),this}emit(e,...r){return super.emit(e,...r)}removeListener(e,r){return super.removeListener(e,r),this}removeAllListeners(e){return super.removeAllListeners(e),this}}class vT extends gT{constructor(r,n,i,s){super();Y(this,"started",!1);Y(this,"call",null);Y(this,"speakingTimeout",null);Y(this,"dailyCallConfig",{});Y(this,"dailyCallObject",{});Y(this,"hasEmittedCallEndedStatus",!1);kc.client.baseUrl=n??"https://api.vapi.ai",kc.client.setSecurityData(r),this.dailyCallConfig=i??{},this.dailyCallObject=s??{}}cleanup(){var r;this.started=!1,this.hasEmittedCallEndedStatus=!1,(r=this.call)==null||r.destroy(),this.call=null,this.speakingTimeout=null}isMobileDevice(){if(typeof navigator>"u")return!1;const r=navigator.userAgent;return/android|iphone|ipad|ipod|iemobile|blackberry|bada/i.test(r.toLowerCase())}async sleep(r){return new Promise(n=>setTimeout(n,r))}async start(r,n,i,s,o){var l,u,d,f,_,x,k;const a=Date.now();if(!r&&!i&&!s){const v=new Error("Assistant or Squad or Workflow must be provided.");throw this.emit("error",{type:"validation-error",stage:"input-validation",message:v.message,timestamp:new Date().toISOString()}),v}if(this.started)return this.emit("call-start-progress",{stage:"validation",status:"failed",timestamp:new Date().toISOString(),metadata:{reason:"already-started"}}),null;this.emit("call-start-progress",{stage:"initialization",status:"started",timestamp:new Date().toISOString(),metadata:{hasAssistant:!!r,hasSquad:!!i,hasWorkflow:!!s}}),this.started=!0;
301try{this.emit("call-start-progress",{stage:"web-call-creation",status:"started",timestamp:new Date().toISOString()});const v=Date.now(),b=(await kc.client.call.callControllerCreateWebCall({assistant:typeof r=="string"?void 0:r,assistantId:typeof r=="string"?r:void 0,assistantOverrides:n,squad:typeof i=="string"?void 0:i,squadId:typeof i=="string"?i:void 0,workflow:typeof s=="string"?void 0:s,workflowId:typeof s=="string"?s:void 0,workflowOverrides:o})).data,g=Date.now()-v;this.emit("call-start-progress",{stage:"web-call-creation",status:"completed",duration:g,timestamp:new Date().toISOString(),metadata:{callId:(b==null?void 0:b.id)||"unknown",videoRecordingEnabled:((l=b==null?void 0:b.artifactPlan)==null?void 0:l.videoRecordingEnabled)??!1,voiceProvider:((d=(u=b==null?void 0:b.assistant)==null?void 0:u.voice)==null?void 0:d.provider)||"unknown"}}),this.call&&(this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"started",timestamp:new Date().toISOString(),metadata:{action:"cleanup-existing"}}),this.cleanup());const w=((f=b==null?void 0:b.artifactPlan)==null?void 0:f.videoRecordingEnabled)??!1,y=((x=(_=b==null?void 0:b.assistant)==null?void 0:_.voice)==null?void 0:x.provider)==="tavus";this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"started",timestamp:new Date().toISOString(),metadata:{audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??w,isVideoRecordingEnabled:w,isVideoEnabled:y}});const E=Date.now();try{this.call=uT.default.createCallObject({audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??w,dailyConfig:this.dailyCallConfig});const A=Date.now()-E;this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"completed",duration:A,timestamp:new Date().toISOString()})}catch(A){const G=Date.now()-E;throw this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"failed",duration:G,timestamp:new Date().toISOString(),metadata:{error:A==null?void 0:A.toString()}}),this.emit("error",{type:"daily-call-object-creation-error",stage:"daily-call-object-creation",error:A,timestamp:new Date().toISOString()}),A}(k=this.call.iframe())==null||k.style.setProperty("display","none"),this.call.on("left-meeting",()=>{var A;this.emit("call-end"),this.hasEmittedCallEndedStatus||(this.emit("message",{type:"status-update",status:"ended",endedReason:"customer-ended-call"}),this.hasEmittedCallEndedStatus=!0),w&&((A=this.call)==null||A.stopRecording()),this.cleanup()}),this.call.on("error",A=>{var G;this.emit("error",A),w&&((G=this.call)==null||G.stopRecording())}),this.call.on("camera-error",A=>{this.emit("camera-error",A)}),this.call.on("network-quality-change",A=>{this.emit("network-quality-change",A)}),this.call.on("network-connection",A=>{this.emit("network-connection",A)}),this.call.on("track-started",async A=>{var G,J,le;!A||!A.participant||(G=A.participant)!=null&&G.local||((J=A.participant)==null?void 0:J.user_name)==="Vapi Speaker"&&(A.track.kind==="video"&&this.emit("video",A.track),A.track.kind==="audio"&&await fT(A.track,A.participant.session_id),(le=this.call)==null||le.sendAppMessage("playable"))}),this.call.on("participant-joined",A=>{!A||!this.call||mT(A,this.call,w,y)}),this.call.on("participant-updated",A=>{A&&this.emit("daily-participant-updated",A.participant)}),this.call.on("participant-left",A=>{A&&pT(A.participant.session_id)});const j=this.isMobileDevice();if(this.emit("call-start-progress",{stage:"mobile-permissions",status:"started",timestamp:new Date().toISOString(),metadata:{isMobile:j}}),j){const A=Date.now();await this.sleep(1e3);const G=Date.now()-A;this.emit("call-start-progress",{stage:"mobile-permissions",status:"completed",duration:G,timestamp:new Date().toISOString(),metadata:{action:"permissions-wait"}})}else this.emit("call-start-progress",{stage:"mobile-permissions",status:"completed",timestamp:new Date().toISOString(),metadata:{action:"skipped-not-mobile"}});this.emit("call-start-progress",{stage:"daily-call-join",status:"started",timestamp:new Date().toISOString()});const T=Date.now();try{await this.call.join({url:b.webCallUrl,subscribeToTracksAutomatically:!1});const A=Date.now()-T;
301this.emit("call-start-progress",{stage:"daily-call-join",status:"completed",duration:A,timestamp:new Date().toISOString()})}catch(A){const G=Date.now()-T;throw this.emit("call-start-progress",{stage:"daily-call-join",status:"failed",duration:G,timestamp:new Date().toISOString(),metadata:{error:A==null?void 0:A.toString()}}),this.emit("error",{type:"daily-call-join-error",stage:"daily-call-join",error:A,duration:G,timestamp:new Date().toISOString()}),A}if(w){this.emit("call-start-progress",{stage:"video-recording-setup",status:"started",timestamp:new Date().toISOString()});const A=new Date().getTime(),G=Date.now();try{this.call.startRecording({width:1280,height:720,backgroundColor:"#FF1F2D3D",layout:{preset:"default"}});const J=Date.now()-G;this.emit("call-start-progress",{stage:"video-recording-setup",status:"completed",duration:J,timestamp:new Date().toISOString()}),this.call.on("recording-started",()=>{const le=(new Date().getTime()-A)/1e3;this.emit("call-start-progress",{stage:"video-recording-started",status:"completed",timestamp:new Date().toISOString(),metadata:{delaySeconds:le}}),this.send({type:"control",control:"say-first-message",videoRecordingStartDelaySeconds:le})})}catch(J){const le=Date.now()-G;this.emit("call-start-progress",{stage:"video-recording-setup",status:"failed",duration:le,timestamp:new Date().toISOString(),metadata:{error:J==null?void 0:J.toString()}}),this.emit("error",{type:"video-recording-setup-error",stage:"video-recording-setup",error:J,timestamp:new Date().toISOString()})}}else this.emit("call-start-progress",{stage:"video-recording-setup",status:"completed",timestamp:new Date().toISOString(),metadata:{action:"skipped-not-enabled"}});this.emit("call-start-progress",{stage:"audio-observer-setup",status:"started",timestamp:new Date().toISOString()});const P=Date.now();try{this.call.startRemoteParticipantsAudioLevelObserver(100);const A=Date.now()-P;this.emit("call-start-progress",{stage:"audio-observer-setup",status:"completed",duration:A,timestamp:new Date().toISOString()})}catch(A){const G=Date.now()-P;this.emit("call-start-progress",{stage:"audio-observer-setup",status:"failed",duration:G,timestamp:new Date().toISOString(),metadata:{error:A==null?void 0:A.toString()}}),this.emit("error",{type:"audio-observer-setup-error",stage:"audio-observer-setup",error:A,timestamp:new Date().toISOString()})}this.call.on("remote-participants-audio-level",A=>{A&&this.handleRemoteParticipantsAudioLevel(A)}),this.call.on("app-message",A=>this.onAppMessage(A)),this.call.on("nonfatal-error",A=>{var G;(A==null?void 0:A.type)==="audio-processor-error"&&((G=this.call)==null||G.updateInputSettings({audio:{processor:{type:"none"}}}).then(()=>{var J;(J=this.call)==null||J.setLocalAudio(!0)}))}),this.emit("call-start-progress",{stage:"audio-processing-setup",status:"started",timestamp:new Date().toISOString()});const D=Date.now();try{this.call.updateInputSettings({audio:{processor:{type:"noise-cancellation"}}});const A=Date.now()-D;this.emit("call-start-progress",{stage:"audio-processing-setup",status:"completed",duration:A,timestamp:new Date().toISOString()})}catch(A){const G=Date.now()-D;this.emit("call-start-progress",{stage:"audio-processing-setup",status:"failed",duration:G,timestamp:new Date().toISOString(),metadata:{error:A==null?void 0:A.toString()}}),this.emit("error",{type:"audio-processing-setup-error",stage:"audio-processing-setup",error:A,timestamp:new Date().toISOString()})}const Q=Date.now()-a;return this.emit("call-start-success",{totalDuration:Q,callId:(b==null?void 0:b.id)||"unknown",timestamp:new Date().toISOString()}),b}catch(v){const b=Date.now()-a;return this.emit("call-start-failed",{stage:"unknown",totalDuration:b,error:(v==null?void 0:v.toString())||"Unknown error occurred",errorStack:v instanceof Error?v.stack:"No stack trace available",timestamp:new Date().toISOString(),context:{hasAssistant:!!r,hasSquad:!!i,hasWorkflow:!!s,isMobile:this.isMobileDevice()}}),this.emit("error",{type:"start-method-error",stage:"unknown",error:v,totalDuration:b,timestamp:new Date().toISOString(),context:{hasAssistant:!!r,hasSquad:!!i,hasWorkflow:!!s,isMobile:this.isMobileDevice()}}),this.cleanup(),null}}onAppMessage(r){if(r)try{if(r.data==="listening")return this.emit
301("call-start");try{const n=JSON.parse(r.data);this.emit("message",n),n&&"type"in n&&"status"in n&&n.type==="status-update"&&n.status==="ended"&&(this.hasEmittedCallEndedStatus=!0)}catch(n){console.log("Error parsing message data: ",n)}}catch(n){console.error(n)}}handleRemoteParticipantsAudioLevel(r){const n=Object.values(r.participantsAudioLevel).reduce((s,o)=>s+o,0);this.emit("volume-level",Math.min(1,n/.15)),n>.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(){var r;this.started=!1,(r=this.call)==null||r.destroy(),this.call=null}send(r){var n;(n=this.call)==null||n.sendAppMessage(JSON.stringify(r))}setMuted(r){if(!this.call)throw new Error("Call object is not available.");this.call.setLocalAudio(!r)}isMuted(){return this.call?this.call.localAudio()===!1:!1}say(r,n,i,s){this.send({type:"say",message:r,endCallAfterSpoken:n,interruptionsEnabled:i??!1,interruptAssistantEnabled:s??!1})}setInputDevicesAsync(r){var n;(n=this.call)==null||n.setInputDevicesAsync(r)}async increaseMicLevel(r){if(!this.call)throw new Error("Call object is not available.");try{const n=await navigator.mediaDevices.getUserMedia({audio:!0}),i=new AudioContext,s=i.createMediaStreamSource(n),o=i.createGain();o.gain.value=r,s.connect(o);const a=i.createMediaStreamDestination();o.connect(a);const[l]=a.stream.getAudioTracks();await this.call.setInputDevicesAsync({audioSource:l})}catch(n){console.error("Error adjusting microphone level:",n)}}setOutputDeviceAsync(r){var n;(n=this.call)==null||n.setOutputDeviceAsync(r)}getDailyCallObject(){return this.call}startScreenSharing(r,n){var i;(i=this.call)==null||i.startScreenShare({displayMediaOptions:r,screenVideoSendSettings:n})}stopScreenSharing(){var r;(r=this.call)==null||r.stopScreenShare()}}var yT=Ky.default=vT;const wT=()=>{const[t,e]=O.useState(!1),[r,n]=O.useState(!1),[i,s]=O.useState(0),[o,a]=O.useState(!1),[l,u]=O.useState([]),d=O.useRef(null);O.useEffect(()=>{const v="cbbb6a94-2f8b-4581-a493-699705680a47";return d.current=new yT(v),d.current.on("call-start",()=>{console.log("Call started"),e(!0),a(!1)}),d.current.on("call-end",()=>{console.log("Call ended"),e(!1),a(!1),s(0)}),d.current.on("speech-start",()=>{console.log("User started speaking")}),d.current.on("speech-end",()=>{console.log("User stopped speaking")}),d.current.on("volume-level",b=>{s(b)}),d.current.on("message",b=>{console.log("Message received:",b),b.type==="transcript"&&b.transcriptType==="final"&&u(g=>[...g,{role:b.role,content:b.transcript}])}),d.current.on("error",b=>{console.error("Vapi error:",b),e(!1),a(!1)}),()=>{d.current&&d.current.stop()}},[]);const f=async()=>{if(!d.current){console.error("Vapi not initialized"),alert("Voice system not initialized. Please refresh the page.");return}const v="ef3db43d-baf2-4c57-9dc5-cbb0bedcb16e";try{a(!0),console.log("Starting call with assistant:",v),await d.current.start(v)}catch(b){console.error("Failed to start call:",b),alert(`Failed to start call: ${b instanceof Error?b.message:String(b)}`),a(!1)}},_=()=>{d.current&&d.current.stop()},x=()=>{if(d.current){const v=!r;d.current.setMuted(v),n(v)}},k=()=>i>.7?"high":i>.3?"medium":i>.1?"low":"silent";return h.jsx("div",{className:"bg-gray-50 min-h-screen py-12",children:h.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[h.jsxs("div",{className:"text-center mb-8",children:[h.jsx("h1",{className:"text-3xl font-serif text-gray-900",children:"Speak with Ellis"}),h.jsx("p",{className:"mt-2 text-lg text-gray-600",children:"Have a voice conversation with Ellis. Click the microphone to start talking."})]}),h.jsx("div",{className:"bg-white rounded-lg shadow-lg border border-lavender-200 p-8 mb-8",children:h.jsxs("div",{className:"text-center",children:[h.jsx("div",{className:"mb-8",children:h.jsxs("button",{onClick:t?_:f,disabled:o,className:`relative w-32 h-32 rounded-full transition-all duration-300 ${t?"bg-red-500 hover:bg-red-600 shadow-lg":o?"bg-yellow-500 animate-pulse":"bg-lavender-600 hover:bg-lavender-700 shadow-lg hover:shadow-xl"} ${i>.1?"scale-110":"scale-100"}`,children:[o?h.jsx("div",{className:"text-white text-xl font-medium",children:"Connecting..."}):t?h.jsxs("div",{className:"flex flex-col items-center justify-center text-white",children:[h.jsx(Vf,{size:40}),h.jsx("span",{className:"text-sm mt-2",children:"End Call"})]}):h.jsxs("div",{className:"flex flex-col items-center justify-center text-white",children:[h.jsx(Pn,{size:40}),h.jsx("span",{className:"text-sm mt-2",children:"Start Call"})]}),t&&i>.1&&h.jsx("div",{className:`absolute inset-0 rounded-full border-4 ${k()==="high"?"border-green-400 animate-ping":k()==="medium"?"border-yellow-400 animate-pulse":"border-blue-400"}`})]})}),h.jsxs("div",{className:"mb-6",children:[o&&h.jsx("p",{className:"text-yellow-600 font-medium",children:"Connecting to Ellis..."}),t&&h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{className:"text-green-600 font-medium",children:"Connected to Ellis"}),h.jsx("p",{className:"text-sm text-gray-600",children:"Speak naturally - Ellis is listening and will respond"})]}),!t&&!o&&h.jsx("p",{className:"text-gray-600",children:"Click the microphone to start your conversation with Ellis"})]}),t&&h.jsxs("div",{className:"flex justify-center space-x-4 mb-6",children:[h.jsx("button",{onClick:x,className:`p-3 rounded-full transition-colors ${r?"bg-red-100 text-red-600 hover:bg-red-200":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,title:r?"Unmute":"Mute",children:r?h.jsx(Vf,{size:20}):h.jsx(Pn,{size:20})}),h.jsx("div",{className:"p-3 rounded-full bg-gray-100 text-gray-600",children:i>.1?h.jsx(Kx,{size:20}):h.jsx(Qx,{size:20})})]}),l.length>0&&h.jsxs("div",{className:"max-w-2xl mx-auto",children:[h.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Conversation"}),h.jsx("div",{className:"bg-gray-50 rounded-lg p-4 max-h-64 overflow-y-auto space-y-3",children:l.map((v,b)=>h.jsx("div",{className:`flex ${v.role==="assistant"?"justify-start":"justify-end"}`,children:h.jsxs("div",{className:`max-w-[80%] rounded-lg p-3 ${v.role==="assistant"?"bg-white text-gray-800 shadow-sm":"bg-lavender-600 text-white"}`,children:[h.jsx("div",{className:"text-sm font-medium mb-1",children:v.role==="assistant"?"Ellis":"You"}),h.jsx("div",{children:v.content})]})},b))})]})]})}),h.jsxs("div",{className:"bg-lavender-50 rounded-lg p-6 border border-lavender-100",children:[h.jsx("h3",{className:"text-lg font-serif text-lavender-800 mb-4",children:"Other ways to connect with Ellis"}),h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[h.jsxs("a",{href:"tel:+14752430824",className:"flex items-center justify-center px-4 py-3 bg-white border border-lavender-200 rounded-md shadow-sm hover:bg-lavender-50 transition-colors text-lavender-700 font-serif",children:[h.jsx(On,{className:"h-5 w-5 mr-2"})," Call Ellis"]}),h.jsxs(pe,{to:"/chat",className:"flex items-center justify-center px-4 py-3 bg-white border border-lavender-200 rounded-md shadow-sm hover:bg-lavender-50 transition-colors text-lavender-700 font-serif",children:[h.jsx(Kr,{className:"h-5 w-5 mr-2"})," Message Ellis"]})]})]}),h.jsxs("div",{className:"mt-8 text-center text-sm text-gray-600",children:[h.jsxs("p",{className:"mb-2",children:[h.jsx("strong",{children:"How to use:"})," Click the microphone button to start talking with Ellis."]}),h.jsx("p",{children:"Ellis will listen to your voice and respond back with speech. You can mute yourself or end the call at any time."})]})]})})},_T=()=>{const[t,e]=O.useState([]),[r,n]=O.useState(""),[i,s]=O.useState(!1),o=O.useRef(null),a=()=>{var u;(u=o.current)==null||u.scrollIntoView({behavior:"smooth"})};O.useEffect(()=>{a()},[t]);const l=async u=>
301{if(u.preventDefault(),!r.trim()||i)return;const d=r.trim();n(""),e(f=>[...f,{role:"user",content:d}]),s(!0);try{const f=await fetch("/.bolt/api/v1/claude/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:[...t,{role:"user",content:d}]})});if(!f.ok)throw new Error("Failed to get response from Claude");const _=await f.json();e(x=>[...x,{role:"assistant",content:_.message}])}catch(f){console.error("Failed to get response:",f),e(_=>[..._,{role:"assistant",content:"I apologize, but I encountered an error. Please try again."}])}finally{s(!1)}};return h.jsxs("div",{className:"flex flex-col h-screen bg-gray-50",children:[h.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:h.jsxs("div",{className:"max-w-3xl mx-auto space-y-4",children:[t.map((u,d)=>h.jsx("div",{className:`flex ${u.role==="assistant"?"justify-start":"justify-end"}`,children:h.jsx("div",{className:`max-w-[80%] rounded-lg p-4 ${u.role==="assistant"?"bg-white text-gray-800 shadow-md":"bg-lavender-600 text-white"}`,children:u.content})},d)),i&&h.jsx("div",{className:"flex justify-start",children:h.jsx("div",{className:"bg-white text-gray-800 rounded-lg p-4 shadow-md",children:h.jsx(wu,{className:"h-5 w-5 animate-spin"})})}),h.jsx("div",{ref:o})]})}),h.jsx("div",{className:"border-t bg-white p-4",children:h.jsx("form",{onSubmit:l,className:"max-w-3xl mx-auto",children:h.jsxs("div",{className:"flex gap-2",children:[h.jsx("input",{type:"text",value:r,onChange:u=>n(u.target.value),placeholder:"Type your message...",className:"flex-1 rounded-lg border border-gray-300 px-4 py-2 focus:outline-none focus:ring-2 focus:ring-lavender-500",disabled:i}),h.jsx("button",{type:"submit",disabled:i||!r.trim(),className:"rounded-lg bg-lavender-600 px-4 py-2 text-white hover:bg-lavender-700 disabled:opacity-50 disabled:cursor-not-allowed font-serif",children:h.jsx(ky,{className:"h-5 w-5"})})]})})})]})},bT=()=>{const[t,e]=O.useState([]),[r,n]=O.useState(""),[i,s]=O.useState(!1),[o,a]=O.useState(null),[l,u]=O.useState(!0),[d,f]=O.useState(null),[_,x]=O.useState(""),[k,v]=O.useState(!1),b=O.useRef(null),{user:g,userProfile:w}=to(),y=!!g,E=()=>{var J;(J=b.current)==null||J.scrollIntoView({behavior:"smooth"})};O.useEffect(()=>{E()},[t,_]),O.useEffect(()=>{j()},[y,w]);const j=async()=>{try{u(!0),y&&w?await T():await P()}catch(J){console.error("Error initializing conversation:",J)}finally{u(!1)}},T=async()=>{if(!w)return;const{data:J,error:le}=await Pe.from("conversations").select("*").eq("user_profile_id",w.id).order("created_at",{ascending:!1}).limit(1).single();let xe;if(J&&!le){xe=J,a(xe);const{data:Ie,error:ye}=await Pe.from("messages").select("*").eq("conversation_id",xe.id).order("created_at",{ascending:!0});ye?console.error("Error loading existing messages:",ye):e(Ie)}else{const{data:Ie,error:ye}=await Pe.from("conversations").insert({user_profile_id:w.id}).select().single();if(ye){console.error("Error creating authenticated conversation:",ye);return}xe=Ie,a(xe);const Me={conversation_id:xe.id,sender:"ai",content:`Hello ${w.username}! I'm Ellis, your AI-enhanced social worker. Since you're logged in, I can save our conversation history and provide more personalized assistance. What's on your mind today?`},{data:$,error:V}=await Pe.from("messages").insert(Me).select().single();V?console.error("Error creating welcome message:",V):e([$])}},P=async()=>{const J=new Date;J.setHours(J.getHours()+24);const{data:le,error:xe}=await Pe.from("public_conversations").insert({expires_at:J.toISOString()}).select().single();if(xe){console.error("Error creating public conversation:",xe);return}a(le);const Ie={conversation_id:le.id,sender:"ai",content:"Hello! I'm Ellis, your AI-enhanced social worker. I'm here to listen and help connect you with the resources you need. This conversation is temporary and will expire in 24 hours. For a permanent conversation history, consider creating an account. What's on your mind today?"},{data:ye,error:Me}=await Pe.from("public_messages").insert(Ie).select().single();Me?console.error("Error creating welcome message:",Me):e([ye])},D=async J=>{var Ie;const le="59b03670-a555-4c8c-b0ff-10c25f93abd8",xe="ef3db43d-baf2-4c57-9dc5-cbb0bedcb16e";try{const ye={assistantId:xe,input:J,stream:!0};d&&(ye.previousChatId=d);const Me=await fetch("https://api.vapi.ai/chat",{method:"POST",headers:{Authorization:`Bearer ${le}`,"Content-Type":"application/json"},body:JSON.stringify(ye)});if(!Me.ok)throw new Error(`Vapi API error: ${Me.status}`);const $=(Ie=Me.body)==null?void 0:Ie.getReader();if(!$)throw new Error("No reader available for streaming");const V=new TextDecoder;let q="",ce;for(v(!0),x("");;){const{done:ke,value:c}=await $.read();if(ke)break;const p=V.decode(c).split(`
302`).filter(S=>S.trim());for(const S of p)if(S.startsWith("data: "))try{const C=JSON.parse(S.slice(6));C.id&&!ce&&(ce=C.id),C.path&&C.delta&&(q+=C.delta,x(q))}catch{console.error("Invalid JSON line:",S);continue}}return v(!1),x(""),ce&&f(ce),q||"I apologize, but I didn't receive a proper response. Could you please try again?"}catch(ye){return console.error("Error calling Vapi API:",ye),v(!1),x(""),"I apologize, but I'm experiencing some technical difficulties right now. Please try again in a moment, or feel free to call me directly at (475) 243-0824 if you need immediate assistance."}},Q=async J=>{if(J.preventDefault(),!r.trim()||i||!o)return;const le=r.trim();n(""),s(!0);try{y?await A(le):await G(le)}catch(xe){console.error("Failed to process message:",xe);const Ie={id:"error-"+Date.now(),conversation_id:o.id,sender:"ai",content:"I apologize, but I encountered an error. Please try again.",created_at:new Date().toISOString(),...y&&{updated_at:new Date().toISOString()}};e(ye=>[...ye,Ie])}finally{s(!1)}},A=async J=>{if(!o)return;const le={conversation_id:o.id,sender:"user",content:J},{data:xe,error:Ie}=await Pe.from("messages").insert(le).select().single();if(Ie)throw new Error("Failed to save user message");e(q=>[...q,xe]);const ye=await D(J),Me={conversation_id:o.id,sender:"ai",content:ye},{data:$,error:V}=await Pe.from("messages").insert(Me).select().single();if(V)throw new Error("Failed to save AI message");e(q=>[...q,$])},G=async J=>{if(!o)return;const le={conversation_id:o.id,sender:"user",content:J},{data:xe,error:Ie}=await Pe.from("public_messages").insert(le).select().single();if(Ie)throw new Error("Failed to save user message");e(q=>[...q,xe]);const ye=await D(J),Me={conversation_id:o.id,sender:"ai",content:ye},{data:$,error:V}=await Pe.from("public_messages").insert(Me).select().single();if(V)throw new Error("Failed to save AI message");e(q=>[...q,$])};return l?h.jsxs("div",{className:"flex flex-col h-screen bg-gray-50 items-center justify-center",children:[h.jsx(wu,{className:"h-8 w-8 animate-spin text-lavender-600 mb-4"}),h.jsx("p",{className:"text-gray-600",children:"Connecting you with Ellis..."})]}):h.jsxs("div",{className:"flex flex-col h-screen bg-gray-50",children:[h.jsx("div",{className:"bg-white border-b border-gray-200 p-4",children:h.jsxs("div",{className:"max-w-3xl mx-auto flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center",children:[h.jsx(Kr,{className:"h-6 w-6 text-lavender-600 mr-3"}),h.jsxs("div",{children:[h.jsx("h1",{className:"text-lg font-semibold text-gray-900",children:"Chat with Ellis"}),h.jsx("p",{className:"text-sm text-gray-600",children:"Your AI-enhanced 
302social worker powered by Vapi"})]})]}),h.jsx("div",{className:"flex items-center space-x-2",children:y?h.jsxs("div",{className:"flex items-center px-3 py-1 bg-green-100 text-green-800 rounded-full text-sm",children:[h.jsx(Gx,{className:"h-4 w-4 mr-1"}),h.jsx("span",{children:"Private Chat"})]}):h.jsxs("div",{className:"flex items-center px-3 py-1 bg-blue-100 text-blue-800 rounded-full text-sm",children:[h.jsx($x,{className:"h-4 w-4 mr-1"}),h.jsx("span",{children:"Public Chat"})]})})]})}),h.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:h.jsxs("div",{className:"max-w-3xl mx-auto space-y-4",children:[t.map(J=>h.jsx("div",{className:`flex ${J.sender==="ai"?"justify-start":"justify-end"}`,children:h.jsxs("div",{className:`max-w-[80%] rounded-lg p-4 ${J.sender==="ai"?"bg-white text-gray-800 shadow-md border border-gray-200":"bg-lavender-600 text-white"}`,children:[h.jsx("div",{className:"whitespace-pre-wrap",children:J.content}),h.jsx("div",{className:`text-xs mt-2 ${J.sender==="ai"?"text-gray-500":"text-lavender-200"}`,children:new Date(J.created_at).toLocaleTimeString()})]})},J.id)),k&&_&&h.jsx("div",{className:"flex justify-start",children:h.jsxs("div",{className:"max-w-[80%] bg-white text-gray-800 shadow-md border border-gray-200 rounded-lg p-4",children:[h.jsx("div",{className:"whitespace-pre-wrap",children:_}),h.jsxs("div",{className:"text-xs mt-2 text-gray-500 flex items-center",children:[h.jsxs("div",{className:"flex space-x-1",children:[h.jsx("div",{className:"w-1 h-1 bg-lavender-600 rounded-full animate-pulse"}),h.jsx("div",{className:"w-1 h-1 bg-lavender-600 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),h.jsx("div",{className:"w-1 h-1 bg-lavender-600 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}),h.jsx("span",{className:"ml-2",children:"Ellis is typing..."})]})]})}),i&&!k&&h.jsx("div",{className:"flex justify-start",children:h.jsx("div",{className:"bg-white text-gray-800 rounded-lg p-4 shadow-md border border-gray-200",children:h.jsx(wu,{className:"h-5 w-5 animate-spin"})})}),h.jsx("div",{ref:b})]})}),h.jsx("div",{className:"border-t bg-white p-4",children:h.jsx("form",{onSubmit:Q,className:"max-w-3xl mx-auto",children:h.jsxs("div",{className:"flex gap-2",children:[h.jsx("input",{type:"text",value:r,onChange:J=>n(J.target.value),placeholder:"Tell Ellis what you're going through...",className:"flex-1 rounded-lg border border-gray-300 px-4 py-3 focus:outline-none focus:ring-2 focus:ring-lavender-500 focus:border-transparent",disabled:i}),h.jsx("button",{type:"submit",disabled:i||!r.trim(),className:"rounded-lg bg-lavender-600 px-6 py-3 text-white hover:bg-lavender-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-serif",children:h.jsx(ky,{className:"h-5 w-5"})})]})})}),!y&&h.jsx("div",{className:"bg-blue-50 border-t border-blue-200 p-3",children:h.jsxs("div",{className:"max-w-3xl mx-auto text-center text-sm text-blue-700",children:["💡 ",h.jsx("strong",{children:"Tip:"})," This conversation will expire in 24 hours.",h.jsx("a",{href:"/login",className:"ml-1 underline hover:text-blue-800",children:"Create an account"})," to save your conversation history permanently."]})})]})},xT="/assets/black_circle_360x360-l8-UlYwu.png",kT=()=>h.jsx("footer",{className:"bg-lavender-50 py-12 lg:py-16 border-t border-lavender-100",children:h.jsxs("div",{className:"max-w-7xl mx-auto px-6 sm:px-8 lg:px-12",children:[h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-10 lg:gap-12",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-lg font-serif font-semibold text-lavender-800 mb-4",children:"Contact Ellis"}),h.jsxs("div",{className:"space-y-4",children:[h.jsxs("a",{href:"tel:+14752430824",className:"flex items-center text-lavender-600 hover:text-lavender-700 transition-colors font-light text-sm",children:[h.jsx(On,{size:16,className:"mr-2"})," +1 (475) 243-0824"]}),h.jsxs(pe,{to:"/chat",className:"flex items-center text-lavender-600 hover:text-lavender-700 transition-colors font-light text-sm",children:[h.jsx(Kr,{size:16,className:"mr-2"})," Message Ellis"]}),h.jsxs(pe,{to:"/speak-with-ellis",className:"flex items-center text-lavender-600 hover:text-lavender-700 transition-colors font-light text-sm",children:[h.jsx(Pn,{size:16,className:"mr-2"})," Speak with Ellis"]})]})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-lg font-serif font-semibold text-lavender-800 mb-4",children:"Qu
302ick Links"}),h.jsxs("div",{className:"space-y-3",children:[h.jsx(pe,{to:"/",className:"block text-lavender-600 hover:text-lavender-700 transition-colors font-light text-sm",children:"Home"}),h.jsx(pe,{to:"/about",className:"block text-lavender-600 hover:text-lavender-700 transition-colors font-light text-sm",children:"About Us"}),h.jsx(pe,{to:"/resources",className:"block text-lavender-600 hover:text-lavender-700 transition-colors font-light text-sm",children:"Resources"}),h.jsx(pe,{to:"/login",className:"block text-lavender-600 hover:text-lavender-700 transition-colors font-light text-sm",children:"Login"})]})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-lg font-serif font-semibold text-lavender-800 mb-4",children:"Support Ellis"}),h.jsxs("div",{className:"space-y-4",children:[h.jsxs("a",{href:"https://gofund.me/2ca79e7a",target:"_blank",rel:"noopener noreferrer",className:"flex items-center text-white bg-lavender-600 px-4 py-2 rounded-md hover:bg-lavender-700 transition-all duration-200 font-serif font-medium text-sm",children:[h.jsx(Tn,{size:16,className:"mr-2"})," Donate to Ellis"]}),h.jsx("p",{className:"text-lavender-600 leading-relaxed text-sm font-light",children:"Help us expand our services to support more people in need."})]})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-lg font-serif font-semibold text-lavender-800 mb-4",children:"About Ellis"}),h.jsx("p",{className:"text-lavender-600 leading-relaxed text-sm font-light",children:"Ellis is an AI-enhanced social worker designed to provide empathetic support and connect you with resources for your needs. Join our pilot phase starting in the San Francisco Bay Area today."})]})]}),h.jsx("div",{className:"mt-12 pt-8 border-t border-lavender-200",children:h.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between",children:[h.jsxs("p",{className:"text-center text-lavender-500 flex items-center justify-center mb-6 md:mb-0 font-light text-sm",children:["Made with ",h.jsx(Tn,{size:16,className:"mx-2 text-red-500"})," for those in need © ",new Date().getFullYear()]}),h.jsxs("div",{className:"flex items-center space-x-3",children:[h.jsx("span",{className:"text-lavender-500 font-light text-sm",children:"Powered by"}),h.jsx("img",{src:xT,alt:"Bolt.new",className:"h-8 w-8 opacity-70 hover:opacity-100 transition-opacity"})]})]})})]})});function ST(){return h.jsx(gE,{children:h.jsx(Ex,{children:h.jsxs("div",{className:"flex flex-col min-h-screen",children:[h.jsx(vE,{}),h.jsx("main",{className:"flex-grow",children:h.jsxs(yx,{children:[h.jsx(nr,{path:"/",element:h.jsx(_E,{})}),h.jsx(nr,{path:"/about",element:h.jsx(xE,{})}),h.jsx(nr,{path:"/resources",element:h.jsx(SE,{})}),h.jsx(nr,{path:"/login",element:h.jsx(EE,{})}),h.jsx(nr,{path:"/dashboard",element:h.jsx(PE,{})}),h.jsx(nr,{path:"/speak-with-ellis",element:h.jsx(wT,{})}),h.jsx(nr,{path:"/claude-test",element:h.jsx(_T,{})}),h.jsx(nr,{path:"/chat",element:h.jsx(bT,{})})]})}),h.jsx(kT,{})]})})})}ay(document.getElementById("root")).render(h.jsx(ST,{}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.