PageSourceSearch

https://voice-agent-uvke.onrender.com/assets/index-CQJ8KOmf.js

js voice-agent-uvke.onrender.com collected 2026-10-03 11:43:33 UTC 771,274 bytes, 1,403 lines download raw bytes

vendor: 6,685 bytes, lines 1-9
1var qg=t=>{throw TypeError(t)};var Wd=(t,e,n)=>e.has(t)||qg("Cannot "+n);var V=(t,e,n)=>(Wd(t,e,"read from private field"),n?n.call(t):e.get(t)),Le=(t,e,n)=>e.has(t)?qg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ce=(t,e,n,r)=>(Wd(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Nt=(t,e,n)=>(Wd(t,e,"access private method"),n);var Fl=(t,e,n,r)=>({set _(s){Ce(t,e,s,n)},get _(){return V(t,e,r)}});function GC(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var kn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function H0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ZC(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var q0={exports:{}},Mu={},K0={exports:{}},Re={};/**
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 xl=Symbol.for("react.element"),YC=Symbol.for("react.portal"),QC=Symbol.for("react.fragment"),JC=Symbol.for("react.strict_mode"),XC=Symbol.for("react.profiler"),eE=Symbol.for("react.provider"),tE=Symbol.for("react.context"),nE=Symbol.for("react.forward_ref"),rE=Symbol.for("react.suspense"),sE=Symbol.for("react.memo"),oE=Symbol.for("react.lazy"),Kg=Symbol.iterator;function iE(t){return t===null||typeof t!="object"?null:(t=Kg&&t[Kg]||t["@@iterator"],typeof t=="function"?t:null)}var G0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Z0=Object.assign,Y0={};function Ii(t,e,n){this.props=t,this.context=e,this.refs=Y0,this.updater=n||G0}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 Q0(){}Q0.prototype=Ii.prototype;function Vp(t,e,n){this.props=t,this.context=e,this.refs=Y0,this.updater=n||G0}var zp=Vp.prototype=new Q0;zp.constructor=Vp;Z0(zp,Ii.prototype);zp.isPureReactComponent=!0;var Gg=Array.isArray,J0=Object.prototype.hasOwnProperty,Wp={current:null},X0={key:!0,ref:!0,__self:!0,__source:!0};function ew(t,e,n){var r,s={},o=null,i=null;if(e!=null)for(r in e.ref!==void 0&&(i=e.ref),e.key!==void 0&&(o=""+e.key),e)J0.call(e,r)&&!X0.hasOwnProperty(r)&&(s[r]=e[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:xl,type:t,key:o,ref:i,props:s,_owner:Wp.current}}function aE(t,e){return{$$typeof:xl,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Hp(t){return typeof t=="object"&&t!==null&&t.$$typeof===xl}function lE(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Zg=/\/+/g;function Hd(t,e){return typeof t=="object"&&t!==null&&t.key!=null?lE(""+t.key):e.toString(36)}function bc(t,e,n,r,s){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var i=!1;if(t===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case xl:case YC:i=!0}}if(i)return i=t,s=s(i),t=r===""?"."+Hd(i,0):r,Gg(s)?(n="",t!=null&&(n=t.replace(Zg,"$&/")+"/"),bc(s,e,n,"",function(c){return c})):s!=null&&(Hp(s)&&(s=aE(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(Zg,"$&/")+"/")+t)),e.push(s)),1;if(i=0,r=r===""?".":r+":",Gg(t))for(var a=0;a<t.length;a++){o=t[a];var l=r+Hd(o,a);i+=bc(o,e,n,l,s)}else if(l=iE(t),typeof l=="function")for(t=l.call(t),a=0;!(o=t.next()).done;)o=o.value,l=r+Hd(o,a++),i+=bc(o,e,n,l,s);else if(o==="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 i}function Ul(t,e,n){if(t==null)return t;var r=[],s=0;return bc(t,r,"","",function(o){return e.call(n,o,s++)}),r}function cE(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Wt={current:null},_c={transition:null},uE={ReactCurrentDispatcher:Wt,ReactCurrentBatchConfig:_c,ReactCurrentOwner:Wp};function tw(){throw Error("act(...) is not supported in production builds of React.")}Re.Children={map:Ul,forEach:function(t,e,n){Ul(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Ul(t,function(){e++}),e},toArray:function(t){return Ul(t,function(e){return e})||[]},only:function(t){if(!Hp(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Re.Component=Ii;Re.Fragment=QC;Re.Profiler=XC;Re.PureComponent=Vp;Re.StrictMode=JC;Re.Suspense=rE;
vendor: 5,750 bytes, lines 9-25
9Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uE;Re.act=tw;Re.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=Z0({},t.props),s=t.key,o=t.ref,i=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,i=Wp.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)J0.call(e,l)&&!X0.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:xl,type:t.type,key:s,ref:o,props:r,_owner:i}};Re.createContext=function(t){return t={$$typeof:tE,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:eE,_context:t},t.Consumer=t};Re.createElement=ew;Re.createFactory=function(t){var e=ew.bind(null,t);return e.type=t,e};Re.createRef=function(){return{current:null}};Re.forwardRef=function(t){return{$$typeof:nE,render:t}};Re.isValidElement=Hp;Re.lazy=function(t){return{$$typeof:oE,_payload:{_status:-1,_result:t},_init:cE}};Re.memo=function(t,e){return{$$typeof:sE,type:t,compare:e===void 0?null:e}};Re.startTransition=function(t){var e=_c.transition;_c.transition={};try{t()}finally{_c.transition=e}};Re.unstable_act=tw;Re.useCallback=function(t,e){return Wt.current.useCallback(t,e)};Re.useContext=function(t){return Wt.current.useContext(t)};Re.useDebugValue=function(){};Re.useDeferredValue=function(t){return Wt.current.useDeferredValue(t)};Re.useEffect=function(t,e){return Wt.current.useEffect(t,e)};Re.useId=function(){return Wt.current.useId()};Re.useImperativeHandle=function(t,e,n){return Wt.current.useImperativeHandle(t,e,n)};Re.useInsertionEffect=function(t,e){return Wt.current.useInsertionEffect(t,e)};Re.useLayoutEffect=function(t,e){return Wt.current.useLayoutEffect(t,e)};Re.useMemo=function(t,e){return Wt.current.useMemo(t,e)};Re.useReducer=function(t,e,n){return Wt.current.useReducer(t,e,n)};Re.useRef=function(t){return Wt.current.useRef(t)};Re.useState=function(t){return Wt.current.useState(t)};Re.useSyncExternalStore=function(t,e,n){return Wt.current.useSyncExternalStore(t,e,n)};Re.useTransition=function(){return Wt.current.useTransition()};Re.version="18.3.1";K0.exports=Re;var h=K0.exports;const L=H0(h),nw=GC({__proto__:null,default:L},[h]);/**
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 dE=h,fE=Symbol.for("react.element"),hE=Symbol.for("react.fragment"),pE=Object.prototype.hasOwnProperty,mE=dE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gE={key:!0,ref:!0,__self:!0,__source:!0};function rw(t,e,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(i=e.ref);for(r in e)pE.call(e,r)&&!gE.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:fE,type:t,key:o,ref:i,props:s,_owner:mE.current}}Mu.Fragment=hE;Mu.jsx=rw;Mu.jsxs=rw;q0.exports=Mu;var u=q0.exports,sw={exports:{}},hn={},ow={exports:{}},iw={};/**
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(j,U){var Y=j.length;j.push(U);e:for(;0<Y;){var $=Y-1>>>1,te=j[$];if(0<s(te,U))j[$]=U,j[Y]=te,Y=$;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var U=j[0],Y=j.pop();if(Y!==U){j[0]=Y;e:for(var $=0,te=j.length,ee=te>>>1;$<ee;){var de=2*($+1)-1,Ae=j[de],ue=de+1,se=j[ue];if(0>s(Ae,Y))ue<te&&0>s(se,Ae)?(j[$]=se,j[ue]=Y,$=ue):(j[$]=Ae,j[de]=Y,$=de);else if(ue<te&&0>s(se,Y))j[$]=se,j[ue]=Y,$=ue;else break e}}return U}function s(j,U){var Y=j.sortIndex-U.sortIndex;return Y!==0?Y:j.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();t.unstable_now=function(){return i.now()-a}}var l=[],c=[],d=1,f=null,p=3,y=!1,x=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(j){for(var U=n(c);U!==null;){if(U.callback===null)r(c);else if(U.startTime<=j)r(c),U.sortIndex=U.expirationTime,e(l,U);else break;U=n(c)}}function _(j){if(v=!1,w(j),!x)if(n(l)!==null)x=!0,B(S);else{var U=n(c);U!==null&&G(_,U.startTime-j)}}function S(j,U){x=!1,v&&(v=!1,g(T),T=-1),y=!0;var Y=p;try{for(w(U),f=n(l);f!==null&&(!(f.expirationTime>U)||j&&!D());){var $=f.callback;if(typeof $=="function"){f.callback=null,p=f.priorityLevel;var te=$(f.expirationTime<=U);U=t.unstable_now(),typeof te=="function"?f.callback=te:f===n(l)&&r(l),w(U)}else r(l);f=n(l)}if(f!==null)var ee=!0;else{var de=n(c);de!==null&&G(_,de.startTime-U),ee=!1}return ee}finally{f=null,p=Y,y=!1}}var C=!1,k=null,T=-1,I=5,P=-1;function D(){return!(t.unstable_now()-P<I)}function R(){if(k!==null){var j=t.unstable_now();P=j;var U=!0;try{U=k(!0,j)}finally{U?M():(C=!1,k=null)}}else C=!1}var M;if(typeof m=="function")M=function(){m(R)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,z=A.port2;A.port1.onmessage=R,M=function(){z.postMessage(null)}}else M=function(){b(R,0)};
vendor: 8,491 bytes, lines 25-34
25function B(j){k=j,C||(C=!0,M())}function G(j,U){T=b(function(){j(t.unstable_now())},U)}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(j){j.callback=null},t.unstable_continueExecution=function(){x||y||(x=!0,B(S))},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(j){switch(p){case 1:case 2:case 3:var U=3;break;default:U=p}var Y=p;p=U;try{return j()}finally{p=Y}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(j,U){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var Y=p;p=j;try{return U()}finally{p=Y}},t.unstable_scheduleCallback=function(j,U,Y){var $=t.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?$+Y:$):Y=$,j){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=Y+te,j={id:d++,callback:U,priorityLevel:j,startTime:Y,expirationTime:te,sortIndex:-1},Y>$?(j.sortIndex=Y,e(c,j),n(l)===null&&j===n(c)&&(v?(g(T),T=-1):v=!0,G(_,Y-$))):(j.sortIndex=te,e(l,j),x||y||(x=!0,B(S))),j},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(j){var U=p;return function(){var Y=p;p=U;try{return j.apply(this,arguments)}finally{p=Y}}}})(iw);ow.exports=iw;var vE=ow.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 yE=h,fn=vE;function q(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);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 aw=new Set,Ra={};function po(t,e){wi(t,e),wi(t+"Capture",e)}function wi(t,e){for(Ra[t]=e,t=0;t<e.length;t++)aw.add(e[t])}var Tr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gf=Object.prototype.hasOwnProperty,wE=/^[: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]*$/,Yg={},Qg={};function xE(t){return Gf.call(Qg,t)?!0:Gf.call(Yg,t)?!1:wE.test(t)?Qg[t]=!0:(Yg[t]=!0,!1)}function bE(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function _E(t,e,n,r){if(e===null||typeof e>"u"||bE(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 Ht(t,e,n,r,s,o,i){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=i}var Et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Et[t]=new Ht(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Et[e]=new Ht(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Et[t]=new Ht(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Et[t]=new Ht(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){Et[t]=new Ht(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Et[t]=new Ht(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Et[t]=new Ht(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Et[t]=new Ht(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Et[t]=new Ht(t,5,!1,t.toLowerCase(),null,!1,!1)});var qp=/[\-:]([a-z])/g;function Kp(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-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(qp,Kp);Et[e]=new Ht(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(qp,Kp);Et[e]=new Ht(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(qp,Kp);Et[e]=new Ht(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Et[t]=new Ht(t,1,!1,t.toLowerCase(),null,!1,!1)});Et.xlinkHref=new Ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Et[t]=new Ht(t,1,!1,t.toLowerCase(),null,!0,!0)});function Gp(t,e,n,r){var s=Et.hasOwnProperty(e)?Et[e]:null;(s!==null?s.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(_E(e,n,s,r)&&(n=null),r||s===null?xE(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):s.mustUseProperty?t[s.propertyName]=n===null?s.type===3?!1:"":n:(e=s.attributeName,r=s.attributeNamespace,n===null?t.removeAttribute(e):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var Or=yE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Bl=Symbol.for("react.element"),Uo=Symbol.for("react.portal"),Bo=Symbol.for("react.fragment"),Zp=Symbol.for("react.strict_mode"),Zf=Symbol.for("react.profiler"),lw=Symbol.for("react.provider"),cw=Symbol.for("react.context"),Yp=Symbol.for("react.forward_ref"),Yf=Symbol.for("react.suspense"),Qf=Symbol.for("react.suspense_list"),Qp=Symbol.for("react.memo"),qr=Symbol.for("react.lazy"),uw=Symbol.for("react.offscreen"),Jg=Symbol.iterator;function Hi(t){return t===null||typeof t!="object"?null:(t=Jg&&t[Jg]||t["@@iterator"],typeof t=="function"?t:null)}var st=Object.assign,qd;function sa(t){if(qd===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);qd=e&&e[1]||""}return`
34`+qd+t}var Kd=!1;function Gd(t,e){if(!t||Kd)return"";Kd=!0;var n=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(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}
vendor: 16,752 bytes, lines 34-37
34catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
35`),o=r.stack.split(`
36`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var l=`
37`+s[i].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=i&&0<=a);break}}}finally{Kd=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?sa(t):""}function SE(t){switch(t.tag){case 5:return sa(t.type);case 16:return sa("Lazy");case 13:return sa("Suspense");case 19:return sa("SuspenseList");case 0:case 2:case 15:return t=Gd(t.type,!1),t;case 11:return t=Gd(t.type.render,!1),t;case 1:return t=Gd(t.type,!0),t;default:return""}}function Jf(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 Bo:return"Fragment";case Uo:return"Portal";case Zf:return"Profiler";case Zp:return"StrictMode";case Yf:return"Suspense";case Qf:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case cw:return(t.displayName||"Context")+".Consumer";case lw:return(t._context.displayName||"Context")+".Provider";case Yp:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Qp:return e=t.displayName||null,e!==null?e:Jf(t.type)||"Memo";case qr:e=t._payload,t=t._init;try{return Jf(t(e))}catch{}}return null}function kE(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 Jf(e);case 8:return e===Zp?"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 ys(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function dw(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function CE(t){var e=dw(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Vl(t){t._valueTracker||(t._valueTracker=CE(t))}function fw(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=dw(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Dc(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 Xf(t,e){var n=e.checked;return st({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Xg(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=ys(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function hw(t,e){e=e.checked,e!=null&&Gp(t,"checked",e,!1)}function eh(t,e){hw(t,e);var n=ys(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?th(t,e.type,n):e.hasOwnProperty("defaultValue")&&th(t,e.type,ys(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function ev(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function th(t,e,n){(e!=="number"||Dc(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var oa=Array.isArray;function ei(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s<n.length;s++)e["$"+n[s]]=!0;for(n=0;n<t.length;n++)s=e.hasOwnProperty("$"+t[n].value),t[n].selected!==s&&(t[n].selected=s),s&&r&&(t[n].defaultSelected=!0)}else{for(n=""+ys(n),e=null,s=0;s<t.length;s++){if(t[s].value===n){t[s].selected=!0,r&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function nh(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(q(91));return st({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function tv(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(q(92));if(oa(n)){if(1<n.length)throw Error(q(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:ys(n)}}function pw(t,e){var n=ys(e.value),r=ys(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function nv(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function mw(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 rh(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?mw(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var zl,gw=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,s){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(zl=zl||document.createElement("div"),zl.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=zl.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Aa(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ha={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},EE=["Webkit","ms","Moz","O"];Object.keys(ha).forEach(function(t){EE.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ha[e]=ha[t]})});function vw(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||ha.hasOwnProperty(t)&&ha[t]?(""+e).trim():e+"px"}function yw(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=vw(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var TE=st({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 sh(t,e){if(e){if(TE[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(q(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(q(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(q(61))}if(e.style!=null&&typeof e.style!="object")throw Error(q(62))}}function oh(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 ih=null;function Jp(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ah=null,ti=null,ni=null;function rv(t){if(t=Sl(t)){if(typeof ah!="function")throw Error(q(280));var e=t.stateNode;e&&(e=Uu(e),ah(t.stateNode,t.type,e))}}function ww(t){ti?ni?ni.push(t):ni=[t]:ti=t}function xw(){if(ti){var t=ti,e=ni;if(ni=ti=null,rv(t),e)for(t=0;t<e.length;t++)rv(e[t])}}function bw(t,e){return t(e)}function _w(){}var Zd=!1;function Sw(t,e,n){if(Zd)return t(e,n);Zd=!0;try{return bw(t,e,n)}finally{Zd=!1,(ti!==null||ni!==null)&&(_w(),xw())}}function Ia(t,e){var n=t.stateNode;if(n===null)return null;var r=Uu(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(q(231,e,typeof n));return n}var lh=!1;if(Tr)try{var qi={};Object.defineProperty(qi,"passive",{get:function(){lh=!0}}),window.addEventListener("test",qi,qi),window.removeEventListener("test",qi,qi)}catch{lh=!1}function jE(t,e,n,r,s,o,i,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(d){this.onError(d)}}var pa=!1,$c=null,Fc=!1,ch=null,NE={onError:function(t){pa=!0,$c=t}};function PE(t,e,n,r,s,o,i,a,l){pa=!1,$c=null,jE.apply(NE,arguments)}function RE(t,e,n,r,s,o,i,a,l){if(PE.apply(this,arguments),pa){if(pa){var c=$c;pa=!1,$c=null}else throw Error(q(198));Fc||(Fc=!0,ch=c)}}function mo(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function kw(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 sv(t){if(mo(t)!==t)throw Error(q(188))}function AE(t){var e=t.alternate;if(!e){if(e=mo(t),e===null)throw Error(q(188));return e!==t?null:t}for(var n=t,r=e;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return sv(s),t;if(o===r)return sv(s),e;o=o.sibling}throw Error(q(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i)throw Error(q(189))}}if(n.alternate!==r)throw Error(q(190))}if(n.tag!==3)throw Error(q(188));return n.stateNode.current===n?t:e}function Cw(t){return t=AE(t),t!==null?Ew(t):null}function Ew(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Ew(t);if(e!==null)return e;t=t.sibling}return null}var Tw=fn.unstable_scheduleCallback,ov=fn.unstable_cancelCallback,IE=fn.unstable_shouldYield,OE=fn.unstable_requestPaint,ut=fn.unstable_now,ME=fn.unstable_getCurrentPriorityLevel,Xp=fn.unstable_ImmediatePriority,jw=fn.unstable_UserBlockingPriority,Uc=fn.unstable_NormalPriority,LE=fn.unstable_LowPriority,Nw=fn.unstable_IdlePriority,Lu=null,or=null;function DE(t){if(or&&typeof or.onCommitFiberRoot=="function")try{or.onCommitFiberRoot(Lu,t,void 0,(t.current.flags&128)===128)}catch{}}var Un=Math.clz32?Math.clz32:UE,$E=Math.log,FE=Math.LN2;function UE(t){return t>>>=0,t===0?32:31-($E(t)/FE|0)|0}var Wl=64,Hl=4194304;function ia(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 Bc(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,o=t.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=ia(a):(o&=i,o!==0&&(r=ia(o)))}else i=n&~s,i!==0?r=ia(i):o!==0&&(r=ia(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,o=e&-e,s>=o||s===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Un(e),s=1<<n,r|=t[n],e&=~s;return r}function BE(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 VE(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,s=t.expirationTimes,o=t.pendingLanes;0<o;){var i=31-Un(o),a=1<<i,l=s[i];l===-1?(!(a&n)||a&r)&&(s[i]=BE(a,e)):l<=e&&(t.expiredLanes|=a),o&=~a}}function uh(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Pw(){var t=Wl;return Wl<<=1,!(Wl&4194240)&&(Wl=64),t}function Yd(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function bl(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Un(e),t[e]=n}function zE(t,e){var n=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 r=t.eventTimes;for(t=t.expirationTimes;0<n;){var s=31-Un(n),o=1<<s;e[s]=0,r[s]=-1,t[s]=-1,n&=~o}}function em(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Un(n),s=1<<r;s&e|t[r]&e&&(t[r]|=e),n&=~s}}var $e=0;function Rw(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Aw,tm,Iw,Ow,Mw,dh=!1,ql=[],as=null,ls=null,cs=null,Oa=new Map,Ma=new Map,Gr=[],WE="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 iv(t,e){switch(t){case"focusin":case"focusout":as=null;break;case"dragenter":case"dragleave":ls=null;break;case"mouseover":case"mouseout":cs=null;break;case"pointerover":case"pointerout":Oa.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ma.delete(e.pointerId)}}function Ki(t,e,n,r,s,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},e!==null&&(e=Sl(e),e!==null&&tm(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function HE(t,e,n,r,s){switch(e){case"focusin":return as=Ki(as,t,e,n,r,s),!0;case"dragenter":return ls=Ki(ls,t,e,n,r,s),!0;case"mouseover":return cs=Ki(cs,t,e,n,r,s),!0;case"pointerover":var o=s.pointerId;return Oa.set(o,Ki(Oa.get(o)||null,t,e,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,Ma.set(o,Ki(Ma.get(o)||null,t,e,n,r,s)),!0}return!1}function Lw(t){var e=Ks(t.target);if(e!==null){var n=mo(e);if(n!==null){if(e=n.tag,e===13){if(e=kw(n),e!==null){t.blockedOn=e,Mw(t.priority,function(){Iw(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Sc(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=fh(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);ih=r,n.target.dispatchEvent(r),ih=null}else return e=Sl(n),e!==null&&tm(e),t.blockedOn=n,!1;e.shift()}return!0}function av(t,e,n){Sc(t)&&n.delete(e)}function qE(){dh=!1,as!==null&&Sc(as)&&(as=null),ls!==null&&Sc(ls)&&(ls=null),cs!==null&&Sc(cs)&&(cs=null),Oa.forEach(av),Ma.forEac
vendor: 11,826 bytes, line 37
37h(av)}function Gi(t,e){t.blockedOn===e&&(t.blockedOn=null,dh||(dh=!0,fn.unstable_scheduleCallback(fn.unstable_NormalPriority,qE)))}function La(t){function e(s){return Gi(s,t)}if(0<ql.length){Gi(ql[0],t);for(var n=1;n<ql.length;n++){var r=ql[n];r.blockedOn===t&&(r.blockedOn=null)}}for(as!==null&&Gi(as,t),ls!==null&&Gi(ls,t),cs!==null&&Gi(cs,t),Oa.forEach(e),Ma.forEach(e),n=0;n<Gr.length;n++)r=Gr[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Gr.length&&(n=Gr[0],n.blockedOn===null);)Lw(n),n.blockedOn===null&&Gr.shift()}var ri=Or.ReactCurrentBatchConfig,Vc=!0;function KE(t,e,n,r){var s=$e,o=ri.transition;ri.transition=null;try{$e=1,nm(t,e,n,r)}finally{$e=s,ri.transition=o}}function GE(t,e,n,r){var s=$e,o=ri.transition;ri.transition=null;try{$e=4,nm(t,e,n,r)}finally{$e=s,ri.transition=o}}function nm(t,e,n,r){if(Vc){var s=fh(t,e,n,r);if(s===null)af(t,e,r,zc,n),iv(t,r);else if(HE(s,t,e,n,r))r.stopPropagation();else if(iv(t,r),e&4&&-1<WE.indexOf(t)){for(;s!==null;){var o=Sl(s);if(o!==null&&Aw(o),o=fh(t,e,n,r),o===null&&af(t,e,r,zc,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else af(t,e,r,null,n)}}var zc=null;function fh(t,e,n,r){if(zc=null,t=Jp(r),t=Ks(t),t!==null)if(e=mo(t),e===null)t=null;else if(n=e.tag,n===13){if(t=kw(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return zc=t,null}function Dw(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(ME()){case Xp:return 1;case jw:return 4;case Uc:case LE:return 16;case Nw:return 536870912;default:return 16}default:return 16}}var ss=null,rm=null,kc=null;function $w(){if(kc)return kc;var t,e=rm,n=e.length,r,s="value"in ss?ss.value:ss.textContent,o=s.length;for(t=0;t<n&&e[t]===s[t];t++);var i=n-t;for(r=1;r<=i&&e[n-r]===s[o-r];r++);return kc=s.slice(t,1<r?1-r:void 0)}function Cc(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 Kl(){return!0}function lv(){return!1}function pn(t){function e(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Kl:lv,this.isPropagationStopped=lv,this}return st(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Kl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Kl)},persist:function(){},isPersistent:Kl}),e}var Oi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sm=pn(Oi),_l=st({},Oi,{view:0,detail:0}),ZE=pn(_l),Qd,Jd,Zi,Du=st({},_l,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:om,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!==Zi&&(Zi&&t.type==="mousemove"?(Qd=t.screenX-Zi.screenX,Jd=t.screenY-Zi.screenY):Jd=Qd=0,Zi=t),Qd)},movementY:function(t){return"movementY"in t?t.movementY:Jd}}),cv=pn(Du),YE=st({},Du,{dataTransfer:0}),QE=pn(YE),JE=st({},_l,{relatedTarget:0}),Xd=pn(JE),XE=st({},Oi,{animationName:0,elapsedTime:0,pseudoElement:0}),eT=pn(XE),tT=st({},Oi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),nT=pn(tT),rT=st({},Oi,{data:0}),uv=pn(rT),sT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oT={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"},iT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aT(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=iT[t])?!!e[t]:!1}function om(){return aT}var lT=st({},_l,{key:function(t){if(t.key){var e=sT[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Cc(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?oT[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:om,charCode:function(t){return t.type==="keypress"?Cc(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Cc(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),cT=pn(lT),uT=st({},Du,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dv=pn(uT),dT=st({},_l,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:om}),fT=pn(dT),hT=st({},Oi,{propertyName:0,elapsedTime:0,pseudoElement:0}),pT=pn(hT),mT=st({},Du,{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}),gT=pn(mT),vT=[9,13,27,32],im=Tr&&"CompositionEvent"in window,ma=null;Tr&&"documentMode"in document&&(ma=document.documentMode);var yT=Tr&&"TextEvent"in window&&!ma,Fw=Tr&&(!im||ma&&8<ma&&11>=ma),fv=" ",hv=!1;function Uw(t,e){switch(t){case"keyup":return vT.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bw(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Vo=!1;function wT(t,e){switch(t){case"compositionend":return Bw(e);case"keypress":return e.which!==32?null:(hv=!0,fv);case"textInput":return t=e.data,t===fv&&hv?null:t;default:return null}}function xT(t,e){if(Vo)return t==="compositionend"||!im&&Uw(t,e)?(t=$w(),kc=rm=ss=null,Vo=!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 Fw&&e.locale!=="ko"?null:e.data;default:return null}}var bT={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 pv(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!bT[t.type]:e==="textarea"}function Vw(t,e,n,r){ww(r),e=Wc(e,"onChange"),0<e.length&&(n=new sm("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var ga=null,Da=null;function _T(t){Xw(t,0)}function $u(t){var e=Ho(t);if(fw(e))return t}function ST(t,e){if(t==="change")return e}var zw=!1;if(Tr){var ef;if(Tr){var tf="oninput"in document;if(!tf){var mv=document.createElement("div");mv.setAttribute("oninput","return;"),tf=typeof mv.oninput=="function"}ef=tf}else ef=!1;zw=ef&&(!document.documentMode||9<document.documentMode)}function gv(){ga&&(ga.detachEvent("onpropertychange",Ww),Da=ga=null)}function Ww(t){if(t.propertyName==="value"&&$u(Da)){var e=[];Vw(e,Da,t,Jp(t)),Sw(_T,e)}}function kT(t,e,n){t==="focusin"?(gv(),ga=e,Da=n,ga.attachEvent("onpropertychange",Ww)):t==="focusout"&&gv()}function CT(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return $u(Da)}function ET(t,e){if(t==="click")return $u(e)}function TT(t,e){if(t==="input"||t==="change")return $u(e)}function jT(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Hn=typeof Object.is=="function"?Object.is:jT;function $a(t,e){if(Hn(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Gf.call(e,s)||!Hn(t[s],e[s]))return!1}return!0}function vv(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function yv(t,e){var n=vv(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=vv(n)}}function Hw(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Hw(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function qw(){for(var t=window,e=Dc();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Dc(t.document)}return e}function am(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 NT(t){var e=qw(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&Hw(n.ownerDocument.documentElement,n)){if(r!==null&&am(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!t.extend&&o>r&&(s=r,r=o,o=s),s=yv(n,o);var i=yv(n,r);s&&i&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==i.node||t.focusOffset!==i.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(i.node,i.offset)):(e.setEnd(i.node,i.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var PT=Tr&&"documentMode"in document&&11>=document.documentMode,zo=null,hh=null,va=null,ph=!1;function wv(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ph||zo==null||zo!==Dc(r)||(r=zo,"selectionStart"in r&&am(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),va&&$a(va,r)||(va=r,r=Wc(hh,"onSelect"),0<r.length&&(e=new sm("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=zo)))}function Gl(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Wo={animationend:Gl("Animation","AnimationEnd"),animationiteration:Gl("Animation","AnimationIteration"),animationstart:Gl("Animation","AnimationStart"),transitionend:Gl("Transition","TransitionEnd")},nf={},Kw={};Tr&&(Kw=document.createElement("div").style,"AnimationEvent"in window||(delete Wo.animationend.animation,delete Wo.animationiteration.animation,delete Wo.animationstart.animation),"TransitionEvent"in window||delete Wo.transitionend.transition);function Fu(t){if(nf[t])return nf[t];if(!Wo[t])return t;var e=Wo[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Kw)return nf[t]=e[n];return t}var Gw=Fu("animationend"),Zw=Fu("animationiteration"),Yw=Fu("animationstart"),Qw=Fu("transitionend"),Jw=new Map,xv="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 Ns(t,e){Jw.set(t,e),po(e,[t])}for(var rf=0;rf<xv.length;rf++){var sf=xv[rf],RT=sf.toLowerCase(),AT=sf[0].toUpperCase()+sf.slice(1);Ns(RT,"on"+AT)}Ns(Gw,"onAnimationEnd");Ns(Zw,"onAnimationIteration");Ns(Yw,"onAnimationStart");Ns("dblclick","onDoubleClick");Ns("focusin","onFocus");Ns("focusout","onBlur");Ns(Qw,"onTransitionEnd");wi("onMouseEnter",["mouseout","mouseover"]);wi("onMouseLeave",["mouseout","mouseover"]);wi("onPointerEnter",["pointerout","pointerover"]);wi("onPointerLeave",["pointerout","pointerover"]);po("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));po("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));po("onBeforeInput",["compositionend","keypress","textInput","paste"]);po("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));po("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));po("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var aa="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(" "),IT=new Set("cancel close invalid load scroll toggle".split(" ").concat(aa));function bv(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,RE(r,e,void 0,t),t.currentTarget=null}function Xw(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],s=r.event;r=r.listeners;e:{var o=void 0;if(e)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;bv(s,a,c),o=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;bv(s,a,c),o=l}}}if(Fc)throw t=ch,Fc=!1,ch=null,t}function Ge(t,e){var n=e[wh];n===void 0&&(n=e[wh]=new Set);var r=t+"__bubble";n.has(r)||(ex(e,t,2,!1),n.add(r))}function of(t,e,n){var r=0;e&&(r|=4),ex(n,t,r,e)}var Zl="_reactListening"+Math.random().toString(36).slice(2);function Fa(t){if(!t[Zl]){t[Zl]=!0,aw.forEach(function(n){n!=="selectionchange"&&(IT.has(n)||of(n,!1,t),of(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Zl]||(e[Zl]=!0,of("selectionchange",!1,e))}}function ex(t,e,n,r){switch(Dw(e)){case 1:var s=KE;break;case 4:s=GE;break;default:s=nm}n=s.bind(null,e,n,t),s=void 0,!lh||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),r?s!==void 0?t.addEventListener(e,n,{capture:!0,passive:s}):t.addEventListener(e,n,!0):s!==void 0?t.addEventListener(e,n,{passive:s}):t.addEventListener(e,n,!1)}function af(t,e,n,r,s){var o=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;
vendor: 1,491 bytes, line 37
37if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;i=i.return}for(;a!==null;){if(i=Ks(a),i===null)return;if(l=i.tag,l===5||l===6){r=o=i;continue e}a=a.parentNode}}r=r.return}Sw(function(){var c=o,d=Jp(n),f=[];e:{var p=Jw.get(t);if(p!==void 0){var y=sm,x=t;switch(t){case"keypress":if(Cc(n)===0)break e;case"keydown":case"keyup":y=cT;break;case"focusin":x="focus",y=Xd;break;case"focusout":x="blur",y=Xd;break;case"beforeblur":case"afterblur":y=Xd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=cv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=QE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=fT;break;case Gw:case Zw:case Yw:y=eT;break;case Qw:y=pT;break;case"scroll":y=ZE;break;case"wheel":y=gT;break;case"copy":case"cut":case"paste":y=nT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=dv}var v=(e&4)!==0,b=!v&&t==="scroll",g=v?p!==null?p+"Capture":null:p;v=[];for(var m=c,w;m!==null;){w=m;var _=w.stateNode;if(w.tag===5&&_!==null&&(w=_,g!==null&&(_=Ia(m,g),_!=null&&v.push(Ua(m,_,w)))),b)break;m=m.return}
vendor: 4,319 bytes, lines 37-38
370<v.length&&(p=new y(p,x,null,n,d),f.push({event:p,listeners:v}))}}if(!(e&7)){e:{if(p=t==="mouseover"||t==="pointerover",y=t==="mouseout"||t==="pointerout",p&&n!==ih&&(x=n.relatedTarget||n.fromElement)&&(Ks(x)||x[jr]))break e;if((y||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,y?(x=n.relatedTarget||n.toElement,y=c,x=x?Ks(x):null,x!==null&&(b=mo(x),x!==b||x.tag!==5&&x.tag!==6)&&(x=null)):(y=null,x=c),y!==x)){if(v=cv,_="onMouseLeave",g="onMouseEnter",m="mouse",(t==="pointerout"||t==="pointerover")&&(v=dv,_="onPointerLeave",g="onPointerEnter",m="pointer"),b=y==null?p:Ho(y),w=x==null?p:Ho(x),p=new v(_,m+"leave",y,n,d),p.target=b,p.relatedTarget=w,_=null,Ks(d)===c&&(v=new v(g,m+"enter",x,n,d),v.target=w,v.relatedTarget=b,_=v),b=_,y&&x)t:{for(v=y,g=x,m=0,w=v;w;w=xo(w))m++;for(w=0,_=g;_;_=xo(_))w++;for(;0<m-w;)v=xo(v),m--;for(;0<w-m;)g=xo(g),w--;for(;m--;){if(v===g||g!==null&&v===g.alternate)break t;v=xo(v),g=xo(g)}v=null}else v=null;y!==null&&_v(f,p,y,v,!1),x!==null&&b!==null&&_v(f,b,x,v,!0)}}e:{if(p=c?Ho(c):window,y=p.nodeName&&p.nodeName.toLowerCase(),y==="select"||y==="input"&&p.type==="file")var S=ST;else if(pv(p))if(zw)S=TT;else{S=CT;var C=kT}else(y=p.nodeName)&&y.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(S=ET);if(S&&(S=S(t,c))){Vw(f,S,n,d);break e}C&&C(t,p,c),t==="focusout"&&(C=p._wrapperState)&&C.controlled&&p.type==="number"&&th(p,"number",p.value)}switch(C=c?Ho(c):window,t){case"focusin":(pv(C)||C.contentEditable==="true")&&(zo=C,hh=c,va=null);break;case"focusout":va=hh=zo=null;break;case"mousedown":ph=!0;break;case"contextmenu":case"mouseup":case"dragend":ph=!1,wv(f,n,d);break;case"selectionchange":if(PT)break;case"keydown":case"keyup":wv(f,n,d)}var k;if(im)e:{switch(t){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Vo?Uw(t,n)&&(T="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Fw&&n.locale!=="ko"&&(Vo||T!=="onCompositionStart"?T==="onCompositionEnd"&&Vo&&(k=$w()):(ss=d,rm="value"in ss?ss.value:ss.textContent,Vo=!0)),C=Wc(c,T),0<C.length&&(T=new uv(T,t,null,n,d),f.push({event:T,listeners:C}),k?T.data=k:(k=Bw(n),k!==null&&(T.data=k)))),(k=yT?wT(t,n):xT(t,n))&&(c=Wc(c,"onBeforeInput"),0<c.length&&(d=new uv("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=k))}Xw(f,e)})}function Ua(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Wc(t,e){for(var n=e+"Capture",r=[];t!==null;){var s=t,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Ia(t,n),o!=null&&r.unshift(Ua(t,o,s)),o=Ia(t,e),o!=null&&r.push(Ua(t,o,s))),t=t.return}return r}function xo(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function _v(t,e,n,r,s){for(var o=e._reactName,i=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=Ia(n,o),l!=null&&i.unshift(Ua(n,l,a))):s||(l=Ia(n,o),l!=null&&i.push(Ua(n,l,a)))),n=n.return}i.length!==0&&t.push({event:e,listeners:i})}var OT=/\r\n?/g,MT=/\u0000|\uFFFD/g;function Sv(t){return(typeof t=="string"?t:""+t).replace(OT,`
38`).replace(MT,"")}function Yl(t,e,n){if(e=Sv(e),Sv(t)!==e&&n)throw Error(q(425))}function Hc(){}var mh=null,gh=null;function vh(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 yh=typeof setTimeout=="function"?setTimeout:void 0,LT=typeof clearTimeout=="function"?clearTimeout:void 0,kv=typeof Promise=="function"?Promise:void 0,DT=typeof queueMicrotask=="function"?queueMicrotask:typeof kv<"u"?function(t){return kv.resolve(null).then(t).catch($T)}:yh;function $T(t){setTimeout(function(){throw t})}function lf(t,e){var n=e,r=0;do{var s=n.nextSibling;if(t.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){t.removeChild(s),La(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);La(e)}function us(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 Cv(t){t=t.previousSibling;for(var e=0;t;
vendor: 4,330 bytes, line 38
38){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Mi=Math.random().toString(36).slice(2),rr="__reactFiber$"+Mi,Ba="__reactProps$"+Mi,jr="__reactContainer$"+Mi,wh="__reactEvents$"+Mi,FT="__reactListeners$"+Mi,UT="__reactHandles$"+Mi;function Ks(t){var e=t[rr];if(e)return e;for(var n=t.parentNode;n;){if(e=n[jr]||n[rr]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Cv(t);t!==null;){if(n=t[rr])return n;t=Cv(t)}return e}t=n,n=t.parentNode}return null}function Sl(t){return t=t[rr]||t[jr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Ho(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(q(33))}function Uu(t){return t[Ba]||null}var xh=[],qo=-1;function Ps(t){return{current:t}}function Ye(t){0>qo||(t.current=xh[qo],xh[qo]=null,qo--)}function qe(t,e){qo++,xh[qo]=t.current,t.current=e}var ws={},Mt=Ps(ws),Qt=Ps(!1),ro=ws;function xi(t,e){var n=t.type.contextTypes;if(!n)return ws;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function Jt(t){return t=t.childContextTypes,t!=null}function qc(){Ye(Qt),Ye(Mt)}function Ev(t,e,n){if(Mt.current!==ws)throw Error(q(168));qe(Mt,e),qe(Qt,n)}function tx(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(q(108,kE(t)||"Unknown",s));return st({},n,r)}function Kc(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ws,ro=Mt.current,qe(Mt,t),qe(Qt,Qt.current),!0}function Tv(t,e,n){var r=t.stateNode;if(!r)throw Error(q(169));n?(t=tx(t,e,ro),r.__reactInternalMemoizedMergedChildContext=t,Ye(Qt),Ye(Mt),qe(Mt,t)):Ye(Qt),qe(Qt,n)}var _r=null,Bu=!1,cf=!1;function nx(t){_r===null?_r=[t]:_r.push(t)}function BT(t){Bu=!0,nx(t)}function Rs(){if(!cf&&_r!==null){cf=!0;var t=0,e=$e;try{var n=_r;for($e=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}_r=null,Bu=!1}catch(s){throw _r!==null&&(_r=_r.slice(t+1)),Tw(Xp,Rs),s}finally{$e=e,cf=!1}}return null}var Ko=[],Go=0,Gc=null,Zc=0,yn=[],wn=0,so=null,Sr=1,kr="";function zs(t,e){Ko[Go++]=Zc,Ko[Go++]=Gc,Gc=t,Zc=e}function rx(t,e,n){yn[wn++]=Sr,yn[wn++]=kr,yn[wn++]=so,so=t;var r=Sr;t=kr;var s=32-Un(r)-1;r&=~(1<<s),n+=1;var o=32-Un(e)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,Sr=1<<32-Un(e)+s|n<<s|r,kr=o+t}else Sr=1<<o|n<<s|r,kr=t}function lm(t){t.return!==null&&(zs(t,1),rx(t,1,0))}function cm(t){for(;t===Gc;)Gc=Ko[--Go],Ko[Go]=null,Zc=Ko[--Go],Ko[Go]=null;for(;t===so;)so=yn[--wn],yn[wn]=null,kr=yn[--wn],yn[wn]=null,Sr=yn[--wn],yn[wn]=null}var cn=null,ln=null,Xe=!1,Dn=null;function sx(t,e){var n=bn(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function jv(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,cn=t,ln=us(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,cn=t,ln=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=so!==null?{id:Sr,overflow:kr}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=bn(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,cn=t,ln=null,!0):!1;default:return!1}}function bh(t){return(t.mode&1)!==0&&(t.flags&128)===0}function _h(t){if(Xe){var e=ln;if(e){var n=e;if(!jv(t,e)){if(bh(t))throw Error(q(418));e=us(n.nextSibling);var r=cn;e&&jv(t,e)?sx(r,n):(t.flags=t.flags&-4097|2,Xe=!1,cn=t)}}else{if(bh(t))throw Error(q(418));t.flags=t.flags&-4097|2,Xe=!1,cn=t}}}function Nv(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;cn=t}function Ql(t){if(t!==cn)return!1;if(!Xe)return Nv(t),Xe=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!vh(t.type,t.memoizedProps)),e&&(e=ln)){if(bh(t))throw ox(),Error(q(418));for(;e;)sx(t,e),e=us(e.nextSibling)}if(Nv(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(q(317));e:{for(t=t.nextSibling,e=0;t;
vendor: 25,596 bytes, lines 38-40
38){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){ln=us(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}ln=null}}else ln=cn?us(t.stateNode.nextSibling):null;return!0}function ox(){for(var t=ln;t;)t=us(t.nextSibling)}function bi(){ln=cn=null,Xe=!1}function um(t){Dn===null?Dn=[t]:Dn.push(t)}var VT=Or.ReactCurrentBatchConfig;function Yi(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(q(309));var r=n.stateNode}if(!r)throw Error(q(147,t));var s=r,o=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===o?e.ref:(e=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},e._stringRef=o,e)}if(typeof t!="string")throw Error(q(284));if(!n._owner)throw Error(q(290,t))}return t}function Jl(t,e){throw t=Object.prototype.toString.call(e),Error(q(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Pv(t){var e=t._init;return e(t._payload)}function ix(t){function e(g,m){if(t){var w=g.deletions;w===null?(g.deletions=[m],g.flags|=16):w.push(m)}}function n(g,m){if(!t)return null;for(;m!==null;)e(g,m),m=m.sibling;return null}function r(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function s(g,m){return g=ps(g,m),g.index=0,g.sibling=null,g}function o(g,m,w){return g.index=w,t?(w=g.alternate,w!==null?(w=w.index,w<m?(g.flags|=2,m):w):(g.flags|=2,m)):(g.flags|=1048576,m)}function i(g){return t&&g.alternate===null&&(g.flags|=2),g}function a(g,m,w,_){return m===null||m.tag!==6?(m=gf(w,g.mode,_),m.return=g,m):(m=s(m,w),m.return=g,m)}function l(g,m,w,_){var S=w.type;return S===Bo?d(g,m,w.props.children,_,w.key):m!==null&&(m.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===qr&&Pv(S)===m.type)?(_=s(m,w.props),_.ref=Yi(g,m,w),_.return=g,_):(_=Ac(w.type,w.key,w.props,null,g.mode,_),_.ref=Yi(g,m,w),_.return=g,_)}function c(g,m,w,_){return m===null||m.tag!==4||m.stateNode.containerInfo!==w.containerInfo||m.stateNode.implementation!==w.implementation?(m=vf(w,g.mode,_),m.return=g,m):(m=s(m,w.children||[]),m.return=g,m)}function d(g,m,w,_,S){return m===null||m.tag!==7?(m=to(w,g.mode,_,S),m.return=g,m):(m=s(m,w),m.return=g,m)}function f(g,m,w){if(typeof m=="string"&&m!==""||typeof m=="number")return m=gf(""+m,g.mode,w),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Bl:return w=Ac(m.type,m.key,m.props,null,g.mode,w),w.ref=Yi(g,null,m),w.return=g,w;case Uo:return m=vf(m,g.mode,w),m.return=g,m;case qr:var _=m._init;return f(g,_(m._payload),w)}if(oa(m)||Hi(m))return m=to(m,g.mode,w,null),m.return=g,m;Jl(g,m)}return null}function p(g,m,w,_){var S=m!==null?m.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return S!==null?null:a(g,m,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Bl:return w.key===S?l(g,m,w,_):null;case Uo:return w.key===S?c(g,m,w,_):null;case qr:return S=w._init,p(g,m,S(w._payload),_)}if(oa(w)||Hi(w))return S!==null?null:d(g,m,w,_,null);Jl(g,w)}return null}function y(g,m,w,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return g=g.get(w)||null,a(m,g,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Bl:return g=g.get(_.key===null?w:_.key)||null,l(m,g,_,S);case Uo:return g=g.get(_.key===null?w:_.key)||null,c(m,g,_,S);case qr:var C=_._init;return y(g,m,w,C(_._payload),S)}if(oa(_)||Hi(_))return g=g.get(w)||null,d(m,g,_,S,null);Jl(m,_)}return null}function x(g,m,w,_){for(var S=null,C=null,k=m,T=m=0,I=null;k!==null&&T<w.length;T++){k.index>T?(I=k,k=null):I=k.sibling;var P=p(g,k,w[T],_);if(P===null){k===null&&(k=I);break}t&&k&&P.alternate===null&&e(g,k),m=o(P,m,T),C===null?S=P:C.sibling=P,C=P,k=I}if(T===w.length)return n(g,k),Xe&&zs(g,T),S;if(k===null){for(;T<w.length;T++)k=f(g,w[T],_),k!==null&&(m=o(k,m,T),C===null?S=k:C.sibling=k,C=k);return Xe&&zs(g,T),S}for(k=r(g,k);T<w.length;T++)I=y(k,g,T,w[T],_),I!==null&&(t&&I.alternate!==null&&k.delete(I.key===null?T:I.key),m=o(I,m,T),C===null?S=I:C.sibling=I,C=I);return t&&k.forEach(function(D){return e(g,D)}),Xe&&zs(g,T),S}function v(g,m,w,_){var S=Hi(w);if(typeof S!="function")throw Error(q(150));if(w=S.call(w),w==null)throw Error(q(151));for(var C=S=null,k=m,T=m=0,I=null,P=w.next();k!==null&&!P.done;T++,P=w.next()){k.index>T?(I=k,k=null):I=k.sibling;var D=p(g,k,P.value,_);if(D===null){k===null&&(k=I);break}t&&k&&D.alternate===null&&e(g,k),m=o(D,m,T),C===null?S=D:C.sibling=D,C=D,k=I}if(P.done)return n(g,k),Xe&&zs(g,T),S;if(k===null){for(;!P.done;T++,P=w.next())P=f(g,P.value,_),P!==null&&(m=o(P,m,T),C===null?S=P:C.sibling=P,C=P);return Xe&&zs(g,T),S}for(k=r(g,k);!P.done;T++,P=w.next())P=y(k,g,T,P.value,_),P!==null&&(t&&P.alternate!==null&&k.delete(P.key===null?T:P.key),m=o(P,m,T),C===null?S=P:C.sibling=P,C=P);return t&&k.forEach(function(R){return e(g,R)}),Xe&&zs(g,T),S}function b(g,m,w,_){if(typeof w=="object"&&w!==null&&w.type===Bo&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Bl:e:{for(var S=w.key,C=m;C!==null;){if(C.key===S){if(S=w.type,S===Bo){if(C.tag===7){n(g,C.sibling),m=s(C,w.props.children),m.return=g,g=m;break e}}else if(C.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===qr&&Pv(S)===C.type){n(g,C.sibling),m=s(C,w.props),m.ref=Yi(g,C,w),m.return=g,g=m;break e}n(g,C);break}else e(g,C);C=C.sibling}w.type===Bo?(m=to(w.props.children,g.mode,_,w.key),m.return=g,g=m):(_=Ac(w.type,w.key,w.props,null,g.mode,_),_.ref=Yi(g,m,w),_.return=g,g=_)}return i(g);case Uo:e:{for(C=w.key;m!==null;){if(m.key===C)if(m.tag===4&&m.stateNode.containerInfo===w.containerInfo&&m.stateNode.implementation===w.implementation){n(g,m.sibling),m=s(m,w.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else e(g,m);m=m.sibling}m=vf(w,g.mode,_),m.return=g,g=m}return i(g);case qr:return C=w._init,b(g,m,C(w._payload),_)}if(oa(w))return x(g,m,w,_);if(Hi(w))return v(g,m,w,_);Jl(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,m!==null&&m.tag===6?(n(g,m.sibling),m=s(m,w),m.return=g,g=m):(n(g,m),m=gf(w,g.mode,_),m.return=g,g=m),i(g)):n(g,m)}return b}var _i=ix(!0),ax=ix(!1),Yc=Ps(null),Qc=null,Zo=null,dm=null;function fm(){dm=Zo=Qc=null}function hm(t){var e=Yc.current;Ye(Yc),t._currentValue=e}function Sh(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function si(t,e){Qc=t,dm=Zo=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Yt=!0),t.firstContext=null)}function Cn(t){var e=t._currentValue;if(dm!==t)if(t={context:t,memoizedValue:e,next:null},Zo===null){if(Qc===null)throw Error(q(308));Zo=t,Qc.dependencies={lanes:0,firstContext:t}}else Zo=Zo.next=t;return e}var Gs=null;function pm(t){Gs===null?Gs=[t]:Gs.push(t)}function lx(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,pm(e)):(n.next=s.next,s.next=n),e.interleaved=n,Nr(t,r)}function Nr(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Kr=!1;function mm(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cx(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 Er(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ds(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Oe&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,Nr(t,n)}return s=r.interleaved,s===null?(e.next=e,pm(r)):(e.next=s.next,s.next=e),r.interleaved=e,Nr(t,n)}function Ec(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,em(t,n)}}function Rv(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=e:o=o.next=e}else s=o=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Jc(t,e,n,r){var s=t.updateQueue;Kr=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?o=c:i.next=c,i=l;var d=t.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(o!==null){var f=s.baseState;i=0,d=c=l=null,a=o;do{var p=a.lane,y=a.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:y,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=t,v=a;switch(p=e,y=n,v.tag){case 1:if(x=v.payload,typeof x=="function"){f=x.call(y,f,p);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=v.payload,p=typeof x=="function"?x.call(y,f,p):x,p==null)break e;f=st({},f,p);break e;case 2:Kr=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else y={eventTime:y,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=y,l=f):d=d.next=y,i|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(d===null&&(l=f),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,e=s.shared.interleaved,e!==null){s=e;do i|=s.lane,s=s.next;while(s!==e)}else o===null&&(s.shared.lanes=0);io|=i,t.lanes=i,t.memoizedState=f}}function Av(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(q(191,s));s.call(r)}}}var kl={},ir=Ps(kl),Va=Ps(kl),za=Ps(kl);function Zs(t){if(t===kl)throw Error(q(174));return t}function gm(t,e){switch(qe(za,e),qe(Va,t),qe(ir,kl),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:rh(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=rh(e,t)}Ye(ir),qe(ir,e)}function Si(){Ye(ir),Ye(Va),Ye(za)}function ux(t){Zs(za.current);var e=Zs(ir.current),n=rh(e,t.type);e!==n&&(qe(Va,t),qe(ir,n))}function vm(t){Va.current===t&&(Ye(ir),Ye(Va))}var nt=Ps(0);function Xc(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.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 uf=[];function ym(){for(var t=0;t<uf.length;t++)uf[t]._workInProgressVersionPrimary=null;uf.length=0}var Tc=Or.ReactCurrentDispatcher,df=Or.ReactCurrentBatchConfig,oo=0,rt=null,yt=null,bt=null,eu=!1,ya=!1,Wa=0,zT=0;function Pt(){throw Error(q(321))}function wm(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Hn(t[n],e[n]))return!1;return!0}function xm(t,e,n,r,s,o){if(oo=o,rt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Tc.current=t===null||t.memoizedState===null?KT:GT,t=n(r,s),ya){o=0;do{if(ya=!1,Wa=0,25<=o)throw Error(q(301));o+=1,bt=yt=null,e.updateQueue=null,Tc.current=ZT,t=n(r,s)}while(ya)}if(Tc.current=tu,e=yt!==null&&yt.next!==null,oo=0,bt=yt=rt=null,eu=!1,e)throw Error(q(300));return t}function bm(){var t=Wa!==0;return Wa=0,t}function Jn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bt===null?rt.memoizedState=bt=t:bt=bt.next=t,bt}function En(){if(yt===null){var t=rt.alternate;t=t!==null?t.memoizedState:null}else t=yt.next;var e=bt===null?rt.memoizedState:bt.next;if(e!==null)bt=e,yt=t;else{if(t===null)throw Error(q(310));yt=t,t={memoizedState:yt.memoizedState,baseState:yt.baseState,baseQueue:yt.baseQueue,queue:yt.queue,next:null},bt===null?rt.memoizedState=bt=t:bt=bt.next=t}return bt}function Ha(t,e){return typeof e=="function"?e(t):e}function ff(t){var e=En(),n=e.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=t;var r=yt,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var a=i=null,l=null,c=o;do{var d=c.lane;if((oo&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,i=r):l=l.next=f,rt.lanes|=d,io|=d}c=c.next}while(c!==null&&c!==o);l===null?i=r:l.next=a,Hn(r,e.memoizedState)||(Yt=!0),e.memoizedState=r,e.baseState=i,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){s=t;do o=s.lane,rt.lanes|=o,io|=o,s=s.next;while(s!==t)}else s===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function hf(t){var e=En(),n=e.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=t;var r=n.dispatch,s=n.pending,o=e.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=t(o,i.action),i=i.next;while(i!==s);Hn(o,e.memoizedState)||(Yt=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function dx(){}function fx(t,e){var n=rt,r=En(),s=e(),o=!Hn(r.memoizedState,s);if(o&&(r.memoizedState=s,Yt=!0),r=r.queue,_m(mx.bind(null,n,r,t),[t]),r.getSnapshot!==e||o||bt!==null&&bt.memoizedState.tag&1){if(n.flags|=2048,qa(9,px.bind(null,n,r,s,e),void 0,null),_t===null)throw Error(q(349));oo&30||hx(n,e,s)}return s}function hx(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=rt.updateQueue,e===null?(e={lastEffect:null,stores:null},rt.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function px(t,e,n,r){e.value=n,e.getSnapshot=r,gx(e)&&vx(t)}function mx(t,e,n){return n(function(){gx(e)&&vx(t)})}function gx(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Hn(t,n)}catch{return!0}}function vx(t){var e=Nr(t,1);e!==null&&Bn(e,t,1,-1)}function Iv(t){var e=Jn();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ha,lastRenderedState:t},e.queue=t,t=t.dispatch=qT.bind(null,rt,t),[e.memoizedState,t]}function qa(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=rt.updateQueue,e===null?(e={lastEffect:null,stores:null},rt.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function yx(){return En().memoizedState}function jc(t,e,n,r){var s=Jn();rt.flags|=t,s.memoizedState=qa(1|e,n,void 0,r===void 0?null:r)}function Vu(t,e,n,r){var s=En();r=r===void 0?null:r;var o=void 0;if(yt!==null){var i=yt.memoizedState;if(o=i.destroy,r!==null&&wm(r,i.deps)){s.memoizedState=qa(e,n,o,r);return}}rt.flags|=t,s.memoizedState=qa(1|e,n,o,r)}function Ov(t,e){return jc(8390656,8,t,e)}function _m(t,e){return Vu(2048,8,t,e)}function wx(t,e){return Vu(4,2,t,e)}function xx(t,e){return Vu(4,4,t,e)}function bx(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 _x(t,e,n){return n=n!=null?n.concat([t]):null,Vu(4,4,bx.bind(null,e,t),n)}function Sm(){}function Sx(t,e){var n=En();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&wm(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function kx(t,e){var n=En();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&wm(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function Cx(t,e,n){return oo&21?(Hn(n,e)||(n=Pw(),rt.lanes|=n,io|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Yt=!0),t.memoizedState=n)}function WT(t,e){var n=$e;$e=n!==0&&4>n?n:4,t(!0);var r=df.transition;df.transition={};try{t(!1),e()}finally{$e=n,df.transition=r}}function Ex(){return En().memoizedState}function HT(t,e,n){var r=hs(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Tx(t))jx(e,n);else if(n=lx(t,e,n,r),n!==null){var s=Vt();Bn(n,t,r,s),Nx(n,e,r)}}function qT(t,e,n){var r=hs(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Tx(t))jx(e,s);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var i=e.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,Hn(a,i)){var l=e.interleaved;l===null?(s.next=s,pm(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}n=lx(t,e,s,r),n!==null&&(s=Vt(),Bn(n,t,r,s),Nx(n,e,r))}}function Tx(t){var e=t.alternate;return t===rt||e!==null&&e===rt}function jx(t,e){ya=eu=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Nx(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,em(t,n)}}var tu={readContext:Cn,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},KT={readContext:Cn,useCallback:function(t,e){return Jn().memoizedState=[t,e===void 0?null:e],t},useContext:Cn,useEffect:Ov,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,jc(4194308,4,bx.bind(null,e,t),n)},useLayoutEffect:function(t,e){return jc(4194308,4,t,e)},useInsertionEffect:function(t,e){return jc(4,2,t,e)},useMemo:function(t,e){var n=Jn();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Jn();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=HT.bind(null,rt,t),[r.memoizedState,t]},useRef:function(t){var e=Jn();return t={current:t},e.memoizedState=t},useState:Iv,useDebugValue:Sm,useDeferredValue:function(t){return Jn().memoizedState=t},useTransition:function(){var t=Iv(!1),e=t[0];return t=WT.bind(null,t[1]),Jn().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=rt,s=Jn();if(Xe){if(n===void 0)throw Error(q(407));n=n()}else{if(n=e(),_t===null)throw Error(q(349));oo&30||hx(r,e,n)}s.memoizedState=n;var o={value:n,getSnapshot:e};return s.queue=o,Ov(mx.bind(null,r,o,t),[t]),r.flags|=2048,qa(9,px.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=Jn(),e=_t.identifierPrefix;if(Xe){var n=kr,r=Sr;n=(r&~(1<<32-Un(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Wa++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=zT++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},GT={readContext:Cn,useCallback:Sx,useContext:Cn,useEffect:_m,useImperativeHandle:_x,useInsertionEffect:wx,useLayoutEffect:xx,useMemo:kx,useReducer:ff,useRef:yx,useState:function(){return ff(Ha)},useDebugValue:Sm,useDeferredValue:function(t){var e=En();return Cx(e,yt.memoizedState,t)},useTransition:function(){var t=ff(Ha)[0],e=En().memoizedState;return[t,e]},useMutableSource:dx,useSyncExternalStore:fx,useId:Ex,unstable_isNewReconciler:!1},ZT={readContext:Cn,useCallback:Sx,useContext:Cn,useEffect:_m,useImperativeHandle:_x,useInsertionEffect:wx,useLayoutEffect:xx,useMemo:kx,useReducer:hf,useRef:yx,useState:function(){return hf(Ha)},useDebugValue:Sm,useDeferredValue:function(t){var e=En();return yt===null?e.memoizedState=t:Cx(e,yt.memoizedState,t)},useTransition:function(){var t=hf(Ha)[0],e=En().memoizedState;return[t,e]},useMutableSource:dx,useSyncExternalStore:fx,useId:Ex,unstable_isNewReconciler:!1};function An(t,e){if(t&&t.defaultProps){e=st({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function kh(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:st({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var zu={isMounted:function(t){return(t=t._reactInternals)?mo(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Vt(),s=hs(t),o=Er(r,s);o.payload=e,n!=null&&(o.callback=n),e=ds(t,o,s),e!==null&&(Bn(e,t,s,r),Ec(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Vt(),s=hs(t),o=Er(r,s);o.tag=1,o.payload=e,n!=null&&(o.callback=n),e=ds(t,o,s),e!==null&&(Bn(e,t,s,r),Ec(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Vt(),r=hs(t),s=Er(n,r);s.tag=2,e!=null&&(s.callback=e),e=ds(t,s,r),e!==null&&(Bn(e,t,r,n),Ec(e,t,r))}};function Mv(t,e,n,r,s,o,i){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,o,i):e.prototype&&e.prototype.isPureReactComponent?!$a(n,r)||!$a(s,o):!0}function Px(t,e,n){var r=!1,s=ws,o=e.contextType;return typeof o=="object"&&o!==null?o=Cn(o):(s=Jt(e)?ro:Mt.current,r=e.contextTypes,o=(r=r!=null)?xi(t,s):ws),e=new e(n,o),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=zu,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=o),e}function Lv(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&zu.enqueueReplaceState(e,e.state,null)}function Ch(t,e,n,r){var s=t.stateNode;s.props=n,s.state=t.memoizedState,s.refs={},mm(t);var o=e.contextType;typeof o=="object"&&o!==null?s.context=Cn(o):(o=Jt(e)?ro:Mt.current,s.context=xi(t,o)),s.state=t.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&(kh(t,e,o,n),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&zu.enqueueReplaceState(s,s.state,null),Jc(t,n,s,r),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function ki(t,e){try{var n="",r=e;do n+=SE(r),r=r.return;while(r);var s=n}catch(o){s=`
39Error generating stack: `+o.message+`
40`+o.stack}return{value:t,source:e,stack:s,digest:null}}function pf(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Eh(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var YT=typeof WeakMap=="function"?WeakMap:Map;function Rx(t,e,n){n=Er(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){ru||(ru=!0,Lh=r),Eh(t,e)},n}function Ax(t,e,n){n=Er(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){Eh(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Eh(t,e),typeof r!="function"&&(fs===null?fs=new Set([this]):fs.add(this));var i=e.stack;this.componentDidCatch(e.value,{componentStack:i!==null?i:""})}),n}function Dv(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new YT;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=uj.bind(null,t,e,n),e.then(t,t))}function $v(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 Fv(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Er(-1,1),e.tag=2,ds(n,e,1))),n.lanes|=1),t)}var QT=Or.ReactCurrentOwner,Yt=!1;function Ft(t,e,n,r){e.child=t===null?ax(e,null,n,r):_i(e,t.child,n,r)}function Uv(t,e,n,r,s){n=n.render;var o=e.ref;return si(e,s),r=xm(t,e,n,r,o,s),n=bm(),t!==null&&!Yt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Pr(t,e,s)):(Xe&&n&&lm(e),e.flags|=1,Ft(t,e,r,s),e.child)}function Bv(t,e,n,r,s){if(t===null){var o=n.type;return typeof o=="function"&&!Rm(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=o,Ix(t,e,o,r,s)):(t=Ac(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:$a,n(i,r)&&t.ref===e.ref)return Pr(t,e,s)}return e.flags|=1,t=ps(o,r),t.ref=e.ref,t.return=e,e.child=t}function Ix(t,e,n,r,s){if(t!==null){var o=t.memoizedProps;if($a(o,r)&&t.ref===e.ref)if(Yt=!1,e.pendingProps=r=o,(t.lanes&s)!==0)t.flags&131072&&(Yt=!0);else return e.lanes=t.lanes,Pr(t,e,s)}return Th(t,e,n,r,s)}function Ox(t,e,n){var r=e.pendingProps,s=r.children,o=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},qe(Qo,sn),sn|=n;else{if(!(n&1073741824))return t=o!==null?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,qe(Qo,sn),sn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,qe(Qo,sn),sn|=r}else o!==null?(r=o.baseLanes|n,e.memoizedState=null):r=n,qe(Qo,sn),sn|=r;return Ft(t,e,s,n),e.child}function Mx(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}
vendor: 5,244 bytes, line 40
40function Th(t,e,n,r,s){var o=Jt(n)?ro:Mt.current;return o=xi(e,o),si(e,s),n=xm(t,e,n,r,o,s),r=bm(),t!==null&&!Yt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Pr(t,e,s)):(Xe&&r&&lm(e),e.flags|=1,Ft(t,e,n,s),e.child)}function Vv(t,e,n,r,s){if(Jt(n)){var o=!0;Kc(e)}else o=!1;if(si(e,s),e.stateNode===null)Nc(t,e),Px(e,n,r),Ch(e,n,r,s),r=!0;else if(t===null){var i=e.stateNode,a=e.memoizedProps;i.props=a;var l=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=Cn(c):(c=Jt(n)?ro:Mt.current,c=xi(e,c));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Lv(e,i,r,c),Kr=!1;var p=e.memoizedState;i.state=p,Jc(e,r,i,s),l=e.memoizedState,a!==r||p!==l||Qt.current||Kr?(typeof d=="function"&&(kh(e,n,d,r),l=e.memoizedState),(a=Kr||Mv(e,n,a,r,p,l,c))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(e.flags|=4194308)):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),i.props=r,i.state=l,i.context=c,r=a):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{i=e.stateNode,cx(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:An(e.type,a),i.props=c,f=e.pendingProps,p=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=Cn(l):(l=Jt(n)?ro:Mt.current,l=xi(e,l));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||p!==l)&&Lv(e,i,r,l),Kr=!1,p=e.memoizedState,i.state=p,Jc(e,r,i,s);var x=e.memoizedState;a!==f||p!==x||Qt.current||Kr?(typeof y=="function"&&(kh(e,n,y,r),x=e.memoizedState),(c=Kr||Mv(e,n,c,r,p,x,l)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,l)),typeof i.componentDidUpdate=="function"&&(e.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=x),i.props=r,i.state=x,i.context=l,r=c):(typeof i.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),r=!1)}return jh(t,e,n,r,o,s)}function jh(t,e,n,r,s,o){Mx(t,e);var i=(e.flags&128)!==0;if(!r&&!i)return s&&Tv(e,n,!1),Pr(t,e,o);r=e.stateNode,QT.current=e;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&i?(e.child=_i(e,t.child,null,o),e.child=_i(e,null,a,o)):Ft(t,e,a,o),e.memoizedState=r.state,s&&Tv(e,n,!0),e.child}function Lx(t){var e=t.stateNode;e.pendingContext?Ev(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Ev(t,e.context,!1),gm(t,e.containerInfo)}function zv(t,e,n,r,s){return bi(),um(s),e.flags|=256,Ft(t,e,n,r),e.child}var Nh={dehydrated:null,treeContext:null,retryLane:0};function Ph(t){return{baseLanes:t,cachePool:null,transitions:null}}function Dx(t,e,n){var r=e.pendingProps,s=nt.current,o=!1,i=(e.flags&128)!==0,a;if((a=i)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),qe(nt,s&1),t===null)return _h(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):(i=r.children,t=r.fallback,o?(r=e.mode,o=e.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=qu(i,r,0,null),t=to(t,r,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=Ph(n),e.memoizedState=Nh,t):km(e,i));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return JT(t,e,i,r,a,s,n);if(o){o=r.fallback,i=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=ps(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=ps(a,o):(o=to(o,i,n,null),o.flags|=2),o.return=e,r.return=e,r.sibling=o,e.child=r,r=o,o=e.child,i=t.child.memoizedState,i=i===null?Ph(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=t.childLanes&~n,e.memoizedState=Nh,r}return o=t.child,t=o.sibling,r=ps(o,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function km(t,e){return e=qu({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Xl(t,e,n,r){return r!==null&&um(r),_i(e,t.child,null,n),t=km(e,e.pen
vendor: 7,680 bytes, line 40
40dingProps.children),t.flags|=2,e.memoizedState=null,t}function JT(t,e,n,r,s,o,i){if(n)return e.flags&256?(e.flags&=-257,r=pf(Error(q(422))),Xl(t,e,i,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=r.fallback,s=e.mode,r=qu({mode:"visible",children:r.children},s,0,null),o=to(o,s,i,null),o.flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,e.mode&1&&_i(e,t.child,null,i),e.child.memoizedState=Ph(i),e.memoizedState=Nh,o);if(!(e.mode&1))return Xl(t,e,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(q(419)),r=pf(o,r,void 0),Xl(t,e,i,r)}if(a=(i&t.childLanes)!==0,Yt||a){if(r=_t,r!==null){switch(i&-i){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Nr(t,s),Bn(r,t,s,-1))}return Pm(),r=pf(Error(q(421))),Xl(t,e,i,r)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=dj.bind(null,t),s._reactRetry=e,null):(t=o.treeContext,ln=us(s.nextSibling),cn=e,Xe=!0,Dn=null,t!==null&&(yn[wn++]=Sr,yn[wn++]=kr,yn[wn++]=so,Sr=t.id,kr=t.overflow,so=e),e=km(e,r.children),e.flags|=4096,e)}function Wv(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Sh(t.return,e,n)}function mf(t,e,n,r,s){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function $x(t,e,n){var r=e.pendingProps,s=r.revealOrder,o=r.tail;if(Ft(t,e,r.children,n),r=nt.current,r&2)r=r&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&&Wv(t,n,e);else if(t.tag===19)Wv(t,n,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}r&=1}if(qe(nt,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&Xc(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),mf(e,!1,s,n,o);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Xc(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}mf(e,!0,n,null,o);break;case"together":mf(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Nc(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Pr(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),io|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(q(153));if(e.child!==null){for(t=e.child,n=ps(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=ps(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function XT(t,e,n){switch(e.tag){case 3:Lx(e),bi();break;case 5:ux(e);break;case 1:Jt(e.type)&&Kc(e);break;case 4:gm(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;qe(Yc,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(qe(nt,nt.current&1),e.flags|=128,null):n&e.child.childLanes?Dx(t,e,n):(qe(nt,nt.current&1),t=Pr(t,e,n),t!==null?t.sibling:null);qe(nt,nt.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return $x(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),qe(nt,nt.current),r)break;return null;case 22:case 23:return e.lanes=0,Ox(t,e,n)}return Pr(t,e,n)}var Fx,Rh,Ux,Bx;Fx=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Rh=function(){};Ux=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,Zs(ir.current);var o=null;switch(n){case"input":s=Xf(t,s),r=Xf(t,r),o=[];break;case"select":s=st({},s,{value:void 0}),r=st({},r,{value:void 0}),o=[];break;case"textarea":s=nh(t,s),r=nh(t,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Hc)}sh(n,r);var i;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ra.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(o||(o=[]),o.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ra.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ge("scroll",t),o||a===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(e.updateQueue=c)&&(e.flags|=4)}};Bx=function(t,e,n,r){n!==r&&(e.flags|=4)};function Qi(t,e){if(!Xe)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Rt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function ej(t,e,n){var r=e.pendingProps;switch(cm(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rt(e),null;case 1:return Jt(e.type)&&qc(),Rt(e),null;case 3:return r=e.stateNode,Si(),Ye(Qt),Ye(Mt),ym(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Ql(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Dn!==null&&(Fh(Dn),Dn=null))),Rh(t,e),Rt(e),null;case 5:vm(e);var s=Zs(za.current);if(n=e.type,t!==null&&e.stateNode!=null)Ux(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(q(166));return Rt(e),null}if(t=Zs(ir.current),Ql(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[rr]=e,r[Ba]=o,t=(e.mode&1)!==0,n){case"dialog":Ge("cancel",r),Ge("close",r);break;case"iframe":case"object":case"embed":Ge("load",r);break;case"video":case"audio":for(s=0;s<aa.length;s++)Ge(aa[s],r);break;case"source":Ge("error",r);break;case"img":case"image":case"link":Ge("error",r),Ge("load",r);break;case"details":Ge("toggle",r);break;case"input":Xg(r,o),Ge("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ge("invalid",r);break;case"textarea":tv(r,o),Ge("invalid",r)}sh(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];
vendor: 30,188 bytes, line 40
40i==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&Yl(r.textContent,a,t),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Yl(r.textContent,a,t),s=["children",""+a]):Ra.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&Ge("scroll",r)}switch(n){case"input":Vl(r),ev(r,o,!0);break;case"textarea":Vl(r),nv(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Hc)}r=s,e.updateQueue=r,r!==null&&(e.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=mw(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=i.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=i.createElement(n,{is:r.is}):(t=i.createElement(n),n==="select"&&(i=t,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):t=i.createElementNS(t,n),t[rr]=e,t[Ba]=r,Fx(t,e,!1,!1),e.stateNode=t;e:{switch(i=oh(n,r),n){case"dialog":Ge("cancel",t),Ge("close",t),s=r;break;case"iframe":case"object":case"embed":Ge("load",t),s=r;break;case"video":case"audio":for(s=0;s<aa.length;s++)Ge(aa[s],t);s=r;break;case"source":Ge("error",t),s=r;break;case"img":case"image":case"link":Ge("error",t),Ge("load",t),s=r;break;case"details":Ge("toggle",t),s=r;break;case"input":Xg(t,r),s=Xf(t,r),Ge("invalid",t);break;case"option":s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=st({},r,{value:void 0}),Ge("invalid",t);break;case"textarea":tv(t,r),s=nh(t,r),Ge("invalid",t);break;default:s=r}sh(n,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?yw(t,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&gw(t,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Aa(t,l):typeof l=="number"&&Aa(t,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ra.hasOwnProperty(o)?l!=null&&o==="onScroll"&&Ge("scroll",t):l!=null&&Gp(t,o,l,i))}switch(n){case"input":Vl(t),ev(t,r,!1);break;case"textarea":Vl(t),nv(t);break;case"option":r.value!=null&&t.setAttribute("value",""+ys(r.value));break;case"select":t.multiple=!!r.multiple,o=r.value,o!=null?ei(t,!!r.multiple,o,!1):r.defaultValue!=null&&ei(t,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Hc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Rt(e),null;case 6:if(t&&e.stateNode!=null)Bx(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(q(166));if(n=Zs(za.current),Zs(ir.current),Ql(e)){if(r=e.stateNode,n=e.memoizedProps,r[rr]=e,(o=r.nodeValue!==n)&&(t=cn,t!==null))switch(t.tag){case 3:Yl(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Yl(r.nodeValue,n,(t.mode&1)!==0)}o&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[rr]=e,e.stateNode=r}return Rt(e),null;case 13:if(Ye(nt),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Xe&&ln!==null&&e.mode&1&&!(e.flags&128))ox(),bi(),e.flags|=98560,o=!1;else if(o=Ql(e),r!==null&&r.dehydrated!==null){if(t===null){if(!o)throw Error(q(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(q(317));o[rr]=e}else bi(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Rt(e),o=!1}else Dn!==null&&(Fh(Dn),Dn=null),o=!0;if(!o)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||nt.current&1?wt===0&&(wt=3):Pm())),e.updateQueue!==null&&(e.flags|=4),Rt(e),null);case 4:return Si(),Rh(t,e),t===null&&Fa(e.stateNode.containerInfo),Rt(e),null;case 10:return hm(e.type._context),Rt(e),null;case 17:return Jt(e.type)&&qc(),Rt(e),null;case 19:if(Ye(nt),o=e.memoizedState,o===null)return Rt(e),null;if(r=(e.flags&128)!==0,i=o.rendering,i===null)if(r)Qi(o,!1);else{if(wt!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(i=Xc(t),i!==null){for(e.flags|=128,Qi(o,!1),r=i.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)o=n,t=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,t=i.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return qe(nt,nt.current&1|2),e.child}t=t.sibling}o.tail!==null&&ut()>Ci&&(e.flags|=128,r=!0,Qi(o,!1),e.lanes=4194304)}else{if(!r)if(t=Xc(i),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Qi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Xe)return Rt(e),null}else 2*ut()-o.renderingStartTime>Ci&&n!==1073741824&&(e.flags|=128,r=!0,Qi(o,!1),e.lanes=4194304);o.isBackwards?(i.sibling=e.child,e.child=i):(n=o.last,n!==null?n.sibling=i:e.child=i,o.last=i)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=ut(),e.sibling=null,n=nt.current,qe(nt,r?n&1|2:n&1),e):(Rt(e),null);case 22:case 23:return Nm(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?sn&1073741824&&(Rt(e),e.subtreeFlags&6&&(e.flags|=8192)):Rt(e),null;case 24:return null;case 25:return null}throw Error(q(156,e.tag))}function tj(t,e){switch(cm(e),e.tag){case 1:return Jt(e.type)&&qc(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Si(),Ye(Qt),Ye(Mt),ym(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return vm(e),null;case 13:if(Ye(nt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(q(340));bi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Ye(nt),null;case 4:return Si(),null;case 10:return hm(e.type._context),null;case 22:case 23:return Nm(),null;case 24:return null;default:return null}}var ec=!1,It=!1,nj=typeof WeakSet=="function"?WeakSet:Set,ie=null;function Yo(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){lt(t,e,r)}else n.current=null}function Ah(t,e,n){try{n()}catch(r){lt(t,e,r)}}var Hv=!1;function rj(t,e){if(mh=Vc,t=qw(),am(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,c=0,d=0,f=t,p=null;t:for(;;){for(var y;f!==n||s!==0&&f.nodeType!==3||(a=i+s),f!==o||r!==0&&f.nodeType!==3||(l=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(y=f.firstChild)!==null;)p=f,f=y;for(;;){if(f===t)break t;if(p===n&&++c===s&&(a=i),p===o&&++d===r&&(l=i),(y=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=y}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(gh={focusedElem:t,selectionRange:n},Vc=!1,ie=e;ie!==null;)if(e=ie,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ie=t;else for(;ie!==null;){e=ie;try{var x=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var v=x.memoizedProps,b=x.memoizedState,g=e.stateNode,m=g.getSnapshotBeforeUpdate(e.elementType===e.type?v:An(e.type,v),b);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(_){lt(e,e.return,_)}if(t=e.sibling,t!==null){t.return=e.return,ie=t;break}ie=e.return}return x=Hv,Hv=!1,x}function wa(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var o=s.destroy;s.destroy=void 0,o!==void 0&&Ah(e,n,o)}s=s.next}while(s!==r)}}function Wu(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Ih(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function Vx(t){var e=t.alternate;e!==null&&(t.alternate=null,Vx(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[rr],delete e[Ba],delete e[wh],delete e[FT],delete e[UT])),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 zx(t){return t.tag===5||t.tag===3||t.tag===4}function qv(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||zx(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 Oh(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Hc));else if(r!==4&&(t=t.child,t!==null))for(Oh(t,e,n),t=t.sibling;t!==null;)Oh(t,e,n),t=t.sibling}function Mh(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Mh(t,e,n),t=t.sibling;t!==null;)Mh(t,e,n),t=t.sibling}var kt=null,Mn=!1;function Fr(t,e,n){for(n=n.child;n!==null;)Wx(t,e,n),n=n.sibling}function Wx(t,e,n){if(or&&typeof or.onCommitFiberUnmount=="function")try{or.onCommitFiberUnmount(Lu,n)}catch{}switch(n.tag){case 5:It||Yo(n,e);case 6:var r=kt,s=Mn;kt=null,Fr(t,e,n),kt=r,Mn=s,kt!==null&&(Mn?(t=kt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):kt.removeChild(n.stateNode));break;case 18:kt!==null&&(Mn?(t=kt,n=n.stateNode,t.nodeType===8?lf(t.parentNode,n):t.nodeType===1&&lf(t,n),La(t)):lf(kt,n.stateNode));break;case 4:r=kt,s=Mn,kt=n.stateNode.containerInfo,Mn=!0,Fr(t,e,n),kt=r,Mn=s;break;case 0:case 11:case 14:case 15:if(!It&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Ah(n,e,i),s=s.next}while(s!==r)}Fr(t,e,n);break;case 1:if(!It&&(Yo(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){lt(n,e,a)}Fr(t,e,n);break;case 21:Fr(t,e,n);break;case 22:n.mode&1?(It=(r=It)||n.memoizedState!==null,Fr(t,e,n),It=r):Fr(t,e,n);break;default:Fr(t,e,n)}}function Kv(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new nj),e.forEach(function(r){var s=fj.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Pn(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=t,i=e,a=i;e:for(;a!==null;){switch(a.tag){case 5:kt=a.stateNode,Mn=!1;break e;case 3:kt=a.stateNode.containerInfo,Mn=!0;break e;case 4:kt=a.stateNode.containerInfo,Mn=!0;break e}a=a.return}if(kt===null)throw Error(q(160));Wx(o,i,s),kt=null,Mn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){lt(s,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)Hx(e,t),e=e.sibling}function Hx(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Pn(e,t),Qn(t),r&4){try{wa(3,t,t.return),Wu(3,t)}catch(v){lt(t,t.return,v)}try{wa(5,t,t.return)}catch(v){lt(t,t.return,v)}}break;case 1:Pn(e,t),Qn(t),r&512&&n!==null&&Yo(n,n.return);break;case 5:if(Pn(e,t),Qn(t),r&512&&n!==null&&Yo(n,n.return),t.flags&32){var s=t.stateNode;try{Aa(s,"")}catch(v){lt(t,t.return,v)}}if(r&4&&(s=t.stateNode,s!=null)){var o=t.memoizedProps,i=n!==null?n.memoizedProps:o,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&hw(s,o),oh(a,i);var c=oh(a,o);for(i=0;i<l.length;i+=2){var d=l[i],f=l[i+1];d==="style"?yw(s,f):d==="dangerouslySetInnerHTML"?gw(s,f):d==="children"?Aa(s,f):Gp(s,d,f,c)}switch(a){case"input":eh(s,o);break;case"textarea":pw(s,o);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var y=o.value;y!=null?ei(s,!!o.multiple,y,!1):p!==!!o.multiple&&(o.defaultValue!=null?ei(s,!!o.multiple,o.defaultValue,!0):ei(s,!!o.multiple,o.multiple?[]:"",!1))}s[Ba]=o}catch(v){lt(t,t.return,v)}}break;case 6:if(Pn(e,t),Qn(t),r&4){if(t.stateNode===null)throw Error(q(162));s=t.stateNode,o=t.memoizedProps;try{s.nodeValue=o}catch(v){lt(t,t.return,v)}}break;case 3:if(Pn(e,t),Qn(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{La(e.containerInfo)}catch(v){lt(t,t.return,v)}break;case 4:Pn(e,t),Qn(t);break;case 13:Pn(e,t),Qn(t),s=t.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Tm=ut())),r&4&&Kv(t);break;case 22:if(d=n!==null&&n.memoizedState!==null,t.mode&1?(It=(c=It)||d,Pn(e,t),It=c):Pn(e,t),Qn(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!d&&t.mode&1)for(ie=t,d=t.child;d!==null;){for(f=ie=d;ie!==null;){switch(p=ie,y=p.child,p.tag){case 0:case 11:case 14:case 15:wa(4,p,p.return);break;case 1:Yo(p,p.return);var x=p.stateNode;if(typeof x.componentWillUnmount=="function"){r=p,n=p.return;try{e=r,x.props=e.memoizedProps,x.state=e.memoizedState,x.componentWillUnmount()}catch(v){lt(r,n,v)}}break;case 5:Yo(p,p.return);break;case 22:if(p.memoizedState!==null){Zv(f);continue}}y!==null?(y.return=p,ie=y):Zv(f)}d=d.sibling}e:for(d=null,f=t;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,c?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,l=f.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=vw("display",i))}catch(v){lt(t,t.return,v)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(v){lt(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:Pn(e,t),Qn(t),r&4&&Kv(t);break;case 21:break;default:Pn(e,t),Qn(t)}}function Qn(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(zx(n)){var r=n;break e}n=n.return}throw Error(q(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Aa(s,""),r.flags&=-33);var o=qv(t);Mh(t,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,a=qv(t);Oh(t,a,i);break;default:throw Error(q(161))}}catch(l){lt(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function sj(t,e,n){ie=t,qx(t)}function qx(t,e,n){for(var r=(t.mode&1)!==0;ie!==null;){var s=ie,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||ec;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||It;a=ec;var c=It;if(ec=i,(It=l)&&!c)for(ie=s;ie!==null;)i=ie,l=i.child,i.tag===22&&i.memoizedState!==null?Yv(s):l!==null?(l.return=i,ie=l):Yv(s);for(;o!==null;)ie=o,qx(o),o=o.sibling;ie=s,ec=a,It=c}Gv(t)}else s.subtreeFlags&8772&&o!==null?(o.return=s,ie=o):Gv(t)}}function Gv(t){for(;ie!==null;){var e=ie;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:It||Wu(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!It)if(n===null)r.componentDidMount();else{var s=e.elementType===e.type?n.memoizedProps:An(e.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&Av(e,o,r);break;case 3:var i=e.updateQueue;if(i!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}Av(e,i,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&La(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}It||e.flags&512&&Ih(e)}catch(p){lt(e,e.return,p)}}if(e===t){ie=null;break}if(n=e.sibling,n!==null){n.return=e.return,ie=n;break}ie=e.return}}function Zv(t){for(;ie!==null;){var e=ie;if(e===t){ie=null;break}var n=e.sibling;if(n!==null){n.return=e.return,ie=n;break}ie=e.return}}function Yv(t){for(;ie!==null;){var e=ie;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Wu(4,e)}catch(l){lt(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var s=e.return;try{r.componentDidMount()}catch(l){lt(e,s,l)}}var o=e.return;try{Ih(e)}catch(l){lt(e,o,l)}break;case 5:var i=e.return;try{Ih(e)}catch(l){lt(e,i,l)}}}catch(l){lt(e,e.return,l)}if(e===t){ie=null;break}var a=e.sibling;if(a!==null){a.return=e.return,ie=a;break}ie=e.return}}var oj=Math.ceil,nu=Or.ReactCurrentDispatcher,Cm=Or.ReactCurrentOwner,_n=Or.ReactCurrentBatchConfig,Oe=0,_t=null,dt=null,Ct=0,sn=0,Qo=Ps(0),wt=0,Ka=null,io=0,Hu=0,Em=0,xa=null,Gt=null,Tm=0,Ci=1/0,wr=null,ru=!1,Lh=null,fs=null,tc=!1,os=null,su=0,ba=0,Dh=null,Pc=-1,Rc=0;function Vt(){return Oe&6?ut():Pc!==-1?Pc:Pc=ut()}function hs(t){return t.mode&1?Oe&2&&Ct!==0?Ct&-Ct:VT.transition!==null?(Rc===0&&(Rc=Pw()),Rc):(t=$e,t!==0||(t=window.event,t=t===void 0?16:Dw(t.type)),t):1}function Bn(t,e,n,r){if(50<ba)throw ba=0,Dh=null,Error(q(185));bl(t,n,r),(!(Oe&2)||t!==_t)&&(t===_t&&(!(Oe&2)&&(Hu|=n),wt===4&&Zr(t,Ct)),Xt(t,r),n===1&&Oe===0&&!(e.mode&1)&&(Ci=ut()+500,Bu&&Rs()))}function Xt(t,e){var n=t.callbackNode;VE(t,e);var r=Bc(t,t===_t?Ct:0);if(r===0)n!==null&&ov(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&ov(n),e===1)t.tag===0?BT(Qv.bind(null,t)):nx(Qv.bind(null,t)),DT(function(){!(Oe&6)&&Rs()}),n=null;else{switch(Rw(r)){case 1:n=Xp;break;case 4:n=jw;break;case 16:n=Uc;break;case 536870912:n=Nw;break;default:n=Uc}n=eb(n,Kx.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function Kx(t,e){if(Pc=-1,Rc=0,Oe&6)throw Error(q(327));var n=t.callbackNode;if(oi()&&t.callbackNode!==n)return null;var r=Bc(t,t===_t?Ct:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=ou(t,r);else{e=r;var s=Oe;Oe|=2;var o=Zx();(_t!==t||Ct!==e)&&(wr=null,Ci=ut()+500,eo(t,e));do try{lj();break}catch(a){Gx(t,a)}while(!0);fm(),nu.current=o,Oe=s,dt!==null?e=0:(_t=null,Ct=0,e=wt)}if(e!==0){if(e===2&&(s=uh(t),s!==0&&(r=s,e=$h(t,s))),e===1)throw n=Ka,eo(t,0),Zr(t,r),Xt(t,ut()),n;if(e===6)Zr(t,r);else{if(s=t.current.alternate,!(r&30)&&!ij(s)&&(e=ou(t,r),e===2&&(o=uh(t),o!==0&&(r=o,e=$h(t,o))),e===1))throw n=Ka,eo(t,0),Zr(t,r),Xt(t,ut()),n;switch(t.finishedWork=s,t.finishedLanes=r,e){case 0:case 1:throw Error(q(345));case 2:Ws(t,Gt,wr);break;case 3:if(Zr(t,r),(r&130023424)===r&&(e=Tm+500-ut(),10<e)){if(Bc(t,0)!==0)break;if(s=t.suspendedLanes,(s&r)!==r){Vt(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=yh(Ws.bind(null,t,Gt,wr),e);break}Ws(t,Gt,wr);break;case 4:if(Zr(t,r),(r&4194240)===r)break;for(e=t.eventTimes,s=-1;0<r;){var i=31-Un(r);o=1<<i,i=e[i],i>s&&(s=i),r&=~o}if(r=s,r=ut()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*oj(r/1960))-r,10<r){t.timeoutHandle=yh(Ws.bind(null,t,Gt,wr),r);break}Ws(t,Gt,wr);break;case 5:Ws(t,Gt,wr);break;default:throw Error(q(329))}}}return Xt(t,ut()),t.callbackNode===n?Kx.bind(null,t):null}function $h(t,e){var n=xa;return t.current.memoizedState.isDehydrated&&(eo(t,e).flags|=256),t=ou(t,e),t!==2&&(e=Gt,Gt=n,e!==null&&Fh(e)),t}function Fh(t){Gt===null?Gt=t:Gt.push.apply(Gt,t)}function ij(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!Hn(o(),s))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;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 Zr(t,e){for(e&=~Em,e&=~Hu,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Un(e),r=1<<n;t[n]=-1,e&=~r}}function Qv(t){if(Oe&6)throw Error(q(327));oi();var e=Bc(t,0);if(!(e&1))return Xt(t,ut()),null;var n=ou(t,e);if(t.tag!==0&&n===2){var r=uh(t);r!==0&&(e=r,n=$h(t,r))}if(n===1)throw n=Ka,eo(t,0),Zr(t,e),Xt(t,ut()),n;if(n===6)throw Error(q(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Ws(t,Gt,wr),Xt(t,ut()),null}function jm(t,e){var n=Oe;Oe|=1;try{return t(e)}finally{Oe=n,Oe===0&&(Ci=ut()+500,Bu&&Rs())}}function ao(t){os!==null&&os.tag===0&&!(Oe&6)&&oi();var e=Oe;Oe|=1;var n=_n.transition,r=$e;try{if(_n.transition=null,$e=1,t)return t()}finally{$e=r,_n.transition=n,Oe=e,!(Oe&6)&&Rs()}}function Nm(){sn=Qo.current,Ye(Qo)}function eo(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,LT(n)),dt!==null)for(n=dt.return;n!==null;){var r=n;switch(cm(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&qc();break;case 3:Si(),Ye(Qt),Ye(Mt),ym();break;case 5:vm(r);break;case 4:Si();break;case 13:Ye(nt);break;case 19:Ye(nt);break;case 10:hm(r.type._context);break;case 22:case 23:Nm()}n=n.return}if(_t=t,dt=t=ps(t.current,null),Ct=sn=e,wt=0,Ka=null,Em=Hu=io=0,Gt=xa=null,Gs!==null){for(e=0;e<Gs.length;e++)if(n=Gs[e],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}Gs=null}return t}function Gx(t,e){do{var n=dt;try{if(fm(),Tc.current=tu,eu){for(var r=rt.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}eu=!1}if(oo=0,bt=yt=rt=null,ya=!1,Wa=0,Cm.current=null,n===null||n.return===null){wt=1,Ka=e,dt=null;break}e:{var o=t,i=n.return,a=n,l=e;if(e=Ct,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=$v(i);if(y!==null){y.flags&=-257,Fv(y,i,a,o,e),y.mode&1&&Dv(o,c,e),e=y,l=c;var x=e.updateQueue;if(x===null){var v=new Set;v.add(l),e.updateQueue=v}else x.add(l);break e}else{if(!(e&1)){Dv(o,c,e),Pm();break e}l=Error(q(426))}}else if(Xe&&a.mode&1){var b=$v(i);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Fv(b,i,a,o,e),um(ki(l,a));break e}}o=l=ki(l,a),wt!==4&&(wt=2),xa===null?xa=[o]:xa.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var g=Rx(o,l,e);Rv(o,g);break e;case 1:a=l;var m=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(fs===null||!fs.has(w)))){o.flags|=65536,e&=-e,o.lanes|=e;var _=Ax(o,a,e);Rv(o,_);break e}}o=o.return}while(o!==null)}Qx(n)}catch(S){e=S,dt===n&&n!==null&&(dt=n=n.return);continue}break}while(!0)}function Zx(){var t=nu.current;return nu.current=tu,t===null?tu:t}function Pm(){(wt===0||wt===3||wt===2)&&(wt=4),_t===null||!(io&268435455)&&!(Hu&268435455)||Zr(_t,Ct)}function ou(t,e){var n=Oe;Oe|=2;var r=Zx();(_t!==t||Ct!==e)&&(wr=null,eo(t,e));do try{aj();break}catch(s){Gx(t,s)}while(!0);if(fm(),Oe=n,nu.current=r,dt!==null)throw Error(q(261));return _t=null,Ct=0,wt}function aj(){for(;dt!==null;)Yx(dt)}function lj(){for(;dt!==null&&!IE();)Yx(dt)}function Yx(t){var e=Xx(t.alternate,t,sn);t.memoizedProps=t.pendingProps,e===null?Qx(t):dt=e,Cm.current=null}function Qx(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=tj(n,e),n!==null){n.flags&=32767,dt=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{wt=6,dt=null;return}}else if(n=ej(n,e,sn),n!==null){dt=n;return}if(e=e.sibling,e!==null){dt=e;return}dt=e=t}while(e!==null);wt===0&&(wt=5)}function Ws(t,e,n){var r=$e,s=_n.transition;try{_n.transition=null,$e=1,cj(t,e,n,r)}finally{_n.transition=s,$e=r}return null}function cj(t,e,n,r){do oi();while(os!==null);if(Oe&6)throw Error(q(327));n=t.finishedWork;var s=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(q(177));t.callbackNode=null,t.callbackPriority=0;var o=n.lanes|n.childLanes;if(zE(t,o),t===_t&&(dt=_t=null,Ct=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||tc||(tc=!0,eb(Uc,function(){return oi(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=_n.transition,_n.transition=null;var i=$e;$e=1;var a=Oe;Oe|=4,Cm.current=null,rj(t,n),Hx(n,t),NT(gh),Vc=!!mh,gh=mh=null,t.current=n,sj(n),OE(),Oe=a,$e=i,_n.transition=o}else t.current=n;if(tc&&(tc=!1,os=t,su=s),o=t.pendingLanes,o===0&&(fs=null),DE(n.stateNode),Xt(t,ut()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)s=e[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(ru)throw ru=!1,t=Lh,Lh=null,t;return su&1&&t.tag!==0&&oi(),o=t.pendingLanes,o&1?t===Dh?ba++:(ba=0,Dh=t):ba=0,Rs(),null}function oi(){if(os!==null){var t=Rw(su),e=_n.transition,n=$e;try{if(_n.transition=null,$e=16>t?16:t,os===null)var r=!1;else{if(t=os,os=null,su=0,Oe&6)throw Error(q(331));var s=Oe;for(Oe|=4,ie=t.current;ie!==null;){var o=ie,i=o.child;if(ie.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(ie=c;ie!==null;){var d=ie;switch(d.tag){case 0:case 11:case 15:wa(8,d,o)}var f=d.child;if(f!==null)f.return=d,ie=f;else for(;ie!==null;){d=ie;var p=d.sibling,y=d.return;if(Vx(d),d===c){ie=null;break}if(p!==null){p.return=y,ie=p;break}ie=y}}}var x=o.alternate;if(x!==null){var v=x.child;if(v!==null){x.child=null;do{var b=v.sibling;v.sibling=null,v=b}while(v!==null)}}ie=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,ie=i;else e:for(;ie!==null;){if(o=ie,o.flags&2048)switch(o.tag){case 0:case 11:case 15:wa(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,ie=g;break e}ie=o.return}}var m=t.current;for(ie=m;ie!==null;){i=ie;var w=i.child;if(i.subtreeFlags&2064&&w!==null)w.return=i,ie=w;else e:for(i=m;ie!==null;){if(a=ie,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Wu(9,a)}}catch(S){lt(a,a.return,S)}if(a===i){ie=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,ie=_;break e}ie=a.return}}if(Oe=s,Rs(),or&&typeof or.onPostCommitFiberRoot=="function")try{or.onPostCommitFiberRoot(Lu,t)}catch{}r=!0}return r}finally{$e=n,_n.transition=e}}return!1}function Jv(t,e,n){e=ki(n,e),e=Rx(t,e,1),t=ds(t,e,1),e=Vt(),t!==null&&(bl(t,1,e),Xt(t,e))}function lt(t,e,n){if(t.tag===3)Jv(t,t,n);else for(;e!==null;){if(e.tag===3){Jv(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(fs===null||!fs.has(r))){t=ki(n,t),t=Ax(e,t,1),e=ds(e,t,1),t=Vt(),e!==null&&(bl(e,1,t),Xt(e,t));break}}e=e.return}}function uj(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Vt(),t.pingedLanes|=t.suspendedLanes&n,_t===t&&(Ct&n)===n&&(wt===4||wt===3&&(Ct&130023424)===Ct&&500>ut()-Tm?eo(t,0):Em|=n),Xt(t,e)}function Jx(t,e){e===0&&(t.mode&1?(e=Hl,Hl<<=1,!(Hl&130023424)&&(Hl=4194304)):e=1);var n=Vt();t=Nr(t,e),t!==null&&(bl(t,e,n),Xt(t,n))}function dj(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Jx(t,n)}function fj(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(q(314))}r!==null&&r.delete(e),Jx(t,n)}var Xx;Xx=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Qt.current)Yt=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Yt=!1,XT(t,e,n);Yt=!!(t.flags&131072)}else Yt=!1,Xe&&e.flags&1048576&&rx(e,Zc,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Nc(t,e),t=e.pendingProps;var s=xi(e,Mt.current);si(e,n),s=xm(null,e,r,t,s,n);var o=bm();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Jt(r)?(o=!0,Kc(e)):o=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,mm(e),s.updater=zu,e.stateNode=s,s._reactInternals=e,Ch(e,r,t,n),e=jh(null,e,r,!0,o,n)):(e.tag=0,Xe&&o&&lm(e),Ft(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Nc(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=pj(r),t=An(r,t),s){case 0:e=Th(null,e,r,t,n);break e;case 1:e=Vv(null,e,r,t,n);break e;case 11:e=Uv(null,e,r,t,n);break e;case 14:e=Bv(null,e,r,An(r.type,t),n);break e}throw Error(q(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:An(r,s),Th(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:An(r,s),Vv(t,e,r,s,n);case 3:e:{if(Lx(e),t===null)throw Error(q(387));r=e.pendingProps,o=e.memoizedState,s=o.element,cx(t,e),Jc(e,r,null,n);var i=e.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){s=ki(Error(q(423)),e),e=zv(t,e,r,n,s);break e}else if(r!==s){s=ki(Error(q(424)),e),e=zv(t,e,r,n,s);break e}else for(ln=us(e.stateNode.containerInfo.firstChild),cn=e,Xe=!0,Dn=null,n=ax(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(bi(),r===s){e=Pr(t,e,n);break e}Ft(t,e,r,n)}e=e.child}return e;case 5:return ux(e),t===null&&_h(e),r=e.type,s=e.pendingProps,o=t!==null?t.memoizedProps:null,i=s.children,vh(r,s)?i=null:o!==null&&vh(r,o)&&(e.flags|=32),Mx(t,e),Ft(t,e,i,n),e.child;case 6:return t===null&&_h(e),null;case 13:return Dx(t,e,n);case 4:return gm(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=_i(e,null,r,n):Ft(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:An(r,s),Uv(t,e,r,s,n);case 7:return Ft(t,e,e.pendingProps,n),e.child;case 8:return Ft(t,e,e.pendingProps.children,n),e.child;case 12:return Ft(t,e,e.pendingProps.children,n),e.child;
vendor: 2,882 bytes, line 40
40case 10:e:{if(r=e.type._context,s=e.pendingProps,o=e.memoizedProps,i=s.value,qe(Yc,r._currentValue),r._currentValue=i,o!==null)if(Hn(o.value,i)){if(o.children===s.children&&!Qt.current){e=Pr(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Er(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Sh(o.return,n,e),a.lanes|=n;break}l=l.next}}else if(o.tag===10)i=o.type===e.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(q(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Sh(i,n,e),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===e){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Ft(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,si(e,n),s=Cn(s),r=r(s),e.flags|=1,Ft(t,e,r,n),e.child;case 14:return r=e.type,s=An(r,e.pendingProps),s=An(r.type,s),Bv(t,e,r,s,n);case 15:return Ix(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:An(r,s),Nc(t,e),e.tag=1,Jt(r)?(t=!0,Kc(e)):t=!1,si(e,n),Px(e,r,s),Ch(e,r,s,n),jh(null,e,r,!0,t,n);case 19:return $x(t,e,n);case 22:return Ox(t,e,n)}throw Error(q(156,e.tag))};function eb(t,e){return Tw(t,e)}function hj(t,e,n,r){this.tag=t,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bn(t,e,n,r){return new hj(t,e,n,r)}function Rm(t){return t=t.prototype,!(!t||!t.isReactComponent)}function pj(t){if(typeof t=="function")return Rm(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Yp)return 11;if(t===Qp)return 14}return 2}function ps(t,e){var n=t.alternate;return n===null?(n=bn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Ac(t,e,n,r,s,o){var i=2;if(r=t,typeof t=="function")Rm(t)&&(i=1);else if(typeof t=="string")i=5;else e:switch(t){case Bo:return to(n.children,s,o,e);case Zp:i=8,s|=8;break;case Zf:return t=bn(12,n,e,s|2),t.elementType=Zf,t.lanes=o,t;
vendor: 4,355 bytes, line 40
40case Yf:return t=bn(13,n,e,s),t.elementType=Yf,t.lanes=o,t;case Qf:return t=bn(19,n,e,s),t.elementType=Qf,t.lanes=o,t;case uw:return qu(n,s,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case lw:i=10;break e;case cw:i=9;break e;case Yp:i=11;break e;case Qp:i=14;break e;case qr:i=16,r=null;break e}throw Error(q(130,t==null?t:typeof t,""))}return e=bn(i,n,e,s),e.elementType=t,e.type=r,e.lanes=o,e}function to(t,e,n,r){return t=bn(7,t,r,e),t.lanes=n,t}function qu(t,e,n,r){return t=bn(22,t,r,e),t.elementType=uw,t.lanes=n,t.stateNode={isHidden:!1},t}function gf(t,e,n){return t=bn(6,t,null,e),t.lanes=n,t}function vf(t,e,n){return e=bn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function mj(t,e,n,r,s){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=Yd(0),this.expirationTimes=Yd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yd(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Am(t,e,n,r,s,o,i,a,l){return t=new mj(t,e,n,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=bn(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},mm(o),t}function gj(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Uo,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function tb(t){if(!t)return ws;t=t._reactInternals;e:{if(mo(t)!==t||t.tag!==1)throw Error(q(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Jt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(q(171))}if(t.tag===1){var n=t.type;if(Jt(n))return tx(t,n,e)}return e}function nb(t,e,n,r,s,o,i,a,l){return t=Am(n,r,!0,t,s,o,i,a,l),t.context=tb(null),n=t.current,r=Vt(),s=hs(n),o=Er(r,s),o.callback=e??null,ds(n,o,s),t.current.lanes=s,bl(t,s,r),Xt(t,r),t}function Ku(t,e,n,r){var s=e.current,o=Vt(),i=hs(s);return n=tb(n),e.context===null?e.context=n:e.pendingContext=n,e=Er(o,i),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=ds(s,e,i),t!==null&&(Bn(t,s,i,o),Ec(t,s,i)),i}function iu(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 Xv(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Im(t,e){Xv(t,e),(t=t.alternate)&&Xv(t,e)}function vj(){return null}var rb=typeof reportError=="function"?reportError:function(t){console.error(t)};function Om(t){this._internalRoot=t}Gu.prototype.render=Om.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(q(409));Ku(t,e,null,null)};Gu.prototype.unmount=Om.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;ao(function(){Ku(null,t,null,null)}),e[jr]=null}};function Gu(t){this._internalRoot=t}Gu.prototype.unstable_scheduleHydration=function(t){if(t){var e=Ow();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Gr.length&&e!==0&&e<Gr[n].priority;n++);Gr.splice(n,0,t),n===0&&Lw(t)}};function Mm(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Zu(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function ey(){}function yj(t,e,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var c=iu(i);o.call(c)}}var i=nb(e,r,t,0,null,!1,!1,"",ey);return t._reactRootContainer=i,t[jr]=i.current,Fa(t.nodeType===8?t.parentNode:t),ao(),i}for(;s=t.lastChild;)t.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=iu(l);a.call(c)}}var l=Am(t,0,!1,null,null,!1,!1,"",ey);return t._reactRootContainer=l,t[jr]=l.current,Fa(t.nodeType===8?t.parentNode:t),ao(function(){Ku(e,l,n,r)}),l}function Yu(t,e,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=iu(i);
vendor: 4,775 bytes, line 40
40a.call(l)}}Ku(e,i,t,s)}else i=yj(n,e,t,s,r);return iu(i)}Aw=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=ia(e.pendingLanes);n!==0&&(em(e,n|1),Xt(e,ut()),!(Oe&6)&&(Ci=ut()+500,Rs()))}break;case 13:ao(function(){var r=Nr(t,1);if(r!==null){var s=Vt();Bn(r,t,1,s)}}),Im(t,1)}};tm=function(t){if(t.tag===13){var e=Nr(t,134217728);if(e!==null){var n=Vt();Bn(e,t,134217728,n)}Im(t,134217728)}};Iw=function(t){if(t.tag===13){var e=hs(t),n=Nr(t,e);if(n!==null){var r=Vt();Bn(n,t,e,r)}Im(t,e)}};Ow=function(){return $e};Mw=function(t,e){var n=$e;try{return $e=t,e()}finally{$e=n}};ah=function(t,e,n){switch(e){case"input":if(eh(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var s=Uu(r);if(!s)throw Error(q(90));fw(r),eh(r,s)}}}break;case"textarea":pw(t,n);break;case"select":e=n.value,e!=null&&ei(t,!!n.multiple,e,!1)}};bw=jm;_w=ao;var wj={usingClientEntryPoint:!1,Events:[Sl,Ho,Uu,ww,xw,jm]},Ji={findFiberByHostInstance:Ks,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},xj={bundleType:Ji.bundleType,version:Ji.version,rendererPackageName:Ji.rendererPackageName,rendererConfig:Ji.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Or.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Cw(t),t===null?null:t.stateNode},findFiberByHostInstance:Ji.findFiberByHostInstance||vj,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var nc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nc.isDisabled&&nc.supportsFiber)try{Lu=nc.inject(xj),or=nc}catch{}}hn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wj;hn.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Mm(e))throw Error(q(200));return gj(t,e,null,n)};hn.createRoot=function(t,e){if(!Mm(t))throw Error(q(299));var n=!1,r="",s=rb;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=Am(t,1,!1,null,null,n,!1,r,s),t[jr]=e.current,Fa(t.nodeType===8?t.parentNode:t),new Om(e)};hn.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(q(188)):(t=Object.keys(t).join(","),Error(q(268,t)));return t=Cw(e),t=t===null?null:t.stateNode,t};hn.flushSync=function(t){return ao(t)};hn.hydrate=function(t,e,n){if(!Zu(e))throw Error(q(200));return Yu(null,t,e,!0,n)};hn.hydrateRoot=function(t,e,n){if(!Mm(t))throw Error(q(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=rb;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),e=nb(e,null,t,1,n??null,s,!1,o,i),t[jr]=e.current,Fa(t),r)for(t=0;t<r.length;t++)n=r[t],s=n._getVersion,s=s(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,s]:e.mutableSourceEagerHydrationData.push(n,s);return new Gu(e)};hn.render=function(t,e,n){if(!Zu(e))throw Error(q(200));return Yu(null,t,e,!1,n)};hn.unmountComponentAtNode=function(t){if(!Zu(t))throw Error(q(40));return t._reactRootContainer?(ao(function(){Yu(null,null,t,!1,function(){t._reactRootContainer=null,t[jr]=null})}),!0):!1};hn.unstable_batchedUpdates=jm;hn.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Zu(n))throw Error(q(200));if(t==null||t._reactInternals===void 0)throw Error(q(38));return Yu(t,e,n,!1,r)};hn.version="18.3.1-next-f1338f8080-20240426";function sb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sb)}catch(t){console.error(t)}}sb(),sw.exports=hn;var As=sw.exports;const Qu=H0(As);var ob,ty=As;ob=ty.createRoot,ty.hydrateRoot;const bj=1,_j=1e6;let yf=0;function Sj(){return yf=(yf+1)%Number.MAX_SAFE_INTEGER,yf.toString()}const wf=new Map,ny=t=>{if(wf.has(t))return;const e=setTimeout(()=>{wf.delete(t),_a({type:"REMOVE_TOAST",toastId:t})},_j);wf.set(t,e)},kj=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,bj)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;
40return n?ny(n):t.toasts.forEach(r=>{ny(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},Ic=[];let Oc={toasts:[]};function _a(t){Oc=kj(Oc,t),Ic.forEach(e=>{e(Oc)})}function Cj({...t}){const e=Sj(),n=s=>_a({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>_a({type:"DISMISS_TOAST",toastId:e});return _a({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function Ju(){const[t,e]=h.useState(Oc);return h.useEffect(()=>(Ic.push(e),()=>{const n=Ic.indexOf(e);n>-1&&Ic.splice(n,1)}),[t]),{...t,toast:Cj,dismiss:n=>_a({type:"DISMISS_TOAST",toastId:n})}}function ae(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Ej(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function ib(...t){return e=>t.forEach(n=>Ej(n,e))}function Te(...t){return h.useCallback(ib(...t),t)}function Mr(t,e=[]){let n=[];function r(o,i){const a=h.createContext(i),l=n.length;n=[...n,i];function c(f){const{scope:p,children:y,...x}=f,v=(p==null?void 0:p[t][l])||a,b=h.useMemo(()=>x,Object.values(x));return u.jsx(v.Provider,{value:b,children:y})}function d(f,p){const y=(p==null?void 0:p[t][l])||a,x=h.useContext(y);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,d]}const s=()=>{const o=n.map(i=>h.createContext(i));return function(a){const l=(a==null?void 0:a[t])||o;return h.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,Tj(s,...e)]}function Tj(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return h.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return n.scopeName=e.scopeName,n}var xs=h.forwardRef((t,e)=>{const{children:n,...r}=t,s=h.Children.toArray(n),o=s.find(jj);if(o){const i=o.props.children,a=s.map(l=>l===o?h.Children.count(i)>1?h.Children.only(null):h.isValidElement(i)?i.props.children:null:l);return u.jsx(Uh,{...r,ref:e,children:h.isValidElement(i)?h.cloneElement(i,void 0,a):null})}return u.jsx(Uh,{...r,ref:e,children:n})});xs.displayName="Slot";var Uh=h.forwardRef((t,e)=>{const{children:n,...r}=t;if(h.isValidElement(n)){const s=Pj(n);return h.cloneElement(n,{...Nj(r,n.props),ref:e?ib(e,s):s})}return h.Children.count(n)>1?h.Children.only(null):null});Uh.displayName="SlotClone";var ab=({children:t})=>u.jsx(u.Fragment,{children:t});function jj(t){return h.isValidElement(t)&&t.type===ab}function Nj(t,e){const n={...e};for(const r in e){const s=t[r],o=e[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{o(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...t,...n}}function Pj(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Cl(t){const e=t+"CollectionProvider",[n,r]=Mr(e),[s,o]=n(e,{collectionRef:{current:null},itemMap:new Map}),i=y=>{const{scope:x,children:v}=y,b=L.useRef(null),g=L.useRef(new Map).current;return u.jsx(s,{scope:x,itemMap:g,collectionRef:b,children:v})};i.displayName=e;const a=t+"CollectionSlot",l=L.forwardRef((y,x)=>{const{scope:v,children:b}=y,g=o(a,v),m=Te(x,g.collectionRef);return u.jsx(xs,{ref:m,children:b})});l.displayName=a;const c=t+"CollectionItemSlot",d="data-radix-collection-item",f=L.forwardRef((y,x)=>{const{scope:v,children:b,...g}=y,m=L.useRef(null),w=Te(x,m),_=o(c,v);return L.useEffect(()=>(_.itemMap.set(m,{ref:m,...g}),()=>void _.itemMap.delete(m))),u.jsx(xs,{[d]:"",ref:w,children:b})});f.displayName=c;function p(y){const x=o(t+"CollectionConsumer",y);return L.useCallback(()=>{const b=x.collectionRef.current;if(!b)return[];const g=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((_,S)=>g.indexOf(_.ref.current)-g.indexOf(S.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},p,r]}var Rj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ce=Rj.reduce((t,e)=>{const n=h.forwardRef((r,s)=>{const{asChild:o,...i}=r,a=o?xs:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(a,{...i,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function Xu(t,e){t&&As.flushSync(()=>t.dispatchEvent(e))}function St(t){const e=h.useRef(t);return h.useEffect(()=>{e.current=t}),h.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function Lm(t,e=globalThis==null?void 0:globalThis.document){const n=St(t);h.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}
vendor: 5,449 bytes, line 40
40var Aj="DismissableLayer",Bh="dismissableLayer.update",Ij="dismissableLayer.pointerDownOutside",Oj="dismissableLayer.focusOutside",ry,lb=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cb=h.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=t,c=h.useContext(lb),[d,f]=h.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=h.useState({}),x=Te(e,k=>f(k)),v=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(b),m=d?v.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,_=m>=g,S=Lj(k=>{const T=k.target,I=[...c.branches].some(P=>P.contains(T));!_||I||(s==null||s(k),i==null||i(k),k.defaultPrevented||a==null||a())},p),C=Dj(k=>{const T=k.target;[...c.branches].some(P=>P.contains(T))||(o==null||o(k),i==null||i(k),k.defaultPrevented||a==null||a())},p);return Lm(k=>{m===c.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},p),h.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(ry=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),sy(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ry)}},[d,p,n,c]),h.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),sy())},[d,c]),h.useEffect(()=>{const k=()=>y({});return document.addEventListener(Bh,k),()=>document.removeEventListener(Bh,k)},[]),u.jsx(ce.div,{...l,ref:x,style:{pointerEvents:w?_?"auto":"none":void 0,...t.style},onFocusCapture:ae(t.onFocusCapture,C.onFocusCapture),onBlurCapture:ae(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:ae(t.onPointerDownCapture,S.onPointerDownCapture)})});cb.displayName=Aj;var Mj="DismissableLayerBranch",ub=h.forwardRef((t,e)=>{const n=h.useContext(lb),r=h.useRef(null),s=Te(e,r);return h.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),u.jsx(ce.div,{...t,ref:s})});ub.displayName=Mj;function Lj(t,e=globalThis==null?void 0:globalThis.document){const n=St(t),r=h.useRef(!1),s=h.useRef(()=>{});return h.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){db(Ij,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),e.removeEventListener("pointerdown",o),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function Dj(t,e=globalThis==null?void 0:globalThis.document){const n=St(t),r=h.useRef(!1);return h.useEffect(()=>{const s=o=>{o.target&&!r.current&&db(Oj,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function sy(){const t=new CustomEvent(Bh);document.dispatchEvent(t)}function db(t,e,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Xu(s,o):s.dispatchEvent(o)}var $j=cb,Fj=ub,ot=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},Uj="Portal",fb=h.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,o]=h.useState(!1);ot(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Qu.createPortal(u.jsx(ce.div,{...r,ref:e}),i):null});fb.displayName=Uj;function Bj(t,e){return h.useReducer((n,r)=>e[n][r]??n,t)}var ed=t=>{const{present:e,children:n}=t,r=Vj(e),s=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),o=Te(r.ref,zj(s));return typeof n=="function"||r.isPresent?h.cloneElement(s,{ref:o}):null};ed.displayName="Presence";function Vj(t){const[e,n]=h.useState(),r=h.useRef({}),s=h.useRef(t),o=h.useRef("none"),i=t?"mounted":"unmounted",[a,l]=Bj(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const c=rc(r.current);o.current=a==="mounted"?c:"none"},[a]),ot(()=>{const c=r.current,d=s.current;if(d!==t){const p=o.current,y=rc(c);t?l("MOUNT"):y==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==y?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),ot(()=>{if(e){const c=f=>{const y=rc(r.current).includes(f.animationName);f.target===e&&y&&As.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===e&&(o.current=rc(r.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:h.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function rc(t){return(t==null?void 0:t.animationName)||"none"}function zj(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.
40isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function qn({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=Wj({defaultProp:e,onChange:n}),o=t!==void 0,i=o?t:r,a=St(n),l=h.useCallback(c=>{if(o){const f=typeof c=="function"?c(t):c;f!==t&&a(f)}else s(c)},[o,t,s,a]);return[i,l]}function Wj({defaultProp:t,onChange:e}){const n=h.useState(t),[r]=n,s=h.useRef(r),o=St(e);return h.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var Hj="VisuallyHidden",El=h.forwardRef((t,e)=>u.jsx(ce.span,{...t,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}));El.displayName=Hj;var qj=El,Dm="ToastProvider",[$m,Kj,Gj]=Cl("Toast"),[hb,R4]=Mr("Toast",[Gj]),[Zj,td]=hb(Dm),pb=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=t,[a,l]=h.useState(null),[c,d]=h.useState(0),f=h.useRef(!1),p=h.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Dm}\`. Expected non-empty \`string\`.`),u.jsx($m.Provider,{scope:e,children:u.jsx(Zj,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:h.useCallback(()=>d(y=>y+1),[]),onToastRemove:h.useCallback(()=>d(y=>y-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:i})})};pb.displayName=Dm;var mb="ToastViewport",Yj=["F8"],Vh="toast.viewportPause",zh="toast.viewportResume",gb=h.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=Yj,label:s="Notifications ({hotkey})",...o}=t,i=td(mb,n),a=Kj(n),l=h.useRef(null),c=h.useRef(null),d=h.useRef(null),f=h.useRef(null),p=Te(e,f,i.onViewportChange),y=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=i.toastCount>0;h.useEffect(()=>{const b=g=>{var w;r.every(_=>g[_]||g.code===_)&&((w=f.current)==null||w.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),h.useEffect(()=>{const b=l.current,g=f.current;if(x&&b&&g){const m=()=>{if(!i.isClosePausedRef.current){const C=new CustomEvent(Vh);g.dispatchEvent(C),i.isClosePausedRef.current=!0}},w=()=>{if(i.isClosePausedRef.current){const C=new CustomEvent(zh);g.dispatchEvent(C),i.isClosePausedRef.current=!1}},_=C=>{!b.contains(C.relatedTarget)&&w()},S=()=>{b.contains(document.activeElement)||w()};return b.addEventListener("focusin",m),b.addEventListener("focusout",_),b.addEventListener("pointermove",m),b.addEventListener("pointerleave",S),window.addEventListener("blur",m),window.addEventListener("focus",w),()=>{b.removeEventListener("focusin",m),b.removeEventListener("focusout",_),b.removeEventListener("pointermove",m),b.removeEventListener("pointerleave",S),window.removeEventListener("blur",m),window.removeEventListener("focus",w)}}},[x,i.isClosePausedRef]);const v=h.useCallback(({tabbingDirection:b})=>{const m=a().map(w=>{const _=w.ref.current,S=[_,...c2(_)];return b==="forwards"?S:S.reverse()});return(b==="forwards"?m.reverse():m).flat()},[a]);return h.useEffect(()=>{const b=f.current;if(b){const g=m=>{var S,C,k;const w=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!w){const T=document.activeElement,I=m.shiftKey;if(m.target===b&&I){(S=c.current)==null||S.focus();return}const R=v({tabbingDirection:I?"backwards":"forwards"}),M=R.findIndex(A=>A===T);xf(R.slice(M+1))?m.preventDefault():I?(C=c.current)==null||C.focus():(k=d.current)==null||k.focus()}};return b.addEventListener("keydown",g),()=>b.removeEventListener("keydown",g)}},[a,v]),u.jsxs(Fj,{ref:l,role:"region","aria-label":s.replace("{hotkey}",y),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&u.jsx(Wh,{ref:c,onFocusFromOutsideViewport:()=>{const b=v({tabbingDirection:"forwards"});xf(b)}}),u.jsx($m.Slot,{scope:n,children:u.jsx(ce.ol,{tabIndex:-1,...o,ref:p})}),x&&u.jsx(Wh,{ref:d,onFocusFromOutsideViewport:()=>{const b=v({tabbingDirection:"backwards"});xf(b)}})]})});gb.displayName=mb;var vb="ToastFocusProxy",Wh=h.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}
40=t,o=td(vb,n);return u.jsx(El,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=o.viewport)!=null&&c.contains(a))&&r()}})});Wh.displayName=vb;var nd="Toast",Qj="toast.swipeStart",Jj="toast.swipeMove",Xj="toast.swipeCancel",e2="toast.swipeEnd",yb=h.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...i}=t,[a=!0,l]=qn({prop:r,defaultProp:s,onChange:o});return u.jsx(ed,{present:n||a,children:u.jsx(r2,{open:a,...i,ref:e,onClose:()=>l(!1),onPause:St(t.onPause),onResume:St(t.onResume),onSwipeStart:ae(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ae(t.onSwipeMove,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ae(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ae(t.onSwipeEnd,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});yb.displayName=nd;var[t2,n2]=hb(nd,{onClose(){}}),r2=h.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:p,onSwipeEnd:y,...x}=t,v=td(nd,n),[b,g]=h.useState(null),m=Te(e,A=>g(A)),w=h.useRef(null),_=h.useRef(null),S=s||v.duration,C=h.useRef(0),k=h.useRef(S),T=h.useRef(0),{onToastAdd:I,onToastRemove:P}=v,D=St(()=>{var z;(b==null?void 0:b.contains(document.activeElement))&&((z=v.viewport)==null||z.focus()),i()}),R=h.useCallback(A=>{!A||A===1/0||(window.clearTimeout(T.current),C.current=new Date().getTime(),T.current=window.setTimeout(D,A))},[D]);h.useEffect(()=>{const A=v.viewport;if(A){const z=()=>{R(k.current),c==null||c()},B=()=>{const G=new Date().getTime()-C.current;k.current=k.current-G,window.clearTimeout(T.current),l==null||l()};return A.addEventListener(Vh,B),A.addEventListener(zh,z),()=>{A.removeEventListener(Vh,B),A.removeEventListener(zh,z)}}},[v.viewport,S,l,c,R]),h.useEffect(()=>{o&&!v.isClosePausedRef.current&&R(S)},[o,S,v.isClosePausedRef,R]),h.useEffect(()=>(I(),()=>P()),[I,P]);const M=h.useMemo(()=>b?Cb(b):null,[b]);return v.viewport?u.jsxs(u.Fragment,{children:[M&&u.jsx(s2,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:M}),u.jsx(t2,{scope:n,onClose:D,children:As.createPortal(u.jsx($m.ItemSlot,{scope:n,children:u.jsx($j,{asChild:!0,onEscapeKeyDown:ae(a,()=>{v.isFocusedToastEscapeKeyDownRef.current||D(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(ce.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":v.swipeDirection,...x,ref:m,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ae(t.onKeyDown,A=>{A.key==="Escape"&&(a==null||a(A.nativeEvent),A.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:ae(t.onPointerDown,A=>{A.button===0&&(w.current={x:A.clientX,y:A.clientY})}),onPointerMove:ae(t.onPointerMove,A=>{if(!w.current)return;const z=A.clientX-w.current.x,B=A.clientY-w.current.y,G=!!_.current,j=["left","right"].includes(v.swipeDirection),U=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,Y=j?U(0,z):0,$=j?0:U(0,B),te=A.pointerType==="touch"?10:2,ee={x:Y,y:$},de={originalEvent:A,delta:ee};G?(_.current=ee,sc(Jj,f,de,{discrete:!1})):oy(ee,v.swipeDirection,te)?(_.current=ee,sc(Qj,d,de,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(z)>te||Math.abs(B)>te)&&(w.current=null)}),onPointerUp:ae(t.onPointerUp,A=>{const z=_.current,B=A.target;if(B.hasPointerCapture(A.pointerId)&&B.releasePointerCapture(A.pointerId),_.current=null,w.current=null,z){const G=A.currentTarget,j={originalEvent:A,delta:z};oy(z,v.swipeDirection,v.swipeThreshold)?sc(e2,y,j,{discrete:!0}):sc(Xj,p,j,{discrete:!0}),G.addEventListener("click",U=>U.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),s2=t=>{const{__scopeToast:e,children:n,...r}=t,s=td(nd,e),[o,i]=h.useState(!1),[a,l]=h.useState(!1);return a2(()=>i(!0)),h.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:u.jsx(fb,{asChild:!0,children:u.jsx(El,{...r,children:o&&u.jsxs(u.Fragment,{children:[s.label," ",n]})})})},o2="ToastTitle",wb=h.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return u.jsx(ce.div,{...r,ref:e})});wb.displayName=o2;var i2="ToastDescription",xb=h.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return u.jsx(ce.div,{...r,ref:e})});xb.displayName=i2;var bb="ToastAction",_b=h.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?u.jsx(kb,{altText:n,asChild:!0,children:u.jsx(Fm,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${bb}\`. Expected non-empty \`string\`.`),null)});
vendor: 8,406 bytes, lines 40-129
40_b.displayName=bb;var Sb="ToastClose",Fm=h.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=n2(Sb,n);return u.jsx(kb,{asChild:!0,children:u.jsx(ce.button,{type:"button",...r,ref:e,onClick:ae(t.onClick,s.onClose)})})});Fm.displayName=Sb;var kb=h.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return u.jsx(ce.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function Cb(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),l2(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&e.push(i)}else e.push(...Cb(r))}}),e}function sc(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Xu(s,o):s.dispatchEvent(o)}var oy=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),o=r>s;return e==="left"||e==="right"?o&&r>n:!o&&s>n};function a2(t=()=>{}){const e=St(t);ot(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function l2(t){return t.nodeType===t.ELEMENT_NODE}function c2(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function xf(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var u2=pb,Eb=gb,Tb=yb,jb=wb,Nb=xb,Pb=_b,Rb=Fm;function Ab(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=Ab(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Ib(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=Ab(t))&&(r&&(r+=" "),r+=e);return r}const iy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,ay=Ib,rd=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return ay(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=e,i=Object.keys(s).map(c=>{const d=n==null?void 0:n[c],f=o==null?void 0:o[c];if(d===null)return null;const p=iy(d)||iy(f);return s[c][p]}),a=n&&Object.entries(n).reduce((c,d)=>{let[f,p]=d;return p===void 0||(c[f]=p),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:f,className:p,...y}=d;return Object.entries(y).every(x=>{let[v,b]=x;return Array.isArray(b)?b.includes({...o,...a}[v]):{...o,...a}[v]===b})?[...c,f,p]:c},[]);return ay(t,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const d2=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ob=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var f2={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"};/**
51 * @license lucide-react v0.462.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const h2=h.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},l)=>h.createElement("svg",{ref:l,...f2,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:Ob("lucide",s),...a},[...i.map(([c,d])=>h.createElement(c,d)),...Array.isArray(o)?o:[o]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const pe=(t,e)=>{const n=h.forwardRef(({className:r,...s},o)=>h.createElement(h2,{ref:o,iconNode:e,className:Ob(`lucide-${d2(t)}`,r),...s}));return n.displayName=`${t}`,n};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const p2=pe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const m2=pe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const g2=pe("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const Mb=pe("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"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const sd=pe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const Um=pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const v2=pe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const y2=pe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const w2=pe("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const Lb=pe("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const x2=pe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const b2=pe("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const ly=pe("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const Sa=pe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const Db=pe("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const _2=pe("FileCheck",[["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:"m9 15 2 2 4-4",key:"1grp1n"}]]);/**
141 * @license lucide-react v0.462.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const S2=pe("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"}]]);/**
146 * @license lucide-react v0.462.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const k2=pe("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"}]]);/**
151 * @license lucide-react v0.462.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const C2=pe("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
156 * @license lucide-react v0.462.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const $b=pe("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"}]]);/**
161 * @license lucide-react v0.462.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const E2=pe("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"}]]);/**
166 * @license lucide-react v0.462.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const T2=pe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
171 * @license lucide-react v0.462.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const j2=pe("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
176 * @license lucide-react v0.462.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const Fb=pe("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
181 * @license lucide-react v0.462.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const Ub=pe("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"}]]);/**
186 * @license lucide-react v0.462.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const od=pe("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"}]]);/**
191 * @license lucide-react v0.462.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const Bb=pe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
196 * @license lucide-react v0.462.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const Bm=pe("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
201 * @license lucide-react v0.462.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const Hh=pe("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
206 * @license lucide-react v0.462.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const Vb=pe("PhoneOff",[["path",{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m
210-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 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.91",key:"z86iuo"}],["line",{x1:"22",x2:"2",y1:"2",y2:"22",key:"11kh81"}]]);/**
211 * @license lucide-react v0.462.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const Ei=pe("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"}]]);/**
216 * @license lucide-react v0.462.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const N2=pe("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
221 * @license lucide-react v0.462.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const P2=pe("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
226 * @license lucide-react v0.462.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const R2=pe("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
231 * @license lucide-react v0.462.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const id=pe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
236 * @license lucide-react v0.462.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const qh=pe("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"}]]);/**
241 * @license lucide-react v0.462.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const A2=pe("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
246 * @license lucide-react v0.462.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const I2=pe("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
251 * @license lucide-react v0.462.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const O2=pe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
256 * @license lucide-react v0.462.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const zb=pe("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
261 * @license lucide-react v0.462.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const M2=pe("TestTube",[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]]);/**
266 * @license lucide-react v0.462.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const Ga=pe("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
271 * @license lucide-react v0.462.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const L2=pe("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"}]]);/**
276 * @license lucide-react v0.462.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const Vm=pe("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
281 * @license lucide-react v0.462.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const cy=pe("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
286 * @license lucide-react v0.462.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const Za=pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 6,290 bytes, lines 290-295
290],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
291 * @license lucide-react v0.462.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const Wb=pe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),zm="-",D2=t=>{const e=F2(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:i=>{const a=i.split(zm);return a[0]===""&&a.length!==1&&a.shift(),Hb(a,e)||$2(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},Hb=(t,e)=>{var i;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?Hb(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const o=t.join(zm);return(i=e.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},uy=/^\[(.+)\]$/,$2=t=>{if(uy.test(t)){const e=uy.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},F2=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return B2(Object.entries(t.classGroups),n).forEach(([o,i])=>{Kh(i,r,o,e)}),r},Kh=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const o=s===""?e:dy(e,s);o.classGroupId=n;return}if(typeof s=="function"){if(U2(s)){Kh(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{Kh(i,dy(e,o),n,r)})})},dy=(t,e)=>{let n=t;return e.split(zm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},U2=t=>t.isThemeGetter,B2=(t,e)=>e?t.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[e+i,a])):o);return[n,s]}):t,V2=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(o,i)=>{n.set(o,i),e++,e>t&&(e=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}},qb="!",z2=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],o=e.length,i=a=>{const l=[];let c=0,d=0,f;for(let b=0;b<a.length;b++){let g=a[b];if(c===0){if(g===s&&(r||a.slice(b,b+o)===e)){l.push(a.slice(d,b)),d=b+o;continue}if(g==="/"){f=b;continue}}g==="["?c++:g==="]"&&c--}const p=l.length===0?a:a.substring(d),y=p.startsWith(qb),x=y?p.substring(1):p,v=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:v}};return n?a=>n({className:a,parseClassName:i}):i},W2=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},H2=t=>({cache:V2(t.cacheSize),parseClassName:z2(t),...D2(t)}),q2=/\s+/,K2=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,o=[],i=t.trim().split(q2);let a="";for(let l=i.length-1;l>=0;l-=1){const c=i[l],{modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:y}=n(c);let x=!!y,v=r(x?p.substring(0,y):p);if(!v){if(!x){a=c+(a.length>0?" "+a:a);continue}if(v=r(p),!v){a=c+(a.length>0?" "+a:a);continue}x=!1}const b=W2(d).join(":"),g=f?b+qb:b,m=g+v;if(o.includes(m))continue;o.push(m);const w=s(v,x);for(let _=0;_<w.length;++_){const S=w[_];o.push(g+S)}a=c+(a.length>0?" "+a:a)}return a};function G2(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=Kb(e))&&(r&&(r+=" "),r+=n);return r}const Kb=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=Kb(t[r]))&&(n&&(n+=" "),n+=e);return n};function Z2(t,...e){let n,r,s,o=i;function i(l){const c=e.reduce((d,f)=>f(d),t());return n=H2(c),r=n.cache.get,s=n.cache.set,o=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=K2(l,n);return s(l,d),d}return function(){return o(G2.apply(null,arguments))}}const Ke=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},Gb=/^\[(?:([a-z-]+):)?(.+)\]$/i,Y2=/^\d+\/\d+$/,Q2=new Set(["px","full","screen"]),J2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,X2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,eN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,tN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pr=t=>ii(t)||Q2.has(t)||Y2.test(t),Ur=t=>Li(t,"length",uN),ii=t=>!!t&&!Number.isNaN(Number(t)),bf=t=>Li(t,"number",ii),Xi=t=>!!t&&Number.isInteger(Number(t)),rN=t=>t.endsWith("%")&&ii(t.slice(0,-1)),ke=t=>Gb.test(t),Br=t=>J2.test(t),sN=new Set(["length","size","percentage"]),oN=t=>Li(t,sN,Zb),iN=t=>Li(t,"position",Zb),aN=new Set(["image","url"]),lN=t=>Li(t,aN,fN),cN=t=>Li(t,"",dN),ea=()=>!0,Li=(t,e,n)=>{const r=Gb.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},uN=t=>X2.test(t)&&!eN.test(t),Zb=()=>!1,dN=t=>tN.test(t),fN=t=>nN.test(t),hN=()=>{const t=Ke("colors"),e=Ke("spacing"),n=Ke("blur"),r=Ke("brightness"),s=Ke("borderColor"),o=Ke("borderRadius"),i=Ke("borderSpacing"),a=Ke("borderWidth"),l=Ke("contrast"),c=Ke("grayscale"),d=Ke("hueRotate"),f=Ke("invert"),p=Ke("gap"),y=Ke("gradientColorStops"),x=Ke("gradientColorStopPositions"),v=Ke("inset"),b=Ke("margin"),g=Ke("opacity"),m=Ke("padding"),w=Ke("saturate"),_=Ke("scale"),S=Ke("sepia"),C=Ke("skew"),k=Ke("space"),T=Ke("translate"),I=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",ke,e],R=()=>[ke,e],M=()=>["",pr,Ur],A=()=>["auto",ii,ke],z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",ke],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[ii,ke];return{cacheSize:500,separator:":",theme:{colors:[ea],spacing:[pr,Ur],blur:["none","",Br,ke],brightness:$(),borderColor:[t],borderRadius:["n
vendor: 4,563 bytes, line 295
295one","","full",Br,ke],borderSpacing:R(),borderWidth:M(),contrast:$(),grayscale:U(),hueRotate:$(),invert:U(),gap:R(),gradientColorStops:[t],gradientColorStopPositions:[rN,Ur],inset:D(),margin:D(),opacity:$(),padding:R(),saturate:$(),scale:$(),sepia:U(),skew:$(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",ke]}],container:["container"],columns:[{columns:[Br]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...z(),ke]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Xi,ke]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ke]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",Xi,ke]}],"grid-cols":[{"grid-cols":[ea]}],"col-start-end":[{col:["auto",{span:["full",Xi,ke]},ke]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[ea]}],"row-start-end":[{row:["auto",{span:[Xi,ke]},ke]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ke]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ke]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ke,e]}],"min-w":[{"min-w":[ke,e,"min","max","fit"]}],"max-w":[{"max-w":[ke,e,"none","full","min","max","fit","prose",{screen:[Br]},Br]}],h:[{h:[ke,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ke,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ke,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ke,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Br,Ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",bf]}],"font-family":[{font:[ea]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ke]}],"line-clamp":[{"line-clamp":["none",ii,bf]}
vendor: 5,631 bytes, line 295
295],leading:[{leading:["none","tight","snug","normal","relaxed","loose",pr,ke]}],"list-image":[{"list-image":["none",ke]}],"list-style-type":[{list:["none","disc","decimal",ke]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",pr,Ur]}],"underline-offset":[{"underline-offset":["auto",pr,ke]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...z(),iN]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",oN]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},lN]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:B()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[pr,ke]}],"outline-w":[{outline:[pr,Ur]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[pr,Ur]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Br,cN]}],"shadow-color":[{shadow:[ea]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Br,ke]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ke]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",ke]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",ke]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Xi,ke]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ke]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","
295none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[pr,Ur,bf]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},pN=Z2(hN);function be(...t){return pN(Ib(t))}const mN=u2,Yb=h.forwardRef(({className:t,...e},n)=>u.jsx(Eb,{ref:n,className:be("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));Yb.displayName=Eb.displayName;const gN=rd("group pointer-events-auto relative flex w-full items-center justify-between space-x-6 overflow-hidden rounded-lg border p-8 pr-10 transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Qb=h.forwardRef(({className:t,variant:e,...n},r)=>u.jsx(Tb,{ref:r,className:be(gN({variant:e}),t),...n}));Qb.displayName=Tb.displayName;const vN=h.forwardRef(({className:t,...e},n)=>u.jsx(Pb,{ref:n,className:be("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));vN.displayName=Pb.displayName;const Jb=h.forwardRef(({className:t,...e},n)=>u.jsx(Rb,{ref:n,className:be("absolute right-2 top-2 rounded-md p-1 text-foreground
295/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:u.jsx(Za,{className:"h-4 w-4"})}));Jb.displayName=Rb.displayName;const Xb=h.forwardRef(({className:t,...e},n)=>u.jsx(jb,{ref:n,className:be("text-sm font-semibold",t),...e}));Xb.displayName=jb.displayName;const e1=h.forwardRef(({className:t,...e},n)=>u.jsx(Nb,{ref:n,className:be("text-sm opacity-90",t),...e}));e1.displayName=Nb.displayName;function yN(){const{toasts:t}=Ju();return u.jsxs(mN,{children:[t.map(function({id:e,title:n,description:r,action:s,...o}){return u.jsxs(Qb,{...o,children:[u.jsxs("div",{className:"grid gap-1",children:[n&&u.jsx(Xb,{children:n}),r&&u.jsx(e1,{children:r})]}),s,u.jsx(Jb,{})]},e)}),u.jsx(Yb,{})]})}var fy=["light","dark"],wN="(prefers-color-scheme: dark)",xN=h.createContext(void 0),bN={setTheme:t=>{},themes:[]},_N=()=>{var t;return(t=h.useContext(xN))!=null?t:bN};h.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:o,value:i,attrs:a,nonce:l})=>{let c=o==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(x=>`'${x}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,f=s?fy.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(x,v=!1,b=!0)=>{let g=i?i[x]:x,m=v?x+"|| ''":`'${g}'`,w="";return s&&b&&!v&&fy.includes(x)&&(w+=`d.style.colorScheme = '${x}';`),n==="class"?v||g?w+=`c.add(${m})`:w+="null":g&&(w+=`d[s](n,${m})`),w},y=t?`!function(){${d}${p(t)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${c})){var t='${wN}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}${c?"":"else{"+p(o,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${e}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}else{${p(o,!1,!1)};}${f}}catch(t){}}();`;return h.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:y}})});var SN=t=>{switch(t){case"success":return EN;case"info":return jN;case"warning":return TN;case"error":return NN;default:return null}},kN=Array(12).fill(0),CN=({visible:t})=>L.createElement("div",{className:"sonner-loading-wrapper","data-visible":t},L.createElement("div",{className:"sonner-spinner"},kN.map((e,n)=>L.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),EN=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),TN=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),jN=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),NN=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),PN=()=>{let[t,e]=L.useState(document.hidden);return L.useEffect(()=>{let n=()=>{e(document.hidden)};
295return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},Gh=1,RN=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:Gh++,o=this.toasts.find(a=>a.id===s),i=t.dismissible===void 0?!0:t.dismissible;return o?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:n}),{...a,...t,id:s,dismissible:i,title:n}):a):this.addToast({title:n,...r,dismissible:i,id:s}),s},this.dismiss=t=>(t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),s=n!==void 0;return r.then(async o=>{if(IN(o)&&!o.ok){s=!1;let i=typeof e.error=="function"?await e.error(`HTTP error! status: ${o.status}`):e.error,a=typeof e.description=="function"?await e.description(`HTTP error! status: ${o.status}`):e.description;this.create({id:n,type:"error",message:i,description:a})}else if(e.success!==void 0){s=!1;let i=typeof e.success=="function"?await e.success(o):e.success,a=typeof e.description=="function"?await e.description(o):e.description;this.create({id:n,type:"success",message:i,description:a})}}).catch(async o=>{if(e.error!==void 0){s=!1;let i=typeof e.error=="function"?await e.error(o):e.error,a=typeof e.description=="function"?await e.description(o):e.description;this.create({id:n,type:"error",message:i,description:a})}}).finally(()=>{var o;s&&(this.dismiss(n),n=void 0),(o=e.finally)==null||o.call(e)}),n},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||Gh++;return this.create({jsx:t(n),id:n,...e}),n},this.subscribers=[],this.toasts=[]}},rn=new RN,AN=(t,e)=>{let n=(e==null?void 0:e.id)||Gh++;return rn.addToast({title:t,...e,id:n}),n},IN=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",ON=AN,MN=()=>rn.toasts;Object.assign(ON,{success:rn.success,info:rn.info,warning:rn.warning,error:rn.error,custom:rn.custom,message:rn.message,promise:rn.promise,dismiss:rn.dismiss,loading:rn.loading},{getHistory:MN});function LN(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}LN(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
295left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
295:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
296`);function oc(t){return t.label!==void 0}var DN=3,$N="32px",FN=4e3,UN=356,BN=14,VN=20,zN=200;function WN(...t){return t.filter(Boolean).join(" ")}var HN=t=>{var e,n,r,s,o,i,a,l,c,d;let{invert:f,toast:p,unstyled:y,interacting:x,setHeights:v,visibleToasts:b,heights:g,index:m,toasts:w,expanded:_,removeToast:S,defaultRichColors:C,closeButton:k,style:T,cancelButtonStyle:I,actionButtonStyle:P,className:D="",descriptionClassName:R="",duration:M,position:A,ga
296p:z,loadingIcon:B,expandByDefault:G,classNames:j,icons:U,closeButtonAriaLabel:Y="Close toast",pauseWhenPageIsHidden:$,cn:te}=t,[ee,de]=L.useState(!1),[Ae,ue]=L.useState(!1),[se,me]=L.useState(!1),[Me,ge]=L.useState(!1),[je,ve]=L.useState(0),[Qe,ze]=L.useState(0),xt=L.useRef(null),pt=L.useRef(null),Tt=m===0,E=m+1<=b,N=p.type,O=p.dismissible!==!1,Z=p.className||"",W=p.descriptionClassName||"",H=L.useMemo(()=>g.findIndex(ye=>ye.toastId===p.id)||0,[g,p.id]),oe=L.useMemo(()=>{var ye;return(ye=p.closeButton)!=null?ye:k},[p.closeButton,k]),_e=L.useMemo(()=>p.duration||M||FN,[p.duration,M]),X=L.useRef(0),Q=L.useRef(0),Je=L.useRef(0),en=L.useRef(null),[jt,Dr]=A.split("-"),$r=L.useMemo(()=>g.reduce((ye,Fe,Ue)=>Ue>=H?ye:ye+Fe.height,0),[g,H]),fr=PN(),Ls=p.invert||f,Tn=N==="loading";Q.current=L.useMemo(()=>H*z+$r,[H,$r]),L.useEffect(()=>{de(!0)},[]),L.useLayoutEffect(()=>{if(!ee)return;let ye=pt.current,Fe=ye.style.height;ye.style.height="auto";let Ue=ye.getBoundingClientRect().height;ye.style.height=Fe,ze(Ue),v(jn=>jn.find(et=>et.toastId===p.id)?jn.map(et=>et.toastId===p.id?{...et,height:Ue}:et):[{toastId:p.id,height:Ue,position:p.position},...jn])},[ee,p.title,p.description,v,p.id]);let mn=L.useCallback(()=>{ue(!0),ve(Q.current),v(ye=>ye.filter(Fe=>Fe.toastId!==p.id)),setTimeout(()=>{S(p)},zN)},[p,S,v,Q]);L.useEffect(()=>{if(p.promise&&N==="loading"||p.duration===1/0||p.type==="loading")return;let ye,Fe=_e;return _||x||$&&fr?(()=>{if(Je.current<X.current){let Ue=new Date().getTime()-X.current;Fe=Fe-Ue}Je.current=new Date().getTime()})():Fe!==1/0&&(X.current=new Date().getTime(),ye=setTimeout(()=>{var Ue;(Ue=p.onAutoClose)==null||Ue.call(p,p),mn()},Fe)),()=>clearTimeout(ye)},[_,x,G,p,_e,mn,p.promise,N,$,fr]),L.useEffect(()=>{let ye=pt.current;if(ye){let Fe=ye.getBoundingClientRect().height;return ze(Fe),v(Ue=>[{toastId:p.id,height:Fe,position:p.position},...Ue]),()=>v(Ue=>Ue.filter(jn=>jn.toastId!==p.id))}},[v,p.id]),L.useEffect(()=>{p.delete&&mn()},[mn,p.delete]);function Ds(){return U!=null&&U.loading?L.createElement("div",{className:"sonner-loader","data-visible":N==="loading"},U.loading):B?L.createElement("div",{className:"sonner-loader","data-visible":N==="loading"},B):L.createElement(CN,{visible:N==="loading"})}return L.createElement("li",{"aria-live":p.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:pt,className:te(D,Z,j==null?void 0:j.toast,(e=p==null?void 0:p.classNames)==null?void 0:e.toast,j==null?void 0:j.default,j==null?void 0:j[N],(n=p==null?void 0:p.classNames)==null?void 0:n[N]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:C,"data-styled":!(p.jsx||p.unstyled||y),"data-mounted":ee,"data-promise":!!p.promise,"data-removed":Ae,"data-visible":E,"data-y-position":jt,"data-x-position":Dr,"data-index":m,"data-front":Tt,"data-swiping":se,"data-dismissible":O,"data-type":N,"data-invert":Ls,"data-swipe-out":Me,"data-expanded":!!(_||G&&ee),style:{"--index":m,"--toasts-before":m,"--z-index":w.length-m,"--offset":`${Ae?je:Q.current}px`,"--initial-height":G?"auto":`${Qe}px`,...T,...p.style},onPointerDown:ye=>{Tn||!O||(xt.current=new Date,ve(Q.current),ye.target.setPointerCapture(ye.pointerId),ye.target.tagName!=="BUTTON"&&(me(!0),en.current={x:ye.clientX,y:ye.clientY}))},onPointerUp:()=>{var ye,Fe,Ue,jn;if(Me||!O)return;en.current=null;let et=Number(((ye=pt.current)==null?void 0:ye.style.getPropertyValue("--swipe-amount").replace("px",""))||0),$s=new Date().getTime()-((Fe=xt.current)==null?void 0:Fe.getTime()),wo=Math.abs(et)/$s;if(Math.abs(et)>=VN||wo>.11){ve(Q.current),(Ue=p.onDismiss)==null||Ue.call(p,p),mn(),ge(!0);return}(jn=pt.current)==null||jn.style.setProperty("--swipe-amount","0px"),me(!1)},onPointerMove:ye=>{var Fe;if(!en.current||!O)return;let Ue=ye.clientY-en.current.y,jn=ye.clientX-en.current.x,et=(jt==="top"?Math.min:Math.max)(0,Ue),$s=ye.pointerType==="touch"?10:2;Math.abs(et)>$s?(Fe=pt.current)==null||Fe.style.setProperty("--swipe-amount",`${Ue}px`):Math.abs(jn)>$s&&(en.current=null)}},oe&&!p.jsx?L.createElement("button",{"aria-label":Y,"data-disabled":Tn,"data-close-button":!0,onClick:Tn||!O?()=>{}:()=>{var ye;mn(),(ye=p.onDismiss)==null||ye.call(p,p)},className:te(j==null?void 0:j.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},L.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),L.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,p.jsx||L.isValidElement(p.title)?p.jsx||p.title:L.createElement(L.Fragment,null,N||p.icon||p.promise?L.createElement("div",{"data-icon":"",className:te(j==null?void 0:j.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)}
296,p.promise||p.type==="loading"&&!p.icon?p.icon||Ds():null,p.type!=="loading"?p.icon||(U==null?void 0:U[N])||SN(N):null):null,L.createElement("div",{"data-content":"",className:te(j==null?void 0:j.content,(i=p==null?void 0:p.classNames)==null?void 0:i.content)},L.createElement("div",{"data-title":"",className:te(j==null?void 0:j.title,(a=p==null?void 0:p.classNames)==null?void 0:a.title)},p.title),p.description?L.createElement("div",{"data-description":"",className:te(R,W,j==null?void 0:j.description,(l=p==null?void 0:p.classNames)==null?void 0:l.description)},p.description):null),L.isValidElement(p.cancel)?p.cancel:p.cancel&&oc(p.cancel)?L.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||I,onClick:ye=>{var Fe,Ue;oc(p.cancel)&&O&&((Ue=(Fe=p.cancel).onClick)==null||Ue.call(Fe,ye),mn())},className:te(j==null?void 0:j.cancelButton,(c=p==null?void 0:p.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,L.isValidElement(p.action)?p.action:p.action&&oc(p.action)?L.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||P,onClick:ye=>{var Fe,Ue;oc(p.action)&&(ye.defaultPrevented||((Ue=(Fe=p.action).onClick)==null||Ue.call(Fe,ye),mn()))},className:te(j==null?void 0:j.actionButton,(d=p==null?void 0:p.classNames)==null?void 0:d.actionButton)},p.action.label):null))};function hy(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var qN=t=>{let{invert:e,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:s,closeButton:o,className:i,offset:a,theme:l="light",richColors:c,duration:d,style:f,visibleToasts:p=DN,toastOptions:y,dir:x=hy(),gap:v=BN,loadingIcon:b,icons:g,containerAriaLabel:m="Notifications",pauseWhenPageIsHidden:w,cn:_=WN}=t,[S,C]=L.useState([]),k=L.useMemo(()=>Array.from(new Set([n].concat(S.filter($=>$.position).map($=>$.position)))),[S,n]),[T,I]=L.useState([]),[P,D]=L.useState(!1),[R,M]=L.useState(!1),[A,z]=L.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=L.useRef(null),G=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=L.useRef(null),U=L.useRef(!1),Y=L.useCallback($=>{var te;(te=S.find(ee=>ee.id===$.id))!=null&&te.delete||rn.dismiss($.id),C(ee=>ee.filter(({id:de})=>de!==$.id))},[S]);return L.useEffect(()=>rn.subscribe($=>{if($.dismiss){C(te=>te.map(ee=>ee.id===$.id?{...ee,delete:!0}:ee));return}setTimeout(()=>{Qu.flushSync(()=>{C(te=>{let ee=te.findIndex(de=>de.id===$.id);return ee!==-1?[...te.slice(0,ee),{...te[ee],...$},...te.slice(ee+1)]:[$,...te]})})})}),[]),L.useEffect(()=>{if(l!=="system"){z(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:$})=>{z($?"dark":"light")})},[l]),L.useEffect(()=>{S.length<=1&&D(!1)},[S]),L.useEffect(()=>{let $=te=>{var ee,de;r.every(Ae=>te[Ae]||te.code===Ae)&&(D(!0),(ee=B.current)==null||ee.focus()),te.code==="Escape"&&(document.activeElement===B.current||(de=B.current)!=null&&de.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[r]),L.useEffect(()=>{if(B.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,U.current=!1)}},[B.current]),S.length?L.createElement("section",{"aria-label":`${m} ${G}`,tabIndex:-1},k.map(($,te)=>{var ee;let[de,Ae]=$.split("-");return L.createElement("ol",{key:$,dir:x==="auto"?hy():x,tabIndex:-1,ref:B,className:i,"data-sonner-toaster":!0,"data-theme":A,"data-y-position":de,"data-x-position":Ae,style:{"--front-toast-height":`${((ee=T[0])==null?void 0:ee.height)||0}px`,"--offset":typeof a=="number"?`${a}px`:a||$N,"--width":`${UN}px`,"--gap":`${v}px`,...f},onBlur:ue=>{U.current&&!ue.currentTarget.contains(ue.relatedTarget)&&(U.current=!1,j.current&&(j.current.focus({preventScroll:!0}),j.current=null))},onFocus:ue=>{ue.target instanceof HTMLElement&&ue.target.dataset.dismissible==="false"||U.current||(U.current=!0,j.current=ue.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{R||D(!1)},onPointerDown:ue=>{ue.target instanceof HTMLElement&&ue.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},S.filter(ue=>!ue.position&&te===0||ue.position===$).map((ue,se)=>{var me,Me;return L.createElement(HN,{key:ue.id,icons:g,index:se,toast:ue,defaultRichColors:c,duration:(me=y==null?void 0:y.duration)!=null?me:d,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:e,visibleToasts:p,closeButton:(Me=y==null?void 0:y.closeButton)!=null?Me:o,interacting:R,position:$,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:Y,toasts:S.filter(ge=>ge.position==ue.position),heights:T.filter(ge=>ge.position==ue.position),setHeights:I,expandByDefault:s,gap:v,loadingIcon:b,expanded:P,pauseWhenPageIsHidden:w,cn:_})}))})):null};const KN=({...t})=>{const{theme:e="system"}=_N();return u.jsx(qN,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};function GN(t,e=[]){let n=[];function r(o,i){const a=h.createContext(i),l=n.length;n=[...n,i];const c=f=>{var g;const{scope:p,children:y,...x}=f,v=((g=p==null?void 0:p[t])==null?void 0:g[l])||a,b=h.useMemo(()=>x,Object.values(x));return u.jsx(v.Provider,{value:b,children:y})};c.displayName=o+"Provider";function d(f,p){var v;const y=((v=p==null?void 0:p[t])==null?void 0:v[l])||a,x=h.useContext(y);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const s=()=>{const o=n.map(i=>h.createContext(i));return function(a){const l=(a==null?void 0:a[t])||o;return h.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,ZN(s,...e)]}function ZN(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:l,scopeName:c}
vendor: 15,517 bytes, line 296
296)=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return h.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return n.scopeName=e.scopeName,n}var YN="DismissableLayer",Zh="dismissableLayer.update",QN="dismissableLayer.pointerDownOutside",JN="dismissableLayer.focusOutside",py,t1=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wm=h.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=t,c=h.useContext(t1),[d,f]=h.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=h.useState({}),x=Te(e,k=>f(k)),v=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(b),m=d?v.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,_=m>=g,S=tP(k=>{const T=k.target,I=[...c.branches].some(P=>P.contains(T));!_||I||(s==null||s(k),i==null||i(k),k.defaultPrevented||a==null||a())},p),C=nP(k=>{const T=k.target;[...c.branches].some(P=>P.contains(T))||(o==null||o(k),i==null||i(k),k.defaultPrevented||a==null||a())},p);return Lm(k=>{m===c.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},p),h.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(py=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),my(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=py)}},[d,p,n,c]),h.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),my())},[d,c]),h.useEffect(()=>{const k=()=>y({});return document.addEventListener(Zh,k),()=>document.removeEventListener(Zh,k)},[]),u.jsx(ce.div,{...l,ref:x,style:{pointerEvents:w?_?"auto":"none":void 0,...t.style},onFocusCapture:ae(t.onFocusCapture,C.onFocusCapture),onBlurCapture:ae(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:ae(t.onPointerDownCapture,S.onPointerDownCapture)})});Wm.displayName=YN;var XN="DismissableLayerBranch",eP=h.forwardRef((t,e)=>{const n=h.useContext(t1),r=h.useRef(null),s=Te(e,r);return h.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),u.jsx(ce.div,{...t,ref:s})});eP.displayName=XN;function tP(t,e=globalThis==null?void 0:globalThis.document){const n=St(t),r=h.useRef(!1),s=h.useRef(()=>{});return h.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){n1(QN,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),e.removeEventListener("pointerdown",o),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function nP(t,e=globalThis==null?void 0:globalThis.document){const n=St(t),r=h.useRef(!1);return h.useEffect(()=>{const s=o=>{o.target&&!r.current&&n1(JN,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function my(){const t=new CustomEvent(Zh);document.dispatchEvent(t)}function n1(t,e,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Xu(s,o):s.dispatchEvent(o)}var rP=nw.useId||(()=>{}),sP=0;function Vn(t){const[e,n]=h.useState(rP());return ot(()=>{t||n(r=>r??String(sP++))},[t]),t||(e?`radix-${e}`:"")}const oP=["top","right","bottom","left"],bs=Math.min,on=Math.max,au=Math.round,ic=Math.floor,_s=t=>({x:t,y:t}),iP={left:"right",right:"left",bottom:"top",top:"bottom"},aP={start:"end",end:"start"};function Yh(t,e,n){return on(t,bs(e,n))}function Rr(t,e){return typeof t=="function"?t(e):t}function Ar(t){return t.split("-")[0]}function Di(t){return t.split("-")[1]}function Hm(t){return t==="x"?"y":"x"}function qm(t){return t==="y"?"height":"width"}function Ss(t){return["top","bottom"].includes(Ar(t))?"y":"x"}function Km(t){return Hm(Ss(t))}function lP(t,e,n){n===void 0&&(n=!1);const r=Di(t),s=Km(t),o=qm(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(i=lu(i)),[i,lu(i)]}function cP(t){const e=lu(t);return[Qh(t),e,Qh(e)]}function Qh(t){return t.replace(/start|end/g,e=>aP[e])}function uP(t,e,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:r:e?r:s;case"left":case"right":return e?o:i;default:return[]}}function dP(t,e,n,r){const s=Di(t);let o=uP(Ar(t),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),e&&(o=o.concat(o.map(Qh)))),o}function lu(t){return t.replace(/left|right|bottom|top/g,e=>iP[e])}function fP(t){return{top:0,right:0,bottom:0,left:0,...t}}function r1(t){return typeof t!="number"?fP(t):{top:t,right:t,bottom:t,left:t}}function cu(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function gy(t,e,n){let{reference:r,floating:s}=t;const o=Ss(e),i=Km(e),a=qm(i),l=Ar(e),c=o==="y",d=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,p=r[a]/2-s[a]/2;let y;switch(l){case"top":y={x:d,y:r.y-s.height};break;case"bottom":y={x:d,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:f};break;case"left":y={x:r.x-s.width,y:f};break;default:y={x:r.x,y:r.y}}switch(Di(e)){case"start":y[i]-=p*(n&&c?-1:1);break;case"end":y[i]+=p*(n&&c?-1:1);break}return y}const hP=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(e));let c=await i.getElementRects({reference:t,floating:e,strategy:s}),{x:d,y:f}=gy(c,r,l),p=r,y={},x=0;for(let v=0;v<a.length;v++){const{name:b,fn:g}=a[v],{x:m,y:w,data:_,reset:S}=await g({x:d,y:f,initialPlacement:r,placement:p,strategy:s,middlewareData:y,rects:c,platform:i,elements:{reference:t,floating:e}});d=m??d,f=w??f,y={...y,[b]:{...y[b],..._}},S&&x<=50&&(x++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(c=S.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:s}):S.rects),{x:d,y:f}=gy(c,p,l)),v=-1)}return{x:d,y:f,placement:p,strategy:s,middlewareData:y}};async function Ya(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:o,rects:i,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:y=0}=Rr(e,t),x=r1(y),b=a[p?f==="floating"?"reference":"floating":f],g=cu(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),m=f==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},S=cu(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:w,strategy:l}):m);return{top:(g.top-S.top+x.top)/_.y,bottom:(S.bottom-g.bottom+x.bottom)/_.y,left:(g.left-S.left+x.left)/_.x,right:(S.right-g.right+x.right)/_.x}}const pP=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=e,{element:c,padding:d=0}=Rr(t,e)||{};if(c==null)return{};const f=r1(d),p={x:n,y:r},y=Km(s),x=qm(y),v=await i.getDimensions(c),b=y==="y",g=b?"top":"left",m=b?"bottom":"right",w=b?"clientHeight":"clientWidth",_=o.reference[x]+o.reference[y]-p[y]-o.floating[x],S=p[y]-o.reference[y],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let k=C?C[w]:0;(!k||!await(i.isElement==null?void 0:i.isElement(C)))&&(k=a.floating[w]||o.floating[x]);const T=_/2-S/2,I=k/2-v[x]/2-1,P=bs(f[g],I),D=bs(f[m],I),R=P,M=k-v[x]-D,A=k/2-v[x]/2+T,z=Yh(R,A,M),B=!l.arrow&&Di(s)!=null&&A!==z&&o.reference[x]/2-(A<R?P:D)-v[x]/2<0,G=B?A<R?A-R:A-M:0;return{[y]:p[y]+G,data:{[y]:z,centerOffset:A-z-G,...B&&{alignmentOffset:G}},reset:B}}}),mP=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:v=!0,...b}=Rr(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const g=Ar(s),m=Ss(a),w=Ar(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=p||(w||!v?[lu(a)]:cP(a)),C=x!=="none";!p&&C&&S.push(...dP(a,v,x,_));const k=[a,...S],T=await Ya(e,b),I=[];let P=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&I.push(T[g]),f){const A=lP(s,i,_);I.push(T[A[0]],T[A[1]])}if(P=[...P,{placement:s,overflows:I}],!I.every(A=>A<=0)){var D,R;const A=(((D=o.flip)==null?void 0:D.index)||0)+1,z=k[A];if(z)return{data:{index:A,overflows:P},reset:{placement:z}};let B=(R=P.filter(G=>G.overflows[0]<=0).sort((G,j)=>G.overflows[1]-j.overflows[1])[0])==null?void 0:R.placement;if(!B)switch(y){case"bestFit":{var M;const G=(M=P.filter(j=>{if(C){const U=Ss(j.placement);return U===m||U==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(U=>U>0).reduce((U,Y)=>U+Y,0)]).sort((j,U)=>j[1]-U[1])[0])==null?void 0:M[0];G&&(B=G);break}case"initialPlacement":B=a;break}if(s!==B)return{reset:{placement:B}}}return{}}}};function vy(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function yy(t){return oP.some(e=>t[e]>=0)}const gP=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=Rr(t,e);switch(r){case"referenceHidden":{const o=await Ya(e,{...s,elementContext:"reference"}),i=vy(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:yy(i)}}}case"escaped":{const o=await Ya(e,{...s,altBoundary:!0}),i=vy(o,n.floating);return{data:{escapedOffsets:i,escaped:yy(i)}}}default:return{}}}}};async function vP(t,e){const{placement:n,platform:r,elements:s}=t,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=Ar(n),a=Di(n),l=Ss(n)==="y",c=["left","top"].includes(i)?-1:1,d=o&&l?-1:1,f=Rr(e,t);let{mainAxis:p,crossAxis:y,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof x=="number"&&(y=a==="end"?x*-1:x),l?{x:y*d,y:p*c}:{x:p*c,y:y*d}}const yP=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:o,placement:i,middlewareData:a}=e,l=await vP(e,t);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},wP=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:b=>{let{x:g,y:m}=b;return{x:g,y:m}}},...l}=Rr(t,e),c={x:n,y:r},d=await Ya(e,l),f=Ss(Ar(s)),p=Hm(f);let y=c[p],x=c[f];if(o){const b=p==="y"?"top":"left",g=p==="y"?"bottom":"right",m=y+d[b],w=y-d[g];y=Yh(m,y,w)}if(i){const b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",m=x+d[b],w=x-d[g];x=Yh(m,x,w)}const v=a.fn({...e,[p]:y,[f]:x});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:o,[f]:i}}}}}},xP=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Rr(t,e),d={x:n,y:r},f=Ss(s),p=Hm(f);let y=d[p],x=d[f];const v=Rr(a,e),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const w=p==="y"?"height":"width",_=o.reference[p]-o.floating[w]+b.mainAxis,S=o.reference[p]+o.reference[w]-b.mainAxis;y<_?y=_:y>S&&(y=S)}if(c){var g,m;const w=p==="y"?"width":"height",_=["top","left"].includes(Ar(s)),S=o.reference[f]-o.floating[w]+(_&&((g=i.offset)==null?void 0:g[f])||0)+(_?0:b.crossAxis),C=o.reference[f]+o.reference[w]+(_?0:((m=i.offset)==null?void 0:m[f])||0)-(_?b.crossAxis:0);x<S?x=S:x>C&&(x=C)}return{[p]:y,[f]:x}}}},bP=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:o,platform:i,elements:a}=e,{apply:l=()=>{},...c}=Rr(t,e),d=await Ya(e,c),f=Ar(s),p=Di(s),y=Ss(s)==="y",{width:x,height:v}=o.floating;let b,g;f==="top"||f==="bottom"?(b=f,g=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(g=f,b=p==="end"?"top":"bottom");const m=v-d.top-d.bottom,w=x-d.left-d.right,_=bs(v-d[b],m),S=bs(x-d[g],w),C=!e.middlewareData.shift;let k=_,T=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=w),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(k=m),C&&!p){const P=on(d.left,0),D=on(d.right,0),R=on(d.top,0),M=on(d.bottom,0);y?T=x-2*(P!==0||D!==0?P+D:on(d.left,d.right)):k=v-2*(R!==0||M!==0?R+M:on(d.top,d.bottom))}await l({...e,availableWidth:T,availableHeight:k});const I=await i.getDimensions(a.floating);return x!==I.width||v!==I.height?{reset:{rects:!0}}:{}}}};function ad(){return typeof window<"u"}function $i(t){return s1(t)?(t.nodeName||"").toLowerCase():"#document"}function un(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function dr(t){var e;return(e=(s1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function s1(t){return ad()?t instanceof Node||t instanceof un(t).Node:!1}function Kn(t){return ad()?t instanceof Element||t instanceof un(t).Element:!1}function lr(t){return ad()?t instanceof HTMLElement||t instanceof un(t).HTMLElement:!1}function wy(t){return!ad()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof un(t).ShadowRoot}function Tl(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=Gn(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(s)}function _P(t){return["table","td","th"].includes($i(t))}function ld(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Gm(t){const e=Zm(),n=Kn(t)?Gn(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function SP(t){let e=ks(t);for(;lr(e)&&!Ti(e);){if(Gm(e))return e;if(ld(e))return null;e=ks(e)}return null}function Zm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ti(t){return["html","body","#document"].includes($i(t))}function Gn(t){return un(t).getComputedStyle(t)}function cd(t){return Kn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ks(t){if($i(t)==="html")return t;const e=t.assignedSlot||t.parentNode||wy(t)&&t.host||dr(t);return wy(e)?e.host:e}function o1(t){const e=ks(t);return Ti(e)?t.ownerDocument?t.ownerDocument.body:t.body:lr(e)&&Tl(e)?e:o1(e)}function Qa(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=o1(t),o=s===((r=t.ownerDocument)==null?void 0:r.body),i=un(s);if(o){const a=Jh(i);
vendor: 5,525 bytes, line 296
296return e.concat(i,i.visualViewport||[],Tl(s)?s:[],a&&n?Qa(a):[])}return e.concat(s,Qa(s,[],n))}function Jh(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function i1(t){const e=Gn(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=lr(t),o=s?t.offsetWidth:n,i=s?t.offsetHeight:r,a=au(n)!==o||au(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function Ym(t){return Kn(t)?t:t.contextElement}function ai(t){const e=Ym(t);if(!lr(e))return _s(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:o}=i1(e);let i=(o?au(n.width):n.width)/r,a=(o?au(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const kP=_s(0);function a1(t){const e=un(t);return!Zm()||!e.visualViewport?kP:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function CP(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==un(t)?!1:e}function lo(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),o=Ym(t);let i=_s(1);e&&(r?Kn(r)&&(i=ai(r)):i=ai(t));const a=CP(o,n,r)?a1(o):_s(0);let l=(s.left+a.x)/i.x,c=(s.top+a.y)/i.y,d=s.width/i.x,f=s.height/i.y;if(o){const p=un(o),y=r&&Kn(r)?un(r):r;let x=p,v=Jh(x);for(;v&&r&&y!==x;){const b=ai(v),g=v.getBoundingClientRect(),m=Gn(v),w=g.left+(v.clientLeft+parseFloat(m.paddingLeft))*b.x,_=g.top+(v.clientTop+parseFloat(m.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,f*=b.y,l+=w,c+=_,x=un(v),v=Jh(x)}}return cu({width:d,height:f,x:l,y:c})}function EP(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const o=s==="fixed",i=dr(r),a=e?ld(e.floating):!1;if(r===i||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=_s(1);const d=_s(0),f=lr(r);if((f||!f&&!o)&&(($i(r)!=="body"||Tl(i))&&(l=cd(r)),lr(r))){const p=lo(r);c=ai(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x,y:n.y*c.y-l.scrollTop*c.y+d.y}}function TP(t){return Array.from(t.getClientRects())}function Xh(t,e){const n=cd(t).scrollLeft;return e?e.left+n:lo(dr(t)).left+n}function jP(t){const e=dr(t),n=cd(t),r=t.ownerDocument.body,s=on(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=on(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Xh(t);const a=-n.scrollTop;return Gn(r).direction==="rtl"&&(i+=on(e.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:a}}function NP(t,e){const n=un(t),r=dr(t),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const c=Zm();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}function PP(t,e){const n=lo(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,o=lr(t)?ai(t):_s(1),i=t.clientWidth*o.x,a=t.clientHeight*o.y,l=s*o.x,c=r*o.y;return{width:i,height:a,x:l,y:c}}function xy(t,e,n){let r;if(e==="viewport")r=NP(t,n);else if(e==="document")r=jP(dr(t));else if(Kn(e))r=PP(e,n);else{const s=a1(t);r={...e,x:e.x-s.x,y:e.y-s.y}}return cu(r)}function l1(t,e){const n=ks(t);return n===e||!Kn(n)||Ti(n)?!1:Gn(n).position==="fixed"||l1(n,e)}function RP(t,e){const n=e.get(t);if(n)return n;let r=Qa(t,[],!1).filter(a=>Kn(a)&&$i(a)!=="body"),s=null;const o=Gn(t).position==="fixed";let i=o?ks(t):t;for(;Kn(i)&&!Ti(i);){const a=Gn(i),l=Gm(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Tl(i)&&!l&&l1(t,i))?r=r.filter(d=>d!==i):s=a,i=ks(i)}return e.set(t,r),r}function AP(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const i=[...n==="clippingAncestors"?ld(e)?[]:RP(e,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,d)=>{const f=xy(e,d,s);return c.top=on(f.top,c.top),c.right=bs(f.right,c.right),c.bottom=bs(f.bottom,c.bottom),c.left=on(f.left,c.left),c},xy(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function IP(t){const{width:e,height:n}=i1(t);return{width:e,height:n}}function OP(t,e,n){const r=lr(e),s=dr(e),o=n==="fixed",i=lo(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=_s(0);if(r||!r&&!o)if(($i(e)!=="body"||Tl(s))&&(a=cd(e)),r){const y=lo(e,!0,o,e);l.x=y.x+e.clientLeft,l.y=y.y+e.clientTop}else s&&(l.x=Xh(s));let c=0,d=0;if(s&&!r&&!o){const y=s.getBoundingClientRect();d=y.top+a.scrollTop,c=y.left+a.scrollLeft-Xh(s,y)}const f=i.left+a.scrollLeft-l.x-c,p=i.top+a.scrollTop-l.y-d;return{x:f,y:p,width:i.width,height:i.height}}function _f(t){return Gn(t).position==="static"}function by(t,e){if(!lr(t)||Gn(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return dr(t)===n&&(n=n.ownerDocument.body),n}function c1(t,e){const n=un(t);if(ld(t))return n;if(!lr(t)){let s=ks(t);for(;s&&!Ti(s);){if(Kn(s)&&!_f(s))return s;s=ks(s)}return n}let r=by(t,e);for(;r&&_P(r)&&_f(r);)r=by(r,e);return r&&Ti(r)&&_f(r)&&!Gm(r)?n:r||SP(t)||n}const MP=async function(t){const e=this.getOffsetParent||c1,n=this.getDimensions,r=await n(t.floating);return{reference:OP(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function LP(t){return Gn(t).direction==="rtl"}const DP={convertOffsetParentRelativeRectToViewportRelativeRect:EP,getDocumentElement:dr,getClippingRect:AP,getOffsetParent:c1,getElementRects:MP,getClientRects:TP,getDimensions:IP,getScale:ai,isElement:Kn,isRTL:LP};function $P(t,e){let n=null,r;const s=dr(t);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:c,top:d,width:f,height:p}=t.getBoundingClientRect();if(a||e(),!f||!p)return;
vendor: 4,917 bytes, line 296
296const y=ic(d),x=ic(s.clientWidth-(c+f)),v=ic(s.clientHeight-(d+p)),b=ic(c),m={rootMargin:-y+"px "+-x+"px "+-v+"px "+-b+"px",threshold:on(0,bs(1,l))||1};let w=!0;function _(S){const C=S[0].intersectionRatio;if(C!==l){if(!w)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(_,{...m,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,m)}n.observe(t)}return i(!0),o}function FP(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Ym(t),d=s||o?[...c?Qa(c):[],...Qa(e)]:[];d.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),o&&g.addEventListener("resize",n)});const f=c&&a?$P(c,n):null;let p=-1,y=null;i&&(y=new ResizeObserver(g=>{let[m]=g;m&&m.target===c&&y&&(y.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=y)==null||w.observe(e)})),n()}),c&&!l&&y.observe(c),y.observe(e));let x,v=l?lo(t):null;l&&b();function b(){const g=lo(t);v&&(g.x!==v.x||g.y!==v.y||g.width!==v.width||g.height!==v.height)&&n(),v=g,x=requestAnimationFrame(b)}return n(),()=>{var g;d.forEach(m=>{s&&m.removeEventListener("scroll",n),o&&m.removeEventListener("resize",n)}),f==null||f(),(g=y)==null||g.disconnect(),y=null,l&&cancelAnimationFrame(x)}}const UP=yP,BP=wP,VP=mP,zP=bP,WP=gP,_y=pP,HP=xP,qP=(t,e,n)=>{const r=new Map,s={platform:DP,...n},o={...s.platform,_c:r};return hP(t,e,{...s,platform:o})};var Mc=typeof document<"u"?h.useLayoutEffect:h.useEffect;function uu(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!uu(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&t.$$typeof)&&!uu(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function u1(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Sy(t,e){const n=u1(t);return Math.round(e*n)/n}function Sf(t){const e=h.useRef(t);return Mc(()=>{e.current=t}),e}function KP(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[d,f]=h.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[p,y]=h.useState(r);uu(p,r)||y(r);const[x,v]=h.useState(null),[b,g]=h.useState(null),m=h.useCallback(j=>{j!==C.current&&(C.current=j,v(j))},[]),w=h.useCallback(j=>{j!==k.current&&(k.current=j,g(j))},[]),_=o||x,S=i||b,C=h.useRef(null),k=h.useRef(null),T=h.useRef(d),I=l!=null,P=Sf(l),D=Sf(s),R=Sf(c),M=h.useCallback(()=>{if(!C.current||!k.current)return;const j={placement:e,strategy:n,middleware:p};D.current&&(j.platform=D.current),qP(C.current,k.current,j).then(U=>{const Y={...U,isPositioned:R.current!==!1};A.current&&!uu(T.current,Y)&&(T.current=Y,As.flushSync(()=>{f(Y)}))})},[p,e,n,D,R]);Mc(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[c]);const A=h.useRef(!1);Mc(()=>(A.current=!0,()=>{A.current=!1}),[]),Mc(()=>{if(_&&(C.current=_),S&&(k.current=S),_&&S){if(P.current)return P.current(_,S,M);M()}},[_,S,M,P,I]);const z=h.useMemo(()=>({reference:C,floating:k,setReference:m,setFloating:w}),[m,w]),B=h.useMemo(()=>({reference:_,floating:S}),[_,S]),G=h.useMemo(()=>{const j={position:n,left:0,top:0};if(!B.floating)return j;const U=Sy(B.floating,d.x),Y=Sy(B.floating,d.y);return a?{...j,transform:"translate("+U+"px, "+Y+"px)",...u1(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:Y}},[n,a,B.floating,d.x,d.y]);return h.useMemo(()=>({...d,update:M,refs:z,elements:B,floatingStyles:G}),[d,M,z,B,G])}const GP=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?_y({element:r.current,padding:s}).fn(n):{}:r?_y({element:r,padding:s}).fn(n):{}}}},ZP=(t,e)=>({...UP(t),options:[t,e]}),YP=(t,e)=>({...BP(t),options:[t,e]}),QP=(t,e)=>({...HP(t),options:[t,e]}),JP=(t,e)=>({...VP(t),options:[t,e]}),XP=(t,e)=>({...zP(t),options:[t,e]}),eR=(t,e)=>({...WP(t),options:[t,e]}),tR=(t,e)=>({...GP(t),options:[t,e]});var nR="Arrow",d1=h.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...o}=t;return u.jsx(ce.svg,{...o,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});d1.displayName=nR;var rR=d1;function f1(t){const[e,n]=h.useState(void 0);return ot(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>
vendor: 4,218 bytes, line 296
296{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=t.offsetWidth,a=t.offsetHeight;n({width:i,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var Qm="Popper",[h1,ud]=Mr(Qm),[sR,p1]=h1(Qm),m1=t=>{const{__scopePopper:e,children:n}=t,[r,s]=h.useState(null);return u.jsx(sR,{scope:e,anchor:r,onAnchorChange:s,children:n})};m1.displayName=Qm;var g1="PopperAnchor",v1=h.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,o=p1(g1,n),i=h.useRef(null),a=Te(e,i);return h.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:u.jsx(ce.div,{...s,ref:a})});v1.displayName=g1;var Jm="PopperContent",[oR,iR]=h1(Jm),y1=h.forwardRef((t,e)=>{var se,me,Me,ge,je,ve;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:y="optimized",onPlaced:x,...v}=t,b=p1(Jm,n),[g,m]=h.useState(null),w=Te(e,Qe=>m(Qe)),[_,S]=h.useState(null),C=f1(_),k=(C==null?void 0:C.width)??0,T=(C==null?void 0:C.height)??0,I=r+(o!=="center"?"-"+o:""),P=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(c)?c:[c],R=D.length>0,M={padding:P,boundary:D.filter(lR),altBoundary:R},{refs:A,floatingStyles:z,placement:B,isPositioned:G,middlewareData:j}=KP({strategy:"fixed",placement:I,whileElementsMounted:(...Qe)=>FP(...Qe,{animationFrame:y==="always"}),elements:{reference:b.anchor},middleware:[ZP({mainAxis:s+T,alignmentAxis:i}),l&&YP({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?QP():void 0,...M}),l&&JP({...M}),XP({...M,apply:({elements:Qe,rects:ze,availableWidth:xt,availableHeight:pt})=>{const{width:Tt,height:E}=ze.reference,N=Qe.floating.style;N.setProperty("--radix-popper-available-width",`${xt}px`),N.setProperty("--radix-popper-available-height",`${pt}px`),N.setProperty("--radix-popper-anchor-width",`${Tt}px`),N.setProperty("--radix-popper-anchor-height",`${E}px`)}}),_&&tR({element:_,padding:a}),cR({arrowWidth:k,arrowHeight:T}),p&&eR({strategy:"referenceHidden",...M})]}),[U,Y]=b1(B),$=St(x);ot(()=>{G&&($==null||$())},[G,$]);const te=(se=j.arrow)==null?void 0:se.x,ee=(me=j.arrow)==null?void 0:me.y,de=((Me=j.arrow)==null?void 0:Me.centerOffset)!==0,[Ae,ue]=h.useState();return ot(()=>{g&&ue(window.getComputedStyle(g).zIndex)},[g]),u.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:G?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ae,"--radix-popper-transform-origin":[(ge=j.transformOrigin)==null?void 0:ge.x,(je=j.transformOrigin)==null?void 0:je.y].join(" "),...((ve=j.hide)==null?void 0:ve.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:u.jsx(oR,{scope:n,placedSide:U,onArrowChange:S,arrowX:te,arrowY:ee,shouldHideArrow:de,children:u.jsx(ce.div,{"data-side":U,"data-align":Y,...v,ref:w,style:{...v.style,animation:G?void 0:"none"}})})})});y1.displayName=Jm;var w1="PopperArrow",aR={top:"bottom",right:"left",bottom:"top",left:"right"},x1=h.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,o=iR(w1,r),i=aR[o.placedSide];return u.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:u.jsx(rR,{...s,ref:n,style:{...s.style,display:"block"}})})});x1.displayName=w1;function lR(t){return t!==null}var cR=t=>({name:"transformOrigin",options:t,fn(e){var b,g,m;const{placement:n,rects:r,middlewareData:s}=e,i=((b=s.arrow)==null?void 0:b.centerOffset)!==0,a=i?0:t.arrowWidth,l=i?0:t.arrowHeight,[c,d]=b1(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((g=s.arrow)==null?void 0:g.x)??0)+a/2,y=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let x="",v="";return c==="bottom"?(x=i?f:`${p}px`,v=`${-l}
296px`):c==="top"?(x=i?f:`${p}px`,v=`${r.floating.height+l}px`):c==="right"?(x=`${-l}px`,v=i?f:`${y}px`):c==="left"&&(x=`${r.floating.width+l}px`,v=i?f:`${y}px`),{data:{x,y:v}}}});function b1(t){const[e,n="center"]=t.split("-");return[e,n]}var _1=m1,S1=v1,k1=y1,C1=x1,uR="Portal",E1=h.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,o]=h.useState(!1);ot(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Qu.createPortal(u.jsx(ce.div,{...r,ref:e}),i):null});E1.displayName=uR;function dR(t,e){return h.useReducer((n,r)=>e[n][r]??n,t)}var T1=t=>{const{present:e,children:n}=t,r=fR(e),s=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),o=Te(r.ref,hR(s));return typeof n=="function"||r.isPresent?h.cloneElement(s,{ref:o}):null};T1.displayName="Presence";function fR(t){const[e,n]=h.useState(),r=h.useRef({}),s=h.useRef(t),o=h.useRef("none"),i=t?"mounted":"unmounted",[a,l]=dR(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const c=ac(r.current);o.current=a==="mounted"?c:"none"},[a]),ot(()=>{const c=r.current,d=s.current;if(d!==t){const p=o.current,y=ac(c);t?l("MOUNT"):y==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==y?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),ot(()=>{if(e){let c;const d=e.ownerDocument.defaultView??window,f=y=>{const v=ac(r.current).includes(y.animationName);if(y.target===e&&v&&(l("ANIMATION_END"),!s.current)){const b=e.style.animationFillMode;e.style.animationFillMode="forwards",c=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=b)})}},p=y=>{y.target===e&&(o.current=ac(r.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{d.clearTimeout(c),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:h.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ac(t){return(t==null?void 0:t.animationName)||"none"}function hR(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var[dd,A4]=GN("Tooltip",[ud]),fd=ud(),j1="TooltipProvider",pR=700,ep="tooltip.open",[mR,Xm]=dd(j1),N1=t=>{const{__scopeTooltip:e,delayDuration:n=pR,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=t,[i,a]=h.useState(!0),l=h.useRef(!1),c=h.useRef(0);return h.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),u.jsx(mR,{scope:e,isOpenDelayed:i,delayDuration:n,onOpen:h.useCallback(()=>{window.clearTimeout(c.current),a(!1)},[]),onClose:h.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:h.useCallback(d=>{l.current=d},[]),disableHoverableContent:s,children:o})};N1.displayName=j1;var hd="Tooltip",[gR,pd]=dd(hd),P1=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=t,l=Xm(hd,t.__scopeTooltip),c=fd(e),[d,f]=h.useState(null),p=Vn(),y=h.useRef(0),x=i??l.disableHoverableContent,v=a??l.delayDuration,b=h.useRef(!1),[g=!1,m]=qn({prop:r,defaultProp:s,onChange:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(ep))):l.onClose(),o==null||o(k)}}),w=h.useMemo(()=>g?b.current?"delayed-open":"instant-open":"closed",[g]),_=h.useCallback(()=>{window.clearTimeout(y.current),y.current=0,b.current=!1,m(!0)},[m]),S=h.useCallback(()=>{window.clearTimeout(y.current),y.current=0,m(!1)},[m]),C=h.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{b.current=!0,m(!0),y.current=0},v)},[v,m]);return h.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),u.jsx(_1,{...c,children:u.jsx(gR,{scope:e,contentId:p,open:g,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:h.useCallback(()=>{l.isOpenDelayed?C():_()},[l.isOpenDelayed,C,_]),onTriggerLeave:h.useCallback(()=>{x?S():(window.clearTimeout(y.current),y.current=0)},[S,x]),onOpen:_,onClose:S,disableHoverableContent:x,children:n})})};P1.displayName=hd;var tp="TooltipTrigger",R1=h.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=pd(tp,n),o=Xm(tp,n),i=fd(n),a=h.useRef(null),l=Te(e,a,s.onTriggerChange),c=h.useRef(!1),d=h.useRef(!1),f=h.useCallback(()=>c.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsx(S1,{asChild:!0,...i,children:u.jsx(ce.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:ae(t.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ae(t.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ae(t.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ae(t.onFocus,()=>{c.current||s.onOpen()}),onBlur:ae(t.onBlur,s.onClose),onClick:ae(t.onClick,s.onClose)})})});R1.displayName=tp;var vR="TooltipPortal",[I4,yR]=dd(vR,{forceMount:void 0}),ji="TooltipContent",A1=h.forwardRef((t,e)=>{const n=yR(ji,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=t,i=pd(ji,t.__scopeTooltip);return u.jsx(T1,{present:r||i.open,children:i.disableHoverableContent?u.jsx(I1,{side:s,...o,ref:e}):u.jsx(wR,{side:s,...o,ref:e})})}),wR=h.forwardRef((t,e)=>{const n=pd(ji,t.__scopeTooltip),r=Xm(ji,t.__scopeTooltip),s=h.useRef(null),o=Te(e,s),[i,a]=h.useState(null),{trigger:l,onClose:c}=n,d=s.current,{onPointerInTransitChange:f}=r,p=h.useCallback(()=>{a(null),f(!1)},[f]),y=h.useCallback((x,v)=>{const b=x.currentTarget,g={x:x.clientX,y:x.clientY},m=SR(g,b.getBoundingClientRect()),w=kR(g,m),_=CR(v.getBoundingClientRect()),S=TR([...w,..._]);a(S),f(!0)},[f]);return h.useEffect(()=>()=>
296p(),[p]),h.useEffect(()=>{if(l&&d){const x=b=>y(b,d),v=b=>y(b,l);return l.addEventListener("pointerleave",x),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",v)}}},[l,d,y,p]),h.useEffect(()=>{if(i){const x=v=>{const b=v.target,g={x:v.clientX,y:v.clientY},m=(l==null?void 0:l.contains(b))||(d==null?void 0:d.contains(b)),w=!ER(g,i);m?p():w&&(p(),c())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,d,i,c,p]),u.jsx(I1,{...t,ref:o})}),[xR,bR]=dd(hd,{isInside:!1}),I1=h.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=t,l=pd(ji,n),c=fd(n),{onClose:d}=l;return h.useEffect(()=>(document.addEventListener(ep,d),()=>document.removeEventListener(ep,d)),[d]),h.useEffect(()=>{if(l.trigger){const f=p=>{const y=p.target;y!=null&&y.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),u.jsx(Wm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:u.jsxs(k1,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(ab,{children:r}),u.jsx(xR,{scope:n,isInside:!0,children:u.jsx(qj,{id:l.contentId,role:"tooltip",children:s||r})})]})})});A1.displayName=ji;var O1="TooltipArrow",_R=h.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=fd(n);return bR(O1,n).isInside?null:u.jsx(C1,{...s,...r,ref:e})});_R.displayName=O1;function SR(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),o=Math.abs(e.left-t.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function kR(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function CR(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function ER(t,e){const{x:n,y:r}=t;let s=!1;for(let o=0,i=e.length-1;o<e.length;i=o++){const a=e[o].x,l=e[o].y,c=e[i].x,d=e[i].y;l>r!=d>r&&n<(c-a)*(r-l)/(d-l)+a&&(s=!s)}return s}function TR(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),jR(e)}function jR(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const s=t[r];for(;e.length>=2;){const o=e[e.length-1],i=e[e.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var NR=N1,PR=P1,RR=R1,M1=A1;const np=NR,ky=PR,Cy=RR,rp=h.forwardRef(({className:t,sideOffset:e=4,...n},r)=>u.jsx(M1,{ref:r,sideOffset:e,className:be("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));rp.displayName=M1.displayName;var md=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},gd=typeof window>"u"||"Deno"in globalThis;function In(){}function AR(t,e){return typeof t=="function"?t(e):t}function IR(t){return typeof t=="number"&&t>=0&&t!==1/0}function OR(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ey(t,e){return typeof t=="function"?t(e):t}function MR(t,e){return typeof t=="function"?t(e):t}function Ty(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:i,stale:a}=t;if(i){if(r){if(e.queryHash!==eg(i,e.options))return!1}else if(!Xa(e.queryKey,i))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||o&&!o(e))}function jy(t,e){const{exact:n,status:r,predicate:s,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(Ja(e.options.mutationKey)!==Ja(o))return!1}else if(!Xa(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function eg(t,e){return((e==null?void 0:e.queryKeyHashFn)||Ja)(t)}function Ja(t){return JSON.stringify(t,(e,n)=>sp(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Xa(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!Xa(t[n],e[n])):!1}function L1(t,e){if(t===e)return t;const n=Ny(t)&&Ny(e);if(n||sp(t)&&sp(e)){const r=n?t:Object.keys(t),s=r.length,o=n?e:Object.keys(e),i=o.length,a=n?[]:{};let l=0;for(let c=0;c<i;c++){const d=n?c:o[c];(!n&&r.includes(d)||n)&&t[d]===void 0&&e[d]===void 0?(a[d]=void 0,l++):(a[d]=L1(t[d],e[d]),a[d]===t[d]&&t[d]!==void 0&&l++)}return s===i&&l===s?t:a}return e}function Ny(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function sp(t){if(!Py(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Py(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Py(t){return Object.prototype.toString.call(t)==="[object Object]"}function LR(t){return new Promise(e=>{setTimeout(e,t)})}function DR(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?L1(t,e):e}function $R(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function FR(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var D1=Symbol();function $1(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===D1?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Ys,Xr,ui,D0,UR=(D0=class extends md{constructor(){super();Le(this,Ys);Le(this,Xr);Le(this,ui);Ce(this,ui,e=>{if(!gd&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){V(this,Xr)||this.setEventListener(V(this,ui))}onUnsubscribe(){var e;this.hasListeners()||((e=V(this,Xr))==null||e.call(this),Ce(this,Xr,void 0))}setEventListener(e){var n;
vendor: 19,707 bytes, line 296
296Ce(this,ui,e),(n=V(this,Xr))==null||n.call(this),Ce(this,Xr,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){V(this,Ys)!==e&&(Ce(this,Ys,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof V(this,Ys)=="boolean"?V(this,Ys):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Ys=new WeakMap,Xr=new WeakMap,ui=new WeakMap,D0),F1=new UR,di,es,fi,$0,BR=($0=class extends md{constructor(){super();Le(this,di,!0);Le(this,es);Le(this,fi);Ce(this,fi,e=>{if(!gd&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){V(this,es)||this.setEventListener(V(this,fi))}onUnsubscribe(){var e;this.hasListeners()||((e=V(this,es))==null||e.call(this),Ce(this,es,void 0))}setEventListener(e){var n;Ce(this,fi,e),(n=V(this,es))==null||n.call(this),Ce(this,es,e(this.setOnline.bind(this)))}setOnline(e){V(this,di)!==e&&(Ce(this,di,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return V(this,di)}},di=new WeakMap,es=new WeakMap,fi=new WeakMap,$0),du=new BR;function VR(t){return Math.min(1e3*2**t,3e4)}function U1(t){return(t??"online")==="online"?du.isOnline():!0}var B1=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function kf(t){return t instanceof B1}function V1(t){let e=!1,n=0,r=!1,s,o,i;const a=new Promise((g,m)=>{o=g,i=m}),l=g=>{var m;r||(x(new B1(g)),(m=t.abort)==null||m.call(t))},c=()=>{e=!0},d=()=>{e=!1},f=()=>F1.isFocused()&&(t.networkMode==="always"||du.isOnline())&&t.canRun(),p=()=>U1(t.networkMode)&&t.canRun(),y=g=>{var m;r||(r=!0,(m=t.onSuccess)==null||m.call(t,g),s==null||s(),o(g))},x=g=>{var m;r||(r=!0,(m=t.onError)==null||m.call(t,g),s==null||s(),i(g))},v=()=>new Promise(g=>{var m;s=w=>{(r||f())&&g(w)},(m=t.onPause)==null||m.call(t)}).then(()=>{var g;s=void 0,r||(g=t.onContinue)==null||g.call(t)}),b=()=>{if(r)return;let g;const m=n===0?t.initialPromise:void 0;try{g=m??t.fn()}catch(w){g=Promise.reject(w)}Promise.resolve(g).then(y).catch(w=>{var T;if(r)return;const _=t.retry??(gd?0:3),S=t.retryDelay??VR,C=typeof S=="function"?S(n,w):S,k=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,w);if(e||!k){x(w);return}n++,(T=t.onFail)==null||T.call(t,n,w),LR(C).then(()=>f()?void 0:v()).then(()=>{e?x(w):b()})})};return{promise:a,cancel:l,continue:()=>(s==null||s(),a),cancelRetry:c,continueRetry:d,canStart:p,start:()=>(p()?b():v().then(b),a)}}function zR(){let t=[],e=0,n=a=>{a()},r=a=>{a()},s=a=>setTimeout(a,0);const o=a=>{e?t.push(a):s(()=>{n(a)})},i=()=>{const a=t;t=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||i()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var Bt=zR(),Qs,F0,z1=(F0=class{constructor(){Le(this,Qs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),IR(this.gcTime)&&Ce(this,Qs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(gd?1/0:5*60*1e3))}clearGcTimeout(){V(this,Qs)&&(clearTimeout(V(this,Qs)),Ce(this,Qs,void 0))}},Qs=new WeakMap,F0),hi,pi,gn,At,yl,Js,On,gr,U0,WR=(U0=class extends z1{constructor(e){super();Le(this,On);Le(this,hi);Le(this,pi);Le(this,gn);Le(this,At);Le(this,yl);Le(this,Js);Ce(this,Js,!1),Ce(this,yl,e.defaultOptions),this.setOptions(e.options),this.observers=[],Ce(this,gn,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Ce(this,hi,qR(this.options)),this.state=e.state??V(this,hi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=V(this,At))==null?void 0:e.promise}setOptions(e){this.options={...V(this,yl),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&V(this,gn).remove(this)}setData(e,n){const r=DR(this.state.data,e,this.options);return Nt(this,On,gr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Nt(this,On,gr).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,s;const n=(r=V(this,At))==null?void 0:r.promise;return(s=V(this,At))==null||s.cancel(e),n?n.then(In).catch(In):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(V(this,hi))}isActive(){return this.observers.some(e=>MR(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!OR(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=V(this,At))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=V(this,At))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),V(this,gn).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(V(this,At)&&(V(this,Js)?V(this,At).cancel({revert:!0}):V(this,At).cancelRetry()),this.scheduleGc()),V(this,gn).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Nt(this,On,gr).call(this,{type:"invalidate"})}fetch(e,n){var l,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(V(this,At))return V(this,At).continueRetry(),V(this,At).promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(Ce(this,Js,!0),r.signal)})},o=()=>{const f=$1(this.options,n),p={queryKey:this.queryKey,meta:this.meta};return s(p),Ce(this,Js,!1),this.options.persister?this.options.persister(f,p,this):f(p)},i={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};s(i),(l=this.options.behavior)==null||l.onFetch(i,this),Ce(this,pi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=i.fetchOptions)==null?void 0:c.meta))&&Nt(this,On,gr).call(this,{type:"fetch",meta:(d=i.fetchOptions)==null?void 0:d.meta});const a=f=>{var p,y,x,v;kf(f)&&f.silent||Nt(this,On,gr).call(this,{type:"error",error:f}),kf(f)||((y=(p=V(this,gn).config).onError)==null||y.call(p,f,this),(v=(x=V(this,gn).config).onSettled)==null||v.call(x,this.state.data,f,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return Ce(this,At,V1({initialPromise:n==null?void 0:n.initialPromise,fn:i.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,y,x,v;if(f===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(b){a(b);return}(y=(p=V(this,gn).config).onSuccess)==null||y.call(p,f,this),(v=(x=V(this,gn).config).onSettled)==null||v.call(x,f,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:a,onFail:(f,p)=>{Nt(this,On,gr).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{Nt(this,On,gr).call(this,{type:"pause"})},onContinue:()=>{Nt(this,On,gr).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0})),V(this,At).start()}},hi=new WeakMap,pi=new WeakMap,gn=new WeakMap,At=new WeakMap,yl=new WeakMap,Js=new WeakMap,On=new WeakSet,gr=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...HR(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return kf(s)&&s.revert&&V(this,pi)?{...V(this,pi),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Bt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),V(this,gn).notify({query:this,type:"updated",action:e})})},U0);function HR(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:U1(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function qR(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var er,B0,KR=(B0=class extends md{constructor(e={}){super();Le(this,er);this.config=e,Ce(this,er,new Map)}build(e,n,r){const s=n.queryKey,o=n.queryHash??eg(s,n);let i=this.get(o);return i||(i=new WR({cache:this,queryKey:s,queryHash:o,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(i)),i}add(e){V(this,er).has(e.queryHash)||(V(this,er).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=V(this,er).get(e.queryHash);n&&(e.destroy(),n===e&&V(this,er).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Bt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return V(this,er).get(e)}getAll(){return[...V(this,er).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Ty(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>Ty(e,r)):n}notify(e){Bt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Bt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Bt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},er=new WeakMap,B0),tr,$t,Xs,nr,zr,V0,GR=(V0=class extends z1{constructor(e){super();Le(this,nr);Le(this,tr);Le(this,$t);Le(this,Xs);this.mutationId=e.mutationId,Ce(this,$t,e.mutationCache),Ce(this,tr,[]),this.state=e.state||ZR(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){V(this,tr).includes(e)||(V(this,tr).push(e),this.clearGcTimeout(),V(this,$t).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Ce(this,tr,V(this,tr).filter(n=>n!==e)),this.scheduleGc(),V(this,$t).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){V(this,tr).length||(this.state.status==="pending"?this.scheduleGc():V(this,$t).remove(this))}continue(){var e;return((e=V(this,Xs))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var s,o,i,a,l,c,d,f,p,y,x,v,b,g,m,w,_,S,C,k;Ce(this,Xs,V1({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(T,I)=>{Nt(this,nr,zr).call(this,{type:"failed",failureCount:T,error:I})},onPause:()=>{Nt(this,nr,zr).call(this,{type:"pause"})},onContinue:()=>{Nt(this,nr,zr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>V(this,$t).canRun(this)}));const n=this.state.status==="pending",r=!V(this,Xs).canStart();try{if(!n){Nt(this,nr,zr).call(this,{type:"pending",variables:e,isPaused:r}),await((o=(s=V(this,$t).config).onMutate)==null?void 0:o.call(s,e,this));const I=await((a=(i=this.options).onMutate)==null?void 0:a.call(i,e));I!==this.state.context&&Nt(this,nr,zr).call(this,{type:"pending",context:I,variables:e,isPaused:r})}const T=await V(this,Xs).start();return await((c=(l=V(this,$t).config).onSuccess)==null?void 0:c.call(l,T,e,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,T,e,this.state.context)),await((y=(p=V(this,$t).config).onSettled)==null?void 0:y.call(p,T,null,this.state.variables,this.state.context,this)),await((v=(x=this.options).onSettled)==null?void 0:v.call(x,T,null,e,this.state.context)),Nt(this,nr,zr).call(this,{type:"success",data:T}),T}catch(T){try{throw await((g=(b=V(this,$t).config).onError)==null?void 0:g.call(b,T,e,this.state.context,this)),await((w=(m=this.options).onError)==null?void 0:w.call(m,T,e,this.state.context)),await((S=(_=V(this,$t).config).onSettled)==null?void 0:S.call(_,void 0,T,this.state.variables,this.state.context,this)),await((k=(C=this.options).onSettled)==null?void 0:k.call(C,void 0,T,e,this.state.context)),T}finally{Nt(this,nr,zr).call(this,{type:"error",error:T})}}finally{V(this,$t).runNext(this)}}},tr=new WeakMap,$t=new WeakMap,Xs=new WeakMap,nr=new WeakSet,zr=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Bt.batch(()=>{V(this,tr).forEach(r=>{r.onMutationUpdate(e)}),V(this,$t).notify({mutation:this,type:"updated",action:e})})},V0);function ZR(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var nn,wl,z0,YR=(z0=class extends md{constructor(e={}){super();Le(this,nn);Le(this,wl);this.config=e,Ce(this,nn,new Map),Ce(this,wl,Date.now())}build(e,n,r){const s=new GR({mutationCache:this,mutationId:++Fl(this,wl)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){const n=lc(e),r=V(this,nn).get(n)??[];r.push(e),V(this,nn).set(n,r),this.notify({type:"added",mutation:e})}remove(e){var r;const n=lc(e);if(V(this,nn).has(n)){const s=(r=V(this,nn).get(n))==null?void 0:r.filter(o=>o!==e);s&&(s.length===0?V(this,nn).delete(n):V(this,nn).set(n,s))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const n=(r=V(this,nn).get(lc(e)))==null?void 0:r.find(s=>s.state.status==="pending");return!n||n===e}runNext(e){var r;const n=(r=V(this,nn).get(lc(e)))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Bt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...V(this,nn).values()].flat()}find(e){const n={exact:!0,...e};return this.getAll().find(r=>jy(n,r))}findAll(e={}){return this.getAll().filter(n=>jy(e,n))}notify(e){Bt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Bt.batch(()=>Promise.all(e.map(n=>n.continue().catch(In))))}},nn=new WeakMap,wl=new WeakMap,z0);function lc(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function Ry(t){return{onFetch:(e,n)=>{var d,f,p,y,x;const r=e.options,s=(p=(f=(d=e.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,o=((y=e.state.data)==null?void 0:y.pages)||[],i=((x=e.state.data)==null?void 0:x.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let v=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(e.signal.aborted?v=!0:e.signal.addEventListener("abort",()=>{v=!0}),e.signal)})},g=$1(e.options,e.fetchOptions),m=async(w,_,S)=>{if(v)return Promise.reject();if(_==null&&w.pages.length)return Promise.resolve(w);const C={queryKey:e.queryKey,pageParam:_,direction:S?"backward":"forward",meta:e.options.meta};b(C);const k=await g(C),{maxPages:T}=e.options,I=S?FR:$R;return{pages:I(w.pages,k,T),pageParams:I(w.pageParams,_,T)}};if(s&&o.length){const w=s==="backward",_=w?QR:Ay,S={pages:o,pageParams:i},C=_(r,S);a=await m(S,C,w)}else{const w=t??o.length;do{const _=l===0?i[0]??r.initialPageParam:Ay(r,a);if(l>0&&_==null)break;a=await m(a,_),l++}while(l<w)}return a};e.options.persister?e.fetchFn=()=>{var v,b;return(b=(v=e.options).persister)==null?void 0:b.call(v,c,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=c}}}function Ay(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function QR(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var it,ts,ns,mi,gi,rs,vi,yi,W0,JR=(W0=class{constructor(t={}){Le(this,it);Le(this,ts);Le(this,ns);Le(this,mi);Le(this,gi);Le(this,rs);Le(this,vi);Le(this,yi);Ce(this,it,t.queryCache||new KR),Ce(this,ts,t.mutationCache||new YR),Ce(this,ns,t.defaultOptions||{}),Ce(this,mi,new Map),Ce(this,gi,new Map),Ce(this,rs,0)}mount(){Fl(this,rs)._++,V(this,rs)===1&&(Ce(this,vi,F1.subscribe(async t=>{t&&(await this.resumePausedMutations(),V(this,it).onFocus())})),Ce(this,yi,du.subscribe(async t=>{t&&(await this.resumePausedMutations(),V(this,it).onOnline())})))}unmount(){var t,e;Fl(this,rs)._--,V(this,rs)===0&&((t=V(this,vi))==null||t.call(this),Ce(this,vi,void 0),(e=V(this,yi))==null||e.call(this),Ce(this,yi,void 0))}isFetching(t){return V(this,it).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return V(this,ts).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=V(this,it).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),r=V(this,it).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(Ey(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return V(this,it).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=V(this,it).get(r.queryHash),o=s==null?void 0:s.state.data,i=AR(e,o);if(i!==void 0)return V(this,it).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(t,e,n){return Bt.batch(()=>V(this,it).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=V(this,it).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=V(this,it);Bt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=V(this,it),r={type:"active",...t};return Bt.batch(()=>(n.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries(r,e)))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=Bt.batch(()=>V(this,it).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(In).catch(In)}invalidateQueries(t={},e={}){return Bt.batch(()=>
296{if(V(this,it).findAll(t).forEach(r=>{r.invalidate()}),t.refetchType==="none")return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)})}refetchQueries(t={},e){const n={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=Bt.batch(()=>V(this,it).findAll(t).filter(s=>!s.isDisabled()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(In)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(In)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=V(this,it).build(this,e);return n.isStaleByTime(Ey(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(In).catch(In)}fetchInfiniteQuery(t){return t.behavior=Ry(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(In).catch(In)}ensureInfiniteQueryData(t){return t.behavior=Ry(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return du.isOnline()?V(this,ts).resumePausedMutations():Promise.resolve()}getQueryCache(){return V(this,it)}getMutationCache(){return V(this,ts)}getDefaultOptions(){return V(this,ns)}setDefaultOptions(t){Ce(this,ns,t)}setQueryDefaults(t,e){V(this,mi).set(Ja(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...V(this,mi).values()];let n={};return e.forEach(r=>{Xa(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){V(this,gi).set(Ja(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...V(this,gi).values()];let n={};return e.forEach(r=>{Xa(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...V(this,ns).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=eg(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===D1&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...V(this,ns).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){V(this,it).clear(),V(this,ts).clear()}},it=new WeakMap,ts=new WeakMap,ns=new WeakMap,mi=new WeakMap,gi=new WeakMap,rs=new WeakMap,vi=new WeakMap,yi=new WeakMap,W0),XR=h.createContext(void 0),eA=({client:t,children:e})=>(h.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),u.jsx(XR.Provider,{value:t,children:e}));/**
297 * @remix-run/router v1.19.2
298 *
299 * Copyright (c) Remix Software Inc.
300 *
301 * This source code is licensed under the MIT license found in the
302 * LICENSE.md file in the root directory of this source tree.
303 *
304 * @license MIT
305 */function el(){return el=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},el.apply(this,arguments)}var is;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(is||(is={}));const Iy="popstate";function tA(t){t===void 0&&(t={});function e(r,s){let{pathname:o,search:i,hash:a}=r.location;return op("",{pathname:o,search:i,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:fu(s)}return rA(e,n,null,t)}function ft(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function W1(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function nA(){return Math.random().toString(36).substr(2,8)}function Oy(t,e){return{usr:t.state,key:t.key,idx:e}}function op(t,e,n,r){return n===void 0&&(n=null),el({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Fi(e):e,{state:n,key:e&&e.key||r||nA()})}function fu(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Fi(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function rA(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a=is.Pop,l=null,c=d();c==null&&(c=0,i.replaceState(el({},i.state,{idx:c}),""));function d(){return(i.state||{idx:null}).idx}function f(){a=is.Pop;let b=d(),g=b==null?null:b-c;c=b,l&&l({action:a,location:v.location,delta:g})}function p(b,g){a=is.Push;let m=op(v.location,b,g);c=d()+1;let w=Oy(m,c),_=v.createHref(m);try{i.pushState(w,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}o&&l&&l({action:a,location:v.location,delta:1})}function y(b,g){a=is.Replace;let m=op(v.location,b,g);c=d();let w=Oy(m,c),_=v.createHref(m);i.replaceState(w,"",_),o&&l&&l({action:a,location:v.location,delta:0})}function x(b){let g=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof b=="string"?b:fu(b);return m=m.replace(/ $/,"%20"),ft(g,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,g)}let v={get action(){return a},get location(){return t(s,i)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Iy,f),l=b,()=>{s.removeEventListener(Iy,f),l=null}},createHref(b){return e(s,b)},createURL:x,encodeLocation(b){let g=x(b);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:y,go(b){return i.go(b)}};return v}var My;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(My||(My={}));function sA(t,e,n){return n===void 0&&(n="/"),oA(t,e,n,!1)}function oA(t,e,n,r){let s=typeof e=="string"?Fi(e):e,o=tg(s.pathname||"/",n);if(o==null)return null;let i=H1(t);iA(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let c=vA(o);a=mA(i[l],c,r)}return a}function H1(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,i,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(ft(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not val
305id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=ms([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(ft(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),H1(o.children,e,d,c)),!(o.path==null&&!o.index)&&e.push({path:c,score:hA(c,o.index),routesMeta:d})};return t.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of q1(o.path))s(o,i,l)}),e}function q1(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=q1(r.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function iA(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:pA(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const aA=/^:[\w-]+$/,lA=3,cA=2,uA=1,dA=10,fA=-2,Ly=t=>t==="*";function hA(t,e){let n=t.split("/"),r=n.length;return n.some(Ly)&&(r+=fA),e&&(r+=cA),n.filter(s=>!Ly(s)).reduce((s,o)=>s+(aA.test(o)?lA:o===""?uA:dA),r)}function pA(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function mA(t,e,n){let{routesMeta:r}=t,s={},o="/",i=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,d=o==="/"?e:e.slice(o.length)||"/",f=Dy({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),p=l.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=Dy({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;
vendor: 9,412 bytes, lines 305-314
305Object.assign(s,f.params),i.push({params:s,pathname:ms([o,f.pathname]),pathnameBase:bA(ms([o,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(o=ms([o,f.pathnameBase]))}return i}function Dy(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=gA(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,d,f)=>{let{paramName:p,isOptional:y}=d;if(p==="*"){let v=a[f]||"";i=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const x=a[f];return y&&!x?c[p]=void 0:c[p]=(x||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:i,pattern:t}}function gA(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),W1(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 r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function vA(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return W1(!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 tg(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function yA(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?Fi(t):t;return{pathname:n?n.startsWith("/")?n:wA(n,e):e,search:_A(r),hash:SA(s)}}function wA(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Cf(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function xA(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function K1(t,e){let n=xA(t);return e?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function G1(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=Fi(t):(s=el({},t),ft(!s.pathname||!s.pathname.includes("?"),Cf("?","pathname","search",s)),ft(!s.pathname||!s.pathname.includes("#"),Cf("#","pathname","hash",s)),ft(!s.search||!s.search.includes("#"),Cf("#","search","hash",s)));let o=t===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=n;else{let f=e.length-1;if(!r&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),f-=1;s.pathname=p.join("/")}a=f>=0?e[f]:"/"}let l=yA(s,a),c=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const ms=t=>t.join("/").replace(/\/\/+/g,"/"),bA=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),_A=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,SA=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function kA(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Z1=["post","put","patch","delete"];new Set(Z1);const CA=["get",...Z1];new Set(CA);/**
306 * React Router v6.26.2
307 *
308 * Copyright (c) Remix Software Inc.
309 *
310 * This source code is licensed under the MIT license found in the
311 * LICENSE.md file in the root directory of this source tree.
312 *
313 * @license MIT
314 */function tl(){return tl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},tl.apply(this,arguments)}const ng=h.createContext(null),EA=h.createContext(null),go=h.createContext(null),vd=h.createContext(null),vo=h.createContext({outlet:null,matches:[],isDataRoute:!1}),Y1=h.createContext(null);function TA(t,e){let{relative:n}=e===void 0?{}:e;jl()||ft(!1);let{basename:r,navigator:s}=h.useContext(go),{hash:o,pathname:i,search:a}=J1(t,{relative:n}),l=i;return r!=="/"&&(l=i==="/"?r:ms([r,i])),s.createHref({pathname:l,search:a,hash:o})}function jl(){return h.useContext(vd)!=null}function Nl(){return jl()||ft(!1),h.useContext(vd).location}function Q1(t){h.useContext(go).static||h.useLayoutEffect(t)}function jA(){let{isDataRoute:t}=h.useContext(vo);return t?BA():NA()}function NA(){jl()||ft(!1);let t=h.useContext(ng),{basename:e,future:n,navigator:r}=h.useContext(go),{matches:s}=h.useContext(vo),{pathname:o}=Nl(),i=JSON.stringify(K1(s,n.v7_relativeSplatPath)),a=h.useRef(!1);return Q1(()=>{a.current=!0}),h.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=G1(c,JSON.parse(i),o,d.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:ms([e,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[e,r,i,o,t])}function J1(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=h.useContext(go),{matches:s}=h.useContext(vo),{pathname:o}=Nl(),i=JSON.stringify(K1(s,r.v7_relativeSplatPath));return h.useMemo(()=>G1(t,JSON.parse(i),o,n==="path"),[t,i,o,n])}function PA(t,e){return RA(t,e)}function RA(t,e,n,r){jl()||ft(!1);let{navigator:s}=h.useContext(go),{matches:o}=h.useContext(vo),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let c=Nl(),d;if(e){var f;let b=typeof e=="string"?Fi(e):e;l==="/"||(f=b.pathname)!=null&&f.startsWith(l)||ft(!1),d=b}else d=c;let p=d.pathname||"/",y=p;if(l!=="/"){let b=l.replace(/^\//,"").split("/");y="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let x=sA(t,{pathname:y}),v=LA(x&&x.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:ms([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:ms([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),o,n,r);return e&&v?h.createElement(vd.Provider,{value:{location:tl({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:is.Pop}},v):v}function AA(){let t=UA(),e=kA(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},e),n?h.createElement("pre",{style:s},n):null,null)}const IA=h.createElement(AA,null);class OA extends h.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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?h.createElement(vo.Provider,{value:this.props.routeContext},h.createElement(Y1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function MA(t){let{routeContext:e,match:n,children:r}=t,s=h.useContext(ng);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),h.createElement(vo.Provider,{value:e},r)}function LA(t,e,n,r){var s;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var o;if(!n)return null;if(n.errors)t=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let i=t,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||ft(!1),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<i.length;d++){let f=i[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=d),f.route.id){let{loaderData:p,errors:y}=n,x=f.route.loader&&p[f.route.id]===void 0&&(!y||y[f.route.id]===void 0);if(f.route.lazy||x){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((d,f,p)=>{let y,x=!1,v=null,b=null;n&&(y=a&&f.route.id?a[f.route.id]:void 0,v=f.route.errorElement||IA,l&&(c<0&&p===0?(x=!0,b=null):c===p&&(x=!0,b=f.route.hydrateFallbackElement||null)));let g=e.concat(i.slice(0,p+1)),m=()=>{let w;return y?w=v:x?w=b:f.route.Component?w=h.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,h.createElement(MA,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?h.createElement(OA,{location:n.location,revalidation:n.revalidation,component:v,error:y,children:m(),routeC
314ontext:{outlet:null,matches:g,isDataRoute:!0}}):m()},null)}var X1=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(X1||{}),hu=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}(hu||{});function DA(t){let e=h.useContext(ng);return e||ft(!1),e}function $A(t){let e=h.useContext(EA);return e||ft(!1),e}function FA(t){let e=h.useContext(vo);return e||ft(!1),e}function e_(t){let e=FA(),n=e.matches[e.matches.length-1];return n.route.id||ft(!1),n.route.id}function UA(){var t;let e=h.useContext(Y1),n=$A(hu.UseRouteError),r=e_(hu.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function BA(){let{router:t}=DA(X1.UseNavigateStable),e=e_(hu.UseNavigateStable),n=h.useRef(!1);return Q1(()=>{n.current=!0}),h.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,tl({fromRouteId:e},o)))},[t,e])}function la(t){ft(!1)}function VA(t){let{basename:e="/",children:n=null,location:r,navigationType:s=is.Pop,navigator:o,static:i=!1,future:a}=t;jl()&&ft(!1);let l=e.replace(/^\/*/,"/"),c=h.useMemo(()=>({basename:l,navigator:o,static:i,future:tl({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof r=="string"&&(r=Fi(r));let{pathname:d="/",search:f="",hash:p="",state:y=null,key:x="default"}=r,v=h.useMemo(()=>{let b=tg(d,l);return b==null?null:{location:{pathname:b,search:f,hash:p,state:y,key:x},navigationType:s}},[l,d,f,p,y,x,s]);return v==null?null:h.createElement(go.Provider,{value:c},h.createElement(vd.Provider,{children:n,value:v}))}function zA(t){let{children:e,location:n}=t;return PA(ip(e),n)}new Promise(()=>{});function ip(t,e){e===void 0&&(e=[]);let n=[];return h.Children.forEach(t,(r,s)=>{if(!h.isValidElement(r))return;let o=[...e,s];if(r.type===h.Fragment){n.push.apply(n,ip(r.props.children,o));return}r.type!==la&&ft(!1),!r.props.index||!r.props.children||ft(!1);let i={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=ip(r.props.children,o)),n.push(i)}),n}/**
315 * React Router DOM v6.26.2
316 *
317 * Copyright (c) Remix Software Inc.
318 *
319 * This source code is licensed under the MIT license found in the
320 * LICENSE.md file in the root directory of this source tree.
321 *
322 * @license MIT
323 */function ap(){return ap=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ap.apply(this,arguments)}function WA(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function HA(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function qA(t,e){return t.button===0&&(!e||e==="_self")&&!HA(t)}const KA=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],GA="6";try{window.__reactRouterVersion=GA}catch{}const ZA="startTransition",$y=nw[ZA];function YA(t){let{basename:e,children:n,future:r,window:s}=t,o=h.useRef();o.current==null&&(o.current=tA({window:s,v5Compat:!0}));let i=o.current,[a,l]=h.useState({action:i.action,location:i.location}),{v7_startTransition:c}=r||{},d=h.useCallback(f=>{c&&$y?$y(()=>l(f)):l(f)},[l,c]);return h.useLayoutEffect(()=>i.listen(d),[i,d]),h.createElement(VA,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:i,future:r})}const QA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",JA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,t_=h.forwardRef(function(e,n){let{onClick:r,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:c,preventScrollReset:d,unstable_viewTransition:f}=e,p=WA(e,KA),{basename:y}=h.useContext(go),x,v=!1;if(typeof c=="string"&&JA.test(c)&&(x=c,QA))try{let w=new URL(window.location.href),_=c.startsWith("//")?new URL(w.protocol+c):new URL(c),S=tg(_.pathname,y);_.origin===w.origin&&S!=null?c=S+_.search+_.hash:v=!0}catch{}let b=TA(c,{relative:s}),g=XA(c,{replace:i,state:a,target:l,preventScrollReset:d,relative:s,unstable_viewTransition:f});function m(w){r&&r(w),w.defaultPrevented||g(w)}return h.createElement("a",ap({},p,{href:x||b,onClick:v||o?r:m,ref:n,target:l}))});var Fy;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Fy||(Fy={}));var Uy;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Uy||(Uy={}));function XA(t,e){let{target:n,replace:r,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a}=e===void 0?{}:e,l=jA(),c=Nl(),d=J1(t,{relative:i});return h.useCallback(f=>{if(qA(f,n)){f.preventDefault();let p=r!==void 0?r:fu(c)===fu(d);l(t,{replace:p,state:s,preventScrollReset:o,relative:i,unstable_viewTransition:a})}},[c,l,d,r,s,n,t,o,i,a])}const eI="modulepreload",tI=function(t){return"/"+t},By={},Pl=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=tI(l),l in By)return;By[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":eI,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((p,y)=>{f.addEventListener("load",p),f.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return s.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return e().catch(o)})},nI=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>Pl(async()=>{const{default:r}=await Promise.resolve().then(()=>Ui);return{default:r}},void 0).then(({default:r})=>r(...n)):e=fetch,(...n)=>e(...n)};
323class rg extends Error{constructor(e,n="FunctionsError",r){super(e),this.name=n,this.context=r}}class rI extends rg{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Vy extends rg{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class zy extends rg{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var lp;(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"})(lp||(lp={}));var sI=function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(d){try{c(r.next(d))}catch(f){i(f)}}function l(d){try{c(r.throw(d))}catch(f){i(f)}}function c(d){d.done?o(d.value):s(d.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};class oI{constructor(e,{headers:n={},customFetch:r,region:s=lp.Any}={}){this.url=e,this.headers=n,this.region=s,this.fetch=nI(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,n={}){var r;return sI(this,void 0,void 0,function*(){try{const{headers:s,method:o,body:i}=n;let a={},{region:l}=n;l||(l=this.region);const c=new URL(`${this.url}/${e}`);l&&l!=="any"&&(a["x-region"]=l,c.searchParams.set("forceFunctionRegion",l));let d;i&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)&&(typeof Blob<"u"&&i instanceof Blob||i instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",d=i):typeof i=="string"?(a["Content-Type"]="text/plain",d=i):typeof FormData<"u"&&i instanceof FormData?d=i:(a["Content-Type"]="application/json",d=JSON.stringify(i)));const f=yield this.fetch(c.toString(),{method:o||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),s),body:d}).catch(v=>{throw new rI(v)}),p=f.headers.get("x-relay-error");if(p&&p==="true")throw new Vy(f);if(!f.ok)throw new zy(f);let y=((r=f.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),x;return y==="application/json"?x=yield f.json():y==="application/octet-stream"?x=yield f.blob():y==="text/event-stream"?x=f:y==="multipart/form-data"?x=yield f.formData():x=yield f.text(),{data:x,error:null,response:f}}catch(s){return{data:null,error:s,response:s instanceof zy||s instanceof Vy?s.context:void 0}}})}}var Zt={},sg={},yd={},Rl={},wd={},xd={},iI=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")},Ni=iI();const aI=Ni.fetch,n_=Ni.fetch.bind(Ni),r_=Ni.Headers,lI=Ni.Request,cI=Ni.Response,Ui=Object.freeze(Object.defineProperty({__proto__:null,Headers:r_,Request:lI,Response:cI,default:n_,fetch:aI},Symbol.toStringTag,{value:"Module"})),uI=ZC(Ui);var bd={};Object.defineProperty(bd,"__esModule",{value:!0});let dI=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
323de=e.code}};bd.default=dI;var s_=kn&&kn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xd,"__esModule",{value:!0});const fI=s_(uI),hI=s_(bd);let pI=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=fI.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,n){return this.headers=Object.assign({},this.headers),this.headers[e]=n,this}then(e,n){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 r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{var i,a,l;let c=null,d=null,f=null,p=o.status,y=o.statusText;if(o.ok){if(this.method!=="HEAD"){const g=await o.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=(i=this.headers.Prefer)===null||i===void 0?void 0:i.match(/count=(exact|planned|estimated)/),b=(a=o.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?(c={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,p=406,y="Not Acceptable"):d.length===1?d=d[0]:d=null)}else{const v=await o.text();try{c=JSON.parse(v),Array.isArray(c)&&o.status===404&&(d=[],c=null,p=200,y="OK")}catch{o.status===404&&v===""?(p=204,y="No Content"):c={message:v}}if(c&&this.isMaybeSingle&&(!((l=c==null?void 0:c.details)===null||l===void 0)&&l.includes("0 rows"))&&(c=null,p=200,y="OK"),c&&this.shouldThrowOnError)throw new hI.default(c)}return{error:c,data:d,count:f,status:p,statusText:y}});return this.shouldThrowOnError||(s=s.catch(o=>{var i,a,l;return{error:{message:`${(i=o==null?void 0:o.name)!==null&&i!==void 0?i:"FetchError"}: ${o==null?void 0:o.message}`,details:`${(a=o==null?void 0:o.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=o==null?void 0:o.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),s.then(e,n)}returns(){return this}overrideTypes(){return this}};xd.default=pI;var mI=kn&&kn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wd,"__esModule",{value:!0});const gI=mI(xd);let vI=class extends gI.default{select(e){let n=!1;const r=(e??"*").split("").map(s=>/\s/.test(s)&&!n?"":(s==='"'&&(n=!n),s)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:n=!0,nullsFirst:r,foreignTable:s,referencedTable:o=s}={}){const i=o?`${o}.order`:"order",a=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${a?`${a},`:""}${e}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this}range(e,n,{foreignTable:r,referencedTable:s=r}={}){const o=typeof s>"u"?"offset":`${s}.offset`,i=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(o,`${e}`),this.url.searchParams.set(i,`${n-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}
323explain({analyze:e=!1,verbose:n=!1,settings:r=!1,buffers:s=!1,wal:o=!1,format:i="text"}={}){var a;const l=[e?"analyze":null,n?"verbose":null,r?"settings":null,s?"buffers":null,o?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.Accept)!==null&&a!==void 0?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${i}; for="${c}"; options=${l};`,i==="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}};wd.default=vI;var yI=kn&&kn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Rl,"__esModule",{value:!0});const wI=yI(wd);let xI=class extends wI.default{eq(e,n){return this.url.searchParams.append(e,`eq.${n}`),this}neq(e,n){return this.url.searchParams.append(e,`neq.${n}`),this}gt(e,n){return this.url.searchParams.append(e,`gt.${n}`),this}gte(e,n){return this.url.searchParams.append(e,`gte.${n}`),this}lt(e,n){return this.url.searchParams.append(e,`lt.${n}`),this}lte(e,n){return this.url.searchParams.append(e,`lte.${n}`),this}like(e,n){return this.url.searchParams.append(e,`like.${n}`),this}likeAllOf(e,n){return this.url.searchParams.append(e,`like(all).{${n.join(",")}}`),this}likeAnyOf(e,n){return this.url.searchParams.append(e,`like(any).{${n.join(",")}}`),this}ilike(e,n){return this.url.searchParams.append(e,`ilike.${n}`),this}ilikeAllOf(e,n){return this.url.searchParams.append(e,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(e,n){return this.url.searchParams.append(e,`ilike(any).{${n.join(",")}}`),this}is(e,n){return this.url.searchParams.append(e,`is.${n}`),this}in(e,n){const r=Array.from(new Set(n)).map(s=>typeof s=="string"&&new RegExp("[,()]").test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}contains(e,n){return typeof n=="string"?this.url.searchParams.append(e,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(e,`cs.{${n.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(n)}`),this}containedBy(e,n){return typeof n=="string"?this.url.searchParams.append(e,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(e,`cd.{${n.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(n)}`),this}rangeGt(e,n){return this.url.searchParams.append(e,`sr.${n}`),this}rangeGte(e,n){return this.url.searchParams.append(e,`nxl.${n}`),this}rangeLt(e,n){return this.url.searchParams.append(e,`sl.${n}`),this}rangeLte(e,n){return this.url.searchParams.append(e,`nxr.${n}`),this}rangeAdjacent(e,n){return this.url.searchParams.append(e,`adj.${n}`),this}overlaps(e,n){return typeof n=="string"?this.url.searchParams.append(e,`ov.${n}`):this.url.searchParams.append(e,`ov.{${n.join(",")}}`),this}textSearch(e,n,{config:r,type:s}={}){let o="";s==="plain"?o="pl":s==="phrase"?o="ph":s==="websearch"&&(o="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${o}fts${i}.${n}`),this}match(e){return Object.entries(e).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(e,n,r){return this.url.searchParams.append(e,`not.${n}.${r}`),this}or(e,{foreignTable:n,referencedTable:r=n}={}){const s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${e})`),this}filter(e,n,r){return this.url.searchParams.append(e,`${n}.${r}`),this}};Rl.default=xI;var bI=kn&&kn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yd,"__esModule",{value:!0});const ta=bI(Rl);let _I=class{constructor(e,{headers:n={},schema:r,fetch:s}){this.url=e,this.headers=n,this.schema=r,this.fetch=s}select(e,{head:n=!1,count:r}={}){const s=n?"HEAD":"GET";let o=!1;const i=(e??"*").split("").map(a=>/\s/.test(a)&&!o?"":(a==='"'&&(o=!o),a)).join("");return this.url.searchParams.set("select",i),r&&(this.headers.Prefer=`count=${r}`),new ta.default({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:n,defaultToNull:r=!0}={}){const s="POST",o=[];if(this.headers.Prefer&&o.push(this.headers.Prefer),n&&o.push(`count=${n}`),r||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(e)){const i=e.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(i.length>
3230){const a=[...new Set(i)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new ta.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:n,ignoreDuplicates:r=!1,count:s,defaultToNull:o=!0}={}){const i="POST",a=[`resolution=${r?"ignore":"merge"}-duplicates`];if(n!==void 0&&this.url.searchParams.set("on_conflict",n),this.headers.Prefer&&a.push(this.headers.Prefer),s&&a.push(`count=${s}`),o||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(e)){const l=e.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(l.length>0){const c=[...new Set(l)].map(d=>`"${d}"`);this.url.searchParams.set("columns",c.join(","))}}return new ta.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:n}={}){const r="PATCH",s=[];return this.headers.Prefer&&s.push(this.headers.Prefer),n&&s.push(`count=${n}`),this.headers.Prefer=s.join(","),new ta.default({method:r,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){const n="DELETE",r=[];return e&&r.push(`count=${e}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new ta.default({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};yd.default=_I;var _d={},Sd={};Object.defineProperty(Sd,"__esModule",{value:!0});Sd.version=void 0;Sd.version="0.0.0-automated";Object.defineProperty(_d,"__esModule",{value:!0});_d.DEFAULT_HEADERS=void 0;const SI=Sd;_d.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${SI.version}`};var o_=kn&&kn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sg,"__esModule",{value:!0});const kI=o_(yd),CI=o_(Rl),EI=_d;let TI=class i_{constructor(e,{headers:n={},schema:r,fetch:s}={}){this.url=e,this.headers=Object.assign(Object.assign({},EI.DEFAULT_HEADERS),n),this.schemaName=r,this.fetch=s}from(e){const n=new URL(`${this.url}/${e}`);return new kI.default(n,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new i_(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,n={},{head:r=!1,get:s=!1,count:o}={}){let i;const a=new URL(`${this.url}/rpc/${e}`);let l;r||s?(i=r?"HEAD":"GET",Object.entries(n).filter(([d,f])=>f!==void 0).map(([d,f])=>[d,Array.isArray(f)?`{${f.join(",")}}`:`${f}`]).forEach(([d,f])=>{a.searchParams.append(d,f)})):(i="POST",l=n);const c=Object.assign({},this.headers);return o&&(c.Prefer=`count=${o}`),new CI.default({method:i,url:a,headers:c,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}};sg.default=TI;var Bi=kn&&kn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.PostgrestError=Zt.PostgrestBuilder=Zt.PostgrestTransformBuilder=Zt.PostgrestFilterBuilder=Zt.PostgrestQueryBuilder=Zt.PostgrestClient=void 0;const a_=Bi(sg);Zt.PostgrestClient=a_.default;const l_=Bi(yd);Zt.PostgrestQueryBuilder=l_.default;const c_=Bi(Rl);Zt.PostgrestFilterBuilder=c_.default;const u_=Bi(wd);Zt.PostgrestTransformBuilder=u_.default;const d_=Bi(xd);Zt.PostgrestBuilder=d_.default;const f_=Bi(bd);Zt.PostgrestError=f_.default;var jI=Zt.default={PostgrestClient:a_.default,PostgrestQueryBuilder:l_.default,PostgrestFilterBuilder:c_.default,PostgrestTransformBuilder:u_.default,PostgrestBuilder:d_.default,PostgrestError:f_.default};const{PostgrestClient:NI,PostgrestQueryBuilder:F4,PostgrestFilterBuilder:U4,PostgrestTransformBuilder:B4,PostgrestBuilder:V4,PostgrestError:z4}=jI;class PI{static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"&&process.versions&&process.versions.node){const n=parseInt(process.versions.node.split(".")[0]);return n>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${n} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${n} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
324import ws from "ws"
325new RealtimeClient(url, { transport: ws })`}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.constructor)return e.constructor;let n=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(n+=`
326
327Suggested solution: ${e.workaround}`),new Error(n)}static createWebSocket(e,n){const r=this.getWebSocketConstructor();return new r(e,n)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const RI="2.15.1",AI=`realtime-js/${RI}`,II="1.0.0",cp=1e4,OI=1e3,MI=100;var ka;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(ka||(ka={}));var mt;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(mt||(mt={}));var Ln;(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"})(Ln||(Ln={}));var up;(function(t){t.websocket="websocket"})(up||(up={}));var qs;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"}
327)(qs||(qs={}));class LI{constructor(){this.HEADER_LENGTH=1}decode(e,n){return e.constructor===ArrayBuffer?n(this._binaryDecode(e)):n(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const n=new DataView(e),r=new TextDecoder;return this._decodeBroadcast(e,n,r)}_decodeBroadcast(e,n,r){const s=n.getUint8(1),o=n.getUint8(2);let i=this.HEADER_LENGTH+2;const a=r.decode(e.slice(i,i+s));i=i+s;const l=r.decode(e.slice(i,i+o));i=i+o;const c=JSON.parse(r.decode(e.slice(i,e.byteLength)));return{ref:null,topic:a,event:l,payload:c}}}class h_{constructor(e,n){this.callback=e,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var He;(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.tsrange="tsrange",t.tstzrange="tstzrange"})(He||(He={}));const Wy=(t,e,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(e).reduce((o,i)=>(o[i]=DI(i,t,e,s),o),{})},DI=(t,e,n,r)=>{const s=e.find(a=>a.name===t),o=s==null?void 0:s.type,i=n[t];return o&&!r.includes(o)?p_(o,i):dp(i)},p_=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return BI(e,n)}switch(t){case He.bool:return $I(e);case He.float4:case He.float8:case He.int2:case He.int4:case He.int8:case He.numeric:case He.oid:return FI(e);case He.json:case He.jsonb:return UI(e);case He.timestamp:return VI(e);case He.abstime:case He.date:case He.daterange:case He.int4range:case He.int8range:case He.money:case He.reltime:case He.text:case He.time:case He.timestamptz:case He.timetz:case He.tsrange:case He.t
vendor: 4,939 bytes, line 327
327stzrange:return dp(e);default:return dp(e)}},dp=t=>t,$I=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},FI=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},UI=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch(e){return console.log(`JSON parse error: ${e}`),t}return t},BI=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,r=t[n];if(t[0]==="{"&&r==="}"){let o;const i=t.slice(1,n);try{o=JSON.parse("["+i+"]")}catch{o=i?i.split(","):[]}return o.map(a=>p_(e,a))}return t},VI=t=>typeof t=="string"?t.replace(" ","T"):t,m_=t=>{let e=t;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")+"/api/broadcast"};class Ef{constructor(e,n,r={},s=cp){this.channel=e,this.event=n,this.payload=r,this.timeout=s,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,n){var r;return this._hasReceived(e)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:e,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:n})}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:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(n))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var Hy;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Hy||(Hy={}));class Ca{constructor(e,n){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Ca.syncState(this.state,s,o,i),this.pendingDiffs.forEach(l=>{this.state=Ca.syncDiff(this.state,l,o,i)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Ca.syncDiff(this.state,s,o,i),a())}),this.onJoin((s,o,i)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:i})}),this.onLeave((s,o,i)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:i})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,n,r,s){const o=this.cloneDeep(e),i=this.transformState(n),a={},l={};return this.map(o,(c,d)=>{i[c]||(l[c]=d)}),this.map(i,(c,d)=>{const f=o[c];if(f){const p=d.map(b=>b.presence_ref),y=f.map(b=>b.presence_ref),x=d.filter(b=>y.indexOf(b.presence_ref)<0),v=f.filter(b=>p.indexOf(b.presence_ref)<0);x.length>0&&(a[c]=x),v.length>0&&(l[c]=v)}else a[c]=d}),this.syncDiff(o,{joins:a,leaves:l},r,s)}static syncDiff(e,n,r,s){const{joins:o,leaves:i}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(o,(a,l)=>{var c;const d=(c=e[a])!==null&&c!==void 0?c:[];if(e[a]=this.cloneDeep(l),d.length>0){const f=e[a].map(y=>y.presence_ref),p=d.filter(y=>f.indexOf(y.presence_ref)<0);e[a].unshift(...p)}r(a,d,l)}),this.map(i,(a,l)=>{let c=e[a];if(!c)return;const d=l.map(f=>f.presence_ref);c=c.filter(f=>d.indexOf(f.presence_ref)<0),e[a]=c,s(a,c,l),c.length===0&&delete e[a]}),e}static map(e,n){return Object.getOwnPropertyNames(e).map(r=>n(r,e[r]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((n,r)=>{const s=e[r];return"metas"in s?n[r]=s.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):n[r]=s,n},{})}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 qy;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELET
327E="DELETE"})(qy||(qy={}));var Ea;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Ea||(Ea={}));var xr;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(xr||(xr={}));class og{constructor(e,n={config:{}},r){this.topic=e,this.params=n,this.socket=r,this.bindings={},this.state=mt.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new Ef(this,Ln.join,this.params,this.timeout),this.rejoinTimer=new h_(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=mt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=mt.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=mt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=mt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=mt.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Ln.reply,{},(s,o)=>{this._trigger(this._replyEventName(o),s)}),this.presence=new Ca(this),this.broadcastEndpointURL=m_(this.socket.endPoint),this.private=this.params.config.private||!1}subscribe(e,n=this.timeout){var r,s;if(this.socket.isConnected()||this.socket.connect(),this.state==mt.closed){const{config:{broadcast:o,presence:i,private:a}}=this.params,l=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(p=>p.filter))!==null&&s!==void 0?s:[],c=!!this.bindings[Ea.PRESENCE]&&this.bindings[Ea.PRESENCE].length>0,d={},f={broadcast:o,presence:Object.assign(Object.assign({},i),{enabled:c}),postgres_changes:l,private:a};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(p=>e==null?void 0:e(xr.CHANNEL_ERROR,p)),this._onClose(()=>e==null?void 0:e(xr.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:p})=>{var y;if(this.socket.setAuth(),p===void 0){e==null||e(xr.SUBSCRIBED);return}else{const x=this.bindings.postgres_changes,v=(y=x==null?void 0:x.length)!==null&&y!==void 0?y:0,b=[];for(let g=0;g<v;g++){const m=x[g],{filter:{event:w,schema:_,table:S,filter:C}}=m,k=p&&p[g];if(k&&k.event===w&&k.schema===_&&k.table===S&&k.filter===C)b.push(Object.assign(Object.assign({},m),{id:k.id}));else{this.unsubscribe(),this.state=mt.errored,e==null||e(xr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=b,e&&e(xr.SUBSCRIBED);return}}).receive("error",p=>{this.state=mt.errored,e==null||e(xr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(xr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,r){return this.state===mt.joined&&e===Ea.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(e,n,r)}async send(e,n={}){var r,s;if(!this._canPush()&&e.type==="broadcast"){const{event:o,payload:i}=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:o,payload:i,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var i,a,l;const c=this._push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(i=this.params)===null||i===void 0?void 0:i.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&o("ok"),
327c.receive("ok",()=>o("ok")),c.receive("error",()=>o("error")),c.receive("timeout",()=>o("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=mt.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Ln.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(s=>{r=new Ef(this,Ln.leave,{},e),r.receive("ok",()=>{n(),s("ok")}).receive("timeout",()=>{n(),s("timed out")}).receive("error",()=>{s("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=mt.closed,this.bindings={}}async _fetchWithTimeout(e,n,r){const s=new AbortController,o=setTimeout(()=>s.abort(),r),i=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(o),i}_push(e,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new Ef(this,e,n,r);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(e){if(e.startTimeout(),this.pushBuffer.push(e),this.pushBuffer.length>MI){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(e,n,r){return n}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,n,r){var s,o;const i=e.toLocaleLowerCase(),{close:a,error:l,leave:c,join:d}=Ln;if(r&&[a,l,c,d].indexOf(i)>=0&&r!==this._joinRef())return;let p=this._onMessage(i,n,r);if(n&&!p)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(i)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(y=>{var x,v,b;return((x=y.filter)===null||x===void 0?void 0:x.event)==="*"||((b=(v=y.filter)===null||v===void 0?void 0:v.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===i}).map(y=>y.callback(p,r)):(o=this.bindings[i])===null||o===void 0||o.filter(y=>{var x,v,b,g,m,w;if(["broadcast","presence","postgres_changes"].includes(i))if("id"in y){const _=y.id,S=(x=y.filter)===null||x===void 0?void 0:x.event;return _&&((v=n.ids)===null||v===void 0?void 0:v.includes(_))&&(S==="*"||(S==null?void 0:S.toLocaleLowerCase())===((b=n.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const _=(m=(g=y==null?void 0:y.filter)===null||g===void 0?void 0:g.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return _==="*"||_===((w=n==null?void 0:n.event)===null||w===void 0?void 0:w.toLocaleLowerCase())}else return y.type.toLocaleLowerCase()===i}).map(y=>{if(typeof p=="object"&&"ids"in p){const x=p.data,{schema:v,table:b,commit_timestamp:g,type:m,errors:w}=x;p=Object.assign(Object.assign({},{schema:v,table:b,commit_timestamp:g,eventType:m,new:{},old:{},errors:w}),this._getPayloadRecords(x))}y.callback(p,r)})}_isClosed(){return this.state===mt.closed}_isJoined(){return this.state===mt.joined}_isJoining(){return this.state===mt.joining}_isLeaving(){return this.state===mt.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,n,r){const s=e.toLocaleLowerCase(),o={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(e,n){const r=e.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===r&&og.isEqual(s.filter,n))})),this}static isEqual(e,n){if(Object.keys(e).length!==Object.keys(n).length)return!1;for(const r in e)if(e[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(Ln.close,{},e)}_onError(e){this._on(Ln.error,{},n=>e(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=mt.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=Wy(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=Wy(e.columns,e.old_record)),n}}const Ky=()=>{},cc={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},zI=[1e3,2e3,5e3,1e4],WI=1e4,HI=`
328  addEventListener("message", (e) => {
329    if (e.data.event === "start") {
330      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
331    }
332  });`;class qI{constructor(e,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=cp,this.transport=null,this.heartbeatIntervalMs=cc.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Ky,this.ref=0,this.reconnectTimer=null,this.logger=Ky,this.conn=null,this.sendBuffer=[],this.serializer
332=new LI,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=s=>{let o;return s?o=s:typeof fetch>"u"?o=(...i)=>Pl(async()=>{const{default:a}=await Promise.resolve().then(()=>Ui);return{default:a}},void 0).then(({default:a})=>a(...i)).catch(a=>{throw new Error(`Failed to load @supabase/node-fetch: ${a.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):o=fetch,(...i)=>o(...i)},!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${e}/${up.websocket}`,this.httpEndpoint=m_(e),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=PI.createWebSocket(this.endpointURL())}catch(e){this._setConnectionState("disconnected");const n=e.message;throw n.includes("Node.js")?new Error(`${n}
333
334To use Realtime in Node.js, you need to provide a WebSocket implementation:
335
336Option 1: Use Node.js 22+ which has native WebSocket support
337Option 2: Install and provide the "ws" package:
338
339  npm install ws
340
341  import ws from "ws"
342  const client = new RealtimeClient(url, {
343    ...options,
344    transport: ws
345  })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:II}))}disconnect(e,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},e?this.conn.close(e,n??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const e=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,n,r){this.logger(e,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case ka.connecting:return qs.Connecting;case ka.open:return qs.Open;case ka.closing:return qs.Closing;default:return qs.Closed}}isConnected(){return this.connectionState()===qs.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(e,n={config:{}}){const r=`realtime:${e}`,s=this.getChannels().find(o=>o.topic===r);if(s)return s;{const o=new og(`realtime:${e}`,n,this);return this.channels.push(o),o}}push(e){const{topic:n,event:r,payload:s,ref:o}=e,i=()=>{this.encode(e,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${r} (${o})`,s),this.isConnected()?i():this.sendBuffer.push(i)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}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"),this._wasManualDisconnect=!1,(e=this.conn)===null||e===void 0||e.close(OI,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},cc.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatCallback("sent"),this._setAuthSafely("heartbeat")}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>
3450&&(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 n=this.channels.find(r=>r.topic===e&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${e}"`),n.unsubscribe())}_remove(e){this.channels=this.channels.filter(n=>n.topic!==e.topic)}_onConnMessage(e){this.decode(e.data,n=>{n.topic==="phoenix"&&n.event==="phx_reply"&&this.heartbeatCallback(n.payload.status==="ok"?"ok":"error"),n.ref&&n.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:r,event:s,payload:o,ref:i}=n,a=i?`(${i})`:"",l=o.status||"";this.log("receive",`${l} ${r} ${s} ${a}`.trim(),o),this.channels.filter(c=>c._isMember(r)).forEach(c=>c._trigger(s,o,i)),this._triggerStateCallbacks("message",n)})}_clearTimer(e){var n;e==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):e==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in 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))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(e=>e.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){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=n=>{this.log("worker","worker error",n.message),this.workerRef.terminate()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(e){var n;this._setConnectionState("disconnected"),this.log("transport","close",e),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",e)}_onConnError(e){this._setConnectionState("disconnected"),this.log("transport",`${e}`),this._triggerChanError(),this._triggerStateCallbacks("error",e)}_triggerChanError(){this.channels.forEach(e=>e._trigger(Ln.error))}_appendParams(e,n){if(Object.keys(n).length===0)return e;const r=e.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${e}${r}${s}`}_workerObjectUrl(e){let n;if(e)n=e;else{const r=new Blob([HI],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(e,n=!1){this._connectionState=e,e==="connecting"?this._wasManualDisconnect=!1:e==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(e=null){let n;e?n=e:this.accessToken?n=await this.accessToken():n=this.accessTokenValue,this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(r=>{const s={access_token:n,version:AI};n&&r.updateJoinPayload(s),r.joinedOnce&&r._isJoined()&&r._push(Ln.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this.setAuth().catch(n=>{this.log("error",`error setting auth in ${e}`,n)})}_triggerStateCallbacks(e,n){try{this.stateChangeCallbacks[e].forEach(r=>{try{r(n)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new h_(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},cc.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(e){var n,r,s,o,i,a,l,c;if(this.transport=(n=e==null?void 0:e.transport)!==null&&n!==void 0?n:null,this.timeout=(r=e==null?void 0:e.timeout)!==null&&r!==void 0?r:cp,this.heartbeatIntervalMs=(s=e==null?void 0:e.heartbeatIntervalMs)!==null&&s!==void 0?s:cc.HEARTBEAT_INTERVAL,this.worker=(o=e==null?void 0:e.worker)!==null&&o!==void 0?o:!1,this.accessToken=(i=e==null?void 0:e.accessToken)!==null&&i!==void 0?i:null,e!=null&&e.params&&(this.params=e.params),e!=null&&e.logger&&(this.logger=e.logger),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(a=e==null?void 0:e.reconnectAfterMs)!==null&&a!==void 0?a:d=>zI[d-1]||WI,this.encode=(l=e==null?void 0:e.encode)!==null&&l!==void 0?l:(d,f)=>f(JSON.stringify(d)),this.decode=(c=e==null?void 0:e.decode)!==null&&c!==void 0?c:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl}}}
345class ig extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function vt(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}class KI extends ig{constructor(e,n,r){super(e),this.name="StorageApiError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class fp extends ig{constructor(e,n){super(e),this.name="StorageUnknownError",this.originalError=n}}var GI=function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(d){try{c(r.next(d))}catch(f){i(f)}}function l(d){try{c(r.throw(d))}catch(f){i(f)}}function c(d){d.done?o(d.value):s(d.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};const g_=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>Pl(async()=>{const{default:r}=await Promise.resolve().then(()=>Ui);return{default:r}},void 0).then(({default:r})=>r(...n)):e=fetch,(...n)=>e(...n)},ZI=()=>GI(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Pl(()=>Promise.resolve().then(()=>Ui),void 0)).Response:Response}),hp=t=>{if(Array.isArray(t))return t.map(n=>hp(n));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));e[s]=hp(r)}),e},YI=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};var yo=function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(d){try{c(r.next(d))}catch(f){i(f)}}function l(d){try{c(r.throw(d))}catch(f){i(f)}}function c(d){d.done?o(d.value):s(d.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};const Tf=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),QI=(t,e,n)=>yo(void 0,void 0,void 0,function*(){const r=yield ZI();t instanceof r&&!(n!=null&&n.noResolveJson)?t.json().then(s=>{const o=t.status||500,i=(s==null?void 0:s.statusCode)||o+"";e(new KI(Tf(s),o,i))}).catch(s=>{e(new fp(Tf(s),s))}):e(new fp(Tf(t),t))}),JI=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"||!r?s:(YI(r)?(s.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),s.body=JSON.stringify(r)):s.body=r,e!=null&&e.duplex&&(s.duplex=e.duplex),Object.assign(Object.assign({},s),n))};function Al(t,e,n,r,s,o){return yo(this,void 0,void 0,function*(){return new Promise((i,a)=>{t(n,JI(e,r,s,o)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>i(l)).catch(l=>QI(l,a,r))})})}function pu(t,e,n,r){return yo(this,void 0,void 0,function*(){return Al(t,"GET",e,n,r)})}function Xn(t,e,n,r,s){return yo(this,void 0,void 0,function*(){return Al(t,"POST",e,r,s,n)})}function pp(t,e,n,r,s){return yo(this,void 0,void 0,function*(){return Al(t,"PUT",e,r,s,n)})}function XI(t,e,n,r){return yo(this,void 0,void 0,function*(){return Al(t,"HEAD",e,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}function v_(t,e,n,r,s){return yo(this,void 0,void 0,function*(){return Al(t,"DELETE",e,r,s,n)})}var Dt=function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(d){try{c(r.next(d))}catch(f){i(f)}}function l(d){try{c(r.throw(d))}catch(f){i(f)}}function c(d){d.done?o(d.value):s(d.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};const eO={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Gy={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class tO{constructor(e,n={},r,s){this.url=e,this.headers=n,this.bucketId=r,this.fetch=g_(s)}uploadOrUpdate(e,n,r,s){return Dt(this,void 0,void 0,function*(){try{let o;const i=Object.assign(Object.assign({},Gy),s);let a=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(i.upsert)});const l=i.metadata;typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",i.cacheControl),l&&o.append("metadata",this.encodeMetadata(l)),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.append("cacheControl",i.cacheControl),l&&o.append("metadata",this.encodeMetadata(l))):(o=r,a["cache-control"]=`max-age=${i.cacheControl}`,a["content-type"]=i.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),s!=null&&s.headers&&(a=Object.assign(Object.assign({},a),s.headers));const c=this._removeEmptyFolders(n),d=this._getFinalPath(c),f=yield(e=="PUT"?pp:Xn)(this.fetch,`${this.url}/object/${d}`,o,Object.assign({headers:a},i!=null&&i.duplex?{duplex:i.duplex}:{}));return{data:{path:c,id:f.Id,fullPath:f.Key},error:null}}catch(o){if(vt(o))return{data:null,error:o};throw o}})}upload(e,n,r){return Dt(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,n,r)})}uploadToSignedUrl(e,n,r,s){return Dt(this,void 0,void 0,function*(){const o=this._removeEmptyFolders(e),i=this._getFinalPath(o),a=new URL(this.url+`/object/upload/sign/${i}`);a.searchParams.set("token",n);try{let l;const c=Object.assign({upsert:Gy.upsert},s),d=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",c.cacheControl)):(l=r,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType);const f=yield pp(this.fetch,a.toString(),l,{headers:d});return{data:{path:o,fullPath:f.Key},error:null}}catch(l){if(vt(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(e,n){return Dt(this,void 0,void 0,function*(){try{let r=this._getFinalPath(e);const s=Object.assign({},this.headers);n!=null&&n.upsert&&(s["x-upsert"]="true");const o=yield Xn(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:s}),i=new URL(this.url+o.url),a=i.searchParams.get("token");if(!a)throw new ig("No token returned by API");return{data:{signedUrl:i.toString(),path:e,token:a},error:null}}catch(r){if(vt(r))return{data:null,error:r};throw r}})}update(e,n,r){return Dt(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,n,r)})}move(e,n,r){return Dt(this,void 0,void 0,function*(){try{return{data:yield Xn(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(s){if(vt(s))return{data:null,error:s};throw s}})}copy(e,n,r){return Dt(this,void 0,void 0,function*(){try{return{data:{path:(yield Xn(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(s){if(vt(s))return{data:null,error:s};throw s}})}createSignedUrl(e,n,r){return Dt(this,void 0,void 0,function*(){try{let s=this._getFinalPath(e),o=yield Xn(this.fetch,`${this.url}/object/sign/${s}
345`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return o={signedUrl:encodeURI(`${this.url}${o.signedURL}${i}`)},{data:o,error:null}}catch(s){if(vt(s))return{data:null,error:s};throw s}})}createSignedUrls(e,n,r){return Dt(this,void 0,void 0,function*(){try{const s=yield Xn(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:e},{headers:this.headers}),o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(i=>Object.assign(Object.assign({},i),{signedUrl:i.signedURL?encodeURI(`${this.url}${i.signedURL}${o}`):null})),error:null}}catch(s){if(vt(s))return{data:null,error:s};throw s}})}download(e,n){return Dt(this,void 0,void 0,function*(){const s=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",o=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),i=o?`?${o}`:"";try{const a=this._getFinalPath(e);return{data:yield(yield pu(this.fetch,`${this.url}/${s}/${a}${i}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(vt(a))return{data:null,error:a};throw a}})}info(e){return Dt(this,void 0,void 0,function*(){const n=this._getFinalPath(e);try{const r=yield pu(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:hp(r),error:null}}catch(r){if(vt(r))return{data:null,error:r};throw r}})}exists(e){return Dt(this,void 0,void 0,function*(){const n=this._getFinalPath(e);try{return yield XI(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(vt(r)&&r instanceof fp){const s=r.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:r}}throw r}})}getPublicUrl(e,n){const r=this._getFinalPath(e),s=[],o=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";o!==""&&s.push(o);const a=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});l!==""&&s.push(l);let c=s.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${c}`)}}}remove(e){return Dt(this,void 0,void 0,function*(){try{return{data:yield v_(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(n){if(vt(n))return{data:null,error:n};throw n}})}list(e,n,r){return Dt(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},eO),n),{prefix:e||""});return{data:yield Xn(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},r),error:null}}catch(s){if(vt(s))return{data:null,error:s};throw s}})}listV2(e,n){return Dt(this,void 0,void 0,function*(){try{const r=Object.assign({},e);return{data:yield Xn(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,r,{headers:this.headers},n),error:null}}catch(r){if(vt(r))return{data:null,error:r};throw r}})}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.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const n=[];return e.width&&n.push(`width=${e.width}`),e.height&&n.push(`height=${e.height}`),e.resize&&n.push(`resize=${e.resize}`),e.format&&n.push(`format=${e.format}`),e.quality&&n.push(`quality=${e.quality}`),n.join("&")}}const nO="2.11.0",rO={"X-Client-Info":`storage-js/${nO}`};var bo=function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(d){try{c(r.next(d))}catch(f){i(f)}}function l(d){try{c(r.throw(d))}catch(f){i(f)}}function c(d){d.done?o(d.value):s(d.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};class sO{constructor(e,n={},r,s){const o=new URL(e);s!=null&&s.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase.")),this.url=o.href,this.headers=Object.assign(Object.assign({},rO),n),this.fetch=g_(r)}listBuckets(){return bo(this,void 0,void 0,function*(){try{return{data:yield pu(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(vt(e))return{data:null,error:e};throw e}})}getBucket(e){return bo(this,void 0,void 0,function*(){try{return{data:yield pu(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(n){if(vt(n))return{data:null,error:n};throw n}})}createBucket(e,n={public:!1}){return bo(this,void 0,void 0,function*(){try{return{data:yield Xn(this.fetch,`${this.url}/bucket`,{id:e,name:e,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(vt(r))return{data:null,error:r};throw r}})}updateBucket(e,n){return bo(this,void 0,void 0,function*(){try{return{data:yield pp(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(vt(r))return{data:null,error:r};throw r}})}emptyBucket(e){return bo(this,void 0,void 0,function*(){try{return{data:yield Xn(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(vt(n))return{data:null,error:n};throw n}})}deleteBucket(e){return bo(this,void 0,void 0,function*(){try{return{data:yield v_(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(n){if(vt(n))return{data:null,error:n};throw n}})}}class oO extends sO{constructor(e,n={},r,s){super(e,n,r,s)}from(e){return new tO(this.url,this.headers,e,this.fetch)}}const iO="2.55.0";let ca="";typeof Deno<"u"?ca="deno":typeof document<"u"?ca="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ca="react-native":ca="node";const aO={"X-Client-Info":`supabase-js-${ca}/${iO}`},lO={headers:aO},cO={schema:"public"},uO={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},dO={};var fO=function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}
345return new(n||(n=Promise))(function(o,i){function a(d){try{c(r.next(d))}catch(f){i(f)}}function l(d){try{c(r.throw(d))}catch(f){i(f)}}function c(d){d.done?o(d.value):s(d.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};const hO=t=>{let e;return t?e=t:typeof fetch>"u"?e=n_:e=fetch,(...n)=>e(...n)},pO=()=>typeof Headers>"u"?r_:Headers,mO=(t,e,n)=>{const r=hO(n),s=pO();return(o,i)=>fO(void 0,void 0,void 0,function*(){var a;const l=(a=yield e())!==null&&a!==void 0?a:t;let c=new s(i==null?void 0:i.headers);return c.has("apikey")||c.set("apikey",t),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(o,Object.assign(Object.assign({},i),{headers:c}))})};var gO=function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(d){try{c(r.next(d))}catch(f){i(f)}}function l(d){try{c(r.throw(d))}catch(f){i(f)}}function c(d){d.done?o(d.value):s(d.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};function vO(t){return t.endsWith("/")?t:t+"/"}function yO(t,e){var n,r;const{db:s,auth:o,realtime:i,global:a}=t,{db:l,auth:c,realtime:d,global:f}=e,p={db:Object.assign(Object.assign({},l),s),auth:Object.assign(Object.assign({},c),o),realtime:Object.assign(Object.assign({},d),i),storage:{},global:Object.assign(Object.assign(Object.assign({},f),a),{headers:Object.assign(Object.assign({},(n=f==null?void 0:f.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:()=>gO(this,void 0,void 0,function*(){return""})};return t.accessToken?p.accessToken=t.accessToken:delete p.accessToken,p}const y_="2.71.1",Io=30*1e3,mp=3,jf=mp*Io,wO="http://localhost:9999",xO="supabase.auth.token",bO={"X-Client-Info":`gotrue-js/${y_}`},gp="X-Supabase-Api-Version",w_={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},_O=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,SO=10*60*1e3;class ag extends Error{constructor(e,n,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function we(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class kO extends ag{constructor(e,n,r){super(e,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function CO(t){return we(t)&&t.name==="AuthApiError"}class x_ extends ag{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class Is extends ag{constructor(e,n,r,s){super(e,r,s),this.name=n,this.status=r}}class Wr extends Is{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function EO(t){return we(t)&&t.name==="AuthSessionMissingError"}class uc extends Is{constructor(){super("Auth session or user missing","AuthInvalidToken
345ResponseError",500,void 0)}}class dc extends Is{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class fc extends Is{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function TO(t){return we(t)&&t.name==="AuthImplicitGrantRedirectError"}class Zy extends Is{constructor(e,n=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class vp extends Is{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function Nf(t){return we(t)&&t.name==="AuthRetryableFetchError"}class Yy extends Is{constructor(e,n,r){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class yp extends Is{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const mu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Qy=` 	
346\r=`.split(""),jO=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Qy.length;e+=1)t[Qy[e].charCodeAt(0)]=-2;for(let e=0;e<mu.length;e+=1)t[mu[e].charCodeAt(0)]=e;return t})();function Jy(t,e,n){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(mu[r]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(mu[r]),e.queuedBits-=6}}function b_(t,e,n){const r=jO[t];if(r>-1)for(e.queue=e.queue<<6|r,e.queuedBits+=6;e.queuedBits>=8;)n(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Xy(t){const e=[],n=i=>{e.push(String.fromCodePoint(i))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=i=>{RO(i,r,n)};for(let i=0;i<t.length;i+=1)b_(t.charCodeAt(i),s,o);return e.join("")}function NO(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 PO(t,e){for(let n=0;n<t.length;n+=1){let r=t.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(t.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}NO(r,e)}}function RO(t,e,n){if(e.utf8seq===0){if(t<=127){n(t);return}for(let r=1;r<6;r+=1)if(!(t>>7-r&1)){e.utf8seq=r;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&&n(e.codepoint)}}function AO(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};for(let s=0;s<t.length;s+=1)b_(t.charCodeAt(s),n,r);return new Uint8Array(e)}function IO(t){const e=[];return PO(t,n=>e.push(n)),new Uint8Array(e)}function OO(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};return t.forEach(s=>Jy(s,n,r)),Jy(null,n,r),e.join("")}function MO(t){return Math.round(Date.now()/1e3)+t}function LO(){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 Rn=()=>typeof window<"u"&&typeof document<"u",Bs={tested:!1,writable:!1},__=()=>{if(!Rn())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Bs.tested)return Bs.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Bs.tested=!0,Bs.writable=!0}catch{Bs.tested=!0,Bs.writable=!1}return Bs.writable};function DO(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,o)=>{e[o]=s})}catch{}return n.searchParams.forEach((r,s)=>{e[s]=r}),e}const S_=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>Pl(async()=>{const{default:r}=await Promise.resolve().then(()=>Ui);return{default:r}},void 0).then(({default:r})=>r(...n)):e=fetch,(...n)=>e(...n)},$O=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Oo=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},Vs=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Vr=async(t,e)=>{await t.removeItem(e)};class kd{constructor(){this.promise=new kd.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}kd.promiseConstructor=Promise;function Pf(t){const e=t.split(".");if(e.length!==3)throw new yp("Invalid JWT structure");for(let r=0;r<e.length;r++)if(!_O.test(e[r]))throw new yp("JWT not in base64url format");return{header:JSON.parse(Xy(e[0])),payload:JSON.parse(Xy(e[1])),signature:AO(e[2]),raw:{header:e[0],payload:e[1]}}}async function FO(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function UO(t,e){return new Promise((r,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const i=await t(o);if(!e(o,null,i)){r(i);return}}catch(i){if(!e(o,i)){s(i);return}}})()})}function BO(t){return("0"+t.toString(16)).substr(-2)}function VO(){const e=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let o=0;o<56;o++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(e),Array.from(e,BO).join("")}async function zO(t){const n=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",
346n),s=new Uint8Array(r);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function WO(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 n=await zO(t);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function _o(t,e,n=!1){const r=VO();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await Oo(t,`${e}-code-verifier`,s);const o=await WO(r);return[o,r===o?"plain":"s256"]}const HO=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function qO(t){const e=t.headers.get(gp);if(!e||!e.match(HO))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function KO(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 GO(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 ZO=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function So(t){if(!ZO.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Rf(){const t={};return new Proxy(t,{get:(e,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function e0(t){return JSON.parse(JSON.stringify(t))}var YO=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n};const Hs=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),QO=[502,503,504];async function t0(t){var e;if(!$O(t))throw new vp(Hs(t),0);if(QO.includes(t.status))throw new vp(Hs(t),t.status);let n;try{n=await t.json()}catch(o){throw new x_(Hs(o),o)}let r;const s=qO(t);if(s&&s.getTime()>=w_["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new Yy(Hs(n),t.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(r==="session_not_found")throw new Wr}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((o,i)=>o&&typeof i=="string",!0))throw new Yy(Hs(n),t.status,n.weak_password.reasons);throw new kO(Hs(n),t.status||500,r)}const JO=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function Pe(t,e,n,r){var s;const o=Object.assign({},r==null?void 0:r.headers);o[gp]||(o[gp]=w_["2024-01-01"].name),r!=null&&r.jwt&&(o.Authorization=`Bearer ${r.jwt}`);const i=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(i.redirect_to=r.redirectTo);const a=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",l=await XO(t,e,n+a,{headers:o,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function XO(t,e,n,r,s,o){const i=JO(e,r,s,o);let a;try{a=await t(n,Object.assign({},i))}catch(l){throw console.error(l),new vp(Hs(l),0)}if(a.ok||await t0(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await t0(l)}}function vr(t){var e;let n=null;rM(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=MO(t.expires_in)));const r=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:n,user:r},error:null}}function n0(t){const e=vr(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((n,r)=>n&&typeof r=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Yr(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function eM(t){return{data:t,error:null}}function tM(t){const{action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o}=t,i=YO(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o},l=Object.assign({},i);return{data:{properties:a,user:l},error:null}}function nM(t){return t}function rM(t){return t.access_token&&t.refresh_token&&t.expires_in}const Af=["global","local","others"];var sM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n};class oM{constructor({url:e="",headers:n={},fetch:r}){this.url=e,this.headers=n,this.fetch=S_(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e,n=Af[0]){if(Af.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Af.join(", ")}`);try{return await Pe(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(r){if(we(r))return{data:null,error:r};throw r}}async inviteUserByEmail(e,n={}){try{return await Pe(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Yr})}catch(r){if(we(r))return{data:{user:null},error:r};throw r}}async generateLink(e){try{const{options:n}=e,r=sM(e,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await Pe(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:tM,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(we(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await Pe(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Yr})}catch(n){if(we(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,r,s,o,i,a,l;try{const c={nextPage:null,lastPage:0,total:0},d=await Pe(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(o=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:nM});if(d.error)throw d.error;const f=await d.json(),p=(i=d.headers.get("x-total-count"))!==null&&i!==void 0?i:0,y=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return y.length>0&&(y.forEach(x=>{const v=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(x.split(";")[1].split("=")[1]);c[`${b}Page`]=v}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if(we(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){So(e);try{return await Pe(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Yr})}catch(n){if(we(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){So(e);try{return await Pe(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:Yr})}catch(r){if(we(r))return{data:{user:null},error:r};throw r}}async deleteUser(e,n=!1){So(e);
346try{return await Pe(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:Yr})}catch(r){if(we(r))return{data:{user:null},error:r};throw r}}async _listFactors(e){So(e.userId);try{const{data:n,error:r}=await Pe(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(we(n))return{data:null,error:n};throw n}}async _deleteFactor(e){So(e.userId),So(e.id);try{return{data:await Pe(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if(we(n))return{data:null,error:n};throw n}}}function r0(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}function iM(){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 ko={debug:!!(globalThis&&__()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class k_ extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class aM extends k_{}async function lM(t,e,n){ko.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const r=new globalThis.AbortController;return e>0&&setTimeout(()=>{r.abort(),ko.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:r.signal},async s=>{if(s){ko.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,s.name);try{return await n()}finally{ko.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,s.name)}}else{if(e===0)throw ko.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new aM(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(ko.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}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 n()}}))}iM();const cM={url:wO,storageKey:xO,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:bO,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function s0(t,e,n){return await n()}const Co={};class nl{constructor(e){var n,r;this.userStorage=null,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=nl.nextInstanceID,nl.nextInstanceID+=1,this.instanceID>0&&Rn()&&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 s=Object.assign(Object.assign({},cM),e);if(this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.persistSession=s.persistSession,this.storageKey=s.storageKey,this.autoRefreshToken=s.autoRefreshToken,this.admin=new oM({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=S_(s.fetch),this.lock=s.lock||s0,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,s.lock?this.lock=s.lock:Rn()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=lM:this.lock=s0,this.jwks||(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?(s.storage?this.storage=s.storage:__()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=r0(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=r0(this.memoryStorage)),Rn()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}get jwks(){var e,n;return(n=(e=Co[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(e){Co[this.storageKey]=Object.assign(Object.assign({},Co[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,n;return(n=(e=Co[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Co[this.storageKey]=Object.assign(Object.assign({},Co[this.storageKey]),{cachedAt:e})}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${y_}) ${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 n=DO(window.location.href);let r="none";if(this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce"),Rn()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:o}=await this._getSessionFromURL(n,r);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),TO(o)){const l=(e=o.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:o}}return await this._removeSession(),{error:o}}const{session:i,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",i,"redirect type",a),await this._saveSession(i),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return we(n)?{error:n}:{error:new x_("Unexpected error during initialization",n)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,r,s;try{const o=await Pe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:vr}),{data:i,error:a}=o;if(a||!i)return{data:{user:null,session:null},error:a};const l=i.session,c=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(o){if(we(o))return{data:{user:null,session:null},error:o};throw o}}async signUp(e){var n,r,s;try{let o;if("email"in e){const{email:d,password:f,options:p}=e;let y=null,x=null;this.flowType==="pkce"&&([y,x]=await _o(this.storage,this.storageKey)),o=await Pe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:d,password:f,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:y,code_challenge_method:x},xform:vr})}else if("phone"in e){const{phone:d,password:f,options:p}=e;o=await Pe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:f,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},channel:(s=p==null?void 0:p.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:vr})}else throw new dc("You must provide either an email or phone number and a password");const{data:i,error:a}=o;if(a||!i)return{data:{user:null,session:null},error:a};const l=i.session,c=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(o){if(we(o))return{data:{user:null,session:null},error:o};throw o}}async signInWithPassword(e){try{let n;if("email"in e){const{email:o,password:i,options:a}=e;n=await Pe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:n0})}else if("phone"in e){const{phone:o,password:i,options:a}=e;n=await Pe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:n0})}else throw new dc("You must provide either an email or phone number and a password");const{data:r,error:s}=n;return s?{data:{user:null,session:null},error:s}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new uc}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(we(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(e){var n,r,s,o;return await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=e.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:n}=e;if(n==="solana")return await this.signInWithSolana(e);throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}async signInWithSolana(e){var n,r,s,o,i,a,l,c,d,f,p,y;let x,v;if("message"in e)x=e.message,v=e.signature;else{const{chain:b,wallet:g,statement:m,options:w}=e;let _;if(Rn())if(typeof g=="object")_=g;else{const C=window;if("solana"in C&&typeof C.solana=="object"&&("signIn"in C.solana&&typeof C.solana.signIn=="function"||"signMessage"in C.solana&&typeof C.solana.signMessage=="function"))_=C.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"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=g}const S=new URL((n=w==null?void 0:w.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in _&&_.signIn){const C=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),m?{statement:m}:null));let k;if(Array.isArray(C)&&C[0]&&typeof C[0]=="object")k=C[0];else if(C&&typeof C=="object"&&"signedMessage"in C&&"signature"in C)k=C;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in k&&"signature"in k&&(typeof k.signedMessage=="string"||k.signedMessage instanceof Uint8Array)&&k.signature instanceof Uint8Array)x=typeof k.signedMessage=="string"?k.signedMessage:new TextDecoder().decode(k.signedMessage),v=k.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");x=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(r=w==null?void 0:w.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((f=(d=w==null?void 0:w.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||f===void 0)&&f.length?["Resources",...w.sign
346InWithSolana.resources.map(k=>`- ${k}`)]:[]].join(`
347`);const C=await _.signMessage(new TextEncoder().encode(x),"utf8");if(!C||!(C instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");v=C}}try{const{data:b,error:g}=await Pe(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:x,signature:OO(v)},!((p=e.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(y=e.options)===null||y===void 0?void 0:y.captchaToken}}:null),xform:vr});if(g)throw g;return!b||!b.session||!b.user?{data:{user:null,session:null},error:new uc}:(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),{data:Object.assign({},b),error:g})}catch(b){if(we(b))return{data:{user:null,session:null},error:b};throw b}}async _exchangeCodeForSession(e){const n=await Vs(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{const{data:o,error:i}=await Pe(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:vr});if(await Vr(this.storage,`${this.storageKey}-code-verifier`),i)throw i;return!o||!o.session||!o.user?{data:{user:null,session:null,redirectType:null},error:new uc}:(o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),{data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:i})}catch(o){if(we(o))return{data:{user:null,session:null,redirectType:null},error:o};throw o}}async signInWithIdToken(e){try{const{options:n,provider:r,token:s,access_token:o,nonce:i}=e,a=await Pe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:o,nonce:i,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:vr}),{data:l,error:c}=a;return c?{data:{user:null,session:null},error:c}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new uc}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:c})}catch(n){if(we(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(e){var n,r,s,o,i;try{if("email"in e){const{email:a,options:l}=e;let c=null,d=null;this.flowType==="pkce"&&([c,d]=await _o(this.storage,this.storageKey));const{error:f}=await Pe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,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:c,error:d}=await Pe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(o=l==null?void 0:l.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(i=l==null?void 0:l.channel)!==null&&i!==void 0?i:"sms"}});return{data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:d}}throw new dc("You must provide either an email or phone number.")}catch(a){if(we(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(e){var n,r;try{let s,o;"options"in e&&(s=(n=e.options)===null||n===void 0?void 0:n.redirectTo,o=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:i,error:a}=await Pe(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:vr});if(a)throw a;if(!i)throw new Error("An error occurred on token verification.");const l=i.session,c=i.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(s){if(we(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithSSO(e){var n,r,s;try{let o=null,i=null;return this.flowType==="pkce"&&([o,i]=await _o(this.storage,this.storageKey)),await Pe(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:(r=(n=e.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}
347:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:i}),headers:this.headers,xform:eM})}catch(o){if(we(o))return{data:null,error:o};throw o}}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:n},error:r}=e;if(r)throw r;if(!n)throw new Wr;const{error:s}=await Pe(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:s}})}catch(e){if(we(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{const n=`${this.url}/resend`;if("email"in e){const{email:r,type:s,options:o}=e,{error:i}=await Pe(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return{data:{user:null,session:null},error:i}}else if("phone"in e){const{phone:r,type:s,options:o}=e,{data:i,error:a}=await Pe(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return{data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:a}}throw new dc("You must provide either an email or phone number and a type")}catch(n){if(we(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(e,n){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}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 n=await this.__loadSession();return await e(n)}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 n=await Vs(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at*1e3-Date.now()<jf:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.userStorage){const i=await Vs(this.userStorage,this.storageKey+"-user");i!=null&&i.user?e.user=i.user:e.user=Rf()}if(this.storage.isServer&&e.user){let i=this.suppressGetSessionWarning;e=new Proxy(e,{get:(l,c,d)=>(!i&&c==="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."),i=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,c,d))})}return{data:{session:e},error:null}}const{session:s,error:o}=await this._callRefreshToken(e.refresh_token);return o?{data:{session:null},error:o}:{data:{session:s},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 Pe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Yr}):await this._useSession(async n=>{var r,s,o;const{data:i,error:a}=n;
347if(a)throw a;return!(!((r=i.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Wr}:await Pe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:Yr})})}catch(n){if(we(n))return EO(n)&&(await this._removeSession(),await Vr(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:n};throw n}}async updateUser(e,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,n))}async _updateUser(e,n={}){try{return await this._useSession(async r=>{const{data:s,error:o}=r;if(o)throw o;if(!s.session)throw new Wr;const i=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await _o(this.storage,this.storageKey));const{data:c,error:d}=await Pe(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:i.access_token,xform:Yr});if(d)throw d;return i.user=c.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),{data:{user:i.user},error:null}})}catch(r){if(we(r))return{data:{user:null},error:r};throw r}}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 Wr;
347const n=Date.now()/1e3;let r=n,s=!0,o=null;const{payload:i}=Pf(e.access_token);if(i.exp&&(r=i.exp,s=r<=n),s){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};o=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)throw l;o={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return{data:{user:o.user,session:o},error:null}}catch(n){if(we(n))return{data:{session:null,user:null},error:n};throw n}}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 n=>{var r;if(!e){const{data:i,error:a}=n;if(a)throw a;e=(r=i.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new Wr;const{session:s,error:o}=await this._callRefreshToken(e.refresh_token);return o?{data:{user:null,session:null},error:o}:s?{data:{user:s.user,session:s},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(we(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(e,n){try{if(!Rn())throw new fc("No browser detected.");if(e.error||e.error_description||e.error_code)throw new fc(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Zy("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new fc("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Zy("No code detected.");const{data:m,error:w}=await this._exchangeCodeForSession(e.code);if(w)throw w;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:m.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:o,refresh_token:i,expires_in:a,expires_at:l,token_type:c}=e;if(!o||!a||!i||!c)throw new fc("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(a);let p=d+f;l&&(p=parseInt(l));const y=p-d;y*1e3<=Io&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${y}s, should have been closer to ${f}s`);const x=p-f;d-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,p,d):d-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,p,d);const{data:v,error:b}=await this._getUser(o);if(b)throw b;const g={provider_token:r,provider_refresh_token:s,access_token:o,expires_in:f,expires_at:p,refresh_token:i,token_type:c,user:v.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:g,redirectType:e.type},error:null}}catch(r){if(we(r))return{data:{session:null,redirectType:null},error:r};throw r}}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}async _isPKCECallback(e){const n=await Vs(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&n)}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 n=>{var r;const{data:s,error:o}=n;if(o)return{error:o};const i=(r=s.session)===null||r===void 0?void 0:r.access_token;if(i){const{error:a}=await this.admin.signOut(i,e);if(a&&!(CO(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return e!=="others"&&(await this._removeSession(),await Vr(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(e){const n=LO(),r={id:n,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(e){return await this._useSession(async n=>{var r,s;try{const{data:{session:o},error:i}=n;if(i)throw i;await((r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",e,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",o),console.error(o)}})}async resetPasswordForEmail(e,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await _o(this.storage,this.storageKey,!0));try{return await Pe(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(o){if(we(o))return{data:null,error:o};throw o}}async getUserIdentities(){var e;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(n){if(we(n))return{data:null,error:n};throw n}}async linkIdentity(e){var n;try{const{data:r,error:s}=await this._useSession(async o=>{var i,a,l,c,d;const{data:f,error:p}=o;if(p)throw p;const y=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(i=e.options)===null||i===void 0?void 0:i.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 Pe(this.fetch,"GET",y,{headers:this.headers,jwt:(d=(c=f.session)===null||c===void 0?void 0:c.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return Rn()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:e.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(we(r))return{data:{provider:e.provider,url:null},error:r};throw r}}async unlinkIdentity(e){try{return await this._useSession(async n=>{var r,s;const{data:o,error:i}=n;if(i)throw i;
347return await Pe(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(r=o.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(we(n))return{data:null,error:n};throw n}}async _refreshAccessToken(e){const n=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await UO(async s=>(s>0&&await FO(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await Pe(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:vr})),(s,o)=>{const i=200*Math.pow(2,s);return o&&Nf(o)&&Date.now()+i-r<Io})}catch(r){if(this._debug(n,"error",r),we(r))return{data:{session:null,user:null},error:r};throw r}finally{this._debug(n,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",n,"url",r),Rn()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r},error:null}}async _recoverAndRefresh(){var e,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await Vs(this.storage,this.storageKey);if(s&&this.userStorage){let i=await Vs(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:s.user},await Oo(this.userStorage,this.storageKey+"-user",i)),s.user=(e=i==null?void 0:i.user)!==null&&e!==void 0?e:Rf()}else if(s&&!s.user&&!s.user){const i=await Vs(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(s.user=i.user,await Vr(this.storage,this.storageKey+"-user"),await Oo(this.storage,this.storageKey,s)):s.user=Rf()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const o=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<jf;if(this._debug(r,`session has${o?"":" not"} expired with margin of ${jf}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:i}=await this._callRefreshToken(s.refresh_token);i&&(console.error(i),Nf(i)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",i),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:i,error:a}=await this._getUser(s.access_token);!a&&(i!=null&&i.user)?(s.user=i.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(i){console.error("Error getting user data:",i),this._debug(r,"error getting user data, skipping SIGNED_IN notification",i)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(e){var n,r;if(!e)throw new Wr;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new kd;const{data:o,error:i}=await this._refreshAccessToken(e);if(i)throw i;if(!o.session)throw new Wr;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const a={session:o.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(o){if(this._debug(s,"error",o),we(o)){const i={session:null,error:o};return Nf(o)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(i),i}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,n,r=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:n});const o=[],i=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,n)}catch(l){o.push(l)}});if(await Promise.all(i),o.length>0){for(let a=0;a<o.length;a+=1)console.error(o[a]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const n=Object.assign({},e),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Oo(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const o=e0(s);await Oo(this.storage,this.storageKey,o)}else{const s=e0(n);await Oo(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),await Vr(this.storage,this.storageKey),await Vr(this.storage,this.storageKey+"-code-verifier"),await Vr(this.storage,this.storageKey+"-user"),this.userStorage&&await Vr(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Rn()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
347catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Io);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 n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-e)/Io);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Io}ms, refresh threshold is ${mp} ticks`),s<=mp&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof k_)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Rn()||!(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 n=`#_onVisibilityChanged(${e})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"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,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[o,i]=await _o(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(i)}`});s.push(a.toString())}if(r!=null&&r.queryParams){const o=new URLSearchParams(r.queryParams);s.push(o.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;return o?{data:null,error:o}:await Pe(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(we(n))return{data:null,error:n};throw n}}async _enroll(e){try{return await this._useSession(async n=>{var r,s;const{data:o,error:i}=n;if(i)return{data:null,error:i};const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:{issuer:e.issuer}),{data:l,error:c}=await Pe(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=o==null?void 0:o.session)===null||r===void 0?void 0:r.access_token});return c?{data:null,error:c}:(e.factorType==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})})}catch(n){if(we(n))return{data:null,error:n};throw n}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;
347if(o)return{data:null,error:o};const{data:i,error:a}=await Pe(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+i.expires_in},i)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",i),{data:i,error:a})})}catch(n){if(we(n))return{data:null,error:n};throw n}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;return o?{data:null,error:o}:await Pe(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(we(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(e){const{data:n,error:r}=await this._challenge({factorId:e.factorId});return r?{data:null,error:r}:await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){const{data:{user:e},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(e==null?void 0:e.factors)||[],s=r.filter(i=>i.factor_type==="totp"&&i.status==="verified"),o=r.filter(i=>i.factor_type==="phone"&&i.status==="verified");return{data:{all:r,totp:s,phone:o},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var n,r;const{data:{session:s},error:o}=e;if(o)return{data:null,error:o};if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:i}=Pf(s.access_token);let a=null;i.aal&&(a=i.aal);let l=a;((r=(n=s.user.factors)===null||n===void 0?void 0:n.filter(f=>f.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const d=i.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:d},error:null}}))}async fetchJwk(e,n={keys:[]}){let r=n.keys.find(a=>a.kid===e);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===e),r&&this.jwks_cached_at+SO>s)return r;const{data:o,error:i}=await Pe(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(i)throw i;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=s,r=o.keys.find(a=>a.kid===e),!r)?null:r}async getClaims(e,n={}){try{let r=e;if(!r){const{data:y,error:x}
347=await this.getSession();if(x||!y.session)return{data:null,error:x};r=y.session.access_token}const{header:s,payload:o,signature:i,raw:{header:a,payload:l}}=Pf(r);n!=null&&n.allowExpired||KO(o.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:y}=await this.getUser(r);if(y)throw y;return{data:{claims:o,header:s,signature:i},error:null}}const d=GO(s.alg),f=await crypto.subtle.importKey("jwk",c,d,!0,["verify"]);if(!await crypto.subtle.verify(d,f,i,IO(`${a}.${l}`)))throw new yp("Invalid JWT signature");return{data:{claims:o,header:s,signature:i},error:null}}catch(r){if(we(r))return{data:null,error:r};throw r}}}nl.nextInstanceID=0;const uM=nl;class dM extends uM{constructor(e){super(e)}}var fM=function(t,e,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(d){try{c(r.next(d))}catch(f){i(f)}}function l(d){try{c(r.throw(d))}catch(f){i(f)}}function c(d){d.done?o(d.value):s(d.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};class hM{constructor(e,n,r){var s,o,i;if(this.supabaseUrl=e,this.supabaseKey=n,!e)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const a=vO(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 c=`sb-${l.hostname.split(".")[0]}-auth-token`,d={db:cO,realtime:dO,auth:Object.assign(Object.assign({},uO),{storageKey:c}),global:lO},f=yO(r??{},d);this.storageKey=(s=f.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(o=f.global.headers)!==null&&o!==void 0?o:{},f.accessToken?(this.accessToken=f.accessToken,this.auth=new Proxy({},{get:(p,y)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(y)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((i=f.auth)!==null&&i!==void 0?i:{},this.headers,f.global.fetch),this.fetch=mO(n,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 NI(new URL("rest/v1",l).href,{headers:this.headers,schema:f.db.schema,fetch:this.fetch}),this.storage=new oO(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),f.accessToken||this._listenForAuthEvents()}get functions(){return new oI(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,n={},r={}){return this.rest.rpc(e,n,r)}channel(e,n={config:{}}){return this.realtime.channel(e,n)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,n;return fM(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:r}=yield this.auth.getSession();return(n=(e=r.session)===null||e===void 0?void 0:e.access_token)!==null&&n!==void 0?n:this.supabaseKey})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:n,detectSessionInUrl:r,storage:s,storageKey:o,flowType:i,lock:a,debug:l},c,d){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new dM({url:this.authUrl.href,headers:Object.assign(Object.assign({},f),c),storageKey:o,autoRefreshToken:e,persistSession:n,detectSessionInUrl:r,storage:s,flowType:i,lock:a,debug:l,fetch:d,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(e){return new qI(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((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(e,n,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?this.changedAccessToken=r:e==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const pM=(t,e,n)=>new hM(t,e,n);function mM(){if(typeof window<"u"||typeof process>"u")return!1;const t=process.version;if(t==null)return!1;const e=t.match(/^v(\d+)\./);return e?parseInt(e[1],10)<=18:!1}mM()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
347ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const gM="https://fhsjhoygllcchfinalih.supabase.co",vM="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZoc2pob3lnbGxjY2hmaW5hbGloIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDgwMjE4MzcsImV4cCI6MjA2MzU5NzgzN30.2TEzTNMYMcVuBoC9t1zdkjZ66FosDzO-byE6WylI9Gg",wp=pM(gM,vM),yM=({onTranscription:t,isVoiceEnabled:e,autoPlayResponses:n})=>{const[r,s]=h.useState(!1),[o,i]=h.useState(!1),[a,l]=h.useState(0),[c,d]=h.useState(!1),[f,p]=h.useState(!1),[y,x]=h.useState("bark"),v=h.useRef(null),b=h.useRef([]),g=h.useRef(null),m=h.useRef(null),w=h.useRef(null),_=h.useRef(null);if(!e)return{isRecording:!1,isProcessing:!1,recordingTimer:0,isSpeaking:!1,voicePermissionDenied:!1,selectedVoice:"bark",startRecording:()=>{},stopRecording:()=>{},speakText:()=>{},stopSpeaking:()=>{},setSelectedVoice:()=>{}};h.useEffect(()=>{if(typeof window<"u"&&("webkitSpeechRecognition"in window||"SpeechRecognition"in window)){const M=window.webkitSpeechRecognition||window.SpeechRecognition;g.current=new M,g.current.continuous=!1,g.current.interimResults=!0,g.current.lang="en-US",g.current.onresult=A=>{const z=Array.from(A.results).map(B=>B[0]).map(B=>B.transcript).join("");A.results[A.results.length-1].isFinal&&(t(z),T())},g.current.onerror=A=>{console.error("Speech recognition error:",A.error),A.error==="not-allowed"&&p(!0),T()},g.current.onend=()=>{i(!1)}}},[t]);const S=h.useCallback(()=>{l(0),m.current=setInterval(()=>{l(M=>M>=14?(T(),0):M+1)},1e3)},[]),C=h.useCallback(()=>{m.current&&(clearInterval(m.current),m.current=null),l(0)},[]),k=h.useCallback(async()=>{if(!(!e||f))try{const M=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});w.current=M,p(!1),s(!0),b.current=[],S(),g.current?(i(!0),g.current.start()):(v.current=new MediaRecorder(M,{mimeType:"audio/webm;codecs=opus"}),v.current.ondataavailable=A=>{A.data.size>0&&b.current.push(A.data)},v.current.onstop=async()=>{i(!0);const A=new Blob(b.current,{type:"audio/webm"});await I(A)},v.current.start())}catch(M){console.error("Error accessing microphone:",M),p(!0),s(!1)}},[e,f,S]),T=h.useCallback(()=>{if(e){if(s(!1),C(),g.current)try{g.current.stop()}catch{console.log("Speech recognition already stopped")}v.current&&v.current.state==="recording"&&v.current.stop(),w.current&&(w.current.getTracks().forEach(M=>M.stop()),w.current=null)}},[C]),I=async M=>{try{const A=await M.arrayBuffer(),z=btoa(String.fromCharCode(...new Uint8Array(A)));console.log("Would transcribe audio with Whisper API"),i(!1)}catch(A){console.error("Error transcribing audio:",A),i(!1)}},P=h.useCallback(async M=>{if(!(!e||!n||!M.trim())){R(),d(!0);try{console.log("Generating TTS with Together AI...");const{data:A,error:z}=await wp.functions.invoke("together-tts",{body:{text:M.trim(),voice:y}});if(z){console.error("TTS error:",z),D(M);return}if(A!=null&&A.audioContent){const B=Uint8Array.from(atob(A.audioContent),Y=>Y.charCodeAt(0)),G=new Blob([B],{type:"audio/wav"}),j=URL.createObjectURL(G),U=new Audio(j);_.current=U,U.onloadeddata=()=>{console.log("Audio loaded, playing..."),U.play().catch(Y=>{console.error("Error playing audio:",Y),d(!1)})},U.onended=()=>{d(!1),URL.revokeObjectURL(j),_.current=null},U.onerror=()=>{console.error("Audio playback error"),d(!1),URL.revokeObjectURL(j),_.current=null,D(M)}}else throw new Error("No audio content received")}catch(A){console.error("Error with Together AI TTS:",A),D(M)}}},[e,n,y]),D=h.useCallback(M=>{if(!e||typeof window>"u"||!window.speechSynthesis){d(!1);return}console.log("Using browser TTS fallback"),window.speechSynthesis.cancel();const A=new SpeechSynthesisUtterance(M);A.rate=.9,A.pitch=1,A.volume=.8;const B=window.speechSynthesis.getVoices().find(G=>G.name.includes("Natural")||G.name.includes("Enhanced")||G.name.includes("Premium"));B&&(A.voice=B),A.onstart=()=>d(!0),A.onend=()=>d(!1),A.onerror=()=>d(!1),window.speechSynthesis.speak(A)},[e]),R=h.useCallback(()=>{_.current&&(_.current.pause(),_.current=null),typeof window<"u"&&window.speechSynthesis&&window.speechSynthesis.cancel(),d(!1)},[e]);return h.useEffect(()=>()=>
347{C(),w.current&&w.current.getTracks().forEach(M=>M.stop()),R()},[C,R]),{isRecording:r,isProcessing:o,recordingTimer:a,isSpeaking:c,voicePermissionDenied:f,selectedVoice:y,startRecording:k,stopRecording:T,speakText:P,stopSpeaking:R,setSelectedVoice:x}},wM=({isRecording:t,isProcessing:e,recordingTimer:n,isSpeaking:r,voicePermissionDenied:s,isVoiceEnabled:o,onStartRecording:i,onStopRecording:a,onToggleVoice:l,onStopSpeaking:c,primaryColor:d})=>u.jsxs("div",{className:"voice-controls",style:{display:"flex",alignItems:"center",gap:"8px"},children:[u.jsx("button",{onClick:l,className:"chatbot-widget-button",style:{color:o?d:"#9ca3af",padding:"6px"},title:o?"Voice enabled":"Voice disabled",children:o?u.jsx(Vm,{size:16}):u.jsx(cy,{size:16})}),o&&!s&&u.jsxs(u.Fragment,{children:[!t&&!e&&!r&&u.jsx("button",{onClick:i,className:"chatbot-widget-voice-button",style:{backgroundColor:d,color:"white",border:"none",borderRadius:"50%",width:"36px",height:"36px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.2s ease",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},onMouseEnter:f=>{f.currentTarget.style.transform="scale(1.05)"},onMouseLeave:f=>{f.currentTarget.style.transform="scale(1)"},title:"Click to start voice recording",children:u.jsx(od,{size:18})}),(t||e)&&u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[u.jsx("button",{onClick:a,className:"chatbot-widget-voice-button",style:{backgroundColor:"#ef4444",color:"white",border:"none",borderRadius:"50%",width:"36px",height:"36px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",animation:t?"chatbot-pulse 1.5s infinite":"none"},title:"Click to stop recording",children:e?u.jsx(O2,{size:14}):u.jsx(Ub,{size:18})}),t&&u.jsxs("div",{style:{fontSize:"12px",color:"#ef4444",fontWeight:"600",minWidth:"30px"},children:[Math.max(0,15-n),"s"]}),e&&u.jsx("div",{style:{fontSize:"12px",color:d,fontWeight:"500"},children:"Processing..."})]}),r&&u.jsx("button",{onClick:c,className:"chatbot-widget-voice-button",style:{backgroundColor:d,color:"white",border:"none",borderRadius:"50%",width:"36px",height:"36px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",animation:"chatbot-pulse 2s infinite"},title:"Click to stop speaking",children:u.jsx(cy,{size:18})})]}),s&&u.jsx("div",{style:{fontSize:"11px",color:"#ef4444",fontWeight:"500",maxWidth:"120px",lineHeight:"1.2"},children:"Mic access denied"})]}),xM=({selectedVoice:t,onVoiceChange:e,autoPlayResponses:n,onAutoPlayToggle:r,primaryColor:s})=>{const[o,i]=h.useState(!1),[a,l]=h.useState(!1),c=h.useRef(null),d=h.useRef(null),f=()=>document.querySelector('[data-state="open"]')!==null||document.querySelector(".dialog-overlay")!==null||document.querySelector('[role="dialog"]')!==null,p=()=>{f()||(c.current&&clearTimeout(c.current),i(!0),c.current=setTimeout(()=>{i(!1)},15e3))},y=()=>{f()||(d.current&&clearTimeout(d.current),l(!0),d.current=setTimeout(()=>{l(!1)},15e3))},x=()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{i(!1)},15e3)},v=()=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{l(!1)},15e3)};return h.useEffect(()=>{const b=()=>{f()&&(i(!1),l(!1),c.current&&clearTimeout(c.current),d.current&&clearTimeout(d.current))},g=new MutationObserver(b);return g.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-state","role"]}),()=>{g.disconnect(),c.current&&clearTimeout(c.current),d.current&&clearTimeout(d.current)}},[]),u.jsxs("div",{className:"flex items-center gap-2 p-2 border-t border-gray-200",children:[u.jsx(np,{children:u.jsxs(ky,{open:o,children:[u.jsx(Cy,{asChild:!0,children:u.jsx("button",{onClick:r,onMouseEnter:p,onMouseLeave:x,onFocus:p,onBlur:x,className:`p-1.5 rounded transition-colors ${n?"text-white":"text-gray-400 hover:text-gray-600"}`,style:{backgroundColor:n?s:"transparent"},children:u.jsx(Vm,{size:14})})}),u.jsx(rp,{children:u.jsxs("p",{children:[n?"Disable":"Enable"," auto-play responses"]})})]})}),u.jsxs("select",{value:t,onChange:b=>e(b.target.value),className:"text-xs border border-gray-300 rounded px-2 py-1 bg-white",children:[u.jsx("option",{value:"bark",children:"Bark (Fast & Natural)"}),u.jsx("option",{value:"tortoise",children:"Tortoise (High Quality)"})]}),u.jsx(np,{children:u.jsxs(ky,{open:a,children:[u.jsx(Cy,{asChild:!0,children:u.jsx("div",{onMouseEnter:y,onMouseLeave:v,onFocus:y,onBlur:v,tabIndex:0,children:u.jsx(id,{size:12,className:"text-gray-400"})})}),u.jsx(rp,{children:u.jsx("p",{children:"Voice powered by Together AI"})})]})})]})};function gu(){return gu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},gu.apply(null,arguments)}function bM(t){const e=new Uint8Array(t);return window.btoa(String.fromCharCode(...e))}function _M(t){const e=window.atob(t),n=e.length,r=new Uint8Array(n);for(let s=0;s<n;s++)r[s]=e.charCodeAt(s);return r.buffer}const If=new Map;function C_(t,e){return async n=>{const r=If.get(t);if(r)return n.addModule(r);const s=new Blob([e],{type:"application/javascript"}),o=URL.createObjectURL(s);try{return await n.addModule(o),void If.set(t,o)}catch{URL.revokeObjectURL(o)}try{const i=`data:application/javascript;base64,${btoa(e)}`;await n.addModule(i),If.set(t,i)}catch{throw new Error(`Failed to load the ${t} worklet module. Make sure the browser supports AudioWorklets.`)}}}const SM=C_("raw-audio-processor",`
348const BIAS = 0x84;
349const CLIP = 32635;
350const encodeTable = [
351  0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,
352  4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
353  5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
354  5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
355  6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
356  6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
357  6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
358  6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
359  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
360  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
361  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
362  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
363  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
364  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
365  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
366  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
367];
368
369function encodeSample(sample) {
370  let sign;
371  let exponent;
372  let mantissa;
373  let muLawSample;
374  sign = (sample >> 8) & 0x80;
375  if (sign !== 0) sample = -sample;
376  sample = sample + BIAS;
377  if (sample > CLIP) sample = CLIP;
378  exponent = encodeTable[(sample>>7) & 0xFF];
379  mantissa = (sample >> (exponent+3)) & 0x0F;
380  muLawSample = ~(sign | (exponent << 4) | mantissa);
381  
382  return muLawSample;
383}
384
385class RawAudioProcessor extends AudioWorkletProcessor {
386  constructor() {
387    super();
388              
389    this.port.onmessage = ({ data }) => {
390      switch (data.type) {
391        case "setFormat":
392          this.isMuted = false;
393          this.buffer = []; // Initialize an empty buffer
394          this.bufferSize = data.sampleRate / 4;
395          this.format = data.format;
396
397          if (globalThis.LibSampleRate && sampleRate !== data.sampleRate) {
398            globalThis.LibSampleRate.create(1, sampleRate, data.sampleRate).then(resampler => {
399              this.resampler = resampler;
400            });
401          }
402          break;
403        case "setMuted":
404          this.isMuted = data.isMuted;
405          break;
406      }
407    };
408  }
409  process(inputs) {
410    if (!this.buffer) {
411      return true;
412    }
413    
414    const input = inputs[0]; // Get the first input node
415    if (input.length > 0) {
416      let channelData = input[0]; // Get the first channel's data
417
418      // Resample the audio if necessary
419      if (this.resampler) {
420        channelData = this.resampler.full(channelData);
421      }
422
423      // Add channel data to the buffer
424      this.buffer.push(...channelData);
425      // Get max volume 
426      let sum = 0.0;
427      for (let i = 0; i < channelData.length; i++) {
428        sum += channelData[i] * channelData[i];
429      }
430      const maxVolume = Math.sqrt(sum / channelData.length);
431      // Check if buffer size has reached or exceeded the threshold
432      if (this.buffer.length >= this.bufferSize) {
433        const float32Array = this.isMuted 
434          ? new Float32Array(this.buffer.length)
435          : new Float32Array(this.buffer);
436
437        let encodedArray = this.format === "ulaw"
438          ? new Uint8Array(float32Array.length)
439          : new Int16Array(float32Array.length);
440
441        // Iterate through the Float32Array and convert each sample to PCM16
442        for (let i = 0; i < float32Array.length; i++) {
443          // Clamp the value to the range [-1, 1]
444          let sample = Math.max(-1, Math.min(1, float32Array[i]));
445
446          // Scale the sample to the range [-32768, 32767]
447          let value = sample < 0 ? sample * 32768 : sample * 32767;
448          if (this.format === "ulaw") {
449            value = encodeSample(Math.round(value));
450          }
451
452          encodedArray[i] = value;
453        }
454
455        // Send the buffered data to the main script
456        this.port.postMessage([encodedArray, maxVolume]);
457
458        // Clear the buffer after sending
459        this.buffer = [];
460      }
461    }
462    return true; // Continue processing
463  }
464}
465registerProcessor("raw-audio-processor", RawAudioProcessor);
466`);function E_(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}let kM=class T_{static async create({sampleRate:e,format:n,preferHeadphonesForIosDevices:r}){let s=null,o=null;try{const l={sampleRate:{ideal:e},echoCancellation:{ideal:!0},noiseSuppression:{ideal:!0}};if(E_()&&r){const y=(await window.navigator.mediaDevices.enumerateDevices()).find(x=>x.kind==="audioinput"&&["airpod","headphone","earphone"].find(v=>x.label.toLowerCase().includes(v)));y&&(l.deviceId={ideal:y.deviceId})}const c=navigator.mediaDevices.getSupportedConstraints().sampleRate;s=new window.AudioContext(c?{sampleRate:e}:{});const d=s.createAnalyser();c||await s.audioWorklet.addModule("https://cdn.jsdelivr.net/npm/@alexanderolsen/[email protected]/dist/libsamplerate.worklet.js"),await SM(s.audioWorklet),o=await navigator.mediaDevices.getUserMedia({audio:l});const f=s.createMediaStreamSource(o),p=new AudioWorkletNode(s,"raw-audio-processor");return p.port.postMessage({type:"setFormat",format:n,sampleRate:e}),f.connect(d),d.connect(p),await s.resume(),new T_(s,d,p,o)}catch(l){var i,a;throw(i=o)==null||i.getTracks().forEach(c=>c.stop()),(a=s)==null||a.close(),l}}constructor(e,n,r,s){this.context=void 0,this.analyser=void 0,this.worklet=void 0,this.inputStream=void 0,this.context=e,this.analyser=n,this.worklet=r,this.inputStream=s}async close(){this.inputStream.getTracks().forEach(e=>e.stop()),await this.context.close()}setMuted(e){this.worklet.port.postMessage({type:"setMuted",isMuted:e})}};const CM=C_("audio-concat-processor",`
467const decodeTable = [0,132,396,924,1980,4092,8316,16764];
468
469export function decodeSample(muLawSample) {
470  let sign;
471  let exponent;
472  let mantissa;
473  let sample;
474  muLawSample = ~muLawSample;
475  sign = (muLawSample & 0x80);
476  exponent = (muLawSample >> 4) & 0x07;
477  mantissa = muLawSample & 0x0F;
478  sample = decodeTable[exponent] + (mantissa << (exponent+3));
479  if (sign !== 0) sample = -sample;
480
481  return sample;
482}
483
484class AudioConcatProcessor extends AudioWorkletProcessor {
485  constructor() {
486    super();
487    this.buffers = []; // Initialize an empty buffer
488    this.cursor = 0;
489    this.currentBuffer = null;
490    this.wasInterrupted = false;
491    this.finished = false;
492    
493    this.port.onmessage = ({ data }) => {
494      switch (data.type) {
495        case "setFormat":
496          this.format = data.format;
497          break;
498        case "buffer":
499          this.wasInterrupted = false;
500          this.buffers.push(
501            this.format === "ulaw"
502              ? new Uint8Array(data.buffer)
503              : new Int16Array(data.buffer)
504          );
505          break;
506        case "interrupt":
507          this.wasInterrupted = true;
508          break;
509        case "clearInterrupted":
510          if (this.wasInterrupted) {
511            this.wasInterrupted = false;
512            this.buffers = [];
513            this.currentBuffer = null;
514          }
515      }
516    };
517  }
518  process(_, outputs) {
519    let finished = false;
520    const output = outputs[0][0];
521    for (let i = 0; i < output.length; i++) {
522      if (!this.currentBuffer) {
523        if (this.buffers.length === 0) {
524          finished = true;
525          break;
526        }
527        this.currentBuffer = this.buffers.shift();
528        this.cursor = 0;
529      }
530
531      let value = this.currentBuffer[this.cursor];
532      if (this.format === "ulaw") {
533        value = decodeSample(value);
534      }
535      output[i] = value / 32768;
536      this.cursor++;
537
538      if (this.cursor >= this.currentBuffer.length) {
539        this.currentBuffer = null;
540      }
541    }
542
543    if (this.finished !== finished) {
544      this.finished = finished;
545      this.port.postMessage({ type: "process", finished });
546    }
547
548    return true; // Continue processing
549  }
550}
551
552registerProcessor("audio-concat-processor", AudioConcatProcessor);
553`);class lg{static async create({sampleRate:e,format:n}){let r=null;try{r=new AudioContext({sampleRate:e});const o=r.createAnalyser(),i=r.createGain();i.connect(o),o.connect(r.destination),await CM(r.audioWorklet);const a=new AudioWorkletNode(r,"audio-concat-processor");return a.port.postMessage({type:"setFormat",format:n}),a.connect(i),await r.resume(),new lg(r,o,i,a)}catch(o){var s;throw(s=r)==null||s.close(),o}}constructor(e,n,r,s){this.context=void 0,this.analyser=void 0,this.gain=void 0,this.worklet=void 0,this.context=e,this.analyser=n,this.gain=r,this.worklet=s}async close(){await this.context.close()}}function o0(t){return!!t.type}class cg{static async create(e){let n=null;try{var r;const o=(r=e.origin)!=null?r:"wss://api.elevenlabs.io",i=e.signedUrl?e.signedUrl:o+"/v1/convai/conversation?agent_id="+e.agentId,a=["convai"];e.authorization&&a.push(`bearer.${e.authorization}`),n=new WebSocket(i,a);const l=await new Promise((x,v)=>{n.addEventListener("open",()=>{var b;const g={type:"conversation_initiation_client_data"};var m,w,_,S;e.overrides&&(g.conversation_config_override={agent:{prompt:(m=e.overrides.agent)==null?void 0:m.prompt,first_message:(w=e.overrides.agent)==null?void 0:w.firstMessage,language:(_=e.overrides.agent)==null?void 0:_.language},tts:{voice_id:(S=e.overrides.tts)==null?void 0:S.voiceId}}),e.customLlmExtraBody&&(g.custom_llm_extra_body=e.customLlmExtraBody),e.dynamicVariables&&(g.dynamic_variables=e.dynamicVariables),(b=n)==null||b.send(JSON.stringify(g))},{once:!0}),n.addEventListener("error",b=>{setTimeout(()=>v(b),0)}),n.addEventListener("close",v),n.addEventListener("message",b=>{const g=JSON.parse(b.data);o0(g)&&(g.type==="conversation_initiation_metadata"?x(g.conversation_initiation_metadata_event):console.warn("First received message is not conversation metadata."))},{once:!0})}),{conversation_id:c,agent_output_audio_format:d,user_input_audio_format:f}=l,p=i0(f??"pcm_16000"),y=i0(d);return new cg(n,c,p,y)}catch(o){var s;throw(s=n)==null||s.close(),o}}constructor(e,n,r,s){this.socket=void 0,this.conversationId=void 0,this.inputFormat=void 0,this.outputFormat=void 0,this.queue=[],this.disconnectionDetails=null,this.onDisconnectCallback=null,this.onMessageCallback=null,this.socket=e,this.conversationId=n,this.inputFormat=r,this.outputFormat=s,this.socket.addEventListener("error",o=>{setTimeout(()=>this.disconnect({reason:"error",message:"The connection was closed due to a socket error.",context:o}),0)}),this.socket.addEventListener("close",o=>{this.disconnect(o.code===1e3?{reason:"agent",context:o}:{reason:"error",message:o.reason||"The connection was closed by the server.",context:o})}),this.socket.addEventListener("message",o=>{try{const i=JSON.parse(o.data);if(!o0(i))return;this.onMessageCallback?this.onMessageCallback(i):this.queue.push(i)}catch{}})}close(){this.socket.close()}sendMessage(e){this.socket.send(JSON.stringify(e))}onMessage(e){this.onMessageCallback=e,this.queue.forEach(e),this.queue=[]}onDisconnect(e){this.onDisconnectCallback=e,this.disconnectionDetail
553s&&e(this.disconnectionDetails)}disconnect(e){var n;this.disconnectionDetails||(this.disconnectionDetails=e,(n=this.onDisconnectCallback)==null||n.call(this,e))}}function i0(t){const[e,n]=t.split("_");if(!["pcm","ulaw"].includes(e))throw new Error(`Invalid format: ${t}`);const r=parseInt(n);if(isNaN(r))throw new Error(`Invalid sample rate: ${n}`);return{format:e,sampleRate:r}}const EM={clientTools:{}},TM={onConnect:()=>{},onDebug:()=>{},onDisconnect:()=>{},onError:()=>{},onMessage:()=>{},onAudio:()=>{},onModeChange:()=>{},onStatusChange:()=>{},onCanSendFeedbackChange:()=>{}};class ug{static async startSession(e){var n;const r=gu({},EM,TM,e);r.onStatusChange({status:"connecting"}),r.onCanSendFeedbackChange({canSendFeedback:!1});let s=null,o=null,i=null,a=null,l=null;if((n=e.useWakeLock)==null||n)try{l=await navigator.wakeLock.request("screen")}catch{}try{var c,d;a=await navigator.mediaDevices.getUserMedia({audio:!0});const m=(c=e.connectionDelay)!=null?c:{default:0,android:3e3};let w=m.default;var f;if(/android/i.test(navigator.userAgent))w=(f=m.android)!=null?f:w;else if(E_()){var p;w=(p=m.ios)!=null?p:w}return w>0&&await new Promise(_=>setTimeout(_,w)),o=await cg.create(e),[s,i]=await Promise.all([kM.create(gu({},o.inputFormat,{preferHeadphonesForIosDevices:e.preferHeadphonesForIosDevices})),lg.create(o.outputFormat)]),(d=a)==null||d.getTracks().forEach(_=>_.stop()),a=null,new ug(r,o,s,i,l)}catch(m){var y,x,v,b;r.onStatusChange({status:"disconnected"}),(y=a)==null||y.getTracks().forEach(w=>w.stop()),(x=o)==null||x.close(),await((v=s)==null?void 0:v.close()),await((b=i)==null?void 0:b.close());try{var g;await((g=l)==null?void 0:g.release()),l=null}catch{}throw m}}constructor(e,n,r,s,o){var i=this;this.options=void 0,this.connection=void 0,this.input=void 0,this.output=void 0,this.wakeLock=void 0,this.lastInterruptTimestamp=0,this.mode="listening",this.status="connecting",this.inputFrequencyData=void 0,this.outputFrequencyData=void 0,this.volume=1,this.currentEventId=1,this.lastFeedbackEventId=1,this.canSendFeedback=!1,this.endSession=()=>this.endSessionWithDetails({reason:"user"}),this.endSessionWithDetails=async function(a){if(i.status==="connected"||i.status==="connecting"){i.updateStatus("disconnecting");try{var l;await((l=i.wakeLock)==null?void 0:l.release()),i.wakeLock=null}catch{}i.connection.close(),await i.input.close(),await i.output.close(),i.updateStatus("disconnected"),i.options.onDisconnect(a)}},this.updateMode=a=>{a!==this.mode&&(this.mode=a,this.options.onModeChange({mode:a}))},this.updateStatus=a=>{a!==this.status&&(this.status=a,this.options.onStatusChange({status:a}))},this.updateCanSendFeedback=()=>{const a=this.currentEventId!==this.lastFeedbackEventId;this.canSendFeedback!==a&&(this.canSendFeedback=a,this.options.onCanSendFeedbackChange({canSendFeedback:a}))},this.onMessage=async function(a){switch(a.type){case"interruption":return a.interruption_event&&(i.lastInterruptTimestamp=a.interruption_event.event_id),void i.fadeOutAudio();case"agent_response":return void i.options.onMessage({source:"ai",message:a.agent_response_event.agent_response});case"user_transcript":return void i.options.onMessage({source:"user",message:a.user_transcription_event.user_transcript});case"internal_tentative_agent_response":return void i.options.onDebug({type:"tentative_agent_response",response:a.tentative_agent_response_internal_event.tentative_agent_response});case"client_tool_call":if(i.options.clientTools.hasOwnProperty(a.client_tool_call.tool_name))try{var l;const c=(l=await i.options.clientTools[a.client_tool_call.tool_name](a.client_tool_call.parameters))!=null?l:"Client tool execution successful.",d=typeof c=="object"?JSON.stringify(c):String(c);i.connection.sendMessage({type:"client_tool_result",tool_call_id:a.client_tool_call.tool_call_id,result:d,is_error:!1})}catch(c){i.onError("Client tool execution failed with following error: "+(c==null?void 0:c.message),{clientToolName:a.client_tool_call.tool_name}),i.connection.sendMessage({type:"client_tool_result",tool_call_id:a.client_tool_call.tool_call_id,result:"Client tool execution failed: "+(c==null?void 0:c.message),is_error:!0})}else{if(i.options.onUnhandledClientToolCall)return void i.options.onUnhandledClientToolCall(a.client_tool_call);i.onError(`Client tool with name ${a.client_tool_call.tool_name} is not defined on client`,{clientToolName:a.client_tool_call.tool_name}),i.connection.sendMessage({type:"client_tool_result",tool_call_id:a.client_tool_call.tool_call_id,result:`Client tool with name ${a.client_tool_call.tool_name} is not defined on client`,is_error:!0})}return;case"audio":return void(i.lastInterruptTimestamp<=a.audio_event.event_id&&(i.options.onAudio(a.audio_event.audio_base_64),i.addAudioBase64Chunk(a.audio_event.audio_base_64),i.currentEventId=a.audio_event.event_id,i.updateCanSendFeedback(),i.updateMode("speaking")));case"ping":return void i.connection.sendMessage({type:"pong",event_id:a.ping_event.event_id});default:return void i.options.onDebug(a)}},this.onInputWorkletMessage=a=>{this.status==="connected"&&this.connection.sendMessage({user_audio_chunk:bM(a.data[0].buffer)})},this.onOutputWorkletMessage=({data:a})=>{a.type==="process"&&this.updateMode(a.finished?"listening":"speaking")},this.addAudioBase64Chunk=a=>{this.output.gain.gain.value=this.volume,this.output.worklet.port.postMessage({type:"clearInterrupted"}),this.output.worklet.port.postMessage({type:"buffer",buffer:_M(a)})},this.fadeOutAudio=()=>{this.updateMode("listening"),this.output.worklet.port.postMessage({type:"interrupt"}),this.output.gain.gain.exponentialRampToValueAtTime(1e-4,this.output.context.currentTime+2),setTimeout(()=>{this.output.gain.gain.value=this.volume,this.output.worklet.port.postMessage({type:"clearInterrupted"})},2e3)},this.onError=(a,l)=>{console.error(a,l),this.options.onError(a,l)},this.calculateVolume=a=>{if(a.length===0)return 0;let l=0;for(let c=0;c<a.length;c++)l+=a[c]/255;return l/=a.length,l<0?0:l>1?1:l},this.getId=()=>this.connection.conversationId,this.isOpen=()=>this.status==="connected",this.setVolume=({volume:a})=>{this.volume=a},this.setMicMuted=a=>{this.input.setMuted(a)},this.getInputByteFrequencyData=()=>(this.inputFrequencyData!=null||(this.inputFrequencyData=new Uint8Array(this.input.analyser.frequencyBinCount)),this.input.analyser.getByteFrequencyData(this.inputFrequencyData),this.inputFrequencyData),this.getOutputByteFrequencyData=()=>(this.outputFrequencyData!=null||(this.outputFrequencyData=new Uint8Array(this.output.analyser.frequencyBinCount)),this.output.analyser.getByteFrequencyData(this.outputFrequencyData),this.outputFrequencyData),this.getInputVolume=()=>this.calculateVolume(this.getInputByteFrequencyData()),this.getOutputVolume=()=>this.calculateVolume(this.getOutputByteFrequencyData()),this.sendFeedback=a=>{this.canSendFeedback?(this.connection.sendMessage({type:"feedback",score:a?"like":"dislike",event_id:this.currentEventId}),this.lastFeedbackEventId=this.currentEventId,this.updateCanSendFeedback()):console.warn(this.lastFeedbackEventId===0?"Cannot send feedback: the conversation has not started yet.":"Cannot send feedback: feedback has already been sent for the current response.")},this.sendContextualUpdate=a=>{this.connection.sendMessage({type:"contextual_update",text:a})},this.sendUserMessage=a=>{this.connection.sendMessage({type:"user_message",text:a})},this.sendUserActivity=()=>{this.connection.sendMessage({type:"user_activity"})},this.options=e,this.connection=n,this.input=r,this.output=s,this.wakeLock=o,this.options.onConnect({conversationId:n.conversationId}),this.connection.onDisconnect(this.endSessionWithDetails),this.connection.onMessage(this.onMessage),this.input.worklet.port.onmessage=this.onInputWorkletMessage,this.output.worklet.port.onmessage=this.onOutputWorkletMessage,this.updateStatus("connected")}}function xp(){return xp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},xp.apply(null,arguments)}const jM=["micMuted","volume"];function j_(t={}){const{micMuted:e,volume:n}
553=t,r=function(p,y){if(p==null)return{};var x={};for(var v in p)if({}.hasOwnProperty.call(p,v)){if(y.includes(v))continue;x[v]=p[v]}return x}(t,jM),s=h.useRef(null),o=h.useRef(null),[i,a]=h.useState("disconnected"),[l,c]=h.useState(!1),[d,f]=h.useState("listening");return h.useEffect(()=>{var p;e!==void 0&&(s==null||(p=s.current)==null||p.setMicMuted(e))},[e]),h.useEffect(()=>{var p;n!==void 0&&(s==null||(p=s.current)==null||p.setVolume({volume:n}))},[n]),h.useEffect(()=>()=>{var p;(p=s.current)==null||p.endSession()},[]),{startSession:async p=>{var y;if((y=s.current)!=null&&y.isOpen())return s.current.getId();if(o.current)return(await o.current).getId();try{return o.current=ug.startSession(xp({},r??{},p??{},{onModeChange:({mode:x})=>{f(x)},onStatusChange:({status:x})=>{a(x)},onCanSendFeedbackChange:({canSendFeedback:x})=>{c(x)}})),s.current=await o.current,e!==void 0&&s.current.setMicMuted(e),n!==void 0&&s.current.setVolume({volume:n}),s.current.getId()}finally{o.current=null}},endSession:async()=>{const p=s.current;s.current=null,await(p==null?void 0:p.endSession())},setVolume:({volume:p})=>{var y;(y=s.current)==null||y.setVolume({volume:p})},getInputByteFrequencyData:()=>{var p;return(p=s.current)==null?void 0:p.getInputByteFrequencyData()},getOutputByteFrequencyData:()=>{var p;return(p=s.current)==null?void 0:p.getOutputByteFrequencyData()},getInputVolume:()=>{var p,y;return(p=(y=s.current)==null?void 0:y.getInputVolume())!=null?p:0},getOutputVolume:()=>{var p,y;return(p=(y=s.current)==null?void 0:y.getOutputVolume())!=null?p:0},sendFeedback:p=>{var y;(y=s.current)==null||y.sendFeedback(p)},getId:()=>{var p;return(p=s.current)==null?void 0:p.getId()},sendContextualUpdate:p=>{var y;(y=s.current)==null||y.sendContextualUpdate(p)},sendUserMessage:p=>{var y;(y=s.current)==null||y.sendUserMessage(p)},sendUserActivity:()=>{var p;(p=s.current)==null||p.sendUserActivity()},status:i,canSendFeedback:l,micMuted:e,isSpeaking:d==="speaking"}}const NM=({primaryColor:t,secondaryColor:e,textColor:n,chatBackground:r,logoUrl:s,agentId:o,onBackToChat:i})=>{const[a,l]=h.useState(!1),c=j_({onConnect:()=>{console.log("ElevenLabs connected"),l(!0)},onDisconnect:()=>{console.log("ElevenLabs disconnected"),l(!1)},onMessage:p=>{console.log("ElevenLabs message:",p)},onError:p=>{console.error("ElevenLabs error:",p)}}),d=async()=>{try{await c.startSession({agentId:o})}catch(p){console.error("Failed to start call:",p)}},f=async()=>{try{await c.endSession(),l(!1)}catch(p){console.error("Failed to end call:",p)}};return u.jsxs("div",{style:{backgroundColor:r,flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"2rem",textAlign:"center"},children:[u.jsxs("div",{style:{marginBottom:"2rem"},children:[u.jsxs("div",{style:{width:"100px",height:"100px",borderRadius:"50%",backgroundColor:s?"transparent":t,display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 1rem",position:"relative",boxShadow:s?"none":a?"0 0 30px rgba(59, 130, 246, 0.5)":"0 4px 12px rgba(0, 0, 0, 0.15)",animation:a?"voicePulse 1.5s ease-in-out infinite":"none",transition:"all 0.3s ease"},children:[s?u.jsx("img",{src:s,alt:"Logo",style:{width:"80px",height:"80px",borderRadius:"50%",objectFit:"contain",imageRendering:"crisp-edges",filter:"contrast(1.05) saturate(1.1)"},onError:p=>{p.currentTarget.style.display="none";const y=p.currentTarget.nextElementSibling;y&&(y.style.display="block")}}):null,u.jsx(Ei,{style:{width:"40px",height:"40px",color:"white",display:s?"none":"block"}})]}),u.jsx("h3",{style:{color:n,margin:"0 0 0.5rem 0",fontSize:"24px",fontWeight:"600"},children:a?"Voice Agent Active":"Voice Assistant"}),u.jsx("p",{style:{color:n,opacity:.7,margin:"0 0 2rem 0",fontSize:"16px"},children:a?"Speak naturally to interact with the AI assistant":"Connect to our AI voice assistant for hands-free support"})]}),u.jsxs("div",{style:{display:"flex",gap:"1rem",flexWrap:"wrap",justifyContent:"center"},children:[a?u.jsx("button",{onClick:f,style:{backgroundColor:"#ef4444",color:"white",border:"none",borderRadius:"50%",width:"56px",height:"56px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.2s"},children:u.jsx(Vb,{style:{width:"20px",height:"20px"}})}):u.jsx("button",{onClick:d,style:{backgroundColor:t,color:"white",border:"none",borderRadius:"50%",width:"56px",height:"56px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.2s"},children:u.jsx(Ei,{style:{width:"20px",height:"20px"}})}),u.jsx("button",{onClick:i,style:{backgroundColor:e,color:n,border:`1px solid ${e==="#f1f5f9"?"#e2e8f0":"rgba(0,0,0,0.1)"}
553`,borderRadius:"28px",padding:"0 1rem",height:"56px",display:"flex",alignItems:"center",cursor:"pointer",fontSize:"14px",fontWeight:"500"},children:"Back to Chat"})]})]})},PM=t=>t.split(`
554`).map((e,n)=>u.jsxs("span",{children:[e,n<t.split(`
555`).length-1&&u.jsx("br",{})]},n)),a0=async t=>{try{await fetch("https://luccatora.app.n8n.cloud/webhook/webbot-error",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...t,timestamp:new Date().toISOString()})})}catch(e){console.error("Failed to log error:",e)}},RM=({webhookUrl:t="https://luccatora.app.n8n.cloud/webhook/webbot-test",title:e="MediFlow",bio:n="Your medical assistant",placeholder:r="Type your message...",position:s="bottom-right",primaryColor:o="#6366f1",secondaryColor:i="#f1f5f9",chatBackground:a="#ffffff",botTextColor:l="#1f2937",userTextColor:c="#ffffff",headerGradientColor:d="#8b5cf6",headerMainColor:f="#6366f1",userId:p="anonymous",clinicName:y="Demo Clinic",clinicId:x="1",logoUrl:v="/lovable-uploads/fd9d4dbf-9035-4de8-a3a1-81089fcac665.png",logoFile:b,avatarUrl:g="/lovable-uploads/1f938225-daa7-46d3-a44e-d951e492fcd4.png",avatarFile:m,welcomeMessage:w="Hi! I'm your medical assistant. How can I help you today?",welcomeTooltipMessage:_="Click to start chatting with our AI assistant!",admin:S=!1,isVoiceEnabled:C=!0,isElevenLabsEnabled:k=!1,elevenLabsAgentId:T="agent_01k04zwwq3fv5acgzdwmbvfk8k",logoBackgroundColor:I="transparent",logoBorderColor:P="#e5e7eb",headerButtonColor:D="#ffffff",companyName:R="MediFlow",agentName:M="Medical Assistant",callToAction:A="Start a conversation"})=>{const[z,B]=h.useState(v),[G,j]=h.useState(g);h.useEffect(()=>{if(b){const F=URL.createObjectURL(b);return B(F),()=>URL.revokeObjectURL(F)}else B(v)},[b,v]),h.useEffect(()=>{if(m){const F=URL.createObjectURL(m);return j(F),()=>URL.revokeObjectURL(F)}else j(g)},[m,g]);const[U,Y]=h.useState(!1),[$,te]=h.useState(!0),[ee,de]=h.useState(!1),Ae=yM({onTranscription:F=>{F.trim()&&Wi(F)},isVoiceEnabled:C&&U,autoPlayResponses:C?$:!1}),{isRecording:ue=!1,isProcessing:se=!1,recordingTimer:me=0,isSpeaking:Me=!1,voicePermissionDenied:ge=!1,selectedVoice:je="bark",startRecording:ve=()=>{},stopRecording:Qe=()=>{},speakText:ze=()=>{},stopSpeaking:xt=()=>{},setSelectedVoice:pt=()=>{}}=C?Ae:{},[Tt,E]=h.useState(!1),N=()=>{if(typeof window<"u")try{return crypto.randomUUID()}catch{return`session_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}return`session_${Date.now()}_${Math.random().toString(36).substr(2,9)}`},O=()=>{if(typeof window>"u")return N();let F=sessionStorage.getItem("chatbot-session-id");return F||(F=N(),sessionStorage.setItem("chatbot-session-id",F)),F},[Z]=h.useState(()=>O()),[W,H]=h.useState(!1),[oe,_e]=h.useState([]),[X,Q]=h.useState(""),[Je,en]=h.useState(!1),[jt,Dr]=h.useState(!1),[$r,fr]=h.useState(null),[Ls,Tn]=h.useState(""),[mn,Ds]=h.useState(""),[ye,Fe]=h.useState(!1);h.useState(null);const[Ue,jn]=h.useState(!0),[et,$s]=h.useState(!1),[wo,Bg]=h.useState(0),$C=h.useRef(null),FC=h.useRef(null),Fs=h.useRef(null),Vg=h.useRef(null);h.useEffect(()=>{const F=()=>{if(typeof window<"u"){const Ne=window.innerHeight,We=window.innerWidth;Bg(Ne),document.documentElement.style.setProperty("--chatbot-vh",`${Ne}px`),document.documentElement.style.setProperty("--chatbot-mobile-vh",`${Ne}px`);const Be=We<=768;Be&&document.documentElement.style.setProperty("--chatbot-mobile-vh","-webkit-fill-available"),console.log("Viewport updated:",{vh:Ne,vw:We,isMobile:Be})}};F();const Se=()=>{if(F(),typeof window<"u"&&window.innerWidth<=768){const We=window.innerHeight<window.screen.height*.75,Be=document.querySelector(".chatbot-widget-container");Be&&(We?Be.classList.add("keyboard-open"):Be.classList.remove("keyboard-open"))}};if(window.addEventListener("resize",Se),window.addEventListener("orientationchange",()=>{setTimeout(F,100),setTimeout(F,300)}),window.visualViewport){const Ne=()=>{const We=window.visualViewport.height;document.documentElement.style.setProperty("--chatbot-mobile-vh",`${We}px`);const Be=We<window.innerHeight*.8,tn=document.querySelector(".chatbot-widget-container");tn&&(Be?tn.classList.add("keyboard-open"):tn.classList.remove("keyboard-open"))};
555return window.visualViewport.addEventListener("resize",Ne),window.visualViewport.addEventListener("scroll",Ne),()=>{window.removeEventListener("resize",Se),window.removeEventListener("orientationchange",F),window.visualViewport.removeEventListener("resize",Ne),window.visualViewport.removeEventListener("scroll",Ne)}}return()=>{window.removeEventListener("resize",Se),window.removeEventListener("orientationchange",F)}},[]),h.useEffect(()=>{const F=()=>{setTimeout(()=>{if(window.innerWidth<=768){const We=document.querySelector(".chatbot-widget-container");We&&We.classList.add("keyboard-open")}setTimeout(()=>{Dl(),Fs.current&&window.innerWidth<=768&&(Fs.current.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),setTimeout(()=>{const We=Vg.current;We&&(We.scrollTop=We.scrollHeight)},100))},50)},0),setTimeout(()=>{if(Fs.current&&window.innerWidth<=768){const We=Fs.current.getBoundingClientRect(),Be=window.visualViewport?window.visualViewport.height:window.innerHeight;We.bottom<=Be||Fs.current.scrollIntoView({behavior:"smooth",block:"end"})}},300)},Se=()=>{setTimeout(()=>{const We=document.querySelector(".chatbot-widget-container");We&&We.classList.remove("keyboard-open"),setTimeout(()=>{Dl()},100)},150)},Ne=Fs.current;if(Ne)return Ne.addEventListener("focus",F),Ne.addEventListener("blur",Se),Ne.addEventListener("touchstart",We=>{We.preventDefault(),Ne.focus()}),()=>{Ne.removeEventListener("focus",F),Ne.removeEventListener("blur",Se),Ne.removeEventListener("touchstart",()=>{})}},[W]),h.useEffect(()=>{_e([{id:"welcome-1",text:w,sender:"bot",timestamp:new Date,showSuggestions:!0}])},[w]),h.useEffect(()=>{const F=document.querySelector(".chatbot-widget-container");F?(F.style.setProperty("--chatbot-primary",o),F.style.setProperty("--chatbot-secondary",i),F.style.setProperty("--chatbot-background",a),F.style.setProperty("--chatbot-bot-text",l),F.style.setProperty("--chatbot-user-text",c),F.style.setProperty("--chatbot-header-gradient",d),F.style.setProperty("--chatbot-header-main",f),F.style.setProperty("--chatbot-logo-background",I),F.style.setProperty("--chatbot-logo-border",P),document.documentElement.style.setProperty("--chatbot-primary",o),document.documentElement.style.setProperty("--chatbot-secondary",i),document.documentElement.style.setProperty("--chatbot-background",a),document.documentElement.style.setProperty("--chatbot-bot-text",l),document.documentElement.style.setProperty("--chatbot-user-text",c),document.documentElement.style.setProperty("--chatbot-header-gradient",d),document.documentElement.style.setProperty("--chatbot-header-main",f),document.documentElement.style.setProperty("--chatbot-logo-background",I),document.documentElement.style.setProperty("--chatbot-logo-border",P),F.offsetHeight,console.log("Chatbot styles updated:",{primaryColor:o,secondaryColor:i,chatBackground:a,botTextColor:l,userTextColor:c,headerGradientColor:d,headerMainColor:f})):console.warn("Chatbot container not found. Styles not applied.")},[o,i,a,l,c,d,f,I,P]);const Dl=()=>{setTimeout(()=>{const F=document.querySelector(".chatbot-widget-messages");F&&(F.scrollTop=F.scrollHeight,setTimeout(()=>{F.scroll({top:F.scrollHeight,behavior:"smooth"})},50))},0)};h.useEffect(()=>{const F=document.querySelector(".chatbot-widget-messages");if(!F)return;const Se=new MutationObserver(()=>{F.scrollTop+F.clientHeight>=F.scrollHeight-100&&Dl()});return Se.observe(F,{childList:!0,subtree:!0}),()=>Se.disconnect()},[W]),h.useEffect(()=>{Dl()},[oe]),h.useEffect(()=>{W&&(Fe(!1),setTimeout(()=>{if(typeof window<"u"){const F=window.innerHeight;Bg(F),document.documentElement.style.setProperty("--chatbot-vh",`${F}px`)}},100))},[W]);const[N4,Ud]=h.useState(!1),Us=h.useRef(null);h.useEffect(()=>(Us.current=setTimeout(()=>{Ud(!0)},2e3),()=>{Us.current&&clearTimeout(Us.current)}),[]),h.useEffect(()=>{W&&(Ud(!1),Us.current&&clearTimeout(Us.current))},[W]),h.useState(0);const UC=()=>{Ud(!1),Us.current&&clearTimeout(Us.current),H(!0)},BC=async(F,Se)=>{try{if(!t){console.warn("Webhook URL not configured for correction");return}const Ne={type:"correction",originalMessage:F,correctedMessage:Se,userId:Z,clinicName:y,clinicId:x,timestamp:new Date().toISOString()};console.log("Sending correction to webhook:",Ne),await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ne)})}catch(Ne){console.error("Error sending correction to webhook:",Ne),await a0({from:"webhook",errorCode:500,errorMessage:Ne instanceof Error?Ne.message:"Unknown correction error",errorStack:Ne instanceof Error&&Ne.stack||"",payloadToWebHook:{type:"correction",originalMessage:F,correctedMessage:Se,userId:Z,clinicName:y,clinicId:x},initializationUrl:window.location.href})}},zg=F=>{et||(Wi(F),$s(!0))},Wi=async(F,Se=0)=>{const Ne=F||X.trim();if(!Ne||Je)return;const We={id:Date.now().toString(),text:Ne,sender:"user",timestamp:new Date};_e(Be=>[...Be,We]),Q(""),en(!0),Dr(!0),E(!1),$s(!0);try{if(!t)throw new Error("Webhook URL not configured");const Be={message:Ne,userId:Z,clinicName:y,clinicId:x,timestamp:new Date().toISOString()};console.log("Sending webhook payload:",Be);const tn=new AbortController,Vd=setTimeout(()=>tn.abort(),3e4),$l=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Be),signal:tn.signal});if(clearTimeout(Vd),!$l.ok){const zd=await $l.text();throw new Error(`HTTP ${$l.status}: ${zd}`)}const Nn=await $l.json();console.log("Webhook response:",Nn);let hr="Sorry, I could not process your request.";Array.isArray(Nn)&&Nn.length>0&&Nn[0].output?hr=Nn[0].output:Nn.message?hr=Nn.message:Nn.response?hr=Nn.response:typeof Nn=="str
555ing"&&(hr=Nn);const KC={id:(Date.now()+1).toString(),text:hr,sender:"bot",timestamp:new Date};_e(zd=>[...zd,KC]),C&&U&&$&&!Me&&setTimeout(()=>{ze(hr)},500),!W&&Ue&&(Fe(!0),"Notification"in window&&Notification.permission==="granted"&&new Notification(e,{body:hr.length>50?hr.substring(0,50)+"...":hr,icon:v||"/favicon.ico"}))}catch(Be){if(console.error("Error sending message:",Be),await a0({from:"webhook",errorCode:500,errorMessage:Be instanceof Error?Be.message:"Unknown error",errorStack:Be instanceof Error&&Be.stack||"",payloadToWebHook:{message:Ne,userId:Z,clinicName:y,clinicId:x,timestamp:new Date().toISOString()},initializationUrl:window.location.href}),Se<2&&Be instanceof Error&&Be.name!=="AbortError"){console.log(`Retrying... Attempt ${Se+1}`),setTimeout(()=>{Wi(Ne,Se+1)},1e3*(Se+1));return}E(!0);const tn={id:(Date.now()+1).toString(),text:Se>=2?"I apologize, but I'm having trouble connecting right now. Please try again in a moment.":"Sorry, I encountered an error. Please try again.",sender:"bot",timestamp:new Date};_e(Vd=>[...Vd,tn])}finally{en(!1),Dr(!1)}},VC=F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),X.trim()&&!jt&&Wi(X))},zC=F=>{fr(F.id),Tn(F.text),Ds("")},Wg=async F=>{const Se=Ls.trim();if(!Se){Ds("Message cannot be empty");return}const Ne=oe.find(Be=>Be.id===F);if(!Ne)return;const We=Ne.text;Se!==We&&(_e(Be=>Be.map(tn=>tn.id===F?{...tn,text:Se}:tn)),await BC(We,Se)),fr(null),Tn(""),Ds("")},Hg=()=>{fr(null),Tn(""),Ds("")},WC=(F,Se)=>{F.key==="Enter"&&!F.shiftKey?(F.preventDefault(),Wg(Se)):F.key==="Escape"&&(F.preventDefault(),Hg())},Bd=Ls.trim().length>0,HC=()=>{C&&(Y(!U),U&&xt&&xt())},qC=()=>{C&&(te(!$),!$&&xt&&xt())};return Z.length>8&&`${Z.substring(0,8)}`,u.jsxs("div",{className:`chatbot-widget-container chatbot-widget-${s}`,style:{position:"fixed",bottom:"1.5rem",right:s==="bottom-right"?"1.5rem":"auto",left:s==="bottom-left"?"1.5rem":"auto",top:"auto",zIndex:2147483647},ref:F=>{F&&console.log("Widget position:",{position:s,computedStyle:window.getComputedStyle(F),bottom:window.getComputedStyle(F).bottom,top:window.getComputedStyle(F).top,right:window.getComputedStyle(F).right,left:window.getComputedStyle(F).left})},children:[W&&u.jsxs("div",{ref:Vg,className:"chatbot-widget-window chatbot-widget-animate-in",style:{height:window.innerWidth<=768?"100vh":wo>0?`min(${wo*.9}px, 600px)`:"600px",maxHeight:window.innerWidth<=768?"100vh":wo>0?`${wo*.9}px`:"600px"},children:[u.jsxs("div",{className:"chatbot-widget-header",style:{backgroundColor:o},children:[u.jsxs("div",{className:"chatbot-widget-header-content",children:[u.jsx("div",{className:"chatbot-widget-header-avatar",children:z&&u.jsx("img",{src:z,alt:"Logo",className:"chatbot-widget-logo",onError:F=>{console.error("Logo failed to load:",z),F.currentTarget.style.display="none"},onLoad:()=>{console.log("Logo loaded successfully:",z)}})}),u.jsxs("div",{children:[u.jsx("h3",{className:"chatbot-widget-header-title",children:e}),u.jsxs("p",{className:"chatbot-widget-header-subtitle",children:[n,C&&U&&u.jsx("span",{style:{marginLeft:"8px",fontSize:"10px"},children:"🎤 Voice Mode"})]})]})]}),u.jsxs("div",{className:"chatbot-widget-header-actions",children:[k&&T&&u.jsx("button",{className:"chatbot-widget-button",onClick:()=>de(!0),title:"Start a call",style:{marginRight:"2px",width:"48px",height:"48px",padding:"0",display:"flex !important",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",border:"none",borderRadius:"50%",cursor:"pointer",opacity:"1",visibility:"visible"},children:u.jsx(Ei,{style:{width:"26px",height:"26px",color:"#1f2937 !important"},className:"bg-transparent"})}),u.jsx("button",{className:"chatbot-widget-button",onClick:()=>window.open("/privacy-policy","_blank"),title:"Privacy Policy",style:{marginRight:"0px",width:"32px",height:"32px",padding:"0",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",border:"none",borderRadius:"50%",cursor:"pointer",opacity:"0.8",transition:"opacity 0.2s ease"},onMouseEnter:F=>F.currentTarget.style.opacity="1",onMouseLeave:F=>F.currentTarget.style.opacity="0.8",children:u.jsx(qh,{style:{width:"16px",height:"16px",color:D||"#ffffff"}})}),u.jsx("button",{className:"chatbot-widget-button",onClick:()=>H(!1),children:u.jsx(Za,{style:{width:"16px",height:"16px"}})})]})]}),ee?u.jsx(NM,{primaryColor:o,secondaryColor:i,textColor:l,chatBackgroun
555d:a,logoUrl:g,agentId:T,onBackToChat:()=>de(!1)}):u.jsx(u.Fragment,{children:Tt?u.jsx("div",{className:"chatbot-widget-messages chatbot-widget-scrollbar",style:{backgroundColor:a,flex:1,overflowY:"auto",paddingBottom:window.innerWidth<=768?void 0:"1rem"},children:u.jsx("div",{className:"chatbot-widget-messages-content",children:u.jsx("p",{className:"chatbot-widget-message-text",children:"We're experiencing some technical difficulties. Please refresh the page to try again."})})}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"chatbot-widget-messages chatbot-widget-scrollbar",style:{backgroundColor:a,flex:1,overflowY:"auto",paddingBottom:window.innerWidth<=768?void 0:"1rem"},children:u.jsxs("div",{className:"chatbot-widget-messages-content",children:[oe.map(F=>u.jsx("div",{className:`chatbot-widget-message ${F.sender==="user"?"chatbot-widget-message-user":"chatbot-widget-message-bot"} ${$r===F.id?"editing":""}`,children:u.jsx("div",{className:`chatbot-widget-message-bubble ${F.sender==="user"?"chatbot-widget-message-bubble-user":"chatbot-widget-message-bubble-bot"} ${$r===F.id?"editing":""}`,style:{backgroundColor:F.sender==="user"?o:i,color:F.sender==="user"?c:l,border:F.sender==="bot"?`1px solid ${i==="#f1f5f9"?"#e2e8f0":"rgba(0,0,0,0.1)"}`:"none"},children:$r===F.id?u.jsxs("div",{style:{width:"100%"},children:[u.jsxs("div",{style:{position:"relative"},children:[u.jsx("textarea",{ref:FC,value:Ls,onChange:Se=>{Tn(Se.target.value),Ds("")},onKeyDown:Se=>WC(Se,F.id),className:`chatbot-widget-textarea full-width ${mn?"error":""}`,style:{color:l,backgroundColor:a},placeholder:"Edit your message..."}),mn&&u.jsx("div",{className:"chatbot-widget-error",children:mn})]}),u.jsxs("div",{className:"chatbot-widget-edit-controls",children:[u.jsx("button",{onClick:()=>Wg(F.id),disabled:!Bd,className:"chatbot-widget-button",style:{color:l,opacity:Bd?1:.5,cursor:Bd?"pointer":"not-allowed"},children:u.jsx(sd,{style:{width:"14px",height:"14px"}})}),u.jsx("button",{onClick:Hg,className:"chatbot-widget-button",style:{color:l},children:u.jsx(Za,{style:{width:"14px",height:"14px"}})})]})]}):u.jsxs(u.Fragment,{children:[u.jsx("p",{className:"chatbot-widget-message-text",children:PM(F.text)}),F.showSuggestions&&F.sender==="bot"&&!et&&u.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"6px",marginTop:"12px",flexWrap:"nowrap",justifyContent:"flex-start"},children:[u.jsxs("button",{onClick:()=>zg("Book now"),disabled:et,style:{backgroundColor:o,border:"none",color:c,padding:"8px 12px",borderRadius:"20px",fontSize:"12px",fontWeight:"600",cursor:et?"not-allowed":"pointer",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"4px",opacity:et?.6:1,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",whiteSpace:"nowrap",minWidth:"auto"},onMouseEnter:Se=>{et||(Se.currentTarget.style.transform="translateY(-1px)",Se.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.2)")},onMouseLeave:Se=>{et||(Se.currentTarget.style.transform="translateY(0)",Se.currentTarget.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)")},children:[u.jsx(Mb,{size:14}),"Book Now"]}),u.jsxs("button",{onClick:()=>zg("Ask Question?"),disabled:et,style:{backgroundColor:o,border:"none",color:c,padding:"8px 12px",borderRadius:"20px",fontSize:"12px",fontWeight:"600",cursor:et?"not-allowed":"pointer",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"4px",opacity:et?.6:1,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",whiteSpace:"nowrap",minWidth:"auto"},onMouseEnter:Se=>{et||(Se.currentTarget.style.transform="translateY(-1px)",Se.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.2)")},onMouseLeave:Se=>{et||(Se.currentTarget.style.transform="translateY(0)",Se.currentTarget.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)")},children:[u.jsx(Lb,{size:14}),"Ask Question"]})]}),u.jsx("span",{className:"chatbot-widget-message-timestamp",children:F.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),F.sender==="bot"&&S&&u.jsx("div",{className:"chatbot-widget-message-actions",children:u.jsx("button",{onClick:()=>zC(F),className:"chatbot-widget-button",style:{color:l},children:u.jsx(I2,{style:{width:"12px",height:"12px"}})})})]})})},F.id)),jt&&u.jsx("div",{className:"chatbot-widget-message chatbot-widget-message-bot",children:u.jsx("div",{className:"chatbot-widget-message-bubble chatbot-widget-message-bubble-bot",style:{backgroundColor:i,
555color:l,border:`1px solid ${i==="#f1f5f9"?"#e2e8f0":"rgba(0,0,0,0.1)"}`},children:u.jsxs("div",{className:"chatbot-widget-typing",children:[u.jsx("div",{className:"chatbot-widget-typing-dot"}),u.jsx("div",{className:"chatbot-widget-typing-dot"}),u.jsx("div",{className:"chatbot-widget-typing-dot"})]})})}),u.jsx("div",{ref:$C})]})}),u.jsxs("div",{className:"chatbot-widget-input",style:{position:"relative"},children:[!oe.some(F=>F.sender==="user")&&k&&T&&u.jsxs("button",{onClick:()=>de(!0),className:"w-full mb-3 py-3 px-4 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg transition-colors duration-200 flex items-center justify-center gap-2",style:{backgroundColor:o,fontSize:"16px",fontWeight:"600"},children:[u.jsx(Ei,{style:{width:"20px",height:"20px"}}),"Call our AI Voice Agent"]}),u.jsxs("div",{className:"chatbot-widget-input-container",children:[u.jsx("input",{ref:Fs,value:X,onChange:F=>Q(F.target.value),onKeyPress:VC,placeholder:C&&ue?"Listening...":C&&se?"Processing...":r,disabled:Je||C&&(ue||se),className:"chatbot-widget-input-field",style:{color:l,opacity:C&&(ue||se)?.7:1},autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false"}),C&&u.jsx(wM,{isRecording:ue,isProcessing:se,recordingTimer:me,isSpeaking:Me,voicePermissionDenied:ge,isVoiceEnabled:U,onStartRecording:ve,onStopRecording:Qe,onStopSpeaking:xt,onToggleVoice:HC,primaryColor:o}),u.jsx("button",{onClick:()=>{X.trim()&&!jt&&Wi(X)},disabled:Je||!X.trim()||C&&(ue||se),className:"chatbot-widget-send-button",style:{backgroundColor:o},children:u.jsx(P2,{style:{width:"14px",height:"14px"}})})]}),C&&U&&u.jsx(xM,{selectedVoice:je,onVoiceChange:pt,autoPlayResponses:$,onAutoPlayToggle:qC,primaryColor:o})]})]})})]}),!W&&u.jsx("div",{className:"voice-chat-widget",style:{position:"fixed",bottom:"20px",right:"20px",zIndex:9999},children:u.jsxs("div",{className:"chat-bubble",style:{background:"#ffffff",borderRadius:"24px",padding:"16px 20px",boxShadow:"0 4px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08)",maxWidth:"380px",cursor:"pointer"},onClick:UC,children:[u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"16px"},children:[u.jsx("div",{style:{width:"48px",height:"48px",background:G?I||"transparent":o,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,overflow:"hidden"},children:G?u.jsx("img",{src:G,alt:"Avatar",style:{width:"100%",height:"100%",objectFit:"contain",imageRendering:"crisp-edges",filter:"contrast(1.05) saturate(1.1)"},onError:F=>{console.error("Avatar logo failed to load:",G),F.currentTarget.style.display="none"}}):u.jsx("div",{style:{color:"#ffffff",fontSize:"11px",fontWeight:"600",textAlign:"center",lineHeight:"1.2"},children:R.split(" ").slice(0,2).join(`
556`).toUpperCase()||"AI"})}),u.jsx("div",{style:{flex:1},children:u.jsx("p",{style:{color:"#1a1a1a",fontSize:"15px",lineHeight:"1.4",margin:0,display:"flex",alignItems:"center"},children:_||`Hey! I'm ${M}, your AI assistant. Feel free to chat with me and ask any questions!`})})]}),u.jsxs("button",{style:{background:o,color:"#ffffff",border:"none",borderRadius:"24px",padding:"14px 24px",fontSize:"16px",fontWeight:"600",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:"10px",width:"100%",transition:"all 0.2s ease"},onMouseEnter:F=>{F.currentTarget.style.background=`${o}dd`,F.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:F=>{F.currentTarget.style.background=o,F.currentTarget.style.transform="translateY(0)"},children:[u.jsx(Fb,{style:{width:"20px",height:"20px"}}),A||"Start a conversation"]})]})})]})},AM=rd("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ze=h.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...s},o)=>{const i=r?xs:"button";return u.jsx(i,{className:be(AM({variant:e,size:n,className:t})),ref:o,...s})});Ze.displayName="Button";const at=h.forwardRef(({className:t,type:e,...n},r)=>u.jsx("input",{type:e,className:be("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:r,...n}));at.displayName="Input";const Cd=h.forwardRef(({className:t,...e},n)=>u.jsx("textarea",{className:be("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
556ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...e}));Cd.displayName="Textarea";function IM(t,e){const n=h.createContext(e),r=o=>{const{children:i,...a}=o,l=h.useMemo(()=>a,Object.values(a));return u.jsx(n.Provider,{value:l,children:i})};r.displayName=t+"Provider";function s(o){const i=h.useContext(n);if(i)return i;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[r,s]}function OM(t,e=[]){let n=[];function r(o,i){const a=h.createContext(i),l=n.length;n=[...n,i];const c=f=>{var g;const{scope:p,children:y,...x}=f,v=((g=p==null?void 0:p[t])==null?void 0:g[l])||a,b=h.useMemo(()=>x,Object.values(x));return u.jsx(v.Provider,{value:b,children:y})};c.displayName=o+"Provider";function d(f,p){var v;const y=((v=p==null?void 0:p[t])==null?void 0:v[l])||a,x=h.useContext(y);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const s=()=>{const o=n.map(i=>h.createContext(i));return function(a){const l=(a==null?void 0:a[t])||o;return h.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,MM(s,...e)]}function MM(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return h.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return n.scopeName=e.scopeName,n}var Of="focusScope.autoFocusOnMount",Mf="focusScope.autoFocusOnUnmount",l0={bubbles:!1,cancelable:!0},LM="FocusScope",dg=h.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=t,[a,l]=h.useState(null),c=St(s),d=St(o),f=h.useRef(null),p=Te(e,v=>l(v)),y=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let v=function(w){if(y.paused||!a)return;const _=w.target;a.contains(_)?f.current=_:Hr(f.current,{select:!0})},b=function(w){if(y.paused||!a)return;const _=w.relatedTarget;_!==null&&(a.contains(_)||Hr(f.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&Hr(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const m=new MutationObserver(g);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),m.disconnect()}}},[r,a,y.paused]),h.useEffect(()=>{if(a){u0.add(y);const v=document.activeElement;if(!a.contains(v)){const g=new CustomEvent(Of,l0);a.addEventListener(Of,c),a.dispatchEvent(g),g.defaultPrevented||(DM(VM(N_(a)),{select:!0}),document.activeElement===v&&Hr(a))}return()=>{a.removeEventListener(Of,c),setTimeout(()=>{const g=new CustomEvent(Mf,l0);a.addEventListener(Mf,d),a.dispatchEvent(g),g.defaultPrevented||Hr(v??document.body,{select:!0}),a.removeEventListener(Mf,d),u0.remove(y)},0)}}},[a,c,d,y]);const x=h.useCallback(v=>{if(!n&&!r||y.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,g=document.activeElement;if(b&&g){const m=v.currentTarget,[w,_]=$M(m);w&&_?!v.shiftKey&&g===_?(v.preventDefault(),n&&Hr(w,{select:!0})):v.shiftKey&&g===w&&(v.preventDefault(),n&&Hr(_,{select:!0})):g===m&&v.preventDefault()}},[n,r,y.paused]);return u.jsx(ce.div,{tabIndex:-1,...i,ref:p,onKeyDown:x})});dg.displayName=LM;function DM(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Hr(r,{select:e}),document.activeElement!==n)return}function $M(t){const e=N_(t),n=c0(e,t),r=c0(e.reverse(),t);return[n,r]}function N_(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function c0(t,e){for(const n of t)if(!FM(n,{upTo:e}))return n}function FM(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function UM(t){return t instanceof HTMLInputElement&&"select"in t}function Hr(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&UM(t)&&e&&t.select()}}var u0=BM();function BM(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=d0(t,e),t.unshift(e)},remove(e){var n;t=d0(t,e),(n=t[0])==null||n.resume()}}}function d0(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}
vendor: 4,554 bytes, line 556
556function VM(t){return t.filter(e=>e.tagName!=="A")}function zM(t,e){return h.useReducer((n,r)=>e[n][r]??n,t)}var Ed=t=>{const{present:e,children:n}=t,r=WM(e),s=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),o=Te(r.ref,HM(s));return typeof n=="function"||r.isPresent?h.cloneElement(s,{ref:o}):null};Ed.displayName="Presence";function WM(t){const[e,n]=h.useState(),r=h.useRef({}),s=h.useRef(t),o=h.useRef("none"),i=t?"mounted":"unmounted",[a,l]=zM(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const c=hc(r.current);o.current=a==="mounted"?c:"none"},[a]),ot(()=>{const c=r.current,d=s.current;if(d!==t){const p=o.current,y=hc(c);t?l("MOUNT"):y==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==y?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),ot(()=>{if(e){let c;const d=e.ownerDocument.defaultView??window,f=y=>{const v=hc(r.current).includes(y.animationName);if(y.target===e&&v&&(l("ANIMATION_END"),!s.current)){const b=e.style.animationFillMode;e.style.animationFillMode="forwards",c=d.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=b)})}},p=y=>{y.target===e&&(o.current=hc(r.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{d.clearTimeout(c),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:h.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function hc(t){return(t==null?void 0:t.animationName)||"none"}function HM(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Lf=0;function qM(){h.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??f0()),document.body.insertAdjacentElement("beforeend",t[1]??f0()),Lf++,()=>{Lf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Lf--}},[])}function f0(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Ot=function(){return Ot=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ot.apply(this,arguments)};function fg(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function P_(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,o;r<s;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var Ta="right-scroll-bar-position",ja="width-before-scroll-bar",KM="with-scroll-bars-hidden",GM="--removed-body-scroll-bar-size";function Df(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function ZM(t,e){var n=h.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=e,n.facade}var YM=typeof window<"u"?h.useLayoutEffect:h.useEffect,h0=new WeakMap;function R_(t,e){var n=ZM(null,function(r){return t.forEach(function(s){return Df(s,r)})});return YM(function(){var r=h0.get(n);if(r){var s=new Set(r),o=new Set(t),i=n.current;s.forEach(function(a){o.has(a)||Df(a,null)}),o.forEach(function(a){s.has(a)||Df(a,i)})}h0.set(n,t)},[t]),n}function QM(t){return t}function JM(t,e){e===void 0&&(e=QM);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(o){var i=e(o,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;
vendor: 5,186 bytes, lines 556-593
556n=[],i.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(o),i=n}var l=function(){var d=i;i=[],d.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){i.push(d),c()},filter:function(d){return i=i.filter(d),n}}}};return s}function A_(t){t===void 0&&(t={});var e=JM(null);return e.options=Ot({async:!0,ssr:!1},t),e}var I_=function(t){var e=t.sideCar,n=fg(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return h.createElement(r,Ot({},n))};I_.isSideCarExport=!0;function O_(t,e){return t.useMedium(e),I_}var M_=A_(),$f=function(){},Td=h.forwardRef(function(t,e){var n=h.useRef(null),r=h.useState({onScrollCapture:$f,onWheelCapture:$f,onTouchMoveCapture:$f}),s=r[0],o=r[1],i=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,d=t.enabled,f=t.shards,p=t.sideCar,y=t.noIsolation,x=t.inert,v=t.allowPinchZoom,b=t.as,g=b===void 0?"div":b,m=t.gapMode,w=fg(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=p,S=R_([n,e]),C=Ot(Ot({},w),s);return h.createElement(h.Fragment,null,d&&h.createElement(_,{sideCar:M_,removeScrollBar:c,shards:f,noIsolation:y,inert:x,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:m}),i?h.cloneElement(h.Children.only(a),Ot(Ot({},C),{ref:S})):h.createElement(g,Ot({},C,{className:l,ref:S}),a))});Td.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Td.classNames={fullWidth:ja,zeroRight:Ta};var XM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eL(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=XM();return e&&t.setAttribute("nonce",e),t}function tL(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function nL(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var rL=function(){var t=0,e=null;return{add:function(n){t==0&&(e=eL())&&(tL(e,n),nL(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},sL=function(){var t=rL();return function(e,n){h.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},hg=function(){var t=sL(),e=function(n){var r=n.styles,s=n.dynamic;return t(r,s),null};return e},oL={left:0,top:0,right:0,gap:0},Ff=function(t){return parseInt(t||"",10)||0},iL=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[Ff(n),Ff(r),Ff(s)]},aL=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return oL;var e=iL(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},lL=hg(),li="data-scroll-locked",cL=function(t,e,n,r){var s=t.left,o=t.top,i=t.right,a=t.gap;return n===void 0&&(n="margin"),`
557  .`.concat(KM,` {
558   overflow: hidden `).concat(r,`;
559   padding-right: `).concat(a,"px ").concat(r,`;
560  }
561  body[`).concat(li,`] {
562    overflow: hidden `).concat(r,`;
563    overscroll-behavior: contain;
564    `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
565    padding-left: `.concat(s,`px;
566    padding-top: `).concat(o,`px;
567    padding-right: `).concat(i,`px;
568    margin-left:0;
569    margin-top:0;
570    margin-right: `).concat(a,"px ").concat(r,`;
571    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
572  }
573  
574  .`).concat(Ta,` {
575    right: `).concat(a,"px ").concat(r,`;
576  }
577  
578  .`).concat(ja,` {
579    margin-right: `).concat(a,"px ").concat(r,`;
580  }
581  
582  .`).concat(Ta," .").concat(Ta,` {
583    right: 0 `).concat(r,`;
584  }
585  
586  .`).concat(ja," .").concat(ja,` {
587    margin-right: 0 `).concat(r,`;
588  }
589  
590  body[`).concat(li,`] {
591    `).concat(GM,": ").concat(a,`px;
592  }
593`)},p0=function(){var t=parseInt(document.body.getAttribute(li)||"0",10);return isFinite(t)?t:0},uL=function(){h.useEffect(function(){return document.body.setAttribute(li,(p0()+1).toString()),function(){var t=p0()-1;t<=0?document.body.removeAttribute(li):document.body.setAttribute(li,t.toString())}},[])},L_=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;uL();var o=h.useMemo(function(){return aL(s)},[s]);return h.createElement(lL,{styles:cL(o,!e,s,n?"":"!important")})},bp=!1;if(typeof window<"u")try{var pc=Object.defineProperty({},"passive",{get:function(){return bp=!0,!0}});window.addEventListener("test",pc,pc),window.removeEventListener("test",pc,pc)}catch{bp=!1}var Eo=bp?{passive:!1}:!1,dL=function(t){return t.tagName==="TEXTAREA"},D_=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!dL(t)&&n[e]==="visible")},fL=function(t){return D_(t,"overflowY")},hL=function(t){return D_(t,"overflowX")},m0=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=$_(t,r);
vendor: 11,521 bytes, lines 593-600
593if(s){var o=F_(t,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},pL=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},mL=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},$_=function(t,e){return t==="v"?fL(e):hL(e)},F_=function(t,e){return t==="v"?pL(e):mL(e)},gL=function(t,e){return t==="h"&&e==="rtl"?-1:1},vL=function(t,e,n,r,s){var o=gL(t,window.getComputedStyle(e).direction),i=o*r,a=n.target,l=e.contains(a),c=!1,d=i>0,f=0,p=0;do{var y=F_(t,a),x=y[0],v=y[1],b=y[2],g=v-b-o*x;(x||g)&&$_(t,a)&&(f+=g,p+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(p)<1||!s))&&(c=!0),c},mc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},g0=function(t){return[t.deltaX,t.deltaY]},v0=function(t){return t&&"current"in t?t.current:t},yL=function(t,e){return t[0]===e[0]&&t[1]===e[1]},wL=function(t){return`
594  .block-interactivity-`.concat(t,` {pointer-events: none;}
595  .allow-interactivity-`).concat(t,` {pointer-events: all;}
596`)},xL=0,To=[];function bL(t){var e=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),s=h.useState(xL++)[0],o=h.useState(hg)[0],i=h.useRef(t);h.useEffect(function(){i.current=t},[t]),h.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var v=P_([t.lockRef.current],(t.shards||[]).map(v0),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=h.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var g=mc(v),m=n.current,w="deltaX"in v?v.deltaX:m[0]-g[0],_="deltaY"in v?v.deltaY:m[1]-g[1],S,C=v.target,k=Math.abs(w)>Math.abs(_)?"h":"v";if("touches"in v&&k==="h"&&C.type==="range")return!1;var T=m0(k,C);if(!T)return!0;if(T?S=k:(S=k==="v"?"h":"v",T=m0(k,C)),!T)return!1;if(!r.current&&"changedTouches"in v&&(w||_)&&(r.current=S),!S)return!0;var I=r.current||S;return vL(I,b,v,I==="h"?w:_,!0)},[]),l=h.useCallback(function(v){var b=v;if(!(!To.length||To[To.length-1]!==o)){var g="deltaY"in b?g0(b):mc(b),m=e.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&yL(S.delta,g)})[0];if(m&&m.should){b.cancelable&&b.preventDefault();return}if(!m){var w=(i.current.shards||[]).map(v0).filter(Boolean).filter(function(S){return S.contains(b.target)}),_=w.length>0?a(b,w[0]):!i.current.noIsolation;_&&b.cancelable&&b.preventDefault()}}},[]),c=h.useCallback(function(v,b,g,m){var w={name:v,delta:b,target:g,should:m,shadowParent:_L(g)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(_){return _!==w})},1)},[]),d=h.useCallback(function(v){n.current=mc(v),r.current=void 0},[]),f=h.useCallback(function(v){c(v.type,g0(v),v.target,a(v,t.lockRef.current))},[]),p=h.useCallback(function(v){c(v.type,mc(v),v.target,a(v,t.lockRef.current))},[]);h.useEffect(function(){return To.push(o),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Eo),document.addEventListener("touchmove",l,Eo),document.addEventListener("touchstart",d,Eo),function(){To=To.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,Eo),document.removeEventListener("touchmove",l,Eo),document.removeEventListener("touchstart",d,Eo)}},[]);var y=t.removeScrollBar,x=t.inert;return h.createElement(h.Fragment,null,x?h.createElement(o,{styles:wL(s)}):null,y?h.createElement(L_,{gapMode:t.gapMode}):null)}function _L(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const SL=O_(M_,bL);var U_=h.forwardRef(function(t,e){return h.createElement(Td,Ot({},t,{ref:e,sideCar:SL}))});U_.classNames=Td.classNames;var kL=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},jo=new WeakMap,gc=new WeakMap,vc={},Uf=0,B_=function(t){return t&&(t.host||B_(t.parentNode))},CL=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=B_(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},EL=function(t,e,n,r){var s=CL(e,Array.isArray(t)?t:[t]);vc[n]||(vc[n]=new WeakMap);var o=vc[n],i=[],a=new Set,l=new Set(s),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};s.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(a.has(p))d(p);else try{var y=p.getAttribute(r),x=y!==null&&y!=="false",v=(jo.get(p)||0)+1,b=(o.get(p)||0)+1;jo.set(p,v),o.set(p,b),i.push(p),v===1&&x&&gc.set(p,!0),b===1&&p.setAttribute(n,"true"),x||p.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",p,g)}})};return d(e),a.clear(),Uf++,function(){i.forEach(function(f){var p=jo.get(f)-1,y=o.get(f)-1;jo.set(f,p),o.set(f,y),p||(gc.has(f)||f.removeAttribute(r),gc.delete(f)),y||f.removeAttribute(n)}),Uf--,Uf||(jo=new WeakMap,jo=new WeakMap,gc=new WeakMap,vc={})}},V_=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=kL(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),EL(r,s,n,"aria-hidden")):function(){return null}},pg="Dialog",[z_,W4]=OM(pg),[TL,Yn]=z_(pg),W_=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:i=!0}=t,a=h.useRef(null),l=h.useRef(null),[c=!1,d]=qn({prop:r,defaultProp:s,onChange:o});return u.jsx(TL,{scope:e,triggerRef:a,contentRef:l,contentId:Vn(),titleId:Vn(),descriptionId:Vn(),open:c,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};W_.displayName=pg;var H_="DialogTrigger",q_=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Yn(H_,n),o=Te(e,s.triggerRef);return u.jsx(ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":vg(s.open),...r,ref:o,onClick:ae(t.onClick,s.onOpenToggle)})});q_.displayName=H_;var mg="DialogPortal",[jL,K_]=z_(mg,{forceMount:void 0}),G_=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,o=Yn(mg,e);return u.jsx(jL,{scope:e,forceMount:n,children:h.Children.map(r,i=>u.jsx(Ed,{present:n||o.open,children:u.jsx(E1,{asChild:!0,container:s,children:i})}))})};G_.displayName=mg;var vu="DialogOverlay",Z_=h.forwardRef((t,e)=>{const n=K_(vu,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,o=Yn(vu,t.__scopeDialog);return o.modal?u.jsx(Ed,{present:r||o.open,children:u.jsx(NL,{...s,ref:e})}):null});Z_.displayName=vu;var NL=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Yn(vu,n);return u.jsx(U_,{as:xs,allowPinchZoom:!0,shards:[s.contentRef],children:u.jsx(ce.div,{"data-state":vg(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),co="DialogContent",Y_=h.forwardRef((t,e)=>{const n=K_(co,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,o=Yn(co,t.__scopeDialog);return u.jsx(Ed,{present:r||o.open,children:o.modal?u.jsx(PL,{...s,ref:e}):u.jsx(RL,{...s,ref:e})})});Y_.displayName=co;var PL=h.forwardRef((t,e)=>{const n=Yn(co,t.__scopeDialog),r=h.useRef(null),s=Te(e,n.contentRef,r);return h.useEffect(()=>{const o=r.current;if(o)return V_(o)},[]),u.jsx(Q_,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ae(t.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ae(t.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:ae(t.onFocusOutside,o=>o.preventDefault())})}),RL=h.forwardRef((t,e)=>{const n=Yn(co,t.__scopeDialog),r=h.useRef(!1),s=h.useRef(!1);return u.jsx(Q_,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=t.onCloseAutoFocus)==null||i.call(t,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((c=n.triggerRef.current)==null?void 0:c.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),Q_=h.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=t,a=Yn(co,n),l=h.useRef(null),c=Te(e,l);return qM(),u.jsxs(u.Fragment,{children:[u.jsx(dg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:u.jsx(Wm,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":vg(a.open),...i,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(AL,{titleId:a.titleId}),u.jsx(OL,{contentRef:l,descriptionId:a.descriptionId})]})]})}),gg="DialogTitle",J_=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Yn(gg,n);return u.jsx(ce.h2,{id:s.titleId,...r,ref:e})});J_.displayName=gg;var X_="DialogDescription",eS=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Yn(X_,n);return u.jsx(ce.p,{id:s.descriptionId,...r,ref:e})});eS.displayName=X_;var tS="DialogClose",nS=h.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Yn(tS,n);return u.jsx(ce.button,{type:"button",...r,ref:e,onClick:ae(t.onClick,()=>s.onOpenChange(!1))})});nS.displayName=tS;function vg(t){return t?"open":"closed"}var rS="DialogTitleWarning",[H4,sS]=IM(rS,{contentName:co,titleName:gg,docsSlug:"dialog"}),AL=({titleId:t})=>{const e=sS(rS),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
597
598If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
599
600For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return h.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},IL="DialogDescriptionWarning",OL=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${sS(IL).contentName}}.`;return h.useEffect(()=>{var o;const s=(o=t.current)==null?void 0:o.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},ML=W_,LL=q_,DL=G_,oS=Z_,iS=Y_,aS=J_,lS=eS,$L=nS;const yu=ML,wu=LL,FL=DL,cS=h.forwardRef(({className:t,...e},n)=>u.jsx(oS,{ref:n,className:be("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));cS.displayName=oS.displayName;const rl=h.forwardRef(({className:t,children:e,...n},r)=>u.jsxs(FL,{children:[u.jsx(cS,{}),u.jsxs(iS,{ref:r,className:be("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
600nded-lg",t),...n,children:[e,u.jsxs($L,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[u.jsx(Za,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));rl.displayName=iS.displayName;const uS=({className:t,...e})=>u.jsx("div",{className:be("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});uS.displayName="DialogHeader";const dS=h.forwardRef(({className:t,...e},n)=>u.jsx(aS,{ref:n,className:be("text-lg font-semibold leading-none tracking-tight",t),...e}));dS.displayName=aS.displayName;const UL=h.forwardRef(({className:t,...e},n)=>u.jsx(lS,{ref:n,className:be("text-sm text-muted-foreground",t),...e}));UL.displayName=lS.displayName;var Il=t=>t.type==="checkbox",Jo=t=>t instanceof Date,Ut=t=>t==null;const fS=t=>typeof t=="object";var ht=t=>!Ut(t)&&!Array.isArray(t)&&fS(t)&&!Jo(t),hS=t=>ht(t)&&t.target?Il(t.target)?t.target.checked:t.target.value:t,BL=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,pS=(t,e)=>t.has(BL(e)),VL=t=>{const e=t.constructor&&t.constructor.prototype;return ht(e)&&e.hasOwnProperty("isPrototypeOf")},yg=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function qt(t){let e;const n=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else if(!(yg&&(t instanceof Blob||t instanceof FileList))&&(n||ht(t)))if(e=n?[]:{},!n&&!VL(t))e=t;else for(const r in t)t.hasOwnProperty(r)&&(e[r]=qt(t[r]));else return t;return e}var jd=t=>Array.isArray(t)?t.filter(Boolean):[],ct=t=>t===void 0,J=(t,e,n)=>{if(!e||!ht(t))return n;const r=jd(e.split(/[,[\].]+?/)).reduce((s,o)=>Ut(s)?s:s[o],t);return ct(r)||r===t?ct(t[e])?n:t[e]:r},vn=t=>typeof t=="boolean",wg=t=>/^\w*$/.test(t),mS=t=>jd(t.replace(/["|']|\]/g,"").split(/\.|\[/)),De=(t,e,n)=>{let r=-1;const s=wg(e)?[e]:mS(e),o=s.length,i=o-1;for(;++r<o;){const a=s[r];let l=n;if(r!==i){const c=t[a];l=ht(c)||Array.isArray(c)?c:isNaN(+s[r+1])?{}:[]}if(a==="__proto__")return;t[a]=l,t=t[a]}return t};const xu={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},$n={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},mr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},gS=L.createContext(null),Nd=()=>L.useContext(gS),zL=t=>{const{children:e,...n}=t;return L.createElement(gS.Provider,{value:n},e)};var vS=(t,e,n,r=!0)=>{const s={defaultValues:e._defaultValues};for(const o in t)Object.defineProperty(s,o,{get:()=>{const i=o;return e._proxyFormState[i]!==$n.all&&(e._proxyFormState[i]=!r||$n.all),n&&(n[i]=!0),t[i]}});return s},Kt=t=>ht(t)&&!Object.keys(t).length,yS=(t,e,n,r)=>{n(t);const{name:s,...o}=t;return Kt(o)||Object.keys(o).length>=Object.keys(e).length||Object.keys(o).find(i=>e[i]===(!r||$n.all))},Na=t=>Array.isArray(t)?t:[t],wS=(t,e,n)=>!t||!e||t===e||Na(t).some(r=>r&&(n?r===e:r.startsWith(e)||e.startsWith(r)));function xg(t){const e=L.useRef(t);e.current=t,L.useEffect(()=>{const n=!t.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{n&&n.unsubscribe()}},[t.disabled])}function WL(t){const e=Nd(),{control:n=e.control,disabled:r,name:s,exact:o}=t||{},[i,a]=L.useState(n._formState),l=L.useRef(!0),c=L.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=L.useRef(s);return d.current=s,xg({disabled:r,next:f=>l.current&&wS(d.current,f.name,o)&&yS(f,c.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),L.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),vS(i,n,c.current,!1)}var sr=t=>typeof t=="string",xS=(t,e,n,r,s)=>sr(t)?(r&&e.watch.add(t),J(n,t,s)):Array.isArray(t)?t.map(o=>(r&&e.watch.add(o),J(n,o))):(r&&(e.watchAll=!0),n);function HL(t){const e=Nd(),{control:n=e.control,name:r,defaultValue:s,disabled:o,exact:i}=t||{},a=L.useRef(r);a.current=r,xg({disabled:o,subject:n._subjects.values,next:d=>
vendor: 15,006 bytes, line 600
600{wS(a.current,d.name,i)&&c(qt(xS(a.current,n._names,d.values||n._formValues,!1,s)))}});const[l,c]=L.useState(n._getWatch(r,s));return L.useEffect(()=>n._removeUnmounted()),l}function qL(t){const e=Nd(),{name:n,disabled:r,control:s=e.control,shouldUnregister:o}=t,i=pS(s._names.array,n),a=HL({control:s,name:n,defaultValue:J(s._formValues,n,J(s._defaultValues,n,t.defaultValue)),exact:!0}),l=WL({control:s,name:n,exact:!0}),c=L.useRef(s.register(n,{...t.rules,value:a,...vn(t.disabled)?{disabled:t.disabled}:{}}));return L.useEffect(()=>{const d=s._options.shouldUnregister||o,f=(p,y)=>{const x=J(s._fields,p);x&&x._f&&(x._f.mount=y)};if(f(n,!0),d){const p=qt(J(s._options.defaultValues,n));De(s._defaultValues,n,p),ct(J(s._formValues,n))&&De(s._formValues,n,p)}return()=>{(i?d&&!s._state.action:d)?s.unregister(n):f(n,!1)}},[n,s,i,o]),L.useEffect(()=>{J(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:J(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...vn(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:L.useCallback(d=>c.current.onChange({target:{value:hS(d),name:n},type:xu.CHANGE}),[n]),onBlur:L.useCallback(()=>c.current.onBlur({target:{value:J(s._formValues,n),name:n},type:xu.BLUR}),[n,s]),ref:L.useCallback(d=>{const f=J(s._fields,n);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:p=>d.setCustomValidity(p),reportValidity:()=>d.reportValidity()})},[s._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!J(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!J(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!J(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!J(l.validatingFields,n)},error:{enumerable:!0,get:()=>J(l.errors,n)}})}}const KL=t=>t.render(qL(t));var bS=(t,e,n,r,s)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:s||!0}}:{},y0=t=>({isOnSubmit:!t||t===$n.onSubmit,isOnBlur:t===$n.onBlur,isOnChange:t===$n.onChange,isOnAll:t===$n.all,isOnTouch:t===$n.onTouched}),w0=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const Pa=(t,e,n,r)=>{for(const s of n||Object.keys(t)){const o=J(t,s);if(o){const{_f:i,...a}=o;if(i){if(i.refs&&i.refs[0]&&e(i.refs[0],s)&&!r)return!0;if(i.ref&&e(i.ref,i.name)&&!r)return!0;if(Pa(a,e))break}else if(ht(a)&&Pa(a,e))break}}};var GL=(t,e,n)=>{const r=Na(J(t,n));return De(r,"root",e[n]),De(t,n,r),t},bg=t=>t.type==="file",Cr=t=>typeof t=="function",bu=t=>{if(!yg)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Lc=t=>sr(t),_g=t=>t.type==="radio",_u=t=>t instanceof RegExp;const x0={value:!1,isValid:!1},b0={value:!0,isValid:!0};var _S=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!ct(t[0].attributes.value)?ct(t[0].value)||t[0].value===""?b0:{value:t[0].value,isValid:!0}:b0:x0}return x0};const _0={isValid:!1,value:null};var SS=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,_0):_0;function S0(t,e,n="validate"){if(Lc(t)||Array.isArray(t)&&t.every(Lc)||vn(t)&&!t)return{type:n,message:Lc(t)?t:"",ref:e}}var No=t=>ht(t)&&!_u(t)?t:{value:t,message:""},k0=async(t,e,n,r,s)=>{const{ref:o,refs:i,required:a,maxLength:l,minLength:c,min:d,max:f,pattern:p,validate:y,name:x,valueAsNumber:v,mount:b,disabled:g}=t._f,m=J(e,x);if(!b||g)return{};const w=i?i[0]:o,_=R=>{r&&w.reportValidity&&(w.setCustomValidity(vn(R)?"":R||""),w.reportValidity())},S={},C=_g(o),k=Il(o),T=C||k,I=(v||bg(o))&&ct(o.value)&&ct(m)||bu(o)&&o.value===""||m===""||Array.isArray(m)&&!m.length,P=bS.bind(null,x,n,S),D=(R,M,A,z=mr.maxLength,B=mr.minLength)=>{const G=R?M:A;S[x]={type:R?z:B,message:G,ref:o,...P(R?z:B,G)}};if(s?!Array.isArray(m)||!m.length:a&&(!T&&(I||Ut(m))||vn(m)&&!m||k&&!_S(i).isValid||C&&!SS(i).isValid)){const{value:R,message:M}=Lc(a)?{value:!!a,message:a}:No(a);if(R&&(S[x]={type:mr.required,message:M,ref:w,...P(mr.required,M)},!n))return _(M),S}if(!I&&(!Ut(d)||!Ut(f))){let R,M;const A=No(f),z=No(d);if(!Ut(m)&&!isNaN(m)){const B=o.valueAsNumber||m&&+m;Ut(A.value)||(R=B>A.value),Ut(z.value)||(M=B<z.value)}else{const B=o.valueAsDate||new Date(m),G=Y=>new Date(new Date().toDateString()+" "+Y),j=o.type=="time",U=o.type=="week";sr(A.value)&&m&&(R=j?G(m)>G(A.value):U?m>A.value:B>new Date(A.value)),sr(z.value)&&m&&(M=j?G(m)<G(z.value):U?m<z.value:B<new Date(z.value))}if((R||M)&&(D(!!R,A.message,z.message,mr.max,mr.min),!n))return _(S[x].message),S}if((l||c)&&!I&&(sr(m)||s&&Array.isArray(m))){const R=No(l),M=No(c),A=!Ut(R.value)&&m.length>+R.value,z=!Ut(M.value)&&m.length<+M.value;if((A||z)&&(D(A,R.message,M.message),!n))return _(S[x].message),S}if(p&&!I&&sr(m)){const{value:R,message:M}=No(p);if(_u(R)&&!m.match(R)&&(S[x]={type:mr.pattern,message:M,ref:o,...P(mr.pattern,M)},!n))return _(M),S}if(y){if(Cr(y)){const R=await y(m,e),M=S0(R,w);if(M&&(S[x]={...M,...P(mr.validate,M.message)},!n))return _(M.message),S}else if(ht(y)){let R={};for(const M in y){if(!Kt(R)&&!n)break;const A=S0(await y[M](m,e),w,M);A&&(R={...A,...P(M,A.message)},_(A.message),n&&(S[x]=R))}if(!Kt(R)&&(S[x]={ref:w,...R},!n))return S}}return _(!0),S};function ZL(t,e){const n=e.slice(0,-1).length;let r=0;for(;r<n;)t=ct(t)?r++:t[e[r++]];return t}function YL(t){for(const e in t)if(t.hasOwnProperty(e)&&!ct(t[e]))return!1;return!0}function gt(t,e){const n=Array.isArray(e)?e:wg(e)?[e]:mS(e),r=n.length===1?t:ZL(t,n),s=n.length-1,o=n[s];return r&&delete r[o],s!==0&&(ht(r)&&Kt(r)||Array.isArray(r)&&YL(r))&&gt(t,n.slice(0,-1)),t}var Bf=()=>{let t=[];return{get observers(){return t},next:s=>{for(const o of t)o.next&&o.next(s)},subscribe:s=>(t.push(s),{unsubscribe:()=>{t=t.filter(o=>o!==s)}}),unsubscribe:()=>{t=[]}}},Su=t=>Ut(t)||!fS(t);function Qr(t,e){if(Su(t)||Su(e))return t===e;if(Jo(t)&&Jo(e))return t.getTime()===e.getTime();const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const s of n){const o=t[s];if(!r.includes(s))return!1;if(s!=="ref"){const i=e[s];if(Jo(o)&&Jo(i)||ht(o)&&ht(i)||Array.isArray(o)&&Array.isArray(i)?!Qr(o,i):o!==i)return!1}}return!0}var kS=t=>t.type==="select-multiple",QL=t=>_g(t)||Il(t),Vf=t=>bu(t)&&t.isConnected,CS=t=>{for(const e in t)if(Cr(t[e]))return!0;return!1};function ku(t,e={}){const n=Array.isArray(t);if(ht(t)||n)for(const r in t)Array.isArray(t[r])||ht(t[r])&&!CS(t[r])?(e[r]=Array.isArray(t[r])?[]:{},ku(t[r],e[r])):Ut(t[r])||(e[r]=!0);return e}function ES(t,e,n){const r=Array.isArray(t);if(ht(t)||r)for(const s in t)Array.isArray(t[s])||ht(t[s])&&!CS(t[s])?ct(e)||Su(n[s])?n[s]=Array.isArray(t[s])?ku(t[s],[]):{...ku(t[s])}:ES(t[s],Ut(e)?{}:e[s],n[s]):n[s]=!Qr(t[s],e[s]);return n}var yc=(t,e)=>ES(t,e,ku(e)),TS=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>ct(t)?t:e?t===""?NaN:t&&+t:n&&sr(t)?new Date(t):r?r(t):t;function zf(t){const e=t.ref;if(!(t.refs?t.refs.every(n=>n.disabled):e.disabled))return bg(e)?e.files:_g(e)?SS(t.refs).value:kS(e)?[...e.selectedOptions].map(({value:n})=>n):Il(e)?_S(t.refs).value:TS(ct(e.value)?t.ref.value:e.value,t)}var JL=(t,e,n,r)=>{const s={};for(const o of t){const i=J(e,o);i&&De(s,o,i._f)}return{criteriaMode:n,names:[...t],fields:s,shouldUseNativeValidation:r}},na=t=>ct(t)?t:_u(t)?t.source:ht(t)?_u(t.value)?t.value.source:t.value:t;const C0="AsyncFunction";var XL=t=>(!t||!t.validate)&&!!(Cr(t.validate)&&t.validate.constructor.name===C0||ht(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===C0)),eD=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function E0(t,e,n){const r=J(t,n);if(r||wg(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const o=s.join("."),i=J(e,o),a=J(t,o);if(i&&!Array.isArray(i)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};s.pop()}return{name:n}}var tD=(t,e,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(e||t):(n?r.isOnBlur:s.isOnBlur)?!t:(n?r.isOnChange:s.isOnChange)?t:!0,nD=(t,e)=>!jd(J(t,e)).length&&gt(t,e);const rD={mode:$n.onSubmit,reValidateMode:$n.onChange,shouldFocusError:!0};function sD(t={}){let e={...rD,...t},n={submitCount:0,isDirty:!1,isLoading:Cr(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},r={},s=ht(e.defaultValues)||ht(e.values)?qt(e.defaultValues||e.values)||{}:{},o=e.shouldUnregister?{}:qt(s),i={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Bf(),array:Bf(),state:Bf()},p=y0(e.mode),y=y0(e.reValidateMode),x=e.criteriaMode===$n.all,v=E=>N=>{clearTimeout(c),c=setTimeout(E,N)},b=async E=>{if(d.isValid||E){const N=e.resolver?Kt((await T()).errors):await P(r,!0);N!==n.isValid&&f.state.next({isValid:N})}},g=(E,N)=>{(d.isValidating||d.validatingFields)&&((E||Array.from(a.mount)).forEach(O=>{O&&(N?De(n.validatingFields,O,N):gt(n.validatingFields,O))}),f.state.next({validatingFields:n.validatingFields,isValidating:!Kt(n.validatingFields)}))},m=(E,N=[],O,Z,W=!0,H=!0)=>{if(Z&&O){if(i.action=!0,H&&Array.isArray(J(r,E))){const oe=O(J(r,E),Z.argA,Z.argB);W&&De(r,E,oe)}if(H&&Array.isArray(J(n.errors,E))){const oe=O(J(n.errors,E),Z.argA,Z.argB);W&&De(n.errors,E,oe),nD(n.errors,E)}if(d.touchedFields&&H&&Array.isArray(J(n.touchedFields,E))){const oe=O(J(n.touchedFields,E),Z.argA,Z.argB);W&&De(n.touchedFields,E,oe)}d.dirtyFields&&(n.dirtyFields=yc(s,o)),f.state.next({name:E,isDirty:R(E,N),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else De(o,E,N)},w=(E,N)=>{De(n.errors,E,N),f.state.next({errors:n.errors})},_=E=>{n.errors=E,f.state.next({errors:n.errors,isValid:!1})},S=(E,N,O,Z)=>{const W=J(r,E);if(W){const H=J(o,E,ct(O)?J(s,E):O);ct(H)||Z&&Z.defaultChecked||N?De(o,E,N?H:zf(W._f)):z(E,H),i.mount&&b()}},C=(E,N,O,Z,W)=>{let H=!1,oe=!1;const _e={name:E},X=!!(J(r,E)&&J(r,E)._f&&J(r,E)._f.disabled);if(!O||Z){d.isDirty&&(oe=n.isDirty,n.isDirty=_e.isDirty=R(),H=oe!==_e.isDirty);const Q=X||Qr(J(s,E),N);oe=!!(!X&&J(n.dirtyFields,E)),Q||X?gt(n.dirtyFields,E):De(n.dirtyFields,E,!0),_e.dirtyFields=n.dirtyFields,H=H||d.dirtyFields&&oe!==!Q}if(O){const Q=J(n.touchedFields,E);Q||(De(n.touchedFields,E,O),_e.touchedFields=n.touchedFields,H=H||d.touchedFields&&Q!==O)}return H&&W&&f.state.next(_e),H?_e:{}},k=(E,N,O,Z)=>{const W=J(n.errors,E),H=d.isValid&&vn(N)&&n.isValid!==N;if(t.delayError&&O?(l=v(()=>w(E,O)),l(t.delayError)):(clearTimeout(c),l=null,O?De(n.errors,E,O):gt(n.errors,E)),(O?!Qr(W,O):W)||!Kt(Z)||H){const oe={...Z,...H&&vn(N)?{isValid:N}:{},errors:n.errors,name:E};n={...n,...oe},f.state.next(oe)}},T=async E=>{g(E,!0);const N=await e.resolver(o,e.context,JL(E||a.mount,r,e.criteriaMode,e.shouldUseNativeValidation));return g(E),N},I=async E=>{const{errors:N}=await T(E);if(E)for(const O of E){const Z=J(N,O);Z?De(n.errors,O,Z):gt(n.errors,O)}else n.errors=N;return N},P=async(E,N,O={valid:!0})=>{for(const Z in E){const W=E[Z];if(W){const{_f:H,...oe}=W;if(H){const _e=a.array.has(H.name),X=W._f&&XL(W._f);X&&d.validatingFields&&g([Z],!0);const Q=await k0(W,o,x,e.shouldUseNativeValidation&&!N,_e);if(X&&d.validatingFields&&g([Z]),Q[H.name]&&(O.valid=!1,N))break;!N&&(J(Q,H.name)?_e?GL(n.errors,Q,H.name):De(n.errors,H.name,Q[H.name]):gt(n.errors,H.name))}!Kt(oe)&&await P(oe,N,O)}}return O.valid},D=()=>{for(const E of a.unMount){const N=J(r,E);N&&(N._f.refs?N._f.refs.every(O=>!Vf(O)):!Vf(N._f.ref))&&ue(E)}a.unMount=new Set},R=(E,N)=>(E&&N&&De(o,E,N),!Qr($(),s)),M=(E,N,O)=>xS(E,a,{...i.mount?o:ct(N)?s:sr(E)?{[E]:N}:N},O,N),A=E=>jd(J(i.mount?o:s,E,t.shouldUnregister?J(s,E,[]):[])),z=(E,N,O={})=>{const Z=J(r,E);let W=N;if(Z){const H=Z._f;H&&(!H.disabled&&De(o,E,TS(N,H)),W=bu(H.ref)&&Ut(N)?"":N,kS(H.ref)?[...H.ref.options].forEach(oe=>oe.selected=W.includes(oe.value)):H.refs?Il(H.ref)?H.refs.length>1?H.refs.forEach(oe=>(!oe.defaultChecked||!oe.disabled)&&(oe.checked=Array.isArray(W)?!!W.find(_e=>_e===oe.value):W===oe.value)):H.refs[0]&&(H.refs[0].checked=!!W):H.refs.forEach(oe=>oe.checked=oe.value===W):bg(H.ref)?H.ref.value="":(H.ref.value=W,H.ref.type||f.values.next({name:E,values:{...o}})))}(O.shouldDirty||O.shouldTouch)&&C(E,W,O.shouldTouch,O.shouldDirty,!0),O.shouldValidate&&Y(E)},B=(E,N,O)=>{for(const Z in N){const W=N[Z],H=`${E}.${Z}`,oe=J(r,H);(a.array.has(E)||!Su(W)||oe&&!oe._f)&&!Jo(W)?B(H,W,O):z(H,W,O)}},G=(E,N,O={})=>{const Z=J(r,E),W=a.array.has(E),H=qt(N);De(o,E,H),W?(f.array.next({name:E,values:{...o}}),(d.isDirty||d.dirtyFields)&&O.shouldDirty&&f.state.next({name:E,dirtyFields:yc(s,o),isDirty:R(E,H)})):Z&&!Z._f&&!Ut(H)?B(E,H,O):z(E,H,O),w0(E,a)&&f.state.next({...n}),f.values.next({name:i.mount?E:void 0,values:{...o}})},j=async E=>{i.mount=!0;const N=E.target;let O=N.name,Z=!0;const W=J(r,O),H=()=>N.type?zf(W._f):hS(E),oe=_e=>{Z=Number.isNaN(_e)||Qr(_e,J(o,O,_e))};if(W){let _e,X;const Q=H(),Je=E.type===xu.BLUR||E.type===xu.FOCUS_OUT,en=!eD(W._f)&&!e.resolver&&!J(n.errors,O)&&!W._f.deps||tD(Je,J(n.touchedFields,O),n.isSubmitted,y,p),jt=w0(O,a,Je);De(o,O,Q),Je?(W._f.onBlur&&W._f.onBlur(E),l&&l(0)):W._f.onChange&&W._f.onChange(E);const Dr=C(O,Q,Je,!1),$r=!Kt(Dr)||jt;if(!Je&&f.values.next({name:O,type:E.type,values:{...o}}),en)return d.isValid&&(t.mode==="onBlur"?Je&&b():b()),$r&&f.state.next({name:O,...jt?{}:Dr});if(!Je&&jt&&f.state.next({...n}),e.resolver){const{errors:fr}=await T([O]);if(oe(Q),Z){const Ls=E0(n.errors,r,O),Tn=E0(fr,r,Ls.name||O);_e=Tn.error,O=Tn.name,X=Kt(fr)}}else g([O],!0),_e=(await k0(W,o,x,e.shouldUseNativeValidation))[O],g([O]),oe(Q),Z&&(_e?X=!1:d.isValid&&(X=await P(r,!0)));Z&&(W._f.deps&&Y(W._f.deps),k(O,X,_e,Dr))}},U=(E,N)=>{if(J(n.errors,N)&&E.focus)return E.focus(),1},Y=async(E,N={})=>{let O,Z;const W=Na(E);if(e.resolver){const H=await I(ct(E)?E:W);O=Kt(H),Z=E?!W.some(oe=>J(H,oe)):O}else E?(Z=(await Promise.all(W.map(async H=>{const oe=J(r,H);return await P(oe&&oe._f?{[H]:oe}:oe)}))).every(Boolean),!(!Z&&!n.isValid)&&b()):Z=O=await P(r);return f.state.next({...!sr(E)||d.isValid&&O!==n.isValid?{}:{name:E},...e.resolver||!E?{isValid:O}:{},errors:n.errors}),N.shouldFocus&&!Z&&Pa(r,U,E?W:a.mount),Z},$=E=>{const N={...i.mount?o:s};return ct(E)?N:sr(E)?J(N,E):E.map(O=>J(N,O))},te=(E,N)=>({invalid:!!J((N||n).errors,E),isDirty:!!J((N||n).dirtyFields,E),error:J((N||n).errors,E),isValidating:!!J(n.validatingFields,E),isTouched:!!J((N||n).touchedFields,E)}),ee=E=>{E&&Na(E).forEach(N=>gt(n.errors,N)),f.state.next({errors:E?n.errors:{}})},de=(E,N,O)=>{const Z=(J(r,E,{_f:{}})._f||{}).ref,W=J(n.errors,E)||{},{ref:H,message:oe,type:_e,...X}=W;De(n.errors,E,{...X,...N,ref:Z}),f.state.next({name:E,errors:n.errors,isValid:!1}),O&&O.shouldFocus&&Z&&Z.focus&&Z.focus()},Ae=(E,N)=>Cr(E)?f.values.subscribe({next:O=>E(M(void 0,N),O)}):M(E,N,!0),ue=(E,N={})=>
vendor: 3,874 bytes, line 600
600{for(const O of E?Na(E):a.mount)a.mount.delete(O),a.array.delete(O),N.keepValue||(gt(r,O),gt(o,O)),!N.keepError&&gt(n.errors,O),!N.keepDirty&&gt(n.dirtyFields,O),!N.keepTouched&&gt(n.touchedFields,O),!N.keepIsValidating&&gt(n.validatingFields,O),!e.shouldUnregister&&!N.keepDefaultValue&&gt(s,O);f.values.next({values:{...o}}),f.state.next({...n,...N.keepDirty?{isDirty:R()}:{}}),!N.keepIsValid&&b()},se=({disabled:E,name:N,field:O,fields:Z,value:W})=>{if(vn(E)&&i.mount||E){const H=E?void 0:ct(W)?zf(O?O._f:J(Z,N)._f):W;De(o,N,H),C(N,H,!1,!1,!0)}},me=(E,N={})=>{let O=J(r,E);const Z=vn(N.disabled)||vn(t.disabled);return De(r,E,{...O||{},_f:{...O&&O._f?O._f:{ref:{name:E}},name:E,mount:!0,...N}}),a.mount.add(E),O?se({field:O,disabled:vn(N.disabled)?N.disabled:t.disabled,name:E,value:N.value}):S(E,!0,N.value),{...Z?{disabled:N.disabled||t.disabled}:{},...e.progressive?{required:!!N.required,min:na(N.min),max:na(N.max),minLength:na(N.minLength),maxLength:na(N.maxLength),pattern:na(N.pattern)}:{},name:E,onChange:j,onBlur:j,ref:W=>{if(W){me(E,N),O=J(r,E);const H=ct(W.value)&&W.querySelectorAll&&W.querySelectorAll("input,select,textarea")[0]||W,oe=QL(H),_e=O._f.refs||[];if(oe?_e.find(X=>X===H):H===O._f.ref)return;De(r,E,{_f:{...O._f,...oe?{refs:[..._e.filter(Vf),H,...Array.isArray(J(s,E))?[{}]:[]],ref:{type:H.type,name:E}}:{ref:H}}}),S(E,!1,void 0,H)}else O=J(r,E,{}),O._f&&(O._f.mount=!1),(e.shouldUnregister||N.shouldUnregister)&&!(pS(a.array,E)&&i.action)&&a.unMount.add(E)}}},Me=()=>e.shouldFocusError&&Pa(r,U,a.mount),ge=E=>{vn(E)&&(f.state.next({disabled:E}),Pa(r,(N,O)=>{const Z=J(r,O);Z&&(N.disabled=Z._f.disabled||E,Array.isArray(Z._f.refs)&&Z._f.refs.forEach(W=>{W.disabled=Z._f.disabled||E}))},0,!1))},je=(E,N)=>async O=>{let Z;O&&(O.preventDefault&&O.preventDefault(),O.persist&&O.persist());let W=qt(o);if(f.state.next({isSubmitting:!0}),e.resolver){const{errors:H,values:oe}=await T();n.errors=H,W=oe}else await P(r);if(gt(n.errors,"root"),Kt(n.errors)){f.state.next({errors:{}});try{await E(W,O)}catch(H){Z=H}}else N&&await N({...n.errors},O),Me(),setTimeout(Me);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Kt(n.errors)&&!Z,submitCount:n.submitCount+1,errors:n.errors}),Z)throw Z},ve=(E,N={})=>{J(r,E)&&(ct(N.defaultValue)?G(E,qt(J(s,E))):(G(E,N.defaultValue),De(s,E,qt(N.defaultValue))),N.keepTouched||gt(n.touchedFields,E),N.keepDirty||(gt(n.dirtyFields,E),n.isDirty=N.defaultValue?R(E,qt(J(s,E))):R()),N.keepError||(gt(n.errors,E),d.isValid&&b()),f.state.next({...n}))},Qe=(E,N={})=>{const O=E?qt(E):s,Z=qt(O),W=Kt(E),H=W?s:Z;if(N.keepDefaultValues||(s=O),!N.keepValues){if(N.keepDirtyValues)for(const oe of a.mount)J(n.dirtyFields,oe)?De(H,oe,J(o,oe)):G(oe,J(H,oe));else{if(yg&&ct(E))for(const oe of a.mount){const _e=J(r,oe);if(_e&&_e._f){const X=Array.isArray(_e._f.refs)?_e._f.refs[0]:_e._f.ref;if(bu(X)){const Q=X.closest("form");if(Q){Q.reset();break}}}}r={}}o=t.shouldUnregister?N.keepDefaultValues?qt(s):{}:qt(H),f.array.next({values:{...H}}),f.values.next({values:{...H}})}a={mount:N.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!N.keepIsValid||!!N.keepDirtyValues,i.watch=!!t.shouldUnregister,f.state.next({submitCount:N.keepSubmitCount?n.submitCount:0,isDirty:W?!1:N.keepDirty?n.isDirty:!!(N.keepDefaultValues&&!Qr(E,s)),isSubmitted:N.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:W?{}:N.keepDirtyValues?N.keepDefaultValues&&o?yc(s,o):n.dirtyFields:N.keepDefaultValues&&E?yc(s,E):N.keepDirty?n.dirtyFields:{},touchedFields:N.keepTouched?n.touchedFields:{},errors:N.keepErrors?n.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},ze=(E,N)=>Qe(Cr(E)?E(o):E,N);return{control:{register:me,unregister:ue,getFieldState:te,handleSubmit:je,setError:de,_executeSchema:T,_getWatch:M,_getDirty:R,_updateV
vendor: 12,120 bytes, line 600
600alid:b,_removeUnmounted:D,_updateFieldArray:m,_updateDisabledField:se,_getFieldArray:A,_reset:Qe,_resetDefaultValues:()=>Cr(e.defaultValues)&&e.defaultValues().then(E=>{ze(E,e.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:E=>{n={...n,...E}},_disableForm:ge,_subjects:f,_proxyFormState:d,_setErrors:_,get _fields(){return r},get _formValues(){return o},get _state(){return i},set _state(E){i=E},get _defaultValues(){return s},get _names(){return a},set _names(E){a=E},get _formState(){return n},set _formState(E){n=E},get _options(){return e},set _options(E){e={...e,...E}}},trigger:Y,register:me,handleSubmit:je,watch:Ae,setValue:G,getValues:$,reset:ze,resetField:ve,clearErrors:ee,unregister:ue,setError:de,setFocus:(E,N={})=>{const O=J(r,E),Z=O&&O._f;if(Z){const W=Z.refs?Z.refs[0]:Z.ref;W.focus&&(W.focus(),N.shouldSelect&&W.select())}},getFieldState:te}}function oD(t={}){const e=L.useRef(),n=L.useRef(),[r,s]=L.useState({isDirty:!1,isValidating:!1,isLoading:Cr(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,defaultValues:Cr(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...sD(t),formState:r});const o=e.current.control;return o._options=t,xg({subject:o._subjects.state,next:i=>{yS(i,o._proxyFormState,o._updateFormState,!0)&&s({...o._formState})}}),L.useEffect(()=>o._disableForm(t.disabled),[o,t.disabled]),L.useEffect(()=>{if(o._proxyFormState.isDirty){const i=o._getDirty();i!==r.isDirty&&o._subjects.state.next({isDirty:i})}},[o,r.isDirty]),L.useEffect(()=>{t.values&&!Qr(t.values,n.current)?(o._reset(t.values,o._options.resetOptions),n.current=t.values,s(i=>({...i}))):o._resetDefaultValues()},[t.values,o]),L.useEffect(()=>{t.errors&&o._setErrors(t.errors)},[t.errors,o]),L.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),L.useEffect(()=>{t.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[t.shouldUnregister,o]),e.current.formState=vS(r,o),e.current}var iD="Label",jS=h.forwardRef((t,e)=>u.jsx(ce.label,{...t,ref:e,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));jS.displayName=iD;var NS=jS;const aD=rd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ve=h.forwardRef(({className:t,...e},n)=>u.jsx(NS,{ref:n,className:be(aD(),t),...e}));Ve.displayName=NS.displayName;const lD=zL,PS=h.createContext({}),ra=({...t})=>u.jsx(PS.Provider,{value:{name:t.name},children:u.jsx(KL,{...t})}),Pd=()=>{const t=h.useContext(PS),e=h.useContext(RS),{getFieldState:n,formState:r}=Nd(),s=n(t.name,r);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:o}=e;return{id:o,name:t.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...s}},RS=h.createContext({}),Mo=h.forwardRef(({className:t,...e},n)=>{const r=h.useId();return u.jsx(RS.Provider,{value:{id:r},children:u.jsx("div",{ref:n,className:be("space-y-2",t),...e})})});Mo.displayName="FormItem";const Lo=h.forwardRef(({className:t,...e},n)=>{const{error:r,formItemId:s}=Pd();return u.jsx(Ve,{ref:n,className:be(r&&"text-destructive",t),htmlFor:s,...e})});Lo.displayName="FormLabel";const Do=h.forwardRef(({...t},e)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:o}=Pd();return u.jsx(xs,{ref:e,id:r,"aria-describedby":n?`${s} ${o}`:`${s}`,"aria-invalid":!!n,...t})});Do.displayName="FormControl";const cD=h.forwardRef(({className:t,...e},n)=>{const{formDescriptionId:r}=Pd();return u.jsx("p",{ref:n,id:r,className:be("text-sm text-muted-foreground",t),...e})});cD.displayName="FormDescription";const $o=h.forwardRef(({className:t,children:e,...n},r)=>{const{error:s,formMessageId:o}=Pd(),i=s?String(s==null?void 0:s.message):e;return i?u.jsx("p",{ref:r,id:o,className:be("text-sm font-medium text-destructive",t),...n,children:i}):null});$o.displayName="FormMessage";const T0=(t,e,n)=>{if(t&&"reportValidity"in t){const r=J(n,e);t.setCustomValidity(r&&r.message||""),t.reportValidity()}},AS=(t,e)=>{for(const n in e.fields){const r=e.fields[n];r&&r.ref&&"reportValidity"in r.ref?T0(r.ref,n,t):r.refs&&r.refs.forEach(s=>T0(s,n,t))}},uD=(t,e)=>{e.shouldUseNativeValidation&&AS(t,e);const n={};for(const r in t){const s=J(e.fields,r),o=Object.assign(t[r]||{},{ref:s&&s.ref});if(dD(e.names||Object.keys(t),r)){const i=Object.assign({},J(n,r));De(i,"root",o),De(n,r,i)}else De(n,r,o)}return n},dD=(t,e)=>t.some(n=>n.startsWith(e+"."));var fD=function(t,e){for(var n={};t.length;){var r=t[0],s=r.code,o=r.message,i=r.path.join(".");if(!n[i])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[i]={message:a.message,type:a.code}}else n[i]={message:o,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return t.push(f)})}),e){var l=n[i].types,c=l&&l[r.code];n[i]=bS(i,e,n,s,c?[].concat(c,r.message):r.message)}t.shift()}return n},hD=function(t,e,n){return n===void 0&&(n={}),function(r,s,o){try{return Promise.resolve(function(i,a){try{var l=Promise.resolve(t[n.mode==="sync"?"parse":"parseAsync"](r,e)).then(function(c){return o.shouldUseNativeValidation&&AS({},o),{errors:{},values:n.raw?r:c}})}catch(c){return a(c)}return l&&l.then?l.then(void 0,a):l}(0,function(i){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(i))return{values:{},errors:uD(fD(i.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw i}))}catch(i){return Promise.reject(i)}}},Ie;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(const a of o)i[a]=s[a];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},t.find=(s,o)=>{for(const i of s)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Ie||(Ie={}));var _p;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(_p||(_p={}));const re=Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Jr=t=>{switch(typeof t){case"undefined":return re.undefined;case"string":return re.string;case"number":return isNaN(t)?re.nan:re.number;case"boolean":return re.boolean;case"function":return re.function;case"bigint":return re.bigint;case"symbol":return re.symbol;case"object":return Array.isArray(t)?re.array:t===null?re.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?re.promise:typeof Map<"u"&&t instanceof Map?re.map:typeof Set<"u"&&t instanceof Set?re.set:typeof Date<"u"&&t instanceof Date?re.date:re.object;default:return re.unknown}},K=Ie.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),pD=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class dn extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return s(this),r}static assert(e){if(!(e instanceof dn))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(e(s))):r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}dn.create=t=>new dn(t);const Pi=(t,e)=>{let n;switch(t.code){case K.invalid_type:t.received===re.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ie.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ie.joinValues(t.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ie.joinValues(t.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${Ie.joinValues(t.options)}, received '${t.received}'`;break;case K.invalid_arguments:n="Invalid function arguments";break;case K.invalid_return_type:n="Invalid function return type";break;case K.invalid_date:n="Invalid date";break;case K.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Ie.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case K.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case K.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case K.custom:n="Invalid input";break;case K.invalid_intersection_types:n="Intersection results could not be merged";break;case K.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case K.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ie.assertNever(t)}return{message:n}};let IS=Pi;function mD(t){IS=t}function Cu(){return IS}const Eu=t=>
vendor: 7,034 bytes, line 600
600{const{data:e,path:n,errorMaps:r,issueData:s}=t,o=[...n,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:e,defaultError:a}).message;return{...s,path:o,message:a}},gD=[];function ne(t,e){const n=Cu(),r=Eu({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Pi?void 0:Pi].filter(s=>!!s)});t.common.issues.push(r)}class Lt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return he;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const o=await s.key,i=await s.value;r.push({key:o,value:i})}return Lt.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return he;o.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(r[o.value]=i.value)}return{status:e.value,value:r}}}const he=Object.freeze({status:"aborted"}),Xo=t=>({status:"dirty",value:t}),zt=t=>({status:"valid",value:t}),Sp=t=>t.status==="aborted",kp=t=>t.status==="dirty",sl=t=>t.status==="valid",ol=t=>typeof Promise<"u"&&t instanceof Promise;function Tu(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function OS(t,e,n,r,s){if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var le;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(le||(le={}));var ua,da;class cr{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const j0=(t,e)=>{if(sl(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new dn(t.common.issues);return this._error=n,this._error}}};function xe(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(i,a)=>{var l,c;const{message:d}=t;return i.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(l=d??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=d??n)!==null&&c!==void 0?c:a.defaultError}},description:s}}class Ee{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Jr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Jr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Lt,ctx:{common:e.parent.common,data:e.data,parsedType:Jr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(ol(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Jr(e)},o=this._parseSync({data:e,path:s.path,parent:s});return j0(s,o)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Jr(e)},s=this._parse({data:e,path:r.path,parent:r}),o=await(ol(s)?s:Promise.resolve(s));return j0(r,o)}refine(e,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const i=e(s),a=()=>o.addIssue({code:K.custom,...r(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new Zn({schema:this,typeName:fe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ar.create(this,this._def)}nullable(){return js.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return zn.create(this,this._def)}promise(){return Ai.create(this,this._def)}or(e){return cl.create([this,e],this._def)}and(e){return ul.create(this,e,this._def)}transform(e){return new Zn({...xe(this._def),schema:this,typeName:fe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new ml({...xe(this._def),innerType:this,defaultValue:n,typeName:fe.ZodDefault})}brand(){return new Sg({typeName:fe.ZodBranded,type:this,...xe(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new gl({...xe(this._def),innerType:this,catchValue:n,typeName:fe.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Ol.create(this,e)}readonly(){return vl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const vD=/^c[^\s-]{8,}
vendor: 44,174 bytes, line 600
600$/i,yD=/^[0-9a-z]+$/,wD=/^[0-9A-HJKMNP-TV-Z]{26}$/,xD=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,bD=/^[a-z0-9_-]{21}$/i,_D=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,SD=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,kD="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wf;const CD=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ED=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,TD=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,MS="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",jD=new RegExp(`^${MS}$`);function LS(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function ND(t){return new RegExp(`^${LS(t)}$`)}function DS(t){let e=`${MS}T${LS(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function PD(t,e){return!!((e==="v4"||!e)&&CD.test(t)||(e==="v6"||!e)&&ED.test(t))}class Fn extends Ee{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==re.string){const o=this._getOrReturnCtx(e);return ne(o,{code:K.invalid_type,expected:re.string,received:o.parsedType}),he}const r=new Lt;let s;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(s=this._getOrReturnCtx(e,s),ne(s,{code:K.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(s=this._getOrReturnCtx(e,s),ne(s,{code:K.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const i=e.data.length>o.value,a=e.data.length<o.value;(i||a)&&(s=this._getOrReturnCtx(e,s),i?ne(s,{code:K.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&ne(s,{code:K.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")SD.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"email",code:K.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Wf||(Wf=new RegExp(kD,"u")),Wf.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"emoji",code:K.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")xD.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"uuid",code:K.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")bD.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"nanoid",code:K.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")vD.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"cuid",code:K.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")yD.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"cuid2",code:K.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")wD.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"ulid",code:K.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),ne(s,{validation:"url",code:K.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"regex",code:K.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(e,s),ne(s,{code:K.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(s=this._getOrReturnCtx(e,s),ne(s,{code:K.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(s=this._getOrReturnCtx(e,s),ne(s,{code:K.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?DS(o).test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{code:K.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?jD.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{code:K.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?ND(o).test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{code:K.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?_D.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"duration",code:K.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?PD(e.data,o.version)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"ip",code:K.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?TD.test(e.data)||(s=this._getOrReturnCtx(e,s),ne(s,{validation:"base64",code:K.invalid_string,message:o.message}),r.dirty()):Ie.assertNever(o);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:K.invalid_string,...le.errToObj(r)})}_addCheck(e){return new Fn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...le.errToObj(e)})}url(e){return this._addCheck({kind:"url",...le.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...le.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...le.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...le.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...le.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...le.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...le.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...le.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...le.errToObj(e)})}datetime(e){var n,r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(r=e==null?void 0:e.local)!==null&&r!==void 0?r:!1,...le.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...le.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...le.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...le.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...le.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...le.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...le.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...le.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...le.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...le.errToObj(n)})}nonempty(e){return this.min(1,le.errToObj(e))}trim(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Fn.create=t=>{var e;return new Fn({checks:[],typeName:fe.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...xe(t)})};function RD(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,o=parseInt(t.toFixed(s).replace(".","")),i=parseInt(e.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}class Cs extends Ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==re.number){const o=this._getOrReturnCtx(e);return ne(o,{code:K.invalid_type,expected:re.number,received:o.parsedType}),he}let r;const s=new Lt;for(const o of this._def.checks)o.kind==="int"?Ie.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),ne(r,{code:K.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),ne(r,{code:K.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),ne(r,{code:K.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?RD(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),ne(r,{code:K.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),ne(r,{code:K.not_finite,message:o.message}),s.dirty()):Ie.assertNever(o);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,le.toString(n))}gt(e,n){return this.setLimit("min",e,!1,le.toString(n))}lte(e,n){return this.setLimit("max",e,!0,le.toString(n))}lt(e,n){return this.setLimit("max",e,!1,le.toString(n))}setLimit(e,n,r,s){return new Cs({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:le.toString(s)}]})}_addCheck(e){return new Cs({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:le.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:le.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:le.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ie.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Cs.create=t=>new Cs({checks:[],typeName:fe.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...xe(t)});class Es extends Ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==re.bigint){const o=this._getOrReturnCtx(e);return ne(o,{code:K.invalid_type,expected:re.bigint,received:o.parsedType}),he}let r;const s=new Lt;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),ne(r,{code:K.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),ne(r,{code:K.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),ne(r,{code:K.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Ie.assertNever(o);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,le.toString(n))}gt(e,n){return this.setLimit("min",e,!1,le.toString(n))}lte(e,n){return this.setLimit("max",e,!0,le.toString(n))}lt(e,n){return this.setLimit("max",e,!1,le.toString(n))}setLimit(e,n,r,s){return new Es({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:le.toString(s)}]})}_addCheck(e){return new Es({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:le.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Es.create=t=>{var e;return new Es({checks:[],typeName:fe.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...xe(t)})};class il extends Ee{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==re.boolean){const r=this._getOrReturnCtx(e);return ne(r,{code:K.invalid_type,expected:re.boolean,received:r.parsedType}),he}return zt(e.data)}}il.create=t=>new il({typeName:fe.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...xe(t)});class uo extends Ee{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==re.date){const o=this._getOrReturnCtx(e);return ne(o,{code:K.invalid_type,expected:re.date,received:o.parsedType}),he}if(isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return ne(o,{code:K.invalid_date}),he}const r=new Lt;let s;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(s=this._getOrReturnCtx(e,s),ne(s,{code:K.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(s=this._getOrReturnCtx(e,s),ne(s,{code:K.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Ie.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new uo({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:le.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:le.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}uo.create=t=>new uo({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:fe.ZodDate,...xe(t)});class ju extends Ee{_parse(e){if(this._getType(e)!==re.symbol){const r=this._getOrReturnCtx(e);return ne(r,{code:K.invalid_type,expected:re.symbol,received:r.parsedType}),he}return zt(e.data)}}ju.create=t=>new ju({typeName:fe.ZodSymbol,...xe(t)});class al extends Ee{_parse(e){if(this._getType(e)!==re.undefined){const r=this._getOrReturnCtx(e);return ne(r,{code:K.invalid_type,expected:re.undefined,received:r.parsedType}),he}return zt(e.data)}}al.create=t=>new al({typeName:fe.ZodUndefined,...xe(t)});class ll extends Ee{_parse(e){if(this._getType(e)!==re.null){const r=this._getOrReturnCtx(e);return ne(r,{code:K.invalid_type,expected:re.null,received:r.parsedType}),he}return zt(e.data)}}ll.create=t=>new ll({typeName:fe.ZodNull,...xe(t)});class Ri extends Ee{constructor(){super(...arguments),this._any=!0}_parse(e){return zt(e.data)}}Ri.create=t=>new Ri({typeName:fe.ZodAny,...xe(t)});class no extends Ee{constructor(){super(...arguments),this._unknown=!0}_parse(e){return zt(e.data)}}no.create=t=>new no({typeName:fe.ZodUnknown,...xe(t)});class Ir extends Ee{_parse(e){const n=this._getOrReturnCtx(e);return ne(n,{code:K.invalid_type,expected:re.never,received:n.parsedType}),he}}Ir.create=t=>new Ir({typeName:fe.ZodNever,...xe(t)});class Nu extends Ee{_parse(e){if(this._getType(e)!==re.undefined){const r=this._getOrReturnCtx(e);return ne(r,{code:K.invalid_type,expected:re.void,received:r.parsedType}),he}return zt(e.data)}}Nu.create=t=>new Nu({typeName:fe.ZodVoid,...xe(t)});class zn extends Ee{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==re.array)return ne(n,{code:K.invalid_type,expected:re.array,received:n.parsedType}),he;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(i||a)&&(ne(n,{code:i?K.too_big:K.too_small,minimum:a?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ne(n,{code:K.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ne(n,{code:K.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>s.type._parseAsync(new cr(n,i,n.path,a)))).then(i=>Lt.mergeArray(r,i));const o=[...n.data].map((i,a)=>s.type._parseSync(new cr(n,i,n.path,a)));return Lt.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new zn({...this._def,minLength:{value:e,message:le.toString(n)}})}max(e,n){return new zn({...this._def,maxLength:{value:e,message:le.toString(n)}})}length(e,n){return new zn({...this._def,exactLength:{value:e,message:le.toString(n)}})}nonempty(e){return this.min(1,e)}}zn.create=(t,e)=>new zn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:fe.ZodArray,...xe(e)});function Fo(t){if(t instanceof tt){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=ar.create(Fo(r))}return new tt({...t._def,shape:()=>e})}else return t instanceof zn?new zn({...t._def,type:Fo(t.element)}):t instanceof ar?ar.create(Fo(t.unwrap())):t instanceof js?js.create(Fo(t.unwrap())):t instanceof ur?ur.create(t.items.map(e=>Fo(e))):t}class tt extends Ee{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Ie.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==re.object){const c=this._getOrReturnCtx(e);return ne(c,{code:K.invalid_type,expected:re.object,received:c.parsedType}),he}const{status:r,ctx:s}=this._processInputParams(e),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Ir&&this._def.unknownKeys==="strip"))for(const c in s.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const d=o[c],f=s.data[c];l.push({key:{status:"valid",value:c},value:d._parse(new cr(s,f,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof Ir){const c=this._def.unknownKeys;if(c==="passthrough")for(const d of a)l.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(c==="strict")a.length>0&&(ne(s,{code:K.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const d of a){const f=s.data[d];l.push({key:{status:"valid",value:d},value:c._parse(new cr(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const d of l){const f=await d.key,p=await d.value;c.push({key:f,value:p,alwaysSet:d.alwaysSet})}return c}).then(c=>Lt.mergeObjectSync(r,c)):Lt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return le.errToObj,new tt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var s,o,i,a;const l=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=le.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new tt({...this._def,unknownKeys:"strip"})}passthrough(){return new tt({...this._def,unknownKeys:"passthrough"})}extend(e){return new tt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new tt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:fe.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new tt({...this._def,catchall:e})}pick(e){const n={};return Ie.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new tt({...this._def,shape:()=>n})}omit(e){const n={};return Ie.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new tt({...this._def,shape:()=>n})}deepPartial(){return Fo(this)}partial(e){const n={};return Ie.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}),new tt({...this._def,shape:()=>n})}required(e){const n={};return Ie.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof ar;)o=o._def.innerType;n[r]=o}}),new tt({...this._def,shape:()=>n})}keyof(){return $S(Ie.objectKeys(this.shape))}}tt.create=(t,e)=>new tt({shape:()=>t,unknownKeys:"strip",catchall:Ir.create(),typeName:fe.ZodObject,...xe(e)});tt.strictCreate=(t,e)=>new tt({shape:()=>t,unknownKeys:"strict",catchall:Ir.create(),typeName:fe.ZodObject,...xe(e)});tt.lazycreate=(t,e)=>new tt({shape:t,unknownKeys:"strip",catchall:Ir.create(),typeName:fe.ZodObject,...xe(e)});class cl extends Ee{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function s(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new dn(a.ctx.common.issues));return ne(n,{code:K.invalid_union,unionErrors:i}),he}if(n.common.async)return Promise.all(r.map(async o=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(l=>new dn(l));return ne(n,{code:K.invalid_union,unionErrors:a}),he}}get options(){return this._def.options}}cl.create=(t,e)=>new cl({options:t,typeName:fe.ZodUnion,...xe(e)});const yr=t=>t instanceof fl?yr(t.schema):t instanceof Zn?yr(t.innerType()):t instanceof hl?[t.value]:t instanceof Ts?t.options:t instanceof pl?Ie.objectValues(t.enum):t instanceof ml?yr(t._def.innerType):t instanceof al?[void 0]:t instanceof ll?[null]:t instanceof ar?[void 0,...yr(t.unwrap())]:t instanceof js?[null,...yr(t.unwrap())]:t instanceof Sg||t instanceof vl?yr(t.unwrap()):t instanceof gl?yr(t._def.innerType):[];class Rd extends Ee{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==re.object)return ne(n,{code:K.invalid_type,expected:re.object,received:n.parsedType}),he;const r=this.discriminator,s=n.data[r],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(ne(n,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),he)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const s=new Map;for(const o of n){const i=yr(o.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of i){if(s.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);s.set(a,o)}}return new Rd({typeName:fe.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...xe(r)})}}function Cp(t,e){const n=Jr(t),r=Jr(e);if(t===e)return{valid:!0,data:t};if(n===re.object&&r===re.object){const s=Ie.objectKeys(e),o=Ie.objectKeys(t).filter(a=>s.indexOf(a)!==-1),i={...t,...e};for(const a of o){const l=Cp(t[a],e[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===re.array&&r===re.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let o=0;o<t.length;o++){const i=t[o],a=e[o],l=Cp(i,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===re.date&&r===re.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ul extends Ee{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,i)=>{if(Sp(o)||Sp(i))return he;const a=Cp(o.value,i.value);return a.valid?((kp(o)||kp(i))&&n.dirty(),{status:n.value,value:a.data}):(ne(r,{code:K.invalid_intersection_types}),he)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ul.create=(t,e,n)=>new ul({left:t,right:e,typeName:fe.ZodIntersection,...xe(n)});class ur extends Ee{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==re.array)return ne(r,{code:K.invalid_type,expected:re.array,received:r.parsedType}),he;if(r.data.length<this._def.items.length)return ne(r,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),he;!this._def.rest&&r.data.length>this._def.items.length&&(ne(r,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new cr(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(o).then(i=>Lt.mergeArray(n,i)):Lt.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new ur({...this._def,rest:e})}}ur.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ur({items:t,typeName:fe.ZodTuple,rest:null,...xe(e)})};class dl extends Ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==re.object)return ne(r,{code:K.invalid_type,expected:re.object,received:r.parsedType}),he;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in r.data)s.push({key:o._parse(new cr(r,a,r.path,a)),value:i._parse(new cr(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Lt.mergeObjectAsync(n,s):Lt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof Ee?new dl({keyType:e,valueType:n,typeName:fe.ZodRecord,...xe(r)}):new dl({keyType:Fn.create(),valueType:e,typeName:fe.ZodRecord,...xe(n)})}}class Pu extends Ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==re.map)return ne(r,{code:K.invalid_type,expected:re.map,received:r.parsedType}),he;const s=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:s._parse(new cr(r,a,r.path,[c,"key"])),value:o._parse(new cr(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,d=await l.value;if(c.status==="aborted"||d.status==="aborted")return he;(c.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(c.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,d=l.value;if(c.status==="aborted"||d.status==="aborted")return he;(c.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(c.value,d.value)}return{status:n.value,value:a}}}}Pu.create=(t,e,n)=>new Pu({valueType:e,keyType:t,typeName:fe.ZodMap,...xe(n)});class fo extends Ee{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==re.set)return ne(r,{code:K.invalid_type,expected:re.set,received:r.parsedType}),he;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(ne(r,{code:K.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(ne(r,{code:K.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function i(l){const c=new Set;for(const d of l){if(d.status==="aborted")return he;d.status==="dirty"&&n.dirty(),c.add(d.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>o._parse(new cr(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(e,n){return new fo({...this._def,minSize:{value:e,message:le.toString(n)}})}max(e,n){return new fo({...this._def,maxSize:{value:e,message:le.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}fo.create=(t,e)=>new fo({valueType:t,minSize:null,maxSize:null,typeName:fe.ZodSet,...xe(e)});class ci extends Ee{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==re.function)return ne(n,{code:K.invalid_type,expected:re.function,received:n.parsedType}),he;function r(a,l){return Eu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Cu(),Pi].filter(c=>!!c),issueData:{code:K.invalid_arguments,argumentsError:l}})}function s(a,l){return Eu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Cu(),Pi].filter(c=>!!c),issueData:{code:K.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Ai){const a=this;return zt(async function(...l){const c=new dn([]),d=await a._def.args.parseAsync(l,o).catch(y=>{throw c.addIssue(r(l,y)),c}),f=await Reflect.apply(i,this,d);return await a._def.returns._def.type.parseAsync(f,o).catch(y=>{throw c.addIssue(s(f,y)),c})})}else{const a=this;return zt(function(...l){const c=a._def.args.safeParse(l,o);if(!c.success)throw new dn([r(l,c.error)]);const d=Reflect.apply(i,this,c.data),f=a._def.returns.safeParse(d,o);if(!f.success)throw new dn([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ci({...this._def,args:ur.create(e).rest(no.create())})}returns(e){return new ci({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new ci({args:e||ur.create([]).rest(no.create()),returns:n||no.create(),typeName:fe.ZodFunction,...xe(r)})}}class fl extends Ee{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}fl.create=(t,e)=>new fl({getter:t,typeName:fe.ZodLazy,...xe(e)});class hl extends Ee{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ne(n,{received:n.data,code:K.invalid_literal,expected:this._def.value}),he}return{status:"valid",value:e.data}}get value(){return this._def.value}}hl.create=(t,e)=>new hl({value:t,typeName:fe.ZodLiteral,...xe(e)});function $S(t,e){return new Ts({values:t,typeName:fe.ZodEnum,...xe(e)})}class Ts extends Ee{constructor(){super(...arguments),ua.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return ne(n,{expected:Ie.joinValues(r),received:n.parsedType,code:K.invalid_type}),he}if(Tu(this,ua)||OS(this,ua,new Set(this._def.values)),!Tu(this,ua).has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return ne(n,{received:n.data,code:K.invalid_enum_value,options:r}),he}return zt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return Ts.create(e,{...this._def,...n})}exclude(e,n=this._def){return Ts.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}ua=new WeakMap;Ts.create=$S;class pl extends Ee{constructor(){super(...arguments),da.set(this,void 0)}_parse(e){const n=Ie.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==re.string&&r.parsedType!==re.number){const s=Ie.objectValues(n);return ne(r,{expected:Ie.joinValues(s),received:r.parsedType,code:K.invalid_type}),he}if(Tu(this,da)||OS(this,da,new Set(Ie.getValidEnumValues(this._def.values))),!Tu(this,da).has(e.data)){const s=Ie.objectValues(n);return ne(r,{received:r.data,code:K.invalid_enum_value,options:s}),he}return zt(e.data)}get enum(){return this._def.values}}da=new WeakMap;pl.create=(t,e)=>new pl({values:t,typeName:fe.ZodNativeEnum,...xe(e)});class Ai extends Ee{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==re.promise&&n.common.async===!1)return ne(n,{code:K.invalid_type,expected:re.promise,received:n.parsedType}),he;const r=n.parsedType===re.promise?n.data:Promise.resolve(n.data);return zt(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ai.create=(t,e)=>new Ai({type:t,typeName:fe.ZodPromise,...xe(e)});class Zn extends Ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===fe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,o={addIssue:i=>{ne(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(r.data,o);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return he;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?he:l.status==="dirty"||n.value==="dirty"?Xo(l.value):l});{if(n.value==="aborted")return he;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?he:a.status==="dirty"||n.value==="dirty"?Xo(a.value):a}}if(s.type==="refinement"){const i=a=>{const l=s.refinement(a,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?he:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?he:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!sl(i))return i;const a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>sl(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:n.value,value:a})):i);Ie.assertNever(s)}}Zn.create=(t,e,n)=>new Zn({schema:t,typeName:fe.ZodEffects,effect:e,...xe(n)});Zn.createWithPreprocess=(t,e,n)=>new Zn({schema:e,effect:{type:"preprocess",transform:t},typeName:fe.ZodEffects,...xe(n)});class ar extends Ee{_parse(e){return this._getType(e)===re.undefined?zt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ar.create=(t,e)=>new ar({innerType:t,typeName:fe.ZodOptional,...xe(e)});class js extends Ee{_parse(e){return this._getType(e)===re.null?zt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}js.create=(t,e)=>new js({innerType:t,typeName:fe.ZodNullable,...xe(e)});class ml extends Ee{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===re.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ml.create=(t,e)=>new ml({innerType:t,typeName:fe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...xe(e)});class gl extends Ee{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ol(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new dn(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new dn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}gl.create=(t,e)=>new gl({innerType:t,typeName:fe.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...xe(e)});class Ru extends Ee{_parse(e){if(this._getType(e)!==re.nan){const r=this._getOrReturnCtx(e);return ne(r,{code:K.invalid_type,expected:re.nan,received:r.parsedType}),he}return{status:"valid",value:e.data}}}Ru.create=t=>new Ru({typeName:fe.ZodNaN,...xe(t)});const AD=Symbol("zod_brand");class Sg extends Ee{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ol extends Ee{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?he:o.status==="dirty"?(n.dirty(),Xo(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?he:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new Ol({in:e,out:n,typeName:fe.ZodPipeline})}}class vl extends Ee{_parse(e){const n=this._def.innerType._parse(e),r=s=>(sl(s)&&(s.value=Object.freeze(s.value)),s);return ol(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}vl.create=(t,e)=>new vl({innerType:t,typeName:fe.ZodReadonly,...xe(e)});function FS(t,e={},n){return t?Ri.create().superRefine((r,s)=>{var o,i;if(!t(r)){const a=typeof e=="function"?e(r):typeof e=="string"?{message:e}:e,l=(i=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:!0,c=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...c,fatal:l})}}):Ri.create()}const ID={object:tt.lazycreate};var fe;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(fe||(fe={}));const OD=(t,e={message:`Input not instance of ${t.name}`})=>FS(n=>n instanceof t,e),US=Fn.create,BS=Cs.create,MD=Ru.create,LD=Es.create,VS=il.create,DD=uo.create,$D=ju.create,FD=al.create,UD=ll.create,BD=Ri.create,VD=no.create,zD=Ir.create,WD=Nu.create,HD=zn.create,qD=tt.create,KD=tt.strictCreate,GD=cl.create,ZD=Rd.create,YD=ul.create,QD=ur.create,JD=dl.create,XD=Pu.create,e$=fo.create,t$=ci.create,n$=fl.create,r$=hl.create,s$=Ts.create,o$=pl.create,i$=Ai.create,N0=Zn.create,a$=ar.create,l$=js.create,c$=Zn.createWithPreprocess,u$=Ol.create,d$=()=>US().optional(),f$=()=>BS().optional(),h$=()=>VS().optional(),p$={string:t=>Fn.create({...t,coerce:!0}),number:t=>Cs.create({...t,coerce:!0}),boolean:t=>il.create({...t,coerce:!0}),bigint:t=>Es.create({...t,coerce:!0}),date:t=>uo.create({...t,coerce:!0})},m$=he;var Po=Object.freeze({__proto__:null,defaultErrorMap:Pi,setErrorMap:mD,getErrorMap:Cu,makeIssue:Eu,EMPTY_PATH:gD,addIssueToContext:ne,ParseStatus:Lt,INVALID:he,DIRTY:Xo,OK:zt,isAborted:Sp,isDirty:kp,isValid:sl,isAsync:ol,get util(){return Ie},get objectUtil(){return _p},ZodParsedType:re,getParsedType:Jr,ZodType:Ee,datetimeRegex:DS,ZodString:Fn,ZodNumber:Cs,ZodBigInt:Es,ZodBoolean:il,ZodDate:uo,ZodSymbol:ju,ZodUndefined:al,ZodNull:ll,ZodAny:Ri,ZodUnknown:no,ZodNever:Ir,ZodVoid:Nu,ZodArray:zn,ZodObject:tt,ZodUnion:cl,ZodDiscriminatedUnion:Rd,ZodIntersection:ul,ZodTuple:ur,ZodRecord:dl,ZodMap:Pu,ZodSet:fo,ZodFunction:ci,ZodLazy:fl,ZodLiteral:hl,ZodEnum:Ts,ZodNativeEnum:pl,ZodPromise:Ai,ZodEffects:Zn,ZodTransformer:Zn,ZodOptional:ar,ZodNullable:js,ZodDefault:ml,ZodCatch:gl,ZodNaN:Ru,BRAND:AD,ZodBranded:Sg,ZodPipeline:Ol,ZodReadonly:vl,custom:FS,Schema:Ee,ZodSchema:Ee,late:ID,get ZodFirstPartyTypeKind(){return fe},coerce:p$,any:BD,array:HD,bigint:LD,boolean:VS,date:DD,discriminatedUnion:ZD,effect:N0,enum:s$,function:t$,instanceof:OD,intersection:YD,lazy:n$,literal:r$,map:XD,nan:MD,nativeEnum:o$,never:zD,null:UD,nullable:l$,number:BS,object:qD,oboolean:h$,onumber:f$,optional:a$,ostring:d$,pipeline:u$,preprocess:c$,promise:i$,re
600cord:JD,set:e$,strictObject:KD,string:US,symbol:$D,transformer:N0,tuple:QD,undefined:FD,union:GD,unknown:VD,void:WD,NEVER:m$,ZodIssueCode:K,quotelessJson:pD,ZodError:dn});const g$=Po.object({name:Po.string().min(2,"Name must be at least 2 characters"),company_name:Po.string().min(2,"Company name must be at least 2 characters"),purpose_of_chatbot:Po.string().min(5,"Please describe the purpose"),email:Po.string().email("Please enter a valid email address"),phone_number:Po.string().optional()}),v$=()=>{const[t,e]=h.useState(!1),[n,r]=h.useState(!1),{toast:s}=Ju(),o=oD({resolver:hD(g$),defaultValues:{name:"",company_name:"",purpose_of_chatbot:"",email:"",phone_number:""}}),i=async a=>{r(!0);try{const l={name:a.name,company_name:a.company_name,purpose_of_chatbot:a.purpose_of_chatbot,email:a.email,phone_number:a.phone_number||null},{error:c}=await wp.from("demo_requests").insert(l);if(c)throw c;const{error:d}=await wp.functions.invoke("send-demo-notification",{body:a});if(d)throw d;s({title:"Demo request submitted!",description:"We'll get back to you shortly with demo details."}),o.reset(),e(!1)}catch(l){console.error("Error submitting demo request:",l),s({title:"Error",description:"Failed to submit demo request. Please try again.",variant:"destructive"})}finally{r(!1)}};return u.jsxs(yu,{open:t,onOpenChange:e,children:[u.jsx(wu,{asChild:!0,children:u.jsx(Ze,{size:"lg",className:"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white px-8 py-4 text-lg font-semibold shadow-lg hover:shadow-xl transition-all duration-300 transform hover:scale-105",children:"Book a Demo"})}),u.jsxs(rl,{className:"sm:max-w-[500px]",children:[u.jsx(uS,{children:u.jsx(dS,{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent text-center",children:"Book Your Demo"})}),u.jsx(lD,{...o,children:u.jsxs("form",{onSubmit:o.handleSubmit(i),className:"space-y-4",children:[u.jsx(ra,{control:o.control,name:"name",render:({field:a})=>u.jsxs(Mo,{children:[u.jsx(Lo,{children:"Name *"}
600),u.jsx(Do,{children:u.jsx(at,{placeholder:"Your full name",...a})}),u.jsx($o,{})]})}),u.jsx(ra,{control:o.control,name:"company_name",render:({field:a})=>u.jsxs(Mo,{children:[u.jsx(Lo,{children:"Company Name *"}),u.jsx(Do,{children:u.jsx(at,{placeholder:"Your company name",...a})}),u.jsx($o,{})]})}),u.jsx(ra,{control:o.control,name:"purpose_of_chatbot",render:({field:a})=>u.jsxs(Mo,{children:[u.jsx(Lo,{children:"Purpose of Chatbot *"}),u.jsx(Do,{children:u.jsx(Cd,{placeholder:"e.g., Appointment Booking, Answer FAQs, Customer Support, Lead Generation...",className:"min-h-[80px]",...a})}),u.jsx($o,{})]})}),u.jsx(ra,{control:o.control,name:"email",render:({field:a})=>u.jsxs(Mo,{children:[u.jsx(Lo,{children:"Email *"}),u.jsx(Do,{children:u.jsx(at,{placeholder:"[email protected]",type:"email",...a})}),u.jsx($o,{})]})}),u.jsx(ra,{control:o.control,name:"phone_number",render:({field:a})=>u.jsxs(Mo,{children:[u.jsx(Lo,{children:"Phone Number (Optional)"}),u.jsx(Do,{children:u.jsx(at,{placeholder:"+1 (555) 123-4567",...a})}),u.jsx($o,{})]})}),u.jsx(Ze,{type:"submit",className:"w-full bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700",disabled:n,children:n?u.jsxs(u.Fragment,{children:[u.jsx(T2,{className:"mr-2 h-4 w-4 animate-spin"}),"Submitting..."]}):"Submit Demo Request"})]})})]})]})},y$=({onViewExample:t})=>u.jsxs("div",{className:"relative overflow-hidden",children:[u.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-50 via-indigo-50 to-purple-50 dark:from-gray-900 dark:via-blue-900 dark:to-purple-900 opacity-50"}),u.jsxs("div",{className:"absolute inset-0",children:[u.jsx("div",{className:"absolute top-20 left-20 w-32 h-32 bg-blue-400 rounded-full mix-blend-multiply filter blur-xl opacity-20 animate-pulse"}),u.jsx("div",{className:"absolute top-40 right-20 w-32 h-32 bg-purple-400 rounded-full mix-blend-multiply filter blur-xl opacity-20 animate-pulse animation-delay-1000"}),u.jsx("div",{className:"absolute bottom-20 left-40 w-32 h-32 bg-pink-400 rounded-full mix-blend-multiply filter blur-xl opacity-20 animate-pulse animation-delay-2000"})]}),u.jsx("div",{className:"relative max-w-7xl mx-auto px-6 py-24 text-center",children:u.jsxs("div",{className:"animate-fade-in",children:[u.jsx("h1",{className:"text-6xl md:text-7xl font-bold mb-2 bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600 bg-clip-text text-transparent leading-tight py-4 text-center",children:"NeuroChat"}),u.jsx("div",{className:"mb-8",children:u.jsx("p",{className:"text-lg md:text-xl text-muted-foreground/80 font-medium",children:"Enterprise Level Chatbots Powered by ToraTech AI"})}),u.jsx("p",{className:"text-xl md:text-2xl text-muted-foreground mb-8 max-w-4xl mx-auto leading-relaxed text-center",children:"Add an intelligent chatbot to any website with minimal code. Automatically trained on your company's data, processes, and guidelines."}),u.jsx("div",{className:"bg-muted/30 border border-border px-6 py-3 rounded-md mb-8 mx-auto max-w-lg",children:u.jsxs("div",{className:"flex items-center justify-center gap-2 text-muted-foreground",children:[u.jsx(Fb,{className:"w-4 h-4"}),u.jsx("p",{className:"text-sm",children:"Test our chatbot using the widget in the bottom right corner"})]})}),u.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center items-center mb-12",children:[u.jsx(v$,{}),u.jsx(t_,{to:"/voice-agent",children:u.jsxs(Ze,{variant:"outline",size:"lg",className:"gap-2",children:[u.jsx(od,{className:"w-4 h-4"}),"Voice Agent"]})})]}),u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 max-w-4xl mx-auto",children:[{number:"5+",label:"Frameworks Supported"},{number:"2min",label:"Setup Time"},{number:"100%",label:"Customizable"}].map((e,n)=>u.jsx("div",{className:"text-center animate-fade-in",style:{animationDelay:`${n*200}ms`}},e.label))})]})})]}),Sn=h.forwardRef(({className:t,...e},n)=>u.jsx("div",{ref:n,className:be("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));Sn.displayName="Card";const gs=h.forwardRef(({className:t,...e},n)=>u.jsx("div",{ref:n,className:be("flex flex-col space-y-1.5 p-6",t),...e}));
600gs.displayName="CardHeader";const vs=h.forwardRef(({className:t,...e},n)=>u.jsx("h3",{ref:n,className:be("text-2xl font-semibold leading-none tracking-tight",t),...e}));vs.displayName="CardTitle";const kg=h.forwardRef(({className:t,...e},n)=>u.jsx("p",{ref:n,className:be("text-sm text-muted-foreground",t),...e}));kg.displayName="CardDescription";const Wn=h.forwardRef(({className:t,...e},n)=>u.jsx("div",{ref:n,className:be("p-6 pt-0",t),...e}));Wn.displayName="CardContent";const w$=h.forwardRef(({className:t,...e},n)=>u.jsx("div",{ref:n,className:be("flex items-center p-6 pt-0",t),...e}));w$.displayName="CardFooter";const x$=()=>{const t=[{icon:A2,title:"Shopping Assistant",description:"Help website visitors find products that suit their needs, provide recommendations, and answer product questions",color:"from-green-500 to-emerald-500"},{icon:$b,title:"Customer Service",description:"24/7 support for common questions, escalating complex issues to humans",color:"from-blue-500 to-cyan-500"},{icon:Mb,title:"Appointment Booking",description:"Schedule appointments, check availability, and send confirmations automatically",color:"from-purple-500 to-violet-500"},{icon:E2,title:"Healthcare Support",description:"Answer patient questions, appointment scheduling, and basic health info",color:"from-pink-500 to-rose-500"},{icon:g2,title:"Lead Generation",description:"Qualify prospects, collect contact info, and route to sales teams",color:"from-orange-500 to-amber-500"},{icon:C2,title:"Educational Support",description:"Help students with course info, assignments, and academic resources",color:"from-indigo-500 to-blue-500"}],e=[{icon:x2,title:"2-Minute Setup",description:"Get your chatbot running in under 2 minutes with our simple integration"},{icon:Wb,title:"Lightning Fast",description:"Optimized for performance with instant responses and smooth animations"}];return u.jsx("div",{className:"py-24 bg-gradient-to-br from-gray-50 to-blue-50 dark:from-gray-900 dark:to-blue-950",children:u.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[u.jsxs("div",{className:"text-center mb-16 animate-fade-in",children:[u.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-6 bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent text-center py-[7px]",children:"Perfect for Every Industry"}),u.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto text-center",children:"Our chatbots are built for your specific needs, whether you're in retail, healthcare, education, or any other industry requiring customer interaction."})]}),u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-16",children:t.map((n,r)=>u.jsxs(Sn,{className:"group hover:shadow-xl transition-all duration-300 hover:-translate-y-2 border-0 bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm animate-fade-in",style:{animationDelay:`${r*100}ms`},children:[u.jsxs(gs,{className:"text-center pb-4",children:[u.jsx("div",{className:`w-16 h-16 mx-auto mb-4 rounded-2xl bg-gradient-to-br ${n.color} flex items-center justify-center transform group-hover:scale-110 transition-transform duration-300`,children:u.jsx(n.icon,{className:"w-8 h-8 text-white"})}),u.jsx(vs,{className:"text-xl font-semibold",children:n.title})]}),u.jsx(Wn,{children:u.jsx("p",{className:"text-muted-foreground text-center leading-relaxed",children:n.description})})]},n.title))}),u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 max-w-4xl mx-auto",children:e.map((n,r)=>u.jsx(Sn,{className:"group hover:shadow-xl transition-all duration-300 hover:-translate-y-2 border-0 bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm animate-fade-in",style:{animationDelay:`${(t.length+r)*100}ms`}},n.title))})]})})},b$=rd("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Cg({className:t,variant:e,...n}){return u.jsx("div",{className:be(b$({variant:e}),t),...n})}const _$=()=>{const[t,e]=h.useState(0),n=[{icon:S2,title:"Requirements Gathering",description:"We collect your basic 
600information and understand your chatbot goals",details:"We start by understanding what you want your bot to achieve, then gather your FAQs, product information, services, opening hours, and any other context needed to make your bot an expert on your company.",color:"from-blue-500 to-cyan-500"},{icon:Db,title:"Knowledge Base Creation",description:"We build and vectorize your company's knowledge base",details:"We process your website content, documents, and information to create a comprehensive, searchable knowledge base. Our system vectorizes this data so your bot becomes a true expert on your business.",color:"from-green-500 to-emerald-500"},{icon:ly,title:"Development & Integration",description:"We build your custom chatbot and integrate with your existing tools",details:"We develop a branded chatbot tailored to your needs and seamlessly integrate it with your existing platforms - whether that's Google Calendar for bookings, Slack for reports, Airtable CRM, or any other tools you use.",color:"from-orange-500 to-amber-500"},{icon:id,title:"Bot Configuration & Customization",description:"We customize the chatbot's appearance, behavior, and functionality to match your brand",details:"We configure everything from the chatbot's colors, logo, and positioning to its tone of conversation and welcome messages. The bot can be set up to handle multilingual interactions, form submissions, appointment bookings, and integrate with your specific business workflows.",color:"from-purple-500 to-violet-500"},{icon:M2,title:"Testing & Training Environment",description:"We provide you with a sandbox to test and refine your bot",details:"You get access to a private testing environment where you can interact with your bot, refine its responses, and train it further. This ensures everything works perfectly before launch.",color:"from-pink-500 to-rose-500"},{icon:N2,title:"Launch & Deployment",description:"We deploy your chatbot and ensure a smooth go-live",details:"We handle the complete deployment process and monitor the initial launch to ensure your customers have a flawless experience from day one.",color:"from-indigo-500 to-blue-500"},{icon:$b,title:"Ongoing Monitoring & Support",description:"We continuously monitor and optimize your bot's performance",details:"Our backend systems audit every conversation transcript and run ongoing tests to ensure your bot always provides accurate, helpful responses. We're here for continuous support and improvements.",color:"from-teal-500 to-cyan-500"}];return u.jsx("div",{className:"min-h-screen py-24 bg-gradient-to-br from-slate-50 to-gray-50 dark:from-slate-900 dark:to-gray-950 flex items-center",children:u.jsxs("div",{className:"max-w-7xl mx-auto px-6 w-full",children:[u.jsxs("div",{className:"text-center mb-16 animate-fade-in",children:[u.jsxs(Cg,{className:"mb-4 px-4 py-2 bg-gradient-to-r from-slate-500 to-gray-500 text-white border-0",children:[u.jsx(ly,{className:"w-4 h-4 mr-2"}),"Our Process"]}),u.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-6 bg-gradient-to-r from-slate-600 to-gray-600 bg-clip-text text-transparent text-center",children:"What We Do"}),u.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto text-center",children:"We handle everything from initial setup to ongoing optimization, creating AI-powered chatbots that become true experts on your business and integrate seamlessly with your existing workflows."})]}),u.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-start",children:[u.jsx("div",{className:"space-y-4 flex flex-col justify-center py-8",style:{paddingTop:"25px",paddingBottom:"25px"},children:u.jsx("div",{className:"space-y-3 py-6",children:n.map((r,s)=>u.jsx("div",{onClick:()=>e(s),className:`p-4 rounded-xl border-2 transition-all duration-300 cursor-pointer group ${t===s?"border-primary bg-primary/5 shadow-md":"border-border hover:border-primary/50 bg-card"}`,children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center space-x-4",children:[u.jsx("div",{className:`w-8 h-8 rounded-lg bg-gradient-to-br ${r.color} flex items-center justify-center flex-shrink-0`,children:u.jsx("span",{className:"text-white font-bold text-sm",children:String(s+1).padStart(2,"0")})}),u.jsx("div",{children:u.jsx("h4",{className:`font-semibold transition-colors ${t===s?"text-primary":"text-foreground"}`,children:r.title})})]}),u.jsx(m2,{className:`w-5 h-5 transition-all duration-300 ${t===s?"text-primary translate-x-1":"text-muted-foreground group-hover:translate-x-1"}`})]})},r.title))})}),u.jsx("div",{className:"flex items-start justify-center h-full max-h-[500px] py-8",children:u.jsx(Sn,{className:"border-2 hover:border-primary/50 transition-all duration-500 overflow-hidden w-full max-w-lg min-h-[600px] flex flex-col",children:u.jsxs(Wn,{className:"p-8 flex-1 flex flex-col justify-center",children:[u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:`w-16 h-16 rounded-2xl bg-gradient-to-br ${n[t].color} flex items-center justify-center mb-4`,children:L.createElement(n[t].icon,{className:"w-8 h-8 text-white"})}),u.jsx("h3",{className:"text-2xl font-bold text-foreground mb-3",children:n[t].title}),u.jsx("p",{className:"text-lg text-muted-foreground mb-6",children:n[t].description}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:n[t].details})]}),u.jsx("div",{className:"flex space-x-2 mt-8",children:n.map((r,s)=>u.jsx("div",{className:`h-2 rounded-full transition-all duration-300 ${s===t?"bg-primary flex-1":"bg-muted w-2"}`},s))})]})})})]})]})})},S$=()=>{const t=[{icon:k2,title:"Domain Validation with CORS",description:"Our chatbot validates allowed domains using Cross-Origin Resource Sharing (CORS) to ensure that the bot script runs only on approved web properties.",color:"from-cyan-500 to-blue-500"}
vendor: 4,959 bytes, line 600
600,{icon:L2,title:"Session-Based Access Management",description:"Each conversation is tied to a unique session identifier, enabling contextual understanding while helping isolate user data securely during the chat flow.",color:"from-green-500 to-emerald-500"},{icon:j2,title:"Data Encryption",description:"All messages exchanged between the user and the bot are encrypted in transit. Sensitive data is encrypted at rest and contextualized using session-based logic to prevent unauthorized access.",color:"from-orange-500 to-amber-500"},{icon:Db,title:"Minimal Data Retention",description:"We do not persist unnecessary user data. Only essential session-based data may be temporarily retained for performance, analytics, or product improvement, depending on the configuration.",color:"from-pink-500 to-rose-500"},{icon:qh,title:"Bot Visibility Controls",description:"Bot visibility and interaction logic can be customized per domain or page-level permissions, reducing unnecessary exposure and risk of misuse.",color:"from-indigo-500 to-blue-500"},{icon:R2,title:"Flexible Hosting and Isolation Options",description:"Depending on your infrastructure or compliance requirements, we offer deployment flexibility including private cloud or containerized hosting.",color:"from-teal-500 to-cyan-500"},{icon:Wb,title:"Enterprise-Grade Scalability",description:"Our infrastructure scales seamlessly with your needs. We customize our servers and deployment architecture to handle your specific requirements and traffic volumes.",color:"from-purple-500 to-violet-500"},{icon:w2,title:"API Request Signing & Rate Limiting",description:"API communications follow request signing and throttling techniques to protect against abuse and ensure uptime under load.",color:"from-emerald-500 to-green-500"},{icon:_2,title:"Auditable Logging",description:"For enterprise clients, we offer activity logging for chatbot interactions to meet audit and compliance goals—without compromising user privacy.",color:"from-violet-500 to-purple-500"}];return u.jsx("div",{className:"min-h-screen py-12 bg-gradient-to-br from-slate-50 to-gray-50 dark:from-slate-900 dark:to-gray-950 flex items-center",children:u.jsxs("div",{className:"max-w-7xl mx-auto px-6 w-full",children:[u.jsxs("div",{className:"text-center mb-12 animate-fade-in",children:[u.jsxs(Cg,{className:"mb-4 px-4 py-2 bg-gradient-to-r from-red-500 to-pink-500 text-white border-0",children:[u.jsx(qh,{className:"w-4 h-4 mr-2"}),"Security & Privacy"]}),u.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-6 bg-gradient-to-r from-slate-600 to-gray-600 bg-clip-text text-transparent leading-tight px-0 text-center",children:"Security & Privacy"}),u.jsx("p",{className:"text-xl text-muted-foreground max-w-4xl mx-auto text-center",children:"We understand that security and privacy are critical—especially when integrating intelligent systems into healthcare, food chains, and other sensitive digital environments. Our chatbot solution is thoughtfully designed with a security-first approach, implementing the following measures to safeguard interactions:"})]}),u.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:t.map((e,n)=>u.jsx(Sn,{className:"border-2 hover:border-primary/50 transition-all duration-300 group h-full",children:u.jsx(Wn,{className:"p-6 h-full flex flex-col",children:u.jsxs("div",{className:"flex items-start space-x-4 flex-1",children:[u.jsx("div",{className:`w-12 h-12 rounded-xl bg-gradient-to-br ${e.color} flex items-center justify-center flex-shrink-0`,children:L.createElement(e.icon,{className:"w-6 h-6 text-white"})}),u.jsxs("div",{className:"flex-1",children:[u.jsx("h3",{className:"text-lg font-bold text-foreground mb-3 leading-tight",children:e.title}),u.jsx("p",{className:"text-muted-foreground leading-relaxed text-sm",children:e.description})]})]})})},e.title))})]})})};var k$=h.createContext(void 0);function Ml(t){const e=h.useContext(k$);return t||e||"ltr"}var Hf="rovingFocusGroup.onEntryFocus",C$={bubbles:!1,cancelable:!0},Ad="RovingFocusGroup",[Ep,zS,E$]=Cl(Ad),[T$,WS]=Mr(Ad,[E$]),[j$,N$]=T$(Ad),HS=h.forwardRef((t,e)=>u.jsx(Ep.Provider,{scope:t.__scopeRovingFocusGroup,children:u.jsx(Ep.Slot,{scope:t.__scopeRovingFocusGroup,children:u.jsx(P$,{...t,ref:e})})}));HS.displayName=Ad;var P$=h.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=t,p=h.useRef(null),y=Te(e,p),x=Ml(o),[v=null,b]=qn({prop:i,defaultProp:a,onChange:l}),[g,m]=h.useState(!1),w=St(c),_=zS(n),S=h.useRef(!1),[C,k]=h.useState(0);return h.useEffect(()=>{const T=p.current;if(T)return T.addEventListener(Hf,w),()=>T.removeEventListener(Hf,w)},[w]),u.jsx(j$,{scope:n,orientation:r,dir:x,loop:s,currentTabStopId:v,onItemFocus:h.useCallback(T=>b(T),[b]),onItemShiftTab:h.useCallback(()=>m(!0),[]),onFocusableItemAdd:h.useCallback(()=>
vendor: 6,132 bytes, lines 600-615
600k(T=>T+1),[]),onFocusableItemRemove:h.useCallback(()=>k(T=>T-1),[]),children:u.jsx(ce.div,{tabIndex:g||C===0?-1:0,"data-orientation":r,...f,ref:y,style:{outline:"none",...t.style},onMouseDown:ae(t.onMouseDown,()=>{S.current=!0}),onFocus:ae(t.onFocus,T=>{const I=!S.current;if(T.target===T.currentTarget&&I&&!g){const P=new CustomEvent(Hf,C$);if(T.currentTarget.dispatchEvent(P),!P.defaultPrevented){const D=_().filter(B=>B.focusable),R=D.find(B=>B.active),M=D.find(B=>B.id===v),z=[R,M,...D].filter(Boolean).map(B=>B.ref.current);GS(z,d)}}S.current=!1}),onBlur:ae(t.onBlur,()=>m(!1))})})}),qS="RovingFocusGroupItem",KS=h.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,...i}=t,a=Vn(),l=o||a,c=N$(qS,n),d=c.currentTabStopId===l,f=zS(n),{onFocusableItemAdd:p,onFocusableItemRemove:y}=c;return h.useEffect(()=>{if(r)return p(),()=>y()},[r,p,y]),u.jsx(Ep.ItemSlot,{scope:n,id:l,focusable:r,active:s,children:u.jsx(ce.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...i,ref:e,onMouseDown:ae(t.onMouseDown,x=>{r?c.onItemFocus(l):x.preventDefault()}),onFocus:ae(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:ae(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){c.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const v=I$(x,c.orientation,c.dir);if(v!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let g=f().filter(m=>m.focusable).map(m=>m.ref.current);if(v==="last")g.reverse();else if(v==="prev"||v==="next"){v==="prev"&&g.reverse();const m=g.indexOf(x.currentTarget);g=c.loop?O$(g,m+1):g.slice(m+1)}setTimeout(()=>GS(g))}})})})});KS.displayName=qS;var R$={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function A$(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function I$(t,e,n){const r=A$(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return R$[r]}function GS(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function O$(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var M$=HS,L$=KS,Eg="Tabs",[D$,q4]=Mr(Eg,[WS]),ZS=WS(),[$$,Tg]=D$(Eg),YS=h.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:o,orientation:i="horizontal",dir:a,activationMode:l="automatic",...c}=t,d=Ml(a),[f,p]=qn({prop:r,onChange:s,defaultProp:o});return u.jsx($$,{scope:n,baseId:Vn(),value:f,onValueChange:p,orientation:i,dir:d,activationMode:l,children:u.jsx(ce.div,{dir:d,"data-orientation":i,...c,ref:e})})});YS.displayName=Eg;var QS="TabsList",JS=h.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...s}=t,o=Tg(QS,n),i=ZS(n);return u.jsx(M$,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:r,children:u.jsx(ce.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:e})})});JS.displayName=QS;var XS="TabsTrigger",ek=h.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...o}=t,i=Tg(XS,n),a=ZS(n),l=rk(i.baseId,r),c=sk(i.baseId,r),d=r===i.value;return u.jsx(L$,{asChild:!0,...a,focusable:!s,active:d,children:u.jsx(ce.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...o,ref:e,onMouseDown:ae(t.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:ae(t.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:ae(t.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!s&&f&&i.onValueChange(r)})})})});ek.displayName=XS;var tk="TabsContent",nk=h.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:s,children:o,...i}=t,a=Tg(tk,n),l=rk(a.baseId,r),c=sk(a.baseId,r),d=r===a.value,f=h.useRef(d);return h.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),u.jsx(ed,{present:s||d,children:({present:p})=>u.jsx(ce.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:c,tabIndex:0,...i,ref:e,style:{...t.style,animationDuration:f.current?"0s":void 0},children:p&&o})})});nk.displayName=tk;function rk(t,e){return`${t}-trigger-${e}`}function sk(t,e){return`${t}-content-${e}`}var F$=YS,ok=JS,ik=ek,ak=nk;const lk=F$,jg=h.forwardRef(({className:t,...e},n)=>u.jsx(ok,{ref:n,className:be("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...e}));jg.displayName=ok.displayName;const xn=h.forwardRef(({className:t,...e},n)=>u.jsx(ik,{ref:n,className:be("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...e}));xn.displayName=ik.displayName;const Ng=h.forwardRef(({className:t,...e},n)=>u.jsx(ak,{ref:n,className:be("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));Ng.displayName=ak.displayName;const U$=()=>{const[t,e]=h.useState(null),n=async(s,o)=>{try{await navigator.clipboard.writeText(s),e(o),setTimeout(()=>e(null),2e3)}catch(i){console.error("Failed to copy text: ",i)}},r={html:`<!-- Include the CSS and JS files -->
601<link rel="stylesheet" href="https://chirodashboard-chat.onrender.com/chatbot-widget.css">
602<script src="https://chirodashboard-chat.onrender.com/chatbot-widget.js"><\/script>
603
604<!-- Initialize the widget using ChatbotManager -->
605<script>
606  const instance = new window.ChatbotWidget.ChatbotManager();
607  instance.init({
608    webhookUrl: 'YOUR_WEBHOOK_URL',
609    title: 'Chat Support',
610    placeholder: 'Type your message...',
611    position: 'bottom-right',
612    primaryColor: '#3b82f6',
613    secondaryColor: '#f3f4f6',
614    textColor: '#1f2937',
615    userTextColor: '#ffffff',
616    chatBackground: '#ffffff',
617    welcomeMessage: 'Hello! How can I help you today?',
618    logoUrl: 'YOUR_LOGO_URL'
619  });
620<\/script>`,react:`// First, load the CSS and JS files in your index.html or component
621import { useEffect, useRef } from 'react';
622
623const ChatbotIntegration = () => {
624  const instanceRef = useRef(null);
625
626  useEffect(() => {
627    // Load CSS
628    const cssLink = document.createElement('link');
629    cssLink.rel = 'stylesheet';
630    cssLink.href = 'https://chirodashboard-chat.onrender.com/chatbot-widget.css';
631    document.head.appendChild(cssLink);
632
633    // Load JS
634    const script = document.createElement('script');
635    script.src = 'https://chirodashboard-chat.onrender.com/chatbot-widget.js';
636    script.onload = () => {
637      // Create instance using ChatbotManager
638      instanceRef.current = new window.ChatbotWidget.ChatbotManager();
639      instanceRef.current.init({
640        webhookUrl: 'YOUR_WEBHOOK_URL',
641        title: 'Chat Support',
642        position: 'bottom-right',
643        primaryColor: '#3b82f6',
644        welcomeMessage: 'Hello! How can I help you today?'
645      });
646    };
647    document.body.appendChild(script);
648
649    return () => {
650      // Cleanup
651      if (instanceRef.current) {
652        instanceRef.current.destroy();
653      }
654      document.head.removeChild(cssLink);
655      document.body.removeChild(script);
656    };
657  }, []);
658
659  return <div>Your React App Content</div>;
660};`,vue:`<!-- Vue.js Integration -->
661<template>
662  <div>
663    <!-- Your Vue app content -->
664  </div>
665</template>
666
667<script>
668export default {
669  name: 'ChatbotIntegration',
670  data() {
671    return {
672      chatbotInstance: null
673    };
674  },
675  mounted() {
676    this.loadChatbot();
677  },
678  beforeUnmount() {
679    if (this.chatbotInstance) {
680      this.chatbotInstance.destroy();
681    }
682  },
683  methods: {
684    loadChatbot() {
685      // Load CSS
686      const cssLink = document.createElement('link');
687      cssLink.rel = 'stylesheet';
688      cssLink.href = 'https://chirodashboard-chat.onrender.com/chatbot-widget.css';
689      document.head.appendChild(cssLink);
690
691      // Load JS
692      const script = document.createElement('script');
693      script.src = 'https://chirodashboard-chat.onrender.com/chatbot-widget.js';
694      script.onload = () => {
695        // Create instance using ChatbotManager
696        this.chatbotInstance = new window.ChatbotWidget.ChatbotManager();
697        this.chatbotInstance.init({
698          webhookUrl: 'YOUR_WEBHOOK_URL',
699          title: 'Chat Support',
700          position: 'bottom-right',
701          primaryColor: '#3b82f6',
702          welcomeMessage: 'Hello! How can I help you today?'
703        });
704      };
705      document.body.appendChild(script);
706    }
707  }
708};
709<\/script>`,dotnet:`@* Add to your Razor page or layout *@
710<link rel="stylesheet" href="https://chirodashboard-chat.onrender.com/chatbot-widget.css" />
711<script src="https://chirodashboard-chat.onrender.com/chatbot-widget.js"><\/script>
712
713<script>
714document.addEventListener('DOMContentLoaded', function() {
715    if (window.ChatbotWidget) {
716        // Create instance using ChatbotManager
717        const instance = new window.ChatbotWidget.ChatbotManager();
718        instance.init({
719            webhookUrl: '@ViewBag.WebhookUrl', // From your controller
720            title: 'Chat Support',
721            placeholder: 'Type your message...',
722            position: 'bottom-right',
723            primaryColor: '#3b82f6',
724            secondaryColor: '#f3f4f6',
725            textColor: '#1f2937',
726            userTextColor: '#ffffff',
727            chatBackground: '#ffffff',
728            welcomeMessage: 'Hello! How can I help you today?',
729            logoUrl: '@ViewBag.LogoUrl'
730        });
731    }
732});
733<\/script>
734
735@* In your controller *@
736@* 
737public IActionResult Index()
738{
739    ViewBag.WebhookUrl = "YOUR_WEBHOOK_URL";
740    ViewBag.LogoUrl = "YOUR_LOGO_URL";
741    return View();
742}
743*@`,angular:`// chatbot.service.ts
744import { Injectable } from '@angular/core';
745
746@Injectable({
747  providedIn: 'root'
748})
749export class ChatbotService {
750  private scriptLoaded = false;
751  private cssLoaded = false;
752  private chatbotInstance: any = null;
753
754  loadChatbot(config: any): Promise<void> {
755    return new Promise((resolve, reject) => {
756      if (!this.cssLoaded) {
757        this.loadCSS();
758      }
759      
760      if (!this.scriptLoaded) {
761        this.loadScript().then(() => {
762          this.initializeChatbot(config);
763          resolve();
764        }).catch(reject);
765      } else {
766        this.initializeChatbot(config);
767        resolve();
768      }
769    });
770  }
771
772  private loadCSS(): void {
773    const cssLink = document.createElement('link');
774    cssLink.rel = 'stylesheet';
775    cssLink.href = 'https://chirodashboard-chat.onrender.com/chatbot-widget.css';
776    document.head.appendChild(cssLink);
777    this.cssLoaded = true;
778  }
779
780  private loadScript(): Promise<void> {
781    return new Promise((resolve, reject) => {
782      const script = document.createElement('script');
783      script.src = 'https://chirodashboard-chat.onrender.com/chatbot-widget.js';
784      script.onload = () => {
785        this.scriptLoaded = true;
786        resolve();
787      };
788      script.onerror = reject;
789      document.body.appendChild(script);
790    });
791  }
792
793  private initializeChatbot(config: any): void {
794    if ((window as any).ChatbotWidget) {
795      // Create instance using ChatbotManager
796      this.chatbotInstance = new (window as any).ChatbotWidget.ChatbotManager();
797      this.chatbotInstance.init(config);
798    }
799  }
800
801  destroy(): void {
802    if (this.chatbotInstance) {
803      this.chatbotInstance.destroy();
804      this.chatbotInstance = null;
805    }
806  }
807}
808
809// app.component.ts
810import { Component, OnInit, OnDestroy } from '@angular/core';
811import { ChatbotService } from './chatbot.service';
812
813@Component({
814  selector: 'app-root',
815  template: \`<div>Your Angular App</div>\`
816})
817export class AppComponent implements OnInit, OnDestroy {
818  constructor(private chatbotService: ChatbotService) {}
819
820  ngOnInit() {
821    this.chatbotService.loadChatbot({
822      webhookUrl: 'YOUR_WEBHOOK_URL',
823      title: 'Chat Support',
824      position: 'bottom-right',
825      primaryColor: '#3b82f6',
826      welcomeMessage: 'Hello! How can I help you today?'
827    });
828  }
829
830  ngOnDestroy() {
831    this.chatbotService.destroy();
832  }
833}`};return u.jsx("section",{className:"py-20 px-6 bg-gradient-to-br from-purple-50 to-pink-50 dark:from-purple-900/20 dark:to-pink-900/20",children:u.jsxs("div",{className:"max-w-6xl mx-auto",children:[u.jsxs("div",{className:"text-center mb-16",children:[u.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-purple-100 to-pink-100 dark:from-purple-900/50 dark:to-pink-900/50 rounded-full mb-6",children:[u.jsx(b2,{className:"w-5 h-5 text-purple-600 dar
833k:text-purple-400"}),u.jsx("span",{className:"text-purple-700 dark:text-purple-300 font-medium",children:"Easy Integration"})]}),u.jsx("h2",{className:"text-4xl font-bold bg-gradient-to-r from-purple-600 to-pink-600 bg-clip-text text-transparent mb-6 text-center",children:"Integration Examples"}),u.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto text-center",children:"Choose your framework and get started in minutes. Our widget works seamlessly with any web technology."})]}),u.jsxs(Sn,{className:"backdrop-blur-sm bg-white/80 dark:bg-gray-800/80 border-0 shadow-2xl",children:[u.jsxs(gs,{className:"pb-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Bm,{className:"w-6 h-6 text-purple-600 dark:text-purple-400"}),u.jsx(vs,{className:"text-2xl",children:"Framework Integration"})]}),u.jsx(kg,{children:"Easy integration into your website. Both CSS and JavaScript files are automatically minified and optimized."})]}),u.jsxs(Wn,{children:[u.jsxs(lk,{defaultValue:"html",className:"w-full",children:[u.jsxs(jg,{className:"grid w-full grid-cols-5 mb-6",children:[u.jsx(xn,{value:"html",className:"text-sm",children:"HTML"}),u.jsx(xn,{value:"react",className:"text-sm",children:"React"}),u.jsx(xn,{value:"vue",className:"text-sm",children:"Vue.js"}),u.jsx(xn,{value:"dotnet",className:"text-sm",children:".NET"}),u.jsx(xn,{value:"angular",className:"text-sm",children:"Angular"})]}),Object.entries(r).map(([s,o])=>u.jsx(Ng,{value:s,className:"mt-4",children:u.jsxs("div",{className:"relative",children:[u.jsx("pre",{className:"bg-gray-900 text-green-400 p-6 rounded-lg overflow-x-auto text-sm border",children:u.jsx("code",{children:o})}),u.jsx(Ze,{variant:"outline",size:"sm",className:"absolute top-4 right-4 bg-gray-800/80 text-white border-gray-600 hover:bg-gray-700",onClick:()=>n(o,s),children:t===s?u.jsxs(u.Fragment,{children:[u.jsx(sd,{className:"w-4 h-4 mr-2 text-green-400"}),"Copied!"]}):u.jsxs(u.Fragment,{children:[u.jsx(Sa,{className:"w-4 h-4 mr-2"}),"Copy"]})})]})},s))]}),u.jsxs("div",{className:"mt-8 p-6 bg-blue-50 dark:bg-blue-900/20 rounded-lg border border-blue-200 dark:border-blue-800",children:[u.jsx("h4",{className:"font-semibold text-blue-900 dark:text-blue-100 mb-2",children:"📦 CDN Files Available:"}),u.jsxs("div",{className:"space-y-2 text-sm",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"font-mono bg-blue-100 dark:bg-blue-900/50 px-2 py-1 rounded text-blue-800 dark:text-blue-200",children:"https://chirodashboard-chat.onrender.com/chatbot-widget.js"}),u.jsx("span",{className:"text-blue-700 dark:text-blue-300",children:"- JavaScript bundle"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"font-mono bg-blue-100 dark:bg-blue-900/50 px-2 py-1 rounded text-blue-800 dark:text-blue-200",children:"https://chirodashboard-chat.onrender.com/chatbot-widget.css"}),u.jsx("span",{className:"text-blue-700 dark:text-blue-300",children:"- Minified styles"})]})]})]})]})]})]})})};function Au(t,[e,n]){return Math.min(n,Math.max(e,t))}var B$="DismissableLayer",Tp="dismissableLayer.update",V$="dismissableLayer.pointerDownOutside",z$="dismissableLayer.focusOutside",P0,ck=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uk=h.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=t,c=h.useContext(ck),[d,f]=h.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=h.useState({}),x=Te(e,k=>f(k)),v=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(b),m=d?v.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,_=m>=g,S=q$(k=>{const T=k.target,I=[...c.branches].some(P=>P.contains(T));!_||I||(s==null||s(k),i==null||i(k),k.defaultPrevented||a==null||a())},p),C=K$(k=>{const T=k.target;[...c.branches].some(P=>P.contains(T))||(o==null||o(k),i==null||i(k),k.defaultPrevented||a==null||a())},p);return Lm(k=>{m===c.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},p),h.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(P0=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),R0(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=P0)}},[d,p,n,c]),h.useEffect(()=>()=>
vendor: 5,227 bytes, line 833
833{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),R0())},[d,c]),h.useEffect(()=>{const k=()=>y({});return document.addEventListener(Tp,k),()=>document.removeEventListener(Tp,k)},[]),u.jsx(ce.div,{...l,ref:x,style:{pointerEvents:w?_?"auto":"none":void 0,...t.style},onFocusCapture:ae(t.onFocusCapture,C.onFocusCapture),onBlurCapture:ae(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:ae(t.onPointerDownCapture,S.onPointerDownCapture)})});uk.displayName=B$;var W$="DismissableLayerBranch",H$=h.forwardRef((t,e)=>{const n=h.useContext(ck),r=h.useRef(null),s=Te(e,r);return h.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),u.jsx(ce.div,{...t,ref:s})});H$.displayName=W$;function q$(t,e=globalThis==null?void 0:globalThis.document){const n=St(t),r=h.useRef(!1),s=h.useRef(()=>{});return h.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){dk(V$,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),e.removeEventListener("pointerdown",o),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function K$(t,e=globalThis==null?void 0:globalThis.document){const n=St(t),r=h.useRef(!1);return h.useEffect(()=>{const s=o=>{o.target&&!r.current&&dk(z$,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function R0(){const t=new CustomEvent(Tp);document.dispatchEvent(t)}function dk(t,e,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Xu(s,o):s.dispatchEvent(o)}var qf=0;function G$(){h.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??A0()),document.body.insertAdjacentElement("beforeend",t[1]??A0()),qf++,()=>{qf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),qf--}},[])}function A0(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}var Z$="Portal",fk=h.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,o]=h.useState(!1);ot(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Qu.createPortal(u.jsx(ce.div,{...r,ref:e}),i):null});fk.displayName=Z$;function hk(t){const e=h.useRef({value:t,previous:t});return h.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var pk=A_(),Kf=function(){},Id=h.forwardRef(function(t,e){var n=h.useRef(null),r=h.useState({onScrollCapture:Kf,onWheelCapture:Kf,onTouchMoveCapture:Kf}),s=r[0],o=r[1],i=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,d=t.enabled,f=t.shards,p=t.sideCar,y=t.noIsolation,x=t.inert,v=t.allowPinchZoom,b=t.as,g=b===void 0?"div":b,m=t.gapMode,w=fg(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=p,S=R_([n,e]),C=Ot(Ot({},w),s);return h.createElement(h.Fragment,null,d&&h.createElement(_,{sideCar:pk,removeScrollBar:c,shards:f,noIsolation:y,inert:x,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:m}),i?h.cloneElement(h.Children.only(a),Ot(Ot({},C),{ref:S})):h.createElement(g,Ot({},C,{className:l,ref:S}),a))});Id.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Id.classNames={fullWidth:ja,zeroRight:Ta};var jp=!1;if(typeof window<"u")try{var wc=Object.defineProperty({},"passive",{get:function(){return jp=!0,!0}});window.addEventListener("test",wc,wc),window.removeEventListener("test",wc,wc)}catch{jp=!1}var Ro=jp?{passive:!1}:!1,Y$=function(t){return t.tagName==="TEXTAREA"},mk=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Y$(t)&&n[e]==="visible")},Q$=function(t){return mk(t,"overflowY")},J$=function(t){return mk(t,"overflowX")},I0=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=gk(t,r);if(s){var o=vk(t,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},X$=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},e5=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},gk=function(t,e){return t==="v"?Q$(e):J$(e)},vk=function(t,e){return t==="v"?X$(e):e5(e)},t5=function(t,e){return t==="h"&&e==="rtl"?-1:1},n5=function(t,e,n,r,s){var o=t5(t,window.getComputedStyle(e).direction),i=o*r,a=n.target,l=e.contains(a),c=!1,d=i>0,f=0,p=0;do{var y=vk(t,a),x=y[0],v=y[1],b=y[2],g=v-b-o*x;(x||g)&&gk(t,a)&&(f+=g,p+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));
vendor: 5,406 bytes, lines 833-836
833return(d&&(Math.abs(f)<1||!s)||!d&&(Math.abs(p)<1||!s))&&(c=!0),c},xc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},O0=function(t){return[t.deltaX,t.deltaY]},M0=function(t){return t&&"current"in t?t.current:t},r5=function(t,e){return t[0]===e[0]&&t[1]===e[1]},s5=function(t){return`
834  .block-interactivity-`.concat(t,` {pointer-events: none;}
835  .allow-interactivity-`).concat(t,` {pointer-events: all;}
836`)},o5=0,Ao=[];function i5(t){var e=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),s=h.useState(o5++)[0],o=h.useState(hg)[0],i=h.useRef(t);h.useEffect(function(){i.current=t},[t]),h.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var v=P_([t.lockRef.current],(t.shards||[]).map(M0),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=h.useCallback(function(v,b){if("touches"in v&&v.touches.length===2)return!i.current.allowPinchZoom;var g=xc(v),m=n.current,w="deltaX"in v?v.deltaX:m[0]-g[0],_="deltaY"in v?v.deltaY:m[1]-g[1],S,C=v.target,k=Math.abs(w)>Math.abs(_)?"h":"v";if("touches"in v&&k==="h"&&C.type==="range")return!1;var T=I0(k,C);if(!T)return!0;if(T?S=k:(S=k==="v"?"h":"v",T=I0(k,C)),!T)return!1;if(!r.current&&"changedTouches"in v&&(w||_)&&(r.current=S),!S)return!0;var I=r.current||S;return n5(I,b,v,I==="h"?w:_,!0)},[]),l=h.useCallback(function(v){var b=v;if(!(!Ao.length||Ao[Ao.length-1]!==o)){var g="deltaY"in b?O0(b):xc(b),m=e.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&r5(S.delta,g)})[0];if(m&&m.should){b.cancelable&&b.preventDefault();return}if(!m){var w=(i.current.shards||[]).map(M0).filter(Boolean).filter(function(S){return S.contains(b.target)}),_=w.length>0?a(b,w[0]):!i.current.noIsolation;_&&b.cancelable&&b.preventDefault()}}},[]),c=h.useCallback(function(v,b,g,m){var w={name:v,delta:b,target:g,should:m,shadowParent:a5(g)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(_){return _!==w})},1)},[]),d=h.useCallback(function(v){n.current=xc(v),r.current=void 0},[]),f=h.useCallback(function(v){c(v.type,O0(v),v.target,a(v,t.lockRef.current))},[]),p=h.useCallback(function(v){c(v.type,xc(v),v.target,a(v,t.lockRef.current))},[]);h.useEffect(function(){return Ao.push(o),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Ro),document.addEventListener("touchmove",l,Ro),document.addEventListener("touchstart",d,Ro),function(){Ao=Ao.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,Ro),document.removeEventListener("touchmove",l,Ro),document.removeEventListener("touchstart",d,Ro)}},[]);var y=t.removeScrollBar,x=t.inert;return h.createElement(h.Fragment,null,x?h.createElement(o,{styles:s5(s)}):null,y?h.createElement(L_,{gapMode:t.gapMode}):null)}function a5(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const l5=O_(pk,i5);var yk=h.forwardRef(function(t,e){return h.createElement(Id,Ot({},t,{ref:e,sideCar:l5}))});yk.classNames=Id.classNames;var c5=[" ","Enter","ArrowUp","ArrowDown"],u5=[" ","Enter"],Ll="Select",[Od,Md,d5]=Cl(Ll),[Vi,K4]=Mr(Ll,[d5,ud]),Ld=ud(),[f5,Os]=Vi(Ll),[h5,p5]=Vi(Ll),wk=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:p,required:y}=t,x=Ld(e),[v,b]=h.useState(null),[g,m]=h.useState(null),[w,_]=h.useState(!1),S=Ml(c),[C=!1,k]=qn({prop:r,defaultProp:s,onChange:o}),[T,I]=qn({prop:i,defaultProp:a,onChange:l}),P=h.useRef(null),D=v?!!v.closest("form"):!0,[R,M]=h.useState(new Set),A=Array.from(R).map(z=>z.props.value).join(";");return u.jsx(_1,{...x,children:u.jsxs(f5,{required:y,scope:e,trigger:v,onTriggerChange:b,valueNode:g,onValueNodeChange:m,valueNodeHasChildren:w,onValueNodeHasChildrenChange:_,contentId:Vn(),value:T,onValueChange:I,open:C,onOpenChange:k,dir:S,triggerPointerDownPosRef:P,disabled:p,children:[u.jsx(Od.Provider,{scope:e,children:u.jsx(h5,{scope:t.__scopeSelect,onNativeOptionAdd:h.useCallback(z=>{M(B=>new Set(B).add(z))},[]),onNativeOptionRemove:h.useCallback(z=>{M(B=>{const G=new Set(B);return G.delete(z),G})},[]),children:n})}),D?u.jsxs(Wk,{"aria-hidden":!0,required:y,tabIndex:-1,name:d,autoComplete:f,value:T,onChange:z=>I(z.target.value),disabled:p,children:[T===void 0?u.jsx("option",{value:""}):null,Array.from(R)]},A):null]})})};wk.displayName=Ll;var xk="SelectTrigger",bk=h.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...s}=t,o=Ld(n),i=Os(xk,n),a=i.disabled||r,l=Te(e,i.onTriggerChange),c=Md(n),[d,f,p]=Hk(x=>{const v=c().filter(m=>!m.disabled),b=v.find(m=>m.value===i.value),g=qk(v,x,b);g!==void 0&&i.onValueChange(g.value)}),y=()=>{a||(i.onOpenChange(!0),p())};return u.jsx(S1,{asChild:!0,...o,children:u.jsx(ce.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":zk(i.value)?"":void 0,...s,ref:l,onClick:ae(s.onClick,x=>
vendor: 15,792 bytes, line 836
836{x.currentTarget.focus()}),onPointerDown:ae(s.onPointerDown,x=>{const v=x.target;v.hasPointerCapture(x.pointerId)&&v.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(y(),i.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:ae(s.onKeyDown,x=>{const v=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(v&&x.key===" ")&&c5.includes(x.key)&&(y(),x.preventDefault())})})})});bk.displayName=xk;var _k="SelectValue",Sk=h.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:i="",...a}=t,l=Os(_k,n),{onValueNodeHasChildrenChange:c}=l,d=o!==void 0,f=Te(e,l.onValueNodeChange);return ot(()=>{c(d)},[c,d]),u.jsx(ce.span,{...a,ref:f,style:{pointerEvents:"none"},children:zk(l.value)?u.jsx(u.Fragment,{children:i}):o})});Sk.displayName=_k;var m5="SelectIcon",kk=h.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...s}=t;return u.jsx(ce.span,{"aria-hidden":!0,...s,ref:e,children:r||"▼"})});kk.displayName=m5;var g5="SelectPortal",Ck=t=>u.jsx(fk,{asChild:!0,...t});Ck.displayName=g5;var ho="SelectContent",Ek=h.forwardRef((t,e)=>{const n=Os(ho,t.__scopeSelect),[r,s]=h.useState();if(ot(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?As.createPortal(u.jsx(Tk,{scope:t.__scopeSelect,children:u.jsx(Od.Slot,{scope:t.__scopeSelect,children:u.jsx("div",{children:t.children})})}),o):null}return u.jsx(jk,{...t,ref:e})});Ek.displayName=ho;var br=10,[Tk,Ms]=Vi(ho),v5="SelectContentImpl",jk=h.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:y,sticky:x,hideWhenDetached:v,avoidCollisions:b,...g}=t,m=Os(ho,n),[w,_]=h.useState(null),[S,C]=h.useState(null),k=Te(e,se=>_(se)),[T,I]=h.useState(null),[P,D]=h.useState(null),R=Md(n),[M,A]=h.useState(!1),z=h.useRef(!1);h.useEffect(()=>{if(w)return V_(w)},[w]),G$();const B=h.useCallback(se=>{const[me,...Me]=R().map(ve=>ve.ref.current),[ge]=Me.slice(-1),je=document.activeElement;for(const ve of se)if(ve===je||(ve==null||ve.scrollIntoView({block:"nearest"}),ve===me&&S&&(S.scrollTop=0),ve===ge&&S&&(S.scrollTop=S.scrollHeight),ve==null||ve.focus(),document.activeElement!==je))return},[R,S]),G=h.useCallback(()=>B([T,w]),[B,T,w]);h.useEffect(()=>{M&&G()},[M,G]);const{onOpenChange:j,triggerPointerDownPosRef:U}=m;h.useEffect(()=>{if(w){let se={x:0,y:0};const me=ge=>{var je,ve;se={x:Math.abs(Math.round(ge.pageX)-(((je=U.current)==null?void 0:je.x)??0)),y:Math.abs(Math.round(ge.pageY)-(((ve=U.current)==null?void 0:ve.y)??0))}},Me=ge=>{se.x<=10&&se.y<=10?ge.preventDefault():w.contains(ge.target)||j(!1),document.removeEventListener("pointermove",me),U.current=null};return U.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",Me,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",Me,{capture:!0})}}},[w,j,U]),h.useEffect(()=>{const se=()=>j(!1);return window.addEventListener("blur",se),window.addEventListener("resize",se),()=>{window.removeEventListener("blur",se),window.removeEventListener("resize",se)}},[j]);const[Y,$]=Hk(se=>{const me=R().filter(je=>!je.disabled),Me=me.find(je=>je.ref.current===document.activeElement),ge=qk(me,se,Me);ge&&setTimeout(()=>ge.ref.current.focus())}),te=h.useCallback((se,me,Me)=>{const ge=!z.current&&!Me;(m.value!==void 0&&m.value===me||ge)&&(I(se),ge&&(z.current=!0))},[m.value]),ee=h.useCallback(()=>w==null?void 0:w.focus(),[w]),de=h.useCallback((se,me,Me)=>{const ge=!z.current&&!Me;(m.value!==void 0&&m.value===me||ge)&&D(se)},[m.value]),Ae=r==="popper"?Np:Nk,ue=Ae===Np?{side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:y,sticky:x,hideWhenDetached:v,avoidCollisions:b}:{};return u.jsx(Tk,{scope:n,content:w,viewport:S,onViewportChange:C,itemRefCallback:te,selectedItem:T,onItemLeave:ee,itemTextRefCallback:de,focusSelectedItem:G,selectedItemText:P,position:r,isPositioned:M,searchRef:Y,children:u.jsx(yk,{as:xs,allowPinchZoom:!0,children:u.jsx(dg,{asChild:!0,trapped:m.open,onMountAutoFocus:se=>{se.preventDefault()},onUnmountAutoFocus:ae(s,se=>{var me;(me=m.trigger)==null||me.focus({preventScroll:!0}),se.preventDefault()}),children:u.jsx(uk,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:se=>se.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:u.jsx(Ae,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:se=>se.preventDefault(),...g,...ue,onPlaced:()=>A(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ae(g.onKeyDown,se=>{const me=se.ctrlKey||se.altKey||se.metaKey;if(se.key==="Tab"&&se.preventDefault(),!me&&se.key.length===1&&$(se.key),["ArrowUp","ArrowDown","Home","End"].includes(se.key)){let ge=R().filter(je=>!je.disabled).map(je=>je.ref.current);if(["ArrowUp","End"].includes(se.key)&&(ge=ge.slice().reverse()),["ArrowUp","ArrowDown"].includes(se.key)){const je=se.target,ve=ge.indexOf(je);ge=ge.slice(ve+1)}setTimeout(()=>B(ge)),se.preventDefault()}})})})})})})});jk.displayName=v5;var y5="SelectItemAlignedPosition",Nk=h.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...s}=t,o=Os(ho,n),i=Ms(ho,n),[a,l]=h.useState(null),[c,d]=h.useState(null),f=Te(e,k=>d(k)),p=Md(n),y=h.useRef(!1),x=h.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:g,focusSelectedItem:m}=i,w=h.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&c&&v&&b&&g){const k=o.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),I=o.valueNode.getBoundingClientRect(),P=g.getBoundingClientRect();if(o.dir!=="rtl"){const je=P.left-T.left,ve=I.left-je,Qe=k.left-ve,ze=k.width+Qe,xt=Math.max(ze,T.width),pt=window.innerWidth-br,Tt=Au(ve,[br,pt-xt]);a.style.minWidth=ze+"px",a.style.left=Tt+"px"}else{const je=T.right-P.right,ve=window.innerWidth-I.right-je,Qe=window.innerWidth-k.right-ve,ze=k.width+Qe,xt=Math.max(ze,T.width),pt=window.innerWidth-br,Tt=Au(ve,[br,pt-xt]);a.style.minWidth=ze+"px",a.style.right=Tt+"px"}const D=p(),R=window.innerHeight-br*2,M=v.scrollHeight,A=window.getComputedStyle(c),z=parseInt(A.borderTopWidth,10),B=parseInt(A.paddingTop,10),G=parseInt(A.borderBottomWidth,10),j=parseInt(A.paddingBottom,10),U=z+B+M+j+G,Y=Math.min(b.offsetHeight*5,U),$=window.getComputedStyle(v),te=parseInt($.paddingTop,10),ee=parseInt($.paddingBottom,10),de=k.top+k.height/2-br,Ae=R-de,ue=b.offsetHeight/2,se=b.offsetTop+ue,me=z+B+se,Me=U-me;if(me<=de){const je=b===D[D.length-1].ref.current;a.style.bottom="0px";const ve=c.clientHeight-v.offsetTop-v.offsetHeight,Qe=Math.max(Ae,ue+(je?ee:0)+ve+G),ze=me+Qe;a.style.height=ze+"px"}else{const je=b===D[0].ref.current;a.style.top="0px";const Qe=Math.max(de,z+v.offsetTop+(je?te:0)+ue)+Me;a.style.height=Qe+"px",v.scrollTop=me-de+v.offsetTop}a.style.margin=`${br}px 0`,a.style.minHeight=Y+"px",a.style.maxHeight=R+"px",r==null||r(),requestAnimationFrame(()=>y.current=!0)}},[p,o.trigger,o.valueNode,a,c,v,b,g,o.dir,r]);ot(()=>w(),[w]);const[_,S]=h.useState();ot(()=>{c&&S(window.getComputedStyle(c).zIndex)},[c]);const C=h.useCallback(k=>{k&&x.current===!0&&(w(),m==null||m(),x.current=!1)},[w,m]);return u.jsx(x5,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:C,children:u.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:u.jsx(ce.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Nk.displayName=y5;var w5="SelectPopperPosition",Np=h.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=br,...o}=t,i=Ld(n);return u.jsx(k1,{...i,...o,ref:e,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Np.displayName=w5;var[x5,Pg]=Vi(ho,{}),Pp="SelectViewport",Pk=h.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:r,...s}=t,o=Ms(Pp,n),i=Pg(Pp,n),a=Te(e,o.onViewportChange),l=h.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),u.jsx(Od.Slot,{scope:n,children:u.jsx(ce.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ae(s.onScroll,c=>{const d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&f){const y=Math.abs(l.current-d.scrollTop);if(y>0){const x=window.innerHeight-br*2,v=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),g=Math.max(v,b);if(g<x){const m=g+y,w=Math.min(x,m),_=m-w;f.style.height=w+"px",f.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});Pk.displayName=Pp;var Rk="SelectGroup",[b5,_5]=Vi(Rk),S5=h.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=Vn();return u.jsx(b5,{scope:n,id:s,children:u.jsx(ce.div,{role:"group","aria-labelledby":s,...r,ref:e})})});S5.displayName=Rk;var Ak="SelectLabel",Ik=h.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=_5(Ak,n);return u.jsx(ce.div,{id:s.id,...r,ref:e})});Ik.displayName=Ak;var Iu="SelectItem",[k5,Ok]=Vi(Iu),Mk=h.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...i}=t,a=Os(Iu,n),l=Ms(Iu,n),c=a.value===r,[d,f]=h.useState(o??""),[p,y]=h.useState(!1),x=Te(e,g=>{var m;return(m=l.itemRefCallback)==null?void 0:m.call(l,g,r,s)}),v=Vn(),b=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.jsx(k5,{scope:n,value:r,disabled:s,textId:v,isSelected:c,onItemTextChange:h.useCallback(g=>{f(m=>m||((g==null?void 0:g.textContent)??"").trim())},[]),children:u.jsx(Od.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:u.jsx(ce.div,{role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:x,onFocus:ae(i.onFocus,()=>y(!0)),onBlur:ae(i.onBlur,()=>y(!1)),onPointerUp:ae(i.onPointerUp,b),onPointerMove:ae(i.onPointerMove,g=>{var m;s?(m=l.onItemLeave)==null||m.call(l):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ae(i.onPointerLeave,g=>{var m;g.currentTarget===document.activeElement&&((m=l.onItemLeave)==null||m.call(l))}),onKeyDown:ae(i.onKeyDown,g=>{var w;((w=l.searchRef)==null?void 0:w.current)!==""&&g.key===" "||(u5.includes(g.key)&&b(),g.key===" "&&g.preventDefault())})})})})});Mk.displayName=Iu;var fa="SelectItemText",Lk=h.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,...o}=t,i=Os(fa,n),a=Ms(fa,n),l=Ok(fa,n),c=p5(fa,n),[d,f]=h.useState(null),p=Te(e,g=>f(g),l.onItemTextChange,g=>{var m;return(m=a.itemTextRefCallback)==null?void 0:m.call(a,g,l.value,l.disabled)}),y=d==null?void 0:d.textContent,x=h.useMemo(()=>u.jsx("option",{value:l.value,disabled:l.disabled,children:y},l.value),[l.disabled,l.value,y]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=c;return ot(()=>(v(x),()=>b(x)),[v,b,x]),u.jsxs(u.Fragment,{children:[u.jsx(ce.span,{id:l.textId,...o,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?As.createPortal(o.children,i.valueNode):null]})});Lk.displayName=fa;var Dk="SelectItemIndicator",$k=h.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return Ok(Dk,n).isSelected?u.jsx(ce.span,{"aria-hidden":!0,...r,ref:e}):null});$k.displayName=Dk;var Rp="SelectScrollUpButton",Fk=h.forwardRef((t,e)=>{const n=Ms(Rp,t.__scopeSelect),r=Pg(Rp,t.__scopeSelect),[s,o]=h.useState(!1),i=Te(e,r.onScrollButtonChange);return ot(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;o(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?u.jsx(Bk,{...t,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});Fk.displayName=Rp;var Ap="SelectScrollDownButton",Uk=h.forwardRef((t,e)=>{const n=Ms(Ap,t.__scopeSelect),r=Pg(Ap,t.__scopeSelect),[s,o]=h.useState(!1),i=Te(e,r.onScrollButtonChange);return ot(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;o(d)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?u.jsx(Bk,{...t,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});Uk.displayName=Ap;var Bk=h.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=t,o=Ms("SelectScrollButton",n),i=h.useRef(null),a=Md(n),l=h.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return h.useEffect(()=>()=>l(),[l]),ot(()=>{var d;const c=a().find(f=>f.ref.current===document.activeElement);(d=c==null?void 0:c.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),u.jsx(ce.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:ae(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ae(s.onPointerMove,()=>{var c;(c=o.onItemLeave)==null||c.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ae(s.onPointerLeave,()=>{l()})})}),C5="SelectSeparator",Vk=h.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return u.jsx(ce.div,{"aria-hidden":!0,...r,ref:e})});Vk.displayName=C5;var Ip="SelectArrow",E5=h.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=Ld(n),o=Os(Ip,n),i=Ms(Ip,n);return o.open&&i.position==="popper"?u.jsx(C1,{...s,...r,ref:e}):null});E5.displayName=Ip;function zk(t){return t===""||t===void 0}var Wk=h.forwardRef((t,e)=>{const{value:n,...r}=t,s=h.useRef(null),o=Te(e,s),i=hk(n);return h.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[i,n]),u.jsx(El,{asChild:!0,children:u.jsx("select",{...r,ref:o,defaultValue:n})})});Wk.displayName="BubbleSelect";function Hk(t){const e=St(t),n=h.useRef(""),r=h.useRef(0),s=h.useCallback(i=>{const a=n.current+i;e(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),o=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function qk(t,e,n){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,o=n?t.indexOf(n):-1;let i=T5(t,Math.max(o,0));s.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function T5(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var j5=wk,Kk=bk,N5=Sk,P5=kk,R5=Ck,Gk=Ek,A5=Pk,Zk=Ik,Yk=Mk,I5=Lk,O5=$k,Qk=Fk,Jk=Uk,Xk=Vk;const eC=j5,tC=N5,Rg=h.forwardRef(({className:t,children:e,...n},r)=>u.jsxs(Kk,{ref:r,className:be("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
836ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...n,children:[e,u.jsx(P5,{asChild:!0,children:u.jsx(Um,{className:"h-4 w-4 opacity-50"})})]}));Rg.displayName=Kk.displayName;const nC=h.forwardRef(({className:t,...e},n)=>u.jsx(Qk,{ref:n,className:be("flex cursor-default items-center justify-center py-1",t),...e,children:u.jsx(y2,{className:"h-4 w-4"})}));nC.displayName=Qk.displayName;const rC=h.forwardRef(({className:t,...e},n)=>u.jsx(Jk,{ref:n,className:be("flex cursor-default items-center justify-center py-1",t),...e,children:u.jsx(Um,{className:"h-4 w-4"})}));rC.displayName=Jk.displayName;const Ag=h.forwardRef(({className:t,children:e,position:n="popper",...r},s)=>u.jsx(R5,{children:u.jsxs(Gk,{ref:s,className:be("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...r,children:[u.jsx(nC,{}),u.jsx(A5,{className:be("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),u.jsx(rC,{})]})}));Ag.displayName=Gk.displayName;const M5=h.forwardRef(({className:t,...e},n)=>u.jsx(Zk,{ref:n,className:be("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));M5.displayName=Zk.displayName;const an=h.forwardRef(({className:t,children:e,...n},r)=>u.jsxs(Yk,{ref:r,className:be("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(O5,{children:u.jsx(sd,{className:"h-4 w-4"})})}),u.jsx(I5,{children:e})]}));an.displayName=Yk.displayName;const L5=h.forwardRef(({className:t,...e},n)=>u.jsx(Xk,{ref:n,className:be("-mx-1 my-1 h-px bg-muted",t),...e}));L5.displayName=Xk.displayName;var sC=["PageUp","PageDown"],oC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],iC={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},zi="Slider",[Op,D5,$5]=Cl(zi),[aC,G4]=Mr(zi,[$5]),[F5,Dd]=aC(zi),lC=h.forwardRef((t,e)=>{const{name:n,min:r=0,max:s=100,step:o=1,orientation:i="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:d,onValueChange:f=()=>{},onValueCommit:p=()=>{},inverted:y=!1,...x}=t,v=h.useRef(new Set),b=h.useRef(0),m=i==="horizontal"?U5:B5,[w=[],_]=qn({prop:d,defaultProp:c,onChange:P=>{var R;(R=[...v.current][b.current])==null||R.focus(),f(P)}}),S=h.useRef(w);function C(P){const D=q5(w,P);I(P,D)}function k(P){I(P,b.current)}function T(){const P=S.current[b.current];w[b.current]!==P&&p(w)}function I(P,D,{commit:R}={commit:!1}){const M=Y5(o),A=Q5(Math.round((P-r)/o)*o+r,M),z=Au(A,[r,s]);_((B=[])=>{const G=W5(B,z,D);if(Z5(G,l*o)){b.current=G.indexOf(z);const j=String(G)!==String(B);return j&&R&&p(G),j?G:B}else return B})}return u.jsx(F5,{scope:t.__scopeSlider,name:n,disabled:a,min:r,max:s,valueIndexToChangeRef:b,thumbs:v.current,values:w,orientation:i,children:u.jsx(Op.Provider,{scope:t.__scopeSlider,children:u.jsx(Op.Slot,{scope:t.__scopeSlider,children:u.jsx(m,{"aria-disabled":a,"data-disabled":a?"":void 0,...x,ref:e,onPointerDown:ae(x.onPointerDown,()=>{a||(S.current=w)}),min:r,max:s,inverted:y,onSlideStart:a?void 0:C,onSlideMove:a?void 0:k,onSlideEnd:a?void 0:T,onHomeKeyDown:()=>!a&&I(r,0,{commit:!0}),onEndKeyDown:()=>!a&&I(s,w.length-1,{commit:!0}),onStepKeyDown:({event:P,direction:D})=>{if(!a){const A=sC.includes(P.key)||P.shiftKey&&oC.includes(P.key)?10:1,z=b.current,B=w[z],G=o*A*D;I(B+G,z,{commit:!0})}}})})})})});lC.displayName=zi;var[cC,uC]=aC(zi,{startEdge:"left",endEdge:"right",size:"width",direction:1}),U5=h.forwardRef((t,e)=>{const{min:n,max:r,dir:s,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:l,onStepKeyDown:c,...d}=t,[f,p]=h.useState(null),y=Te(e,w=>p(w)),x=h.useRef(),v=Ml(s),b=v==="ltr",g=b&&!o||!b&&o;function m(w){const _=x.current||f.getBoundingClientRect(),S=[0,_.width],k=Ig(S,g?[n,r]:[r,n]);return x.current=_,k(w-_.left)}return u.jsx(cC,{scope:t.__scopeSlider,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width",children:u.jsx(dC,{dir:v,"data-orientation":"horizontal",...d,ref:y,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const _=m(w.clientX);i==null||i(_)},onSlideMove:w=>{const _=m(w.clientX);a==null||a(_)},onSlideEnd:()=>{x.current=void 0,l==null||l()},onStepKeyDown:w=>{const S=iC[g?"from-left":"from-right"].includes(w.key);c==null||c({event:w,direction:S?-1:1})}})})}),B5=h.forwardRef((t,e)=>{const{min:n,max:r,inverted:s,onSlideStart:o,onSlideMove:i,onSlideEnd:a,onStepKeyDown:l,...c}=t,d=h.useRef(null),f=Te(e,d),p=h.useRef(),y=!s;function x(v){const b=p.current||d.current.getBoundingClientRect(),g=[0,b.height],w=Ig(g,y?[r,n]:[n,r]);return p.current=b,w(v-b.top)}return u.jsx(cC,{scope:t.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:u.jsx(dC,{"data-orientation":"vertical",...c,ref:f,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:v=>{const b=x(v.clientY);o==null||o(b)},onSlideMove:v=>{const b=x(v.clientY);i==null||i(b)},onSlideEnd:()=>{p.current=void 0,a==null||a()},onStepKeyDown:v=>{const g=iC[y?"from-bottom":"from-top"].includes(v.key);l==null||l({event:v,direction:g?-1:1})}})})}),dC=h.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:s,onSlideEnd:o,onHomeKeyDown:i,onEndKeyDown:a,onStepKeyDown:l,...c}=t,d=Dd(zi,n);return u.jsx(ce.span,{...c,ref:e,onKeyDown:ae(t.onKeyDown,f=>{f.key==="Home"?(i(f),f.preventDefault()):f.key==="End"?(a(f),f.preventDefault()):sC.concat(oC).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:ae(t.onPointerDown,f=>{const p=f.target;p.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(p)?p.focus():r(f)}),onPointerMove:ae(t.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&s(f)}),onPointerUp:ae(t.onPointerUp,f=>{const p=f.target;p.hasPointerCapture(f.pointerId)&&(p.releasePointerCapture(f.pointerId),o(f))})})}),fC="SliderTrack",hC=h.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=Dd(fC,n);return u.jsx(ce.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...r,ref:e})});hC.displayName=fC;var Mp="SliderRange",pC=h.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=Dd(Mp,n),o=uC(Mp,n),i=h.useRef(null),a=Te(e,i),l=s.values.length,c=s.values.map(p=>gC(p,s.min,s.max)),d=l>1?Math.min(...c):0,f=100-Math.max(...c);return u.jsx(ce.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...r,ref:a,style:{...t.style,[o.startEdge]:d+"%",[o.endEdge]:f
836+"%"}})});pC.displayName=Mp;var Lp="SliderThumb",mC=h.forwardRef((t,e)=>{const n=D5(t.__scopeSlider),[r,s]=h.useState(null),o=Te(e,a=>s(a)),i=h.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return u.jsx(V5,{...t,ref:o,index:i})}),V5=h.forwardRef((t,e)=>{const{__scopeSlider:n,index:r,name:s,...o}=t,i=Dd(Lp,n),a=uC(Lp,n),[l,c]=h.useState(null),d=Te(e,m=>c(m)),f=l?!!l.closest("form"):!0,p=f1(l),y=i.values[r],x=y===void 0?0:gC(y,i.min,i.max),v=H5(r,i.values.length),b=p==null?void 0:p[a.size],g=b?K5(b,x,a.direction):0;return h.useEffect(()=>{if(l)return i.thumbs.add(l),()=>{i.thumbs.delete(l)}},[l,i.thumbs]),u.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${x}% + ${g}px)`},children:[u.jsx(Op.ItemSlot,{scope:t.__scopeSlider,children:u.jsx(ce.span,{role:"slider","aria-label":t["aria-label"]||v,"aria-valuemin":i.min,"aria-valuenow":y,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...o,ref:d,style:y===void 0?{display:"none"}:t.style,onFocus:ae(t.onFocus,()=>{i.valueIndexToChangeRef.current=r})})}),f&&u.jsx(z5,{name:s??(i.name?i.name+(i.values.length>1?"[]":""):void 0),value:y},r)]})});mC.displayName=Lp;var z5=t=>{const{value:e,...n}=t,r=h.useRef(null),s=hk(e);return h.useEffect(()=>{const o=r.current,i=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(i,"value").set;if(s!==e&&l){const c=new Event("input",{bubbles:!0});l.call(o,e),o.dispatchEvent(c)}},[s,e]),u.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:e})};function W5(t=[],e,n){const r=[...t];return r[n]=e,r.sort((s,o)=>s-o)}function gC(t,e,n){const o=100/(n-e)*(t-e);return Au(o,[0,100])}function H5(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function q5(t,e){if(t.length===1)return 0;const n=t.map(s=>Math.abs(s-e)),r=Math.min(...n);return n.indexOf(r)}
836function K5(t,e,n){const r=t/2,o=Ig([0,50],[0,r]);return(r-o(e)*n)*n}function G5(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function Z5(t,e){if(e>0){const n=G5(t);return Math.min(...n)>=e}return!0}function Ig(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function Y5(t){return(String(t).split(".")[1]||"").length}function Q5(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var vC=lC,J5=hC,X5=pC,e4=mC;const yC=h.forwardRef(({className:t,...e},n)=>u.jsxs(vC,{ref:n,className:be("relative flex w-full touch-none select-none items-center",t),...e,children:[u.jsx(J5,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:u.jsx(X5,{className:"absolute h-full bg-primary"})}),u.jsx(e4,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));yC.displayName=vC.displayName;const Dp=({onCrop:t,onCancel:e,aspectRatio:n=1,size:r=200,initialImage:s=null})=>{const[o,i]=h.useState(null),[a,l]=h.useState(1),[c,d]=h.useState({x:0,y:0}),[f,p]=h.useState(!1),[y,x]=h.useState({x:0,y:0}),v=h.useRef(null),b=h.useRef(null),g=h.useRef(null),m=h.useCallback(I=>{const P=new Image;P.onload=()=>{i(P),l(1),d({x:0,y:0})},P.src=URL.createObjectURL(I)},[]);h.useEffect(()=>{s&&m(s)},[s,m]);const w=I=>{var D;const P=(D=I.target.files)==null?void 0:D[0];P&&P.type.startsWith("image/")&&m(P)},_=h.useCallback(()=>{if(!o||!b.current)return;const I=b.current,P=I.getContext("2d");if(!P)return;const D=r;I.width=D,I.height=D,P.clearRect(0,0,D,D),P.save(),P.beginPath(),P.arc(D/2,D/2,D/2,0,2*Math.PI),P.clip();const R=o.width/o.height;let M=D*a,A=D*a;R>1?A=M/R:M=A*R;const z=(D-M)/2+c.x,B=(D-A)/2+c.y;P.drawImage(o,z,B,M,A),P.restore(),P.strokeStyle="#e5e7eb",P.lineWidth=2,P.beginPath(),P.arc(D/2,D/2,D/2-1,0,2*Math.PI),P.stroke()},[o,a,c,r]);h.useEffect(()=>{_()},[_]);const S=I=>{o&&(p(!0),x({x:I.clientX-c.x,y:I.clientY-c.y}))},C=I=>{if(!f||!o)return;const P=I.clientX-y.x,D=I.clientY-y.y,R=r*a*.4;d({x:Math.max(-R,Math.min(R,P)),y:Math.max(-R,Math.min(R,D))})},k=()=>{p(!1)},T=async()=>{if(!o||!v.current)return;const I=v.current,P=I.getContext("2d");if(!P)return;const D=r;I.width=D,I.height=D,P.clearRect(0,0,D,D),P.save(),P.beginPath(),P.arc(D/2,D/2,D/2,0,2*Math.PI),P.clip();const R=o.width/o.height;let M=D*a,A=D*a;R>1?A=M/R:M=A*R;const z=(D-M)/2+c.x,B=(D-A)/2+c.y;P.drawImage(o,z,B,M,A),P.restore(),I.toBlob(G=>{if(G){const j=new File([G],"cropped-logo.png",{type:"image/png"});t(j)}},"image/png",1)};return u.jsx(Sn,{className:"w-full max-w-md mx-auto",children:u.jsxs(Wn,{className:"p-6 space-y-4",children:[u.jsxs("div",{className:"text-center",children:[u.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Crop Your Logo"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Upload an image and adjust the position and zoom to fit perfectly in the circle."})]}),o?u.jsxs("div",{className:"space-y-4",children:[u.jsx("div",{className:"flex justify-center",children:u.jsx("div",{className:"relative cursor-move select-none",style:{width:r,height:r},onMouseDown:S,onMouseMove:C,onMouseUp:k,onMouseLeave:k,children:u.jsx("canvas",{ref:b,className:"border border-border rounded-full",style:{width:r,height:r,cursor:f?"grabbing":"grab"}})})}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{children:[u.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Zoom"}),u.jsx(yC,{value:[a],onValueChange:I=>l(I[0]),min:.5,max:3,step:.1,className:"w-full"})]}),u.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Drag the image to reposition it within the circle"})]}),u.jsxs("div",{className:"flex gap-2 pt-2",children:[u.jsxs(Ze,{variant:"outline",onClick:()=>{var I;return(I=g.current)==null?void 0:I.click()},className:"flex-1",children:[u.jsx(Ga,{className:"h-4 w-4 mr-2"}),"Change Image"]}),u.jsx(Ze,{variant:"outline",onClick:e,size:"icon",children:u.jsx(Za,{className:"h-4 w-4"})}),u.jsx(Ze,{onClick:T,size:"icon",className:"bg-primary hover:bg-primary/90",children:u.jsx(sd,{className:"h-4 w-4"})})]}),u.jsx("input",{ref:g,type:"file",accept:"image/*",onChange:w,className:"hidden"})]}):u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"border-2 border-dashed border-muted-foreground
836/25 rounded-lg p-8 text-center cursor-pointer hover:border-muted-foreground/50 transition-colors",onClick:()=>{var I;return(I=g.current)==null?void 0:I.click()},children:[u.jsx(Ga,{className:"mx-auto h-12 w-12 text-muted-foreground/50 mb-4"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Click to upload an image or drag and drop"})]}),u.jsx("input",{ref:g,type:"file",accept:"image/*",onChange:w,className:"hidden"})]}),u.jsx("canvas",{ref:v,className:"hidden"})]})})},t4=({webhookUrl:t,setWebhookUrl:e,title:n,setTitle:r,bio:s,setBio:o,placeholder:i,setPlaceholder:a,position:l,setPosition:c,primaryColor:d,setPrimaryColor:f,secondaryColor:p,setSecondaryColor:y,textColor:x,setTextColor:v,userTextColor:b,setUserTextColor:g,chatBackground:m,setChatBackground:w,logoFile:_,setLogoFile:S,avatarFile:C,setAvatarFile:k,welcomeMessage:T,setWelcomeMessage:I,admin:P,setAdmin:D,isVoiceEnabled:R,setIsVoiceEnabled:M,isElevenLabsEnabled:A,setIsElevenLabsEnabled:z,elevenLabsAgentId:B,setElevenLabsAgentId:G,gradientColor:j,setGradientColor:U,headerGradientColor:Y,setHeaderGradientColor:$,headerMainColor:te,setHeaderMainColor:ee,logoBackgroundColor:de,setLogoBackgroundColor:Ae,logoBorderColor:ue,setLogoBorderColor:se,headerButtonColor:me,setHeaderButtonColor:Me,fontFamily:ge,setFontFamily:je,welcomeTooltipMessage:ve,setWelcomeTooltipMessage:Qe,copySuccessMessage:ze,setCopySuccessMessage:xt})=>{const{toast:pt}=Ju(),[Tt,E]=h.useState("html"),[N,O]=h.useState(!1),[Z,W]=h.useState(!1),H=X=>{const Q=_e(X);navigator.clipboard.writeText(Q),pt({title:"Code copied to clipboard!",description:`${oe(X)} integration code has been copied.`})},oe=X=>({html:"HTML","react-ts":"React (TypeScript)","react-js":"React (JavaScript)",vue:"Vue.js",dotnet:".NET",angular:"Angular"})[X]||X,_e=X=>{const Q={webhookUrl:t,title:n,bio:s,placeholder:i,position:l,primaryColor:d,secondaryColor:p,textColor:x,userTextColor:b,chatBackground:m,welcomeMessage:T,admin:P,isVoiceEnabled:R,logoFile:_?_.name:null,logoUrl:_?URL.createObjectURL(_):null,avatarFile:C?C.name:null,avatarUrl:C?URL.createObjectURL(C):null,isElevenLabsEnabled:A,elevenLabsAgentId:B,gradientColor:j,headerGradientColor:Y,headerMainColor:te,logoBackgroundColor:de,logoBorderColor:ue,headerButtonColor:me,fontFamily:ge,welcomeTooltipMessage:ve,copySuccessMessage:ze},Je=`  webhookUrl: '${Q.webhookUrl}',
837    title: '${Q.title}',
838    bio: '${Q.bio}',
839    placeholder: '${Q.placeholder}',
840    position: '${Q.position}',
841    primaryColor: '${Q.primaryColor}',
842    secondaryColor: '${Q.secondaryColor}',
843    textColor: '${Q.textColor}',
844    userTextColor: '${Q.userTextColor}',
845    chatBackground: '${Q.chatBackground}',
846    welcomeMessage: '${Q.welcomeMessage}',
847    admin: ${Q.admin},
848    isVoiceEnabled: ${Q.isVoiceEnabled},
849    isElevenLabsEnabled: ${Q.isElevenLabsEnabled},
850    elevenLabsAgentId: '${Q.elevenLabsAgentId}',
851    gradientColor: '${Q.gradientColor}',
852    headerGradientColor: '${Q.headerGradientColor}',
853    headerMainColor: '${Q.headerMainColor}',
854    logoBackgroundColor: '${Q.logoBackgroundColor}',
855    logoBorderColor: '${Q.logoBorderColor}',
856    headerButtonColor: '${Q.headerButtonColor}',
857    fontFamily: '${Q.fontFamily}',
858    welcomeTooltipMessage: '${Q.welcomeTooltipMessage}',
859    copySuccessMessage: '${Q.copySuccessMessage}'${Q.logoFile?`,
860    logoFile: '${Q.logoFile}',
861    logoUrl: '${Q.logoUrl}'`:""}${Q.avatarFile?`,
862    avatarFile: '${Q.avatarFile}',
863    avatarUrl: '${Q.avatarUrl}'`:""}`,en=A?`
864
865<!-- ElevenLabs Voice Bot Integration -->
866<script type="module">
867  import { Conversation } from 'https://cdn.jsdelivr.net/npm/@11labs/[email protected]/+esm';
868  
869  // Configure your agent
870  const conversation = new Conversation({
871    agentId: '${B}',
872    apiKey: 'YOUR_ELEVENLABS_API_KEY'
873  });
874<\/script>`:"";switch(X){case"html":return`<!DOCTYPE html>
875<html lang="en">
876<head>
877    <meta charset="UTF-8">
878    <meta name="viewport" content="width=device-width, initial-scale=1.0">
879    <title>Chatbot Integration</title>
880    <link rel="stylesheet" href="https://your-cdn.com/chatbot-widget.css">
881</head>
882<body>
883    <!-- Your page content -->
884    
885    <!-- Chatbot Widget -->
886    <div id="chatbot-container"></div>
887    
888    <script src="https://your-cdn.com/chatbot-widget.js"><\/script>
889    <script>
890        // Initialize the chatbot
891        window.initChatbot({
892${Je.split(`
893`).map(jt=>"            "+jt.trim().replace(/^/,"")).join(`
894`)}
895        });
896    <\/script>${en}
897</body>
898</html>`;case"react-ts":return`import React from 'react';
899import { ChatbotWidget } from './components/ChatbotWidget';
900
901const App: React.FC = () => {
902  return (
903    <div className="App">
904      {/* Your app content */}
905      
906      <ChatbotWidget
907${Je}
908      />
909    </div>
910  );
911};
912
913export default App;`;case"react-js":return`import React from 'react';
914import { ChatbotWidget } from './components/ChatbotWidget';
915
916const App = () => {
917  return (
918    <div className="App">
919      {/* Your app content */}
920      
921      <ChatbotWidget
922${Je}
923      />
924    </div>
925  );
926};
927
928export default App;`;case"vue":return`<template>
929  <div id="app">
930    <!-- Your app content -->
931    
932    <ChatbotWidget
933      :webhook-url="'${Q.webhookUrl}'"
934      :title="'${Q.title}'"
935      :bio="'${Q.bio}'"
936      :placeholder="'${Q.placeholder}'"
937      :position="'${Q.position}'"
938      :primary-color="'${Q.primaryColor}'"
939      :secondary-color="'${Q.secondaryColor}'"
940      :text-color="'${Q.textColor}'"
941      :user-text-color="'${Q.userTextColor}'"
942      :chat-background="'${Q.chatBackground}'"
943      :welcome-message="'${Q.welcomeMessage}'"
944      :admin="${Q.admin}"
945      :is-voice-enabled="${Q.isVoiceEnabled}"${Q.logoFile?`
946      :logo-file="'${Q.logoFile}'"`:""}
947    />
948  </div>
949</template>
950
951<script>
952import ChatbotWidget from './components/ChatbotWidget.vue';
953
954export default {
955  name: 'App',
956  components: {
957    ChatbotWidget
958  }
959};
960<\/script>`;case"dotnet":return`@* Add this to your layout or page *@
961<div id="chatbot-container"></div>
962
963@* Add these scripts before closing body tag *@
964<script src="https://your-cdn.com/chatbot-widget.js"><\/script>
965<script>
966    document.addEventListener('DOMContentLoaded', function() {
967        window.initChatbot({
968${Je.split(`
969`).map(jt=>"            "+jt.trim()).join(`
970`)}
971        });
972    });
973<\/script>
974
975@* In your controller *@
976@* 
977public IActionResult Index()
978{
979    ViewBag.WebhookUrl = "${Q.webhookUrl}";
980    ViewBag.LogoFile = "${Q.logoFile}";
981    ViewBag.ChatTitle = "${Q.title}";
982    ViewBag.WelcomeMessage = "${Q.welcomeMessage}";
983    return View();
984}
985*@
986
987Then in your view, you can use:
988webhookUrl: '@ViewBag.WebhookUrl',
989logoFile: '@ViewBag.LogoFile',
990title: '@ViewBag.ChatTitle',
991welcomeMessage: '@ViewBag.WelcomeMessage'`;case"angular":return`// chatbot.service.ts
992import { Injectable } from '@angular/core';
993
994@Injectable({
995  providedIn: 'root'
996})
997export class ChatbotService {
998  private config = {
999${Je.split(`
1000`).map(jt=>"    "+jt.trim()).join(`
1001`)}
1002  };
1003
1004  initChatbot() {
1005    // Load chatbot widget
1006    const script = document.createElement('script');
1007    script.src = 'https://your-cdn.com/chatbot-widget.js';
1008    script.onload = () => {
1009      (window as any).initChatbot(this.config);
1010    };
1011    document.head.appendChild(script);
1012  }
1013}
1014
1015// app.component.ts
1016import { Component, OnInit } from '@angular/core';
1017import { ChatbotService } from './chatbot.service';
1018
1019@Component({
1020  selector: 'app-root',
1021  template: \`
1022    <div class="app">
1023      <!-- Your app content -->
1024      <div id="chatbot-container"></div>
1025    </div>
1026  \`
1027})
1028export class AppComponent implements OnInit {
1029  constructor(private chatbotService: ChatbotService) {}
1030
1031  ngOnInit() {
1032    this.chatbotService.initChatbot();
1033  }
1034}`;default:return"Language not supported"}};return u.jsxs("div",{className:"space-y-8",children:[u.jsxs("div",{className:"text-center space-y-2",children:[u.jsx("h2",{className:"text-3xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"Chatbot & Voice Agent Widget Configuration"}),u.jsx("p",{className:"text-gray-600 max-w-2xl mx-auto",children:"Customize your chatbot's appearance, behavior, and integration settings. Preview changes in real-time and generate code for seamless integration."})]}),u.jsx("div",{className:"w-full",children:u.jsxs("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-6",children:[u.jsxs(Sn,{className:"border-2 hover:border-blue-500/50 transition-all duration-300 hover:shadow-xl animate-slide-in-left",children:[u.jsx(gs,{className:"bg-gradient-to-r from-blue-500/5 to-purple-500/5",children:u.jsxs(vs,{className:"flex items-center gap-2",children:[u.jsx(id,{className:"w-5 h-5 text-blue-600"}),"Basic Configuration"]})}),u.jsxs(Wn,{className:"space-y-6 p-6",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"webhookUrl",className:"text-sm font-medium",children:"Webhook URL"}),u.jsx(at,{id:"webhookUrl",value:t,onChange:X=>e(X.target.value),placeholder:"https://your-api.com/chatbot/webhook",className:"transition-all duration-200 focus:ring-2 focus:ring-blue-500/20"}),u.jsx("p",{className:"text-xs text-gray-500",children:"The endpoint where chat messages will be sent"})]}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"title",className:"text-sm font-medium",children:"Chat Title"}),u.jsx(at,{id:"title",value:n,onChange:X=>r(X.target.value),placeholder:"Chat Support",className:"transition-all duration-200 focus:ring-2 focus:ring-blue-500/20"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"bio",className:"text-sm font-medium",children:"Status/Bio"}),u.jsx(at,{id:"bio",value:s,onChange:X=>o(X.target.value),placeholder:"Online now",className:"transition-all duration-200 focus:ring-2 focus:ring-blue-500/20"})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"placeholder",className:"text-sm font-medium",children:"Input Placeholder"}),u.jsx(at,{id:"placeholder",value:i,onChange:X=>a(X.target.value),placeholder:"Type your message...",className:"transition-all duration-200 focus:ring-2 focus:ring-blue-500/20"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"position",className:"text-sm font-medium",children:"Widget Position"}
1034),u.jsxs("select",{id:"position",value:l,onChange:X=>c(X.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500/20 transition-all duration-200",children:[u.jsx("option",{value:"bottom-right",children:"Bottom Right"}),u.jsx("option",{value:"bottom-left",children:"Bottom Left"})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"welcomeMessage",className:"text-sm font-medium",children:"Welcome Message"}),u.jsx(Cd,{id:"welcomeMessage",value:T,onChange:X=>I(X.target.value),placeholder:"Hello! How can I help you today?",className:"min-h-[80px] transition-all duration-200 focus:ring-2 focus:ring-blue-500/20"}),u.jsx("p",{className:"text-xs text-gray-500",children:"First message users see when opening the chat"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"welcomeTooltipMessage",className:"text-sm font-medium",children:"Button Tooltip Message"}),u.jsx(at,{id:"welcomeTooltipMessage",value:ve,onChange:X=>Qe(X.target.value),placeholder:"Click to start chatting with our AI assistant!",className:"transition-all duration-200 focus:ring-2 focus:ring-blue-500/20"}),u.jsx("p",{className:"text-xs text-gray-500",children:"Tooltip message that appears on the chat button"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"logoFile",className:"text-sm font-medium",children:"Header Logo (optional)"}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs(yu,{open:N,onOpenChange:O,children:[u.jsx(wu,{asChild:!0,children:u.jsxs(Ze,{type:"button",variant:"outline",className:"w-full h-10 flex items-center justify-center gap-2",children:[u.jsx(Ga,{className:"h-4 w-4"}),_?"Change Header Logo":"Upload & Crop Header Logo"]})}),u.jsx(rl,{className:"max-w-lg",children:u.jsx(Dp,{onCrop:X=>{S(X),O(!1)},onCancel:()=>O(!1),initialImage:_,size:200})})]}),_&&u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:"flex-shrink-0",children:u.jsx("div",{className:"w-16 h-16 rounded-full border-2 border-gray-200 overflow-hidden bg-gray-50",children:u.jsx("img",{src:URL.createObjectURL(_),alt:"Header logo preview",className:"w-full h-full object-contain"})})}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("p",{className:"text-sm text-gray-600 truncate",children:_.name}),u.jsx("p",{className:"text-xs text-gray-400",children:"Header logo preview"})]}),u.jsx(Ze,{type:"button",variant:"ghost",size:"sm",onClick:()=>O(!0),className:"flex-shrink-0",children:u.jsx(Hh,{className:"h-4 w-4"})}),u.jsx(Ze,{type:"button",variant:"ghost",size:"sm",onClick:()=>S(null),className:"flex-shrink-0",children:"Remove"})]})]}),u.jsx("p",{className:"text-xs text-gray-500",children:"Logo displayed in the chat widget header"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"avatarFile",className:"text-sm font-medium",children:"Avatar Image (optional)"}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs(yu,{open:Z,onOpenChange:W,children:[u.jsx(wu,{asChild:!0,children:u.jsxs(Ze,{type:"button",variant:"outline",className:"w-full h-10 flex items-center justify-center gap-2",children:[u.jsx(Ga,{className:"h-4 w-4"}),C?"Change Avatar":"Upload & Crop Avatar"]})}),u.jsx(rl,{className:"max-w-lg",children:u.jsx(Dp,{onCrop:X=>{k(X),W(!1)},onCancel:()=>W(!1),initialImage:C,size:200})})]}),C&&u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:"flex-shrink-0",children:u.jsx("div",{className:"w-16 h-16 rounded-full border-2 border-gray-200 overflow-hidden bg-gray-50",children:u.jsx("img",{src:URL.createObjectURL(C),alt:"Avatar preview",className:"w-full h-full object-contain"})})}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("p",{className:"text-sm text-gray-600 truncate",children:C.name}),u.jsx("p",{className:"text-xs text-gray-400",children:"Avatar preview"})]}),u.jsx(Ze,{type:"button",variant:"ghost",size:"sm",onClick:()=>W(!0),className:"flex-shrink-0",children:u.jsx(Hh,{className:"h-4 w-4"})}),u.jsx(Ze,{type:"button",variant:"ghost",size:"sm",onClick:()=>k(null),className:"flex-shrink-0",children:"Remove"})]})]}),u.jsx("p",{className:"text-xs text-gray-500",children:"Avatar displayed in message bubbles and call interface"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"logoBackgroun
1034dColor",className:"text-sm font-medium",children:"Logo Background Color"}),u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(at,{id:"logoBackgroundColor",type:"color",value:de==="transparent"?"#ffffff":de,onChange:X=>Ae(X.target.value),className:"w-16 h-10 p-1 border rounded"}),u.jsx("div",{className:"flex-1",children:u.jsx(at,{type:"text",value:de,onChange:X=>Ae(X.target.value),placeholder:"Background color or 'transparent'",className:"text-sm"})}),u.jsx(Ze,{type:"button",variant:"outline",size:"sm",onClick:()=>Ae("transparent"),className:"text-xs",children:"Transparent"})]}),u.jsx("p",{className:"text-xs text-gray-500",children:"Background color behind the logo (set to 'transparent' for no background)"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"logoBorderColor",className:"text-sm font-medium",children:"Logo Border Color"}),u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(at,{id:"logoBorderColor",type:"color",value:ue==="none"?"#e5e7eb":ue,onChange:X=>se(X.target.value),className:"w-16 h-10 p-1 border rounded"}),u.jsx("div",{className:"flex-1",children:u.jsx(at,{type:"text",value:ue,onChange:X=>se(X.target.value),placeholder:"Enter border color or 'none'",className:"text-sm"})}),u.jsx(Ze,{type:"button",variant:"outline",size:"sm",onClick:()=>se("none"),className:"text-xs",children:"No Border"})]}),u.jsx("p",{className:"text-xs text-gray-500",children:"Border around the logo (set to 'none' for no border)"})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"admin",className:"text-sm font-medium",children:"Admin Mode"}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("input",{type:"checkbox",id:"admin",checked:P,onChange:X=>D(X.target.checked),className:"rounded border-input focus:ring-2 focus:ring-orange-500/20"}),u.jsx(Ve,{htmlFor:"admin",className:"text-sm text-muted-foreground",children:"Enable edit message functionality"})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"isElevenLabsEnabled",className:"text-sm font-medium",children:"ElevenLabs Voice Bot"}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("input",{type:"checkbox",id:"isElevenLabsEnabled",checked:A,onChange:X=>z(X.target.checked),className:"rounded border-input focus:ring-2 focus:ring-orange-500/20"}),u.jsx(Ve,{htmlFor:"isElevenLabsEnabled",className:"text-sm text-muted-foreground",children:"Enable ElevenLabs conversational AI"})]})]}),A&&u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"elevenLabsAgentId",className:"text-sm font-medium",children:"ElevenLabs Agent ID"}),u.jsx(at,{id:"elevenLabsAgentId",value:B,onChange:X=>G(X.target.value),placeholder:"agent_01k04zwwq3fv5acgzdwmbvfk8k",className:"transition-all duration-200 focus:ring-2 focus:ring-orange-500/20"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Your ElevenLabs agent ID from the conversational AI dashboard"})]})]}),u.jsxs("div",{className:"space-y-4 pt-4 border-t",children:[u.jsx(Ve,{className:"text-sm font-medium",children:"Generate Integration Code"}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs(eC,{value:Tt,onValueChange:E,children:[u.jsx(Rg,{className:"w-full",children:u.jsx(tC,{placeholder:"Select a language"})}),u.jsxs(Ag,{children:[u.jsx(an,{value:"html",children:"HTML"}),u.jsx(an,{value:"react-ts",children:"React (TypeScript)"}),u.jsx(an,{value:"react-js",children:"React (JavaScript)"}),u.jsx(an,{value:"vue",children:"Vue.js"}),u.jsx(an,{value:"dotnet",children:".NET"}),u.jsx(an,{value:"angular",children:"Angular"})]})]}),u.jsxs(Ze,{onClick:()=>H(Tt),className:"w-full bg-gradient-to-r from-orange-500 to-red-500 hover:from-orange-600 hover:to-red-600 transition-all duration-300 hover:scale-105",children:[u.jsx(Sa,{className:"w-4 h-4 mr-2"}),"Copy ",oe(Tt)," Integration Code"]})]})]})]})]}),u.jsxs(Sn,{className:"border-2 hover:border-orange-500/50 transition-all duration-300 hover:shadow-xl animate-slide-in-right",children:[u.jsx(gs,{className:"bg-gradient-to-r from-purple-500/5 to-pink-500/5",children:u.jsxs(vs,{className:"flex items-center gap-2",children:[u.jsx(Bm,{className:"w-5 h-5 text-purple-600"}),"Color Customization"]})}),u.jsx(Wn,{className:"space-y-4 p-6",children:[{id:"primaryColor",label:"Primary Color",value:d,setter:f,desc:"Header background and user message bubbles"},{id:"secondaryColor",label:"Secondary Color",value:p,setter:y,desc:"Bot message bubble background"}
1034,{id:"chatBackground",label:"Chat Background",value:m,setter:w,desc:"Main chat window background"},{id:"textColor",label:"Bot Text Color",value:x,setter:v,desc:"Text color for bot messages"},{id:"userTextColor",label:"User Text Color",value:b,setter:g,desc:"Text color for user messages"},{id:"headerGradientColor",label:"Header Gradient Color",value:Y,setter:$,desc:"Start and end color for the header gradient"},{id:"headerMainColor",label:"Header Main Color",value:te,setter:ee,desc:"Middle color for the header gradient effect"},{id:"headerButtonColor",label:"Header Button Color",value:me,setter:Me,desc:"Color for buttons and icons in the header"}].map((X,Q)=>u.jsxs("div",{className:"space-y-2 animate-fade-in",style:{animationDelay:`${Q*100}ms`},children:[u.jsx(Ve,{htmlFor:X.id,className:"text-sm font-medium",children:X.label}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(at,{id:X.id,type:"color",value:X.value,onChange:Je=>X.setter(Je.target.value),className:"w-16 h-10 p-1 rounded-md border transition-all duration-200 hover:scale-105"}),u.jsx(at,{value:X.value,onChange:Je=>X.setter(Je.target.value),className:"flex-1 transition-all duration-200 focus:ring-2 focus:ring-purple-500/20"})]}),u.jsx("p",{className:"text-xs text-muted-foreground",children:X.desc})]},X.id))})]})]})})]})};var Og="Collapsible",[n4,wC]=Mr(Og),[r4,Mg]=n4(Og),xC=h.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:o,onOpenChange:i,...a}=t,[l=!1,c]=qn({prop:r,defaultProp:s,onChange:i});return u.jsx(r4,{scope:n,disabled:o,contentId:Vn(),open:l,onOpenToggle:h.useCallback(()=>c(d=>!d),[c]),children:u.jsx(ce.div,{"data-state":Dg(l),"data-disabled":o?"":void 0,...a,ref:e})})});xC.displayName=Og;var bC="CollapsibleTrigger",_C=h.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,s=Mg(bC,n);return u.jsx(ce.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Dg(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:e,onClick:ae(t.onClick,s.onOpenToggle)})});_C.displayName=bC;var Lg="CollapsibleContent",SC=h.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=Mg(Lg,t.__scopeCollapsible);return u.jsx(ed,{present:n||s.open,children:({present:o})=>u.jsx(s4,{...r,ref:e,present:o})})});SC.displayName=Lg;var s4=h.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:s,...o}=t,i=Mg(Lg,n),[a,l]=h.useState(r),c=h.useRef(null),d=Te(e,c),f=h.useRef(0),p=f.current,y=h.useRef(0),x=y.current,v=i.open||a,b=h.useRef(v),g=h.useRef();return h.useEffect(()=>{const m=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(m)},[]),ot(()=>{const m=c.current;if(m){g.current=g.current||{transitionDuration:m.style.transitionDuration,animationName:m.style.animationName},m.style.transitionDuration="0s",m.style.animationName="none";const w=m.getBoundingClientRect();f.current=w.height,y.current=w.width,b.current||(m.style.transitionDuration=g.current.transitionDuration,m.style.animationName=g.current.animationName),l(r)}},[i.open,r]),u.jsx(ce.div,{"data-state":Dg(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!v,...o,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...t.style},children:v&&s})});function Dg(t){return t?"open":"closed"}var o4=xC,i4=_C,a4=SC,Lr="Accordion",l4=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[$g,c4,u4]=Cl(Lr),[$d,Z4]=Mr(Lr,[u4,wC]),Fg=wC(),kC=L.forwardRef((t,e)=>{const{type:n,...r}=t,s=r,o=r;return u.jsx($g.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?u.jsx(p4,{...o,ref:e}):u.jsx(h4,{...s,ref:e})})});kC.displayName=Lr;var[CC,d4]=$d(Lr),[EC,f4]=$d(Lr,{collapsible:!1}),h4=L.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:o=!1,...i}=t,[a,l]=qn({prop:n,defaultProp:r,onChange:s});return u.jsx(CC,{scope:t.__scopeAccordion,value:a?[a]:[],onItemOpen:l,onItemClose:L.useCallback(()=>o&&l(""),[o,l]),children:u.jsx(EC,{scope:t.__scopeAccordion,collapsible:o,children:u.jsx(TC,{...i,ref:e})})})}),p4=L.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...o}=t,[i=[],a]=qn({prop:n,defaultProp:r,onChange:s}),l=L.useCallback(d=>a((f=[])=>[...f,d]),[a]),c=L.useCallback(d=>a((f=[])=>f.filter(p=>p!==d)),[a]);return u.jsx(CC,{scope:t.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:u.jsx(EC,{scope:t.__scopeAccordion,collapsible:!0,children:u.jsx(TC,{...o,ref:e})})})}),[m4,Fd]=$d(Lr),TC=L.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:o="vertical",...i}=t,a=L.useRef(null),l=Te(a,e),c=c4(n),f=Ml(s)==="ltr",p=ae(t.onKeyDown,y=>{var T;if(!l4.includes(y.key))return;const x=y.target,v=c().filter(I=>{var P;return!((P=I.ref.current)!=null&&P.disabled)}),b=v.findIndex(I=>I.ref.current===x),g=v.length;if(b===-1)return;y.preventDefault();let m=b;const w=0,_=g-1,S=()=>{m=b+1,m>_&&(m=w)},C=()=>{m=b-1,m<w&&(m=_)};switch(y.key){case"Home":m=w;break;case"End":m=_;break;case"ArrowRight":o==="horizontal"&&(f?S():C());break;case"ArrowDown":o==="vertical"&&S();break;case"ArrowLeft":o==="horizontal"&&(f?C():S());break;case"ArrowUp":o==="vertical"&&C();break}const k=m%g;(T=v[k].ref.current)==null||T.focus()});return u.jsx(m4,{scope:n,disabled:r,direction:s,orientation:o,children:u.jsx($g.Slot,{scope:n,children:u.jsx(ce.div,{...i,"data-orientation":o,ref:l,onKeyDown:r?void 0:p})})})}),Ou="AccordionItem",[g4,Ug]=$d(Ou),jC=L.forwardRef((t,e)=>{const{__scopeAccordion:n,value:r,...s}=t,o=Fd(Ou,n),i=d4(Ou,n),a=Fg(n),l=Vn(),c=r&&i.value.includes(r)||!1,d=o.disabled||t.disabled;return u.jsx(g4,{scope:n,open:c,disabled:d,triggerId:l,children:u.jsx(o4,{"data-orientation":o.orientation,"data-state":OC(c),...a,...s,ref:e,disabled:d,open:c,onOpenChange:f=>{f?i.onItemOpen(r):i.onItemClose(r)}})})});jC.displayName=Ou;var NC="AccordionHeader",PC=L.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=Fd(Lr,n),o=Ug(NC,n);return u.jsx(ce.h3,{"data-orientation":s.orientation,"data-state":OC(o.open),"data-disabled":o.disabled?"":void 0,...r,ref:e})});PC.displayName=NC;var $p="AccordionTrigger",RC=L.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=Fd(Lr,n),o=Ug($p,n),i=f4($p,n),a=Fg(n);return u.jsx($g.ItemSlot,{scope:n,children:u.jsx(i4,{"aria-disabled":o.open&&!i.collapsible||void 0,"data-orientation":s.orientation,id:o.triggerId,...a,...r,ref:e})})});RC.displayName=$p;var AC="AccordionContent",IC=L.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=Fd(Lr,n),o=Ug(AC,n),i=Fg(n);return u.jsx(a4,{role:"region","aria-labelledby":o.triggerId,"data-orientation":s.orientation,...i,...r,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});IC.displayName=AC;function OC(t){return t?"open":"closed"}var v4=kC,y4=jC,w4=PC,MC=RC,LC=IC;const L0=v4,Fp=h.forwardRef(({className:t,...e},n)=>u.jsx(y4,{ref:n,className:be("border-b",t),...e}));Fp.displayName="AccordionItem";const Up=h.forwardRef(({className:t,children:e,...n},r)=>u.jsx(w4,{className:"flex",children:u.jsxs(MC,{ref:r,className:be("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...n,children:[e,u.jsx(Um,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Up.displayName=MC.displayName;const Bp=h.forwardRef(({className:t,children:e,...n},r)=>u.jsx(LC,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:u.jsx("div",{className:be("pb-4 pt-0",t),children:e})}));Bp.displayName=LC.displayName;const x4=()=>{const t=[{question:"How do I integrate the chatbot into my website?",answer:"Integration is seamless. We provide a single-line <script> tag that you can paste into the <head> or <body> section of your website. Once added, the chatbot will automatically appear based on the configuration provided."},{question:"Can I customize the chatbot's look and feel?",answer:"Yes! Our chatbot is fully customizable—colors, logo, avatar, positioning, welcome message, and tone of conversation can all be tailored to match your brand's identity."},{question:"Is the chatbot compatible with all website platforms?",answer:"Our chatbot works across all modern web platforms including WordPress, Shopify, Wix, Webflow, React.js, and more. If your website supports adding JavaScript, you're good to go."},{question:"Does the chatbot support multilingual interactions?",answer:"Absolutely. The bot can be configured to support multiple languages and can auto-detect the user's browser language or allow manual language selection."},{question:"How secure is the chatbot for collecting user information?",answer:"We use domain-level validation via CORS, secure session-based communication, and encryption for data in transit and at rest. You can also configure which data is collected, if any."},{question:"Can the chatbot handle appointment bookings or lead capture?",answer:"Yes. Our chatbot can be integrated 
1034with your CRM or appointment system and supports form-based inputs, lead capture, and webhook/API submissions."},{question:"Is there analytics available for the chatbot?",answer:"Yes. You can access a detailed dashboard that includes conversation logs, user engagement metrics, popular questions, and conversion tracking."},{question:"Can I train the chatbot with my own content?",answer:"Of course. You can feed the chatbot your FAQs, help docs, or knowledge base content. We also support advanced AI training with documents, URLs, or even custom APIs."},{question:"Is there a voice-based chatbot option available?",answer:"Yes. We offer AI voice agent integration via third-party services like Vapi, Twilio, or Eleven Labs, allowing users to interact with the bot via voice."},{question:"Do you offer support and onboarding?",answer:"Yes. Our team provides technical onboarding, training, and post-deployment support to ensure your chatbot is set up for success."}];return u.jsx("div",{className:"py-24 bg-background",children:u.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[u.jsxs("div",{className:"text-center mb-16",children:[u.jsxs(Cg,{className:"mb-6 px-4 py-2 bg-primary text-primary-foreground border-0",children:[u.jsx(Lb,{className:"w-4 h-4 mr-2"}),"FAQ"]}),u.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-6 text-foreground pb-2 text-center",children:"Frequently Asked Questions"}),u.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto leading-relaxed text-center",children:"Everything you need to know about our chatbot integration and features"})]}),u.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 items-start",children:[u.jsx("div",{className:"space-y-4",children:u.jsx(L0,{type:"single",collapsible:!0,className:"w-full space-y-4",children:t.slice(0,5).map((e,n)=>u.jsxs(Fp,{value:`item-${n}`,className:"border border-border rounded-xl px-6 bg-card hover:shadow-lg transition-all duration-300 hover:border-primary/20",children:[u.jsx(Up,{className:"text-left font-semibold text-base hover:no-underline py-6 group",children:u.jsxs("span",{className:"flex items-center gap-3",children:[u.jsx("span",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center text-primary font-bold text-sm",children:String(n+1).padStart(2,"0")}),e.question]})}),u.jsx(Bp,{className:"text-muted-foreground leading-relaxed pt-2 pb-6 pl-11",children:e.answer})]},n))})}),u.jsx("div",{className:"space-y-4",children:u.jsx(L0,{type:"single",collapsible:!0,className:"w-full space-y-4",children:t.slice(5).map((e,n)=>u.jsxs(Fp,{value:`item-${n+5}`,className:"border border-border rounded-xl px-6 bg-card hover:shadow-lg transition-all duration-300 hover:border-primary/20",children:[u.jsx(Up,{className:"text-left font-semibold text-base hover:no-underline py-6 group",children:u.jsxs("span",{className:"flex items-center gap-3",children:[u.jsx("span",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center text-primary font-bold text-sm",children:String(n+6).padStart(2,"0")}),e.question]})}),u.jsx(Bp,{className:"text-muted-foreground leading-relaxed pt-2 pb-6 pl-11",children:e.answer})]},n+5))})})]}),u.jsxs("div",{className:"text-center mt-16 p-8 rounded-2xl bg-gradient-to-r from-primary/5 to-primary/10 border border-primary/20",children:[u.jsx("h3",{className:"text-2xl font-bold text-foreground mb-4 pb-1",children:"Still have questions?"}),u.jsx("p",{className:"text-muted-foreground mb-6",children:"Our team is here to help you get started with your chatbot integration"}),u.jsxs("a",{href:"mailto:[email protected]",className:"inline-flex items-center justify-center gap-2 text-primary font-semibold hover:gap-3 transition-all duration-300 cursor-pointer",children:["Contact our support team",u.jsx(v2,{className:"w-4 h-4"})]})]})]})})},b4=({agentId:t,title:e="AI Voice Assistant",description:n="Get instant answers to your questions. Our AI assistant is ready to help you 24/7.",buttonText:r="Talk to AI Agent",buttonColor:s="#000000",backgroundColor:o="#ffffff",textColor:i="#000000",secondaryTextColor:a="#666666",borderColor:l="#e5e7eb",shadowColor:c="rgba(0,0,0,0.08)",statusBgColor:d="#f0fdf4",statusTextColor:f="#15803d",avatarUrl:p="/lovable-uploads/46013ce6-0e78-4209-885a-6fc3259809c2.png",className:y=""})=>{const[x,v]=h.useState(!1),[b,g]=h.useState(null),[m,w]=h.useState(0),[_,S]=h.useState(!1),[C,k]=h.useState(!1),T=h.useRef(null);h.useEffect(()=>(x?(w(0),T.current=setInterval(()=>{w(R=>R+1)},1e3)):(T.current&&(clearInterval(T.current),T.current=null),w(0)),()=>{T.current&&clearInterval(T.current)}),[x]);const I=j_({onConnect:()=>{console.log("Connected to voice agent")},onDisconnect:()=>{console.log("Disconnected from voice agent"),g(null),v(!1),w(0),S(!1),k(!1)},onError:R=>{console.error("Voice agent error:",R)},onMessage:R=>{console.log("Voice message:",R)}}),P=async()=>{try{await navigator.mediaDevices.getUserMedia({audio:!0});const R=await I.startSession({agentId:t});g(R),v(!0)}catch(R){console.error("Failed to start conversation:",R),alert("Failed to start voice conversation. Please check your microphone permissions and agent ID.")}},D=async()=>{try{await I.endSession(),g(null),v(!1)}catch(R){console.error("Failed to end conversation:",R)}};return u.jsxs("div",{className:`voice-widget max-w-[400px] sm:max-w-[1200px] w-full rounded-[20px] p-6 sm:p-8 lg:px-[60px] lg:py-10 flex flex-col lg:flex-row items-center gap-6 lg:gap-10 relative ${x?"in-call":""} ${y}
1034`,style:{backgroundColor:o,boxShadow:`0 10px 30px ${c}`,color:i},children:[u.jsx("div",{className:"flex-shrink-0",children:u.jsxs("div",{className:"w-[100px] h-[100px] relative",children:[u.jsx("div",{className:"w-full h-full rounded-full overflow-hidden",style:{boxShadow:"0 5px 20px rgba(0,0,0,0.15)"},children:u.jsx("img",{src:p,alt:"Brand avatar",className:"w-full h-full object-contain",style:{imageRendering:"crisp-edges",filter:"contrast(1.05) saturate(1.1)"}})}),x?u.jsx("div",{className:"absolute bottom-0 right-0 w-8 h-8 bg-green-500 rounded-full flex items-center justify-center shadow-lg border-2 border-white",children:u.jsx("div",{className:"flex items-end gap-[1px] h-3",children:[1,2,3,4,5].map(R=>u.jsx("div",{className:`w-[1.5px] bg-white rounded-sm ${I.isSpeaking?"animate-voice-bar":"h-1.5"}`,style:{height:I.isSpeaking?void 0:"6px",animationDelay:`${R*.1}s`}},R))})}):u.jsx("div",{className:"absolute bottom-0 right-0 w-8 h-8 bg-gray-800 rounded-full flex items-center justify-center shadow-lg border-2 border-white",children:u.jsx(Ei,{className:"w-3.5 h-3.5 text-white"})})]})}),u.jsxs("div",{className:"flex-1 text-center lg:text-left",children:[u.jsx("h2",{className:"text-2xl lg:text-[32px] font-bold mb-2 lg:mb-2 leading-tight",style:{color:i},children:x?"Connected":e}),x?u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"text-green-500 text-2xl lg:text-3xl font-mono font-bold tabular-nums",children:[Math.floor(m/60).toString().padStart(2,"0"),":",(m%60).toString().padStart(2,"0")]}),u.jsx("p",{className:"text-base lg:text-lg",style:{color:a},children:"Speaking with AI Agent"})]}):u.jsx("p",{className:"text-base lg:text-lg leading-relaxed max-w-[600px]",style:{color:a},children:n})]}),u.jsxs("div",{className:"flex flex-col items-center lg:items-end gap-4 flex-shrink-0",children:[u.jsxs("div",{className:"flex items-center gap-1.5 px-4 py-1.5 rounded-full text-xs font-medium transition-all",style:{backgroundColor:x?"#dcfce7":d,color:x?"#15803d":f},children:[u.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${x?"animate-pulse":""}`,style:{backgroundColor:x?"#22c55e":"#4ade80"}}),x?"In Call":"Available 24/7"]}),x?u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("button",{onClick:()=>S(!_),className:`w-12 h-12 rounded-full flex items-center justify-center transition-all duration-200 hover:scale-110 ${_?"bg-red-500 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"}`,children:_?u.jsx(Ub,{className:"w-5 h-5"}):u.jsx(od,{className:"w-5 h-5"})}),u.jsx("button",{onClick:D,className:"w-14 h-14 rounded-full bg-red-500 text-white flex items-center justify-center transition-all duration-200 hover:bg-red-600 hover:scale-110 shadow-lg",children:u.jsx(Vb,{className:"w-6 h-6"})}),u.jsx("button",{onClick:()=>k(!C),className:`w-12 h-12 rounded-full flex items-center justify-center transition-all duration-200 hover:scale-110 ${C?"bg-blue-500 text-white":"bg-gray-200 text-gray-600 hover:bg-gray-300"}`,children:u.jsx(Vm,{className:"w-5 h-5"})})]}):u.jsxs("button",{onClick:P,className:"inline-flex items-center gap-2.5 px-9 py-4 text-base font-semibold cursor-pointer transition-all duration-200 hover:-translate-y-0.5 active:translate-y-0 text-white whitespace-nowrap",style:{backgroundColor:s,borderRadius:"30px",boxShadow:"0 4px 15px rgba(0,0,0,0.12)"},onMouseEnter:R=>{R.currentTarget.style.boxShadow="0 8px 20px rgba(0,0,0,0.12)"},onMouseLeave:R=>{R.currentTarget.style.boxShadow="0 4px 15px rgba(0,0,0,0.12)"},children:[u.jsx(Ei,{className:"w-5 h-5"}),u.jsx("span",{children:r})]})]})]})},DC=({isDarkMode:t=!1})=>{console.log("VoiceAgentSection rendering - no VoiceAgentCustomizer here");const[e,n]=h.useState("agent_01k04zwwq3fv5acgzdwmbvfk8k"),[r,s]=h.useState("Talk to AI Agent"),[o,i]=h.useState("#000000"),[a,l]=h.useState("#ffffff"),[c,d]=h.useState("#000000"),[f,p]=h.useState("#666666"),[y,x]=h.useState("#e5e7eb"),[v,b]=h.useState("rgba(0,0,0,0.08)"),[g,m]=h.useState("#f0fdf4"),[w,_]=h.useState("#15803d"),[S,C]=h.useState("AI Voice Assistant"),[k,T]=h.useState("Get instant answers to your questions. Our AI assistant is ready to help you 24/7."),[I,P]=h.useState(null),[D,R]=h.useState("html"),[M,A]=h.useState(!1),{toast:z}=Ju(),B=I?URL.createObjectURL(I):"/lovable-uploads/48879003-fa58-48bb-a9a5-3e3f334800f9.png",G=$=>({html:"HTML","react-ts":"React (TypeScript)","react-js":"React (JavaScript)",vue:"Vue.js",dotnet:".NET",angular:"Angular"})[$]||$,j=$=>{const te=I?"/lovable-uploads/48879003-fa58-48bb-a9a5-3e3f334800f9.png":B,ee={agentId:e,title:S.replace(/"/g,'\\"'),description:k.replace(/"/g,'\\"'),buttonText:r.replace(/"/g,'\\"'),buttonColor:o,backgroundColor:a,textColor:c,secondaryTextColor:f,borderColor:y,shadowColor:v,statusBgColor:g,statusTextColor:w,avatarUrl:te},de=`  agentId: "${ee.agentId}",
1035    title: "${ee.title}",
1036    description: "${ee.description}",
1037    buttonText: "${ee.buttonText}",
1038    buttonColor: "${ee.buttonColor}",
1039    backgroundColor: "${ee.backgroundColor}",
1040    textColor: "${ee.textColor}",
1041    secondaryTextColor: "${ee.secondaryTextColor}",
1042    borderColor: "${ee.borderColor}",
1043    shadowColor: "${ee.shadowColor}",
1044    statusBgColor: "${ee.statusBgColor}",
1045    statusTextColor: "${ee.statusTextColor}",
1046    avatarUrl: "${ee.avatarUrl}"`;switch($){case"html":return`<!DOCTYPE html>
1047<html lang="en">
1048<head>
1049    <meta charset="UTF-8">
1050    <meta name="viewport" content="width=device-width, initial-scale=1.0">
1051    <title>Voice Widget Integration</title>
1052    <link rel="stylesheet" href="https://voice-agent-uvke.onrender.com/cdn/voice-widget.css">
1053</head>
1054<body>
1055    <!-- Your page content -->
1056    
1057    <!-- Voice Widget Container -->
1058    <div id="voice-widget-container"></div>
1059    
1060    <script src="https://voice-agent-uvke.onrender.com/cdn/voice-widget.js"><\/script>
1061    <script>
1062        // Initialize the voice widget
1063        document.addEventListener('DOMContentLoaded', function() {
1064            const instance = new window.VoiceWidget.VoiceManager();
1065            instance.init({
1066${de.split(`
1067`).map(Ae=>"                "+Ae.trim()).join(`
1068`)},
1069                container: '#voice-widget-container'
1070            });
1071        });
1072    <\/script>
1073</body>
1074</html>`;case"react-ts":return`// Step 1: Create VoiceWidget.tsx component
1075import React, { useEffect, useRef } from 'react';
1076
1077interface VoiceWidgetProps {
1078  agentId: string;
1079  title?: string;
1080  description?: string;
1081  buttonText?: string;
1082  buttonColor?: string;
1083  backgroundColor?: string;
1084  textColor?: string;
1085  secondaryTextColor?: string;
1086  borderColor?: string;
1087  shadowColor?: string;
1088  statusBgColor?: string;
1089  statusTextColor?: string;
1090  avatarUrl?: string;
1091}
1092
1093const VoiceWidget: React.FC<VoiceWidgetProps> = (props) => {
1094  const containerRef = useRef<HTMLDivElement>(null);
1095
1096  useEffect(() => {
1097    let link: HTMLLinkElement | null = null;
1098    let script: HTMLScriptElement | null = null;
1099
1100    // Load CSS
1101    link = document.createElement('link');
1102    link.rel = 'stylesheet';
1103    link.href = 'https://voice-agent-uvke.onrender.com/cdn/voice-widget.css';
1104    document.head.appendChild(link);
1105
1106    // Load JS and initialize
1107    script = document.createElement('script');
1108    script.src = 'https://voice-agent-uvke.onrender.com/cdn/voice-widget.js';
1109    script.onload = () => {
1110      if (containerRef.current && (window as any).VoiceWidget) {
1111        const instance = new (window as any).VoiceWidget.VoiceManager();
1112        instance.init({
1113          ...props,
1114          container: containerRef.current
1115        });
1116      }
1117    };
1118    document.head.appendChild(script);
1119
1120    return () => {
1121      // Cleanup
1122      if (link && document.head.contains(link)) {
1123        document.head.removeChild(link);
1124      }
1125      if (script && document.head.contains(script)) {
1126        document.head.removeChild(script);
1127      }
1128    };
1129  }, [props]);
1130
1131  return <div ref={containerRef} />;
1132};
1133
1134export default VoiceWidget;
1135
1136// Step 2: Use in your App.tsx
1137import React from 'react';
1138import VoiceWidget from './components/VoiceWidget';
1139
1140const App: React.FC = () => {
1141  return (
1142    <div className="App">
1143      {/* Your app content */}
1144      
1145      <VoiceWidget
1146${de}
1147      />
1148    </div>
1149  );
1150};
1151
1152export default App;`;case"react-js":return`// Step 1: Create VoiceWidget.jsx component
1153import React, { useEffect, useRef } from 'react';
1154
1155const VoiceWidget = (props) => {
1156  const containerRef = useRef(null);
1157
1158  useEffect(() => {
1159    let link = null;
1160    let script = null;
1161
1162    // Load CSS
1163    link = document.createElement('link');
1164    link.rel = 'stylesheet';
1165    link.href = 'https://voice-agent-uvke.onrender.com/cdn/voice-widget.css';
1166    document.head.appendChild(link);
1167
1168    // Load JS and initialize
1169    script = document.createElement('script');
1170    script.src = 'https://voice-agent-uvke.onrender.com/cdn/voice-widget.js';
1171    script.onload = () => {
1172      if (containerRef.current && window.VoiceWidget) {
1173        const instance = new window.VoiceWidget.VoiceManager();
1174        instance.init({
1175          ...props,
1176          container: containerRef.current
1177        });
1178      }
1179    };
1180    document.head.appendChild(script);
1181
1182    return () => {
1183      // Cleanup
1184      if (link && document.head.contains(link)) {
1185        document.head.removeChild(link);
1186      }
1187      if (script && document.head.contains(script)) {
1188        document.head.removeChild(script);
1189      }
1190    };
1191  }, [props]);
1192
1193  return <div ref={containerRef} />;
1194};
1195
1196export default VoiceWidget;
1197
1198// Step 2: Use in your App.jsx
1199import React from 'react';
1200import VoiceWidget from './components/VoiceWidget';
1201
1202const App = () => {
1203  return (
1204    <div className="App">
1205      {/* Your app content */}
1206      
1207      <VoiceWidget
1208${de}
1209      />
1210    </div>
1211  );
1212};
1213
1214export default App;`;case"vue":return`<!-- Step 1: Create VoiceWidget.vue component -->
1215<template>
1216  <div ref="voiceContainer"></div>
1217</template>
1218
1219<script>
1220export default {
1221  name: 'VoiceWidget',
1222  props: {
1223    agentId: { type: String, required: true },
1224    title: { type: String, default: 'AI Voice Assistant' },
1225    description: { type: String, default: 'Get instant answers to your questions.' },
1226    buttonText: { type: String, default: 'Talk to AI Agent' },
1227    buttonColor: { type: String, default: '#000000' },
1228    backgroundColor: { type: String, default: '#ffffff' },
1229    textColor: { type: String, default: '#000000' },
1230    secondaryTextColor: { type: String, default: '#666666' },
1231    borderColor: { type: String, default: '#e5e7eb' },
1232    shadowColor: { type: String, default: 'rgba(0,0,0,0.08)' },
1233    statusBgColor: { type: String, default: '#f0fdf4' },
1234    statusTextColor: { type: String, default: '#15803d' },
1235    avatarUrl: { type: String, default: '' }
1236  },
1237  mounted() {
1238    this.loadVoiceWidget();
1239  },
1240  beforeUnmount() {
1241    // Cleanup if needed
1242  },
1243  methods: {
1244    loadVoiceWidget() {
1245      // Load CSS
1246      const link = document.createElement('link');
1247      link.rel = 'stylesheet';
1248      link.href = 'https://voice-agent-uvke.onrender.com/cdn/voice-widget.css';
1249      document.head.appendChild(link);
1250
1251      // Load JS and initialize
1252      const script = document.createElement('script');
1253      script.src = 'https://voice-agent-uvke.onrender.com/cdn/voice-widget.js';
1254      script.onload = () => {
1255        if (this.$refs.voiceContainer && window.VoiceWidget) {
1256          const instance = new window.VoiceWidget.VoiceManager();
1257          instance.init({
1258            agentId: this.agentId,
1259            title: this.title,
1260            description: this.description,
1261            buttonText: this.buttonText,
1262            buttonColor: this.buttonColor,
1263            backgroundColor: this.backgroundColor,
1264            textColor: this.textColor,
1265            secondaryTextColor: this.secondaryTextColor,
1266            borderColor: this.borderColor,
1267            shadowColor: this.shadowColor,
1268            statusBgColor: this.statusBgColor,
1269            statusTextColor: this.statusTextColor,
1270            avatarUrl: this.avatarUrl,
1271            container: this.$refs.voiceContainer
1272          });
1273        }
1274      };
1275      document.head.appendChild(script);
1276    }
1277  }
1278};
1279<\/script>
1280
1281<!-- Step 2: Use in your main App.vue -->
1282<template>
1283  <div id="app">
1284    <!-- Your app content -->
1285    
1286    <VoiceWidget
1287      :agent-id="'${ee.agentId}'"
1288      :title="'${ee.title}'"
1289      :description="'${ee.description}'"
1290      :button-text="'${ee.buttonText}'"
1291      :button-color="'${ee.buttonColor}'"
1292      :background-color="'${ee.backgroundColor}'"
1293      :text-color="'${ee.textColor}'"
1294      :secondary-text-color="'${ee.secondaryTextColor}'"
1295      :border-color="'${ee.borderColor}'"
1296      :shadow-color="'${ee.shadowColor}'"
1297      :status-bg-color="'${ee.statusBgColor}'"
1298      :status-text-color="'${ee.statusTextColor}'"
1299      :avatar-url="'${ee.avatarUrl}'"
1300    />
1301  </div>
1302</template>
1303
1304<script>
1305import VoiceWidget from './components/VoiceWidget.vue';
1306
1307export default {
1308  name: 'App',
1309  components: {
1310    VoiceWidget
1311  }
1312};
1313<\/script>`;
1313case"dotnet":return`@* Add this to your layout or page *@
1314<div id="voice-widget-container"></div>
1315
1316@* Add these scripts before closing body tag *@
1317<script src="https://voice-agent-uvke.onrender.com/cdn/voice-widget.js"><\/script>
1318<script>
1319    document.addEventListener('DOMContentLoaded', function() {
1320        const instance = new window.VoiceWidget.VoiceManager();
1321        instance.init({
1322${de.split(`
1323`).map(Ae=>"            "+Ae.trim()).join(`
1324`)},
1325            container: '#voice-widget-container'
1326        });
1327    });
1328<\/script>`;case"angular":return`// voice-widget.component.ts
1329import { Component, OnInit, ElementRef, ViewChild } from '@angular/core';
1330
1331@Component({
1332  selector: 'app-voice-widget',
1333  template: '<div #voiceContainer id="voice-widget-container"></div>'
1334})
1335export class VoiceWidgetComponent implements OnInit {
1336  @ViewChild('voiceContainer', { static: true }) voiceContainer!: ElementRef;
1337
1338  ngOnInit() {
1339    this.loadVoiceWidget();
1340  }
1341
1342  private loadVoiceWidget() {
1343    // Load CSS
1344    const link = document.createElement('link');
1345    link.rel = 'stylesheet';
1346    link.href = 'https://voice-agent-uvke.onrender.com/cdn/voice-widget.css';
1347    document.head.appendChild(link);
1348
1349    // Load JS and initialize
1350    const script = document.createElement('script');
1351    script.src = 'https://voice-agent-uvke.onrender.com/cdn/voice-widget.js';
1352    script.onload = () => {
1353      const instance = new (window as any).VoiceWidget.VoiceManager();
1354      instance.init({
1355${de.split(`
1356`).map(Ae=>"        "+Ae.trim()).join(`
1357`)},
1358        container: this.voiceContainer.nativeElement
1359      });
1360    };
1361    document.head.appendChild(script);
1362  }
1363}`;default:return U()}},U=()=>j("html"),Y=async $=>{try{const te=j($);await navigator.clipboard.writeText(te),z({title:"Code copied to clipboard!",description:`${G($)} integration code has been copied.`})}catch(te){console.error("Failed to copy to clipboard:",te)}};return u.jsx("div",{className:"px-[15px] mx-auto max-w-screen-2xl",children:u.jsxs("div",{className:"space-y-8",children:[u.jsxs("section",{className:"py-12",children:[u.jsxs("div",{className:"text-center space-y-2 mb-8",children:[u.jsx("h2",{className:"text-3xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"Voice Agent Widget Configuration"}),u.jsx("p",{className:"text-gray-600 max-w-2xl mx-auto",children:"Customize your voice agent's appearance, behavior, and integration settings. Preview changes in real-time and generate code for seamless integration."})]}),u.jsx("div",{className:"flex justify-center",children:u.jsx("div",{className:"sticky top-4 z-50",children:u.jsx(b4,{agentId:e,title:S,description:k,buttonText:r,buttonColor:o,backgroundColor:a,textColor:c,secondaryTextColor:f,borderColor:y,shadowColor:v,statusBgColor:g,statusTextColor:w,avatarUrl:B})})})]}),u.jsx("div",{className:"w-full",children:u.jsxs("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-6",children:[u.jsxs(Sn,{className:"border-2 hover:border-blue-500/50 transition-all duration-300 hover:shadow-xl animate-slide-in-left",children:[u.jsx(gs,{className:"bg-gradient-to-r from-blue-500/5 to-purple-500/5",children:u.jsxs(vs,{className:"flex items-center gap-2",children:[u.jsx(id,{className:"w-5 h-5 text-blue-600"}),"Basic Configuration"]})}),u.jsxs(Wn,{className:"space-y-6 p-6",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"agentId",className:"text-sm font-medium",children:"Agent ID"}),u.jsx(at,{id:"agentId",value:e,onChange:$=>n($.target.value),placeholder:"agent_01k04zwwq3fv5acgzdwmbvfk8k",className:"transition-all duration-200 focus:ring-2 focus:ring-blue-500/20"}),u.jsx("p",{className:"text-xs text-gray-500",children:"Your ElevenLabs Agent ID"})]}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"title",className:"text-sm font-medium",children:"Voice Agent Title"}),u.jsx(at,{id:"title",value:S,onChange:$=>C($.target.value),placeholder:"AI Voice Assistant",className:"transition-all duration-200 focus:ring-2 focus:ring-blue-500/20"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"buttonText",className:"text-sm font-medium",children:"Button Text"}),u.jsx(at,{id:"buttonText",value:r,onChange:$=>s($.target.value),placeholder:"Talk to AI Agent",className:"transition-all duration-200 focus:ring-2 focus:ring-blue-500/20"})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"description",className:"text-sm font-medium",children:"Description"}),u.jsx(Cd,{id:"description",value:k,onChange:$=>T($.target.value),placeholder:"Get instant answers to your questions. Our AI assistant is ready to help you 24/7.",className:"min-h-[80px] transition-all duration-200 focus:ring-2 focus:ring-blue-500/20"}),u.jsx("p",{className:"text-xs text-gray-500",children:"Description shown to users"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Ve,{htmlFor:"avatarFile",className:"text-sm font-medium",children:"Avatar Image (optional)"}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs(yu,{open:M,onOpenChange:A,children:[u.jsx(wu,{asChild:!0,children:u.jsxs(Ze,{type:"button",variant:"outline",className:"w-full h-10 flex items-center justify-center gap-2",children:[u.jsx(Ga,{className:"h-4 w-4"}),I?"Change Avatar":"Upload & Crop Avatar"]})}),u.jsx(rl,{className:"max-w-lg",children:u.jsx(Dp,{onCrop:$=>{P($),A(!1)},onCancel:()=>A(!1),initialImage:I,size:200})})]}),I&&u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:"flex-shrink-0",children:u.jsx("div",{className:"w-16 h-16 rounded-full border-2 border-gray-200 overflow-hidden bg-gray-50",children:u.jsx("img",{src:URL.createObjectURL(I),alt:"Avatar preview",className:"w-full h-full object-contain"})})}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("p",{className:"text-sm text-gray-600 truncate",children:I.name}),u.jsx("p",{className:"text-xs text-gray-400",children:"Avatar preview"})]}),u.jsx(Ze,{type:"button",variant:"ghost",size:"sm",onClick:()=>A(!0),className:"flex-shrink-0",children:u.jsx(Hh,{className:"h-4 w-4"})}),u.jsx(Ze,{type:"button",variant:"ghost",size:"sm",onClick:()=>P(null),className:"flex-shrink-0",children:"Remove"})]})]}),u.jsx("p",{className:"text-xs text-gray-500",children:"Avatar displayed for the voice agent"})]}),u.jsxs("div",{className:"space-y-4 pt-4 border-t",children:[u.jsx(Ve,{className:"text-sm font-medium",children:"Generate Integration Code"}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs(eC,{value:D,onValueChange:R,children:[u.jsx(Rg,{className:"w-full",children:u.jsx(tC,{placeholder:"Select a language"})}),u.jsxs(Ag,{children:[u.jsx(an,{value:"html",children:"HTML"}),u.jsx(an,{value:"react-ts",children:"React (TypeScript)"}),u.jsx(an,{value:"react-js",children:"React (JavaScript)"}),u.jsx(an,{value:"vue",children:"Vue.js"}),u.jsx(an,{value:"dotnet",children:".NET"}),u.jsx(an,{value:"angular",children:"Angular"})]})]}),u.jsxs(Ze,{onClick:()=>Y(D),className:"w-full bg-gradient-to-r from-orange-500 to-red-500 hover:from-orange-600 hover:to-red-600 transition-all duration-300 hover:scale-105",children:[u.jsx(Sa,{className:"w-4 h-4 mr-2"}),"Copy ",G(D)," Integration Code"]})]})]})]})]}),u.jsxs(Sn,{className:"border-2 hover:border-orange-500/50 transition-all duration-300 hover:shadow-xl animate-slide-in-right",children:[u.jsx(gs,{className:"bg-gradient-to-r from-purple-500/5 to-pink-500/5",children:u.jsxs(vs,{className:"flex items-center gap-2",children:[u.jsx(Bm,{className:"w-5 h-5 text-purple-600"}),"Color Customization"]})}),u.jsx(Wn,{className:"space-y-4 p-6",children:[{id:"buttonColor",label:"Button Color",value:o,setter:i,desc:"Main action button color"}
1363,{id:"backgroundColor",label:"Background Color",value:a,setter:l,desc:"Widget background color"},{id:"textColor",label:"Text Color",value:c,setter:d,desc:"Primary text color"},{id:"secondaryTextColor",label:"Secondary Text Color",value:f,setter:p,desc:"Description and secondary text"},{id:"borderColor",label:"Border Color",value:y,setter:x,desc:"Widget border color"},{id:"shadowColor",label:"Shadow Color",value:v,setter:b,desc:"Widget shadow color"},{id:"statusBgColor",label:"Status Background",value:g,setter:m,desc:"Status indicator background"},{id:"statusTextColor",label:"Status Text Color",value:w,setter:_,desc:"Status indicator text"}].map(($,te)=>u.jsxs("div",{className:"space-y-2 animate-fade-in",style:{animationDelay:`${te*100}ms`},children:[u.jsx(Ve,{htmlFor:$.id,className:"text-sm font-medium",children:$.label}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(at,{id:$.id,type:"color",value:$.value,onChange:ee=>$.setter(ee.target.value),className:"w-16 h-10 p-1 rounded-md border transition-all duration-200 hover:scale-105"}),u.jsx(at,{value:$.value,onChange:ee=>$.setter(ee.target.value),className:"flex-1 transition-all duration-200 focus:ring-2 focus:ring-purple-500/20"})]}),u.jsx("p",{className:"text-xs text-muted-foreground",children:$.desc})]},$.id))})]})]})}),u.jsxs("section",{className:"py-20 bg-gradient-to-br from-purple-50 to-pink-50 dark:from-purple-900/20 dark:to-pink-900/20 rounded-2xl",children:[u.jsxs("div",{className:"text-center mb-16",children:[u.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-purple-100 to-pink-100 dark:from-purple-900/50 dark:to-pink-900/50 rounded-full mb-6",children:[u.jsx(Sa,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"}),u.jsx("span",{className:"text-purple-700 dark:text-purple-300 font-medium",children:"Easy Integration"})]}),u.jsx("h2",{className:"text-4xl font-bold bg-gradient-to-r from-purple-600 to-pink-600 bg-clip-text text-transparent mb-6",children:"Integration Examples"}),u.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:"Choose your framework and get started in minutes. Our voice widget works seamlessly with any web technology."})]}),u.jsxs(Sn,{className:"backdrop-blur-sm bg-white/80 dark:bg-gray-800/80 border-0 shadow-2xl",children:[u.jsxs(gs,{className:"pb-6",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(od,{className:"w-6 h-6 text-purple-600 dark:text-purple-400"}),u.jsx(vs,{className:"text-2xl",children:"Framework Integration"})]}),u.jsx(kg,{children:"Easy integration into your website. Both CSS and JavaScript files are automatically minified and optimized."})]}),u.jsxs(Wn,{children:[u.jsxs(lk,{defaultValue:"html",className:"w-full",children:[u.jsxs(jg,{className:"grid w-full grid-cols-6",children:[u.jsx(xn,{value:"html",children:"HTML"}),u.jsx(xn,{value:"react-ts",children:"React (TS)"}),u.jsx(xn,{value:"react-js",children:"React (JS)"}),u.jsx(xn,{value:"vue",children:"Vue.js"}),u.jsx(xn,{value:"dotnet",children:".NET"}),u.jsx(xn,{value:"angular",children:"Angular"})]}),["html","react-ts","react-js","vue","dotnet","angular"].map($=>u.jsx(Ng,{value:$,className:"mt-4",children:u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h4",{className:"text-lg font-semibold",children:G($)}),u.jsxs(Ze,{onClick:()=>Y($),size:"sm",className:"flex items-center gap-2",children:[u.jsx(Sa,{className:"w-4 h-4"}),"Copy Code"]})]}),u.jsx("div",{className:"relative",children:u.jsx("pre",{className:"bg-gray-900 text-green-400 p-4 rounded-lg overflow-x-auto text-sm border max-h-80 overflow-y-auto",children:u.jsx("code",{children:j($)})})})]})},$))]}),u.jsxs("div",{className:"mt-8 p-6 bg-blue-50 dark:bg-blue-900/20 rounded-lg border border-blue-200 dark:border-blue-800",children:[u.jsx("h4",{className:"font-semibold text-blue-900 dark:text-blue-100 mb-2",children:"📦 CDN Files Available:"}),u.jsxs("div",{className:"space-y-2 text-sm",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"font-mono bg-blue-100 dar
1363k:bg-blue-900/50 px-2 py-1 rounded text-blue-800 dark:text-blue-200",children:"https://voice-agent-uvke.onrender.com/cdn/voice-widget.js"}),u.jsx("span",{className:"text-blue-700 dark:text-blue-300",children:"- JavaScript bundle"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"font-mono bg-blue-100 dark:bg-blue-900/50 px-2 py-1 rounded text-blue-800 dark:text-blue-200",children:"https://voice-agent-uvke.onrender.com/cdn/voice-widget.css"}),u.jsx("span",{className:"text-blue-700 dark:text-blue-300",children:"- Minified styles"})]})]})]})]})]})]})]})})},_4=()=>{const[t,e]=h.useState(!1),[n,r]=h.useState("https://luccatora.app.n8n.cloud/webhook/webbot"),[s,o]=h.useState("Chat Support"),[i,a]=h.useState("Online now"),[l,c]=h.useState("Type your message..."),[d,f]=h.useState("bottom-right"),[p,y]=h.useState("#1f75ff"),[x,v]=h.useState("#f3f4f6"),[b,g]=h.useState("#1f2937"),[m,w]=h.useState("#ffffff"),[_,S]=h.useState("#ffffff"),[C,k]=h.useState(null),[T,I]=h.useState(null),[P]=h.useState("/lovable-uploads/fd9d4dbf-9035-4de8-a3a1-81089fcac665.png"),[D]=h.useState("/lovable-uploads/1f938225-daa7-46d3-a44e-d951e492fcd4.png"),[R,M]=h.useState("Hey, this is Jack, the Virtual Assistant from ToraTech AI. How can I help you today?"),[A,z]=h.useState(!1),[B,G]=h.useState(!1),[j,U]=h.useState(!1),[Y,$]=h.useState("agent_01k04zwwq3fv5acgzdwmbvfk8k"),[te,ee]=h.useState("rgba(59, 130, 246, 0.9)"),[de,Ae]=h.useState("#002fff"),[ue,se]=h.useState("#428bff"),[me,Me]=h.useState("transparent"),[ge,je]=h.useState("none"),[ve,Qe]=h.useState("#ffffff"),[ze,xt]=h.useState("Inter"),[pt,Tt]=h.useState("Code Copied!"),[E,N]=h.useState("Click to start chatting with our AI assistant!");h.useEffect(()=>{t?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},[t]),h.useEffect(()=>{console.log("Updating font family to:",ze);const Z=ge==="none"?"none":`1px solid ${ge}`,W=document.createElement("style");W.id="chatbot-custom-colors",W.textContent=`
1364      .chatbot-widget-container {
1365        --chatbot-primary: ${p} !important;
1366        --chatbot-secondary: ${x} !important;
1367        --chatbot-bot-text: ${b} !important;
1368        --chatbot-user-text: ${m} !important;
1369        --chatbot-background: ${_} !important;
1370        --chatbot-gradient: ${te} !important;
1371        --chatbot-font-family: '${ze}', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;
1372        --chatbot-logo-background: ${me} !important;
1373        --chatbot-logo-border: ${Z} !important;
1374        --chatbot-header-button-color: ${ve} !important;
1375      }
1376      
1377      .chatbot-widget-container *,
1378      .chatbot-widget-container input,
1379      .chatbot-widget-container textarea,
1380      .chatbot-widget-container button {
1381        font-family: var(--chatbot-font-family) !important;
1382      }
1383    `;const H=document.getElementById("chatbot-custom-colors");return H&&H.remove(),document.head.appendChild(W),()=>{const oe=document.getElementById("chatbot-custom-colors");oe&&oe.remove()}},[p,x,b,m,_,te,ze,me,ge,ve]);const O=()=>{window.open("https://chirodashboard-chat.onrender.com/cdn-example.html","_blank")};return u.jsxs("div",{className:`min-h-screen transition-all duration-500 ${t?"bg-gradient-to-br from-gray-900 via-blue-900 to-purple-900":"bg-gradient-to-br from-blue-50 via-indigo-50 to-purple-50"}`,children:[u.jsx("div",{className:"fixed top-6 right-6 z-50",children:u.jsxs(Ze,{variant:"outline",size:"icon",onClick:()=>e(!t),className:"relative overflow-hidden transition-all duration-300 hover:scale-110 bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm",children:[u.jsx("div",{className:`absolute inset-0 transition-transform duration-500 ${t?"translate-y-0":"translate-y-full"}`,children:u.jsx(Bb,{className:"w-4 h-4 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"})}),u.jsx("div",{className:`absolute inset-0 transition-transform duration-500 ${t?"-translate-y-full":"translate-y-0"}`,children:u.jsx(zb,{className:"w-4 h-4 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"})})]})}),u.jsx(y$,{onViewExample:O}),u.jsx(x$,{}),u.jsx(_$,{}),u.jsx(S$,{}),u.jsx(U$,{}),u.jsx(x4,{}),u.jsx(DC,{isDarkMode:t}),u.jsx(t4,{webhookUrl:n,setWebhookUrl:r,title:s,setTitle:o,bio:i,setBio:a,placeholder:l,setPlaceholder:c,position:d,setPosition:f,primaryColor:p,setPrimaryColor:y,secondaryColor:x,setSecondaryColor:v,textColor:b,setTextColor:g,userTextColor:m,setUserTextColor:w,chatBackgroun
1383d:_,setChatBackground:S,logoFile:C,setLogoFile:k,avatarFile:T,setAvatarFile:I,welcomeMessage:R,setWelcomeMessage:M,admin:A,setAdmin:z,isVoiceEnabled:B,setIsVoiceEnabled:G,isElevenLabsEnabled:j,setIsElevenLabsEnabled:U,elevenLabsAgentId:Y,setElevenLabsAgentId:$,gradientColor:te,setGradientColor:ee,headerGradientColor:de,setHeaderGradientColor:Ae,headerMainColor:ue,setHeaderMainColor:se,logoBackgroundColor:me,setLogoBackgroundColor:Me,logoBorderColor:ge,setLogoBorderColor:je,headerButtonColor:ve,setHeaderButtonColor:Qe,fontFamily:ze,setFontFamily:xt,copySuccessMessage:pt,setCopySuccessMessage:Tt,welcomeTooltipMessage:E,setWelcomeTooltipMessage:N}),u.jsx(RM,{webhookUrl:n,title:s,bio:i,placeholder:l,position:d,primaryColor:p,secondaryColor:x,botTextColor:b,userTextColor:m,chatBackground:_,headerGradientColor:de,headerMainColor:ue,logoBackgroundColor:me,logoBorderColor:ge,headerButtonColor:ve,fontFamily:ze,logoFile:C,logoUrl:C?void 0:P,avatarFile:T,avatarUrl:T?void 0:D,welcomeMessage:R,welcomeTooltipMessage:E,admin:A,isVoiceEnabled:B,isElevenLabsEnabled:j,elevenLabsAgentId:Y})]})},S4=()=>u.jsx(_4,{}),k4=()=>u.jsx("div",{className:"min-h-screen bg-gray-50 p-6",children:u.jsxs("div",{className:"max-w-4xl mx-auto",children:[u.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-6",children:"CDN Widget Integration Example"}),u.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6 mb-8",children:[u.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Live CDN Widget Demo"}),u.jsx("p",{className:"text-gray-600 mb-4",children:"This page demonstrates the CDN widget running with the configuration shown below. The widget should appear in the bottom-right corner."}),u.jsxs("div",{className:"bg-gray-100 p-4 rounded-lg",children:[u.jsx("h3",{className:"font-semibold mb-2",children:"Current Configuration:"}),u.jsxs("ul",{className:"text-sm text-gray-700 space-y-1",children:[u.jsx("li",{children:"• CDN URL: https://chirodashboard-chat.onrender.com/chatbot-widget.js"}),u.jsx("li",{children:"• Webhook URL: https://luccatora.app.n8n.cloud/webhook/webbot"}),u.jsx("li",{children:"• Title: Chat Support"}),u.jsx("li",{children:"• Position: Bottom Right"}),u.jsx("li",{children:"• Primary Color: #3b82f6"}),u.jsx("li",{children:"• Welcome Message: Hello! How can I help you today?"}),u.jsx("li",{children:"• Custom Logo: Enabled"})]})]})]}),u.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6",children:[u.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Integration Code"}),u.jsx("pre",{className:"bg-gray-900 text-green-400 p-4 rounded-lg overflow-x-auto text-sm",children:`<!-- Add this to your website's <head> section -->
1384<link rel="stylesheet" href="https://chirodashboard-chat.onrender.com/chatbot-widget.css">
1385<script src="https://chirodashboard-chat.onrender.com/chatbot-widget.js"><\/script>
1386
1387<!-- Initialize the widget using ChatbotManager -->
1388<script>
1389  const instance = new window.ChatbotWidget.ChatbotManager();
1390  instance.init({
1391    webhookUrl: 'https://luccatora.app.n8n.cloud/webhook/webbot',
1392    title: 'Chat Support',
1393    placeholder: 'Type your message...',
1394    position: 'bottom-right',
1395    primaryColor: '#3b82f6',
1396    secondaryColor: '#f3f4f6',
1397    textColor: '#1f2937',
1398    userTextColor: '#ffffff',
1399    chatBackground: '#ffffff',
1400    welcomeMessage: 'Hello! How can I help you today?',
1401    logoUrl: 'https://conversion-metrics-view.lovable.app/lovable-uploads/460f8654-9a04-4cac-a568-cd5421a2911e.png'
1402  });
1403<\/script>`})]}),u.jsxs("div",{className:"mt-8 text-center",children:[u.jsx("p",{className:"text-gray-600",children:"Look for the chat widget in the bottom-right corner to test the integration!"}),u.jsx("a",{href:"/cdn-example.html",target:"_blank",rel:"noopener noreferrer",className:"inline-block mt-4 px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"View Standalone CDN Example"})]})]})}),C4=()=>{const[t,e]=h.useState(!1);return u.jsx("div",{className:`min-h-screen transition-colors duration-300 ${t?"bg-gray-900 text-white":"bg-white text-gray-900"}`,children:u.jsxs("div",{className:"px-[15px] mx-auto max-w-screen-2xl",children:[u.jsx("header",{className:"border-b border-gray-200 dark:border-gray-700 py-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx(t_,{to:"/",children:u.jsxs(Ze,{variant:"outline",size:"sm",children:[u.jsx(p2,{className:"w-4 h-4 mr-2"}),"Back to Home"]})}),u.jsx("h1",{className:"text-xl sm:text-2xl font-bold",children:"Voice Agent"})]}),u.jsx(Ze,{variant:"outline",size:"sm",onClick:()=>e(!t),children:t?u.jsx(zb,{className:"w-4 h-4"}):u.jsx(Bb,{className:"w-4 h-4"})})]})}),u.jsx(DC,{isDarkMode:t})]})})},E4=()=>{const t=Nl();return h.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),u.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:u.jsxs("div",{className:"text-center",children:[u.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),u.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),u.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},T4=new JR,j4=()=>u.jsx(eA,{client:T4,children:u.jsxs(np,{children:[u.jsx(yN,{}),u.jsx(KN,{}),u.jsx(YA,{children:u.jsxs(zA,{children:[u.jsx(la,{path:"/",element:u.jsx(S4,{})}),u.jsx(la,{path:"/cdn-example",element:u.jsx(k4,{})}),u.jsx(la,{path:"/voice-agent",element:u.jsx(C4,{})}),u.jsx(la,{path:"*",element:u.jsx(E4,{})})]})})]})});ob(document.getElementById("root")).render(u.jsx(j4,{}));

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.