PageSourceSearch

https://aaoe-vapi-backend.vercel.app/assets/index-DPFbdACJ.js

js aaoe-vapi-backend.vercel.app collected 2026-10-03 06:03:10 UTC 1,582,566 bytes, 674 lines download raw bytes

vendor: 6,685 bytes, lines 1-9
1var oP=e=>{throw TypeError(e)};var Tw=(e,t,r)=>t.has(e)||oP("Cannot "+r);var z=(e,t,r)=>(Tw(e,t,"read from private field"),r?r.call(e):t.get(e)),Be=(e,t,r)=>t.has(e)?oP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),be=(e,t,r,n)=>(Tw(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),at=(e,t,r)=>(Tw(e,t,"access private method"),r);var Tg=(e,t,r,n)=>({set _(i){be(e,t,i,r)},get _(){return z(e,t,n)}});function ZD(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var Th=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function JD(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var eL={exports:{}},E0={},tL={exports:{}},dt={};/**
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 Um=Symbol.for("react.element"),hK=Symbol.for("react.portal"),pK=Symbol.for("react.fragment"),mK=Symbol.for("react.strict_mode"),gK=Symbol.for("react.profiler"),vK=Symbol.for("react.provider"),yK=Symbol.for("react.context"),xK=Symbol.for("react.forward_ref"),bK=Symbol.for("react.suspense"),wK=Symbol.for("react.memo"),SK=Symbol.for("react.lazy"),lP=Symbol.iterator;function jK(e){return e===null||typeof e!="object"?null:(e=lP&&e[lP]||e["@@iterator"],typeof e=="function"?e:null)}var rL={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nL=Object.assign,iL={};function gf(e,t,r){this.props=e,this.context=t,this.refs=iL,this.updater=r||rL}gf.prototype.isReactComponent={};gf.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};gf.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function sL(){}sL.prototype=gf.prototype;function lN(e,t,r){this.props=e,this.context=t,this.refs=iL,this.updater=r||rL}var cN=lN.prototype=new sL;cN.constructor=lN;nL(cN,gf.prototype);cN.isPureReactComponent=!0;var cP=Array.isArray,aL=Object.prototype.hasOwnProperty,uN={current:null},oL={key:!0,ref:!0,__self:!0,__source:!0};function lL(e,t,r){var n,i={},s=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(s=""+t.key),t)aL.call(t,n)&&!oL.hasOwnProperty(n)&&(i[n]=t[n]);var o=arguments.length-2;if(o===1)i.children=r;else if(1<o){for(var c=Array(o),u=0;u<o;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)i[n]===void 0&&(i[n]=o[n]);return{$$typeof:Um,type:e,key:s,ref:a,props:i,_owner:uN.current}}function _K(e,t){return{$$typeof:Um,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function dN(e){return typeof e=="object"&&e!==null&&e.$$typeof===Um}function EK(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var uP=/\/+/g;function kw(e,t){return typeof e=="object"&&e!==null&&e.key!=null?EK(""+e.key):t.toString(36)}function Bv(e,t,r,n,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Um:case hK:a=!0}}if(a)return a=e,i=i(a),e=n===""?"."+kw(a,0):n,cP(i)?(r="",e!=null&&(r=e.replace(uP,"$&/")+"/"),Bv(i,t,r,"",function(u){return u})):i!=null&&(dN(i)&&(i=_K(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(uP,"$&/")+"/")+e)),t.push(i)),1;if(a=0,n=n===""?".":n+":",cP(e))for(var o=0;o<e.length;o++){s=e[o];var c=n+kw(s,o);a+=Bv(s,t,r,c,i)}else if(c=jK(e),typeof c=="function")for(e=c.call(e),o=0;!(s=e.next()).done;)s=s.value,c=n+kw(s,o++),a+=Bv(s,t,r,c,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function kg(e,t,r){if(e==null)return e;var n=[],i=0;return Bv(e,n,"","",function(s){return t.call(r,s,i++)}),n}function NK(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var mn={current:null},zv={transition:null},OK={ReactCurrentDispatcher:mn,ReactCurrentBatchConfig:zv,ReactCurrentOwner:uN};function cL(){throw Error("act(...) is not supported in production builds of React.")}dt.Children={map:kg,forEach:function(e,t,r){kg(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return kg(e,function(){t++}),t},toArray:function(e){return kg(e,function(t){return t})||[]},only:function(e){if(!dN(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};dt.Component=gf;dt.Fragment=pK;dt.Profiler=gK;dt.PureComponent=lN;dt.StrictMode=mK;dt.Suspense=bK;
vendor: 5,272 bytes, lines 9-25
9dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OK;dt.act=cL;dt.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=nL({},e.props),i=e.key,s=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,a=uN.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(c in t)aL.call(t,c)&&!oL.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&o!==void 0?o[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){o=Array(c);for(var u=0;u<c;u++)o[u]=arguments[u+2];n.children=o}return{$$typeof:Um,type:e.type,key:i,ref:s,props:n,_owner:a}};dt.createContext=function(e){return e={$$typeof:yK,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:vK,_context:e},e.Consumer=e};dt.createElement=lL;dt.createFactory=function(e){var t=lL.bind(null,e);return t.type=e,t};dt.createRef=function(){return{current:null}};dt.forwardRef=function(e){return{$$typeof:xK,render:e}};dt.isValidElement=dN;dt.lazy=function(e){return{$$typeof:SK,_payload:{_status:-1,_result:e},_init:NK}};dt.memo=function(e,t){return{$$typeof:wK,type:e,compare:t===void 0?null:t}};dt.startTransition=function(e){var t=zv.transition;zv.transition={};try{e()}finally{zv.transition=t}};dt.unstable_act=cL;dt.useCallback=function(e,t){return mn.current.useCallback(e,t)};dt.useContext=function(e){return mn.current.useContext(e)};dt.useDebugValue=function(){};dt.useDeferredValue=function(e){return mn.current.useDeferredValue(e)};dt.useEffect=function(e,t){return mn.current.useEffect(e,t)};dt.useId=function(){return mn.current.useId()};dt.useImperativeHandle=function(e,t,r){return mn.current.useImperativeHandle(e,t,r)};dt.useInsertionEffect=function(e,t){return mn.current.useInsertionEffect(e,t)};dt.useLayoutEffect=function(e,t){return mn.current.useLayoutEffect(e,t)};dt.useMemo=function(e,t){return mn.current.useMemo(e,t)};dt.useReducer=function(e,t,r){return mn.current.useReducer(e,t,r)};dt.useRef=function(e){return mn.current.useRef(e)};dt.useState=function(e){return mn.current.useState(e)};dt.useSyncExternalStore=function(e,t,r){return mn.current.useSyncExternalStore(e,t,r)};dt.useTransition=function(){return mn.current.useTransition()};dt.version="18.3.1";tL.exports=dt;var b=tL.exports;const P=pt(b),fN=ZD({__proto__:null,default:P},[b]);/**
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 AK=b,CK=Symbol.for("react.element"),PK=Symbol.for("react.fragment"),TK=Object.prototype.hasOwnProperty,kK=AK.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,RK={key:!0,ref:!0,__self:!0,__source:!0};function uL(e,t,r){var n,i={},s=null,a=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)TK.call(t,n)&&!RK.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:CK,type:e,key:s,ref:a,props:i,_owner:kK.current}}E0.Fragment=PK;E0.jsx=uL;E0.jsxs=uL;eL.exports=E0;var l=eL.exports,dL={exports:{}},ni={},fL={exports:{}},hL={};/**
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(e){function t(M,I){var F=M.length;M.push(I);e:for(;0<F;){var U=F-1>>>1,V=M[U];if(0<i(V,I))M[U]=I,M[F]=V,F=U;else break e}}function r(M){return M.length===0?null:M[0]}function n(M){if(M.length===0)return null;var I=M[0],F=M.pop();if(F!==I){M[0]=F;e:for(var U=0,V=M.length,G=V>>>1;U<G;){var Z=2*(U+1)-1,he=M[Z],ve=Z+1,re=M[ve];if(0>i(he,F))ve<V&&0>i(re,he)?(M[U]=re,M[ve]=F,U=ve):(M[U]=he,M[Z]=F,U=Z);else if(ve<V&&0>i(re,F))M[U]=re,M[ve]=F,U=ve;else break e}}return I}function i(M,I){var F=M.sortIndex-I.sortIndex;return F!==0?F:M.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var c=[],u=[],d=1,f=null,h=3,p=!1,g=!1,m=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=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(M){for(var I=r(u);I!==null;){if(I.callback===null)n(u);else if(I.startTime<=M)n(u),I.sortIndex=I.expirationTime,t(c,I);else break;I=r(u)}}function S(M){if(m=!1,w(M),!g)if(r(c)!==null)g=!0,T(j);else{var I=r(u);I!==null&&L(S,I.startTime-M)}}function j(M,I){g=!1,m&&(m=!1,y(N),N=-1),p=!0;var F=h;try{for(w(I),f=r(c);f!==null&&(!(f.expirationTime>I)||M&&!k());){var U=f.callback;if(typeof U=="function"){f.callback=null,h=f.priorityLevel;var V=U(f.expirationTime<=I);I=e.unstable_now(),typeof V=="function"?f.callback=V:f===r(c)&&n(c),w(I)}else n(c);f=r(c)}if(f!==null)var G=!0;else{var Z=r(u);
vendor: 8,938 bytes, lines 25-34
25Z!==null&&L(S,Z.startTime-I),G=!1}return G}finally{f=null,h=F,p=!1}}var E=!1,_=null,N=-1,O=5,C=-1;function k(){return!(e.unstable_now()-C<O)}function $(){if(_!==null){var M=e.unstable_now();C=M;var I=!0;try{I=_(!0,M)}finally{I?D():(E=!1,_=null)}}else E=!1}var D;if(typeof x=="function")D=function(){x($)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,R=A.port2;A.port1.onmessage=$,D=function(){R.postMessage(null)}}else D=function(){v($,0)};function T(M){_=M,E||(E=!0,D())}function L(M,I){N=v(function(){M(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,T(j))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(M){switch(h){case 1:case 2:case 3:var I=3;break;default:I=h}var F=h;h=I;try{return M()}finally{h=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,I){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var F=h;h=M;try{return I()}finally{h=F}},e.unstable_scheduleCallback=function(M,I,F){var U=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?U+F:U):F=U,M){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=F+V,M={id:d++,callback:I,priorityLevel:M,startTime:F,expirationTime:V,sortIndex:-1},F>U?(M.sortIndex=F,t(u,M),r(c)===null&&M===r(u)&&(m?(y(N),N=-1):m=!0,L(S,F-U))):(M.sortIndex=V,t(c,M),g||p||(g=!0,T(j))),M},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(M){var I=h;return function(){var F=h;h=I;try{return M.apply(this,arguments)}finally{h=F}}}})(hL);fL.exports=hL;var $K=fL.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 IK=b,Qn=$K;function ce(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var pL=new Set,gp={};function Fc(e,t){vd(e,t),vd(e+"Capture",t)}function vd(e,t){for(gp[e]=t,e=0;e<t.length;e++)pL.add(t[e])}var Ca=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vS=Object.prototype.hasOwnProperty,MK=/^[: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]*$/,dP={},fP={};function DK(e){return vS.call(fP,e)?!0:vS.call(dP,e)?!1:MK.test(e)?fP[e]=!0:(dP[e]=!0,!1)}function LK(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function FK(e,t,r,n){if(t===null||typeof t>"u"||LK(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function gn(e,t,r,n,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var Vr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vr[e]=new gn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vr[t]=new gn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vr[e]=new gn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vr[e]=new gn(e,2,!1,e,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(e){Vr[e]=new gn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vr[e]=new gn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vr[e]=new gn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vr[e]=new gn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vr[e]=new gn(e,5,!1,e.toLowerCase(),null,!1,!1)});var hN=/[\-:]([a-z])/g;function pN(e){return e[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(e){var t=e.replace(hN,pN);Vr[t]=new gn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(hN,pN);Vr[t]=new gn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(hN,pN);Vr[t]=new gn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vr[e]=new gn(e,1,!1,e.toLowerCase(),null,!1,!1)});Vr.xlinkHref=new gn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vr[e]=new gn(e,1,!1,e.toLowerCase(),null,!0,!0)});function mN(e,t,r,n){var i=Vr.hasOwnProperty(t)?Vr[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(FK(t,r,i,n)&&(r=null),n||i===null?DK(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Wa=IK.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Rg=Symbol.for("react.element"),Su=Symbol.for("react.portal"),ju=Symbol.for("react.fragment"),gN=Symbol.for("react.strict_mode"),yS=Symbol.for("react.profiler"),mL=Symbol.for("react.provider"),gL=Symbol.for("react.context"),vN=Symbol.for("react.forward_ref"),xS=Symbol.for("react.suspense"),bS=Symbol.for("react.suspense_list"),yN=Symbol.for("react.memo"),so=Symbol.for("react.lazy"),vL=Symbol.for("react.offscreen"),hP=Symbol.iterator;function Zf(e){return e===null||typeof e!="object"?null:(e=hP&&e[hP]||e["@@iterator"],typeof e=="function"?e:null)}var er=Object.assign,Rw;function kh(e){if(Rw===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Rw=t&&t[1]||""}return`
34`+Rw+e}var $w=!1;function Iw(e,t){if(!e||$w)return"";$w=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}
vendor: 15,818 bytes, lines 34-37
34catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split(`
35`),s=n.stack.split(`
36`),a=i.length-1,o=s.length-1;1<=a&&0<=o&&i[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(i[a]!==s[o]){if(a!==1||o!==1)do if(a--,o--,0>o||i[a]!==s[o]){var c=`
37`+i[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=o);break}}}finally{$w=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?kh(e):""}function BK(e){switch(e.tag){case 5:return kh(e.type);case 16:return kh("Lazy");case 13:return kh("Suspense");case 19:return kh("SuspenseList");case 0:case 2:case 15:return e=Iw(e.type,!1),e;case 11:return e=Iw(e.type.render,!1),e;case 1:return e=Iw(e.type,!0),e;default:return""}}function wS(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ju:return"Fragment";case Su:return"Portal";case yS:return"Profiler";case gN:return"StrictMode";case xS:return"Suspense";case bS:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case gL:return(e.displayName||"Context")+".Consumer";case mL:return(e._context.displayName||"Context")+".Provider";case vN:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yN:return t=e.displayName||null,t!==null?t:wS(e.type)||"Memo";case so:t=e._payload,e=e._init;try{return wS(e(t))}catch{}}return null}function zK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wS(t);case 8:return t===gN?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ko(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yL(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function UK(e){var t=yL(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $g(e){e._valueTracker||(e._valueTracker=UK(e))}function xL(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=yL(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function fy(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function SS(e,t){var r=t.checked;return er({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function pP(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Ko(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function bL(e,t){t=t.checked,t!=null&&mN(e,"checked",t,!1)}function jS(e,t){bL(e,t);var r=Ko(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?_S(e,t.type,r):t.hasOwnProperty("defaultValue")&&_S(e,t.type,Ko(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mP(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function _S(e,t,r){(t!=="number"||fy(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Rh=Array.isArray;function zu(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Ko(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ES(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ce(91));return er({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function gP(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(ce(92));if(Rh(r)){if(1<r.length)throw Error(ce(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Ko(r)}}function wL(e,t){var r=Ko(t.value),n=Ko(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function vP(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function SL(e){switch(e){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 NS(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?SL(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ig,jL=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ig=Ig||document.createElement("div"),Ig.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ig.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function vp(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var qh={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},VK=["Webkit","ms","Moz","O"];Object.keys(qh).forEach(function(e){VK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qh[t]=qh[e]})});function _L(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||qh.hasOwnProperty(e)&&qh[e]?(""+t).trim():t+"px"}function EL(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=_L(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var WK=er({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 OS(e,t){if(t){if(WK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ce(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ce(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ce(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ce(62))}}function AS(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 CS=null;function xN(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var PS=null,Uu=null,Vu=null;function yP(e){if(e=Hm(e)){if(typeof PS!="function")throw Error(ce(280));var t=e.stateNode;t&&(t=P0(t),PS(e.stateNode,e.type,t))}}function NL(e){Uu?Vu?Vu.push(e):Vu=[e]:Uu=e}function OL(){if(Uu){var e=Uu,t=Vu;if(Vu=Uu=null,yP(e),t)for(e=0;e<t.length;e++)yP(t[e])}}function AL(e,t){return e(t)}function CL(){}var Mw=!1;function PL(e,t,r){if(Mw)return e(t,r);Mw=!0;try{return AL(e,t,r)}finally{Mw=!1,(Uu!==null||Vu!==null)&&(CL(),OL())}}function yp(e,t){var r=e.stateNode;if(r===null)return null;var n=P0(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(ce(231,t,typeof r));return r}var TS=!1;if(Ca)try{var Jf={};Object.defineProperty(Jf,"passive",{get:function(){TS=!0}}),window.addEventListener("test",Jf,Jf),window.removeEventListener("test",Jf,Jf)}catch{TS=!1}function HK(e,t,r,n,i,s,a,o,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var Kh=!1,hy=null,py=!1,kS=null,qK={onError:function(e){Kh=!0,hy=e}};function KK(e,t,r,n,i,s,a,o,c){Kh=!1,hy=null,HK.apply(qK,arguments)}function GK(e,t,r,n,i,s,a,o,c){if(KK.apply(this,arguments),Kh){if(Kh){var u=hy;Kh=!1,hy=null}else throw Error(ce(198));py||(py=!0,kS=u)}}function Bc(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function TL(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function xP(e){if(Bc(e)!==e)throw Error(ce(188))}function YK(e){var t=e.alternate;if(!t){if(t=Bc(e),t===null)throw Error(ce(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var s=i.alternate;if(s===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return xP(i),e;if(s===n)return xP(i),t;s=s.sibling}throw Error(ce(188))}if(r.return!==n.return)r=i,n=s;else{for(var a=!1,o=i.child;o;){if(o===r){a=!0,r=i,n=s;break}if(o===n){a=!0,n=i,r=s;break}o=o.sibling}if(!a){for(o=s.child;o;){if(o===r){a=!0,r=s,n=i;break}if(o===n){a=!0,n=s,r=i;break}o=o.sibling}if(!a)throw Error(ce(189))}}if(r.alternate!==n)throw Error(ce(190))}if(r.tag!==3)throw Error(ce(188));return r.stateNode.current===r?e:t}function kL(e){return e=YK(e),e!==null?RL(e):null}function RL(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=RL(e);if(t!==null)return t;e=e.sibling}return null}var $L=Qn.unstable_scheduleCallback,bP=Qn.unstable_cancelCallback,XK=Qn.unstable_shouldYield,QK=Qn.unstable_requestPaint,ur=Qn.unstable_now,ZK=Qn.unstable_getCurrentPriorityLevel,bN=Qn.unstable_ImmediatePriority,IL=Qn.unstable_UserBlockingPriority,my=Qn.unstable_NormalPriority,JK=Qn.unstable_LowPriority,ML=Qn.unstable_IdlePriority,N0=null,Is=null;function eG(e){if(Is&&typeof Is.onCommitFiberRoot=="function")try{Is.onCommitFiberRoot(N0,e,void 0,(e.current.flags&128)===128)}catch{}}var is=Math.clz32?Math.clz32:nG,tG=Math.log,rG=Math.LN2;function nG(e){return e>>>=0,e===0?32:31-(tG(e)/rG|0)|0}var Mg=64,Dg=4194304;function $h(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function gy(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,s=e.pingedLanes,a=r&268435455;if(a!==0){var o=a&~i;o!==0?n=$h(o):(s&=a,s!==0&&(n=$h(s)))}else a=r&~i,a!==0?n=$h(a):s!==0&&(n=$h(s));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-is(t),i=1<<r,n|=e[r],t&=~i;return n}function iG(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 sG(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-is(s),o=1<<a,c=i[a];c===-1?(!(o&r)||o&n)&&(i[a]=iG(o,t)):c<=t&&(e.expiredLanes|=o),s&=~o}}function RS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function DL(){var e=Mg;return Mg<<=1,!(Mg&4194240)&&(Mg=64),e}function Dw(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Vm(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-is(t),e[t]=r}function aG(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-is(r),s=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~s}}function wN(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-is(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var Ot=0;function LL(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var FL,SN,BL,zL,UL,$S=!1,Lg=[],Ro=null,$o=null,Io=null,xp=new Map,bp=new Map,fo=[],oG="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 wP(e,t){switch(e){case"focusin":case"focusout":Ro=null;break;case"dragenter":case"dragleave":$o=null;break;case"mouseover":case"mouseout":Io=null;break;case"pointerover":case"pointerout":xp.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bp.delete(t.pointerId)}}function eh(e,t,r,n,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Hm(t),t!==null&&SN(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function lG(e,t,r,n,i){switch(t){case"focusin":return Ro=eh(Ro,e,t,r,n,i),!0;case"dragenter":return $o=eh($o,e,t,r,n,i),!0;case"mouseover":return Io=eh(Io,e,t,r,n,i),!0;case"pointerover":var s=i.pointerId;
vendor: 11,818 bytes, line 37
37return xp.set(s,eh(xp.get(s)||null,e,t,r,n,i)),!0;case"gotpointercapture":return s=i.pointerId,bp.set(s,eh(bp.get(s)||null,e,t,r,n,i)),!0}return!1}function VL(e){var t=Il(e.target);if(t!==null){var r=Bc(t);if(r!==null){if(t=r.tag,t===13){if(t=TL(r),t!==null){e.blockedOn=t,UL(e.priority,function(){BL(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Uv(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=IS(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);CS=n,r.target.dispatchEvent(n),CS=null}else return t=Hm(r),t!==null&&SN(t),e.blockedOn=r,!1;t.shift()}return!0}function SP(e,t,r){Uv(e)&&r.delete(t)}function cG(){$S=!1,Ro!==null&&Uv(Ro)&&(Ro=null),$o!==null&&Uv($o)&&($o=null),Io!==null&&Uv(Io)&&(Io=null),xp.forEach(SP),bp.forEach(SP)}function th(e,t){e.blockedOn===t&&(e.blockedOn=null,$S||($S=!0,Qn.unstable_scheduleCallback(Qn.unstable_NormalPriority,cG)))}function wp(e){function t(i){return th(i,e)}if(0<Lg.length){th(Lg[0],e);for(var r=1;r<Lg.length;r++){var n=Lg[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Ro!==null&&th(Ro,e),$o!==null&&th($o,e),Io!==null&&th(Io,e),xp.forEach(t),bp.forEach(t),r=0;r<fo.length;r++)n=fo[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<fo.length&&(r=fo[0],r.blockedOn===null);)VL(r),r.blockedOn===null&&fo.shift()}var Wu=Wa.ReactCurrentBatchConfig,vy=!0;function uG(e,t,r,n){var i=Ot,s=Wu.transition;Wu.transition=null;try{Ot=1,jN(e,t,r,n)}finally{Ot=i,Wu.transition=s}}function dG(e,t,r,n){var i=Ot,s=Wu.transition;Wu.transition=null;try{Ot=4,jN(e,t,r,n)}finally{Ot=i,Wu.transition=s}}function jN(e,t,r,n){if(vy){var i=IS(e,t,r,n);if(i===null)Kw(e,t,n,yy,r),wP(e,n);else if(lG(i,e,t,r,n))n.stopPropagation();else if(wP(e,n),t&4&&-1<oG.indexOf(e)){for(;i!==null;){var s=Hm(i);if(s!==null&&FL(s),s=IS(e,t,r,n),s===null&&Kw(e,t,n,yy,r),s===i)break;i=s}i!==null&&n.stopPropagation()}else Kw(e,t,n,null,r)}}var yy=null;function IS(e,t,r,n){if(yy=null,e=xN(n),e=Il(e),e!==null)if(t=Bc(e),t===null)e=null;else if(r=t.tag,r===13){if(e=TL(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return yy=e,null}function WL(e){switch(e){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(ZK()){case bN:return 1;case IL:return 4;case my:case JK:return 16;case ML:return 536870912;default:return 16}default:return 16}}var Oo=null,_N=null,Vv=null;function HL(){if(Vv)return Vv;var e,t=_N,r=t.length,n,i="value"in Oo?Oo.value:Oo.textContent,s=i.length;for(e=0;e<r&&t[e]===i[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===i[s-n];n++);return Vv=i.slice(e,1<n?1-n:void 0)}function Wv(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Fg(){return!0}function jP(){return!1}function ii(e){function t(r,n,i,s,a){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Fg:jP,this.isPropagationStopped=jP,this}return er(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Fg)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Fg)},persist:function(){},isPersistent:Fg}),t}var vf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},EN=ii(vf),Wm=er({},vf,{view:0,detail:0}),fG=ii(Wm),Lw,Fw,rh,O0=er({},Wm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:NN,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==rh&&(rh&&e.type==="mousemove"?(Lw=e.screenX-rh.screenX,Fw=e.screenY-rh.screenY):Fw=Lw=0,rh=e),Lw)},movementY:function(e){return"movementY"in e?e.movementY:Fw}}),_P=ii(O0),hG=er({},O0,{dataTransfer:0}),pG=ii(hG),mG=er({},Wm,{relatedTarget:0}),Bw=ii(mG),gG=er({},vf,{animationName:0,elapsedTime:0,pseudoElement:0}),vG=ii(gG),yG=er({},vf,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xG=ii(yG),bG=er({},vf,{data:0}),EP=ii(bG),wG={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},SG={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"},jG={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _G(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=jG[e])?!!t[e]:!1}function NN(){return _G}var EG=er({},Wm,{key:function(e){if(e.key){var t=wG[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Wv(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?SG[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:NN,charCode:function(e){return e.type==="keypress"?Wv(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wv(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),NG=ii(EG),OG=er({},O0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),NP=ii(OG),AG=er({},Wm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:NN}),CG=ii(AG),PG=er({},vf,{propertyName:0,elapsedTime:0,pseudoElement:0}),TG=ii(PG),kG=er({},O0,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),RG=ii(kG),$G=[9,13,27,32],ON=Ca&&"CompositionEvent"in window,Gh=null;Ca&&"documentMode"in document&&(Gh=document.documentMode);var IG=Ca&&"TextEvent"in window&&!Gh,qL=Ca&&(!ON||Gh&&8<Gh&&11>=Gh),OP=" ",AP=!1;function KL(e,t){switch(e){case"keyup":return $G.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function GL(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _u=!1;function MG(e,t){switch(e){case"compositionend":return GL(t);case"keypress":return t.which!==32?null:(AP=!0,OP);case"textInput":return e=t.data,e===OP&&AP?null:e;default:return null}}function DG(e,t){if(_u)return e==="compositionend"||!ON&&KL(e,t)?(e=HL(),Vv=_N=Oo=null,_u=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return qL&&t.locale!=="ko"?null:t.data;default:return null}}var LG={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 CP(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!LG[e.type]:t==="textarea"}function YL(e,t,r,n){NL(n),t=xy(t,"onChange"),0<t.length&&(r=new EN("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Yh=null,Sp=null;function FG(e){a4(e,0)}function A0(e){var t=Ou(e);if(xL(t))return e}function BG(e,t){if(e==="change")return t}var XL=!1;if(Ca){var zw;if(Ca){var Uw="oninput"in document;if(!Uw){var PP=document.createElement("div");PP.setAttribute("oninput","return;"),Uw=typeof PP.oninput=="function"}zw=Uw}else zw=!1;XL=zw&&(!document.documentMode||9<document.documentMode)}function TP(){Yh&&(Yh.detachEvent("onpropertychange",QL),Sp=Yh=null)}function QL(e){if(e.propertyName==="value"&&A0(Sp)){var t=[];YL(t,Sp,e,xN(e)),PL(FG,t)}}function zG(e,t,r){e==="focusin"?(TP(),Yh=t,Sp=r,Yh.attachEvent("onpropertychange",QL)):e==="focusout"&&TP()}function UG(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return A0(Sp)}function VG(e,t){if(e==="click")return A0(t)}function WG(e,t){if(e==="input"||e==="change")return A0(t)}function HG(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cs=typeof Object.is=="function"?Object.is:HG;function jp(e,t){if(cs(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!vS.call(t,i)||!cs(e[i],t[i]))return!1}return!0}function kP(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function RP(e,t){var r=kP(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=kP(r)}}function ZL(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ZL(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function JL(){for(var e=window,t=fy();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=fy(e.document)}return t}function AN(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function qG(e){var t=JL(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&ZL(r.ownerDocument.documentElement,r)){if(n!==null&&AN(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!e.extend&&s>
vendor: 5,341 bytes, line 37
37n&&(i=n,n=s,s=i),i=RP(r,s);var a=RP(r,n);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var KG=Ca&&"documentMode"in document&&11>=document.documentMode,Eu=null,MS=null,Xh=null,DS=!1;function $P(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;DS||Eu==null||Eu!==fy(n)||(n=Eu,"selectionStart"in n&&AN(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Xh&&jp(Xh,n)||(Xh=n,n=xy(MS,"onSelect"),0<n.length&&(t=new EN("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Eu)))}function Bg(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Nu={animationend:Bg("Animation","AnimationEnd"),animationiteration:Bg("Animation","AnimationIteration"),animationstart:Bg("Animation","AnimationStart"),transitionend:Bg("Transition","TransitionEnd")},Vw={},e4={};Ca&&(e4=document.createElement("div").style,"AnimationEvent"in window||(delete Nu.animationend.animation,delete Nu.animationiteration.animation,delete Nu.animationstart.animation),"TransitionEvent"in window||delete Nu.transitionend.transition);function C0(e){if(Vw[e])return Vw[e];if(!Nu[e])return e;var t=Nu[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in e4)return Vw[e]=t[r];return e}var t4=C0("animationend"),r4=C0("animationiteration"),n4=C0("animationstart"),i4=C0("transitionend"),s4=new Map,IP="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 rl(e,t){s4.set(e,t),Fc(t,[e])}for(var Ww=0;Ww<IP.length;Ww++){var Hw=IP[Ww],GG=Hw.toLowerCase(),YG=Hw[0].toUpperCase()+Hw.slice(1);rl(GG,"on"+YG)}rl(t4,"onAnimationEnd");rl(r4,"onAnimationIteration");rl(n4,"onAnimationStart");rl("dblclick","onDoubleClick");rl("focusin","onFocus");rl("focusout","onBlur");rl(i4,"onTransitionEnd");vd("onMouseEnter",["mouseout","mouseover"]);vd("onMouseLeave",["mouseout","mouseover"]);vd("onPointerEnter",["pointerout","pointerover"]);vd("onPointerLeave",["pointerout","pointerover"]);Fc("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fc("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fc("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fc("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fc("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fc("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ih="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(" "),XG=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ih));function MP(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,GK(n,t,void 0,e),e.currentTarget=null}function a4(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var s=void 0;if(t)for(var a=n.length-1;0<=a;a--){var o=n[a],c=o.instance,u=o.currentTarget;if(o=o.listener,c!==s&&i.isPropagationStopped())break e;MP(i,o,u),s=c}else for(a=0;a<n.length;a++){if(o=n[a],c=o.instance,u=o.currentTarget,o=o.listener,c!==s&&i.isPropagationStopped())break e;MP(i,o,u),s=c}}}if(py)throw e=kS,py=!1,kS=null,e}function Lt(e,t){var r=t[US];r===void 0&&(r=t[US]=new Set);var n=e+"__bubble";r.has(n)||(o4(t,e,2,!1),r.add(n))}function qw(e,t,r){var n=0;t&&(n|=4),o4(r,e,n,t)}var zg="_reactListening"+Math.random().toString(36).slice(2);function _p(e){if(!e[zg]){e[zg]=!0,pL.forEach(function(r){r!=="selectionchange"&&(XG.has(r)||qw(r,!1,e),qw(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[zg]||(t[zg]=!0,qw("selectionchange",!1,t))}}function o4(e,t,r,n){switch(WL(t)){case 1:var i=uG;break;case 4:i=dG;break;default:i=jN}r=i.bind(null,t,r,e),i=void 0,!TS||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function Kw(e,t,r,n,i){var s=n;
vendor: 5,691 bytes, lines 37-38
37if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var o=n.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(a===4)for(a=n.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;a=a.return}for(;o!==null;){if(a=Il(o),a===null)return;if(c=a.tag,c===5||c===6){n=s=a;continue e}o=o.parentNode}}n=n.return}PL(function(){var u=s,d=xN(r),f=[];e:{var h=s4.get(e);if(h!==void 0){var p=EN,g=e;switch(e){case"keypress":if(Wv(r)===0)break e;case"keydown":case"keyup":p=NG;break;case"focusin":g="focus",p=Bw;break;case"focusout":g="blur",p=Bw;break;case"beforeblur":case"afterblur":p=Bw;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=_P;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=pG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=CG;break;case t4:case r4:case n4:p=vG;break;case i4:p=TG;break;case"scroll":p=fG;break;case"wheel":p=RG;break;case"copy":case"cut":case"paste":p=xG;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=NP}var m=(t&4)!==0,v=!m&&e==="scroll",y=m?h!==null?h+"Capture":null:h;m=[];for(var x=u,w;x!==null;){w=x;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,y!==null&&(S=yp(x,y),S!=null&&m.push(Ep(x,S,w)))),v)break;x=x.return}0<m.length&&(h=new p(h,g,null,r,d),f.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&r!==CS&&(g=r.relatedTarget||r.fromElement)&&(Il(g)||g[Pa]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(g=r.relatedTarget||r.toElement,p=u,g=g?Il(g):null,g!==null&&(v=Bc(g),g!==v||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=u),p!==g)){if(m=_P,S="onMouseLeave",y="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(m=NP,S="onPointerLeave",y="onPointerEnter",x="pointer"),v=p==null?h:Ou(p),w=g==null?h:Ou(g),h=new m(S,x+"leave",p,r,d),h.target=v,h.relatedTarget=w,S=null,Il(d)===u&&(m=new m(y,x+"enter",g,r,d),m.target=w,m.relatedTarget=v,S=m),v=S,p&&g)t:{for(m=p,y=g,x=0,w=m;w;w=Zc(w))x++;for(w=0,S=y;S;S=Zc(S))w++;for(;0<x-w;)m=Zc(m),x--;for(;0<w-x;)y=Zc(y),w--;for(;x--;){if(m===y||y!==null&&m===y.alternate)break t;m=Zc(m),y=Zc(y)}m=null}else m=null;p!==null&&DP(f,h,p,m,!1),g!==null&&v!==null&&DP(f,v,g,m,!0)}}e:{if(h=u?Ou(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var j=BG;else if(CP(h))if(XL)j=WG;else{j=UG;var E=zG}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(j=VG);if(j&&(j=j(e,u))){YL(f,j,r,d);break e}E&&E(e,h,u),e==="focusout"&&(E=h._wrapperState)&&E.controlled&&h.type==="number"&&_S(h,"number",h.value)}switch(E=u?Ou(u):window,e){case"focusin":(CP(E)||E.contentEditable==="true")&&(Eu=E,MS=u,Xh=null);break;case"focusout":Xh=MS=Eu=null;break;case"mousedown":DS=!0;break;case"contextmenu":case"mouseup":case"dragend":DS=!1,$P(f,r,d);break;case"selectionchange":if(KG)break;case"keydown":case"keyup":$P(f,r,d)}var _;if(ON)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else _u?KL(e,r)&&(N="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(N="onCompositionStart");N&&(qL&&r.locale!=="ko"&&(_u||N!=="onCompositionStart"?N==="onCompositionEnd"&&_u&&(_=HL()):(Oo=d,_N="value"in Oo?Oo.value:Oo.textContent,_u=!0)),E=xy(u,N),0<E.length&&(N=new EP(N,e,null,r,d),f.push({event:N,listeners:E}),_?N.data=_:(_=GL(r),_!==null&&(N.data=_)))),(_=IG?MG(e,r):DG(e,r))&&(u=xy(u,"onBeforeInput"),0<u.length&&(d=new EP("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:u}),d.data=_))}a4(f,t)})}function Ep(e,t,r){return{instance:e,listener:t,currentTarget:r}}function xy(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=yp(e,r),s!=null&&n.unshift(Ep(e,s,i)),s=yp(e,t),s!=null&&n.push(Ep(e,s,i))),e=e.return}return n}function Zc(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function DP(e,t,r,n,i){for(var s=t._reactName,a=[];r!==null&&r!==n;){var o=r,c=o.alternate,u=o.stateNode;if(c!==null&&c===n)break;o.tag===5&&u!==null&&(o=u,i?(c=yp(r,s),c!=null&&a.unshift(Ep(r,c,o))):i||(c=yp(r,s),c!=null&&a.push(Ep(r,c,o)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var QG=/\r\n?/g,ZG=/\u0000|\uFFFD/g;function LP(e){return(typeof e=="string"?e:""+e).replace(QG,`
38`).replace(ZG,"")}function Ug(e,t,r){if(t=LP(t),LP(e)!==t&&r)throw Error(ce(425))}function by(){}var LS=null,FS=null;function BS(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var zS=typeof setTimeout=="function"?setTimeout:void 0,JG=typeof clearTimeout=="function"?clearTimeout:void 0,FP=typeof Promise=="function"?Promise:void 0,eY=typeof queueMicrotask=="function"?queueMicrotask:typeof FP<"u"?function(e){return FP.resolve(null).then(e).catch(tY)}:zS;function tY(e){setTimeout(function(){throw e})}function Gw(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),wp(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}
vendor: 4,666 bytes, line 38
38while(r);wp(t)}function Mo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function BP(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var yf=Math.random().toString(36).slice(2),Cs="__reactFiber$"+yf,Np="__reactProps$"+yf,Pa="__reactContainer$"+yf,US="__reactEvents$"+yf,rY="__reactListeners$"+yf,nY="__reactHandles$"+yf;function Il(e){var t=e[Cs];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Pa]||r[Cs]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=BP(e);e!==null;){if(r=e[Cs])return r;e=BP(e)}return t}e=r,r=e.parentNode}return null}function Hm(e){return e=e[Cs]||e[Pa],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ou(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ce(33))}function P0(e){return e[Np]||null}var VS=[],Au=-1;function nl(e){return{current:e}}function zt(e){0>Au||(e.current=VS[Au],VS[Au]=null,Au--)}function It(e,t){Au++,VS[Au]=e.current,e.current=t}var Go={},Xr=nl(Go),Cn=nl(!1),fc=Go;function yd(e,t){var r=e.type.contextTypes;if(!r)return Go;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=t[s];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Pn(e){return e=e.childContextTypes,e!=null}function wy(){zt(Cn),zt(Xr)}function zP(e,t,r){if(Xr.current!==Go)throw Error(ce(168));It(Xr,t),It(Cn,r)}function l4(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(ce(108,zK(e)||"Unknown",i));return er({},r,n)}function Sy(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Go,fc=Xr.current,It(Xr,e),It(Cn,Cn.current),!0}function UP(e,t,r){var n=e.stateNode;if(!n)throw Error(ce(169));r?(e=l4(e,t,fc),n.__reactInternalMemoizedMergedChildContext=e,zt(Cn),zt(Xr),It(Xr,e)):zt(Cn),It(Cn,r)}var ua=null,T0=!1,Yw=!1;function c4(e){ua===null?ua=[e]:ua.push(e)}function iY(e){T0=!0,c4(e)}function il(){if(!Yw&&ua!==null){Yw=!0;var e=0,t=Ot;try{var r=ua;for(Ot=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ua=null,T0=!1}catch(i){throw ua!==null&&(ua=ua.slice(e+1)),$L(bN,il),i}finally{Ot=t,Yw=!1}}return null}var Cu=[],Pu=0,jy=null,_y=0,pi=[],mi=0,hc=null,ya=1,xa="";function El(e,t){Cu[Pu++]=_y,Cu[Pu++]=jy,jy=e,_y=t}function u4(e,t,r){pi[mi++]=ya,pi[mi++]=xa,pi[mi++]=hc,hc=e;var n=ya;e=xa;var i=32-is(n)-1;n&=~(1<<i),r+=1;var s=32-is(t)+i;if(30<s){var a=i-i%5;s=(n&(1<<a)-1).toString(32),n>>=a,i-=a,ya=1<<32-is(t)+i|r<<i|n,xa=s+e}else ya=1<<s|r<<i|n,xa=e}function CN(e){e.return!==null&&(El(e,1),u4(e,1,0))}function PN(e){for(;e===jy;)jy=Cu[--Pu],Cu[Pu]=null,_y=Cu[--Pu],Cu[Pu]=null;for(;e===hc;)hc=pi[--mi],pi[mi]=null,xa=pi[--mi],pi[mi]=null,ya=pi[--mi],pi[mi]=null}var Kn=null,qn=null,Wt=!1,Gi=null;function d4(e,t){var r=yi(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function VP(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Kn=e,qn=Mo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Kn=e,qn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=hc!==null?{id:ya,overflow:xa}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=yi(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Kn=e,qn=null,!0):!1;default:return!1}}function WS(e){return(e.mode&1)!==0&&(e.flags&128)===0}function HS(e){if(Wt){var t=qn;if(t){var r=t;if(!VP(e,t)){if(WS(e))throw Error(ce(418));t=Mo(r.nextSibling);var n=Kn;t&&VP(e,t)?d4(n,r):(e.flags=e.flags&-4097|2,Wt=!1,Kn=e)}}else{if(WS(e))throw Error(ce(418));e.flags=e.flags&-4097|2,Wt=!1,Kn=e}}}function WP(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Kn=e}function Vg(e){if(e!==Kn)return!1;if(!Wt)return WP(e),Wt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!BS(e.type,e.memoizedProps)),t&&(t=qn)){if(WS(e))throw f4(),Error(ce(418));for(;t;)d4(e,t),t=Mo(t.nextSibling)}if(WP(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ce(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){qn=Mo(e.nextSibling);break e}t--}
vendor: 11,490 bytes, line 38
38else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}qn=null}}else qn=Kn?Mo(e.stateNode.nextSibling):null;return!0}function f4(){for(var e=qn;e;)e=Mo(e.nextSibling)}function xd(){qn=Kn=null,Wt=!1}function TN(e){Gi===null?Gi=[e]:Gi.push(e)}var sY=Wa.ReactCurrentBatchConfig;function nh(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(ce(309));var n=r.stateNode}if(!n)throw Error(ce(147,e));var i=n,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(a){var o=i.refs;a===null?delete o[s]:o[s]=a},t._stringRef=s,t)}if(typeof e!="string")throw Error(ce(284));if(!r._owner)throw Error(ce(290,e))}return e}function Wg(e,t){throw e=Object.prototype.toString.call(t),Error(ce(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function HP(e){var t=e._init;return t(e._payload)}function h4(e){function t(y,x){if(e){var w=y.deletions;w===null?(y.deletions=[x],y.flags|=16):w.push(x)}}function r(y,x){if(!e)return null;for(;x!==null;)t(y,x),x=x.sibling;return null}function n(y,x){for(y=new Map;x!==null;)x.key!==null?y.set(x.key,x):y.set(x.index,x),x=x.sibling;return y}function i(y,x){return y=Bo(y,x),y.index=0,y.sibling=null,y}function s(y,x,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<x?(y.flags|=2,x):w):(y.flags|=2,x)):(y.flags|=1048576,x)}function a(y){return e&&y.alternate===null&&(y.flags|=2),y}function o(y,x,w,S){return x===null||x.tag!==6?(x=r1(w,y.mode,S),x.return=y,x):(x=i(x,w),x.return=y,x)}function c(y,x,w,S){var j=w.type;return j===ju?d(y,x,w.props.children,S,w.key):x!==null&&(x.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===so&&HP(j)===x.type)?(S=i(x,w.props),S.ref=nh(y,x,w),S.return=y,S):(S=Qv(w.type,w.key,w.props,null,y.mode,S),S.ref=nh(y,x,w),S.return=y,S)}function u(y,x,w,S){return x===null||x.tag!==4||x.stateNode.containerInfo!==w.containerInfo||x.stateNode.implementation!==w.implementation?(x=n1(w,y.mode,S),x.return=y,x):(x=i(x,w.children||[]),x.return=y,x)}function d(y,x,w,S,j){return x===null||x.tag!==7?(x=ic(w,y.mode,S,j),x.return=y,x):(x=i(x,w),x.return=y,x)}function f(y,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return x=r1(""+x,y.mode,w),x.return=y,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Rg:return w=Qv(x.type,x.key,x.props,null,y.mode,w),w.ref=nh(y,null,x),w.return=y,w;case Su:return x=n1(x,y.mode,w),x.return=y,x;case so:var S=x._init;return f(y,S(x._payload),w)}if(Rh(x)||Zf(x))return x=ic(x,y.mode,w,null),x.return=y,x;Wg(y,x)}return null}function h(y,x,w,S){var j=x!==null?x.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return j!==null?null:o(y,x,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Rg:return w.key===j?c(y,x,w,S):null;case Su:return w.key===j?u(y,x,w,S):null;case so:return j=w._init,h(y,x,j(w._payload),S)}if(Rh(w)||Zf(w))return j!==null?null:d(y,x,w,S,null);Wg(y,w)}return null}function p(y,x,w,S,j){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(w)||null,o(x,y,""+S,j);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Rg:return y=y.get(S.key===null?w:S.key)||null,c(x,y,S,j);case Su:return y=y.get(S.key===null?w:S.key)||null,u(x,y,S,j);case so:var E=S._init;return p(y,x,w,E(S._payload),j)}if(Rh(S)||Zf(S))return y=y.get(w)||null,d(x,y,S,j,null);Wg(x,S)}return null}function g(y,x,w,S){for(var j=null,E=null,_=x,N=x=0,O=null;_!==null&&N<w.length;N++){_.index>N?(O=_,_=null):O=_.sibling;var C=h(y,_,w[N],S);if(C===null){_===null&&(_=O);break}e&&_&&C.alternate===null&&t(y,_),x=s(C,x,N),E===null?j=C:E.sibling=C,E=C,_=O}if(N===w.length)return r(y,_),Wt&&El(y,N),j;if(_===null){for(;N<w.length;N++)_=f(y,w[N],S),_!==null&&(x=s(_,x,N),E===null?j=_:E.sibling=_,E=_);return Wt&&El(y,N),j}for(_=n(y,_);N<w.length;N++)O=p(_,y,N,w[N],S),O!==null&&(e&&O.alternate!==null&&_.delete(O.key===null?N:O.key),x=s(O,x,N),E===null?j=O:E.sibling=O,E=O);return e&&_.forEach(function(k){return t(y,k)}),Wt&&El(y,N),j}function m(y,x,w,S){var j=Zf(w);if(typeof j!="function")throw Error(ce(150));if(w=j.call(w),w==null)throw Error(ce(151));for(var E=j=null,_=x,N=x=0,O=null,C=w.next();_!==null&&!C.done;N++,C=w.next()){_.index>N?(O=_,_=null):O=_.sibling;var k=h(y,_,C.value,S);if(k===null){_===null&&(_=O);break}e&&_&&k.alternate===null&&t(y,_),x=s(k,x,N),E===null?j=k:E.sibling=k,E=k,_=O}if(C.done)return r(y,_),Wt&&El(y,N),j;if(_===null){for(;!C.done;N++,C=w.next())C=f(y,C.value,S),C!==null&&(x=s(C,x,N),E===null?j=C:E.sibling=C,E=C);return Wt&&El(y,N),j}for(_=n(y,_);!C.done;N++,C=w.next())C=p(_,y,N,C.value,S),C!==null&&(e&&C.alternate!==null&&_.delete(C.key===null?N:C.key),x=s(C,x,N),E===null?j=C:E.sibling=C,E=C);return e&&_.forEach(function($){return t(y,$)}),Wt&&El(y,N),j}function v(y,x,w,S){if(typeof w=="object"&&w!==null&&w.type===ju&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Rg:e:{for(var j=w.key,E=x;E!==null;){if(E.key===j){if(j=w.type,j===ju){if(E.tag===7){r(y,E.sibling),x=i(E,w.props.children),x.return=y,y=x;break e}}else if(E.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===so&&HP(j)===E.type){r(y,E.sibling),x=i(E,w.props),x.ref=nh(y,E,w),x.return=y,y=x;break e}r(y,E);break}else t(y,E);E=E.sibling}w.type===ju?(x=ic(w.props.children,y.mode,S,w.key),x.return=y,y=x):(S=Qv(w.type,w.key,w.props,null,y.mode,S),S.ref=nh(y,x,w),S.return=y,y=S)}return a(y);case Su:e:{for(E=w.key;x!==null;){if(x.key===E)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){r(y,x.sibling),x=i(x,w.children||[]),x.return=y,y=x;break e}else{r(y,x);break}else t(y,x);x=x.sibling}x=n1(w,y.mode,S),x.return=y,y=x}return a(y);case so:return E=w._init,v(y,x,E(w._payload),S)}if(Rh(w))return g(y,x,w,S);if(Zf(w))return m(y,x,w,S);Wg(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(r(y,x.sibling),x=i(x,w),x.return=y,y=x):(r(y,x),x=r1(w,y.mode,S),x.return=y,y=x),a(y)):r(y,x)}return v}var bd=h4(!0),p4=h4(!1),Ey=nl(null),Ny=null,Tu=null,kN=null;function RN(){kN=Tu=Ny=null}function $N(e){var t=Ey.current;zt(Ey),e._currentValue=t}function qS(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Hu(e,t){Ny=e,kN=Tu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Nn=!0),e.firstContext=null)}function Ei(e){var t=e._currentValue;if(kN!==e)if(e={context:e,memoizedValue:t,next:null},Tu===null){if(Ny===null)throw Error(ce(308));Tu=e,Ny.dependencies={lanes:0,firstContext:e}}else Tu=Tu.next=e;return t}var Ml=null;function IN(e){Ml===null?Ml=[e]:Ml.push(e)}function m4(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,IN(t)):(r.next=i.next,i.next=r),t.interleaved=r,Ta(e,n)}function Ta(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var ao=!1;function MN(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function g4(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ea(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Do(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,gt&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Ta(e,r)}return i=n.interleaved,i===null?(t.next=t,IN(n)):(t.next=i.next,i.next=t),n.interleaved=t,Ta(e,r)}function Hv(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,wN(e,r)}}function qP(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=a:s=s.next=a,r=r.next}while(r!==null);s===null?i=s=t:s=s.next=t}else i=s=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Oy(e,t,r,n){var i=e.updateQueue;ao=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var c=o,u=c.next;c.next=null,a===null?s=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==a&&(o===null?d.firstBaseUpdate=u:o.next=u,d.lastBaseUpdate=c))}if(s!==null){var f=i.baseState;a=0,d=u=c=null,o=s;do{var h=o.lane,p=o.eventTime;if((n&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var g=e,m=o;switch(h=t,p=r,m.tag){case 1:if(g=m.payload,typeof g=="function"){f=g.call(p,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,h=typeof g=="function"?g.call(p,f,h):g,h==null)break e;f=er({},f,h);break e;case 2:ao=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[o]:h.push(o))}else p={eventTime:p,lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(u=d=p,c=f):d=d.next=p,a|=h;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;h=o,o=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(d===null&&(c=f),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);mc|=a,e.lanes=a,e.memoizedState=f}}function KP(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(ce(191,i));i.call(n)}}}var qm={},Ms=nl(qm),Op=nl(qm),Ap=nl(qm);function Dl(e){if(e===qm)throw Error(ce(174));return e}function DN(e,t){switch(It(Ap,t),It(Op,e),It(Ms,qm),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:NS(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=NS(t,e)}zt(Ms),It(Ms,t)}function wd(){zt(Ms),zt(Op),zt(Ap)}function v4(e){Dl(Ap.current);var t=Dl(Ms.current),r=NS(t,e.type);t!==r&&(It(Op,e),It(Ms,r))}function LN(e){Op.current===e&&(zt(Ms),zt(Op))}var Xt=nl(0);function Ay(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Xw=[];function FN(){for(var e=0;e<Xw.length;e++)Xw[e]._workInProgressVersionPrimary=null;Xw.length=0}var qv=Wa.ReactCurrentDispatcher,Qw=Wa.ReactCurrentBatchConfig,pc=0,Qt=null,Er=null,Rr=null,Cy=!1,Qh=!1,Cp=0,aY=0;function Wr(){throw Error(ce(321))}function BN(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!cs(e[r],t[r]))return!1;return!0}function zN(e,t,r,n,i,s){if(pc=s,Qt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,qv.current=e===null||e.memoizedState===null?uY:dY,e=r(n,i),Qh){
vendor: 6,602 bytes, line 38
38s=0;do{if(Qh=!1,Cp=0,25<=s)throw Error(ce(301));s+=1,Rr=Er=null,t.updateQueue=null,qv.current=fY,e=r(n,i)}while(Qh)}if(qv.current=Py,t=Er!==null&&Er.next!==null,pc=0,Rr=Er=Qt=null,Cy=!1,t)throw Error(ce(300));return e}function UN(){var e=Cp!==0;return Cp=0,e}function ws(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rr===null?Qt.memoizedState=Rr=e:Rr=Rr.next=e,Rr}function Ni(){if(Er===null){var e=Qt.alternate;e=e!==null?e.memoizedState:null}else e=Er.next;var t=Rr===null?Qt.memoizedState:Rr.next;if(t!==null)Rr=t,Er=e;else{if(e===null)throw Error(ce(310));Er=e,e={memoizedState:Er.memoizedState,baseState:Er.baseState,baseQueue:Er.baseQueue,queue:Er.queue,next:null},Rr===null?Qt.memoizedState=Rr=e:Rr=Rr.next=e}return Rr}function Pp(e,t){return typeof t=="function"?t(e):t}function Zw(e){var t=Ni(),r=t.queue;if(r===null)throw Error(ce(311));r.lastRenderedReducer=e;var n=Er,i=n.baseQueue,s=r.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}n.baseQueue=i=s,r.pending=null}if(i!==null){s=i.next,n=n.baseState;var o=a=null,c=null,u=s;do{var d=u.lane;if((pc&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(o=c=f,a=n):c=c.next=f,Qt.lanes|=d,mc|=d}u=u.next}while(u!==null&&u!==s);c===null?a=n:c.next=o,cs(n,t.memoizedState)||(Nn=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do s=i.lane,Qt.lanes|=s,mc|=s,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Jw(e){var t=Ni(),r=t.queue;if(r===null)throw Error(ce(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,s=t.memoizedState;if(i!==null){r.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);cs(s,t.memoizedState)||(Nn=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),r.lastRenderedState=s}return[s,n]}function y4(){}function x4(e,t){var r=Qt,n=Ni(),i=t(),s=!cs(n.memoizedState,i);if(s&&(n.memoizedState=i,Nn=!0),n=n.queue,VN(S4.bind(null,r,n,e),[e]),n.getSnapshot!==t||s||Rr!==null&&Rr.memoizedState.tag&1){if(r.flags|=2048,Tp(9,w4.bind(null,r,n,i,t),void 0,null),Ir===null)throw Error(ce(349));pc&30||b4(r,t,i)}return i}function b4(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Qt.updateQueue,t===null?(t={lastEffect:null,stores:null},Qt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function w4(e,t,r,n){t.value=r,t.getSnapshot=n,j4(t)&&_4(e)}function S4(e,t,r){return r(function(){j4(t)&&_4(e)})}function j4(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!cs(e,r)}catch{return!0}}function _4(e){var t=Ta(e,1);t!==null&&ss(t,e,1,-1)}function GP(e){var t=ws();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pp,lastRenderedState:e},t.queue=e,e=e.dispatch=cY.bind(null,Qt,e),[t.memoizedState,e]}function Tp(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Qt.updateQueue,t===null?(t={lastEffect:null,stores:null},Qt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function E4(){return Ni().memoizedState}function Kv(e,t,r,n){var i=ws();Qt.flags|=e,i.memoizedState=Tp(1|t,r,void 0,n===void 0?null:n)}function k0(e,t,r,n){var i=Ni();n=n===void 0?null:n;var s=void 0;if(Er!==null){var a=Er.memoizedState;if(s=a.destroy,n!==null&&BN(n,a.deps)){i.memoizedState=Tp(t,r,s,n);return}}Qt.flags|=e,i.memoizedState=Tp(1|t,r,s,n)}function YP(e,t){return Kv(8390656,8,e,t)}function VN(e,t){return k0(2048,8,e,t)}function N4(e,t){return k0(4,2,e,t)}function O4(e,t){return k0(4,4,e,t)}function A4(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function C4(e,t,r){return r=r!=null?r.concat([e]):null,k0(4,4,A4.bind(null,t,e),r)}function WN(){}function P4(e,t){var r=Ni();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&BN(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function T4(e,t){var r=Ni();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&BN(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function k4(e,t,r){return pc&21?(cs(r,t)||(r=DL(),Qt.lanes|=r,mc|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Nn=!0),e.memoizedState=r)}function oY(e,t){var r=Ot;Ot=r!==0&&4>r?r:4,e(!0);var n=Qw.transition;Qw.transition={};try{e(!1),t()}finally{Ot=r,Qw.transition=n}}function R4(){return Ni().memoizedState}function lY(e,t,r){var n=Fo(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},$4(e))I4(t,r);else if(r=m4(e,t,r,n),r!==null){var i=pn();ss(r,e,n,i),M4(r,t,n)}}function cY(e,t,r){var n=Fo(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if($4(e))I4(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,o=s(a,r);if(i.hasEagerState=!0,i.eagerState=o,cs(o,a)){var c=t.interleaved;c===null?(i.next=i,IN(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}r=m4(e,t,i,n),r!==null&&(i=pn(),ss(r,e,n,i),M4(r,t,n))}}function $4(e){var t=e.alternate;return e===Qt||t!==null&&t===Qt}function I4(e,t){Qh=Cy=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function M4(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,wN(e,r)}}var Py={readContext:Ei,useCallback:Wr,useContext:Wr,useEffect:Wr,useImperativeHandle:Wr,useInsertionEffect:Wr,useLayoutEffect:Wr,useMemo:Wr,useReducer:Wr,useRef:Wr,useState:Wr,useDebugValue:Wr,useDeferredValue:Wr,useTransition:Wr,useMutableSource:Wr,useSyncExternalStore:Wr,useId:Wr,unstable_isNewReconciler:!1},uY={readContext:Ei,useCallback:function(e,t){return ws().memoizedState=[e,t===void 0?null:t],e},useContext:Ei,useEffect:YP,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Kv(4194308,4,A4.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Kv(4194308,4,e,t)},useInsertionEffect:function(e,t){return Kv(4,2,e,t)},useMemo:function(e,t){var r=ws();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ws();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=lY.bind(null,Qt,e),[n.memoizedState,e]}
vendor: 4,768 bytes, lines 38-40
38,useRef:function(e){var t=ws();return e={current:e},t.memoizedState=e},useState:GP,useDebugValue:WN,useDeferredValue:function(e){return ws().memoizedState=e},useTransition:function(){var e=GP(!1),t=e[0];return e=oY.bind(null,e[1]),ws().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Qt,i=ws();if(Wt){if(r===void 0)throw Error(ce(407));r=r()}else{if(r=t(),Ir===null)throw Error(ce(349));pc&30||b4(n,t,r)}i.memoizedState=r;var s={value:r,getSnapshot:t};return i.queue=s,YP(S4.bind(null,n,s,e),[e]),n.flags|=2048,Tp(9,w4.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=ws(),t=Ir.identifierPrefix;if(Wt){var r=xa,n=ya;r=(n&~(1<<32-is(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Cp++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=aY++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},dY={readContext:Ei,useCallback:P4,useContext:Ei,useEffect:VN,useImperativeHandle:C4,useInsertionEffect:N4,useLayoutEffect:O4,useMemo:T4,useReducer:Zw,useRef:E4,useState:function(){return Zw(Pp)},useDebugValue:WN,useDeferredValue:function(e){var t=Ni();return k4(t,Er.memoizedState,e)},useTransition:function(){var e=Zw(Pp)[0],t=Ni().memoizedState;return[e,t]},useMutableSource:y4,useSyncExternalStore:x4,useId:R4,unstable_isNewReconciler:!1},fY={readContext:Ei,useCallback:P4,useContext:Ei,useEffect:VN,useImperativeHandle:C4,useInsertionEffect:N4,useLayoutEffect:O4,useMemo:T4,useReducer:Jw,useRef:E4,useState:function(){return Jw(Pp)},useDebugValue:WN,useDeferredValue:function(e){var t=Ni();return Er===null?t.memoizedState=e:k4(t,Er.memoizedState,e)},useTransition:function(){var e=Jw(Pp)[0],t=Ni().memoizedState;return[e,t]},useMutableSource:y4,useSyncExternalStore:x4,useId:R4,unstable_isNewReconciler:!1};function Bi(e,t){if(e&&e.defaultProps){t=er({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function KS(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:er({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var R0={isMounted:function(e){return(e=e._reactInternals)?Bc(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=pn(),i=Fo(e),s=Ea(n,i);s.payload=t,r!=null&&(s.callback=r),t=Do(e,s,i),t!==null&&(ss(t,e,i,n),Hv(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=pn(),i=Fo(e),s=Ea(n,i);s.tag=1,s.payload=t,r!=null&&(s.callback=r),t=Do(e,s,i),t!==null&&(ss(t,e,i,n),Hv(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=pn(),n=Fo(e),i=Ea(r,n);i.tag=2,t!=null&&(i.callback=t),t=Do(e,i,n),t!==null&&(ss(t,e,n,r),Hv(t,e,n))}};function XP(e,t,r,n,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,s,a):t.prototype&&t.prototype.isPureReactComponent?!jp(r,n)||!jp(i,s):!0}function D4(e,t,r){var n=!1,i=Go,s=t.contextType;return typeof s=="object"&&s!==null?s=Ei(s):(i=Pn(t)?fc:Xr.current,n=t.contextTypes,s=(n=n!=null)?yd(e,i):Go),t=new t(r,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=R0,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function QP(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&R0.enqueueReplaceState(t,t.state,null)}function GS(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},MN(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Ei(s):(s=Pn(t)?fc:Xr.current,i.context=yd(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(KS(e,t,s,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&R0.enqueueReplaceState(i,i.state,null),Oy(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Sd(e,t){try{var r="",n=t;do r+=BK(n),n=n.return;while(n);var i=r}catch(s){i=`
39Error generating stack: `+s.message+`
40`+s.stack}return{value:e,source:t,stack:i,digest:null}}function e1(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function YS(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var hY=typeof WeakMap=="function"?WeakMap:Map;function L4(e,t,r){r=Ea(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){ky||(ky=!0,sj=n),YS(e,t)},r}
vendor: 7,376 bytes, line 40
40function F4(e,t,r){r=Ea(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){YS(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){YS(e,t),typeof n!="function"&&(Lo===null?Lo=new Set([this]):Lo.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function ZP(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new hY;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=OY.bind(null,e,t,r),t.then(e,e))}function JP(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function eT(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Ea(-1,1),t.tag=2,Do(r,t,1))),r.lanes|=1),e)}var pY=Wa.ReactCurrentOwner,Nn=!1;function sn(e,t,r,n){t.child=e===null?p4(t,null,r,n):bd(t,e.child,r,n)}function tT(e,t,r,n,i){r=r.render;var s=t.ref;return Hu(t,i),n=zN(e,t,r,n,s,i),r=UN(),e!==null&&!Nn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ka(e,t,i)):(Wt&&r&&CN(t),t.flags|=1,sn(e,t,n,i),t.child)}function rT(e,t,r,n,i){if(e===null){var s=r.type;return typeof s=="function"&&!ZN(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=s,B4(e,t,s,n,i)):(e=Qv(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(r=r.compare,r=r!==null?r:jp,r(a,n)&&e.ref===t.ref)return ka(e,t,i)}return t.flags|=1,e=Bo(s,n),e.ref=t.ref,e.return=t,t.child=e}function B4(e,t,r,n,i){if(e!==null){var s=e.memoizedProps;if(jp(s,n)&&e.ref===t.ref)if(Nn=!1,t.pendingProps=n=s,(e.lanes&i)!==0)e.flags&131072&&(Nn=!0);else return t.lanes=e.lanes,ka(e,t,i)}return XS(e,t,r,n,i)}function z4(e,t,r){var n=t.pendingProps,i=n.children,s=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},It(Ru,Dn),Dn|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,It(Ru,Dn),Dn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,It(Ru,Dn),Dn|=n}else s!==null?(n=s.baseLanes|r,t.memoizedState=null):n=r,It(Ru,Dn),Dn|=n;return sn(e,t,i,r),t.child}function U4(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function XS(e,t,r,n,i){var s=Pn(r)?fc:Xr.current;return s=yd(t,s),Hu(t,i),r=zN(e,t,r,n,s,i),n=UN(),e!==null&&!Nn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ka(e,t,i)):(Wt&&n&&CN(t),t.flags|=1,sn(e,t,r,i),t.child)}function nT(e,t,r,n,i){if(Pn(r)){var s=!0;Sy(t)}else s=!1;if(Hu(t,i),t.stateNode===null)Gv(e,t),D4(t,r,n),GS(t,r,n,i),n=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var c=a.context,u=r.contextType;typeof u=="object"&&u!==null?u=Ei(u):(u=Pn(r)?fc:Xr.current,u=yd(t,u));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==n||c!==u)&&QP(t,a,n,u),ao=!1;var h=t.memoizedState;a.state=h,Oy(t,n,a,i),c=t.memoizedState,o!==n||h!==c||Cn.current||ao?(typeof d=="function"&&(KS(t,r,d,n),c=t.memoizedState),(o=ao||XP(t,r,o,n,h,c,u))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),a.props=n,a.state=c,a.context=u,n=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,g4(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:Bi(t.type,o),a.props=u,f=t.pendingProps,h=a.context,c=r.contextType,typeof c=="object"&&c!==null?c=Ei(c):(c=Pn(r)?fc:Xr.current,c=yd(t,c));var p=r.getDerivedStateFromProps;(d=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==f||h!==c)&&QP(t,a,n,c),ao=!1,h=t.memoizedState,a.state=h,Oy(t,n,a,i);var g=t.memoizedState;o!==f||h!==g||Cn.current||ao?(typeof p=="function"&&(KS(t,r,p,n),g=t.memoizedState),(u=ao||XP(t,r,u,n,h,g,c)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,g,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,g,c)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=g),a.props=n,a.state=g,a.context=c,n=u):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return QS(e,t,r,n,s,i)}function QS(e,t,r,n,i,s){U4(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return i&&UP(t,r,!1),ka(e,t,s);n=t.stateNode,pY.current=t;var o=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=bd(t,e.child,null,s),t.child=bd(t,null,o,s)):sn(e,t,o,s),t.memoizedState=n.state,i&&UP(t,r,!0),t.child}function V4(e){var t=e.stateNode;t.pendingContext?zP(e,t.pendingContext,t.pendingContext!==t.context):t.context&&zP(e,t.context,!1),DN(e,t.containerInfo)}function iT(e,t,r,n,i){return xd(),TN(i),t.flags|=256,sn(e,t,r,n),t.child}var ZS={dehydrated:null,treeContext:null,retryLane:0};function JS(e){return{baseLanes:e,cachePool:null,transitions:null}}function W4(e,t,r){var n=t.pendingProps,i=Xt.current,s=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),It(Xt,i&1),e===null)return HS(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=n.children,e=n.fallback,s?(n=t.mode,s=t.child,a={mode:"hidden",children:a},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=M0(a,n,0,null),e=ic(e,n,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=JS(r),t.memoizedState=ZS,e):HN(t,a));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return mY(e,t,a,n,o,i,r);if(s){s=n.fallback,a=t.mode,i=e.child,o=i.sibling;var c={mode:"hidden",children:n.children};return!(a&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=Bo(i,c),n.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=Bo(o,s):(s=ic(s,a,r,null),s.flags|=2),s.return=t,n.return=t,n.sibling=s,t.child=n,n=s,s=t.child,a=e.child.memoizedState,a=a===null?JS(r):{base
vendor: 8,218 bytes, line 40
40Lanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~r,t.memoizedState=ZS,n}return s=e.child,e=s.sibling,n=Bo(s,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function HN(e,t){return t=M0({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Hg(e,t,r,n){return n!==null&&TN(n),bd(t,e.child,null,r),e=HN(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mY(e,t,r,n,i,s,a){if(r)return t.flags&256?(t.flags&=-257,n=e1(Error(ce(422))),Hg(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=n.fallback,i=t.mode,n=M0({mode:"visible",children:n.children},i,0,null),s=ic(s,i,a,null),s.flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,t.mode&1&&bd(t,e.child,null,a),t.child.memoizedState=JS(a),t.memoizedState=ZS,s);if(!(t.mode&1))return Hg(e,t,a,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var o=n.dgst;return n=o,s=Error(ce(419)),n=e1(s,n,void 0),Hg(e,t,a,n)}if(o=(a&e.childLanes)!==0,Nn||o){if(n=Ir,n!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Ta(e,i),ss(n,e,i,-1))}return QN(),n=e1(Error(ce(421))),Hg(e,t,a,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=AY.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,qn=Mo(i.nextSibling),Kn=t,Wt=!0,Gi=null,e!==null&&(pi[mi++]=ya,pi[mi++]=xa,pi[mi++]=hc,ya=e.id,xa=e.overflow,hc=t),t=HN(t,n.children),t.flags|=4096,t)}function sT(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),qS(e.return,t,r)}function t1(e,t,r,n,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function H4(e,t,r){var n=t.pendingProps,i=n.revealOrder,s=n.tail;if(sn(e,t,n.children,r),n=Xt.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sT(e,r,t);else if(e.tag===19)sT(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(It(Xt,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&Ay(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),t1(t,!1,i,r,s);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ay(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}t1(t,!0,r,null,s);break;case"together":t1(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Gv(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ka(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),mc|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ce(153));if(t.child!==null){for(e=t.child,r=Bo(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Bo(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function gY(e,t,r){switch(t.tag){case 3:V4(t),xd();break;case 5:v4(t);break;case 1:Pn(t.type)&&Sy(t);break;case 4:DN(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;It(Ey,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(It(Xt,Xt.current&1),t.flags|=128,null):r&t.child.childLanes?W4(e,t,r):(It(Xt,Xt.current&1),e=ka(e,t,r),e!==null?e.sibling:null);It(Xt,Xt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return H4(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),It(Xt,Xt.current),n)break;return null;case 22:case 23:return t.lanes=0,z4(e,t,r)}return ka(e,t,r)}var q4,ej,K4,G4;q4=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};ej=function(){};K4=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,Dl(Ms.current);var s=null;switch(r){case"input":i=SS(e,i),n=SS(e,n),s=[];break;case"select":i=er({},i,{value:void 0}),n=er({},n,{value:void 0}),s=[];break;case"textarea":i=ES(e,i),n=ES(e,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=by)}OS(r,n);var a;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var o=i[u];for(a in o)o.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(gp.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in n){var c=n[u];if(o=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&c!==o&&(c!=null||o!=null))if(u==="style")if(o){for(a in o)!o.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in c)c.hasOwnProperty(a)&&o[a]!==c[a]&&(r||(r={}),r[a]=c[a])}else r||(s||(s=[]),s.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(s=s||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(gp.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Lt("scroll",e),s||o===c||(s=[])):(s=s||[]).push(u,c))}r&&(s=s||[]).push("style",r);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};G4=function(e,t,r,n){r!==n&&(t.flags|=4)};function ih(e,t){if(!Wt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Hr(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function vY(e,t,r){var n=t.pendingProps;switch(PN(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hr(t),null;case 1:return Pn(t.type)&&wy(),Hr(t),null;case 3:return n=t.stateNode,wd(),zt(Cn),zt(Xr),FN(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Vg(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gi!==null&&(lj(Gi),Gi=null))),ej(e,t),Hr(t),null;case 5:LN(t);var i=Dl(Ap.current);if(r=t.type,e!==null&&t.stateNode!=null)K4(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(ce(166));return Hr(t),null}if(e=Dl(Ms.current),Vg(t)){n=t.stateNode,r=t.type;var s=t.memoizedProps;switch(n[Cs]=t,n[Np]=s,e=(t.mode&1)!==0,r){case"dialog":Lt("cancel",n),Lt("close",n);break;case"iframe":case"object":case"embed":Lt("load",n);break;case"video":case"audio":for(i=0;i<Ih.length;i++)Lt(Ih[i],n);break;case"source":Lt("error",n);break;case"img":case"image":case"link":Lt("error",n),Lt("load",n);break;case"details":Lt("toggle",n);break;case"input":pP(n,s),Lt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},Lt("invalid",n);break;case"textarea":gP(n,s),Lt("invalid",n)}OS(r,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var o=s[a];
vendor: 31,791 bytes, line 40
40a==="children"?typeof o=="string"?n.textContent!==o&&(s.suppressHydrationWarning!==!0&&Ug(n.textContent,o,e),i=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&Ug(n.textContent,o,e),i=["children",""+o]):gp.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&Lt("scroll",n)}switch(r){case"input":$g(n),mP(n,s,!0);break;case"textarea":$g(n),vP(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=by)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=SL(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Cs]=t,e[Np]=n,q4(e,t,!1,!1),t.stateNode=e;e:{switch(a=AS(r,n),r){case"dialog":Lt("cancel",e),Lt("close",e),i=n;break;case"iframe":case"object":case"embed":Lt("load",e),i=n;break;case"video":case"audio":for(i=0;i<Ih.length;i++)Lt(Ih[i],e);i=n;break;case"source":Lt("error",e),i=n;break;case"img":case"image":case"link":Lt("error",e),Lt("load",e),i=n;break;case"details":Lt("toggle",e),i=n;break;case"input":pP(e,n),i=SS(e,n),Lt("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=er({},n,{value:void 0}),Lt("invalid",e);break;case"textarea":gP(e,n),i=ES(e,n),Lt("invalid",e);break;default:i=n}OS(r,i),o=i;for(s in o)if(o.hasOwnProperty(s)){var c=o[s];s==="style"?EL(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&jL(e,c)):s==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&vp(e,c):typeof c=="number"&&vp(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(gp.hasOwnProperty(s)?c!=null&&s==="onScroll"&&Lt("scroll",e):c!=null&&mN(e,s,c,a))}switch(r){case"input":$g(e),mP(e,n,!1);break;case"textarea":$g(e),vP(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Ko(n.value));break;case"select":e.multiple=!!n.multiple,s=n.value,s!=null?zu(e,!!n.multiple,s,!1):n.defaultValue!=null&&zu(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=by)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Hr(t),null;case 6:if(e&&t.stateNode!=null)G4(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(ce(166));if(r=Dl(Ap.current),Dl(Ms.current),Vg(t)){if(n=t.stateNode,r=t.memoizedProps,n[Cs]=t,(s=n.nodeValue!==r)&&(e=Kn,e!==null))switch(e.tag){case 3:Ug(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ug(n.nodeValue,r,(e.mode&1)!==0)}s&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Cs]=t,t.stateNode=n}return Hr(t),null;case 13:if(zt(Xt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Wt&&qn!==null&&t.mode&1&&!(t.flags&128))f4(),xd(),t.flags|=98560,s=!1;else if(s=Vg(t),n!==null&&n.dehydrated!==null){if(e===null){if(!s)throw Error(ce(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(ce(317));s[Cs]=t}else xd(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hr(t),s=!1}else Gi!==null&&(lj(Gi),Gi=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Xt.current&1?Ar===0&&(Ar=3):QN())),t.updateQueue!==null&&(t.flags|=4),Hr(t),null);case 4:return wd(),ej(e,t),e===null&&_p(t.stateNode.containerInfo),Hr(t),null;case 10:return $N(t.type._context),Hr(t),null;case 17:return Pn(t.type)&&wy(),Hr(t),null;case 19:if(zt(Xt),s=t.memoizedState,s===null)return Hr(t),null;if(n=(t.flags&128)!==0,a=s.rendering,a===null)if(n)ih(s,!1);else{if(Ar!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Ay(e),a!==null){for(t.flags|=128,ih(s,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)s=r,e=n,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return It(Xt,Xt.current&1|2),t.child}e=e.sibling}s.tail!==null&&ur()>jd&&(t.flags|=128,n=!0,ih(s,!1),t.lanes=4194304)}else{if(!n)if(e=Ay(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ih(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Wt)return Hr(t),null}else 2*ur()-s.renderingStartTime>jd&&r!==1073741824&&(t.flags|=128,n=!0,ih(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(r=s.last,r!==null?r.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ur(),t.sibling=null,r=Xt.current,It(Xt,n?r&1|2:r&1),t):(Hr(t),null);case 22:case 23:return XN(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Dn&1073741824&&(Hr(t),t.subtreeFlags&6&&(t.flags|=8192)):Hr(t),null;case 24:return null;case 25:return null}throw Error(ce(156,t.tag))}function yY(e,t){switch(PN(t),t.tag){case 1:return Pn(t.type)&&wy(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wd(),zt(Cn),zt(Xr),FN(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return LN(t),null;case 13:if(zt(Xt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ce(340));xd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return zt(Xt),null;case 4:return wd(),null;case 10:return $N(t.type._context),null;case 22:case 23:return XN(),null;case 24:return null;default:return null}}var qg=!1,Gr=!1,xY=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function ku(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ir(e,t,n)}else r.current=null}function tj(e,t,r){try{r()}catch(n){ir(e,t,n)}}var aT=!1;function bY(e,t){if(LS=vy,e=JL(),AN(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var a=0,o=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==r||i!==0&&f.nodeType!==3||(o=a+i),f!==s||n!==0&&f.nodeType!==3||(c=a+n),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===r&&++u===i&&(o=a),h===s&&++d===n&&(c=a),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}r=o===-1||c===-1?null:{start:o,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(FS={focusedElem:e,selectionRange:r},vy=!1,Ne=t;Ne!==null;)if(t=Ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ne=e;else for(;Ne!==null;){t=Ne;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,v=g.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:Bi(t.type,m),v);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.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(ce(163))}}catch(S){ir(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Ne=e;break}Ne=t.return}return g=aT,aT=!1,g}function Zh(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&tj(t,r,s)}i=i.next}while(i!==n)}}function $0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function rj(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Y4(e){var t=e.alternate;t!==null&&(e.alternate=null,Y4(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Cs],delete t[Np],delete t[US],delete t[rY],delete t[nY])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function X4(e){return e.tag===5||e.tag===3||e.tag===4}function oT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||X4(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nj(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=by));else if(n!==4&&(e=e.child,e!==null))for(nj(e,t,r),e=e.sibling;e!==null;)nj(e,t,r),e=e.sibling}function ij(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(ij(e,t,r),e=e.sibling;e!==null;)ij(e,t,r),e=e.sibling}var Br=null,Wi=!1;function Qa(e,t,r){for(r=r.child;r!==null;)Q4(e,t,r),r=r.sibling}function Q4(e,t,r){if(Is&&typeof Is.onCommitFiberUnmount=="function")try{Is.onCommitFiberUnmount(N0,r)}catch{}switch(r.tag){case 5:Gr||ku(r,t);case 6:var n=Br,i=Wi;Br=null,Qa(e,t,r),Br=n,Wi=i,Br!==null&&(Wi?(e=Br,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Br.removeChild(r.stateNode));break;case 18:Br!==null&&(Wi?(e=Br,r=r.stateNode,e.nodeType===8?Gw(e.parentNode,r):e.nodeType===1&&Gw(e,r),wp(e)):Gw(Br,r.stateNode));break;case 4:n=Br,i=Wi,Br=r.stateNode.containerInfo,Wi=!0,Qa(e,t,r),Br=n,Wi=i;break;case 0:case 11:case 14:case 15:if(!Gr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&tj(r,t,a),i=i.next}while(i!==n)}Qa(e,t,r);break;case 1:if(!Gr&&(ku(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){ir(r,t,o)}Qa(e,t,r);break;case 21:Qa(e,t,r);break;case 22:r.mode&1?(Gr=(n=Gr)||r.memoizedState!==null,Qa(e,t,r),Gr=n):Qa(e,t,r);break;default:Qa(e,t,r)}}function lT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new xY),t.forEach(function(n){var i=CY.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Ii(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var s=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:Br=o.stateNode,Wi=!1;break e;case 3:Br=o.stateNode.containerInfo,Wi=!0;break e;case 4:Br=o.stateNode.containerInfo,Wi=!0;break e}o=o.return}if(Br===null)throw Error(ce(160));Q4(s,a,i),Br=null,Wi=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){ir(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Z4(t,e),t=t.sibling}function Z4(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ii(t,e),xs(e),n&4){try{Zh(3,e,e.return),$0(3,e)}catch(m){ir(e,e.return,m)}try{Zh(5,e,e.return)}catch(m){ir(e,e.return,m)}}break;case 1:Ii(t,e),xs(e),n&512&&r!==null&&ku(r,r.return);break;case 5:if(Ii(t,e),xs(e),n&512&&r!==null&&ku(r,r.return),e.flags&32){var i=e.stateNode;try{vp(i,"")}catch(m){ir(e,e.return,m)}}if(n&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,a=r!==null?r.memoizedProps:s,o=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{o==="input"&&s.type==="radio"&&s.name!=null&&bL(i,s),AS(o,a);var u=AS(o,s);for(a=0;a<c.length;a+=2){var d=c[a],f=c[a+1];d==="style"?EL(i,f):d==="dangerouslySetInnerHTML"?jL(i,f):d==="children"?vp(i,f):mN(i,d,f,u)}switch(o){case"input":jS(i,s);break;case"textarea":wL(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?zu(i,!!s.multiple,p,!1):h!==!!s.multiple&&(s.defaultValue!=null?zu(i,!!s.multiple,s.defaultValue,!0):zu(i,!!s.multiple,s.multiple?[]:"",!1))}i[Np]=s}catch(m){ir(e,e.return,m)}}break;case 6:if(Ii(t,e),xs(e),n&4){if(e.stateNode===null)throw Error(ce(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){ir(e,e.return,m)}}break;case 3:if(Ii(t,e),xs(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{wp(t.containerInfo)}catch(m){ir(e,e.return,m)}break;case 4:Ii(t,e),xs(e);break;case 13:Ii(t,e),xs(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(GN=ur())),n&4&&lT(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Gr=(u=Gr)||d,Ii(t,e),Gr=u):Ii(t,e),xs(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Ne=e,d=e.child;d!==null;){for(f=Ne=d;Ne!==null;){switch(h=Ne,p=h.child,h.tag){case 0:case 11:case 14:case 15:Zh(4,h,h.return);break;case 1:ku(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){ir(n,r,m)}}break;case 5:ku(h,h.return);break;case 22:if(h.memoizedState!==null){uT(f);continue}}p!==null?(p.return=h,Ne=p):uT(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(o=f.stateNode,c=f.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,o.style.display=_L("display",a))}catch(m){ir(e,e.return,m)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(m){ir(e,e.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ii(t,e),xs(e),n&4&&lT(e);break;case 21:break;default:Ii(t,e),xs(e)}}function xs(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(X4(r)){var n=r;break e}r=r.return}throw Error(ce(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(vp(i,""),n.flags&=-33);var s=oT(e);ij(e,s,i);break;case 3:case 4:var a=n.stateNode.containerInfo,o=oT(e);nj(e,o,a);break;default:throw Error(ce(161))}}catch(c){ir(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wY(e,t,r){Ne=e,J4(e)}function J4(e,t,r){for(var n=(e.mode&1)!==0;Ne!==null;){var i=Ne,s=i.child;if(i.tag===22&&n){var a=i.memoizedState!==null||qg;if(!a){var o=i.alternate,c=o!==null&&o.memoizedState!==null||Gr;o=qg;var u=Gr;if(qg=a,(Gr=c)&&!u)for(Ne=i;Ne!==null;)a=Ne,c=a.child,a.tag===22&&a.memoizedState!==null?dT(i):c!==null?(c.return=a,Ne=c):dT(i);for(;s!==null;)Ne=s,J4(s),s=s.sibling;Ne=i,qg=o,Gr=u}cT(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,Ne=s):cT(e)}}function cT(e){for(;Ne!==null;){var t=Ne;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Gr||$0(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Gr)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:Bi(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&KP(t,s,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}KP(t,a,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&wp(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ce(163))}Gr||t.flags&512&&rj(t)}catch(h){ir(t,t.return,h)}}if(t===e){Ne=null;break}if(r=t.sibling,r!==null){r.return=t.return,Ne=r;break}Ne=t.return}}function uT(e){for(;Ne!==null;){var t=Ne;if(t===e){Ne=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Ne=r;break}Ne=t.return}}function dT(e){for(;Ne!==null;){var t=Ne;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{$0(4,t)}catch(c){ir(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(c){ir(t,i,c)}}var s=t.return;try{rj(t)}catch(c){ir(t,s,c)}break;case 5:var a=t.return;try{rj(t)}catch(c){ir(t,a,c)}}}catch(c){ir(t,t.return,c)}if(t===e){Ne=null;break}var o=t.sibling;if(o!==null){o.return=t.return,Ne=o;break}Ne=t.return}}var SY=Math.ceil,Ty=Wa.ReactCurrentDispatcher,qN=Wa.ReactCurrentOwner,Si=Wa.ReactCurrentBatchConfig,gt=0,Ir=null,yr=null,Ur=0,Dn=0,Ru=nl(0),Ar=0,kp=null,mc=0,I0=0,KN=0,Jh=null,En=null,GN=0,jd=1/0,oa=null,ky=!1,sj=null,Lo=null,Kg=!1,Ao=null,Ry=0,ep=0,aj=null,Yv=-1,Xv=0;function pn(){return gt&6?ur():Yv!==-1?Yv:Yv=ur()}function Fo(e){return e.mode&1?gt&2&&Ur!==0?Ur&-Ur:sY.transition!==null?(Xv===0&&(Xv=DL()),Xv):(e=Ot,e!==0||(e=window.event,e=e===void 0?16:WL(e.type)),e):1}function ss(e,t,r,n){if(50<ep)throw ep=0,aj=null,Error(ce(185));Vm(e,r,n),(!(gt&2)||e!==Ir)&&(e===Ir&&(!(gt&2)&&(I0|=r),Ar===4&&ho(e,Ur)),Tn(e,n),r===1&&gt===0&&!(t.mode&1)&&(jd=ur()+500,T0&&il()))}function Tn(e,t){var r=e.callbackNode;sG(e,t);var n=gy(e,e===Ir?Ur:0);if(n===0)r!==null&&bP(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&bP(r),t===1)e.tag===0?iY(fT.bind(null,e)):c4(fT.bind(null,e)),eY(function(){!(gt&6)&&il()}),r=null;else{switch(LL(n)){case 1:r=bN;break;case 4:r=IL;break;case 16:r=my;break;case 536870912:r=ML;break;default:r=my}r=o3(r,e3.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function e3(e,t){if(Yv=-1,Xv=0,gt&6)throw Error(ce(327));var r=e.callbackNode;if(qu()&&e.callbackNode!==r)return null;var n=gy(e,e===Ir?Ur:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=$y(e,n);else{t=n;var i=gt;gt|=2;var s=r3();(Ir!==e||Ur!==t)&&(oa=null,jd=ur()+500,nc(e,t));do try{EY();break}catch(o){t3(e,o)}while(!0);RN(),Ty.current=s,gt=i,yr!==null?t=0:(Ir=null,Ur=0,t=Ar)}if(t!==0){if(t===2&&(i=RS(e),i!==0&&(n=i,t=oj(e,i))),t===1)throw r=kp,nc(e,0),ho(e,n),Tn(e,ur()),r;if(t===6)ho(e,n);else{if(i=e.current.alternate,!(n&30)&&!jY(i)&&(t=$y(e,n),t===2&&(s=RS(e),s!==0&&(n=s,t=oj(e,s))),t===1))throw r=kp,nc(e,0),ho(e,n),Tn(e,ur()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(ce(345));case 2:Nl(e,En,oa);break;case 3:if(ho(e,n),(n&130023424)===n&&(t=GN+500-ur(),10<t)){if(gy(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){pn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=zS(Nl.bind(null,e,En,oa),t);break}Nl(e,En,oa);break;case 4:if(ho(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var a=31-is(n);s=1<<a,a=t[a],a>i&&(i=a),n&=~s}if(n=i,n=ur()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*SY(n/1960))-n,10<n){e.timeoutHandle=zS(Nl.bind(null,e,En,oa),n);break}Nl(e,En,oa);break;case 5:Nl(e,En,oa);break;default:throw Error(ce(329))}}}return Tn(e,ur()),e.callbackNode===r?e3.bind(null,e):null}function oj(e,t){var r=Jh;return e.current.memoizedState.isDehydrated&&(nc(e,t).flags|=256),e=$y(e,t),e!==2&&(t=En,En=r,t!==null&&lj(t)),e}function lj(e){En===null?En=e:En.push.apply(En,e)}function jY(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],s=i.getSnapshot;i=i.value;try{if(!cs(s(),i))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ho(e,t){for(t&=~KN,t&=~I0,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-is(t),n=1<<r;e[r]=-1,t&=~n}}function fT(e){if(gt&6)throw Error(ce(327));qu();var t=gy(e,0);if(!(t&1))return Tn(e,ur()),null;var r=$y(e,t);if(e.tag!==0&&r===2){var n=RS(e);n!==0&&(t=n,r=oj(e,n))}if(r===1)throw r=kp,nc(e,0),ho(e,t),Tn(e,ur()),r;if(r===6)throw Error(ce(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Nl(e,En,oa),Tn(e,ur()),null}function YN(e,t){var r=gt;gt|=1;try{return e(t)}finally{gt=r,gt===0&&(jd=ur()+500,T0&&il())}}function gc(e){Ao!==null&&Ao.tag===0&&!(gt&6)&&qu();var t=gt;gt|=1;var r=Si.transition,n=Ot;try{if(Si.transition=null,Ot=1,e)return e()}finally{Ot=n,Si.transition=r,gt=t,!(gt&6)&&il()}}function XN(){Dn=Ru.current,zt(Ru)}function nc(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,JG(r)),yr!==null)for(r=yr.return;r!==null;){var n=r;switch(PN(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&wy();break;case 3:wd(),zt(Cn),zt(Xr),FN();break;case 5:LN(n);break;case 4:wd();break;case 13:zt(Xt);break;case 19:zt(Xt);break;case 10:$N(n.type._context);break;case 22:case 23:XN()}r=r.return}if(Ir=e,yr=e=Bo(e.current,null),Ur=Dn=t,Ar=0,kp=null,KN=I0=mc=0,En=Jh=null,Ml!==null){for(t=0;t<Ml.length;t++)if(r=Ml[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,s=r.pending;if(s!==null){var a=s.next;s.next=i,n.next=a}r.pending=n}Ml=null}return e}function t3(e,t){do{var r=yr;try{if(RN(),qv.current=Py,Cy){for(var n=Qt.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Cy=!1}if(pc=0,Rr=Er=Qt=null,Qh=!1,Cp=0,qN.current=null,r===null||r.return===null){Ar=1,kp=t,yr=null;break}e:{var s=e,a=r.return,o=r,c=t;if(t=Ur,o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=o,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=JP(a);if(p!==null){p.flags&=-257,eT(p,a,o,s,t),p.mode&1&&ZP(s,u,t),t=p,c=u;var g=t.updateQueue;if(g===null){var m=new Set;m.add(c),t.updateQueue=m}else g.add(c);break e}else{if(!(t&1)){ZP(s,u,t),QN();break e}c=Error(ce(426))}}else if(Wt&&o.mode&1){var v=JP(a);if(v!==null){!(v.flags&65536)&&(v.flags|=256),eT(v,a,o,s,t),TN(Sd(c,o));break e}}s=c=Sd(c,o),Ar!==4&&(Ar=2),Jh===null?Jh=[s]:Jh.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=L4(s,c,t);qP(s,y);break e;case 1:o=c;var x=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Lo===null||!Lo.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=F4(s,o,t);qP(s,S);break e}}s=s.return}while(s!==null)}i3(r)}catch(j){t=j,yr===r&&r!==null&&(yr=r=r.return);continue}break}while(!0)}function r3(){var e=Ty.current;return Ty.current=Py,e===null?Py:e}function QN(){(Ar===0||Ar===3||Ar===2)&&(Ar=4),Ir===null||!(mc&268435455)&&!(I0&268435455)||ho(Ir,Ur)}function $y(e,t){var r=gt;gt|=2;var n=r3();(Ir!==e||Ur!==t)&&(oa=null,nc(e,t));do try{_Y();break}catch(i){t3(e,i)}while(!0);if(RN(),gt=r,Ty.current=n,yr!==null)throw Error(ce(261));return Ir=null,Ur=0,Ar}function _Y(){for(;yr!==null;)n3(yr)}function EY(){for(;yr!==null&&!XK();)n3(yr)}function n3(e){var t=a3(e.alternate,e,Dn);e.memoizedProps=e.pendingProps,t===null?i3(e):yr=t,qN.current=null}function i3(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=yY(r,t),r!==null){r.flags&=32767,yr=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ar=6,yr=null;return}}else if(r=vY(r,t,Dn),r!==null){yr=r;return}if(t=t.sibling,t!==null){yr=t;return}yr=t=e}while(t!==null);Ar===0&&(Ar=5)}function Nl(e,t,r){var n=Ot,i=Si.transition;try{Si.transition=null,Ot=1,NY(e,t,r,n)}finally{Si.transition=i,Ot=n}return null}function NY(e,t,r,n){do qu();while(Ao!==null);if(gt&6)throw Error(ce(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(ce(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(aG(e,s),e===Ir&&(yr=Ir=null,Ur=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Kg||(Kg=!0,o3(my,function(){return qu(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=Si.transition,Si.transition=null;var a=Ot;Ot=1;var o=gt;gt|=4,qN.current=null,bY(e,r),Z4(r,e),qG(FS),vy=!!LS,FS=LS=null,e.current=r,wY(r),QK(),gt=o,Ot=a,Si.transition=s}else e.current=r;if(Kg&&(Kg=!1,Ao=e,Ry=i),s=e.pendingLanes,s===0&&(Lo=null),eG(r.stateNode),Tn(e,ur()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(ky)throw ky=!1,e=sj,sj=null,e;return Ry&1&&e.tag!==0&&qu(),s=e.pendingLanes,s&1?e===aj?ep++:(ep=0,aj=e):ep=0,il(),null}function qu(){if(Ao!==null){var e=LL(Ry),t=Si.transition,r=Ot;try{if(Si.transition=null,Ot=16>e?16:e,Ao===null)var n=!1;else{if(e=Ao,Ao=null,Ry=0,gt&6)throw Error(ce(331));var i=gt;for(gt|=4,Ne=e.current;Ne!==null;){var s=Ne,a=s.child;if(Ne.flags&16){var o=s.deletions;if(o!==null){for(var c=0;c<o.length;c++){var u=o[c];for(Ne=u;Ne!==null;){var d=Ne;switch(d.tag){case 0:case 11:case 15:Zh(8,d,s)}var f=d.child;if(f!==null)f.return=d,Ne=f;else for(;Ne!==null;){d=Ne;var h=d.sibling,p=d.return;if(Y4(d),d===u){Ne=null;break}if(h!==null){h.return=p,Ne=h;break}Ne=p}}}var g=s.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(m!==null)}}Ne=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,Ne=a;else e:for(;Ne!==null;){if(s=Ne,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Zh(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,Ne=y;break e}Ne=s.return}}var x=e.current;for(Ne=x;Ne!==null;){a=Ne;var w=a.child;if(a.subtreeFlags&2064&&w!==null)w.return=a,Ne=w;else e:for(a=x;Ne!==null;){if(o=Ne,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:$0(9,o)}}catch(j){ir(o,o.return,j)}if(o===a){Ne=null;break e}var S=o.sibling;if(S!==null){S.return=o.return,Ne=S;break e}Ne=o.return}}if(gt=i,il(),Is&&typeof Is.onPostCommitFiberRoot=="function")try{Is.onPostCommitFiberRoot(N0,e)}catch{}n=!0}return n}finally{Ot=r,Si.transition=t}}return!1}function hT(e,t,r){t=Sd(r,t),t=L4(e,t,1),e=Do(e,t,1),t=pn(),e!==null&&(Vm(e,1,t),Tn(e,t))}function ir(e,t,r){if(e.tag===3)hT(e,e,r);else for(;t!==null;){if(t.tag===3){hT(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Lo===null||!Lo.has(n))){e=Sd(r,e),e=F4(t,e,1),t=Do(t,e,1),e=pn(),t!==null&&(Vm(t,1,e),Tn(t,e));break}}t=t.return}}function OY(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=pn(),e.pingedLanes|=e.suspendedLanes&r,Ir===e&&(Ur&r)===r&&(Ar===4||Ar===3&&(Ur&130023424)===Ur&&500>ur()-GN?nc(e,0):KN|=r),Tn(e,t)}function s3(e,t){t===0&&(e.mode&1?(t=Dg,Dg<<=1,!(Dg&130023424)&&(Dg=4194304)):t=1);var r=pn();e=Ta(e,t),e!==null&&(Vm(e,t,r),Tn(e,r))}function AY(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),s3(e,r)}function CY(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ce(314))}n!==null&&n.delete(t),s3(e,r)}var a3;a3=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Cn.current)Nn=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Nn=!1,gY(e,t,r);Nn=!!(e.flags&131072)}else Nn=!1,Wt&&t.flags&1048576&&u4(t,_y,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Gv(e,t),e=t.pendingProps;var i=yd(t,Xr.current);Hu(t,r),i=zN(null,t,n,e,i,r);var s=UN();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pn(n)?(s=!0,Sy(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,MN(t),i.updater=R0,t.stateNode=i,i._reactInternals=t,GS(t,n,e,r),t=QS(null,t,n,!0,s,r)):(t.tag=0,Wt&&s&&CN(t),sn(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Gv(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=TY(n),e=Bi(n,e),i){case 0:t=XS(null,t,n,e,r);break e;case 1:t=nT(null,t,n,e,r);break e;case 11:t=tT(null,t,n,e,r);break e;case 14:t=rT(null,t,n,Bi(n.type,e),r);break e}throw Error(ce(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Bi(n,i),XS(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Bi(n,i),nT(e,t,n,i,r);case 3:e:{if(V4(t),e===null)throw Error(ce(387));n=t.pendingProps,s=t.memoizedState,i=s.element,g4(e,t),Oy(t,n,null,r);var a=t.memoizedState;if(n=a.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Sd(Error(ce(423)),t),t=iT(e,t,n,r,i);break e}else if(n!==i){i=Sd(Error(ce(424)),t),t=iT(e,t,n,r,i);break e}else for(qn=Mo(t.stateNode.containerInfo.firstChild),Kn=t,Wt=!0,Gi=null,r=p4(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(xd(),n===i){t=ka(e,t,r);break e}sn(e,t,n,r)}t=t.child}return t;case 5:return v4(t),e===null&&HS(t),n=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,BS(n,i)?a=null:s!==null&&BS(n,s)&&(t.flags|=32),U4(e,t),sn(e,t,a,r),t.child;case 6:return e===null&&HS(t),null;case 13:return W4(e,t,r);case 4:return DN(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=bd(t,null,n,r):sn(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Bi(n,i),tT(e,t,n,i,r);case 7:return sn(e,t,t.pendingProps,r),t.child;case 8:return sn(e,t,t.pendingProps.children,r),t.child;case 12:return sn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,It(Ey,n._currentValue),n._currentValue=a,s!==null)if(cs(s.value,a)){if(s.children===i.children&&!Cn.current){t=ka(e,t,r);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var o=s.dependencies;if(o!==null){a=s.child;for(var c=o.firstContext;c!==null;){if(c.context===n){if(s.tag===1){c=Ea(-1,r&-r),c.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}s.lanes|=r,c=s.alternate,c!==null&&(c.lanes|=r),qS(s.return,r,t),o.lanes|=r;break}c=c.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(ce(341));a.lanes|=r,o=a.alternate,o!==null&&(o.lanes|=r),qS(a,r,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}sn(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Hu(t,r),i=Ei(i),n=n(i),t.flags|=1,sn(e,t,n,r),t.child;case 14:return n=t.type,i=Bi(n,t.pendingProps),i=Bi(n.type,i),rT(e,t,n,i,r);case 15:return B4(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Bi(n,i),Gv(e,t),t.tag=1,Pn(n)?(e=!0,Sy(t)):e=!1,Hu(t,r),D4(t,n,i),GS(t,n,i,r),QS(null,t,n,!0,e,r);case 19:return H4(e,t,r);case 22:return z4(e,t,r)}throw Error(ce(156,t.tag))};function o3(e,t){return $L(e,t)}function PY(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 11,477 bytes, lines 40-48
40ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yi(e,t,r,n){return new PY(e,t,r,n)}function ZN(e){return e=e.prototype,!(!e||!e.isReactComponent)}function TY(e){if(typeof e=="function")return ZN(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vN)return 11;if(e===yN)return 14}return 2}function Bo(e,t){var r=e.alternate;return r===null?(r=yi(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Qv(e,t,r,n,i,s){var a=2;if(n=e,typeof e=="function")ZN(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ju:return ic(r.children,i,s,t);case gN:a=8,i|=8;break;case yS:return e=yi(12,r,t,i|2),e.elementType=yS,e.lanes=s,e;case xS:return e=yi(13,r,t,i),e.elementType=xS,e.lanes=s,e;case bS:return e=yi(19,r,t,i),e.elementType=bS,e.lanes=s,e;case vL:return M0(r,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mL:a=10;break e;case gL:a=9;break e;case vN:a=11;break e;case yN:a=14;break e;case so:a=16,n=null;break e}throw Error(ce(130,e==null?e:typeof e,""))}return t=yi(a,r,t,i),t.elementType=e,t.type=n,t.lanes=s,t}function ic(e,t,r,n){return e=yi(7,e,n,t),e.lanes=r,e}function M0(e,t,r,n){return e=yi(22,e,n,t),e.elementType=vL,e.lanes=r,e.stateNode={isHidden:!1},e}function r1(e,t,r){return e=yi(6,e,null,t),e.lanes=r,e}function n1(e,t,r){return t=yi(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function kY(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Dw(0),this.expirationTimes=Dw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dw(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function JN(e,t,r,n,i,s,a,o,c){return e=new kY(e,t,r,o,c),t===1?(t=1,s===!0&&(t|=8)):t=0,s=yi(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},MN(s),e}function RY(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Su,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function l3(e){if(!e)return Go;e=e._reactInternals;e:{if(Bc(e)!==e||e.tag!==1)throw Error(ce(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ce(171))}if(e.tag===1){var r=e.type;if(Pn(r))return l4(e,r,t)}return t}function c3(e,t,r,n,i,s,a,o,c){return e=JN(r,n,!0,e,i,s,a,o,c),e.context=l3(null),r=e.current,n=pn(),i=Fo(r),s=Ea(n,i),s.callback=t??null,Do(r,s,i),e.current.lanes=i,Vm(e,i,n),Tn(e,n),e}function D0(e,t,r,n){var i=t.current,s=pn(),a=Fo(i);return r=l3(r),t.context===null?t.context=r:t.pendingContext=r,t=Ea(s,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Do(i,t,a),e!==null&&(ss(e,i,a,s),Hv(e,i,a)),a}function Iy(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function pT(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function eO(e,t){pT(e,t),(e=e.alternate)&&pT(e,t)}function $Y(){return null}var u3=typeof reportError=="function"?reportError:function(e){console.error(e)};function tO(e){this._internalRoot=e}L0.prototype.render=tO.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ce(409));D0(e,t,null,null)};L0.prototype.unmount=tO.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gc(function(){D0(null,e,null,null)}),t[Pa]=null}};function L0(e){this._internalRoot=e}L0.prototype.unstable_scheduleHydration=function(e){if(e){var t=zL();e={blockedOn:null,target:e,priority:t};for(var r=0;r<fo.length&&t!==0&&t<fo[r].priority;r++);fo.splice(r,0,e),r===0&&VL(e)}};function rO(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function F0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function mT(){}function IY(e,t,r,n,i){if(i){if(typeof n=="function"){var s=n;n=function(){var u=Iy(a);s.call(u)}}var a=c3(t,n,e,0,null,!1,!1,"",mT);return e._reactRootContainer=a,e[Pa]=a.current,_p(e.nodeType===8?e.parentNode:e),gc(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var o=n;n=function(){var u=Iy(c);o.call(u)}}var c=JN(e,0,!1,null,null,!1,!1,"",mT);return e._reactRootContainer=c,e[Pa]=c.current,_p(e.nodeType===8?e.parentNode:e),gc(function(){D0(t,c,r,n)}),c}function B0(e,t,r,n,i){var s=r._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var o=i;i=function(){var c=Iy(a);o.call(c)}}D0(t,a,e,i)}else a=IY(r,t,e,i,n);return Iy(a)}FL=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=$h(t.pendingLanes);r!==0&&(wN(t,r|1),Tn(t,ur()),!(gt&6)&&(jd=ur()+500,il()))}break;case 13:gc(function(){var n=Ta(e,1);if(n!==null){var i=pn();ss(n,e,1,i)}}),eO(e,1)}};SN=function(e){if(e.tag===13){var t=Ta(e,134217728);if(t!==null){var r=pn();ss(t,e,134217728,r)}eO(e,134217728)}};BL=function(e){if(e.tag===13){var t=Fo(e),r=Ta(e,t);if(r!==null){var n=pn();ss(r,e,t,n)}eO(e,t)}};zL=function(){return Ot};UL=function(e,t){var r=Ot;try{return Ot=e,t()}finally{Ot=r}};PS=function(e,t,r){switch(t){case"input":if(jS(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=P0(n);if(!i)throw Error(ce(90));xL(n),jS(n,i)}}}break;case"textarea":wL(e,r);break;case"select":t=r.value,t!=null&&zu(e,!!r.multiple,t,!1)}};AL=YN;CL=gc;var MY={usingClientEntryPoint:!1,Events:[Hm,Ou,P0,NL,OL,YN]},sh={findFiberByHostInstance:Il,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},DY={bundleType:sh.bundleType,version:sh.version,rendererPackageName:sh.rendererPackageName,rendererConfig:sh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=kL(e),e===null?null:e.stateNode},findFiberByHostInstance:sh.findFiberByHostInstance||$Y,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 Gg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gg.isDisabled&&Gg.supportsFiber)try{N0=Gg.inject(DY),Is=Gg}catch{}}ni.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MY;ni.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rO(t))throw Error(ce(200));return RY(e,t,null,r)};ni.createRoot=function(e,t){if(!rO(e))throw Error(ce(299));var r=!1,n="",i=u3;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=JN(e,1,!1,null,null,r,!1,n,i),e[Pa]=t.current,_p(e.nodeType===8?e.parentNode:e),new tO(t)};ni.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ce(188)):(e=Object.keys(e).join(","),Error(ce(268,e)));return e=kL(t),e=e===null?null:e.stateNode,e};ni.flushSync=function(e){return gc(e)};ni.hydrate=function(e,t,r){if(!F0(t))throw Error(ce(200));return B0(null,e,t,!0,r)};ni.hydrateRoot=function(e,t,r){if(!rO(e))throw Error(ce(405));var n=r!=null&&r.hydratedSources||null,i=!1,s="",a=u3;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=c3(t,null,e,1,r??null,i,!1,s,a),e[Pa]=t.current,_p(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new L0(t)};ni.render=function(e,t,r){if(!F0(t))throw Error(ce(200));return B0(null,e,t,!1,r)};ni.unmountComponentAtNode=function(e){if(!F0(e))throw Error(ce(40));return e._reactRootContainer?(gc(function(){B0(null,null,e,!1,function(){e._reactRootContainer=null,e[Pa]=null})}),!0):!1};ni.unstable_batchedUpdates=YN;ni.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!F0(r))throw Error(ce(200));if(e==null||e._reactInternals===void 0)throw Error(ce(38));return B0(e,t,r,!1,n)};ni.version="18.3.1-next-f1338f8080-20240426";function d3(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d3)}catch(e){console.error(e)}}d3(),dL.exports=ni;var as=dL.exports;const tp=pt(as);var f3,gT=as;f3=gT.createRoot,gT.hydrateRoot;function LY(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var r,n,i,s,a=[],o="",c=e.split("/");for(c[0]||c.shift();i=c.shift();)r=i[0],r==="*"?(a.push(r),o+=i[1]==="?"?"(?:/(.*))?":"/(.*)"):r===":"?(n=i.indexOf("?",1),s=i.indexOf(".",1),a.push(i.substring(1,~n?n:~s?s:i.length)),o+=~n&&!~s?"(?:/([^/]+?))?":"/([^/]+?)",~s&&(o+=(~n?"?":"")+"\\"+i.substring(s))):o+="/"+i;return{keys:a,pattern:new RegExp("^"+o+(t?"(?=$|/)":"/?$"),"i")}}var h3={exports:{}},p3={};/**
41 * @license React
42 * use-sync-external-store-shim.production.js
43 *
44 * Copyright (c) Meta Platforms, Inc. and affiliates.
45 *
46 * This source code is licensed under the MIT license found in the
47 * LICENSE file in the root directory of this source tree.
48 */var _d=b;function FY(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var BY=typeof Object.is=="function"?Object.is:FY,zY=_d.useState,UY=_d.useEffect,VY=_d.useLayoutEffect,WY=_d.useDebugValue;function HY(e,t){var r=t(),n=zY({inst:{value:r,getSnapshot:t}}),i=n[0].inst,s=n[1];return VY(function(){i.value=r,i.getSnapshot=t,i1(i)&&s({inst:i})},[e,r,t]),UY(function(){return i1(i)&&s({inst:i}),e(function(){i1(i)&&s({inst:i})})},[e]),WY(r),r}function i1(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!BY(e,r)}catch{return!0}}function qY(e,t){return t()}var KY=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?qY:HY;p3.useSyncExternalStore=_d.useSyncExternalStore!==void 0?_d.useSyncExternalStore:KY;h3.exports=p3;
48var nO=h3.exports;const GY=fN.useInsertionEffect,YY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",XY=YY?b.useLayoutEffect:b.useEffect,QY=GY||XY,m3=e=>{const t=b.useRef([e,(...r)=>t[0](...r)]).current;return QY(()=>{t[0]=e}),t[1]},ZY="popstate",iO="pushState",sO="replaceState",JY="hashchange",vT=[ZY,iO,sO,JY],eX=e=>{for(const t of vT)addEventListener(t,e);return()=>{for(const t of vT)removeEventListener(t,e)}},g3=(e,t)=>nO.useSyncExternalStore(eX,e,t),tX=()=>location.search,rX=({ssrSearch:e=""}={})=>g3(tX,()=>e),yT=()=>location.pathname,nX=({ssrPath:e}={})=>g3(yT,e?()=>e:yT),iX=(e,{replace:t=!1,state:r=null}={})=>history[t?sO:iO](r,"",e),sX=(e={})=>[nX(e),iX],xT=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[xT]>"u"){for(const e of[iO,sO]){const t=history[e];history[e]=function(){const r=t.apply(this,arguments),n=new Event(e);return n.arguments=arguments,dispatchEvent(n),r}}Object.defineProperty(window,xT,{value:!0})}const aX=(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())?"~"+t:t.slice(e.length)||"/",v3=(e="")=>e==="/"?"":e,oX=(e,t)=>e[0]==="~"?e.slice(1):v3(t)+e,lX=(e="",t)=>aX(bT(v3(e)),bT(t)),bT=e=>{try{return decodeURI(e)}catch{return e}},y3={hook:sX,searchHook:rX,parser:LY,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e},x3=b.createContext(y3),Km=()=>b.useContext(x3),b3={},w3=b.createContext(b3),cX=()=>b.useContext(w3),z0=e=>{const[t,r]=e.hook(e);return[lX(e.base,t),m3((n,i)=>r(oX(n,e.base),i))]},aO=()=>z0(Km()),S3=(e,t,r,n)=>{const{pattern:i,keys:s}=t instanceof RegExp?{keys:!1,pattern:t}:e(t||"*",n),a=i.exec(r)||[],[o,...c]=a;return o!==void 0?[!0,(()=>{const u=s!==!1?Object.fromEntries(s.map((f,h)=>[f,c[h]])):a.groups;let d={...c};return u&&Object.assign(d,u),d})(),...n?[o]:[]]:[!1,null]},uX=({children:e,...t})=>{var d,f;const r=Km(),n=t.hook?y3:r;let i=n;const[s,a]=((d=t.ssrPath)==null?void 0:d.split("?"))??[];a&&(t.ssrSearch=a,t.ssrPath=s),t.hrefs=t.hrefs??((f=t.hook)==null?void 0:f.hrefs);let o=b.useRef({}),c=o.current,u=c;for(let h in n){const p=h==="base"?n[h]+(t[h]||""):t[h]||n[h];c===u&&p!==u[h]&&(o.current=u={...u}),u[h]=p,(p!==n[h]||p!==i[h])&&(i=u)}return b.createElement(x3.Provider,{value:i,children:e})},wT=({children:e,component:t},r)=>t?b.createElement(t,{params:r}):typeof e=="function"?e(r):e,dX=e=>{let t=b.useRef(b3);const r=t.current;return t.current=Object.keys(e).length!==Object.keys(r).length||Object.entries(e).some(([n,i])=>i!==r[n])?e:r},Lr=({path:e,nest:t,match:r,...n})=>{const i=Km(),[s]=z0(i),[a,o,c]=r??S3(i.parser,e,s,t),u=dX({...cX(),...o});if(!a)return null;const d=c?b.createElement(uX,{base:c},wT(n,u)):wT(n,u);return b.createElement(w3.Provider,{value:u,children:d})},zc=b.forwardRef((e,t)=>{const r=Km(),[n,i]=z0(r),{to:s="",href:a=s,onClick:o,asChild:c,children:u,className:d,replace:f,state:h,...p}=e,g=m3(v=>{v.ctrlKey||v.metaKey||v.altKey||v.shiftKey||v.button!==0||(o==null||o(v),v.defaultPrevented||(v.preventDefault(),i(a,e)))}),m=r.hrefs(a[0]==="~"?a.slice(1):r.base+a,r);return c&&b.isValidElement(u)?b.cloneElement(u,{onClick:g,href:m}):b.createElement("a",{...p,onClick:g,href:m,className:d!=null&&d.call?d(n===a):d,children:u,ref:t})}),j3=e=>Array.isArray(e)?e.flatMap(t=>j3(t&&t.type===b.Fragment?t.props.children:t)):[e],fX=({children:e,location:t})=>{const r=Km(),[n]=z0(r);for(const i of j3(e)){let s=0;if(b.isValidElement(i)&&(s=S3(r.parser,i.props.path,t||n,i.props.nest))[0])return b.cloneElement(i,{match:s})}return null};var xf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},hX={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},yo,oN,zD,pX=(zD=class{constructor(){Be(this,yo,hX);Be(this,oN,!1)}setTimeoutProvider(e){be(this,yo,e)}setTimeout(e,t){return z(this,yo).setTimeout(e,t)}clearTimeout(e){z(this,yo).clearTimeout(e)}setInterval(e,t){return z(this,yo).setInterval(e,t)}clearInterval(e){z(this,yo).clearInterval(e)}},yo=new WeakMap,oN=new WeakMap,zD),Ll=new pX;function mX(e){setTimeout(e,0)}var vc=typeof window>"u"||"Deno"in globalThis;function an(){}function gX(e,t){return typeof e=="function"?e(t):e}function cj(e){return typeof e=="number"&&e>=0&&e!==1/0}function _3(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zo(e,t){return typeof e=="function"?e(t):e}function hi(e,t){return typeof e=="function"?e(t):e}function ST(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:a,stale:o}=e;if(a){if(n){if(t.queryHash!==oO(a,t.options))return!1}else if(!Rp(t.queryKey,a))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||s&&!s(t))}function jT(e,t){const{exact:r,status:n,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(r){if(yc(t.options.mutationKey)!==yc(s))return!1}else if(!Rp(t.options.mutationKey,s))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function oO(e,t){return((t==null?void 0:t.queryKeyHashFn)||yc)(e)}function yc(e){return JSON.stringify(e,(t,r)=>uj(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Rp(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Rp(e[r],t[r])):!1}var vX=Object.prototype.hasOwnProperty;function E3(e,t){if(e===t)return e;const r=_T(e)&&_T(t);if(!r&&!(uj(e)&&uj(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),a=s.length,o=r?new Array(a):{};let c=0;for(let u=0;u<a;u++){const d=r?u:s[u],f=e[d],h=t[d];if(f===h){o[d]=f,(r?u<i:vX.call(e,d))&&c++;continue}if(f===null||h===null||typeof f!="object"||typeof h!="object"){o[d]=h;continue}const p=E3(f,h);o[d]=p,p===f&&c++}return i===a&&c===i?e:o}function My(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function _T(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function uj(e){if(!ET(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!ET(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ET(e){return Object.prototype.toString.call(e)==="[object Object]"}function yX(e){return new Promise(t=>{Ll.setTimeout(t,e)})}function dj(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?E3(e,t):t}function xX(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function bX(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var lO=Symbol();function N3(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===lO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function O3(e,t){return typeof e=="function"?e(...t):!!e}var Gl,xo,sd,UD,wX=(UD=class extends xf{constructor(){super();Be(this,Gl);Be(this,xo);Be(this,sd);be(this,sd,t=>{if(!vc&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){z(this,xo)||this.setEventListener(z(this,sd))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,xo))==null||t.call(this),be(this,xo,void 0))}setEventListener(t){var r;be(this,sd,t),(r=z(this,xo))==null||r.call(this),be(this,xo,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){z(this,Gl)!==t&&(be(this,Gl,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 5,006 bytes, line 48
48this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof z(this,Gl)=="boolean"?z(this,Gl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Gl=new WeakMap,xo=new WeakMap,sd=new WeakMap,UD),cO=new wX;function fj(){let e,t;const r=new Promise((i,s)=>{e=i,t=s});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var SX=mX;function jX(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=SX;const s=o=>{t?e.push(o):i(()=>{r(o)})},a=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(c=>{r(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||a()}return c},batchCalls:o=>(...c)=>{s(()=>{o(...c)})},schedule:s,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Nr=jX(),ad,bo,od,VD,_X=(VD=class extends xf{constructor(){super();Be(this,ad,!0);Be(this,bo);Be(this,od);be(this,od,t=>{if(!vc&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){z(this,bo)||this.setEventListener(z(this,od))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,bo))==null||t.call(this),be(this,bo,void 0))}setEventListener(t){var r;be(this,od,t),(r=z(this,bo))==null||r.call(this),be(this,bo,t(this.setOnline.bind(this)))}setOnline(t){z(this,ad)!==t&&(be(this,ad,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return z(this,ad)}},ad=new WeakMap,bo=new WeakMap,od=new WeakMap,VD),Dy=new _X;function EX(e){return Math.min(1e3*2**e,3e4)}function A3(e){return(e??"online")==="online"?Dy.isOnline():!0}var hj=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function C3(e){let t=!1,r=0,n;const i=fj(),s=()=>i.status!=="pending",a=m=>{var v;if(!s()){const y=new hj(m);h(y),(v=e.onCancel)==null||v.call(e,y)}},o=()=>{t=!0},c=()=>{t=!1},u=()=>cO.isFocused()&&(e.networkMode==="always"||Dy.isOnline())&&e.canRun(),d=()=>A3(e.networkMode)&&e.canRun(),f=m=>{s()||(n==null||n(),i.resolve(m))},h=m=>{s()||(n==null||n(),i.reject(m))},p=()=>new Promise(m=>{var v;n=y=>{(s()||u())&&m(y)},(v=e.onPause)==null||v.call(e)}).then(()=>{var m;n=void 0,s()||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(s())return;let m;const v=r===0?e.initialPromise:void 0;try{m=v??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(f).catch(y=>{var E;if(s())return;const x=e.retry??(vc?0:3),w=e.retryDelay??EX,S=typeof w=="function"?w(r,y):w,j=x===!0||typeof x=="number"&&r<x||typeof x=="function"&&x(r,y);if(t||!j){h(y);return}r++,(E=e.onFail)==null||E.call(e,r,y),yX(S).then(()=>u()?void 0:p()).then(()=>{t?h(y):g()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(n==null||n(),i),cancelRetry:o,continueRetry:c,canStart:d,start:()=>(d()?g():p().then(g),i)}}var Yl,WD,P3=(WD=class{constructor(){Be(this,Yl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cj(this.gcTime)&&be(this,Yl,Ll.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vc?1/0:5*60*1e3))}clearGcTimeout(){z(this,Yl)&&(Ll.clearTimeout(z(this,Yl)),be(this,Yl,void 0))}},Yl=new WeakMap,WD),Xl,ld,fi,Ql,Tr,Dm,Zl,Ui,sa,HD,NX=(HD=class extends P3{constructor(t){super();Be(this,Ui);Be(this,Xl);Be(this,ld);Be(this,fi);Be(this,Ql);Be(this,Tr);Be(this,Dm);Be(this,Zl);be(this,Zl,!1),be(this,Dm,t.defaultOptions),this.setOptions(t.options),this.observers=[],be(this,Ql,t.client),be(this,fi,z(this,Ql).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,be(this,Xl,OT(this.options)),this.state=t.state??z(this,Xl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,Tr))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,Dm),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=OT(this.options);r.data!==void 0&&(this.setState(NT(r.data,r.dataUpdatedAt)),be(this,Xl,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,fi).remove(this)}setData(t,r){const n=dj(this.state.data,t,this.options);return at(this,Ui,sa).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){at(this,Ui,sa).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=z(this,Tr))==null?void 0:n.promise;return(i=z(this,Tr))==null||i.cancel(t),r?r.then(an).catch(an):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(z(this,Xl))}isActive(){return this.observers.some(t=>hi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===lO||this.state.dataUpdateCount+this.state.errorUpdate
48Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>zo(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!_3(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,Tr))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,Tr))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,fi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(z(this,Tr)&&(z(this,Zl)?z(this,Tr).cancel({revert:!0}):z(this,Tr).cancelRetry()),this.scheduleGc()),z(this,fi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||at(this,Ui,sa).call(this,{type:"invalidate"})}async fetch(t,r){var c,u,d,f,h,p,g,m,v,y,x,w;if(this.state.fetchStatus!=="idle"&&((c=z(this,Tr))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(z(this,Tr))return z(this,Tr).continueRetry(),z(this,Tr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(j=>j.options.queryFn);S&&this.setOptions(S.options)}const n=new AbortController,i=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(be(this,Zl,!0),n.signal)})},s=()=>{const S=N3(this.options,r),E=(()=>{const _={client:z(this,Ql),queryKey:this.queryKey,meta:this.meta};return i(_),_})();return be(this,Zl,!1),this.options.persister?this.options.persister(S,E,this):S(E)},o=(()=>{const S={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:z(this,Ql),state:this.state,fetchFn:s};return i(S),S})();(u=this.options.behavior)==null||u.onFetch(o,this),be(this,ld,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=o.fetchOptions)==null?void 0:d.meta))&&at(this,Ui,sa).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta}),be(this,Tr,C3({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:S=>{S instanceof hj&&S.revert&&this.setState({...z(this,ld),fetchStatus:"idle"}),n.abort()},onFail:(S,j)=>{at(this,Ui,sa).call(this,{type:"failed",failureCount:S,error:j})},onPause:()=>{at(this,Ui,sa).call(this,{type:"pause"})},onContinue:()=>{at(this,Ui,sa).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const S=await z(this,Tr).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(p=(h=z(this,fi).config).onSuccess)==null||p.call(h,S,this),(m=(g=z(this,fi).config).onSettled)==null||m.call(g,S,this.state.error,this),S}catch(S){if(S instanceof hj){if(S.silent)return z(this,Tr).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw at(this,Ui,sa).call(this,{type:"error",error:S}),(y=(v=z(this,fi).config).onError)==null||y.call(v,S,this),(w=(x=z(this,fi).config).onSettled)==null||w.call(x,this.state.data,S,this),S}finally{this.scheduleGc()}}},Xl=new WeakMap,ld=new WeakMap,fi=new WeakMap,Ql=new WeakMap,Tr=new WeakMap,Dm=new WeakMap,Zl=new WeakMap,Ui=new WeakSet,sa=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...T3(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...NT(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return be(this,ld,t.manual?i:void 0),i;case"error":const s=t.error;
vendor: 4,219 bytes, line 48
48return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Nr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),z(this,fi).notify({query:this,type:"updated",action:t})})},HD);function T3(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:A3(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function NT(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function OT(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var wn,ht,Lm,tn,Jl,cd,pa,wo,Fm,ud,dd,ec,tc,So,fd,Et,Mh,pj,mj,gj,vj,yj,xj,bj,k3,qD,OX=(qD=class extends xf{constructor(t,r){super();Be(this,Et);Be(this,wn);Be(this,ht);Be(this,Lm);Be(this,tn);Be(this,Jl);Be(this,cd);Be(this,pa);Be(this,wo);Be(this,Fm);Be(this,ud);Be(this,dd);Be(this,ec);Be(this,tc);Be(this,So);Be(this,fd,new Set);this.options=r,be(this,wn,t),be(this,wo,null),be(this,pa,fj()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,ht).addObserver(this),AT(z(this,ht),this.options)?at(this,Et,Mh).call(this):this.updateResult(),at(this,Et,vj).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wj(z(this,ht),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wj(z(this,ht),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,at(this,Et,yj).call(this),at(this,Et,xj).call(this),z(this,ht).removeObserver(this)}setOptions(t){const r=this.options,n=z(this,ht);if(this.options=z(this,wn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof hi(this.options.enabled,z(this,ht))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");at(this,Et,bj).call(this),z(this,ht).setOptions(this.options),r._defaulted&&!My(this.options,r)&&z(this,wn).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,ht),observer:this});const i=this.hasListeners();i&&CT(z(this,ht),n,this.options,r)&&at(this,Et,Mh).call(this),this.updateResult(),i&&(z(this,ht)!==n||hi(this.options.enabled,z(this,ht))!==hi(r.enabled,z(this,ht))||zo(this.options.staleTime,z(this,ht))!==zo(r.staleTime,z(this,ht)))&&at(this,Et,pj).call(this);const s=at(this,Et,mj).call(this);i&&(z(this,ht)!==n||hi(this.options.enabled,z(this,ht))!==hi(r.enabled,z(this,ht))||s!==z(this,So))&&at(this,Et,gj).call(this,s)}getOptimisticResult(t){const r=z(this,wn).getQueryCache().build(z(this,wn),t),n=this.createResult(r,t);return CX(this,n)&&(be(this,tn,n),be(this,cd,this.options),be(this,Jl,z(this,ht).state)),n}getCurrentResult(){return z(this,tn)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,pa).status==="pending"&&z(this,pa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){z(this,fd).add(t)}getCurrentQuery(){return z(this,ht)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=z(this,wn).defaultQueryOptions(t),n=z(this,wn).getQueryCache().build(z(this,wn),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return at(this,Et,Mh).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,tn)))}createResult(t,r){var O;const n=z(this,ht),i=this.options,s=z(this,tn),a=z(this,Jl),o=z(this,cd),u=t!==n?t.state:z(this,Lm),{state:d}=t;let f={...d},h=!1,p;
vendor: 2,253 bytes, line 48
48if(r._optimisticResults){const C=this.hasListeners(),k=!C&&AT(t,r),$=C&&CT(t,n,r,i);(k||$)&&(f={...f,...T3(d.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:v}=f;p=f.data;let y=!1;if(r.placeholderData!==void 0&&p===void 0&&v==="pending"){let C;s!=null&&s.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(C=s.data,y=!0):C=typeof r.placeholderData=="function"?r.placeholderData((O=z(this,dd))==null?void 0:O.state.data,z(this,dd)):r.placeholderData,C!==void 0&&(v="success",p=dj(s==null?void 0:s.data,C,r),h=!0)}if(r.select&&p!==void 0&&!y)if(s&&p===(a==null?void 0:a.data)&&r.select===z(this,Fm))p=z(this,ud);else try{be(this,Fm,r.select),p=r.select(p),p=dj(s==null?void 0:s.data,p,r),be(this,ud,p),be(this,wo,null)}catch(C){be(this,wo,C)}z(this,wo)&&(g=z(this,wo),p=z(this,ud),m=Date.now(),v="error");const x=f.fetchStatus==="fetching",w=v==="pending",S=v==="error",j=w&&x,E=p!==void 0,N={status:v,fetchStatus:f.fetchStatus,isPending:w,isSuccess:v==="success",isError:S,isInitialLoading:j,isLoading:j,data:p,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!w,isLoadingError:S&&!E,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:S&&E,isStale:uO(t,r),refetch:this.refetch,promise:z(this,pa),isEnabled:hi(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const C=D=>{N.status==="error"?D.reject(N.error):N.data!==void 0&&D.resolve(N.data)},k=()=>{const D=be(this,pa,N.promise=fj());C(D)},$=z(this,pa);switch($.status){case"pending":t.queryHash===n.queryHash&&C($);break;case"fulfilled":(N.status==="error"||N.data!==$.value)&&k();break;case"rejected":(N.status!=="error"||N.error!==$.reason)&&k();break}}return N}updateResult(){const t=z(this,tn),r=this.createResult(z(this,ht),this.options);if(be(this,Jl,z(this,ht).state),be(this,cd,this.options),z(this,Jl).data!==void 0&&be(this,dd,z(this,ht)),My(r,t))return;be(this,tn,r);const n=()=>
vendor: 5,728 bytes, line 48
48{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!z(this,fd).size)return!0;const a=new Set(s??z(this,fd));return this.options.throwOnError&&a.add("error"),Object.keys(z(this,tn)).some(o=>{const c=o;return z(this,tn)[c]!==t[c]&&a.has(c)})};at(this,Et,k3).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&at(this,Et,vj).call(this)}},wn=new WeakMap,ht=new WeakMap,Lm=new WeakMap,tn=new WeakMap,Jl=new WeakMap,cd=new WeakMap,pa=new WeakMap,wo=new WeakMap,Fm=new WeakMap,ud=new WeakMap,dd=new WeakMap,ec=new WeakMap,tc=new WeakMap,So=new WeakMap,fd=new WeakMap,Et=new WeakSet,Mh=function(t){at(this,Et,bj).call(this);let r=z(this,ht).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(an)),r},pj=function(){at(this,Et,yj).call(this);const t=zo(this.options.staleTime,z(this,ht));if(vc||z(this,tn).isStale||!cj(t))return;const n=_3(z(this,tn).dataUpdatedAt,t)+1;be(this,ec,Ll.setTimeout(()=>{z(this,tn).isStale||this.updateResult()},n))},mj=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,ht)):this.options.refetchInterval)??!1},gj=function(t){at(this,Et,xj).call(this),be(this,So,t),!(vc||hi(this.options.enabled,z(this,ht))===!1||!cj(z(this,So))||z(this,So)===0)&&be(this,tc,Ll.setInterval(()=>{(this.options.refetchIntervalInBackground||cO.isFocused())&&at(this,Et,Mh).call(this)},z(this,So)))},vj=function(){at(this,Et,pj).call(this),at(this,Et,gj).call(this,at(this,Et,mj).call(this))},yj=function(){z(this,ec)&&(Ll.clearTimeout(z(this,ec)),be(this,ec,void 0))},xj=function(){z(this,tc)&&(Ll.clearInterval(z(this,tc)),be(this,tc,void 0))},bj=function(){const t=z(this,wn).getQueryCache().build(z(this,wn),this.options);if(t===z(this,ht))return;const r=z(this,ht);be(this,ht,t),be(this,Lm,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},k3=function(t){Nr.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(z(this,tn))}),z(this,wn).getQueryCache().notify({query:z(this,ht),type:"observerResultsUpdated"})})},qD);function AX(e,t){return hi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function AT(e,t){return AX(e,t)||e.state.data!==void 0&&wj(e,t,t.refetchOnMount)}function wj(e,t,r){if(hi(t.enabled,e)!==!1&&zo(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&uO(e,t)}return!1}function CT(e,t,r,n){return(e!==t||hi(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&uO(e,r)}function uO(e,t){return hi(t.enabled,e)!==!1&&e.isStaleByTime(zo(t.staleTime,e))}function CX(e,t){return!My(e.getCurrentResult(),t)}function PT(e){return{onFetch:(t,r)=>{var d,f,h,p,g;const n=t.options,i=(h=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,s=((p=t.state.data)==null?void 0:p.pages)||[],a=((g=t.state.data)==null?void 0:g.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let m=!1;const v=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=N3(t.options,t.fetchOptions),x=async(w,S,j)=>{if(m)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const _=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:S,direction:j?"backward":"forward",meta:t.options.meta};return v(k),k})(),N=await y(_),{maxPages:O}=t.options,C=j?bX:xX;return{pages:C(w.pages,N,O),pageParams:C(w.pageParams,S,O)}};if(i&&s.length){const w=i==="backward",S=w?PX:TT,j={pages:s,pageParams:a},E=S(n,j);o=await x(j,E,w)}else{const w=e??s.length;do{const S=c===0?a[0]??n.initialPageParam:TT(n,o);if(c>0&&S==null)break;o=await x(o,S),c++}while(c<w)}return o};t.options.persister?t.fetchFn=()=>{var m,v;return(v=(m=t.options).persister)==null?void 0:v.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function TT(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function PX(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Bm,_s,rn,rc,Es,ro,KD,TX=(KD=class extends P3{constructor(t){super();Be(this,Es);Be(this,Bm);Be(this,_s);Be(this,rn);Be(this,rc);be(this,Bm,t.client),this.mutationId=t.mutationId,be(this,rn,t.mutationCache),be(this,_s,[]),this.state=t.state||R3(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,_s).includes(t)||(z(this,_s).push(t),this.clearGcTimeout(),z(this,rn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){be(this,_s,z(this,_s).filter(r=>r!==t)),this.scheduleGc(),z(this,rn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,_s).length||(this.state.status==="pending"?this.scheduleGc():z(this,rn).remove(this))}continue(){var t;return((t=z(this,rc))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,c,u,d,f,h,p,g,m,v,y,x,w,S,j,E,_,N,O;const r=()=>{at(this,Es,ro).call(this,{type:"continue"})},n={client:z(this,Bm),meta:this.options.meta,mutationKey:this.options.mutationKey};be(this,rc,C3({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(C,k)=>{at(this,Es,ro).call(this,{type:"failed",failureCount:C,error:k})},onPause:()=>{at(this,Es,ro).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>
48z(this,rn).canRun(this)}));const i=this.state.status==="pending",s=!z(this,rc).canStart();try{if(i)r();else{at(this,Es,ro).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(a=z(this,rn).config).onMutate)==null?void 0:o.call(a,t,this,n));const k=await((u=(c=this.options).onMutate)==null?void 0:u.call(c,t,n));k!==this.state.context&&at(this,Es,ro).call(this,{type:"pending",context:k,variables:t,isPaused:s})}const C=await z(this,rc).start();return await((f=(d=z(this,rn).config).onSuccess)==null?void 0:f.call(d,C,t,this.state.context,this,n)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,C,t,this.state.context,n)),await((m=(g=z(this,rn).config).onSettled)==null?void 0:m.call(g,C,null,this.state.variables,this.state.context,this,n)),await((y=(v=this.options).onSettled)==null?void 0:y.call(v,C,null,t,this.state.context,n)),at(this,Es,ro).call(this,{type:"success",data:C}),C}catch(C){try{throw await((w=(x=z(this,rn).config).onError)==null?void 0:w.call(x,C,t,this.state.context,this,n)),await((j=(S=this.options).onError)==null?void 0:j.call(S,C,t,this.state.context,n)),await((_=(E=z(this,rn).config).onSettled)==null?void 0:_.call(E,void 0,C,this.state.variables,this.state.context,this,n)),await((O=(N=this.options).onSettled)==null?void 0:O.call(N,void 0,C,t,this.state.context,n)),C}finally{at(this,Es,ro).call(this,{type:"error",error:C})}}finally{z(this,rn).runNext(this)}}},Bm=new WeakMap,_s=new WeakMap,rn=new WeakMap,rc=new WeakMap,Es=new WeakSet,ro=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Nr.batch(()=>{z(this,_s).forEach(n=>{n.onMutationUpdate(t)}),z(this,rn).notify({mutation:this,type:"updated",action:t})})},KD);function R3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ma,Vi,zm,GD,kX=(GD=class extends xf{constructor(t={}){super();Be(this,ma);Be(this,Vi);Be(this,zm);this.config=t,be(this,ma,new Set),be(this,Vi,new Map),be(this,zm,0)}build(t,r,n){const i=new TX({client:t,mutationCache:this,mutationId:++Tg(this,zm)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){z(this,ma).add(t);const r=Yg(t);if(typeof r=="string"){const n=z(this,Vi).get(r);n?n.push(t):z(this,Vi).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,ma).delete(t)){const r=Yg(t);if(typeof r=="string"){const n=z(this,Vi).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&z(this,Vi).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Yg(t);if(typeof r=="string"){const n=z(this,Vi).get(r),i=n==null?void 0:n.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Yg(t);if(typeof r=="string"){const i=(n=z(this,Vi).get(r))==null?void 0:n.find(s=>s!==t&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Nr.batch(()=>{z(this,ma).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,ma).clear(),z(this,Vi).clear()})}getAll(){return Array.from(z(this,ma))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>jT(r,n))}findAll(t={}){return this.getAll().filter(r=>jT(t,r))}notify(t){Nr.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 4,987 bytes, line 48
48r.state.isPaused);return Nr.batch(()=>Promise.all(t.map(r=>r.continue().catch(an))))}},ma=new WeakMap,Vi=new WeakMap,zm=new WeakMap,GD);function Yg(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ga,jo,Sn,va,Aa,Zv,Sj,YD,RX=(YD=class extends xf{constructor(r,n){super();Be(this,Aa);Be(this,ga);Be(this,jo);Be(this,Sn);Be(this,va);be(this,ga,r),this.setOptions(n),this.bindMethods(),at(this,Aa,Zv).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var i;const n=this.options;this.options=z(this,ga).defaultMutationOptions(r),My(this.options,n)||z(this,ga).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,Sn),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&yc(n.mutationKey)!==yc(this.options.mutationKey)?this.reset():((i=z(this,Sn))==null?void 0:i.state.status)==="pending"&&z(this,Sn).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=z(this,Sn))==null||r.removeObserver(this)}onMutationUpdate(r){at(this,Aa,Zv).call(this),at(this,Aa,Sj).call(this,r)}getCurrentResult(){return z(this,jo)}reset(){var r;(r=z(this,Sn))==null||r.removeObserver(this),be(this,Sn,void 0),at(this,Aa,Zv).call(this),at(this,Aa,Sj).call(this)}mutate(r,n){var i;return be(this,va,n),(i=z(this,Sn))==null||i.removeObserver(this),be(this,Sn,z(this,ga).getMutationCache().build(z(this,ga),this.options)),z(this,Sn).addObserver(this),z(this,Sn).execute(r)}},ga=new WeakMap,jo=new WeakMap,Sn=new WeakMap,va=new WeakMap,Aa=new WeakSet,Zv=function(){var n;const r=((n=z(this,Sn))==null?void 0:n.state)??R3();be(this,jo,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Sj=function(r){Nr.batch(()=>{var n,i,s,a,o,c,u,d;if(z(this,va)&&this.hasListeners()){const f=z(this,jo).variables,h=z(this,jo).context,p={client:z(this,ga),meta:this.options.meta,mutationKey:this.options.mutationKey};(r==null?void 0:r.type)==="success"?((i=(n=z(this,va)).onSuccess)==null||i.call(n,r.data,f,h,p),(a=(s=z(this,va)).onSettled)==null||a.call(s,r.data,null,f,h,p)):(r==null?void 0:r.type)==="error"&&((c=(o=z(this,va)).onError)==null||c.call(o,r.error,f,h,p),(d=(u=z(this,va)).onSettled)==null||d.call(u,void 0,r.error,f,h,p))}this.listeners.forEach(f=>{f(z(this,jo))})})},YD),Ns,XD,$X=(XD=class extends xf{constructor(t={}){super();Be(this,Ns);this.config=t,be(this,Ns,new Map)}build(t,r,n){const i=r.queryKey,s=r.queryHash??oO(i,r);let a=this.get(s);return a||(a=new NX({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){z(this,Ns).has(t.queryHash)||(z(this,Ns).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=z(this,Ns).get(t.queryHash);r&&(t.destroy(),r===t&&z(this,Ns).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Nr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,Ns).get(t)}getAll(){return[...z(this,Ns).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>ST(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>ST(t,n)):r}notify(t){Nr.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Nr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Nr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ns=new WeakMap,XD),nr,_o,Eo,hd,pd,No,md,gd,QD,IX=(QD=class{constructor(e={}){Be(this,nr);Be(this,_o);Be(this,Eo);Be(this,hd);Be(this,pd);Be(this,No);Be(this,md);Be(this,gd);be(this,nr,e.queryCache||new $X),be(this,_o,e.mutationCache||new kX),be(this,Eo,e.defaultOptions||{}),be(this,hd,new Map),be(this,pd,new Map),be(this,No,0)}mount(){Tg(this,No)._++,z(this,No)===1&&(be(this,md,cO.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,nr).onFocus())})),be(this,gd,Dy.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,nr).onOnline())})))}unmount(){var e,t;Tg(this,No)._--,z(this,No)===0&&((e=z(this,md))==null||e.call(this),be(this,md,void 0),(t=z(this,gd))==null||t.call(this),be(this,gd,void 0))}isFetching(e){return z(this,nr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,_o).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,nr).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=z(this,nr).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(zo(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return z(this,nr).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=z(this,nr).get(n.queryHash),s=i==null?void 0:i.state.data,a=gX(t,s);if(a!==void 0)return z(this,nr).build(this,n).setData(a,{...r,manual:!0})}
48setQueriesData(e,t,r){return Nr.batch(()=>z(this,nr).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,nr).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=z(this,nr);Nr.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=z(this,nr);return Nr.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Nr.batch(()=>z(this,nr).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(an).catch(an)}invalidateQueries(e,t={}){return Nr.batch(()=>(z(this,nr).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Nr.batch(()=>z(this,nr).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,r);return r.throwOnError||(s=s.catch(an)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(n).then(an)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=z(this,nr).build(this,t);return r.isStaleByTime(zo(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(an).catch(an)}fetchInfiniteQuery(e){return e.behavior=PT(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(an).catch(an)}ensureInfiniteQueryData(e){return e.behavior=PT(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Dy.isOnline()?z(this,_o).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,nr)}getMutationCache(){return z(this,_o)}getDefaultOptions(){return z(this,Eo)}setDefaultOptions(e){be(this,Eo,e)}setQueryDefaults(e,t){z(this,hd).set(yc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,hd).values()],r={};return t.forEach(n=>{Rp(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){z(this,pd).set(yc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,pd).values()],r={};return t.forEach(n=>{Rp(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,Eo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=oO(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===lO&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,Eo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,nr).clear(),z(this,_o).clear()}},nr=new WeakMap,_o=new WeakMap,Eo=new WeakMap,hd=new WeakMap,pd=new WeakMap,No=new WeakMap,md=new WeakMap,gd=new WeakMap,QD),$3=b.createContext(void 0),vn=e=>{const t=b.useContext($3);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},MX=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx($3.Provider,{value:e,children:t})),I3=b.createContext(!1),DX=()=>b.useContext(I3);I3.Provider;function LX(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var FX=b.createContext(LX()),BX=()=>b.useContext(FX),zX=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},UX=e=>{b.useEffect(()=>{e.clearReset()},[e])},VX=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||O3(r,[e.error,n])),WX=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},HX=(e,t)=>e.isLoading&&e.isFetching&&!t,qX=(e,t)=>
48(e==null?void 0:e.suspense)&&t.isPending,kT=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function KX(e,t,r){var f,h,p,g,m;const n=DX(),i=BX(),s=vn(),a=s.defaultQueryOptions(e);(h=(f=s.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||h.call(f,a),a._optimisticResults=n?"isRestoring":"optimistic",WX(a),zX(a,i),UX(i);const o=!s.getQueryCache().get(a.queryHash),[c]=b.useState(()=>new t(s,a)),u=c.getOptimisticResult(a),d=!n&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(v=>{const y=d?c.subscribe(Nr.batchCalls(v)):an;return c.updateResult(),y},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),b.useEffect(()=>{c.setOptions(a)},[a,c]),qX(a,u))throw kT(a,c,i);if(VX({result:u,errorResetBoundary:i,throwOnError:a.throwOnError,query:s.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw u.error;if((g=(p=s.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||g.call(p,a,u),a.experimental_prefetchInRender&&!vc&&HX(u,n)){const v=o?kT(a,c,i):(m=s.getQueryCache().get(a.queryHash))==null?void 0:m.promise;v==null||v.catch(an).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?u:c.trackResult(u)}function Ke(e,t){return KX(e,OX)}function fr(e,t){const r=vn(),[n]=b.useState(()=>new RX(r,e));b.useEffect(()=>{n.setOptions(e)},[n,e]);const i=b.useSyncExternalStore(b.useCallback(a=>n.subscribe(Nr.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),s=b.useCallback((a,o)=>{n.mutate(a,o).catch(an)},[n]);if(i.error&&O3(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}var jj=function(e,t){return jj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},jj(e,t)};function M3(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");jj(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var gi=function(){return gi=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];
vendor: 4,098 bytes, line 48
48for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},gi.apply(this,arguments)};function sl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function D3(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function L3(e,t){return function(r,n){t(r,n,e)}}function F3(e,t,r,n,i,s){function a(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var o=n.kind,c=o==="getter"?"get":o==="setter"?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f,h=!1,p=r.length-1;p>=0;p--){var g={};for(var m in n)g[m]=m==="access"?{}:n[m];for(var m in n.access)g.access[m]=n.access[m];g.addInitializer=function(y){if(h)throw new TypeError("Cannot add initializers after decoration has completed");s.push(a(y||null))};var v=(0,r[p])(o==="accessor"?{get:d.get,set:d.set}:d[c],g);if(o==="accessor"){if(v===void 0)continue;if(v===null||typeof v!="object")throw new TypeError("Object expected");(f=a(v.get))&&(d.get=f),(f=a(v.set))&&(d.set=f),(f=a(v.init))&&i.unshift(f)}else(f=a(v))&&(o==="field"?i.unshift(f):d[c]=f)}u&&Object.defineProperty(u,n.name,d),h=!0}function B3(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function z3(e){return typeof e=="symbol"?e:"".concat(e)}function U3(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function V3(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Ie(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{u(n.next(d))}catch(f){a(f)}}function c(d){try{u(n.throw(d))}catch(f){a(f)}}function u(d){d.done?s(d.value):i(d.value).then(o,c)}u((n=n.apply(e,t||[])).next())})}function W3(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=o(0),a.throw=o(1),a.return=o(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(u){return function(d){return c([u,d])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var U0=Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};function H3(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&U0(t,e,r)}function Ly(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);
vendor: 4,327 bytes, line 48
48if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function dO(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s}function q3(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(dO(arguments[t]));return e}function K3(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var s=arguments[t],a=0,o=s.length;a<o;a++,i++)n[i]=s[a];return n}function fO(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}function Ed(e){return this instanceof Ed?(this.v=e,this):new Ed(e)}function G3(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(g){return Promise.resolve(g).then(p,f)}}function o(p,g){n[p]&&(i[p]=function(m){return new Promise(function(v,y){s.push([p,m,v,y])>1||c(p,m)})},g&&(i[p]=g(i[p])))}function c(p,g){try{u(n[p](g))}catch(m){h(s[0][3],m)}}function u(p){p.value instanceof Ed?Promise.resolve(p.value.v).then(d,f):h(s[0][2],p)}function d(p){c("next",p)}function f(p){c("throw",p)}function h(p,g){p(g),s.shift(),s.length&&c(s[0][0],s[0][1])}}function Y3(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=e[i]?function(a){return(r=!r)?{value:Ed(e[i](a)),done:!1}:s?s(a):a}:s}}function X3(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Ly=="function"?Ly(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(a){return new Promise(function(o,c){a=e[s](a),i(o,c,a.done,a.value)})}}function i(s,a,o,c){Promise.resolve(c).then(function(u){s({value:u,done:o})},a)}}function Q3(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var GX=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},_j=function(e){return _j=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},_j(e)};function Z3(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=_j(e),n=0;n<r.length;n++)r[n]!=="default"&&U0(t,e,r[n]);return GX(t,e),t}function J3(e){return e&&e.__esModule?e:{default:e}}function eF(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function tF(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}function rF(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function nF(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");
vendor: 1,395 bytes, line 48
48i&&(n=function(){try{i.call(this)}catch(s){return Promise.reject(s)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var YX=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function iF(e){function t(s){e.error=e.hasError?new YX(s,e.error,"An error was suppressed during disposal."):s,e.hasError=!0}var r,n=0;function i(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var s=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(s).then(i,function(a){return t(a),i()})}else n|=1}catch(a){t(a)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return i()}function sF(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,i,s,a){return n?t?".jsx":".js":i&&(!s||!a)?r:i+s+"."+a.toLowerCase()+"js"}):e}const XX={__extends:M3,__assign:gi,__rest:sl,__decorate:D3,__param:L3,__esDecorate:F3,__runInitializers:B3,__propKey:z3,__setFunctionName:U3,__metadata:V3,__awaiter:Ie,__generator:W3,__createBinding:U0,__exportStar:H3,__values:Ly,__read:dO,__spread:q3,__spreadArrays:K3,__spreadArray:fO,__await:Ed,__asyncGenerator:G3,__asyncDelegator:Y3,__asyncValues:X3,__makeTemplateOb
48ject:Q3,__importStar:Z3,__importDefault:J3,__classPrivateFieldGet:eF,__classPrivateFieldSet:tF,__classPrivateFieldIn:rF,__addDisposableResource:nF,__disposeResources:iF,__rewriteRelativeImportExtension:sF},QX=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:nF,get __assign(){return gi},__asyncDelegator:Y3,__asyncGenerator:G3,__asyncValues:X3,__await:Ed,__awaiter:Ie,__classPrivateFieldGet:eF,__classPrivateFieldIn:rF,__classPrivateFieldSet:tF,__createBinding:U0,__decorate:D3,__disposeResources:iF,__esDecorate:F3,__exportStar:H3,__extends:M3,__generator:W3,__importDefault:J3,__importStar:Z3,__makeTemplateObject:Q3,__metadata:V3,__param:L3,__propKey:z3,__read:dO,__rest:sl,__rewriteRelativeImportExtension:sF,__runInitializers:B3,__setFunctionName:U3,__spread:q3,__spreadArray:fO,__spreadArrays:K3,__values:Ly,default:XX},Symbol.toStringTag,{value:"Module"})),ZX="modulepreload",JX=function(e){return"/"+e},RT={},bf=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),o=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(r.map(c=>{if(c=JX(c),c in RT)return;RT[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":ZX,u||(f.as="script"),f.crossOrigin="",f.href=c,o&&f.setAttribute("nonce",o),document.head.appendChild(f),u)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return t().catch(s)})},eQ=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...r)=>bf(async()=>{const{default:n}=await Promise.resolve().then(()=>Uc);return{default:n}},void 0).then(({default:n})=>n(...r)):t=fetch,(...r)=>t(...r)};class hO extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class $T extends hO{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class IT extends hO{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class MT extends hO{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Ej;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Ej||(Ej={}));class tQ{constructor(t,{headers:r={},customFetch:n,region:i=Ej.Any}={}){this.url=t,this.headers=r,this.region=i,this.fetch=eQ(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return Ie(this,arguments,void 0,function*(r,n={}){var i;try{const{headers:s,method:a,body:o,signal:c}=n;let u={},{region:d}=n;d||(d=this.region);const f=new URL(`${this.url}/${r}`);d&&d!=="any"&&(u["x-region"]=d,f.searchParams.set("forceFunctionRegion",d));let h;o&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)?typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(u["Content-Type"]="application/octet-stream",h=o):typeof o=="string"?(u["Content-Type"]="text/plain",h=o):typeof FormData<"u"&&o instanceof FormData?h=o:(u["Content-Type"]="application/json",h=JSON.stringify(o)):h=o;const p=yield this.fetch(f.toString(),{method:a||"POST",headers:Object.assign(Object.assign(Object.assign({},u),this.headers),s),body:h,signal:c}).catch(y=>{throw y.name==="AbortError"?y:new $T(y)}),g=p.headers.get("x-relay-error");if(g&&g==="true")throw new IT(p);if(!p.ok)throw new MT(p);let m=((i=p.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),v;return m==="application/json"?v=yield p.json():m==="application/octet-stream"||m==="application/pdf"?v=yield p.blob():m==="text/event-stream"?v=p:m==="multipart/form-data"?v=yield p.formData():v=yield p.text(),{data:v,error:null,response:p}}catch(s){return s instanceof Error&&s.name==="AbortError"?{data:null,error:new $T(s)}:{data:null,error:s,response:s instanceof MT||s instanceof IT?s.context:void 0}}})}}var ln={};const wf=JD(QX);var Xg={},Qg={},Zg={},Jg={},ev={},rQ=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")},Nd=rQ();const nQ=Nd.fetch,aF=Nd.fetch.bind(Nd),oF=Nd.Headers,iQ=Nd.Request,sQ=Nd.Response,Uc=Object.freeze(Object.defineProperty({__proto__:null,Headers:oF,Request:iQ,Response:sQ,default:aF,fetch:nQ},Symbol.toStringTag,{value:"Module"})),aQ=JD(Uc);var tv={},DT;function lF(){if(DT)return tv;
48DT=1,Object.defineProperty(tv,"__esModule",{value:!0});class e extends Error{constructor(r){super(r.message),this.name="PostgrestError",this.details=r.details,this.hint=r.hint,this.code=r.code}}return tv.default=e,tv}var LT;function cF(){if(LT)return ev;LT=1,Object.defineProperty(ev,"__esModule",{value:!0});const e=wf,t=e.__importDefault(aQ),r=e.__importDefault(lF());class n{constructor(s){var a,o;this.shouldThrowOnError=!1,this.method=s.method,this.url=s.url,this.headers=new Headers(s.headers),this.schema=s.schema,this.body=s.body,this.shouldThrowOnError=(a=s.shouldThrowOnError)!==null&&a!==void 0?a:!1,this.signal=s.signal,this.isMaybeSingle=(o=s.isMaybeSingle)!==null&&o!==void 0?o:!1,s.fetch?this.fetch=s.fetch:typeof fetch>"u"?this.fetch=t.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(s,a){return this.headers=new Headers(this.headers),this.headers.set(s,a),this}then(s,a){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const o=this.fetch;let c=o(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async u=>{var d,f,h,p;let g=null,m=null,v=null,y=u.status,x=u.statusText;if(u.ok){if(this.method!=="HEAD"){const E=await u.text();E===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((d=this.headers.get("Accept"))===null||d===void 0)&&d.includes("application/vnd.pgrst.plan+text"))?m=E:m=JSON.parse(E))}const S=(f=this.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),j=(h=u.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");S&&j&&j.length>1&&(v=parseInt(j[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(m)&&(m.length>1?(g={code:"PGRST116",details:`Results contain ${m.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},m=null,v=null,y=406,x="Not Acceptable"):m.length===1?m=m[0]:m=null)}else{const S=await u.text();try{g=JSON.parse(S),Array.isArray(g)&&u.status===404&&(m=[],g=null,y=200,x="OK")}catch{u.status===404&&S===""?(y=204,x="No Content"):g={message:S}}if(g&&this.isMaybeSingle&&(!((p=g==null?void 0:g.details)===null||p===void 0)&&p.includes("0 rows"))&&(g=null,y=200,x="OK"),g&&this.shouldThrowOnError)throw new r.default(g)}return{error:g,data:m,count:v,status:y,statusText:x}});return this.shouldThrowOnError||(c=c.catch(u=>{var d,f,h;return{error:{message:`${(d=u==null?void 0:u.name)!==null&&d!==void 0?d:"FetchError"}: ${u==null?void 0:u.message}`,details:`${(f=u==null?void 0:u.stack)!==null&&f!==void 0?f:""}`,hint:"",code:`${(h=u==null?void 0:u.code)!==null&&h!==void 0?h:""}`},data:null,count:null,status:0,statusText:""}})),c.then(s,a)}returns(){return this}overrideTypes(){return this}}return ev.default=n,ev}var FT;function uF(){if(FT)return Jg;FT=1,Object.defineProperty(Jg,"__esModule",{value:!0});const t=wf.__importDefault(cF());class r extends t.default{select(i){let s=!1;const a=(i??"*").split("").map(o=>/\s/.test(o)&&!s?"":(o==='"'&&(s=!s),o)).join("");return this.url.searchParams.set("select",a),this.headers.append("Prefer","return=representation"),this}order(i,{ascending:s=!0,nullsFirst:a,foreignTable:o,referencedTable:c=o}={}){const u=c?`${c}.order`:"order",d=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${d?`${d},`:""}${i}.${s?"asc":"desc"}${a===void 0?"":a?".nullsfirst":".nullslast"}`),this}limit(i,{foreignTable:s,referencedTable:a=s}={}){const o=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(o,`${i}`),this}range(i,s,{foreignTable:a,referencedTable:o=a}={}){const c=typeof o>"u"?"offset":`${o}.offset`,u=typeof o>"u"?"limit":`${o}.limit`;return this.url.searchParams.set(c,`${i}`),this.url.searchParams.set(u,`${s-i+1}`),this}abortSignal(i){return this.signal=i,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
48explain({analyze:i=!1,verbose:s=!1,settings:a=!1,buffers:o=!1,wal:c=!1,format:u="text"}={}){var d;const f=[i?"analyze":null,s?"verbose":null,a?"settings":null,o?"buffers":null,c?"wal":null].filter(Boolean).join("|"),h=(d=this.headers.get("Accept"))!==null&&d!==void 0?d:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${h}"; options=${f};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(i){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${i}`),this}}return Jg.default=r,Jg}var BT;function pO(){if(BT)return Zg;BT=1,Object.defineProperty(Zg,"__esModule",{value:!0});const t=wf.__importDefault(uF()),r=new RegExp("[,()]");class n extends t.default{eq(s,a){return this.url.searchParams.append(s,`eq.${a}`),this}neq(s,a){return this.url.searchParams.append(s,`neq.${a}`),this}gt(s,a){return this.url.searchParams.append(s,`gt.${a}`),this}gte(s,a){return this.url.searchParams.append(s,`gte.${a}`),this}lt(s,a){return this.url.searchParams.append(s,`lt.${a}`),this}lte(s,a){return this.url.searchParams.append(s,`lte.${a}`),this}like(s,a){return this.url.searchParams.append(s,`like.${a}`),this}likeAllOf(s,a){return this.url.searchParams.append(s,`like(all).{${a.join(",")}}`),this}likeAnyOf(s,a){return this.url.searchParams.append(s,`like(any).{${a.join(",")}}`),this}ilike(s,a){return this.url.searchParams.append(s,`ilike.${a}`),this}ilikeAllOf(s,a){return this.url.searchParams.append(s,`ilike(all).{${a.join(",")}}`),this}ilikeAnyOf(s,a){return this.url.searchParams.append(s,`ilike(any).{${a.join(",")}}`),this}is(s,a){return this.url.searchParams.append(s,`is.${a}`),this}in(s,a){const o=Array.from(new Set(a)).map(c=>typeof c=="string"&&r.test(c)?`"${c}"`:`${c}`).join(",");return this.url.searchParams.append(s,`in.(${o})`),this}contains(s,a){return typeof a=="string"?this.url.searchParams.append(s,`cs.${a}`):Array.isArray(a)?this.url.searchParams.append(s,`cs.{${a.join(",")}}`):this.url.searchParams.append(s,`cs.${JSON.stringify(a)}`),this}containedBy(s,a){return typeof a=="string"?this.url.searchParams.append(s,`cd.${a}`):Array.isArray(a)?this.url.searchParams.append(s,`cd.{${a.join(",")}}`):this.url.searchParams.append(s,`cd.${JSON.stringify(a)}`),this}rangeGt(s,a){return this.url.searchParams.append(s,`sr.${a}`),this}rangeGte(s,a){return this.url.searchParams.append(s,`nxl.${a}`),this}rangeLt(s,a){return this.url.searchParams.append(s,`sl.${a}`),this}rangeLte(s,a){return this.url.searchParams.append(s,`nxr.${a}`),this}rangeAdjacent(s,a){return this.url.searchParams.append(s,`adj.${a}`),this}overlaps(s,a){return typeof a=="string"?this.url.searchParams.append(s,`ov.${a}`):this.url.searchParams.append(s,`ov.{${a.join(",")}}`),this}textSearch(s,a,{config:o,type:c}={}){let u="";c==="plain"?u="pl":c==="phrase"?u="ph":c==="websearch"&&(u="w");const d=o===void 0?"":`(${o})`;return this.url.searchParams.append(s,`${u}fts${d}.${a}`),this}match(s){return Object.entries(s).forEach(([a,o])=>{this.url.searchParams.append(a,`eq.${o}`)}),this}not(s,a,o){return this.url.searchParams.append(s,`not.${a}.${o}`),this}or(s,{foreignTable:a,referencedTable:o=a}={}){const c=o?`${o}.or`:"or";return this.url.searchParams.append(c,`(${s})`),this}filter(s,a,o){return this.url.searchParams.append(s,`${a}.${o}`),this}}return Zg.default=n,Zg}var zT;function dF(){if(zT)return Qg;zT=1,Object.defineProperty(Qg,"__esModule",{value:!0});const t=wf.__importDefault(pO());class r{constructor(i,{headers:s={},schema:a,fetch:o}){this.url=i,this.headers=new Headers(s),this.schema=a,this.fetch=o}select(i,s){const{head:a=!1,count:o}=s??{},c=a?"HEAD":"GET";let u=!1;const d=(i??"*").split("").map(f=>/\s/.test(f)&&!u?"":(f==='"'&&(u=!u),f)).join("");return this.url.searchParams.set("select",d),o&&this.headers.append("Prefer",`count=${o}`),new t.default({method:c,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(i,{count:s,defaultToNull:a=!0}={}){var o;const c="POST";if(s&&this.headers.append("Prefer",`count=${s}`),a||this.headers.append("Prefer","missing=default"),Array.isArray(i)){const u=i.reduce((d,f)=>d.concat(Object.keys(f)),[]);if(u.length>0){const d=[...new Set(u)].map(f=>`"${f}"`);this.url.searchParams.set("columns",d.join(","))}}return new t.default({method:c,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}upsert(i,{onConflict:s,ignoreDuplicates:a=!1,count:o,defaultToNull:c=!0}={}){var u;const d="POST";if(this.headers.append("Prefer",`resolution=${a?"ignore":"merge"}-duplicates`),s!==void 0&&this.url.searchParams.set("on_conflict",s),o&&this.headers.append("Prefer",`count=${o}`),c||this.headers.append("Prefer","missing=default"),Array.isArray(i)){const f=i.reduce((h,p)=>h.concat(Object.keys(p)),[]);if(f.length>0){const h=[...new Set(f)].map(p=>`"${p}"`);this.url.searchParams.set("columns",h.join(","))}}return new t.default({method:d,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch})}update(i,{count:s}={}){var a;const o="PATCH";return s&&this.headers.append("Prefer",`count=${s}`),new t.default({method:o,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}delete({count:i}={}){var s;const a="DELETE";return i&&this.headers.append("Prefer",`count=${i}`),new t.default({method:a,url:this.url,headers:this.headers,schema:this.schema,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch})}}return Qg.default=r,Qg}var UT;function oQ(){if(UT)return Xg;
48UT=1,Object.defineProperty(Xg,"__esModule",{value:!0});const e=wf,t=e.__importDefault(dF()),r=e.__importDefault(pO());class n{constructor(s,{headers:a={},schema:o,fetch:c}={}){this.url=s,this.headers=new Headers(a),this.schemaName=o,this.fetch=c}from(s){const a=new URL(`${this.url}/${s}`);return new t.default(a,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(s){return new n(this.url,{headers:this.headers,schema:s,fetch:this.fetch})}rpc(s,a={},{head:o=!1,get:c=!1,count:u}={}){var d;let f;const h=new URL(`${this.url}/rpc/${s}`);let p;o||c?(f=o?"HEAD":"GET",Object.entries(a).filter(([m,v])=>v!==void 0).map(([m,v])=>[m,Array.isArray(v)?`{${v.join(",")}}`:`${v}`]).forEach(([m,v])=>{h.searchParams.append(m,v)})):(f="POST",p=a);const g=new Headers(this.headers);return u&&g.set("Prefer",`count=${u}`),new r.default({method:f,url:h,headers:g,schema:this.schemaName,body:p,fetch:(d=this.fetch)!==null&&d!==void 0?d:fetch})}}return Xg.default=n,Xg}Object.defineProperty(ln,"__esModule",{value:!0});var fF=ln.PostgrestError=SF=ln.PostgrestBuilder=bF=ln.PostgrestTransformBuilder=yF=ln.PostgrestFilterBuilder=gF=ln.PostgrestQueryBuilder=pF=ln.PostgrestClient=void 0;const Sf=wf,hF=Sf.__importDefault(oQ());var pF=ln.PostgrestClient=hF.default;const mF=Sf.__importDefault(dF());var gF=ln.PostgrestQueryBuilder=mF.default;const vF=Sf.__importDefault(pO());var yF=ln.PostgrestFilterBuilder=vF.default;const xF=Sf.__importDefault(uF());var bF=ln.PostgrestTransformBuilder=xF.default;const wF=Sf.__importDefault(cF());var SF=ln.PostgrestBuilder=wF.default;const jF=Sf.__importDefault(lF());fF=ln.PostgrestError=jF.default;var _F=ln.default={PostgrestClient:hF.default,PostgrestQueryBuilder:mF.default,PostgrestFilterBuilder:vF.default,PostgrestTransformBuilder:xF.default,PostgrestBuilder:wF.default,PostgrestError:jF.default};const lQ=ZD({__proto__:null,get PostgrestBuilder(){return SF},get PostgrestClient(){return pF},get PostgrestError(){return fF},get PostgrestFilterBuilder(){return yF},get PostgrestQueryBuilder(){return gF},get PostgrestTransformBuilder(){return bF},default:_F},[ln]),{PostgrestClient:cQ,PostgrestQueryBuilder:tUe,PostgrestFilterBuilder:rUe,PostgrestTransformBuilder:nUe,PostgrestBuilder:iUe,PostgrestError:sUe}=_F||lQ;class uQ{static detectEnvironment(){var t;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"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.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"){const r=process.versions;if(r&&r.node){const n=r.node,i=parseInt(n.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
49import ws from "ws"
50new 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 t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`
51
52Suggested solution: ${t.workaround}`),new Error(r)}static createWebSocket(t,r){const n=this.getWebSocketConstructor();return new n(t,r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const dQ="2.78.0",fQ=`realtime-js/${dQ}`,hQ="1.0.0",Nj=1e4,pQ=1e3,mQ=100;var rp;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(rp||(rp={}));var jr;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(jr||(jr={}));var Hi;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Hi||(Hi={}));var Oj;(function(e){e.websocket="websocket"})(Oj||(Oj={}));var kl;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(kl||(kl={}));class gQ{constructor(){this.HEADER_LENGTH=1}decode(t,r){return t.constructor===ArrayBuffer?r(this._binaryDecode(t)):r(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const r=new DataView(t),n=new TextDecoder;return this._decodeBroadcast(t,r,n)}_decodeBroadcast(t,r,n){const i=r.getUint8(1),s=r.getUint8(2);let a=this.HEADER_LENGTH+2;const o=n.decode(t.slice(a,a+i));a=a+i;const c=n.decode(t.slice(a,a+s));a=a+s;const u=JSON.parse(n.decode(t.slice(a,t.byteLength)));return{ref:null,topic:o,event:c,payload:u}}}let EF=class{constructor(t,r){this.callback=t,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=r}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 kt;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(kt||(kt={}));const VT=(e,t,r={})=>{var n;const i=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((s,a)=>(s[a]=vQ(a,e,t,i),s),{}):{}},vQ=(e,t,r,n)=>{const i=t.find(o=>o.name===e),s=i==null?void 0:i.type,a=r[e];return s&&!n.includes(s)?NF(s,a):Aj(a)},NF=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return wQ(t,r)}switch(e){case kt.bool:return yQ(t);case kt.float4:case kt.float8:case kt.int2:case kt.int4:case kt.int8:case kt.numeric:case kt.oid:return xQ(t);case kt.json:case kt.jsonb:return bQ(t);case kt.timestamp:return SQ(t);case kt.abstime:case kt.date:case kt.daterange:case kt.int4range:case kt.int8range:case kt.money:case kt.reltime:case kt.text:case kt.time:case kt.timestamptz:case kt.timetz:case kt.tsrange:case kt.tstzrange:return Aj(t);default:return Aj(t)}},Aj=e=>e,yQ=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}}
52,xQ=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},bQ=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},wQ=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let s;const a=e.slice(1,r);try{s=JSON.parse("["+a+"]")}catch{s=a?a.split(","):[]}return s.map(o=>NF(t,o))}return e},SQ=e=>typeof e=="string"?e.replace(" ","T"):e,OF=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class s1{constructor(t,r,n={},i=Nj){this.channel=t,this.event=r,this.payload=n,this.timeout=i,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,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(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var WT;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(WT||(WT={}));class np{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},i=>{const{onJoin:s,onLeave:a,onSync:o}=this.caller;this.joinRef=this.channel._joinRef(),this.state=np.syncState(this.state,i,s,a),this.pendingDiffs.forEach(c=>{this.state=np.syncDiff(this.state,c,s,a)}),this.pendingDiffs=[],o()}),this.channel._on(n.diff,{},i=>{const{onJoin:s,onLeave:a,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=np.syncDiff(this.state,i,s,a),o())}),this.onJoin((i,s,a)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:s,newPresences:a})}),this.onLeave((i,s,a)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:s,leftPresences:a})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,i){const s=this.cloneDeep(t),a=this.transformState(r),o={},c={};return this.map(s,(u,d)=>{a[u]||(c[u]=d)}),this.map(a,(u,d)=>{const f=s[u];if(f){const h=d.map(v=>v.presence_ref),p=f.map(v=>v.presence_ref),g=d.filter(v=>p.indexOf(v.presence_ref)<0),m=f.filter(v=>h.indexOf(v.presence_ref)<0);g.length>0&&(o[u]=g),m.length>0&&(c[u]=m)}else o[u]=d}),this.syncDiff(s,{joins:o,leaves:c},n,i)}static syncDiff(t,r,n,i){const{joins:s,leaves:a}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),i||(i=()=>{}),this.map(s,(o,c)=>{var u;const d=(u=t[o])!==null&&u!==void 0?u:[];if(t[o]=this.cloneDeep(c),d.length>0){const f=t[o].map(p=>p.presence_ref),h=d.filter(p=>f.indexOf(p.presence_ref)<0);t[o].unshift(...h)}n(o,d,c)}),this.map(a,(o,c)=>{let u=t[o];if(!u)return;const d=c.map(f=>f.presence_ref);u=u.filter(f=>d.indexOf(f.presence_ref)<0),t[o]=u,i(o,u,c),u.length===0&&delete t[o]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const i=t[n];return"metas"in i?r[n]=i.metas.map(s=>(s.presence_ref=s.phx_ref,delete s.phx_ref,delete s.phx_ref_prev,s)):r[n]=i,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var HT;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(HT||(HT={}));var ip;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ip||(ip={}));var la;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(la||(la={}));class mO{constructor(t,r={config:{}},n){var i,s;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=jr.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new s1(this,Hi.join,this.params,this.timeout),this.rejoinTimer=new EF(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=jr.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=jr.closed,this.socket._remove(this)}),this._onError(a=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,a),this.state=jr.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=jr.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",a=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,a),this.state=jr.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Hi.reply,{},(a,o)=>{this._trigger(this._replyEventName(o),a)}),this.presence=new np(this),this.broadcastEndpointURL=OF(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((s=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||s===void 0)&&s.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,i,s;if(this.socket.isConnected()||this.socket.connect(),this.state==jr.closed){const{config:{broadcast:a,presence:o,private:c}}=this.params,u=(i=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(p=>p.filter))!==null&&i!==void 0?i:[],d=!!this.bindings[ip.PRESENCE]&&this.bindings[ip.PRESENCE].length>0||((s=this.params.config.presence)===null||s===void 0?void 0:s.enabled)===!0,f={},h={broadcast:a,presence:Object.assign(Object.assign({},o),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(p=>t==null?void 0:t(la.CHANNEL_ERROR,p)),this._onClose(()=>t==null?void 0:t(la.CLOSED)),this.updateJoinPayload(Object.assign({config:h},f)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:p})=>{var g;if(this.socket.setAuth(),p===void 0){t==null||t(la.SUBSCRIBED);return}else{const m=this.bindings.postgres_changes,v=(g=m==null?void 0:m.length)!==null&&g!==void 0?g:0,y=[];for(let x=0;x<v;
52x++){const w=m[x],{filter:{event:S,schema:j,table:E,filter:_}}=w,N=p&&p[x];if(N&&N.event===S&&N.schema===j&&N.table===E&&N.filter===_)y.push(Object.assign(Object.assign({},w),{id:N.id}));else{this.unsubscribe(),this.state=jr.errored,t==null||t(la.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=y,t&&t(la.SUBSCRIBED);return}}).receive("error",p=>{this.state=jr.errored,t==null||t(la.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(la.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){return this.state===jr.joined&&t===ip.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(t,r,n)}async httpSend(t,r,n={}){var i;const s=this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"";if(r==null)return Promise.reject("Payload is required for httpSend()");const a={method:"POST",headers:{Authorization:s,apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},o=await this._fetchWithTimeout(this.broadcastEndpointURL,a,(i=n.timeout)!==null&&i!==void 0?i:this.timeout);if(o.status===202)return{success:!0};let c=o.statusText;try{const u=await o.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,r={}){var n,i;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
52in the future. Please use httpSend() explicitly for REST delivery.");const{event:s,payload:a}=t,c={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:a,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((i=u.body)===null||i===void 0?void 0:i.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var a,o,c;const u=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(o=(a=this.params)===null||a===void 0?void 0:a.config)===null||o===void 0?void 0:o.broadcast)===null||c===void 0)&&c.ack)&&s("ok"),u.receive("ok",()=>s("ok")),u.receive("error",()=>s("error")),u.receive("timeout",()=>s("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=jr.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Hi.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(i=>{n=new s1(this,Hi.leave,{},t),n.receive("ok",()=>{r(),i("ok")}).receive("timeout",()=>{r(),i("timed out")}).receive("error",()=>{i("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=jr.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const i=new AbortController,s=setTimeout(()=>i.abort(),n),a=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:i.signal}));return clearTimeout(s),a}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new s1(this,t,r,n);return this._canPush()?i.send():this._addToPushBuffer(i),i}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>mQ){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var i,s;const a=t.toLocaleLowerCase(),{close:o,error:c,leave:u,join:d}=Hi;if(n&&[o,c,u,d].indexOf(a)>=0&&n!==this._joinRef())return;let h=this._onMessage(a,r,n);if(r&&!h)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(a)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(p=>{var g,m,v;return((g=p.filter)===null||g===void 0?void 0:g.event)==="*"||((v=(m=p.filter)===null||m===void 0?void 0:m.event)===null||v===void 0?void 0:v.toLocaleLowerCase())===a}).map(p=>p.callback(h,n)):(s=this.bindings[a])===null||s===void 0||s.filter(p=>{var g,m,v,y,x,w;if(["broadcast","presence","postgres_changes"].includes(a))if("id"in p){const S=p.id,j=(g=p.filter)===null||g===void 0?void 0:g.event;return S&&((m=r.ids)===null||m===void 0?void 0:m.includes(S))&&(j==="*"||(j==null?void 0:j.toLocaleLowerCase())===((v=r.data)===null||v===void 0?void 0:v.type.toLocaleLowerCase()))}else{const S=(x=(y=p==null?void 0:p.filter)===null||y===void 0?void 0:y.event)===null||x===void 0?void 0:x.toLocaleLowerCase();return S==="*"||S===((w=r==null?void 0:r.event)===null||w===void 0?void 0:w.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===a}).map(p=>{if(typeof h=="object"&&"ids"in h){const g=h.data,{schema:m,table:v,commit_timestamp:y,type:x,errors:w}=g;h=Object.assign(Object.assign({},{schema:m,table:v,commit_timestamp:y,eventType:x,new:{},old:{},errors:w}),this._getPayloadRecords(g))}p.callback(h,n)})}_isClosed(){return this.state===jr.closed}_isJoined(){return this.state===jr.joined}_isJoining(){return this.state===jr.joining}_isLeaving(){return this.state===jr.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const i=t.toLocaleLowerCase(),s={type:i,filter:r,callback:n};return this.bindings[i]?this.bindings[i].push(s):this.bindings[i]=[s],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(i=>{var s;return!(((s=i.type)===null||s===void 0?void 0:s.toLocaleLowerCase())===n&&mO.isEqual(i.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Hi.close,{},t)}_onError(t){this._on(Hi.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=jr.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=VT(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=VT(t.columns,t.old_record)),r}}const a1=()=>{},rv={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},jQ=[1e3,2e3,5e3,1e4],_Q=1e4,EQ=`
53  addEventListener("message", (e) => {
54    if (e.data.event === "start") {
55      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
56    }
57  });`;class NQ{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Nj,this.transport=null,this.heartbeatIntervalMs=rv.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=a1,this.ref=0,this.reconnectTimer=null,this.logger=a1,this.conn=null,this.sendBuffer=[],this.serializer
57=new gQ,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=i=>{let s;return i?s=i:typeof fetch>"u"?s=(...a)=>bf(async()=>{const{default:o}=await Promise.resolve().then(()=>Uc);return{default:o}},void 0).then(({default:o})=>o(...a)).catch(o=>{throw new Error(`Failed to load @supabase/node-fetch: ${o.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):s=fetch,(...a)=>s(...a)},!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${t}/${Oj.websocket}`,this.httpEndpoint=OF(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.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=uQ.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r}
58
59To use Realtime in Node.js, you need to provide a WebSocket implementation:
60
61Option 1: Use Node.js 22+ which has native WebSocket support
62Option 2: Install and provide the "ws" package:
63
64  npm install ws
65
66  import ws from "ws"
67  const client = new RealtimeClient(url, {
68    ...options,
69    transport: ws
70  })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:hQ}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},t?this.conn.close(t,r??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case rp.connecting:return kl.Connecting;case rp.open:return kl.Open;case rp.closing:return kl.Closing;default:return kl.Closed}}isConnected(){return this.connectionState()===kl.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,i=this.getChannels().find(s=>s.topic===n);if(i)return i;{const s=new mO(`realtime:${t}`,r,this);return this.channels.push(s),s}}push(t){const{topic:r,event:n,payload:i,ref:s}=t,a=()=>{this.encode(t,o=>{var c;(c=this.conn)===null||c===void 0||c.send(o)})};this.log("push",`${r} ${n} (${s})`,i),this.isConnected()?a():this.sendBuffer.push(a)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(pQ,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
70heduleTimeout()},rv.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply")try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error")}catch(u){this.log("error","error in heartbeat callback",u)}r.ref&&r.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:n,event:i,payload:s,ref:a}=r,o=a?`(${a})`:"",c=s.status||"";this.log("receive",`${c} ${n} ${i} ${o}`.trim(),s),this.channels.filter(u=>u._isMember(n)).forEach(u=>u._trigger(i,s,a)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.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=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_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(t=>t.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 t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this.workerRef.terminate()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
70heduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(Hi.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",i=new URLSearchParams(r);return`${t}${n}${i}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([EQ],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r;t?r=t:this.accessToken?r=await this.accessToken():r=this.accessTokenValue,this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(n=>{const i={access_token:r,version:fQ};r&&n.updateJoinPayload(i),n.joinedOnce&&n._isJoined()&&n._push(Hi.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this.setAuth().catch(r=>{this.log("error",`error setting auth in ${t}`,r)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(i){this.log("error",`error in ${t} callback`,i)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new EF(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},rv.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,i,s,a,o,c,u,d;if(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:Nj,this.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:rv.HEARTBEAT_INTERVAL,this.worker=(s=t==null?void 0:t.worker)!==null&&s!==void 0?s:!1,this.accessToken=(a=t==null?void 0:t.accessToken)!==null&&a!==void 0?a:null,this.heartbeatCallback=(o=t==null?void 0:t.heartbeatCallback)!==null&&o!==void 0?o:a1,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(c=t==null?void 0:t.reconnectAfterMs)!==null&&c!==void 0?c:f=>jQ[f-1]||_Q,this.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:(f,h)=>h(JSON.stringify(f)),this.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}class gO extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function Yt(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class OQ extends gO{constructor(t,r,n){super(t),this.name="StorageApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Cj extends gO{constructor(t,r){super(t),this.name="StorageUnknownError",this.originalError=r}}const vO=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...r)=>bf(async()=>{const{default:n}=await Promise.resolve().then(()=>Uc);return{default:n}},void 0).then(({default:n})=>n(...r)):t=fetch,(...r)=>t(...r)},AQ=()=>Ie(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield bf(()=>Promise.resolve().then(()=>Uc),void 0)).Response:Response}),Pj=e=>{if(Array.isArray(e))return e.map(r=>Pj(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const i=r.replace(/([-_][a-z])/gi,s=>s.toUpperCase().replace(/[-_]/g,""));t[i]=Pj(n)}),t},CQ=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},o1=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},PQ=(e,t,r)=>Ie(void 0,void 0,void 0,function*(){const n=yield AQ();e instanceof n&&!(r!=null&&r.noResolveJson)?e.json().then(i=>{const s=e.status||500,a=(i==null?void 0:i.statusCode)||s+"";t(new OQ(o1(i),s,a))}).catch(i=>{t(new Cj(o1(i),i))}):t(new Cj(o1(e),e))}),TQ=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!n?i:(CQ(n)?(i.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(n)):i.body=n,t!=null&&t.duplex&&(i.duplex=t.duplex),Object.assign(Object.assign({},i),r))};function Gm(e,t,r,n,i,s){return Ie(this,void 0,void 0,function*(){return new Promise((a,o)=>
70{e(r,TQ(t,n,i,s)).then(c=>{if(!c.ok)throw c;return n!=null&&n.noResolveJson?c:c.json()}).then(c=>a(c)).catch(c=>PQ(c,o,n))})})}function $p(e,t,r,n){return Ie(this,void 0,void 0,function*(){return Gm(e,"GET",t,r,n)})}function zi(e,t,r,n,i){return Ie(this,void 0,void 0,function*(){return Gm(e,"POST",t,n,i,r)})}function Tj(e,t,r,n,i){return Ie(this,void 0,void 0,function*(){return Gm(e,"PUT",t,n,i,r)})}function kQ(e,t,r,n){return Ie(this,void 0,void 0,function*(){return Gm(e,"HEAD",t,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}function yO(e,t,r,n,i){return Ie(this,void 0,void 0,function*(){return Gm(e,"DELETE",t,n,i,r)})}class RQ{constructor(t,r){this.downloadFn=t,this.shouldThrowOnError=r}then(t,r){return this.execute().then(t,r)}execute(){return Ie(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Yt(t))return{data:null,error:t};throw t}})}}var AF;class $Q{constructor(t,r){this.downloadFn=t,this.shouldThrowOnError=r,this[AF]="BlobDownloadBuilder",this.promise=null}asStream(){return new RQ(this.downloadFn,this.shouldThrowOnError)}then(t,r){return this.getPromise().then(t,r)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}execute(){return Ie(this,void 0,void 0,function*(){try{return{data:yield(yield this.downloadFn()).blob(),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Yt(t))return{data:null,error:t};throw t}})}}AF=Symbol.toStringTag;const IQ={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},qT={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class MQ{constructor(t,r={},n,i){this.shouldThrowOnError=!1,this.url=t,this.headers=r,this.bucketId=n,this.fetch=vO(i)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(t,r,n,i){return Ie(this,void 0,void 0,function*(){try{let s;const a=Object.assign(Object.assign({},qT),i);let o=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(a.upsert)});const c=a.metadata;typeof Blob<"u"&&n instanceof Blob?(s=new FormData,s.append("cacheControl",a.cacheControl),c&&s.append("metadata",this.encodeMetadata(c)),s.append("",n)):typeof FormData<"u"&&n instanceof FormData?(s=n,s.append("cacheControl",a.cacheControl),c&&s.append("metadata",this.encodeMetadata(c))):(s=n,o["cache-control"]=`max-age=${a.cacheControl}`,o["content-type"]=a.contentType,c&&(o["x-metadata"]=this.toBase64(this.encodeMetadata(c)))),i!=null&&i.headers&&(o=Object.assign(Object.assign({},o),i.headers));const u=this._removeEmptyFolders(r),d=this._getFinalPath(u),f=yield(t=="PUT"?Tj:zi)(this.fetch,`${this.url}/object/${d}`,s,Object.assign({headers:o},a!=null&&a.duplex?{duplex:a.duplex}:{}));return{data:{path:u,id:f.Id,fullPath:f.Key},error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(Yt(s))return{data:null,error:s};throw s}})}upload(t,r,n){return Ie(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,r,n)})}uploadToSignedUrl(t,r,n,i){return Ie(this,void 0,void 0,function*(){const s=this._removeEmptyFolders(t),a=this._getFinalPath(s),o=new URL(this.url+`/object/upload/sign/${a}`);o.searchParams.set("token",r);try{let c;const u=Object.assign({upsert:qT.upsert},i),d=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&n instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",n)):typeof FormData<"u"&&n instanceof FormData?(c=n,c.append("cacheControl",u.cacheControl)):(c=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType);const f=yield Tj(this.fetch,o.toString(),c,{headers:d});return{data:{path:s,fullPath:f.Key},error:null}}catch(c){if(this.shouldThrowOnError)throw c;if(Yt(c))return{data:null,error:c};throw c}})}createSignedUploadUrl(t,r){return Ie(this,void 0,void 0,function*(){try{let n=this._getFinalPath(t);const i=Object.assign({},this.headers);r!=null&&r.upsert&&(i["x-upsert"]="true");const s=yield zi(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:i}),a=new URL(this.url+s.url),o=a.searchParams.get("token");if(!o)throw new gO("No token returned by API");return{data:{signedUrl:a.toString(),path:t,token:o},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Yt(n))return{data:null,error:n};throw n}})}update(t,r,n){return Ie(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,r,n)})}move(t,r,n){return Ie(this,void 0,void 0,function*(){try{return{data:yield zi(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers}),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Yt(i))return{data:null,error:i};throw i}})}copy(t,r,n){return Ie(this,void 0,void 0,function*(){try{return{data:{path:(yield zi(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers})).Key},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Yt(i))return{data:null,error:i};throw i}})}createSignedUrl(t,r,n){return Ie(this,void 0,void 0,function*(){try{let i=this._getFinalPath(t),s=yield zi(this.fetch,`${this.url}/object/sign/${i}
70`,Object.assign({expiresIn:r},n!=null&&n.transform?{transform:n.transform}:{}),{headers:this.headers});const a=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return s={signedUrl:encodeURI(`${this.url}${s.signedURL}${a}`)},{data:s,error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Yt(i))return{data:null,error:i};throw i}})}createSignedUrls(t,r,n){return Ie(this,void 0,void 0,function*(){try{const i=yield zi(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:t},{headers:this.headers}),s=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{data:i.map(a=>Object.assign(Object.assign({},a),{signedUrl:a.signedURL?encodeURI(`${this.url}${a.signedURL}${s}`):null})),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Yt(i))return{data:null,error:i};throw i}})}download(t,r){const i=typeof(r==null?void 0:r.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((r==null?void 0:r.transform)||{}),a=s?`?${s}`:"",o=this._getFinalPath(t),c=()=>$p(this.fetch,`${this.url}/${i}/${o}${a}`,{headers:this.headers,noResolveJson:!0});return new $Q(c,this.shouldThrowOnError)}info(t){return Ie(this,void 0,void 0,function*(){const r=this._getFinalPath(t);try{const n=yield $p(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:Pj(n),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Yt(n))return{data:null,error:n};throw n}})}exists(t){return Ie(this,void 0,void 0,function*(){const r=this._getFinalPath(t);try{return yield kQ(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Yt(n)&&n instanceof Cj){const i=n.originalError;if([400,404].includes(i==null?void 0:i.status))return{data:!1,error:n}}throw n}})}getPublicUrl(t,r){const n=this._getFinalPath(t),i=[],s=r!=null&&r.download?`download=${r.download===!0?"":r.download}`:"";s!==""&&i.push(s);const o=typeof(r==null?void 0:r.transform)<"u"?"render/image":"object",c=this.transformOptsToQueryString((r==null?void 0:r.transform)||{});c!==""&&i.push(c);let u=i.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${n}${u}`)}}}remove(t){return Ie(this,void 0,void 0,function*(){try{return{data:yield yO(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Yt(r))return{data:null,error:r};throw r}})}list(t,r,n){return Ie(this,void 0,void 0,function*(){try{const i=Object.assign(Object.assign(Object.assign({},IQ),r),{prefix:t||""});return{data:yield zi(this.fetch,`${this.url}/object/list/${this.bucketId}`,i,{headers:this.headers},n),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Yt(i))return{data:null,error:i};throw i}})}listV2(t,r){return Ie(this,void 0,void 0,function*(){try{const n=Object.assign({},t);return{data:yield zi(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Yt(n))return{data:null,error:n};throw n}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const r=[];return t.width&&r.push(`width=${t.width}`),t.height&&r.push(`height=${t.height}`),t.resize&&r.push(`resize=${t.resize}`),t.format&&r.push(`format=${t.format}`),t.quality&&r.push(`quality=${t.quality}`),r.join("&")}}const CF="2.78.0",PF={"X-Client-Info":`storage-js/${CF}`};class DQ{constructor(t,r={},n,i){this.shouldThrowOnError=!1;const s=new URL(t);i!=null&&i.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase.")),this.url=s.href.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},PF),r),this.fetch=vO(n)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(t){return Ie(this,void 0,void 0,function*(){try{const r=this.listBucketOptionsToQueryString(t);return{data:yield $p(this.fetch,`${this.url}/bucket${r}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Yt(r))return{data:null,error:r};throw r}})}getBucket(t){return Ie(this,void 0,void 0,function*(){try{return{data:yield $p(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Yt(r))return{data:null,error:r};throw r}})}createBucket(t){return Ie(this,arguments,void 0,function*(r,n={public:!1}){try{return{data:yield zi(this.fetch,`${this.url}/bucket`,{id:r,name:r,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Yt(i))return{data:null,error:i};throw i}})}updateBucket(t,r){return Ie(this,void 0,void 0,function*(){try{return{data:yield Tj(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Yt(n))return{data:null,error:n};throw n}})}emptyBucket(t){return Ie(this,void 0,void 0,function*(){try{return{data:yield zi(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Yt(r))return{data:null,error:r};throw r}})}deleteBucket(t){return Ie(this,void 0,void 0,function*(){try{return{data:yield yO(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Yt(r))return{data:null,error:r};throw r}})}listBucketOptionsToQueryString(t){const r={};return t&&("limit"in t&&(r.limit=String(t.limit)),"offset"in t&&(r.offset=String(t.offset)),t.search&&(r.search=t.search),t.sortColumn&&(r.sortColumn=t.sortColumn),t.sortOrder&&(r.sortOrder=t.sortOrder)),Object.keys(r).length>0?"?"+new URLSearchParams(r).toString():""}}class LQ{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},PF),r),this.fetch=vO(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(t){return Ie(this,void 0,void 0,function*(){try{return{data:yield zi(this.fetch,`${this.url}/bucket`,{name:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Yt(r))return{data:null,error:r};throw r}})}listBuckets(t){return Ie(this,void 0,void 0,function*(){try{const r=new 
70URLSearchParams;(t==null?void 0:t.limit)!==void 0&&r.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&r.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&r.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&r.set("sortOrder",t.sortOrder),t!=null&&t.search&&r.set("search",t.search);const n=r.toString(),i=n?`${this.url}/bucket?${n}`:`${this.url}/bucket`;return{data:yield $p(this.fetch,i,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Yt(r))return{data:null,error:r};throw r}})}deleteBucket(t){return Ie(this,void 0,void 0,function*(){try{return{data:yield yO(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Yt(r))return{data:null,error:r};throw r}})}}const xO={"X-Client-Info":`storage-js/${CF}`,"Content-Type":"application/json"};class TF extends Error{constructor(t){super(t),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}}function Un(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}class l1 extends TF{constructor(t,r,n){super(t),this.name="StorageVectorsApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class FQ extends TF{constructor(t,r){super(t),this.name="StorageVectorsUnknownError",this.originalError=r}}var KT;(function(e){e.InternalError="InternalError",e.S3VectorConflictException="S3VectorConflictException",e.S3VectorNotFoundException="S3VectorNotFoundException",e.S3VectorBucketNotEmpty="S3VectorBucketNotEmpty",e.S3VectorMaxBucketsExceeded="S3VectorMaxBucketsExceeded",e.S3VectorMaxIndexesExceeded="S3VectorMaxIndexesExceeded"})(KT||(KT={}));const bO=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...r)=>bf(async()=>{const{default:n}=await Promise.resolve().then(()=>Uc);return{default:n}},void 0).then(({default:n})=>n(...r)):t=fetch,(...r)=>t(...r)},BQ=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},GT=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),zQ=(e,t,r)=>Ie(void 0,void 0,void 0,function*(){if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const i=e.status||500,s=e;if(typeof s.json=="function")s.json().then(a=>{const o=(a==null?void 0:a.statusCode)||(a==null?void 0:a.code)||i+"";t(new l1(GT(a),i,o))}).catch(()=>{const a=i+"",o=s.statusText||`HTTP ${i} error`;t(new l1(o,i,a))});else{const a=i+"",o=s.statusText||`HTTP ${i} error`;t(new l1(o,i,a))}}else t(new FQ(GT(e),e))}),UQ=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return n?(BQ(n)?(i.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(n)):i.body=n,Object.assign(Object.assign({},i),r)):i};function VQ(e,t,r,n,i,s){return Ie(this,void 0,void 0,function*(){return new Promise((a,o)=>{e(r,UQ(t,n,i,s)).then(c=>{if(!c.ok)throw c;if(n!=null&&n.noResolveJson)return c;const u=c.headers.get("content-type");return!u||!u.includes("application/json")?{}:c.json()}).then(c=>a(c)).catch(c=>zQ(c,o,n))})})}function Vn(e,t,r,n,i){return Ie(this,void 0,void 0,function*(){return VQ(e,"POST",t,n,i,r)})}class WQ{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},xO),r),this.fetch=bO(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createIndex(t){return Ie(this,void 0,void 0,function*(){try{return{data:(yield Vn(this.fetch,`${this.url}/CreateIndex`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Un(r))return{data:null,error:r};throw r}})}getIndex(t,r){return Ie(this,void 0,void 0,function*(){try{return{data:yield Vn(this.fetch,`${this.url}/GetIndex`,{vectorBucketName:t,indexName:r},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Un(n))return{data:null,error:n};throw n}})}listIndexes(t){return Ie(this,void 0,void 0,function*(){try{return{data:yield Vn(this.fetch,`${this.url}/ListIndexes`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Un(r))return{data:null,error:r};throw r}})}deleteIndex(t,r){return Ie(this,void 0,void 0,function*(){try{return{data:(yield Vn(this.fetch,`${this.url}/DeleteIndex`,{vectorBucketName:t,indexName:r},{headers:this.headers}))||{},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Un(n))return{data:null,error:n};throw n}})}}class HQ{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},xO),r),this.fetch=bO(n)}throwOnError(){return this.shouldThrowOnError=!0,this}putVectors(t){return Ie(this,void 0,void 0,function*(){try{if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:(yield Vn(this.fetch,`${this.url}/PutVectors`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Un(r))return{data:null,error:r};throw r}})}getVectors(t){return Ie(this,void 0,void 0,function*(){try{return{data:yield Vn(this.fetch,`${this.url}/GetVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Un(r))return{data:null,error:r};throw r}})}listVectors(t){return Ie(this,void 0,void 0,function*(){try{if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
70if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return{data:yield Vn(this.fetch,`${this.url}/ListVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Un(r))return{data:null,error:r};throw r}})}queryVectors(t){return Ie(this,void 0,void 0,function*(){try{return{data:yield Vn(this.fetch,`${this.url}/QueryVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Un(r))return{data:null,error:r};throw r}})}deleteVectors(t){return Ie(this,void 0,void 0,function*(){try{if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:(yield Vn(this.fetch,`${this.url}/DeleteVectors`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Un(r))return{data:null,error:r};throw r}})}}class qQ{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},xO),r),this.fetch=bO(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(t){return Ie(this,void 0,void 0,function*(){try{return{data:(yield Vn(this.fetch,`${this.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Un(r))return{data:null,error:r};throw r}})}getBucket(t){return Ie(this,void 0,void 0,function*(){try{return{data:yield Vn(this.fetch,`${this.url}/GetVectorBucket`,{vectorBucketName:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Un(r))return{data:null,error:r};throw r}})}listBuckets(){return Ie(this,arguments,void 0,function*(t={}){try{return{data:yield Vn(this.fetch,`${this.url}/ListVectorBuckets`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Un(r))return{data:null,error:r};throw r}})}deleteBucket(t){return Ie(this,void 0,void 0,function*(){try{return{data:(yield Vn(this.fetch,`${this.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Un(r))return{data:null,error:r};throw r}})}}class KQ extends qQ{constructor(t,r={}){super(t,r.headers||{},r.fetch)}from(t){return new GQ(this.url,this.headers,t,this.fetch)}}class GQ extends WQ{constructor(t,r,n,i){super(t,r,i),this.vectorBucketName=n}createIndex(t){const r=Object.create(null,{createIndex:{get:()=>super.createIndex}});return Ie(this,void 0,void 0,function*(){return r.createIndex.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName}))})}listIndexes(){const t=Object.create(null,{listIndexes:{get:()=>super.listIndexes}});return Ie(this,arguments,void 0,function*(r={}){return t.listIndexes.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName}))})}getIndex(t){const r=Object.create(null,{getIndex:{get:()=>super.getIndex}});return Ie(this,void 0,void 0,function*(){return r.getIndex.call(this,this.vectorBucketName,t)})}deleteIndex(t){const r=Object.create(null,{deleteIndex:{get:()=>super.deleteIndex}});return Ie(this,void 0,void 0,function*(){return r.deleteIndex.call(this,this.vectorBucketName,t)})}index(t){return new YQ(this.url,this.headers,this.vectorBucketName,t,this.fetch)}}class YQ extends HQ{constructor(t,r,n,i,s){super(t,r,s),this.vectorBucketName=n,this.indexName=i}putVectors(t){const r=Object.create(null,{putVectors:{get:()=>super.putVectors}});return Ie(this,void 0,void 0,function*(){return r.putVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}getVectors(t){const r=Object.create(null,{getVectors:{get:()=>super.getVectors}});return Ie(this,void 0,void 0,function*(){return r.getVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}listVectors(){const t=Object.create(null,{listVectors:{get:()=>super.listVectors}});return Ie(this,arguments,void 0,function*(r={}){return t.listVectors.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}queryVectors(t){const r=Object.create(null,{queryVectors:{get:()=>super.queryVectors}});return Ie(this,void 0,void 0,function*(){return r.queryVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}deleteVectors(t){const r=Object.create(null,{deleteVectors:{get:()=>super.deleteVectors}});return Ie(this,void 0,void 0,function*(){return r.deleteVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}}class XQ extends DQ{constructor(t,r={},n,i){super(t,r,n,i)}from(t){return new MQ(this.url,this.headers,t,this.fetch)}get vectors(){return new KQ(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new LQ(this.url+"/iceberg",this.headers,this.fetch)}}const QQ="2.78.0";let Dh="";typeof Deno<"u"?Dh="deno":typeof document<"u"?Dh="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Dh="react-native":Dh="node";const ZQ={"X-Client-Info":`supabase-js-${Dh}/${QQ}`},JQ={headers:ZQ},eZ={schema:"public"},tZ={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},rZ={},nZ=e=>{let t;return e?t=e:typeof fetch>"u"?t=aF:t=fetch,(...r)=>t(...r)},iZ=()=>typeof Headers>"u"?oF:Headers,sZ=(e,t,r)=>{const n=nZ(r),i=iZ();return async(s,a)=>{var o;const c=(o=await t())!==null&&o!==void 0?o:e;let u=new i(a==null?void 0:a.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),n(s,Object.assign(Object.assign({},a),{headers:u}))}};function aZ(e){return e.endsWith("/")?e:e+"/"}function oZ(e,t){var r,n;const{db:i,auth:s,realtime:a,global:o}=e,{db:c,auth:u,realtime:d,global:f}=t,h={db:Object.assign(Object.assign({},c),i),auth:Object.assign(Object.assign({},u),s),realtime:Object.assign(Object.assign({},d),a),storage:{},global:Object.assign(Object.assign(Object.assign({},f),o),{headers:Object.assign(Object.assign({},(r=f==null?void 0:f.headers)!==null&&r!==void 0?r:{}),(n=o==null?void 0:o.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}function lZ(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");
70if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(aZ(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}const kF="2.78.0",yu=30*1e3,kj=3,c1=kj*yu,cZ="http://localhost:9999",uZ="supabase.auth.token",dZ={"X-Client-Info":`gotrue-js/${kF}`},Rj="X-Supabase-Api-Version",RF={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},fZ=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,hZ=10*60*1e3;class Ip extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function ze(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class pZ extends Ip{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function mZ(e){return ze(e)&&e.name==="AuthApiError"}class Rl extends Ip{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class al extends Ip{constructor(t,r,n,i){super(t,n,i),this.name=r,this.status=n}}class Di extends al{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function gZ(e){return ze(e)&&e.name==="AuthSessionMissingError"}class Jc extends al{constructor(){super("Auth session or user missing","AuthInvalidToken
70ResponseError",500,void 0)}}class nv extends al{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class iv extends al{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function vZ(e){return ze(e)&&e.name==="AuthImplicitGrantRedirectError"}class YT extends al{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class $j extends al{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function u1(e){return ze(e)&&e.name==="AuthRetryableFetchError"}class XT extends al{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Ij extends al{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Fy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),QT=` 	
71\r=`.split(""),yZ=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<QT.length;t+=1)e[QT[t].charCodeAt(0)]=-2;for(let t=0;t<Fy.length;t+=1)e[Fy[t].charCodeAt(0)]=t;return e})();function ZT(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Fy[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Fy[n]),t.queuedBits-=6}}function $F(e,t,r){const n=yZ[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function JT(e){const t=[],r=a=>{t.push(String.fromCodePoint(a))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},s=a=>{wZ(a,n,r)};for(let a=0;a<e.length;a+=1)$F(e.charCodeAt(a),i,s);return t.join("")}function xZ(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function bZ(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const i=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|i)+65536,r+=1}xZ(n,t)}}function wZ(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function Ku(e){const t=[],r={queue:0,queuedBits:0},n=i=>{t.push(i)};for(let i=0;i<e.length;i+=1)$F(e.charCodeAt(i),r,n);return new Uint8Array(t)}function SZ(e){const t=[];return bZ(e,r=>t.push(r)),new Uint8Array(t)}function Fl(e){const t=[],r={queue:0,queuedBits:0},n=i=>{t.push(i)};return e.forEach(i=>ZT(i,r,n)),ZT(null,r,n),t.join("")}function jZ(e){return Math.round(Date.now()/1e3)+e}function _Z(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const en=()=>typeof window<"u"&&typeof document<"u",xl={tested:!1,writable:!1},IF=()=>{if(!en())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(xl.tested)return xl.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),xl.tested=!0,xl.writable=!0}catch{xl.tested=!0,xl.writable=!1}return xl.writable};function EZ(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((i,s)=>{t[s]=i})}catch{}return r.searchParams.forEach((n,i)=>{t[i]=n}),t}const MF=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...r)=>bf(async()=>{const{default:n}=await Promise.resolve().then(()=>Uc);return{default:n}},void 0).then(({default:n})=>n(...r)):t=fetch,(...r)=>t(...r)},NZ=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",xu=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},bl=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Za=async(e,t)=>{await e.removeItem(t)};class V0{constructor(){this.promise=new V0.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}V0.promiseConstructor=Promise;function d1(e){const t=e.split(".");if(t.length!==3)throw new Ij("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!fZ.test(t[n]))throw new Ij("JWT not in base64url format");return{header:JSON.parse(JT(t[0])),payload:JSON.parse(JT(t[1])),signature:Ku(t[2]),raw:{header:t[0],payload:t[1]}}}async function OZ(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function AZ(e,t){return new Promise((n,i)=>{(async()=>{for(let s=0;s<1/0;s++)try{const a=await e(s);if(!t(s,null,a)){n(a);return}}catch(a){if(!t(s,a)){i(a);return}}})()})}function CZ(e){return("0"+e.toString(16)).substr(-2)}function PZ(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let i="";for(let s=0;s<56;s++)i+=r.charAt(Math.floor(Math.random()*n));return i}return crypto.getRandomValues(t),Array.from(t,CZ).join("")}async function TZ(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),i=new Uint8Array(n);return Array.from(i).map(s=>String.fromCharCode(s)).join("")}async function kZ(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code 
71challenge method will default to use plain instead of sha256."),e;const r=await TZ(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function eu(e,t,r=!1){const n=PZ();let i=n;r&&(i+="/PASSWORD_RECOVERY"),await xu(e,`${t}-code-verifier`,i);const s=await kZ(n);return[s,n===s?"plain":"s256"]}const RZ=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function $Z(e){const t=e.headers.get(Rj);if(!t||!t.match(RZ))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function IZ(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function MZ(e){switch(e){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 DZ=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function tu(e){if(!DZ.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function f1(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="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 "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function LZ(e,t){return new Proxy(e,{get:(r,n,i)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const s=n.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="Symbol(util.inspect.custom)"||s==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,i)}return!t.value&&typeof n=="string"&&(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."),t.value=!0),Reflect.get(r,n,i)}})}function ek(e){return JSON.parse(JSON.stringify(e))}const Ol=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),FZ=[502,503,504];async function tk(e){var t;if(!NZ(e))throw new $j(Ol(e),0);if(FZ.includes(e.status))throw new $j(Ol(e),e.status);let r;try{r=await e.json()}catch(s){throw new Rl(Ol(s),s)}let n;const i=$Z(e);if(i&&i.getTime()>=RF["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new XT(Ol(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Di}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((s,a)=>s&&typeof a=="string",!0))throw new XT(Ol(r),e.status,r.weak_password.reasons);throw new pZ(Ol(r),e.status||500,n)}const BZ=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function Ge(e,t,r,n){var i;const s=Object.assign({},n==null?void 0:n.headers);s[Rj]||(s[Rj]=RF["2024-01-01"].name),n!=null&&n.jwt&&(s.Authorization=`Bearer ${n.jwt}`);const a=(i=n==null?void 0:n.query)!==null&&i!==void 0?i:{};n!=null&&n.redirectTo&&(a.redirect_to=n.redirectTo);const o=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",c=await zZ(e,t,r+o,{headers:s,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(c):{data:Object.assign({},c),error:null}}
71async function zZ(e,t,r,n,i,s){const a=BZ(t,n,i,s);let o;try{o=await e(r,Object.assign({},a))}catch(c){throw console.error(c),new $j(Ol(c),0)}if(o.ok||await tk(o),n!=null&&n.noResolveJson)return o;try{return await o.json()}catch(c){await tk(c)}}function Li(e){var t;let r=null;WZ(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=jZ(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function rk(e){const t=Li(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function po(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function UZ(e){return{data:e,error:null}}function VZ(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:s}=e,a=sl(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:s},c=Object.assign({},a);return{data:{properties:o,user:c},error:null}}function nk(e){return e}function WZ(e){return e.access_token&&e.refresh_token&&e.expires_in}const h1=["global","local","others"];class HZ{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=MF(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,r=h1[0]){if(h1.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${h1.join(", ")}`);try{return await Ge(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ze(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await Ge(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:po})}catch(n){if(ze(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=sl(t,["options"]),i=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(i.new_email=n==null?void 0:n.newEmail,delete i.newEmail),await Ge(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:VZ,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(ze(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await Ge(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:po})}catch(r){if(ze(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,i,s,a,o,c;try{const u={nextPage:null,lastPage:0,total:0},d=await Ge(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(s=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:""},xform:nk});if(d.error)throw d.error;const f=await d.json(),h=(a=d.headers.get("x-total-count"))!==null&&a!==void 0?a:0,p=(c=(o=d.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&c!==void 0?c:[];return p.length>0&&(p.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(g.split(";")[1].split("=")[1]);u[`${v}Page`]=m}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(ze(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){tu(t);try{return await Ge(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:po})}catch(r){if(ze(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){tu(t);try{return await Ge(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:po})}catch(n){if(ze(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){tu(t);
71try{return await Ge(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:po})}catch(n){if(ze(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){tu(t.userId);try{const{data:r,error:n}=await Ge(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:r,error:n}}catch(r){if(ze(r))return{data:null,error:r};throw r}}async _deleteFactor(t){tu(t.userId),tu(t.id);try{return{data:await Ge(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(ze(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,i,s,a,o,c;try{const u={nextPage:null,lastPage:0,total:0},d=await Ge(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(s=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:""},xform:nk});if(d.error)throw d.error;const f=await d.json(),h=(a=d.headers.get("x-total-count"))!==null&&a!==void 0?a:0,p=(c=(o=d.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&c!==void 0?c:[];return p.length>0&&(p.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(g.split(";")[1].split("=")[1]);u[`${v}Page`]=m}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(ze(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await Ge(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ze(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await Ge(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ze(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await Ge(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ze(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await Ge(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ze(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await Ge(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ze(r))return{data:null,error:r};throw r}}}function ik(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const ru={debug:!!(globalThis&&IF()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class DF extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class qZ extends DF{}async function KZ(e,t,r){ru.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),ru.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async i=>{if(i){ru.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await r()}finally{ru.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw ru.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new qZ(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(ru.debug)try{const s=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(s,null,"  "))}catch(s){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",s)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}function GZ(){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)}}function LF(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}
71" is invalid.`);return e.toLowerCase()}function YZ(e){return parseInt(e,16)}function XZ(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function QZ(e){var t;const{chainId:r,domain:n,expirationTime:i,issuedAt:s=new Date,nonce:a,notBefore:o,requestId:c,resources:u,scheme:d,uri:f,version:h}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(a&&a.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!f)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(h!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${h}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
72`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=LF(e.address),g=d?`${d}://${n}`:n,m=e.statement?`${e.statement}
73`:"",v=`${g} wants you to sign in with your Ethereum account:
74${p}
75
76${m}`;let y=`URI: ${f}
77Version: ${h}
78Chain ID: ${r}${a?`
79Nonce: ${a}`:""}
80Issued At: ${s.toISOString()}`;if(i&&(y+=`
81Expiration Time: ${i.toISOString()}`),o&&(y+=`
82Not Before: ${o.toISOString()}`),c&&(y+=`
83Request ID: ${c}`),u){let x=`
84Resources:`;for(const w of u){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);x+=`
85- ${w}`}y+=x}return`${v}
86${y}`}class gr extends Error{constructor({message:t,code:r,cause:n,name:i}){var s;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(s=i??(n instanceof Error?n.name:void 0))!==null&&s!==void 0?s:"Unknown Error",this.code=r}}class By extends gr{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function ZZ({error:e,options:t}){var r,n,i;const{publicKey:s}=t;if(!s)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new gr({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=s.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new gr({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=s.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new gr({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((i=s.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new gr({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new gr({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new gr({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return s.pubKeyCredParams.filter(o=>o.type==="public-key").length===0?new gr({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new gr({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(FF(a)){if(s.rp.id!==a)return new gr({message:`The RP ID "${s.rp.id}
86" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new gr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(s.user.id.byteLength<1||s.user.id.byteLength>64)return new gr({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new gr({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new gr({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function JZ({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new gr({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new gr({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(FF(n)){if(r.rpId!==n)return new gr({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new gr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new gr({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new gr({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class eJ{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const tJ=new eJ;function rJ(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,i=sl(e,["challenge","user","excludeCredentials"]),s=Ku(t).buffer,a=Object.assign(Object.assign({},r),{id:Ku(r.id).buffer}),o=Object.assign(Object.assign({},i),{challenge:s,user:a});if(n&&n.length>0){o.excludeCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const u=n[c];o.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:Ku(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return o}function nJ(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=sl(e,["challenge","allowCredentials"]),i=Ku(t).buffer,s=Object.assign(Object.assign({},n),{challenge:i});if(r&&r.length>0){s.allowCredentials=new Array(r.length);for(let a=0;a<r.length;a++){const o=r[a];s.allowCredentials[a]=Object.assign(Object.assign({},o),{id:Ku(o.id).buffer,type:o.type||"public-key",transports:o.transports})}}return s}function iJ(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Fl(new Uint8Array(e.response.attestationObject)),clientDataJSON:Fl(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function sJ(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),i=e.response;
86return{id:e.id,rawId:e.id,response:{authenticatorData:Fl(new Uint8Array(i.authenticatorData)),clientDataJSON:Fl(new Uint8Array(i.clientDataJSON)),signature:Fl(new Uint8Array(i.signature)),userHandle:i.userHandle?Fl(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function FF(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function sk(){var e,t;return!!(en()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function aJ(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new By("Browser returned unexpected credential type",t)}:{data:null,error:new By("Empty credential response",t)}}catch(t){return{data:null,error:ZZ({error:t,options:e})}}}async function oJ(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new By("Browser returned unexpected credential type",t)}:{data:null,error:new By("Empty credential response",t)}}catch(t){return{data:null,error:JZ({error:t,options:e})}}}const lJ={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"none"},cJ={userVerification:"preferred",hints:["security-key"]};function zy(...e){const t=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),r=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),n={};for(const i of e)if(i)for(const s in i){const a=i[s];if(a!==void 0)if(Array.isArray(a))n[s]=a;else if(r(a))n[s]=a;else if(t(a)){const o=n[s];t(o)?n[s]=zy(o,a):n[s]=zy(a)}else n[s]=a}return n}function uJ(e,t){return zy(lJ,e,t||{})}function dJ(e,t){return zy(cJ,e,t||{})}class fJ{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:i},s){try{const{data:a,error:o}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!a)return{data:null,error:o};const c=i??tJ.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${n}`),u.displayName||(u.displayName=u.name)}switch(a.webauthn.type){case"create":{const u=uJ(a.webauthn.credential_options.publicKey,s==null?void 0:s.create),{data:d,error:f}=await aJ({publicKey:u,signal:c});return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const u=dJ(a.webauthn.credential_options.publicKey,s==null?void 0:s.request),{data:d,error:f}=await oJ(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(a){return ze(a)?{data:null,error:a}:{data:null,error:new Rl("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i}},s){if(!r)return{data:null,error:new Ip("rpId is required for WebAuthn authentication")};try{if(!sk())return{data:null,error:new Rl("Browser does not support WebAuthn",null)};const{data:a,error:o}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:i},{request:s});if(!a)return{data:null,error:o};const{webauthn:c}=a;return this._verify({factorId:t,challengeId:a.challengeId,webauthn:{type:c.type,rpId:r,rpOrigins:n,credential_response:c.credential_response}})}catch(a){return ze(a)?{data:null,error:a}:{data:null,error:new Rl("Unexpected error in authenticate",a)}}}async _register({friendlyName:t,rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i},s){if(!r)return{data:null,error:new Ip("rpId is required for WebAuthn registration")};try{if(!sk())return{data:null,error:new Rl("Browser does not support WebAuthn",null)};const{data:a,error:o}=await this._enroll({friendlyName:t});if(!a)return await this.client.mfa.listFactors().then(d=>{var f;return(f=d.data)===null||f===void 0?void 0:f.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:o};const{data:c,error:u}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:i},{create:s});return c?this._verify({factorId:a.id,challengeId:c.challengeId,webauthn:{rpId:r,rpOrigins:n,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(a){return ze(a)?{data:null,error:a}:{data:null,error:new Rl("Unexpected error in register",a)}}}}GZ();const hJ={url:cZ,storageKey:uZ,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:dZ,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function ak(e,t,r){return await r()}const nu={};class Mp{get jwks(){var t,r;return(r=(t=nu[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){nu[this.storageKey]=Object.assign(Object.assign({},nu[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=nu[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){nu[this.storageKey]=Object.assign(Object.assign({},nu[this.storageKey]),{cachedAt:t})}constructor(t){var r,n;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=Mp.nextInstanceID,Mp.nextInstanceID+=1,this.instanceID>0&&en()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const i=Object.assign(Object.assign({},hJ),t);if(this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.persistSession=i.persistSession,this.storageKey=i.storageKey,this.autoRefreshToken=i.autoRefreshToken,this.admin=new HZ({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=MF(i.fetch),this.lock=i.lock||ak,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,i.lock?this.lock=i.lock:en()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=KZ:this.lock=ak,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),webauthn:new fJ(this)}
86,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:IF()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=ik(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=ik(this.memoryStorage)),en()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(s){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",s)}(n=this.broadcastChannel)===null||n===void 0||n.addEventListener("message",async s=>{this._debug("received broadcast notification from other tab or client",s),await this._notifyAllSubscribers(s.data.event,s.data.session,!1)})}this.initialize()}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${kF}) ${new Date().toISOString()}`,...t),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 t;try{const r=EZ(window.location.href);let n="none";if(this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce"),en()&&this.detectSessionInUrl&&n!=="none"){const{data:i,error:s}=await this._getSessionFromURL(r,n);if(s){if(this._debug("#_initialize()","error detecting session from URL",s),vZ(s)){const c=(t=s.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:s}}return await this._removeSession(),{error:s}}const{session:a,redirectType:o}=i;return this._debug("#_initialize()","detected session in URL",a,"redirect type",o),await this._saveSession(a),setTimeout(async()=>{o==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",a):await this._notifyAllSubscribers("SIGNED_IN",a)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return ze(r)?{error:r}:{error:new Rl("Unexpected error during initialization",r)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,i;try{const s=await Ge(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:Li}),{data:a,error:o}=s;if(o||!a)return{data:{user:null,session:null},error:o};const c=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),{data:{user:u,session:c},error:null}}catch(s){if(ze(s))return{data:{user:null,session:null},error:s};throw s}}async signUp(t){var r,n,i;try{let s;if("email"in t){const{email:d,password:f,options:h}=t;let p=null,g=null;this.flowType==="pkce"&&([p,g]=await eu(this.storage,this.storageKey)),s=await Ge(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:d,password:f,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:p,code_challenge_method:g},xform:Li})}else if("phone"in t){const{phone:d,password:f,options:h}=t;s=await Ge(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:f,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},channel:(i=h==null?void 0:h.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:Li})}else throw new nv("You must provide either an email or phone number and a password");const{data:a,error:o}=s;if(o||!a)return{data:{user:null,session:null},error:o};const c=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",c)),{data:{user:u,session:c},error:null}}catch(s){if(ze(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithPassword(t){try{let r;if("email"in t){const{email:s,password:a,options:o}=t;r=await Ge(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:rk})}else if("phone"in t){const{phone:s,password:a,options:o}=t;r=await Ge(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:rk})}else throw new nv("You must provide either an email or phone number and a password");const{data:n,error:i}=r;return i?{data:{user:null,session:null},error:i}:!n||!n.session||!n.user?{data:{user:null,session:null},error:new Jc}:(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:i})}catch(r){if(ze(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOAuth(t){var r,n,i,s;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(s=t.options)===null||s===void 0?void 0:s.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,i,s,a,o,c,u,d,f,h;let p,g;if("message"in t)p=t.message,g=t.signature;else{const{chain:m,wallet:v,statement:y,options:x}=t;let w;if(en())if(typeof v=="object")w=v;else{const O=window;if("ethereum"in O&&typeof O.ethereum=="object"&&"request"in O.ethereum&&typeof O.ethereum.request=="function")w=O.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) 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: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=v}const S=new URL((r=x==null?void 0:x.url)!==null&&r!==void 0?r:window.location.href),j=await w.request({method:"eth_requestAccounts"}).then(O=>O).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!j||j.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=LF(j[0]);let _=(n=x==null?void 0:x.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!_){const O=await w.request({method:"eth_chainId"});_=YZ(O)}const N={domain:S.host,address:E,statement:y,uri:S.href,version:"1",chainId:_,nonce:(i=x==null?void 0:x.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(a=(s=x==null?void 0:x.signInWithEthereum)===null||s===void 0?void 0:s.issuedAt)!==null&&a!==void 0?a:new Date,expirationTime:(o=x==null?void 0:x.signInWithEthereum)===null||o===void 0?void 0:o.expirationTime,notBefore:(c=x==null?void 0:x.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=x==null?void 0:x.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=x==null?void 0:x.signInWithEthereum)===null||d===void 0?void 0:d.resources};p=QZ(N),g=await w.request({method:"personal_sign",params:[XZ(p),E]})}try{const{data:m,error:v}=await Ge(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:g},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Li});if(v)throw v;return!m||!m.session||!m.user?{data:{user:null,session:null},error:new Jc}:(m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),{data:Object.assign({},m),error:v})}catch(m){if(ze(m))return{data:{user:null,session:null},error:m};throw m}}async signInWithSolana(t){var r,n,i,s,a,o,c,u,d,f,h,p;let g,m;if("message"in t)g=t.message,m=t.signature;else{const{chain:v,wallet:y,statement:x,options:w}=t;let S;if(en())if(typeof y=="object")S=y;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))S=E.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 y!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=y}const j=new URL((r=w==null?void 0:w.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in S&&S.signIn){const E=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:j.host,uri:j.href}),x?{statement:x}:null));let _;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")_=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)_=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in _&&"signature"in _&&(typeof _.signedMessage=="string"||_.signedMessage instanceof Uint8Array)&&_.signature instanceof Uint8Array)g=typeof _.signedMessage=="string"?_.signedMessage:new TextDecoder().decode(_.signedMessage),m=_.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");g=[`${j.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...x?["",x,""]:[""],"Version: 1",`URI: ${j.href}`,`Issued At: ${(i=(n=w==null?void 0:w.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((s=w==null?void 0:w.signInWithSolana)===null||s===void 0)&&s.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((u=w==null?void 0:w.signInWithSolana)===null||u===void 0)&&u.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
86InWithSolana.resources.map(_=>`- ${_}`)]:[]].join(`
87`);const E=await S.signMessage(new TextEncoder().encode(g),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=E}}try{const{data:v,error:y}=await Ge(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:g,signature:Fl(m)},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Li});if(y)throw y;return!v||!v.session||!v.user?{data:{user:null,session:null},error:new Jc}:(v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),{data:Object.assign({},v),error:y})}catch(v){if(ze(v))return{data:{user:null,session:null},error:v};throw v}}async _exchangeCodeForSession(t){const r=await bl(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{const{data:s,error:a}=await Ge(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Li});if(await Za(this.storage,`${this.storageKey}-code-verifier`),a)throw a;return!s||!s.session||!s.user?{data:{user:null,session:null,redirectType:null},error:new Jc}:(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:Object.assign(Object.assign({},s),{redirectType:i??null}),error:a})}catch(s){if(ze(s))return{data:{user:null,session:null,redirectType:null},error:s};throw s}}async signInWithIdToken(t){try{const{options:r,provider:n,token:i,access_token:s,nonce:a}=t,o=await Ge(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:i,access_token:s,nonce:a,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Li}),{data:c,error:u}=o;return u?{data:{user:null,session:null},error:u}:!c||!c.session||!c.user?{data:{user:null,session:null},error:new Jc}:(c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),{data:c,error:u})}catch(r){if(ze(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOtp(t){var r,n,i,s,a;try{if("email"in t){const{email:o,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await eu(this.storage,this.storageKey));const{error:f}=await Ge(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return{data:{user:null,session:null},error:f}}if("phone"in t){const{phone:o,options:c}=t,{data:u,error:d}=await Ge(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(i=c==null?void 0:c.data)!==null&&i!==void 0?i:{},create_user:(s=c==null?void 0:c.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(a=c==null?void 0:c.channel)!==null&&a!==void 0?a:"sms"}});return{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d}}throw new nv("You must provide either an email or phone number.")}catch(o){if(ze(o))return{data:{user:null,session:null},error:o};throw o}}async verifyOtp(t){var r,n;try{let i,s;"options"in t&&(i=(r=t.options)===null||r===void 0?void 0:r.redirectTo,s=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:a,error:o}=await Ge(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:s}}),redirectTo:i,xform:Li});if(o)throw o;if(!a)throw new Error("An error occurred on token verification.");const c=a.session,u=a.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),{data:{user:u,session:c},error:null}}catch(i){if(ze(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithSSO(t){var r,n,i;try{let s=null,a=null;return this.flowType==="pkce"&&([s,a]=await eu(this.storage,this.storageKey)),await Ge(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:s,code_challenge_method:a}),headers:this.headers,xform:UZ})}catch(s){if(ze(s))return{data:null,error:s};throw s}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Di;const{error:i}=await Ge(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return{data:{user:null,session:null},error:i}})}catch(t){if(ze(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:i,options:s}=t,{error:a}=await Ge(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},redirectTo:s==null?void 0:s.emailRedirectTo});return{data:{user:null,session:null},error:a}}else if("phone"in t){const{phone:n,type:i,options:s}=t,{data:a,error:o}=await Ge(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}}});return{data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:o}}throw new nv("You must provide either an email or phone number and a type")}catch(r){if(ze(r))return{data:{user:null,session:null},error:r};throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await bl(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
87id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<c1:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const a=await bl(this.userStorage,this.storageKey+"-user");a!=null&&a.user?t.user=a.user:t.user=f1()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const a={value:this.suppressGetSessionWarning};t.user=LZ(t.user,a),a.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:i,error:s}=await this._callRefreshToken(t.refresh_token);return s?{data:{session:null},error:s}:{data:{session:i},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await Ge(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:po}):await this._useSession(async r=>{var n,i,s;const{data:a,error:o}=r;if(o)throw o;return!(!((n=a.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Di}:await Ge(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(i=a.session)===null||i===void 0?void 0:i.access_token)!==null&&s!==void 0?s:void 0,xform:po})})}catch(r){if(ze(r))return gZ(r)&&(await this._removeSession(),await Za(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:r};throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:i,error:s}=n;if(s)throw s;if(!i.session)throw new Di;const a=i.session;let o=null,c=null;this.flowType==="pkce"&&t.email!=null&&([o,c]=await eu(this.storage,this.storageKey));const{data:u,error:d}=await Ge(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:o,code_challenge_method:c}),jwt:a.access_token,xform:po});if(d)throw d;return a.user=u.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),{data:{user:a.user},error:null}})}catch(n){if(ze(n))return{data:{user:null},error:n};throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Di;const r=Date.now()/1e3;let n=r,i=!0,s=null;const{payload:a}=d1(t.access_token);if(a.exp&&(n=a.exp,i=n<=r),i){const{data:o,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return{data:{user:null,session:null},error:c};if(!o)return{data:{user:null,session:null},error:null};s=o}else{const{data:o,error:c}=await this._getUser(t.access_token);if(c)throw c;s={access_token:t.access_token,refresh_token:t.refresh_token,user:o.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)}return{data:{user:s.user,session:s},error:null}}catch(r){if(ze(r))return{data:{session:null,user:null},error:r};throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:a,error:o}=r;if(o)throw o;t=(n=a.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Di;const{data:i,error:s}=await this._callRefreshToken(t.refresh_token);return s?{data:{user:null,session:null},error:s}:i?{data:{user:i.user,session:i},error:null}:{data:{user:null,session:null},error:null}})}catch(r){if(ze(r))return{data:{user:null,session:null},error:r};throw r}}async _getSessionFromURL(t,r){try{if(!en())throw new iv("No browser detected.");if(t.error||t.error_description||t.error_code)throw new iv(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new YT("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new iv("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new YT("No code detected.");const{data:x,error:w}=await this._exchangeCodeForSession(t.code);
87if(w)throw w;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:x.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:i,access_token:s,refresh_token:a,expires_in:o,expires_at:c,token_type:u}=t;if(!s||!o||!a||!u)throw new iv("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(o);let h=d+f;c&&(h=parseInt(c));const p=h-d;p*1e3<=yu&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${f}s`);const g=h-f;d-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,h,d):d-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,h,d);const{data:m,error:v}=await this._getUser(s);if(v)throw v;const y={provider_token:n,provider_refresh_token:i,access_token:s,expires_in:f,expires_at:h,refresh_token:a,token_type:u,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:y,redirectType:t.type},error:null}}catch(n){if(ze(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await bl(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:i,error:s}=r;if(s)return{error:s};const a=(n=i.session)===null||n===void 0?void 0:n.access_token;if(a){const{error:o}=await this.admin.signOut(a,t);if(o&&!(mZ(o)&&(o.status===404||o.status===401||o.status===403)))return{error:o}}return t!=="others"&&(await this._removeSession(),await Za(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(t){const r=_Z(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,i;try{const{data:{session:s},error:a}=r;if(a)throw a;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",s)),this._debug("INITIAL_SESSION","callback id",t,"session",s)}catch(s){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",s),console.error(s)}})}async resetPasswordForEmail(t,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await eu(this.storage,this.storageKey,!0));try{return await Ge(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:i,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(s){if(ze(s))return{data:null,error:s};throw s}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return{data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(r){if(ze(r))return{data:null,error:r};throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:i}=await this._useSession(async s=>{var a,o,c,u,d;const{data:f,error:h}=s;if(h)throw h;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(a=t.options)===null||a===void 0?void 0:a.redirectTo,scopes:(o=t.options)===null||o===void 0?void 0:o.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await Ge(this.fetch,"GET",p,{headers:this.headers,jwt:(d=(u=f.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(i)throw i;return en()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),{data:{provider:t.provider,url:n==null?void 0:n.url},error:null}}catch(n){if(ze(n))return{data:{provider:t.provider,url:null},error:n};throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:i,data:{session:s}}=r;if(i)throw i;const{options:a,provider:o,token:c,access_token:u,nonce:d}=t,f=await Ge(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=s==null?void 0:s.access_token)!==null&&n!==void 0?n:void 0,body:{provider:o,id_token:c,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Li}),{data:h,error:p}=f;return p?{data:{user:null,session:null},error:p}:!h||!h.session||!h.user?{data:{user:null,session:null},error:new Jc}:(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),{data:h,error:p})}catch(i){if(ze(i))return{data:{user:null,session:null},error:i};throw i}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,i;const{data:s,error:a}=r;if(a)throw a;
87return await Ge(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(n=s.session)===null||n===void 0?void 0:n.access_token)!==null&&i!==void 0?i:void 0})})}catch(r){if(ze(r))return{data:null,error:r};throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await AZ(async i=>(i>0&&await OZ(200*Math.pow(2,i-1)),this._debug(r,"refreshing attempt",i),await Ge(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Li})),(i,s)=>{const a=200*Math.pow(2,i);return s&&u1(s)&&Date.now()+a-n<yu})}catch(n){if(this._debug(r,"error",n),ze(n))return{data:{session:null,user:null},error:n};throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),en()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const i=await bl(this.storage,this.storageKey);if(i&&this.userStorage){let a=await bl(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!a&&(a={user:i.user},await xu(this.userStorage,this.storageKey+"-user",a)),i.user=(t=a==null?void 0:a.user)!==null&&t!==void 0?t:f1()}else if(i&&!i.user&&!i.user){const a=await bl(this.storage,this.storageKey+"-user");a&&(a!=null&&a.user)?(i.user=a.user,await Za(this.storage,this.storageKey+"-user"),await xu(this.storage,this.storageKey,i)):i.user=f1()}if(this._debug(n,"session from storage",i),!this._isValidSession(i)){this._debug(n,"session is not valid"),i!==null&&await this._removeSession();return}const s=((r=i.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<c1;if(this._debug(n,`session has${s?"":" not"} expired with margin of ${c1}s`),s){if(this.autoRefreshToken&&i.refresh_token){const{error:a}=await this._callRefreshToken(i.refresh_token);a&&(console.error(a),u1(a)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",a),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:a,error:o}=await this._getUser(i.access_token);!o&&(a!=null&&a.user)?(i.user=a.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(a){console.error("Error getting user data:",a),this._debug(n,"error getting user data, skipping SIGNED_IN notification",a)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(n,"error",i),console.error(i);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new Di;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new V0;const{data:s,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!s.session)throw new Di;await this._saveSession(s.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",s.session);const o={data:s.session,error:null};return this.refreshingDeferred.resolve(o),o}catch(s){if(this._debug(i,"error",s),ze(s)){const a={data:null,error:s};return u1(s)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(a),a}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(s),s}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,r,n=!0){const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const s=[],a=Array.from(this.stateChangeEmitters.values()).map(async o=>{try{await o.callback(t,r)}catch(c){s.push(c)}});if(await Promise.all(a),s.length>0){for(let o=0;o<s.length;o+=1)console.error(s[o]);throw s[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await xu(this.userStorage,this.storageKey+"-user",{user:r.user});const i=Object.assign({},r);delete i.user;const s=ek(i);await xu(this.storage,this.storageKey,s)}else{const i=ek(r);await xu(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),await Za(this.storage,this.storageKey),await Za(this.storage,this.storageKey+"-code-verifier"),await Za(this.storage,this.storageKey+"-user"),this.userStorage&&await Za(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&en()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
87catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),yu);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}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 t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((n.expires_at*1e3-t)/yu);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${yu}ms, refresh threshold is ${kj} ticks`),i<=kj&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof DF)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!en()||!(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(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const i=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&i.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&i.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[s,a]=await eu(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(a)}`});i.push(o.toString())}if(n!=null&&n.queryParams){const s=new URLSearchParams(n.queryParams);i.push(s.toString())}return n!=null&&n.skipBrowserRedirect&&i.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:i,error:s}=r;return s?{data:null,error:s}:await Ge(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(ze(r))return{data:null,error:r};throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,i;const{data:s,error:a}=r;if(a)return{data:null,error:a};const o=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await Ge(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return u?{data:null,error:u}:(t.factorType==="totp"&&c.type==="totp"&&(!((i=c==null?void 0:c.totp)===null||i===void 0)&&i.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),{data:c,error:null})})}catch(r){if(ze(r))return{data:null,error:r};throw r}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:s}=r;if(s)return{data:null,error:s};const a=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?iJ(t.webauthn.credential_response):sJ(t.webauthn.credential_response)})}:{code:t.code}),{data:o,error:c}=await Ge(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?{data:null,error:c}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:c})})}catch(r){if(ze(r))return{data:null,error:r};throw r}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:s}=r;if(s)return{data:null,error:s};const a=await Ge(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});if(a.error)return a;const{data:o}=a;if(o.type!=="webauthn")return{data:o,error:null};switch(o.webauthn.type){case"create":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:rJ(o.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:nJ(o.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(ze(r))return{data:null,error:r};throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?{data:null,error:n}:await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const i={all:[],phone:[],totp:[],webauthn:[]};for(const s of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])i.all.push(s),s.status==="verified"&&i[s.factor_type].push(s);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(){var t,r;const{data:{session:n},error:i}
87=await this.getSession();if(i)return{data:null,error:i};if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:s}=d1(n.access_token);let a=null;s.aal&&(a=s.aal);let o=a;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(o="aal2");const u=s.amr||[];return{data:{currentLevel:a,nextLevel:o,currentAuthenticationMethods:u},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?{data:null,error:i}:n?await Ge(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):{data:null,error:new Di}})}catch(r){if(ze(r))return{data:null,error:r};throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:i},error:s}=n;if(s)return{data:null,error:s};if(!i)return{data:null,error:new Di};const a=await Ge(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:o=>({data:o,error:null})});return a.data&&a.data.redirect_url&&en()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(n){if(ze(n))return{data:null,error:n};throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:i},error:s}=n;if(s)return{data:null,error:s};if(!i)return{data:null,error:new Di};const a=await Ge(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:o=>({data:o,error:null})});return a.data&&a.data.redirect_url&&en()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(n){if(ze(n))return{data:null,error:n};throw n}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(o=>o.kid===t);if(n)return n;const i=Date.now();if(n=this.jwks.keys.find(o=>o.kid===t),n&&this.jwks_cached_at+hZ>i)return n;const{data:s,error:a}=await Ge(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!s.keys||s.keys.length===0||(this.jwks=s,this.jwks_cached_at=i,n=s.keys.find(o=>o.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:p,error:g}
87=await this.getSession();if(g||!p.session)return{data:null,error:g};n=p.session.access_token}const{header:i,payload:s,signature:a,raw:{header:o,payload:c}}=d1(n);r!=null&&r.allowExpired||IZ(s.exp);const u=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:p}=await this.getUser(n);if(p)throw p;return{data:{claims:s,header:i,signature:a},error:null}}const d=MZ(i.alg),f=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,f,a,SZ(`${o}.${c}`)))throw new Ij("Invalid JWT signature");return{data:{claims:s,header:i,signature:a},error:null}}catch(n){if(ze(n))return{data:null,error:n};throw n}}}Mp.nextInstanceID=0;const pJ=Mp;class mJ extends pJ{constructor(t){super(t)}}class gJ{constructor(t,r,n){var i,s,a;this.supabaseUrl=t,this.supabaseKey=r;const o=lZ(t);if(!r)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const c=`sb-${o.hostname.split(".")[0]}-auth-token`,u={db:eZ,realtime:rZ,auth:Object.assign(Object.assign({},tZ),{storageKey:c}),global:JQ},d=oZ(n??{},u);this.storageKey=(i=d.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(s=d.global.headers)!==null&&s!==void 0?s:{},d.accessToken?(this.accessToken=d.accessToken,this.auth=new Proxy({},{get:(f,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((a=d.auth)!==null&&a!==void 0?a:{},this.headers,d.global.fetch),this.fetch=sZ(r,this._getAccessToken.bind(this),d.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},d.realtime)),this.rest=new cQ(new URL("rest/v1",o).href,{headers:this.headers,schema:d.db.schema,fetch:this.fetch}),this.storage=new XQ(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),d.accessToken||this._listenForAuthEvents()}get functions(){return new tQ(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,r={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,r,n)}channel(t,r={config:{}}){return this.realtime.channel(t,r)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t,r;if(this.accessToken)return await this.accessToken();const{data:n}=await this.auth.getSession();return(r=(t=n.session)===null||t===void 0?void 0:t.access_token)!==null&&r!==void 0?r:this.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:r,detectSessionInUrl:n,storage:i,userStorage:s,storageKey:a,flowType:o,lock:c,debug:u},d,f){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new mJ({url:this.authUrl.href,headers:Object.assign(Object.assign({},h),d),storageKey:a,autoRefreshToken:t,persistSession:r,detectSessionInUrl:n,storage:i,userStorage:s,flowType:o,lock:c,debug:u,fetch:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p=>p.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new NQ(this.realtimeUrl.href,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(t,r,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const vJ=(e,t,r)=>new gJ(e,t,r);
87function yJ(){if(typeof window<"u"||typeof process>"u")return!1;const e=process.version;if(e==null)return!1;const t=e.match(/^v(\d+)\./);return t?parseInt(t[1],10)<=18:!1}yJ()&&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 Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const xJ="https://cwmuvbqsynwiqofcnhxp.supabase.co",bJ="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImN3bXV2YnFzeW53aXFvZmNuaHhwIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTk5NDEwODIsImV4cCI6MjA3NTUxNzA4Mn0.qpmFCs2Bs9a7lXIgX3KBwIsaw4LKGzwOhOKMtRQ-gT4",BF=vJ(xJ,bJ,{auth:{autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0}});async function zF(e){if(!e.ok){const t=await e.text()||e.statusText;throw new Error(`${e.status}: ${t}`)}}async function Ws(e,t,r){const{data:{session:n}}=await BF.auth.getSession(),i={...r?{"Content-Type":"application/json"}:{},...n!=null&&n.access_token?{Authorization:`Bearer ${n.access_token}`}:{}},s=await fetch(t,{method:e,headers:i,body:r?JSON.stringify(r):void 0,credentials:"include"});return await zF(s),s}const wJ=({on401:e})=>async({queryKey:t})=>{const{data:{session:r}}=await BF.auth.getSession(),n={...r!=null&&r.access_token?{Authorization:`Bearer ${r.access_token}`}:{}};let i=t[0];if(t.length>1&&typeof t[1]=="object"&&t[1]!==null){const a=new URLSearchParams;Object.entries(t[1]).forEach(([c,u])=>{u&&a.append(c,u)});const o=a.toString();o&&(i=`${i}?${o}`)}const s=await fetch(i,{headers:n,credentials:"include"});return await zF(s),await s.json()},UF=new IX({defaultOptions:{queries:{queryFn:wJ({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}}),SJ=1,jJ=1e6;let p1=0;function _J(){return p1=(p1+1)%Number.MAX_SAFE_INTEGER,p1.toString()}const m1=new Map,ok=e=>{if(m1.has(e))return;const t=setTimeout(()=>{m1.delete(e),sp({type:"REMOVE_TOAST",toastId:e})},jJ);m1.set(e,t)},EJ=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,SJ)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?ok(r):e.toasts.forEach(n=>{ok(n.id)}),{...e,toasts:e.toasts.map(n=>
vendor: 13,917 bytes, line 87
87n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Jv=[];let ey={toasts:[]};function sp(e){ey=EJ(ey,e),Jv.forEach(t=>{t(ey)})}function NJ({...e}){const t=_J(),r=i=>sp({type:"UPDATE_TOAST",toast:{...i,id:t}}),n=()=>sp({type:"DISMISS_TOAST",toastId:t});return sp({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||n()}}}),{id:t,dismiss:n,update:r}}function kn(){const[e,t]=b.useState(ey);return b.useEffect(()=>(Jv.push(t),()=>{const r=Jv.indexOf(t);r>-1&&Jv.splice(r,1)}),[e]),{...e,toast:NJ,dismiss:r=>sp({type:"DISMISS_TOAST",toastId:r})}}function fe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function lk(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function W0(...e){return t=>{let r=!1;const n=e.map(i=>{const s=lk(i,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let i=0;i<n.length;i++){const s=n[i];typeof s=="function"?s():lk(e[i],null)}}}}function Ye(...e){return b.useCallback(W0(...e),e)}function OJ(e,t){const r=b.createContext(t),n=s=>{const{children:a,...o}=s,c=b.useMemo(()=>o,Object.values(o));return l.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function i(s){const a=b.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,i]}function Zr(e,t=[]){let r=[];function n(s,a){const o=b.createContext(a),c=r.length;r=[...r,a];const u=f=>{var y;const{scope:h,children:p,...g}=f,m=((y=h==null?void 0:h[e])==null?void 0:y[c])||o,v=b.useMemo(()=>g,Object.values(g));return l.jsx(m.Provider,{value:v,children:p})};u.displayName=s+"Provider";function d(f,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[c])||o,g=b.useContext(p);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=r.map(a=>b.createContext(a));return function(o){const c=(o==null?void 0:o[e])||s;return b.useMemo(()=>({[`__scope${e}`]:{...o,[e]:c}}),[o,c])}};return i.scopeName=e,[n,AJ(i,...t)]}function AJ(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=n.reduce((o,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...o,...f}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function xc(e){const t=CJ(e),r=b.forwardRef((n,i)=>{const{children:s,...a}=n,o=b.Children.toArray(s),c=o.find(PJ);if(c){const u=c.props.children,d=o.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return l.jsx(t,{...a,ref:i,children:b.isValidElement(u)?b.cloneElement(u,void 0,d):null})}return l.jsx(t,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}var VF=xc("Slot");function CJ(e){const t=b.forwardRef((r,n)=>{const{children:i,...s}=r;if(b.isValidElement(i)){const a=kJ(i),o=TJ(s,i.props);return i.type!==b.Fragment&&(o.ref=n?W0(n,a):a),b.cloneElement(i,o)}return b.Children.count(i)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var WF=Symbol("radix.slottable");function HF(e){const t=({children:r})=>l.jsx(l.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=WF,t}function PJ(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WF}function TJ(e,t){const r={...t};for(const n in t){const i=e[n],s=t[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...o)=>{const c=s(...o);return i(...o),c}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function kJ(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Ym(e){const t=e+"CollectionProvider",[r,n]=Zr(t),[i,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:v,children:y}=m,x=P.useRef(null),w=P.useRef(new Map).current;return l.jsx(i,{scope:v,itemMap:w,collectionRef:x,children:y})};a.displayName=t;const o=e+"CollectionSlot",c=xc(o),u=P.forwardRef((m,v)=>{const{scope:y,children:x}=m,w=s(o,y),S=Ye(v,w.collectionRef);return l.jsx(c,{ref:S,children:x})});u.displayName=o;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=xc(d),p=P.forwardRef((m,v)=>{const{scope:y,children:x,...w}=m,S=P.useRef(null),j=Ye(v,S),E=s(d,y);return P.useEffect(()=>(E.itemMap.set(S,{ref:S,...w}),()=>void E.itemMap.delete(S))),l.jsx(h,{[f]:"",ref:j,children:x})});p.displayName=d;function g(m){const v=s(e+"CollectionConsumer",m);return P.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((E,_)=>w.indexOf(E.ref.current)-w.indexOf(_.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:u,ItemSlot:p},g,n]}var RJ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=RJ.reduce((e,t)=>{const r=xc(`Primitive.${t}`),n=b.forwardRef((i,s)=>{const{asChild:a,...o}=i,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function wO(e,t){e&&as.flushSync(()=>e.dispatchEvent(t))}function lr(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function $J(e,t=globalThis==null?void 0:globalThis.document){const r=lr(e);b.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var IJ="DismissableLayer",Mj="dismissableLayer.update",MJ="dismissableLayer.pointerDownOutside",DJ="dismissableLayer.focusOutside",ck,qF=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jf=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...c}=e,u=b.useContext(qF),[d,f]=b.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=b.useState({}),g=Ye(t,_=>f(_)),m=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),x=d?m.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,j=FJ(_=>{const N=_.target,O=[...u.branches].some(C=>C.contains(N));!S||O||(i==null||i(_),a==null||a(_),_.defaultPrevented||o==null||o())},h),E=BJ(_=>{const N=_.target;[...u.branches].some(C=>C.contains(N))||(s==null||s(_),a==null||a(_),_.defaultPrevented||o==null||o())},h);return $J(_=>{x===u.layers.size-1&&(n==null||n(_),!_.defaultPrevented&&o&&(_.preventDefault(),o()))},h),b.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ck=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),uk(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ck)}},[d,h,r,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),uk())},[d,u]),b.useEffect(()=>{const _=()=>p({});return document.addEventListener(Mj,_),()=>document.removeEventListener(Mj,_)},[]),l.jsx(ke.div,{...c,ref:g,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:fe(e.onFocusCapture,E.onFocusCapture),onBlurCapture:fe(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:fe(e.onPointerDownCapture,j.onPointerDownCapture)})});jf.displayName=IJ;var LJ="DismissableLayerBranch",KF=b.forwardRef((e,t)=>{const r=b.useContext(qF),n=b.useRef(null),i=Ye(t,n);return b.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),l.jsx(ke.div,{...e,ref:i})});KF.displayName=LJ;function FJ(e,t=globalThis==null?void 0:globalThis.document){const r=lr(e),n=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{const s=o=>{if(o.target&&!n.current){let c=function(){GF(MJ,r,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function BJ(e,t=globalThis==null?void 0:globalThis.document){const r=lr(e),n=b.useRef(!1);return b.useEffect(()=>{const i=s=>{s.target&&!n.current&&GF(DJ,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function uk(){const e=new CustomEvent(Mj);document.dispatchEvent(e)}function GF(e,t,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?wO(i,s):i.dispatchEvent(s)}var zJ=jf,UJ=KF,hr=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},VJ="Portal",Xm=b.forwardRef((e,t)=>{var o;const{container:r,...n}=e,[i,s]=b.useState(!1);hr(()=>s(!0),[]);const a=r||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?tp.createPortal(l.jsx(ke.div,{...n,ref:t}),a):null});Xm.displayName=VJ;function WJ(e,t){return b.useReducer((r,n)=>t[r][n]??r,e)}var yn=e=>{const{present:t,children:r}=e,n=HJ(t),i=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),s=Ye(n.ref,qJ(i));return typeof r=="function"||n.isPresent?b.cloneElement(i,{ref:s}):null};yn.displayName="Presence";function HJ(e){const[t,r]=b.useState(),n=b.useRef(null),i=b.useRef(e),s=b.useRef("none"),a=e?"mounted":"unmounted",[o,c]=WJ(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=sv(n.current);s.current=o==="mounted"?u:"none"},[o]),hr(()=>{const u=n.current,d=i.current;if(d!==e){const h=s.current,p=sv(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),hr(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const m=sv(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(c("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=p=>{p.target===t&&(s.current=sv(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:b.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function sv(e){return(e==null?void 0:e.animationName)||"none"}function qJ(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var KJ=fN[" useInsertionEffect ".trim().toString()]||hr;function Ra({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,s,a]=GJ({defaultProp:t,onChange:r}),o=e!==void 0,c=o?e:i;{const d=b.useRef(e!==void 0);b.useEffect(()=>{const f=d.current;f!==o&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=o},[o,n])}const u=b.useCallback(d=>{var f;if(o){const h=YJ(d)?d(e):d;h!==e&&((f=a.current)==null||f.call(a,h))}else s(d)},[o,e,s,a]);return[c,u]}function GJ({defaultProp:e,onChange:t}){const[r,n]=b.useState(e),i=b.useRef(r),s=b.useRef(t);return KJ(()=>{s.current=t},[t]),b.useEffect(()=>{var a;i.current!==r&&((a=s.current)==null||a.call(s,r),i.current=r)},[r,i]),[r,n,s]}function YJ(e){return typeof e=="function"}var YF=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),XJ="VisuallyHidden",H0=b.forwardRef((e,t)=>l.jsx(ke.span,{...e,ref:t,style:{...YF,...e.style}}));H0.displayName=XJ;var QJ=H0,SO="ToastProvider",[jO,ZJ,JJ]=Ym("Toast"),[XF]=Zr("Toast",[JJ]),[eee,q0]=XF(SO),QF=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:a}=e,[o,c]=b.useState(null),[u,d]=b.useState(0),f=b.useRef(!1),h=b.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${SO}\`. Expected non-empty \`string\`.`),l.jsx(jO.Provider,{scope:t,children:l.jsx(eee,{scope:t,label:r,duration:n,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:o,onViewportChange:c,onToastAdd:b.useCallback(()=>d(p=>p+1),[]),onToastRemove:b.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:a})})};QF.displayName=SO;var ZF="ToastViewport",tee=["F8"],Dj="toast.viewportPause",Lj="toast.viewportResume",JF=b.forwardRef((e,t)=>
87{const{__scopeToast:r,hotkey:n=tee,label:i="Notifications ({hotkey})",...s}=e,a=q0(ZF,r),o=ZJ(r),c=b.useRef(null),u=b.useRef(null),d=b.useRef(null),f=b.useRef(null),h=Ye(t,f,a.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=a.toastCount>0;b.useEffect(()=>{const v=y=>{var w;n.length!==0&&n.every(S=>y[S]||y.code===S)&&((w=f.current)==null||w.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[n]),b.useEffect(()=>{const v=c.current,y=f.current;if(g&&v&&y){const x=()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(Dj);y.dispatchEvent(E),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(Lj);y.dispatchEvent(E),a.isClosePausedRef.current=!1}},S=E=>{!v.contains(E.relatedTarget)&&w()},j=()=>{v.contains(document.activeElement)||w()};return v.addEventListener("focusin",x),v.addEventListener("focusout",S),v.addEventListener("pointermove",x),v.addEventListener("pointerleave",j),window.addEventListener("blur",x),window.addEventListener("focus",w),()=>{v.removeEventListener("focusin",x),v.removeEventListener("focusout",S),v.removeEventListener("pointermove",x),v.removeEventListener("pointerleave",j),window.removeEventListener("blur",x),window.removeEventListener("focus",w)}}},[g,a.isClosePausedRef]);const m=b.useCallback(({tabbingDirection:v})=>{const x=o().map(w=>{const S=w.ref.current,j=[S,...pee(S)];return v==="forwards"?j:j.reverse()});return(v==="forwards"?x.reverse():x).flat()},[o]);return b.useEffect(()=>{const v=f.current;if(v){const y=x=>{var j,E,_;const w=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!w){const N=document.activeElement,O=x.shiftKey;if(x.target===v&&O){(j=u.current)==null||j.focus();return}const $=m({tabbingDirection:O?"backwards":"forwards"}),D=$.findIndex(A=>A===N);g1($.slice(D+1))?x.preventDefault():O?(E=u.current)==null||E.focus():(_=d.current)==null||_.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[o,m]),l.jsxs(UJ,{ref:c,role:"region","aria-label":i.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&l.jsx(Fj,{ref:u,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});g1(v)}}),l.jsx(jO.Slot,{scope:r,children:l.jsx(ke.ol,{tabIndex:-1,...s,ref:h})}),g&&l.jsx(Fj,{ref:d,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});g1(v)}})]})});JF.displayName=ZF;var e5="ToastFocusProxy",Fj=b.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...i}=e,s=q0(e5,r);return l.jsx(H0,{tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:a=>{var u;const o=a.relatedTarget;!((u=s.viewport)!=null&&u.contains(o))&&n()}})});Fj.displayName=e5;var Qm="Toast",ree="toast.swipeStart",nee="toast.swipeMove",iee="toast.swipeCancel",see="toast.swipeEnd",t5=b.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:i,onOpenChange:s,...a}=e,[o,c]=Ra({prop:n,defaultProp:i??!0,onChange:s,caller:Qm});return l.jsx(yn,{present:r||o,children:l.jsx(lee,{open:o,...a,ref:t,onClose:()=>c(!1),onPause:lr(e.onPause),onResume:lr(e.onResume),onSwipeStart:fe(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:fe(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:fe(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:fe(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});t5.displayName=Qm;var[aee,oee]=XF(Qm,{onClose(){}}),lee=b.forwardRef((e,t)=>
87{const{__scopeToast:r,type:n="foreground",duration:i,open:s,onClose:a,onEscapeKeyDown:o,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:p,...g}=e,m=q0(Qm,r),[v,y]=b.useState(null),x=Ye(t,A=>y(A)),w=b.useRef(null),S=b.useRef(null),j=i||m.duration,E=b.useRef(0),_=b.useRef(j),N=b.useRef(0),{onToastAdd:O,onToastRemove:C}=m,k=lr(()=>{var R;(v==null?void 0:v.contains(document.activeElement))&&((R=m.viewport)==null||R.focus()),a()}),$=b.useCallback(A=>{!A||A===1/0||(window.clearTimeout(N.current),E.current=new Date().getTime(),N.current=window.setTimeout(k,A))},[k]);b.useEffect(()=>{const A=m.viewport;if(A){const R=()=>{$(_.current),u==null||u()},T=()=>{const L=new Date().getTime()-E.current;_.current=_.current-L,window.clearTimeout(N.current),c==null||c()};return A.addEventListener(Dj,T),A.addEventListener(Lj,R),()=>{A.removeEventListener(Dj,T),A.removeEventListener(Lj,R)}}},[m.viewport,j,c,u,$]),b.useEffect(()=>{s&&!m.isClosePausedRef.current&&$(j)},[s,j,m.isClosePausedRef,$]),b.useEffect(()=>(O(),()=>C()),[O,C]);const D=b.useMemo(()=>v?l5(v):null,[v]);return m.viewport?l.jsxs(l.Fragment,{children:[D&&l.jsx(cee,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite",children:D}),l.jsx(aee,{scope:r,onClose:k,children:as.createPortal(l.jsx(jO.ItemSlot,{scope:r,children:l.jsx(zJ,{asChild:!0,onEscapeKeyDown:fe(o,()=>{m.isFocusedToastEscapeKeyDownRef.current||k(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(ke.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:fe(e.onKeyDown,A=>{A.key==="Escape"&&(o==null||o(A.nativeEvent),A.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,k()))}),onPointerDown:fe(e.onPointerDown,A=>{A.button===0&&(w.current={x:A.clientX,y:A.clientY})}),onPointerMove:fe(e.onPointerMove,A=>{if(!w.current)return;const R=A.clientX-w.current.x,T=A.clientY-w.current.y,L=!!S.current,M=["left","right"].includes(m.swipeDirection),I=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,F=M?I(0,R):0,U=M?0:I(0,T),V=A.pointerType==="touch"?10:2,G={x:F,y:U},Z={originalEvent:A,delta:G};L?(S.current=G,av(nee,f,Z,{discrete:!1})):dk(G,m.swipeDirection,V)?(S.current=G,av(ree,d,Z,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(R)>V||Math.abs(T)>V)&&(w.current=null)}),onPointerUp:fe(e.onPointerUp,A=>{const R=S.current,T=A.target;if(T.hasPointerCapture(A.pointerId)&&T.releasePointerCapture(A.pointerId),S.current=null,w.current=null,R){const L=A.currentTarget,M={originalEvent:A,delta:R};dk(R,m.swipeDirection,m.swipeThreshold)?av(see,p,M,{discrete:!0}):av(iee,h,M,{discrete:!0}),L.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),cee=e=>{const{__scopeToast:t,children:r,...n}=e,i=q0(Qm,t),[s,a]=b.useState(!1),[o,c]=b.useState(!1);return fee(()=>a(!0)),b.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),o?null:l.jsx(Xm,{asChild:!0,children:l.jsx(H0,{...n,children:s&&l.jsxs(l.Fragment,{children:[i.label," ",r]})})})},uee="ToastTitle",r5=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return l.jsx(ke.div,{...n,ref:t})});r5.displayName=uee;var dee="ToastDescription",n5=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return l.jsx(ke.div,{...n,ref:t})});n5.displayName=dee;var i5="ToastAction",s5=b.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?l.jsx(o5,{altText:r,asChild:!0,children:l.jsx(_O,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${i5}\`. Expected non-empty \`string\`.`),null)});s5.displayName=i5;var a5="ToastClose",_O=b.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,i=oee(a5,r);return l.jsx(o5,{asChild:!0,children:l.jsx(ke.button,{type:"button",...n,ref:t,onClick:fe(e.onClick,i.onClose)})})});_O.displayName=a5;var o5=b.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...i}=e;return l.jsx(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...i,ref:t})});function l5(e){const t=[];
vendor: 12,834 bytes, lines 87-237
87return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),hee(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const a=n.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...l5(n))}}),t}function av(e,t,r,{discrete:n}){const i=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?wO(i,s):i.dispatchEvent(s)}var dk=(e,t,r=0)=>{const n=Math.abs(e.x),i=Math.abs(e.y),s=n>i;return t==="left"||t==="right"?s&&n>r:!s&&i>r};function fee(e=()=>{}){const t=lr(e);hr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function hee(e){return e.nodeType===e.ELEMENT_NODE}function pee(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function g1(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var mee=QF,c5=JF,u5=t5,d5=r5,f5=n5,h5=s5,p5=_O;function m5(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=m5(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ze(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=m5(e))&&(n&&(n+=" "),n+=t);return n}const fk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hk=Ze,_f=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return hk(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(u=>{const d=r==null?void 0:r[u],f=s==null?void 0:s[u];if(d===null)return null;const h=fk(d)||fk(f);return i[u][h]}),o=r&&Object.entries(r).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(g=>{let[m,v]=g;return Array.isArray(v)?v.includes({...s,...o}[m]):{...s,...o}[m]===v})?[...u,f,h]:u},[]);return hk(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)};/**
88 * @license lucide-react v0.453.0 - ISC
89 *
90 * This source code is licensed under the ISC license.
91 * See the LICENSE file in the root directory of this source tree.
92 */const gee=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),g5=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/**
93 * @license lucide-react v0.453.0 - ISC
94 *
95 * This source code is licensed under the ISC license.
96 * See the LICENSE file in the root directory of this source tree.
97 */var vee={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"};/**
98 * @license lucide-react v0.453.0 - ISC
99 *
100 * This source code is licensed under the ISC license.
101 * See the LICENSE file in the root directory of this source tree.
102 */const yee=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:s,iconNode:a,...o},c)=>b.createElement("svg",{ref:c,...vee,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:g5("lucide",i),...o},[...a.map(([u,d])=>b.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
103 * @license lucide-react v0.453.0 - ISC
104 *
105 * This source code is licensed under the ISC license.
106 * See the LICENSE file in the root directory of this source tree.
107 */const je=(e,t)=>{const r=b.forwardRef(({className:n,...i},s)=>b.createElement(yee,{ref:s,iconNode:t,className:g5(`lucide-${gee(e)}`,n),...i}));return r.displayName=`${e}`,r};/**
108 * @license lucide-react v0.453.0 - ISC
109 *
110 * This source code is licensed under the ISC license.
111 * See the LICENSE file in the root directory of this source tree.
112 */const xee=je("ArrowDownRight",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]);/**
113 * @license lucide-react v0.453.0 - ISC
114 *
115 * This source code is licensed under the ISC license.
116 * See the LICENSE file in the root directory of this source tree.
117 */const K0=je("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
118 * @license lucide-react v0.453.0 - ISC
119 *
120 * This source code is licensed under the ISC license.
121 * See the LICENSE file in the root directory of this source tree.
122 */const v5=je("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
123 * @license lucide-react v0.453.0 - ISC
124 *
125 * This source code is licensed under the ISC license.
126 * See the LICENSE file in the root directory of this source tree.
127 */const bee=je("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
128 * @license lucide-react v0.453.0 - ISC
129 *
130 * This source code is licensed under the ISC license.
131 * See the LICENSE file in the root directory of this source tree.
132 */const ap=je("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
133 * @license lucide-react v0.453.0 - ISC
134 *
135 * This source code is licensed under the ISC license.
136 * See the LICENSE file in the root directory of this source tree.
137 */const pk=je("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
138 * @license lucide-react v0.453.0 - ISC
139 *
140 * This source code is licensed under the ISC license.
141 * See the LICENSE file in the root directory of this source tree.
142 */const Vc=je("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"}]]);/**
143 * @license lucide-react v0.453.0 - ISC
144 *
145 * This source code is licensed under the ISC license.
146 * See the LICENSE file in the root directory of this source tree.
147 */const Dp=je("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
148 * @license lucide-react v0.453.0 - ISC
149 *
150 * This source code is licensed under the ISC license.
151 * See the LICENSE file in the root directory of this source tree.
152 */const y5=je("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
153 * @license lucide-react v0.453.0 - ISC
154 *
155 * This source code is licensed under the ISC license.
156 * See the LICENSE file in the root directory of this source tree.
157 */const EO=je("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
158 * @license lucide-react v0.453.0 - ISC
159 *
160 * This source code is licensed under the ISC license.
161 * See the LICENSE file in the root directory of this source tree.
162 */const wee=je("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
163 * @license lucide-react v0.453.0 - ISC
164 *
165 * This source code is licensed under the ISC license.
166 * See the LICENSE file in the root directory of this source tree.
167 */const x5=je("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
168 * @license lucide-react v0.453.0 - ISC
169 *
170 * This source code is licensed under the ISC license.
171 * See the LICENSE file in the root directory of this source tree.
172 */const Ds=je("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
173 * @license lucide-react v0.453.0 - ISC
174 *
175 * This source code is licensed under the ISC license.
176 * See the LICENSE file in the root directory of this source tree.
177 */const b5=je("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
178 * @license lucide-react v0.453.0 - ISC
179 *
180 * This source code is licensed under the ISC license.
181 * See the LICENSE file in the root directory of this source tree.
182 */const NO=je("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
183 * @license lucide-react v0.453.0 - ISC
184 *
185 * This source code is licensed under the ISC license.
186 * See the LICENSE file in the root directory of this source tree.
187 */const Uy=je("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"}]]);/**
188 * @license lucide-react v0.453.0 - ISC
189 *
190 * This source code is licensed under the ISC license.
191 * See the LICENSE file in the root directory of this source tree.
192 */const w5=je("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
193 * @license lucide-react v0.453.0 - ISC
194 *
195 * This source code is licensed under the ISC license.
196 * See the LICENSE file in the root directory of this source tree.
197 */const See=je("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
198 * @license lucide-react v0.453.0 - ISC
199 *
200 * This source code is licensed under the ISC license.
201 * See the LICENSE file in the root directory of this source tree.
202 */const Hs=je("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
203 * @license lucide-react v0.453.0 - ISC
204 *
205 * This source code is licensed under the ISC license.
206 * See the LICENSE file in the root directory of this source tree.
207 */const Bj=je("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
208 * @license lucide-react v0.453.0 - ISC
209 *
210 * This source code is licensed under the ISC license.
211 * See the LICENSE file in the root directory of this source tree.
212 */const Ef=je("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
213 * @license lucide-react v0.453.0 - ISC
214 *
215 * This source code is licensed under the ISC license.
216 * See the LICENSE file in the root directory of this source tree.
217 */const jee=je("FileDown",[["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:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
218 * @license lucide-react v0.453.0 - ISC
219 *
220 * This source code is licensed under the ISC license.
221 * See the LICENSE file in the root directory of this source tree.
222 */const Lp=je("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"}]]);/**
223 * @license lucide-react v0.453.0 - ISC
224 *
225 * This source code is licensed under the ISC license.
226 * See the LICENSE file in the root directory of this source tree.
227 */const Zm=je("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
228 * @license lucide-react v0.453.0 - ISC
229 *
230 * This source code is licensed under the ISC license.
231 * See the LICENSE file in the root directory of this source tree.
232 */const S5=je("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"}]]);/**
233 * @license lucide-react v0.453.0 - ISC
234 *
235 * This source code is licensed under the ISC license.
236 * See the LICENSE file in the root directory of this source tree.
237 */const _ee=je("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}
237]]);/**
238 * @license lucide-react v0.453.0 - ISC
239 *
240 * This source code is licensed under the ISC license.
241 * See the LICENSE file in the root directory of this source tree.
242 */const Eee=je("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
243 * @license lucide-react v0.453.0 - ISC
244 *
245 * This source code is licensed under the ISC license.
246 * See the LICENSE file in the root directory of this source tree.
247 */const $u=je("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
248 * @license lucide-react v0.453.0 - ISC
249 *
250 * This source code is licensed under the ISC license.
251 * See the LICENSE file in the root directory of this source tree.
252 */const Nee=je("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
253 * @license lucide-react v0.453.0 - ISC
254 *
255 * This source code is licensed under the ISC license.
256 * See the LICENSE file in the root directory of this source tree.
257 */const Jm=je("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
258 * @license lucide-react v0.453.0 - ISC
259 *
260 * This source code is licensed under the ISC license.
261 * See the LICENSE file in the root directory of this source tree.
262 */const Oee=je("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"}]]);/**
263 * @license lucide-react v0.453.0 - ISC
264 *
265 * This source code is licensed under the ISC license.
266 * See the LICENSE file in the root directory of this source tree.
267 */const Aee=je("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/**
268 * @license lucide-react v0.453.0 - ISC
269 *
270 * This source code is licensed under the ISC license.
271 * See the LICENSE file in the root directory of this source tree.
272 */const Cee=je("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
273 * @license lucide-react v0.453.0 - ISC
274 *
275 * This source code is licensed under the ISC license.
276 * See the LICENSE file in the root directory of this source tree.
277 */const OO=je("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
278 * @license lucide-react v0.453.0 - ISC
279 *
280 * This source code is licensed under the ISC license.
281 * See the LICENSE file in the root directory of this source tree.
282 */const Pee=je("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
283 * @license lucide-react v0.453.0 - ISC
284 *
285 * This source code is licensed under the ISC license.
286 * See the LICENSE file in the root directory of this source tree.
287 */const G0=je("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
288 * @license lucide-react v0.453.0 - ISC
289 *
290 * This source code is licensed under the ISC license.
291 * See the LICENSE file in the root directory of this source tree.
292 */const v1=je("MessageSquareQuote",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M8 12a2 2 0 0 0 2-2V8H8",key:"1jfesj"}],["path",{d:"M14 12a2 2 0 0 0 2-2V8h-2",key:"1dq9mh"}]]);/**
293 * @license lucide-react v0.453.0 - ISC
294 *
295 * This source code is licensed under the ISC license.
296 * See the LICENSE file in the root directory of this source tree.
297 */const Oi=je("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
298 * @license lucide-react v0.453.0 - ISC
299 *
300 * This source code is licensed under the ISC license.
301 * See the LICENSE file in the root directory of this source tree.
302 */const j5=je("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
303 * @license lucide-react v0.453.0 - ISC
304 *
305 * This source code is licensed under the ISC license.
306 * See the LICENSE file in the root directory of this source tree.
307 */const os=je("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"}]]);/**
308 * @license lucide-react v0.453.0 - ISC
309 *
310 * This source code is licensed under the ISC license.
311 * See the LICENSE file in the root directory of this source tree.
312 */const Gu=je("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
313 * @license lucide-react v0.453.0 - ISC
314 *
315 * This source code is licensed under the ISC license.
316 * See the LICENSE file in the root directory of this source tree.
317 */const Tee=je("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/**
318 * @license lucide-react v0.453.0 - ISC
319 *
320 * This source code is licensed under the ISC license.
321 * See the LICENSE file in the root directory of this source tree.
322 */const sc=je("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
323 * @license lucide-react v0.453.0 - ISC
324 *
325 * This source code is licensed under the ISC license.
326 * See the LICENSE file in the root directory of this source tree.
327 */const kee=je("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
328 * @license lucide-react v0.453.0 - ISC
329 *
330 * This source code is licensed under the ISC license.
331 * See the LICENSE file in the root directory of this source tree.
332 */const Vy=je("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
333 * @license lucide-react v0.453.0 - ISC
334 *
335 * This source code is licensed under the ISC license.
336 * See the LICENSE file in the root directory of this source tree.
337 */const eg=je("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
338 * @license lucide-react v0.453.0 - ISC
339 *
340 * This source code is licensed under the ISC license.
341 * See the LICENSE file in the root directory of this source tree.
342 */const _5=je("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"}]]);/**
343 * @license lucide-react v0.453.0 - ISC
344 *
345 * This source code is licensed under the ISC license.
346 * See the LICENSE file in the root directory of this source tree.
347 */const Fp=je("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",ke
347y:"oel41y"}]]);/**
348 * @license lucide-react v0.453.0 - ISC
349 *
350 * This source code is licensed under the ISC license.
351 * See the LICENSE file in the root directory of this source tree.
352 */const Wy=je("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
353 * @license lucide-react v0.453.0 - ISC
354 *
355 * This source code is licensed under the ISC license.
356 * See the LICENSE file in the root directory of this source tree.
357 */const Ree=je("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"}]]);/**
358 * @license lucide-react v0.453.0 - ISC
359 *
360 * This source code is licensed under the ISC license.
361 * See the LICENSE file in the root directory of this source tree.
362 */const Nf=je("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
363 * @license lucide-react v0.453.0 - ISC
364 *
365 * This source code is licensed under the ISC license.
366 * See the LICENSE file in the root directory of this source tree.
367 */const $ee=je("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"}]]);/**
368 * @license lucide-react v0.453.0 - ISC
369 *
370 * This source code is licensed under the ISC license.
371 * See the LICENSE file in the root directory of this source tree.
372 */const AO=je("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
373 * @license lucide-react v0.453.0 - ISC
374 *
375 * This source code is licensed under the ISC license.
376 * See the LICENSE file in the root directory of this source tree.
377 */const Iee=je("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
378 * @license lucide-react v0.453.0 - ISC
379 *
380 * This source code is licensed under the ISC license.
381 * See the LICENSE file in the root directory of this source tree.
382 */const Mee=je("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
383 * @license lucide-react v0.453.0 - ISC
384 *
385 * This source code is licensed under the ISC license.
386 * See the LICENSE file in the root directory of this source tree.
387 */const E5=je("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
388 * @license lucide-react v0.453.0 - ISC
389 *
390 * This source code is licensed under the ISC license.
391 * See the LICENSE file in the root directory of this source tree.
392 */const CO=je("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
393 * @license lucide-react v0.453.0 - ISC
394 *
395 * This source code is licensed under the ISC license.
396 * See the LICENSE file in the root directory of this source tree.
397 */const ac=je("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
398 * @license lucide-react v0.453.0 - ISC
399 *
400 * This source code is licensed under the ISC license.
401 * See the LICENSE file in the root directory of this source tree.
402 */const oc=je("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
403 * @license lucide-react v0.453.0 - ISC
404 *
405 * This source code is licensed under the ISC license.
406 * See the LICENSE file in the root directory of this source tree.
407 */const Dee=je("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/**
408 * @license lucide-react v0.453.0 - ISC
409 *
410 * This source code is licensed under the ISC license.
411 * See the LICENSE file in the root directory of this source tree.
412 */const PO=je("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"}]]);/**
413 * @license lucide-react v0.453.0 - ISC
414 *
415 * This source code is licensed under the ISC license.
416 * See the LICENSE file in the root directory of this source tree.
417 */const Lee=je("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/**
418 * @license lucide-react v0.453.0 - ISC
419 *
420 * This source code is licensed under the ISC license.
421 * See the LICENSE file in the root directory of this source tree.
422 */const N5=je("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
423 * @license lucide-react v0.453.0 - ISC
424 *
425 * This source code is licensed under the ISC license.
426 * See the LICENSE file in the root directory of this source tree.
427 */const Of=je("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
428 * @license lucide-react v0.453.0 - ISC
429 *
430 * This source code is licensed under the ISC license.
431 * See the LICENSE file in the root directory of this source tree.
432 */const lc=je("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"}]]);/**
433 * @license lucide-react v0.453.0 - ISC
434 *
435 * This source code is licensed under the ISC license.
436 * See the LICENSE file in the root directory of this source tree.
vendor: 9,968 bytes, lines 437-447
437 */const Fee=je("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/**
438 * @license lucide-react v0.453.0 - ISC
439 *
440 * This source code is licensed under the ISC license.
441 * See the LICENSE file in the root directory of this source tree.
442 */const us=je("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
443 * @license lucide-react v0.453.0 - ISC
444 *
445 * This source code is licensed under the ISC license.
446 * See the LICENSE file in the root directory of this source tree.
447 */const O5=je("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"}]]),TO="-",Bee=e=>{const t=Uee(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const o=a.split(TO);return o[0]===""&&o.length!==1&&o.shift(),A5(o,t)||zee(a)},getConflictingClassGroupIds:(a,o)=>{const c=r[a]||[];return o&&n[a]?[...c,...n[a]]:c}}},A5=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?A5(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(TO);return(a=t.validators.find(({validator:o})=>o(s)))==null?void 0:a.classGroupId},mk=/^\[(.+)\]$/,zee=e=>{if(mk.test(e)){const t=mk.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Uee=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Wee(Object.entries(e.classGroups),r).forEach(([s,a])=>{zj(a,n,s,t)}),n},zj=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:gk(t,i);s.classGroupId=r;return}if(typeof i=="function"){if(Vee(i)){zj(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([s,a])=>{zj(a,gk(t,s),r,n)})})},gk=(e,t)=>{let r=e;return t.split(TO).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Vee=e=>e.isThemeGetter,Wee=(e,t)=>t?e.map(([r,n])=>{const i=n.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,o])=>[t+a,o])):s);return[r,i]}):e,Hee=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(s,a)=>{r.set(s,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return i(s,a),a},set(s,a){r.has(s)?r.set(s,a):i(s,a)}}},C5="!",qee=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],s=t.length,a=o=>{const c=[];let u=0,d=0,f;for(let v=0;v<o.length;v++){let y=o[v];if(u===0){if(y===i&&(n||o.slice(v,v+s)===t)){c.push(o.slice(d,v)),d=v+s;continue}if(y==="/"){f=v;continue}}y==="["?u++:y==="]"&&u--}const h=c.length===0?o:o.substring(d),p=h.startsWith(C5),g=p?h.substring(1):h,m=f&&f>d?f-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}};return r?o=>r({className:o,parseClassName:a}):a},Kee=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},Gee=e=>({cache:Hee(e.cacheSize),parseClassName:qee(e),...Bee(e)}),Yee=/\s+/,Xee=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,s=[],a=e.trim().split(Yee);let o="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=r(u);let g=!!p,m=n(g?h.substring(0,p):h);if(!m){if(!g){o=u+(o.length>0?" "+o:o);continue}if(m=n(h),!m){o=u+(o.length>0?" "+o:o);continue}g=!1}const v=Kee(d).join(":"),y=f?v+C5:v,x=y+m;if(s.includes(x))continue;s.push(x);const w=i(m,g);for(let S=0;S<w.length;++S){const j=w[S];s.push(y+j)}o=u+(o.length>0?" "+o:o)}return o};function Qee(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=P5(t))&&(n&&(n+=" "),n+=r);return n}const P5=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=P5(e[n]))&&(r&&(r+=" "),r+=t);return r};function Zee(e,...t){let r,n,i,s=a;function a(c){const u=t.reduce((d,f)=>f(d),e());return r=Gee(u),n=r.cache.get,i=r.cache.set,s=o,o(c)}function o(c){const u=n(c);if(u)return u;const d=Xee(c,r);return i(c,d),d}return function(){return s(Qee.apply(null,arguments))}}const Dt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},T5=/^\[(?:([a-z-]+):)?(.+)\]$/i,Jee=/^\d+\/\d+$/,ete=new Set(["px","full","screen"]),tte=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rte=/\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$/,nte=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ite=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ste=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ta=e=>Yu(e)||ete.has(e)||Jee.test(e),Ja=e=>Af(e,"length",hte),Yu=e=>!!e&&!Number.isNaN(Number(e)),y1=e=>Af(e,"number",Yu),ah=e=>!!e&&Number.isInteger(Number(e)),ate=e=>e.endsWith("%")&&Yu(e.slice(0,-1)),it=e=>T5.test(e),eo=e=>tte.test(e),ote=new Set(["length","size","percentage"]),lte=e=>Af(e,ote,k5),cte=e=>Af(e,"position",k5),ute=new Set(["image","url"]),dte=e=>Af(e,ute,mte),fte=e=>Af(e,"",pte),oh=()=>!0,Af=(e,t,r)=>{const n=T5.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},hte=e=>rte.test(e)&&!nte.test(e),k5=()=>!1,pte=e=>ite.test(e),mte=e=>ste.test(e),gte=()=>{const e=Dt("colors"),t=Dt("spacing"),r=Dt("blur"),n=Dt("brightness"),i=Dt("borderColor"),s=Dt("borderRadius"),a=Dt("borderSpacing"),o=Dt("borderWidth"),c=Dt("contrast"),u=Dt("grayscale"),d=Dt("hueRotate"),f=Dt("invert"),h=Dt("gap"),p=Dt("gradientColorStops"),g=Dt("gradientColorStopPositions"),m=Dt("inset"),v=Dt("margin"),y=Dt("opacity"),x=Dt("padding"),w=Dt("saturate"),S=Dt("scale"),j=Dt("sepia"),E=Dt("skew"),_=Dt("space"),N=Dt("translate"),O=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto",it,t],$=()=>[it,t],D=()=>["",ta,Ja],A=()=>["auto",Yu,it],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",it],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[Yu,it];return{cacheSize:500,separator:":",theme:{colors:[oh],spacing:[ta,Ja],blur:["none","",eo,it],brightness:U(),borderColor:[e],borderRadius:["none","","full",eo,it],borderSpacing:$(),borderWidth:D(),contrast:U(),grayscale:I(),hueRotate:U(),invert:I(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[ate,Ja],inset:k(),margin:k(),opacity:U(),padding:$(),saturate:U(),scale:U(),sepia:I(),skew:U(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",it]}],container:["container"],columns:[{columns:[eo]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"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:[...R(),it]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ah,it]}],basis:[{basis:k()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",it]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",ah,it]}],"grid-cols":[{"grid-cols":[oh]}],"col-start-end":[{col:["auto",{span:["full",ah,it]},it]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[oh]}],"row-start-end":[{row:["auto",{span:[ah,it]},it]}],"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",it]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",it]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}
vendor: 8,343 bytes, line 447
447],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",it,t]}],"min-w":[{"min-w":[it,t,"min","max","fit"]}],"max-w":[{"max-w":[it,t,"none","full","min","max","fit","prose",{screen:[eo]},eo]}],h:[{h:[it,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[it,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[it,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[it,t,"auto","min","max","fit"]}],"font-size":[{text:["base",eo,Ja]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",y1]}],"font-family":[{font:[oh]}],"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-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",it]}],"line-clamp":[{"line-clamp":["none",Yu,y1]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ta,it]}],"list-image":[{"list-image":["none",it]}],"list-style-type":[{list:["none","disc","decimal",it]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...T(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ta,Ja]}],"underline-offset":[{"underline-offset":["auto",ta,it]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",it]}],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",it]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...R(),cte]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",lte]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},dte]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...T(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:T()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...T()]}],"outline-offset":[{"outline-offset":[ta,it]}],"outline-w":[{outline:[ta,Ja]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[ta,Ja]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",eo,fte]}],"shadow-color":[{shadow:[oh]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",eo,it]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",it]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",it]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",it]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[ah,it]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",it]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","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",it]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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"]}
vendor: 4,657 bytes, line 447
447],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",it]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ta,Ja,y1]}],stroke:[{stroke:[e,"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-s","border-color-e","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"]}}},vte=Zee(gte);function se(...e){return vte(Ze(e))}const yte=mee,R5=b.forwardRef(({className:e,...t},r)=>l.jsx(c5,{ref:r,className:se("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]",e),...t}));R5.displayName=c5.displayName;const xte=_f("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg 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"}}),$5=b.forwardRef(({className:e,variant:t,...r},n)=>l.jsx(u5,{ref:n,className:se(xte({variant:t}),e),...r}));$5.displayName=u5.displayName;const bte=b.forwardRef(({className:e,...t},r)=>l.jsx(h5,{ref:r,className:se("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",e),...t}));bte.displayName=h5.displayName;const I5=b.forwardRef(({className:e,...t},r)=>l.jsx(p5,{ref:r,className:se("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 29,435 bytes, line 447
447/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",e),"toast-close":"",...t,children:l.jsx(us,{className:"h-4 w-4"})}));I5.displayName=p5.displayName;const M5=b.forwardRef(({className:e,...t},r)=>l.jsx(d5,{ref:r,className:se("text-sm font-semibold",e),...t}));M5.displayName=d5.displayName;const D5=b.forwardRef(({className:e,...t},r)=>l.jsx(f5,{ref:r,className:se("text-sm opacity-90",e),...t}));D5.displayName=f5.displayName;function wte(){const{toasts:e}=kn();return l.jsxs(yte,{children:[e.map(function({id:t,title:r,description:n,action:i,...s}){return l.jsxs($5,{...s,children:[l.jsxs("div",{className:"grid gap-1",children:[r&&l.jsx(M5,{children:r}),n&&l.jsx(D5,{children:n})]}),i,l.jsx(I5,{})]},t)}),l.jsx(R5,{})]})}var Ste=fN[" useId ".trim().toString()]||(()=>{}),jte=0;function Ls(e){const[t,r]=b.useState(Ste());return hr(()=>{r(n=>n??String(jte++))},[e]),t?`radix-${t}`:""}const _te=["top","right","bottom","left"],Yo=Math.min,Bn=Math.max,Hy=Math.round,ov=Math.floor,Fs=e=>({x:e,y:e}),Ete={left:"right",right:"left",bottom:"top",top:"bottom"},Nte={start:"end",end:"start"};function Uj(e,t,r){return Bn(e,Yo(t,r))}function $a(e,t){return typeof e=="function"?e(t):e}function Ia(e){return e.split("-")[0]}function Cf(e){return e.split("-")[1]}function kO(e){return e==="x"?"y":"x"}function RO(e){return e==="y"?"height":"width"}const Ote=new Set(["top","bottom"]);function Ps(e){return Ote.has(Ia(e))?"y":"x"}function $O(e){return kO(Ps(e))}function Ate(e,t,r){r===void 0&&(r=!1);const n=Cf(e),i=$O(e),s=RO(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=qy(a)),[a,qy(a)]}function Cte(e){const t=qy(e);return[Vj(e),t,Vj(t)]}function Vj(e){return e.replace(/start|end/g,t=>Nte[t])}const vk=["left","right"],yk=["right","left"],Pte=["top","bottom"],Tte=["bottom","top"];function kte(e,t,r){switch(e){case"top":case"bottom":return r?t?yk:vk:t?vk:yk;case"left":case"right":return t?Pte:Tte;default:return[]}}function Rte(e,t,r,n){const i=Cf(e);let s=kte(Ia(e),r==="start",n);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(Vj)))),s}function qy(e){return e.replace(/left|right|bottom|top/g,t=>Ete[t])}function $te(e){return{top:0,right:0,bottom:0,left:0,...e}}function L5(e){return typeof e!="number"?$te(e):{top:e,right:e,bottom:e,left:e}}function Ky(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function xk(e,t,r){let{reference:n,floating:i}=e;const s=Ps(t),a=$O(t),o=RO(a),c=Ia(t),u=s==="y",d=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,h=n[o]/2-i[o]/2;let p;switch(c){case"top":p={x:d,y:n.y-i.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-i.width,y:f};break;default:p={x:n.x,y:n.y}}switch(Cf(t)){case"start":p[a]-=h*(r&&u?-1:1);break;case"end":p[a]+=h*(r&&u?-1:1);break}return p}const Ite=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,o=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=xk(u,n,c),h=n,p={},g=0;for(let m=0;m<o.length;m++){const{name:v,fn:y}=o[m],{x,y:w,data:S,reset:j}=await y({x:d,y:f,initialPlacement:n,placement:h,strategy:i,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});d=x??d,f=w??f,p={...p,[v]:{...p[v],...S}},j&&g<=50&&(g++,typeof j=="object"&&(j.placement&&(h=j.placement),j.rects&&(u=j.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):j.rects),{x:d,y:f}=xk(u,h,c)),m=-1)}return{x:d,y:f,placement:h,strategy:i,middlewareData:p}};async function Bp(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:s,rects:a,elements:o,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=$a(t,e),g=L5(p),v=o[h?f==="floating"?"reference":"floating":f],y=Ky(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(v)))==null||r?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:u,rootBoundary:d,strategy:c})),x=f==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},j=Ky(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:x,offsetParent:w,strategy:c}):x);return{top:(y.top-j.top+g.top)/S.y,bottom:(j.bottom-y.bottom+g.bottom)/S.y,left:(y.left-j.left+g.left)/S.x,right:(j.right-y.right+g.right)/S.x}}const Mte=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:s,platform:a,elements:o,middlewareData:c}=t,{element:u,padding:d=0}=$a(e,t)||{};if(u==null)return{};const f=L5(d),h={x:r,y:n},p=$O(i),g=RO(p),m=await a.getDimensions(u),v=p==="y",y=v?"top":"left",x=v?"bottom":"right",w=v?"clientHeight":"clientWidth",S=s.reference[g]+s.reference[p]-h[p]-s.floating[g],j=h[p]-s.reference[p],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let _=E?E[w]:0;(!_||!await(a.isElement==null?void 0:a.isElement(E)))&&(_=o.floating[w]||s.floating[g]);const N=S/2-j/2,O=_/2-m[g]/2-1,C=Yo(f[y],O),k=Yo(f[x],O),$=C,D=_-m[g]-k,A=_/2-m[g]/2+N,R=Uj($,A,D),T=!c.arrow&&Cf(i)!=null&&A!==R&&s.reference[g]/2-(A<$?C:k)-m[g]/2<0,L=T?A<$?A-$:A-D:0;return{[p]:h[p]+L,data:{[p]:R,centerOffset:A-R-L,...T&&{alignmentOffset:L}},reset:T}}}),Dte=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=$a(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=Ia(i),x=Ps(o),w=Ia(o)===o,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=h||(w||!m?[qy(o)]:Cte(o)),E=g!=="none";!h&&E&&j.push(...Rte(o,m,g,S));const _=[o,...j],N=await Bp(t,v),O=[];let C=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&O.push(N[y]),f){const A=Ate(i,a,S);O.push(N[A[0]],N[A[1]])}if(C=[...C,{placement:i,overflows:O}],!O.every(A=>A<=0)){var k,$;const A=(((k=s.flip)==null?void 0:k.index)||0)+1,R=_[A];if(R&&(!(f==="alignment"?x!==Ps(R):!1)||C.every(M=>Ps(M.placement)===x?M.overflows[0]>0:!0)))return{data:{index:A,overflows:C},reset:{placement:R}};let T=($=C.filter(L=>L.overflows[0]<=0).sort((L,M)=>L.overflows[1]-M.overflows[1])[0])==null?void 0:$.placement;if(!T)switch(p){case"bestFit":{var D;const L=(D=C.filter(M=>{if(E){const I=Ps(M.placement);return I===x||I==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(I=>I>0).reduce((I,F)=>I+F,0)]).sort((M,I)=>M[1]-I[1])[0])==null?void 0:D[0];L&&(T=L);break}case"initialPlacement":T=o;break}if(i!==T)return{reset:{placement:T}}}return{}}}};function bk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wk(e){return _te.some(t=>e[t]>=0)}const Lte=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=$a(e,t);switch(n){case"referenceHidden":{const s=await Bp(t,{...i,elementContext:"reference"}),a=bk(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:wk(a)}}}case"escaped":{const s=await Bp(t,{...i,altBoundary:!0}),a=bk(s,r.floating);return{data:{escapedOffsets:a,escaped:wk(a)}}}default:return{}}}}},F5=new Set(["left","top"]);async function Fte(e,t){const{placement:r,platform:n,elements:i}=e,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=Ia(r),o=Cf(r),c=Ps(r)==="y",u=F5.has(a)?-1:1,d=s&&c?-1:1,f=$a(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return o&&typeof g=="number"&&(p=o==="end"?g*-1:g),c?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const Bte=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:s,placement:a,middlewareData:o}=t,c=await Fte(t,e);return a===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:a}}}}},zte=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:o={fn:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...c}=$a(e,t),u={x:r,y:n},d=await Bp(t,c),f=Ps(Ia(i)),h=kO(f);let p=u[h],g=u[f];if(s){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=p+d[v],w=p-d[y];p=Uj(x,p,w)}if(a){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=g+d[v],w=g-d[y];g=Uj(x,g,w)}const m=o.fn({...t,[h]:p,[f]:g});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[h]:s,[f]:a}}}}}},Ute=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:c=!0,crossAxis:u=!0}=$a(e,t),d={x:r,y:n},f=Ps(i),h=kO(f);let p=d[h],g=d[f];const m=$a(o,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const w=h==="y"?"height":"width",S=s.reference[h]-s.floating[w]+v.mainAxis,j=s.reference[h]+s.reference[w]-v.mainAxis;p<S?p=S:p>j&&(p=j)}if(u){var y,x;const w=h==="y"?"width":"height",S=F5.has(Ia(i)),j=s.reference[f]-s.floating[w]+(S&&((y=a.offset)==null?void 0:y[f])||0)+(S?0:v.crossAxis),E=s.reference[f]+s.reference[w]+(S?0:((x=a.offset)==null?void 0:x[f])||0)-(S?v.crossAxis:0);g<j?g=j:g>E&&(g=E)}return{[h]:p,[f]:g}}}},Vte=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:s,platform:a,elements:o}=t,{apply:c=()=>{},...u}=$a(e,t),d=await Bp(t,u),f=Ia(i),h=Cf(i),p=Ps(i)==="y",{width:g,height:m}=s.floating;let v,y;f==="top"||f==="bottom"?(v=f,y=h===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(y=f,v=h==="end"?"top":"bottom");const x=m-d.top-d.bottom,w=g-d.left-d.right,S=Yo(m-d[v],x),j=Yo(g-d[y],w),E=!t.middlewareData.shift;let _=S,N=j;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(_=x),E&&!h){const C=Bn(d.left,0),k=Bn(d.right,0),$=Bn(d.top,0),D=Bn(d.bottom,0);p?N=g-2*(C!==0||k!==0?C+k:Bn(d.left,d.right)):_=m-2*($!==0||D!==0?$+D:Bn(d.top,d.bottom))}await c({...t,availableWidth:N,availableHeight:_});const O=await a.getDimensions(o.floating);return g!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}};function Y0(){return typeof window<"u"}function Pf(e){return B5(e)?(e.nodeName||"").toLowerCase():"#document"}function Gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ys(e){var t;return(t=(B5(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function B5(e){return Y0()?e instanceof Node||e instanceof Gn(e).Node:!1}function ds(e){return Y0()?e instanceof Element||e instanceof Gn(e).Element:!1}function qs(e){return Y0()?e instanceof HTMLElement||e instanceof Gn(e).HTMLElement:!1}function Sk(e){return!Y0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Gn(e).ShadowRoot}const Wte=new Set(["inline","contents"]);function tg(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=fs(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Wte.has(i)}const Hte=new Set(["table","td","th"]);function qte(e){return Hte.has(Pf(e))}const Kte=[":popover-open",":modal"];function X0(e){return Kte.some(t=>{try{return e.matches(t)}catch{return!1}})}const Gte=["transform","translate","scale","rotate","perspective"],Yte=["transform","translate","scale","rotate","perspective","filter"],Xte=["paint","layout","strict","content"];function IO(e){const t=MO(),r=ds(e)?fs(e):e;return Gte.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Yte.some(n=>(r.willChange||"").includes(n))||Xte.some(n=>(r.contain||"").includes(n))}function Qte(e){let t=Xo(e);for(;qs(t)&&!Od(t);){if(IO(t))return t;if(X0(t))return null;t=Xo(t)}return null}function MO(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Zte=new Set(["html","body","#document"]);function Od(e){return Zte.has(Pf(e))}function fs(e){return Gn(e).getComputedStyle(e)}function Q0(e){return ds(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xo(e){if(Pf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Sk(e)&&e.host||Ys(e);return Sk(t)?t.host:t}function z5(e){const t=Xo(e);return Od(t)?e.ownerDocument?e.ownerDocument.body:e.body:qs(t)&&tg(t)?t:z5(t)}function zp(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=z5(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),a=Gn(i);if(s){const o=Wj(a);return t.concat(a,a.visualViewport||[],tg(i)?i:[],o&&r?zp(o):[])}return t.concat(i,zp(i,[],r))}function Wj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function U5(e){const t=fs(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=qs(e),s=i?e.offsetWidth:r,a=i?e.offsetHeight:n,o=Hy(r)!==s||Hy(n)!==a;return o&&(r=s,n=a),{width:r,height:n,$:o}}function DO(e){return ds(e)?e:e.contextElement}function Xu(e){const t=DO(e);if(!qs(t))return Fs(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:s}=U5(t);let a=(s?Hy(r.width):r.width)/n,o=(s?Hy(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const Jte=Fs(0);function V5(e){const t=Gn(e);return!MO()||!t.visualViewport?Jte:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ere(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Gn(e)?!1:t}function bc(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=DO(e);let a=Fs(1);t&&(n?ds(n)&&(a=Xu(n)):a=Xu(e));const o=ere(s,r,n)?V5(s):Fs(0);let c=(i.left+o.x)/a.x,u=(i.top+o.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(s){const h=Gn(s),p=n&&ds(n)?Gn(n):n;let g=h,m=Wj(g);for(;m&&n&&p!==g;){const v=Xu(m),y=m.getBoundingClientRect(),x=fs(m),w=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,S=y.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,f*=v.y,c+=w,u+=S,g=Gn(m),m=Wj(g)}}return Ky({width:d,height:f,x:c,y:u})}function Z0(e,t){const r=Q0(e).scrollLeft;return t?t.left+r:bc(Ys(e)).left+r}function W5(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Z0(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function tre(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const s=i==="fixed",a=Ys(n),o=t?X0(t.floating):!1;if(n===a||o&&s)return r;let c={scrollLeft:0,scrollTop:0},u=Fs(1);const d=Fs(0),f=qs(n);if((f||!f&&!s)&&((Pf(n)!=="body"||tg(a))&&(c=Q0(n)),qs(n))){const p=bc(n);u=Xu(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}const h=a&&!f&&!s?W5(a,c):Fs(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:r.y*u.y-c.scrollTop*u.y+d.y+h.y}}function rre(e){return Array.from(e.getClientRects())}function nre(e){const t=Ys(e),r=Q0(e),n=e.ownerDocument.body,i=Bn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Bn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Z0(e);const o=-r.scrollTop;return fs(n).direction==="rtl"&&(a+=Bn(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:a,y:o}}const jk=25;function ire(e,t){const r=Gn(e),n=Ys(e),i=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,o=0,c=0;if(i){s=i.width,a=i.height;const d=MO();(!d||d&&t==="fixed")&&(o=i.offsetLeft,c=i.offsetTop)}const u=Z0(n);if(u<=0){const d=n.ownerDocument,f=d.body,h=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(n.clientWidth-f.clientWidth-p);g<=jk&&(s-=g)}else u<=jk&&(s+=u);return{width:s,height:a,x:o,y:c}}const sre=new Set(["absolute","fixed"]);function are(e,t){const r=bc(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=qs(e)?Xu(e):Fs(1),a=e.clientWidth*s.x,o=e.clientHeight*s.y,c=i*s.x,u=n*s.y;return{width:a,height:o,x:c,y:u}}function _k(e,t,r){let n;if(t==="viewport")n=ire(e,r);else if(t==="document")n=nre(Ys(e));else if(ds(t))n=are(t,r);else{const i=V5(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ky(n)}function H5(e,t){const r=Xo(e);return r===t||!ds(r)||Od(r)?!1:fs(r).position==="fixed"||H5(r,t)}function ore(e,t){const r=t.get(e);if(r)return r;let n=zp(e,[],!1).filter(o=>ds(o)&&Pf(o)!=="body"),i=null;const s=fs(e).position==="fixed";let a=s?Xo(e):e;for(;ds(a)&&!Od(a);){const o=fs(a),c=IO(a);!c&&o.position==="fixed"&&(i=null),(s?!c&&!i:!c&&o.position==="static"&&!!i&&sre.has(i.position)||tg(a)&&!c&&H5(e,a))?n=n.filter(d=>d!==a):i=o,a=Xo(a)}return t.set(e,n),n}function lre(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const a=[...r==="clippingAncestors"?X0(t)?[]:ore(t,this._c):[].concat(r),n],o=a[0],c=a.reduce((u,d)=>{const f=_k(t,d,i);return u.top=Bn(f.top,u.top),u.right=Yo(f.right,u.right),u.bottom=Yo(f.bottom,u.bottom),u.left=Bn(f.left,u.left),u},_k(t,o,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function cre(e){const{width:t,height:r}=U5(e);return{width:t,height:r}}function ure(e,t,r){const n=qs(t),i=Ys(t),s=r==="fixed",a=bc(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const c=Fs(0);function u(){c.x=Z0(i)}if(n||!n&&!s)if((Pf(t)!=="body"||tg(i))&&(o=Q0(t)),n){const p=bc(t,!0,s,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else i&&u();s&&!n&&i&&u();const d=i&&!n&&!s?W5(i,o):Fs(0),f=a.left+o.scrollLeft-c.x-d.x,h=a.top+o.scrollTop-c.y-d.y;return{x:f,y:h,width:a.width,height:a.height}}function x1(e){return fs(e).position==="static"}function Ek(e,t){if(!qs(e)||fs(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ys(e)===r&&(r=r.ownerDocument.body),r}function q5(e,t){const r=Gn(e);if(X0(e))return r;if(!qs(e)){let i=Xo(e);for(;i&&!Od(i);){if(ds(i)&&!x1(i))return i;i=Xo(i)}return r}let n=Ek(e,t);for(;n&&qte(n)&&x1(n);)n=Ek(n,t);return n&&Od(n)&&x1(n)&&!IO(n)?r:n||Qte(e)||r}const dre=async function(e){const t=this.getOffsetParent||q5,r=this.getDimensions,n=await r(e.floating);return{reference:ure(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function fre(e){return fs(e).direction==="rtl"}const hre={convertOffsetParentRelativeRectToViewportRelativeRect:tre,getDocumentElement:Ys,getClippingRect:lre,getOffsetParent:q5,getElementRects:dre,getClientRects:rre,getDimensions:cre,getScale:Xu,isElement:ds,isRTL:fre};function K5(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pre(e,t){let r=null,n;const i=Ys(e);function s(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function a(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:p}=u;if(o||t(),!h||!p)return;const g=ov(f),m=ov(i.clientWidth-(d+h)),v=ov(i.clientHeight-(f+p)),y=ov(d),w={rootMargin:-g+"px "+-m+"px "+-v+"px "+-y+"px",threshold:Bn(0,Yo(1,c))||1};let S=!0;function j(E){const _=E[0].intersectionRatio;if(_!==c){if(!S)return a();_?a(!1,_):n=setTimeout(()=>{a(!1,1e-7)},1e3)}_===1&&!K5(u,e.getBoundingClientRect())&&a(),S=!1}try{r=new IntersectionObserver(j,{...w,root:i.ownerDocument})}catch{r=new IntersectionObserver(j,w)}r.observe(e)}return a(!0),s}function mre(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=DO(e),d=i||s?[...u?zp(u):[],...zp(t)]:[];d.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const f=u&&o?pre(u,r):null;let h=-1,p=null;a&&(p=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),r()}),u&&!c&&p.observe(u),p.observe(t));let g,m=c?bc(e):null;c&&v();function v(){const y=bc(e);m&&!K5(m,y)&&r(),m=y,g=requestAnimationFrame(v)}return r(),()=>{var y;d.forEach(x=>{i&&x.removeEventListener("scroll",r),s&&x.removeEventListener("resize",r)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const gre=Bte,vre=zte,yre=Dte,xre=Vte,bre=Lte,Nk=Mte,wre=Ute,Sre=(e,t,r)=>{const n=new Map,i={platform:hre,...r},s={...i.platform,_c:n};return Ite(e,t,{...i,platform:s})};var jre=typeof document<"u",_re=function(){},ty=jre?b.useLayoutEffect:_re;function Gy(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Gy(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(!(s==="_owner"&&e.$$typeof)&&!Gy(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function G5(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ok(e,t){const r=G5(e);return Math.round(t*r)/r}function b1(e){const t=b.useRef(e);return ty(()=>{t.current=e}),t}function Ere(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:a}={},transform:o=!0,whileElementsMounted:c,open:u}=e,[d,f]=b.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=b.useState(n);Gy(h,n)||p(n);const[g,m]=b.useState(null),[v,y]=b.useState(null),x=b.useCallback(M=>{M!==E.current&&(E.current=M,m(M))},[]),w=b.useCallback(M=>{M!==_.current&&(_.current=M,y(M))},[]),S=s||g,j=a||v,E=b.useRef(null),_=b.useRef(null),N=b.useRef(d),O=c!=null,C=b1(c),k=b1(i),$=b1(u),D=b.useCallback(()=>{if(!E.current||!_.current)return;const M={placement:t,strategy:r,middleware:h};k.current&&(M.platform=k.current),Sre(E.current,_.current,M).then(I=>{const F={...I,isPositioned:$.current!==!1};A.current&&!Gy(N.current,F)&&(N.current=F,as.flushSync(()=>{f(F)}))})},[h,t,r,k,$]);ty(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[u]);const A=b.useRef(!1);ty(()=>(A.current=!0,()=>{A.current=!1}),[]),ty(()=>{if(S&&(E.current=S),j&&(_.current=j),S&&j){if(C.current)return C.current(S,j,D);D()}},[S,j,D,C,O]);const R=b.useMemo(()=>({reference:E,floating:_,setReference:x,setFloating:w}),[x,w]),T=b.useMemo(()=>({reference:S,floating:j}),[S,j]),L=b.useMemo(()=>{const M={position:r,left:0,top:0};if(!T.floating)return M;const I=Ok(T.floating,d.x),F=Ok(T.floating,d.y);return o?{...M,transform:"translate("+I+"px, "+F+"px)",...G5(T.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:I,top:F}},[r,o,T.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:D,refs:R,elements:T,floatingStyles:L}),[d,D,R,T,L])}const Nre=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Nk({element:n.current,padding:i}).fn(r):{}:n?Nk({element:n,padding:i}).fn(r):{}}}},Ore=(e,t)=>({...gre(e),options:[e,t]}),Are=(e,t)=>({...vre(e),options:[e,t]}),Cre=(e,t)=>({...wre(e),options:[e,t]}),Pre=(e,t)=>({...yre(e),options:[e,t]}),Tre=(e,t)=>({...xre(e),options:[e,t]}),kre=(e,t)=>({...bre(e),options:[e,t]}),Rre=(e,t)=>({...Nre(e),options:[e,t]});var $re="Arrow",Y5=b.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...s}=e;return l.jsx(ke.svg,{...s,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Y5.displayName=$re;var Ire=Y5;function LO(e){const[t,r]=b.useState(void 0);return hr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,o;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,o=u.blockSize}else a=e.offsetWidth,o=e.offsetHeight;r({width:a,height:o})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var FO="Popper",[X5,Tf]=Zr(FO),[Mre,Q5]=X5(FO),Z5=e=>{const{__scopePopper:t,children:r}=e,[n,i]=b.useState(null);return l.jsx(Mre,{scope:t,anchor:n,onAnchorChange:i,children:r})};Z5.displayName=FO;var J5="PopperAnchor",eB=b.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,s=Q5(J5,r),a=b.useRef(null),o=Ye(t,a),c=b.useRef(null);return b.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||a.current,u!==c.current&&s.onAnchorChange(c.current)}),n?null:l.jsx(ke.div,{...i,ref:o})});eB.displayName=J5;var BO="PopperContent",[Dre,Lre]=X5(BO),tB=b.forwardRef((e,t)=>{var re,ge,Y,ee,q,W;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=e,v=Q5(BO,r),[y,x]=b.useState(null),w=Ye(t,Fe=>x(Fe)),[S,j]=b.useState(null),E=LO(S),_=(E==null?void 0:E.width)??0,N=(E==null?void 0:E.height)??0,O=n+(s!=="center"?"-"+s:""),C=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},k=Array.isArray(u)?u:[u],$=k.length>0,D={padding:C,boundary:k.filter(Bre),altBoundary:$},{refs:A,floatingStyles:R,placement:T,isPositioned:L,middlewareData:M}=Ere({strategy:"fixed",placement:O,whileElementsMounted:(...Fe)=>mre(...Fe,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[Ore({mainAxis:i+N,alignmentAxis:a}),c&&Are({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Cre():void 0,...D}),c&&Pre({...D}),Tre({...D,apply:({elements:Fe,rects:Ae,availableWidth:Ue,availableHeight:nt})=>{const{width:We,height:_e}=Ae.reference,St=Fe.floating.style;St.setProperty("--radix-popper-available-width",`${Ue}px`),St.setProperty("--radix-popper-available-height",`${nt}px`),St.setProperty("--radix-popper-anchor-width",`${We}px`),St.setProperty("--radix-popper-anchor-height",`${_e}px`)}}),S&&Rre({element:S,padding:o}),zre({arrowWidth:_,arrowHeight:N}),h&&kre({strategy:"referenceHidden",...D})]}),[I,F]=iB(T),U=lr(g);hr(()=>{L&&(U==null||U())},[L,U]);const V=(re=M.arrow)==null?void 0:re.x,G=(ge=M.arrow)==null?void 0:ge.y,Z=((Y=M.arrow)==null?void 0:Y.centerOffset)!==0,[he,ve]=b.useState();return hr(()=>{y&&ve(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:L?R.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[(ee=M.transformOrigin)==null?void 0:ee.x,(q=M.transformOrigin)==null?void 0:q.y].join(" "),...((W=M.hide)==null?void 0:W.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(Dre,{scope:r,placedSide:I,onArrowChange:j,arrowX:V,arrowY:G,shouldHideArrow:Z,children:l.jsx(ke.div,{"data-side":I,"data-align":F,...m,ref:w,style:{...m.style,animation:L?void 0:"none"}})})})});tB.displayName=BO;var rB="PopperArrow",Fre={top:"bottom",right:"left",bottom:"top",left:"right"},nB=b.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,s=Lre(rB,n),a=Fre[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:l.jsx(Ire,{...i,ref:r,style:{...i.style,display:"block"}})})});nB.displayName=rB;function Bre(e){return e!==null}var zre=e=>({name:"transformOrigin",options:e,fn(t){var v,y,x;const{placement:r,rects:n,middlewareData:i}=t,a=((v=i.arrow)==null?void 0:v.centerOffset)!==0,o=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=iB(r),f={start:"0%",center:"50%",end:"100%"}[d],h=(((y=i.arrow)==null?void 0:y.x)??0)+o/2,p=(((x=i.arrow)==null?void 0:x.y)??0)+c/2;let g="",m="";return u==="bottom"?(g=a?f:`${h}px`,m=`${-c}px`):u==="top"?(g=a?f:`${h}px`,m=`${n.floating.height+c}px`):u==="right"?(g=`${-c}px`,m=a?f:`${p}px`):u==="left"&&(g=`${n.floating.width+c}px`,m=a?f:`${p}px`),{data:{x:g,y:m}}}});function iB(e){const[t,r="center"]=e.split("-");return[t,r]}var sB=Z5,zO=eB,UO=tB,VO=nB,[J0]=Zr("Tooltip",[Tf]),WO=Tf(),aB="TooltipProvider",Ure=700,Ak="tooltip.open",[Vre,oB]=J0(aB),lB=e=>{const{__scopeTooltip:t,delayDuration:r=Ure,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:s}=e,a=b.useRef(!0),o=b.useRef(!1),c=b.useRef(0);return b.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(Vre,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:b.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:o,onPointerInTransitChange:b.useCallback(u=>{o.current=u}
vendor: 4,143 bytes, line 447
447,[]),disableHoverableContent:i,children:s})};lB.displayName=aB;var cB="Tooltip",[oUe,eb]=J0(cB),Hj="TooltipTrigger",Wre=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=eb(Hj,r),s=oB(Hj,r),a=WO(r),o=b.useRef(null),c=Ye(t,o,i.onTriggerChange),u=b.useRef(!1),d=b.useRef(!1),f=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx(zO,{asChild:!0,...a,children:l.jsx(ke.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...n,ref:c,onPointerMove:fe(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:fe(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:fe(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:fe(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:fe(e.onBlur,i.onClose),onClick:fe(e.onClick,i.onClose)})})});Wre.displayName=Hj;var Hre="TooltipPortal",[lUe,qre]=J0(Hre,{forceMount:void 0}),Ad="TooltipContent",uB=b.forwardRef((e,t)=>{const r=qre(Ad,e.__scopeTooltip),{forceMount:n=r.forceMount,side:i="top",...s}=e,a=eb(Ad,e.__scopeTooltip);return l.jsx(yn,{present:n||a.open,children:a.disableHoverableContent?l.jsx(dB,{side:i,...s,ref:t}):l.jsx(Kre,{side:i,...s,ref:t})})}),Kre=b.forwardRef((e,t)=>{const r=eb(Ad,e.__scopeTooltip),n=oB(Ad,e.__scopeTooltip),i=b.useRef(null),s=Ye(t,i),[a,o]=b.useState(null),{trigger:c,onClose:u}=r,d=i.current,{onPointerInTransitChange:f}=n,h=b.useCallback(()=>{o(null),f(!1)},[f]),p=b.useCallback((g,m)=>{const v=g.currentTarget,y={x:g.clientX,y:g.clientY},x=Zre(y,v.getBoundingClientRect()),w=Jre(y,x),S=ene(m.getBoundingClientRect()),j=rne([...w,...S]);o(j),f(!0)},[f]);return b.useEffect(()=>()=>h(),[h]),b.useEffect(()=>{if(c&&d){const g=v=>p(v,d),m=v=>p(v,c);return c.addEventListener("pointerleave",g),d.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",m)}}},[c,d,p,h]),b.useEffect(()=>{if(a){const g=m=>{const v=m.target,y={x:m.clientX,y:m.clientY},x=(c==null?void 0:c.contains(v))||(d==null?void 0:d.contains(v)),w=!tne(y,a);x?h():w&&(h(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,d,a,u,h]),l.jsx(dB,{...e,ref:s})}),[Gre,Yre]=J0(cB,{isInside:!1}),Xre=HF("TooltipContent"),dB=b.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:a,...o}=e,c=eb(Ad,r),u=WO(r),{onClose:d}=c;return b.useEffect(()=>(document.addEventListener(Ak,d),()=>document.removeEventListener(Ak,d)),[d]),b.useEffect(()=>{if(c.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.jsx(jf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:l.jsxs(UO,{"data-state":c.stateAttribute,...u,...o,ref:t,style:{...o.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:[l.jsx(Xre,{children:n}),l.jsx(Gre,{scope:r,isInside:!0,children:l.jsx(QJ,{id:c.contentId,role:"tooltip",children:i||n})})]})})});uB.displayName=Ad;var fB="TooltipArrow",Qre=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=WO(r);return Yre(fB,r).isInside?null:l.jsx(VO,{...i,...n,ref:t})});Qre.displayName=fB;function Zre(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,i,s)){case s:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Jre(e,t,r=5){const n=[];
447switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function ene(e){const{top:t,right:r,bottom:n,left:i}=e;return[{x:i,y:t},{x:r,y:t},{x:r,y:n},{x:i,y:n}]}function tne(e,t){const{x:r,y:n}=e;let i=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const o=t[s],c=t[a],u=o.x,d=o.y,f=c.x,h=c.y;d>n!=h>n&&r<(f-u)*(n-d)/(h-d)+u&&(i=!i)}return i}function rne(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),nne(t)}function nne(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const i=e[n];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const i=e[n];for(;r.length>=2;){const s=r[r.length-1],a=r[r.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))r.pop();else break}r.push(i)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var ine=lB,hB=uB;const pB=ine,sne=b.forwardRef(({className:e,sideOffset:t=4,...r},n)=>l.jsx(hB,{ref:n,sideOffset:t,className:se("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 origin-[--radix-tooltip-content-transform-origin]",e),...r}));sne.displayName=hB.displayName;const w1=768;function ane(){const[e,t]=b.useState(void 0);return b.useEffect(()=>{const r=window.matchMedia(`(max-width: ${w1-1}px)`),n=()=>{t(window.innerWidth<w1)};return r.addEventListener("change",n),t(window.innerWidth<w1),()=>r.removeEventListener("change",n)},[]),!!e}const HO=_f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover-elevate active-elevate-2",{variants:{variant:{default:"bg-primary text-primary-foreground border border-primary-border",destructive:"bg-destructive text-destructive-foreground border border-destructive-border",outline:" border [border-color:var(--button-outline)]  shadow-xs active:shadow-none ",secondary:"border bg-secondary text-secondary-foreground border border-secondary-border ",ghost:"border border-transparent"},size:{default:"min-h-9 px-4 py-2",sm:"min-h-8 rounded-md px-3 text-xs",lg:"min-h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ie=b.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},s)=>{const a=n?VF:"button";return l.jsx(a,{className:se(HO({variant:t,size:r,className:e})),ref:s,...i})});ie.displayName="Button";const Je=b.forwardRef(({className:e,type:t,...r},n)=>l.jsx("input",{type:t,className:se("flex h-9 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",e),ref:n,...r}));Je.displayName="Input";var one="Separator",Ck="horizontal",lne=["horizontal","vertical"],mB=b.forwardRef((e,t)=>{const{decorative:r,orientation:n=Ck,...i}=e,s=cne(n)?n:Ck,o=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return l.jsx(ke.div,{"data-orientation":s,...o,...i,ref:t})});mB.displayName=one;function cne(e){return lne.includes(e)}var gB=mB;const qO=b.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},i)=>l.jsx(gB,{ref:i,decorative:r,orientation:t,className:se("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));qO.displayName=gB.displayName;var S1="focusScope.autoFocusOnMount",j1="focusScope.autoFocusOnUnmount",Pk={bubbles:!1,cancelable:!0},une="FocusScope",tb=b.forwardRef((e,t)=>
vendor: 4,277 bytes, line 447
447{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[o,c]=b.useState(null),u=lr(i),d=lr(s),f=b.useRef(null),h=Ye(t,m=>c(m)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(n){let m=function(w){if(p.paused||!o)return;const S=w.target;o.contains(S)?f.current=S:no(f.current,{select:!0})},v=function(w){if(p.paused||!o)return;const S=w.relatedTarget;S!==null&&(o.contains(S)||no(f.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const j of w)j.removedNodes.length>0&&no(o)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const x=new MutationObserver(y);return o&&x.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),x.disconnect()}}},[n,o,p.paused]),b.useEffect(()=>{if(o){kk.add(p);const m=document.activeElement;if(!o.contains(m)){const y=new CustomEvent(S1,Pk);o.addEventListener(S1,u),o.dispatchEvent(y),y.defaultPrevented||(dne(gne(vB(o)),{select:!0}),document.activeElement===m&&no(o))}return()=>{o.removeEventListener(S1,u),setTimeout(()=>{const y=new CustomEvent(j1,Pk);o.addEventListener(j1,d),o.dispatchEvent(y),y.defaultPrevented||no(m??document.body,{select:!0}),o.removeEventListener(j1,d),kk.remove(p)},0)}}},[o,u,d,p]);const g=b.useCallback(m=>{if(!r&&!n||p.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const x=m.currentTarget,[w,S]=fne(x);w&&S?!m.shiftKey&&y===S?(m.preventDefault(),r&&no(w,{select:!0})):m.shiftKey&&y===w&&(m.preventDefault(),r&&no(S,{select:!0})):y===x&&m.preventDefault()}},[r,n,p.paused]);return l.jsx(ke.div,{tabIndex:-1,...a,ref:h,onKeyDown:g})});tb.displayName=une;function dne(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(no(n,{select:t}),document.activeElement!==r)return}function fne(e){const t=vB(e),r=Tk(t,e),n=Tk(t.reverse(),e);return[r,n]}function vB(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Tk(e,t){for(const r of e)if(!hne(r,{upTo:t}))return r}function hne(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function pne(e){return e instanceof HTMLInputElement&&"select"in e}function no(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&pne(e)&&t&&e.select()}}var kk=mne();function mne(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Rk(e,t),e.unshift(t)},remove(t){var r;e=Rk(e,t),(r=e[0])==null||r.resume()}}}function Rk(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function gne(e){return e.filter(t=>t.tagName!=="A")}var _1=0;function KO(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$k()),document.body.insertAdjacentElement("beforeend",e[1]??$k()),_1++,()=>{_1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_1--}},[])}function $k(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ry="right-scroll-bar-position",ny="width-before-scroll-bar",vne="with-scroll-bars-hidden",yne="--removed-body-scroll-bar-size";function E1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function xne(e,t){var r=b.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var bne=typeof window<"u"?b.useLayoutEffect:b.useEffect,Ik=new WeakMap;function wne(e,t){var r=xne(null,function(n){return e.forEach(function(i){return E1(i,n)})});return bne(function(){var n=Ik.get(r);if(n){var i=new Set(n),s=new Set(e),a=r.current;
vendor: 4,224 bytes, lines 447-462
447i.forEach(function(o){s.has(o)||E1(o,null)}),s.forEach(function(o){i.has(o)||E1(o,a)})}Ik.set(r,e)},[e]),r}function Sne(e){return e}function jne(e,t){t===void 0&&(t=Sne);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=t(s,n);return r.push(a),function(){r=r.filter(function(o){return o!==a})}},assignSyncMedium:function(s){for(n=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(o){return s(o)},filter:function(){return r}}},assignMedium:function(s){n=!0;var a=[];if(r.length){var o=r;r=[],o.forEach(s),a=r}var c=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),r}}}};return i}function _ne(e){e===void 0&&(e={});var t=jne(null);return t.options=gi({async:!0,ssr:!1},e),t}var yB=function(e){var t=e.sideCar,r=sl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return b.createElement(n,gi({},r))};yB.isSideCarExport=!0;function Ene(e,t){return e.useMedium(t),yB}var xB=_ne(),N1=function(){},rb=b.forwardRef(function(e,t){var r=b.useRef(null),n=b.useState({onScrollCapture:N1,onWheelCapture:N1,onTouchMoveCapture:N1}),i=n[0],s=n[1],a=e.forwardProps,o=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,p=e.noRelative,g=e.noIsolation,m=e.inert,v=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,w=e.gapMode,S=sl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=h,E=wne([r,t]),_=gi(gi({},S),i);return b.createElement(b.Fragment,null,d&&b.createElement(j,{sideCar:xB,removeScrollBar:u,shards:f,noRelative:p,noIsolation:g,inert:m,setCallbacks:s,allowPinchZoom:!!v,lockRef:r,gapMode:w}),a?b.cloneElement(b.Children.only(o),gi(gi({},_),{ref:E})):b.createElement(x,gi({},_,{className:c,ref:E}),o))});rb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rb.classNames={fullWidth:ny,zeroRight:ry};var Nne=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function One(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Nne();return t&&e.setAttribute("nonce",t),e}function Ane(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Cne(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Pne=function(){var e=0,t=null;return{add:function(r){e==0&&(t=One())&&(Ane(t,r),Cne(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Tne=function(){var e=Pne();return function(t,r){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},bB=function(){var e=Tne(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},kne={left:0,top:0,right:0,gap:0},O1=function(e){return parseInt(e||"",10)||0},Rne=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[O1(r),O1(n),O1(i)]},$ne=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return kne;var t=Rne(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Ine=bB(),Qu="data-scroll-locked",Mne=function(e,t,r,n){var i=e.left,s=e.top,a=e.right,o=e.gap;return r===void 0&&(r="margin"),`
448  .`.concat(vne,` {
449   overflow: hidden `).concat(n,`;
450   padding-right: `).concat(o,"px ").concat(n,`;
451  }
452  body[`).concat(Qu,`] {
453    overflow: hidden `).concat(n,`;
454    overscroll-behavior: contain;
455    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
456    padding-left: `.concat(i,`px;
457    padding-top: `).concat(s,`px;
458    padding-right: `).concat(a,`px;
459    margin-left:0;
460    margin-top:0;
461    margin-right: `).concat(o,"px ").concat(n,`;
462    `),r==="padding"&&"padding-right: ".concat(o,"px ").concat(n,";
462")].filter(Boolean).join(""),`
463  }
464  
465  .`).concat(ry,` {
466    right: `).concat(o,"px ").concat(n,`;
467  }
468  
469  .`).concat(ny,` {
470    margin-right: `).concat(o,"px ").concat(n,`;
471  }
472  
473  .`).concat(ry," .").concat(ry,` {
474    right: 0 `).concat(n,`;
475  }
476  
477  .`).concat(ny," .").concat(ny,` {
478    margin-right: 0 `).concat(n,`;
479  }
480  
481  body[`).concat(Qu,`] {
482    `).concat(yne,": ").concat(o,`px;
483  }
484`)},Mk=function(){var e=parseInt(document.body.getAttribute(Qu)||"0",10);return isFinite(e)?e:0},Dne=function(){b.useEffect(function(){return document.body.setAttribute(Qu,(Mk()+1).toString()),function(){var e=Mk()-1;e<=0?document.body.removeAttribute(Qu):document.body.setAttribute(Qu,e.toString())}},[])},Lne=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;Dne();var s=b.useMemo(function(){return $ne(i)},[i]);return b.createElement(Ine,{styles:Mne(s,!t,i,r?"":"!important")})},qj=!1;if(typeof window<"u")try{var lv=Object.defineProperty({},"passive",{get:function(){return qj=!0,!0}});window.addEventListener("test",lv,lv),window.removeEventListener("test",lv,lv)}catch{qj=!1}var iu=qj?{passive:!1}:!1,Fne=function(e){return e.tagName==="TEXTAREA"},wB=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Fne(e)&&r[t]==="visible")},Bne=function(e){return wB(e,"overflowY")},zne=function(e){return wB(e,"overflowX")},Dk=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=SB(e,n);if(i){var s=jB(e,n),a=s[1],o=s[2];if(a>o)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Une=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Vne=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},SB=function(e,t){return e==="v"?Bne(t):zne(t)},jB=function(e,t){return e==="v"?Une(t):Vne(t)},Wne=function(e,t){return e==="h"&&t==="rtl"?-1:1},Hne=function(e,t,r,n,i){var s=Wne(e,window.getComputedStyle(t).direction),a=s*n,o=r.target,c=t.contains(o),u=!1,d=a>0,f=0,h=0;do{if(!o)break;var p=jB(e,o),g=p[0],m=p[1],v=p[2],y=m-v-s*g;(g||y)&&SB(e,o)&&(f+=y,h+=g);var x=o.parentNode;o=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&o!==document.body||c&&(t.contains(o)||t===o));return(d&&Math.abs(f)<1||!d&&Math.abs(h)<1)&&(u=!0),u},cv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Lk=function(e){return[e.deltaX,e.deltaY]},Fk=function(e){return e&&"current"in e?e.current:e},qne=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Kne=function(e){return`
485  .block-interactivity-`.concat(e,` {pointer-events: none;}
486  .allow-interactivity-`).concat(e,` {pointer-events: all;}
487`)},Gne=0,su=[];function Yne(e){var t=b.useRef([]),r=b.useRef([0,0]),n=b.useRef(),i=b.useState(Gne++)[0],s=b.useState(bB)[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=fO([e.lockRef.current],(e.shards||[]).map(Fk),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var o=b.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var y=cv(m),x=r.current,w="deltaX"in m?m.deltaX:x[0]-y[0],S="deltaY"in m?m.deltaY:x[1]-y[1],j,E=m.target,_=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in m&&_==="h"&&E.type==="range")return!1;var N=Dk(_,E);if(!N)return!0;if(N?j=_:(j=_==="v"?"h":"v",N=Dk(_,E)),!N)return!1;if(!n.current&&"changedTouches"in m&&(w||S)&&(n.current=j),!j)return!0;var O=n.current||j;return Hne(O,v,m,O==="h"?w:S)},[]),c=b.useCallback(function(m){var v=m;if(!(!su.length||su[su.length-1]!==s)){var y="deltaY"in v?Lk(v):cv(v),x=t.current.filter(function(j){return j.name===v.type&&(j.target===v.target||v.target===j.shadowParent)&&qne(j.delta,y)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}
vendor: 4,102 bytes, line 487
487if(!x){var w=(a.current.shards||[]).map(Fk).filter(Boolean).filter(function(j){return j.contains(v.target)}),S=w.length>0?o(v,w[0]):!a.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),u=b.useCallback(function(m,v,y,x){var w={name:m,delta:v,target:y,should:x,shadowParent:Xne(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=b.useCallback(function(m){r.current=cv(m),n.current=void 0},[]),f=b.useCallback(function(m){u(m.type,Lk(m),m.target,o(m,e.lockRef.current))},[]),h=b.useCallback(function(m){u(m.type,cv(m),m.target,o(m,e.lockRef.current))},[]);b.useEffect(function(){return su.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,iu),document.addEventListener("touchmove",c,iu),document.addEventListener("touchstart",d,iu),function(){su=su.filter(function(m){return m!==s}),document.removeEventListener("wheel",c,iu),document.removeEventListener("touchmove",c,iu),document.removeEventListener("touchstart",d,iu)}},[]);var p=e.removeScrollBar,g=e.inert;return b.createElement(b.Fragment,null,g?b.createElement(s,{styles:Kne(i)}):null,p?b.createElement(Lne,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Xne(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Qne=Ene(xB,Yne);var nb=b.forwardRef(function(e,t){return b.createElement(rb,gi({},e,{ref:t,sideCar:Qne}))});nb.classNames=rb.classNames;var Zne=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},au=new WeakMap,uv=new WeakMap,dv={},A1=0,_B=function(e){return e&&(e.host||_B(e.parentNode))},Jne=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=_B(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},eie=function(e,t,r,n){var i=Jne(t,Array.isArray(e)?e:[e]);dv[r]||(dv[r]=new WeakMap);var s=dv[r],a=[],o=new Set,c=new Set(i),u=function(f){!f||o.has(f)||(o.add(f),u(f.parentNode))};i.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(o.has(h))d(h);else try{var p=h.getAttribute(n),g=p!==null&&p!=="false",m=(au.get(h)||0)+1,v=(s.get(h)||0)+1;au.set(h,m),s.set(h,v),a.push(h),m===1&&g&&uv.set(h,!0),v===1&&h.setAttribute(r,"true"),g||h.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return d(t),o.clear(),A1++,function(){a.forEach(function(f){var h=au.get(f)-1,p=s.get(f)-1;au.set(f,h),s.set(f,p),h||(uv.has(f)||f.removeAttribute(n),uv.delete(f)),p||f.removeAttribute(r)}),A1--,A1||(au=new WeakMap,au=new WeakMap,uv=new WeakMap,dv={})}},GO=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=Zne(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),eie(n,i,r,"aria-hidden")):function(){return null}},ib="Dialog",[EB,NB]=Zr(ib),[tie,ps]=EB(ib),OB=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,o=b.useRef(null),c=b.useRef(null),[u,d]=Ra({prop:n,defaultProp:i??!1,onChange:s,caller:ib});return l.jsx(tie,{scope:t,triggerRef:o,contentRef:c,contentId:Ls(),titleId:Ls(),descriptionId:Ls(),open:u,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(f=>!f),[d]),modal:a,children:r})};OB.displayName=ib;var AB="DialogTrigger",CB=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ps(AB,r),s=Ye(t,i.triggerRef);return l.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":QO(i.open),...n,ref:s,onClick:fe(e.onClick,i.onOpenToggle)})});CB.displayName=AB;var YO="DialogPortal",[rie,PB]=EB(YO,{forceMount:void 0}),TB=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,s=ps(YO,t);return l.jsx(rie,{scope:t,forceMount:r,children:b.Children.map(n,a=>l.jsx(yn,{present:r||s.open,children:l.jsx(Xm,{asChild:!0,container:i,children:a})}))})};TB.displayName=YO;var Yy="DialogOverlay",kB=b.forwardRef((e,t)=>
vendor: 5,246 bytes, lines 487-491
487{const r=PB(Yy,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,s=ps(Yy,e.__scopeDialog);return s.modal?l.jsx(yn,{present:n||s.open,children:l.jsx(iie,{...i,ref:t})}):null});kB.displayName=Yy;var nie=xc("DialogOverlay.RemoveScroll"),iie=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ps(Yy,r);return l.jsx(nb,{as:nie,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(ke.div,{"data-state":QO(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),wc="DialogContent",RB=b.forwardRef((e,t)=>{const r=PB(wc,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,s=ps(wc,e.__scopeDialog);return l.jsx(yn,{present:n||s.open,children:s.modal?l.jsx(sie,{...i,ref:t}):l.jsx(aie,{...i,ref:t})})});RB.displayName=wc;var sie=b.forwardRef((e,t)=>{const r=ps(wc,e.__scopeDialog),n=b.useRef(null),i=Ye(t,r.contentRef,n);return b.useEffect(()=>{const s=n.current;if(s)return GO(s)},[]),l.jsx($B,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:fe(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:fe(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&s.preventDefault()}),onFocusOutside:fe(e.onFocusOutside,s=>s.preventDefault())})}),aie=b.forwardRef((e,t)=>{const r=ps(wc,e.__scopeDialog),n=b.useRef(!1),i=b.useRef(!1);return l.jsx($B,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,o;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(n.current||(o=r.triggerRef.current)==null||o.focus(),s.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((u=r.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),$B=b.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,o=ps(wc,r),c=b.useRef(null),u=Ye(t,c);return KO(),l.jsxs(l.Fragment,{children:[l.jsx(tb,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s,children:l.jsx(jf,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":QO(o.open),...a,ref:u,onDismiss:()=>o.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(lie,{titleId:o.titleId}),l.jsx(uie,{contentRef:c,descriptionId:o.descriptionId})]})]})}),XO="DialogTitle",IB=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ps(XO,r);return l.jsx(ke.h2,{id:i.titleId,...n,ref:t})});IB.displayName=XO;var MB="DialogDescription",DB=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ps(MB,r);return l.jsx(ke.p,{id:i.descriptionId,...n,ref:t})});DB.displayName=MB;var LB="DialogClose",FB=b.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ps(LB,r);return l.jsx(ke.button,{type:"button",...n,ref:t,onClick:fe(e.onClick,()=>i.onOpenChange(!1))})});FB.displayName=LB;function QO(e){return e?"open":"closed"}var BB="DialogTitleWarning",[oie,zB]=OJ(BB,{contentName:wc,titleName:XO,docsSlug:"dialog"}),lie=({titleId:e})=>{const t=zB(BB),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
488
489If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
490
491For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},cie="DialogDescriptionWarning",uie=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${zB(cie).contentName}}.`;return b.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},UB=OB,VB=CB,ZO=TB,rg=kB,ng=RB,ig=IB,sg=DB,sb=FB;const die=ZO,WB=b.forwardRef(({className:e,...t},r)=>l.jsx(rg,{className:se("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",e),...t,ref:r}));WB.displayName=rg.displayName;const fie=_f("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),hie=b.forwardRef(({side:e="right",className:t,children:r,...n},i)=>l.jsxs(die,{children:[l.jsx(WB,{}),l.jsxs(ng,{ref:i,className:se(fie({side:e}),t),...n,children:[r,l.jsxs(sb,{className:"absolute right-4 top-4 roun
491ded-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-secondary",children:[l.jsx(us,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));hie.displayName=ng.displayName;const pie=b.forwardRef(({className:e,...t},r)=>l.jsx(ig,{ref:r,className:se("text-lg font-semibold text-foreground",e),...t}));pie.displayName=ig.displayName;const mie=b.forwardRef(({className:e,...t},r)=>l.jsx(sg,{ref:r,className:se("text-sm text-muted-foreground",e),...t}));mie.displayName=sg.displayName;function jt({className:e,...t}){return l.jsx("div",{className:se("animate-pulse rounded-md bg-muted",e),...t})}const gie="sidebar_state",vie=60*60*24*7,yie="16rem",xie="3rem",bie="b",wie=b.createContext(null);function Sie({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:i,children:s,...a}){const o=ane(),[c,u]=b.useState(!1),[d,f]=b.useState(e),h=t??d,p=b.useCallback(y=>{const x=typeof y=="function"?y(h):y;r?r(x):f(x),document.cookie=`${gie}=${x}; path=/; max-age=${vie}`},[r,h]),g=b.useCallback(()=>o?u(y=>!y):p(y=>!y),[o,p,u]);b.useEffect(()=>{const y=x=>{x.key===bie&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),g())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[g]);const m=h?"expanded":"collapsed",v=b.useMemo(()=>({state:m,open:h,setOpen:p,isMobile:o,openMobile:c,setOpenMobile:u,toggleSidebar:g}),[m,h,p,o,c,u,g]);return l.jsx(wie.Provider,{value:v,children:l.jsx(pB,{delayDuration:0,children:l.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":yie,"--sidebar-width-icon":xie,...i},className:se("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",n),...a,children:s})})})}const HB=b.createContext(void 0);function jie({children:e,defaultTheme:t="light"}){const[r,n]=b.useState(()=>localStorage.getItem("theme")||t);return b.useEffect(()=>{const i=document.documentElement;i.classList.remove("light","dark"),i.classList.add(r),localStorage.setItem("theme",r)},[r]),l.jsx(HB.Provider,{value:{theme:r,setTheme:n},children:e})}const _ie=()=>{const e=b.useContext(HB);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function Eie(){const{theme:e,setTheme:t}=_ie();return l.jsxs(ie,{variant:"ghost",size:"icon",onClick:()=>t(e==="dark"?"light":"dark"),"data-testid":"button-theme-toggle",children:[e==="dark"?l.jsx($ee,{className:"h-5 w-5"}):l.jsx(j5,{className:"h-5 w-5"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function qB(e){return t=>typeof t===e}var Nie=qB("function"),Oie=e=>e===null,Bk=e=>Object.prototype.toString.call(e).slice(8,-1)==="RegExp",zk=e=>!Aie(e)&&!Oie(e)&&(Nie(e)||typeof e=="object"),Aie=qB("undefined");function Cie(e,t){const{length:r}=e;if(r!==t.length)return!1;for(let n=r;n--!==0;)if(!cn(e[n],t[n]))return!1;return!0}function Pie(e,t){if(e.byteLength!==t.byteLength)return!1;const r=new DataView(e.buffer),n=new DataView(t.buffer);let i=e.byteLength;for(;i--;)if(r.getUint8(i)!==n.getUint8(i))return!1;return!0}function Tie(e,t){if(e.size!==t.size)return!1;for(const r of e.entries())if(!t.has(r[0]))return!1;for(const r of e.entries())if(!cn(r[1],t.get(r[0])))return!1;return!0}function kie(e,t){if(e.size!==t.size)return!1;for(const r of e.entries())if(!t.has(r[0]))return!1;return!0}function cn(e,t){if(e===t)return!0;if(e&&zk(e)&&t&&zk(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return Cie(e,t);if(e instanceof Map&&t instanceof Map)return Tie(e,t);if(e instanceof Set&&t instanceof Set)return kie(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return Pie(e,t);if(Bk(e)&&Bk(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=r.length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[i]))return!1;for(let i=r.length;i--!==0;){const s=r[i];if(!(s==="_owner"&&e.$$typeof)&&!cn(e[s],t[s]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}var Rie=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],$ie=["bigint","boolean","null","number","string","symbol","undefined"];function ab(e){const t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(Iie(t))return t}function ms(e){return t=>ab(t)===e}function Iie(e){return Rie.includes(e)}function kf(e){return t=>typeof t===e}function Mie(e){return $ie.includes(e)}var Die=["innerHTML","ownerDocument","style","attributes","nodeValue"];function Se(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(Se.array(e))return"Array";if(Se.plainFunction(e))return"Function";const t=ab(e);return t||"Object"}Se.array=Array.isArray;Se.arrayOf=(e,t)=>!Se.array(e)&&!Se.function(t)?!1:e.every(r=>t(r));Se.asyncGeneratorFunction=e=>ab(e)==="AsyncGeneratorFunction";Se.asyncFunction=ms("AsyncFunction");Se.bigint=kf("bigint");Se.boolean=e=>e===!0||e===!1;Se.date=ms("Date");Se.defined=e=>!Se.undefined(e);Se.domElement=e=>Se.object(e)&&!Se.plainObject(e)&&e.nodeType===1&&Se.string(e.nodeName)&&Die.every(t=>t in e);Se.empty=e=>Se.string(e)&&e.length===0||Se.array(e)&&e.length===0||Se.object(e)&&!Se.map(e)&&!Se.set(e)&&Object.keys(e).length===0||Se.set(e)&&e.size===0||Se.map(e)&&e.size===0;Se.error=ms("Error");Se.function=kf("function");Se.generator=e=>Se.iterable(e)&&Se.function(e.next)&&Se.function(e.throw);Se.generatorFunction=ms("GeneratorFunction");Se.instanceOf=(e,t)=>!e||!t?!1:Object.getPrototypeOf(e)===t.prototype;Se.iterable=e=>!Se.nullOrUndefined(e)&&Se.function(e[Symbol.iterator]);Se.map=ms("Map");Se.nan=e=>Number.isNaN(e);Se.null=e=>e===null;Se.nullOrUndefined=e=>Se.null(e)||Se.undefined(e);Se.number=e=>kf("number")(e)&&!Se.nan(e);Se.numericString=e=>Se.string(e)&&e.length>0&&!Number.isNaN(Number(e));Se.object=e=>!Se.nullOrUndefined(e)&&(Se.function(e)||typeof e=="object");Se.oneOf=(e,t)=>Se.array(e)?e.indexOf(t)>-1:!1;Se.plainFunction=ms("Function");Se.plainObject=e=>{if(ab(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};Se.primitive=e=>Se.null(e)||Mie(typeof e);Se.promise=ms("Promise");Se.propertyOf=(e,t,r)=>{if(!Se.object(e)||!t)return!1;const n=e[t];return Se.function(r)?r(n):Se.defined(n)};Se.regexp=ms("RegExp");Se.set=ms("Set");Se.string=kf("string");Se.symbol=kf("symbol");Se.undefined=kf("undefined");Se.weakMap=ms("WeakMap");Se.weakSet=ms("WeakSet");var Te=Se;function Lie(...e){return e.every(t=>Te.string(t)||Te.array(t)||Te.plainObject(t))}function Fie(e,t,r){return KB(e,t)?[e,t].every(Te.array)?!e.some(qk(r))&&t.some(qk(r)):[e,t].every(Te.plainObject)?!Object.entries(e).some(Hk(r))&&Object.entries(t).some(Hk(r)):t===r:!1}function Uk(e,t,r){const{actual:n,key:i,previous:s,type:a}=r,o=Ts(e,i),c=Ts(t,i);let u=[o,c].every(Te.number)&&(a==="increased"?o<c:o>c);return Te.undefined(n)||(u=u&&c===n),Te.undefined(s)||(u=u&&o===s),u}function Vk(e,t,r){const{key:n,type:i,value:s}=r,a=Ts(e,n),o=Ts(t,n),c=i==="added"?a:o,u=i==="added"?o:a;
491if(!Te.nullOrUndefined(s)){if(Te.defined(c)){if(Te.array(c)||Te.plainObject(c))return Fie(c,u,s)}else return cn(u,s);return!1}return[a,o].every(Te.array)?!u.every(JO(c)):[a,o].every(Te.plainObject)?Bie(Object.keys(c),Object.keys(u)):![a,o].every(d=>Te.primitive(d)&&Te.defined(d))&&(i==="added"?!Te.defined(a)&&Te.defined(o):Te.defined(a)&&!Te.defined(o))}function Wk(e,t,{key:r}={}){let n=Ts(e,r),i=Ts(t,r);if(!KB(n,i))throw new TypeError("Inputs have different types");if(!Lie(n,i))throw new TypeError("Inputs don't have length");return[n,i].every(Te.plainObject)&&(n=Object.keys(n),i=Object.keys(i)),[n,i]}function Hk(e){return([t,r])=>Te.array(e)?cn(e,r)||e.some(n=>cn(n,r)||Te.array(r)&&JO(r)(n)):Te.plainObject(e)&&e[t]?!!e[t]&&cn(e[t],r):cn(e,r)}function Bie(e,t){return t.some(r=>!e.includes(r))}function qk(e){return t=>Te.array(e)?e.some(r=>cn(r,t)||Te.array(t)&&JO(t)(r)):cn(e,t)}function lh(e,t){return Te.array(e)?e.some(r=>cn(r,t)):cn(e,t)}function JO(e){return t=>e.some(r=>cn(r,t))}function KB(...e){return e.every(Te.array)||e.every(Te.number)||e.every(Te.plainObject)||e.every(Te.string)}function Ts(e,t){return Te.plainObject(e)||Te.array(e)?Te.string(t)?t.split(".").reduce((n,i)=>n&&n[i],e):Te.number(t)?e[t]:e:e}function Xy(e,t){if([e,t].some(Te.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(d=>Te.plainObject(d)||Te.array(d)))throw new Error("Expected plain objects or array");return{added:(d,f)=>{try{return Vk(e,t,{key:d,type:"added",value:f})}catch{return!1}},changed:(d,f,h)=>{try{const p=Ts(e,d),g=Ts(t,d),m=Te.defined(f),v=Te.defined(h);if(m||v){const y=v?lh(h,p):!lh(f,p),x=lh(f,g);return y&&x}return[p,g].every(Te.array)||[p,g].every(Te.plainObject)?!cn(p,g):p!==g}catch{return!1}},changedFrom:(d,f,h)=>{if(!Te.defined(d))return!1;try{const p=Ts(e,d),g=Ts(t,d),m=Te.defined(h);return lh(f,p)&&(m?lh(h,g):!m)}catch{return!1}},decreased:(d,f,h)=>{if(!Te.defined(d))return!1;try{return Uk(e,t,{key:d,actual:f,previous:h,type:"decreased"})}catch{return!1}},emptied:d=>{try{const[f,h]=Wk(e,t,{key:d});return!!f.length&&!h.length}catch{return!1}},filled:d=>{try{const[f,h]=Wk(e,t,{key:d});return!f.length&&!!h.length}catch{return!1}},increased:(d,f,h)=>{if(!Te.defined(d))return!1;try{return Uk(e,t,{key:d,actual:f,previous:h,type:"increased"})}catch{return!1}},removed:(d,f)=>{try{return Vk(e,t,{key:d,type:"removed",value:f})}catch{return!1}}}}var zie=new Error("Element already at target scroll position"),Uie=new Error("Scroll cancelled"),Vie=Math.min,Kk=Date.now,Wie={left:Gk("scrollLeft"),top:Gk("scrollTop")};function Gk(e){return function(r,n,i,s){i=i||{},typeof i=="function"&&(s=i,i={}),typeof s!="function"&&(s=qie);var a=Kk(),o=r[e],c=i.ease||Hie,u=isNaN(i.duration)?350:+i.duration,d=!1;return o===n?s(zie,r[e]):requestAnimationFrame(h),f;function f(){d=!0}function h(p){if(d)return s(Uie,r[e]);var g=Kk(),m=Vie(1,(g-a)/u),v=c(m);r[e]=v*(n-o)+o,m<1?requestAnimationFrame(h):requestAnimationFrame(function(){s(null,r[e])})}}}function Hie(e){return .5*(1-Math.cos(Math.PI*e))}function qie(){}const Kie=pt(Wie);var GB={exports:{}};(function(e){(function(t,r){e.exports?e.exports=r():t.Scrollparent=r()})(Th,function(){function t(n){var i=getComputedStyle(n,null).getPropertyValue("overflow");return i.indexOf("scroll")>-1||i.indexOf("auto")>-1}function r(n){if(n instanceof HTMLElement||n instanceof SVGElement){for(var i=n.parentNode;i.parentNode;){if(t(i))return i;i=i.parentNode}return document.scrollingElement||document.documentElement}}return r})})(GB);var Gie=GB.exports;const YB=pt(Gie);var Yie=function(e){return Object.prototype.hasOwnProperty.call(e,"props")},Xie=function(e,t){return e+Up(t)},Up=function(e){return e===null||typeof e=="boolean"||typeof e>"u"?"":typeof e=="number"?e.toString():typeof e=="string"?e:Array.isArray(e)?e.reduce(Xie,""):Yie(e)&&Object.prototype.hasOwnProperty.call(e.props,"children")?Up(e.props.children):""};Up.default=Up;var Qie=Up;const Yk=pt(Qie);var Zie=function(t){return Jie(t)&&!ese(t)};function Jie(e){return!!e&&typeof e=="object"}function ese(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||nse(e)}var tse=typeof Symbol=="function"&&Symbol.for,rse=tse?Symbol.for("react.element"):60103;function nse(e){return e.$$typeof===rse}function ise(e){return Array.isArray(e)?[]:{}}function Vp(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Cd(ise(e),e,t):e}function sse(e,t,r){return e.concat(t).map(function(n){return Vp(n,r)})}function ase(e,t){if(!t.customMerge)return Cd;var r=t.customMerge(e);return typeof r=="function"?r:Cd}function ose(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Xk(e){return Object.keys(e).concat(ose(e))}function XB(e,t){try{return t in e}catch{return!1}}function lse(e,t){return XB(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function cse(e,t,r){var n={};return r.isMergeableObject(e)&&Xk(e).forEach(function(i){n[i]=Vp(e[i],r)}),Xk(t).forEach(function(i){lse(e,i)||(XB(e,i)&&r.isMergeableObject(t[i])?n[i]=ase(i,r)(e[i],t[i],r):n[i]=Vp(t[i],r))}),n}function Cd(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||sse,r.isMergeableObject=r.isMergeableObject||Zie,r.cloneUnlessOtherwiseSpecified=Vp;var n=Array.isArray(t),i=Array.isArray(e),s=n===i;return s?n?r.arrayMerge(e,t,r):cse(e,t,r):Vp(t,r)}Cd.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,i){return Cd(n,i,r)},{})};var use=Cd,dse=use;const rs=pt(dse);var QB={exports:{}},fse="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",hse=fse,pse=hse;function ZB(){}function JB(){}JB.resetWarningCache=ZB;var mse=function(){function e(n,i,s,a,o,c){if(c!==pse){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
vendor: 5,080 bytes, lines 491-514
491:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:JB,resetWarningCache:ZB};return r.PropTypes=r,r};QB.exports=mse();var gse=QB.exports;const J=pt(gse);/**!
492 * @fileOverview Kickass library to create and place poppers near their reference elements.
493 * @version 1.16.1
494 * @license
495 * Copyright (c) 2016 Federico Zivolo and contributors
496 *
497 * Permission is hereby granted, free of charge, to any person obtaining a copy
498 * of this software and associated documentation files (the "Software"), to deal
499 * in the Software without restriction, including without limitation the rights
500 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
501 * copies of the Software, and to permit persons to whom the Software is
502 * furnished to do so, subject to the following conditions:
503 *
504 * The above copyright notice and this permission notice shall be included in all
505 * copies or substantial portions of the Software.
506 *
507 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
508 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
509 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
510 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
511 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
512 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
513 * SOFTWARE.
514 */var ag=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",vse=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(ag&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();function yse(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function xse(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},vse))}}var bse=ag&&window.Promise,wse=bse?yse:xse;function ez(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function Wc(e,t){if(e.nodeType!==1)return[];var r=e.ownerDocument.defaultView,n=r.getComputedStyle(e,null);return t?n[t]:n}function eA(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function og(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=Wc(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(r+i+n)?e:og(eA(e))}function tz(e){return e&&e.referenceNode?e.referenceNode:e}var Qk=ag&&!!(window.MSInputMethodContext&&document.documentMode),Zk=ag&&/MSIE 10/.test(navigator.userAgent);function Rf(e){return e===11?Qk:e===10?Zk:Qk||Zk}function Pd(e){if(!e)return document.documentElement;for(var t=Rf(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var n=r&&r.nodeName;return!n||n==="BODY"||n==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(r.nodeName)!==-1&&Wc(r,"position")==="static"?Pd(r):r}function Sse(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||Pd(e.firstElementChild)===e}function Kj(e){return e.parentNode!==null?Kj(e.parentNode):e}function Qy(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?e:t,i=r?t:e,s=document.createRange();s.setStart(n,0),s.setEnd(i,0);var a=s.commonAncestorContainer;if(e!==a&&t!==a||n.contains(i))return Sse(a)?a:Pd(a);var o=Kj(e);return o.host?Qy(o.host,t):Qy(e,Kj(t).host)}function Td(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",r=t==="top"?"scrollTop":"scrollLeft",n=e.nodeName;if(n==="BODY"||n==="HTML"){var i=e.ownerDocument.documentElement,s=e.ownerDocument.scrollingElement||i;return s[r]}return e[r]}function jse(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=Td(t,"top"),i=Td(t,"left"),s=r?-1:1;return e.top+=n*s,e.bottom+=n*s,e.left+=i*s,e.right+=i*s,e}function Jk(e,t){var r=t==="x"?"Left":"Top",n=r==="Left"?"Right":"Bottom";return parseFloat(e["border"+r+"Width"])+parseFloat(e["border"+n+"Width"])}function e2(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],Rf(10)?parseInt(r["offset"+e])+parseInt(n["margin"+(e==="Height"?"Top":"Left")])+parseInt(n["margin"+(e==="Height"?"Bottom":"Right")]):0)}function rz(e){var t=e.body,r=e.documentElement,n=Rf(10)&&getComputedStyle(r);return{height:e2("Height",t,r,n),width:e2("Width",t,r,n)}}var _se=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Ese=function(){function e(t,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),kd=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},xi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 12,625 bytes, line 514
514for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Qo(e){return xi({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Gj(e){var t={};try{if(Rf(10)){t=e.getBoundingClientRect();var r=Td(e,"top"),n=Td(e,"left");t.top+=r,t.left+=n,t.bottom+=r,t.right+=n}else t=e.getBoundingClientRect()}catch{}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},s=e.nodeName==="HTML"?rz(e.ownerDocument):{},a=s.width||e.clientWidth||i.width,o=s.height||e.clientHeight||i.height,c=e.offsetWidth-a,u=e.offsetHeight-o;if(c||u){var d=Wc(e);c-=Jk(d,"x"),u-=Jk(d,"y"),i.width-=c,i.height-=u}return Qo(i)}function tA(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=Rf(10),i=t.nodeName==="HTML",s=Gj(e),a=Gj(t),o=og(e),c=Wc(t),u=parseFloat(c.borderTopWidth),d=parseFloat(c.borderLeftWidth);r&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var f=Qo({top:s.top-a.top-u,left:s.left-a.left-d,width:s.width,height:s.height});if(f.marginTop=0,f.marginLeft=0,!n&&i){var h=parseFloat(c.marginTop),p=parseFloat(c.marginLeft);f.top-=u-h,f.bottom-=u-h,f.left-=d-p,f.right-=d-p,f.marginTop=h,f.marginLeft=p}return(n&&!r?t.contains(o):t===o&&o.nodeName!=="BODY")&&(f=jse(f,t)),f}function Nse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.ownerDocument.documentElement,n=tA(e,r),i=Math.max(r.clientWidth,window.innerWidth||0),s=Math.max(r.clientHeight,window.innerHeight||0),a=t?0:Td(r),o=t?0:Td(r,"left"),c={top:a-n.top+n.marginTop,left:o-n.left+n.marginLeft,width:i,height:s};return Qo(c)}function nz(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(Wc(e,"position")==="fixed")return!0;var r=eA(e);return r?nz(r):!1}function iz(e){if(!e||!e.parentElement||Rf())return document.documentElement;for(var t=e.parentElement;t&&Wc(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function rA(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s={top:0,left:0},a=i?iz(e):Qy(e,tz(t));if(n==="viewport")s=Nse(a,i);else{var o=void 0;n==="scrollParent"?(o=og(eA(t)),o.nodeName==="BODY"&&(o=e.ownerDocument.documentElement)):n==="window"?o=e.ownerDocument.documentElement:o=n;var c=tA(o,a,i);if(o.nodeName==="HTML"&&!nz(a)){var u=rz(e.ownerDocument),d=u.height,f=u.width;s.top+=c.top-c.marginTop,s.bottom=d+c.top,s.left+=c.left-c.marginLeft,s.right=f+c.left}else s=c}r=r||0;var h=typeof r=="number";return s.left+=h?r:r.left||0,s.top+=h?r:r.top||0,s.right-=h?r:r.right||0,s.bottom-=h?r:r.bottom||0,s}function Ose(e){var t=e.width,r=e.height;return t*r}function sz(e,t,r,n,i){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var a=rA(r,n,s,i),o={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},c=Object.keys(o).map(function(h){return xi({key:h},o[h],{area:Ose(o[h])})}).sort(function(h,p){return p.area-h.area}),u=c.filter(function(h){var p=h.width,g=h.height;return p>=r.clientWidth&&g>=r.clientHeight}),d=u.length>0?u[0].key:c[0].key,f=e.split("-")[1];return d+(f?"-"+f:"")}function az(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,i=n?iz(t):Qy(t,tz(r));return tA(r,i,n)}function oz(e){var t=e.ownerDocument.defaultView,r=t.getComputedStyle(e),n=parseFloat(r.marginTop||0)+parseFloat(r.marginBottom||0),i=parseFloat(r.marginLeft||0)+parseFloat(r.marginRight||0),s={width:e.offsetWidth+i,height:e.offsetHeight+n};return s}function Zy(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(r){return t[r]})}function lz(e,t,r){r=r.split("-")[0];var n=oz(e),i={width:n.width,height:n.height},s=["right","left"].indexOf(r)!==-1,a=s?"top":"left",o=s?"left":"top",c=s?"height":"width",u=s?"width":"height";return i[a]=t[a]+t[c]/2-n[c]/2,r===o?i[o]=t[o]-n[u]:i[o]=t[Zy(o)],i}function lg(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Ase(e,t,r){if(Array.prototype.findIndex)return e.findIndex(function(i){return i[t]===r});var n=lg(e,function(i){return i[t]===r});return e.indexOf(n)}function cz(e,t,r){var n=r===void 0?e:e.slice(0,Ase(e,"name",r));return n.forEach(function(i){i.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var s=i.function||i.fn;i.enabled&&ez(s)&&(t.offsets.popper=Qo(t.offsets.popper),t.offsets.reference=Qo(t.offsets.reference),t=s(t,i))}),t}function Cse(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=az(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=sz(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=lz(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=cz(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function uz(e,t){return e.some(function(r){var n=r.name,i=r.enabled;return i&&n===t})}function nA(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var i=t[n],s=i?""+i+r:e;if(typeof document.body.style[s]<"u")return s}return null}function Pse(){return this.state.isDestroyed=!0,uz(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[nA("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function dz(e){var t=e.ownerDocument;return t?t.defaultView:window}function fz(e,t,r,n){var i=e.nodeName==="BODY",s=i?e.ownerDocument.defaultView:e;s.addEventListener(t,r,{passive:!0}),i||fz(og(s.parentNode),t,r,n),n.push(s)}function Tse(e,t,r,n){r.updateBound=n,dz(e).addEventListener("resize",r.updateBound,{passive:!0});var i=og(e);return fz(i,"scroll",r.updateBound,r.scrollParents),r.scrollElement=i,r.eventsEnabled=!0,r}function kse(){this.state.eventsEnabled||(this.state=Tse(this.reference,this.options,this.state,this.scheduleUpdate))}function Rse(e,t){return dz(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(r){r.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function $se(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=Rse(this.reference,this.state))}function iA(e){return e!==""&&!isNaN(parseFloat(e))&&isFinite(e)}function Yj(e,t){Object.keys(t).forEach(function(r){var n="";["width","height","top","right","bottom","left"].indexOf(r)!==-1&&iA(t[r])&&(n="px"),e.style[r]=t[r]+n})}function Ise(e,t){Object.keys(t).forEach(function(r){var n=t[r];n!==!1?e.setAttribute(r,t[r]):e.removeAttribute(r)})}function Mse(e){return Yj(e.instance.popper,e.styles),Ise(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&Yj(e.arrowElement,e.arrowStyles),e}function Dse(e,t,r,n,i){var s=az(i,t,e,r.positionFixed),a=sz(r.placement,s,t,e,r.modifiers.flip.boundariesElement,r.modifiers.flip.padding);return t.setAttribute("x-placement",a),Yj(t,{position:r.positionFixed?"fixed":"absolute"}),r}function Lse(e,t){var r=e.offsets,n=r.popper,i=r.reference,s=Math.round,a=Math.floor,o=function(y){return y},c=s(i.width),u=s(n.width),d=["left","right"].indexOf(e.placement)!==-1,f=e.placement.indexOf("-")!==-1,h=c%2===u%2,p=c%2===1&&u%2===1,g=t?d||f||h?s:a:o,m=t?s:o;return{left:g(p&&!f&&t?n.left-1:n.left),top:m(n.top),bottom:m(n.bottom),right:g(n.right)}}var Fse=ag&&/Firefox/i.test(navigator.userAgent);function Bse(e,t){var r=t.x,n=t.y,i=e.offsets.popper,s=lg(e.instance.modifiers,function(w){return w.name==="applyStyle"}).gpuAcceleration;s!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=s!==void 0?s:t.gpuAcceleration,o=Pd(e.instance.popper),c=Gj(o),u={position:i.position},d=Lse(e,window.devicePixelRatio<2||!Fse),f=r==="bottom"?"top":"bottom",h=n==="right"?"left":"right",p=nA("transform"),g=void 0,m=void 0;if(f==="bottom"?o.nodeName==="HTML"?m=-o.clientHeight+d.bottom:m=-c.height+d.bottom:m=d.top,h==="right"?o.nodeName==="HTML"?g=-o.clientWidth+d.right:g=-c.width+d.right:g=d.left,a&&p)u[p]="translate3d("+g+"px, "+m+"px, 0)",u[f]=0,u[h]=0,u.willChange="transform";else{var v=f==="bottom"?-1:1,y=h==="right"?-1:1;u[f]=m*v,u[h]=g*y,u.willChange=f+", "+h}var x={"x-placement":e.placement};return e.attributes=xi({},x,e.attributes),e.styles=xi({},u,e.styles),e.arrowStyles=xi({},e.offsets.arrow,e.arrowStyles),e}function hz(e,t,r){var n=lg(e,function(o){var c=o.name;return c===t}),i=!!n&&e.some(function(o){return o.name===r&&o.enabled&&o.order<n.order});if(!i){var s="`"+t+"`",a="`"+r+"`";console.warn(a+" modifier is required by "+s+" modifier in order to work, be sure to include it before "+s+"!")}return i}function zse(e,t){var r;if(!hz(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if(typeof n=="string"){if(n=e.instance.popper.querySelector(n),!n)return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],s=e.offsets,a=s.popper,o=s.reference,c=["left","right"].indexOf(i)!==-1,u=c?"height":"width",d=c?"Top":"Left",f=d.toLowerCase(),h=c?"left":"top",p=c?"bottom":"right",g=oz(n)[u];o[p]-g<a[f]&&(e.offsets.popper[f]-=a[f]-(o[p]-g)),o[f]+g>a[p]&&(e.offsets.popper[f]+=o[f]+g-a[p]),e.offsets.popper=Qo(e.offsets.popper);var m=o[f]+o[u]/2-g/2,v=Wc(e.instance.popper),y=parseFloat(v["margin"+d]),x=parseFloat(v["border"+d+"Width"]),w=m-e.offsets.popper[f]-y-x;return w=Math.max(Math.min(a[u]-g,w),0),e.arrowElement=n,e.offsets.arrow=(r={},kd(r,f,Math.round(w)),kd(r,h,""),r),e}function Use(e){return e==="end"?"start":e==="start"?"end":e}var pz=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],C1=pz.slice(3);function t2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=C1.indexOf(e),n=C1.slice(r+1).concat(C1.slice(0,r));return t?n.reverse():n}var P1={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Vse(e,t){if(uz(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var r=rA(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],i=Zy(n),s=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case P1.FLIP:a=[n,i];break;case P1.CLOCKWISE:a=t2(n);break;case P1.COUNTERCLOCKWISE:a=t2(n,!0);break;default:a=t.behavior}return a.forEach(function(o,c){if(n!==o||a.length===c+1)return e;n=e.placement.split("-")[0],i=Zy(n);var u=e.offsets.popper,d=e.offsets.reference,f=Math.floor,h=n==="left"&&f(u.right)>f(d.left)||n==="right"&&f(u.left)<f(d.right)||n==="top"&&f(u.bottom)>f(d.top)||n==="bottom"&&f(u.top)<f(d.bottom),p=f(u.left)<f(r.left),g=f(u.right)>f(r.right),m=f(u.top)<f(r.top),v=f(u.bottom)>f(r.bottom),y=n==="left"&&p||n==="right"&&g||n==="top"&&m||n==="bottom"&&v,x=["top","bottom"].indexOf(n)!==-1,w=!!t.flipVariations&&(x&&s==="start"&&p||x&&s==="end"&&g||!x&&s==="start"&&m||!x&&s==="end"&&v),S=!!t.flipVariationsByContent&&(x&&s==="start"&&g||x&&s==="end"&&p||!x&&s==="start"&&v||!x&&s==="end"&&m),j=w||S;(h||y||j)&&(e.flipped=!0,(h||y)&&(n=a[c+1]),j&&(s=Use(s)),e.placement=n+(s?"-"+s:""),e.offsets.popper=xi({},e.offsets.popper,lz(e.instance.popper,e.offsets.reference,e.placement)),e=cz(e.instance.modifiers,e,"flip"))}),e}function Wse(e){var t=e.offsets,r=t.popper,n=t.reference,i=e.placement.split("-")[0],s=Math.floor,a=["top","bottom"].indexOf(i)!==-1,o=a?"right":"bottom",c=a?"left":"top",u=a?"width":"height";return r[o]<s(n[c])&&(e.offsets.popper[c]=s(n[c])-r[u]),r[c]>s(n[o])&&(e.offsets.popper[c]=s(n[o])),e}function Hse(e,t,r,n){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),s=+i[1],a=i[2];if(!s)return e;if(a.indexOf("%")===0){var o=void 0;switch(a){case"%p":o=r;break;case"%":case"%r":default:o=n}var c=Qo(o);return c[t]/100*s}else if(a==="vh"||a==="vw"){var u=void 0;
vendor: 4,241 bytes, line 514
514return a==="vh"?u=Math.max(document.documentElement.clientHeight,window.innerHeight||0):u=Math.max(document.documentElement.clientWidth,window.innerWidth||0),u/100*s}else return s}function qse(e,t,r,n){var i=[0,0],s=["right","left"].indexOf(n)!==-1,a=e.split(/(\+|\-)/).map(function(d){return d.trim()}),o=a.indexOf(lg(a,function(d){return d.search(/,|\s/)!==-1}));a[o]&&a[o].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,u=o!==-1?[a.slice(0,o).concat([a[o].split(c)[0]]),[a[o].split(c)[1]].concat(a.slice(o+1))]:[a];return u=u.map(function(d,f){var h=(f===1?!s:s)?"height":"width",p=!1;return d.reduce(function(g,m){return g[g.length-1]===""&&["+","-"].indexOf(m)!==-1?(g[g.length-1]=m,p=!0,g):p?(g[g.length-1]+=m,p=!1,g):g.concat(m)},[]).map(function(g){return Hse(g,h,t,r)})}),u.forEach(function(d,f){d.forEach(function(h,p){iA(h)&&(i[f]+=h*(d[p-1]==="-"?-1:1))})}),i}function Kse(e,t){var r=t.offset,n=e.placement,i=e.offsets,s=i.popper,a=i.reference,o=n.split("-")[0],c=void 0;return iA(+r)?c=[+r,0]:c=qse(r,s,a,o),o==="left"?(s.top+=c[0],s.left-=c[1]):o==="right"?(s.top+=c[0],s.left+=c[1]):o==="top"?(s.left+=c[0],s.top-=c[1]):o==="bottom"&&(s.left+=c[0],s.top+=c[1]),e.popper=s,e}function Gse(e,t){var r=t.boundariesElement||Pd(e.instance.popper);e.instance.reference===r&&(r=Pd(r));var n=nA("transform"),i=e.instance.popper.style,s=i.top,a=i.left,o=i[n];i.top="",i.left="",i[n]="";var c=rA(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);i.top=s,i.left=a,i[n]=o,t.boundaries=c;var u=t.priority,d=e.offsets.popper,f={primary:function(p){var g=d[p];return d[p]<c[p]&&!t.escapeWithReference&&(g=Math.max(d[p],c[p])),kd({},p,g)},secondary:function(p){var g=p==="right"?"left":"top",m=d[g];return d[p]>c[p]&&!t.escapeWithReference&&(m=Math.min(d[g],c[p]-(p==="right"?d.width:d.height))),kd({},g,m)}};return u.forEach(function(h){var p=["left","top"].indexOf(h)!==-1?"primary":"secondary";d=xi({},d,f[p](h))}),e.offsets.popper=d,e}function Yse(e){var t=e.placement,r=t.split("-")[0],n=t.split("-")[1];if(n){var i=e.offsets,s=i.reference,a=i.popper,o=["bottom","top"].indexOf(r)!==-1,c=o?"left":"top",u=o?"width":"height",d={start:kd({},c,s[c]),end:kd({},c,s[c]+s[u]-a[u])};e.offsets.popper=xi({},a,d[n])}return e}function Xse(e){if(!hz(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=lg(e.instance.modifiers,function(n){return n.name==="preventOverflow"}).boundaries;if(t.bottom<r.top||t.left>r.right||t.top>r.bottom||t.right<r.left){if(e.hide===!0)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(e.hide===!1)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function Qse(e){var t=e.placement,r=t.split("-")[0],n=e.offsets,i=n.popper,s=n.reference,a=["left","right"].indexOf(r)!==-1,o=["top","left"].indexOf(r)===-1;return i[a?"left":"top"]=s[r]-(o?i[a?"width":"height"]:0),e.placement=Zy(t),e.offsets.popper=Qo(i),e}var Zse={shift:{order:100,enabled:!0,fn:Yse},offset:{order:200,enabled:!0,fn:Kse,offset:0},preventOverflow:{order:300,enabled:!0,fn:Gse,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:Wse},arrow:{order:500,enabled:!0,fn:zse,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:Vse,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:Qse},hide:{order:800,enabled:!0,fn:Xse},computeStyle:{order:850,enabled:!0,fn:Bse,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:Mse,onLoad:Dse,gpuAcceleration:void 0}},Jse={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Zse},Wp=function(){function e(t,r){var n=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};_se(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=wse(this.update.bind(this)),this.options=xi({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(xi({}
514,e.Defaults.modifiers,i.modifiers)).forEach(function(a){n.options.modifiers[a]=xi({},e.Defaults.modifiers[a]||{},i.modifiers?i.modifiers[a]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(a){return xi({name:a},n.options.modifiers[a])}).sort(function(a,o){return a.order-o.order}),this.modifiers.forEach(function(a){a.enabled&&ez(a.onLoad)&&a.onLoad(n.reference,n.popper,n.options,a,n.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return Ese(e,[{key:"update",value:function(){return Cse.call(this)}},{key:"destroy",value:function(){return Pse.call(this)}},{key:"enableEventListeners",value:function(){return kse.call(this)}},{key:"disableEventListeners",value:function(){return $se.call(this)}}]),e}();Wp.Utils=(typeof window<"u"?window:global).PopperUtils;Wp.placements=pz;Wp.Defaults=Jse;var eae=["innerHTML","ownerDocument","style","attributes","nodeValue"],tae=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],rae=["bigint","boolean","null","number","string","symbol","undefined"];function ob(e){var t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(nae(t))return t}function gs(e){return function(t){return ob(t)===e}}function nae(e){return tae.includes(e)}function $f(e){return function(t){return typeof t===e}}function iae(e){return rae.includes(e)}function X(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(X.array(e))return"Array";if(X.plainFunction(e))return"Function";var t=ob(e);return t||"Object"}X.array=Array.isArray;X.arrayOf=function(e,t){return!X.array(e)&&!X.function(t)?!1:e.every(function(r){return t(r)})};X.asyncGeneratorFunction=function(e){return ob(e)==="AsyncGeneratorFunction"};X.asyncFunction=gs("AsyncFunction");X.bigint=$f("bigint");X.boolean=function(e){return e===!0||e===!1};X.date=gs("Date");X.defined=function(e){return!X.undefined(e)};X.domElement=function(e){return X.object(e)&&!X.plainObject(e)&&e.nodeType===1&&X.string(e.nodeName)&&eae.every(function(t){return t in e})};X.empty=function(e){return X.string(e)&&e.length===0||X.array(e)&&e.length===0||X.object(e)&&!X.map(e)&&!X.set(e)&&Object.keys(e).length===0||X.set(e)&&e.size===0||X.map(e)&&e.size===0};X.error=gs("Error");X.function=$f("function");X.generator=function(e){return X.iterable(e)&&X.function(e.next)&&X.function(e.throw)};X.generatorFunction=gs("GeneratorFunction");X.instanceOf=function(e,t){return!e||!t?!1:Object.getPrototypeOf(e)===t.prototype};X.iterable=function(e){return!X.nullOrUndefined(e)&&X.function(e[Symbol.iterator])};X.map=gs("Map");X.nan=function(e){return Number.isNaN(e)};X.null=function(e){return e===null};X.nullOrUndefined=function(e){return X.null(e)||X.undefined(e)};X.number=function(e){return $f("number")(e)&&!X.nan(e)};X.numericString=function(e){return X.string(e)&&e.length>0&&!Number.isNaN(Number(e))};X.object=function(e){return!X.nullOrUndefined(e)&&(X.function(e)||typeof e=="object")};X.oneOf=function(e,t){return X.array(e)?e.indexOf(t)>-1:!1};X.plainFunction=gs("Function");X.plainObject=function(e){if(ob(e)!=="Object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};X.primitive=function(e){return X.null(e)||iae(typeof e)};X.promise=gs("Promise");X.propertyOf=function(e,t,r){if(!X.object(e)||!t)return!1;var n=e[t];return X.function(r)?r(n):X.defined(n)};X.regexp=gs("RegExp");X.set=gs("Set");X.string=$f("string");X.symbol=$f("symbol");X.undefined=$f("undefined");X.weakMap=gs("WeakMap");X.weakSet=gs("WeakSet");function mz(e){return function(t){return typeof t===e}}var sae=mz("function"),aae=function(e){return e===null},r2=function(e){return Object.prototype.toString.call(e).slice(8,-1)==="RegExp"},n2=function(e){return!oae(e)&&!aae(e)&&(sae(e)||typeof e=="object")},oae=mz("undefined"),Xj=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);
vendor: 2,727 bytes, line 514
514if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function lae(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=r;n--!==0;)if(!On(e[n],t[n]))return!1;return!0}function cae(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=new DataView(e.buffer),n=new DataView(t.buffer),i=e.byteLength;i--;)if(r.getUint8(i)!==n.getUint8(i))return!1;return!0}function uae(e,t){var r,n,i,s;if(e.size!==t.size)return!1;try{for(var a=Xj(e.entries()),o=a.next();!o.done;o=a.next()){var c=o.value;if(!t.has(c[0]))return!1}}catch(f){r={error:f}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}try{for(var u=Xj(e.entries()),d=u.next();!d.done;d=u.next()){var c=d.value;if(!On(c[1],t.get(c[0])))return!1}}catch(f){i={error:f}}finally{try{d&&!d.done&&(s=u.return)&&s.call(u)}finally{if(i)throw i.error}}return!0}function dae(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var i=Xj(e.entries()),s=i.next();!s.done;s=i.next()){var a=s.value;if(!t.has(a[0]))return!1}}catch(o){r={error:o}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0}function On(e,t){if(e===t)return!0;if(e&&n2(e)&&t&&n2(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return lae(e,t);if(e instanceof Map&&t instanceof Map)return uae(e,t);if(e instanceof Set&&t instanceof Set)return dae(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return cae(e,t);if(r2(e)&&r2(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var i=r.length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[i]))return!1;for(var i=r.length;i--!==0;){var s=r[i];if(!(s==="_owner"&&e.$$typeof)&&!On(e[s],t[s]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}function fae(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(function(r){return X.string(r)||X.array(r)||X.plainObject(r)})}function hae(e,t,r){return gz(e,t)?[e,t].every(X.array)?!e.some(l2(r))&&t.some(l2(r)):[e,t].every(X.plainObject)?!Object.entries(e).some(o2(r))&&Object.entries(t).some(o2(r)):t===r:!1}function i2(e,t,r){var n=r.actual,i=r.key,s=r.previous,a=r.type,o=ks(e,i),c=ks(t,i),u=[o,c].every(X.number)&&(a==="increased"?o<c:o>c);return X.undefined(n)||(u=u&&c===n),X.undefined(s)||(u=u&&o===s),u}function s2(e,t,r){var n=r.key,i=r.type,s=r.value,a=ks(e,n),o=ks(t,n),c=i==="added"?a:o,u=i==="added"?o:a;
514if(!X.nullOrUndefined(s)){if(X.defined(c)){if(X.array(c)||X.plainObject(c))return hae(c,u,s)}else return On(u,s);return!1}return[a,o].every(X.array)?!u.every(sA(c)):[a,o].every(X.plainObject)?pae(Object.keys(c),Object.keys(u)):![a,o].every(function(d){return X.primitive(d)&&X.defined(d)})&&(i==="added"?!X.defined(a)&&X.defined(o):X.defined(a)&&!X.defined(o))}function a2(e,t,r){var n=r===void 0?{}:r,i=n.key,s=ks(e,i),a=ks(t,i);if(!gz(s,a))throw new TypeError("Inputs have different types");if(!fae(s,a))throw new TypeError("Inputs don't have length");return[s,a].every(X.plainObject)&&(s=Object.keys(s),a=Object.keys(a)),[s,a]}function o2(e){return function(t){var r=t[0],n=t[1];return X.array(e)?On(e,n)||e.some(function(i){return On(i,n)||X.array(n)&&sA(n)(i)}):X.plainObject(e)&&e[r]?!!e[r]&&On(e[r],n):On(e,n)}}function pae(e,t){return t.some(function(r){return!e.includes(r)})}function l2(e){return function(t){return X.array(e)?e.some(function(r){return On(r,t)||X.array(t)&&sA(t)(r)}):On(e,t)}}function ch(e,t){return X.array(e)?e.some(function(r){return On(r,t)}):On(e,t)}function sA(e){return function(t){return e.some(function(r){return On(r,t)})}}function gz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(X.array)||e.every(X.number)||e.every(X.plainObject)||e.every(X.string)}function ks(e,t){if(X.plainObject(e)||X.array(e)){if(X.string(t)){var r=t.split(".");return r.reduce(function(n,i){return n&&n[i]},e)}return X.number(t)?e[t]:e}return e}function mae(e,t){if([e,t].some(X.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(function(f){return X.plainObject(f)||X.array(f)}))throw new Error("Expected plain objects or array");var r=function(f,h){try{return s2(e,t,{key:f,type:"added",value:h})}catch{return!1}},n=function(f,h,p){try{var g=ks(e,f),m=ks(t,f),v=X.defined(h),y=X.defined(p);if(v||y){var x=y?ch(p,g):!ch(h,g),w=ch(h,m);return x&&w}return[g,m].every(X.array)||[g,m].every(X.plainObject)?!On(g,m):g!==m}catch{return!1}},i=function(f,h,p){if(!X.defined(f))return!1;try{var g=ks(e,f),m=ks(t,f),v=X.defined(p);return ch(h,g)&&(v?ch(p,m):!v)}catch{return!1}},s=function(f,h){return X.defined(f)?n(f,h):!1},a=function(f,h,p){if(!X.defined(f))return!1;try{return i2(e,t,{key:f,actual:h,previous:p,type:"decreased"})}catch{return!1}},o=function(f){try{var h=a2(e,t,{key:f}),p=h[0],g=h[1];return!!p.length&&!g.length}catch{return!1}},c=function(f){try{var h=a2(e,t,{key:f}),p=h[0],g=h[1];return!p.length&&!!g.length}catch{return!1}},u=function(f,h,p){if(!X.defined(f))return!1;try{return i2(e,t,{key:f,actual:h,previous:p,type:"increased"})}catch{return!1}},d=function(f,h){try{return s2(e,t,{key:f,type:"removed",value:h})}catch{return!1}};return{added:r,changed:n,changedFrom:i,changedTo:s,decreased:a,emptied:o,filled:c,increased:u,removed:d}}function c2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ut(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c2(Object(r),!0).forEach(function(n){Kr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gae(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yz(n.key),n)}}function ug(e,t,r){return t&&gae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kr(e,t,r){return t=yz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dg(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qj(e,t)}
vendor: 3,722 bytes, line 514
514function Jy(e){return Jy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jy(e)}function Qj(e,t){return Qj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Qj(e,t)}function vae(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yae(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function vz(e,t){if(e==null)return{};var r=yae(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function aa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xae(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aa(e)}function fg(e){var t=vae();return function(){var n=Jy(e),i;if(t){var s=Jy(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return xae(this,i)}}function bae(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yz(e){var t=bae(e,"string");return typeof t=="symbol"?t:String(t)}var wae={flip:{padding:20},preventOverflow:{padding:10}},Sae="The typeValidator argument must be a function with the signature function(props, propName, componentName).",jae="The error message is optional, but must be a string if provided.";function _ae(e,t,r,n){return typeof e=="boolean"?e:typeof e=="function"?e(t,r,n):e?!!e:!1}function Eae(e,t){return Object.hasOwnProperty.call(e,t)}function Nae(e,t,r,n){return new Error("Required ".concat(e[t]," `").concat(t,"` was not specified in `").concat(r,"`."))}function Oae(e,t){if(typeof e!="function")throw new TypeError(Sae);if(t&&typeof t!="string")throw new TypeError(jae)}function u2(e,t,r){return Oae(e,r),function(n,i,s){for(var a=arguments.length,o=new Array(a>3?a-3:0),c=3;c<a;c++)o[c-3]=arguments[c];return _ae(t,n,i,s)?Eae(n,i)?e.apply(void 0,[n,i,s].concat(o)):Nae(n,i,s):e.apply(void 0,[n,i,s].concat(o))}}var mt={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing"},uh=tp.createPortal!==void 0;function Os(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function T1(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function fv(e){var t=e.title,r=e.data,n=e.warn,i=n===void 0?!1:n,s=e.debug,a=s===void 0?!1:s,o=i?console.warn||console.error:console.log;a&&t&&r&&(console.groupCollapsed("%creact-floater: ".concat(t),"color: #9b00ff; font-weight: bold; font-size: 12px;"),Array.isArray(r)?r.forEach(function(c){X.plainObject(c)&&c.key?o.apply(console,[c.key,c.value]):o.apply(console,[c])}):o.apply(console,[r]),console.groupEnd())}function Aae(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.addEventListener(t,r,n)}function Cae(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.removeEventListener(t,r,n)}function Pae(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i;i=function(a){r(a),Cae(e,t,i)},Aae(e,t,i,n)}function d2(){}var xz=function(e){dg(r,e);var t=fg(r);function r(){return cg(this,r),t.apply(this,arguments)}
514return ug(r,[{key:"componentDidMount",value:function(){Os()&&(this.node||this.appendNode(),uh||this.renderPortal())}},{key:"componentDidUpdate",value:function(){Os()&&(uh||this.renderPortal())}},{key:"componentWillUnmount",value:function(){!Os()||!this.node||(uh||tp.unmountComponentAtNode(this.node),this.node&&this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=void 0))}},{key:"appendNode",value:function(){var i=this.props,s=i.id,a=i.zIndex;this.node||(this.node=document.createElement("div"),s&&(this.node.id=s),a&&(this.node.style.zIndex=a),document.body.appendChild(this.node))}},{key:"renderPortal",value:function(){if(!Os())return null;var i=this.props,s=i.children,a=i.setRef;if(this.node||this.appendNode(),uh)return tp.createPortal(s,this.node);var o=tp.unstable_renderSubtreeIntoContainer(this,s.length>1?P.createElement("div",null,s):s[0],this.node);return a(o),null}},{key:"renderReact16",value:function(){var i=this.props,s=i.hasChildren,a=i.placement,o=i.target;return s?this.renderPortal():o||a==="center"?this.renderPortal():null}},{key:"render",value:function(){return uh?this.renderReact16():null}}]),r}(P.Component);Kr(xz,"propTypes",{children:J.oneOfType([J.element,J.array]),hasChildren:J.bool,id:J.oneOfType([J.string,J.number]),placement:J.string,setRef:J.func.isRequired,target:J.oneOfType([J.object,J.string]),zIndex:J.number});var bz=function(e){dg(r,e);var t=fg(r);function r(){return cg(this,r),t.apply(this,arguments)}return ug(r,[{key:"parentStyle",get:function(){var i=this.props,s=i.placement,a=i.styles,o=a.arrow.length,c={pointerEvents:"none",position:"absolute",width:"100%"};return s.startsWith("top")?(c.bottom=0,c.left=0,c.right=0,c.height=o):s.startsWith("bottom")?(c.left=0,c.right=0,c.top=0,c.height=o):s.startsWith("left")?(c.right=0,c.top=0,c.bottom=0):s.startsWith("right")&&(c.left=0,c.top=0),c}},{key:"render",value:function(){var i=this.props,s=i.placement,a=i.setArrowRef,o=i.styles,c=o.arrow,u=c.color,d=c.display,f=c.length,h=c.margin,p=c.position,g=c.spread,m={display:d,position:p},v,y=g,x=f;return s.startsWith("top")?(v="0,0 ".concat(y/2,",").concat(x," ").concat(y,",0"),m.bottom=0,m.marginLeft=h,m.marginRight=h):s.startsWith("bottom")?(v="".concat(y,",").concat(x," ").concat(y/2,",0 0,").concat(x),m.top=0,m.marginLeft=h,m.marginRight=h):s.startsWith("left")?(x=g,y=f,v="0,0 ".concat(y,",").concat(x/2," 0,").concat(x),m.right=0,m.marginTop=h,m.marginBottom=h):s.startsWith("right")&&(x=g,y=f,v="".concat(y,",").concat(x," ").concat(y,",0 0,").concat(x/2),m.left=0,m.marginTop=h,m.marginBottom=h),P.createElement("div",{className:"__floater__arrow",style:this.parentStyle},P.createElement("span",{ref:a,style:m},P.createElement("svg",{width:y,height:x,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},P.createElement("polygon",{points:v,fill:u}))))}}]),r}(P.Component);Kr(bz,"propTypes",{placement:J.string.isRequired,setArrowRef:J.func.isRequired,styles:J.object.isRequired});var Tae=["color","height","width"];function wz(e){var t=e.handleClick,r=e.styles,n=r.color,i=r.height,s=r.width,a=vz(r,Tae);return P.createElement("button",{"aria-label":"close",onClick:t,style:a,type:"button"},P.createElement("svg",{width:"".concat(s,"px"),height:"".concat(i,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},P.createElement("g",null,P.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:n}))))}wz.propTypes={handleClick:J.func.isRequired,styles:J.object.isRequired};function Sz(e){var t=e.content,r=e.footer,n=e.handleClick,i=e.open,s=e.positionWrapper,a=e.showCloseButton,o=e.title,c=e.styles,u={content:P.isValidElement(t)?t:P.createElement("div",{className:"__floater__c
514ontent",style:c.content},t)};return o&&(u.title=P.isValidElement(o)?o:P.createElement("div",{className:"__floater__title",style:c.title},o)),r&&(u.footer=P.isValidElement(r)?r:P.createElement("div",{className:"__floater__footer",style:c.footer},r)),(a||s)&&!X.boolean(i)&&(u.close=P.createElement(wz,{styles:c.close,handleClick:n})),P.createElement("div",{className:"__floater__container",style:c.container},u.close,u.title,u.content,u.footer)}Sz.propTypes={content:J.node.isRequired,footer:J.node,handleClick:J.func.isRequired,open:J.bool,positionWrapper:J.bool.isRequired,showCloseButton:J.bool.isRequired,styles:J.object.isRequired,title:J.node};var jz=function(e){dg(r,e);var t=fg(r);function r(){return cg(this,r),t.apply(this,arguments)}return ug(r,[{key:"style",get:function(){var i=this.props,s=i.disableAnimation,a=i.component,o=i.placement,c=i.hideArrow,u=i.status,d=i.styles,f=d.arrow.length,h=d.floater,p=d.floaterCentered,g=d.floaterClosing,m=d.floaterOpening,v=d.floaterWithAnimation,y=d.floaterWithComponent,x={};return c||(o.startsWith("top")?x.padding="0 0 ".concat(f,"px"):o.startsWith("bottom")?x.padding="".concat(f,"px 0 0"):o.startsWith("left")?x.padding="0 ".concat(f,"px 0 0"):o.startsWith("right")&&(x.padding="0 0 0 ".concat(f,"px"))),[mt.OPENING,mt.OPEN].indexOf(u)!==-1&&(x=Ut(Ut({},x),m)),u===mt.CLOSING&&(x=Ut(Ut({},x),g)),u===mt.OPEN&&!s&&(x=Ut(Ut({},x),v)),o==="center"&&(x=Ut(Ut({},x),p)),a&&(x=Ut(Ut({},x),y)),Ut(Ut({},h),x)}},{key:"render",value:function(){var i=this.props,s=i.component,a=i.handleClick,o=i.hideArrow,c=i.setFloaterRef,u=i.status,d={},f=["__floater"];return s?P.isValidElement(s)?d.content=P.cloneElement(s,{closeFn:a}):d.content=s({closeFn:a}):d.content=P.createElement(Sz,this.props),u===mt.OPEN&&f.push("__floater__open"),o||(d.arrow=P.createElement(bz,this.props)),P.createElement("div",{ref:c,className:f.join(" "),style:this.style},P.createElement("div",{className:"__floater__body"},d.content,d.arrow))}}]),r}(P.Component);Kr(jz,"propTypes",{component:J.oneOfType([J.func,J.element]),content:J.node,disableAnimation:J.bool.isRequired,footer:J.node,handleClick:J.func.isRequired,hideArrow:J.bool.isRequired,open:J.bool,placement:J.string.isRequired,positionWrapper:J.bool.isRequired,setArrowRef:J.func.isRequired,setFloaterRef:J.func.isRequired,showCloseButton:J.bool,status:J.string.isRequired,styles:J.object.isRequired,title:J.node});var _z=function(e){dg(r,e);var t=fg(r);function r(){return cg(this,r),t.apply(this,arguments)}return ug(r,[{key:"render",value:function(){var i=this.props,s=i.children,a=i.handleClick,o=i.handleMouseEnter,c=i.handleMouseLeave,u=i.setChildRef,d=i.setWrapperRef,f=i.style,h=i.styles,p;if(s)if(P.Children.count(s)===1)if(!P.isValidElement(s))p=P.createElement("span",null,s);else{var g=X.function(s.type)?"innerRef":"ref";p=P.cloneElement(P.Children.only(s),Kr({},g,u))}else p=s;return p?P.createElement("span",{ref:d,style:Ut(Ut({},h),f),onClick:a,onMouseEnter:o,onMouseLeave:c},p):null}}]),r}(P.Component);Kr(_z,"propTypes",{children:J.node,handleClick:J.func.isRequired,handleMouseEnter:J.func.isRequired,handleMouseLeave:J.func.isRequired,setChildRef:J.func.isRequired,setWrapperRef:J.func.isRequired,style:J.object,styles:J.object.isRequired});var kae={zIndex:100};function Rae(e){var t=rs(kae,e.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:t.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:t.zIndex},floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:t}}var $ae=["arrow","flip","offset"],Iae=["position","top","right","bottom","left"],aA=function(e){dg(r,e);var t=fg(r);function r(n){var i;return cg(this,r),i=t.call(this,n),Kr(aa(i),"setArrowRef",function(s){i.arrowRef=s}),Kr(aa(i),"setChildRef",function(s){i.childRef=s}),Kr(aa(i),"setFloaterRef",function(s){i.floaterRef=s}),Kr(aa(i),"setWrapperRef",function(s){i.wrapperRef=s}),Kr(aa(i),"handleTransitionEnd",function(){var s=i.state.status,a=i.props.callback;
vendor: 6,452 bytes, line 514
514i.wrapperPopper&&i.wrapperPopper.instance.update(),i.setState({status:s===mt.OPENING?mt.OPEN:mt.IDLE},function(){var o=i.state.status;a(o===mt.OPEN?"open":"close",i.props)})}),Kr(aa(i),"handleClick",function(){var s=i.props,a=s.event,o=s.open;if(!X.boolean(o)){var c=i.state,u=c.positionWrapper,d=c.status;(i.event==="click"||i.event==="hover"&&u)&&(fv({title:"click",data:[{event:a,status:d===mt.OPEN?"closing":"opening"}],debug:i.debug}),i.toggle())}}),Kr(aa(i),"handleMouseEnter",function(){var s=i.props,a=s.event,o=s.open;if(!(X.boolean(o)||T1())){var c=i.state.status;i.event==="hover"&&c===mt.IDLE&&(fv({title:"mouseEnter",data:[{key:"originalEvent",value:a}],debug:i.debug}),clearTimeout(i.eventDelayTimeout),i.toggle())}}),Kr(aa(i),"handleMouseLeave",function(){var s=i.props,a=s.event,o=s.eventDelay,c=s.open;if(!(X.boolean(c)||T1())){var u=i.state,d=u.status,f=u.positionWrapper;i.event==="hover"&&(fv({title:"mouseLeave",data:[{key:"originalEvent",value:a}],debug:i.debug}),o?[mt.OPENING,mt.OPEN].indexOf(d)!==-1&&!f&&!i.eventDelayTimeout&&(i.eventDelayTimeout=setTimeout(function(){delete i.eventDelayTimeout,i.toggle()},o*1e3)):i.toggle(mt.IDLE))}}),i.state={currentPlacement:n.placement,needsUpdate:!1,positionWrapper:n.wrapperOptions.position&&!!n.target,status:mt.INIT,statusWrapper:mt.INIT},i._isMounted=!1,i.hasMounted=!1,Os()&&window.addEventListener("load",function(){i.popper&&i.popper.instance.update(),i.wrapperPopper&&i.wrapperPopper.instance.update()}),i}return ug(r,[{key:"componentDidMount",value:function(){if(Os()){var i=this.state.positionWrapper,s=this.props,a=s.children,o=s.open,c=s.target;this._isMounted=!0,fv({title:"init",data:{hasChildren:!!a,hasTarget:!!c,isControlled:X.boolean(o),positionWrapper:i,target:this.target,floater:this.floaterRef},debug:this.debug}),this.hasMounted||(this.initPopper(),this.hasMounted=!0),!a&&c&&X.boolean(o)}}},{key:"componentDidUpdate",value:function(i,s){if(Os()){var a=this.props,o=a.autoOpen,c=a.open,u=a.target,d=a.wrapperOptions,f=mae(s,this.state),h=f.changedFrom,p=f.changed;if(i.open!==c){var g;X.boolean(c)&&(g=c?mt.OPENING:mt.CLOSING),this.toggle(g)}(i.wrapperOptions.position!==d.position||i.target!==u)&&this.changeWrapperPosition(this.props),p("status",mt.IDLE)&&c?this.toggle(mt.OPEN):h("status",mt.INIT,mt.IDLE)&&o&&this.toggle(mt.OPEN),this.popper&&p("status",mt.OPENING)&&this.popper.instance.update(),this.floaterRef&&(p("status",mt.OPENING)||p("status",mt.CLOSING))&&Pae(this.floaterRef,"transitionend",this.handleTransitionEnd),p("needsUpdate",!0)&&this.rebuildPopper()}}},{key:"componentWillUnmount",value:function(){Os()&&(this._isMounted=!1,this.popper&&this.popper.instance.destroy(),this.wrapperPopper&&this.wrapperPopper.instance.destroy())}},{key:"initPopper",value:function(){var i=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.target,a=this.state.positionWrapper,o=this.props,c=o.disableFlip,u=o.getPopper,d=o.hideArrow,f=o.offset,h=o.placement,p=o.wrapperOptions,g=h==="top"||h==="bottom"?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if(h==="center")this.setState({status:mt.IDLE});else if(s&&this.floaterRef){var m=this.options,v=m.arrow,y=m.flip,x=m.offset,w=vz(m,$ae);new Wp(s,this.floaterRef,{placement:h,modifiers:Ut({arrow:Ut({enabled:!d,element:this.arrowRef},v),flip:Ut({enabled:!c,behavior:g},y),offset:Ut({offset:"0, ".concat(f,"px")},x)},w),onCreate:function(E){var _;if(i.popper=E,!((_=i.floaterRef)!==null&&_!==void 0&&_.isConnected)){i.setState({needsUpdate:!0});return}u(E,"floater"),i._isMounted&&i.setState({currentPlacement:E.placement,status:mt.IDLE}),h!==E.placement&&setTimeout(function(){E.instance.update()},1)},onUpdate:function(E){i.popper=E;var _=i.state.currentPlacement;i._isMounted&&E.placement!==_&&i.setState({currentPlacement:E.placement})}})}if(a){var S=X.undefined(p.offset)?0:p.offset;new Wp(this.target,this.wrapperRef,{placement:p.placement||h,modifiers:{arrow:{enabled:!1},offset:{offset:"0, ".concat(S,"px")},flip:{enabled:!1}},onCreate:function(E){i.wrapperPopper=E,i._isMounted&&i.setState({statusWrapper:mt.IDLE}),u(E,"wrapper"),h!==E.placement&&setTimeout(function(){E.instance.update()},1)}})}}},{key:"rebuildPopper",value:function(){var i=this;this.floaterRefInterval=setInterval(function(){var s;(s=i.floaterRef)!==null&&s!==void 0&&s.isConnected&&(clearInterval(i.floaterRefInterval),i.setState({needsUpdate:!1}),i.initPopper())},50)}},{key:"changeWrapperPosition",value:function(i){var s=i.target,a=i.wrapperOptions;this.setState({positionWrapper:a.position&&!!s})}},{key:"toggle",value:function(i){var s=this.state.status,a=s===mt.OPEN?mt.CLOSING:mt.OPENING;X.undefined(i)||(a=i),this.setState({status:a})}},{key:"debug",get:function(){var i=this.props.debug;return i||Os()&&"ReactFloaterDebug"in window&&!!window.ReactFloaterDebug}},{key:"event",get:function(){var i=this.props,s=i.disableHoverToClick,a=i.event;return a==="hover"&&T1()&&!s?"click":a}},{key:"options",get:function(){var i=this.props.options;return rs(wae,i||{})}},{key:"styles",get:function(){var i=this,s=this.state,a=s.status,o=s.positionWrapper,c=s.statusWrapper,u=this.props.styles,d=rs(Rae(u),u);if(o){var f;[mt.IDLE].indexOf(a)===-1||[mt.IDLE].indexOf(c)===-1?f=d.wrapperPosition:f=this.wrapperPopper.styles,d.wrapper=Ut(Ut({},d.wrapper),f)}if(this.target){var h=window.getComputedStyle(this.target);this.wrapperStyles?d.wrapper=Ut(Ut({},d.wrapper),this.wrapperStyles):["relative","static"].indexOf(h.position)===-1&&(this.wrapperStyles={},o||(Iae.forEach(function(p){i.wrapperStyles[p]=h[p]}),d.wrapper=Ut(Ut({},d.wrapper),this.wrapperStyles),this.target.style.position="relative",this.target.style.top="auto",this.target.style.right="auto",this.target.style.bottom="auto",this.target.style.left="auto"))}return d}},{key:"target",get:function(){if(!Os())return null;var i=this.props.target;return i?X.domElement(i)?i:document.querySelector(i):this.childRef||this.wrapperRef}},{key:"render",value:function(){var i=this.state,s=i.currentPlacement,a=i.positionWrapper,o=i.status,c=this.props,u=c.children,d=c.component,f=c.content,h=c.disableAnimation,p=c.footer,g=c.hideArrow,m=c.id,v=c.open,y=c.showCloseButton,x=c.style,w=c.target,S=c.title,j=P.createElement(_z,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:x,styles:this.styles.wrapper},u),E={};
514return a?E.wrapperInPortal=j:E.wrapperAsChildren=j,P.createElement("span",null,P.createElement(xz,{hasChildren:!!u,id:m,placement:s,setRef:this.setFloaterRef,target:w,zIndex:this.styles.options.zIndex},P.createElement(jz,{component:d,content:f,disableAnimation:h,footer:p,handleClick:this.handleClick,hideArrow:g||s==="center",open:v,placement:s,positionWrapper:a,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:y,status:o,styles:this.styles,title:S}),E.wrapperInPortal),E.wrapperAsChildren)}}]),r}(P.Component);Kr(aA,"propTypes",{autoOpen:J.bool,callback:J.func,children:J.node,component:u2(J.oneOfType([J.func,J.element]),function(e){return!e.content}),content:u2(J.node,function(e){return!e.component}),debug:J.bool,disableAnimation:J.bool,disableFlip:J.bool,disableHoverToClick:J.bool,event:J.oneOf(["hover","click"]),eventDelay:J.number,footer:J.node,getPopper:J.func,hideArrow:J.bool,id:J.oneOfType([J.string,J.number]),offset:J.number,open:J.bool,options:J.object,placement:J.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:J.bool,style:J.object,styles:J.object,target:J.oneOfType([J.object,J.string]),title:J.node,wrapperOptions:J.shape({offset:J.number,placement:J.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:J.bool})});Kr(aA,"defaultProps",{autoOpen:!1,callback:d2,debug:!1,disableAnimation:!1,disableFlip:!1,disableHoverToClick:!1,event:"click",eventDelay:.4,getPopper:d2,hideArrow:!1,offset:15,placement:"bottom",showCloseButton:!1,styles:{},target:null,wrapperOptions:{position:!1}});var Mae=Object.defineProperty,Dae=(e,t,r)=>t in e?Mae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Re=(e,t,r)=>Dae(e,typeof t!="symbol"?t+"":t,r),_t={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update"},Yi={TOUR_START:"tour:start",STEP_BEFORE:"step:before",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found"},rt={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"},lt={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished"};function mo(){var e;return!!(typeof window<"u"&&((e=window.document)!=null&&e.createElement))}function Ez(e){return e?e.getBoundingClientRect():null}function Lae(e=!1){const{body:t,documentElement:r}=document;if(!t||!r)return 0;if(e){const n=[t.scrollHeight,t.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight].sort((s,a)=>s-a),i=Math.floor(n.length/2);return n.length%2===0?(n[i-1]+n[i])/2:n[i]}return Math.max(t.scrollHeight,t.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)}function ba(e){if(typeof e=="string")try{return document.querySelector(e)}catch{return null}return e}function Fae(e){return!e||e.nodeType!==1?null:getComputedStyle(e)}function Hp(e,t,r){if(!e)return Bl();const n=YB(e);if(n){if(n.isSameNode(Bl()))return r?document:Bl();if(!(n.scrollHeight>n.offsetHeight)&&!t)return n.style.overflow="initial",Bl()}return n}function lb(e,t){if(!e)return!1;const r=Hp(e,t);return r?!r.isSameNode(Bl()):!1}function Bae(e){return e.offsetParent!==document.body}function Rd(e,t="fixed"){if(!e||!(e instanceof HTMLElement))return!1;const{nodeName:r}=e,n=Fae(e);return r==="BODY"||r==="HTML"?!1:n&&n.position===t?!0:e.parentNode?Rd(e.parentNode,t):!1}function zae(e){var t;if(!e)return!1;let r=e;for(;r&&r!==document.body;){if(r instanceof HTMLElement){const{display:n,visibility:i}=getComputedStyle(r);if(n==="none"||i==="hidden")return!1}r=(t=r.parentElement)!=null?t:null}return!0}function Uae(e,t,r){var n,i,s;const a=Ez(e),o=Hp(e,r),c=lb(e,r),u=Rd(e);let d=0,f=(n=a==null?void 0:a.top)!=null?n:0;if(c&&u){const h=(i=e==null?void 0:e.offsetTop)!=null?i:0,p=(s=o==null?void 0:o.scrollTop)!=null?s:0;f=h-p}else o instanceof HTMLElement&&(d=o.scrollTop,!c&&!Rd(e)&&(f+=d),o.isSameNode(Bl())||(f+=Bl().scrollTop));return Math.floor(f-t)}function Vae(e,t,r){var n;if(!e)return 0;const{offsetTop:i=0,scrollTop:s=0}=(n=YB(e))!=null?n:{};let a=e.getBoundingClientRect().top+s;i&&(lb(e,r)||Bae(e))&&(a-=i);const o=Math.floor(a-t);return o<0?0:o}function Bl(){var e;return(e=document.scrollingElement)!=null?e:document.documentElement}function Wae(e,t){const{duration:r,element:n}=t;return new Promise((i,s)=>{const{scrollTop:a}=n,o=e>a?e-a:a-e;Kie.top(n,e,{duration:o<100?50:r},c=>c&&c.message!=="Element already at target scroll position"?s(c):i())})}var dh=as.createPortal!==void 0;function Nz(e=navigator.userAgent){let t=e;return typeof window>"u"?t="node":document.documentMode?t="ie":/Edge/.test(e)?t="edge":window.opera||e.includes(" OPR/")?t="opera":typeof window.InstallTrigger<"u"?t="firefox":window.chrome?t="chrome":/(Version\/([\d._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(e)&&(t="safari"),t}function iy(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function As(e,t={}){const{defaultValue:r,step:n,steps:i}=t;let s=Yk(e);if(s)(s.includes("{step}")||s.includes("{steps}"))&&n&&i&&(s=s.replace("{step}",n.toString()).replace("{steps}",i.toString()));else if(b.isValidElement(e)&&!Object.values(e.props).length&&iy(e.type)==="function"){const a=e.type({});s=As(a,t)}else s=Yk(r);return s}function Hae(e,t){return!Te.plainObject(e)||!Te.array(t)?!1:Object.keys(e).every(r=>t.includes(r))}function qae(e){const t=/^#?([\da-f])([\da-f])([\da-f])$/i,r=e.replace(t,(i,s,a,o)=>s+s+a+a+o+o),n=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(r);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:[]}function f2(e){return e.disableBeacon||e.placement==="center"}function h2(){return!["chrome","safari","firefox","opera"].includes(Nz())}function Sc({data:e,debug:t=!1,title:r,warn:n=!1}){const i=n?console.warn||console.error:console.log;t&&(r&&e?(console.groupCollapsed(`%creact-joyride: ${r}`,"color: #ff0044; font-weight: bold; font-size: 12px;"),Array.isArray(e)?e.forEach(s=>{Te.plainObject(s)&&s.key?i.apply(console,[s.key,s.value]):i.apply(console,[s])}):i.apply(console,[e]),console.groupEnd()):console.error("Missing title or data props"))}function Kae(e){return Object.keys(e)}function Oz(e,...t){if(!Te.plainObject(e))throw new TypeError("Expected an object");const r={};for(const n in e)({}).hasOwnProperty.call(e,n)&&(t.includes(n)||(r[n]=e[n]));return r}function Gae(e,...t){if(!Te.plainObject(e))throw new TypeError("Expected an object");
514if(!t.length)return e;const r={};for(const n in e)({}).hasOwnProperty.call(e,n)&&t.includes(n)&&(r[n]=e[n]);return r}function Zj(e,t,r){const n=s=>s.replace("{step}",String(t)).replace("{steps}",String(r));if(iy(e)==="string")return n(e);if(!b.isValidElement(e))return e;const{children:i}=e.props;if(iy(i)==="string"&&i.includes("{step}"))return b.cloneElement(e,{children:n(i)});if(Array.isArray(i))return b.cloneElement(e,{children:i.map(s=>typeof s=="string"?n(s):Zj(s,t,r))});if(iy(e.type)==="function"&&!Object.values(e.props).length){const s=e.type({});return Zj(s,t,r)}return e}function Yae(e){const{isFirstStep:t,lifecycle:r,previousLifecycle:n,scrollToFirstStep:i,step:s,target:a}=e;return!s.disableScrolling&&(!t||i||r===rt.TOOLTIP)&&s.placement!=="center"&&(!s.isFixed||!Rd(a))&&n!==r&&[rt.BEACON,rt.TOOLTIP].includes(r)}var Xae={options:{preventOverflow:{boundariesElement:"scrollParent"}},wrapperOptions:{offset:-18,position:!0}},Az={back:"Back",close:"Close",last:"Last",next:"Next",nextLabelWithProgress:"Next (Step {step} of {steps})",open:"Open the dialog",skip:"Skip"},Qae={event:"click",placement:"bottom",offset:10,disableBeacon:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrollParentFix:!1,disableScrolling:!1,hideBackButton:!1,hideCloseButton:!1,hideFooter:!1,isFixed:!1,locale:Az,showProgress:!1,showSkipButton:!1,spotlightClicks:!1,spotlightPadding:10},Zae={continuous:!1,debug:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrolling:!1,disableScrollParentFix:!1,getHelpers:void 0,hideBackButton:!1,run:!0,scrollOffset:20,scrollDuration:300,scrollToFirstStep:!1,showSkipButton:!1,showProgress:!1,spotlightClicks:!1,spotlightPadding:10,steps:[]},Jae={arrowColor:"#fff",backgroundColor:"#fff",beaconSize:36,overlayColor:"rgba(0, 0, 0, 0.5)",primaryColor:"#f04",spotlightShadow:"0 0 15px rgba(0, 0, 0, 0.5)",textColor:"#333",width:380,zIndex:100},fh={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",cursor:"pointer",fontSize:16,lineHeight:1,padding:8,WebkitAppearance:"none"},p2={borderRadius:4,position:"absolute"};function eoe(e,t){var r,n,i,s,a;const{floaterProps:o,styles:c}=e,u=rs((r=t.floaterProps)!=null?r:{},o??{}),d=rs(c??{},(n=t.styles)!=null?n:{}),f=rs(Jae,d.options||{}),h=t.placement==="center"||t.disableBeacon;let{width:p}=f;window.innerWidth>480&&(p=380),"width"in f&&(p=typeof f.width=="number"&&window.innerWidth<f.width?window.innerWidth-30:f.width);const g={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,zIndex:f.zIndex},m={beacon:{...fh,display:h?"none":"inline-block",height:f.beaconSize,position:"relative",width:f.beaconSize,zIndex:f.zIndex},beaconInner:{animation:"joyride-beacon-inner 1.2s infinite ease-in-out",backgroundColor:f.primaryColor,borderRadius:"50%",display:"block",height:"50%",left:"50%",opacity:.7,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"50%"},beaconOuter:{animation:"joyride-beacon-outer 1.2s infinite ease-in-out",backgroundColor:`rgba(${qae(f.primaryColor).join(",")}, 0.2)`,border:`2px solid ${f.primaryColor}`,borderRadius:"50%",boxSizing:"border-box",display:"block",height:"100%",left:0,opacity:.9,position:"absolute",top:0,transformOrigin:"center",width:"100%"},tooltip:{backgroundColor:f.backgroundColor,borderRadius:5,boxSizing:"border-box",color:f.textColor,fontSize:16,maxWidth:"100%",padding:15,position:"relative",width:p},tooltipContainer:{lineHeight:1.4,textAlign:"center"},tooltipTitle:{fontSize:18,margin:0},tooltipContent:{padding:"20px 10px"},tooltipFooter:{alignItems:"center",display:"flex",justifyContent:"flex-end",marginTop:15},tooltipFooterSpacer:{flex:1},buttonNext:{...fh,backgroundColor:f.primaryColor,borderRadius:4,color:"#fff"},buttonBack:{...fh,color:f.primaryColor,marginLeft:"auto",marginRight:5},buttonClose:{...fh,color:f.textColor,height:14,padding:15,position:"absolute",right:0,top:0,width:14},buttonSkip:{...fh,color:f.textColor,fontSize:14},overlay:{...g,backgroundColor:f.overlayColor,mixBlendMode:"hard-light"},overlayLegacy:{...g},overlayLegacyCenter:{...g,backgroundColor:f.overlayColor},spotlight:{...p2,backgroundColor:"gray"},spotlightLegacy:{...p2,boxShadow:`0 0 0 9999px ${f.overlayColor}, ${f.spotlightShadow}`},floaterStyles:{arrow:{color:(a=(s=(i=u==null?void 0:u.styles)==null?void 0:i.arrow)==null?void 0:s.color)!=null?a:f.arrowColor},options:{zIndex:f.zIndex+100}},options:f};return rs(m,d)}function toe(e){return Gae(e,"beaconComponent","disableCloseOnEsc","disableOverlay","disableOverlayClose","disableScrolling","disableScrollParentFix","floaterProps","hideBackButton","hideCloseButton","locale","showProgress","showSkipButton","spotlightClicks","spotlightPadding","styles","tooltipComponent")}function ou(e,t){var r,n,i,s,a,o;const c=t??{},u=rs.all([Qae,toe(e),c],{isMergeableObject:Te.plainObject}),d=eoe(e,u),f=lb(ba(u.target),u.disableScrollParentFix),h=rs.all([Xae,(r=e.floaterProps)!=null?r:{},(n=u.floaterProps)!=null?n:{}]);return h.offset=u.offset,h.styles=rs((i=h.styles)!=null?i:{},d.floaterStyles),h.offset+=(a=(s=e.spotlightPadding)!=null?s:u.spotlightPadding)!=null?a:0,u.placementBeacon&&h.wrapperOptions&&(h.wrapperOptions.placement=u.placementBeacon),f&&h.options.preventOverflow&&(h.options.preventOverflow.boundariesElement="window"),{...u,locale:rs.all([Az,(o=e.locale)!=null?o:{},u.locale||{}]),floaterProps:h,styles:Oz(d,"floaterStyles")}}function Cz(e,t=!1){return Te.plainObject(e)?e.target?!0:(Sc({title:"validateStep",data:"target is missing from the step",warn:!0,debug:t}),!1):(Sc({title:"validateStep",data:"step must be an object",warn:!0,debug:t}),!1)}function m2(e,t=!1){return Te.array(e)?e.every(r=>Cz(r,t)):(Sc({title:"validateSteps",data:"steps must be an array",warn:!0,debug:t}),!1)}var Pz={action:"init",controlled:!1,index:0,lifecycle:rt.INIT,origin:null,size:0,status:lt.IDLE},g2=Kae(Oz(Pz,"controlled","size")),roe=class{constructor(e){Re(this,"beaconPopper"),Re(this,"tooltipPopper"),Re(this,"data",new Map),Re(this,"listener"),Re(this,"store",new Map),Re(this,"addListener",i=>{this.listener=i}),Re(this,"setSteps",i=>{const{size:s,status:a}=this.getState(),o={size:i.length,status:a};this.data.set("steps",i),a===lt.WAITING&&!s&&i.length&&(o.status=lt.RUNNING),this.setState(o)}),Re(this,"getPopper",i=>i==="beacon"?this.beaconPopper:this.tooltipPopper),Re(this,"setPopper",(i,s)=>{i==="beacon"?this.beaconPopper=s:this.tooltipPopper=s}),Re(this,"cleanupPoppers",()=>{this.beaconPopper=null,this.tooltipPopper=null}),Re(this,"close",(i=null)=>{const{index:s,status:a}=this.getState();a===lt.RUNNING&&this.setState({...this.getNextState({action:_t.CLOSE,index:s+1,origin:i})})}),Re(this,"go",i=>{const{controlled:s,status:a}=this.getState();if(s||a!==lt.RUNNING)return;const o=this.getSteps()[i];this.setState({...this.getNextState({action:_t.GO,index:i}),status:o?a:lt.FINISHED})}),Re(this,"info",()=>this.getState()),Re(this,"next",()=>{const{index:i,status:s}=this.getState();s===lt.RUNNING&&this.setState(this.getNextState({action:_t.NEXT,index:i+1}))}),Re(this,"open",()=>{const{status:i}=this.getState();i===lt.RUNNING&&this.setState({...this.getNextState({action:_t.UPDATE,lifecycle:rt.TOOLTIP})})}),Re(this,"prev",()=>{const{index:i,status:s}=this.getState();s===lt.RUNNING&&this.setState({...this.getNextState({action:_t.PREV,index:i-1})})}),Re(this,"reset",(i=!1)=>{const{controlled:s}=this.getState();s||this.setState({...this.getNextState({action:_t.RESET,index:0}),status:i?lt.RUNNING:lt.READY})}),Re(this,"skip",()=>{const{status:i}=this.getState();i===lt.RUNNING&&this.setState({action:_t.SKIP,lifecycle:rt.INIT,status:lt.SKIPPED})}),Re(this,"start",i=>{const{index:s,size:a}=this.getState();this.setState({...this.getNextState({action:_t.START,index:Te.number(i)?i:s},!0),status:a?lt.RUNNING:lt.WAITING})}),Re(this,"stop",(i=!1)=>{const{index:s,status:a}=this.getState();[lt.FINISHED,lt.SKIPPED].includes(a)||this.setState({...this.getNextState({action:_t.STOP,index:s+(i?1:0)}),status:lt.PAUSED})}),Re(this,"update",i=>{var s,a;
514if(!Hae(i,g2))throw new Error(`State is not valid. Valid keys: ${g2.join(", ")}`);this.setState({...this.getNextState({...this.getState(),...i,action:(s=i.action)!=null?s:_t.UPDATE,origin:(a=i.origin)!=null?a:null},!0)})});const{continuous:t=!1,stepIndex:r,steps:n=[]}=e??{};this.setState({action:_t.INIT,controlled:Te.number(r),continuous:t,index:Te.number(r)?r:0,lifecycle:rt.INIT,origin:null,status:n.length?lt.READY:lt.IDLE},!0),this.beaconPopper=null,this.tooltipPopper=null,this.listener=null,this.setSteps(n)}getState(){return this.store.size?{action:this.store.get("action")||"",controlled:this.store.get("controlled")||!1,index:parseInt(this.store.get("index"),10),lifecycle:this.store.get("lifecycle")||"",origin:this.store.get("origin")||null,size:this.store.get("size")||0,status:this.store.get("status")||""}:{...Pz}}getNextState(e,t=!1){var r,n,i,s,a;const{action:o,controlled:c,index:u,size:d,status:f}=this.getState(),h=Te.number(e.index)?e.index:u,p=c&&!t?u:Math.min(Math.max(h,0),d);return{action:(r=e.action)!=null?r:o,controlled:c,index:p,lifecycle:(n=e.lifecycle)!=null?n:rt.INIT,origin:(i=e.origin)!=null?i:null,size:(s=e.size)!=null?s:d,status:p===d?lt.FINISHED:(a=e.status)!=null?a:f}}getSteps(){const e=this.data.get("steps");return Array.isArray(e)?e:[]}hasUpdatedState(e){const t=JSON.stringify(e),r=JSON.stringify(this.getState());return t!==r}setState(e,t=!1){const r=this.getState(),{action:n,index:i,lifecycle:s,origin:a=null,size:o,status:c}={...r,...e};this.store.set("action",n),this.store.set("index",i),this.store.set("lifecycle",s),this.store.set("origin",a),this.store.set("size",o),this.store.set("status",c),t&&(this.store.set("controlled",e.controlled),this.store.set("continuous",e.continuous)),this.listener&&this.hasUpdatedState(r)&&this.listener(this.getState())}getHelpers(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}};function noe(e){return new roe(e)}function ioe({styles:e}){return b.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight","data-test-id":"spotlight",style:e})}var soe=ioe,aoe=class extends b.Component{constructor(){super(...arguments),Re(this,"isActive",!1),Re(this,"resizeTimeout"),Re(this,"scrollTimeout"),Re(this,"scrollParent"),Re(this,"state",{isScrolling:!1,mouseOverSpotlight:!1,showSpotlight:!0}),Re(this,"hideSpotlight",()=>{const{continuous:e,disableOverlay:t,lifecycle:r}=this.props,n=[rt.INIT,rt.BEACON,rt.COMPLETE,rt.ERROR];return t||(e?n.includes(r):r!==rt.TOOLTIP)}),Re(this,"handleMouseMove",e=>{const{mouseOverSpotlight:t}=this.state,{height:r,left:n,position:i,top:s,width:a}=this.spotlightStyles,o=i==="fixed"?e.clientY:e.pageY,c=i==="fixed"?e.clientX:e.pageX,u=o>=s&&o<=s+r,f=c>=n&&c<=n+a&&u;f!==t&&this.updateState({mouseOverSpotlight:f})}),Re(this,"handleScroll",()=>{const{target:e}=this.props,t=ba(e);if(this.scrollParent!==document){const{isScrolling:r}=this.state;r||this.updateState({isScrolling:!0,showSpotlight:!1}),clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout(()=>{this.updateState({isScrolling:!1,showSpotlight:!0})},50)}else Rd(t,"sticky")&&this.updateState({})}),Re(this,"handleResize",()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.isActive&&this.forceUpdate()},100)})}componentDidMount(){const{debug:e,disableScrolling:t,disableScrollParentFix:r=!1,target:n}=this.props,i=ba(n);this.scrollParent=Hp(i??document.body,r,!0),this.isActive=!0,window.addEventListener("resize",this.handleResize)}componentDidUpdate(e){var t;const{disableScrollParentFix:r,lifecycle:n,spotlightClicks:i,target:s}=this.props,{changed:a}=Xy(e,this.props);if(a("target")||a("disableScrollParentFix")){const o=ba(s);this.scrollParent=Hp(o??document.body,r,!0)}a("lifecycle",rt.TOOLTIP)&&((t=this.scrollParent)==null||t.addEventListener("scroll",this.handleScroll,{passive:!0}),setTimeout(()=>{const{isScrolling:o}=this.state;o||this.updateState({showSpotlight:!0})},100)),(a("spotlightClicks")||a("disableOverlay")||a("lifecycle"))&&(i&&n===rt.TOOLTIP?window.addEventListener("mousemove",this.handleMouseMove,!1):n!==rt.TOOLTIP&&window.removeEventListener("mousemove",this.handleMouseMove))}componentWillUnmount(){var e;this.isActive=!1,window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("resize",this.handleResize),clearTimeout(this.resizeTimeout),clearTimeout(this.scrollTimeout),(e=this.scrollParent)==null||e.removeEventListener("scroll",this.handleScroll)}
514get overlayStyles(){const{mouseOverSpotlight:e}=this.state,{disableOverlayClose:t,placement:r,styles:n}=this.props;let i=n.overlay;return h2()&&(i=r==="center"?n.overlayLegacyCenter:n.overlayLegacy),{cursor:t?"default":"pointer",height:Lae(),pointerEvents:e?"none":"auto",...i}}get spotlightStyles(){var e,t,r;const{showSpotlight:n}=this.state,{disableScrollParentFix:i=!1,spotlightClicks:s,spotlightPadding:a=0,styles:o,target:c}=this.props,u=ba(c),d=Ez(u),f=Rd(u),h=Uae(u,a,i);return{...h2()?o.spotlightLegacy:o.spotlight,height:Math.round(((e=d==null?void 0:d.height)!=null?e:0)+a*2),left:Math.round(((t=d==null?void 0:d.left)!=null?t:0)-a),opacity:n?1:0,pointerEvents:s?"none":"auto",position:f?"fixed":"absolute",top:h,transition:"opacity 0.2s",width:Math.round(((r=d==null?void 0:d.width)!=null?r:0)+a*2)}}updateState(e){this.isActive&&this.setState(t=>({...t,...e}))}render(){const{showSpotlight:e}=this.state,{onClickOverlay:t,placement:r}=this.props,{hideSpotlight:n,overlayStyles:i,spotlightStyles:s}=this;if(n())return null;let a=r!=="center"&&e&&b.createElement(soe,{styles:s});if(Nz()==="safari"){const{mixBlendMode:o,zIndex:c,...u}=i;a=b.createElement("div",{style:{...u}},a),delete i.backgroundColor}return b.createElement("div",{className:"react-joyride__overlay","data-test-id":"overlay",onClick:t,role:"presentation",style:i},a)}},ooe=class extends b.Component{constructor(){super(...arguments),Re(this,"node",null)}componentDidMount(){const{id:e}=this.props;mo()&&(this.node=document.createElement("div"),this.node.id=e,document.body.appendChild(this.node),dh||this.renderReact15())}componentDidUpdate(){mo()&&(dh||this.renderReact15())}componentWillUnmount(){!mo()||!this.node||(dh||as.unmountComponentAtNode(this.node),this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=null))}renderReact15(){if(!mo())return;const{children:e}=this.props;this.node&&as.unstable_renderSubtreeIntoContainer(this,e,this.node)}renderReact16(){if(!mo()||!dh)return null;const{children:e}=this.props;return this.node?as.createPortal(e,this.node):null}render(){return dh?this.renderReact16():null}},loe=class{constructor(e,t){if(Re(this,"element"),Re(this,"options"),Re(this,"canBeTabbed",r=>{const{tabIndex:n}=r;return n===null||n<0?!1:this.canHaveFocus(r)}),Re(this,"canHaveFocus",r=>{const n=/input|select|textarea|button|object/,i=r.nodeName.toLowerCase();return(n.test(i)&&!r.getAttribute("disabled")||i==="a"&&!!r.getAttribute("href"))&&this.isVisible(r)}),Re(this,"findValidTabElements",()=>[].slice.call(this.element.querySelectorAll("*"),0).filter(this.canBeTabbed)),Re(this,"handleKeyDown",r=>{const{code:n="Tab"}=this.options;r.code===n&&this.interceptTab(r)}),Re(this,"interceptTab",r=>{r.preventDefault();const n=this.findValidTabElements(),{shiftKey:i}=r;if(!n.length)return;let s=document.activeElement?n.indexOf(document.activeElement):0;s===-1||!i&&s+1===n.length?s=0:i&&s===0?s=n.length-1:s+=i?-1:1,n[s].focus()}),Re(this,"isHidden",r=>{const n=r.offsetWidth<=0&&r.offsetHeight<=0,i=window.getComputedStyle(r);return n&&!r.innerHTML?!0:n&&i.getPropertyValue("overflow")!=="visible"||i.getPropertyValue("display")==="none"}),Re(this,"isVisible",r=>{let n=r;for(;n;)if(n instanceof HTMLElement){if(n===document.body)break;if(this.isHidden(n))return!1;n=n.parentNode}return!0}),Re(this,"removeScope",()=>{window.removeEventListener("keydown",this.handleKeyDown)}),Re(this,"checkFocus",r=>{document.activeElement!==r&&(r.focus(),window.requestAnimationFrame(()=>this.checkFocus(r)))}),Re(this,"setFocus",()=>{const{selector:r}=this.options;if(!r)return;const n=this.element.querySelector(r);n&&window.requestAnimationFrame(()=>this.checkFocus(n))}),!(e instanceof HTMLElement))throw new TypeError("Invalid parameter: element must be an HTMLElement");this.element=e,this.options=t,window.addEventListener("keydown",this.handleKeyDown,!1),this.setFocus()}},coe=class extends b.Component{constructor(e){if(super(e),Re(this,"beacon",null),Re(this,"setBeaconRef",i=>{this.beacon=i}),e.beaconComponent)return;const t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.id="joyride-beacon-animation",e.nonce&&r.setAttribute("nonce",e.nonce),r.appendChild(document.createTextNode(`
515        @keyframes joyride-beacon-inner {
516          20% {
517            opacity: 0.9;
518          }
519        
520          90% {
521            opacity: 0.7;
522          }
523        }
524        
525        @keyframes joyride-beacon-outer {
526          0% {
527            transform: scale(1);
528          }
529        
530          45% {
531            opacity: 0.7;
532            transform: scale(0.75);
533          }
534        
535          100% {
536            opacity: 0.9;
537            transform: scale(1);
538          }
539        }
540      `)),t.appendChild(r)}componentDidMount(){const{shouldFocus:e}=this.props;setTimeout(()=>{Te.domElement(this.beacon)&&e&&this.beacon.focus()},0)}componentWillUnmount(){const e=document.getElementById("joyride-beacon-animation");e!=null&&e.parentNode&&e.parentNode.removeChild(e)}render(){const{beaconComponent:e,continuous:t,index:r,isLastStep:n,locale:i,onClickOrHover:s,size:a,step:o,styles:c}=this.props,u=As(i.open),d={"aria-label":u,onClick:s,onMouseEnter:s,ref:this.setBeaconRef,title:u};let f;if(e){const h=e;f=b.createElement(h,{continuous:t,index:r,isLastStep:n,size:a,step:o,...d})}else f=b.createElement("button",{key:"JoyrideBeacon",className:"react-joyride__beacon","data-test-id":"button-beacon",style:c.beacon,type:"button",...d},b.createElement("span",{style:c.beaconInner}),b.createElement("span",{style:c.beaconOuter}));return f}};function uoe({styles:e,...t}){const{color:r,height:n,width:i,...s}=e;return P.createElement("button",{style:s,type:"button",...t},P.createElement("svg",{height:typeof n=="number"?`${n}px`:n,preserveAspectRatio:"xMidYMid",version:"1.1",viewBox:"0 0 18 18",width:typeof i=="number"?`${i}px`:i,xmlns:"http://www.w3.org/2000/svg"},P.createElement("g",null,P.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:r}))))}var doe=uoe;function foe(e){const{backProps:t,closeProps:r,index:n,isLastStep:i,primaryProps:s,skipProps:a,step:o,tooltipProps:c}=e,{content:u,hideBackButton:d,hideCloseButton:f,hideFooter:h,showSkipButton:p,styles:g,title:m}=o,v={};return v.primary=b.createElement("button",{"data-test-id":"button-primary",style:g.buttonNext,type:"button",...s}),p&&!i&&(v.skip=b.createElement("button",{"aria-live":"off","data-test-id":"button-skip",style:g.buttonSkip,type:"button",...a})),!d&&n>0&&(v.back=b.createElement("button",{"data-test-id":"button-back",style:g.buttonBack,type:"button",...t})),v.close=!f&&b.createElement(doe,{"data-test-id":"button-close",styles:g.buttonClose,...r}),b.createElement("div",{key:"JoyrideTooltip","aria-label":As(m??u),className:"react-joyride__tooltip",style:g.tooltip,...c},b.createElement("div",{style:g.tooltipContainer},m&&b.createElement("h1",{"aria-label":As(m),style:g.tooltipTitle},m),b.createElement("div",{style:g.tooltipContent},u)),!h&&b.createElement("div",{style:g.tooltipFooter},b.createElement("div",{style:g.tooltipFooterSpacer},v.skip),v.back,v.primary),v.close)}var hoe=foe,poe=class extends b.Component{constructor(){super(...arguments),Re(this,"handleClickBack",e=>{e.preventDefault();const{helpers:t}=this.props;t.prev()}),Re(this,"handleClickClose",e=>{e.preventDefault();const{helpers:t}=this.props;t.close("button_close")}),Re(this,"handleClickPrimary",e=>{e.preventDefault();const{continuous:t,helpers:r}=this.props;if(!t){r.close("button_primary");return}r.next()}),Re(this,"handleClickSkip",e=>{e.preventDefault();const{helpers:t}=this.props;t.skip()}),Re(this,"getElementsProps",()=>{const{continuous:e,index:t,isLastStep:r,setTooltipRef:n,size:i,step:s}=this.props,{back:a,close:o,last:c,next:u,nextLabelWithProgress:d,skip:f}=s.locale,h=As(a),p=As(o),g=As(c),m=As(u),v=As(f);let y=o,x=p;if(e){if(y=u,x=m,s.showProgress&&!r){const w=As(d,{step:t+1,steps:i});y=Zj(d,t+1,i),x=w}r&&(y=c,x=g)}return{backProps:{"aria-label":h,children:a,"data-action":"back",onClick:this.handleClickBack,role:"button",title:h},closeProps:{"aria-label":p,children:o,"data-action":"close",onClick:this.handleClickClose,role:"button",title:p},primaryProps:{"aria-label":x,children:y,"data-action":"primary",onClick:this.handleClickPrimary,role:"button",title:x},skipProps:{"aria-label":v,children:f,"data-action":"skip",onClick:this.handleClickSkip,role:"button",title:v},tooltipProps:{"aria-modal":!0,ref:n,role:"alertdialog"}}})}render(){const{continuous:e,index:t,isLastStep:r,setTooltipRef:n,size:i,step:s}=this.props,{beaconComponent:a,tooltipComponent:o,...c}=s;let u;if(o){const d={...this.getElementsProps(),continuous:e,index:t,isLastStep:r,size:i,step:c,setTooltipRef:n},f=o;u=b.createElement(f,{...d})}else u=b.createElement(hoe,{...this.getElementsProps(),continuous:e,index:t,isLastStep:r,size:i,step:s});return u}},moe=class extends b.Component{constructor(){super(...arguments),Re(this,"scope",null),Re(this,"tooltip",null),Re(this,"handleClickHoverBeacon",e=>
540{const{step:t,store:r}=this.props;e.type==="mouseenter"&&t.event!=="hover"||r.update({lifecycle:rt.TOOLTIP})}),Re(this,"setTooltipRef",e=>{this.tooltip=e}),Re(this,"setPopper",(e,t)=>{var r;const{action:n,lifecycle:i,step:s,store:a}=this.props;t==="wrapper"?a.setPopper("beacon",e):a.setPopper("tooltip",e),a.getPopper("beacon")&&(a.getPopper("tooltip")||s.placement==="center")&&i===rt.INIT&&a.update({action:n,lifecycle:rt.READY}),(r=s.floaterProps)!=null&&r.getPopper&&s.floaterProps.getPopper(e,t)}),Re(this,"renderTooltip",e=>{const{continuous:t,helpers:r,index:n,size:i,step:s}=this.props;return b.createElement(poe,{continuous:t,helpers:r,index:n,isLastStep:n+1===i,setTooltipRef:this.setTooltipRef,size:i,step:s,...e})})}componentDidMount(){const{debug:e,index:t}=this.props;Sc({title:`step:${t}`,data:[{key:"props",value:this.props}],debug:e})}componentDidUpdate(e){var t;const{action:r,callback:n,continuous:i,controlled:s,debug:a,helpers:o,index:c,lifecycle:u,shouldScroll:d,status:f,step:h,store:p}=this.props,{changed:g,changedFrom:m}=Xy(e,this.props),v=o.info(),y=i&&r!==_t.CLOSE&&(c>0||r===_t.PREV),x=g("action")||g("index")||g("lifecycle")||g("status"),w=m("lifecycle",[rt.TOOLTIP,rt.INIT],rt.INIT),S=g("action",[_t.NEXT,_t.PREV,_t.SKIP,_t.CLOSE]),j=s&&c===e.index;if(S&&(w||j)&&n({...v,index:e.index,lifecycle:rt.COMPLETE,step:e.step,type:Yi.STEP_AFTER}),h.placement==="center"&&f===lt.RUNNING&&g("index")&&r!==_t.START&&u===rt.INIT&&p.update({lifecycle:rt.READY}),x){const E=ba(h.target),_=!!E;_&&zae(E)?(m("status",lt.READY,lt.RUNNING)||m("lifecycle",rt.INIT,rt.READY))&&n({...v,step:h,type:Yi.STEP_BEFORE}):(console.warn(_?"Target not visible":"Target not mounted",h),n({...v,type:Yi.TARGET_NOT_FOUND,step:h}),s||p.update({index:c+(r===_t.PREV?-1:1)}))}m("lifecycle",rt.INIT,rt.READY)&&p.update({lifecycle:f2(h)||y?rt.TOOLTIP:rt.BEACON}),g("index")&&Sc({title:`step:${u}`,data:[{key:"props",value:this.props}],debug:a}),g("lifecycle",rt.BEACON)&&n({...v,step:h,type:Yi.BEACON}),g("lifecycle",rt.TOOLTIP)&&(n({...v,step:h,type:Yi.TOOLTIP}),d&&this.tooltip&&(this.scope=new loe(this.tooltip,{selector:"[data-action=primary]"}),this.scope.setFocus())),m("lifecycle",[rt.TOOLTIP,rt.INIT],rt.INIT)&&((t=this.scope)==null||t.removeScope(),p.cleanupPoppers())}componentWillUnmount(){var e;(e=this.scope)==null||e.removeScope()}get open(){const{lifecycle:e,step:t}=this.props;return f2(t)||e===rt.TOOLTIP}render(){const{continuous:e,debug:t,index:r,nonce:n,shouldScroll:i,size:s,step:a}=this.props,o=ba(a.target);return!Cz(a)||!Te.domElement(o)?null:b.createElement("div",{key:`JoyrideStep-${r}`,className:"react-joyride__step"},b.createElement(aA,{...a.floaterProps,component:this.renderTooltip,debug:t,getPopper:this.setPopper,id:`react-joyride-step-${r}`,open:this.open,placement:a.placement,target:a.target},b.createElement(coe,{beaconComponent:a.beaconComponent,continuous:e,index:r,isLastStep:r+1===s,locale:a.locale,nonce:n,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:i,size:s,step:a,styles:a.styles})))}},Tz=class extends b.Component{constructor(e){super(e),Re(this,"helpers"),Re(this,"store"),Re(this,"callback",a=>{const{callback:o}=this.props;Te.function(o)&&o(a)}),Re(this,"handleKeyboard",a=>{const{index:o,lifecycle:c}=this.state,{steps:u}=this.props,d=u[o];c===rt.TOOLTIP&&a.code==="Escape"&&d&&!d.disableCloseOnEsc&&this.store.close("keyboard")}),Re(this,"handleClickOverlay",()=>{const{index:a}=this.state,{steps:o}=this.props;ou(this.props,o[a]).disableOverlayClose||this.helpers.close("overlay")}),Re(this,"syncState",a=>{this.setState(a)});const{debug:t,getHelpers:r,run:n=!0,stepIndex:i}=e;this.store=noe({...e,controlled:n&&Te.number(i)}),this.helpers=this.store.getHelpers();const{addListener:s}=this.store;Sc({title:"init",data:[{key:"props",value:this.props},{key:"state",value:this.state}],debug:t}),s(this.syncState),r&&r(this.helpers),this.state=this.store.getState()}componentDidMount(){if(!mo())return;const{debug:e,disableCloseOnEsc:t,run:r,steps:n}=this.props,{start:i}=this.store;m2(n,e)&&r&&i(),t||document.body.addEventListener("keydown",this.handleKeyboard,{passive:!0})}componentDidUpdate(e,t){if(!mo())return;const{action:r,controlled:n,index:i,status:s}
540=this.state,{debug:a,run:o,stepIndex:c,steps:u}=this.props,{stepIndex:d,steps:f}=e,{reset:h,setSteps:p,start:g,stop:m,update:v}=this.store,{changed:y}=Xy(e,this.props),{changed:x,changedFrom:w}=Xy(t,this.state),S=ou(this.props,u[i]),j=!cn(f,u),E=Te.number(c)&&y("stepIndex"),_=ba(S.target);if(j&&(m2(u,a)?p(u):console.warn("Steps are not valid",u)),y("run")&&(o?g(c):m()),E){let C=Te.number(d)&&d<c?_t.NEXT:_t.PREV;r===_t.STOP&&(C=_t.START),[lt.FINISHED,lt.SKIPPED].includes(s)||v({action:r===_t.CLOSE?_t.CLOSE:C,index:c,lifecycle:rt.INIT})}!n&&s===lt.RUNNING&&i===0&&!_&&(this.store.update({index:i+1}),this.callback({...this.state,type:Yi.TARGET_NOT_FOUND,step:S}));const N={...this.state,index:i,step:S};if(x("action",[_t.NEXT,_t.PREV,_t.SKIP,_t.CLOSE])&&x("status",lt.PAUSED)){const C=ou(this.props,u[t.index]);this.callback({...N,index:t.index,lifecycle:rt.COMPLETE,step:C,type:Yi.STEP_AFTER})}if(x("status",[lt.FINISHED,lt.SKIPPED])){const C=ou(this.props,u[t.index]);n||this.callback({...N,index:t.index,lifecycle:rt.COMPLETE,step:C,type:Yi.STEP_AFTER}),this.callback({...N,type:Yi.TOUR_END,step:C,index:t.index}),h()}else w("status",[lt.IDLE,lt.READY],lt.RUNNING)?this.callback({...N,type:Yi.TOUR_START}):(x("status")||x("action",_t.RESET))&&this.callback({...N,type:Yi.TOUR_STATUS});this.scrollToStep(t)}componentWillUnmount(){const{disableCloseOnEsc:e}=this.props;e||document.body.removeEventListener("keydown",this.handleKeyboard)}scrollToStep(e){const{index:t,lifecycle:r,status:n}=this.state,{debug:i,disableScrollParentFix:s=!1,scrollDuration:a,scrollOffset:o=20,scrollToFirstStep:c=!1,steps:u}=this.props,d=ou(this.props,u[t]),f=ba(d.target),h=Yae({isFirstStep:t===0,lifecycle:r,previousLifecycle:e.lifecycle,scrollToFirstStep:c,step:d,target:f});if(n===lt.RUNNING&&h){const p=lb(f,s),g=Hp(f,s);let m=Math.floor(Vae(f,o,s))||0;Sc({title:"scrollToStep",data:[{key:"index",value:t},{key:"lifecycle",value:r},{key:"status",value:n}],debug:i});const v=this.store.getPopper("beacon"),y=this.store.getPopper("tooltip");if(r===rt.BEACON&&v){const{offsets:x,placement:w}=v;!["bottom"].includes(w)&&!p&&(m=Math.floor(x.popper.top-o))}else if(r===rt.TOOLTIP&&y){const{flipped:x,offsets:w,placement:S}=y;["top","right","left"].includes(S)&&!x&&!p?m=Math.floor(w.popper.top-o):m-=d.spotlightPadding}m=m>=0?m:0,n===lt.RUNNING&&Wae(m,{element:g,duration:a}).then(()=>{setTimeout(()=>{var x;(x=this.store.getPopper("tooltip"))==null||x.instance.update()},10)})}}render(){if(!mo())return null;const{index:e,lifecycle:t,status:r}=this.state,{continuous:n=!1,debug:i=!1,nonce:s,scrollToFirstStep:a=!1,steps:o}=this.props,c=r===lt.RUNNING,u={};
540if(c&&o[e]){const d=ou(this.props,o[e]);u.step=b.createElement(moe,{...this.state,callback:this.callback,continuous:n,debug:i,helpers:this.helpers,nonce:s,shouldScroll:!d.disableScrolling&&(e!==0||a),step:d,store:this.store}),u.overlay=b.createElement(ooe,{id:"react-joyride-portal"},b.createElement(aoe,{...d,continuous:n,debug:i,lifecycle:t,onClickOverlay:this.handleClickOverlay}))}return b.createElement("div",{className:"react-joyride"},u.step,u.overlay)}};Re(Tz,"defaultProps",Zae);var goe=Tz;const voe=[{target:"body",content:l.jsxs("div",{children:[l.jsx("h2",{className:"text-lg font-bold mb-2",children:"Welcome to AAOE Admin Dashboard!"}),l.jsx("p",{children:"Let's take a quick tour of the key features to help you get started."})]}),placement:"center",disableBeacon:!0},{target:'[data-testid="button-sidebar-toggle"]',content:"Use this button to toggle the sidebar navigation on and off.",placement:"right"},{target:'[data-testid="nav-overview"]',content:"The Dashboard Overview shows real-time metrics and system health at a glance.",placement:"right"},{target:'[data-testid="nav-knowledge-base"]',content:"Manage your AI knowledge base here. Upload PDFs, add links, or enter text directly to train your AI assistant.",placement:"right"},{target:'[data-testid="nav-call-analytics"]',content:"View and analyze all customer interactions across phone, chat, and SMS. Click 'View' on any call to see detailed information.",placement:"right"},{target:'[data-testid="nav-issue-tracker"]',content:"Track and manage issues with AI responses. Click on any issue card to view interaction details and mark as resolved.",placement:"right"},{target:'[data-testid="nav-ai-configuration"]',content:"Configure your AI assistant's behavior, prompts, functions, and transfer rules here.",placement:"right"},{target:'[data-testid="button-user-menu"]',content:"Access your profile, settings, and you can restart this tour anytime from the Help menu.",placement:"bottom"}];function yoe({run:e,onComplete:t}){const[r,n]=b.useState(0),i=s=>{const{status:a,index:o,type:c}=s;c==="step:after"&&n(o+1),[lt.FINISHED,lt.SKIPPED].includes(a)&&(t(),n(0))};return l.jsx(goe,{steps:voe,run:e,continuous:!0,showProgress:!0,showSkipButton:!0,stepIndex:r,callback:i,styles:{options:{primaryColor:"hsl(var(--primary))",textColor:"hsl(var(--foreground))",backgroundColor:"hsl(var(--card))",arrowColor:"hsl(var(--card))",overlayColor:"rgba(0, 0, 0, 0.5)",zIndex:1e4},tooltip:{borderRadius:"0.5rem",padding:"1rem"},buttonNext:{backgroundColor:"hsl(var(--primary))",color:"hsl(var(--primary-foreground))",borderRadius:"0.375rem",padding:"0.5rem 1rem"},buttonBack:{color:"hsl(var(--muted-foreground))"},buttonSkip:{color:"hsl(var(--muted-foreground))"}},locale:{back:"Back",close:"Close",last:"Finish",next:"Next",skip:"Skip tour"}})}function xoe(){return nO.useSyncExternalStore(boe,()=>!0,()=>!1)}function boe(){return()=>{}}var oA="Avatar",[woe]=Zr(oA),[Soe,kz]=woe(oA),Rz=b.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[i,s]=b.useState("idle");return l.jsx(Soe,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:l.jsx(ke.span,{...n,ref:t})})});Rz.displayName=oA;var $z="AvatarImage",Iz=b.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:i=()=>{},...s}=e,a=kz($z,r),o=joe(n,s),c=lr(u=>{i(u),a.onImageLoadingStatusChange(u)});return hr(()=>{o!=="idle"&&c(o)},[o,c]),o==="loaded"?l.jsx(ke.img,{...s,ref:t,src:n}):null});Iz.displayName=$z;var Mz="AvatarFallback",Dz=b.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...i}=e,s=kz(Mz,r),[a,o]=b.useState(n===void 0);return b.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>o(!0),n);return()=>window.clearTimeout(c)}},[n]),a&&s.imageLoadingStatus!=="loaded"?l.jsx(ke.span,{...i,ref:t}):null});Dz.displayName=Mz;function v2(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function joe(e,{referrerPolicy:t,crossOrigin:r}){const n=xoe(),i=b.useRef(null),s=n?(i.current||(i.current=new window.Image),i.current):null,[a,o]=b.useState(()=>v2(s,e));return hr(()=>{o(v2(s,e))},[s,e]),hr(()=>{const c=f=>()=>{o(f)};if(!s)return;const u=c("loaded"),d=c("error");return s.addEventListener("load",u),s.addEventListener("error",d),t&&(s.referrerPolicy=t),typeof r=="string"&&(s.crossOrigin=r),()=>{s.removeEventListener("load",u),s.removeEventListener("error",d)}},[s,r,t]),a}var Lz=Rz,Fz=Iz,Bz=Dz;const jc=b.forwardRef(({className:e,...t},r)=>l.jsx(Lz,{ref:r,className:se(`
541      after:content-[''] after:block after:absolute after:inset-0 after:rounded-full after:pointer-events-none after:border after:border-black/10 dark:after:border-white/10
542      relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full`,e),...t}));jc.displayName=Lz.displayName;const _oe=b.forwardRef(({className:e,...t},r)=>l.jsx(Fz,{ref:r,className:se("aspect-square h-full w-full",e),...t}));_oe.displayName=Fz.displayName;const _c=b.forwardRef(({className:e,...t},r)=>l.jsx(Bz,{ref:r,className:se("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));_c.displayName=Bz.displayName;var Eoe=b.createContext(void 0);function If(e){const t=b.useContext(Eoe);return e||t||"ltr"}var k1="rovingFocusGroup.onEntryFocus",Noe={bubbles:!1,cancelable:!0},hg="RovingFocusGroup",[Jj,zz,Ooe]=Ym(hg),[Aoe,cb]=Zr(hg,[Ooe]),[Coe,Poe]=Aoe(hg),Uz=b.forwardRef((e,t)=>
vendor: 17,324 bytes, line 542
542l.jsx(Jj.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Jj.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Toe,{...e,ref:t})})}));Uz.displayName=hg;var Toe=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=b.useRef(null),p=Ye(t,h),g=If(s),[m,v]=Ra({prop:a,defaultProp:o??null,onChange:c,caller:hg}),[y,x]=b.useState(!1),w=lr(u),S=zz(r),j=b.useRef(!1),[E,_]=b.useState(0);return b.useEffect(()=>{const N=h.current;if(N)return N.addEventListener(k1,w),()=>N.removeEventListener(k1,w)},[w]),l.jsx(Coe,{scope:r,orientation:n,dir:g,loop:i,currentTabStopId:m,onItemFocus:b.useCallback(N=>v(N),[v]),onItemShiftTab:b.useCallback(()=>x(!0),[]),onFocusableItemAdd:b.useCallback(()=>_(N=>N+1),[]),onFocusableItemRemove:b.useCallback(()=>_(N=>N-1),[]),children:l.jsx(ke.div,{tabIndex:y||E===0?-1:0,"data-orientation":n,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:fe(e.onMouseDown,()=>{j.current=!0}),onFocus:fe(e.onFocus,N=>{const O=!j.current;if(N.target===N.currentTarget&&O&&!y){const C=new CustomEvent(k1,Noe);if(N.currentTarget.dispatchEvent(C),!C.defaultPrevented){const k=S().filter(T=>T.focusable),$=k.find(T=>T.active),D=k.find(T=>T.id===m),R=[$,D,...k].filter(Boolean).map(T=>T.ref.current);Hz(R,d)}}j.current=!1}),onBlur:fe(e.onBlur,()=>x(!1))})})}),Vz="RovingFocusGroupItem",Wz=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,children:a,...o}=e,c=Ls(),u=s||c,d=Poe(Vz,r),f=d.currentTabStopId===u,h=zz(r),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:m}=d;return b.useEffect(()=>{if(n)return p(),()=>g()},[n,p,g]),l.jsx(Jj.ItemSlot,{scope:r,id:u,focusable:n,active:i,children:l.jsx(ke.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...o,ref:t,onMouseDown:fe(e.onMouseDown,v=>{n?d.onItemFocus(u):v.preventDefault()}),onFocus:fe(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:fe(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=$oe(v,d.orientation,d.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=h().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const S=w.indexOf(v.currentTarget);w=d.loop?Ioe(w,S+1):w.slice(S+1)}setTimeout(()=>Hz(w))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:m!=null}):a})})});Wz.displayName=Vz;var koe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Roe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function $oe(e,t,r){const n=Roe(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return koe[n]}function Hz(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Ioe(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var qz=Uz,Kz=Wz,e_=["Enter"," "],Moe=["ArrowDown","PageUp","Home"],Gz=["ArrowUp","PageDown","End"],Doe=[...Moe,...Gz],Loe={ltr:[...e_,"ArrowRight"],rtl:[...e_,"ArrowLeft"]},Foe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},pg="Menu",[qp,Boe,zoe]=Ym(pg),[Hc,Yz]=Zr(pg,[zoe,Tf,cb]),ub=Tf(),Xz=cb(),[Uoe,qc]=Hc(pg),[Voe,mg]=Hc(pg),Qz=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:i,onOpenChange:s,modal:a=!0}=e,o=ub(t),[c,u]=b.useState(null),d=b.useRef(!1),f=lr(s),h=If(i);return b.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),l.jsx(sB,{...o,children:l.jsx(Uoe,{scope:t,open:r,onOpenChange:f,content:c,onContentChange:u,children:l.jsx(Voe,{scope:t,onClose:b.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:a,children:n})})})};Qz.displayName=pg;var Woe="MenuAnchor",lA=b.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,i=ub(r);return l.jsx(zO,{...i,...n,ref:t})});lA.displayName=Woe;var cA="MenuPortal",[Hoe,Zz]=Hc(cA,{forceMount:void 0}),Jz=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:i}=e,s=qc(cA,t);return l.jsx(Hoe,{scope:t,forceMount:r,children:l.jsx(yn,{present:r||s.open,children:l.jsx(Xm,{asChild:!0,container:i,children:n})})})};Jz.displayName=cA;var ji="MenuContent",[qoe,uA]=Hc(ji),eU=b.forwardRef((e,t)=>{const r=Zz(ji,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,s=qc(ji,e.__scopeMenu),a=mg(ji,e.__scopeMenu);return l.jsx(qp.Provider,{scope:e.__scopeMenu,children:l.jsx(yn,{present:n||s.open,children:l.jsx(qp.Slot,{scope:e.__scopeMenu,children:a.modal?l.jsx(Koe,{...i,ref:t}):l.jsx(Goe,{...i,ref:t})})})})}),Koe=b.forwardRef((e,t)=>{const r=qc(ji,e.__scopeMenu),n=b.useRef(null),i=Ye(t,n);return b.useEffect(()=>{const s=n.current;if(s)return GO(s)},[]),l.jsx(dA,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:fe(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Goe=b.forwardRef((e,t)=>{const r=qc(ji,e.__scopeMenu);return l.jsx(dA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Yoe=xc("MenuContent.ScrollLock"),dA=b.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:p,disableOutsideScroll:g,...m}=e,v=qc(ji,r),y=mg(ji,r),x=ub(r),w=Xz(r),S=Boe(r),[j,E]=b.useState(null),_=b.useRef(null),N=Ye(t,_,v.onContentChange),O=b.useRef(0),C=b.useRef(""),k=b.useRef(0),$=b.useRef(null),D=b.useRef("right"),A=b.useRef(0),R=g?nb:b.Fragment,T=g?{as:Yoe,allowPinchZoom:!0}:void 0,L=I=>{var re,ge;const F=C.current+I,U=S().filter(Y=>!Y.disabled),V=document.activeElement,G=(re=U.find(Y=>Y.ref.current===V))==null?void 0:re.textValue,Z=U.map(Y=>Y.textValue),he=ole(Z,F,G),ve=(ge=U.find(Y=>Y.textValue===he))==null?void 0:ge.ref.current;(function Y(ee){C.current=ee,window.clearTimeout(O.current),ee!==""&&(O.current=window.setTimeout(()=>Y(""),1e3))})(F),ve&&setTimeout(()=>ve.focus())};b.useEffect(()=>()=>window.clearTimeout(O.current),[]),KO();const M=b.useCallback(I=>{var U,V;return D.current===((U=$.current)==null?void 0:U.side)&&cle(I,(V=$.current)==null?void 0:V.area)},[]);return l.jsx(qoe,{scope:r,searchRef:C,onItemEnter:b.useCallback(I=>{M(I)&&I.preventDefault()},[M]),onItemLeave:b.useCallback(I=>{var F;M(I)||((F=_.current)==null||F.focus(),E(null))},[M]),onTriggerLeave:b.useCallback(I=>{M(I)&&I.preventDefault()},[M]),pointerGraceTimerRef:k,onPointerGraceIntentChange:b.useCallback(I=>{$.current=I},[]),children:l.jsx(R,{...T,children:l.jsx(tb,{asChild:!0,trapped:i,onMountAutoFocus:fe(s,I=>{var F;I.preventDefault(),(F=_.current)==null||F.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:l.jsx(jf,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:p,children:l.jsx(qz,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:j,onCurrentTabStopIdChange:E,onEntryFocus:fe(c,I=>{y.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(UO,{role:"menu","aria-orientation":"vertical","data-state":gU(v.open),"data-radix-menu-content":"",dir:y.dir,...x,...m,ref:N,style:{outline:"none",...m.style},onKeyDown:fe(m.onKeyDown,I=>{const U=I.target.closest("[data-radix-menu-content]")===I.currentTarget,V=I.ctrlKey||I.altKey||I.metaKey,G=I.key.length===1;U&&(I.key==="Tab"&&I.preventDefault(),!V&&G&&L(I.key));const Z=_.current;if(I.target!==Z||!Doe.includes(I.key))return;I.preventDefault();const ve=S().filter(re=>!re.disabled).map(re=>re.ref.current);Gz.includes(I.key)&&ve.reverse(),sle(ve)}),onBlur:fe(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(O.current),C.current="")}),onPointerMove:fe(e.onPointerMove,Kp(I=>{const F=I.target,U=A.current!==I.clientX;if(I.currentTarget.contains(F)&&U){const V=I.clientX>A.current?"right":"left";D.current=V,A.current=I.clientX}}))})})})})})})});eU.displayName=ji;var Xoe="MenuGroup",fA=b.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return l.jsx(ke.div,{role:"group",...n,ref:t})});fA.displayName=Xoe;var Qoe="MenuLabel",tU=b.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return l.jsx(ke.div,{...n,ref:t})});tU.displayName=Qoe;var ex="MenuItem",y2="menu.itemSelect",db=b.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...i}=e,s=b.useRef(null),a=mg(ex,e.__scopeMenu),o=uA(ex,e.__scopeMenu),c=Ye(t,s),u=b.useRef(!1),d=()=>{const f=s.current;if(!r&&f){const h=new CustomEvent(y2,{bubbles:!0,cancelable:!0});f.addEventListener(y2,p=>n==null?void 0:n(p),{once:!0}),wO(f,h),h.defaultPrevented?u.current=!1:a.onClose()}};return l.jsx(rU,{...i,ref:c,disabled:r,onClick:fe(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),u.current=!0},onPointerUp:fe(e.onPointerUp,f=>{var h;u.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:fe(e.onKeyDown,f=>{const h=o.searchRef.current!=="";r||h&&f.key===" "||e_.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});db.displayName=ex;var rU=b.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=e,a=uA(ex,r),o=Xz(r),c=b.useRef(null),u=Ye(t,c),[d,f]=b.useState(!1),[h,p]=b.useState("");return b.useEffect(()=>{const g=c.current;g&&p((g.textContent??"").trim())},[s.children]),l.jsx(qp.ItemSlot,{scope:r,disabled:n,textValue:i??h,children:l.jsx(Kz,{asChild:!0,...o,focusable:!n,children:l.jsx(ke.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...s,ref:u,onPointerMove:fe(e.onPointerMove,Kp(g=>{n?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:fe(e.onPointerLeave,Kp(g=>a.onItemLeave(g))),onFocus:fe(e.onFocus,()=>f(!0)),onBlur:fe(e.onBlur,()=>f(!1))})})})}),Zoe="MenuCheckboxItem",nU=b.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...i}=e;return l.jsx(lU,{scope:e.__scopeMenu,checked:r,children:l.jsx(db,{role:"menuitemcheckbox","aria-checked":tx(r)?"mixed":r,...i,ref:t,"data-state":pA(r),onSelect:fe(i.onSelect,()=>n==null?void 0:n(tx(r)?!0:!r),{checkForDefaultPrevented:!1})})})});nU.displayName=Zoe;var iU="MenuRadioGroup",[Joe,ele]=Hc(iU,{value:void 0,onValueChange:()=>{}}),sU=b.forwardRef((e,t)=>{const{value:r,onValueChange:n,...i}=e,s=lr(n);return l.jsx(Joe,{scope:e.__scopeMenu,value:r,onValueChange:s,children:l.jsx(fA,{...i,ref:t})})});sU.displayName=iU;var aU="MenuRadioItem",oU=b.forwardRef((e,t)=>{const{value:r,...n}=e,i=ele(aU,e.__scopeMenu),s=r===i.value;return l.jsx(lU,{scope:e.__scopeMenu,checked:s,children:l.jsx(db,{role:"menuitemradio","aria-checked":s,...n,ref:t,"data-state":pA(s),onSelect:fe(n.onSelect,()=>{var a;return(a=i.onValueChange)==null?void 0:a.call(i,r)},{checkForDefaultPrevented:!1})})})});oU.displayName=aU;var hA="MenuItemIndicator",[lU,tle]=Hc(hA,{checked:!1}),cU=b.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...i}=e,s=tle(hA,r);return l.jsx(yn,{present:n||tx(s.checked)||s.checked===!0,children:l.jsx(ke.span,{...i,ref:t,"data-state":pA(s.checked)})})});cU.displayName=hA;var rle="MenuSeparator",uU=b.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return l.jsx(ke.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});uU.displayName=rle;var nle="MenuArrow",dU=b.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,i=ub(r);return l.jsx(VO,{...i,...n,ref:t})});dU.displayName=nle;var ile="MenuSub",[cUe,fU]=Hc(ile),Lh="MenuSubTrigger",hU=b.forwardRef((e,t)=>{const r=qc(Lh,e.__scopeMenu),n=mg(Lh,e.__scopeMenu),i=fU(Lh,e.__scopeMenu),s=uA(Lh,e.__scopeMenu),a=b.useRef(null),{pointerGraceTimerRef:o,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},d=b.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return b.useEffect(()=>d,[d]),b.useEffect(()=>{const f=o.current;return()=>{window.clearTimeout(f),c(null)}},[o,c]),l.jsx(lA,{asChild:!0,...u,children:l.jsx(rU,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":gU(r.open),...e,ref:W0(t,i.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:fe(e.onPointerMove,Kp(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:fe(e.onPointerLeave,Kp(f=>{var p,g;d();const h=(p=r.content)==null?void 0:p.getBoundingClientRect();if(h){const m=(g=r.content)==null?void 0:g.dataset.side,v=m==="right",y=v?-5:5,x=h[v?"left":"right"],w=h[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x,y:h.bottom}],side:m}),window.clearTimeout(o.current),o.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:fe(e.onKeyDown,f=>{var p;const h=s.searchRef.current!=="";e.disabled||h&&f.key===" "||Loe[n.dir].includes(f.key)&&(r.onOpenChange(!0),(p=r.content)==null||p.focus(),f.preventDefault())})})})});hU.displayName=Lh;var pU="MenuSubContent",mU=b.forwardRef((e,t)=>{const r=Zz(ji,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,s=qc(ji,e.__scopeMenu),a=mg(ji,e.__scopeMenu),o=fU(pU,e.__scopeMenu),c=b.useRef(null),u=Ye(t,c);return l.jsx(qp.Provider,{scope:e.__scopeMenu,children:l.jsx(yn,{present:n||s.open,children:l.jsx(qp.Slot,{scope:e.__scopeMenu,children:l.jsx(dA,{id:o.contentId,"aria-labelledby":o.triggerId,...i,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;a.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:fe(e.onFocusOutside,d=>{d.target!==o.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:fe(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:fe(e.onKeyDown,d=>{var p;const f=d.currentTarget.contains(d.target),h=Foe[a.dir].includes(d.key);f&&h&&(s.onOpenChange(!1),(p=o.trigger)==null||p.focus(),d.preventDefault())})})})})})});mU.displayName=pU;function gU(e){return e?"open":"closed"}function tx(e){return e==="indeterminate"}function pA(e){return tx(e)?"indeterminate":e?"checked":"unchecked"}function sle(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function ale(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function ole(e,t,r){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let a=ale(e,Math.max(s,0));i.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function lle(e,t){const{x:r,y:n}=e;let i=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const o=t[s],c=t[a],u=o.x,d=o.y,f=c.x,h=c.y;d>n!=h>n&&r<(f-u)*(n-d)/(h-d)+u&&(i=!i)}return i}function cle(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return lle(r,t)}function Kp(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ule=Qz,dle=lA,fle=Jz,hle=eU,ple=fA,mle=tU,gle=db,vle=nU,yle=sU,xle=oU,ble=cU,wle=uU,Sle=dU,jle=hU,_le=mU,fb="DropdownMenu",[Ele]=Zr(fb,[Yz]),xn=Yz(),[Nle,vU]=Ele(fb),yU=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:i,defaultOpen:s,onOpenChange:a,modal:o=!0}=e,c=xn(t),u=b.useRef(null),[d,f]=Ra({prop:i,defaultProp:s??!1,onChange:a,caller:fb});return l.jsx(Nle,{scope:t,triggerId:Ls(),triggerRef:u,contentId:Ls(),open:d,onOpenChange:f,onOpenToggle:b.useCallback(()=>f(h=>!h),[f]),modal:o,children:l.jsx(ule,{...c,open:d,onOpenChange:f,dir:n,modal:o,children:r})})};yU.displayName=fb;var xU="DropdownMenuTrigger",bU=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...i}=e,s=vU(xU,r),a=xn(r);return l.jsx(dle,{asChild:!0,...a,children:l.jsx(ke.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...i,ref:W0(t,s.triggerRef),onPointerDown:fe(e.onPointerDown,o=>{!n&&o.button===0&&o.ctrlKey===!1&&(s.onOpenToggle(),s.open||o.preventDefault())}),onKeyDown:fe(e.onKeyDown,o=>{n||(["Enter"," "].includes(o.key)&&s.onOpenToggle(),o.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})})});bU.displayName=xU;var Ole="DropdownMenuPortal",wU=e=>{const{__scopeDropdownMenu:t,...r}=e,n=xn(t);return l.jsx(fle,{...n,...r})};wU.displayName=Ole;var SU="DropdownMenuContent",jU=b.forwardRef((e,t)=>
542{const{__scopeDropdownMenu:r,...n}=e,i=vU(SU,r),s=xn(r),a=b.useRef(!1);return l.jsx(hle,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...n,ref:t,onCloseAutoFocus:fe(e.onCloseAutoFocus,o=>{var c;a.current||(c=i.triggerRef.current)==null||c.focus(),a.current=!1,o.preventDefault()}),onInteractOutside:fe(e.onInteractOutside,o=>{const c=o.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!i.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jU.displayName=SU;var Ale="DropdownMenuGroup",Cle=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=xn(r);return l.jsx(ple,{...i,...n,ref:t})});Cle.displayName=Ale;var Ple="DropdownMenuLabel",_U=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=xn(r);return l.jsx(mle,{...i,...n,ref:t})});_U.displayName=Ple;var Tle="DropdownMenuItem",EU=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=xn(r);return l.jsx(gle,{...i,...n,ref:t})});EU.displayName=Tle;var kle="DropdownMenuCheckboxItem",NU=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=xn(r);return l.jsx(vle,{...i,...n,ref:t})});NU.displayName=kle;var Rle="DropdownMenuRadioGroup",$le=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=xn(r);return l.jsx(yle,{...i,...n,ref:t})});$le.displayName=Rle;var Ile="DropdownMenuRadioItem",OU=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=xn(r);return l.jsx(xle,{...i,...n,ref:t})});OU.displayName=Ile;var Mle="DropdownMenuItemIndicator",AU=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=xn(r);return l.jsx(ble,{...i,...n,ref:t})});AU.displayName=Mle;var Dle="DropdownMenuSeparator",CU=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=xn(r);return l.jsx(wle,{...i,...n,ref:t})});CU.displayName=Dle;var Lle="DropdownMenuArrow",Fle=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=xn(r);return l.jsx(Sle,{...i,...n,ref:t})});Fle.displayName=Lle;var Ble="DropdownMenuSubTrigger",PU=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=xn(r);return l.jsx(jle,{...i,...n,ref:t})});PU.displayName=Ble;var zle="DropdownMenuSubContent",TU=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=xn(r);return l.jsx(_le,{...i,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});TU.displayName=zle;var Ule=yU,Vle=bU,Wle=wU,kU=jU,RU=_U,$U=EU,IU=NU,MU=OU,DU=AU,LU=CU,FU=PU,BU=TU;const Hle=Ule,qle=Vle,Kle=b.forwardRef(({className:e,inset:t,children:r,...n},i)=>l.jsxs(FU,{ref:i,className:se("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[r,l.jsx(wee,{className:"ml-auto"})]}));Kle.displayName=FU.displayName;const Gle=b.forwardRef(({className:e,...t},r)=>l.jsx(BU,{ref:r,className:se("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));Gle.displayName=BU.displayName;const zU=b.forwardRef(({className:e,sideOffset:t=4,...r},n)=>l.jsx(Wle,{children:l.jsx(kU,{ref:n,sideOffset:t,className:se("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 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]:sli
542de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})}));zU.displayName=kU.displayName;const UU=b.forwardRef(({className:e,inset:t,...r},n)=>l.jsx($U,{ref:n,className:se("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r}));UU.displayName=$U.displayName;const Yle=b.forwardRef(({className:e,children:t,checked:r,...n},i)=>l.jsxs(IU,{ref:i,className:se("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(DU,{children:l.jsx(y5,{className:"h-4 w-4"})})}),t]}));Yle.displayName=IU.displayName;const Xle=b.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(MU,{ref:n,className:se("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(DU,{children:l.jsx(See,{className:"h-2 w-2 fill-current"})})}),t]}));Xle.displayName=MU.displayName;const VU=b.forwardRef(({className:e,inset:t,...r},n)=>l.jsx(RU,{ref:n,className:se("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));VU.displayName=RU.displayName;const WU=b.forwardRef(({className:e,...t},r)=>l.jsx(LU,{ref:r,className:se("-mx-1 my-1 h-px bg-muted",e),...t}));WU.displayName=LU.displayName;const HU=b.createContext(void 0),hv="aaoe_user";function Qle({children:e}){const[t,r]=b.useState(null),[n,i]=b.useState(!0);b.useEffect(()=>{const c=localStorage.getItem(hv);if(c)try{r(JSON.parse(c))}catch{localStorage.removeItem(hv)}i(!1)},[]);const o={user:t,loading:n,signIn:async(c,u)=>{try{const d={id:crypto.randomUUID(),email:c,user_metadata:{full_name:u}};try{(await fetch("/api/public-users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:u,email:c})})).ok||console.error("Error saving user to database")}catch(f){console.error("Error saving user to database:",f)}return localStorage.setItem(hv,JSON.stringify(d)),r(d),{error:null}}catch(d){return{error:{message:d.message||"An error occurred"}}}},signOut:async()=>{localStorage.removeItem(hv),r(null)}};return l.jsx(HU.Provider,{value:o,children:e})}function ol(){const e=b.useContext(HU);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}var gg=e=>e.type==="checkbox",zl=e=>e instanceof Date,_n=e=>e==null;const qU=e=>typeof e=="object";var xr=e=>!_n(e)&&!Array.isArray(e)&&qU(e)&&!zl(e),KU=e=>xr(e)&&e.target?gg(e.target)?e.target.checked:e.target.value:e,Zle=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,GU=(e,t)=>e.has(Zle(t)),Jle=e=>{const t=e.constructor&&e.constructor.prototype;return xr(t)&&t.hasOwnProperty("isPrototypeOf")},mA=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function _r(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(mA&&(e instanceof Blob||n))&&(r||xr(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!Jle(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=_r(e[i]));else return e;return t}var hb=e=>/^\w*$/.test(e),sr=e=>e===void 0,gA=e=>Array.isArray(e)?e.filter(Boolean):[],vA=e=>gA(e.replace(/["|']|\]/g,"").split(/\.|\[/)),xe=(e,t,r)=>{if(!t||!xr(e))return r;const n=(hb(t)?[t]:vA(t)).reduce((i,s)=>_n(i)?i:i[s],e);return sr(n)||n===e?sr(e[t])?r:e[t]:n},Fn=e=>typeof e=="boolean",Nt=(e,t,r)=>{let n=-1;const i=hb(t)?[t]:vA(t),s=i.length,a=s-1;for(;++n<s;){const o=i[n];let c=r;if(n!==a){const u=e[o];
542c=xr(u)||Array.isArray(u)?u:isNaN(+i[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=c,e=e[o]}};const rx={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Qi={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ra={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},yA=P.createContext(null);yA.displayName="HookFormContext";const pb=()=>P.useContext(yA),ece=e=>{const{children:t,...r}=e;return P.createElement(yA.Provider,{value:r},t)};var YU=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const a=s;return t._proxyFormState[a]!==Qi.all&&(t._proxyFormState[a]=!n||Qi.all),r&&(r[a]=!0),e[a]}});return i};const xA=typeof window<"u"?P.useLayoutEffect:P.useEffect;function tce(e){const t=pb(),{control:r=t.control,disabled:n,name:i,exact:s}=e||{},[a,o]=P.useState(r._formState),c=P.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return xA(()=>r._subscribe({name:i,formState:c.current,exact:s,callback:u=>{!n&&o({...r._formState,...u})}}),[i,n,s]),P.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),P.useMemo(()=>YU(a,r,c.current,!1),[a,r])}var Wn=e=>typeof e=="string",t_=(e,t,r,n,i)=>Wn(e)?(n&&t.watch.add(e),xe(r,e,i)):Array.isArray(e)?e.map(s=>(n&&t.watch.add(s),xe(r,s))):(n&&(t.watchAll=!0),r),r_=e=>_n(e)||!qU(e);function Zi(e,t,r=new WeakSet){if(r_(e)||r_(t))return e===t;if(zl(e)&&zl(t))return e.getTime()===t.getTime();const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const a=e[s];if(!i.includes(s))return!1;if(s!=="ref"){const o=t[s];if(zl(a)&&zl(o)||xr(a)&&xr(o)||Array.isArray(a)&&Array.isArray(o)?!Zi(a,o,r):a!==o)return!1}}return!0}function rce(e){const t=pb(),{control:r=t.control,name:n,defaultValue:i,disabled:s,exact:a,compute:o}=e||{},c=P.useRef(i),u=P.useRef(o),d=P.useRef(void 0),f=P.useRef(r),h=P.useRef(n);u.current=o;const[p,g]=P.useState(()=>{const S=r._getWatch(n,c.current);return u.current?u.current(S):S}),m=P.useCallback(S=>{const j=t_(n,r._names,S||r._formValues,!1,c.current);return u.current?u.current(j):j},[r._formValues,r._names,n]),v=P.useCallback(S=>{if(!s){const j=t_(n,r._names,S||r._formValues,!1,c.current);if(u.current){const E=u.current(j);Zi(E,d.current)||(g(E),d.current=E)}else g(j)}},[r._formValues,r._names,s,n]);xA(()=>((f.current!==r||!Zi(h.current,n))&&(f.current=r,h.current=n,v()),r._subscribe({name:n,formState:{values:!0},exact:a,callback:S=>{v(S.values)}})),[r,a,n,v]),P.useEffect(()=>r._removeUnmounted());const y=f.current!==r,x=h.current,w=P.useMemo(()=>{if(s)return null;const S=!y&&!Zi(x,n);return y||S?m():null},[s,y,n,x,m]);return w!==null?w:p}function nce(e){const t=pb(),{name:r,disabled:n,control:i=t.control,shouldUnregister:s,defaultValue:a}=e,o=GU(i._names.array,r),c=P.useMemo(()=>xe(i._formValues,r,xe(i._defaultValues,r,a)),[i,r,a]),u=rce({control:i,name:r,defaultValue:c,exact:!0}),d=tce({control:i,name:r,exact:!0}),f=P.useRef(e),h=P.useRef(void 0),p=P.useRef(i.register(r,{...e.rules,value:u,...Fn(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const g=P.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!xe(d.errors,r)},isDirty:{enumerable:!0,get:()=>!!xe(d.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!xe(d.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!xe(d.validatingFields,r)},error:{enumerable:!0,get:()=>xe(d.errors,r)}}),[d,r]),m=P.useCallback(w=>p.current.onChange({target:{value:KU(w),name:r},type:rx.CHANGE}),[r]),v=P.useCallback(()=>p.current.onBlur({target:{value:xe(i._formValues,r),name:r},type:rx.BLUR}),[r,i._formValues]),y=P.useCallback(w=>{const S=xe(i._fields,r);S&&w&&(S._f.ref={focus:()=>w.focus&&w.focus(),select:()=>w.select&&w.select(),setCustomValidity:j=>w.setCustomValidity(j),reportValidity:()=>w.reportValidity()})},[i._fields,r]),x=P.useMemo(()=>({name:r,value:u,...Fn(n)||d.disabled?{disabled:d.disabled||n}:{},onChange:m,onBlur:v,ref:y}),[r,n,d.disabled,m,v,y,u]);return P.useEffect(()=>{const w=i._options.shouldUnregister||s,S=h.current;S&&S!==r&&!o&&i.unregister(S),i.register(r,{...f.current.rules,...Fn(f.current.disabled)?{disabled:f.current.disabled}:{}});const j=(E,_)=>{const N=xe(i._fields,E);N&&N._f&&(N._f.mount=_)};if(j(r,!0),w){const E=_r(xe(i._options.defaultValues,r,f.current.defaultValue));Nt(i._defaultValues,r,E),sr(xe(i._formValues,r))&&Nt(i._formValues,r,E)}return!o&&i.register(r),h.current=r,()=>{(o?w&&!i._state.action:w)?i.unregister(r):j(r,!1)}},[r,i,o,s]),P.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),P.useMemo(()=>({field:x,formState:d,fieldState:g}),[x,d,g])}const ice=e=>e.render(nce(e));var XU=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},op=e=>Array.isArray(e)?e:[e],x2=()=>{let e=[];return{get observers(){return e},next:i=>{for(const s of e)s.next&&s.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(s=>s!==i)}}),unsubscribe:()=>{e=[]}}};function QU(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],s=t[n];if(i&&xr(i)&&s){const a=QU(i,s);xr(a)&&(r[n]=a)}else e[n]&&(r[n]=s)}return r}var nn=e=>xr(e)&&!Object.keys(e).length,bA=e=>e.type==="file",Ji=e=>typeof e=="function",nx=e=>{if(!mA)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ZU=e=>e.type==="select-multiple",wA=e=>e.type==="radio",sce=e=>wA(e)||gg(e),R1=e=>nx(e)&&e.isConnected;function ace(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=sr(e)?n++:e[t[n++]];return e}function oce(e){for(const t in e)if(e.hasOwnProperty(t)&&!sr(e[t]))return!1;return!0}function pr(e,t){const r=Array.isArray(t)?t:hb(t)?[t]:vA(t),n=r.length===1?e:ace(e,r),i=r.length-1,s=r[i];return n&&delete n[s],i!==0&&(xr(n)&&nn(n)||Array.isArray(n)&&oce(n))&&pr
vendor: 9,362 bytes, line 542
542(e,r.slice(0,-1)),e}var lce=e=>{for(const t in e)if(Ji(e[t]))return!0;return!1};function JU(e){return Array.isArray(e)||xr(e)&&!lce(e)}function n_(e,t={}){for(const r in e)JU(e[r])?(t[r]=Array.isArray(e[r])?[]:{},n_(e[r],t[r])):sr(e[r])||(t[r]=!0);return t}function bu(e,t,r){r||(r=n_(t));for(const n in e)JU(e[n])?sr(t)||r_(r[n])?r[n]=n_(e[n],Array.isArray(e[n])?[]:{}):bu(e[n],_n(t)?{}:t[n],r[n]):r[n]=!Zi(e[n],t[n]);return r}const b2={value:!1,isValid:!1},w2={value:!0,isValid:!0};var e6=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!sr(e[0].attributes.value)?sr(e[0].value)||e[0].value===""?w2:{value:e[0].value,isValid:!0}:w2:b2}return b2},t6=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>sr(e)?e:t?e===""?NaN:e&&+e:r&&Wn(e)?new Date(e):n?n(e):e;const S2={isValid:!1,value:null};var r6=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,S2):S2;function j2(e){const t=e.ref;return bA(t)?t.files:wA(t)?r6(e.refs).value:ZU(t)?[...t.selectedOptions].map(({value:r})=>r):gg(t)?e6(e.refs).value:t6(sr(t.value)?e.ref.value:t.value,e)}var cce=(e,t,r,n)=>{const i={};for(const s of e){const a=xe(t,s);a&&Nt(i,s,a._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},ix=e=>e instanceof RegExp,hh=e=>sr(e)?e:ix(e)?e.source:xr(e)?ix(e.value)?e.value.source:e.value:e,_2=e=>({isOnSubmit:!e||e===Qi.onSubmit,isOnBlur:e===Qi.onBlur,isOnChange:e===Qi.onChange,isOnAll:e===Qi.all,isOnTouch:e===Qi.onTouched});const E2="AsyncFunction";var uce=e=>!!e&&!!e.validate&&!!(Ji(e.validate)&&e.validate.constructor.name===E2||xr(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===E2)),dce=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),N2=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const lp=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const s=xe(e,i);if(s){const{_f:a,...o}=s;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!n)return!0;if(a.ref&&t(a.ref,a.name)&&!n)return!0;if(lp(o,t))break}else if(xr(o)&&lp(o,t))break}}};function O2(e,t,r){const n=xe(e,r);if(n||hb(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const s=i.join("."),a=xe(t,s),o=xe(e,s);if(a&&!Array.isArray(a)&&r!==s)return{name:r};if(o&&o.type)return{name:s,error:o};if(o&&o.root&&o.root.type)return{name:`${s}.root`,error:o.root};i.pop()}return{name:r}}var fce=(e,t,r,n)=>{r(e);const{name:i,...s}=e;return nn(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(a=>t[a]===(!n||Qi.all))},hce=(e,t,r)=>!e||!t||e===t||op(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),pce=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,mce=(e,t)=>!gA(xe(e,t)).length&&pr(e,t),gce=(e,t,r)=>{const n=op(xe(e,r));return Nt(n,"root",t[r]),Nt(e,r,n),e};function A2(e,t,r="validate"){if(Wn(e)||Array.isArray(e)&&e.every(Wn)||Fn(e)&&!e)return{type:r,message:Wn(e)?e:"",ref:t}}var lu=e=>xr(e)&&!ix(e)?e:{value:e,message:""},C2=async(e,t,r,n,i,s)=>{const{ref:a,refs:o,required:c,maxLength:u,minLength:d,min:f,max:h,pattern:p,validate:g,name:m,valueAsNumber:v,mount:y}=e._f,x=xe(r,m);if(!y||t.has(m))return{};const w=o?o[0]:a,S=$=>{i&&w.reportValidity&&(w.setCustomValidity(Fn($)?"":$||""),w.reportValidity())},j={},E=wA(a),_=gg(a),N=E||_,O=(v||bA(a))&&sr(a.value)&&sr(x)||nx(a)&&a.value===""||x===""||Array.isArray(x)&&!x.length,C=XU.bind(null,m,n,j),k=($,D,A,R=ra.maxLength,T=ra.minLength)=>{const L=$?D:A;j[m]={type:$?R:T,message:L,ref:a,...C($?R:T,L)}};if(s?!Array.isArray(x)||!x.length:c&&(!N&&(O||_n(x))||Fn(x)&&!x||_&&!e6(o).isValid||E&&!r6(o).isValid)){const{value:$,message:D}=Wn(c)?{value:!!c,message:c}:lu(c);if($&&(j[m]={type:ra.required,message:D,ref:w,...C(ra.required,D)},!n))return S(D),j}if(!O&&(!_n(f)||!_n(h))){let $,D;const A=lu(h),R=lu(f);if(!_n(x)&&!isNaN(x)){const T=a.valueAsNumber||x&&+x;_n(A.value)||($=T>A.value),_n(R.value)||(D=T<R.value)}else{const T=a.valueAsDate||new Date(x),L=F=>new Date(new Date().toDateString()+" "+F),M=a.type=="time",I=a.type=="week";Wn(A.value)&&x&&($=M?L(x)>L(A.value):I?x>A.value:T>new Date(A.value)),Wn(R.value)&&x&&(D=M?L(x)<L(R.value):I?x<R.value:T<new Date(R.value))}if(($||D)&&(k(!!$,A.message,R.message,ra.max,ra.min),!n))return S(j[m].message),j}if((u||d)&&!O&&(Wn(x)||s&&Array.isArray(x))){const $=lu(u),D=lu(d),A=!_n($.value)&&x.length>+$.value,R=!_n(D.value)&&x.length<+D.value;if((A||R)&&(k(A,$.message,D.message),!n))return S(j[m].message),j}if(p&&!O&&Wn(x)){const{value:$,message:D}=lu(p);if(ix($)&&!x.match($)&&(j[m]={type:ra.pattern,message:D,ref:a,...C(ra.pattern,D)},!n))return S(D),j}if(g){if(Ji(g)){const $=await g(x,r),D=A2($,w);if(D&&(j[m]={...D,...C(ra.validate,D.message)},!n))return S(D.message),j}else if(xr(g)){let $={};for(const D in g){if(!nn($)&&!n)break;const A=A2(await g[D](x,r),w,D);A&&($={...A,...C(D,A.message)},S(A.message),n&&(j[m]=$))}if(!nn($)&&(j[m]={ref:w,...$},!n))return j}}return S(!0),j};const vce={mode:Qi.onSubmit,reValidateMode:Qi.onChange,shouldFocusError:!0};function yce(e={}){let t={...vce,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ji(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},i=xr(t.defaultValues)||xr(t.values)?_r(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:_r(i),a={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const h={array:x2(),state:x2()},p=t.criteriaMode===Qi.all,g=B=>H=>{clearTimeout(u),u=setTimeout(B,H)},m=async B=>{if(!t.disabled&&(d.isValid||f.isValid||B)){const H=t.resolver?nn((await _()).errors):await O(n,!0);H!==r.isValid&&h.state.next({isValid:H})}},v=(B,H)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((B||Array.from(o.mount)).forEach(K=>{K&&(H?Nt(r.validatingFields,K,H):pr(r.validatingFields,K))}),h.state.next({validatingFields:r.validatingFields,isValidating:!nn(r.validatingFields)}))},y=(B,H=[],K,me,oe=!0,ae=!0)=>{if(me&&K&&!t.disabled){if(a.action=!0,ae&&Array.isArray(xe(n,B))){const Ce=K(xe(n,B),me.argA,me.argB);oe&&Nt(n,B,Ce)}if(ae&&Array.isArray(xe(r.errors,B))){const Ce=K(xe(r.errors,B),me.argA,me.argB);oe&&Nt(r.errors,B,Ce),mce(r.errors,B)}if((d.touchedFields||f.touchedFields)&&ae&&Array.isArray(xe(r.touchedFields,B))){const Ce=K(xe(r.touchedFields,B),me.argA,me.argB);oe&&Nt(r.touchedFields,B,Ce)}(d.dirtyFields||f.dirtyFields)&&(r.dirtyFields=bu(i,s)),h.state.next({name:B,isDirty:k(B,H),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Nt(s,B,H)},x=(B,H)=>{Nt(r.errors,B,H),h.state.next({errors:r.errors})},w=B=>{r.errors=B,h.state.next({errors:r.errors,isValid:!1})},S=(B,H,K,me)=>{const oe=xe(n,B);if(oe){const ae=xe(s,B,sr(K)?xe(i,B):K);sr(ae)||me&&me.defaultChecked||H?Nt(s,B,H?ae:j2(oe._f)):A(B,ae),a.mount&&m()}},j=(B,H,K,me,oe)=>{let ae=!1,Ce=!1;const st={name:B};if(!t.disabled){if(!K||me){(d.isDirty||f.isDirty)&&(Ce=r.isDirty,r.isDirty=st.isDirty=k(),ae=Ce!==st.isDirty);const ft=Zi(xe(i,B),H);Ce=!!xe(r.dirtyFields,B),ft?pr(r.dirtyFields,B):Nt(r.dirtyFields,B,!0),st.dirtyFields=r.dirtyFields,ae=ae||(d.dirtyFields||f.dirtyFields)&&Ce!==!ft}if(K){const ft=xe(r.touchedFields,B);ft||(Nt(r.touchedFields,B,K),st.touchedFields=r.touchedFields,ae=ae||(d.touchedFields||f.touchedFields)&&ft!==K)}ae&&oe&&h.state.next(st)}return ae?st:{}},E=(B,H,K,me)=>{const oe=xe(r.errors,B),ae=(d.isValid||f.isValid)&&Fn(H)&&r.isValid!==H;if(t.delayError&&K?(c=g(()=>x(B,K)),c(t.delayError)):(clearTimeout(u),c=null,K?Nt(r.errors,B,K):pr(r.errors,B)),(K?!Zi(oe,K):oe)||!nn(me)||ae){const Ce={...me,...ae&&Fn(H)?{isValid:H}:{},errors:r.errors,name:B};r={...r,...Ce},h.state.next(Ce)}},_=async B=>{v(B,!0);const H=await t.resolver(s,t.context,cce(B||o.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return v(B),H},N=async B=>{const{errors:H}=await _(B);if(B)for(const K of B){const me=xe(H,K);me?Nt(r.errors,K,me):pr(r.errors,K)}else r.errors=H;return H},O=async(B,H,K={valid:!0})=>{for(const me in B){const oe=B[me];if(oe){const{_f:ae,...Ce}=oe;if(ae){const st=o.array.has(ae.name),ft=oe._f&&uce(oe._f);ft&&d.validatingFields&&v([ae.name],!0);const rr=await C2(oe,o.disabled,s,p,t.shouldUseNativeValidation&&!H,st);if(ft&&d.validatingFields&&v([ae.name]),rr[ae.name]&&(K.valid=!1,H))break;!H&&(xe(rr,ae.name)?st?gce(r.errors,rr,ae.name):Nt(r.errors,ae.name,rr[ae.name]):pr(r.errors,ae.name))}!nn(Ce)&&await O(Ce,H,K)}}return K.valid},C=()=>{for(const B of o.unMount){const H=xe(n,B);H&&(H._f.refs?H._f.refs.every(K=>!R1(K)):!R1(H._f.ref))&&re(B)}o.unMount=new Set},k=(B,H)=>!t.disabled&&(B&&H&&Nt(s,B,H),!Zi(F(),i)),$=(B,H,K)=>t_(B,o,{...a.mount?s:sr(H)?i:Wn(B)?{[B]:H}:H},K,H),D=B=>gA(xe(a.mount?s:i,B,t.shouldUnregister?xe(i,B,[]):[])),A=(B,H,K={})=>{const me=xe(n,B);let oe=H;if(me){const ae=me._f;ae&&(!ae.disabled&&Nt(s,B,t6(H,ae)),oe=nx(ae.ref)&&_n(H)?"":H,ZU(ae.ref)?[...ae.ref.options].forEac
vendor: 9,408 bytes, line 542
542h(Ce=>Ce.selected=oe.includes(Ce.value)):ae.refs?gg(ae.ref)?ae.refs.forEach(Ce=>{(!Ce.defaultChecked||!Ce.disabled)&&(Array.isArray(oe)?Ce.checked=!!oe.find(st=>st===Ce.value):Ce.checked=oe===Ce.value||!!oe)}):ae.refs.forEach(Ce=>Ce.checked=Ce.value===oe):bA(ae.ref)?ae.ref.value="":(ae.ref.value=oe,ae.ref.type||h.state.next({name:B,values:_r(s)})))}(K.shouldDirty||K.shouldTouch)&&j(B,oe,K.shouldTouch,K.shouldDirty,!0),K.shouldValidate&&I(B)},R=(B,H,K)=>{for(const me in H){if(!H.hasOwnProperty(me))return;const oe=H[me],ae=B+"."+me,Ce=xe(n,ae);(o.array.has(B)||xr(oe)||Ce&&!Ce._f)&&!zl(oe)?R(ae,oe,K):A(ae,oe,K)}},T=(B,H,K={})=>{const me=xe(n,B),oe=o.array.has(B),ae=_r(H);Nt(s,B,ae),oe?(h.array.next({name:B,values:_r(s)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&K.shouldDirty&&h.state.next({name:B,dirtyFields:bu(i,s),isDirty:k(B,ae)})):me&&!me._f&&!_n(ae)?R(B,ae,K):A(B,ae,K),N2(B,o)&&h.state.next({...r,name:B}),h.state.next({name:a.mount?B:void 0,values:_r(s)})},L=async B=>{a.mount=!0;const H=B.target;let K=H.name,me=!0;const oe=xe(n,K),ae=ft=>{me=Number.isNaN(ft)||zl(ft)&&isNaN(ft.getTime())||Zi(ft,xe(s,K,ft))},Ce=_2(t.mode),st=_2(t.reValidateMode);if(oe){let ft,rr;const $n=H.type?j2(oe._f):KU(B),Ct=B.type===rx.BLUR||B.type===rx.FOCUS_OUT,ne=!dce(oe._f)&&!t.resolver&&!xe(r.errors,K)&&!oe._f.deps||pce(Ct,xe(r.touchedFields,K),r.isSubmitted,st,Ce),Pe=N2(K,o,Ct);Nt(s,K,$n),Ct?(!H||!H.readOnly)&&(oe._f.onBlur&&oe._f.onBlur(B),c&&c(0)):oe._f.onChange&&oe._f.onChange(B);const Gt=j(K,$n,Ct),$i=!nn(Gt)||Pe;if(!Ct&&h.state.next({name:K,type:B.type,values:_r(s)}),ne)return(d.isValid||f.isValid)&&(t.mode==="onBlur"?Ct&&m():Ct||m()),$i&&h.state.next({name:K,...Pe?{}:Gt});if(!Ct&&Pe&&h.state.next({...r}),t.resolver){const{errors:si}=await _([K]);if(ae($n),me){const ai=O2(r.errors,n,K),Xa=O2(si,n,ai.name||K);ft=Xa.error,K=Xa.name,rr=nn(si)}}else v([K],!0),ft=(await C2(oe,o.disabled,s,p,t.shouldUseNativeValidation))[K],v([K]),ae($n),me&&(ft?rr=!1:(d.isValid||f.isValid)&&(rr=await O(n,!0)));me&&(oe._f.deps&&(!Array.isArray(oe._f.deps)||oe._f.deps.length>0)&&I(oe._f.deps),E(K,rr,ft,Gt))}},M=(B,H)=>{if(xe(r.errors,H)&&B.focus)return B.focus(),1},I=async(B,H={})=>{let K,me;const oe=op(B);if(t.resolver){const ae=await N(sr(B)?B:oe);K=nn(ae),me=B?!oe.some(Ce=>xe(ae,Ce)):K}else B?(me=(await Promise.all(oe.map(async ae=>{const Ce=xe(n,ae);return await O(Ce&&Ce._f?{[ae]:Ce}:Ce)}))).every(Boolean),!(!me&&!r.isValid)&&m()):me=K=await O(n);return h.state.next({...!Wn(B)||(d.isValid||f.isValid)&&K!==r.isValid?{}:{name:B},...t.resolver||!B?{isValid:K}:{},errors:r.errors}),H.shouldFocus&&!me&&lp(n,M,B?oe:o.mount),me},F=(B,H)=>{let K={...a.mount?s:i};return H&&(K=QU(H.dirtyFields?r.dirtyFields:r.touchedFields,K)),sr(B)?K:Wn(B)?xe(K,B):B.map(me=>xe(K,me))},U=(B,H)=>({invalid:!!xe((H||r).errors,B),isDirty:!!xe((H||r).dirtyFields,B),error:xe((H||r).errors,B),isValidating:!!xe(r.validatingFields,B),isTouched:!!xe((H||r).touchedFields,B)}),V=B=>{B&&op(B).forEach(H=>pr(r.errors,H)),h.state.next({errors:B?r.errors:{}})},G=(B,H,K)=>{const me=(xe(n,B,{_f:{}})._f||{}).ref,oe=xe(r.errors,B)||{},{ref:ae,message:Ce,type:st,...ft}=oe;Nt(r.errors,B,{...ft,...H,ref:me}),h.state.next({name:B,errors:r.errors,isValid:!1}),K&&K.shouldFocus&&me&&me.focus&&me.focus()},Z=(B,H)=>Ji(B)?h.state.subscribe({next:K=>"values"in K&&B($(void 0,H),K)}):$(B,H,!0),he=B=>h.state.subscribe({next:H=>{hce(B.name,H.name,B.exact)&&fce(H,B.formState||d,We,B.reRenderRoot)&&B.callback({values:{...s},...r,...H,defaultValues:i})}}).unsubscribe,ve=B=>(a.mount=!0,f={...f,...B.formState},he({...B,formState:f})),re=(B,H={})=>{for(const K of B?op(B):o.mount)o.mount.delete(K),o.array.delete(K),H.keepValue||(pr(n,K),pr(s,K)),!H.keepError&&pr(r.errors,K),!H.keepDirty&&pr(r.dirtyFields,K),!H.keepTouched&&pr(r.touchedFields,K),!H.keepIsValidating&&pr(r.validatingFields,K),!t.shouldUnregister&&!H.keepDefaultValue&&pr(i,K);h.state.next({values:_r(s)}),h.state.next({...r,...H.keepDirty?{isDirty:k()}:{}}),!H.keepIsValid&&m()},ge=({disabled:B,name:H})=>{(Fn(B)&&a.mount||B||o.disabled.has(H))&&(B?o.disabled.add(H):o.disabled.delete(H))},Y=(B,H={})=>{let K=xe(n,B);const me=Fn(H.disabled)||Fn(t.disabled);return Nt(n,B,{...K||{},_f:{...K&&K._f?K._f:{ref:{name:B}},name:B,mount:!0,...H}}),o.mount.add(B),K?ge({disabled:Fn(H.disabled)?H.disabled:t.disabled,name:B}):S(B,!0,H.value),{...me?{disabled:H.disabled||t.disabled}:{},...t.progressive?{required:!!H.required,min:hh(H.min),max:hh(H.max),minLength:hh(H.minLength),maxLength:hh(H.maxLength),pattern:hh(H.pattern)}:{},name:B,onChange:L,onBlur:L,ref:oe=>{if(oe){Y(B,H),K=xe(n,B);const ae=sr(oe.value)&&oe.querySelectorAll&&oe.querySelectorAll("input,select,textarea")[0]||oe,Ce=sce(ae),st=K._f.refs||[];if(Ce?st.find(ft=>ft===ae):ae===K._f.ref)return;Nt(n,B,{_f:{...K._f,...Ce?{refs:[...st.filter(R1),ae,...Array.isArray(xe(i,B))?[{}]:[]],ref:{type:ae.type,name:B}}:{ref:ae}}}),S(B,!1,void 0,ae)}else K=xe(n,B,{}),K._f&&(K._f.mount=!1),(t.shouldUnregister||H.shouldUnregister)&&!(GU(o.array,B)&&a.action)&&o.unMount.add(B)}}},ee=()=>t.shouldFocusError&&lp(n,M,o.mount),q=B=>{Fn(B)&&(h.state.next({disabled:B}),lp(n,(H,K)=>{const me=xe(n,K);me&&(H.disabled=me._f.disabled||B,Array.isArray(me._f.refs)&&me._f.refs.forEach(oe=>{oe.disabled=me._f.disabled||B}))},0,!1))},W=(B,H)=>async K=>{let me;K&&(K.preventDefault&&K.preventDefault(),K.persist&&K.persist());let oe=_r(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:ae,values:Ce}=await _();r.errors=ae,oe=_r(Ce)}else await O(n);if(o.disabled.size)for(const ae of o.disabled)pr(oe,ae);if(pr(r.errors,"root"),nn(r.errors)){h.state.next({errors:{}});try{await B(oe,K)}catch(ae){me=ae}}else H&&await H({...r.errors},K),ee(),setTimeout(ee);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:nn(r.errors)&&!me,submitCount:r.submitCount+1,errors:r.errors}),me)throw me},Fe=(B,H={})=>{xe(n,B)&&(sr(H.defaultValue)?T(B,_r(xe(i,B))):(T(B,H.defaultValue),Nt(i,B,_r(H.defaultValue))),H.keepTouched||pr(r.touchedFields,B),H.keepDirty||(pr(r.dirtyFields,B),r.isDirty=H.defaultValue?k(B,_r(xe(i,B))):k()),H.keepError||(pr(r.errors,B),d.isValid&&m()),h.state.next({...r}))},Ae=(B,H={})=>{const K=B?_r(B):i,me=_r(K),oe=nn(B),ae=oe?i:me;if(H.keepDefaultValues||(i=K),!H.keepValues){if(H.keepDirtyValues){const Ce=new Set([...o.mount,...Object.keys(bu(i,s))]);for(const st of Array.from(Ce))xe(r.dirtyFields,st)?Nt(ae,st,xe(s,st)):T(st,xe(ae,st))}else{if(mA&&sr(B))for(const Ce of o.mount){const st=xe(n,Ce);if(st&&st._f){const ft=Array.isArray(st._f.refs)?st._f.refs[0]:st._f.ref;if(nx(ft)){const rr=ft.closest("form");if(rr){rr.reset();break}}}}if(H.keepFieldsRef)for(const Ce of o.mount)T(Ce,xe(ae,Ce));else n={}}s=t.shouldUnregister?H.keepDefaultValues?_r(i):{}:_r(ae),h.array.next({values:{...ae}}),h.state.next({values:{...ae}})}o={mount:H.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!H.keepIsValid||!!H.keepDirtyValues||!t.shouldUnregister&&!nn(ae),a.watch=!!t.shouldUnregister,h.state.next({submitCount:H.keepSubmitCount?r.submitCount:0,isDirty:oe?!1:H.keepDirty?r.isDirty:!!(H.keepDefaultValues&&!Zi(B,i)),isSubmitted:H.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:oe?{}:H.keepDirtyValues?H.keepDefaultValues&&s?bu(i,s):r.dirtyFields:H.keepDefaultValues&&B?bu(i,B):H.keepDirty?r.dirtyFields:{},touchedFields:H.keepTouched?r.touchedFields:{},errors:H.keepErrors?r.errors:{},isSubmitSuccessful:H.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Ue=(B,H)=>Ae(Ji(B)?B(s):B,H),nt=(B,H={})=>{const K=xe(n,B),me=K&&K._f;if(me){const oe=me.refs?me.refs[0]:me.ref;oe.focus&&(oe.focus(),H.shouldSelect&&Ji(oe.select)&&oe.select())}},We=B=>{r={...r,...B}},St={control:{register:Y,unregister:re,getFieldState:U,handleSubmit:W,setError:G,_subscribe:he,_runSchema:_,_focusError:ee,_getWatch:$,_getDirty:k,_setValid:m,_setFieldArray:y,_setDisabledField:ge,_setErrors:w,_getFieldArray:D,_reset:Ae,_resetDefaultValues:()=>Ji(t.defaultValues)&&t.defaultValues().then(B=>{Ue(B,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:C,_disableForm:q,_subjects:h,_proxyFormState:d,get _fields(){return n},get _formValues(){return s},get _state(){return a},set _state(B){a=B},get _defaultValues(){return i},get _names(){return o},set _names(B){o=B},get _formState(){return r},get _options(){return t},set _options(B){t={...t,...B}}},subscribe:ve,trigger:I,register:Y,handleSubmit:W,watch:Z,setValue:T,getValues:F,reset:Ue,resetField:Fe,clearErrors:V,unregister:re,setError:G,setFocus:nt,getFieldState:U};return{...St,formControl:St}}function mb(e={}){const t=P.useRef(void 0),r=P.useRef(void 0),[n,i]=P.useState({isDirty:!1,isValidating:!1,isLoading:Ji(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Ji(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Ji(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...o}=yce(e);t.current={...o,formState:n}}const s=t.current.control;return s._options=e,xA(()=>{const a=s._subscribe({formState:s._proxyFormState,callback:()=>i({...s._formState}
vendor: 4,313 bytes, line 542
542),reRenderRoot:!0});return i(o=>({...o,isReady:!0})),s._formState.isReady=!0,a},[s]),P.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),P.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),P.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),P.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),P.useEffect(()=>{if(s._proxyFormState.isDirty){const a=s._getDirty();a!==n.isDirty&&s._subjects.state.next({isDirty:a})}},[s,n.isDirty]),P.useEffect(()=>{e.values&&!Zi(e.values,r.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),r.current=e.values,i(a=>({...a}))):s._resetDefaultValues()},[s,e.values]),P.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=YU(n,s),t.current}const P2=(e,t,r)=>{if(e&&"reportValidity"in e){const n=xe(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},n6=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?P2(n.ref,r,e):n.refs&&n.refs.forEach(i=>P2(i,r,e))}},xce=(e,t)=>{t.shouldUseNativeValidation&&n6(e,t);const r={};for(const n in e){const i=xe(t.fields,n),s=Object.assign(e[n]||{},{ref:i&&i.ref});if(bce(t.names||Object.keys(e),n)){const a=Object.assign({},xe(r,n));Nt(a,"root",s),Nt(r,n,a)}else Nt(r,n,s)}return r},bce=(e,t)=>e.some(r=>r.startsWith(t+"."));var wce=function(e,t){for(var r={};e.length;){var n=e[0],i=n.code,s=n.message,a=n.path.join(".");if(!r[a])if("unionErrors"in n){var o=n.unionErrors[0].errors[0];r[a]={message:o.message,type:o.code}}else r[a]={message:s,type:i};if("unionErrors"in n&&n.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var c=r[a].types,u=c&&c[n.code];r[a]=XU(a,t,r,i,u?[].concat(u,n.message):n.message)}e.shift()}return r},gb=function(e,t,r){return r===void 0&&(r={}),function(n,i,s){try{return Promise.resolve(function(a,o){try{var c=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(u){return s.shouldUseNativeValidation&&n6({},s),{errors:{},values:r.raw?n:u}})}catch(u){return o(u)}return c&&c.then?c.then(void 0,o):c}(0,function(a){if(function(o){return Array.isArray(o==null?void 0:o.errors)}(a))return{values:{},errors:xce(wce(a.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw a}))}catch(a){return Promise.reject(a)}}},bt;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{const s={};for(const a of i)s[a]=a;return s},e.getValidEnumValues=i=>{const s=e.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(const o of s)a[o]=i[o];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(s){return i[s]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},e.find=(i,s)=>{for(const a of i)if(s(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}e.joinValues=n,e.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(bt||(bt={}));var T2;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(T2||(T2={}));const $e=bt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),oo=e=>{switch(typeof e){case"undefined":return $e.undefined;case"string":return $e.string;case"number":return Number.isNaN(e)?$e.nan:$e.number;case"boolean":return $e.boolean;case"function":return $e.function;case"bigint":return $e.bigint;case"symbol":return $e.symbol;case"object":return Array.isArray(e)?$e.array:e===null?$e.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?$e.promise:typeof Map<"u"&&e instanceof Map?$e.map:typeof Set<"u"&&e instanceof Set?$e.set:typeof Date<"u"&&e instanceof Date?$e.date:$e.object;default:return $e.unknown}}
vendor: 6,039 bytes, line 542
542,pe=bt.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"]);class Ma extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(s){return s.message},n={_errors:[]},i=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let o=n,c=0;for(;c<a.path.length;){const u=a.path[c];c===a.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(r(a))):o[u]=o[u]||{_errors:[]},o=o[u],c++}}};return i(this),n}static assert(t){if(!(t instanceof Ma))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,bt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const i of this.issues)if(i.path.length>0){const s=i.path[0];r[s]=r[s]||[],r[s].push(t(i))}else n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Ma.create=e=>new Ma(e);const i_=(e,t)=>{let r;switch(e.code){case pe.invalid_type:e.received===$e.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case pe.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,bt.jsonStringifyReplacer)}`;break;case pe.unrecognized_keys:r=`Unrecognized key(s) in object: ${bt.joinValues(e.keys,", ")}`;break;case pe.invalid_union:r="Invalid input";break;case pe.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${bt.joinValues(e.options)}`;break;case pe.invalid_enum_value:r=`Invalid enum value. Expected ${bt.joinValues(e.options)}, received '${e.received}'`;break;case pe.invalid_arguments:r="Invalid function arguments";break;case pe.invalid_return_type:r="Invalid function return type";break;case pe.invalid_date:r="Invalid date";break;case pe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:bt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case pe.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case pe.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case pe.custom:r="Invalid input";break;case pe.invalid_intersection_types:r="Intersection results could not be merged";break;case pe.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case pe.not_finite:r="Number must be finite";break;default:r=t.defaultError,bt.assertNever(e)}return{message:r}};let Sce=i_;function jce(){return Sce}const _ce=e=>{const{data:t,path:r,errorMaps:n,issueData:i}=e,s=[...r,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o="";const c=n.filter(u=>!!u).slice().reverse();for(const u of c)o=u(a,{data:t,defaultError:o}).message;return{...i,path:s,message:o}};function we(e,t){const r=jce(),n=_ce({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===i_?void 0:i_].filter(i=>!!i)});e.common.issues.push(n)}class Zn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const i of r){if(i.status==="aborted")return et;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const i of r){const s=await i.key,a=await i.value;n.push({key:s,value:a})}return Zn.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const i of r){const{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return et;s.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[s.value]=a.value)}return{status:t.value,value:n}}}const et=Object.freeze({status:"aborted"}),Fh=e=>({status:"dirty",value:e}),Pi=e=>
vendor: 5,882 bytes, line 542
542({status:"valid",value:e}),k2=e=>e.status==="aborted",R2=e=>e.status==="dirty",$d=e=>e.status==="valid",sx=e=>typeof Promise<"u"&&e instanceof Promise;var Me;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Me||(Me={}));class Zo{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const $2=(e,t)=>{if($d(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Ma(e.common.issues);return this._error=r,this._error}}};function ct(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,o)=>{const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??o.defaultError}:typeof o.data>"u"?{message:c??n??o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:c??r??o.defaultError}},description:i}}class vt{get description(){return this._def.description}_getType(t){return oo(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:oo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Zn,ctx:{common:t.parent.common,data:t.data,parsedType:oo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(sx(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:oo(t)},i=this._parseSync({data:t,path:n.path,parent:n});return $2(n,i)}"~validate"(t){var n,i;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:oo(t)};if(!this["~standard"].async)try{const s=this._parseSync({data:t,path:[],parent:r});return $d(s)?{value:s.value}:{issues:r.common.issues}}catch(s){(i=(n=s==null?void 0:s.message)==null?void 0:n.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(s=>$d(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:oo(t)},i=this._parse({data:t,path:n.path,parent:n}),s=await(sx(i)?i:Promise.resolve(i));return $2(n,s)}refine(t,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{const a=t(i),o=()=>s.addIssue({code:pe.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new Dd({schema:this,typeName:tt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Uo.create(this,this._def)}nullable(){return Ld.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Bs.create(this)}promise(){return cx.create(this,this._def)}or(t){return ox.create([this,t],this._def)}and(t){return lx.create(this,t,this._def)}transform(t){return new Dd({...ct(this._def),schema:this,typeName:tt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new a_({...ct(this._def),innerType:this,defaultValue:r,typeName:tt.ZodDefault})}brand(){return new Kce({typeName:tt.ZodBranded,type:this,...ct(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new o_({...ct(this._def),innerType:this,catchValue:r,typeName:tt.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return SA.create(this,t)}readonly(){return l_.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ece=/^c[^\s-]{8,}
vendor: 4,684 bytes, line 542
542$/i,Nce=/^[0-9a-z]+$/,Oce=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ace=/^[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,Cce=/^[a-z0-9_-]{21}$/i,Pce=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Tce=/^[-+]?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)?)??$/,kce=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Rce="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let $1;const $ce=/^(?:(?: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])$/,Ice=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Mce=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Dce=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Lce=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Fce=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,i6="((\\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])))",Bce=new RegExp(`^${i6}$`);function s6(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function zce(e){return new RegExp(`^${s6(e)}$`)}function Uce(e){let t=`${i6}T${s6(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Vce(e,t){return!!((t==="v4"||!t)&&$ce.test(e)||(t==="v6"||!t)&&Mce.test(e))}function Wce(e,t){if(!Pce.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function Hce(e,t){return!!((t==="v4"||!t)&&Ice.test(e)||(t==="v6"||!t)&&Dce.test(e))}class Co extends vt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==$e.string){const s=this._getOrReturnCtx(t);return we(s,{code:pe.invalid_type,expected:$e.string,received:s.parsedType}),et}const n=new Zn;let i;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(i=this._getOrReturnCtx(t,i),we(i,{code:pe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")t.data.length>s.value&&(i=this._getOrReturnCtx(t,i),we(i,{code:pe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const a=t.data.length>s.value,o=t.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(t,i),a?we(i,{code:pe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&we(i,{code:pe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")kce.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"email",code:pe.invalid_string,message:s.message}),n.dirty());
vendor: 6,003 bytes, line 542
542else if(s.kind==="emoji")$1||($1=new RegExp(Rce,"u")),$1.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"emoji",code:pe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Ace.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"uuid",code:pe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")Cce.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"nanoid",code:pe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")Ece.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"cuid",code:pe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Nce.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"cuid2",code:pe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Oce.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"ulid",code:pe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),we(i,{validation:"url",code:pe.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"regex",code:pe.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(t,i),we(i,{code:pe.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(i=this._getOrReturnCtx(t,i),we(i,{code:pe.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(i=this._getOrReturnCtx(t,i),we(i,{code:pe.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Uce(s).test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:pe.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Bce.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:pe.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?zce(s).test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:pe.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?Tce.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"duration",code:pe.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Vce(t.data,s.version)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"ip",code:pe.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?Wce(t.data,s.alg)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"jwt",code:pe.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Hce(t.data,s.version)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"cidr",code:pe.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?Lce.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"base64",code:pe.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?Fce.test(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{validation:"base64url",code:pe.invalid_string,message:s.message}),n.dirty()):bt.assertNever(s);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:pe.invalid_string,...Me.errToObj(n)})}_addCheck(t){return new Co({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Me.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Me.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Me.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Me.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Me.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Me.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Me.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Me.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Me.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Me.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Me.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Me.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Me.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Me.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Me.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Me.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Me.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Me.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Me.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Me.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Me.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Me.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Me.errToObj(r)})}nonempty(t){return this.min(1,Me.errToObj(t))}trim(){return new Co({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Co({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Co({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}
vendor: 4,672 bytes, line 542
542get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Co.create=e=>new Co({checks:[],typeName:tt.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...ct(e)});function qce(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}class Id extends vt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==$e.number){const s=this._getOrReturnCtx(t);return we(s,{code:pe.invalid_type,expected:$e.number,received:s.parsedType}),et}let n;const i=new Zn;for(const s of this._def.checks)s.kind==="int"?bt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{code:pe.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),we(n,{code:pe.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),we(n,{code:pe.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?qce(t.data,s.value)!==0&&(n=this._getOrReturnCtx(t,n),we(n,{code:pe.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{code:pe.not_finite,message:s.message}),i.dirty()):bt.assertNever(s);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Me.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Me.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Me.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Me.toString(r))}setLimit(t,r,n,i){return new Id({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Me.toString(i)}]})}_addCheck(t){return new Id({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Me.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Me.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Me.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Me.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Me.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Me.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Me.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Me.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Me.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&bt.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}
vendor: 6,726 bytes, line 542
542}Id.create=e=>new Id({checks:[],typeName:tt.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ct(e)});class Gp extends vt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==$e.bigint)return this._getInvalidInput(t);let n;const i=new Zn;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),we(n,{code:pe.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),we(n,{code:pe.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),we(n,{code:pe.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):bt.assertNever(s);return{status:i.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return we(r,{code:pe.invalid_type,expected:$e.bigint,received:r.parsedType}),et}gte(t,r){return this.setLimit("min",t,!0,Me.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Me.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Me.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Me.toString(r))}setLimit(t,r,n,i){return new Gp({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Me.toString(i)}]})}_addCheck(t){return new Gp({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Me.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Me.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Me.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Me.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Me.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Gp.create=e=>new Gp({checks:[],typeName:tt.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...ct(e)});class I2 extends vt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==$e.boolean){const n=this._getOrReturnCtx(t);return we(n,{code:pe.invalid_type,expected:$e.boolean,received:n.parsedType}),et}return Pi(t.data)}}I2.create=e=>new I2({typeName:tt.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ct(e)});class ax extends vt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==$e.date){const s=this._getOrReturnCtx(t);return we(s,{code:pe.invalid_type,expected:$e.date,received:s.parsedType}),et}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return we(s,{code:pe.invalid_date}),et}const n=new Zn;let i;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(i=this._getOrReturnCtx(t,i),we(i,{code:pe.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(i=this._getOrReturnCtx(t,i),we(i,{code:pe.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):bt.assertNever(s);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ax({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Me.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Me.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}ax.create=e=>new ax({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:tt.ZodDate,...ct(e)});class M2 extends vt{_parse(t){if(this._getType(t)!==$e.symbol){const n=this._getOrReturnCtx(t);return we(n,{code:pe.invalid_type,expected:$e.symbol,received:n.parsedType}),et}return Pi(t.data)}}M2.create=e=>new M2({typeName:tt.ZodSymbol,...ct(e)});class D2 extends vt{_parse(t){if(this._getType(t)!==$e.undefined){const n=this._getOrReturnCtx(t);return we(n,{code:pe.invalid_type,expected:$e.undefined,received:n.parsedType}),et}return Pi(t.data)}}D2.create=e=>new D2({typeName:tt.ZodUndefined,...ct(e)});class L2 extends vt{_parse(t){if(this._getType(t)!==$e.null){const n=this._getOrReturnCtx(t);return we(n,{code:pe.invalid_type,expected:$e.null,received:n.parsedType}),et}return Pi(t.data)}}L2.create=e=>new L2({typeName:tt.ZodNull,...ct(e)});class F2 extends vt{constructor(){super(...arguments),this._any=!0}_parse(t){return Pi(t.data)}}F2.create=e=>new F2({typeName:tt.ZodAny,...ct(e)});class B2 extends vt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Pi(t.data)}}B2.create=e=>new B2({typeName:tt.ZodUnknown,...ct(e)});class Jo extends vt{_parse(t){const r=this._getOrReturnCtx(t);return we(r,{code:pe.invalid_type,expected:$e.never,received:r.parsedType}),et}}Jo.create=e=>new Jo({typeName:tt.ZodNever,...ct(e)});class z2 extends vt{_parse(t){if(this._getType(t)!==$e.undefined){const n=this._getOrReturnCtx(t);return we(n,{code:pe.invalid_type,expected:$e.void,received:n.parsedType}),et}return Pi(t.data)}}z2.create=e=>new z2({typeName:tt.ZodVoid,...ct(e)});class Bs extends vt{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==$e.array)return we(r,{code:pe.invalid_type,expected:$e.array,received:r.parsedType}),et;if(i.exactLength!==null){const a=r.data.length>i.exactLength.value,o=r.data.length<i.exactLength.value;(a||o)&&(we(r,{code:a?pe.too_big:pe.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(we(r,{code:pe.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(we(r,{code:pe.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,o)=>i.type._parseAsync(new Zo(r,a,r.path,o)))).then(a=>Zn.mergeArray(n,a));const s=[...r.data].map((a,o)=>i.type._parseSync(new Zo(r,a,r.path,o)));return Zn.mergeArray(n,s)}
vendor: 5,228 bytes, line 542
542get element(){return this._def.type}min(t,r){return new Bs({...this._def,minLength:{value:t,message:Me.toString(r)}})}max(t,r){return new Bs({...this._def,maxLength:{value:t,message:Me.toString(r)}})}length(t,r){return new Bs({...this._def,exactLength:{value:t,message:Me.toString(r)}})}nonempty(t){return this.min(1,t)}}Bs.create=(e,t)=>new Bs({type:e,minLength:null,maxLength:null,exactLength:null,typeName:tt.ZodArray,...ct(t)});function wu(e){if(e instanceof vr){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Uo.create(wu(n))}return new vr({...e._def,shape:()=>t})}else return e instanceof Bs?new Bs({...e._def,type:wu(e.element)}):e instanceof Uo?Uo.create(wu(e.unwrap())):e instanceof Ld?Ld.create(wu(e.unwrap())):e instanceof Ec?Ec.create(e.items.map(t=>wu(t))):e}class vr extends vt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=bt.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==$e.object){const u=this._getOrReturnCtx(t);return we(u,{code:pe.invalid_type,expected:$e.object,received:u.parsedType}),et}const{status:n,ctx:i}=this._processInputParams(t),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Jo&&this._def.unknownKeys==="strip"))for(const u in i.data)a.includes(u)||o.push(u);const c=[];for(const u of a){const d=s[u],f=i.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new Zo(i,f,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Jo){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of o)c.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(u==="strict")o.length>0&&(we(i,{code:pe.unrecognized_keys,keys:o}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of o){const f=i.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new Zo(i,f,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const f=await d.key,h=await d.value;u.push({key:f,value:h,alwaysSet:d.alwaysSet})}return u}).then(u=>Zn.mergeObjectSync(n,u)):Zn.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Me.errToObj,new vr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,a;const i=((a=(s=this._def).errorMap)==null?void 0:a.call(s,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:Me.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new vr({...this._def,unknownKeys:"strip"})}passthrough(){return new vr({...this._def,unknownKeys:"passthrough"})}extend(t){return new vr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new vr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:tt.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new vr({...this._def,catchall:t})}pick(t){const r={};for(const n of bt.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new vr({...this._def,shape:()=>r})}omit(t){const r={};for(const n of bt.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new vr({...this._def,shape:()=>r})}deepPartial(){return wu(this)}partial(t){const r={};for(const n of bt.objectKeys(this.shape)){const i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}return new vr({...this._def,shape:()=>r})}required(t){const r={};for(const n of bt.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Uo;)s=s._def.innerType;r[n]=s}return new vr({...this._def,shape:()=>r})}keyof(){return a6(bt.objectKeys(this.shape))}}vr.create=(e,t)=>new vr({shape:()=>e,unknownKeys:"strip",catchall:Jo.create(),typeName:tt.ZodObject,...ct(t)});vr.strictCreate=(e,t)=>new vr({shape:()=>e,unknownKeys:"strict",catchall:Jo.create(),typeName:tt.ZodObject,...ct(t)});vr.lazycreate=(e,t)=>new vr({shape:e,unknownKeys:"strip",catchall:Jo.create(),typeName:tt.ZodObject,...ct(t)});class ox extends vt{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function i(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(o=>new Ma(o.ctx.common.issues));return we(r,{code:pe.invalid_union,unionErrors:a}),et}if(r.common.async)return Promise.all(n.map(async s=>{const a={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let s;const a=[];for(const c of n){const u={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!s&&(s={result:d,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(c=>new Ma(c));return we(r,{code:pe.invalid_union,unionErrors:o}),et}}get options(){return this._def.options}}ox.create=(e,t)=>
vendor: 4,409 bytes, line 542
542new ox({options:e,typeName:tt.ZodUnion,...ct(t)});function s_(e,t){const r=oo(e),n=oo(t);if(e===t)return{valid:!0,data:e};if(r===$e.object&&n===$e.object){const i=bt.objectKeys(t),s=bt.objectKeys(e).filter(o=>i.indexOf(o)!==-1),a={...e,...t};for(const o of s){const c=s_(e[o],t[o]);if(!c.valid)return{valid:!1};a[o]=c.data}return{valid:!0,data:a}}else if(r===$e.array&&n===$e.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let s=0;s<e.length;s++){const a=e[s],o=t[s],c=s_(a,o);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===$e.date&&n===$e.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class lx extends vt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=(s,a)=>{if(k2(s)||k2(a))return et;const o=s_(s.value,a.value);return o.valid?((R2(s)||R2(a))&&r.dirty(),{status:r.value,value:o.data}):(we(n,{code:pe.invalid_intersection_types}),et)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}lx.create=(e,t,r)=>new lx({left:e,right:t,typeName:tt.ZodIntersection,...ct(r)});class Ec extends vt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==$e.array)return we(n,{code:pe.invalid_type,expected:$e.array,received:n.parsedType}),et;if(n.data.length<this._def.items.length)return we(n,{code:pe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),et;!this._def.rest&&n.data.length>this._def.items.length&&(we(n,{code:pe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...n.data].map((a,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new Zo(n,a,n.path,o)):null}).filter(a=>!!a);return n.common.async?Promise.all(s).then(a=>Zn.mergeArray(r,a)):Zn.mergeArray(r,s)}get items(){return this._def.items}rest(t){return new Ec({...this._def,rest:t})}}Ec.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ec({items:e,typeName:tt.ZodTuple,rest:null,...ct(t)})};class U2 extends vt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==$e.map)return we(n,{code:pe.invalid_type,expected:$e.map,received:n.parsedType}),et;const i=this._def.keyType,s=this._def.valueType,a=[...n.data.entries()].map(([o,c],u)=>({key:i._parse(new Zo(n,o,n.path,[u,"key"])),value:s._parse(new Zo(n,c,n.path,[u,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of a){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return et;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),o.set(u.value,d.value)}return{status:r.value,value:o}})}else{const o=new Map;for(const c of a){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return et;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),o.set(u.value,d.value)}return{status:r.value,value:o}}}}U2.create=(e,t,r)=>new U2({valueType:t,keyType:e,typeName:tt.ZodMap,...ct(r)});class Yp extends vt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==$e.set)return we(n,{code:pe.invalid_type,expected:$e.set,received:n.parsedType}),et;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(we(n,{code:pe.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(we(n,{code:pe.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const s=this._def.valueType;function a(c){const u=new Set;for(const d of c){if(d.status==="aborted")return et;d.status==="dirty"&&r.dirty(),u.add(d.value)}return{status:r.value,value:u}}const o=[...n.data.values()].map((c,u)=>s._parse(new Zo(n,c,n.path,u)));return n.common.async?Promise.all(o).then(c=>a(c)):a(o)}min(t,r){return new Yp({...this._def,minSize:{value:t,message:Me.toString(r)}})}max(t,r){return new Yp({...this._def,maxSize:{value:t,message:Me.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Yp.create=(e,t)=>
vendor: 4,674 bytes, line 542
542new Yp({valueType:e,minSize:null,maxSize:null,typeName:tt.ZodSet,...ct(t)});class V2 extends vt{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}V2.create=(e,t)=>new V2({getter:e,typeName:tt.ZodLazy,...ct(t)});class W2 extends vt{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return we(r,{received:r.data,code:pe.invalid_literal,expected:this._def.value}),et}return{status:"valid",value:t.data}}get value(){return this._def.value}}W2.create=(e,t)=>new W2({value:e,typeName:tt.ZodLiteral,...ct(t)});function a6(e,t){return new Md({values:e,typeName:tt.ZodEnum,...ct(t)})}class Md extends vt{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return we(r,{expected:bt.joinValues(n),received:r.parsedType,code:pe.invalid_type}),et}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return we(r,{received:r.data,code:pe.invalid_enum_value,options:n}),et}return Pi(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return Md.create(t,{...this._def,...r})}exclude(t,r=this._def){return Md.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Md.create=a6;class H2 extends vt{_parse(t){const r=bt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==$e.string&&n.parsedType!==$e.number){const i=bt.objectValues(r);return we(n,{expected:bt.joinValues(i),received:n.parsedType,code:pe.invalid_type}),et}if(this._cache||(this._cache=new Set(bt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=bt.objectValues(r);return we(n,{received:n.data,code:pe.invalid_enum_value,options:i}),et}return Pi(t.data)}get enum(){return this._def.values}}H2.create=(e,t)=>new H2({values:e,typeName:tt.ZodNativeEnum,...ct(t)});class cx extends vt{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==$e.promise&&r.common.async===!1)return we(r,{code:pe.invalid_type,expected:$e.promise,received:r.parsedType}),et;const n=r.parsedType===$e.promise?r.data:Promise.resolve(r.data);return Pi(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}cx.create=(e,t)=>new cx({type:e,typeName:tt.ZodPromise,...ct(t)});class Dd extends vt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===tt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,s={addIssue:a=>{we(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const a=i.transform(n.data,s);if(n.common.async)return Promise.resolve(a).then(async o=>{if(r.value==="aborted")return et;const c=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return c.status==="aborted"?et:c.status==="dirty"||r.value==="dirty"?Fh(c.value):c});{if(r.value==="aborted")return et;const o=this._def.schema._parseSync({data:a,path:n.path,parent:n});return o.status==="aborted"?et:o.status==="dirty"||r.value==="dirty"?Fh(o.value):o}}if(i.type==="refinement"){const a=o=>{const c=i.refinement(o,s);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?et:(o.status==="dirty"&&r.dirty(),a(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?et:(o.status==="dirty"&&r.dirty(),a(o.value).then(()=>({status:r.value,value:o.value}))))}if(i.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!$d(a))return et;const o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>$d(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:r.value,value:o})):et);bt.assertNever(i)}}Dd.create=(e,t,r)=>
vendor: 4,954 bytes, line 542
542new Dd({schema:e,typeName:tt.ZodEffects,effect:t,...ct(r)});Dd.createWithPreprocess=(e,t,r)=>new Dd({schema:t,effect:{type:"preprocess",transform:e},typeName:tt.ZodEffects,...ct(r)});class Uo extends vt{_parse(t){return this._getType(t)===$e.undefined?Pi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Uo.create=(e,t)=>new Uo({innerType:e,typeName:tt.ZodOptional,...ct(t)});class Ld extends vt{_parse(t){return this._getType(t)===$e.null?Pi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ld.create=(e,t)=>new Ld({innerType:e,typeName:tt.ZodNullable,...ct(t)});class a_ extends vt{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===$e.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}a_.create=(e,t)=>new a_({innerType:e,typeName:tt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ct(t)});class o_ extends vt{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return sx(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ma(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ma(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}o_.create=(e,t)=>new o_({innerType:e,typeName:tt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ct(t)});class q2 extends vt{_parse(t){if(this._getType(t)!==$e.nan){const n=this._getOrReturnCtx(t);return we(n,{code:pe.invalid_type,expected:$e.nan,received:n.parsedType}),et}return{status:"valid",value:t.data}}}q2.create=e=>new q2({typeName:tt.ZodNaN,...ct(e)});class Kce extends vt{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class SA extends vt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?et:s.status==="dirty"?(r.dirty(),Fh(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?et:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new SA({in:t,out:r,typeName:tt.ZodPipeline})}}class l_ extends vt{_parse(t){const r=this._def.innerType._parse(t),n=i=>($d(i)&&(i.value=Object.freeze(i.value)),i);return sx(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}}l_.create=(e,t)=>new l_({innerType:e,typeName:tt.ZodReadonly,...ct(t)});var tt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(tt||(tt={}));const zn=Co.create,Gce=Id.create;Jo.create;const Yce=Bs.create,vb=vr.create;ox.create;lx.create;Ec.create;const Xce=Md.create;cx.create;Uo.create;Ld.create;const Ai=UB,yb=VB,Qce=ZO,o6=b.forwardRef(({className:e,...t},r)=>l.jsx(rg,{ref:r,className:se("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",e),...t}));o6.displayName=rg.displayName;const Jn=b.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(Qce,{children:[l.jsx(o6,{}),l.jsxs(ng,{ref:n,className:se("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
542nded-lg",e),...r,children:[t,l.jsxs(sb,{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:[l.jsx(us,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Jn.displayName=ng.displayName;const ei=({className:e,...t})=>l.jsx("div",{className:se("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ei.displayName="DialogHeader";const l6=({className:e,...t})=>l.jsx("div",{className:se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});l6.displayName="DialogFooter";const ti=b.forwardRef(({className:e,...t},r)=>l.jsx(ig,{ref:r,className:se("text-lg font-semibold leading-none tracking-tight",e),...t}));ti.displayName=ig.displayName;const el=b.forwardRef(({className:e,...t},r)=>l.jsx(sg,{ref:r,className:se("text-sm text-muted-foreground",e),...t}));el.displayName=sg.displayName;var Zce="Label",c6=b.forwardRef((e,t)=>l.jsx(ke.label,{...e,ref:t,onMouseDown:r=>{var i;r.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));c6.displayName=Zce;var u6=c6;const Jce=_f("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Xe=b.forwardRef(({className:e,...t},r)=>l.jsx(u6,{ref:r,className:se(Jce(),e),...t}));Xe.displayName=u6.displayName;const d6=ece,f6=b.createContext({}),lo=({...e})=>l.jsx(f6.Provider,{value:{name:e.name},children:l.jsx(ice,{...e})}),xb=()=>{const e=b.useContext(f6),t=b.useContext(h6),{getFieldState:r,formState:n}=pb(),i=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...i}},h6=b.createContext({}),da=b.forwardRef(({className:e,...t},r)=>{const n=b.useId();return l.jsx(h6.Provider,{value:{id:n},children:l.jsx("div",{ref:r,className:se("space-y-2",e),...t})})});da.displayName="FormItem";const Ss=b.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:i}=xb();return l.jsx(Xe,{ref:r,className:se(n&&"text-destructive",e),htmlFor:i,...t})});Ss.displayName="FormLabel";const fa=b.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:i,formMessageId:s}=xb();return l.jsx(VF,{ref:t,id:n,"aria-describedby":r?`${i} ${s}`:`${i}`,"aria-invalid":!!r,...e})});fa.displayName="FormControl";const eue=b.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=xb();return l.jsx("p",{ref:r,id:n,className:se("text-sm text-muted-foreground",e),...t})});eue.displayName="FormDescription";const ha=b.forwardRef(({className:e,children:t,...r},n)=>{const{error:i,formMessageId:s}=xb(),a=i?String((i==null?void 0:i.message)??""):t;return a?l.jsx("p",{ref:n,id:s,className:se("text-sm font-medium text-destructive",e),...r,children:a}):null});ha.displayName="FormMessage";const un=b.forwardRef(({className:e,...t},r)=>l.jsx("textarea",{className:se("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-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 md:text-sm",e),ref:r,...t}));un.displayName="Textarea";function Xp(e,[t,r]){return Math.min(r,Math.max(t,e))}function jA(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var tue=[" ","Enter","ArrowUp","ArrowDown"],rue=[" ","Enter"],Nc="Select",[bb,wb,nue]=Ym(Nc),[Mf]=Zr(Nc,[nue,Tf]),Sb=Tf(),[iue,ll]=Mf(Nc),[sue,aue]=Mf(Nc),p6=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:s,value:a,defaultValue:o,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:p,form:g}=e,m=Sb(t),[v,y]=b.useState(null),[x,w]=b.useState(null),[S,j]=b.useState(!1),E=If(u),[_,N]=Ra({prop:n,defaultProp:i??!1,onChange:s,caller:Nc}),[O,C]=Ra({prop:a,defaultProp:o,onChange:c,caller:Nc}),k=b.useRef(null),$=v?g||!!v.closest("form"):!0,[D,A]=b.useState(new Set),R=Array.from(D).map(T=>T.props.value).join(";");return l.jsx(sB,{...m,children:l.jsxs(iue,{required:p,scope:t,trigger:v,onTriggerChange:y,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:Ls(),value:O,onValueChange:C,open:_,onOpenChange:N,dir:E,triggerPointerDownPosRef:k,disabled:h,children:[l.jsx(bb.Provider,{scope:t,children:l.jsx(sue,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(T=>{A(L=>new Set(L).add(T))},[]),onNativeOptionRemove:b.useCallback(T=>{A(L=>{const M=new Set(L);return M.delete(T),M})},[]),children:r})}),$?l.jsxs(L6,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:O,onChange:T=>C(T.target.value),disabled:h,form:g,children:[O===void 0?l.jsx("option",{value:""}):null,Array.from(D)]},R):null]})})};p6.displayName=Nc;var m6="SelectTrigger",g6=b.forwardRef((e,t)=>
vendor: 16,835 bytes, line 542
542{const{__scopeSelect:r,disabled:n=!1,...i}=e,s=Sb(r),a=ll(m6,r),o=a.disabled||n,c=Ye(t,a.onTriggerChange),u=wb(r),d=b.useRef("touch"),[f,h,p]=B6(m=>{const v=u().filter(w=>!w.disabled),y=v.find(w=>w.value===a.value),x=z6(v,m,y);x!==void 0&&a.onValueChange(x.value)}),g=m=>{o||(a.onOpenChange(!0),p()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return l.jsx(zO,{asChild:!0,...s,children:l.jsx(ke.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":F6(a.value)?"":void 0,...i,ref:c,onClick:fe(i.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&g(m)}),onPointerDown:fe(i.onPointerDown,m=>{d.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:fe(i.onKeyDown,m=>{const v=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&tue.includes(m.key)&&(g(),m.preventDefault())})})})});g6.displayName=m6;var v6="SelectValue",y6=b.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:a="",...o}=e,c=ll(v6,r),{onValueNodeHasChildrenChange:u}=c,d=s!==void 0,f=Ye(t,c.onValueNodeChange);return hr(()=>{u(d)},[u,d]),l.jsx(ke.span,{...o,ref:f,style:{pointerEvents:"none"},children:F6(c.value)?l.jsx(l.Fragment,{children:a}):s})});y6.displayName=v6;var oue="SelectIcon",x6=b.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...i}=e;return l.jsx(ke.span,{"aria-hidden":!0,...i,ref:t,children:n||"▼"})});x6.displayName=oue;var lue="SelectPortal",b6=e=>l.jsx(Xm,{asChild:!0,...e});b6.displayName=lue;var Oc="SelectContent",w6=b.forwardRef((e,t)=>{const r=ll(Oc,e.__scopeSelect),[n,i]=b.useState();if(hr(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?as.createPortal(l.jsx(S6,{scope:e.__scopeSelect,children:l.jsx(bb.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),s):null}return l.jsx(j6,{...e,ref:t})});w6.displayName=Oc;var Fi=10,[S6,cl]=Mf(Oc),cue="SelectContentImpl",uue=xc("SelectContent.RemoveScroll"),j6=b.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:o,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:v,...y}=e,x=ll(Oc,r),[w,S]=b.useState(null),[j,E]=b.useState(null),_=Ye(t,re=>S(re)),[N,O]=b.useState(null),[C,k]=b.useState(null),$=wb(r),[D,A]=b.useState(!1),R=b.useRef(!1);b.useEffect(()=>{if(w)return GO(w)},[w]),KO();const T=b.useCallback(re=>{const[ge,...Y]=$().map(W=>W.ref.current),[ee]=Y.slice(-1),q=document.activeElement;for(const W of re)if(W===q||(W==null||W.scrollIntoView({block:"nearest"}),W===ge&&j&&(j.scrollTop=0),W===ee&&j&&(j.scrollTop=j.scrollHeight),W==null||W.focus(),document.activeElement!==q))return},[$,j]),L=b.useCallback(()=>T([N,w]),[T,N,w]);b.useEffect(()=>{D&&L()},[D,L]);const{onOpenChange:M,triggerPointerDownPosRef:I}=x;b.useEffect(()=>{if(w){let re={x:0,y:0};const ge=ee=>{var q,W;re={x:Math.abs(Math.round(ee.pageX)-(((q=I.current)==null?void 0:q.x)??0)),y:Math.abs(Math.round(ee.pageY)-(((W=I.current)==null?void 0:W.y)??0))}},Y=ee=>{re.x<=10&&re.y<=10?ee.preventDefault():w.contains(ee.target)||M(!1),document.removeEventListener("pointermove",ge),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",Y,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",Y,{capture:!0})}}},[w,M,I]),b.useEffect(()=>{const re=()=>M(!1);return window.addEventListener("blur",re),window.addEventListener("resize",re),()=>{window.removeEventListener("blur",re),window.removeEventListener("resize",re)}},[M]);const[F,U]=B6(re=>{const ge=$().filter(q=>!q.disabled),Y=ge.find(q=>q.ref.current===document.activeElement),ee=z6(ge,re,Y);ee&&setTimeout(()=>ee.ref.current.focus())}),V=b.useCallback((re,ge,Y)=>{const ee=!R.current&&!Y;(x.value!==void 0&&x.value===ge||ee)&&(O(re),ee&&(R.current=!0))},[x.value]),G=b.useCallback(()=>w==null?void 0:w.focus(),[w]),Z=b.useCallback((re,ge,Y)=>{const ee=!R.current&&!Y;(x.value!==void 0&&x.value===ge||ee)&&k(re)},[x.value]),he=n==="popper"?c_:_6,ve=he===c_?{side:o,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:v}:{};return l.jsx(S6,{scope:r,content:w,viewport:j,onViewportChange:E,itemRefCallback:V,selectedItem:N,onItemLeave:G,itemTextRefCallback:Z,focusSelectedItem:L,selectedItemText:C,position:n,isPositioned:D,searchRef:F,children:l.jsx(nb,{as:uue,allowPinchZoom:!0,children:l.jsx(tb,{asChild:!0,trapped:x.open,onMountAutoFocus:re=>{re.preventDefault()},onUnmountAutoFocus:fe(i,re=>{var ge;(ge=x.trigger)==null||ge.focus({preventScroll:!0}),re.preventDefault()}),children:l.jsx(jf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:re=>re.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:l.jsx(he,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:re=>re.preventDefault(),...y,...ve,onPlaced:()=>A(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:fe(y.onKeyDown,re=>{const ge=re.ctrlKey||re.altKey||re.metaKey;if(re.key==="Tab"&&re.preventDefault(),!ge&&re.key.length===1&&U(re.key),["ArrowUp","ArrowDown","Home","End"].includes(re.key)){let ee=$().filter(q=>!q.disabled).map(q=>q.ref.current);if(["ArrowUp","End"].includes(re.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(re.key)){const q=re.target,W=ee.indexOf(q);ee=ee.slice(W+1)}setTimeout(()=>T(ee)),re.preventDefault()}})})})})})})});j6.displayName=cue;var due="SelectItemAlignedPosition",_6=b.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...i}=e,s=ll(Oc,r),a=cl(Oc,r),[o,c]=b.useState(null),[u,d]=b.useState(null),f=Ye(t,_=>d(_)),h=wb(r),p=b.useRef(!1),g=b.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:y,focusSelectedItem:x}=a,w=b.useCallback(()=>{if(s.trigger&&s.valueNode&&o&&u&&m&&v&&y){const _=s.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),O=s.valueNode.getBoundingClientRect(),C=y.getBoundingClientRect();if(s.dir!=="rtl"){const q=C.left-N.left,W=O.left-q,Fe=_.left-W,Ae=_.width+Fe,Ue=Math.max(Ae,N.width),nt=window.innerWidth-Fi,We=Xp(W,[Fi,Math.max(Fi,nt-Ue)]);o.style.minWidth=Ae+"px",o.style.left=We+"px"}else{const q=N.right-C.right,W=window.innerWidth-O.right-q,Fe=window.innerWidth-_.right-W,Ae=_.width+Fe,Ue=Math.max(Ae,N.width),nt=window.innerWidth-Fi,We=Xp(W,[Fi,Math.max(Fi,nt-Ue)]);o.style.minWidth=Ae+"px",o.style.right=We+"px"}const k=h(),$=window.innerHeight-Fi*2,D=m.scrollHeight,A=window.getComputedStyle(u),R=parseInt(A.borderTopWidth,10),T=parseInt(A.paddingTop,10),L=parseInt(A.borderBottomWidth,10),M=parseInt(A.paddingBottom,10),I=R+T+D+M+L,F=Math.min(v.offsetHeight*5,I),U=window.getComputedStyle(m),V=parseInt(U.paddingTop,10),G=parseInt(U.paddingBottom,10),Z=_.top+_.height/2-Fi,he=$-Z,ve=v.offsetHeight/2,re=v.offsetTop+ve,ge=R+T+re,Y=I-ge;if(ge<=Z){const q=k.length>0&&v===k[k.length-1].ref.current;o.style.bottom="0px";const W=u.clientHeight-m.offsetTop-m.offsetHeight,Fe=Math.max(he,ve+(q?G:0)+W+L),Ae=ge+Fe;o.style.height=Ae+"px"}else{const q=k.length>0&&v===k[0].ref.current;o.style.top="0px";const Fe=Math.max(Z,R+m.offsetTop+(q?V:0)+ve)+Y;o.style.height=Fe+"px",m.scrollTop=ge-Z+m.offsetTop}o.style.margin=`${Fi}px 0`,o.style.minHeight=F+"px",o.style.maxHeight=$+"px",n==null||n(),requestAnimationFrame(()=>p.current=!0)}},[h,s.trigger,s.valueNode,o,u,m,v,y,s.dir,n]);hr(()=>w(),[w]);const[S,j]=b.useState();hr(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const E=b.useCallback(_=>{_&&g.current===!0&&(w(),x==null||x(),g.current=!1)},[w,x]);return l.jsx(hue,{scope:r,contentWrapper:o,shouldExpandOnScrollRef:p,onScrollButtonChange:E,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:l.jsx(ke.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});_6.displayName=due;var fue="SelectPopperPosition",c_=b.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=Fi,...s}=e,a=Sb(r);return l.jsx(UO,{...a,...s,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...s.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)"}})});c_.displayName=fue;var[hue,_A]=Mf(Oc,{}),u_="SelectViewport",E6=b.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...i}=e,s=cl(u_,r),a=_A(u_,r),o=Ye(t,s.onViewportChange),c=b.useRef(0);return l.jsxs(l.Fragment,{children:[l.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:n}),l.jsx(bb.Slot,{scope:r,children:l.jsx(ke.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:fe(i.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=a;if(h!=null&&h.current&&f){const p=Math.abs(c.current-d.scrollTop);if(p>0){const g=window.innerHeight-Fi*2,m=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),y=Math.max(m,v);if(y<g){const x=y+p,w=Math.min(g,x),S=x-w;f.style.height=w+"px",f.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});E6.displayName=u_;var N6="SelectGroup",[pue,mue]=Mf(N6),gue=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Ls();return l.jsx(pue,{scope:r,id:i,children:l.jsx(ke.div,{role:"group","aria-labelledby":i,...n,ref:t})})});gue.displayName=N6;var O6="SelectLabel",A6=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=mue(O6,r);return l.jsx(ke.div,{id:i.id,...n,ref:t})});A6.displayName=O6;var ux="SelectItem",[vue,C6]=Mf(ux),P6=b.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...a}=e,o=ll(ux,r),c=cl(ux,r),u=o.value===n,[d,f]=b.useState(s??""),[h,p]=b.useState(!1),g=Ye(t,x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,n,i)}),m=Ls(),v=b.useRef("touch"),y=()=>{i||(o.onValueChange(n),o.onOpenChange(!1))};if(n==="")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 l.jsx(vue,{scope:r,value:n,disabled:i,textId:m,isSelected:u,onItemTextChange:b.useCallback(x=>{f(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:l.jsx(bb.ItemSlot,{scope:r,value:n,disabled:i,textValue:d,children:l.jsx(ke.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:g,onFocus:fe(a.onFocus,()=>p(!0)),onBlur:fe(a.onBlur,()=>p(!1)),onClick:fe(a.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:fe(a.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:fe(a.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:fe(a.onPointerMove,x=>{var w;v.current=x.pointerType,i?(w=c.onItemLeave)==null||w.call(c):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:fe(a.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:fe(a.onKeyDown,x=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(rue.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});P6.displayName=ux;var Bh="SelectItemText",T6=b.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,...s}=e,a=ll(Bh,r),o=cl(Bh,r),c=C6(Bh,r),u=aue(Bh,r),[d,f]=b.useState(null),h=Ye(t,y=>f(y),c.onItemTextChange,y=>{var x;return(x=o.itemTextRefCallback)==null?void 0:x.call(o,y,c.value,c.disabled)}),p=d==null?void 0:d.textContent,g=b.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=u;return hr(()=>(m(g),()=>v(g)),[m,v,g]),l.jsxs(l.Fragment,{children:[l.jsx(ke.span,{id:c.textId,...s,ref:h}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?as.createPortal(s.children,a.valueNode):null]})});T6.displayName=Bh;var k6="SelectItemIndicator",R6=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return C6(k6,r).isSelected?l.jsx(ke.span,{"aria-hidden":!0,...n,ref:t}):null});R6.displayName=k6;var d_="SelectScrollUpButton",$6=b.forwardRef((e,t)=>{const r=cl(d_,e.__scopeSelect),n=_A(d_,e.__scopeSelect),[i,s]=b.useState(!1),a=Ye(t,n.onScrollButtonChange);return hr(()=>{if(r.viewport&&r.isPositioned){let o=function(){const u=c.scrollTop>0;s(u)};const c=r.viewport;return o(),c.addEventListener("scroll",o),()=>c.removeEventListener("scroll",o)}},[r.viewport,r.isPositioned]),i?l.jsx(M6,{...e,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=r;o&&c&&(o.scrollTop=o.scrollTop-c.offsetHeight)}}):null});$6.displayName=d_;var f_="SelectScrollDownButton",I6=b.forwardRef((e,t)=>{const r=cl(f_,e.__scopeSelect),n=_A(f_,e.__scopeSelect),[i,s]=b.useState(!1),a=Ye(t,n.onScrollButtonChange);return hr(()=>{if(r.viewport&&r.isPositioned){let o=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;s(d)};const c=r.viewport;return o(),c.addEventListener("scroll",o),()=>c.removeEventListener("scroll",o)}},[r.viewport,r.isPositioned]),i?l.jsx(M6,{...e,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=r;o&&c&&(o.scrollTop=o.scrollTop+c.offsetHeight)}}):null});I6.displayName=f_;var M6=b.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...i}=e,s=cl("SelectScrollButton",r),a=b.useRef(null),o=wb(r),c=b.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return b.useEffect(()=>()=>c(),[c]),hr(()=>{var d;const u=o().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[o]),l.jsx(ke.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:fe(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:fe(i.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:fe(i.onPointerLeave,()=>{c()})})}),yue="SelectSeparator",D6=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return l.jsx(ke.div,{"aria-hidden":!0,...n,ref:t})});D6.displayName=yue;var h_="SelectArrow",xue=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Sb(r),s=ll(h_,r),a=cl(h_,r);return s.open&&a.position==="popper"?l.jsx(VO,{...i,...n,ref:t}):null});xue.displayName=h_;var bue="SelectBubbleInput",L6=b.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const i=b.useRef(null),s=Ye(n,i),a=jA(t);return b.useEffect(()=>{const o=i.current;if(!o)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&d){const f=new Event("change",{bubbles:!0});d.call(o,t),o.dispatchEvent(f)}},[a,t]),l.jsx(ke.select,{...r,style:{...YF,...r.style},ref:s,defaultValue:t})});L6.displayName=bue;function F6(e){return e===""||e===void 0}function B6(e){const t=lr(e),r=b.useRef(""),n=b.useRef(0),i=b.useCallback(a=>{const o=r.current+a;t(o),function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(o)},[t]),s=b.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function z6(e,t,r){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let a=wue(e,Math.max(s,0));i.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function wue(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Sue=p6,U6=g6,jue=y6,_ue=x6,Eue=b6,V6=w6,Nue=E6,W6=A6,H6=P6,Oue=T6,Aue=R6,q6=$6,K6=I6,G6=D6;const Zt=Sue,Jt=jue,qt=b.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(U6,{ref:n,className:se("flex h-9 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
542ing-offset-background data-[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",e),...r,children:[t,l.jsx(_ue,{asChild:!0,children:l.jsx(EO,{className:"h-4 w-4 opacity-50"})})]}));qt.displayName=U6.displayName;const Y6=b.forwardRef(({className:e,...t},r)=>l.jsx(q6,{ref:r,className:se("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(x5,{className:"h-4 w-4"})}));Y6.displayName=q6.displayName;const X6=b.forwardRef(({className:e,...t},r)=>l.jsx(K6,{ref:r,className:se("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(EO,{className:"h-4 w-4"})}));X6.displayName=K6.displayName;const Kt=b.forwardRef(({className:e,children:t,position:r="popper",...n},i)=>l.jsx(Eue,{children:l.jsxs(V6,{ref:i,className:se("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-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 origin-[--radix-select-content-transform-origin]",r==="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",e),position:r,...n,children:[l.jsx(Y6,{}),l.jsx(Nue,{className:se("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(X6,{})]})}));Kt.displayName=V6.displayName;const Cue=b.forwardRef(({className:e,...t},r)=>l.jsx(W6,{ref:r,className:se("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Cue.displayName=W6.displayName;const te=b.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(H6,{ref:n,className:se("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",e),...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Aue,{children:l.jsx(y5,{className:"h-4 w-4"})})}),l.jsx(Oue,{children:t})]}));te.displayName=H6.displayName;const Pue=b.forwardRef(({className:e,...t},r)=>l.jsx(G6,{ref:r,className:se("-mx-1 my-1 h-px bg-muted",e),...t}));Pue.displayName=G6.displayName;const Tue=vb({issueType:zn().optional(),severity:zn().optional(),description:zn().min(10,"Description must be at least 10 characters"),messageSent:zn().optional(),messageReceived:zn().optional(),expectedResponse:zn().optional()});function Q6({trigger:e,onIssueCreated:t}){const[r,n]=b.useState(!1),[i,s]=b.useState(null),{toast:a}=kn(),o=vn(),c=mb({resolver:gb(Tue),defaultValues:{issueType:"",severity:"",description:"",messageSent:"",messageReceived:"",expectedResponse:""}}),u=c.watch("issueType"),d=fr({mutationFn:async g=>(await Ws("POST","/api/issues/manual",g)).json(),onSuccess:g=>{o.invalidateQueries({queryKey:["/api/issues"]}),t==null||t(g),a({title:"Issue reported",description:`Issue ${g.id} has been created successfully`}),n(!1),c.reset(),s(null)},onError:g=>{a({title:"Error",description:g.message||"Failed to create issue",variant:"destructive"})}}),f=g=>{g.target.files&&g.target.files[0]&&s(g.target.files[0])},h=()=>{s(null)},p=g=>{d.mutate(g)};return l.jsxs(Ai,{open:r,onOpenChange:n,children:[l.jsx(yb,{asChild:!0,children:e||l.jsxs(ie,{"data-testid":"button-create-issue",children:[l.jsx(Gu,{className:"h-4 w-4 mr-2"}),"Report Issue"]})}),l.jsxs(Jn,{className:"max-w-2xl",children:[l.jsxs(ei,{children:[l.jsx(ti,{children:"Report New Issue"}),l.jsx(el,{children:"Describe the issue you encountered. Include as much detail as possible."})]}),l.jsx(d6,{...c,children:l.jsxs("form",{onSubmit:c.handleSubmit(p),className:"space-y-4",children:[l.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[l.jsx(lo,{control:c.control,name:"issueType",render:({field:g})=>l.jsxs(da,{children:[l.jsxs(Ss,{children:["Issue Type ",l.jsx("span",{className:"text-muted-foreground text-xs",children:"(optional)"})]}),l.jsxs(Zt,{onValueChange:g.onChange,value:g.value,children:[l.jsx(fa,{children:l.jsx(qt,{"data-testid":"select-issue-type",children:l.jsx(Jt,{placeholder:"Select type (optional)"})})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"wrong-answer",children:"Wrong Answer Given"}),l.jsx(te,{value:"transfer-failed",children:"Transfer Failed"}),l.jsx(te,{value:"technical",children:"Technical Error"}),l.jsx(te,{value:"missing-knowledge",children:"Missing Knowledge"}),l.jsx(te,{value:"inappropriate",children:"Inappropriate Response"}),l.jsx(te,{value:"other",children:"Other"})]})]}),l.jsx(ha,{})]})}),l.jsx(lo,{control:c.control,name:"severity",render:({field:g})=>l.jsxs(da,{children:[l.jsxs(Ss,{children:["Severity ",l.jsx("span",{className:"text-muted-foreground text-xs",children:"(optional)"})]}),l.jsxs(Zt,{onValueChange:g.onChange,value:g.value,children:[l.jsx(fa,{children:l.jsx(qt,{"data-testid":"select-severity",children:l.jsx(Jt,{placeholder:"Select severity (optional)"})})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"low",children:"Low"}),l.jsx(te,{value:"medium",children:"Medium"}),l.jsx(te,{value:"high",children:"High"}),l.jsx(te,{value:"critical",children:"Critical"})]})]}),l.jsx(ha,{})]})})]}),l.jsx(lo,{control:c.control,name:"description",render:({field:g})=>l.jsxs(da,{children:[l.jsx(Ss,{children:"Description"}),l.jsx(fa,{children:l.jsx(un,{placeholder:"Describe the issue in detail...",rows:4,...g,"data-testid":"textarea-description"})}),l.jsx(ha,{})]})}),u==="wrong-answer"&&l.jsxs(l.Fragment,{children:[l.jsx(lo,{control:c.control,name:"messageSent",render:({field:g})=>l.jsxs(da,{children:[l.jsx(Ss,{children:"Message Sent"}),l.jsx(fa,{children:l.jsx(un,{placeholder:"What message did the customer send?",rows:2,...g,"data-testid":"textarea-message-sent"})}),l.jsx(ha,{})]})}),l.jsx(lo,{control:c.control,name:"messageReceived",render:({field:g})=>l.jsxs(da,{children:[l.jsx(Ss,{children:"Message Received"}),l.jsx(fa,{children:l.jsx(un,{placeholder:"What response did the AI provide?",rows:2,...g,"data-testid":"textarea-message-received"})}),l.jsx(ha,{})]})}),l.jsx(lo,{control:c.control,name:"expectedResponse",render:({field:g})=>l.jsxs(da,{children:[l.jsx(Ss,{children:"Expected Response"}),l.jsx(fa,{children:l.jsx(un,{placeholder:"What should the AI have responded with?",rows:3,...g,"data-testid":"textarea-expected-response"})}),l.jsx(ha,{})]})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ss,{children:"Screenshot (Optional)"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Je,{id:"screenshot",type:"file",accept:"image/*",onChange:f,className:"hidden","data-testid":"input-screenshot"}),i?l.jsxs("div",{className:"flex items-center gap-2 rounded-md border p-2 flex-1",children:[l.jsx("span",{className:"text-sm truncate flex-1","data-testid":"text-screenshot-name",children:i.name}),l.jsx(ie,{type:"button",variant:"ghost",size:"sm",onClick:h,"data-testid":"button-remove-screenshot",children:l.jsx(us,{className:"h-4 w-4"})})]}):l.jsxs(ie,{type:"button",variant:"outline",onClick:()=>{var g;return(g=document.getElementById("screenshot"))==null?void 0:g.click()},className:"w-full","data-testid":"button-upload-screenshot",children:[l.jsx(PO,{className:"h-4 w-4 mr-2"}),"Upload Screenshot"]})]})]}),l.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[l.jsx(ie,{type:"button",variant:"outline",onClick:()=>n(!1),"data-testid":"button-cancel-issue",children:"Cancel"}),l.jsx(ie,{type:"submit",disabled:d.isPending,"data-testid":"button-submit-issue",children:d.isPending?"Reporting...":"Report Issue"})]})]})})]})]})}const kue=vb({rating:Gce().min(1,"Please select a rating").max(5),comment:zn().optional()});
542function Rue({value:e,onChange:t}){const[r,n]=b.useState(0);return l.jsx("div",{className:"flex items-center gap-1",children:[1,2,3,4,5].map(i=>l.jsx("button",{type:"button",onClick:()=>t(i),onMouseEnter:()=>n(i),onMouseLeave:()=>n(0),className:"p-1 focus:outline-none focus:ring-2 focus:ring-primary rounded",children:l.jsx(Nf,{className:`h-8 w-8 transition-colors ${i<=(r||e)?"fill-yellow-400 text-yellow-400":"text-gray-300 hover:text-yellow-200"}`})},i))})}function $ue({trigger:e}){const[t,r]=b.useState(!1),{toast:n}=kn(),{user:i}=ol(),s=mb({resolver:gb(kue),defaultValues:{rating:0,comment:""}}),a=fr({mutationFn:async c=>{var d;const u=await fetch("/api/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...c,user_name:((d=i==null?void 0:i.user_metadata)==null?void 0:d.full_name)||null,user_email:(i==null?void 0:i.email)||null})});if(!u.ok)throw new Error("Failed to submit feedback");return u.json()},onSuccess:()=>{n({title:"Thank you for your feedback!",description:"Your feedback helps us improve our service."}),r(!1),s.reset()},onError:c=>{n({title:"Error",description:c.message||"Failed to submit feedback",variant:"destructive"})}}),o=c=>{a.mutate(c)};return l.jsxs(Ai,{open:t,onOpenChange:r,children:[l.jsx(yb,{asChild:!0,children:e||l.jsxs(ie,{variant:"outline",children:[l.jsx(Nf,{className:"h-4 w-4 mr-2"}),"Leave Feedback"]})}),l.jsxs(Jn,{className:"max-w-md",children:[l.jsxs(ei,{children:[l.jsx(ti,{children:"Leave Feedback"}),l.jsx(el,{children:"How was your experience with the AAOE AI assistant?"})]}),l.jsx(d6,{...s,children:l.jsxs("form",{onSubmit:s.handleSubmit(o),className:"space-y-6",children:[l.jsx(lo,{control:s.control,name:"rating",render:({field:c})=>l.jsxs(da,{className:"flex flex-col items-center",children:[l.jsx(Ss,{className:"text-center mb-2",children:"Rate your experience"}),l.jsx(fa,{children:l.jsx(Rue,{value:c.value,onChange:c.onChange})}),l.jsx(ha,{})]})}),l.jsx(lo,{control:s.control,name:"comment",render:({field:c})=>l.jsxs(da,{children:[l.jsx(Ss,{children:"Comments (optional)"}),l.jsx(fa,{children:l.jsx(un,{placeholder:"Tell us more about your experience...",rows:4,...c})}),l.jsx(ha,{})]})}),l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx(ie,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),l.jsx(ie,{type:"submit",disabled:a.isPending||s.watch("rating")===0,children:a.isPending?"Submitting...":"Submit Feedback"})]})]})})]})]})}function Iue({open:e,onOpenChange:t}){return l.jsx(Ai,{open:e,onOpenChange:t,children:l.jsxs(Jn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[l.jsxs(ei,{children:[l.jsx(ti,{className:"text-2xl",children:"Welcome to AAOE Assistant!"}),l.jsx(el,{children:"Here's how to use this page to interact with Paige, your AI assistant"})]}),l.jsxs("div",{className:"space-y-6 py-4",children:[l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"flex items-center justify-center h-8 w-8 rounded-full bg-blue-100 dark:bg-blue-900/20",children:l.jsx(Oi,{className:"h-4 w-4 text-blue-600 dark:text-blue-400"})}),l.jsx("h3",{className:"text-lg font-semibold",children:"Chat Widget"})]}),l.jsx("p",{className:"text-sm text-muted-foreground ml-10",children:"Type messages in the chat box to ask Paige questions about the AAOE 2026 Annual Conference in Louisville, KY (April 20-22). You can ask about registration, speakers, schedules, and more!"}),l.jsxs("div",{className:"ml-10 p-3 bg-muted rounded-lg",children:[l.jsx("p",{className:"text-sm font-medium mb-1",children:"Try asking:"}),l.jsxs("ul",{className:"text-sm space-y-1 text-muted-foreground",children:[l.jsx("li",{children:'• "When is the conference?"'}),l.jsx("li",{children:'• "How do I register?"'}),l.jsx("li",{children:'• "Who are the keynote speakers?"'})]})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"flex items-center justify-center h-8 w-8 rounded-full bg-purple-100 dark:bg-purple-900/20",children:l.jsx(os,{className:"h-4 w-4 text-purple-600 dar
542k:text-purple-400"})}),l.jsx("h3",{className:"text-lg font-semibold",children:"Voice Chat"})]}),l.jsx("p",{className:"text-sm text-muted-foreground ml-10",children:"Click the voice widget button (bottom right corner) to have a voice conversation with Paige. You can speak naturally and get voice responses!"})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsx("h3",{className:"text-lg font-semibold",children:"Quick Actions"}),l.jsxs("div",{className:"space-y-3 ml-4",children:[l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"flex items-center justify-center h-8 w-8 rounded-full bg-green-100 dark:bg-green-900/20 mt-1",children:l.jsx(os,{className:"h-4 w-4 text-green-600 dark:text-green-400"})}),l.jsxs("div",{className:"flex-1",children:[l.jsx("p",{className:"font-medium text-sm",children:"Call Assistant"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Tap to call Paige directly at +1 (317) 785-1180 from your phone"})]})]}),l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"flex items-center justify-center h-8 w-8 rounded-full bg-blue-100 dark:bg-blue-900/20 mt-1",children:l.jsx(G0,{className:"h-4 w-4 text-blue-600 dark:text-blue-400"})}),l.jsxs("div",{className:"flex-1",children:[l.jsx("p",{className:"font-medium text-sm",children:"Send SMS"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Tap to send a text message to Paige at +1 (317) 785-1180"})]})]}),l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"flex items-center justify-center h-8 w-8 rounded-full bg-orange-100 dark:bg-orange-900/20 mt-1",children:l.jsx(Ds,{className:"h-4 w-4 text-orange-600 dark:text-orange-400"})}),l.jsxs("div",{className:"flex-1",children:[l.jsx("p",{className:"font-medium text-sm",children:"Report Issue"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Found a problem or incorrect response? Click here to report it to our team"})]})]})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsx("h3",{className:"text-lg font-semibold",children:"Connection Status"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Check if web chat, voice chat, and SMS are available. Green means ready to use!"})]})]}),l.jsx("div",{className:"flex justify-end pt-4 border-t",children:l.jsx(ie,{onClick:()=>t(!1),children:"Got it, thanks!"})})]})})}function Mue(){const[e,t]=b.useState(!1);return b.useEffect(()=>{localStorage.getItem("aaoe_overview_instructions_seen")||(t(!0),localStorage.setItem("aaoe_overview_instructions_seen","true"));const n=()=>{t(!0)};return window.addEventListener("show-overview-instructions",n),()=>window.removeEventListener("show-overview-instructions",n)},[]),l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"flex flex-col gap-4",children:l.jsxs("div",{className:"text-center",children:[l.jsx("h1",{className:"text-3xl font-bold",children:"AAOE Assistant"}),l.jsx("p",{className:"text-muted-foreground",children:"Choose how you'd like to connect with Paige"})]})}),l.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3 max-w-4xl mx-auto",children:[l.jsx(zc,{href:"/chat-widget",children:l.jsxs(ie,{className:"w-full h-auto py-6 flex flex-col items-center gap-3",variant:"outline",children:[l.jsx("div",{className:"flex items-center justify-center h-14 w-14 rounded-full bg-purple-100 dark:bg-purple-900/20",children:l.jsx(Oi,{className:"h-7 w-7 text-purple-600 dark:text-purple-400"})}),l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("span",{className:"font-semibold text-lg",children:"Web Chat"}),l.jsx("span",{className:"text-sm text-muted-foreground",children:"Chat with Paige online"})]})]})}),l.jsx(ie,{className:"w-full h-auto py-6 flex flex-col items-center gap-3",variant:"outline",asChild:!0,children:l.jsxs("a",{href:"sms:+13177851180",children:[l.jsx("div",{className:"flex items-center justify-center h-14 w-14 rounded-full bg-blue-100 dark:bg-blue-900/20",children:l.jsx(G0,{className:"h-7 w-7 text-blue-600 dark:text-blue-400"})}),l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("span",{className:"font-semibold text-lg",children:"Send SMS"}),l.jsx("span",{className:"text-sm text-muted-foreground",children:"+1 (317) 785-1180"})]})]})}),l.jsx(ie,{className:"w-full h-auto py-6 flex flex-col items-center gap-3",variant:"outline",asChild:!0,children:l.jsxs("a",{href:"tel:+13177851180",children:[l.jsx("div",{className:"flex items-center justify-center h-14 w-14 roun
542ded-full bg-green-100 dark:bg-green-900/20",children:l.jsx(os,{className:"h-7 w-7 text-green-600 dark:text-green-400"})}),l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("span",{className:"font-semibold text-lg",children:"Call Assistant"}),l.jsx("span",{className:"text-sm text-muted-foreground",children:"+1 (317) 785-1180"})]})]})}),l.jsx(Q6,{trigger:l.jsxs(ie,{className:"w-full h-auto py-6 flex flex-col items-center gap-3",variant:"outline",children:[l.jsx("div",{className:"flex items-center justify-center h-14 w-14 rounded-full bg-orange-100 dark:bg-orange-900/20",children:l.jsx(Ds,{className:"h-7 w-7 text-orange-600 dark:text-orange-400"})}),l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("span",{className:"font-semibold text-lg",children:"Report Issue"}),l.jsx("span",{className:"text-sm text-muted-foreground",children:"Found a problem?"})]})]})}),l.jsx($ue,{trigger:l.jsxs(ie,{className:"w-full h-auto py-6 flex flex-col items-center gap-3",variant:"outline",children:[l.jsx("div",{className:"flex items-center justify-center h-14 w-14 rounded-full bg-yellow-100 dark:bg-yellow-900/20",children:l.jsx(Nf,{className:"h-7 w-7 text-yellow-600 dark:text-yellow-400"})}),l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("span",{className:"font-semibold text-lg",children:"Leave Feedback"}),l.jsx("span",{className:"text-sm text-muted-foreground",children:"Rate your experience"})]})]})})]}),l.jsx(Iue,{open:e,onOpenChange:t})]})}const ue=b.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:se("shadcn-card rounded-xl border bg-card border-card-border text-card-foreground shadow-sm",e),...t}));ue.displayName="Card";const ye=b.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:se("flex flex-col space-y-1.5 p-6",e),...t}));ye.displayName="CardHeader";const Ve=b.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:se("text-2xl font-semibold leading-none tracking-tight",e),...t}));Ve.displayName="CardTitle";const jn=b.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:se("text-sm text-muted-foreground",e),...t}));jn.displayName="CardDescription";const de=b.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:se("p-6 pt-0",e),...t}));de.displayName="CardContent";const Due=b.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:se("flex items-center p-6 pt-0",e),...t}));Due.displayName="CardFooter";const Lue=_f("whitespace-nowrap inline-flex items-center rounded-md 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 hover-elevate ",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow-xs",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground shadow-xs",outline:" border [border-color:var(--badge-outline)] shadow-xs"}},defaultVariants:{variant:"default"}});function Ee({className:e,variant:t,...r}){return l.jsx("div",{className:se(Lue({variant:t}),e),...r})}function Fue({title:e,category:t,tags:r,lastUpdated:n,queryCount:i,onEdit:s,onView:a}){return l.jsxs(ue,{className:"hover-elevate",children:[l.jsx(ye,{className:"space-y-0 pb-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-primary/10",children:l.jsx(Lp,{className:"h-5 w-5 text-primary"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("h3",{className:"font-medium truncate","data-testid":"text-document-title",children:e}),l.jsx("p",{className:"text-sm text-muted-foreground",children:t})]})]})}),l.jsxs(de,{className:"space-y-3",children:[l.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map(o=>l.jsxs(Ee,{variant:"secondary",className:"gap-1",children:[l.jsx(AO,{className:"h-3 w-3"}),l.jsx("span",{children:o})]},o))}),l.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(Vc,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:n})]}),l.jsxs("span",{className:"font-medium",children:[i," queries"]})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(ie,{variant:"outline",size:"sm",className:"flex-1",onClick:a,"data-testid":"button-view-document",children:"View"}),l.jsx(ie,{variant:"outline",size:"sm",className:"flex-1",onClick:s,"data-testid":"button-edit-document",children:"Edit"})]})]})]})}var jb="Tabs",[Bue]=Zr(jb,[cb]),Z6=cb(),[zue,EA]=Bue(jb),J6=b.forwardRef((e,t)=>
542{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:s,orientation:a="horizontal",dir:o,activationMode:c="automatic",...u}=e,d=If(o),[f,h]=Ra({prop:n,onChange:i,defaultProp:s??"",caller:jb});return l.jsx(zue,{scope:r,baseId:Ls(),value:f,onValueChange:h,orientation:a,dir:d,activationMode:c,children:l.jsx(ke.div,{dir:d,"data-orientation":a,...u,ref:t})})});J6.displayName=jb;var e8="TabsList",t8=b.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,s=EA(e8,r),a=Z6(r);return l.jsx(qz,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:n,children:l.jsx(ke.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:t})})});t8.displayName=e8;var r8="TabsTrigger",n8=b.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...s}=e,a=EA(r8,r),o=Z6(r),c=a8(a.baseId,n),u=o8(a.baseId,n),d=n===a.value;return l.jsx(Kz,{asChild:!0,...o,focusable:!i,active:d,children:l.jsx(ke.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...s,ref:t,onMouseDown:fe(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?a.onValueChange(n):f.preventDefault()}),onKeyDown:fe(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(n)}),onFocus:fe(e.onFocus,()=>{const f=a.activationMode!=="manual";!d&&!i&&f&&a.onValueChange(n)})})})});n8.displayName=r8;var i8="TabsContent",s8=b.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:i,children:s,...a}=e,o=EA(i8,r),c=a8(o.baseId,n),u=o8(o.baseId,n),d=n===o.value,f=b.useRef(d);return b.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),l.jsx(yn,{present:i||d,children:({present:h})=>l.jsx(ke.div,{"data-state":d?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&s})})});s8.displayName=i8;function a8(e,t){return`${e}-trigger-${t}`}function o8(e,t){return`${e}-content-${t}`}var Uue=J6,l8=t8,c8=n8,u8=s8;const ul=Uue,Ha=b.forwardRef(({className:e,...t},r)=>l.jsx(l8,{ref:r,className:se("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Ha.displayName=l8.displayName;const yt=b.forwardRef(({className:e,...t},r)=>l.jsx(c8,{ref:r,className:se("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",e),...t}));yt.displayName=c8.displayName;const xt=b.forwardRef(({className:e,...t},r)=>l.jsx(u8,{ref:r,className:se("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));xt.displayName=u8.displayName;var Vue={};const Wue=vb({name:zn().min(1,"Document name is required"),category:zn().min(1,"Category is required"),tags:Yce(zn()).default([]),fileUrl:zn().min(1,"File, link, or text content is required"),documentType:Xce(["txt","link","text"])});function Hue({open:e,onOpenChange:t}){const[r,n]=b.useState("txt"),[i,s]=b.useState(null),[a,o]=b.useState(""),[c,u]=b.useState([]),[d,f]=b.useState(""),[h,p]=b.useState(!1),{toast:g}=kn(),m=vn(),v=mb({resolver:gb(Wue),defaultValues:{name:"",category:"",tags:[],fileUrl:"",documentType:"txt"}}),y=fr({mutationFn:async _=>Ws("POST","/api/documents",_),onSuccess:()=>{m.invalidateQueries({queryKey:["/api/documents"]}),g({title:"Success",description:"Document added successfully"}),j()},onError:()=>{g({title:"Error",description:"Failed to add document",variant:"destructive"})}}),x=async _=>{var O;const N=(O=_.target.files)==null?void 0:O[0];if(N){if(N.type!=="text/plain"){g({title:"Invalid file type",description:"Please upload a TXT file",variant:"destructive"});return}s(N);try{p(!0);const C=await N.text(),k=await fetch("/api/admin/upload",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${Vue.REACT_APP_ADMIN_PASSWORD||"aaoe2024admin"}`},body:JSON.stringify({filename:N.name,content:C,category:v.getValues("category")||"general",enhanceLLM:!0})});if(!k.ok){const D=await k.json();throw new Error(D.error||"Failed to process file")}const $=await k.json();o(`processed:${N.name}`),v.setValue("fileUrl",`processed:${N.name}`),g({title:"File processed successfully",description:`TXT file processed into ${$.chunks} chunks with LLM enhancement`})}catch(C){g({title:"Upload failed",description:C instanceof Error?C.message:"Failed to process TXT file",variant:"destructive"})}finally{p(!1)}}},w=()=>
542{if(d.trim()&&!c.includes(d.trim())){const _=[...c,d.trim()];u(_),v.setValue("tags",_),f("")}},S=_=>{const N=c.filter(O=>O!==_);u(N),v.setValue("tags",N)},j=()=>{v.reset(),u([]),f(""),s(null),o(""),n("txt"),t(!1)},E=_=>{y.mutate({..._,documentType:r,tags:c})};return l.jsx(Ai,{open:e,onOpenChange:j,children:l.jsxs(Jn,{className:"max-w-2xl","data-testid":"dialog-add-document",children:[l.jsx(ei,{children:l.jsx(ti,{children:"Add New Document"})}),l.jsxs("form",{onSubmit:v.handleSubmit(E),className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"name",children:"Document Name"}),l.jsx(Je,{id:"name",...v.register("name"),placeholder:"Enter document name","data-testid":"input-document-name"}),v.formState.errors.name&&l.jsx("p",{className:"text-sm text-destructive",children:v.formState.errors.name.message})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"category",children:"Category"}),l.jsx(Je,{id:"category",...v.register("category"),placeholder:"e.g., Membership, Events, Finance","data-testid":"input-document-category"}),v.formState.errors.category&&l.jsx("p",{className:"text-sm text-destructive",children:v.formState.errors.category.message})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{children:"Tags"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Je,{value:d,onChange:_=>f(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),w())},placeholder:"Add a tag and press Enter","data-testid":"input-tag"}),l.jsx(ie,{type:"button",variant:"outline",onClick:w,"data-testid":"button-add-tag",children:"Add"})]}),c.length>0&&l.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:c.map(_=>l.jsxs(Ee,{variant:"secondary",className:"gap-1","data-testid":`badge-tag-${_}`,children:[_,l.jsx("button",{type:"button",onClick:()=>S(_),className:"ml-1 hover:text-destructive","data-testid":`button-remove-tag-${_}`,children:l.jsx(us,{className:"h-3 w-3"})})]},_))})]}),l.jsxs(ul,{value:r,onValueChange:_=>n(_),children:[l.jsxs(Ha,{className:"grid w-full grid-cols-3",children:[l.jsxs(yt,{value:"txt","data-testid":"tab-txt",children:[l.jsx(Lp,{className:"h-4 w-4 mr-2"}),"Upload TXT"]}),l.jsxs(yt,{value:"link","data-testid":"tab-link",children:[l.jsx(Nee,{className:"h-4 w-4 mr-2"}),"Add Link"]}),l.jsxs(yt,{value:"text","data-testid":"tab-text",children:[l.jsx(Dee,{className:"h-4 w-4 mr-2"}),"Add Text"]})]}),l.jsxs(xt,{value:"txt",className:"space-y-2",children:[l.jsx(Je,{id:"txt-upload",type:"file",accept:"text/plain",onChange:x,className:"hidden","data-testid":"input-txt-file"}),i?l.jsxs("div",{className:"flex items-center gap-2 rounded-md border p-3",children:[l.jsx(Lp,{className:"h-5 w-5 text-primary"}),l.jsx("span",{className:"text-sm flex-1 truncate","data-testid":"text-txt-name",children:i.name}),l.jsx(ie,{type:"button",variant:"ghost",size:"sm",onClick:()=>{s(null),o(""),v.setValue("fileUrl","")},"data-testid":"button-remove-txt",children:l.jsx(us,{className:"h-4 w-4"})})]}):l.jsxs(ie,{type:"button",variant:"outline",onClick:()=>{var _;return(_=document.getElementById("txt-upload"))==null?void 0:_.click()},className:"w-full",disabled:h,"data-testid":"button-upload-txt",children:[l.jsx(PO,{className:"h-4 w-4 mr-2"}),h?"Processing...":"Upload TXT"]}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Upload a .txt file. Content will be enhanced with AI and processed into searchable chunks."})]}),l.jsx(xt,{value:"link",className:"space-y-2",children:l.jsx(Je,{placeholder:"https://example.com/document.pdf",...v.register("fileUrl"),"data-testid":"input-document-link"})}),l.jsxs(xt,{value:"text",className:"space-y-2",children:[l.jsx(un,{placeholder:"Enter the text content to add to the knowledge base...",rows:8,...v.register("fileUrl"),"data-testid":"textarea-document-text"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter text content directly. This will be saved as a knowledge base document."})]})]}),v.formState.errors.fileUrl&&l.jsx("p",{className:"text-sm text-destructive",children:v.formState.errors.fileUrl.message}),l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx(ie,{type:"button",variant:"outline",onClick:j,"data-testid":"button-cancel-add-document",children:"Cancel"}),l.jsx(ie,{type:"submit",disabled:y.isPending||h,"data-testid":"button-submit-add-document",children:y.isPending?"Adding...":"Add Document"})]})]})]})})}function zr(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function que(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const pv=43200,K2=1440;let Kue={};function Gue(){return Kue}function G2(e){const t=zr(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function sy(e,t){const r=zr(e),n=zr(t),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}function Yue(e){return que(e,Date.now())}function Xue(e,t){const r=zr(e),n=zr(t),i=r.getFullYear()-n.getFullYear(),s=r.getMonth()-n.getMonth();return i*12+s}function Que(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function Zue(e,t){return+zr(e)-+zr(t)}function Jue(e){const t=zr(e);return t.setHours(23,59,59,999),t}function ede(e){const t=zr(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function tde(e){const t=zr(e);return+Jue(t)==+ede(t)}function rde(e,t){const r=zr(e),n=zr(t),i=sy(r,n),s=Math.abs(Xue(r,
542n));let a;if(s<1)a=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*s);let o=sy(r,n)===-i;tde(zr(e))&&s===1&&sy(e,n)===1&&(o=!1),a=i*(s-Number(o))}return a===0?0:a}function nde(e,t,r){const n=Zue(e,t)/1e3;return Que(r==null?void 0:r.roundingMethod)(n)}const ide={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},sde=(e,t,r)=>{let n;const i=ide[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function I1(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const ade={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ode={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},lde={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},cde={date:I1({formats:ade,defaultWidth:"full"}),time:I1({formats:ode,defaultWidth:"full"}),dateTime:I1({formats:lde,defaultWidth:"full"})},ude={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dde=(e,t,r,n)=>ude[e];function ph(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let i;if(n==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[o]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const fde={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},hde={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},pde={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},mde={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},gde={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},vde={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},yde=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},xde={ordinalNumber:yde,era:ph({values:fde,defaultWidth:"wide"}),quarter:ph({values:hde,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ph({values:pde,defaultWidth:"wide"}),day:ph({values:mde,defaultWidth:"wide"}),dayPeriod:ph({values:gde,defaultWidth:"wide",formattingValues:vde,defaultFormattingWidth:"wide"})};function mh(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],o=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(o)?wde(o,f=>f.test(a)):bde(o,f=>f.test(a));let u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;const d=t.slice(a.length);return{value:u,rest:d}}}function bde(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function wde(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Sde(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=r.valueCallback?r.valueCallback(a):a;const o=t.slice(i.length);return{value:a,rest:o}}}const jde=/^(\d+)(th|st|nd|rd)?/i,_de=/\d+/i,Ede={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Nde={any:[/^b/i,/^(a|c)/i]},Ode={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ade={any:[/1/i,/2/i,/3/i,/4/i]},Cde={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Pde={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Tde={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},kde={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Rde={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},$de={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ide={ordinalNumber:Sde({matchPattern:jde,parsePattern:_de,valueCallback:e=>parseInt(e,10)}),era:mh({matchPatterns:Ede,defaultMatchWidth:"wide",parsePatterns:Nde,defaultParseWidth:"any"}),quarter:mh({matchPatterns:Ode,defaultMatchWidth:"wide",parsePatterns:Ade,defaultParseWidth:"any",valueCallback:e=>e+1}),month:mh({matchPatterns:Cde,defaultMatchWidth:"wide",parsePatterns:Pde,defaultParseWidth:"any"}),day:mh({matchPatterns:Tde,defaultMatchWidth:"wide",parsePatterns:kde,defaultParseWidth:"any"}),dayPeriod:mh({matchPatterns:Rde,defaultMatchWidth:"any",parsePatterns:$de,defaultParseWidth:"any"})},Mde={code:"en-US",formatDistance:sde,formatLong:cde,formatRelative:dde,localize:xde,match:Ide,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Dde(e,t,r){const n=Gue(),i=(r==null?void 0:r.locale)??n.locale??Mde,s=2520,a=sy(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const o=Object.assign({},r,{addSuffix:r==null?void 0:r.addSuffix,comparison:a});let c,u;a>0?(c=zr(t),u=zr(e)):(c=zr(e),u=zr(t));const d=nde(u,c),f=(G2(u)-G2(c))/1e3,h=Math.round((d-f)/60);let p;if(h<2)return r!=null&&r.includeSeconds?d<5?i.formatDistance("lessThanXSeconds",5,o):d<10?i.formatDistance("lessThanXSeconds",10,o):d<20?i.formatDistance("lessThanXSeconds",20,o):d<4
5420?i.formatDistance("halfAMinute",0,o):d<60?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",1,o):h===0?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",h,o);if(h<45)return i.formatDistance("xMinutes",h,o);if(h<90)return i.formatDistance("aboutXHours",1,o);if(h<K2){const g=Math.round(h/60);return i.formatDistance("aboutXHours",g,o)}else{if(h<s)return i.formatDistance("xDays",1,o);if(h<pv){const g=Math.round(h/K2);return i.formatDistance("xDays",g,o)}else if(h<pv*2)return p=Math.round(h/pv),i.formatDistance("aboutXMonths",p,o)}if(p=rde(u,c),p<12){const g=Math.round(h/pv);return i.formatDistance("xMonths",g,o)}else{const g=p%12,m=Math.trunc(p/12);return g<3?i.formatDistance("aboutXYears",m,o):g<9?i.formatDistance("overXYears",m,o):i.formatDistance("almostXYears",m+1,o)}}function Qp(e,t){return Dde(e,Yue(e),t)}function Lde({chunk:e,documentId:t,onSaveSuccess:r}){const{toast:n}=kn(),[i,s]=b.useState(e.content),[a,o]=b.useState(e.category),[c,u]=b.useState(e.priority),[d,f]=b.useState(e.keywords||[]),[h,p]=b.useState(""),[g,m]=b.useState(!1),v=fr({mutationFn:async O=>{const C=await Ws("PUT",`/api/documents/${t}/chunks/${e.id}`,O);if(!C.ok){const k=await C.json();throw new Error(k.error||"Failed to update chunk")}return C.json()},onSuccess:()=>{m(!1),r&&r()},onError:O=>{n({title:"Error",description:O.message,variant:"destructive"})}}),y=O=>{s(O),m(!0)},x=O=>{o(O),m(!0)},w=O=>{u(O),m(!0)},S=()=>{h.trim()&&!d.includes(h.trim())&&(f([...d,h.trim()]),p(""),m(!0))},j=O=>{f(d.filter(C=>C!==O)),m(!0)},E=()=>{v.mutate({content:i,category:a,priority:c,keywords:d})},_=i.split(/\s+/).filter(O=>O.length>0).length,N=i.length;return l.jsxs(ue,{className:"relative",children:[l.jsx(ye,{children:l.jsxs("div",{className:"flex items-start justify-between",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsxs(Ve,{className:"text-lg",children:["Chunk ",e.chunkIndex+1," of ",e.totalChunks]}),l.jsxs(jn,{className:"flex items-center gap-2",children:[l.jsx(Vc,{className:"h-3 w-3"}),"Last updated ",Qp(new Date(e.lastUpdated),{addSuffix:!0})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[e.isCurated&&l.jsx(Ee,{variant:"outline",className:"text-xs",children:"Curated"}),g&&l.jsx(Ee,{variant:"secondary",className:"text-xs",children:"Unsaved changes"})]})]})}),l.jsxs(de,{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:`content-${e.id}`,children:"Content"}),l.jsx(un,{id:`content-${e.id}`,value:i,onChange:O=>y(O.target.value),className:"min-h-[200px] font-mono text-sm",placeholder:"Enter chunk content..."}),l.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[l.jsxs("span",{children:[_," words"]}),l.jsxs("span",{children:[N," characters"]})]})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:`category-${e.id}`,children:"Category"}),l.jsxs(Zt,{value:a,onValueChange:x,children:[l.jsx(qt,{id:`category-${e.id}`,children:l.jsx(Jt,{})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"keynotes",children:"Keynotes"}),l.jsx(te,{value:"schedule",children:"Schedule"}),l.jsx(te,{value:"general",children:"General"}),l.jsx(te,{value:"registration",children:"Registration"}),l.jsx(te,{value:"exhibitor",children:"Exhibitor"}),l.jsx(te,{value:"exhibitor_deadlines",children:"Exhibitor Deadlines"}),l.jsx(te,{value:"accommodations",children:"Accommodations"}),l.jsx(te,{value:"sponsorship",children:"Sponsorship"})]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:`priority-${e.id}`,children:"Priority"}),l.jsxs(Zt,{value:c,onValueChange:w,children:[l.jsx(qt,{id:`priority-${e.id}`,children:l.jsx(Jt,{})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"tier1",children:"Tier 1 (High Priority)"}),l.jsx(te,{value:"tier2",children:"Tier 2 (Standard)"})]})]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{children:"Keywords"}),l.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[d.map((O,C)=>l.jsxs(Ee,{variant:"secondary",className:"gap-1",children:[O,l.jsx("button",{type:"button",onClick:()=>j(O),className:"ml-1 hover:text-destructive",children:l.jsx(us,{className:"h-3 w-3"})})]},C)),d.length===0&&l.jsx("span",{className:"text-sm text-muted-foreground",children:"No keywords added"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Je,{value:h,onChange:O=>p(O.target.value),onKeyDown:O=>{O.key==="Enter"&&(O.preventDefault(),S())},placeholder:"Add keyword...",className:"flex-1"}),l.jsxs(ie,{type:"button",variant:"outline",size:"sm",onClick:S,disabled:!h.trim(),children:[l.jsx(AO,{className:"h-4 w-4 mr-2"}),"Add"]})]})]}),l.jsx("div",{className:"flex justify-end pt-4 border-t",children:l.jsx(ie,{onClick:E,disabled:!g||v.isPending,children:v.isPending?l.jsxs(l.Fragment,{children:[l.jsx(Jm,{className:"h-4 w-4 mr-2 animate-spin"}),"Saving..."]}):l.jsxs(l.Fragment,{children:[l.jsx(Vy,{className:"h-4 w-4 mr-2"}),"Save Changes"]})})})]})]})}function Fde({open:e,onOpenChange:t,document:r}){const[n,i]=b.useState([]),[s,a]=b.useState(""),{toast:o}=kn(),c=vn(),u=(r==null?void 0:r.documentType)==="knowledge",{data:d,isLoading:f}=Ke({queryKey:[`/api/documents/${r==null?void 0:r.id}/chunks`],enabled:e&&u&&!!(r!=null&&r.id)});b.useEffect(()=>{r&&e&&i(r.tags||[])},[r,e]);const h=()=>{i([]),a(""),t(!1)},p=()=>{s.trim()&&!n.includes(s.trim())&&(i([...n,s.trim()]),a(""))},g=m=>{i(n.filter(v=>v!==m))};return r?l.jsx(Ai,{open:e,onOpenChange:h,children:l.jsxs(Jn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[l.jsx(ei,{children:l.jsx(ti,{children:u?"Edit Knowledge Document":"Edit Document"})}),u?l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"space-y-4 p-4 bg-muted/30 rounded-lg",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{children:"Document Name"}),l.jsx(Je,{value:r.name,disabled:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{children:"Category"}),l.jsx(Je,{value:r.category,disabled:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{children:"Tags"}),l.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(m=>l.jsxs(Ee,{variant:"secondary",className:"gap-1",children:[m,l.jsx("button",{type:"button",onClick:()=>g(m),className:"ml-1 hover:text-destructive",children:l.jsx(us,{className:"h-3 w-3"})})]},m))}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Je,{value:s,onChange:m=>a(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),p())},placeholder:"Add a tag..."}),l.jsx(ie,{type:"button",variant:"outline",onClick:p,children:"Add"})]})]})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-lg font-semibold",children:"Document Chunks"}),d&&l.jsxs(Ee,{variant:"secondary",children:[d.chunks.length," ",d.chunks.length===1?"chunk":"chunks"]})]}),f?l.jsxs("div",{className:"flex items-center justify-center py-12",children:[l.jsx(Jm,{className:"h-8 w-8 animate-spin"}),l.jsx("span",{className:"ml-2",children:"Loading chunks..."})]}):d&&d.chunks.length>0?l.jsx("div",{className:"space-y-4",children:d.chunks.map(m=>l.jsx(Lde,{chunk:m,documentId:r.id,onSaveSuccess:()=>{c.invalidateQueries({queryKey:[`/api/documents/${r.id}/chunks`]}),c.invalidateQueries({queryKey:["/api/documents"]}),o({title:"Chunk updated",description:"The chunk has been successfully updated."})}},m.id))}):l.jsx("div",{className:"text-center py-12 border-2 border-dashed rounded-lg",children:l.jsx("p",{className:"text-muted-foreground",children:"No chunks found for this document."})})]}),l.jsx("div",{className:"flex justify-end pt-4 border-t",children:l.jsx(ie,{variant:"outline",onClick:h,children:"Close"})})]}):l.jsxs("div",{className:"space-y-4",children:[l.jsx("div",{className:"text-center py-12",children:l.jsx("p",{className:"text-muted-foreground",children:"This document type doesn't support chunk editing."})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(ie,{variant:"outline",onClick:h,children:"Close"})})]})]})}):null}function Bde({open:e,onOpenChange:t,pdfUrl:r,title:n,documentId:i,documentType:s}){const[a,o]=b.useState(null),[c,u]=b.useState(!1);b.useEffect(()=>{e&&s==="knowledge"&&i&&d()},[e,s,i]);const d=async()=>{u(!0);try{const h=await Ws("GET",`/api/documents/${i}`);if(h.ok){const p=await h.json();o(p)}else console.error("Failed to fetch knowledge content:",h.status)}catch(h){console.error("Error fetching knowledge content:",h)}finally{u(!1)}},f=s==="knowledge";return l.jsx(Ai,{open:e,onOpenChange:t,children:l.jsxs(Jn,{className:"max-w-4xl h-[90vh]","data-testid":"dialog-pdf-preview",children:[l.jsx(ei,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[f?l.jsx(ap,{className:"h-5 w-5 text-primary"}):l.jsx(Lp,{className:"h-5 w-5 text-primary"}),l.jsx(ti,{"data-testid":"text-pdf-preview-title",children:n})]})}),f?l.jsx("div",{className:"flex-1 h-full overflow-hidden",children:c?l.jsxs("div",{className:"flex items-center justify-center h-full",children:[l.jsx(Jm,{className:"h-8 w-8 animate-spin"}),l.jsx("span",{className:"ml-2",children:"Loading content..."})]}):a?l.jsxs("div",{className:"h-full overflow-y-auto space-y-4",children:[l.jsxs("div",{className:"flex flex-wrap gap-2 p-4 bg-muted/30 rounded-lg",children:[l.jsxs(Ee,{variant:"secondary",className:"flex items-center gap-1",children:[l.jsx(AO,{className:"h-3 w-3"}),a.category]}),l.jsx(Ee,{variant:a.priority==="tier1"?"default":"outline",children:a.priority}),l.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[l.jsx(Vc,{className:"h-3 w-3"}
542),"Updated ",Qp(new Date(a.lastUpdated),{addSuffix:!0})]})]}),a.keywords&&a.keywords.length>0&&l.jsxs("div",{className:"p-4 bg-muted/20 rounded-lg",children:[l.jsx("h4",{className:"text-sm font-semibold mb-2",children:"Keywords:"}),l.jsx("div",{className:"flex flex-wrap gap-1",children:a.keywords.map((h,p)=>l.jsx(Ee,{variant:"outline",className:"text-xs",children:h},p))})]}),l.jsxs("div",{className:"p-4 rounded-lg border",children:[l.jsx("h4",{className:"text-sm font-semibold mb-3",children:"Content:"}),l.jsx("div",{className:"prose prose-sm max-w-none",children:l.jsx("pre",{className:"whitespace-pre-wrap font-sans text-sm leading-relaxed",children:a.content})})]})]}):l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsx("p",{children:"Failed to load content"})})}):l.jsx("div",{className:"flex-1 h-full overflow-hidden rounded-md border",children:l.jsx("iframe",{src:r,className:"w-full h-full",title:"PDF Preview","data-testid":"iframe-pdf-preview"})})]})})}function zde(){const[e,t]=b.useState(""),[r,n]=b.useState("all"),[i,s]=b.useState(!1),[a,o]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(null),[h,p]=b.useState(""),{data:g=[],isLoading:m}=Ke({queryKey:["/api/documents"]}),{data:v=[],isLoading:y}=Ke({queryKey:["/api/admin/knowledge-gaps"],select:_=>_.success?_.data:[]});b.useEffect(()=>{const _=setTimeout(()=>{p(e)},300);return()=>clearTimeout(_)},[e]);const{data:x=[],isLoading:w}=Ke({queryKey:["/api/search/documents",{query:h}],enabled:h.trim().length>0}),S=(()=>{if(h.trim().length>0){const _=new Set(x.map(C=>C.id)),N=g.filter(C=>C.name.toLowerCase().includes(e.toLowerCase())&&!_.has(C.id));return[...x,...N].filter(C=>r==="all"||C.category.toLowerCase()===r.toLowerCase())}else return g.filter(_=>r==="all"||_.category.toLowerCase()===r.toLowerCase())})(),j=_=>{_.documentType==="pdf"||_.documentType==="knowledge"?(f(_),u(!0)):window.open(_.fileUrl,"_blank")},E=_=>{f(_),o(!0)};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"Knowledge Base"}),l.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"Manage AI knowledge and content"})]}),l.jsxs(ie,{size:"sm",className:"sm:size-default",onClick:()=>s(!0),"data-testid":"button-upload-document",children:[l.jsx(PO,{className:"h-4 w-4 mr-2"}),l.jsx("span",{className:"hidden sm:inline",children:"Upload Document"}),l.jsx("span",{className:"sm:hidden",children:"Upload"})]})]}),l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{className:"relative flex-1 max-w-md",children:[l.jsx(eg,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx(Je,{placeholder:"Search documents...",value:e,onChange:_=>t(_.target.value),className:"pl-9","data-testid":"input-search-documents"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(Zt,{value:r,onValueChange:n,children:[l.jsx(qt,{className:"w-[180px]","data-testid":"select-category",children:l.jsx(Jt,{placeholder:"Category"})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"all",children:"All Categories"}),l.jsx(te,{value:"keynotes",children:"Keynotes"}),l.jsx(te,{value:"schedule",children:"Schedule"}),l.jsx(te,{value:"general",children:"General"}),l.jsx(te,{value:"registration",children:"Registration"}),l.jsx(te,{value:"exhibitor",children:"Exhibitor"}),l.jsx(te,{value:"exhibitor_deadlines",children:"Exhibitor Deadlines"}),l.jsx(te,{value:"accommodations",children:"Accommodations"}),l.jsx(te,{value:"sponsorship",children:"Sponsorship"})]})]}),l.jsxs(ie,{variant:"outline","data-testid":"button-filters",children:[l.jsx(Zm,{className:"h-4 w-4 mr-2"}),"Filters"]})]})]}),l.jsxs(ul,{defaultValue:"all",className:"space-y-4",children:[l.jsxs(Ha,{children:[l.jsx(yt,{value:"all","data-testid":"tab-all",children:"All Documents"}),l.jsx(yt,{value:"pending","data-testid":"tab-pending",children:"Pending Review"}),l.jsx(yt,{value:"gaps","data-testid":"tab-gaps",children:"Knowledge Gaps"})]}),l.jsx(xt,{value:"all",className:"space-y-4",children:m||w&&h.trim().length>0?l.jsx("div",{className:"flex items-center justify-center h-64",children:l.jsx("p",{className:"text-muted-foreground",children:w?"Searching...":"Loading documents..."})}):S.length===0?l.jsx("div",{className:"flex items-center justify-center h-64 border-2 border-dashed rounded-lg",children:l.jsxs("div",{className:"text-center",children:[l.jsx(ap,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),l.jsx("p",{className:"text-muted-foreground",children:e.trim().length>0?"No documents match your search":"No documents found"})]})}):l.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:S.map(_=>l.jsx(Fue,{title:_.name,category:_.category,tags:_.tags,lastUpdated:Qp(new Date(_.lastUpdated),{addSuffix:!0}),queryCount:_.queryCount,onEdit:()=>E(_),onView:()=>j(_)}
542,_.id))})}),l.jsx(xt,{value:"pending",children:l.jsx("div",{className:"flex items-center justify-center h-64 border-2 border-dashed rounded-lg",children:l.jsxs("div",{className:"text-center",children:[l.jsx(ap,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),l.jsx("p",{className:"text-muted-foreground",children:"No documents pending review"})]})})}),l.jsx(xt,{value:"gaps",className:"space-y-4",children:y?l.jsx("div",{className:"flex items-center justify-center h-64",children:l.jsx("p",{className:"text-muted-foreground",children:"Loading knowledge gaps..."})}):v.length===0?l.jsx("div",{className:"flex items-center justify-center h-64 border-2 border-dashed rounded-lg",children:l.jsxs("div",{className:"text-center",children:[l.jsx(ap,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),l.jsx("p",{className:"text-muted-foreground",children:"No knowledge gaps identified"}),l.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Knowledge gaps appear when users ask questions that can't be answered well b
542y the current knowledge base."})]})}):l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"text-sm text-muted-foreground mb-4",children:["Showing ",v.length," knowledge gaps from recent queries"]}),v.map((_,N)=>l.jsx("div",{className:"p-4 border rounded-lg bg-card",children:l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-start justify-between",children:[l.jsxs("h4",{className:"font-medium text-sm",children:["Query #",_.id]}),l.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[_.category&&l.jsx("span",{className:"px-2 py-1 bg-muted rounded",children:_.category}),l.jsxs("span",{children:["Score: ",_.top_score||"N/A"]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{children:[l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Original Query:"}),l.jsx("p",{className:"text-sm",children:_.original_query})]}),_.reformulated_query&&_.reformulated_query!==_.original_query&&l.jsxs("div",{children:[l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Reformulated Query:"}),l.jsx("p",{className:"text-sm text-blue-600",children:_.reformulated_query})]})]}),l.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground pt-2 border-t",children:[l.jsxs("div",{className:"flex items-center gap-4",children:[_.llm_enhanced&&l.jsx("span",{className:"px-2 py-1 bg-blue-100 text-blue-700 rounded",children:"LLM Enhanced"}),_.enhancement_method&&l.jsxs("span",{children:["Method: ",_.enhancement_method]}),_.result_count!==null&&l.jsxs("span",{children:["Results: ",_.result_count]})]}),l.jsx("span",{children:Qp(new Date(_.created_at),{addSuffix:!0})})]})]})},_.id||N))]})})]}),l.jsx(Hue,{open:i,onOpenChange:s}),l.jsx(Fde,{open:a,onOpenChange:o,document:d}),l.jsx(Bde,{open:c,onOpenChange:u,pdfUrl:(d==null?void 0:d.fileUrl)||"",title:(d==null?void 0:d.name)||"",documentId:d==null?void 0:d.id,documentType:d==null?void 0:d.documentType})]})}const vg=b.forwardRef(({className:e,...t},r)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:r,className:se("w-full caption-bottom text-sm",e),...t})}));vg.displayName="Table";const yg=b.forwardRef(({className:e,...t},r)=>l.jsx("thead",{ref:r,className:se("[&_tr]:border-b",e),...t}));yg.displayName="TableHeader";const xg=b.forwardRef(({className:e,...t},r)=>l.jsx("tbody",{ref:r,className:se("[&_tr:last-child]:border-0",e),...t}));xg.displayName="TableBody";const Ude=b.forwardRef(({className:e,...t},r)=>l.jsx("tfoot",{ref:r,className:se("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Ude.displayName="TableFooter";const ns=b.forwardRef(({className:e,...t},r)=>l.jsx("tr",{ref:r,className:se("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));ns.displayName="TableRow";const or=b.forwardRef(({className:e,...t},r)=>l.jsx("th",{ref:r,className:se("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));or.displayName="TableHead";const Vt=b.forwardRef(({className:e,...t},r)=>l.jsx("td",{ref:r,className:se("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Vt.displayName="TableCell";const Vde=b.forwardRef(({className:e,...t},r)=>l.jsx("caption",{ref:r,className:se("mt-4 text-sm text-muted-foreground",e),...t}));Vde.displayName="TableCaption";const Y2={phone:{label:"Phone",icon:os},chat:{label:"Chat",icon:os},sms:{label:"SMS",icon:os}},X2={resolved:{variant:"default",label:"Resolved"},transferred:{variant:"secondary",label:"Transferred"},ongoing:{variant:"outline",label:"Ongoing"}};function Wde({callId:e,caller:t,duration:r,channel:n,outcome:i,timestamp:s,onViewDetails:a}){const o=Y2[n].icon;return l.jsxs(ns,{className:"hover-elevate","data-testid":`call-row-${e}`,children:[l.jsx(Vt,{className:"font-mono text-sm",children:e}),l.jsx(Vt,{children:t}),l.jsx(Vt,{children:l.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[l.jsx(Hs,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:r})]})}),l.jsx(Vt,{children:l.jsxs(Ee,{variant:"secondary",className:"gap-1.5",children:[l.jsx(o,{className:"h-3 w-3"}),l.jsx("span",{children:Y2[n].label})]})}),l.jsx(Vt,{children:l.jsxs(Ee,{variant:X2[i].variant,className:"gap-1.5",children:[i==="resolved"&&l.jsx(b5,{className:"h-3 w-3"}),i==="transferred"&&l.jsx(v5,{className:"h-3 w-3"}),l.jsx("span",{children:X2[i].label})]})}),l.jsx(Vt,{className:"text-muted-foreground",children:s}),l.jsx(Vt,{children:l.jsx(ie,{variant:"ghost",size:"sm",onClick:a,"data-testid":`button-view-call-${e}`,children:"View"})})]})}var Hde=Array.isArray,Rn=Hde,qde=typeof Th=="object"&&Th&&Th.Object===Object&&Th,d8
vendor: 5,495 bytes, line 542
542=qde,Kde=d8,Gde=typeof self=="object"&&self&&self.Object===Object&&self,Yde=Kde||Gde||Function("return this")(),Xs=Yde,Xde=Xs,Qde=Xde.Symbol,bg=Qde,Q2=bg,f8=Object.prototype,Zde=f8.hasOwnProperty,Jde=f8.toString,gh=Q2?Q2.toStringTag:void 0;function efe(e){var t=Zde.call(e,gh),r=e[gh];try{e[gh]=void 0;var n=!0}catch{}var i=Jde.call(e);return n&&(t?e[gh]=r:delete e[gh]),i}var tfe=efe,rfe=Object.prototype,nfe=rfe.toString;function ife(e){return nfe.call(e)}var sfe=ife,Z2=bg,afe=tfe,ofe=sfe,lfe="[object Null]",cfe="[object Undefined]",J2=Z2?Z2.toStringTag:void 0;function ufe(e){return e==null?e===void 0?cfe:lfe:J2&&J2 in Object(e)?afe(e):ofe(e)}var qa=ufe;function dfe(e){return e!=null&&typeof e=="object"}var Ka=dfe,ffe=qa,hfe=Ka,pfe="[object Symbol]";function mfe(e){return typeof e=="symbol"||hfe(e)&&ffe(e)==pfe}var Df=mfe,gfe=Rn,vfe=Df,yfe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xfe=/^\w*$/;function bfe(e,t){if(gfe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||vfe(e)?!0:xfe.test(e)||!yfe.test(e)||t!=null&&e in Object(t)}var NA=bfe;function wfe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var dl=wfe;const Lf=pt(dl);var Sfe=qa,jfe=dl,_fe="[object AsyncFunction]",Efe="[object Function]",Nfe="[object GeneratorFunction]",Ofe="[object Proxy]";function Afe(e){if(!jfe(e))return!1;var t=Sfe(e);return t==Efe||t==Nfe||t==_fe||t==Ofe}var OA=Afe;const qe=pt(OA);var Cfe=Xs,Pfe=Cfe["__core-js_shared__"],Tfe=Pfe,M1=Tfe,eR=function(){var e=/[^.]+$/.exec(M1&&M1.keys&&M1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function kfe(e){return!!eR&&eR in e}var Rfe=kfe,$fe=Function.prototype,Ife=$fe.toString;function Mfe(e){if(e!=null){try{return Ife.call(e)}catch{}try{return e+""}catch{}}return""}var h8=Mfe,Dfe=OA,Lfe=Rfe,Ffe=dl,Bfe=h8,zfe=/[\\^$.*+?()[\]{}|]/g,Ufe=/^\[object .+?Constructor\]$/,Vfe=Function.prototype,Wfe=Object.prototype,Hfe=Vfe.toString,qfe=Wfe.hasOwnProperty,Kfe=RegExp("^"+Hfe.call(qfe).replace(zfe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Gfe(e){if(!Ffe(e)||Lfe(e))return!1;var t=Dfe(e)?Kfe:Ufe;return t.test(Bfe(e))}var Yfe=Gfe;function Xfe(e,t){return e==null?void 0:e[t]}var Qfe=Xfe,Zfe=Yfe,Jfe=Qfe;function ehe(e,t){var r=Jfe(e,t);return Zfe(r)?r:void 0}var Kc=ehe,the=Kc,rhe=the(Object,"create"),_b=rhe,tR=_b;function nhe(){this.__data__=tR?tR(null):{},this.size=0}var ihe=nhe;function she(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ahe=she,ohe=_b,lhe="__lodash_hash_undefined__",che=Object.prototype,uhe=che.hasOwnProperty;function dhe(e){var t=this.__data__;if(ohe){var r=t[e];return r===lhe?void 0:r}return uhe.call(t,e)?t[e]:void 0}var fhe=dhe,hhe=_b,phe=Object.prototype,mhe=phe.hasOwnProperty;function ghe(e){var t=this.__data__;return hhe?t[e]!==void 0:mhe.call(t,e)}var vhe=ghe,yhe=_b,xhe="__lodash_hash_undefined__";function bhe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=yhe&&t===void 0?xhe:t,this}var whe=bhe,She=ihe,jhe=ahe,_he=fhe,Ehe=vhe,Nhe=whe;function Ff(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ff.prototype.clear=She;Ff.prototype.delete=jhe;Ff.prototype.get=_he;Ff.prototype.has=Ehe;Ff.prototype.set=Nhe;var Ohe=Ff;function Ahe(){this.__data__=[],this.size=0}var Che=Ahe;function Phe(e,t){return e===t||e!==e&&t!==t}var AA=Phe,The=AA;function khe(e,t){for(var r=e.length;r--;)if(The(e[r][0],t))return r;return-1}var Eb=khe,Rhe=Eb,$he=Array.prototype,Ihe=$he.splice;function Mhe(e){var t=this.__data__,r=Rhe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Ihe.call(t,r,1),--this.size,!0}var Dhe=Mhe,Lhe=Eb;function Fhe(e){var t=this.__data__,r=Lhe(t,e);return r<0?void 0:t[r][1]}var Bhe=Fhe,zhe=Eb;function Uhe(e){return zhe(this.__data__,e)>-1}var Vhe=Uhe,Whe=Eb;function Hhe(e,t){var r=this.__data__,n=Whe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var qhe=Hhe,Khe=Che,Ghe=Dhe,Yhe=Bhe,Xhe=Vhe,Qhe=qhe;function Bf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Bf.prototype.clear=Khe;Bf.prototype.delete=Ghe;Bf.prototype.get=Yhe;Bf.prototype.has=Xhe;Bf.prototype.set=Qhe;var Nb=Bf,Zhe=Kc,Jhe=Xs,epe=Zhe(Jhe,"Map"),CA=epe,rR=Ohe,tpe=Nb,rpe=CA;function npe(){this.size=0,this.__data__={hash:new rR,map:new(rpe||tpe),string:new rR}}var ipe=npe;function spe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ape=spe,ope=ape;function lpe(e,t){var r=e.__data__;return ope(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ob=lpe,cpe=Ob;function upe(e){var t=cpe(this,e).delete(e);return this.size-=t?1:0,t}var dpe=upe,fpe=Ob;function hpe(e){return fpe(this,e).get(e)}var ppe=hpe,mpe=Ob;function gpe(e){return mpe(this,e).has(e)}var vpe=gpe,ype=Ob;function xpe(e,t){var r=ype(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var bpe=xpe,wpe=ipe,Spe=dpe,jpe=ppe,_pe=vpe,Epe=bpe;function zf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}zf.prototype.clear=wpe;zf.prototype.delete=Spe;zf.prototype.get=jpe;zf.prototype.has=_pe;zf.prototype.set=Epe;var PA=zf,p8=PA,Npe="Expected a function";function TA(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Npe);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};
vendor: 6,900 bytes, lines 542-550
542return r.cache=new(TA.Cache||p8),r}TA.Cache=p8;var m8=TA;const Ope=pt(m8);var Ape=m8,Cpe=500;function Ppe(e){var t=Ape(e,function(n){return r.size===Cpe&&r.clear(),n}),r=t.cache;return t}var Tpe=Ppe,kpe=Tpe,Rpe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$pe=/\\(\\)?/g,Ipe=kpe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Rpe,function(r,n,i,s){t.push(i?s.replace($pe,"$1"):n||r)}),t}),Mpe=Ipe;function Dpe(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var kA=Dpe,nR=bg,Lpe=kA,Fpe=Rn,Bpe=Df,iR=nR?nR.prototype:void 0,sR=iR?iR.toString:void 0;function g8(e){if(typeof e=="string")return e;if(Fpe(e))return Lpe(e,g8)+"";if(Bpe(e))return sR?sR.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var zpe=g8,Upe=zpe;function Vpe(e){return e==null?"":Upe(e)}var v8=Vpe,Wpe=Rn,Hpe=NA,qpe=Mpe,Kpe=v8;function Gpe(e,t){return Wpe(e)?e:Hpe(e,t)?[e]:qpe(Kpe(e))}var y8=Gpe,Ype=Df;function Xpe(e){if(typeof e=="string"||Ype(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Ab=Xpe,Qpe=y8,Zpe=Ab;function Jpe(e,t){t=Qpe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Zpe(t[r++])];return r&&r==n?e:void 0}var RA=Jpe,eme=RA;function tme(e,t,r){var n=e==null?void 0:eme(e,t);return n===void 0?r:n}var x8=tme;const Yn=pt(x8);function rme(e){return e==null}var nme=rme;const Qe=pt(nme);var ime=qa,sme=Rn,ame=Ka,ome="[object String]";function lme(e){return typeof e=="string"||!sme(e)&&ame(e)&&ime(e)==ome}var cme=lme;const Ac=pt(cme);var b8={exports:{}},At={};/**
543 * @license React
544 * react-is.production.min.js
545 *
546 * Copyright (c) Facebook, Inc. and its affiliates.
547 *
548 * This source code is licensed under the MIT license found in the
549 * LICENSE file in the root directory of this source tree.
550 */var $A=Symbol.for("react.element"),IA=Symbol.for("react.portal"),Cb=Symbol.for("react.fragment"),Pb=Symbol.for("react.strict_mode"),Tb=Symbol.for("react.profiler"),kb=Symbol.for("react.provider"),Rb=Symbol.for("react.context"),ume=Symbol.for("react.server_context"),$b=Symbol.for("react.forward_ref"),Ib=Symbol.for("react.suspense"),Mb=Symbol.for("react.suspense_list"),Db=Symbol.for("react.memo"),Lb=Symbol.for("react.lazy"),dme=Symbol.for("react.offscreen"),w8;w8=Symbol.for("react.module.reference");function Ti(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case $A:switch(e=e.type,e){case Cb:case Tb:case Pb:case Ib:case Mb:return e;default:switch(e=e&&e.$$typeof,e){case ume:case Rb:case $b:case Lb:case Db:case kb:return e;default:return t}}case IA:return t}}}At.ContextConsumer=Rb;At.ContextProvider=kb;At.Element=$A;At.ForwardRef=$b;At.Fragment=Cb;At.Lazy=Lb;At.Memo=Db;At.Portal=IA;At.Profiler=Tb;At.StrictMode=Pb;At.Suspense=Ib;At.SuspenseList=Mb;At.isAsyncMode=function(){return!1};At.isConcurrentMode=function(){return!1};At.isContextConsumer=function(e){return Ti(e)===Rb};At.isContextProvider=function(e){return Ti(e)===kb};At.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===$A};At.isForwardRef=function(e){return Ti(e)===$b};At.isFragment=function(e){return Ti(e)===Cb};At.isLazy=function(e){return Ti(e)===Lb};At.isMemo=function(e){return Ti(e)===Db};At.isPortal=function(e){return Ti(e)===IA};At.isProfiler=function(e){return Ti(e)===Tb};At.isStrictMode=function(e){return Ti(e)===Pb};At.isSuspense=function(e){return Ti(e)===Ib};At.isSuspenseList=function(e){return Ti(e)===Mb};At.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Cb||e===Tb||e===Pb||e===Ib||e===Mb||e===dme||typeof e=="object"&&e!==null&&(e.$$typeof===Lb||e.$$typeof===Db||e.$$typeof===kb||e.$$typeof===Rb||e.$$typeof===$b||e.$$typeof===w8||e.getModuleId!==void 0)};At.typeOf=Ti;b8.exports=At;var fme=b8.exports,hme=qa,pme=Ka,mme="[object Number]";function gme(e){return typeof e=="number"||pme(e)&&hme(e)==mme}var S8=gme;const vme=pt(S8);var yme=S8;function xme(e){return yme(e)&&e!=+e}var bme=xme;const Uf=pt(bme);var dn=function(t){return t===0?0:t>0?1:-1},Ul=function(t){return Ac(t)&&t.indexOf("%")===t.length-1},le=function(t){return vme(t)&&!Uf(t)},wme=function(t){return Qe(t)},Cr=function(t){return le(t)||Ac(t)},Sme=0,Gc=function(t){var r=++Sme;return"".concat(t||"").concat(r)},fn=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!le(t)&&!Ac(t))return n;var s;if(Ul(t)){var a=t.indexOf("%");s=r*parseFloat(t.slice(0,a))/100}else s=+t;return Uf(s)&&(s=n),i&&s>r&&(s=r),s},go=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},jme=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i<r;i++)if(!n[t[i]])n[t[i]]=!0;else return!0;return!1},Or=function(t,r){return le(t)&&le(r)?function(n){return t+n*(r-t)}:function(){return r}};function dx(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Yn(n,t))===r})}var _me=function(t,r){return le(t)&&le(r)?t-r:Ac(t)&&Ac(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function Zu(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function p_(e){"@babel/helpers - typeof";return p_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p_(e)}var Eme=["viewBox","children"],Nme=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRen
550dering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],aR=["points","pathLength"],D1={svg:Eme,polygon:aR,polyline:aR},MA=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDrag
550Capture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],fx=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(b.isValidElement(t)&&(n=t.props),!Lf(n))return null;var i={};return Object.keys(n).forEach(function(s){MA.includes(s)&&(i[s]=r||function(a){return n[s](n,a)})}),i},Ome=function(t,r,n){return function(i){return t(r,n,i),null}},Cc=function(t,r,n){if(!Lf(t)||p_(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(s){var a=t[s];MA.includes(s)&&typeof a=="function"&&(i||(i={}),i[s]=Ome(a,r,n))}),i},Ame=["children"],Cme=["children"];function oR(e,t){if(e==null)return{};var r=Pme(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Pme(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function m_(e){"@babel/helpers - typeof";return m_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m_(e)}var lR={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Na=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},cR=null,L1=null,DA=function e(t){if(t===cR&&Array.isArray(L1))return L1;var r=[];return b.Children.forEach(t,function(n){Qe(n)||(fme.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),L1=r,cR=t,r};function Xn(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Na(i)}):n=[Na(t)],DA(e).forEach(function(i){var s=Yn(i,"type.displayName")||Yn(i,"type.name");n.indexOf(s)!==-1&&r.push(i)}),r}function Ln(e,t){var r=Xn(e,t);return r&&r[0]}var uR=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!le(n)||n<=0||!le(i)||i<=0)},Tme=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],kme=function(t){return t&&t.type&&Ac(t.type)&&Tme.indexOf(t.type)>=0},j8=function(t){return t&&m_(t)==="object"&&"clipDot"in t},Rme=function(t,r,n,i){var s,a=(s=D1==null?void 0:D1[i])!==null&&s!==void 0?s:[];return r.startsWith("data-")||!qe(t)&&(i&&a.includes(r)||Nme.includes(r))||n&&MA.includes(r)},Le=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(b.isValidElement(t)&&(i=t.props),!Lf(i))return null;var s={};
550return Object.keys(i).forEach(function(a){var o;Rme((o=i)===null||o===void 0?void 0:o[a],a,r,n)&&(s[a]=i[a])}),s},g_=function e(t,r){if(t===r)return!0;var n=b.Children.count(t);if(n!==b.Children.count(r))return!1;if(n===0)return!0;if(n===1)return dR(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var s=t[i],a=r[i];if(Array.isArray(s)||Array.isArray(a)){if(!e(s,a))return!1}else if(!dR(s,a))return!1}return!0},dR=function(t,r){if(Qe(t)&&Qe(r))return!0;if(!Qe(t)&&!Qe(r)){var n=t.props||{},i=n.children,s=oR(n,Ame),a=r.props||{},o=a.children,c=oR(a,Cme);return i&&o?Zu(s,c)&&g_(i,o):!i&&!o?Zu(s,c):!1}return!1},fR=function(t,r){var n=[],i={};return DA(t).forEach(function(s,a){if(kme(s))n.push(s);else if(s){var o=Na(s.type),c=r[o]||{},u=c.handler,d=c.once;if(u&&(!d||!i[o])){var f=u(s,o,a);n.push(f),i[o]=!0}}}),n},$me=function(t){var r=t&&t.type;return r&&lR[r]?lR[r]:null},Ime=function(t,r){return DA(r).indexOf(t)},Mme=["children","width","height","viewBox","className","style","title","desc"];function v_(){return v_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v_.apply(this,arguments)}function Dme(e,t){if(e==null)return{};var r=Lme(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Lme(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function y_(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,s=e.className,a=e.style,o=e.title,c=e.desc,u=Dme(e,Mme),d=i||{width:r,height:n,x:0,y:0},f=Ze("recharts-surface",s);return P.createElement("svg",v_({},Le(u,!0,"svg"),{className:f,width:r,height:n,style:a,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),P.createElement("title",null,o),P.createElement("desc",null,c),t)}var Fme=["children","className"];function x_(){return x_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x_.apply(this,arguments)}function Bme(e,t){if(e==null)return{};var r=zme(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zme(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var ut=P.forwardRef(function(e,t){var r=e.children,n=e.className,i=Bme(e,Fme),s=Ze("recharts-layer",n);return P.createElement("g",x_({className:s},Le(i,!0),{ref:t}),r)}),ls=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s]};function Ume(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n<i;)s[n]=e[n+t];return s}var Vme=Ume,Wme=Vme;function Hme(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:Wme(e,t,r)}var qme=Hme,Kme="\\ud800-\\udfff",Gme="\\u0300-\\u036f",Yme="\\ufe20-\\ufe2f",Xme="\\u20d0-\\u20ff",Qme=Gme+Yme+Xme,Zme="\\ufe0e\\ufe0f",Jme="\\u200d",ege=RegExp("["+Jme+Kme+Qme+Zme+"]");function tge(e){return ege.test(e)}var _8=tge;function rge(e){return e.split("")}var nge=rge,E8="\\ud800-\\udfff",ige="\\u0300-\\u036f",sge="\\ufe20-\\ufe2f",age="\\u20d0-\\u20ff",oge=ige+sge+age,lge="\\ufe0e\\ufe0f",cge="["+E8+"]",b_="["+oge+"]",w_="\\ud83c[\\udffb-\\udfff]",uge="(?:"+b_+"|"+w_+")",N8="[^"+E8+"]",O8="(?:\\ud83c[\\udde6-\\uddff]){2}",A8="[\\ud800-\\udbff][\\udc00-\\udfff]",dge="\\u200d",C8=uge+"?",P8="["+lge+"]?",fge="(?:"+dge+"(?:"+[N8,O8,A8].join("|")+")"+P8+C8+")*",hge=P8+C8+fge,pge="(?:"+[N8+b_+"?",b_,O8,A8,cge].join("|")+")",mge=RegExp(w_+"(?="+w_+")|"+pge+hge,"g");function gge(e){return e.match(mge)||[]}var vge=gge,yge=nge,xge=_8,bge=vge;function wge(e){return xge(e)?bge(e):yge(e)}var Sge=wge,jge=qme,_ge=_8,Ege=Sge,Nge=v8;function Oge(e){return function(t){t=Nge(t);var r=_ge(t)?Ege(t):void 0,n=r?r[0]:t.charAt(0),i=r?jge(r,1).join(""):t.slice(1);return n[e]()+i}}var Age=Oge,Cge=Age,Pge=Cge("toUpperCase"),Tge=Pge;const Fb=pt(Tge);function $t(e){return function(){return e}}const T8=Math.cos,hx=Math.sin,vs=Math.sqrt,px=Math.PI,Bb=2*px,S_=Math.PI,j_=2*S_,Al=1e-6,kge=j_-Al;function k8(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Rge(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return k8;const r=10**t;return function(n){this._+=n[0];for(let i=1,s=n.length;i<s;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class $ge{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?k8:Rge(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,s,a){this._append`C${+t},${+r},${+n}
550,${+i},${this._x1=+s},${this._y1=+a}`}arcTo(t,r,n,i,s){if(t=+t,r=+r,n=+n,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,c=n-t,u=i-r,d=a-t,f=o-r,h=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>Al)if(!(Math.abs(f*c-u*d)>Al)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-a,g=i-o,m=c*c+u*u,v=p*p+g*g,y=Math.sqrt(m),x=Math.sqrt(h),w=s*Math.tan((S_-Math.acos((m+h-v)/(2*y*x)))/2),S=w/x,j=w/y;Math.abs(S-1)>Al&&this._append`L${t+S*d},${r+S*f}`,this._append`A${s},${s},0,0,${+(f*p>d*g)},${this._x1=t+j*c},${this._y1=r+j*u}`}}arc(t,r,n,i,s,a){if(t=+t,r=+r,n=+n,a=!!a,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(i),c=n*Math.sin(i),u=t+o,d=r+c,f=1^a,h=a?i-s:s-i;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>Al||Math.abs(this._y1-d)>Al)&&this._append`L${u},${d}`,n&&(h<0&&(h=h%j_+j_),h>kge?this._append`A${n},${n},0,1,${f},${t-o},${r-c}A${n},${n},0,1,${f},${this._x1=u},${this._y1=d}`:h>Al&&this._append`A${n},${n},0,${+(h>=S_)},${f},${this._x1=t+n*Math.cos(s)},${this._y1=r+n*Math.sin(s)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function LA(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new $ge(t)}function FA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function R8(e){this._context=e}R8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function zb(e){return new R8(e)}function $8(e){return e[0]}function I8(e){return e[1]}function M8(e,t){var r=$t(!0),n=null,i=zb,s=null,a=LA(o);e=typeof e=="function"?e:e===void 0?$8:$t(e),t=typeof t=="function"?t:t===void 0?I8:$t(t);function o(c){var u,d=(c=FA(c)).length,f,h=!1,p;for(n==null&&(s=i(p=a())),u=0;u<=d;++u)!(u<d&&r(f=c[u],u,c))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+e(f,u,c),+t(f,u,c));if(p)return s=null,p+""||null}return o.x=function(c){return arguments.length?(e=typeof c=="function"?c:$t(+c),o):e},o.y=function(c){return arguments.length?(t=typeof c=="function"?c:$t(+c),o):t},o.defined=function(c){return arguments.length?(r=typeof c=="function"?c:$t(!!c),o):r},o.curve=function(c){return arguments.length?(i=c,n!=null&&(s=i(n)),o):i},o.context=function(c){return arguments.length?(c==null?n=s=null:s=i(n=c),o):n},o}function mv(e,t,r){var n=null,i=$t(!0),s=null,a=zb,o=null,c=LA(u);e=typeof e=="function"?e:e===void 0?$8:$t(+e),t=typeof t=="function"?t:$t(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?I8:$t(+r);function u(f){var h,p,g,m=(f=FA(f)).length,v,y=!1,x,w=new Array(m),S=new Array(m);for(s==null&&(o=a(x=c())),h=0;h<=m;++h){if(!(h<m&&i(v=f[h],h,f))===y)if(y=!y)p=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),g=h-1;g>=p;--g)o.point(w[g],S[g]);o.lineEnd(),o.areaEnd()}y&&(w[h]=+e(v,h,f),S[h]=+t(v,h,f),o.point(n?+n(v,h,f):w[h],r?+r(v,h,f):S[h]))}if(x)return o=null,x+""||null}function d(){return M8().defined(i).curve(a).context(s)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:$t(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:$t(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:$t(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:$t(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:$t(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:$t(+f),u):r},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(r)},u.lineX1=function(){return d().x(n).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:$t(!!f),u):i},u.curve=function(f){return arguments.length?(a=f,s!=null&&(o=a(s)),u):a},u.context=function(f){return arguments.length?(f==null?s=o=null:o=a(s=f),u):s},u}class D8{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Ige(e){return new D8(e,!0)}function Mge(e){return new D8(e,!1)}const BA={draw(e,t){const r=vs(t/px);e.moveTo(r,0),e.arc(0,0,r,0,Bb)}},Dge={draw(e,t){const r=vs(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},L8=vs(1/3),Lge=L8*2,Fge={draw(e,t){const r=vs(t/Lge),n=r*L8;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Bge={draw(e,t){const r=vs(t),n=-r/2;e.rect(n,n,r,r)}},zge=.8908130915292852,F8=hx(px/10)/hx(7*px/10),Uge=hx(Bb/10)*F8,Vge=-T8(Bb/10)*F8,Wge={draw(e,t){const r=vs(t*zge),n=Uge*r,i=Vge*r;e.moveTo(0,-r),e.lineTo(n,i);for(let s=1;s<5;++s){const a=Bb*s/5,o=T8(a),c=hx(a);e.lineTo(c*r,-o*r),e.lineTo(o*n-c*i,c*n+o*i)}e.closePath()}},F1=vs(3),Hge={draw(e,t){const r=-vs(t/(F1*3));e.moveTo(0,r*2),e.lineTo(-F1*r,-r),e.lineTo(F1*r,-r),e.closePath()}},oi=-.5,li=vs(3)/2,__=1/vs(12),qge=(__/2+1)*3,Kge={draw(e,t){const r=vs(t/qge),n=r/2,i=r*__,s=n,a=r*__+r,o=-s,c=a;
vendor: 7,012 bytes, line 550
550e.moveTo(n,i),e.lineTo(s,a),e.lineTo(o,c),e.lineTo(oi*n-li*i,li*n+oi*i),e.lineTo(oi*s-li*a,li*s+oi*a),e.lineTo(oi*o-li*c,li*o+oi*c),e.lineTo(oi*n+li*i,oi*i-li*n),e.lineTo(oi*s+li*a,oi*a-li*s),e.lineTo(oi*o+li*c,oi*c-li*o),e.closePath()}};function Gge(e,t){let r=null,n=LA(i);e=typeof e=="function"?e:$t(e||BA),t=typeof t=="function"?t:$t(t===void 0?64:+t);function i(){let s;if(r||(r=s=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),s)return r=null,s+""||null}return i.type=function(s){return arguments.length?(e=typeof s=="function"?s:$t(s),i):e},i.size=function(s){return arguments.length?(t=typeof s=="function"?s:$t(+s),i):t},i.context=function(s){return arguments.length?(r=s??null,i):r},i}function mx(){}function gx(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function B8(e){this._context=e}B8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:gx(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:gx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Yge(e){return new B8(e)}function z8(e){this._context=e}z8.prototype={areaStart:mx,areaEnd:mx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:gx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xge(e){return new z8(e)}function U8(e){this._context=e}U8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:gx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Qge(e){return new U8(e)}function V8(e){this._context=e}V8.prototype={areaStart:mx,areaEnd:mx,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Zge(e){return new V8(e)}function hR(e){return e<0?-1:1}function pR(e,t,r){var n=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(n||i<0&&-0),a=(r-e._y1)/(i||n<0&&-0),o=(s*i+a*n)/(n+i);return(hR(s)+hR(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function mR(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function B1(e,t,r){var n=e._x0,i=e._y0,s=e._x1,a=e._y1,o=(s-n)/3;e._context.bezierCurveTo(n+o,i+o*t,s-o,a-o*r,s,a)}function vx(e){this._context=e}vx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:B1(this,this._t0,mR(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,B1(this,mR(this,r=pR(this,e,t)),r);break;default:B1(this,this._t0,r=pR(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function W8(e){this._context=new H8(e)}(W8.prototype=Object.create(vx.prototype)).point=function(e,t){vx.prototype.point.call(this,t,e)};function H8(e){this._context=e}H8.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,s){this._context.bezierCurveTo(t,e,n,r,s,i)}};function Jge(e){return new vx(e)}function eve(e){return new W8(e)}function q8(e){this._context=e}q8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=gR(e),i=gR(t),s=0,a=1;a<r;++s,++a)this._context.bezierCurveTo(n[0][s],i[0][s],n[1][s],i[1][s],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function gR(e){var t,r=e.length-1,n,i=new Array(r),s=new Array(r),a=new Array(r);for(i[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,s[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/s[t-1],s[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/s[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/s[t];for(s[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function tve(e){return new q8(e)}function Ub(e,t){this._context=e,this._t=t}Ub.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
vendor: 6,879 bytes, line 550
550default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function rve(e){return new Ub(e,.5)}function nve(e){return new Ub(e,0)}function ive(e){return new Ub(e,1)}function Fd(e,t){if((a=e.length)>1)for(var r=1,n,i,s=e[t[0]],a,o=s.length;r<a;++r)for(i=s,s=e[t[r]],n=0;n<o;++n)s[n][1]+=s[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function E_(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function sve(e,t){return e[t]}function ave(e){const t=[];return t.key=e,t}function ove(){var e=$t([]),t=E_,r=Fd,n=sve;function i(s){var a=Array.from(e.apply(this,arguments),ave),o,c=a.length,u=-1,d;for(const f of s)for(o=0,++u;o<c;++o)(a[o][u]=[0,+n(f,a[o].key,u,s)]).data=f;for(o=0,d=FA(t(a));o<c;++o)a[d[o]].index=o;return r(a,d),a}return i.keys=function(s){return arguments.length?(e=typeof s=="function"?s:$t(Array.from(s)),i):e},i.value=function(s){return arguments.length?(n=typeof s=="function"?s:$t(+s),i):n},i.order=function(s){return arguments.length?(t=s==null?E_:typeof s=="function"?s:$t(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(r=s??Fd,i):r},i}function lve(e,t){if((n=e.length)>0){for(var r,n,i=0,s=e[0].length,a;i<s;++i){for(a=r=0;r<n;++r)a+=e[r][i][1]||0;if(a)for(r=0;r<n;++r)e[r][i][1]/=a}Fd(e,t)}}function cve(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,s=n.length;r<s;++r){for(var a=0,o=0;a<i;++a)o+=e[a][r][1]||0;n[r][1]+=n[r][0]=-o/2}Fd(e,t)}}function uve(e,t){if(!(!((a=e.length)>0)||!((s=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,s,a;n<s;++n){for(var o=0,c=0,u=0;o<a;++o){for(var d=e[t[o]],f=d[n][1]||0,h=d[n-1][1]||0,p=(f-h)/2,g=0;g<o;++g){var m=e[t[g]],v=m[n][1]||0,y=m[n-1][1]||0;p+=v-y}c+=f,u+=p*f}i[n-1][1]+=i[n-1][0]=r,c&&(r-=u/c)}i[n-1][1]+=i[n-1][0]=r,Fd(e,t)}}function Zp(e){"@babel/helpers - typeof";return Zp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zp(e)}var dve=["type","size","sizeType"];function N_(){return N_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},N_.apply(this,arguments)}function vR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vR(Object(r),!0).forEach(function(n){fve(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fve(e,t,r){return t=hve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hve(e){var t=pve(e,"string");return Zp(t)=="symbol"?t:t+""}function pve(e,t){if(Zp(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zp(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mve(e,t){if(e==null)return{};var r=gve(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function gve(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var K8={symbolCircle:BA,symbolCross:Dge,symbolDiamond:Fge,symbolSquare:Bge,symbolStar:Wge,symbolTriangle:Hge,symbolWye:Kge},vve=Math.PI/180,yve=function(t){var r="symbol".concat(Fb(t));return K8[r]||BA},xve=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*vve;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},bve=function(t,r){K8["symbol".concat(Fb(t))]=r},zA=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,s=i===void 0?64:i,a=t.sizeType,o=a===void 0?"area":a,c=mve(t,dve),u=yR(yR({},c),{},{type:n,size:s,sizeType:o}),d=function(){var v=yve(n),y=Gge().type(v).size(xve(s,o,n));return y()},f=u.className,h=u.cx,p=u.cy,g=Le(u,!0);return h===+h&&p===+p&&s===+s?P.createElement("path",N_({},g,{className:Ze("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};zA.registerSymbol=bve;function Bd(e){"@babel/helpers - typeof";return Bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bd(e)}function O_(){return O_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},O_.apply(this,arguments)}function xR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xR(Object(r),!0).forEach(function(n){Jp(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Sve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jve(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Y8(n.key),n)}}function _ve(e,t,r){return t&&jve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Eve(e,t,r){return t=yx(t),Nve(e,G8()?Reflect.construct(t,r||[],yx(e).constructor):t.apply(e,r))}function Nve(e,t){if(t&&(Bd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ove(e)}function Ove(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(G8=function(){return!!e})()}
550function yx(e){return yx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yx(e)}function Ave(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A_(e,t)}function A_(e,t){return A_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},A_(e,t)}function Jp(e,t,r){return t=Y8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y8(e){var t=Cve(e,"string");return Bd(t)=="symbol"?t:t+""}function Cve(e,t){if(Bd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Bd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ci=32,UA=function(e){function t(){return Sve(this,t),Eve(this,t,arguments)}return Ave(t,e),_ve(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,s=ci/2,a=ci/6,o=ci/3,c=n.inactive?i:n.color;if(n.type==="plainline")return P.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:s,x2:ci,y2:s,className:"recharts-legend-icon"});if(n.type==="line")return P.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(s,"h").concat(o,`
551            A`).concat(a,",").concat(a,",0,1,1,").concat(2*o,",").concat(s,`
552            H`).concat(ci,"M").concat(2*o,",").concat(s,`
553            A`).concat(a,",").concat(a,",0,1,1,").concat(o,",").concat(s),className:"recharts-legend-icon"});if(n.type==="rect")return P.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(ci/8,"h").concat(ci,"v").concat(ci*3/4,"h").concat(-ci,"z"),className:"recharts-legend-icon"});if(P.isValidElement(n.legendIcon)){var u=wve({},n);return delete u.legendIcon,P.cloneElement(n.legendIcon,u)}return P.createElement(zA,{fill:c,cx:s,cy:s,size:ci,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,s=i.payload,a=i.iconSize,o=i.layout,c=i.formatter,u=i.inactiveColor,d={x:0,y:0,width:ci,height:ci},f={display:o==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return s.map(function(p,g){var m=p.formatter||c,v=Ze(Jp(Jp({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",p.inactive));if(p.type==="none")return null;var y=qe(p.value)?null:p.value;ls(!qe(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var x=p.inactive?u:p.color;return P.createElement("li",O_({className:v,style:f,key:"legend-item-".concat(g)},Cc(n.props,p,g)),P.createElement(y_,{width:a,height:a,viewBox:d,style:h},n.renderIcon(p)),P.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},m?m(y,p,g):y))})}},{key:"render",value:function(){var n=this.props,i=n.payload,s=n.layout,a=n.align;if(!i||!i.length)return null;var o={padding:0,margin:0,textAlign:s==="horizontal"?a:"left"};return P.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(b.PureComponent);Jp(UA,"displayName","Legend");Jp(UA,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Pve=Nb;function Tve(){this.__data__=new Pve,this.size=0}var kve=Tve;function Rve(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var $ve=Rve;function Ive(e){return this.__data__.get(e)}var Mve=Ive;function Dve(e){return this.__data__.has(e)}var Lve=Dve,Fve=Nb,Bve=CA,zve=PA,Uve=200;function Vve(e,t){var r=this.__data__;if(r instanceof Fve){var n=r.__data__;if(!Bve||n.length<Uve-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new zve(n)}return r.set(e,t),this.size=r.size,this}var Wve=Vve,Hve=Nb,qve=kve,Kve=$ve,Gve=Mve,Yve=Lve,Xve=Wve;function Vf(e){var t=this.__data__=new Hve(e);this.size=t.size}Vf.prototype.clear=qve;Vf.prototype.delete=Kve;Vf.prototype.get=Gve;Vf.prototype.has=Yve;Vf.prototype.set=Xve;var X8=Vf,Qve="__lodash_hash_undefined__";function Zve(e){return this.__data__.set(e,Qve),this}var Jve=Zve;function eye(e){return this.__data__.has(e)}var tye=eye,rye=PA,nye=Jve,iye=tye;function xx(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new rye;++t<r;)this.add(e[t])}xx.prototype.add=xx.prototype.push=nye;xx.prototype.has=iye;var Q8=xx;function sye(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Z8=sye;function aye(e,t){return e.has(t)}var J8=aye,oye=Q8,lye=Z8,cye=J8,uye=1,dye=2;function fye(e,t,r,n,i,s){var a=r&uye,o=e.length,c=t.length;if(o!=c&&!(a&&c>o))return!1;var u=s.get(e),d=s.get(t);if(u&&d)return u==t&&d==e;var f=-1,h=!0,p=r&dye?new oye:void 0;for(s.set(e,t),s.set(t,e);++f<o;){var g=e[f],m=t[f];if(n)var v=a?n(m,g,f,t,e,s):n(g,m,f,e,t,s);if(v!==void 0){if(v)continue;h=!1;break}
vendor: 7,062 bytes, line 553
553if(p){if(!lye(t,function(y,x){if(!cye(p,x)&&(g===y||i(g,y,r,n,s)))return p.push(x)})){h=!1;break}}else if(!(g===m||i(g,m,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}var eV=fye,hye=Xs,pye=hye.Uint8Array,mye=pye;function gye(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var vye=gye;function yye(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var VA=yye,bR=bg,wR=mye,xye=AA,bye=eV,wye=vye,Sye=VA,jye=1,_ye=2,Eye="[object Boolean]",Nye="[object Date]",Oye="[object Error]",Aye="[object Map]",Cye="[object Number]",Pye="[object RegExp]",Tye="[object Set]",kye="[object String]",Rye="[object Symbol]",$ye="[object ArrayBuffer]",Iye="[object DataView]",SR=bR?bR.prototype:void 0,z1=SR?SR.valueOf:void 0;function Mye(e,t,r,n,i,s,a){switch(r){case Iye:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case $ye:return!(e.byteLength!=t.byteLength||!s(new wR(e),new wR(t)));case Eye:case Nye:case Cye:return xye(+e,+t);case Oye:return e.name==t.name&&e.message==t.message;case Pye:case kye:return e==t+"";case Aye:var o=wye;case Tye:var c=n&jye;if(o||(o=Sye),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=_ye,a.set(e,t);var d=bye(o(e),o(t),n,i,s,a);return a.delete(e),d;case Rye:if(z1)return z1.call(e)==z1.call(t)}return!1}var Dye=Mye;function Lye(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var tV=Lye,Fye=tV,Bye=Rn;function zye(e,t,r){var n=t(e);return Bye(e)?n:Fye(n,r(e))}var Uye=zye;function Vye(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}var Wye=Vye;function Hye(){return[]}var qye=Hye,Kye=Wye,Gye=qye,Yye=Object.prototype,Xye=Yye.propertyIsEnumerable,jR=Object.getOwnPropertySymbols,Qye=jR?function(e){return e==null?[]:(e=Object(e),Kye(jR(e),function(t){return Xye.call(e,t)}))}:Gye,Zye=Qye;function Jye(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var exe=Jye,txe=qa,rxe=Ka,nxe="[object Arguments]";function ixe(e){return rxe(e)&&txe(e)==nxe}var sxe=ixe,_R=sxe,axe=Ka,rV=Object.prototype,oxe=rV.hasOwnProperty,lxe=rV.propertyIsEnumerable,cxe=_R(function(){return arguments}())?_R:function(e){return axe(e)&&oxe.call(e,"callee")&&!lxe.call(e,"callee")},WA=cxe,bx={exports:{}};function uxe(){return!1}var dxe=uxe;bx.exports;(function(e,t){var r=Xs,n=dxe,i=t&&!t.nodeType&&t,s=i&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===i,o=a?r.Buffer:void 0,c=o?o.isBuffer:void 0,u=c||n;e.exports=u})(bx,bx.exports);var nV=bx.exports,fxe=9007199254740991,hxe=/^(?:0|[1-9]\d*)$/;function pxe(e,t){var r=typeof e;return t=t??fxe,!!t&&(r=="number"||r!="symbol"&&hxe.test(e))&&e>-1&&e%1==0&&e<t}var HA=pxe,mxe=9007199254740991;function gxe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=mxe}var qA=gxe,vxe=qa,yxe=qA,xxe=Ka,bxe="[object Arguments]",wxe="[object Array]",Sxe="[object Boolean]",jxe="[object Date]",_xe="[object Error]",Exe="[object Function]",Nxe="[object Map]",Oxe="[object Number]",Axe="[object Object]",Cxe="[object RegExp]",Pxe="[object Set]",Txe="[object String]",kxe="[object WeakMap]",Rxe="[object ArrayBuffer]",$xe="[object DataView]",Ixe="[object Float32Array]",Mxe="[object Float64Array]",Dxe="[object Int8Array]",Lxe="[object Int16Array]",Fxe="[object Int32Array]",Bxe="[object Uint8Array]",zxe="[object Uint8ClampedArray]",Uxe="[object Uint16Array]",Vxe="[object Uint32Array]",Ft={};Ft[Ixe]=Ft[Mxe]=Ft[Dxe]=Ft[Lxe]=Ft[Fxe]=Ft[Bxe]=Ft[zxe]=Ft[Uxe]=Ft[Vxe]=!0;Ft[bxe]=Ft[wxe]=Ft[Rxe]=Ft[Sxe]=Ft[$xe]=Ft[jxe]=Ft[_xe]=Ft[Exe]=Ft[Nxe]=Ft[Oxe]=Ft[Axe]=Ft[Cxe]=Ft[Pxe]=Ft[Txe]=Ft[kxe]=!1;function Wxe(e){return xxe(e)&&yxe(e.length)&&!!Ft[vxe(e)]}var Hxe=Wxe;function qxe(e){return function(t){return e(t)}}var iV=qxe,wx={exports:{}};wx.exports;(function(e,t){var r=d8,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,a=s&&r.process,o=function(){try{var c=i&&i.require&&i.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}}();e.exports=o})(wx,wx.exports);var Kxe=wx.exports,Gxe=Hxe,Yxe=iV,ER=Kxe,NR=ER&&ER.isTypedArray,Xxe=NR?Yxe(NR):Gxe,sV=Xxe,Qxe=exe,Zxe=WA,Jxe=Rn,e0e=nV,t0e=HA,r0e=sV,n0e=Object.prototype,i0e=n0e.hasOwnProperty;function s0e(e,t){var r=Jxe(e),n=!r&&Zxe(e),i=!r&&!n&&e0e(e),s=!r&&!n&&!i&&r0e(e),a=r||n||i||s,o=a?Qxe(e.length,String):[],c=o.length;for(var u in e)(t||i0e.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||t0e(u,c)))&&o.push(u);return o}var a0e=s0e,o0e=Object.prototype;function l0e(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||o0e;return e===r}var c0e=l0e;function u0e(e,t){return function(r){return e(t(r))}}var aV=u0e,d0e=aV,f0e=d0e(Object.keys,Object),h0e=f0e,p0e=c0e,m0e=h0e,g0e=Object.prototype,v0e=g0e.hasOwnProperty;function y0e(e){if(!p0e(e))return m0e(e);var t=[];for(var r in Object(e))v0e.call(e,r)&&r!="constructor"&&t.push(r);return t}var x0e=y0e,b0e=OA,w0e=qA;function S0e(e){return e!=null&&w0e(e.length)&&!b0e(e)}var wg=S0e,j0e=a0e,_0e=x0e,E0e=wg;function N0e(e){return E0e(e)?j0e(e):_0e(e)}var Vb=N0e,O0e=Uye,A0e=Zye,C0e=Vb;function P0e(e){return O0e(e,C0e,A0e)}var T0e=P0e,OR=T0e,k0e=1,R0e=Object.prototype,$0e=R0e.hasOwnProperty;function I0e(e,t,r,n,i,s){var a=r&k0e,o=OR(e),c=o.length,u=OR(t),d=u.length;if(c!=d&&!a)return!1;for(var f=c;f--;){var h=o[f];if(!(a?h in t:$0e.call(t,h)))return!1}var p=s.get(e),g=s.get(t);if(p&&g)return p==t&&g==e;var m=!0;s.set(e,t),s.set(t,e);for(var v=a;++f<c;){h=o[f];var y=e[h],x=t[h];if(n)var w=a?n(x,y,h,t,e,s):n(y,x,h,e,t,s);if(!(w===void 0?y===x||i(y,x,r,n,s):w)){m=!1;break}v||(v=h=="constructor")}if(m&&!v){var S=e.constructor,j=t.constructor;S!=j&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof j=="function"&&j instanceof j)&&(m=!1)}return s.delete(e),s.delete(t),m}var M0e=I0e,D0e=Kc,L0e=Xs,F0e=D0e(L0e,"DataView"),B0e=F0e,z0e=Kc,U0e=Xs,V0e=z0e(U0e,"Promise"),W0e=V0e,H0e=Kc,q0e=Xs,K0e=H0e(q0e,"Set"),oV=K0e,G0e=Kc,Y0e=Xs,X0e=G0e(Y0e,"WeakMap"),Q0e=X0e,C_=B0e,P_=CA,T_=W0e,k_=oV,R_=Q0e,lV=qa,Wf=h8,AR="[object Map]",Z0e="[object Object]",CR="[object Promise]",PR="[object Set]",TR="[object WeakMap]",kR="[object DataView]",J0e=Wf(C_),ebe=Wf(P_),tbe=Wf(T_),rbe=Wf(k_),nbe=Wf(R_),Cl=lV;(C_&&Cl(new C_(new ArrayBuffer(1)))!=kR||P_&&Cl(new P_)!=AR||T_&&Cl(T_.resolve())!=CR||k_&&Cl(new k_)!=PR||R_&&Cl(new R_)!=TR)&&(Cl=function(e){var t=lV(e),r=t==Z0e?e.constructor:void 0,n=r?Wf(r):"";if(n)switch(n){case J0e:return kR;case ebe:return AR;case tbe:return CR;case rbe:return PR;case nbe:return TR}return t});var ibe=Cl,U1=X8,sbe=eV,abe=Dye,obe=M0e,RR=ibe,$R=Rn,IR=nV,lbe=sV,cbe=1,MR="[object Arguments]",DR="[object Array]",gv="[object Object]",ube=Object.prototype,LR=ube.hasOwnProperty;function dbe(e,t,r,n,i,s){var a=$R(e),o=$R(t),c=a?DR:RR(e),u=o?DR:RR(t);c=c==MR?gv:c,u=u==MR?gv:u;var d=c==gv,f=u==gv,h=c==u;if(h&&IR(e)){if(!IR(t))return!1;a=!0,d=!1}if(h&&!d)return s||(s=new U1),a||lbe(e)?sbe(e,t,r,n,i,s):abe(e,t,c,r,n,i,s);if(!(r&cbe)){var p=d&&LR.call(e,"__wrapped__"),g=f&&LR.call(t,"__wrapped__");
vendor: 4,112 bytes, line 553
553if(p||g){var m=p?e.value():e,v=g?t.value():t;return s||(s=new U1),i(m,v,r,n,s)}}return h?(s||(s=new U1),obe(e,t,r,n,i,s)):!1}var fbe=dbe,hbe=fbe,FR=Ka;function cV(e,t,r,n,i){return e===t?!0:e==null||t==null||!FR(e)&&!FR(t)?e!==e&&t!==t:hbe(e,t,r,n,cV,i)}var KA=cV,pbe=X8,mbe=KA,gbe=1,vbe=2;function ybe(e,t,r,n){var i=r.length,s=i,a=!n;if(e==null)return!s;for(e=Object(e);i--;){var o=r[i];if(a&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=r[i];var c=o[0],u=e[c],d=o[1];if(a&&o[2]){if(u===void 0&&!(c in e))return!1}else{var f=new pbe;if(n)var h=n(u,d,c,e,t,f);if(!(h===void 0?mbe(d,u,gbe|vbe,n,f):h))return!1}}return!0}var xbe=ybe,bbe=dl;function wbe(e){return e===e&&!bbe(e)}var uV=wbe,Sbe=uV,jbe=Vb;function _be(e){for(var t=jbe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Sbe(i)]}return t}var Ebe=_be;function Nbe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var dV=Nbe,Obe=xbe,Abe=Ebe,Cbe=dV;function Pbe(e){var t=Abe(e);return t.length==1&&t[0][2]?Cbe(t[0][0],t[0][1]):function(r){return r===e||Obe(r,e,t)}}var Tbe=Pbe;function kbe(e,t){return e!=null&&t in Object(e)}var Rbe=kbe,$be=y8,Ibe=WA,Mbe=Rn,Dbe=HA,Lbe=qA,Fbe=Ab;function Bbe(e,t,r){t=$be(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var a=Fbe(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&Lbe(i)&&Dbe(a,i)&&(Mbe(e)||Ibe(e)))}var zbe=Bbe,Ube=Rbe,Vbe=zbe;function Wbe(e,t){return e!=null&&Vbe(e,t,Ube)}var Hbe=Wbe,qbe=KA,Kbe=x8,Gbe=Hbe,Ybe=NA,Xbe=uV,Qbe=dV,Zbe=Ab,Jbe=1,ewe=2;function twe(e,t){return Ybe(e)&&Xbe(t)?Qbe(Zbe(e),t):function(r){var n=Kbe(r,e);return n===void 0&&n===t?Gbe(r,e):qbe(t,n,Jbe|ewe)}}var rwe=twe;function nwe(e){return e}var Hf=nwe;function iwe(e){return function(t){return t==null?void 0:t[e]}}var swe=iwe,awe=RA;function owe(e){return function(t){return awe(t,e)}}var lwe=owe,cwe=swe,uwe=lwe,dwe=NA,fwe=Ab;function hwe(e){return dwe(e)?cwe(fwe(e)):uwe(e)}var pwe=hwe,mwe=Tbe,gwe=rwe,vwe=Hf,ywe=Rn,xwe=pwe;function bwe(e){return typeof e=="function"?e:e==null?vwe:typeof e=="object"?ywe(e)?gwe(e[0],e[1]):mwe(e):xwe(e)}var Qs=bwe;function wwe(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return-1}var fV=wwe;function Swe(e){return e!==e}var jwe=Swe;function _we(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var Ewe=_we,Nwe=fV,Owe=jwe,Awe=Ewe;function Cwe(e,t,r){return t===t?Awe(e,t,r):Nwe(e,Owe,r)}var Pwe=Cwe,Twe=Pwe;function kwe(e,t){var r=e==null?0:e.length;return!!r&&Twe(e,t,0)>-1}var Rwe=kwe;function $we(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var Iwe=$we;function Mwe(){}var Dwe=Mwe,V1=oV,Lwe=Dwe,Fwe=VA,Bwe=1/0,zwe=V1&&1/Fwe(new V1([,-0]))[1]==Bwe?function(e){return new V1(e)}:Lwe,Uwe=zwe,Vwe=Q8,Wwe=Rwe,Hwe=Iwe,qwe=J8,Kwe=Uwe,Gwe=VA,Ywe=200;function Xwe(e,t,r){var n=-1,i=Wwe,s=e.length,a=!0,o=[],c=o;if(r)a=!1,i=Hwe;else if(s>=Ywe){var u=t?null:Kwe(e);if(u)return Gwe(u);a=!1,i=qwe,c=new Vwe}else c=t?[]:o;e:for(;++n<s;){var d=e[n],f=t?t(d):d;if(d=r||d!==0?d:0,a&&f===f){for(var h=c.length;h--;)if(c[h]===f)continue e;t&&c.push(f),o.push(d)}else i(c,f,r)||(c!==o&&c.push(f),o.push(d))}return o}var Qwe=Xwe,Zwe=Qs,Jwe=Qwe;function e1e(e,t){return e&&e.length?Jwe(e,Zwe(t)):[]}var t1e=e1e;const BR=pt(t1e);function hV(e,t,r){return t===!0?BR(e,r):qe(t)?BR(e,t):e}function zd(e){"@babel/helpers - typeof";return zd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zd(e)}var r1e=["ref"];function zR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function na(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zR(Object(r),!0).forEach(function(n){Wb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zR(Object(r)).forEac
vendor: 5,566 bytes, line 553
553h(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function n1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UR(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mV(n.key),n)}}function i1e(e,t,r){return t&&UR(e.prototype,t),r&&UR(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s1e(e,t,r){return t=Sx(t),a1e(e,pV()?Reflect.construct(t,r||[],Sx(e).constructor):t.apply(e,r))}function a1e(e,t){if(t&&(zd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o1e(e)}function o1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pV=function(){return!!e})()}function Sx(e){return Sx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sx(e)}function l1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$_(e,t)}function $_(e,t){return $_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},$_(e,t)}function Wb(e,t,r){return t=mV(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mV(e){var t=c1e(e,"string");return zd(t)=="symbol"?t:t+""}function c1e(e,t){if(zd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function u1e(e,t){if(e==null)return{};var r=d1e(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function d1e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function f1e(e){return e.value}function h1e(e,t){if(P.isValidElement(e))return P.cloneElement(e,t);if(typeof e=="function")return P.createElement(e,t);t.ref;var r=u1e(t,r1e);return P.createElement(UA,r)}var VR=1,Vo=function(e){function t(){var r;n1e(this,t);for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return r=s1e(this,t,[].concat(i)),Wb(r,"lastBoundingBox",{width:-1,height:-1}),r}return l1e(t,e),i1e(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>VR||Math.abs(i.height-this.lastBoundingBox.height)>VR)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?na({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,s=i.layout,a=i.align,o=i.verticalAlign,c=i.margin,u=i.chartWidth,d=i.chartHeight,f,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(a==="center"&&s==="vertical"){var p=this.getBBoxSnapshot();f={left:((u||0)-p.width)/2}}else f=a==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(o==="middle"){var g=this.getBBoxSnapshot();h={top:((d||0)-g.height)/2}}else h=o==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return na(na({},f),h)}},{key:"render",value:function(){var n=this,i=this.props,s=i.content,a=i.width,o=i.height,c=i.wrapperStyle,u=i.payloadUniqBy,d=i.payload,f=na(na({position:"absolute",width:a||"auto",height:o||"auto"},this.getDefaultPosition(c)),c);return P.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){n.wrapperNode=p}},h1e(s,na(na({},this.props),{},{payload:hV(d,u,f1e)})))}}],[{key:"getWithHeight",value:function(n,i){var s=na(na({},this.defaultProps),n.props),a=s.layout;return a==="vertical"&&le(n.props.height)?{height:n.props.height}:a==="horizontal"?{width:n.props.width||i}:null}}])}(b.PureComponent);Wb(Vo,"displayName","Legend");Wb(Vo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var WR=bg,p1e=WA,m1e=Rn,HR=WR?WR.isConcatSpreadable:void 0;function g1e(e){return m1e(e)||p1e(e)||!!(HR&&e&&e[HR])}var v1e=g1e,y1e=tV,x1e=v1e;function gV(e,t,r,n,i){var s=-1,a=e.length;for(r||(r=x1e),i||(i=[]);++s<a;){var o=e[s];t>0&&r(o)?t>1?gV(o,t-1,r,n,i):y1e(i,o):n||(i[i.length]=o)}return i}var vV=gV;function b1e(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var c=a[e?o:++i];if(r(s[c],c,s)===!1)break}return t}}
vendor: 4,210 bytes, lines 553-554
553var w1e=b1e,S1e=w1e,j1e=S1e(),_1e=j1e,E1e=_1e,N1e=Vb;function O1e(e,t){return e&&E1e(e,t,N1e)}var yV=O1e,A1e=wg;function C1e(e,t){return function(r,n){if(r==null)return r;if(!A1e(r))return e(r,n);for(var i=r.length,s=t?i:-1,a=Object(r);(t?s--:++s<i)&&n(a[s],s,a)!==!1;);return r}}var P1e=C1e,T1e=yV,k1e=P1e,R1e=k1e(T1e),GA=R1e,$1e=GA,I1e=wg;function M1e(e,t){var r=-1,n=I1e(e)?Array(e.length):[];return $1e(e,function(i,s,a){n[++r]=t(i,s,a)}),n}var xV=M1e;function D1e(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var L1e=D1e,qR=Df;function F1e(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,s=qR(e),a=t!==void 0,o=t===null,c=t===t,u=qR(t);if(!o&&!u&&!s&&e>t||s&&a&&c&&!o&&!u||n&&a&&c||!r&&c||!i)return 1;if(!n&&!s&&!u&&e<t||u&&r&&i&&!n&&!s||o&&r&&i||!a&&i||!c)return-1}return 0}var B1e=F1e,z1e=B1e;function U1e(e,t,r){for(var n=-1,i=e.criteria,s=t.criteria,a=i.length,o=r.length;++n<a;){var c=z1e(i[n],s[n]);if(c){if(n>=o)return c;var u=r[n];return c*(u=="desc"?-1:1)}}return e.index-t.index}var V1e=U1e,W1=kA,W1e=RA,H1e=Qs,q1e=xV,K1e=L1e,G1e=iV,Y1e=V1e,X1e=Hf,Q1e=Rn;function Z1e(e,t,r){t.length?t=W1(t,function(s){return Q1e(s)?function(a){return W1e(a,s.length===1?s[0]:s)}:s}):t=[X1e];var n=-1;t=W1(t,G1e(H1e));var i=q1e(e,function(s,a,o){var c=W1(t,function(u){return u(s)});return{criteria:c,index:++n,value:s}});return K1e(i,function(s,a){return Y1e(s,a,r)})}var J1e=Z1e;function eSe(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var tSe=eSe,rSe=tSe,KR=Math.max;function nSe(e,t,r){return t=KR(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=KR(n.length-t,0),a=Array(s);++i<s;)a[i]=n[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=n[i];return o[t]=r(a),rSe(e,this,o)}}var iSe=nSe;function sSe(e){return function(){return e}}var aSe=sSe,oSe=Kc,lSe=function(){try{var e=oSe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),bV=lSe,cSe=aSe,GR=bV,uSe=Hf,dSe=GR?function(e,t){return GR(e,"toString",{configurable:!0,enumerable:!1,value:cSe(t),writable:!0})}:uSe,fSe=dSe,hSe=800,pSe=16,mSe=Date.now;function gSe(e){var t=0,r=0;return function(){var n=mSe(),i=pSe-(n-r);if(r=n,i>0){if(++t>=hSe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var vSe=gSe,ySe=fSe,xSe=vSe,bSe=xSe(ySe),wSe=bSe,SSe=Hf,jSe=iSe,_Se=wSe;function ESe(e,t){return _Se(jSe(e,t,SSe),e+"")}var NSe=ESe,OSe=AA,ASe=wg,CSe=HA,PSe=dl;function TSe(e,t,r){if(!PSe(r))return!1;var n=typeof t;return(n=="number"?ASe(r)&&CSe(t,r.length):n=="string"&&t in r)?OSe(r[t],e):!1}var Hb=TSe,kSe=vV,RSe=J1e,$Se=NSe,YR=Hb,ISe=$Se(function(e,t){if(e==null)return[];var r=t.length;return r>1&&YR(e,t[0],t[1])?t=[]:r>2&&YR(t[0],t[1],t[2])&&(t=[t[0]]),RSe(e,kSe(t,1),[])}),MSe=ISe;const YA=pt(MSe);function em(e){"@babel/helpers - typeof";return em=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},em(e)}function I_(){return I_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},I_.apply(this,arguments)}function DSe(e,t){return zSe(e)||BSe(e,t)||FSe(e,t)||LSe()}function LSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
554In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FSe(e,t){if(e){if(typeof e=="string")return XR(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return XR(e,t)}}function XR(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function BSe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}
vendor: 27,895 bytes, lines 554-560
554finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function zSe(e){if(Array.isArray(e))return e}function QR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function H1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QR(Object(r),!0).forEach(function(n){USe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function USe(e,t,r){return t=VSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VSe(e){var t=WSe(e,"string");return em(t)=="symbol"?t:t+""}function WSe(e,t){if(em(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(em(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HSe(e){return Array.isArray(e)&&Cr(e[0])&&Cr(e[1])?e.join(" ~ "):e}var qSe=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,s=i===void 0?{}:i,a=t.itemStyle,o=a===void 0?{}:a,c=t.labelStyle,u=c===void 0?{}:c,d=t.payload,f=t.formatter,h=t.itemSorter,p=t.wrapperClassName,g=t.labelClassName,m=t.label,v=t.labelFormatter,y=t.accessibilityLayer,x=y===void 0?!1:y,w=function(){if(d&&d.length){var $={padding:0,margin:0},D=(h?YA(d,h):d).map(function(A,R){if(A.type==="none")return null;var T=H1({display:"block",paddingTop:4,paddingBottom:4,color:A.color||"#000"},o),L=A.formatter||f||HSe,M=A.value,I=A.name,F=M,U=I;if(L&&F!=null&&U!=null){var V=L(M,I,A,R,d);if(Array.isArray(V)){var G=DSe(V,2);F=G[0],U=G[1]}else F=V}return P.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(R),style:T},Cr(U)?P.createElement("span",{className:"recharts-tooltip-item-name"},U):null,Cr(U)?P.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,P.createElement("span",{className:"recharts-tooltip-item-value"},F),P.createElement("span",{className:"recharts-tooltip-item-unit"},A.unit||""))});return P.createElement("ul",{className:"recharts-tooltip-item-list",style:$},D)}return null},S=H1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},s),j=H1({margin:0},u),E=!Qe(m),_=E?m:"",N=Ze("recharts-default-tooltip",p),O=Ze("recharts-tooltip-label",g);E&&v&&d!==void 0&&d!==null&&(_=v(m,d));var C=x?{role:"status","aria-live":"assertive"}:{};return P.createElement("div",I_({className:N,style:S},C),P.createElement("p",{className:O,style:j},P.isValidElement(_)?_:"".concat(_)),w())};function tm(e){"@babel/helpers - typeof";return tm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tm(e)}function vv(e,t,r){return t=KSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KSe(e){var t=GSe(e,"string");return tm(t)=="symbol"?t:t+""}function GSe(e,t){if(tm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(tm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vh="recharts-tooltip-wrapper",YSe={visibility:"hidden"};function XSe(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Ze(vh,vv(vv(vv(vv({},"".concat(vh,"-right"),le(r)&&t&&le(t.x)&&r>=t.x),"".concat(vh,"-left"),le(r)&&t&&le(t.x)&&r<t.x),"".concat(vh,"-bottom"),le(n)&&t&&le(t.y)&&n>=t.y),"".concat(vh,"-top"),le(n)&&t&&le(t.y)&&n<t.y))}function ZR(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,s=e.position,a=e.reverseDirection,o=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(s&&le(s[n]))return s[n];var d=r[n]-o-i,f=r[n]+i;if(t[n])return a[n]?d:f;if(a[n]){var h=d,p=c[n];return h<p?Math.max(f,c[n]):Math.max(d,c[n])}var g=f+o,m=c[n]+u;return g>m?Math.max(d,c[n]):Math.max(f,c[n])}function QSe(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function ZSe(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,s=e.reverseDirection,a=e.tooltipBox,o=e.useTranslate3d,c=e.viewBox,u,d,f;return a.height>0&&a.width>0&&r?(d=ZR({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:s,tooltipDimension:a.width,viewBox:c,viewBoxDimension:c.width}),f=ZR({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:s,tooltipDimension:a.height,viewBox:c,viewBoxDimension:c.height}),u=QSe({translateX:d,translateY:f,useTranslate3d:o})):u=YSe,{cssProperties:u,cssClasses:XSe({translateX:d,translateY:f,coordinate:r})}}function Ud(e){"@babel/helpers - typeof";return Ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ud(e)}function JR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function e$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JR(Object(r),!0).forEach(function(n){D_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eje(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,SV(n.key),n)}}function tje(e,t,r){return t&&eje(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function rje(e,t,r){return t=jx(t),nje(e,wV()?Reflect.construct(t,r||[],jx(e).constructor):t.apply(e,r))}function nje(e,t){if(t&&(Ud(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ije(e)}function ije(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wV=function(){return!!e})()}function jx(e){return jx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},jx(e)}function sje(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M_(e,t)}function M_(e,t){return M_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},M_(e,t)}function D_(e,t,r){return t=SV(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SV(e){var t=aje(e,"string");return Ud(t)=="symbol"?t:t+""}function aje(e,t){if(Ud(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ud(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var t$=1,oje=function(e){function t(){var r;JSe(this,t);for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return r=rje(this,t,[].concat(i)),D_(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),D_(r,"handleKeyDown",function(a){if(a.key==="Escape"){var o,c,u,d;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(o=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&o!==void 0?o:0,y:(u=(d=r.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&u!==void 0?u:0}})}}),r}return sje(t,e),tje(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>t$||Math.abs(n.height-this.state.lastBoundingBox.height)>t$)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,s=i.active,a=i.allowEscapeViewBox,o=i.animationDuration,c=i.animationEasing,u=i.children,d=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,p=i.offset,g=i.position,m=i.reverseDirection,v=i.useTranslate3d,y=i.viewBox,x=i.wrapperStyle,w=ZSe({allowEscapeViewBox:a,coordinate:d,offsetTopLeft:p,position:g,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:y}),S=w.cssClasses,j=w.cssProperties,E=e$(e$({transition:h&&s?"transform ".concat(o,"ms ").concat(c):void 0},j),{},{pointerEvents:"none",visibility:!this.state.dismissed&&s&&f?"visible":"hidden",position:"absolute",top:0,left:0},x);return P.createElement("div",{tabIndex:-1,className:S,style:E,ref:function(N){n.wrapperNode=N}},u)}}])}(b.PureComponent),lje=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},fl={isSsr:lje()};function Vd(e){"@babel/helpers - typeof";return Vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vd(e)}function r$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function n$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r$(Object(r),!0).forEach(function(n){XA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uje(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_V(n.key),n)}}function dje(e,t,r){return t&&uje(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fje(e,t,r){return t=_x(t),hje(e,jV()?Reflect.construct(t,r||[],_x(e).constructor):t.apply(e,r))}function hje(e,t){if(t&&(Vd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pje(e)}function pje(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jV=function(){return!!e})()}function _x(e){return _x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_x(e)}function mje(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L_(e,t)}function L_(e,t){return L_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},L_(e,t)}function XA(e,t,r){return t=_V(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _V(e){var t=gje(e,"string");return Vd(t)=="symbol"?t:t+""}function gje(e,t){if(Vd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function vje(e){return e.dataKey}function yje(e,t){return P.isValidElement(e)?P.cloneElement(e,t):typeof e=="function"?P.createElement(e,t):P.createElement(qSe,t)}var on=function(e){function t(){return cje(this,t),fje(this,t,arguments)}return mje(t,e),dje(t,[{key:"render",value:function(){var n=this,i=this.props,s=i.active,a=i.allowEscapeViewBox,o=i.animationDuration,c=i.animationEasing,u=i.content,d=i.coordinate,f=i.filterNull,h=i.isAnimationActive,p=i.offset,g=i.payload,m=i.payloadUniqBy,v=i.position,y=i.reverseDirection,x=i.useTranslate3d,w=i.viewBox,S=i.wrapperStyle,j=g??[];f&&j.length&&(j=hV(g.filter(function(_){return _.value!=null&&(_.hide!==!0||n.props.includeHidden)}),m,vje));var E=j.length>0;return P.createElement(oje,{allowEscapeViewBox:a,animationDuration:o,animationEasing:c,isAnimationActive:h,active:s,coordinate:d,hasPayload:E,offset:p,position:v,reverseDirection:y,useTranslate3d:x,viewBox:w,wrapperStyle:S},yje(u,n$(n$({},this.props),{},{payload:j})))}}])}(b.PureComponent);XA(on,"displayName","Tooltip");XA(on,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!fl.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var xje=Xs,bje=function(){return xje.Date.now()},wje=bje,Sje=/\s/;function jje(e){for(var t=e.length;t--&&Sje.test(e.charAt(t)););return t}var _je=jje,Eje=_je,Nje=/^\s+/;function Oje(e){return e&&e.slice(0,Eje(e)+1).replace(Nje,"")}var Aje=Oje,Cje=Aje,i$=dl,Pje=Df,s$=NaN,Tje=/^[-+]0x[0-9a-f]+$/i,kje=/^0b[01]+$/i,Rje=/^0o[0-7]+$/i,$je=parseInt;function Ije(e){if(typeof e=="number")return e;if(Pje(e))return s$;if(i$(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=i$(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Cje(e);var r=kje.test(e);return r||Rje.test(e)?$je(e.slice(2),r?2:8):Tje.test(e)?s$:+e}var EV=Ije,Mje=dl,q1=wje,a$=EV,Dje="Expected a function",Lje=Math.max,Fje=Math.min;function Bje(e,t,r){var n,i,s,a,o,c,u=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Dje);t=a$(t)||0,Mje(r)&&(d=!!r.leading,f="maxWait"in r,s=f?Lje(a$(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h);function p(E){var _=n,N=i;return n=i=void 0,u=E,a=e.apply(N,_),a}function g(E){return u=E,o=setTimeout(y,t),d?p(E):a}function m(E){var _=E-c,N=E-u,O=t-_;return f?Fje(O,s-N):O}function v(E){var _=E-c,N=E-u;return c===void 0||_>=t||_<0||f&&N>=s}function y(){var E=q1();if(v(E))return x(E);o=setTimeout(y,m(E))}function x(E){return o=void 0,h&&n?p(E):(n=i=void 0,a)}function w(){o!==void 0&&clearTimeout(o),u=0,n=c=i=o=void 0}function S(){return o===void 0?a:x(q1())}function j(){var E=q1(),_=v(E);if(n=arguments,i=this,c=E,_){if(o===void 0)return g(c);if(f)return clearTimeout(o),o=setTimeout(y,t),p(c)}return o===void 0&&(o=setTimeout(y,t)),a}return j.cancel=w,j.flush=S,j}var zje=Bje,Uje=zje,Vje=dl,Wje="Expected a function";function Hje(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(Wje);return Vje(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Uje(e,t,{leading:n,maxWait:t,trailing:i})}var qje=Hje;const NV=pt(qje);function rm(e){"@babel/helpers - typeof";return rm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rm(e)}function o$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?o$(Object(r),!0).forEach(function(n){Kje(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kje(e,t,r){return t=Gje(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gje(e){var t=Yje(e,"string");return rm(t)=="symbol"?t:t+""}function Yje(e,t){if(rm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(rm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xje(e,t){return e_e(e)||Jje(e,t)||Zje(e,t)||Qje()}function Qje(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
555In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zje(e,t){if(e){if(typeof e=="string")return l$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l$(e,t)}}function l$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Jje(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function e_e(e){if(Array.isArray(e))return e}var nm=b.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,s=e.width,a=s===void 0?"100%":s,o=e.height,c=o===void 0?"100%":o,u=e.minWidth,d=u===void 0?0:u,f=e.minHeight,h=e.maxHeight,p=e.children,g=e.debounce,m=g===void 0?0:g,v=e.id,y=e.className,x=e.onResize,w=e.style,S=w===void 0?{}:w,j=b.useRef(null),E=b.useRef();E.current=x,b.useImperativeHandle(t,function(){return Object.defineProperty(j.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),j.current},configurable:!0})});var _=b.useState({containerWidth:i.width,containerHeight:i.height}),N=Xje(_,2),O=N[0],C=N[1],k=b.useCallback(function(D,A){C(function(R){var T=Math.round(D),L=Math.round(A);return R.containerWidth===T&&R.containerHeight===L?R:{containerWidth:T,containerHeight:L}})},[]);b.useEffect(function(){var D=function(I){var F,U=I[0].contentRect,V=U.width,G=U.height;k(V,G),(F=E.current)===null||F===void 0||F.call(E,V,G)};m>0&&(D=NV(D,m,{trailing:!0,leading:!1}));var A=new ResizeObserver(D),R=j.current.getBoundingClientRect(),T=R.width,L=R.height;return k(T,L),A.observe(j.current),function(){A.disconnect()}},[k,m]);var $=b.useMemo(function(){var D=O.containerWidth,A=O.containerHeight;if(D<0||A<0)return null;ls(Ul(a)||Ul(c),`The width(%s) and height(%s) are both fixed numbers,
556       maybe you don't need to use a ResponsiveContainer.`,a,c),ls(!r||r>0,"The aspect(%s) must be greater than zero.",r);var R=Ul(a)?D:a,T=Ul(c)?A:c;r&&r>0&&(R?T=R/r:T&&(R=T*r),h&&T>h&&(T=h)),ls(R>0||T>0,`The width(%s) and height(%s) of chart should be greater than 0,
557       please check the style of container, or the props width(%s) and height(%s),
558       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
559       height and width.`,R,T,a,c,d,f,r);var L=!Array.isArray(p)&&Na(p.type).endsWith("Chart");return P.Children.map(p,function(M){return P.isValidElement(M)?b.cloneElement(M,yv({width:R,height:T},L?{style:yv({height:"100%",width:"100%",maxHeight:T,maxWidth:R},M.props.style)}:{})):M})},[r,p,c,h,f,d,O,a]);return P.createElement("div",{id:v?"".concat(v):void 0,className:Ze("recharts-responsive-container",y),style:yv(yv({},S),{},{width:a,height:c,minWidth:d,minHeight:f,maxHeight:h}),ref:j},$)}),Pc=function(t){return null};Pc.displayName="Cell";function im(e){"@babel/helpers - typeof";return im=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},im(e)}function c$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function F_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c$(Object(r),!0).forEach(function(n){t_e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t_e(e,t,r){return t=r_e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r_e(e){var t=n_e(e,"string");return im(t)=="symbol"?t:t+""}function n_e(e,t){if(im(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(im(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cu={widthCache:{},cacheCount:0},i_e=2e3,s_e={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},u$="recharts_measurement_span";function a_e(e){var t=F_({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var cp=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||fl.isSsr)return{width:0,height:0};var n=a_e(r),i=JSON.stringify({text:t,copyStyle:n});if(cu.widthCache[i])return cu.widthCache[i];try{var s=document.getElementById(u$);s||(s=document.createElement("span"),s.setAttribute("id",u$),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));var a=F_(F_({},s_e),n);Object.assign(s.style,a),s.textContent="".concat(t);var o=s.getBoundingClientRect(),c={width:o.width,height:o.height};return cu.widthCache[i]=c,++cu.cacheCount>i_e&&(cu.cacheCount=0,cu.widthCache={}),c}catch{return{width:0,height:0}}},o_e=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function sm(e){"@babel/helpers - typeof";return sm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sm(e)}function Ex(e,t){return d_e(e)||u_e(e,t)||c_e(e,t)||l_e()}function l_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
560In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c_e(e,t){if(e){if(typeof e=="string")return d$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d$(e,t)}}function d$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u_e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function d_e(e){if(Array.isArray(e))return e}function f_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p_e(n.key),n)}}function h_e(e,t,r){return t&&f$(e.prototype,t),r&&f$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p_e(e){var t=m_e(e,"string");return sm(t)=="symbol"?t:t+""}function m_e(e,t){if(sm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var h$=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,p$=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,g_e=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,v_e=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,OV={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},y_e=Object.keys(OV),Iu="NaN";function x_e(e,t){return e*OV[t]}var xv=function(){function e(t,r){f_e(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!g_e.test(r)&&(this.num=NaN,this.unit=""),y_e.includes(r)&&(this.num=x_e(t,r),this.unit="px")}return h_e(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,i=(n=v_e.exec(r))!==null&&n!==void 0?n:[],s=Ex(i,3),a=s[1],o=s[2];return new e(parseFloat(a),o??"")}}])}();function AV(e){if(e.includes(Iu))return Iu;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=h$.exec(t))!==null&&r!==void 0?r:[],i=Ex(n,4),s=i[1],a=i[2],o=i[3],c=xv.parse(s??""),u=xv.parse(o??""),d=a==="*"?c.multiply(u):c.divide(u);if(d.isNaN())return Iu;t=t.replace(h$,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,h=(f=p$.exec(t))!==null&&f!==void 0?f:[],p=Ex(h,4),g=p[1],m=p[2],v=p[3],y=xv.parse(g??""),x=xv.parse(v??""),w=m==="+"?y.add(x):y.subtract(x);if(w.isNaN())return Iu;t=t.replace(p$,w.toString())}return t}var m$=/\(([^()]*)\)/;function b_e(e){for(var t=e;t.includes("(");){var r=m$.exec(t),n=Ex(r,2),i=n[1];t=t.replace(m$,AV(i))}return t}function w_e(e){var t=e.replace(/\s+/g,"");return t=b_e(t),t=AV(t),t}function S_e(e){try{return w_e(e)}catch{return Iu}}function K1(e){var t=S_e(e.slice(5,-1));return t===Iu?"":t}var j_e=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],__e=["dx","dy","angle","className","breakAll"];function B_(){return B_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
560for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B_.apply(this,arguments)}function g$(e,t){if(e==null)return{};var r=E_e(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function E_e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function v$(e,t){return C_e(e)||A_e(e,t)||O_e(e,t)||N_e()}function N_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
561In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O_e(e,t){if(e){if(typeof e=="string")return y$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y$(e,t)}}function y$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function A_e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function C_e(e){if(Array.isArray(e))return e}var CV=/[ \f\n\r\t\v\u2028\u2029]+/,PV=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var s=[];Qe(r)||(n?s=r.toString().split(""):s=r.toString().split(CV));var a=s.map(function(c){return{word:c,width:cp(c,i).width}}),o=n?0:cp(" ",i).width;return{wordsWithComputedWidth:a,spaceWidth:o}}catch{return null}},P_e=function(t,r,n,i,s){var a=t.maxLines,o=t.children,c=t.style,u=t.breakAll,d=le(a),f=o,h=function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return R.reduce(function(T,L){var M=L.word,I=L.width,F=T[T.length-1];if(F&&(i==null||s||F.width+I+n<Number(i)))F.words.push(M),F.width+=I+n;else{var U={words:[M],width:I};T.push(U)}return T},[])},p=h(r),g=function(R){return R.reduce(function(T,L){return T.width>L.width?T:L})};if(!d)return p;for(var m="…",v=function(R){var T=f.slice(0,R),L=PV({breakAll:u,style:c,children:T+m}).wordsWithComputedWidth,M=h(L),I=M.length>a||g(M).width>Number(i);return[I,M]},y=0,x=f.length-1,w=0,S;y<=x&&w<=f.length-1;){var j=Math.floor((y+x)/2),E=j-1,_=v(E),N=v$(_,2),O=N[0],C=N[1],k=v(j),$=v$(k,1),D=$[0];if(!O&&!D&&(y=j+1),O&&D&&(x=j-1),!O&&D){S=C;break}w++}return S||p},x$=function(t){var r=Qe(t)?[]:t.toString().split(CV);return[{words:r}]},T_e=function(t){var r=t.width,n=t.scaleToFit,i=t.children,s=t.style,a=t.breakAll,o=t.maxLines;if((r||n)&&!fl.isSsr){var c,u,d=PV({breakAll:a,children:i,style:s});if(d){var f=d.wordsWithComputedWidth,h=d.spaceWidth;c=f,u=h}else return x$(i);return P_e({breakAll:a,children:i,maxLines:o,style:s},c,u,r,n)}return x$(i)},b$="#808080",Tc=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,s=i===void 0?0:i,a=t.lineHeight,o=a===void 0?"1em":a,c=t.capHeight,u=c===void 0?"0.71em":c,d=t.scaleToFit,f=d===void 0?!1:d,h=t.textAnchor,p=h===void 0?"start":h,g=t.verticalAnchor,m=g===void 0?"end":g,v=t.fill,y=v===void 0?b$:v,x=g$(t,j_e),w=b.useMemo(function(){return T_e({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:f,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,f,x.style,x.width]),S=x.dx,j=x.dy,E=x.angle,_=x.className,N=x.breakAll,O=g$(x,__e);if(!Cr(n)||!Cr(s))return null;var C=n+(le(S)?S:0),k=s+(le(j)?j:0),$;switch(m){case"start":$=K1("calc(".concat(u,")"));break;case"middle":$=K1("calc(".concat((w.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:$=K1("calc(".concat(w.length-1," * -").concat(o,")"));break}var D=[];if(f){var A=w[0].width,R=x.width;D.push("scale(".concat((le(R)?R/A:1)/A,")"))}return E&&D.push("rotate(".concat(E,", ").concat(C,", ").concat(k,")")),D.length&&(O.transform=D.join(" ")),P.createElement("text",B_({},Le(O,!0),{x:C,y:k,className:Ze("recharts-text",_),textAnchor:p,fill:y.includes("url")?b$:y}),w.map(function(T,L){var M=T.words.join(N?"":" ");return P.createElement("tspan",{x:C,dy:L===0?$:o,key:"".concat(M,"-").concat(L)},M)}))};function Wo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function k_e(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function QA(e){let t,r,n;e.length!==2?(t=Wo,r=(o,c)=>Wo(e(o),c),n=(o,c)=>e(o)-c):(t=e===Wo||e===k_e?e:R_e,r=e,n=e);function i(o,c,u=0,d=o.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;r(o[f],c)<0?u=f+1:d=f}while(u<d)}return u}function s(o,c,u=0,d=o.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;r(o[f],c)<=0?u=f+1:d=f}while(u<d)}return u}function a(o,c,u=0,d=o.length){const f=i(o,c,u,d-1);return f>u&&n(o[f-1],c)>-n(o[f],c)?f-1:f}return{left:i,center:a,right:s}}
561function R_e(){return 0}function TV(e){return e===null?NaN:+e}function*$_e(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const I_e=QA(Wo),Sg=I_e.right;QA(TV).center;class w$ extends Map{constructor(t,r=L_e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(S$(this,t))}has(t){return super.has(S$(this,t))}set(t,r){return super.set(M_e(this,t),r)}delete(t){return super.delete(D_e(this,t))}}function S$({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function M_e({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function D_e({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function L_e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function F_e(e=Wo){if(e===Wo)return kV;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function kV(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const B_e=Math.sqrt(50),z_e=Math.sqrt(10),U_e=Math.sqrt(2);function Nx(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),s=n/Math.pow(10,i),a=s>=B_e?10:s>=z_e?5:s>=U_e?2:1;let o,c,u;return i<0?(u=Math.pow(10,-i)/a,o=Math.round(e*u),c=Math.round(t*u),o/u<e&&++o,c/u>t&&--c,u=-u):(u=Math.pow(10,i)*a,o=Math.round(e/u),c=Math.round(t/u),o*u<e&&++o,c*u>t&&--c),c<o&&.5<=r&&r<2?Nx(e,t,r*2):[o,c,u]}function z_(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,s,a]=n?Nx(t,e,r):Nx(e,t,r);if(!(s>=i))return[];const o=s-i+1,c=new Array(o);if(n)if(a<0)for(let u=0;u<o;++u)c[u]=(s-u)/-a;else for(let u=0;u<o;++u)c[u]=(s-u)*a;else if(a<0)for(let u=0;u<o;++u)c[u]=(i+u)/-a;else for(let u=0;u<o;++u)c[u]=(i+u)*a;return c}function U_(e,t,r){return t=+t,e=+e,r=+r,Nx(e,t,r)[2]}function V_(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?U_(t,e,r):U_(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function j$(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function _$(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function RV(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?kV:F_e(i);n>r;){if(n-r>600){const c=n-r+1,u=t-r+1,d=Math.log(c),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),p=Math.max(r,Math.floor(t-u*f/c+h)),g=Math.min(n,Math.floor(t+(c-u)*f/c+h));RV(e,t,p,g,i)}const s=e[t];let a=r,o=n;for(yh(e,r,t),i(e[n],s)>0&&yh(e,r,n);a<o;){for(yh(e,a,o),++a,--o;i(e[a],s)<0;)++a;for(;i(e[o],s)>0;)--o}i(e[r],s)===0?yh(e,r,o):(++o,yh(e,o,n)),o<=t&&(r=o+1),t<=o&&(n=o-1)}return e}function yh(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function V_e(e,t,r){if(e=Float64Array.from($_e(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return _$(e);if(t>=1)return j$(e);var n,i=(n-1)*t,s=Math.floor(i),a=j$(RV(e,s).subarray(0,s+1)),o=_$(e.subarray(s+1));return a+(o-a)*(i-s)}}
561function W_e(e,t,r=TV){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,s=Math.floor(i),a=+r(e[s],s,e),o=+r(e[s+1],s+1,e);return a+(o-a)*(i-s)}}function H_e(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,s=new Array(i);++n<i;)s[n]=e+n*r;return s}function ki(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ga(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const W_=Symbol("implicit");function ZA(){var e=new w$,t=[],r=[],n=W_;function i(s){let a=e.get(s);if(a===void 0){if(n!==W_)return n;e.set(s,a=t.push(s)-1)}return r[a%r.length]}return i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new w$;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(s){return arguments.length?(r=Array.from(s),i):r.slice()},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return ZA(t,r).unknown(n)},ki.apply(i,arguments),i}function am(){var e=ZA().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,s,a,o=!1,c=0,u=0,d=.5;delete e.unknown;function f(){var h=t().length,p=i<n,g=p?i:n,m=p?n:i;s=(m-g)/Math.max(1,h-c+u*2),o&&(s=Math.floor(s)),g+=(m-g-s*(h-c))*d,a=s*(1-c),o&&(g=Math.round(g),a=Math.round(a));var v=H_e(h).map(function(y){return g+s*y});return r(p?v.reverse():v)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([n,i]=h,n=+n,i=+i,f()):[n,i]},e.rangeRound=function(h){return[n,i]=h,n=+n,i=+i,o=!0,f()},e.bandwidth=function(){return a},e.step=function(){return s},e.round=function(h){return arguments.length?(o=!!h,f()):o},e.padding=function(h){return arguments.length?(c=Math.min(1,u=+h),f()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),f()):c},e.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},e.align=function(h){return arguments.length?(d=Math.max(0,Math.min(1,h)),f()):d},e.copy=function(){return am(t(),[n,i]).round(o).paddingInner(c).paddingOuter(u).align(d)},ki.apply(f(),arguments)}function $V(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return $V(t())},e}function up(){return $V(am.apply(null,arguments).paddingInner(1))}function JA(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function IV(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function jg(){}var om=.7,Ox=1/om,Ju="\\s*([+-]?\\d+)\\s*",lm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",zs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",q_e=/^#([0-9a-f]{3,8})$/,K_e=new RegExp(`^rgb\\(${Ju},${Ju},${Ju}\\)$`),G_e=new RegExp(`^rgb\\(${zs},${zs},${zs}\\)$`),Y_e=new RegExp(`^rgba\\(${Ju},${Ju},${Ju},${lm}\\)$`),X_e=new RegExp(`^rgba\\(${zs},${zs},${zs},${lm}\\)$`),Q_e=new RegExp(`^hsl\\(${lm},${zs},${zs}\\)$`),Z_e=new RegExp(`^hsla\\(${lm},${zs},${zs},${lm}\\)$`),E$={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};JA(jg,kc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:N$,formatHex:N$,formatHex8:J_e,formatHsl:eEe,formatRgb:O$,toString:O$});function N$(){return this.rgb().formatHex()}function J_e(){return this.rgb().formatHex8()}function eEe(){return MV(this).formatHsl()}function O$(){return this.rgb().formatRgb()}function kc(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=q_e.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?A$(t):r===3?new An(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?bv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?bv(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=K_e.exec(e))?new An(t[1],t[2],t[3],1):(t=G_e.exec(e))?new An(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Y_e.exec(e))?bv(t[1],t[2],t[3],t[4]):(t=X_e.exec(e))?bv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Q_e.exec(e))?T$(t[1],t[2]/100,t[3]/100,1):(t=Z_e.exec(e))?T$(t[1],t[2]/100,t[3]/100,t[4]):E$.hasOwnProperty(e)?A$(E$[e]):e==="transparent"?new An(NaN,NaN,NaN,0):null}function A$(e){return new An(e>>16&255,e>>8&255,e&255,1)}function bv(e,t,r,n){return n<=0&&(e=t=r=NaN),new An(e,t,r,n)}function tEe(e){return e instanceof jg||(e=kc(e)),e?(e=e.rgb(),new An(e.r,e.g,e.b,e.opacity)):new An}function H_(e,t,r,n){return arguments.length===1?tEe(e):new An(e,t,r,n??1)}function An(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}JA(An,H_,IV(jg,{brighter(e){return e=e==null?Ox:Math.pow(Ox,e),new An(this.r*e,this.g*e,this.b*e,this.opacity)}
vendor: 16,193 bytes, line 561
561,darker(e){return e=e==null?om:Math.pow(om,e),new An(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new An(cc(this.r),cc(this.g),cc(this.b),Ax(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:C$,formatHex:C$,formatHex8:rEe,formatRgb:P$,toString:P$}));function C$(){return`#${Vl(this.r)}${Vl(this.g)}${Vl(this.b)}`}function rEe(){return`#${Vl(this.r)}${Vl(this.g)}${Vl(this.b)}${Vl((isNaN(this.opacity)?1:this.opacity)*255)}`}function P$(){const e=Ax(this.opacity);return`${e===1?"rgb(":"rgba("}${cc(this.r)}, ${cc(this.g)}, ${cc(this.b)}${e===1?")":`, ${e})`}`}function Ax(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function cc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Vl(e){return e=cc(e),(e<16?"0":"")+e.toString(16)}function T$(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new es(e,t,r,n)}function MV(e){if(e instanceof es)return new es(e.h,e.s,e.l,e.opacity);if(e instanceof jg||(e=kc(e)),!e)return new es;if(e instanceof es)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),s=Math.max(t,r,n),a=NaN,o=s-i,c=(s+i)/2;return o?(t===s?a=(r-n)/o+(r<n)*6:r===s?a=(n-t)/o+2:a=(t-r)/o+4,o/=c<.5?s+i:2-s-i,a*=60):o=c>0&&c<1?0:a,new es(a,o,c,e.opacity)}function nEe(e,t,r,n){return arguments.length===1?MV(e):new es(e,t,r,n??1)}function es(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}JA(es,nEe,IV(jg,{brighter(e){return e=e==null?Ox:Math.pow(Ox,e),new es(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?om:Math.pow(om,e),new es(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new An(G1(e>=240?e-240:e+120,i,n),G1(e,i,n),G1(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new es(k$(this.h),wv(this.s),wv(this.l),Ax(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ax(this.opacity);return`${e===1?"hsl(":"hsla("}${k$(this.h)}, ${wv(this.s)*100}%, ${wv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function k$(e){return e=(e||0)%360,e<0?e+360:e}function wv(e){return Math.max(0,Math.min(1,e||0))}function G1(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const eC=e=>()=>e;function iEe(e,t){return function(r){return e+r*t}}function sEe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function aEe(e){return(e=+e)==1?DV:function(t,r){return r-t?sEe(t,r,e):eC(isNaN(t)?r:t)}}function DV(e,t){var r=t-e;return r?iEe(e,r):eC(isNaN(e)?t:e)}const Cx=function e(t){var r=aEe(t);function n(i,s){var a=r((i=H_(i)).r,(s=H_(s)).r),o=r(i.g,s.g),c=r(i.b,s.b),u=DV(i.opacity,s.opacity);return function(d){return i.r=a(d),i.g=o(d),i.b=c(d),i.opacity=u(d),i+""}}return n.gamma=e,n}(1);function oEe(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(s){for(i=0;i<r;++i)n[i]=e[i]*(1-s)+t[i]*s;return n}}function lEe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function cEe(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),s=new Array(r),a;for(a=0;a<n;++a)i[a]=qf(e[a],t[a]);for(;a<r;++a)s[a]=t[a];return function(o){for(a=0;a<n;++a)s[a]=i[a](o);return s}}function uEe(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Xi(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function dEe(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=qf(e[i],t[i]):n[i]=t[i];return function(s){for(i in r)n[i]=r[i](s);return n}}var q_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Y1=new RegExp(q_.source,"g");function fEe(e){return function(){return e}}function hEe(e){return function(t){return e(t)+""}}function LV(e,t){var r=q_.lastIndex=Y1.lastIndex=0,n,i,s,a=-1,o=[],c=[];for(e=e+"",t=t+"";(n=q_.exec(e))&&(i=Y1.exec(t));)(s=i.index)>r&&(s=t.slice(r,s),o[a]?o[a]+=s:o[++a]=s),(n=n[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,c.push({i:a,x:Xi(n,i)})),r=Y1.lastIndex;return r<t.length&&(s=t.slice(r),o[a]?o[a]+=s:o[++a]=s),o.length<2?c[0]?hEe(c[0].x):fEe(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)o[(f=c[d]).i]=f.x(u);return o.join("")})}function qf(e,t){var r=typeof t,n;return t==null||r==="boolean"?eC(t):(r==="number"?Xi:r==="string"?(n=kc(t))?(t=n,Cx):LV:t instanceof kc?Cx:t instanceof Date?uEe:lEe(t)?oEe:Array.isArray(t)?cEe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?dEe:Xi)(e,t)}function tC(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var R$=180/Math.PI,K_={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function FV(e,t,r,n,i,s){var a,o,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*r+t*n)&&(r-=e*c,n-=t*c),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,c/=o),e*n<t*r&&(e=-e,t=-t,c=-c,a=-a),{translateX:i,translateY:s,rotate:Math.atan2(t,e)*R$,skewX:Math.atan(c)*R$,scaleX:a,scaleY:o}}var Sv;function pEe(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?K_:FV(t.a,t.b,t.c,t.d,t.e,t.f)}function mEe(e){return e==null||(Sv||(Sv=document.createElementNS("http://www.w3.org/2000/svg","g")),Sv.setAttribute("transform",e),!(e=Sv.transform.baseVal.consolidate()))?K_:(e=e.matrix,FV(e.a,e.b,e.c,e.d,e.e,e.f))}function BV(e,t,r,n){function i(u){return u.length?u.pop()+" ":""}function s(u,d,f,h,p,g){if(u!==f||d!==h){var m=p.push("translate(",null,t,null,r);g.push({i:m-4,x:Xi(u,f)},{i:m-2,x:Xi(d,h)})}else(f||h)&&p.push("translate("+f+t+h+r)}function a(u,d,f,h){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,n)-2,x:Xi(u,d)})):d&&f.push(i(f)+"rotate("+d+n)}function o(u,d,f,h){u!==d?h.push({i:f.push(i(f)+"skewX(",null,n)-2,x:Xi(u,d)}):d&&f.push(i(f)+"skewX("+d+n)}function c(u,d,f,h,p,g){if(u!==f||d!==h){var m=p.push(i(p)+"scale(",null,",",null,")");g.push({i:m-4,x:Xi(u,f)},{i:m-2,x:Xi(d,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(u,d){var f=[],h=[];return u=e(u),d=e(d),s(u.translateX,u.translateY,d.translateX,d.translateY,f,h),a(u.rotate,d.rotate,f,h),o(u.skewX,d.skewX,f,h),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,h),u=d=null,function(p){for(var g=-1,m=h.length,v;++g<m;)f[(v=h[g]).i]=v.x(p);return f.join("")}}}var gEe=BV(pEe,"px, ","px)","deg)"),vEe=BV(mEe,", ",")",")"),yEe=1e-12;function $$(e){return((e=Math.exp(e))+1/e)/2}function xEe(e){return((e=Math.exp(e))-1/e)/2}function bEe(e){return((e=Math.exp(2*e))-1)/(e+1)}const wEe=function e(t,r,n){function i(s,a){var o=s[0],c=s[1],u=s[2],d=a[0],f=a[1],h=a[2],p=d-o,g=f-c,m=p*p+g*g,v,y;if(m<yEe)y=Math.log(h/u)/t,v=function(_){return[o+_*p,c+_*g,u*Math.exp(t*_*y)]};else{var x=Math.sqrt(m),w=(h*h-u*u+n*m)/(2*u*r*x),S=(h*h-u*u-n*m)/(2*h*r*x),j=Math.log(Math.sqrt(w*w+1)-w),E=Math.log(Math.sqrt(S*S+1)-S);y=(E-j)/t,v=function(_){var N=_*y,O=$$(j),C=u/(r*x)*(O*bEe(t*N+j)-xEe(j));return[o+C*p,c+C*g,u*O/$$(t*N+j)]}}return v.duration=y*1e3*t/Math.SQRT2,v}return i.rho=function(s){var a=Math.max(.001,+s),o=a*a,c=o*o;return e(a,o,c)},i}(Math.SQRT2,2,4);function SEe(e,t){t===void 0&&(t=e,e=qf);for(var r=0,n=t.length-1,i=t[0],s=new Array(n<0?0:n);r<n;)s[r]=e(i,i=t[++r]);return function(a){var o=Math.max(0,Math.min(n-1,Math.floor(a*=n)));return s[o](a-o)}}function jEe(e){return function(){return e}}function Px(e){return+e}var I$=[0,1];function hn(e){return e}function G_(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:jEe(isNaN(t)?NaN:.5)}function _Ee(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function EEe(e,t,r){var n=e[0],i=e[1],s=t[0],a=t[1];return i<n?(n=G_(i,n),s=r(a,s)):(n=G_(n,i),s=r(s,a)),function(o){return s(n(o))}}function NEe(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),s=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)i[a]=G_(e[a],e[a+1]),s[a]=r(t[a],t[a+1]);return function(o){var c=Sg(e,o,1,n)-1;return s[c](i[c](o))}}function _g(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function qb(){var e=I$,t=I$,r=qf,n,i,s,a=hn,o,c,u;function d(){var h=Math.min(e.length,t.length);return a!==hn&&(a=_Ee(e[0],e[h-1])),o=h>2?NEe:EEe,c=u=null,f}function f(h){return h==null||isNaN(h=+h)?s:(c||(c=o(e.map(n),t,r)))(n(a(h)))}return f.invert=function(h){return a(i((u||(u=o(t,e.map(n),Xi)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Px),d()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),d()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),r=tC,d()},f.clamp=function(h){return arguments.length?(a=h?!0:hn,d()):a!==hn},f.interpolate=function(h){return arguments.length?(r=h,d()):r},f.unknown=function(h){return arguments.length?(s=h,f):s},function(h,p){return n=h,i=p,d()}}function rC(){return qb()(hn,hn)}function OEe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Tx(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Wd(e){return e=Tx(Math.abs(e)),e?e[1]:NaN}function AEe(e,t){return function(r,n){for(var i=r.length,s=[],a=0,o=e[0],c=0;i>0&&o>0&&(c+o+1>n&&(o=Math.max(1,n-c)),s.push(r.substring(i-=o,i+o)),!((c+=o+1)>n));)o=e[a=(a+1)%e.length];return s.reverse().join(t)}}function CEe(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var PEe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cm(e){if(!(t=PEe.exec(e)))throw new Error("invalid format: "+e);var t;return new nC({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}cm.prototype=nC.prototype;function nC(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}nC.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function TEe(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var zV;function kEe(e,t){var r=Tx(e,t);if(!r)return e+"";var n=r[0],i=r[1],s=i-(zV=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return s===a?n:s>a?n+new Array(s-a+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+Tx(e,Math.max(0,t+s-1))[0]}function M$(e,t){var r=Tx(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const D$={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:OEe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>M$(e*100,t),r:M$,s:kEe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function L$(e){return e}var F$=Array.prototype.map,B$=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function REe(e){var t=e.grouping===void 0||e.thousands===void 0?L$:AEe(F$.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?L$:CEe(F$.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f){f=cm(f);var h=f.fill,p=f.align,g=f.sign,m=f.symbol,v=f.zero,y=f.width,x=f.comma,w=f.precision,S=f.trim,j=f.type;j==="n"?(x=!0,j="g"):D$[j]||(w===void 0&&(w=12),S=!0,j="g"),(v||h==="0"&&p==="=")&&(v=!0,h="0",p="=");var E=m==="$"?r:m==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():"",_=m==="$"?n:/[%p]/.test(j)?a:"",N=D$[j],O=/[defgprs%]/.test(j);w=w===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function C(k){var $=E,D=_,A,R,T;if(j==="c")D=N(k)+D,k="";else{k=+k;var L=k<0||1/k<0;if(k=isNaN(k)?c:N(Math.abs(k),w),S&&(k=TEe(k)),L&&+k==0&&g!=="+"&&(L=!1),$=(L?g==="("?g:o:g==="-"||g==="("?"":g)+$,D=(j==="s"?B$[8+zV/3]:"")+D+(L&&g==="("?")":""),O){for(A=-1,R=k.length;++A<R;)if(T=k.charCodeAt(A),48>T||T>57){D=(T===46?i+k.slice(A+1):k.slice(A))+D,k=k.slice(0,A);break}}}x&&!v&&(k=t(k,1/0));var M=$.length+k.length+D.length,I=M<y?new Array(y-M+1).join(h):"";switch(x&&v&&(k=t(I+k,I.length?y-D.length:1/0),I=""),p){case"<":k=$+k+D+I;break;case"=":k=$+I+k+D;break;case"^":k=I.slice(0,M=I.length>>1)+$+k+D+I.slice(M);break;default:k=I+$+k+D;break}return s(k)}return C.toString=function(){return f+""},C}function d(f,h){var p=u((f=cm(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(Wd(h)/3)))*3,m=Math.pow(10,-g),v=B$[8+g/3];return function(y){return p(m*y)+v}}return{format:u,formatPrefix:d}}var jv,iC,UV;$Ee({thousands:",",grouping:[3],currency:["$",""]});function $Ee(e){return jv=REe(e),iC=jv.format,UV=jv.formatPrefix,jv}function IEe(e){return Math.max(0,-Wd(Math.abs(e)))}function MEe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Wd(t)/3)))*3-Wd(Math.abs(e)))}function DEe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Wd(t)-Wd(e))+1}function VV(e,t,r,n){var i=V_(e,t,r),s;switch(n=cm(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(s=MEe(i,a))&&(n.precision=s),UV(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=DEe(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=IEe(i))&&(n.precision=s-(n.type==="%")*2);break}}return iC(n)}function hl(e){var t=e.domain;return e.ticks=function(r){var n=t();return z_(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return VV(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,s=n.length-1,a=n[i],o=n[s],c,u,d=10;for(o<a&&(u=a,a=o,o=u,u=i,i=s,s=u);d-- >0;){if(u=U_(a,o,r),u===c)return n[i]=a,n[s]=o,t(n);if(u>0)a=Math.floor(a/u)*u,o=Math.ceil(o/u)*u;else if(u<0)a=Math.ceil(a*u)/u,o=Math.floor(o*u)/u;else break;c=u}return e},e}function kx(){var e=rC();return e.copy=function(){return _g(e,kx())},ki.apply(e,arguments),hl(e)}function WV(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Px),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return WV(e).unknown(t)},e=arguments.length?Array.from(e,Px):[0,1],hl(r)}function HV(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],s=e[n],a;return s<i&&(a=r,r=n,n=a,a=i,i=s,s=a),e[r]=t.floor(i),e[n]=t.ceil(s),e}function z$(e){return Math.log(e)}function U$(e){return Math.exp(e)}function LEe(e){return-Math.log(-e)}function FEe(e){return-Math.exp(-e)}function BEe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function zEe(e){return e===10?BEe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function UEe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function V$(e){return(t,r)=>-e(-t,r)}function sC(e){const t=e(z$,U$),r=t.domain;let n=10,i,s;function a(){return i=UEe(n),s=zEe(n),r()[0]<0?(i=V$(i),s=V$(s),e(LEe,FEe)):e(z$,U$),t}return t.base=function(o){return arguments.length?(n=+o,a()):n},t.domain=function(o){return arguments.length?(r(o),a()):r()},t.ticks=o=>{const c=r();let u=c[0],d=c[c.length-1];const f=d<u;f&&([u,d]=[d,u]);let h=i(u),p=i(d),g,m;const v=o==null?10:+o;let y=[];if(!(n%1)&&p-h<v){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;
vendor: 4,876 bytes, line 561
561++h)for(g=1;g<n;++g)if(m=h<0?g/s(-h):g*s(h),!(m<u)){if(m>d)break;y.push(m)}}else for(;h<=p;++h)for(g=n-1;g>=1;--g)if(m=h>0?g/s(-h):g*s(h),!(m<u)){if(m>d)break;y.push(m)}y.length*2<v&&(y=z_(u,d,v))}else y=z_(h,p,Math.min(p-h,v)).map(s);return f?y.reverse():y},t.tickFormat=(o,c)=>{if(o==null&&(o=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=cm(c)).precision==null&&(c.trim=!0),c=iC(c)),o===1/0)return c;const u=Math.max(1,n*o/t.ticks().length);return d=>{let f=d/s(Math.round(i(d)));return f*n<n-.5&&(f*=n),f<=u?c(d):""}},t.nice=()=>r(HV(r(),{floor:o=>s(Math.floor(i(o))),ceil:o=>s(Math.ceil(i(o)))})),t}function qV(){const e=sC(qb()).domain([1,10]);return e.copy=()=>_g(e,qV()).base(e.base()),ki.apply(e,arguments),e}function W$(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function H$(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function aC(e){var t=1,r=e(W$(t),H$(t));return r.constant=function(n){return arguments.length?e(W$(t=+n),H$(t)):t},hl(r)}function KV(){var e=aC(qb());return e.copy=function(){return _g(e,KV()).constant(e.constant())},ki.apply(e,arguments)}function q$(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function VEe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function WEe(e){return e<0?-e*e:e*e}function oC(e){var t=e(hn,hn),r=1;function n(){return r===1?e(hn,hn):r===.5?e(VEe,WEe):e(q$(r),q$(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},hl(t)}function lC(){var e=oC(qb());return e.copy=function(){return _g(e,lC()).exponent(e.exponent())},ki.apply(e,arguments),e}function HEe(){return lC.apply(null,arguments).exponent(.5)}function K$(e){return Math.sign(e)*e*e}function qEe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function GV(){var e=rC(),t=[0,1],r=!1,n;function i(s){var a=qEe(e(s));return isNaN(a)?n:r?Math.round(a):a}return i.invert=function(s){return e.invert(K$(s))},i.domain=function(s){return arguments.length?(e.domain(s),i):e.domain()},i.range=function(s){return arguments.length?(e.range((t=Array.from(s,Px)).map(K$)),i):t.slice()},i.rangeRound=function(s){return i.range(s).round(!0)},i.round=function(s){return arguments.length?(r=!!s,i):r},i.clamp=function(s){return arguments.length?(e.clamp(s),i):e.clamp()},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return GV(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ki.apply(i,arguments),hl(i)}function YV(){var e=[],t=[],r=[],n;function i(){var a=0,o=Math.max(1,t.length);for(r=new Array(o-1);++a<o;)r[a-1]=W_e(e,a/o);return s}function s(a){return a==null||isNaN(a=+a)?n:t[Sg(r,a)]}return s.invertExtent=function(a){var o=t.indexOf(a);return o<0?[NaN,NaN]:[o>0?r[o-1]:e[0],o<r.length?r[o]:e[e.length-1]]},s.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let o of a)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(Wo),i()},s.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},s.unknown=function(a){return arguments.length?(n=a,s):n},s.quantiles=function(){return r.slice()},s.copy=function(){return YV().domain(e).range(t).unknown(n)},ki.apply(s,arguments)}function XV(){var e=0,t=1,r=1,n=[.5],i=[0,1],s;function a(c){return c!=null&&c<=c?i[Sg(n,c,0,r)]:s}function o(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return a}return a.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,o()):[e,t]},a.range=function(c){return arguments.length?(r=(i=Array.from(c)).length-1,o()):i.slice()},a.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},a.unknown=function(c){return arguments.length&&(s=c),a},a.thresholds=function(){return n.slice()},a.copy=function(){return XV().domain([e,t]).range(i).unknown(s)},ki.apply(hl(a),arguments)}function QV(){var e=[.5],t=[0,1],r,n=1;function i(s){return s!=null&&s<=s?t[Sg(e,s,0,n)]:r}return i.domain=function(s){return arguments.length?(e=Array.from(s),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(s){return arguments.length?(t=Array.from(s),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(s){var a=t.indexOf(s);return[e[a-1],e[a]]},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return QV().domain(e).range(t).unknown(r)},ki.apply(i,arguments)}const X1=new Date,Q1=new Date;function Pr(e,t,r,n){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const a=i(s),o=i.ceil(s);return s-a<o-s?a:o},i.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,o)=>{const c=[];if(s=i.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return c;let u;do c.push(u=new Date(+s)),t(s,o),e(s);while(u<s&&s<a);return c},i.filter=s=>Pr(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,o)=>
vendor: 5,725 bytes, line 561
561{if(a>=a)if(o<0)for(;++o<=0;)for(;t(a,-1),!s(a););else for(;--o>=0;)for(;t(a,1),!s(a););}),r&&(i.count=(s,a)=>(X1.setTime(+s),Q1.setTime(+a),e(X1),e(Q1),Math.floor(r(X1,Q1))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(n?a=>n(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Rx=Pr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Rx.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pr(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Rx);Rx.range;const wa=1e3,bi=wa*60,Sa=bi*60,Da=Sa*24,cC=Da*7,G$=Da*30,Z1=Da*365,Wl=Pr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*wa)},(e,t)=>(t-e)/wa,e=>e.getUTCSeconds());Wl.range;const uC=Pr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*wa)},(e,t)=>{e.setTime(+e+t*bi)},(e,t)=>(t-e)/bi,e=>e.getMinutes());uC.range;const dC=Pr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*bi)},(e,t)=>(t-e)/bi,e=>e.getUTCMinutes());dC.range;const fC=Pr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*wa-e.getMinutes()*bi)},(e,t)=>{e.setTime(+e+t*Sa)},(e,t)=>(t-e)/Sa,e=>e.getHours());fC.range;const hC=Pr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Sa)},(e,t)=>(t-e)/Sa,e=>e.getUTCHours());hC.range;const Eg=Pr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*bi)/Da,e=>e.getDate()-1);Eg.range;const Kb=Pr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Da,e=>e.getUTCDate()-1);Kb.range;const ZV=Pr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Da,e=>Math.floor(e/Da));ZV.range;function Yc(e){return Pr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*bi)/cC)}const Gb=Yc(0),$x=Yc(1),KEe=Yc(2),GEe=Yc(3),Hd=Yc(4),YEe=Yc(5),XEe=Yc(6);Gb.range;$x.range;KEe.range;GEe.range;Hd.range;YEe.range;XEe.range;function Xc(e){return Pr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/cC)}const Yb=Xc(0),Ix=Xc(1),QEe=Xc(2),ZEe=Xc(3),qd=Xc(4),JEe=Xc(5),eNe=Xc(6);Yb.range;Ix.range;QEe.range;ZEe.range;qd.range;JEe.range;eNe.range;const pC=Pr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());pC.range;const mC=Pr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());mC.range;const La=Pr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());La.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});La.range;const Fa=Pr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Fa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Fa.range;function JV(e,t,r,n,i,s){const a=[[Wl,1,wa],[Wl,5,5*wa],[Wl,15,15*wa],[Wl,30,30*wa],[s,1,bi],[s,5,5*bi],[s,15,15*bi],[s,30,30*bi],[i,1,Sa],[i,3,3*Sa],[i,6,6*Sa],[i,12,12*Sa],[n,1,Da],[n,2,2*Da],[r,1,cC],[t,1,G$],[t,3,3*G$],[e,1,Z1]];function o(u,d,f){const h=d<u;h&&([u,d]=[d,u]);const p=f&&typeof f.range=="function"?f:c(u,d,f),g=p?p.range(u,+d+1):[];return h?g.reverse():g}function c(u,d,f){const h=Math.abs(d-u)/f,p=QA(([,,v])=>v).right(a,h);if(p===a.length)return e.every(V_(u/Z1,d/Z1,f));if(p===0)return Rx.every(Math.max(V_(u,d,f),1));const[g,m]=a[h/a[p-1][2]<a[p][2]/h?p-1:p];return g.every(m)}return[o,c]}const[tNe,rNe]=JV(Fa,mC,Yb,ZV,hC,dC),[nNe,iNe]=JV(La,pC,Gb,Eg,fC,uC);function J1(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function eS(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function xh(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function sNe(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,s=e.days,a=e.shortDays,o=e.months,c=e.shortMonths,u=bh(i),d=wh(i),f=bh(s),h=wh(s),p=bh(a),g=wh(a),m=bh(o),v=wh(o),y=bh(c),x=wh(c),w={a:L,A:M,b:I,B:F,c:null,d:eI,e:eI,f:ANe,g:LNe,G:BNe,H:ENe,I:NNe,j:ONe,L:e9,m:CNe,M:PNe,p:U,q:V,Q:nI,s:iI,S:TNe,u:kNe,U:RNe,V:$Ne,w:INe,W:MNe,x:null,X:null,y:DNe,Y:FNe,Z:zNe,"%":rI},S={a:G,A:Z,b:he,B:ve,c:null,d:tI,e:tI,f:HNe,g:tOe,G:nOe,H:UNe,I:VNe,j:WNe,L:r9,m:qNe,M:KNe,p:re,q:ge,Q:nI,s:iI,S:GNe,u:YNe,U:XNe,V:QNe,w:ZNe,W:JNe,x:null,X:null,y:eOe,Y:rOe,Z:iOe,"%":rI},j={a:C,A:k,b:$,B:D,c:A,d:Z$,e:Z$,f:wNe,g:Q$,G:X$,H:J$,I:J$,j:vNe,L:bNe,m:gNe,M:yNe,p:O,q:mNe,Q:jNe,s:_Ne,S:xNe,u:uNe,U:dNe,V:fNe,w:cNe,W:hNe,x:R,X:T,y:Q$,Y:X$,Z:pNe,"%":SNe};w.x=E(r,w),w.X=E(n,w),w.c=E(t,w),S.x=E(r,S),S.X=E(n,S),S.c=E(t,S);function E(Y,ee){return function(q){var W=[],Fe=-1,Ae=0,Ue=Y.length,nt,We,_e;for(q instanceof Date||(q=new Date(+q));++Fe<Ue;)Y.charCodeAt(Fe)===37&&(W.push(Y.slice(Ae,Fe)),(We=Y$[nt=Y.charAt(++Fe)])!=null?nt=Y.charAt(++Fe):We=nt==="e"?" ":"0",(_e=ee[nt])&&(nt=_e(q,We)),W.push(nt),Ae=Fe+1);return W.push(Y.slice(Ae,Fe)),W.join("")}}function _(Y,ee){return function(q){var W=xh(1900,void 0,1),Fe=N(W,Y,q+="",0),Ae,Ue;if(Fe!=q.length)return null;if("Q"in W)return new Date(W.Q);
vendor: 7,197 bytes, line 561
561if("s"in W)return new Date(W.s*1e3+("L"in W?W.L:0));if(ee&&!("Z"in W)&&(W.Z=0),"p"in W&&(W.H=W.H%12+W.p*12),W.m===void 0&&(W.m="q"in W?W.q:0),"V"in W){if(W.V<1||W.V>53)return null;"w"in W||(W.w=1),"Z"in W?(Ae=eS(xh(W.y,0,1)),Ue=Ae.getUTCDay(),Ae=Ue>4||Ue===0?Ix.ceil(Ae):Ix(Ae),Ae=Kb.offset(Ae,(W.V-1)*7),W.y=Ae.getUTCFullYear(),W.m=Ae.getUTCMonth(),W.d=Ae.getUTCDate()+(W.w+6)%7):(Ae=J1(xh(W.y,0,1)),Ue=Ae.getDay(),Ae=Ue>4||Ue===0?$x.ceil(Ae):$x(Ae),Ae=Eg.offset(Ae,(W.V-1)*7),W.y=Ae.getFullYear(),W.m=Ae.getMonth(),W.d=Ae.getDate()+(W.w+6)%7)}else("W"in W||"U"in W)&&("w"in W||(W.w="u"in W?W.u%7:"W"in W?1:0),Ue="Z"in W?eS(xh(W.y,0,1)).getUTCDay():J1(xh(W.y,0,1)).getDay(),W.m=0,W.d="W"in W?(W.w+6)%7+W.W*7-(Ue+5)%7:W.w+W.U*7-(Ue+6)%7);return"Z"in W?(W.H+=W.Z/100|0,W.M+=W.Z%100,eS(W)):J1(W)}}function N(Y,ee,q,W){for(var Fe=0,Ae=ee.length,Ue=q.length,nt,We;Fe<Ae;){if(W>=Ue)return-1;if(nt=ee.charCodeAt(Fe++),nt===37){if(nt=ee.charAt(Fe++),We=j[nt in Y$?ee.charAt(Fe++):nt],!We||(W=We(Y,q,W))<0)return-1}else if(nt!=q.charCodeAt(W++))return-1}return W}function O(Y,ee,q){var W=u.exec(ee.slice(q));return W?(Y.p=d.get(W[0].toLowerCase()),q+W[0].length):-1}function C(Y,ee,q){var W=p.exec(ee.slice(q));return W?(Y.w=g.get(W[0].toLowerCase()),q+W[0].length):-1}function k(Y,ee,q){var W=f.exec(ee.slice(q));return W?(Y.w=h.get(W[0].toLowerCase()),q+W[0].length):-1}function $(Y,ee,q){var W=y.exec(ee.slice(q));return W?(Y.m=x.get(W[0].toLowerCase()),q+W[0].length):-1}function D(Y,ee,q){var W=m.exec(ee.slice(q));return W?(Y.m=v.get(W[0].toLowerCase()),q+W[0].length):-1}function A(Y,ee,q){return N(Y,t,ee,q)}function R(Y,ee,q){return N(Y,r,ee,q)}function T(Y,ee,q){return N(Y,n,ee,q)}function L(Y){return a[Y.getDay()]}function M(Y){return s[Y.getDay()]}function I(Y){return c[Y.getMonth()]}function F(Y){return o[Y.getMonth()]}function U(Y){return i[+(Y.getHours()>=12)]}function V(Y){return 1+~~(Y.getMonth()/3)}function G(Y){return a[Y.getUTCDay()]}function Z(Y){return s[Y.getUTCDay()]}function he(Y){return c[Y.getUTCMonth()]}function ve(Y){return o[Y.getUTCMonth()]}function re(Y){return i[+(Y.getUTCHours()>=12)]}function ge(Y){return 1+~~(Y.getUTCMonth()/3)}return{format:function(Y){var ee=E(Y+="",w);return ee.toString=function(){return Y},ee},parse:function(Y){var ee=_(Y+="",!1);return ee.toString=function(){return Y},ee},utcFormat:function(Y){var ee=E(Y+="",S);return ee.toString=function(){return Y},ee},utcParse:function(Y){var ee=_(Y+="",!0);return ee.toString=function(){return Y},ee}}}var Y$={"-":"",_:" ",0:"0"},Mr=/^\s*\d+/,aNe=/^%/,oNe=/[\\^$*+?|[\]().{}]/g;function wt(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",s=i.length;return n+(s<r?new Array(r-s+1).join(t)+i:i)}function lNe(e){return e.replace(oNe,"\\$&")}function bh(e){return new RegExp("^(?:"+e.map(lNe).join("|")+")","i")}function wh(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function cNe(e,t,r){var n=Mr.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function uNe(e,t,r){var n=Mr.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function dNe(e,t,r){var n=Mr.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function fNe(e,t,r){var n=Mr.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function hNe(e,t,r){var n=Mr.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function X$(e,t,r){var n=Mr.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Q$(e,t,r){var n=Mr.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function pNe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function mNe(e,t,r){var n=Mr.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function gNe(e,t,r){var n=Mr.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Z$(e,t,r){var n=Mr.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function vNe(e,t,r){var n=Mr.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function J$(e,t,r){var n=Mr.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function yNe(e,t,r){var n=Mr.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function xNe(e,t,r){var n=Mr.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function bNe(e,t,r){var n=Mr.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function wNe(e,t,r){var n=Mr.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function SNe(e,t,r){var n=aNe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function jNe(e,t,r){var n=Mr.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function _Ne(e,t,r){var n=Mr.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function eI(e,t){return wt(e.getDate(),t,2)}function ENe(e,t){return wt(e.getHours(),t,2)}function NNe(e,t){return wt(e.getHours()%12||12,t,2)}function ONe(e,t){return wt(1+Eg.count(La(e),e),t,3)}function e9(e,t){return wt(e.getMilliseconds(),t,3)}function ANe(e,t){return e9(e,t)+"000"}function CNe(e,t){return wt(e.getMonth()+1,t,2)}function PNe(e,t){return wt(e.getMinutes(),t,2)}function TNe(e,t){return wt(e.getSeconds(),t,2)}function kNe(e){var t=e.getDay();return t===0?7:t}function RNe(e,t){return wt(Gb.count(La(e)-1,e),t,2)}function t9(e){var t=e.getDay();return t>=4||t===0?Hd(e):Hd.ceil(e)}function $Ne(e,t){return e=t9(e),wt(Hd.count(La(e),e)+(La(e).getDay()===4),t,2)}function INe(e){return e.getDay()}function MNe(e,t){return wt($x.count(La(e)-1,e),t,2)}function DNe(e,t){return wt(e.getFullYear()%100,t,2)}function LNe(e,t){return e=t9(e),wt(e.getFullYear()%100,t,2)}function FNe(e,t){return wt(e.getFullYear()%1e4,t,4)}function BNe(e,t){var r=e.getDay();return e=r>=4||r===0?Hd(e):Hd.ceil(e),wt(e.getFullYear()%1e4,t,4)}function zNe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+wt(t/60|0,"0",2)+wt(t%60,"0",2)}function tI(e,t){return wt(e.getUTCDate(),t,2)}function UNe(e,t){return wt(e.getUTCHours(),t,2)}function VNe(e,t){return wt(e.getUTCHours()%12||12,t,2)}function WNe(e,t){return wt(1+Kb.count(Fa(e),e),t,3)}function r9(e,t){return wt(e.getUTCMilliseconds(),t,3)}function HNe(e,t){return r9(e,t)+"000"}function qNe(e,t){return wt(e.getUTCMonth()+1,t,2)}function KNe(e,t){return wt(e.getUTCMinutes(),t,2)}function GNe(e,t){return wt(e.getUTCSeconds(),t,2)}function YNe(e){var t=e.getUTCDay();return t===0?7:t}function XNe(e,t){return wt(Yb.count(Fa(e)-1,e),t,2)}function n9(e){var t=e.getUTCDay();return t>=4||t===0?qd(e):qd.ceil(e)}function QNe(e,t){return e=n9(e),wt(qd.count(Fa(e),e)+(Fa(e).getUTCDay()===4),t,2)}function ZNe(e){return e.getUTCDay()}function JNe(e,t){return wt(Ix.count(Fa(e)-1,e),t,2)}function eOe(e,t){return wt(e.getUTCFullYear()%100,t,2)}function tOe(e,t){return e=n9(e),wt(e.getUTCFullYear()%100,t,2)}function rOe(e,t){return wt(e.getUTCFullYear()%1e4,t,4)}function nOe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?qd(e):qd.ceil(e),wt(e.getUTCFullYear()%1e4,t,4)}function iOe(){return"+0000"}function rI(){return"%"}function nI(e){return+e}function iI(e){return Math.floor(+e/1e3)}var uu,i9,s9;sOe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
561ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function sOe(e){return uu=sNe(e),i9=uu.format,uu.parse,s9=uu.utcFormat,uu.utcParse,uu}function aOe(e){return new Date(e)}function oOe(e){return e instanceof Date?+e:+new Date(+e)}function gC(e,t,r,n,i,s,a,o,c,u){var d=rC(),f=d.invert,h=d.domain,p=u(".%L"),g=u(":%S"),m=u("%I:%M"),v=u("%I %p"),y=u("%a %d"),x=u("%b %d"),w=u("%B"),S=u("%Y");function j(E){return(c(E)<E?p:o(E)<E?g:a(E)<E?m:s(E)<E?v:n(E)<E?i(E)<E?y:x:r(E)<E?w:S)(E)}return d.invert=function(E){return new Date(f(E))},d.domain=function(E){return arguments.length?h(Array.from(E,oOe)):h().map(aOe)},d.ticks=function(E){var _=h();return e(_[0],_[_.length-1],E??10)},d.tickFormat=function(E,_){return _==null?j:u(_)},d.nice=function(E){var _=h();return(!E||typeof E.range!="function")&&(E=t(_[0],_[_.length-1],E??10)),E?h(HV(_,E)):d},d.copy=function(){return _g(d,gC(e,t,r,n,i,s,a,o,c,u))},d}function lOe(){return ki.apply(gC(nNe,iNe,La,pC,Gb,Eg,fC,uC,Wl,i9).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function cOe(){return ki.apply(gC(tNe,rNe,Fa,mC,Yb,Kb,hC,dC,Wl,s9).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Xb(){var e=0,t=1,r,n,i,s,a=hn,o=!1,c;function u(f){return f==null||isNaN(f=+f)?c:a(i===0?.5:(f=(s(f)-r)*i,o?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,r=s(e=+e),n=s(t=+t),i=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(f){return arguments.length?(o=!!f,u):o},u.interpolator=function(f){return arguments.length?(a=f,u):a};function d(f){return function(h){var p,g;return arguments.length?([p,g]=h,a=f(p,g),u):[a(0),a(1)]}}
vendor: 66,628 bytes, lines 561-588
561return u.range=d(qf),u.rangeRound=d(tC),u.unknown=function(f){return arguments.length?(c=f,u):c},function(f){return s=f,r=f(e),n=f(t),i=r===n?0:1/(n-r),u}}function pl(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function a9(){var e=hl(Xb()(hn));return e.copy=function(){return pl(e,a9())},Ga.apply(e,arguments)}function o9(){var e=sC(Xb()).domain([1,10]);return e.copy=function(){return pl(e,o9()).base(e.base())},Ga.apply(e,arguments)}function l9(){var e=aC(Xb());return e.copy=function(){return pl(e,l9()).constant(e.constant())},Ga.apply(e,arguments)}function vC(){var e=oC(Xb());return e.copy=function(){return pl(e,vC()).exponent(e.exponent())},Ga.apply(e,arguments)}function uOe(){return vC.apply(null,arguments).exponent(.5)}function c9(){var e=[],t=hn;function r(n){if(n!=null&&!isNaN(n=+n))return t((Sg(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Wo),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,s)=>V_e(e,s/n))},r.copy=function(){return c9(t).domain(e)},Ga.apply(r,arguments)}function Qb(){var e=0,t=.5,r=1,n=1,i,s,a,o,c,u=hn,d,f=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+d(m))-s)*(n*m<n*s?o:c),u(f?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([e,t,r]=m,i=d(e=+e),s=d(t=+t),a=d(r=+r),o=i===s?0:.5/(s-i),c=s===a?0:.5/(a-s),n=s<i?-1:1,p):[e,t,r]},p.clamp=function(m){return arguments.length?(f=!!m,p):f},p.interpolator=function(m){return arguments.length?(u=m,p):u};function g(m){return function(v){var y,x,w;return arguments.length?([y,x,w]=v,u=SEe(m,[y,x,w]),p):[u(0),u(.5),u(1)]}}return p.range=g(qf),p.rangeRound=g(tC),p.unknown=function(m){return arguments.length?(h=m,p):h},function(m){return d=m,i=m(e),s=m(t),a=m(r),o=i===s?0:.5/(s-i),c=s===a?0:.5/(a-s),n=s<i?-1:1,p}}function u9(){var e=hl(Qb()(hn));return e.copy=function(){return pl(e,u9())},Ga.apply(e,arguments)}function d9(){var e=sC(Qb()).domain([.1,1,10]);return e.copy=function(){return pl(e,d9()).base(e.base())},Ga.apply(e,arguments)}function f9(){var e=aC(Qb());return e.copy=function(){return pl(e,f9()).constant(e.constant())},Ga.apply(e,arguments)}function yC(){var e=oC(Qb());return e.copy=function(){return pl(e,yC()).exponent(e.exponent())},Ga.apply(e,arguments)}function dOe(){return yC.apply(null,arguments).exponent(.5)}const sI=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:am,scaleDiverging:u9,scaleDivergingLog:d9,scaleDivergingPow:yC,scaleDivergingSqrt:dOe,scaleDivergingSymlog:f9,scaleIdentity:WV,scaleImplicit:W_,scaleLinear:kx,scaleLog:qV,scaleOrdinal:ZA,scalePoint:up,scalePow:lC,scaleQuantile:YV,scaleQuantize:XV,scaleRadial:GV,scaleSequential:a9,scaleSequentialLog:o9,scaleSequentialPow:vC,scaleSequentialQuantile:c9,scaleSequentialSqrt:uOe,scaleSequentialSymlog:l9,scaleSqrt:HEe,scaleSymlog:KV,scaleThreshold:QV,scaleTime:lOe,scaleUtc:cOe,tickFormat:VV},Symbol.toStringTag,{value:"Module"}));var fOe=Df;function hOe(e,t,r){for(var n=-1,i=e.length;++n<i;){var s=e[n],a=t(s);if(a!=null&&(o===void 0?a===a&&!fOe(a):r(a,o)))var o=a,c=s}return c}var Zb=hOe;function pOe(e,t){return e>t}var h9=pOe,mOe=Zb,gOe=h9,vOe=Hf;function yOe(e){return e&&e.length?mOe(e,vOe,gOe):void 0}var xOe=yOe;const Po=pt(xOe);function bOe(e,t){return e<t}var p9=bOe,wOe=Zb,SOe=p9,jOe=Hf;function _Oe(e){return e&&e.length?wOe(e,jOe,SOe):void 0}var EOe=_Oe;const Jb=pt(EOe);var NOe=kA,OOe=Qs,AOe=xV,COe=Rn;function POe(e,t){var r=COe(e)?NOe:AOe;return r(e,OOe(t))}var TOe=POe,kOe=vV,ROe=TOe;function $Oe(e,t){return kOe(ROe(e,t),1)}var IOe=$Oe;const MOe=pt(IOe);var DOe=KA;function LOe(e,t){return DOe(e,t)}var FOe=LOe;const Rc=pt(FOe);var Kf=1e9,BOe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},bC,Ht=!0,Ci="[DecimalError] ",uc=Ci+"Invalid argument: ",xC=Ci+"Exponent out of range: ",Gf=Math.floor,Pl=Math.pow,zOe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Hn,kr=1e7,Bt=7,m9=9007199254740991,Mx=Gf(m9/Bt),Oe={};Oe.absoluteValue=Oe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Oe.comparedTo=Oe.cmp=function(e){var t,r,n,i,s=this;if(e=new s.constructor(e),s.s!==e.s)return s.s||-e.s;if(s.e!==e.e)return s.e>e.e^s.s<0?1:-1;for(n=s.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(s.d[t]!==e.d[t])return s.d[t]>e.d[t]^s.s<0?1:-1;return n===i?0:n>i^s.s<0?1:-1};Oe.decimalPlaces=Oe.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Bt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Oe.dividedBy=Oe.div=function(e){return Oa(this,new this.constructor(e))};Oe.dividedToIntegerBy=Oe.idiv=function(e){var t=this,r=t.constructor;return Tt(Oa(t,new r(e),0,1),r.precision)};Oe.equals=Oe.eq=function(e){return!this.cmp(e)};Oe.exponent=function(){return br(this)};Oe.greaterThan=Oe.gt=function(e){return this.cmp(e)>0};Oe.greaterThanOrEqualTo=Oe.gte=function(e){return this.cmp(e)>=0};Oe.isInteger=Oe.isint=function(){return this.e>this.d.length-2};Oe.isNegative=Oe.isneg=function(){return this.s<0};Oe.isPositive=Oe.ispos=function(){return this.s>0};Oe.isZero=function(){return this.s===0};Oe.lessThan=Oe.lt=function(e){return this.cmp(e)<0};Oe.lessThanOrEqualTo=Oe.lte=function(e){return this.cmp(e)<1};Oe.logarithm=Oe.log=function(e){var t,r=this,n=r.constructor,i=n.precision,s=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Hn))throw Error(Ci+"NaN");if(r.s<1)throw Error(Ci+(r.s?"NaN":"-Infinity"));return r.eq(Hn)?new n(0):(Ht=!1,t=Oa(um(r,s),um(e,s),s),Ht=!0,Tt(t,i))};Oe.minus=Oe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?y9(t,e):g9(t,(e.s=-e.s,e))};Oe.modulo=Oe.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Ci+"NaN");return r.s?(Ht=!1,t=Oa(r,e,0,1).times(e),Ht=!0,r.minus(t)):Tt(new n(r),i)};Oe.naturalExponential=Oe.exp=function(){return v9(this)};Oe.naturalLogarithm=Oe.ln=function(){return um(this)};Oe.negated=Oe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Oe.plus=Oe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?g9(t,e):y9(t,(e.s=-e.s,e))};Oe.precision=Oe.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(uc+e);if(t=br(i)+1,n=i.d.length-1,r=n*Bt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};Oe.squareRoot=Oe.sqrt=function(){var e,t,r,n,i,s,a,o=this,c=o.constructor;if(o.s<1){if(!o.s)return new c(0);throw Error(Ci+"NaN")}for(e=br(o),Ht=!1,i=Math.sqrt(+o),i==0||i==1/0?(t=Rs(o.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Gf((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(i.toString()),r=c.precision,i=a=r+3;;)if(s=n,n=s.plus(Oa(o,s,a+2)).times(.5),Rs(s.d).slice(0,a)===(t=Rs(n.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(Tt(s,r+1,0),s.times(s).eq(o)){n=s;break}}else if(t!="9999")break;a+=4}return Ht=!0,Tt(n,r)};Oe.times=Oe.mul=function(e){var t,r,n,i,s,a,o,c,u,d=this,f=d.constructor,h=d.d,p=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,r=d.e+e.e,c=h.length,u=p.length,c<u&&(s=h,h=p,p=s,a=c,c=u,u=a),s=[],a=c+u,n=a;n--;)s.push(0);for(n=u;--n>=0;){for(t=0,i=c+n;i>n;)o=s[i]+p[n]*h[i-n-1]+t,s[i--]=o%kr|0,t=o/kr|0;s[i]=(s[i]+t)%kr|0}for(;!s[--a];)s.pop();return t?++r:s.shift(),e.d=s,e.e=r,Ht?Tt(e,f.precision):e};Oe.toDecimalPlaces=Oe.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Ks(e,0,Kf),t===void 0?t=n.rounding:Ks(t,0,8),Tt(r,e+br(r)+1,t))};Oe.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=$c(n,!0):(Ks(e,0,Kf),t===void 0?t=i.rounding:Ks(t,0,8),n=Tt(new i(n),e+1,t),r=$c(n,!0,e+1)),r};Oe.toFixed=function(e,t){var r,n,i=this,s=i.constructor;return e===void 0?$c(i):(Ks(e,0,Kf),t===void 0?t=s.rounding:Ks(t,0,8),n=Tt(new s(i),e+br(i)+1,t),r=$c(n.abs(),!1,e+br(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Oe.toInteger=Oe.toint=function(){var e=this,t=e.constructor;return Tt(new t(e),br(e)+1,t.rounding)};Oe.toNumber=function(){return+this};Oe.toPower=Oe.pow=function(e){var t,r,n,i,s,a,o=this,c=o.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(Hn);if(o=new c(o),!o.s){if(e.s<1)throw Error(Ci+"Infinity");return o}if(o.eq(Hn))return o;if(n=c.precision,e.eq(Hn))return Tt(o,n);if(t=e.e,r=e.d.length-1,a=t>=r,s=o.s,a){if((r=d<0?-d:d)<=m9){for(i=new c(Hn),t=Math.ceil(n/Bt+4),Ht=!1;r%2&&(i=i.times(o),oI(i.d,t)),r=Gf(r/2),r!==0;)o=o.times(o),oI(o.d,t);return Ht=!0,e.s<0?new c(Hn).div(i):Tt(i,n)}}else if(s<0)throw Error(Ci+"NaN");return s=s<0&&e.d[Math.max(t,r)]&1?-1:1,o.s=1,Ht=!1,i=e.times(um(o,n+u)),Ht=!0,i=v9(i),i.s=s,i};Oe.toPrecision=function(e,t){var r,n,i=this,s=i.constructor;return e===void 0?(r=br(i),n=$c(i,r<=s.toExpNeg||r>=s.toExpPos)):(Ks(e,1,Kf),t===void 0?t=s.rounding:Ks(t,0,8),i=Tt(new s(i),e,t),r=br(i),n=$c(i,e<=r||r<=s.toExpNeg,e)),n};Oe.toSignificantDigits=Oe.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Ks(e,1,Kf),t===void 0?t=n.rounding:Ks(t,0,8)),Tt(new n(r),e,t)};Oe.toString=Oe.valueOf=Oe.val=Oe.toJSON=Oe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=br(e),r=e.constructor;return $c(e,t<=r.toExpNeg||t>=r.toExpPos)};function g9(e,t){var r,n,i,s,a,o,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),Ht?Tt(t,f):t;if(c=e.d,u=t.d,a=e.e,i=t.e,c=c.slice(),s=a-i,s){for(s<0?(n=c,s=-s,o=u.length):(n=u,i=a,o=c.length),a=Math.ceil(f/Bt),o=a>o?a+1:o+1,s>o&&(s=o,n.length=1),n.reverse();s--;)n.push(0);n.reverse()}for(o=c.length,s=u.length,o-s<0&&(s=o,n=u,u=c,c=n),r=0;s;)r=(c[--s]=c[s]+u[s]+r)/kr|0,c[s]%=kr;for(r&&(c.unshift(r),++i),o=c.length;c[--o]==0;)c.pop();return t.d=c,t.e=i,Ht?Tt(t,f):t}function Ks(e,t,r){if(e!==~~e||e<t||e>r)throw Error(uc+e)}function Rs(e){var t,r,n,i=e.length-1,s="",a=e[0];if(i>0){for(s+=a,t=1;t<i;t++)n=e[t]+"",r=Bt-n.length,r&&(s+=co(r)),s+=n;a=e[t],n=a+"",r=Bt-n.length,r&&(s+=co(r))}else if(a===0)return"0";for(;a%10===0;)a/=10;return s+a}var Oa=function(){function e(n,i){var s,a=0,o=n.length;for(n=n.slice();o--;)s=n[o]*i+a,n[o]=s%kr|0,a=s/kr|0;return a&&n.unshift(a),n}function t(n,i,s,a){var o,c;if(s!=a)c=s>a?1:-1;else for(o=c=0;o<s;o++)if(n[o]!=i[o]){c=n[o]>i[o]?1:-1;break}return c}function r(n,i,s){for(var a=0;s--;)n[s]-=a,a=n[s]<i[s]?1:0,n[s]=a*kr+n[s]-i[s];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,s,a){var o,c,u,d,f,h,p,g,m,v,y,x,w,S,j,E,_,N,O=n.constructor,C=n.s==i.s?1:-1,k=n.d,$=i.d;if(!n.s)return new O(n);if(!i.s)throw Error(Ci+"Division by zero");for(c=n.e-i.e,_=$.length,j=k.length,p=new O(C),g=p.d=[],u=0;$[u]==(k[u]||0);)++u;if($[u]>(k[u]||0)&&--c,s==null?x=s=O.precision:a?x=s+(br(n)-br(i))+1:x=s,x<0)return new O(0);if(x=x/Bt+2|0,u=0,_==1)for(d=0,$=$[0],x++;(u<j||d)&&x--;u++)w=d*kr+(k[u]||0),g[u]=w/$|0,d=w%$|0;else{for(d=kr/($[0]+1)|0,d>1&&($=e($,d),k=e(k,d),_=$.length,j=k.length),S=_,m=k.slice(0,_),v=m.length;v<_;)m[v++]=0;N=$.slice(),N.unshift(0),E=$[0],$[1]>=kr/2&&++E;do d=0,o=t($,m,_,v),o<0?(y=m[0],_!=v&&(y=y*kr+(m[1]||0)),d=y/E|0,d>1?(d>=kr&&(d=kr-1),f=e($,d),h=f.length,v=m.length,o=t(f,m,h,v),o==1&&(d--,r(f,_<h?N:$,h))):(d==0&&(o=d=1),f=$.slice()),h=f.length,h<v&&f.unshift(0),r(m,f,v),o==-1&&(v=m.length,o=t($,m,_,v),o<1&&(d++,r(m,_<v?N:$,v))),v=m.length):o===0&&(d++,m=[0]),g[u++]=d,o&&m[0]?m[v++]=k[S]||0:(m=[k[S]],v=1);while((S++<j||m[0]!==void 0)&&x--)}return g[0]||g.shift(),p.e=c,Tt(p,a?s+br(p)+1:s)}}();function v9(e,t){var r,n,i,s,a,o,c=0,u=0,d=e.constructor,f=d.precision;if(br(e)>16)throw Error(xC+br(e));if(!e.s)return new d(Hn);for(Ht=!1,o=f,a=new d(.03125);e.abs().gte(.1);)e=e.times(a),u+=5;for(n=Math.log(Pl(2,u))/Math.LN10*2+5|0,o+=n,r=i=s=new d(Hn),d.precision=o;;){if(i=Tt(i.times(e),o),r=r.times(++c),a=s.plus(Oa(i,r,o)),Rs(a.d).slice(0,o)===Rs(s.d).slice(0,o)){for(;u--;)s=Tt(s.times(s),o);return d.precision=f,t==null?(Ht=!0,Tt(s,f)):s}s=a}}function br(e){for(var t=e.e*Bt,r=e.d[0];r>=10;r/=10)t++;return t}function tS(e,t,r){if(t>e.LN10.sd())throw Ht=!0,r&&(e.precision=r),Error(Ci+"LN10 precision limit exceeded");return Tt(new e(e.LN10),t)}function co(e){for(var t="";e--;)t+="0";return t}function um(e,t){var r,n,i,s,a,o,c,u,d,f=1,h=10,p=e,g=p.d,m=p.constructor,v=m.precision;if(p.s<1)throw Error(Ci+(p.s?"NaN":"-Infinity"));if(p.eq(Hn))return new m(0);if(t==null?(Ht=!1,u=v):u=t,p.eq(10))return t==null&&(Ht=!0),tS(m,u);if(u+=h,m.precision=u,r=Rs(g),n=r.charAt(0),s=br(p),Math.abs(s)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Rs(p.d),n=r.charAt(0),f++;s=br(p),n>1?(p=new m("0."+r),s++):p=new m(n+"."+r.slice(1))}else return c=tS(m,u+2,v).times(s+""),p=um(new m(n+"."+r.slice(1)),u-h).plus(c),m.precision=v,t==null?(Ht=!0,Tt(p,v)):p;for(o=a=p=Oa(p.minus(Hn),p.plus(Hn),u),d=Tt(p.times(p),u),i=3;;){if(a=Tt(a.times(d),u),c=o.plus(Oa(a,new m(i),u)),Rs(c.d).slice(0,u)===Rs(o.d).slice(0,u))return o=o.times(2),s!==0&&(o=o.plus(tS(m,u+2,v).times(s+""))),o=Oa(o,new m(f),u),m.precision=v,t==null?(Ht=!0,Tt(o,v)):o;o=c,i+=2}}function aI(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Gf(r/Bt),e.d=[],n=(r+1)%Bt,r<0&&(n+=Bt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=Bt;n<i;)e.d.push(+t.slice(n,n+=Bt));t=t.slice(n),n=Bt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),Ht&&(e.e>Mx||e.e<-Mx))throw Error(xC+r)}else e.s=0,e.e=0,e.d=[0];return e}function Tt(e,t,r){var n,i,s,a,o,c,u,d,f=e.d;for(a=1,s=f[0];s>=10;s/=10)a++;if(n=t-a,n<0)n+=Bt,i=t,u=f[d=0];else{if(d=Math.ceil((n+1)/Bt),s=f.length,d>=s)return e;for(u=s=f[d],a=1;s>=10;s/=10)a++;n%=Bt,i=n-Bt+a}if(r!==void 0&&(s=Pl(10,a-i-1),o=u/s%10|0,c=t<0||f[d+1]!==void 0||u%s,c=r<4?(o||c)&&(r==0||r==(e.s<0?3:2)):o>5||o==5&&(r==4||c||r==6&&(n>0?i>0?u/Pl(10,a-i):0:f[d-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return c?(s=br(e),f.length=1,t=t-s-1,f[0]=Pl(10,(Bt-t%Bt)%Bt),e.e=Gf(-t/Bt)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=d,s=1,d--):(f.length=d+1,s=Pl(10,Bt-n),f[d]=i>0?(u/Pl(10,a-i)%Pl(10,i)|0)*s:0),c)for(;;)if(d==0){(f[0]+=s)==kr&&(f[0]=1,++e.e);break}else{if(f[d]+=s,f[d]!=kr)break;f[d--]=0,s=1}for(n=f.length;f[--n]===0;)f.pop();if(Ht&&(e.e>Mx||e.e<-Mx))throw Error(xC+br(e));return e}function y9(e,t){var r,n,i,s,a,o,c,u,d,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Ht?Tt(t,p):t;if(c=e.d,f=t.d,n=t.e,u=e.e,c=c.slice(),a=u-n,a){for(d=a<0,d?(r=c,a=-a,o=f.length):(r=f,n=u,o=c.length),i=Math.max(Math.ceil(p/Bt),o)+2,a>i&&(a=i,r.length=1),r.reverse(),i=a;i--;)r.push(0);r.reverse()}else{for(i=c.length,o=f.length,d=i<o,d&&(o=i),i=0;i<o;i++)if(c[i]!=f[i]){d=c[i]<f[i];break}a=0}for(d&&(r=c,c=f,f=r,t.s=-t.s),o=c.length,i=f.length-o;i>0;--i)c[o++]=0;for(i=f.length;i>a;){if(c[--i]<f[i]){for(s=i;s&&c[--s]===0;)c[s]=kr-1;--c[s],c[i]+=kr}c[i]-=f[i]}for(;c[--o]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,Ht?Tt(t,p):t):new h(0)}function $c(e,t,r){var n,i=br(e),s=Rs(e.d),a=s.length;return t?(r&&(n=r-a)>0?s=s.charAt(0)+"."+s.slice(1)+co(n):a>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(i<0?"e":"e+")+i):i<0?(s="0."+co(-i-1)+s,r&&(n=r-a)>0&&(s+=co(n))):i>=a?(s+=co(i+1-a),r&&(n=r-i-1)>0&&(s=s+"."+co(n))):((n=i+1)<a&&(s=s.slice(0,n)+"."+s.slice(n)),r&&(n=r-a)>0&&(i+1===a&&(s+="."),s+=co(n))),e.s<0?"-"+s:s}function oI(e,t){if(e.length>t)return e.length=t,!0}function x9(e){var t,r,n;function i(s){var a=this;if(!(a instanceof i))return new i(s);if(a.constructor=i,s instanceof i){a.s=s.s,a.e=s.e,a.d=(s=s.d)?s.slice():s;return}if(typeof s=="number"){if(s*0!==0)throw Error(uc+s);if(s>0)a.s=1;else if(s<0)s=-s,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(s===~~s&&s<1e7){a.e=0,a.d=[s];return}return aI(a,s.toString())}else if(typeof s!="string")throw Error(uc+s);if(s.charCodeAt(0)===45?(s=s.slice(1),a.s=-1):a.s=1,zOe.test(s))aI(a,s);else throw Error(uc+s)}if(i.prototype=Oe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=x9,i.config=i.set=UOe,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function UOe(e){if(!e||typeof e!="object")throw Error(Ci+"Object expected");var t,r,n,i=["precision",1,Kf,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Gf(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(uc+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(uc+r+": "+n);return this}var bC=x9(BOe);Hn=new bC(1);const Pt=bC;function VOe(e){return KOe(e)||qOe(e)||HOe(e)||WOe()}function WOe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
562In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HOe(e,t){if(e){if(typeof e=="string")return Y_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Y_(e,t)}}function qOe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function KOe(e){if(Array.isArray(e))return Y_(e)}function Y_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var GOe=function(t){return t},b9={},w9=function(t){return t===b9},lI=function(t){return function r(){return arguments.length===0||arguments.length===1&&w9(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},YOe=function e(t,r){return t===1?r:lI(function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];var a=i.filter(function(o){return o!==b9}).length;return a>=t?r.apply(void 0,i):e(t-a,lI(function(){for(var o=arguments.length,c=new Array(o),u=0;u<o;u++)c[u]=arguments[u];var d=i.map(function(f){return w9(f)?c.shift():f});return r.apply(void 0,VOe(d).concat(c))}))})},ew=function(t){return YOe(t.length,t)},X_=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},XOe=ew(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),QOe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return GOe;var i=r.reverse(),s=i[0],a=i.slice(1);return function(){return a.reduce(function(o,c){return c(o)},s.apply(void 0,arguments))}},Q_=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},S9=function(t){var r=null,n=null;return function(){for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return r&&s.every(function(o,c){return o===r[c]})||(r=s,n=t.apply(void 0,s)),n}};function ZOe(e){var t;return e===0?t=1:t=Math.floor(new Pt(e).abs().log(10).toNumber())+1,t}function JOe(e,t,r){for(var n=new Pt(e),i=0,s=[];n.lt(t)&&i<1e5;)s.push(n.toNumber()),n=n.add(r),i++;return s}var eAe=ew(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),tAe=ew(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),rAe=ew(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const tw={rangeStep:JOe,getDigitCount:ZOe,interpolateNumber:eAe,uninterpolateNumber:tAe,uninterpolateTruncation:rAe};function Z_(e){return sAe(e)||iAe(e)||j9(e)||nAe()}function nAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
563In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iAe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function sAe(e){if(Array.isArray(e))return J_(e)}function dm(e,t){return lAe(e)||oAe(e,t)||j9(e,t)||aAe()}function aAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
564In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j9(e,t){if(e){if(typeof e=="string")return J_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J_(e,t)}}function J_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oAe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,s=void 0;try{for(var a=e[Symbol.iterator](),o;!(n=(o=a.next()).done)&&(r.push(o.value),!(t&&r.length===t));n=!0);}catch(c){i=!0,s=c}finally{try{!n&&a.return!=null&&a.return()}finally{if(i)throw s}}return r}}function lAe(e){if(Array.isArray(e))return e}function _9(e){var t=dm(e,2),r=t[0],n=t[1],i=r,s=n;return r>n&&(i=n,s=r),[i,s]}function E9(e,t,r){if(e.lte(0))return new Pt(0);var n=tw.getDigitCount(e.toNumber()),i=new Pt(10).pow(n),s=e.div(i),a=n!==1?.05:.1,o=new Pt(Math.ceil(s.div(a).toNumber())).add(r).mul(a),c=o.mul(i);return t?c:new Pt(Math.ceil(c))}function cAe(e,t,r){var n=1,i=new Pt(e);if(!i.isint()&&r){var s=Math.abs(e);s<1?(n=new Pt(10).pow(tw.getDigitCount(e)-1),i=new Pt(Math.floor(i.div(n).toNumber())).mul(n)):s>1&&(i=new Pt(Math.floor(e)))}else e===0?i=new Pt(Math.floor((t-1)/2)):r||(i=new Pt(Math.floor(e)));var a=Math.floor((t-1)/2),o=QOe(XOe(function(c){return i.add(new Pt(c-a).mul(n)).toNumber()}),X_);return o(0,t)}function N9(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Pt(0),tickMin:new Pt(0),tickMax:new Pt(0)};var s=E9(new Pt(t).sub(e).div(r-1),n,i),a;e<=0&&t>=0?a=new Pt(0):(a=new Pt(e).add(t).div(2),a=a.sub(new Pt(a).mod(s)));var o=Math.ceil(a.sub(e).div(s).toNumber()),c=Math.ceil(new Pt(t).sub(a).div(s).toNumber()),u=o+c+1;return u>r?N9(e,t,r,n,i+1):(u<r&&(c=t>0?c+(r-u):c,o=t>0?o:o+(r-u)),{step:s,tickMin:a.sub(new Pt(o).mul(s)),tickMax:a.add(new Pt(c).mul(s))})}function uAe(e){var t=dm(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),o=_9([r,n]),c=dm(o,2),u=c[0],d=c[1];if(u===-1/0||d===1/0){var f=d===1/0?[u].concat(Z_(X_(0,i-1).map(function(){return 1/0}))):[].concat(Z_(X_(0,i-1).map(function(){return-1/0})),[d]);return r>n?Q_(f):f}if(u===d)return cAe(u,i,s);var h=N9(u,d,a,s),p=h.step,g=h.tickMin,m=h.tickMax,v=tw.rangeStep(g,m.add(new Pt(.1).mul(p)),p);return r>n?Q_(v):v}function dAe(e,t){var r=dm(e,2),n=r[0],i=r[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=_9([n,i]),o=dm(a,2),c=o[0],u=o[1];if(c===-1/0||u===1/0)return[n,i];if(c===u)return[c];var d=Math.max(t,2),f=E9(new Pt(u).sub(c).div(d-1),s,0),h=[].concat(Z_(tw.rangeStep(new Pt(c),new Pt(u).sub(new Pt(.99).mul(f)),f)),[u]);return n>i?Q_(h):h}var fAe=S9(uAe),hAe=S9(dAe),pAe="Invariant failed";function Ic(e,t){throw new Error(pAe)}var mAe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Kd(e){"@babel/helpers - typeof";return Kd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kd(e)}function Dx(){return Dx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dx.apply(this,arguments)}function gAe(e,t){return bAe(e)||xAe(e,t)||yAe(e,t)||vAe()}function vAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
565In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yAe(e,t){if(e){if(typeof e=="string")return cI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cI(e,t)}}function cI(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function xAe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function bAe(e){if(Array.isArray(e))return e}function wAe(e,t){if(e==null)return{};var r=SAe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function SAe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function jAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _Ae(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,C9(n.key),n)}}function EAe(e,t,r){return t&&_Ae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function NAe(e,t,r){return t=Lx(t),OAe(e,O9()?Reflect.construct(t,r||[],Lx(e).constructor):t.apply(e,r))}function OAe(e,t){if(t&&(Kd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AAe(e)}function AAe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(O9=function(){return!!e})()}function Lx(e){return Lx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lx(e)}function CAe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eE(e,t)}function eE(e,t){return eE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},eE(e,t)}function A9(e,t,r){return t=C9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C9(e){var t=PAe(e,"string");return Kd(t)=="symbol"?t:t+""}function PAe(e,t){if(Kd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Kd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ng=function(e){function t(){return jAe(this,t),NAe(this,t,arguments)}return CAe(t,e),EAe(t,[{key:"render",value:function(){var n=this.props,i=n.offset,s=n.layout,a=n.width,o=n.dataKey,c=n.data,u=n.dataPointFormatter,d=n.xAxis,f=n.yAxis,h=wAe(n,mAe),p=Le(h,!1);this.props.direction==="x"&&d.type!=="number"&&Ic();var g=c.map(function(m){var v=u(m,o),y=v.x,x=v.y,w=v.value,S=v.errorVal;if(!S)return null;var j=[],E,_;if(Array.isArray(S)){var N=gAe(S,2);E=N[0],_=N[1]}else E=_=S;if(s==="vertical"){var O=d.scale,C=x+i,k=C+a,$=C-a,D=O(w-E),A=O(w+_);j.push({x1:A,y1:k,x2:A,y2:$}),j.push({x1:D,y1:C,x2:A,y2:C}),j.push({x1:D,y1:k,x2:D,y2:$})}else if(s==="horizontal"){var R=f.scale,T=y+i,L=T-a,M=T+a,I=R(w-E),F=R(w+_);j.push({x1:L,y1:F,x2:M,y2:F}),j.push({x1:T,y1:I,x2:T,y2:F}),j.push({x1:L,y1:I,x2:M,y2:I})}return P.createElement(ut,Dx({className:"recharts-errorBar",key:"bar-".concat(j.map(function(U){return"".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))},p),j.map(function(U){return P.createElement("line",Dx({},U,{key:"line-".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))}))});return P.createElement(ut,{className:"recharts-errorBars"},g)}}])}(P.Component);A9(Ng,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});A9(Ng,"displayName","ErrorBar");function fm(e){"@babel/helpers - typeof";return fm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fm(e)}function uI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uI(Object(r),!0).forEach(function(n){TAe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TAe(e,t,r){return t=kAe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kAe(e){var t=RAe(e,"string");return fm(t)=="symbol"?t:t+""}function RAe(e,t){if(fm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var P9=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,s=t.legendContent,a=Ln(r,Vo);if(!a)return null;var o=Vo.defaultProps,c=o!==void 0?wl(wl({},o),a.props):{},u;return a.props&&a.props.payload?u=a.props&&a.props.payload:s==="children"?u=(n||[]).reduce(function(d,f){var h=f.item,p=f.props,g=p.sectors||p.data||[];return d.concat(g.map(function(m){return{type:a.props.iconType||h.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):u=(n||[]).map(function(d){var f=d.item,h=f.type.defaultProps,p=h!==void 0?wl(wl({},h),f.props):{},g=p.dataKey,m=p.name,v=p.legendType,y=p.hide;return{inactive:y,dataKey:g,type:c.iconType||v||"square",color:wC(f),value:m||g,payload:p}}),wl(wl(wl({},c),Vo.getWithHeight(a,i)),{},{payload:u,item:a})};function hm(e){"@babel/helpers - typeof";return hm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hm(e)}function dI(e){return DAe(e)||MAe(e)||IAe(e)||$Ae()}function $Ae(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
566In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IAe(e,t){if(e){if(typeof e=="string")return tE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tE(e,t)}}function MAe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function DAe(e){if(Array.isArray(e))return tE(e)}function tE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fI(Object(r),!0).forEach(function(n){ed(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ed(e,t,r){return t=LAe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LAe(e){var t=FAe(e,"string");return hm(t)=="symbol"?t:t+""}function FAe(e,t){if(hm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dr(e,t,r){return Qe(e)||Qe(t)?r:Cr(t)?Yn(e,t,r):qe(t)?t(e):r}function dp(e,t,r,n){var i=MOe(e,function(o){return dr(o,t)});if(r==="number"){var s=i.filter(function(o){return le(o)||parseFloat(o)});return s.length?[Jb(s),Po(s)]:[1/0,-1/0]}var a=n?i.filter(function(o){return!Qe(o)}):i;return a.map(function(o){return Cr(o)||o instanceof Date?o:""})}var BAe=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,a=-1,o=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(o<=1)return 0;if(s&&s.axisType==="angleAxis"&&Math.abs(Math.abs(s.range[1]-s.range[0])-360)<=1e-6)for(var c=s.range,u=0;u<o;u++){var d=u>0?i[u-1].coordinate:i[o-1].coordinate,f=i[u].coordinate,h=u>=o-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(dn(f-d)!==dn(h-f)){var g=[];if(dn(h-f)===dn(c[1]-c[0])){p=h;var m=f+c[1]-c[0];g[0]=Math.min(m,(m+d)/2),g[1]=Math.max(m,(m+d)/2)}else{p=d;var v=h+c[1]-c[0];g[0]=Math.min(f,(v+f)/2),g[1]=Math.max(f,(v+f)/2)}var y=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>y[0]&&t<=y[1]||t>=g[0]&&t<=g[1]){a=i[u].index;break}}else{var x=Math.min(d,h),w=Math.max(d,h);if(t>(x+f)/2&&t<=(w+f)/2){a=i[u].index;break}}}else for(var S=0;S<o;S++)if(S===0&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S>0&&S<o-1&&t>(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===o-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){a=n[S].index;break}return a},wC=function(t){var r,n=t,i=n.type.displayName,s=(r=t.type)!==null&&r!==void 0&&r.defaultProps?ar(ar({},t.type.defaultProps),t.props):t.props,a=s.stroke,o=s.fill,c;switch(i){case"Line":c=a;break;case"Area":case"Radar":c=a&&a!=="none"?a:o;break;default:c=o;break}return c},zAe=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,s=i===void 0?{}:i;if(!s)return{};for(var a={},o=Object.keys(s),c=0,u=o.length;c<u;c++)for(var d=s[o[c]].stackGroups,f=Object.keys(d),h=0,p=f.length;h<p;h++){var g=d[f[h]],m=g.items,v=g.cateAxisId,y=m.filter(function(_){return Na(_.type).indexOf("Bar")>=0});if(y&&y.length){var x=y[0].type.defaultProps,w=x!==void 0?ar(ar({},x),y[0].props):y[0].props,S=w.barSize,j=w[v];a[j]||(a[j]=[]);var E=Qe(S)?r:S;a[j].push({item:y[0],stackList:y.slice(1),barSize:Qe(E)?void 0:fn(E,n,0)})}}return a},UAe=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,s=t.sizeList,a=s===void 0?[]:s,o=t.maxBarSize,c=a.length;if(c<1)return null;var u=fn(r,i,0,!0),d,f=[];if(a[0].barSize===+a[0].barSize){var h=!1,p=i/c,g=a.reduce(function(S,j){return S+j.barSize||0},0);g+=(c-1)*u,g>=i&&(g-=(c-1)*u,u=0),g>=i&&p>0&&(h=!0,p*=.9,g=c*p);var m=(i-g)/2>>0,v={offset:m-u,size:0};d=a.reduce(function(S,j){var E={item:j.item,position:{offset:v.offset+v.size+u,size:h?p:j.barSize}},_=[].concat(dI(S),[E]);return v=_[_.length-1].position,j.stackList&&j.stackList.length&&j.stackList.forEach(function(N){_.push({item:N,position:v})}),_},f)}else{var y=fn(n,i,0,!0);i-2*y-(c-1)*u<=0&&(u=0);var x=(i-2*y-(c-1)*u)/c;x>1&&(x>>=0);var w=o===+o?Math.min(x,o):x;d=a.reduce(function(S,j,E){var _=[].concat(dI(S),[{item:j.item,position:{offset:y+(x+u)*E+(x-w)/2,size:w}}]);return j.stackList&&j.stackList.length&&j.stackList.forEach(function(N){_.push({item:N,position:_[_.length-1].position})}),_},f)}return d},VAe=function(t,r,n,i){var s=n.children,a=n.width,o=n.margin,c=a-(o.left||0)-(o.right||0),u=P9({children:s,legendWidth:c});if(u){var d=i||{},f=d.width,h=d.height,p=u.align,g=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&g==="middle")&&p!=="center"&&le(t[p]))return ar(ar({},t),{},ed({},p,t[p]+(f||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&g!=="middle"&&le(t[g]))return ar(ar({},t),{},ed({},g,t[g]+(h||0)))}return t},WAe=function(t,r,n){return Qe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},T9=function(t,r,n,i,s){var a=r.props.children,o=Xn(a,Ng).filter(function(u){return WAe(i,s,u.props.direction)});if(o&&o.length){var c=o.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var f=dr(d,n);if(Qe(f))return u;var h=Array.isArray(f)?[Jb(f),Po(f)]:[f,f],p=c.reduce(function(g,m){var v=dr(d,m,0),y=h[0]-Math.abs(Array.isArray(v)?v[0]:v),x=h[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(y,g[0]),Math.max(x,g[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},HAe=function(t,r,n,i,s){var a=r.map(function(o){return T9(t,o,n,s,i)}).filter(function(o){return!Qe(o)});return a&&a.length?a.reduce(function(o,c){return[Math.min(o[0],c[0]),Math.max(o[1],c[1])]},[1/0,-1/0]):null},k9=function(t,r,n,i,s){var a=r.map(function(c){var u=c.props.dataKey;return n==="number"&&u&&T9(t,c,u,i)||dp(t,u,n,s)});if(n==="number")return a.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var o={};return a.reduce(function(c,u){for(var d=0,f=u.length;d<f;d++)o[u[d]]||(o[u[d]]=!0,c.push(u[d]));return c},[])},R9=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},$9=function(t,r,n,i){if(i)return t.map(function(c){return c.coordinate});var s,a,o=t.map(function(c){return c.coordinate===r&&(s=!0),c.coordinate===n&&(a=!0),c.coordinate});return s||o.push(r),a||o.push(n),o},ja=function(t,r,n){if(!t)return null;var i=t.scale,s=t.duplicateDomain,a=t.type,o=t.range,c=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(r||n)&&a==="category"&&i.bandwidth?i.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(o==null?void 0:o.length)>=2?dn(o[0]-o[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var h=s?s.indexOf(f):f;return{coordinate:i(h)+u,value:f,offset:u}});return d.filter(function(f){return!Uf(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+u,value:f,index:h,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,h){return{coordinate:i(f)+u,value:s?s[f]:f,index:h,offset:u}})},rS=new WeakMap,_v=function(t,r){if(typeof r!="function")return t;rS.has(t)||rS.set(t,new WeakMap);var n=rS.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},I9=function(t,r,n){var i=t.scale,s=t.type,a=t.layout,o=t.axisType;if(i==="auto")return a==="radial"&&o==="radiusAxis"?{scale:am(),realScaleType:"band"}:a==="radial"&&o==="angleAxis"?{scale:kx(),realScaleType:"linear"}:s==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:up(),realScaleType:"point"}:s==="category"?{scale:am(),realScaleType:"band"}:{scale:kx(),realScaleType:"linear"};if(Ac(i)){var c="scale".concat(Fb(i));return{scale:(sI[c]||up)(),realScaleType:sI[c]?c:"point"}}return qe(i)?{scale:i}:{scale:up(),realScaleType:"point"}},hI=1e-4,M9=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),s=Math.min(i[0],i[1])-hI,a=Math.max(i[0],i[1])+hI,o=t(r[0]),c=t(r[n-1]);(o<s||o>a||c<s||c>a)&&t.domain([r[0],r[n-1]])}},qAe=function(t,r){if(!t)return null;for(var n=0,i=t.length;n<i;n++)if(t[n].item===r)return t[n].position;return null},KAe=function(t,r){if(!r||r.length!==2||!le(r[0])||!le(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),s=[t[0],t[1]];return(!le(t[0])||t[0]<n)&&(s[0]=n),(!le(t[1])||t[1]>i)&&(s[1]=i),s[0]>i&&(s[0]=i),s[1]<n&&(s[1]=n),s},GAe=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var s=0,a=0,o=0;o<r;++o){var c=Uf(t[o][n][1])?t[o][n][0]:t[o][n][1];c>=0?(t[o][n][0]=s,t[o][n][1]=s+c,s=t[o][n][1]):(t[o][n][0]=a,t[o][n][1]=a+c,a=t[o][n][1])}},YAe=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var s=0,a=0;a<r;++a){var o=Uf(t[a][n][1])?t[a][n][0]:t[a][n][1];o>=0?(t[a][n][0]=s,t[a][n][1]=s+o,s=t[a][n][1]):(t[a][n][0]=0,t[a][n][1]=0)}},XAe={sign:GAe,expand:lve,none:Fd,silhouette:cve,wiggle:uve,positive:YAe},QAe=function(t,r,n){var i=r.map(function(o){return o.props.dataKey}),s=XAe[n],a=ove().keys(i).value(function(o,c){return+dr(o,c,0)}).order(E_).offset(s);return a(t)},ZAe=function(t,r,n,i,s,a){if(!t)return null;var o=a?r.reverse():r,c={},u=o.reduce(function(f,h){var p,g=(p=h.type)!==null&&p!==void 0&&p.defaultProps?ar(ar({},h.type.defaultProps),h.props):h.props,m=g.stackId,v=g.hide;if(v)return f;var y=g[n],x=f[y]||{hasStack:!1,stackGroups:{}};if(Cr(m)){var w=x.stackGroups[m]||{numericAxisId:n,cateAxisId:i,items:[]};w.items.push(h),x.hasStack=!0,x.stackGroups[m]=w}else x.stackGroups[Gc("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[h]};return ar(ar({},f),{},ed({},y,x))},c),d={};return Object.keys(u).reduce(function(f,h){var p=u[h];if(p.hasStack){var g={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,v){var y=p.stackGroups[v];return ar(ar({},m),{},ed({},v,{numericAxisId:n,cateAxisId:i,items:y.items,stackedData:QAe(t,y.items,s)}))},g)}return ar(ar({},f),{},ed({},h,p))},d)},D9=function(t,r){var n=r.realScaleType,i=r.type,s=r.tickCount,a=r.originalDomain,o=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(s&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var u=t.domain();if(!u.length)return null;var d=fAe(u,s,o);return t.domain([Jb(d),Po(d)]),{niceTicks:d}}if(s&&i==="number"){var f=t.domain(),h=hAe(f,s,o);return{niceTicks:h}}return null};function Fx(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,s=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Qe(i[t.dataKey])){var o=dx(r,"value",i[t.dataKey]);if(o)return o.coordinate+n/2}return r[s]?r[s].coordinate+n/2:null}var c=dr(i,Qe(a)?t.dataKey:a);return Qe(c)?null:t.scale(c)}var pI=function(t){var r=t.axis,n=t.ticks,i=t.offset,s=t.bandSize,a=t.entry,o=t.index;if(r.type==="category")return n[o]?n[o].coordinate+i:null;var c=dr(a,r.dataKey,r.domain[o]);return Qe(c)?null:r.scale(c)-s/2+i},JAe=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);return i<=0&&s>=0?0:s<0?s:i}return n[0]},eCe=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?ar(ar({},t.type.defaultProps),t.props):t.props,s=i.stackId;if(Cr(s)){var a=r[s];if(a){var o=a.items.indexOf(t);return o>=0?a.stackedData[o]:null}}return null},tCe=function(t){return t.reduce(function(r,n){return[Jb(n.concat([r[0]]).filter(le)),Po(n.concat([r[1]]).filter(le))]},[1/0,-1/0])},L9=function(t,r,n){return Object.keys(t).reduce(function(i,s){var a=t[s],o=a.stackedData,c=o.reduce(function(u,d){var f=tCe(d.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},mI=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,gI=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,rE=function(t,r,n){if(qe(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(le(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(mI.test(t[0])){var s=+mI.exec(t[0])[1];i[0]=r[0]-s}else qe(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(le(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(gI.test(t[1])){var a=+gI.exec(t[1])[1];i[1]=r[1]+a}else qe(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},Bx=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var s=YA(r,function(f){return f.coordinate}),a=1/0,o=1,c=s.length;o<c;o++){var u=s[o],d=s[o-1];a=Math.min((u.coordinate||0)-(d.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0},vI=function(t,r,n){return!t||!t.length||Rc(t,Yn(n,"type.defaultProps.domain"))?r:t},F9=function(t,r){var n=t.type.defaultProps?ar(ar({},t.type.defaultProps),t.props):t.props,i=n.dataKey,s=n.name,a=n.unit,o=n.formatter,c=n.tooltipType,u=n.chartType,d=n.hide;return ar(ar({},Le(t,!1)),{},{dataKey:i,unit:a,formatter:o,name:s||i,color:wC(t),value:dr(r,i),type:c,payload:r,chartType:u,hide:d})};function pm(e){"@babel/helpers - typeof";return pm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pm(e)}function yI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ca(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yI(Object(r),!0).forEach(function(n){B9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B9(e,t,r){return t=rCe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rCe(e){var t=nCe(e,"string");return pm(t)=="symbol"?t:t+""}function nCe(e,t){if(pm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iCe(e,t){return lCe(e)||oCe(e,t)||aCe(e,t)||sCe()}function sCe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
567In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aCe(e,t){if(e){if(typeof e=="string")return xI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xI(e,t)}}function xI(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oCe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function lCe(e){if(Array.isArray(e))return e}var zx=Math.PI/180,cCe=function(t){return t*180/Math.PI},Mt=function(t,r,n,i){return{x:t+Math.cos(-zx*i)*n,y:r+Math.sin(-zx*i)*n}},z9=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},uCe=function(t,r,n,i,s){var a=t.width,o=t.height,c=t.startAngle,u=t.endAngle,d=fn(t.cx,a,a/2),f=fn(t.cy,o,o/2),h=z9(a,o,n),p=fn(t.innerRadius,h,0),g=fn(t.outerRadius,h,h*.8),m=Object.keys(r);return m.reduce(function(v,y){var x=r[y],w=x.domain,S=x.reversed,j;if(Qe(x.range))i==="angleAxis"?j=[c,u]:i==="radiusAxis"&&(j=[p,g]),S&&(j=[j[1],j[0]]);else{j=x.range;var E=j,_=iCe(E,2);c=_[0],u=_[1]}var N=I9(x,s),O=N.realScaleType,C=N.scale;C.domain(w).range(j),M9(C);var k=D9(C,ca(ca({},x),{},{realScaleType:O})),$=ca(ca(ca({},x),k),{},{range:j,radius:g,realScaleType:O,scale:C,cx:d,cy:f,innerRadius:p,outerRadius:g,startAngle:c,endAngle:u});return ca(ca({},v),{},B9({},y,$))},{})},dCe=function(t,r){var n=t.x,i=t.y,s=r.x,a=r.y;return Math.sqrt(Math.pow(n-s,2)+Math.pow(i-a,2))},fCe=function(t,r){var n=t.x,i=t.y,s=r.cx,a=r.cy,o=dCe({x:n,y:i},{x:s,y:a});if(o<=0)return{radius:o};var c=(n-s)/o,u=Math.acos(c);return i>a&&(u=2*Math.PI-u),{radius:o,angle:cCe(u),angleInRadian:u}},hCe=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),s=Math.floor(n/360),a=Math.min(i,s);return{startAngle:r-a*360,endAngle:n-a*360}},pCe=function(t,r){var n=r.startAngle,i=r.endAngle,s=Math.floor(n/360),a=Math.floor(i/360),o=Math.min(s,a);return t+o*360},bI=function(t,r){var n=t.x,i=t.y,s=fCe({x:n,y:i},r),a=s.radius,o=s.angle,c=r.innerRadius,u=r.outerRadius;if(a<c||a>u)return!1;if(a===0)return!0;var d=hCe(r),f=d.startAngle,h=d.endAngle,p=o,g;if(f<=h){for(;p>h;)p-=360;for(;p<f;)p+=360;g=p>=f&&p<=h}else{for(;p>f;)p-=360;for(;p<h;)p+=360;g=p>=h&&p<=f}return g?ca(ca({},r),{},{radius:a,angle:pCe(p,r)}):null},U9=function(t){return!b.isValidElement(t)&&!qe(t)&&typeof t!="boolean"?t.className:""};function mm(e){"@babel/helpers - typeof";return mm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mm(e)}var mCe=["offset"];function gCe(e){return bCe(e)||xCe(e)||yCe(e)||vCe()}function vCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
568In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yCe(e,t){if(e){if(typeof e=="string")return nE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nE(e,t)}}function xCe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bCe(e){if(Array.isArray(e))return nE(e)}function nE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wCe(e,t){if(e==null)return{};var r=SCe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function SCe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function wI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Sr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wI(Object(r),!0).forEach(function(n){jCe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jCe(e,t,r){return t=_Ce(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _Ce(e){var t=ECe(e,"string");return mm(t)=="symbol"?t:t+""}function ECe(e,t){if(mm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gm(){return gm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gm.apply(this,arguments)}var NCe=function(t){var r=t.value,n=t.formatter,i=Qe(t.children)?r:t.children;return qe(n)?n(i):i},OCe=function(t,r){var n=dn(r-t),i=Math.min(Math.abs(r-t),360);return n*i},ACe=function(t,r,n){var i=t.position,s=t.viewBox,a=t.offset,o=t.className,c=s,u=c.cx,d=c.cy,f=c.innerRadius,h=c.outerRadius,p=c.startAngle,g=c.endAngle,m=c.clockWise,v=(f+h)/2,y=OCe(p,g),x=y>=0?1:-1,w,S;i==="insideStart"?(w=p+x*a,S=m):i==="insideEnd"?(w=g-x*a,S=!m):i==="end"&&(w=g+x*a,S=m),S=y<=0?S:!S;var j=Mt(u,d,v,w),E=Mt(u,d,v,w+(S?1:-1)*359),_="M".concat(j.x,",").concat(j.y,`
569    A`).concat(v,",").concat(v,",0,1,").concat(S?0:1,`,
570    `).concat(E.x,",").concat(E.y),N=Qe(t.id)?Gc("recharts-radial-line-"):t.id;return P.createElement("text",gm({},n,{dominantBaseline:"central",className:Ze("recharts-radial-bar-label",o)}),P.createElement("defs",null,P.createElement("path",{id:N,d:_})),P.createElement("textPath",{xlinkHref:"#".concat(N)},r))},CCe=function(t){var r=t.viewBox,n=t.offset,i=t.position,s=r,a=s.cx,o=s.cy,c=s.innerRadius,u=s.outerRadius,d=s.startAngle,f=s.endAngle,h=(d+f)/2;if(i==="outside"){var p=Mt(a,o,u+n,h),g=p.x,m=p.y;return{x:g,y:m,textAnchor:g>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:o,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:o,textAnchor:"middle",verticalAnchor:"end"};var v=(c+u)/2,y=Mt(a,o,v,h),x=y.x,w=y.y;return{x,y:w,textAnchor:"middle",verticalAnchor:"middle"}},PCe=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,s=t.position,a=r,o=a.x,c=a.y,u=a.width,d=a.height,f=d>=0?1:-1,h=f*i,p=f>0?"end":"start",g=f>0?"start":"end",m=u>=0?1:-1,v=m*i,y=m>0?"end":"start",x=m>0?"start":"end";if(s==="top"){var w={x:o+u/2,y:c-f*i,textAnchor:"middle",verticalAnchor:p};return Sr(Sr({},w),n?{height:Math.max(c-n.y,0),width:u}:{})}if(s==="bottom"){var S={x:o+u/2,y:c+d+h,textAnchor:"middle",verticalAnchor:g};return Sr(Sr({},S),n?{height:Math.max(n.y+n.height-(c+d),0),width:u}:{})}if(s==="left"){var j={x:o-v,y:c+d/2,textAnchor:y,verticalAnchor:"middle"};return Sr(Sr({},j),n?{width:Math.max(j.x-n.x,0),height:d}:{})}if(s==="right"){var E={x:o+u+v,y:c+d/2,textAnchor:x,verticalAnchor:"middle"};return Sr(Sr({},E),n?{width:Math.max(n.x+n.width-E.x,0),height:d}:{})}var _=n?{width:u,height:d}:{};return s==="insideLeft"?Sr({x:o+v,y:c+d/2,textAnchor:x,verticalAnchor:"middle"},_):s==="insideRight"?Sr({x:o+u-v,y:c+d/2,textAnchor:y,verticalAnchor:"middle"},_):s==="insideTop"?Sr({x:o+u/2,y:c+h,textAnchor:"middle",verticalAnchor:g},_):s==="insideBottom"?Sr({x:o+u/2,y:c+d-h,textAnchor:"middle",verticalAnchor:p},_):s==="insideTopLeft"?Sr({x:o+v,y:c+h,textAnchor:x,verticalAnchor:g},_):s==="insideTopRight"?Sr({x:o+u-v,y:c+h,textAnchor:y,verticalAnchor:g},_):s==="insideBottomLeft"?Sr({x:o+v,y:c+d-h,textAnchor:x,verticalAnchor:p},_):s==="insideBottomRight"?Sr({x:o+u-v,y:c+d-h,textAnchor:y,verticalAnchor:p},_):Lf(s)&&(le(s.x)||Ul(s.x))&&(le(s.y)||Ul(s.y))?Sr({x:o+fn(s.x,u),y:c+fn(s.y,d),textAnchor:"end",verticalAnchor:"end"},_):Sr({x:o+u/2,y:c+d/2,textAnchor:"middle",verticalAnchor:"middle"},_)},TCe=function(t){return"cx"in t&&le(t.cx)};function $r(e){var t=e.offset,r=t===void 0?5:t,n=wCe(e,mCe),i=Sr({offset:r},n),s=i.viewBox,a=i.position,o=i.value,c=i.children,u=i.content,d=i.className,f=d===void 0?"":d,h=i.textBreakAll;if(!s||Qe(o)&&Qe(c)&&!b.isValidElement(u)&&!qe(u))return null;if(b.isValidElement(u))return b.cloneElement(u,i);var p;if(qe(u)){if(p=b.createElement(u,i),b.isValidElement(p))return p}else p=NCe(i);var g=TCe(s),m=Le(i,!0);if(g&&(a==="insideStart"||a==="insideEnd"||a==="end"))return ACe(i,p,m);var v=g?CCe(i):PCe(i);return P.createElement(Tc,gm({className:Ze("recharts-label",f)},m,v,{breakAll:h}),p)}$r.displayName="Label";var V9=function(t){var r=t.cx,n=t.cy,i=t.angle,s=t.startAngle,a=t.endAngle,o=t.r,c=t.radius,u=t.innerRadius,d=t.outerRadius,f=t.x,h=t.y,p=t.top,g=t.left,m=t.width,v=t.height,y=t.clockWise,x=t.labelViewBox;if(x)return x;if(le(m)&&le(v)){if(le(f)&&le(h))return{x:f,y:h,width:m,height:v};if(le(p)&&le(g))return{x:p,y:g,width:m,height:v}}return le(f)&&le(h)?{x:f,y:h,width:0,height:0}:le(r)&&le(n)?{cx:r,cy:n,startAngle:s||i||0,endAngle:a||i||0,innerRadius:u||0,outerRadius:d||c||o||0,clockWise:y}:t.viewBox?t.viewBox:{}},kCe=function(t,r){return t?t===!0?P.createElement($r,{key:"label-implicit",viewBox:r}):Cr(t)?P.createElement($r,{key:"label-implicit",viewBox:r,value:t}):b.isValidElement(t)?t.type===$r?b.cloneElement(t,{key:"label-implicit",viewBox:r}):P.createElement($r,{key:"label-implicit",content:t,viewBox:r}):qe(t)?P.createElement($r,{key:"label-implicit",content:t,viewBox:r}):Lf(t)?P.createElement($r,gm({viewBox:r},t,{key:"label-implicit"})):null:null},RCe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,s=V9(t),a=Xn(i,$r).map(function(c,u){return b.cloneElement(c,{viewBox:r||s,key:"label-".concat(u)})});if(!n)return a;var o=kCe(t.label,r||s);return[o].concat(gCe(a))};$r.parseViewBox=V9;$r.renderCallByParent=RCe;function $Ce(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var ICe=$Ce;const MCe=pt(ICe);function vm(e){"@babel/helpers - typeof";return vm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vm(e)}var DCe=["valueAccessor"],LCe=["data","dataKey","clockWise","id","textBreakAll"];function FCe(e){return VCe(e)||UCe(e)||zCe(e)||BCe()}function BCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
571In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zCe(e,t){if(e){if(typeof e=="string")return iE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return iE(e,t)}}function UCe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function VCe(e){if(Array.isArray(e))return iE(e)}function iE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ux.apply(this,arguments)}function SI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SI(Object(r),!0).forEach(function(n){WCe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WCe(e,t,r){return t=HCe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HCe(e){var t=qCe(e,"string");return vm(t)=="symbol"?t:t+""}function qCe(e,t){if(vm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _I(e,t){if(e==null)return{};var r=KCe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function KCe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var GCe=function(t){return Array.isArray(t.value)?MCe(t.value):t.value};function Us(e){var t=e.valueAccessor,r=t===void 0?GCe:t,n=_I(e,DCe),i=n.data,s=n.dataKey,a=n.clockWise,o=n.id,c=n.textBreakAll,u=_I(n,LCe);return!i||!i.length?null:P.createElement(ut,{className:"recharts-label-list"},i.map(function(d,f){var h=Qe(s)?r(d,f):dr(d&&d.payload,s),p=Qe(o)?{}:{id:"".concat(o,"-").concat(f)};return P.createElement($r,Ux({},Le(d,!0),u,p,{parentViewBox:d.parentViewBox,value:h,textBreakAll:c,viewBox:$r.parseViewBox(Qe(a)?d:jI(jI({},d),{},{clockWise:a})),key:"label-".concat(f),index:f}))}))}Us.displayName="LabelList";function YCe(e,t){return e?e===!0?P.createElement(Us,{key:"labelList-implicit",data:t}):P.isValidElement(e)||qe(e)?P.createElement(Us,{key:"labelList-implicit",data:t,content:e}):Lf(e)?P.createElement(Us,Ux({data:t},e,{key:"labelList-implicit"})):null:null}function XCe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Xn(n,Us).map(function(a,o){return b.cloneElement(a,{data:t,key:"labelList-".concat(o)})});if(!r)return i;var s=YCe(e.label,t);return[s].concat(FCe(i))}Us.renderCallByParent=XCe;function ym(e){"@babel/helpers - typeof";return ym=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ym(e)}function sE(){return sE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sE.apply(this,arguments)}function EI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function NI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EI(Object(r),!0).forEach(function(n){QCe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QCe(e,t,r){return t=ZCe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZCe(e){var t=JCe(e,"string");return ym(t)=="symbol"?t:t+""}function JCe(e,t){if(ym(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ym(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ePe=function(t,r){var n=dn(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},Ev=function(t){var r=t.cx,n=t.cy,i=t.radius,s=t.angle,a=t.sign,o=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,d=c*(o?1:-1)+i,f=Math.asin(c/d)/zx,h=u?s:s+a*f,p=Mt(r,n,d,h),g=Mt(r,n,i,h),m=u?s-a*f:s,v=Mt(r,n,d*Math.cos(f*zx),m);return{center:p,circleTangency:g,lineTangency:v,theta:f}},W9=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,s=t.outerRadius,a=t.startAngle,o=t.endAngle,c=ePe(a,o),u=a+c,d=Mt(r,n,s,a),f=Mt(r,n,s,u),h="M ".concat(d.x,",").concat(d.y,`
572    A `).concat(s,",").concat(s,`,0,
573    `).concat(+(Math.abs(c)>180),",").concat(+(a>u),`,
574    `).concat(f.x,",").concat(f.y,`
575  `);if(i>0){var p=Mt(r,n,i,a),g=Mt(r,n,i,u);h+="L ".concat(g.x,",").concat(g.y,`
576            A `).concat(i,",").concat(i,`,0,
577            `).concat(+(Math.abs(c)>180),",").concat(+(a<=u),`,
578            `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},tPe=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,s=t.outerRadius,a=t.cornerRadius,o=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=dn(d-u),h=Ev({cx:r,cy:n,radius:s,angle:u,sign:f,cornerRadius:a,cornerIsExternal:c}),p=h.circleTangency,g=h.lineTangency,m=h.theta,v=Ev({cx:r,cy:n,radius:s,angle:d,sign:-f,cornerRadius:a,cornerIsExternal:c}),y=v.circleTangency,x=v.lineTangency,w=v.theta,S=c?Math.abs(u-d):Math.abs(u-d)-m-w;if(S<0)return o?"M ".concat(g.x,",").concat(g.y,`
579        a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0
580        a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0
581      `):W9({cx:r,cy:n,innerRadius:i,outerRadius:s,startAngle:u,endAngle:d});var j="M ".concat(g.x,",").concat(g.y,`
582    A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,`
583    A`).concat(s,",").concat(s,",0,").concat(+(S>180),",").concat(+(f<0),",").concat(y.x,",").concat(y.y,`
584    A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(x.x,",").concat(x.y,`
585  `);if(i>0){var E=Ev({cx:r,cy:n,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:a,cornerIsExternal:c}),_=E.circleTangency,N=E.lineTangency,O=E.theta,C=Ev({cx:r,cy:n,radius:i,angle:d,sign:-f,isExternal:!0,cornerRadius:a,cornerIsExternal:c}),k=C.circleTangency,$=C.lineTangency,D=C.theta,A=c?Math.abs(u-d):Math.abs(u-d)-O-D;if(A<0&&a===0)return"".concat(j,"L").concat(r,",").concat(n,"Z");j+="L".concat($.x,",").concat($.y,`
586      A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(k.x,",").concat(k.y,`
587      A`).concat(i,",").concat(i,",0,").concat(+(A>180),",").concat(+(f>0),",").concat(_.x,",").concat(_.y,`
588      A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(N.x,",").concat(N.y,"Z")}else j+="L".concat(r,",").concat(n,"Z");return j},rPe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},H9=function(t){var r=NI(NI({},rPe),t),n=r.cx,i=r.cy,s=r.innerRadius,a=r.outerRadius,o=r.cornerRadius,c=r.forceCornerRadius,u=r.cornerIsExternal,d=r.startAngle,f=r.endAngle,h=r.className;if(a<s||d===f)return null;var p=Ze("recharts-sector",h),g=a-s,m=fn(o,g,0,!0),v;return m>0&&Math.abs(d-f)<360?v=tPe({cx:n,cy:i,innerRadius:s,outerRadius:a,cornerRadius:Math.min(m,g/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:d,endAngle:f}):v=W9({cx:n,cy:i,innerRadius:s,outerRadius:a,startAngle:d,endAngle:f}),P.createElement("path",sE({},Le(r,!0),{className:p,d:v,role:"img"}))};function xm(e){"@babel/helpers - typeof";return xm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xm(e)}function aE(){return aE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},aE.apply(this,arguments)}function OI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function AI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OI(Object(r),!0).forEach(function(n){nPe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OI(Object(r)).forEac
588h(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nPe(e,t,r){return t=iPe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iPe(e){var t=sPe(e,"string");return xm(t)=="symbol"?t:t+""}function sPe(e,t){if(xm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var CI={curveBasisClosed:Xge,curveBasisOpen:Qge,curveBasis:Yge,curveBumpX:Ige,curveBumpY:Mge,curveLinearClosed:Zge,curveLinear:zb,curveMonotoneX:Jge,curveMonotoneY:eve,curveNatural:tve,curveStep:rve,curveStepAfter:ive,curveStepBefore:nve},Nv=function(t){return t.x===+t.x&&t.y===+t.y},Sh=function(t){return t.x},jh=function(t){return t.y},aPe=function(t,r){if(qe(t))return t;var n="curve".concat(Fb(t));return(n==="curveMonotone"||n==="curveBump")&&r?CI["".concat(n).concat(r==="vertical"?"Y":"X")]:CI[n]||zb},oPe=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,s=i===void 0?[]:i,a=t.baseLine,o=t.layout,c=t.connectNulls,u=c===void 0?!1:c,d=aPe(n,o),f=u?s.filter(function(m){return Nv(m)}):s,h;if(Array.isArray(a)){var p=u?a.filter(function(m){return Nv(m)}):a,g=f.map(function(m,v){return AI(AI({},m),{},{base:p[v]})});return o==="vertical"?h=mv().y(jh).x1(Sh).x0(function(m){return m.base.x}):h=mv().x(Sh).y1(jh).y0(function(m){return m.base.y}),h.defined(Nv).curve(d),h(g)}return o==="vertical"&&le(a)?h=mv().y(jh).x1(Sh).x0(a):le(a)?h=mv().x(Sh).y1(jh).y0(a):h=M8().x(Sh).y(jh),h.defined(Nv).curve(d),h(f)},dc=function(t){var r=t.className,n=t.points,i=t.path,s=t.pathRef;if((!n||!n.length)&&!i)return null;var a=n&&n.length?oPe(t):i;return b.createElement("path",aE({},Le(t,!1),fx(t),{className:Ze("recharts-curve",r),d:a,ref:s}))},lPe=Object.getOwnPropertyNames,cPe=Object.getOwnPropertySymbols,uPe=Object.prototype.hasOwnProperty;function PI(e,t){return function(n,i,s){return e(n,i,s)&&t(n,i,s)}}function Ov(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var s=i.cache,a=s.get(r),o=s.get(n);if(a&&o)return a===n&&o===r;s.set(r,n),s.set(n,r);var c=e(r,n,i);return s.delete(r),s.delete(n),c}}function dPe(e){return e!=null?e[Symbol.toStringTag]:void 0}function TI(e){return lPe(e).concat(cPe(e))}var fPe=Object.hasOwn||function(e,t){return uPe.call(e,t)};function Qc(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var hPe="__v",pPe="__o",mPe="_owner",kI=Object.getOwnPropertyDescriptor,RI=Object.keys;function gPe(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function vPe(e,t){return Qc(e.getTime(),t.getTime())}function yPe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function xPe(e,t){return e===t}function $I(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),s=e.entries(),a,o,c=0;(a=s.next())&&!a.done;){for(var u=t.entries(),d=!1,f=0;(o=u.next())&&!o.done;){if(i[f]){f++;continue}var h=a.value,p=o.value;if(r.equals(h[0],p[0],c,f,e,t,r)&&r.equals(h[1],p[1],h[0],p[0],e,t,r)){d=i[f]=!0;break}f++}if(!d)return!1;c++}return!0}var bPe=Qc;function wPe(e,t,r){var n=RI(e),i=n.length;if(RI(t).length!==i)return!1;for(;i-- >0;)if(!q9(e,t,r,n[i]))return!1;return!0}function _h(e,t,r){var n=TI(e),i=n.length;if(TI(t).length!==i)return!1;for(var s,a,o;i-- >0;)if(s=n[i],!q9(e,t,r,s)||(a=kI(e,s),o=kI(t,s),(a||o)&&(!a||!o||a.configurable!==o.configurable||a.enumerable!==o.enumerable||a.writable!==o.writable)))return!1;return!0}function SPe(e,t){return Qc(e.valueOf(),t.valueOf())}function jPe(e,t){return e.source===t.source&&e.flags===t.flags}function II(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),s=e.values(),a,o;(a=s.next())&&!a.done;){for(var c=t.values(),u=!1,d=0;(o=c.next())&&!o.done;){if(!i[d]&&r.equals(a.value,o.value,a.value,o.value,e,t,r)){u=i[d]=!0;break}d++}if(!u)return!1}return!0}function _Pe(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function EPe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function q9(e,t,r,n){return(n===mPe||n===pPe||n===hPe)&&(e.$$typeof||t.$$typeof)?!0:fPe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var NPe="[object Arguments]",OPe="[object Boolean]",APe="[object Date]",CPe="[object Error]",PPe="[object Map]",TPe="[object Number]",kPe="[object Object]",RPe="[object RegExp]",$Pe="[object Set]",IPe="[object String]",MPe="[object URL]",DPe=Array.isArray,MI=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,DI=Object.assign,LPe=Object.prototype.toString.call.bind(Object.prototype.toString);function FPe(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,s=e.areMapsEqual,a=e.areNumbersEqual,o=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,d=e.areSetsEqual,f=e.areTypedArraysEqual,h=e.areUrlsEqual,p=e.unknownTagComparators;return function(m,v,y){if(m===v)return!0;
588if(m==null||v==null)return!1;var x=typeof m;if(x!==typeof v)return!1;if(x!=="object")return x==="number"?a(m,v,y):x==="function"?i(m,v,y):!1;var w=m.constructor;if(w!==v.constructor)return!1;if(w===Object)return o(m,v,y);if(DPe(m))return t(m,v,y);if(MI!=null&&MI(m))return f(m,v,y);if(w===Date)return r(m,v,y);if(w===RegExp)return u(m,v,y);if(w===Map)return s(m,v,y);if(w===Set)return d(m,v,y);var S=LPe(m);if(S===APe)return r(m,v,y);if(S===RPe)return u(m,v,y);if(S===PPe)return s(m,v,y);if(S===$Pe)return d(m,v,y);if(S===kPe)return typeof m.then!="function"&&typeof v.then!="function"&&o(m,v,y);if(S===MPe)return h(m,v,y);if(S===CPe)return n(m,v,y);if(S===NPe)return o(m,v,y);if(S===OPe||S===TPe||S===IPe)return c(m,v,y);if(p){var j=p[S];if(!j){var E=dPe(m);E&&(j=p[E])}if(j)return j(m,v,y)}return!1}}function BPe(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?_h:gPe,areDatesEqual:vPe,areErrorsEqual:yPe,areFunctionsEqual:xPe,areMapsEqual:n?PI($I,_h):$I,areNumbersEqual:bPe,areObjectsEqual:n?_h:wPe,arePrimitiveWrappersEqual:SPe,areRegExpsEqual:jPe,areSetsEqual:n?PI(II,_h):II,areTypedArraysEqual:n?_h:_Pe,areUrlsEqual:EPe,unknownTagComparators:void 0};if(r&&(i=DI({},i,r(i))),t){var s=Ov(i.areArraysEqual),a=Ov(i.areMapsEqual),o=Ov(i.areObjectsEqual),c=Ov(i.areSetsEqual);i=DI({},i,{areArraysEqual:s,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:c})}return i}function zPe(e){return function(t,r,n,i,s,a,o){return e(t,r,o)}}function UPe(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,s=e.strict;if(n)return function(c,u){var d=n(),f=d.cache,h=f===void 0?t?new WeakMap:void 0:f,p=d.meta;return r(c,u,{cache:h,equals:i,meta:p,strict:s})};if(t)return function(c,u){return r(c,u,{cache:new WeakMap,equals:i,meta:void 0,strict:s})};var a={cache:void 0,equals:i,meta:void 0,strict:s};return function(c,u){return r(c,u,a)}}var VPe=ml();ml({strict:!0});ml({circular:!0});ml({circular:!0,strict:!0});ml({createInternalComparator:function(){return Qc}});ml({strict:!0,createInternalComparator:function(){return Qc}});ml({circular:!0,createInternalComparator:function(){return Qc}});ml({circular:!0,createInternalComparator:function(){return Qc},strict:!0});function ml(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,s=e.strict,a=s===void 0?!1:s,o=BPe(e),c=FPe(o),u=n?n(c):zPe(c);return UPe({circular:r,comparator:c,createState:i,equals:u,strict:a})}function WPe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function LI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(s){r<0&&(r=s),s-r>t?(e(s),r=-1):WPe(i)};requestAnimationFrame(n)}function oE(e){"@babel/helpers - typeof";return oE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oE(e)}function HPe(e){return YPe(e)||GPe(e)||KPe(e)||qPe()}function qPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
589In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KPe(e,t){if(e){if(typeof e=="string")return FI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return FI(e,t)}}function FI(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function GPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function YPe(e){if(Array.isArray(e))return e}function XPe(){var e={},t=function(){return null},r=!1,n=function i(s){if(!r){if(Array.isArray(s)){if(!s.length)return;var a=s,o=HPe(a),c=o[0],u=o.slice(1);if(typeof c=="number"){LI(i.bind(null,u),c);return}i(c),LI(i.bind(null,u));return}oE(s)==="object"&&(e=s,t(e)),typeof s=="function"&&s()}};return{stop:function(){r=!0},start:function(s){r=!1,n(s)},subscribe:function(s){return t=s,function(){t=function(){return null}}}}}function bm(e){"@babel/helpers - typeof";return bm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bm(e)}function BI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
vendor: 20,060 bytes, lines 589-595
589t%2?BI(Object(r),!0).forEach(function(n){K9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function K9(e,t,r){return t=QPe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QPe(e){var t=ZPe(e,"string");return bm(t)==="symbol"?t:String(t)}function ZPe(e,t){if(bm(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bm(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var JPe=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(s){return i.includes(s)})})},eTe=function(t){return t},tTe=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},fp=function(t,r){return Object.keys(r).reduce(function(n,i){return zI(zI({},n),{},K9({},i,t(i,r[i])))},{})},UI=function(t,r,n){return t.map(function(i){return"".concat(tTe(i)," ").concat(r,"ms ").concat(n)}).join(",")};function rTe(e,t){return sTe(e)||iTe(e,t)||G9(e,t)||nTe()}function nTe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
590In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iTe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function sTe(e){if(Array.isArray(e))return e}function aTe(e){return cTe(e)||lTe(e)||G9(e)||oTe()}function oTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
591In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G9(e,t){if(e){if(typeof e=="string")return lE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lE(e,t)}}function lTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cTe(e){if(Array.isArray(e))return lE(e)}function lE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Vx=1e-4,Y9=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},X9=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},VI=function(t,r){return function(n){var i=Y9(t,r);return X9(i,n)}},uTe=function(t,r){return function(n){var i=Y9(t,r),s=[].concat(aTe(i.map(function(a,o){return a*o}).slice(1)),[0]);return X9(s,n)}},WI=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],s=r[1],a=r[2],o=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,s=0,a=1,o=1;break;case"ease":i=.25,s=.1,a=.25,o=1;break;case"ease-in":i=.42,s=0,a=1,o=1;break;case"ease-out":i=.42,s=0,a=.58,o=1;break;case"ease-in-out":i=0,s=0,a=.58,o=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),d=rTe(u,4);i=d[0],s=d[1],a=d[2],o=d[3]}}}var f=VI(i,a),h=VI(s,o),p=uTe(i,a),g=function(y){return y>1?1:y<0?0:y},m=function(y){for(var x=y>1?1:y,w=x,S=0;S<8;++S){var j=f(w)-x,E=p(w);if(Math.abs(j-x)<Vx||E<Vx)return h(w);w=g(w-j/E)}return h(w)};return m.isStepper=!1,m},dTe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,s=i===void 0?8:i,a=t.dt,o=a===void 0?17:a,c=function(d,f,h){var p=-(d-f)*n,g=h*s,m=h+(p-g)*o/1e3,v=h*o/1e3+d;return Math.abs(v-f)<Vx&&Math.abs(m)<Vx?[f,0]:[v,m]};return c.isStepper=!0,c.dt=o,c},fTe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return WI(i);case"spring":return dTe();default:if(i.split("(")[0]==="cubic-bezier")return WI(i)}return typeof i=="function"?i:null};function wm(e){"@babel/helpers - typeof";return wm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wm(e)}function HI(e){return mTe(e)||pTe(e)||Q9(e)||hTe()}function hTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
592In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mTe(e){if(Array.isArray(e))return uE(e)}function qI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qI(Object(r),!0).forEach(function(n){cE(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cE(e,t,r){return t=gTe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gTe(e){var t=vTe(e,"string");return wm(t)==="symbol"?t:String(t)}function vTe(e,t){if(wm(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wm(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yTe(e,t){return wTe(e)||bTe(e,t)||Q9(e,t)||xTe()}function xTe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
593In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q9(e,t){if(e){if(typeof e=="string")return uE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uE(e,t)}}function uE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bTe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function wTe(e){if(Array.isArray(e))return e}var Wx=function(t,r,n){return t+(r-t)*n},dE=function(t){var r=t.from,n=t.to;return r!==n},STe=function e(t,r,n){var i=fp(function(s,a){if(dE(a)){var o=t(a.from,a.to,a.velocity),c=yTe(o,2),u=c[0],d=c[1];return Fr(Fr({},a),{},{from:u,velocity:d})}return a},r);return n<1?fp(function(s,a){return dE(a)?Fr(Fr({},a),{},{velocity:Wx(a.velocity,i[s].velocity,n),from:Wx(a.from,i[s].from,n)}):a},r):e(t,i,n-1)};const jTe=function(e,t,r,n,i){var s=JPe(e,t),a=s.reduce(function(v,y){return Fr(Fr({},v),{},cE({},y,[e[y],t[y]]))},{}),o=s.reduce(function(v,y){return Fr(Fr({},v),{},cE({},y,{from:e[y],velocity:0,to:t[y]}))},{}),c=-1,u,d,f=function(){return null},h=function(){return fp(function(y,x){return x.from},o)},p=function(){return!Object.values(o).filter(dE).length},g=function(y){u||(u=y);var x=y-u,w=x/r.dt;o=STe(r,o,w),i(Fr(Fr(Fr({},e),t),h())),u=y,p()||(c=requestAnimationFrame(f))},m=function(y){d||(d=y);var x=(y-d)/n,w=fp(function(j,E){return Wx.apply(void 0,HI(E).concat([r(x)]))},a);if(i(Fr(Fr(Fr({},e),t),w)),x<1)c=requestAnimationFrame(f);else{var S=fp(function(j,E){return Wx.apply(void 0,HI(E).concat([r(1)]))},a);i(Fr(Fr(Fr({},e),t),S))}};return f=r.isStepper?g:m,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(c)}}};function Gd(e){"@babel/helpers - typeof";return Gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gd(e)}var _Te=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function ETe(e,t){if(e==null)return{};var r=NTe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function NTe(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function nS(e){return PTe(e)||CTe(e)||ATe(e)||OTe()}function OTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
594In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ATe(e,t){if(e){if(typeof e=="string")return fE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fE(e,t)}}function CTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PTe(e){if(Array.isArray(e))return fE(e)}function fE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function KI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KI(Object(r),!0).forEach(function(n){zh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zh(e,t,r){return t=Z9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kTe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Z9(n.key),n)}}function RTe(e,t,r){return t&&kTe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z9(e){var t=$Te(e,"string");return Gd(t)==="symbol"?t:String(t)}function $Te(e,t){if(Gd(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gd(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ITe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hE(e,t)}function hE(e,t){return hE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},hE(e,t)}function MTe(e){var t=DTe();return function(){var n=Hx(e),i;if(t){var s=Hx(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return pE(this,i)}}function pE(e,t){if(t&&(Gd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mE(e)}function mE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DTe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hx(e){return Hx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Hx(e)}var hs=function(e){ITe(r,e);var t=MTe(r);function r(n,i){var s;TTe(this,r),s=t.call(this,n,i);var a=s.props,o=a.isActive,c=a.attributeName,u=a.from,d=a.to,f=a.steps,h=a.children,p=a.duration;if(s.handleStyleChange=s.handleStyleChange.bind(mE(s)),s.changeStyle=s.changeStyle.bind(mE(s)),!o||p<=0)return s.state={style:{}},typeof h=="function"&&(s.state={style:d}),pE(s);if(f&&f.length)s.state={style:f[0].style};else if(u){if(typeof h=="function")return s.state={style:u},pE(s);s.state={style:c?zh({},c,u):u}}else s.state={style:{}};return s}return RTe(r,[{key:"componentDidMount",value:function(){var i=this.props,s=i.isActive,a=i.canBegin;this.mounted=!0,!(!s||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var s=this.props,a=s.isActive,o=s.canBegin,c=s.attributeName,u=s.shouldReAnimate,d=s.to,f=s.from,h=this.state.style;if(o){if(!a){var p={style:c?zh({},c,d):d};this.state&&h&&(c&&h[c]!==d||!c&&h!==d)&&this.setState(p);return}if(!(VPe(i.to,d)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=g||u?f:i.to;if(this.state&&h){var v={style:c?zh({},c,m):m};(c&&h[c]!==m||!c&&h!==m)&&this.setState(v)}this.runAnimation(Mi(Mi({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var s=this,a=i.from,o=i.to,c=i.duration,u=i.easing,d=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,p=jTe(a,o,fTe(u),c,this.changeStyle),g=function(){s.stopJSAnimation=p()};this.manager.start([h,d,g,c,f])}},{key:"runStepAnimation",value:function(i){var s=this,a=i.steps,o=i.begin,c=i.onAnimationStart,u=a[0],d=u.style,f=u.duration,h=f===void 0?0:f,p=function(m,v,y){if(y===0)return m;var x=v.duration,w=v.easing,S=w===void 0?"ease":w,j=v.style,E=v.properties,_=v.onAnimationEnd,N=y>0?a[y-1]:v,O=E||Object.keys(j);if(typeof S=="function"||S==="spring")return[].concat(nS(m),[s.runJSAnimation.bind(s,{from:N.style,to:j,duration:x,easing:S}),x]);var C=UI(O,x,S),k=Mi(Mi(Mi({},N.style),j),{},{transition:C});return[].concat(nS(m),[k,x,_]).filter(eTe)};return this.manager.start([c].concat(nS(a.reduce(p,[d,Math.max(h,o)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=XPe());var s=i.begin,a=i.duration,o=i.attributeName,c=i.to,u=i.easing,d=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,p=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=o?zh({},o,c):c,v=UI(Object.keys(m),a,u);g.start([d,s,Mi(Mi({},m),{},{transition:v}),a,f])}},{key:"render",value:function(){var i=this.props,s=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var o=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=ETe(i,_Te),u=b.Children.count(s),d=this.state.style;if(typeof s=="function")return s(d);if(!o||u===0||a<=0)return s;var f=function(p){var g=p.props,m=g.style,v=m===void 0?{}:m,y=g.className,x=b.cloneElement(p,Mi(Mi({},c),{},{style:Mi(Mi({},v),d),className:y}));return x};return u===1?f(b.Children.only(s)):P.createElement("div",null,b.Children.map(s,function(h){return f(h)}))}}]),r}(b.PureComponent);hs.displayName="Animate";hs.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};hs.propTypes={from:J.oneOfType([J.object,J.string]),to:J.oneOfType([J.object,J.string]),attributeName:J.string,duration:J.number,begin:J.number,easing:J.oneOfType([J.string,J.func]),steps:J.arrayOf(J.shape({duration:J.number.isRequired,style:J.object.isRequired,easing:J.oneOfType([J.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),J.func]),properties:J.arrayOf("string"),onAnimationEnd:J.func})),children:J.oneOfType([J.node,J.func]),isActive:J.bool,canBegin:J.bool,onAnimationEnd:J.func,shouldReAnimate:J.bool,onAnimationStart:J.func,onAnimationReStart:J.func};function Sm(e){"@babel/helpers - typeof";return Sm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sm(e)}function qx(){return qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qx.apply(this,arguments)}function LTe(e,t){return UTe(e)||zTe(e,t)||BTe(e,t)||FTe()}function FTe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
595In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BTe(e,t){if(e){if(typeof e=="string")return GI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return GI(e,t)}}function GI(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function zTe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function UTe(e){if(Array.isArray(e))return e}function YI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function XI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YI(Object(r),!0).forEach(function(n){VTe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VTe(e,t,r){return t=WTe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WTe(e){var t=HTe(e,"string");return Sm(t)=="symbol"?t:t+""}function HTe(e,t){if(Sm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Sm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var QI=function(t,r,n,i,s){var a=Math.min(Math.abs(n)/2,Math.abs(i)/2),o=i>=0?1:-1,c=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,d;if(a>0&&s instanceof Array){for(var f=[0,0,0,0],h=0,p=4;h<p;h++)f[h]=s[h]>a?a:s[h];d="M".concat(t,",").concat(r+o*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+c*f[0],",").concat(r)),d+="L ".concat(t+n-c*f[1],",").concat(r),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`,
596        `).concat(t+n,",").concat(r+o*f[1])),d+="L ".concat(t+n,",").concat(r+i-o*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`,
597        `).concat(t+n-c*f[2],",").concat(r+i)),d+="L ".concat(t+c*f[3],",").concat(r+i),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`,
598        `).concat(t,",").concat(r+i-o*f[3])),d+="Z"}else if(a>0&&s===+s&&s>0){var g=Math.min(a,s);d="M ".concat(t,",").concat(r+o*g,`
599            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+c*g,",").concat(r,`
600            L `).concat(t+n-c*g,",").concat(r,`
601            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+n,",").concat(r+o*g,`
602            L `).concat(t+n,",").concat(r+i-o*g,`
603            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+n-c*g,",").concat(r+i,`
604            L `).concat(t+c*g,",").concat(r+i,`
605            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t,",").concat(r+i-o*g," Z")}else d="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return d},qTe=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,s=r.x,a=r.y,o=r.width,c=r.height;if(Math.abs(o)>0&&Math.abs(c)>0){var u=Math.min(s,s+o),d=Math.max(s,s+o),f=Math.min(a,a+c),h=Math.max(a,a+c);return n>=u&&n<=d&&i>=f&&i<=h}return!1},KTe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},SC=function(t){var r=XI(XI({},KTe),t),n=b.useRef(),i=b.useState(-1),s=LTe(i,2),a=s[0],o=s[1];b.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&o(S)}catch{}},[]);var c=r.x,u=r.y,d=r.width,f=r.height,h=r.radius,p=r.className,g=r.animationEasing,m=r.animationDuration,v=r.animationBegin,y=r.isAnimationActive,x=r.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||d===0||f===0)return null;var w=Ze("recharts-rectangle",p);return x?P.createElement(hs,{canBegin:a>0,from:{width:d,height:f,x:c,y:u},to:{width:d,height:f,x:c,y:u},duration:m,animationEasing:g,isActive:x},function(S){var j=S.width,E=S.height,_=S.x,N=S.y;return P.createElement(hs,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,isActive:y,easing:g},P.createElement("path",qx({},Le(r,!0),{className:w,d:QI(_,N,j,E,h),ref:n})))}):P.createElement("path",qx({},Le(r,!0),{className:w,d:QI(c,u,d,f,h)}))},GTe=["points","className","baseLinePoints","connectNulls"];function Mu(){return Mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mu.apply(this,arguments)}function YTe(e,t){if(e==null)return{};var r=XTe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function XTe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ZI(e){return eke(e)||JTe(e)||ZTe(e)||QTe()}function QTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
606In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZTe(e,t){if(e){if(typeof e=="string")return gE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gE(e,t)}}function JTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eke(e){if(Array.isArray(e))return gE(e)}function gE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var JI=function(t){return t&&t.x===+t.x&&t.y===+t.y},tke=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){JI(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),JI(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},hp=function(t,r){var n=tke(t);r&&(n=[n.reduce(function(s,a){return[].concat(ZI(s),ZI(a))},[])]);var i=n.map(function(s){return s.reduce(function(a,o,c){return"".concat(a).concat(c===0?"M":"L").concat(o.x,",").concat(o.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},rke=function(t,r,n){var i=hp(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(hp(r.reverse(),n).slice(1))},nke=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,s=t.connectNulls,a=YTe(t,GTe);if(!r||!r.length)return null;var o=Ze("recharts-polygon",n);if(i&&i.length){var c=a.stroke&&a.stroke!=="none",u=rke(r,i,s);return P.createElement("g",{className:o},P.createElement("path",Mu({},Le(a,!0),{fill:u.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:u})),c?P.createElement("path",Mu({},Le(a,!0),{fill:"none",d:hp(r,s)}
vendor: 33,420 bytes, lines 606-607
606)):null,c?P.createElement("path",Mu({},Le(a,!0),{fill:"none",d:hp(i,s)})):null)}var d=hp(r,s);return P.createElement("path",Mu({},Le(a,!0),{fill:d.slice(-1)==="Z"?a.fill:"none",className:o,d}))};function vE(){return vE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vE.apply(this,arguments)}var Og=function(t){var r=t.cx,n=t.cy,i=t.r,s=t.className,a=Ze("recharts-dot",s);return r===+r&&n===+n&&i===+i?b.createElement("circle",vE({},Le(t,!1),fx(t),{className:a,cx:r,cy:n,r:i})):null};function jm(e){"@babel/helpers - typeof";return jm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jm(e)}var ike=["x","y","top","left","width","height","className"];function yE(){return yE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yE.apply(this,arguments)}function eM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ske(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eM(Object(r),!0).forEach(function(n){ake(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ake(e,t,r){return t=oke(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oke(e){var t=lke(e,"string");return jm(t)=="symbol"?t:t+""}function lke(e,t){if(jm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(jm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cke(e,t){if(e==null)return{};var r=uke(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uke(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var dke=function(t,r,n,i,s,a){return"M".concat(t,",").concat(s,"v").concat(i,"M").concat(a,",").concat(r,"h").concat(n)},fke=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,s=i===void 0?0:i,a=t.top,o=a===void 0?0:a,c=t.left,u=c===void 0?0:c,d=t.width,f=d===void 0?0:d,h=t.height,p=h===void 0?0:h,g=t.className,m=cke(t,ike),v=ske({x:n,y:s,top:o,left:u,width:f,height:p},m);return!le(n)||!le(s)||!le(f)||!le(p)||!le(o)||!le(u)?null:P.createElement("path",yE({},Le(v,!0),{className:Ze("recharts-cross",g),d:dke(n,s,f,p,o,u)}))},hke=Zb,pke=h9,mke=Qs;function gke(e,t){return e&&e.length?hke(e,mke(t),pke):void 0}var vke=gke;const yke=pt(vke);var xke=Zb,bke=Qs,wke=p9;function Ske(e,t){return e&&e.length?xke(e,bke(t),wke):void 0}var jke=Ske;const _ke=pt(jke);var Eke=["cx","cy","angle","ticks","axisLine"],Nke=["ticks","tick","angle","tickFormatter","stroke"];function Yd(e){"@babel/helpers - typeof";return Yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yd(e)}function pp(){return pp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pp.apply(this,arguments)}function tM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Sl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tM(Object(r),!0).forEach(function(n){rw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rM(e,t){if(e==null)return{};var r=Oke(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Oke(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ake(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,eW(n.key),n)}}function Cke(e,t,r){return t&&nM(e.prototype,t),r&&nM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pke(e,t,r){return t=Kx(t),Tke(e,J9()?Reflect.construct(t,r||[],Kx(e).constructor):t.apply(e,r))}function Tke(e,t){if(t&&(Yd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kke(e)}function kke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(J9=function(){return!!e})()}function Kx(e){return Kx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Kx(e)}function Rke(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xE(e,t)}function xE(e,t){return xE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},xE(e,t)}function rw(e,t,r){return t=eW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eW(e){var t=$ke(e,"string");return Yd(t)=="symbol"?t:t+""}function $ke(e,t){if(Yd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nw=function(e){function t(){return Ake(this,t),Pke(this,t,arguments)}return Rke(t,e),Cke(t,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,s=this.props,a=s.angle,o=s.cx,c=s.cy;return Mt(o,c,i,a)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,s=n.cy,a=n.angle,o=n.ticks,c=yke(o,function(d){return d.coordinate||0}),u=_ke(o,function(d){return d.coordinate||0});return{cx:i,cy:s,startAngle:a,endAngle:a,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,s=n.cy,a=n.angle,o=n.ticks,c=n.axisLine,u=rM(n,Eke),d=o.reduce(function(g,m){return[Math.min(g[0],m.coordinate),Math.max(g[1],m.coordinate)]},[1/0,-1/0]),f=Mt(i,s,d[0],a),h=Mt(i,s,d[1],a),p=Sl(Sl(Sl({},Le(u,!1)),{},{fill:"none"},Le(c,!1)),{},{x1:f.x,y1:f.y,x2:h.x,y2:h.y});return P.createElement("line",pp({className:"recharts-polar-radius-axis-line"},p))}},{key:"renderTicks",value:function(){var n=this,i=this.props,s=i.ticks,a=i.tick,o=i.angle,c=i.tickFormatter,u=i.stroke,d=rM(i,Nke),f=this.getTickTextAnchor(),h=Le(d,!1),p=Le(a,!1),g=s.map(function(m,v){var y=n.getTickValueCoord(m),x=Sl(Sl(Sl(Sl({textAnchor:f,transform:"rotate(".concat(90-o,", ").concat(y.x,", ").concat(y.y,")")},h),{},{stroke:"none",fill:u},p),{},{index:v},y),{},{payload:m});return P.createElement(ut,pp({className:Ze("recharts-polar-radius-axis-tick",U9(a)),key:"tick-".concat(m.coordinate)},Cc(n.props,m,v)),t.renderTickItem(a,x,c?c(m.value,v):m.value))});return P.createElement(ut,{className:"recharts-polar-radius-axis-ticks"},g)}},{key:"render",value:function(){var n=this.props,i=n.ticks,s=n.axisLine,a=n.tick;return!i||!i.length?null:P.createElement(ut,{className:Ze("recharts-polar-radius-axis",this.props.className)},s&&this.renderAxisLine(),a&&this.renderTicks(),$r.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,s){var a;return P.isValidElement(n)?a=P.cloneElement(n,i):qe(n)?a=n(i):a=P.createElement(Tc,pp({},i,{className:"recharts-polar-radius-axis-tick-value"}),s),a}}])}(b.PureComponent);rw(nw,"displayName","PolarRadiusAxis");rw(nw,"axisType","radiusAxis");rw(nw,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Xd(e){"@babel/helpers - typeof";return Xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xd(e)}function $l(){return $l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$l.apply(this,arguments)}function iM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iM(Object(r),!0).forEach(function(n){iw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ike(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,rW(n.key),n)}}function Mke(e,t,r){return t&&sM(e.prototype,t),r&&sM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dke(e,t,r){return t=Gx(t),Lke(e,tW()?Reflect.construct(t,r||[],Gx(e).constructor):t.apply(e,r))}function Lke(e,t){if(t&&(Xd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fke(e)}function Fke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tW=function(){return!!e})()}function Gx(e){return Gx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gx(e)}function Bke(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bE(e,t)}function bE(e,t){return bE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},bE(e,t)}function iw(e,t,r){return t=rW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rW(e){var t=zke(e,"string");return Xd(t)=="symbol"?t:t+""}function zke(e,t){if(Xd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Uke=Math.PI/180,aM=1e-5,sw=function(e){function t(){return Ike(this,t),Dke(this,t,arguments)}return Bke(t,e),Mke(t,[{key:"getTickLineCoord",value:function(n){var i=this.props,s=i.cx,a=i.cy,o=i.radius,c=i.orientation,u=i.tickSize,d=u||8,f=Mt(s,a,o,n.coordinate),h=Mt(s,a,o+(c==="inner"?-1:1)*d,n.coordinate);return{x1:f.x,y1:f.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,s=Math.cos(-n.coordinate*Uke),a;return s>aM?a=i==="outer"?"start":"end":s<-aM?a=i==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,s=n.cy,a=n.radius,o=n.axisLine,c=n.axisLineType,u=jl(jl({},Le(this.props,!1)),{},{fill:"none"},Le(o,!1));if(c==="circle")return P.createElement(Og,$l({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:s,r:a}));var d=this.props.ticks,f=d.map(function(h){return Mt(i,s,a,h.coordinate)});return P.createElement(nke,$l({className:"recharts-polar-angle-axis-line"},u,{points:f}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,s=i.ticks,a=i.tick,o=i.tickLine,c=i.tickFormatter,u=i.stroke,d=Le(this.props,!1),f=Le(a,!1),h=jl(jl({},d),{},{fill:"none"},Le(o,!1)),p=s.map(function(g,m){var v=n.getTickLineCoord(g),y=n.getTickTextAnchor(g),x=jl(jl(jl({textAnchor:y},d),{},{stroke:"none",fill:u},f),{},{index:m,payload:g,x:v.x2,y:v.y2});return P.createElement(ut,$l({className:Ze("recharts-polar-angle-axis-tick",U9(a)),key:"tick-".concat(g.coordinate)},Cc(n.props,g,m)),o&&P.createElement("line",$l({className:"recharts-polar-angle-axis-tick-line"},h,v)),a&&t.renderTickItem(a,x,c?c(g.value,m):g.value))});return P.createElement(ut,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,i=n.ticks,s=n.radius,a=n.axisLine;return s<=0||!i||!i.length?null:P.createElement(ut,{className:Ze("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,s){var a;return P.isValidElement(n)?a=P.cloneElement(n,i):qe(n)?a=n(i):a=P.createElement(Tc,$l({},i,{className:"recharts-polar-angle-axis-tick-value"}),s),a}}])}(b.PureComponent);iw(sw,"displayName","PolarAngleAxis");iw(sw,"axisType","angleAxis");iw(sw,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Vke=aV,Wke=Vke(Object.getPrototypeOf,Object),Hke=Wke,qke=qa,Kke=Hke,Gke=Ka,Yke="[object Object]",Xke=Function.prototype,Qke=Object.prototype,nW=Xke.toString,Zke=Qke.hasOwnProperty,Jke=nW.call(Object);function e2e(e){if(!Gke(e)||qke(e)!=Yke)return!1;var t=Kke(e);if(t===null)return!0;var r=Zke.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&nW.call(r)==Jke}var t2e=e2e;const r2e=pt(t2e);var n2e=qa,i2e=Ka,s2e="[object Boolean]";function a2e(e){return e===!0||e===!1||i2e(e)&&n2e(e)==s2e}var o2e=a2e;const l2e=pt(o2e);function _m(e){"@babel/helpers - typeof";return _m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_m(e)}function Yx(){return Yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yx.apply(this,arguments)}function c2e(e,t){return h2e(e)||f2e(e,t)||d2e(e,t)||u2e()}function u2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
607In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d2e(e,t){if(e){if(typeof e=="string")return oM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oM(e,t)}}function oM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f2e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function h2e(e){if(Array.isArray(e))return e}function lM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lM(Object(r),!0).forEach(function(n){p2e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function p2e(e,t,r){return t=m2e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m2e(e){var t=g2e(e,"string");return _m(t)=="symbol"?t:t+""}function g2e(e,t){if(_m(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_m(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uM=function(t,r,n,i,s){var a=n-i,o;return o="M ".concat(t,",").concat(r),o+="L ".concat(t+n,",").concat(r),o+="L ".concat(t+n-a/2,",").concat(r+s),o+="L ".concat(t+n-a/2-i,",").concat(r+s),o+="L ".concat(t,",").concat(r," Z"),o},v2e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},y2e=function(t){var r=cM(cM({},v2e),t),n=b.useRef(),i=b.useState(-1),s=c2e(i,2),a=s[0],o=s[1];b.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&o(w)}catch{}},[]);var c=r.x,u=r.y,d=r.upperWidth,f=r.lowerWidth,h=r.height,p=r.className,g=r.animationEasing,m=r.animationDuration,v=r.animationBegin,y=r.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||h!==+h||d===0&&f===0||h===0)return null;var x=Ze("recharts-trapezoid",p);return y?P.createElement(hs,{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:u},to:{upperWidth:d,lowerWidth:f,height:h,x:c,y:u},duration:m,animationEasing:g,isActive:y},function(w){var S=w.upperWidth,j=w.lowerWidth,E=w.height,_=w.x,N=w.y;return P.createElement(hs,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,easing:g},P.createElement("path",Yx({},Le(r,!0),{className:x,d:uM(_,N,S,j,E),ref:n})))}):P.createElement("g",null,P.createElement("path",Yx({},Le(r,!0),{className:x,d:uM(c,u,d,f,h)})))},x2e=["option","shapeType","propTransformer","activeClassName","isActive"];function Em(e){"@babel/helpers - typeof";return Em=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Em(e)}function b2e(e,t){if(e==null)return{};var r=w2e(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function w2e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function dM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dM(Object(r),!0).forEach(function(n){S2e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function S2e(e,t,r){return t=j2e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j2e(e){var t=_2e(e,"string");return Em(t)=="symbol"?t:t+""}function _2e(e,t){if(Em(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Em(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function E2e(e,t){return Xx(Xx({},t),e)}function N2e(e,t){return e==="symbols"}function fM(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return P.createElement(SC,r);case"trapezoid":return P.createElement(y2e,r);case"sector":return P.createElement(H9,r);case"symbols":if(N2e(t))return P.createElement(zA,r);break;default:return null}}function O2e(e){return b.isValidElement(e)?e.props:e}function iW(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?E2e:n,s=e.activeClassName,a=s===void 0?"recharts-active-shape":s,o=e.isActive,c=b2e(e,x2e),u;if(b.isValidElement(t))u=b.cloneElement(t,Xx(Xx({},c),O2e(t)));else if(qe(t))u=t(c);else if(r2e(t)&&!l2e(t)){var d=i(t,c);u=P.createElement(fM,{shapeType:r,elementProps:d})}else{var f=c;u=P.createElement(fM,{shapeType:r,elementProps:f})}return o?P.createElement(ut,{className:a},u):u}function aw(e,t){return t!=null&&"trapezoids"in e.props}function ow(e,t){return t!=null&&"sectors"in e.props}function Nm(e,t){return t!=null&&"points"in e.props}function A2e(e,t){var r,n,i=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,s=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&s}function C2e(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function P2e(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function T2e(e,t){var r;return aw(e,t)?r=A2e:ow(e,t)?r=C2e:Nm(e,t)&&(r=P2e),r}function k2e(e,t){var r;return aw(e,t)?r="trapezoids":ow(e,t)?r="sectors":Nm(e,t)&&(r="points"),r}function R2e(e,t){if(aw(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(ow(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return Nm(e,t)?t.payload:{}}function $2e(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=k2e(r,t),s=R2e(r,t),a=n.filter(function(c,u){var d=Rc(s,c),f=r.props[i].filter(function(g){var m=T2e(r,t);return m(g,t)}),h=r.props[i].indexOf(f[f.length-1]),p=u===h;return d&&p}),o=n.indexOf(a[a.length-1]);return o}var ay;function Qd(e){"@babel/helpers - typeof";return Qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qd(e)}function Du(){return Du=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Du.apply(this,arguments)}function hM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hM(Object(r),!0).forEach(function(n){vi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function I2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,aW(n.key),n)}}function M2e(e,t,r){return t&&pM(e.prototype,t),r&&pM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function D2e(e,t,r){return t=Qx(t),L2e(e,sW()?Reflect.construct(t,r||[],Qx(e).constructor):t.apply(e,r))}function L2e(e,t){if(t&&(Qd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F2e(e)}function F2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sW=function(){return!!e})()}function Qx(e){return Qx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qx(e)}function B2e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wE(e,t)}function wE(e,t){return wE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},wE(e,t)}function vi(e,t,r){return t=aW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aW(e){var t=z2e(e,"string");return Qd(t)=="symbol"?t:t+""}function z2e(e,t){if(Qd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Zs=function(e){function t(r){var n;return I2e(this,t),n=D2e(this,t,[r]),vi(n,"pieRef",null),vi(n,"sectorRefs",[]),vi(n,"id",Gc("recharts-pie-")),vi(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),qe(i)&&i()}),vi(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),qe(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return B2e(t,e),M2e(t,[{key:"isActiveIndex",value:function(n){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(n)!==-1:n===i}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var s=this.props,a=s.label,o=s.labelLine,c=s.dataKey,u=s.valueKey,d=Le(this.props,!1),f=Le(a,!1),h=Le(o,!1),p=a&&a.offsetRadius||20,g=n.map(function(m,v){var y=(m.startAngle+m.endAngle)/2,x=Mt(m.cx,m.cy,m.outerRadius+p,y),w=Rt(Rt(Rt(Rt({},d),m),{},{stroke:"none"},f),{},{index:v,textAnchor:t.getTextAnchor(x.x,m.cx)},x),S=Rt(Rt(Rt(Rt({},d),m),{},{fill:"none",stroke:m.fill},h),{},{index:v,points:[Mt(m.cx,m.cy,m.outerRadius,y),x]}),j=c;return Qe(c)&&Qe(u)?j="value":Qe(c)&&(j=u),P.createElement(ut,{key:"label-".concat(m.startAngle,"-").concat(m.endAngle,"-").concat(m.midAngle,"-").concat(v)},o&&t.renderLabelLineItem(o,S,"line"),t.renderLabelItem(a,w,dr(m,j)))});return P.createElement(ut,{className:"recharts-pie-labels"},g)}},{key:"renderSectorsStatically",value:function(n){var i=this,s=this.props,a=s.activeShape,o=s.blendStroke,c=s.inactiveShape;return n.map(function(u,d){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&n.length!==1)return null;var f=i.isActiveIndex(d),h=c&&i.hasActiveIndex()?c:null,p=f?a:h,g=Rt(Rt({},u),{},{stroke:o?u.fill:u.stroke,tabIndex:-1});return P.createElement(ut,Du({ref:function(v){v&&!i.sectorRefs.includes(v)&&i.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},Cc(i.props,u,d),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(d)}),P.createElement(iW,Du({option:p,isActive:f,shapeType:"sector"},g)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,s=i.sectors,a=i.isAnimationActive,o=i.animationBegin,c=i.animationDuration,u=i.animationEasing,d=i.animationId,f=this.state,h=f.prevSectors,p=f.prevIsAnimationActive;return P.createElement(hs,{begin:o,duration:c,isActive:a,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(d,"-").concat(p),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var m=g.t,v=[],y=s&&s[0],x=y.startAngle;return s.forEach(function(w,S){var j=h&&h[S],E=S>0?Yn(w,"paddingAngle",0):0;if(j){var _=Or(j.endAngle-j.startAngle,w.endAngle-w.startAngle),N=Rt(Rt({},w),{},{startAngle:x+E,endAngle:x+_(m)+E});v.push(N),x=N.endAngle}else{var O=w.endAngle,C=w.startAngle,k=Or(0,O-C),$=k(m),D=Rt(Rt({},w),{},{startAngle:x+E,endAngle:x+$+E});v.push(D),x=D.endAngle}}),P.createElement(ut,null,n.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(s){if(!s.altKey)switch(s.key){case"ArrowLeft":{var a=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[a].focus(),i.setState({sectorToFocus:a});break}case"ArrowRight":{var o=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,s=n.isAnimationActive,a=this.state.prevSectors;return s&&i&&i.length&&(!a||!Rc(a,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,s=i.hide,a=i.sectors,o=i.className,c=i.label,u=i.cx,d=i.cy,f=i.innerRadius,h=i.outerRadius,p=i.isAnimationActive,g=this.state.isAnimationFinished;if(s||!a||!a.length||!le(u)||!le(d)||!le(f)||!le(h))return null;var m=Ze("recharts-pie",o);return P.createElement(ut,{tabIndex:this.props.rootTabIndex,className:m,ref:function(y){n.pieRef=y}},this.renderSectors(),c&&this.renderLabels(a),$r.renderCallByParent(this.props,null,!1),(!p||g)&&Us.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,i,s){if(P.isValidElement(n))return P.cloneElement(n,i);if(qe(n))return n(i);var a=Ze("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return P.createElement(dc,Du({},i,{key:s,type:"linear",className:a}))}},{key:"renderLabelItem",value:function(n,i,s){if(P.isValidElement(n))return P.cloneElement(n,i);var a=s;if(qe(n)&&(a=n(i),P.isValidElement(a)))return a;var o=Ze("recharts-pie-label-text",typeof n!="boolean"&&!qe(n)?n.className:"");return P.createElement(Tc,Du({},i,{alignmentBaseline:"middle",className:o}),a)}}])}(b.PureComponent);ay=Zs;vi(Zs,"displayName","Pie");vi(Zs,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!fl.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});vi(Zs,"parseDeltaAngle",function(e,t){var r=dn(t-e),n=Math.min(Math.abs(t-e),360);return r*n});vi(Zs,"getRealPieData",function(e){var t=e.data,r=e.children,n=Le(e,!1),i=Xn(r,Pc);return t&&t.length?t.map(function(s,a){return Rt(Rt(Rt({payload:s},n),s),i&&i[a]&&i[a].props)}):i&&i.length?i.map(function(s){return Rt(Rt({},n),s.props)}):[]});vi(Zs,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,i=t.width,s=t.height,a=z9(i,s),o=n+fn(e.cx,i,i/2),c=r+fn(e.cy,s,s/2),u=fn(e.innerRadius,a,0),d=fn(e.outerRadius,a,a*.8),f=e.maxRadius||Math.sqrt(i*i+s*s)/2;return{cx:o,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}});vi(Zs,"getComposedData",function(e){var t=e.item,r=e.offset,n=t.type.defaultProps!==void 0?Rt(Rt({},t.type.defaultProps),t.props):t.props,i=ay.getRealPieData(n);if(!i||!i.length)return null;var s=n.cornerRadius,a=n.startAngle,o=n.endAngle,c=n.paddingAngle,u=n.dataKey,d=n.nameKey,f=n.valueKey,h=n.tooltipType,p=Math.abs(n.minAngle),g=ay.parseCoordinateOfPie(n,r),m=ay.parseDeltaAngle(a,o),v=Math.abs(m),y=u;Qe(u)&&Qe(f)?(ls(!1,`Use "dataKey" to specify the value of pie,
608      the props "valueKey" will be deprecated in 1.1.0`),y="value"):Qe(u)&&(ls(!1,`Use "dataKey" to specify the value of pie,
609      the props "valueKey" will be deprecated in 1.1.0`),y=f);var x=i.filter(function(N){return dr(N,y,0)!==0}).length,w=(v>=360?x:x-1)*c,S=v-x*p-w,j=i.reduce(function(N,O){var C=dr(O,y,0);return N+(le(C)?C:0)},0),E;if(j>0){var _;E=i.map(function(N,O){var C=dr(N,y,0),k=dr(N,d,O),$=(le(C)?C:0)/j,D;O?D=_.endAngle+dn(m)*c*(C!==0?1:0):D=a;var A=D+dn(m)*((C!==0?p:0)+$*S),R=(D+A)/2,T=(g.innerRadius+g.outerRadius)/2,L=[{name:k,value:C,payload:N,dataKey:y,type:h}],M=Mt(g.cx,g.cy,T,R);return _=Rt(Rt(Rt({percent:$,cornerRadius:s,name:k,tooltipPayload:L,midAngle:R,middleRadius:T,tooltipPosition:M},N),g),{},{value:dr(N,y),startAngle:D,endAngle:A,payload:N,paddingAngle:dn(m)*c}),_})}return Rt(Rt({},g),{},{sectors:E,data:i})});var U2e=Math.ceil,V2e=Math.max;function W2e(e,t,r,n){for(var i=-1,s=V2e(U2e((t-e)/(r||1)),0),a=Array(s);s--;)a[n?s:++i]=e,e+=r;return a}var H2e=W2e,q2e=EV,mM=1/0,K2e=17976931348623157e292;function G2e(e){if(!e)return e===0?e:0;if(e=q2e(e),e===mM||e===-mM){var t=e<0?-1:1;return t*K2e}return e===e?e:0}var oW=G2e,Y2e=H2e,X2e=Hb,iS=oW;function Q2e(e){return function(t,r,n){return n&&typeof n!="number"&&X2e(t,r,n)&&(r=n=void 0),t=iS(t),r===void 0?(r=t,t=0):r=iS(r),n=n===void 0?t<r?1:-1:iS(n),Y2e(t,r,n,e)}}var Z2e=Q2e,J2e=Z2e,eRe=J2e(),tRe=eRe;const Zx=pt(tRe);function Om(e){"@babel/helpers - typeof";return Om=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Om(e)}function gM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gM(Object(r),!0).forEach(function(n){lW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lW(e,t,r){return t=rRe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rRe(e){var t=nRe(e,"string");return Om(t)=="symbol"?t:t+""}function nRe(e,t){if(Om(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Om(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iRe=["Webkit","Moz","O","ms"],sRe=function(t,r){var n=t.replace(/(\w)/,function(s){return s.toUpperCase()}),i=iRe.reduce(function(s,a){return vM(vM({},s),{},lW({},a+n,r))},{});return i[t]=r,i};function Zd(e){"@babel/helpers - typeof";return Zd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zd(e)}function Jx(){return Jx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jx.apply(this,arguments)}function yM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yM(Object(r),!0).forEach(function(n){Mn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uW(n.key),n)}}function oRe(e,t,r){return t&&xM(e.prototype,t),r&&xM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function lRe(e,t,r){return t=e0(t),cRe(e,cW()?Reflect.construct(t,r||[],e0(e).constructor):t.apply(e,r))}function cRe(e,t){if(t&&(Zd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uRe(e)}function uRe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cW=function(){return!!e})()}
vendor: 131,111 bytes, lines 609-614
609function e0(e){return e0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},e0(e)}function dRe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&SE(e,t)}function SE(e,t){return SE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},SE(e,t)}function Mn(e,t,r){return t=uW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uW(e){var t=fRe(e,"string");return Zd(t)=="symbol"?t:t+""}function fRe(e,t){if(Zd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hRe=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,s=t.x,a=t.width,o=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,u=up().domain(Zx(0,c)).range([s,s+a-o]),d=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(i),scale:u,scaleValues:d}},bM=function(t){return t.changedTouches&&!!t.changedTouches.length},Jd=function(e){function t(r){var n;return aRe(this,t),n=lRe(this,t,[r]),Mn(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Mn(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Mn(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,s=i.endIndex,a=i.onDragEnd,o=i.startIndex;a==null||a({endIndex:s,startIndex:o})}),n.detachDragEndListener()}),Mn(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Mn(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Mn(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Mn(n,"handleSlideDragStart",function(i){var s=bM(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:s.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return dRe(t,e),oRe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,s=n.endX,a=this.state.scaleValues,o=this.props,c=o.gap,u=o.data,d=u.length-1,f=Math.min(i,s),h=Math.max(i,s),p=t.getIndexInRange(a,f),g=t.getIndexInRange(a,h);return{startIndex:p-p%c,endIndex:g===d?d:g-g%c}}},{key:"getTextOfTick",value:function(n){var i=this.props,s=i.data,a=i.tickFormatter,o=i.dataKey,c=dr(s[n],o,n);return qe(a)?a(c,n):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,s=i.slideMoveStartX,a=i.startX,o=i.endX,c=this.props,u=c.x,d=c.width,f=c.travellerWidth,h=c.startIndex,p=c.endIndex,g=c.onChange,m=n.pageX-s;m>0?m=Math.min(m,u+d-f-o,u+d-f-a):m<0&&(m=Math.max(m,u-a,u-o));var v=this.getIndex({startX:a+m,endX:o+m});(v.startIndex!==h||v.endIndex!==p)&&g&&g(v),this.setState({startX:a+m,endX:o+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var s=bM(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:s.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,s=i.brushMoveStartX,a=i.movingTravellerId,o=i.endX,c=i.startX,u=this.state[a],d=this.props,f=d.x,h=d.width,p=d.travellerWidth,g=d.onChange,m=d.gap,v=d.data,y={startX:this.state.startX,endX:this.state.endX},x=n.pageX-s;x>0?x=Math.min(x,f+h-p-u):x<0&&(x=Math.max(x,f-u)),y[a]=u+x;var w=this.getIndex(y),S=w.startIndex,j=w.endIndex,E=function(){var N=v.length-1;return a==="startX"&&(o>c?S%m===0:j%m===0)||o<c&&j===N||a==="endX"&&(o>c?j%m===0:S%m===0)||o>c&&j===N};this.setState(Mn(Mn({},a,u+x),"brushMoveStartX",n.pageX),function(){g&&E()&&g(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var s=this,a=this.state,o=a.scaleValues,c=a.startX,u=a.endX,d=this.state[i],f=o.indexOf(d);if(f!==-1){var h=f+n;if(!(h===-1||h>=o.length)){var p=o[h];i==="startX"&&p>=u||i==="endX"&&p<=c||this.setState(Mn({},i,p),function(){s.props.onChange(s.getIndex({startX:s.state.startX,endX:s.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,s=n.y,a=n.width,o=n.height,c=n.fill,u=n.stroke;return P.createElement("rect",{stroke:u,fill:c,x:i,y:s,width:a,height:o})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,s=n.y,a=n.width,o=n.height,c=n.data,u=n.children,d=n.padding,f=b.Children.only(u);return f?P.cloneElement(f,{x:i,y:s,width:a,height:o,margin:d,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,i){var s,a,o=this,c=this.props,u=c.y,d=c.travellerWidth,f=c.height,h=c.traveller,p=c.ariaLabel,g=c.data,m=c.startIndex,v=c.endIndex,y=Math.max(n,this.props.x),x=sS(sS({},Le(this.props,!1)),{},{x:y,y:u,width:d,height:f}),w=p||"Min value: ".concat((s=g[m])===null||s===void 0?void 0:s.name,", Max value: ").concat((a=g[v])===null||a===void 0?void 0:a.name);return P.createElement(ut,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(j){["ArrowLeft","ArrowRight"].includes(j.key)&&(j.preventDefault(),j.stopPropagation(),o.handleTravellerMoveKeyboard(j.key==="ArrowRight"?1:-1,i))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(n,i){var s=this.props,a=s.y,o=s.height,c=s.stroke,u=s.travellerWidth,d=Math.min(n,i)+u,f=Math.max(Math.abs(i-n)-u,0);return P.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:d,y:a,width:f,height:o})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,s=n.endIndex,a=n.y,o=n.height,c=n.travellerWidth,u=n.stroke,d=this.state,f=d.startX,h=d.endX,p=5,g={pointerEvents:"none",fill:u};return P.createElement(ut,{className:"recharts-brush-texts"},P.createElement(Tc,Jx({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:a+o/2},g),this.getTextOfTick(i)),P.createElement(Tc,Jx({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+c+p,y:a+o/2},g),this.getTextOfTick(s)))}},{key:"render",value:function(){var n=this.props,i=n.data,s=n.className,a=n.children,o=n.x,c=n.y,u=n.width,d=n.height,f=n.alwaysShowText,h=this.state,p=h.startX,g=h.endX,m=h.isTextActive,v=h.isSlideMoving,y=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!le(o)||!le(c)||!le(u)||!le(d)||u<=0||d<=0)return null;var w=Ze("recharts-brush",s),S=P.Children.count(a)===1,j=sRe("userSelect","none");return P.createElement(ut,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:j},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,g),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(g,"endX"),(m||v||y||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,s=n.y,a=n.width,o=n.height,c=n.stroke,u=Math.floor(s+o/2)-1;return P.createElement(P.Fragment,null,P.createElement("rect",{x:i,y:s,width:a,height:o,fill:c,stroke:"none"}),P.createElement("line",{x1:i+1,y1:u,x2:i+a-1,y2:u,fill:"none",stroke:"#fff"}),P.createElement("line",{x1:i+1,y1:u+2,x2:i+a-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var s;return P.isValidElement(n)?s=P.cloneElement(n,i):qe(n)?s=n(i):s=t.renderDefaultTraveller(i),s}},{key:"getDerivedStateFromProps",value:function(n,i){var s=n.data,a=n.width,o=n.x,c=n.travellerWidth,u=n.updateId,d=n.startIndex,f=n.endIndex;if(s!==i.prevData||u!==i.prevUpdateId)return sS({prevData:s,prevTravellerWidth:c,prevUpdateId:u,prevX:o,prevWidth:a},s&&s.length?hRe({data:s,width:a,x:o,travellerWidth:c,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||o!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([o,o+a-c]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:s,prevTravellerWidth:c,prevUpdateId:u,prevX:o,prevWidth:a,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,i){for(var s=n.length,a=0,o=s-1;o-a>1;){var c=Math.floor((a+o)/2);n[c]>i?o=c:a=c}return i>=n[o]?o:a}}])}(b.PureComponent);Mn(Jd,"displayName","Brush");Mn(Jd,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var pRe=GA;function mRe(e,t){var r;return pRe(e,function(n,i,s){return r=t(n,i,s),!r}),!!r}var gRe=mRe,vRe=Z8,yRe=Qs,xRe=gRe,bRe=Rn,wRe=Hb;function SRe(e,t,r){var n=bRe(e)?vRe:xRe;return r&&wRe(e,t,r)&&(t=void 0),n(e,yRe(t))}var jRe=SRe;const _Re=pt(jRe);var Vs=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},wM=bV;function ERe(e,t,r){t=="__proto__"&&wM?wM(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var NRe=ERe,ORe=NRe,ARe=yV,CRe=Qs;function PRe(e,t){var r={};return t=CRe(t),ARe(e,function(n,i,s){ORe(r,i,t(n,i,s))}),r}var TRe=PRe;const kRe=pt(TRe);function RRe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var $Re=RRe,IRe=GA;function MRe(e,t){var r=!0;return IRe(e,function(n,i,s){return r=!!t(n,i,s),r}),r}var DRe=MRe,LRe=$Re,FRe=DRe,BRe=Qs,zRe=Rn,URe=Hb;function VRe(e,t,r){var n=zRe(e)?LRe:FRe;return r&&URe(e,t,r)&&(t=void 0),n(e,BRe(t))}var WRe=VRe;const dW=pt(WRe);var HRe=["x","y"];function Am(e){"@babel/helpers - typeof";return Am=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Am(e)}function jE(){return jE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jE.apply(this,arguments)}function SM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Eh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SM(Object(r),!0).forEach(function(n){qRe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qRe(e,t,r){return t=KRe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KRe(e){var t=GRe(e,"string");return Am(t)=="symbol"?t:t+""}function GRe(e,t){if(Am(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Am(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YRe(e,t){if(e==null)return{};var r=XRe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function XRe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function QRe(e,t){var r=e.x,n=e.y,i=YRe(e,HRe),s="".concat(r),a=parseInt(s,10),o="".concat(n),c=parseInt(o,10),u="".concat(t.height||i.height),d=parseInt(u,10),f="".concat(t.width||i.width),h=parseInt(f,10);return Eh(Eh(Eh(Eh(Eh({},t),i),a?{x:a}:{}),c?{y:c}:{}),{},{height:d,width:h,name:t.name,radius:t.radius})}function jM(e){return P.createElement(iW,jE({shapeType:"rectangle",propTransformer:QRe,activeClassName:"recharts-active-bar"},e))}var ZRe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var s=le(n)||wme(n);return s?t(n,i):(s||Ic(),r)}},JRe=["value","background"],fW;function ef(e){"@babel/helpers - typeof";return ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ef(e)}function e$e(e,t){if(e==null)return{};var r=t$e(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function t$e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function t0(){return t0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t0.apply(this,arguments)}function _M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_M(Object(r),!0).forEach(function(n){To(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_M(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function r$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pW(n.key),n)}}function n$e(e,t,r){return t&&EM(e.prototype,t),r&&EM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i$e(e,t,r){return t=r0(t),s$e(e,hW()?Reflect.construct(t,r||[],r0(e).constructor):t.apply(e,r))}function s$e(e,t){if(t&&(ef(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a$e(e)}function a$e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hW=function(){return!!e})()}function r0(e){return r0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},r0(e)}function o$e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_E(e,t)}function _E(e,t){return _E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},_E(e,t)}function To(e,t,r){return t=pW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pW(e){var t=l$e(e,"string");return ef(t)=="symbol"?t:t+""}function l$e(e,t){if(ef(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ef(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var gl=function(e){function t(){var r;r$e(this,t);for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return r=i$e(this,t,[].concat(i)),To(r,"state",{isAnimationFinished:!1}),To(r,"id",Gc("recharts-bar-")),To(r,"handleAnimationEnd",function(){var a=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),a&&a()}),To(r,"handleAnimationStart",function(){var a=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),a&&a()}),r}return o$e(t,e),n$e(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,s=this.props,a=s.shape,o=s.dataKey,c=s.activeIndex,u=s.activeBar,d=Le(this.props,!1);return n&&n.map(function(f,h){var p=h===c,g=p?u:a,m=mr(mr(mr({},d),f),{},{isActive:p,option:g,index:h,dataKey:o,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return P.createElement(ut,t0({className:"recharts-bar-rectangle"},Cc(i.props,f,h),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(h)}),P.createElement(jM,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,s=i.data,a=i.layout,o=i.isAnimationActive,c=i.animationBegin,u=i.animationDuration,d=i.animationEasing,f=i.animationId,h=this.state.prevData;return P.createElement(hs,{begin:c,duration:u,isActive:o,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var g=p.t,m=s.map(function(v,y){var x=h&&h[y];if(x){var w=Or(x.x,v.x),S=Or(x.y,v.y),j=Or(x.width,v.width),E=Or(x.height,v.height);return mr(mr({},v),{},{x:w(g),y:S(g),width:j(g),height:E(g)})}if(a==="horizontal"){var _=Or(0,v.height),N=_(g);return mr(mr({},v),{},{y:v.y+v.height-N,height:N})}var O=Or(0,v.width),C=O(g);return mr(mr({},v),{},{width:C})});return P.createElement(ut,null,n.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,s=n.isAnimationActive,a=this.state.prevData;return s&&i&&i.length&&(!a||!Rc(a,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,s=i.data,a=i.dataKey,o=i.activeIndex,c=Le(this.props.background,!1);return s.map(function(u,d){u.value;var f=u.background,h=e$e(u,JRe);if(!f)return null;var p=mr(mr(mr(mr(mr({},h),{},{fill:"#eee"},f),c),Cc(n.props,u,d)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:a,index:d,className:"recharts-bar-background-rectangle"});return P.createElement(jM,t0({key:"background-bar-".concat(d),option:n.props.background,isActive:d===o},p))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var s=this.props,a=s.data,o=s.xAxis,c=s.yAxis,u=s.layout,d=s.children,f=Xn(d,Ng);if(!f)return null;var h=u==="vertical"?a[0].height/2:a[0].width/2,p=function(v,y){var x=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:x,errorVal:dr(v,y)}},g={clipPath:n?"url(#clipPath-".concat(i,")"):null};return P.createElement(ut,g,f.map(function(m){return P.cloneElement(m,{key:"error-bar-".concat(i,"-").concat(m.props.dataKey),data:a,xAxis:o,yAxis:c,layout:u,offset:h,dataPointFormatter:p})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,s=n.data,a=n.className,o=n.xAxis,c=n.yAxis,u=n.left,d=n.top,f=n.width,h=n.height,p=n.isAnimationActive,g=n.background,m=n.id;if(i||!s||!s.length)return null;var v=this.state.isAnimationFinished,y=Ze("recharts-bar",a),x=o&&o.allowDataOverflow,w=c&&c.allowDataOverflow,S=x||w,j=Qe(m)?this.id:m;return P.createElement(ut,{className:y},x||w?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(j)},P.createElement("rect",{x:x?u:u-f/2,y:w?d:d-h/2,width:x?f:f*2,height:w?h:h*2}))):null,P.createElement(ut,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(j,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,j),(!p||v)&&Us.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])}(b.PureComponent);fW=gl;To(gl,"displayName","Bar");To(gl,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!fl.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});To(gl,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,s=e.xAxis,a=e.yAxis,o=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=qAe(n,r);if(!p)return null;var g=t.layout,m=r.type.defaultProps,v=m!==void 0?mr(mr({},m),r.props):r.props,y=v.dataKey,x=v.children,w=v.minPointSize,S=g==="horizontal"?a:s,j=u?S.scale.domain():null,E=JAe({numericAxis:S}),_=Xn(x,Pc),N=f.map(function(O,C){var k,$,D,A,R,T;u?k=KAe(u[d+C],j):(k=dr(O,y),Array.isArray(k)||(k=[E,k]));var L=ZRe(w,fW.defaultProps.minPointSize)(k[1],C);if(g==="horizontal"){var M,I=[a.scale(k[0]),a.scale(k[1])],F=I[0],U=I[1];$=pI({axis:s,ticks:o,bandSize:i,offset:p.offset,entry:O,index:C}),D=(M=U??F)!==null&&M!==void 0?M:void 0,A=p.size;var V=F-U;if(R=Number.isNaN(V)?0:V,T={x:$,y:a.y,width:A,height:a.height},Math.abs(L)>0&&Math.abs(R)<Math.abs(L)){var G=dn(R||L)*(Math.abs(L)-Math.abs(R));D-=G,R+=G}}else{var Z=[s.scale(k[0]),s.scale(k[1])],he=Z[0],ve=Z[1];if($=he,D=pI({axis:a,ticks:c,bandSize:i,offset:p.offset,entry:O,index:C}),A=ve-he,R=p.size,T={x:s.x,y:D,width:s.width,height:R},Math.abs(L)>0&&Math.abs(A)<Math.abs(L)){var re=dn(A||L)*(Math.abs(L)-Math.abs(A));A+=re}}return mr(mr(mr({},O),{},{x:$,y:D,width:A,height:R,value:u?k:k[1],payload:O,background:T},_&&_[C]&&_[C].props),{},{tooltipPayload:[F9(r,O)],tooltipPosition:{x:$+A/2,y:D+R/2}})});return mr({data:N,layout:g},h)});function Cm(e){"@babel/helpers - typeof";return Cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cm(e)}function c$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mW(n.key),n)}}function u$e(e,t,r){return t&&NM(e.prototype,t),r&&NM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function OM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OM(Object(r),!0).forEach(function(n){lw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lw(e,t,r){return t=mW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mW(e){var t=d$e(e,"string");return Cm(t)=="symbol"?t:t+""}function d$e(e,t){if(Cm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Cm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jC=function(t,r,n,i,s){var a=t.width,o=t.height,c=t.layout,u=t.children,d=Object.keys(r),f={left:n.left,leftMirror:n.left,right:a-n.right,rightMirror:a-n.right,top:n.top,topMirror:n.top,bottom:o-n.bottom,bottomMirror:o-n.bottom},h=!!Ln(u,gl);return d.reduce(function(p,g){var m=r[g],v=m.orientation,y=m.domain,x=m.padding,w=x===void 0?{}:x,S=m.mirror,j=m.reversed,E="".concat(v).concat(S?"Mirror":""),_,N,O,C,k;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var $=y[1]-y[0],D=1/0,A=m.categoricalDomain.sort(_me);if(A.forEach(function(Z,he){he>0&&(D=Math.min((Z||0)-(A[he-1]||0),D))}),Number.isFinite(D)){var R=D/$,T=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(_=R*T/2),m.padding==="no-gap"){var L=fn(t.barCategoryGap,R*T),M=R*T/2;_=M-L-(M-L)/T*L}}}i==="xAxis"?N=[n.left+(w.left||0)+(_||0),n.left+n.width-(w.right||0)-(_||0)]:i==="yAxis"?N=c==="horizontal"?[n.top+n.height-(w.bottom||0),n.top+(w.top||0)]:[n.top+(w.top||0)+(_||0),n.top+n.height-(w.bottom||0)-(_||0)]:N=m.range,j&&(N=[N[1],N[0]]);var I=I9(m,s,h),F=I.scale,U=I.realScaleType;F.domain(y).range(N),M9(F);var V=D9(F,qi(qi({},m),{},{realScaleType:U}));i==="xAxis"?(k=v==="top"&&!S||v==="bottom"&&S,O=n.left,C=f[E]-k*m.height):i==="yAxis"&&(k=v==="left"&&!S||v==="right"&&S,O=f[E]-k*m.width,C=n.top);var G=qi(qi(qi({},m),V),{},{realScaleType:U,x:O,y:C,scale:F,width:i==="xAxis"?n.width:m.width,height:i==="yAxis"?n.height:m.height});return G.bandSize=Bx(G,V),!m.hide&&i==="xAxis"?f[E]+=(k?-1:1)*G.height:m.hide||(f[E]+=(k?-1:1)*G.width),qi(qi({},p),{},lw({},g,G))},{})},gW=function(t,r){var n=t.x,i=t.y,s=r.x,a=r.y;return{x:Math.min(n,s),y:Math.min(i,a),width:Math.abs(s-n),height:Math.abs(a-i)}},f$e=function(t){var r=t.x1,n=t.y1,i=t.x2,s=t.y2;return gW({x:r,y:n},{x:i,y:s})},vW=function(){function e(t){c$e(this,e),this.scale=t}return u$e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,s=n.position;if(r!==void 0){if(s)switch(s){case"start":return this.scale(r);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+a}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(r)+o}default:return this.scale(r)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],s=n[n.length-1];return i<=s?r>=i&&r<=s:r>=s&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();lw(vW,"EPS",1e-4);var _C=function(t){var r=Object.keys(t).reduce(function(n,i){return qi(qi({},n),{},lw({},i,vW.create(t[i])))},{});return qi(qi({},r),{},{apply:function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=s.bandAware,o=s.position;return kRe(i,function(c,u){return r[u].apply(c,{bandAware:a,position:o})})},isInRange:function(i){return dW(i,function(s,a){return r[a].isInRange(s)})}})};function h$e(e){return(e%180+180)%180}var p$e=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=h$e(i),a=s*Math.PI/180,o=Math.atan(n/r),c=a>o&&a<Math.PI-o?n/Math.sin(a):r/Math.cos(a);return Math.abs(c)},m$e=Qs,g$e=wg,v$e=Vb;function y$e(e){return function(t,r,n){var i=Object(t);if(!g$e(t)){var s=m$e(r);t=v$e(t),r=function(o){return s(i[o],o,i)}}var a=e(t,r,n);return a>-1?i[s?t[a]:a]:void 0}}var x$e=y$e,b$e=oW;function w$e(e){var t=b$e(e),r=t%1;return t===t?r?t-r:t:0}var S$e=w$e,j$e=fV,_$e=Qs,E$e=S$e,N$e=Math.max;function O$e(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:E$e(r);return i<0&&(i=N$e(n+i,0)),j$e(e,_$e(t),i)}var A$e=O$e,C$e=x$e,P$e=A$e,T$e=C$e(P$e),k$e=T$e;const R$e=pt(k$e);var $$e=Ope(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),EC=b.createContext(void 0),NC=b.createContext(void 0),yW=b.createContext(void 0),xW=b.createContext({}),bW=b.createContext(void 0),wW=b.createContext(0),SW=b.createContext(0),AM=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,s=r.offset,a=t.clipPathId,o=t.children,c=t.width,u=t.height,d=$$e(s);return P.createElement(EC.Provider,{value:n},P.createElement(NC.Provider,{value:i},P.createElement(xW.Provider,{value:s},P.createElement(yW.Provider,{value:d},P.createElement(bW.Provider,{value:a},P.createElement(wW.Provider,{value:u},P.createElement(SW.Provider,{value:c},o)))))))},I$e=function(){return b.useContext(bW)},jW=function(t){var r=b.useContext(EC);r==null&&Ic();var n=r[t];return n==null&&Ic(),n},M$e=function(){var t=b.useContext(EC);return go(t)},D$e=function(){var t=b.useContext(NC),r=R$e(t,function(n){return dW(n.domain,Number.isFinite)});return r||go(t)},_W=function(t){var r=b.useContext(NC);r==null&&Ic();var n=r[t];return n==null&&Ic(),n},L$e=function(){var t=b.useContext(yW);return t},F$e=function(){return b.useContext(xW)},OC=function(){return b.useContext(SW)},AC=function(){return b.useContext(wW)};function tf(e){"@babel/helpers - typeof";return tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tf(e)}function B$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z$e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,NW(n.key),n)}}function U$e(e,t,r){return t&&z$e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function V$e(e,t,r){return t=n0(t),W$e(e,EW()?Reflect.construct(t,r||[],n0(e).constructor):t.apply(e,r))}function W$e(e,t){if(t&&(tf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return H$e(e)}function H$e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EW=function(){return!!e})()}function n0(e){return n0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},n0(e)}function q$e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&EE(e,t)}function EE(e,t){return EE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},EE(e,t)}function CM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function PM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CM(Object(r),!0).forEach(function(n){CC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CC(e,t,r){return t=NW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NW(e){var t=K$e(e,"string");return tf(t)=="symbol"?t:t+""}function K$e(e,t){if(tf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(tf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function G$e(e,t){return Z$e(e)||Q$e(e,t)||X$e(e,t)||Y$e()}function Y$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
610In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X$e(e,t){if(e){if(typeof e=="string")return TM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return TM(e,t)}}function TM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Q$e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function Z$e(e){if(Array.isArray(e))return e}function NE(){return NE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},NE.apply(this,arguments)}var J$e=function(t,r){var n;return P.isValidElement(t)?n=P.cloneElement(t,r):qe(t)?n=t(r):n=P.createElement("line",NE({},r,{className:"recharts-reference-line-line"})),n},eIe=function(t,r,n,i,s,a,o,c,u){var d=s.x,f=s.y,h=s.width,p=s.height;if(n){var g=u.y,m=t.y.apply(g,{position:a});if(Vs(u,"discard")&&!t.y.isInRange(m))return null;var v=[{x:d+h,y:m},{x:d,y:m}];return c==="left"?v.reverse():v}if(r){var y=u.x,x=t.x.apply(y,{position:a});if(Vs(u,"discard")&&!t.x.isInRange(x))return null;var w=[{x,y:f+p},{x,y:f}];return o==="top"?w.reverse():w}if(i){var S=u.segment,j=S.map(function(E){return t.apply(E,{position:a})});return Vs(u,"discard")&&_Re(j,function(E){return!t.isInRange(E)})?null:j}return null};function tIe(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,s=e.yAxisId,a=e.shape,o=e.className,c=e.alwaysShow,u=I$e(),d=jW(i),f=_W(s),h=L$e();if(!u||!h)return null;ls(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=_C({x:d.scale,y:f.scale}),g=Cr(t),m=Cr(r),v=n&&n.length===2,y=eIe(p,g,m,v,h,e.position,d.orientation,f.orientation,e);if(!y)return null;var x=G$e(y,2),w=x[0],S=w.x,j=w.y,E=x[1],_=E.x,N=E.y,O=Vs(e,"hidden")?"url(#".concat(u,")"):void 0,C=PM(PM({clipPath:O},Le(e,!0)),{},{x1:S,y1:j,x2:_,y2:N});return P.createElement(ut,{className:Ze("recharts-reference-line",o)},J$e(a,C),$r.renderCallByParent(e,f$e({x1:S,y1:j,x2:_,y2:N})))}var PC=function(e){function t(){return B$e(this,t),V$e(this,t,arguments)}return q$e(t,e),U$e(t,[{key:"render",value:function(){return P.createElement(tIe,this.props)}}])}(P.Component);CC(PC,"displayName","ReferenceLine");CC(PC,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function OE(){return OE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},OE.apply(this,arguments)}function rf(e){"@babel/helpers - typeof";return rf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rf(e)}function kM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function RM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kM(Object(r),!0).forEach(function(n){cw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nIe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,AW(n.key),n)}}function iIe(e,t,r){return t&&nIe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sIe(e,t,r){return t=i0(t),aIe(e,OW()?Reflect.construct(t,r||[],i0(e).constructor):t.apply(e,r))}function aIe(e,t){if(t&&(rf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oIe(e)}function oIe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OW=function(){return!!e})()}function i0(e){return i0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},i0(e)}function lIe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&AE(e,t)}function AE(e,t){return AE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},AE(e,t)}function cw(e,t,r){return t=AW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AW(e){var t=cIe(e,"string");return rf(t)=="symbol"?t:t+""}function cIe(e,t){if(rf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(rf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var uIe=function(t){var r=t.x,n=t.y,i=t.xAxis,s=t.yAxis,a=_C({x:i.scale,y:s.scale}),o=a.apply({x:r,y:n},{bandAware:!0});return Vs(t,"discard")&&!a.isInRange(o)?null:o},uw=function(e){function t(){return rIe(this,t),sIe(this,t,arguments)}return lIe(t,e),iIe(t,[{key:"render",value:function(){var n=this.props,i=n.x,s=n.y,a=n.r,o=n.alwaysShow,c=n.clipPathId,u=Cr(i),d=Cr(s);if(ls(o===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!d)return null;var f=uIe(this.props);if(!f)return null;var h=f.x,p=f.y,g=this.props,m=g.shape,v=g.className,y=Vs(this.props,"hidden")?"url(#".concat(c,")"):void 0,x=RM(RM({clipPath:y},Le(this.props,!0)),{},{cx:h,cy:p});return P.createElement(ut,{className:Ze("recharts-reference-dot",v)},t.renderDot(m,x),$r.renderCallByParent(this.props,{x:h-a,y:p-a,width:2*a,height:2*a}))}}])}(P.Component);cw(uw,"displayName","ReferenceDot");cw(uw,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});cw(uw,"renderDot",function(e,t){var r;return P.isValidElement(e)?r=P.cloneElement(e,t):qe(e)?r=e(t):r=P.createElement(Og,OE({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function CE(){return CE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},CE.apply(this,arguments)}function nf(e){"@babel/helpers - typeof";return nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nf(e)}function $M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function IM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$M(Object(r),!0).forEach(function(n){dw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$M(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fIe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,PW(n.key),n)}}function hIe(e,t,r){return t&&fIe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pIe(e,t,r){return t=s0(t),mIe(e,CW()?Reflect.construct(t,r||[],s0(e).constructor):t.apply(e,r))}function mIe(e,t){if(t&&(nf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gIe(e)}function gIe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CW=function(){return!!e})()}function s0(e){return s0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},s0(e)}function vIe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PE(e,t)}function PE(e,t){return PE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},PE(e,t)}function dw(e,t,r){return t=PW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PW(e){var t=yIe(e,"string");return nf(t)=="symbol"?t:t+""}function yIe(e,t){if(nf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(nf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var xIe=function(t,r,n,i,s){var a=s.x1,o=s.x2,c=s.y1,u=s.y2,d=s.xAxis,f=s.yAxis;if(!d||!f)return null;var h=_C({x:d.scale,y:f.scale}),p={x:t?h.x.apply(a,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(c,{position:"start"}):h.y.rangeMin},g={x:r?h.x.apply(o,{position:"end"}):h.x.rangeMax,y:i?h.y.apply(u,{position:"end"}):h.y.rangeMax};return Vs(s,"discard")&&(!h.isInRange(p)||!h.isInRange(g))?null:gW(p,g)},fw=function(e){function t(){return dIe(this,t),pIe(this,t,arguments)}return vIe(t,e),hIe(t,[{key:"render",value:function(){var n=this.props,i=n.x1,s=n.x2,a=n.y1,o=n.y2,c=n.className,u=n.alwaysShow,d=n.clipPathId;ls(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Cr(i),h=Cr(s),p=Cr(a),g=Cr(o),m=this.props.shape;if(!f&&!h&&!p&&!g&&!m)return null;var v=xIe(f,h,p,g,this.props);if(!v&&!m)return null;var y=Vs(this.props,"hidden")?"url(#".concat(d,")"):void 0;return P.createElement(ut,{className:Ze("recharts-reference-area",c)},t.renderRect(m,IM(IM({clipPath:y},Le(this.props,!0)),v)),$r.renderCallByParent(this.props,v))}}])}(P.Component);dw(fw,"displayName","ReferenceArea");dw(fw,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});dw(fw,"renderRect",function(e,t){var r;return P.isValidElement(e)?r=P.cloneElement(e,t):qe(e)?r=e(t):r=P.createElement(SC,CE({},t,{className:"recharts-reference-area-rect"})),r});function TW(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function bIe(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return p$e(n,r)}function wIe(e,t,r){var n=r==="width",i=e.x,s=e.y,a=e.width,o=e.height;return t===1?{start:n?i:s,end:n?i+a:s+o}:{start:n?i+a:s+o,end:n?i:s}}function a0(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var s=r();return e*(t-e*s/2-n)>=0&&e*(t+e*s/2-i)<=0}function SIe(e,t){return TW(e,t+1)}function jIe(e,t,r,n,i){for(var s=(n||[]).slice(),a=t.start,o=t.end,c=0,u=1,d=a,f=function(){var g=n==null?void 0:n[c];if(g===void 0)return{v:TW(n,u)};var m=c,v,y=function(){return v===void 0&&(v=r(g,m)),v},x=g.coordinate,w=c===0||a0(e,x,y,d,o);w||(c=0,d=a,u+=1),w&&(d=x+e*(y()/2+i),c+=u)},h;u<=s.length;)if(h=f(),h)return h.v;return[]}function Pm(e){"@babel/helpers - typeof";return Pm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pm(e)}function MM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MM(Object(r),!0).forEach(function(n){_Ie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _Ie(e,t,r){return t=EIe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EIe(e){var t=NIe(e,"string");return Pm(t)=="symbol"?t:t+""}function NIe(e,t){if(Pm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OIe(e,t,r,n,i){for(var s=(n||[]).slice(),a=s.length,o=t.start,c=t.end,u=function(h){var p=s[h],g,m=function(){return g===void 0&&(g=r(p,h)),g};if(h===a-1){var v=e*(p.coordinate+e*m()/2-c);s[h]=p=qr(qr({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate})}else s[h]=p=qr(qr({},p),{},{tickCoord:p.coordinate});var y=a0(e,p.tickCoord,m,o,c);y&&(c=p.tickCoord-e*(m()/2+i),s[h]=qr(qr({},p),{},{isShow:!0}))},d=a-1;d>=0;d--)u(d);return s}function AIe(e,t,r,n,i,s){var a=(n||[]).slice(),o=a.length,c=t.start,u=t.end;if(s){var d=n[o-1],f=r(d,o-1),h=e*(d.coordinate+e*f/2-u);a[o-1]=d=qr(qr({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate});var p=a0(e,d.tickCoord,function(){return f},c,u);p&&(u=d.tickCoord-e*(f/2+i),a[o-1]=qr(qr({},d),{},{isShow:!0}))}for(var g=s?o-1:o,m=function(x){var w=a[x],S,j=function(){return S===void 0&&(S=r(w,x)),S};if(x===0){var E=e*(w.coordinate-e*j()/2-c);a[x]=w=qr(qr({},w),{},{tickCoord:E<0?w.coordinate-E*e:w.coordinate})}else a[x]=w=qr(qr({},w),{},{tickCoord:w.coordinate});var _=a0(e,w.tickCoord,j,c,u);_&&(c=w.tickCoord+e*(j()/2+i),a[x]=qr(qr({},w),{},{isShow:!0}))},v=0;v<g;v++)m(v);return a}function TC(e,t,r){var n=e.tick,i=e.ticks,s=e.viewBox,a=e.minTickGap,o=e.orientation,c=e.interval,u=e.tickFormatter,d=e.unit,f=e.angle;if(!i||!i.length||!n)return[];if(le(c)||fl.isSsr)return SIe(i,typeof c=="number"&&le(c)?c:0);var h=[],p=o==="top"||o==="bottom"?"width":"height",g=d&&p==="width"?cp(d,{fontSize:t,letterSpacing:r}):{width:0,height:0},m=function(w,S){var j=qe(u)?u(w.value,S):w.value;return p==="width"?bIe(cp(j,{fontSize:t,letterSpacing:r}),g,f):cp(j,{fontSize:t,letterSpacing:r})[p]},v=i.length>=2?dn(i[1].coordinate-i[0].coordinate):1,y=wIe(s,v,p);return c==="equidistantPreserveStart"?jIe(v,y,m,i,a):(c==="preserveStart"||c==="preserveStartEnd"?h=AIe(v,y,m,i,a,c==="preserveStartEnd"):h=OIe(v,y,m,i,a),h.filter(function(x){return x.isShow}))}var CIe=["viewBox"],PIe=["viewBox"],TIe=["ticks"];function sf(e){"@babel/helpers - typeof";return sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sf(e)}function Lu(){return Lu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lu.apply(this,arguments)}function DM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DM(Object(r),!0).forEach(function(n){kC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aS(e,t){if(e==null)return{};var r=kIe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kIe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function RIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,RW(n.key),n)}}function $Ie(e,t,r){return t&&LM(e.prototype,t),r&&LM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function IIe(e,t,r){return t=o0(t),MIe(e,kW()?Reflect.construct(t,r||[],o0(e).constructor):t.apply(e,r))}function MIe(e,t){if(t&&(sf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return DIe(e)}function DIe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kW=function(){return!!e})()}function o0(e){return o0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},o0(e)}function LIe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&TE(e,t)}function TE(e,t){return TE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},TE(e,t)}function kC(e,t,r){return t=RW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RW(e){var t=FIe(e,"string");return sf(t)=="symbol"?t:t+""}function FIe(e,t){if(sf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Yf=function(e){function t(r){var n;return RIe(this,t),n=IIe(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return LIe(t,e),$Ie(t,[{key:"shouldComponentUpdate",value:function(n,i){var s=n.viewBox,a=aS(n,CIe),o=this.props,c=o.viewBox,u=aS(o,PIe);return!Zu(s,c)||!Zu(a,u)||!Zu(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,s=i.x,a=i.y,o=i.width,c=i.height,u=i.orientation,d=i.tickSize,f=i.mirror,h=i.tickMargin,p,g,m,v,y,x,w=f?-1:1,S=n.tickSize||d,j=le(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":p=g=n.coordinate,v=a+ +!f*c,m=v-w*S,x=m-w*h,y=j;break;case"left":m=v=n.coordinate,g=s+ +!f*o,p=g-w*S,y=p-w*h,x=j;break;case"right":m=v=n.coordinate,g=s+ +f*o,p=g+w*S,y=p+w*h,x=j;break;default:p=g=n.coordinate,v=a+ +f*c,m=v+w*S,x=m+w*h,y=j;break}return{line:{x1:p,y1:m,x2:g,y2:v},tick:{x:y,y:x}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,s=n.mirror,a;switch(i){case"left":a=s?"start":"end";break;case"right":a=s?"end":"start";break;default:a="middle";break}return a}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,s=n.mirror,a="end";switch(i){case"left":case"right":a="middle";break;case"top":a=s?"start":"end";break;default:a=s?"end":"start";break}return a}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,s=n.y,a=n.width,o=n.height,c=n.orientation,u=n.mirror,d=n.axisLine,f=wr(wr(wr({},Le(this.props,!1)),Le(d,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var h=+(c==="top"&&!u||c==="bottom"&&u);f=wr(wr({},f),{},{x1:i,y1:s+h*o,x2:i+a,y2:s+h*o})}else{var p=+(c==="left"&&!u||c==="right"&&u);f=wr(wr({},f),{},{x1:i+p*a,y1:s,x2:i+p*a,y2:s+o})}return P.createElement("line",Lu({},f,{className:Ze("recharts-cartesian-axis-line",Yn(d,"className"))}))}},{key:"renderTicks",value:function(n,i,s){var a=this,o=this.props,c=o.tickLine,u=o.stroke,d=o.tick,f=o.tickFormatter,h=o.unit,p=TC(wr(wr({},this.props),{},{ticks:n}),i,s),g=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),v=Le(this.props,!1),y=Le(d,!1),x=wr(wr({},v),{},{fill:"none"},Le(c,!1)),w=p.map(function(S,j){var E=a.getTickLineCoord(S),_=E.line,N=E.tick,O=wr(wr(wr(wr({textAnchor:g,verticalAnchor:m},v),{},{stroke:"none",fill:u},y),N),{},{index:j,payload:S,visibleTicksCount:p.length,tickFormatter:f});return P.createElement(ut,Lu({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},Cc(a.props,S,j)),c&&P.createElement("line",Lu({},x,_,{className:Ze("recharts-cartesian-axis-tick-line",Yn(c,"className"))})),d&&t.renderTickItem(d,O,"".concat(qe(f)?f(S.value,j):S.value).concat(h||"")))});return P.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,i=this.props,s=i.axisLine,a=i.width,o=i.height,c=i.ticksGenerator,u=i.className,d=i.hide;if(d)return null;var f=this.props,h=f.ticks,p=aS(f,TIe),g=h;return qe(c)&&(g=h&&h.length>0?c(this.props):c(p)),a<=0||o<=0||!g||!g.length?null:P.createElement(ut,{className:Ze("recharts-cartesian-axis",u),ref:function(v){n.layerReference=v}},s&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),$r.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,s){var a,o=Ze(i.className,"recharts-cartesian-axis-tick-value");return P.isValidElement(n)?a=P.cloneElement(n,wr(wr({},i),{},{className:o})):qe(n)?a=n(wr(wr({},i),{},{className:o})):a=P.createElement(Tc,Lu({},i,{className:"recharts-cartesian-axis-tick-value"}),s),a}}])}(b.Component);kC(Yf,"displayName","CartesianAxis");kC(Yf,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var BIe=["x1","y1","x2","y2","key"],zIe=["offset"];function Mc(e){"@babel/helpers - typeof";return Mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mc(e)}function FM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FM(Object(r),!0).forEach(function(n){UIe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UIe(e,t,r){return t=VIe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VIe(e){var t=WIe(e,"string");return Mc(t)=="symbol"?t:t+""}function WIe(e,t){if(Mc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hl(){return Hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hl.apply(this,arguments)}function BM(e,t){if(e==null)return{};var r=HIe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function HIe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var qIe=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,s=t.y,a=t.width,o=t.height,c=t.ry;return P.createElement("rect",{x:i,y:s,ry:c,width:a,height:o,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function $W(e,t){var r;if(P.isValidElement(e))r=P.cloneElement(e,t);else if(qe(e))r=e(t);else{var n=t.x1,i=t.y1,s=t.x2,a=t.y2,o=t.key,c=BM(t,BIe),u=Le(c,!1);u.offset;var d=BM(u,zIe);r=P.createElement("line",Hl({},d,{x1:n,y1:i,x2:s,y2:a,fill:"none",key:o}))}return r}function KIe(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,s=e.horizontalPoints;if(!i||!s||!s.length)return null;var a=s.map(function(o,c){var u=Yr(Yr({},e),{},{x1:t,y1:o,x2:t+r,y2:o,key:"line-".concat(c),index:c});return $W(i,u)});return P.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function GIe(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,s=e.verticalPoints;if(!i||!s||!s.length)return null;var a=s.map(function(o,c){var u=Yr(Yr({},e),{},{x1:o,y1:t,x2:o,y2:t+r,key:"line-".concat(c),index:c});return $W(i,u)});return P.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function YIe(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,s=e.width,a=e.height,o=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var d=o.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],m=g?i+a-h:d[p+1]-h;if(m<=0)return null;var v=p%t.length;return P.createElement("rect",{key:"react-".concat(p),y:h,x:n,height:m,width:s,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function XIe(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,s=e.x,a=e.y,o=e.width,c=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var d=u.map(function(h){return Math.round(h+s-s)}).sort(function(h,p){return h-p});s!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],m=g?s+o-h:d[p+1]-h;if(m<=0)return null;var v=p%n.length;return P.createElement("rect",{key:"react-".concat(p),x:h,y:a,width:m,height:c,stroke:"none",fill:n[v],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var QIe=function(t,r){var n=t.xAxis,i=t.width,s=t.height,a=t.offset;return $9(TC(Yr(Yr(Yr({},Yf.defaultProps),n),{},{ticks:ja(n,!0),viewBox:{x:0,y:0,width:i,height:s}})),a.left,a.left+a.width,r)},ZIe=function(t,r){var n=t.yAxis,i=t.width,s=t.height,a=t.offset;return $9(TC(Yr(Yr(Yr({},Yf.defaultProps),n),{},{ticks:ja(n,!0),viewBox:{x:0,y:0,width:i,height:s}})),a.top,a.top+a.height,r)},du={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function l0(e){var t,r,n,i,s,a,o=OC(),c=AC(),u=F$e(),d=Yr(Yr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:du.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:du.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:du.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:du.horizontalFill,vertical:(s=e.vertical)!==null&&s!==void 0?s:du.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:du.verticalFill,x:le(e.x)?e.x:u.left,y:le(e.y)?e.y:u.top,width:le(e.width)?e.width:u.width,height:le(e.height)?e.height:u.height}),f=d.x,h=d.y,p=d.width,g=d.height,m=d.syncWithTicks,v=d.horizontalValues,y=d.verticalValues,x=M$e(),w=D$e();if(!le(p)||p<=0||!le(g)||g<=0||!le(f)||f!==+f||!le(h)||h!==+h)return null;var S=d.verticalCoordinatesGenerator||QIe,j=d.horizontalCoordinatesGenerator||ZIe,E=d.horizontalPoints,_=d.verticalPoints;if((!E||!E.length)&&qe(j)){var N=v&&v.length,O=j({yAxis:w?Yr(Yr({},w),{},{ticks:N?v:w.ticks}):void 0,width:o,height:c,offset:u},N?!0:m);ls(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Mc(O),"]")),Array.isArray(O)&&(E=O)}if((!_||!_.length)&&qe(S)){var C=y&&y.length,k=S({xAxis:x?Yr(Yr({},x),{},{ticks:C?y:x.ticks}):void 0,width:o,height:c,offset:u},C?!0:m);ls(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Mc(k),"]")),Array.isArray(k)&&(_=k)}return P.createElement("g",{className:"recharts-cartesian-grid"},P.createElement(qIe,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),P.createElement(KIe,Hl({},d,{offset:u,horizontalPoints:E,xAxis:x,yAxis:w})),P.createElement(GIe,Hl({},d,{offset:u,verticalPoints:_,xAxis:x,yAxis:w})),P.createElement(YIe,Hl({},d,{horizontalPoints:E})),P.createElement(XIe,Hl({},d,{verticalPoints:_})))}l0.displayName="CartesianGrid";var JIe=["type","layout","connectNulls","ref"],eMe=["key"];function af(e){"@babel/helpers - typeof";return af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},af(e)}function zM(e,t){if(e==null)return{};var r=tMe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function tMe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function mp(){return mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mp.apply(this,arguments)}function UM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function In(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UM(Object(r),!0).forEach(function(n){Ki(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fu(e){return sMe(e)||iMe(e)||nMe(e)||rMe()}function rMe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
611In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nMe(e,t){if(e){if(typeof e=="string")return kE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kE(e,t)}}function iMe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sMe(e){if(Array.isArray(e))return kE(e)}function kE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function aMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,MW(n.key),n)}}function oMe(e,t,r){return t&&VM(e.prototype,t),r&&VM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function lMe(e,t,r){return t=c0(t),cMe(e,IW()?Reflect.construct(t,r||[],c0(e).constructor):t.apply(e,r))}function cMe(e,t){if(t&&(af(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uMe(e)}function uMe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IW=function(){return!!e})()}function c0(e){return c0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},c0(e)}function dMe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&RE(e,t)}function RE(e,t){return RE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},RE(e,t)}function Ki(e,t,r){return t=MW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MW(e){var t=fMe(e,"string");return af(t)=="symbol"?t:t+""}function fMe(e,t){if(af(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(af(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ag=function(e){function t(){var r;aMe(this,t);for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return r=lMe(this,t,[].concat(i)),Ki(r,"state",{isAnimationFinished:!0,totalLength:0}),Ki(r,"generateSimpleStrokeDasharray",function(a,o){return"".concat(o,"px ").concat(a-o,"px")}),Ki(r,"getStrokeDasharray",function(a,o,c){var u=c.reduce(function(y,x){return y+x});if(!u)return r.generateSimpleStrokeDasharray(o,a);for(var d=Math.floor(a/u),f=a%u,h=o-a,p=[],g=0,m=0;g<c.length;m+=c[g],++g)if(m+c[g]>f){p=[].concat(fu(c.slice(0,g)),[f-m]);break}var v=p.length%2===0?[0,h]:[h];return[].concat(fu(t.repeat(c,d)),fu(p),v).map(function(y){return"".concat(y,"px")}).join(", ")}),Ki(r,"id",Gc("recharts-line-")),Ki(r,"pathRef",function(a){r.mainCurve=a}),Ki(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Ki(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return dMe(t,e),oMe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var s=this.props,a=s.points,o=s.xAxis,c=s.yAxis,u=s.layout,d=s.children,f=Xn(d,Ng);if(!f)return null;var h=function(m,v){return{x:m.x,y:m.y,value:m.value,errorVal:dr(m.payload,v)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return P.createElement(ut,p,f.map(function(g){return P.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:a,xAxis:o,yAxis:c,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,i,s){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var o=this.props,c=o.dot,u=o.points,d=o.dataKey,f=Le(this.props,!1),h=Le(c,!0),p=u.map(function(m,v){var y=In(In(In({key:"dot-".concat(v),r:3},f),h),{},{index:v,cx:m.x,cy:m.y,value:m.value,dataKey:d,payload:m.payload,points:u});return t.renderDotItem(c,y)}),g={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(s,")"):null};return P.createElement(ut,mp({className:"recharts-line-dots",key:"dots"},g),p)}},{key:"renderCurveStatically",value:function(n,i,s,a){var o=this.props,c=o.type,u=o.layout,d=o.connectNulls;o.ref;var f=zM(o,JIe),h=In(In(In({},Le(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(s,")"):null,points:n},a),{},{type:c,layout:u,connectNulls:d});return P.createElement(dc,mp({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var s=this,a=this.props,o=a.points,c=a.strokeDasharray,u=a.isAnimationActive,d=a.animationBegin,f=a.animationDuration,h=a.animationEasing,p=a.animationId,g=a.animateNewValues,m=a.width,v=a.height,y=this.state,x=y.prevPoints,w=y.totalLength;return P.createElement(hs,{begin:d,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var j=S.t;if(x){var E=x.length/o.length,_=o.map(function($,D){var A=Math.floor(D*E);if(x[A]){var R=x[A],T=Or(R.x,$.x),L=Or(R.y,$.y);return In(In({},$),{},{x:T(j),y:L(j)})}if(g){var M=Or(m*2,$.x),I=Or(v/2,$.y);return In(In({},$),{},{x:M(j),y:I(j)})}return In(In({},$),{},{x:$.x,y:$.y})});return s.renderCurveStatically(_,n,i)}var N=Or(0,w),O=N(j),C;if(c){var k="".concat(c).split(/[,\s]+/gim).map(function($){return parseFloat($)});C=s.getStrokeDasharray(O,w,k)}else C=s.generateSimpleStrokeDasharray(w,O);return s.renderCurveStatically(o,n,i,{strokeDasharray:C})})}},{key:"renderCurve",value:function(n,i){var s=this.props,a=s.points,o=s.isAnimationActive,c=this.state,u=c.prevPoints,d=c.totalLength;return o&&a&&a.length&&(!u&&d>0||!Rc(u,a))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(a,n,i)}},{key:"render",value:function(){var n,i=this.props,s=i.hide,a=i.dot,o=i.points,c=i.className,u=i.xAxis,d=i.yAxis,f=i.top,h=i.left,p=i.width,g=i.height,m=i.isAnimationActive,v=i.id;if(s||!o||!o.length)return null;var y=this.state.isAnimationFinished,x=o.length===1,w=Ze("recharts-line",c),S=u&&u.allowDataOverflow,j=d&&d.allowDataOverflow,E=S||j,_=Qe(v)?this.id:v,N=(n=Le(a,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},O=N.r,C=O===void 0?3:O,k=N.strokeWidth,$=k===void 0?2:k,D=j8(a)?a:{},A=D.clipDot,R=A===void 0?!0:A,T=C*2+$;return P.createElement(ut,{className:w},S||j?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(_)},P.createElement("rect",{x:S?h:h-p/2,y:j?f:f-g/2,width:S?p:p*2,height:j?g:g*2})),!R&&P.createElement("clipPath",{id:"clipPath-dots-".concat(_)},P.createElement("rect",{x:h-T/2,y:f-T/2,width:p+T,height:g+T}))):null,!x&&this.renderCurve(E,_),this.renderErrorBar(E,_),(x||a)&&this.renderDots(E,R,_),(!m||y)&&Us.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var s=n.length%2!==0?[].concat(fu(n),[0]):n,a=[],o=0;o<i;++o)a=[].concat(fu(a),fu(s));return a}},{key:"renderDotItem",value:function(n,i){var s;if(P.isValidElement(n))s=P.cloneElement(n,i);else if(qe(n))s=n(i);else{var a=i.key,o=zM(i,eMe),c=Ze("recharts-line-dot",typeof n!="boolean"?n.className:"");s=P.createElement(Og,mp({key:a},o,{className:c}))}return s}}])}(b.PureComponent);Ki(Ag,"displayName","Line");Ki(Ag,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!fl.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Ki(Ag,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,s=e.yAxisTicks,a=e.dataKey,o=e.bandSize,c=e.displayedData,u=e.offset,d=t.layout,f=c.map(function(h,p){var g=dr(h,a);return d==="horizontal"?{x:Fx({axis:r,ticks:i,bandSize:o,entry:h,index:p}),y:Qe(g)?null:n.scale(g),value:g,payload:h}:{x:Qe(g)?null:r.scale(g),y:Fx({axis:n,ticks:s,bandSize:o,entry:h,index:p}),value:g,payload:h}});return In({points:f,layout:d},u)});var hMe=["layout","type","stroke","connectNulls","isRange","ref"],pMe=["key"],DW;function of(e){"@babel/helpers - typeof";return of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},of(e)}function LW(e,t){if(e==null)return{};var r=mMe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mMe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ql(){return ql=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ql.apply(this,arguments)}function WM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function io(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WM(Object(r),!0).forEach(function(n){$s(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,BW(n.key),n)}}function vMe(e,t,r){return t&&HM(e.prototype,t),r&&HM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function yMe(e,t,r){return t=u0(t),xMe(e,FW()?Reflect.construct(t,r||[],u0(e).constructor):t.apply(e,r))}function xMe(e,t){if(t&&(of(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bMe(e)}function bMe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FW=function(){return!!e})()}function u0(e){return u0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},u0(e)}function wMe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$E(e,t)}function $E(e,t){return $E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},$E(e,t)}function $s(e,t,r){return t=BW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BW(e){var t=SMe(e,"string");return of(t)=="symbol"?t:t+""}function SMe(e,t){if(of(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(of(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vl=function(e){function t(){var r;gMe(this,t);for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return r=yMe(this,t,[].concat(i)),$s(r,"state",{isAnimationFinished:!0}),$s(r,"id",Gc("recharts-area-")),$s(r,"handleAnimationEnd",function(){var a=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),qe(a)&&a()}),$s(r,"handleAnimationStart",function(){var a=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),qe(a)&&a()}),r}return wMe(t,e),vMe(t,[{key:"renderDots",value:function(n,i,s){var a=this.props.isAnimationActive,o=this.state.isAnimationFinished;if(a&&!o)return null;var c=this.props,u=c.dot,d=c.points,f=c.dataKey,h=Le(this.props,!1),p=Le(u,!0),g=d.map(function(v,y){var x=io(io(io({key:"dot-".concat(y),r:3},h),p),{},{index:y,cx:v.x,cy:v.y,dataKey:f,value:v.value,payload:v.payload,points:d});return t.renderDotItem(u,x)}),m={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(s,")"):null};return P.createElement(ut,ql({className:"recharts-area-dots"},m),g)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,s=i.baseLine,a=i.points,o=i.strokeWidth,c=a[0].x,u=a[a.length-1].x,d=n*Math.abs(c-u),f=Po(a.map(function(h){return h.y||0}));return le(s)&&typeof s=="number"?f=Math.max(s,f):s&&Array.isArray(s)&&s.length&&(f=Math.max(Po(s.map(function(h){return h.y||0})),f)),le(f)?P.createElement("rect",{x:c<u?c:c-d,y:0,width:d,height:Math.floor(f+(o?parseInt("".concat(o),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,s=i.baseLine,a=i.points,o=i.strokeWidth,c=a[0].y,u=a[a.length-1].y,d=n*Math.abs(c-u),f=Po(a.map(function(h){return h.x||0}));return le(s)&&typeof s=="number"?f=Math.max(s,f):s&&Array.isArray(s)&&s.length&&(f=Math.max(Po(s.map(function(h){return h.x||0})),f)),le(f)?P.createElement("rect",{x:0,y:c<u?c:c-d,width:f+(o?parseInt("".concat(o),10):1),height:Math.floor(d)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,s,a){var o=this.props,c=o.layout,u=o.type,d=o.stroke,f=o.connectNulls,h=o.isRange;o.ref;var p=LW(o,hMe);return P.createElement(ut,{clipPath:s?"url(#clipPath-".concat(a,")"):null},P.createElement(dc,ql({},Le(p,!0),{points:n,connectNulls:f,type:u,baseLine:i,layout:c,stroke:"none",className:"recharts-area-area"})),d!=="none"&&P.createElement(dc,ql({},Le(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:f,fill:"none",points:n})),d!=="none"&&h&&P.createElement(dc,ql({},Le(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:f,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var s=this,a=this.props,o=a.points,c=a.baseLine,u=a.isAnimationActive,d=a.animationBegin,f=a.animationDuration,h=a.animationEasing,p=a.animationId,g=this.state,m=g.prevPoints,v=g.prevBaseLine;return P.createElement(hs,{begin:d,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"area-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(y){var x=y.t;if(m){var w=m.length/o.length,S=o.map(function(N,O){var C=Math.floor(O*w);if(m[C]){var k=m[C],$=Or(k.x,N.x),D=Or(k.y,N.y);return io(io({},N),{},{x:$(x),y:D(x)})}return N}),j;if(le(c)&&typeof c=="number"){var E=Or(v,c);j=E(x)}else if(Qe(c)||Uf(c)){var _=Or(v,0);j=_(x)}else j=c.map(function(N,O){var C=Math.floor(O*w);if(v[C]){var k=v[C],$=Or(k.x,N.x),D=Or(k.y,N.y);return io(io({},N),{},{x:$(x),y:D(x)})}return N});return s.renderAreaStatically(S,j,n,i)}return P.createElement(ut,null,P.createElement("defs",null,P.createElement("clipPath",{id:"animationClipPath-".concat(i)},s.renderClipRect(x))),P.createElement(ut,{clipPath:"url(#animationClipPath-".concat(i,")")},s.renderAreaStatically(o,c,n,i)))})}},{key:"renderArea",value:function(n,i){var s=this.props,a=s.points,o=s.baseLine,c=s.isAnimationActive,u=this.state,d=u.prevPoints,f=u.prevBaseLine,h=u.totalLength;return c&&a&&a.length&&(!d&&h>0||!Rc(d,a)||!Rc(f,o))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(a,o,n,i)}},{key:"render",value:function(){var n,i=this.props,s=i.hide,a=i.dot,o=i.points,c=i.className,u=i.top,d=i.left,f=i.xAxis,h=i.yAxis,p=i.width,g=i.height,m=i.isAnimationActive,v=i.id;if(s||!o||!o.length)return null;var y=this.state.isAnimationFinished,x=o.length===1,w=Ze("recharts-area",c),S=f&&f.allowDataOverflow,j=h&&h.allowDataOverflow,E=S||j,_=Qe(v)?this.id:v,N=(n=Le(a,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},O=N.r,C=O===void 0?3:O,k=N.strokeWidth,$=k===void 0?2:k,D=j8(a)?a:{},A=D.clipDot,R=A===void 0?!0:A,T=C*2+$;return P.createElement(ut,{className:w},S||j?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(_)},P.createElement("rect",{x:S?d:d-p/2,y:j?u:u-g/2,width:S?p:p*2,height:j?g:g*2})),!R&&P.createElement("clipPath",{id:"clipPath-dots-".concat(_)},P.createElement("rect",{x:d-T/2,y:u-T/2,width:p+T,height:g+T}))):null,x?null:this.renderArea(E,_),(a||x)&&this.renderDots(E,R,_),(!m||y)&&Us.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(b.PureComponent);DW=vl;$s(vl,"displayName","Area");$s(vl,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!fl.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});$s(vl,"getBaseValue",function(e,t,r,n){var i=e.layout,s=e.baseValue,a=t.props.baseValue,o=a??s;if(le(o)&&typeof o=="number")return o;var c=i==="horizontal"?n:r,u=c.scale.domain();if(c.type==="number"){var d=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return o==="dataMin"?f:o==="dataMax"||d<0?d:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]});$s(vl,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,s=e.xAxisTicks,a=e.yAxisTicks,o=e.bandSize,c=e.dataKey,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=t.layout,g=u&&u.length,m=DW.getBaseValue(t,r,n,i),v=p==="horizontal",y=!1,x=f.map(function(S,j){var E;g?E=u[d+j]:(E=dr(S,c),Array.isArray(E)?y=!0:E=[m,E]);var _=E[1]==null||g&&dr(S,c)==null;return v?{x:Fx({axis:n,ticks:s,bandSize:o,entry:S,index:j}),y:_?null:i.scale(E[1]),value:E,payload:S}:{x:_?null:n.scale(E[1]),y:Fx({axis:i,ticks:a,bandSize:o,entry:S,index:j}),value:E,payload:S}}),w;return g||y?w=x.map(function(S){var j=Array.isArray(S.value)?S.value[0]:null;return v?{x:S.x,y:j!=null&&S.y!=null?i.scale(j):null}:{x:j!=null?n.scale(j):null,y:S.y}}):w=v?i.scale(m):n.scale(m),io({points:x,baseLine:w,layout:p,isRange:y},h)});$s(vl,"renderDotItem",function(e,t){var r;if(P.isValidElement(e))r=P.cloneElement(e,t);else if(qe(e))r=e(t);else{var n=Ze("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,s=LW(t,pMe);r=P.createElement(Og,ql({},s,{key:i,className:n}))}return r});function lf(e){"@babel/helpers - typeof";return lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lf(e)}function jMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _Me(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,VW(n.key),n)}}function EMe(e,t,r){return t&&_Me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function NMe(e,t,r){return t=d0(t),OMe(e,zW()?Reflect.construct(t,r||[],d0(e).constructor):t.apply(e,r))}function OMe(e,t){if(t&&(lf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AMe(e)}function AMe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zW=function(){return!!e})()}function d0(e){return d0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},d0(e)}function CMe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&IE(e,t)}function IE(e,t){return IE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},IE(e,t)}function UW(e,t,r){return t=VW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VW(e){var t=PMe(e,"string");return lf(t)=="symbol"?t:t+""}function PMe(e,t){if(lf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(lf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ME(){return ME=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ME.apply(this,arguments)}function TMe(e){var t=e.xAxisId,r=OC(),n=AC(),i=jW(t);return i==null?null:b.createElement(Yf,ME({},i,{className:Ze("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(a){return ja(a,!0)}}))}var Ba=function(e){function t(){return jMe(this,t),NMe(this,t,arguments)}return CMe(t,e),EMe(t,[{key:"render",value:function(){return b.createElement(TMe,this.props)}}])}(b.Component);UW(Ba,"displayName","XAxis");UW(Ba,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function cf(e){"@babel/helpers - typeof";return cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cf(e)}function kMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RMe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qW(n.key),n)}}function $Me(e,t,r){return t&&RMe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function IMe(e,t,r){return t=f0(t),MMe(e,WW()?Reflect.construct(t,r||[],f0(e).constructor):t.apply(e,r))}function MMe(e,t){if(t&&(cf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return DMe(e)}function DMe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WW=function(){return!!e})()}function f0(e){return f0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},f0(e)}function LMe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DE(e,t)}function DE(e,t){return DE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},DE(e,t)}function HW(e,t,r){return t=qW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qW(e){var t=FMe(e,"string");return cf(t)=="symbol"?t:t+""}function FMe(e,t){if(cf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(cf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function LE(){return LE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},LE.apply(this,arguments)}var BMe=function(t){var r=t.yAxisId,n=OC(),i=AC(),s=_W(r);return s==null?null:b.createElement(Yf,LE({},s,{className:Ze("recharts-".concat(s.axisType," ").concat(s.axisType),s.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(o){return ja(o,!0)}}))},za=function(e){function t(){return kMe(this,t),IMe(this,t,arguments)}return LMe(t,e),$Me(t,[{key:"render",value:function(){return b.createElement(BMe,this.props)}}])}(b.Component);HW(za,"displayName","YAxis");HW(za,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function qM(e){return WMe(e)||VMe(e)||UMe(e)||zMe()}function zMe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
612In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UMe(e,t){if(e){if(typeof e=="string")return FE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return FE(e,t)}}function VMe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WMe(e){if(Array.isArray(e))return FE(e)}function FE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var BE=function(t,r,n,i,s){var a=Xn(t,PC),o=Xn(t,uw),c=[].concat(qM(a),qM(o)),u=Xn(t,fw),d="".concat(i,"Id"),f=i[0],h=r;if(c.length&&(h=c.reduce(function(m,v){if(v.props[d]===n&&Vs(v.props,"extendDomain")&&le(v.props[f])){var y=v.props[f];return[Math.min(m[0],y),Math.max(m[1],y)]}return m},h)),u.length){var p="".concat(f,"1"),g="".concat(f,"2");h=u.reduce(function(m,v){if(v.props[d]===n&&Vs(v.props,"extendDomain")&&le(v.props[p])&&le(v.props[g])){var y=v.props[p],x=v.props[g];return[Math.min(m[0],y,x),Math.max(m[1],y,x)]}return m},h)}return s&&s.length&&(h=s.reduce(function(m,v){return le(v)?[Math.min(m[0],v),Math.max(m[1],v)]:m},h)),h},KW={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function s(c,u,d,f,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new i(d,f||c,h),g=r?r+u:u;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],p]:c._events[g].push(p):(c._events[g]=p,c._eventsCount++),c}function a(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var u=[],d,f;if(this._eventsCount===0)return u;for(f in d=this._events)t.call(d,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},o.prototype.listeners=function(u){var d=r?r+u:u,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,p=f.length,g=new Array(p);h<p;h++)g[h]=f[h].fn;return g},o.prototype.listenerCount=function(u){var d=r?r+u:u,f=this._events[d];return f?f.fn?1:f.length:0},o.prototype.emit=function(u,d,f,h,p,g){var m=r?r+u:u;if(!this._events[m])return!1;var v=this._events[m],y=arguments.length,x,w;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),y){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,d),!0;case 3:return v.fn.call(v.context,d,f),!0;case 4:return v.fn.call(v.context,d,f,h),!0;case 5:return v.fn.call(v.context,d,f,h,p),!0;case 6:return v.fn.call(v.context,d,f,h,p,g),!0}for(w=1,x=new Array(y-1);w<y;w++)x[w-1]=arguments[w];v.fn.apply(v.context,x)}else{var S=v.length,j;for(w=0;w<S;w++)switch(v[w].once&&this.removeListener(u,v[w].fn,void 0,!0),y){case 1:v[w].fn.call(v[w].context);break;case 2:v[w].fn.call(v[w].context,d);break;case 3:v[w].fn.call(v[w].context,d,f);break;case 4:v[w].fn.call(v[w].context,d,f,h);break;default:if(!x)for(j=1,x=new Array(y-1);j<y;j++)x[j-1]=arguments[j];v[w].fn.apply(v[w].context,x)}}return!0},o.prototype.on=function(u,d,f){return s(this,u,d,f,!1)},o.prototype.once=function(u,d,f){return s(this,u,d,f,!0)},o.prototype.removeListener=function(u,d,f,h){var p=r?r+u:u;if(!this._events[p])return this;if(!d)return a(this,p),this;var g=this._events[p];if(g.fn)g.fn===d&&(!h||g.once)&&(!f||g.context===f)&&a(this,p);else{for(var m=0,v=[],y=g.length;m<y;m++)(g[m].fn!==d||h&&!g[m].once||f&&g[m].context!==f)&&v.push(g[m]);v.length?this._events[p]=v.length===1?v[0]:v:a(this,p)}return this},o.prototype.removeAllListeners=function(u){var d;return u?(d=r?r+u:u,this._events[d]&&a(this,d)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o})(KW);var HMe=KW.exports;const qMe=pt(HMe);var oS=new qMe,lS="recharts.syncMouseEvents";function Tm(e){"@babel/helpers - typeof";return Tm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tm(e)}function KMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GMe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,GW(n.key),n)}}function YMe(e,t,r){return t&&GMe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cS(e,t,r){return t=GW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GW(e){var t=XMe(e,"string");return Tm(t)=="symbol"?t:t+""}function XMe(e,t){if(Tm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Tm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var QMe=function(){function e(){KMe(this,e),cS(this,"activeIndex",0),cS(this,"coordinateList",[]),cS(this,"layout","horizontal")}return YMe(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,s=i===void 0?null:i,a=r.container,o=a===void 0?null:a,c=r.layout,u=c===void 0?null:c,d=r.offset,f=d===void 0?null:d,h=r.mouseHandlerCallback,p=h===void 0?null:h;this.coordinateList=(n=s??this.coordinateList)!==null&&n!==void 0?n:[],this.container=o??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=p??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),s=i.x,a=i.y,o=i.height,c=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,d=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=s+c+u,h=a+this.offset.top+o/2+d;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])}();function ZMe(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],i=e==null?void 0:e[1];if(n&&i&&le(n)&&le(i))return!0}return!1}function JMe(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function YW(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,s=e.endAngle,a=Mt(t,r,n,i),o=Mt(t,r,n,s);return{points:[a,o],cx:t,cy:r,radius:n,startAngle:i,endAngle:s}}function eDe(e,t,r){var n,i,s,a;if(e==="horizontal")n=t.x,s=n,i=r.top,a=r.top+r.height;else if(e==="vertical")i=t.y,a=i,n=r.left,s=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var o=t.cx,c=t.cy,u=t.innerRadius,d=t.outerRadius,f=t.angle,h=Mt(o,c,u,f),p=Mt(o,c,d,f);n=h.x,i=h.y,s=p.x,a=p.y}else return YW(t);return[{x:n,y:i},{x:s,y:a}]}function km(e){"@babel/helpers - typeof";return km=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},km(e)}function KM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Av(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KM(Object(r),!0).forEach(function(n){tDe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tDe(e,t,r){return t=rDe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rDe(e){var t=nDe(e,"string");return km(t)=="symbol"?t:t+""}function nDe(e,t){if(km(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(km(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iDe(e){var t,r,n=e.element,i=e.tooltipEventType,s=e.isActive,a=e.activeCoordinate,o=e.activePayload,c=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,h=e.chartName,p=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!p||!s||!a||h!=="ScatterChart"&&i!=="axis")return null;var g,m=dc;if(h==="ScatterChart")g=a,m=fke;else if(h==="BarChart")g=JMe(f,a,c,d),m=SC;else if(f==="radial"){var v=YW(a),y=v.cx,x=v.cy,w=v.radius,S=v.startAngle,j=v.endAngle;g={cx:y,cy:x,startAngle:S,endAngle:j,innerRadius:w,outerRadius:w},m=H9}else g={points:eDe(f,a,c)},m=dc;var E=Av(Av(Av(Av({stroke:"#ccc",pointerEvents:"none"},c),g),Le(p,!1)),{},{payload:o,payloadIndex:u,className:Ze("recharts-tooltip-cursor",p.className)});return b.isValidElement(p)?b.cloneElement(p,E):b.createElement(m,E)}var sDe=["item"],aDe=["children","className","width","height","style","compact","title","desc"];function uf(e){"@babel/helpers - typeof";return uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uf(e)}function Fu(){return Fu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fu.apply(this,arguments)}function GM(e,t){return cDe(e)||lDe(e,t)||QW(e,t)||oDe()}function oDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
613In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lDe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,s,a,o=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(c=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function cDe(e){if(Array.isArray(e))return e}function YM(e,t){if(e==null)return{};var r=uDe(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uDe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function dDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fDe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ZW(n.key),n)}}function hDe(e,t,r){return t&&fDe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pDe(e,t,r){return t=h0(t),mDe(e,XW()?Reflect.construct(t,r||[],h0(e).constructor):t.apply(e,r))}function mDe(e,t){if(t&&(uf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gDe(e)}function gDe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XW=function(){return!!e})()}function h0(e){return h0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},h0(e)}function vDe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zE(e,t)}function zE(e,t){return zE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},zE(e,t)}function df(e){return bDe(e)||xDe(e)||QW(e)||yDe()}function yDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
614In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QW(e,t){if(e){if(typeof e=="string")return UE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return UE(e,t)}}function xDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bDe(e){if(Array.isArray(e))return UE(e)}function UE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function XM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Q(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XM(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function He(e,t,r){return t=ZW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZW(e){var t=wDe(e,"string");return uf(t)=="symbol"?t:t+""}function wDe(e,t){if(uf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(uf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var SDe={xAxis:["bottom","top"],yAxis:["left","right"]},jDe={width:"100%",height:"100%"},JW={x:0,y:0};function Cv(e){return e}var _De=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},EDe=function(t,r,n,i){var s=r.find(function(d){return d&&d.index===n});if(s){if(t==="horizontal")return{x:s.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:s.coordinate};if(t==="centric"){var a=s.coordinate,o=i.radius;return Q(Q(Q({},i),Mt(i.cx,i.cy,o,a)),{},{angle:a,radius:o})}var c=s.coordinate,u=i.angle;return Q(Q(Q({},i),Mt(i.cx,i.cy,c,u)),{},{angle:u,radius:c})}return JW},hw=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,s=r.dataEndIndex,a=(n??[]).reduce(function(o,c){var u=c.props.data;return u&&u.length?[].concat(df(o),df(u)):o},[]);return a.length>0?a:t&&t.length&&le(i)&&le(s)?t.slice(i,s+1):[]};function eH(e){return e==="number"?[0,"auto"]:void 0}var VE=function(t,r,n,i){var s=t.graphicalItems,a=t.tooltipAxis,o=hw(r,t);return n<0||!s||!s.length||n>=o.length?null:s.reduce(function(c,u){var d,f=(d=u.props.data)!==null&&d!==void 0?d:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var p=f===void 0?o:f;h=dx(p,a.dataKey,i)}else h=f&&f[n]||o[n];return h?[].concat(df(c),[F9(u,h)]):c},[])},QM=function(t,r,n,i){var s=i||{x:t.chartX,y:t.chartY},a=_De(s,n),o=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,d=BAe(a,o,u,c);if(d>=0&&u){var f=u[d]&&u[d].value,h=VE(t,r,d,f),p=EDe(n,o,d,s);return{activeTooltipIndex:d,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},NDe=function(t,r){var n=r.axes,i=r.graphicalItems,s=r.axisType,a=r.axisIdKey,o=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.layout,f=t.children,h=t.stackOffset,p=R9(d,s);return n.reduce(function(g,m){var v,y=m.type.defaultProps!==void 0?Q(Q({},m.type.defaultProps),m.props):m.props,x=y.type,w=y.dataKey,S=y.allowDataOverflow,j=y.allowDuplicatedCategory,E=y.scale,_=y.ticks,N=y.includeHidden,O=y[a];if(g[O])return g;var C=hw(t.data,{graphicalItems:i.filter(function(V){var G,Z=a in V.props?V.props[a]:(G=V.type.defaultProps)===null||G===void 0?void 0:G[a];return Z===O}),dataStartIndex:c,dataEndIndex:u}),k=C.length,$,D,A;ZMe(y.domain,S,x)&&($=rE(y.domain,null,S),p&&(x==="number"||E!=="auto")&&(A=dp(C,w,"category")));var R=eH(x);if(!$||$.length===0){var T,L=(T=y.domain)!==null&&T!==void 0?T:R;if(w){if($=dp(C,w,x),x==="category"&&p){var M=jme($);j&&M?(D=$,$=Zx(0,k)):j||($=vI(L,$,m).reduce(function(V,G){return V.indexOf(G)>=0?V:[].concat(df(V),[G])},[]))}else if(x==="category")j?$=$.filter(function(V){return V!==""&&!Qe(V)}):$=vI(L,$,m).reduce(function(V,G){return V.indexOf(G)>=0||G===""||Qe(G)?V:[].concat(df(V),[G])},[]);else if(x==="number"){var I=HAe(C,i.filter(function(V){var G,Z,he=a in V.props?V.props[a]:(G=V.type.defaultProps)===null||G===void 0?void 0:G[a],ve="hide"in V.props?V.props.hide:(Z=V.type.defaultProps)===null||Z===void 0?void 0:Z.hide;return he===O&&(N||!ve)}),w,s,d);I&&($=I)}p&&(x==="number"||E!=="auto")&&(A=dp(C,w,"category"))}else p?$=Zx(0,k):o&&o[O]&&o[O].hasStack&&x==="number"?$=h==="expand"?[0,1]:L9(o[O].stackGroups,c,u):$=k9(C,i.filter(function(V){var G=a in V.props?V.props[a]:V.type.defaultProps[a],Z="hide"in V.props?V.props.hide:V.type.defaultProps.hide;return G===O&&(N||!Z)}),x,d,!0);if(x==="number")$=BE(f,$,O,s,_),L&&($=rE(L,$,S));else if(x==="category"&&L){var F=L,U=$.every(function(V){return F.indexOf(V)>=0});U&&($=F)}}return Q(Q({},g),{},He({},O,Q(Q({},y),{},{axisType:s,domain:$,categoricalDomain:A,duplicateDomain:D,originalDomain:(v=y.domain)!==null&&v!==void 0?v:R,isCategorical:p,layout:d})))},{})},ODe=function(t,r){var n=r.graphicalItems,i=r.Axis,s=r.axisType,a=r.axisIdKey,o=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.layout,f=t.children,h=hw(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:u}),p=h.length,g=R9(d,s),m=-1;return n.reduce(function(v,y){var x=y.type.defaultProps!==void 0?Q(Q({},y.type.defaultProps),y.props):y.props,w=x[a],S=eH("number");if(!v[w]){m++;var j;return g?j=Zx(0,p):o&&o[w]&&o[w].hasStack?(j=L9(o[w].stackGroups,c,u),j=BE(f,j,w,s)):(j=rE(S,k9(h,n.filter(function(E){var _,N,O=a in E.props?E.props[a]:(_=E.type.defaultProps)===null||_===void 0?void 0:_[a],C="hide"in E.props?E.props.hide:(N=E.type.defaultProps)===null||N===void 0?void 0:N.hide;return O===w&&!C}),"number",d),i.defaultProps.allowDataOverflow),j=BE(f,j,w,s)),Q(Q({},v),{},He({},w,Q(Q({axisType:s},i.defaultProps),{},{hide:!0,orientation:Yn(SDe,"".concat(s,".").concat(m%2),null),domain:j,originalDomain:S,isCategorical:g,layout:d})))}return v},{})},ADe=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,s=r.AxisComp,a=r.graphicalItems,o=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.children,f="".concat(i,"Id"),h=Xn(d,s),p={};return h&&h.length?p=NDe(t,{axes:h,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:o,dataStartIndex:c,dataEndIndex:u}):a&&a.length&&(p=ODe(t,{Axis:s,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:o,dataStartIndex:c,dataEndIndex:u})),p},CDe=function(t){var r=go(t),n=ja(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:YA(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Bx(r,n)}},ZM=function(t){var r=t.children,n=t.defaultShowTooltip,i=Ln(r,Jd),s=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(s=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:s,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!n}},PDe=function(t){return!t||!t.length?!1:t.some(function(r){var n=Na(r&&r.type);return n&&n.indexOf("Bar")>=0})},JM=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},TDe=function(t,r){var n=t.props,i=t.graphicalItems,s=t.xAxisMap,a=s===void 0?{}:s,o=t.yAxisMap,c=o===void 0?{}:o,u=n.width,d=n.height,f=n.children,h=n.margin||{},p=Ln(f,Jd),g=Ln(f,Vo),m=Object.keys(c).reduce(function(j,E){var _=c[E],N=_.orientation;return!_.mirror&&!_.hide?Q(Q({},j),{},He({},N,j[N]+_.width)):j},{left:h.left||0,right:h.right||0}),v=Object.keys(a).reduce(function(j,E){var _=a[E],N=_.orientation;return!_.mirror&&!_.hide?Q(Q({},j),{},He({},N,Yn(j,"".concat(N))+_.height)):j},{top:h.top||0,bottom:h.bottom||0}),y=Q(Q({},v),m),x=y.bottom;p&&(y.bottom+=p.props.height||Jd.defaultProps.height),g&&r&&(y=VAe(y,i,n,r));var w=u-y.left-y.right,S=d-y.top-y.bottom;return Q(Q({brushBottom:x},y),{},{width:Math.max(w,0),height:Math.max(S,0)})},kDe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},pw=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,s=i===void 0?"axis":i,a=t.validateTooltipEventTypes,o=a===void 0?["axis"]:a,c=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,h=function(y,x){var w=x.graphicalItems,S=x.stackGroups,j=x.offset,E=x.updateId,_=x.dataStartIndex,N=x.dataEndIndex,O=y.barSize,C=y.layout,k=y.barGap,$=y.barCategoryGap,D=y.maxBarSize,A=JM(C),R=A.numericAxisName,T=A.cateAxisName,L=PDe(w),M=[];return w.forEach(function(I,F){var U=hw(y.data,{graphicalItems:[I],dataStartIndex:_,dataEndIndex:N}),V=I.type.defaultProps!==void 0?Q(Q({},I.type.defaultProps),I.props):I.props,G=V.dataKey,Z=V.maxBarSize,he=V["".concat(R,"Id")],ve=V["".concat(T,"Id")],re={},ge=c.reduce(function(H,K){var me=x["".concat(K.axisType,"Map")],oe=V["".concat(K.axisType,"Id")];me&&me[oe]||K.axisType==="zAxis"||Ic();var ae=me[oe];return Q(Q({},H),{},He(He({},K.axisType,ae),"".concat(K.axisType,"Ticks"),ja(ae)))},re),Y=ge[T],ee=ge["".concat(T,"Ticks")],q=S&&S[he]&&S[he].hasStack&&eCe(I,S[he].stackGroups),W=Na(I.type).indexOf("Bar")>=0,Fe=Bx(Y,ee),Ae=[],Ue=L&&zAe({barSize:O,stackGroups:S,totalSize:kDe(ge,T)});if(W){var nt,We,_e=Qe(Z)?D:Z,St=(nt=(We=Bx(Y,ee,!0))!==null&&We!==void 0?We:_e)!==null&&nt!==void 0?nt:0;Ae=UAe({barGap:k,barCategoryGap:$,bandSize:St!==Fe?St:Fe,sizeList:Ue[ve],maxBarSize:_e}),St!==Fe&&(Ae=Ae.map(function(H){return Q(Q({},H),{},{position:Q(Q({},H.position),{},{offset:H.position.offset-St/2})})}))}var B=I&&I.type&&I.type.getComposedData;B&&M.push({props:Q(Q({},B(Q(Q({},ge),{},{displayedData:U,props:y,dataKey:G,item:I,bandSize:Fe,barPosition:Ae,offset:j,stackedData:q,layout:C,dataStartIndex:_,dataEndIndex:N}))),{},He(He(He({key:I.key||"item-".concat(F)},R,ge[R]),T,ge[T]),"animationId",E)),childIndex:Ime(I,y.children),item:I})}),M},p=function(y,x){var w=y.props,S=y.dataStartIndex,j=y.dataEndIndex,E=y.updateId;if(!uR({props:w}))return null;var _=w.children,N=w.layout,O=w.stackOffset,C=w.data,k=w.reverseStackOrder,$=JM(N),D=$.numericAxisName,A=$.cateAxisName,R=Xn(_,n),T=ZAe(C,R,"".concat(D,"Id"),"".concat(A,"Id"),O,k),L=c.reduce(function(V,G){var Z="".concat(G.axisType,"Map");return Q(Q({},V),{},He({},Z,ADe(w,Q(Q({},G),{},{graphicalItems:R,stackGroups:G.axisType===D&&T,dataStartIndex:S,dataEndIndex:j}))))},{}),M=TDe(Q(Q({},L),{},{props:w,graphicalItems:R}),x==null?void 0:x.legendBBox);Object.keys(L).forEach(function(V){L[V]=d(w,L[V],M,V.replace("Map",""),r)});var I=L["".concat(A,"Map")],F=CDe(I),U=h(w,Q(Q({},L),{},{dataStartIndex:S,dataEndIndex:j,updateId:E,graphicalItems:R,stackGroups:T,offset:M}));return Q(Q({formattedGraphicalItems:U,graphicalItems:R,offset:M,stackGroups:T},F),L)},g=function(v){function y(x){var w,S,j;return dDe(this,y),j=pDe(this,y,[x]),He(j,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),He(j,"accessibilityManager",new QMe),He(j,"handleLegendBBoxUpdate",function(E){if(E){var _=j.state,N=_.dataStartIndex,O=_.dataEndIndex,C=_.updateId;j.setState(Q({legendBBox:E},p({props:j.props,dataStartIndex:N,dataEndIndex:O,updateId:C},Q(Q({},j.state),{},{legendBBox:E}))))}}),He(j,"handleReceiveSyncEvent",function(E,_,N){if(j.props.syncId===E){if(N===j.eventEmitterSymbol&&typeof j.props.syncMethod!="function")return;j.applySyncEvent(_)}}),He(j,"handleBrushChange",function(E){var _=E.startIndex,N=E.endIndex;if(_!==j.state.dataStartIndex||N!==j.state.dataEndIndex){var O=j.state.updateId;j.setState(function(){return Q({dataStartIndex:_,dataEndIndex:N},p({props:j.props,dataStartIndex:_,dataEndIndex:N,updateId:O},j.state))}),j.triggerSyncEvent({dataStartIndex:_,dataEndIndex:N})}}),He(j,"handleMouseEnter",function(E){var _=j.getMouseInfo(E);if(_){var N=Q(Q({},_),{},{isTooltipActive:!0});j.setState(N),j.triggerSyncEvent(N);var O=j.props.onMouseEnter;qe(O)&&O(N,E)}}),He(j,"triggeredAfterMouseMove",function(E){var _=j.getMouseInfo(E),N=_?Q(Q({},_),{},{isTooltipActive:!0}):{isTooltipActive:!1};j.setState(N),j.triggerSyncEvent(N);var O=j.props.onMouseMove;qe(O)&&O(N,E)}),He(j,"handleItemMouseEnter",function(E){j.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),He(j,"handleItemMouseLeave",function(){j.setState(function(){return{isTooltipActive:!1}})}),He(j,"handleMouseMove",function(E){E.persist(),j.throttleTriggeredAfterMouseMove(E)}),He(j,"handleMouseLeave",function(E){j.throttleTriggeredAfterMouseMove.cancel();var _={isTooltipActive:!1};j.setState(_),j.triggerSyncEvent(_);var N=j.props.onMouseLeave;qe(N)&&N(_,E)}),He(j,"handleOuterEvent",function(E){var _=$me(E),N=Yn(j.props,"".concat(_));if(_&&qe(N)){var O,C;/.*touch.*/i.test(_)?C=j.getMouseInfo(E.changedTouches[0]):C=j.getMouseInfo(E),N((O=C)!==null&&O!==void 0?O:{},E)}}),He(j,"handleClick",function(E){var _=j.getMouseInfo(E);if(_){var N=Q(Q({},_),{},{isTooltipActive:!0});j.setState(N),j.triggerSyncEvent(N);var O=j.props.onClick;qe(O)&&O(N,E)}}),He(j,"handleMouseDown",function(E){var _=j.props.onMouseDown;if(qe(_)){var N=j.getMouseInfo(E);_(N,E)}}),He(j,"handleMouseUp",function(E){var _=j.props.onMouseUp;if(qe(_)){var N=j.getMouseInfo(E);_(N,E)}}),He(j,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&j.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),He(j,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&j.handleMouseDown(E.changedTouches[0])}),He(j,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&j.handleMouseUp(E.changedTouches[0])}),He(j,"handleDoubleClick",function(E){var _=j.props.onDoubleClick;if(qe(_)){var N=j.getMouseInfo(E);_(N,E)}}),He(j,"handleContextMenu",function(E){var _=j.props.onContextMenu;if(qe(_)){var N=j.getMouseInfo(E);_(N,E)}}),He(j,"triggerSyncEvent",function(E){j.props.syncId!==void 0&&oS.emit(lS,j.props.syncId,E,j.eventEmitterSymbol)}),He(j,"applySyncEvent",function(E){var _=j.props,N=_.layout,O=_.syncMethod,C=j.state.updateId,k=E.dataStartIndex,$=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)j.setState(Q({dataStartIndex:k,dataEndIndex:$},p({props:j.props,dataStartIndex:k,dataEndIndex:$,updateId:C},j.state)));else if(E.activeTooltipIndex!==void 0){var D=E.chartX,A=E.chartY,R=E.activeTooltipIndex,T=j.state,L=T.offset,M=T.tooltipTicks;if(!L)return;if(typeof O=="function")R=O(M,E);else if(O==="value"){R=-1;for(var I=0;I<M.length;I++)if(M[I].value===E.activeLabel){R=I;break}}var F=Q(Q({},L),{},{x:L.left,y:L.top}),U=Math.min(D,F.x+F.width),V=Math.min(A,F.y+F.height),G=M[R]&&M[R].value,Z=VE(j.state,j.props.data,R),he=M[R]?{x:N==="horizontal"?M[R].coordinate:U,y:N==="horizontal"?V:M[R].coordinate}:JW;j.setState(Q(Q({},E),{},{activeLabel:G,activeCoordinate:he,activePayload:Z,activeTooltipIndex:R}))}else j.setState(E)}),He(j,"renderCursor",function(E){var _,N=j.state,O=N.isTooltipActive,C=N.activeCoordinate,k=N.activePayload,$=N.offset,D=N.activeTooltipIndex,A=N.tooltipAxisBandSize,R=j.getTooltipEventType(),T=(_=E.props.active)!==null&&_!==void 0?_:O,L=j.props.layout,M=E.key||"_recharts-cursor";return P.createElement(iDe,{key:M,activeCoordinate:C,activePayload:k,activeTooltipIndex:D,chartName:r,element:E,isActive:T,layout:L,offset:$,tooltipAxisBandSize:A,tooltipEventType:R})}),He(j,"renderPolarAxis",function(E,_,N){var O=Yn(E,"type.axisType"),C=Yn(j.state,"".concat(O,"Map")),k=E.type.defaultProps,$=k!==void 0?Q(Q({},k),E.props):E.props,D=C&&C[$["".concat(O,"Id")]];return b.cloneElement(E,Q(Q({},D),{},{className:Ze(O,D.className),key:E.key||"".concat(_,"-").concat(N),ticks:ja(D,!0)}))}),He(j,"renderPolarGrid",function(E){var _=E.props,N=_.radialLines,O=_.polarAngles,C=_.polarRadius,k=j.state,$=k.radiusAxisMap,D=k.angleAxisMap,A=go($),R=go(D),T=R.cx,L=R.cy,M=R.innerRadius,I=R.outerRadius;return b.cloneElement(E,{polarAngles:Array.isArray(O)?O:ja(R,!0).map(function(F){return F.coordinate}),polarRadius:Array.isArray(C)?C:ja(A,!0).map(function(F){return F.coordinate}),cx:T,cy:L,innerRadius:M,outerRadius:I,key:E.key||"polar-grid",radialLines:N})}),He(j,"renderLegend",function(){var E=j.state.formattedGraphicalItems,_=j.props,N=_.children,O=_.width,C=_.height,k=j.props.margin||{},$=O-(k.left||0)-(k.right||0),D=P9({children:N,formattedGraphicalItems:E,legendWidth:$,legendContent:u});if(!D)return null;var A=D.item,R=YM(D,sDe);return b.cloneElement(A,Q(Q({},R),{},{chartWidth:O,chartHeight:C,margin:k,onBBoxUpdate:j.handleLegendBBoxUpdate}))}),He(j,"renderTooltip",function(){var E,_=j.props,N=_.children,O=_.accessibilityLayer,C=Ln(N,on);if(!C)return null;var k=j.state,$=k.isTooltipActive,D=k.activeCoordinate,A=k.activePayload,R=k.activeLabel,T=k.offset,L=(E=C.props.active)!==null&&E!==void 0?E:$;return b.cloneElement(C,{viewBox:Q(Q({},T),{},{x:T.left,y:T.top}),active:L,label:R,payload:L?A:[],coordinate:D,accessibilityLayer:O})}),He(j,"renderBrush",function(E){var _=j.props,N=_.margin,O=_.data,C=j.state,k=C.offset,$=C.dataStartIndex,D=C.dataEndIndex,A=C.updateId;return b.cloneElement(E,{key:E.key||"_recharts-brush",onChange:_v(j.handleBrushChange,E.props.onChange),data:O,x:le(E.props.x)?E.props.x:k.left,y:le(E.props.y)?E.props.y:k.top+k.height+k.brushBottom-(N.bottom||0),width:le(E.props.width)?E.props.width:k.width,startIndex:$,endIndex:D,updateId:"brush-".concat(A)})}),He(j,"renderReferenceElement",function(E,_,N){if(!E)return null;var O=j,C=O.clipPathId,k=j.state,$=k.xAxisMap,D=k.yAxisMap,A=k.offset,R=E.type.defaultProps||{},T=E.props,L=T.xAxisId,M=L===void 0?R.xAxisId:L,I=T.yAxisId,F=I===void 0?R.yAxisId:I;return b.cloneElement(E,{key:E.key||"".concat(_,"-").concat(N),xAxis:$[M],yAxis:D[F],viewBox:{x:A.left,y:A.top,width:A.width,height:A.height},clipPathId:C})}),He(j,"renderActivePoints",function(E){var _=E.item,N=E.activePoint,O=E.basePoint,C=E.childIndex,k=E.isRange,$=[],D=_.props.key,A=_.item.type.defaultProps!==void 0?Q(Q({},_.item.type.defaultProps),_.item.props):_.item.props,R=A.activeDot,T=A.dataKey,L=Q(Q({index:C,dataKey:T,cx:N.x,cy:N.y,r:4,fill:wC(_.item),strokeWidth:2,stroke:"#fff",payload:N.payload,value:N.value},Le(R,!1)),fx(R));return $.push(y.renderActiveDot(R,L,"".concat(D,"-activePoint-").concat(C))),O?$.push(y.renderActiveDot(R,Q(Q({},L),{},{cx:O.x,cy:O.y}),"".concat(D,"-basePoint-").concat(C))):k&&$.push(null),$}),He(j,"renderGraphicChild",function(E,_,N){var O=j.filterFormatItem(E,_,N);if(!O)return null;var C=j.getTooltipEventType(),k=j.state,$=k.isTooltipActive,D=k.tooltipAxis,A=k.activeTooltipIndex,R=k.activeLabel,T=j.props.children,L=Ln(T,on),M=O.props,I=M.points,F=M.isRange,U=M.baseLine,V=O.item.type.defaultProps!==void 0?Q(Q({},O.item.type.defaultProps),O.item.props):O.item.props,G=V.activeDot,Z=V.hide,he=V.activeBar,ve=V.activeShape,re=!!(!Z&&$&&L&&(G||he||ve)),ge={};C!=="axis"&&L&&L.props.trigger==="click"?ge={onClick:_v(j.handleItemMouseEnter,E.props.onClick)}:C!=="axis"&&(ge={onMouseLeave:_v(j.handleItemMouseLeave,E.props.onMouseLeave),onMouseEnter:_v(j.handleItemMouseEnter,E.props.onMouseEnter)});var Y=b.cloneElement(E,Q(Q({},O.props),ge));function ee(K){return typeof D.dataKey=="function"?D.dataKey(K.payload):null}if(re)if(A>=0){var q,W;if(D.dataKey&&!D.allowDuplicatedCategory){var Fe=typeof D.dataKey=="function"?ee:"payload.".concat(D.dataKey.toString());q=dx(I,Fe,R),W=F&&U&&dx(U,Fe,R)}else q=I==null?void 0:I[A],W=F&&U&&U[A];if(ve||he){var Ae=E.props.activeIndex!==void 0?E.props.activeIndex:A;return[b.cloneElement(E,Q(Q(Q({},O.props),ge),{},{activeIndex:Ae})),null,null]}if(!Qe(q))return[Y].concat(df(j.renderActivePoints({item:O,activePoint:q,basePoint:W,childIndex:A,isRange:F})))}else{var Ue,nt=(Ue=j.getItemByXY(j.state.activeCoordinate))!==null&&Ue!==void 0?Ue:{graphicalItem:Y},We=nt.graphicalItem,_e=We.item,St=_e===void 0?E:_e,B=We.childIndex,H=Q(Q(Q({},O.props),ge),{},{activeIndex:B});return[b.cloneElement(St,H),null,null]}return F?[Y,null,null]:[Y,null]}),He(j,"renderCustomized",function(E,_,N){return b.cloneElement(E,Q(Q({key:"recharts-customized-".concat(N)},j.props),j.state))}),He(j,"renderMap",{CartesianGrid:{handler:Cv,once:!0},ReferenceArea:{handler:j.renderReferenceElement},ReferenceLine:{handler:Cv},ReferenceDot:{handler:j.renderReferenceElement},XAxis:{handler:Cv},YAxis:{handler:Cv},Brush:{handler:j.renderBrush,once:!0},Bar:{handler:j.renderGraphicChild},Line:{handler:j.renderGraphicChild},Area:{handler:j.renderGraphicChild},Radar:{handler:j.renderGraphicChild},RadialBar:{handler:j.renderGraphicChild},Scatter:{handler:j.renderGraphicChild},Pie:{handler:j.renderGraphicChild},Funnel:{handler:j.renderGraphicChild},Tooltip:{handler:j.renderCursor,once:!0},PolarGrid:{handler:j.renderPolarGrid,once:!0},PolarAngleAxis:{handler:j.renderPolarAxis},PolarRadiusAxis:{handler:j.renderPolarAxis},Customized:{handler:j.renderCustomized}}),j.clipPathId="".concat((w=x.id)!==null&&w!==void 0?w:Gc("recharts"),"-clip"),j.throttleTriggeredAfterMouseMove=NV(j.triggeredAfterMouseMove,(S=x.throttleDelay)!==null&&S!==void 0?S:1e3/60),j.state={},j}return vDe(y,v),hDe(y,[{key:"componentDidMount",value:function(){var w,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,S=w.children,j=w.data,E=w.height,_=w.layout,N=Ln(S,on);if(N){var O=N.props.defaultIndex;if(!(typeof O!="number"||O<0||O>this.state.tooltipTicks.length-1)){var C=this.state.tooltipTicks[O]&&this.state.tooltipTicks[O].value,k=VE(this.state,j,O,C),$=this.state.tooltipTicks[O].coordinate,D=(this.state.offset.top+E)/2,A=_==="horizontal",R=A?{x:$,y:D}:{y:$,x:D},T=this.state.formattedGraphicalItems.find(function(M){var I=M.item;return I.type.name==="Scatter"});T&&(R=Q(Q({},R),T.props.points[O].tooltipPosition),k=T.props.points[O].tooltipPayload);var L={activeTooltipIndex:O,isTooltipActive:!0,activeLabel:C,activePayload:k,activeCoordinate:R};this.setState(L),this.renderCursor(N),this.accessibilityManager.setIndex(O)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var j,E;this.accessibilityManager.setDetails({offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(w){g_([Ln(w.children,on)],[Ln(this.props.children,on)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=Ln(this.props.children,on);if(w&&typeof w.props.shared=="boolean"){var S=w.props.shared?"axis":"item";return o.indexOf(S)>=0?S:s}return s}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var S=this.container,j=S.getBoundingClientRect(),E=o_e(j),_={chartX:Math.round(w.pageX-E.left),chartY:Math.round(w.pageY-E.top)},N=j.width/S.offsetWidth||1,O=this.inRange(_.chartX,_.chartY,N);if(!O)return null;var C=this.state,k=C.xAxisMap,$=C.yAxisMap,D=this.getTooltipEventType(),A=QM(this.state,this.props.data,this.props.layout,O);if(D!=="axis"&&k&&$){var R=go(k).scale,T=go($).scale,L=R&&R.invert?R.invert(_.chartX):null,M=T&&T.invert?T.invert(_.chartY):null;return Q(Q({},_),{},{xValue:L,yValue:M},A)}return A?Q(Q({},_),A):null}},{key:"inRange",value:function(w,S){var j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,_=w/j,N=S/j;if(E==="horizontal"||E==="vertical"){var O=this.state.offset,C=_>=O.left&&_<=O.left+O.width&&N>=O.top&&N<=O.top+O.height;return C?{x:_,y:N}:null}var k=this.state,$=k.angleAxisMap,D=k.radiusAxisMap;if($&&D){var A=go($);return bI({x:_,y:N},A)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,S=this.getTooltipEventType(),j=Ln(w,on),E={};j&&S==="axis"&&(j.props.trigger==="click"?E={onClick:this.handleClick}:E={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var _=fx(this.props,this.handleOuterEvent);return Q(Q({},_),E)}},{key:"addListener",value:function(){oS.on(lS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){oS.removeListener(lS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,S,j){for(var E=this.state.formattedGraphicalItems,_=0,N=E.length;_<N;_++){var O=E[_];if(O.item===w||O.props.key===w.key||S===Na(O.item.type)&&j===O.childIndex)return O}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,S=this.state.offset,j=S.left,E=S.top,_=S.height,N=S.width;return P.createElement("defs",null,P.createElement("clipPath",{id:w},P.createElement("rect",{x:j,y:E,height:_,width:N})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(S,j){var E=GM(j,2),_=E[0],N=E[1];return Q(Q({},S),{},He({},_,N.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(S,j){var E=GM(j,2),_=E[0],N=E[1];return Q(Q({},S),{},He({},_,N.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(w){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(w){var S=this.state,j=S.formattedGraphicalItems,E=S.activeItem;if(j&&j.length)for(var _=0,N=j.length;_<N;_++){var O=j[_],C=O.props,k=O.item,$=k.type.defaultProps!==void 0?Q(Q({},k.type.defaultProps),k.props):k.props,D=Na(k.type);if(D==="Bar"){var A=(C.data||[]).find(function(M){return qTe(w,M)});if(A)return{graphicalItem:O,payload:A}}else if(D==="RadialBar"){var R=(C.data||[]).find(function(M){return bI(w,M)});if(R)return{graphicalItem:O,payload:R}}else if(aw(O,E)||ow(O,E)||Nm(O,E)){var T=$2e({graphicalItem:O,activeTooltipItem:E,itemData:$.data}),L=$.activeIndex===void 0?T:$.activeIndex;return{graphicalItem:Q(Q({},O),{},{childIndex:L}),payload:Nm(O,E)?$.data[T]:O.props.data[T]}}}return null}},{key:"render",value:function(){var w=this;if(!uR(this))return null;var S=this.props,j=S.children,E=S.className,_=S.width,N=S.height,O=S.style,C=S.compact,k=S.title,$=S.desc,D=YM(S,aDe),A=Le(D,!1);if(C)return P.createElement(AM,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},P.createElement(y_,Fu({},A,{width:_,height:N,title:k,desc:$}),this.renderClipPath(),fR(j,this.renderMap)));if(this.props.accessibilityLayer){var R,T;A.tabIndex=(R=this.props.tabIndex)!==null&&R!==void 0?R:0,A.role=(T=this.props.role)!==null&&T!==void 0?T:"application",A.onKeyDown=function(M){w.accessibilityManager.keyboardEvent(M)},A.onFocus=function(){w.accessibilityManager.focus()}}var L=this.parseEventsOfWrapper();return P.createElement(AM,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},P.createElement("div",Fu({className:Ze("recharts-wrapper",E),style:Q({position:"relative",curs
614or:"default",width:_,height:N},O)},L,{ref:function(I){w.container=I}}),P.createElement(y_,Fu({},A,{width:_,height:N,title:k,desc:$,style:jDe}),this.renderClipPath(),fR(j,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(b.Component);He(g,"displayName",r),He(g,"defaultProps",Q({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),He(g,"getDerivedStateFromProps",function(v,y){var x=v.dataKey,w=v.data,S=v.children,j=v.width,E=v.height,_=v.layout,N=v.stackOffset,O=v.margin,C=y.dataStartIndex,k=y.dataEndIndex;if(y.updateId===void 0){var $=ZM(v);return Q(Q(Q({},$),{},{updateId:0},p(Q(Q({props:v},$),{},{updateId:0}),y)),{},{prevDataKey:x,prevData:w,prevWidth:j,prevHeight:E,prevLayout:_,prevStackOffset:N,prevMargin:O,prevChildren:S})}if(x!==y.prevDataKey||w!==y.prevData||j!==y.prevWidth||E!==y.prevHeight||_!==y.prevLayout||N!==y.prevStackOffset||!Zu(O,y.prevMargin)){var D=ZM(v),A={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},R=Q(Q({},QM(y,w,_)),{},{updateId:y.updateId+1}),T=Q(Q(Q({},D),A),R);return Q(Q(Q({},T),p(Q({props:v},T),y)),{},{prevDataKey:x,prevData:w,prevWidth:j,prevHeight:E,prevLayout:_,prevStackOffset:N,prevMargin:O,prevChildren:S})}if(!g_(S,y.prevChildren)){var L,M,I,F,U=Ln(S,Jd),V=U&&(L=(M=U.props)===null||M===void 0?void 0:M.startIndex)!==null&&L!==void 0?L:C,G=U&&(I=(F=U.props)===null||F===void 0?void 0:F.endIndex)!==null&&I!==void 0?I:k,Z=V!==C||G!==k,he=!Qe(w),ve=he&&!Z?y.updateId:y.updateId+1;return Q(Q({updateId:ve},p(Q(Q({props:v},y),{},{updateId:ve,dataStartIndex:V,dataEndIndex:G}),y)),{},{prevChildren:S,dataStartIndex:V,dataEndIndex:G})}return null}),He(g,"renderActiveDot",function(v,y,x){var w;return b.isValidElement(v)?w=b.cloneElement(v,y):qe(v)?w=v(y):w=P.createElement(Og,y),P.createElement(ut,{className:"recharts-active-dot",key:x},w)});var m=b.forwardRef(function(y,x){return P.createElement(g,Fu({},y,{ref:x}))});return m.displayName=g.displayName,m},RDe=pw({chartName:"LineChart",GraphicalChild:Ag,axisComponents:[{axisType:"xAxis",AxisComp:Ba},{axisType:"yAxis",AxisComp:za}],formatAxisMap:jC}),tH=pw({chartName:"BarChart",GraphicalChild:gl,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ba},{axisType:"yAxis",AxisComp:za}],formatAxisMap:jC}),rH=pw({chartName:"PieChart",GraphicalChild:Zs,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:sw},{axisType:"radiusAxis",AxisComp:nw}],formatAxisMap:uCe,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),$De=pw({chartName:"AreaChart",GraphicalChild:vl,axisComponents:[{axisType:"xAxis",AxisComp:Ba},{axisType:"yAxis",AxisComp:za}],formatAxisMap:jC});function p0({title:e,data:t,type:r="line"}){return l.jsxs(ue,{children:[l.jsxs(ye,{className:"flex flex-row items-center justify-between gap-2 space-y-0 pb-4",children:[l.jsx("h3",{className:"text-sm font-medium",children:e}),l.jsx(Dp,{className:"h-4 w-4 text-muted-foreground"})]}),l.jsx(de,{children:l.jsx(nm,{width:"100%",height:200,children:r==="line"?l.jsxs(RDe,{data:t,children:[l.jsx(l0,{strokeDasharray:"3 3",className:"stroke-border"}),l.jsx(Ba,{dataKey:"name",className:"text-xs",tick:{fill:"hsl(var(--muted-foreground))"}}),l.jsx(za,{className:"text-xs",tick:{fill:"hsl(var(--muted-foreground))"}}),l.jsx(on,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"}}),l.jsx(Ag,{type:"monotone",dataKey:"value",stroke:"hsl(var(--chart-1))",strokeWidth:2,dot:{fill:"hsl(var(--chart-1))"}})]}):l.jsxs($De,{data:t,children:[l.jsx("defs",{children:l.jsxs("linearGradient",{id:"colorValue",x1:"0",y1:"0",x2:"0",y2:"1",children:[l.jsx("stop",{offset:"5%",stopColor:"hsl(var(--chart-1))",stopOpacity:.3}),l.jsx("stop",{offset:"95%",stopColor:"hsl(var(--chart-1))",stopOpacity:0})]})}),l.jsx(l0,{strokeDasharray:"3 3",className:"stroke-border"}),l.jsx(Ba,{dataKey:"name",className:"text-xs",tick:{fill:"hsl(var(--muted-foreground))"}}),l.jsx(za,{className:"text-xs",tick:{fill:"hsl(var(--muted-foreground))"}}),l.jsx(on,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"}}),l.jsx(vl,{type:"monotone",dataKey:"value",stroke:"hsl(var(--chart-1))",strokeWidth:2,fill:"url(#colorValue)"})]})})})]})}function IDe({open:e,onOpenChange:t,interaction:r}){const{toast:n}=kn(),i=vn(),[s,a]=b.useState(!1),[o,c]=b.useState(""),[u,d]=b.useState([]),[f,h]=b.useState("pending"),[p,g]=b.useState(""),m=fr({mutationFn:async A=>
614{if(r)return Ws("PATCH",`/api/interactions/${r.id}`,A)},onSuccess:()=>{i.invalidateQueries({queryKey:["/api/interactions"]}),n({title:"Updated successfully",description:"Interaction has been updated"}),a(!1)},onError:()=>{n({title:"Error",description:"Failed to update interaction",variant:"destructive"})}});if(!r)return null;const v=()=>{c(r.customerName),d(r.tags||[]),h(r.status),a(!0)},y=()=>{a(!1),g("")},x=()=>{m.mutate({customerName:o,tags:u,status:f})},w=()=>{p.trim()&&!u.includes(p.trim())&&(d([...u,p.trim()]),g(""))},S=A=>{d(u.filter(R=>R!==A))},j=()=>{switch(r.type){case"phone":return l.jsx(os,{className:"h-5 w-5"});case"sms":return l.jsx(Oi,{className:"h-5 w-5"});case"chat":return l.jsx(S5,{className:"h-5 w-5"});default:return l.jsx(Oi,{className:"h-5 w-5"})}},E=()=>{const A={phone:{label:"Phone Call",className:"bg-blue-500/10 text-blue-500 border-blue-500/20"},sms:{label:"SMS",className:"bg-green-500/10 text-green-500 border-green-500/20"},chat:{label:"Web Chat",className:"bg-purple-500/10 text-purple-500 border-purple-500/20"}},R=A[r.type]||A.chat;return l.jsxs(Ee,{variant:"outline",className:R.className,"data-testid":"badge-interaction-type",children:[j(),l.jsx("span",{className:"ml-1.5",children:R.label})]})},_=A=>{const R={issue:{label:"Issue",className:"bg-destructive/10 text-destructive border-destructive/20"},success:{label:"Success",className:"bg-green-500/10 text-green-500 border-green-500/20"},pending:{label:"Pending",className:"bg-muted text-muted-foreground"}},T=R[A]||R.pending;return l.jsx(Ee,{variant:"outline",className:T.className,"data-testid":"badge-interaction-status",children:T.label})},N=A=>{const R=Math.floor(A/60),T=A%60;return`${R}:${T.toString().padStart(2,"0")}`},O=r.chatLog,C=r.toolCalls,k=r.resources,$=s?u:r.tags||[],D=s?f:r.status;return l.jsx(Ai,{open:e,onOpenChange:t,children:l.jsxs(Jn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto w-[calc(100vw-2rem)] sm:w-full","data-testid":"dialog-interaction-details",children:[l.jsx(ei,{children:l.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(ti,{className:"text-lg sm:text-xl",children:"Interaction Details"}),l.jsxs("span",{className:"text-sm text-muted-foreground","data-testid":"text-interaction-id",children:["#",r.id]})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[E(),_(D),!s&&l.jsxs(ie,{size:"sm",variant:"outline",onClick:v,"data-testid":"button-edit-interaction",children:[l.jsx(Ree,{className:"h-4 w-4 sm:mr-2"}),l.jsx("span",{className:"hidden sm:inline",children:"Edit"})]})]})]})}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Customer"})}),l.jsx(de,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Of,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("div",{className:"flex-1",children:s?l.jsx(Je,{value:o,onChange:A=>c(A.target.value),className:"h-8","data-testid":"input-customer-name"}):l.jsxs("div",{children:[l.jsx("p",{className:"font-medium","data-testid":"text-customer-name",children:r.customerName}),l.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"text-customer-contact",children:r.customerContact})]})})]})})]}),l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Duration & Time"})}),l.jsx(de,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Hs,{className:"h-4 w-4 text-muted-foreground"}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium","data-testid":"text-duration",children:N(r.duration)}),l.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"text-timestamp",children:Qp(new Date(r.timestamp),{addSuffix:!0})})]})]})})]})]}),s&&l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Status"})}),l.jsx(de,{children:l.jsxs(Zt,{value:f,onValueChange:A=>h(A),children:[l.jsx(qt,{className:"w-full","data-testid":"select-status",children:l.jsx(Jt,{})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"pending",children:"Pending"}),l.jsx(te,{value:"success",children:"Success"}),l.jsx(te,{value:"issue",children:"Issue"})]})]})})]}),$.length>0&&l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Tags"})}),l.jsx(de,{children:l.jsx("div",{className:"flex flex-wrap gap-2","data-testid":"container-tags",children:$.map((A,R)=>l.jsxs(Ee,{variant:"secondary",className:"gap-1","data-testid":`tag-${R}`,children:[A,s&&l.jsx(us,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:()=>S(A),"data-testid":`button-remove-tag-${R}`})]},R))})})]}),s&&l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Add Tag"})}),l.jsx(de,{children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Je,{value:p,onChange:A=>g(A.target.value),placeholder:"Enter tag name",onKeyDown:A=>A.key==="Enter"&&w(),"data-testid":"input-new-tag"}),l.jsx(ie,{onClick:w,"data-testid":"button-add-tag",children:"Add"})]})})]}),r.routedTo&&l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Routing"})}),l.jsx(de,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(v5,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("span",{className:"text-sm",children:"Transferred to:"}),l.jsx(Ee,{variant:"secondary","data-testid":"badge-routed-to",children:r.routedTo})]})})]}),r.transcript&&l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Transcript"})}),l.jsx(de,{children:l.jsx("div",{className:"max-h-64 overflow-y-auto space-y-2","data-testid":"container-transcript",children:r.transcript.split(`
615`).map((A,R)=>{const T=A.toLowerCase().startsWith("customer:"),L=A.toLowerCase().startsWith("assistant:")||A.toLowerCase().startsWith("ai:");if(T||L){const[M,...I]=A.split(":"),F=I.join(":").trim();return l.jsx("div",{className:`flex ${T?"justify-start":"justify-end"}`,children:l.jsxs("div",{className:`rounded-lg px-3 py-2 max-w-[80%] ${T?"bg-muted":"bg-primary/10 border border-primary/20"}`,children:[l.jsx("p",{className:"text-xs font-semibold mb-1 text-muted-foreground",children:M.trim()}),l.jsx("p",{className:"text-sm",children:F})]})},R)}return A.trim()&&l.jsx("p",{className:"text-sm text-muted-foreground italic",children:A},R)})})})]}),O&&O.length>0&&l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Chat Log"})}),l.jsx(de,{children:l.jsx("div",{className:"max-h-64 overflow-y-auto space-y-3","data-testid":"container-chat-log",children:O.map((A,R)=>l.jsx("div",{className:`flex ${A.sender==="customer"?"justify-start":"justify-end"}`,"data-testid":`chat-message-${R}`,children:l.jsxs("div",{className:`rounded-lg px-3 py-2 max-w-[80%] ${A.sender==="customer"?"bg-muted":"bg-primary/10 border border-primary/20"}`,children:[l.jsx("p",{className:"text-xs font-semibold mb-1 text-muted-foreground capitalize",children:A.sender}),l.jsx("p",{className:"text-sm",children:A.message}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:A.timestamp})]})},R))})})]}),C&&C.length>0&&l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Tool Calls"})}),l.jsx(de,{children:l.jsx("div",{className:"space-y-2","data-testid":"container-tool-calls",children:C.map((A,R)=>l.jsxs("div",{className:"flex items-start gap-2 p-2 rounded-md bg-muted/50","data-testid":`tool-call-${R}`,children:[l.jsx(Ee,{variant:"outline",className:"mt-0.5",children:A.name}),l.jsx("p",{className:"text-sm text-muted-foreground flex-1",children:A.result})]},R))})})]}),k&&k.length>0&&l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Resources Used"})}),l.jsx(de,{children:l.jsx("div",{className:"flex flex-wrap gap-2","data-testid":"container-resources",children:k.map((A,R)=>l.jsxs(Ee,{variant:"secondary","data-testid":`resource-${R}`,children:[A.type,": ",A.name]},R))})})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[r.grade&&l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Grade"})}),l.jsx(de,{children:l.jsx("p",{className:"text-2xl font-bold","data-testid":"text-grade",children:r.grade})})]}),r.summary&&l.jsxs(ue,{className:r.grade?"":"sm:col-span-2",children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Summary"})}),l.jsx(de,{children:l.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"text-summary",children:r.summary})})]})]}),l.jsx(qO,{}),l.jsx("div",{className:"flex items-center justify-end gap-3",children:s?l.jsxs(l.Fragment,{children:[l.jsx(ie,{variant:"outline",onClick:y,disabled:m.isPending,"data-testid":"button-cancel-edit",children:"Cancel"}),l.jsxs(ie,{onClick:x,disabled:m.isPending,"data-testid":"button-save-edit",children:[l.jsx(Vy,{className:"h-4 w-4 mr-2"}),m.isPending?"Saving...":"Save Changes"]})]}):l.jsxs(l.Fragment,{children:[l.jsxs(ie,{variant:"outline",onClick:()=>m.mutate({status:"issue"}),disabled:m.isPending||r.status==="issue","data-testid":"button-mark-issue",children:[l.jsx(oc,{className:"h-4 w-4 mr-2"}),"Mark as Issue"]}),l.jsxs(ie,{variant:"outline",onClick:()=>m.mutate({status:"success"}),disabled:m.isPending||r.status==="success","data-testid":"button-mark-success",children:[l.jsx(NO,{className:"h-4 w-4 mr-2"}),"Mark as Success"]})]})})]})]})})}function MDe(){const[e,t]=b.useState(""),[r,n]=b.useState("all"),[i,s]=b.useState(null),[a,o]=b.useState(!1),{data:c=[]}=Ke({queryKey:["/api/interactions"]}),{data:u=[],isLoading:d}=Ke({queryKey:["/api/analytics/call-volume"],refetchInterval:6e4}),{data:f=[],isLoading:h}=Ke({queryKey:["/api/analytics/resolution-rate"],refetchInterval:6e4}),p=c.filter(x=>{const w=x.customerName.toLowerCase().includes(e.toLowerCase())||`#${x.id}`.toLowerCase().includes(e.toLowerCase()),S=r==="all"||x.type===r;return w&&S}),g=x=>{s(x),o(!0)},m=x=>{const w=Math.floor(x/60),S=x%60;return`${w}:${S.toString().padStart(2,"0")}`},v=x=>new Date(x).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}),y=x=>x.routedTo?"transferred":x.status==="success"?"resolved":"ongoing";return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"Call Analytics"}),l.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"View and analyze call history"})]}),l.jsxs(ie,{variant:"outline",size:"sm",className:"sm:size-default","data-testid":"button-export-calls",children:[l.jsx(Ef,{className:"h-4 w-4 mr-2"}),l.jsx("span",{className:"hidden sm:inline",children:"Export to CSV"}),l.jsx("span",{className:"sm:hidden",children:"Export"})]})]}),l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[d?l.jsx("div",{className:"h-[300px] border rounded-lg flex items-center justify-center",children:l.jsx("p",{className:"text-muted-foreground",children:"Loading c
615all volume data..."})}):l.jsx(p0,{title:"Call Volume (Last 7 Days) - Real VAPI Data",data:u,type:"area"}),h?l.jsx("div",{className:"h-[300px] border rounded-lg flex items-center justify-center",children:l.jsx("p",{className:"text-muted-foreground",children:"Loading resolution rate data..."})}):l.jsx(p0,{title:"Resolution Rate (%) - Real VAPI Data",data:f,type:"line"})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{className:"relative flex-1 max-w-md",children:[l.jsx(os,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx(Je,{placeholder:"Search by caller, call ID...",value:e,onChange:x=>t(x.target.value),className:"pl-9","data-testid":"input-search-calls"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(Zt,{value:r,onValueChange:n,children:[l.jsx(qt,{className:"w-[140px]","data-testid":"select-channel",children:l.jsx(Jt,{placeholder:"Channel"})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"all",children:"All Channels"}),l.jsx(te,{value:"phone",children:"Phone"}),l.jsx(te,{value:"chat",children:"Chat"}),l.jsx(te,{value:"sms",children:"SMS"})]})]}),l.jsxs(ie,{variant:"outline","data-testid":"button-advanced-filters",children:[l.jsx(Zm,{className:"h-4 w-4 mr-2"}),"More Filters"]})]})]}),l.jsx("div",{className:"hidden md:block border rounded-lg",children:l.jsxs(vg,{children:[l.jsx(yg,{children:l.jsxs(ns,{children:[l.jsx(or,{children:"Call ID"}),l.jsx(or,{children:"Caller"}),l.jsx(or,{children:"Duration"}),l.jsx(or,{children:"Channel"}),l.jsx(or,{children:"Outcome"}),l.jsx(or,{children:"Time"}),l.jsx(or,{children:"Actions"})]})}),l.jsx(xg,{children:p.map(x=>l.jsx(Wde,{callId:`#${x.id}`,caller:x.customerName,duration:m(x.duration),channel:x.type,outcome:y(x),timestamp:v(x.timestamp),onViewDetails:()=>g(x)},x.id))})]})}),l.jsx("div",{className:"md:hidden space-y-3",children:p.map(x=>{const w=y(x),j=x.type==="phone"?os:x.type==="sms"?Oi:S5;return l.jsx(ue,{className:"hover-elevate active-elevate-2",onClick:()=>g(x),children:l.jsxs(de,{className:"p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-start justify-between gap-2",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("span",{className:"text-sm font-medium text-muted-foreground",children:["#",x.id]}),l.jsxs(Ee,{variant:"outline",className:"text-xs",children:[l.jsx(j,{className:"h-3 w-3 mr-1"}),x.type]})]}),l.jsx("h3",{className:"font-semibold mt-1 truncate",children:x.customerName})]}),l.jsx(Ee,{variant:w==="resolved"?"default":w==="transferred"?"secondary":"outline",className:"shrink-0",children:w})]}),l.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(Hs,{className:"h-3 w-3"}),l.jsx("span",{children:m(x.duration)})]}),l.jsx("span",{children:v(x.timestamp)})]})]})},x.id)})})]}),l.jsx(IDe,{open:a,onOpenChange:o,interaction:i})]})}const eD={low:{color:"bg-muted text-muted-foreground",label:"Low"},medium:{color:"bg-chart-3/20 text-chart-3",label:"Medium"},high:{color:"bg-chart-3/40 text-chart-3",label:"High"},critical:{color:"bg-destructive/20 text-destructive",label:"Critical"}};function Pv({id:e,title:t,severity:r,reporter:n,assignee:i,createdAt:s,onClick:a}){return l.jsxs(ue,{className:"hover-elevate cursor-pointer",draggable:!0,onClick:a,"data-testid":`card-issue-${e}`,children:[l.jsx(ye,{className:"space-y-0 pb-3",children:l.jsxs("div",{className:"flex items-start justify-between gap-2",children:[l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(Ds,{className:"h-4 w-4 mt-0.5 text-muted-foreground"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-medium leading-tight",children:t}),l.jsxs("p",{className:"text-xs text-muted-foreground font-mono mt-1",children:["#",e]})]})]}),l.jsx(Ee,{className:se("shrink-0",eD[r].color),children:eD[r].label})]})}),l.jsxs(de,{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(Hs,{className:"h-3 w-3"}),l.jsx("span",{children:s})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(Of,{className:"h-3 w-3"}),l.jsx("span",{children:n})]})]}),i&&l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(jc,{className:"h-6 w-6",children:l.jsx(_c,{className:"text-xs",children:i.split(" ").map(o=>o[0]).join("")})}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Assigned to ",i]})]})]})]})}const tD={low:{color:"bg-muted text-muted-foreground",label:"Low"},medium:{color:"bg-chart-3/20 text-chart-3",label:"Medium"},high:{color:"bg-chart-3/40 text-chart-3",label:"High"},critical:{color:"bg-destructive/20 text-destructive",label:"Critical"}},DDe={"wrong-answer":"Wrong Answer","transfer-failed":"Transfer Failed",technical:"Technical","missing-knowledge":"Missing Knowledge",other:"Other"};function LDe({open:e,onOpenChange:t,issue:r}){const{toast:n}=kn(),i=vn(),[s,a]=b.useState(null),o=fr({mutationFn:async u=>
615{if(r)return Ws("PATCH",`/api/issues/${r.id}`,{status:u})},onSuccess:()=>{i.invalidateQueries({queryKey:["/api/issues"]}),n({title:"Status updated",description:"Issue status has been updated successfully"}),a(null)},onError:()=>{n({title:"Error",description:"Failed to update issue status",variant:"destructive"}),a(null)}});if(!r)return null;const c=u=>{a(u),o.mutate(u)};return l.jsx(Ai,{open:e,onOpenChange:t,children:l.jsxs(Jn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto w-[calc(100vw-2rem)] sm:w-full","data-testid":"dialog-issue-details",children:[l.jsx(ei,{children:l.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(Ds,{className:"h-5 w-5 mt-1 text-muted-foreground shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx(ti,{className:"text-lg sm:text-xl leading-tight",children:r.title}),l.jsxs("p",{className:"text-sm text-muted-foreground font-mono mt-1","data-testid":"text-issue-id",children:["#",r.id]})]})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx(Ee,{className:se("shrink-0",tD[r.severity].color),children:tD[r.severity].label}),l.jsx(Ee,{variant:"outline",children:DDe[r.type]})]})]})}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Reporter"})}),l.jsx(de,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Of,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("p",{className:"font-medium","data-testid":"text-reporter",children:r.reporter})]})})]}),l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Created"})}),l.jsx(de,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Hs,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("p",{className:"font-medium","data-testid":"text-created-at",children:r.createdAt})]})})]})]}),r.description&&l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Description"})}),l.jsx(de,{children:l.jsx("p",{className:"text-sm whitespace-pre-wrap","data-testid":"text-description",children:r.description})})]}),r.details&&l.jsxs(l.Fragment,{children:[r.type==="transfer-failed"&&r.details.destination&&l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Transfer Details"})}),l.jsxs(de,{className:"space-y-3",children:[l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Destination"}),l.jsx("p",{className:"text-sm font-medium",children:r.details.destination})]}),r.details.duration!==void 0&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Duration"}),l.jsxs("p",{className:"text-sm font-medium",children:[r.details.duration,"s"]})]})]}),r.details.transcript&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Transcript Snippet"}),l.jsx("p",{className:"text-sm p-2 bg-muted rounded-md whitespace-pre-wrap",children:r.details.transcript})]})]})]}),r.type==="wrong-answer"&&r.details.originalQuery&&l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Search Details"})}),l.jsxs(de,{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Original Query"}),l.jsx("p",{className:"text-sm font-medium",children:r.details.originalQuery})]}),r.details.reformulatedQuery&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Reformulated Query"}),l.jsx("p",{className:"text-sm",children:r.details.reformulatedQuery})]}),l.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:[r.details.topScore!==void 0&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Top Score"}),l.jsx("p",{className:"text-sm font-medium",children:r.details.topScore.toFixed(2)})]}),r.details.resultCount!==void 0&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Results"}),l.jsx("p",{className:"text-sm font-medium",children:r.details.resultCount})]}),r.details.category&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Category"}),l.jsx("p",{className:"text-sm font-medium",children:r.details.category})]})]})]})]}),r.details.messageSent&&l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Conversation Details"})}),l.jsxs(de,{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Message Sent"}),l.jsx("p",{className:"text-sm p-2 bg-muted rounded-md whitespace-pre-wrap",children:r.details.messageSent})]}),r.details.messageReceived&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Message Received"}),l.jsx("p",{className:"text-sm p-2 bg-muted rounded-md whitespace-pre-wrap",children:r.details.messageReceived})]}),r.details.expectedResponse&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Expected Response"}),l.jsx("p",{className:"text-sm p-2 bg-muted rounded-md whitespace-pre-wrap",children:r.details.expectedResponse})]})]})]})]}),r.interactionId&&l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Related Interaction"})}),l.jsx(de,{children:l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Interaction ID: ",l.jsxs("span",{className:"font-mono font-medium text-foreground",children:["#",r.interactionId]})]})})]}),l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-3",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Update Status"})}),l.jsxs(de,{children:[l.jsxs(Zt,{value:s||r.status,onValueChange:c,disabled:o.isPending,children:[l.jsx(qt,{className:"w-full","data-testid":"select-status",children:l.jsx(Jt,{})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"new",children:"New"}),l.jsx(te,{value:"in-progress",children:"In Progress"}),l.jsx(te,{value:"resolved",children:"Resolved"}),l.jsx(te,{value:"closed",children:"Closed"})]})]}),l.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["Current status: ",l.jsx("span",{className:"font-medium",children:r.status})]})]})]}),l.jsx(qO,{}),l.jsxs("div",{className:"flex items-center justify-end gap-3",children:[l.jsxs(ie,{variant:"outline",onClick:()=>c("resolved"),disabled:o.isPending||r.status==="resolved","data-testid":"button-mark-resolved",children:[l.jsx(NO,{className:"h-4 w-4 mr-2"}),"Mark as Resolved"]}),l.jsxs(ie,{variant:"outline",onClick:()=>c("closed"),disabled:o.isPending||r.status==="closed","data-testid":"button-mark-closed",children:[l.jsx(w5,{className:"h-4 w-4 mr-2"}),"Close Issue"]})]})]})]})})}function FDe(){const[e,t]=b.useState(""),[r,n]=b.useState(null),[i,s]=b.useState(!1),{data:a=[],isLoading:o}=Ke({queryKey:["/api/issues"],refetchInterval:3e4}),c=async v=>{if(!v)return;const y=a.find(x=>x.id===v);y&&(n(y),s(!0))},u=a.filter(v=>v.status==="new"),d=a.filter(v=>v.status==="in-progress"),f=a.filter(v=>v.status==="resolved"),h=a.filter(v=>
615v.status==="closed"),p=v=>e?v.filter(y=>y.title.toLowerCase().includes(e.toLowerCase())||y.type.toLowerCase().includes(e.toLowerCase())||y.reporter.toLowerCase().includes(e.toLowerCase())):v,g=vn(),m=v=>{g.invalidateQueries({queryKey:["/api/issues"]})};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"Issue Tracker"}),l.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"Track and manage system issues"})]}),l.jsx(Q6,{onIssueCreated:m})]}),l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[l.jsx(Je,{placeholder:"Search issues...",value:e,onChange:v=>t(v.target.value),className:"max-w-md","data-testid":"input-search-issues"}),l.jsxs(ie,{variant:"outline","data-testid":"button-filter-issues",children:[l.jsx(Zm,{className:"h-4 w-4 mr-2"}),"Filters"]})]}),o?l.jsx("div",{className:"flex items-center justify-center h-64",children:l.jsx("p",{className:"text-muted-foreground",children:"Loading issues..."})}):l.jsxs(ul,{defaultValue:"new",className:"space-y-6",children:[l.jsxs(Ha,{children:[l.jsxs(yt,{value:"new","data-testid":"tab-new",children:["New (",p(u).length,")"]}),l.jsxs(yt,{value:"in-progress","data-testid":"tab-in-progress",children:["In Progress (",p(d).length,")"]}),l.jsxs(yt,{value:"resolved","data-testid":"tab-resolved",children:["Resolved (",p(f).length,")"]}),l.jsxs(yt,{value:"closed","data-testid":"tab-closed",children:["Closed (",p(h).length,")"]})]}),l.jsx(xt,{value:"new",children:p(u).length===0?l.jsx("div",{className:"flex items-center justify-center h-64 border-2 border-dashed rounded-lg",children:l.jsxs("div",{className:"text-center",children:[l.jsx("p",{className:"text-muted-foreground",children:"No new issues detected"}),l.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Issues are automatically detected from VAPI analytics when transfers fail, searches return poor results, or knowledge gaps are identified."})]})}):l.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:p(u).map(v=>l.jsx(Pv,{...v,onClick:()=>c(v.id)},v.id))})}),l.jsx(xt,{value:"in-progress",children:p(d).length===0?l.jsx("div",{className:"flex items-center justify-center h-64 border-2 border-dashed rounded-lg",children:l.jsx("p",{className:"text-muted-foreground",children:"No issues in progress"})}):l.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:p(d).map(v=>l.jsx(Pv,{...v,onClick:()=>c(v.id)},v.id))})}),l.jsx(xt,{value:"resolved",children:p(f).length===0?l.jsx("div",{className:"flex items-center justify-center h-64 border-2 border-dashed rounded-lg",children:l.jsx("p",{className:"text-muted-foreground",children:"No resolved issues"})}):l.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:p(f).map(v=>l.jsx(Pv,{...v,onClick:()=>c(v.id)},v.id))})}),l.jsx(xt,{value:"closed",children:p(h).length===0?l.jsx("div",{className:"flex items-center justify-center h-64 border-2 border-dashed rounded-lg",children:l.jsx("p",{className:"text-muted-foreground",children:"No closed issues"})}):l.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:p(h).map(v=>l.jsx(Pv,{...v,onClick:()=>c(v.id)},v.id))})})]}),l.jsx(LDe,{open:i,onOpenChange:s,issue:r})]})}function BDe(e,t){return b.useReducer((r,n)=>t[r][n]??r,e)}var RC="ScrollArea",[nH]=Zr(RC),[zDe,Ri]=nH(RC),iH=b.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:i,scrollHideDelay:s=600,...a}=e,[o,c]=b.useState(null),[u,d]=b.useState(null),[f,h]=b.useState(null),[p,g]=b.useState(null),[m,v]=b.useState(null),[y,x]=b.useState(0),[w,S]=b.useState(0),[j,E]=b.useState(!1),[_,N]=b.useState(!1),O=Ye(t,k=>c(k)),C=If(i);return l.jsx(zDe,{scope:r,type:n,dir:C,scrollHideDelay:s,scrollArea:o,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:p,onScrollbarXChange:g,scrollbarXEnabled:j,onScrollbarXEnabledChange:E,scrollbarY:m,onScrollbarYChange:v,scrollbarYEnabled:_,onScrollbarYEnabledChange:N,onCornerWidthChange:x,onCornerHeight
vendor: 8,847 bytes, line 615
615Change:S,children:l.jsx(ke.div,{dir:C,...a,ref:O,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});iH.displayName=RC;var sH="ScrollAreaViewport",aH=b.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:i,...s}=e,a=Ri(sH,r),o=b.useRef(null),c=Ye(t,o,a.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),l.jsx(ke.div,{"data-radix-scroll-area-viewport":"",...s,ref:c,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});aH.displayName=sH;var Js="ScrollAreaScrollbar",$C=b.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=Ri(Js,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=i,o=e.orientation==="horizontal";return b.useEffect(()=>(o?s(!0):a(!0),()=>{o?s(!1):a(!1)}),[o,s,a]),i.type==="hover"?l.jsx(UDe,{...n,ref:t,forceMount:r}):i.type==="scroll"?l.jsx(VDe,{...n,ref:t,forceMount:r}):i.type==="auto"?l.jsx(oH,{...n,ref:t,forceMount:r}):i.type==="always"?l.jsx(IC,{...n,ref:t}):null});$C.displayName=Js;var UDe=b.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=Ri(Js,e.__scopeScrollArea),[s,a]=b.useState(!1);return b.useEffect(()=>{const o=i.scrollArea;let c=0;if(o){const u=()=>{window.clearTimeout(c),a(!0)},d=()=>{c=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",u),o.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),o.removeEventListener("pointerenter",u),o.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),l.jsx(yn,{present:r||s,children:l.jsx(oH,{"data-state":s?"visible":"hidden",...n,ref:t})})}),VDe=b.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=Ri(Js,e.__scopeScrollArea),s=e.orientation==="horizontal",a=gw(()=>c("SCROLL_END"),100),[o,c]=BDe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return b.useEffect(()=>{if(o==="idle"){const u=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[o,i.scrollHideDelay,c]),b.useEffect(()=>{const u=i.viewport,d=s?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const p=u[d];f!==p&&(c("SCROLL"),a()),f=p};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[i.viewport,s,c,a]),l.jsx(yn,{present:r||o!=="hidden",children:l.jsx(IC,{"data-state":o==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:fe(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:fe(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),oH=b.forwardRef((e,t)=>{const r=Ri(Js,e.__scopeScrollArea),{forceMount:n,...i}=e,[s,a]=b.useState(!1),o=e.orientation==="horizontal",c=gw(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;a(o?u:d)}},10);return ff(r.viewport,c),ff(r.content,c),l.jsx(yn,{present:n||s,children:l.jsx(IC,{"data-state":s?"visible":"hidden",...i,ref:t})})}),IC=b.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,i=Ri(Js,e.__scopeScrollArea),s=b.useRef(null),a=b.useRef(0),[o,c]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=fH(o.viewport,o.content),d={...n,sizes:o,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>s.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function f(h,p){return YDe(h,a.current,o,p)}return r==="horizontal"?l.jsx(WDe,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&s.current){const h=i.viewport.scrollLeft,p=rD(h,o,i.dir);s.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=f(h,i.dir))}}):r==="vertical"?l.jsx(HDe,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&s.current){const h=i.viewport.scrollTop,p=rD(h,o);s.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=f(h))}}):null}),WDe=b.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,s=Ri(Js,e.__scopeScrollArea),[a,o]=b.useState(),c=b.useRef(null),u=Ye(t,c,s.onScrollbarXChange);return b.useEffect(()=>{c.current&&o(getComputedStyle(c.current))},[c]),l.jsx(cH,{"data-orientation":"horizontal",...i,ref:u,sizes:r,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":mw(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),pH(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&s.viewport&&a&&n({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:g0(a.paddingLeft),paddingEnd:g0(a.paddingRight)}})}})}),HDe=b.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,s=Ri(Js,e.__scopeScrollArea),[a,o]=b.useState(),c=b.useRef(null),u=Ye(t,c,s.onScrollbarYChange);return b.useEffect(()=>{c.current&&o(getComputedStyle(c.current))},[c]),l.jsx(cH,{"data-orientation":"vertical",...i,ref:u,sizes:r,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":mw(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),pH(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&s.viewport&&a&&n({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:g0(a.paddingTop),paddingEnd:g0(a.paddingBottom)}})}})}),[qDe,lH]=nH(Js),cH=b.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:i,onThumbChange:s,onThumbPointerUp:a,onThumbPointerDown:o,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,p=Ri(Js,r),[g,m]=b.useState(null),v=Ye(t,O=>m(O)),y=b.useRef(null),x=b.useRef(""),w=p.viewport,S=n.content-n.viewport,j=lr(d),E=lr(c),_=gw(f,10);function N(O){if(y.current){const C=O.clientX-y.current.left,k=O.clientY-y.current.top;u({x:C,y:k})}}return b.useEffect(()=>{const O=C=>{const k=C.target;(g==null?void 0:g.contains(k))&&j(C,S)};return document.addEventListener("wheel",O,{passive:!1}),()=>document.removeEventListener("wheel",O,{passive:!1})},[w,g,S,j]),b.useEffect(E,[n,E]),ff(g,_),ff(p.content,_),l.jsx(qDe,{scope:r,scrollbar:g,hasThumb:i,onThumbChange:lr(s),onThumbPointerUp:lr(a),onThumbPositionChange:E,onThumbPointerDown:lr(o),children:l.jsx(ke.div,{...h,ref:v,style:{position:"absolute",...h.style},onPointerDown:fe(e.onPointerDown,O=>{O.button===0&&(O.target.setPointerCapture(O.pointerId),y.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),N(O))}),onPointerMove:fe(e.onPointerMove,N),onPointerUp:fe(e.onPointerUp,O=>{const C=O.target;C.hasPointerCapture(O.pointerId)&&C.releasePointerCapture(O.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),y.current=null})})})}),m0="ScrollAreaThumb",uH=b.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=lH(m0,e.__scopeScrollArea);return l.jsx(yn,{present:r||i.hasThumb,children:l.jsx(KDe,{ref:t,...n})})}),KDe=b.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...i}=e,s=Ri(m0,r),a=lH(m0,r),{onThumbPositionChange:o}=a,c=Ye(t,f=>a.onThumbChange(f)),u=b.useRef(void 0),d=gw(()=>{u.current&&(u.current(),u.current=void 0)},100);return b.useEffect(()=>{const f=s.viewport;if(f){const h=()=>{if(d(),!u.current){const p=XDe(f,o);u.current=p,o()}};return o(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[s.viewport,d,o]),l.jsx(ke.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:fe(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),g=f.clientX-p.left,m=f.clientY-p.top;a.onThumbPointerDown({x:g,y:m})}),onPointerUp:fe(e.onPointerUp,a.onThumbPointerUp)})});uH.displayName=m0;var MC="ScrollAreaCorner",dH=b.forwardRef((e,t)=>
615{const r=Ri(MC,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?l.jsx(GDe,{...e,ref:t}):null});dH.displayName=MC;var GDe=b.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,i=Ri(MC,r),[s,a]=b.useState(0),[o,c]=b.useState(0),u=!!(s&&o);return ff(i.scrollbarX,()=>{var f;const d=((f=i.scrollbarX)==null?void 0:f.offsetHeight)||0;i.onCornerHeightChange(d),c(d)}),ff(i.scrollbarY,()=>{var f;const d=((f=i.scrollbarY)==null?void 0:f.offsetWidth)||0;i.onCornerWidthChange(d),a(d)}),u?l.jsx(ke.div,{...n,ref:t,style:{width:s,height:o,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function g0(e){return e?parseInt(e,10):0}function fH(e,t){const r=e/t;return isNaN(r)?0:r}function mw(e){const t=fH(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function YDe(e,t,r,n="ltr"){const i=mw(r),s=i/2,a=t||s,o=i-a,c=r.scrollbar.paddingStart+a,u=r.scrollbar.size-r.scrollbar.paddingEnd-o,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return hH([c,u],f)(e)}function rD(e,t,r="ltr"){const n=mw(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-i,a=t.content-t.viewport,o=s-n,c=r==="ltr"?[0,a]:[a*-1,0],u=Xp(e,c);return hH([0,a],[0,o])(u)}function hH(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function pH(e,t){return e>0&&e<t}var XDe=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function i(){const s={left:e.scrollLeft,top:e.scrollTop},a=r.left!==s.left,o=r.top!==s.top;(a||o)&&t(),r=s,n=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(n)};function gw(e,t){const r=lr(e),n=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(n.current),[]),b.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ff(e,t){const r=lr(t);hr(()=>{let n=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return i.observe(e),()=>{window.cancelAnimationFrame(n),i.unobserve(e)}}},[e,r])}var mH=iH,QDe=aH,ZDe=dH;const tl=b.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(mH,{ref:n,className:se("relative overflow-hidden",e),...r,children:[l.jsx(QDe,{className:"h-full w-full rounded-[inherit]",children:t}),l.jsx(gH,{}),l.jsx(ZDe,{})]}));tl.displayName=mH.displayName;const gH=b.forwardRef(({className:e,orientation:t="vertical",...r},n)=>l.jsx($C,{ref:n,orientation:t,className:se("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:l.jsx(uH,{className:"relative flex-1 rounded-full bg-border"})}));gH.displayName=$C.displayName;function JDe(){const[e,t]=b.useState(""),[r,n]=b.useState(!1),i=b.useRef(null),{toast:s}=kn(),{user:a,session:o}=ol(),c=vn(),{data:u=[],isLoading:d}=Ke({queryKey:["/api/chat-messages"],enabled:!!(o!=null&&o.access_token),refetchInterval:5e3}),f=fr({mutationFn:async y=>(await Ws("POST","/api/chat-messages",y)).json(),onSuccess:()=>{c.invalidateQueries({queryKey:["/api/chat-messages"]}),t(""),n(!1),s({title:"Message sent",description:"Your message has been posted to the chatboard"})},onError:()=>{s({title:"Error",description:"Failed to send message",variant:"destructive"})}});b.useEffect(()=>{i.current&&i.current.scrollIntoView({behavior:"smooth"})},[u]);const h=()=>{if(!e.trim()){s({title:"Cannot send empty message",description:"Please enter a message",variant:"destructive"});return}f.mutate({message_body:e,is_urgent:r})},p=y=>{y.key==="Enter"&&!y.shiftKey&&(y.preventDefault(),h())},g=y=>{const x=new Date(y);return Math.abs(new Date().getTime()-x.getTime())/(1e3*60*60)<24?x.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):x.toLocaleDateString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},m=y=>{var x,w;return y.sender_id===(a==null?void 0:a.id)?"You":((x=y.sender)==null?void 0:x.full_name)||((w=y.sender)==null?void 0:w.email)||"Team Member"},v=y=>{const x=m(y);return x==="You"?"Y":x.split(" ").map(w=>w[0]).join("").toUpperCase().substring(0,2)};return l.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx(Oi,{className:"h-6 w-6"}),l.jsx("h1",{className:"text-3xl font-bold",children:"Team Chatboard"}),l.jsxs(Ee,{variant:"secondary",className:"ml-2",children:[u.length," messages"]})]}),l.jsx("p",{className:"text-muted-foreground",children:"Open communication board for team ideas, issues, and announcements"})]}),l.jsxs(ue,{className:"flex-1 flex flex-col overflow-hidden",children:[l.jsx(tl,{className:"flex-1 p-4",children:l.jsxs("div",{className:"space-y-3",children:[d?l.jsx("div",{className:"text-center py-8",children:l.jsx("p",{className:"text-muted-foreground",children:"Loading messages..."})}):u.length===0?l.jsxs("div",{className:"text-center py-8",children:[l.jsx(Oi,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),l.jsx("p",{className:"text-muted-foreground",children:"No messages yet. Start the conversation!"})]}):u.map(y=>l.jsxs("div",{className:`flex gap-3 p-3 rounded-lg transition-colors ${y.sender_id===(a==null?void 0:a.id)?"bg-primary/5 ml-8":"bg-muted/30"}`,"data-testid":`message-${y.id}`,children:[l.jsx(jc,{className:"h-8 w-8 mt-0.5 shrink-0",children:l.jsx(_c,{className:"text-xs",children:v(y)})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx("span",{className:"font-medium text-sm",children:m(y)}),l.jsx("span",{className:"text-xs text-muted-foreground",children:g(y.created_at)}),y.is_urgent&&l.jsxs(Ee,{variant:"destructive",className:"text-xs",children:[l.jsx(Ds,{className:"h-3 w-3 mr-1"}),"Urgent"]})]}),l.jsx("p",{className:"text-sm whitespace-pre-wrap break-words",children:y.message_body})]})]},y.id)),l.jsx("div",{ref:i})]})}),l.jsxs("div",{className:"border-t p-4",children:[l.jsxs("div",{className:"flex gap-2",children:[l.jsx("div",{className:"flex-1",children:l.jsx(un,{value:e,onCh
615ange:y=>t(y.target.value),onKeyDown:p,placeholder:"Type your message... (Press Enter to send, Shift+Enter for new line)",className:"min-h-[60px] resize-none",rows:2})}),l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx(ie,{onClick:h,disabled:f.isPending||!e.trim(),size:"sm",className:"shrink-0",children:l.jsx(_5,{className:"h-4 w-4"})}),l.jsx(ie,{variant:r?"destructive":"outline",size:"sm",onClick:()=>n(!r),className:"shrink-0",title:r?"Remove urgent flag":"Mark as urgent",children:l.jsx(Ds,{className:"h-4 w-4"})})]})]}),r&&l.jsxs("p",{className:"text-xs text-destructive mt-2 flex items-center gap-1",children:[l.jsx(Ds,{className:"h-3 w-3"}),"This message will be marked as urgent"]})]})]})]})}function eLe(){const[e,t]=b.useState(""),[r,n]=b.useState("all"),{data:i=[],isLoading:s,refetch:a,isFetching:o}=Ke({queryKey:["/api/transcripts"],refetchInterval:1e4,refetchOnMount:!0,refetchOnWindowFocus:!0}),c=i.filter(p=>{const g=p.caller.toLowerCase().includes(e.toLowerCase())||p.id.toLowerCase().includes(e.toLowerCase()),m=r==="all"||p.channel===r;return g&&m}),[u,d]=b.useState(null);b.useEffect(()=>{c.length>0&&!u?d(c[0]):i.length>0&&!u&&d(i[0])},[c,i,u]);const f=p=>new Date(p).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}),h=p=>new Date(p).toLocaleDateString("en-US",{month:"short",day:"numeric"});return s?l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"Transcripts"}),l.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"Search and review conversation transcripts"})]})}),l.jsx("div",{className:"flex items-center justify-center h-64",children:l.jsx("p",{className:"text-muted-foreground",children:"Loading transcripts..."})})]}):l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"Transcripts"}),l.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"Search and review conversation transcripts"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(ie,{variant:"outline",size:"sm",className:"sm:size-default",onClick:()=>a(),disabled:o,"data-testid":"button-refresh-transcripts",children:[l.jsx(sc,{className:`h-4 w-4 mr-2 ${o?"animate-spin":""}`}),"Refresh"]}),l.jsxs(ie,{variant:"outline",size:"sm",className:"sm:size-default","data-testid":"button-export-transcript",children:[l.jsx(Ef,{className:"h-4 w-4 mr-2"}),"Export"]})]})]}),l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{className:"relative flex-1 max-w-md",children:[l.jsx(eg,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx(Je,{placeholder:"Search transcripts...",value:e,onChange:p=>t(p.target.value),className:"pl-9","data-testid":"input-search-transcripts"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(Zt,{value:r,onValueChange:n,children:[l.jsx(qt,{className:"w-[140px]","data-testid":"select-channel-filter",children:l.jsx(Jt,{placeholder:"Channel"})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"all",children:"All Channels"}),l.jsx(te,{value:"phone",children:"Phone"}),l.jsx(te,{value:"chat",children:"Chat"}),l.jsx(te,{value:"sms",children:"SMS"})]})]}),l.jsxs(ie,{variant:"outline","data-testid":"button-advanced-filters",children:[l.jsx(Zm,{className:"h-4 w-4 mr-2"}),"Filters"]})]})]}),l.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[l.jsxs(ue,{className:"lg:col-span-1",children:[l.jsx(ye,{children:l.jsx("h2",{className:"font-semibold",children:"Recent Transcripts"})}),l.jsx(de,{className:"p-0",children:l.jsx(tl,{className:"h-[600px]",children:l.jsx("div",{className:"space-y-2 p-6 pt-0",children:c.length>0?c.map(p=>l.jsxs("div",{className:`rounded-md border p-3 cursor-pointer hover-elevate ${(u==null?void 0:u.id)===p.id?"border-primary":""}`,onClick:()=>d(p),"data-testid":`transcript-${p.id}`,children:[l.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-sm",children:p.caller}),l.jsx("p",{className:"text-xs text-muted-foreground font-mono",children:p.id})]}),l.jsxs("div",{className:"text-xs text-muted-foreground text-right",children:[l.jsx("div",{children:f(p.timestamp)}),l.jsx("div",{children:h(p.timestamp)})]})]}),l.jsx(Ee,{variant:"secondary",className:"text-xs",children:p.channel})]}
615,p.id)):l.jsx("div",{className:"flex items-center justify-center h-[500px] text-muted-foreground text-center",children:l.jsxs("div",{children:[l.jsx("p",{className:"mb-2",children:"No transcripts found"}),l.jsx("p",{className:"text-xs",children:"Transcripts will appear here from SMS conversations, chat interactions, and VAPI voice calls"})]})})})})})]}),l.jsx(ue,{className:"lg:col-span-2",children:u?l.jsxs(l.Fragment,{children:[l.jsxs(ye,{className:"flex flex-row items-center justify-between gap-2 space-y-0",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"font-semibold",children:u.caller}),l.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:u.id})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Ee,{variant:"secondary",children:u.channel}),l.jsx(Ee,{variant:u.sentiment==="positive"?"default":u.sentiment==="negative"?"destructive":"outline",children:u.sentiment})]})]}),l.jsx(de,{children:l.jsx(tl,{className:"h-[550px]",children:l.jsx("div",{className:"space-y-3 p-4 bg-muted/30 rounded-lg min-h-[500px]",children:u.messages.map((p,g)=>l.jsx("div",{className:`flex ${p.speaker==="customer"?"justify-start":p.speaker==="system"?"justify-center":"justify-end"}`,"data-testid":`message-${g}`,children:l.jsxs("div",{className:`max-w-[75%] rounded-2xl px-4 py-2 shadow-sm ${p.speaker==="customer"?"bg-white dark:bg-zinc-800 border border-border rounded-bl-md":p.speaker==="system"?"bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-200 text-xs px-3 py-1 rounded-full":"bg-primary text-primary-foreground rounded-br-md"}`,children:[p.speaker!=="system"&&l.jsx("div",{className:"flex items-center gap-2 mb-1",children:l.jsx("span",{className:`text-xs font-semibold ${p.speaker==="customer"?"text-muted-foreground":"text-primary-foreground/80"}`,children:p.speaker==="customer"?"User":"Paige"})}),l.jsx("p",{className:`${p.speaker==="system"?"text-xs":"text-sm"} whitespace-pre-wrap`,children:p.text})]})},g))})})})]}):l.jsx(de,{className:"flex items-center justify-center h-[600px]",children:l.jsxs("div",{className:"text-center text-muted-foreground",children:[l.jsx("p",{className:"mb-2",children:"Select a transcript to view"}),l.jsx("p",{className:"text-xs",children:"Choose from SMS conversations, chat interactions, or voice call transcripts"})]})})})]})]})}const tLe={available:{color:"bg-chart-2",label:"Available"},busy:{color:"bg-destructive",label:"Busy"},away:{color:"bg-chart-3",label:"Away"}};function rLe({name:e,title:t,department:r,email:n,phone:i,location:s,status:a,skills:o=[],onEdit:c}){return l.jsxs(ue,{className:"hover-elevate cursor-pointer",onClick:c,children:[l.jsx(ye,{className:"space-y-0 pb-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsxs("div",{className:"relative",children:[l.jsx(jc,{className:"h-12 w-12",children:l.jsx(_c,{className:"text-base",children:e.split(" ").map(u=>u[0]).join("")})}),l.jsx("span",{className:`absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full border-2 border-card ${tLe[a].color}`})]}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("h3",{className:"font-medium truncate","data-testid":"text-staff-name",children:e}),l.jsx("p",{className:"text-sm text-muted-foreground truncate",children:t}),l.jsx(Ee,{variant:"secondary",className:"mt-1",children:r})]})]})}),l.jsxs(de,{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(OO,{className:"h-3.5 w-3.5"}),l.jsx("span",{className:"truncate",children:n})]}),l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(os,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:i})]}),l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(Pee,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:s})]}),o&&o.length>0&&l.jsx("div",{className:"pt-2",children:l.jsxs("div",{className:"flex flex-wrap gap-1",children:[o.slice(0,3).map(u=>l.jsx(Ee,{variant:"outline",className:"text-xs",children:u},u)),o.length>3&&l.jsxs(Ee,{variant:"outline",className:"text-xs",children:["+",o.length-3," more"]})]})})]})]})}var vH="AlertDialog",[nLe]=Zr(vH,[NB]),Ya=NB(),yH=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ya(t);return l.jsx(UB,{...n,...r,modal:!0})};yH.displayName=vH;var iLe="AlertDialogTrigger",sLe=b.forwardRef((e,t)=>
615{const{__scopeAlertDialog:r,...n}=e,i=Ya(r);return l.jsx(VB,{...i,...n,ref:t})});sLe.displayName=iLe;var aLe="AlertDialogPortal",xH=e=>{const{__scopeAlertDialog:t,...r}=e,n=Ya(t);return l.jsx(ZO,{...n,...r})};xH.displayName=aLe;var oLe="AlertDialogOverlay",bH=b.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Ya(r);return l.jsx(rg,{...i,...n,ref:t})});bH.displayName=oLe;var td="AlertDialogContent",[lLe,cLe]=nLe(td),uLe=HF("AlertDialogContent"),wH=b.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...i}=e,s=Ya(r),a=b.useRef(null),o=Ye(t,a),c=b.useRef(null);return l.jsx(oie,{contentName:td,titleName:SH,docsSlug:"alert-dialog",children:l.jsx(lLe,{scope:r,cancelRef:c,children:l.jsxs(ng,{role:"alertdialog",...s,...i,ref:o,onOpenAutoFocus:fe(i.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(uLe,{children:n}),l.jsx(fLe,{contentRef:a})]})})})});wH.displayName=td;var SH="AlertDialogTitle",jH=b.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Ya(r);return l.jsx(ig,{...i,...n,ref:t})});jH.displayName=SH;var _H="AlertDialogDescription",EH=b.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Ya(r);return l.jsx(sg,{...i,...n,ref:t})});EH.displayName=_H;var dLe="AlertDialogAction",NH=b.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Ya(r);return l.jsx(sb,{...i,...n,ref:t})});NH.displayName=dLe;var OH="AlertDialogCancel",AH=b.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:i}=cLe(OH,r),s=Ya(r),a=Ye(t,i);return l.jsx(sb,{...s,...n,ref:a})});AH.displayName=OH;var fLe=({contentRef:e})=>{const t=`\`${td}\` requires a description for the component to be accessible for screen reader users.
616
617You can add a description to the \`${td}\` by passing a \`${_H}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
618
619Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${td}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
620
621For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return b.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},hLe=yH,pLe=xH,CH=bH,PH=wH,TH=NH,kH=AH,RH=jH,$H=EH;const mLe=hLe,gLe=pLe,IH=b.forwardRef(({className:e,...t},r)=>l.jsx(CH,{className:se("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",e),...t,ref:r}));IH.displayName=CH.displayName;const MH=b.forwardRef(({className:e,...t},r)=>l.jsxs(gLe,{children:[l.jsx(IH,{}),l.jsx(PH,{ref:r,className:se("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:rounded-lg",e),...t})]}));MH.displayName=PH.displayName;const DH=({className:e,...t})=>l.jsx("div",{className:se("flex flex-col space-y-2 text-center sm:text-left",e),...t});DH.displayName="AlertDialogHeader";const LH=({className:e,...t})=>l.jsx("div",{className:se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});LH.displayName="AlertDialogFooter";const FH=b.forwardRef(({className:e,...t},r)=>l.jsx(RH,{ref:r,className:se("text-lg font-semibold",e),...t}));FH.displayName=RH.displayName;const BH=b.forwardRef(({className:e,...t},r)=>l.jsx($H,{ref:r,className:se("text-sm text-muted-foreground",e),...t}));BH.displayName=$H.displayName;const zH=b.forwardRef(({className:e,...t},r)=>l.jsx(TH,{ref:r,className:se(HO(),e),...t}));zH.displayName=TH.displayName;const UH=b.forwardRef(({className:e,...t},r)=>l.jsx(kH,{ref:r,className:se(HO({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));UH.displayName=kH.displayName;const vLe=["Customer Success","Engineering","Content Team","Sales","Quality Assurance","Marketing","Operations","Human Resources"],yLe=[{value:"available",label:"Available"},{value:"busy",label:"Busy"},{value:"away",label:"Away"}];function xLe({open:e,onOpenChange:t,staffMember:r,isCreating:n=!1}){var _,N;const[i,s]=b.useState({name:"",title:"",department:"",email:"",ph
621one:"",location:"",status:"available",bio:"",hire_date:"",skills:[],languages:[],timezone:"UTC"}),[a,o]=b.useState(""),[c,u]=b.useState(""),[d,f]=b.useState(!1),h=vn();b.useEffect(()=>{e&&s(r&&!n?{...r,skills:r.skills||[],languages:r.languages||[],hire_date:r.hire_date||"",bio:r.bio||"",timezone:r.timezone||"UTC"}:{name:"",title:"",department:"",email:"",phone:"",location:"",status:"available",bio:"",hire_date:"",skills:[],languages:[],timezone:"UTC"})},[e,r,n]);const p=fr({mutationFn:async O=>{const C=await fetch("/api/staff",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)});if(!C.ok){const k=await C.json();throw new Error(k.error||"Failed to create staff member")}return C.json()},onSuccess:()=>{h.invalidateQueries({queryKey:["/api/staff"]}),t(!1)}}),g=fr({mutationFn:async O=>{const C=await fetch(`/api/staff/${r==null?void 0:r.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)});if(!C.ok){const k=await C.json();throw new Error(k.error||"Failed to update staff member")}return C.json()},onSuccess:()=>{h.invalidateQueries({queryKey:["/api/staff"]}),t(!1)}}),m=fr({mutationFn:async()=>{const O=await fetch(`/api/staff/${r==null?void 0:r.id}`,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!O.ok){const C=await O.json();throw new Error(C.error||"Failed to delete staff member")}return O.json()},onSuccess:()=>{h.invalidateQueries({queryKey:["/api/staff"]}),f(!1),t(!1)}}),v=O=>{O.preventDefault(),n?p.mutate(i):g.mutate(i)},y=()=>{var O;a.trim()&&!((O=i.skills)!=null&&O.includes(a.trim()))&&(s(C=>({...C,skills:[...C.skills||[],a.trim()]})),o(""))},x=O=>{s(C=>{var k;return{...C,skills:((k=C.skills)==null?void 0:k.filter($=>$!==O))||[]}})},w=()=>{var O;c.trim()&&!((O=i.languages)!=null&&O.includes(c.trim()))&&(s(C=>({...C,languages:[...C.languages||[],c.trim()]})),u(""))},S=O=>{s(C=>{var k;return{...C,languages:((k=C.languages)==null?void 0:k.filter($=>$!==O))||[]}})},j=p.isPending||g.isPending||m.isPending,E=p.error||g.error||m.error;return l.jsxs(Ai,{open:e,onOpenChange:t,children:[l.jsxs(Jn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[l.jsxs(ei,{children:[l.jsx(ti,{children:n?"Add New Staff Member":"Edit Staff Member"}),l.jsx(el,{children:n?"Add a new team member to the staff directory":"Update staff member information and details"})]}),l.jsxs("form",{onSubmit:v,className:"space-y-6",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"name",children:"Full Name *"}),l.jsx(Je,{id:"name",value:i.name,onChange:O=>s(C=>({...C,name:O.target.value})),placeholder:"John Doe",required:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"email",children:"Email Address *"}),l.jsx(Je,{id:"email",type:"email",value:i.email,onChange:O=>s(C=>({...C,email:O.target.value})),placeholder:"[email protected]",required:!0})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"title",children:"Job Title *"}),l.jsx(Je,{id:"title",value:i.title,onChange:O=>s(C=>({...C,title:O.target.value})),placeholder:"Senior Engineer",required:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"department",children:"Department *"}),l.jsxs(Zt,{value:i.department,onValueChange:O=>s(C=>({...C,department:O})),children:[l.jsx(qt,{children:l.jsx(Jt,{placeholder:"Select department"})}),l.jsx(Kt,{children:vLe.map(O=>l.jsx(te,{value:O,children:O},O))})]})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"phone",children:"Phone Number"}),l.jsx(Je,{id:"phone",value:i.phone,onChange:O=>s(C=>({...C,phone:O.target.value})),placeholder:"+1 (555) 123-4567"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"location",children:"Location"}),l.jsx(Je,{id:"location",value:i.location,onChange:O=>s(C=>({...C,location:O.target.value})),placeholder:"Building A, Floor 2"})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"status",children:"Status"}),l.jsxs(Zt,{value:i.status,onValueChange:O=>s(C=>({...C,status:O})),children:[l.jsx(qt,{children:l.jsx(Jt,{})}),l.jsx(Kt,{children:yLe.map(O=>l.jsx(te,{value:O.value,children:O.label},O.value))})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"hire_date",children:"Hire Date"}),l.jsx(Je,{id:"hire_date",type:"date",value:i.hire_date,onChange:O=>s(C=>({...C,hire_date:O.target.value}))})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"bio",children:"Bio"}),l.jsx(un,{id:"bio",value:i.bio,onChange:O=>s(C=>({...C,bio:O.target.value})),placeholder:"Brief description of role and expertise...",rows:3})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{children:"Skills"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Je,{value:a,onChange:O=>o(O.target.value),placeholder:"Add a skill...",onKeyDown:O=>O.key==="Enter"&&(O.preventDefault(),y())}),l.jsx(ie,{type:"button",onClick:y,size:"sm",children:l.jsx(Gu,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:(_=i.skills)==null?void 0:_.map(O=>l.jsxs(Ee,{variant:"secondary",className:"gap-1",children:[O,l.jsx(us,{className:"h-3 w-3 cursor-pointer",onClick:()=>x(O)})]},O))})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{children:"Languages"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Je,{value:c,onChange:O=>u(O.target.value),placeholder:"Add a language...",onKeyDown:O=>O.key==="Enter"&&(O.preventDefault(),w())}),l.jsx(ie,{type:"button",onClick:w,size:"sm",children:l.jsx(Gu,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:(N=i.languages)==null?void 0:N.map(O=>l.jsxs(Ee,{variant:"outline",className:"gap-1",children:[O,l.jsx(us,{className:"h-3 w-3 cursor-pointer",onClick:()=>S(O)})]},O))})]}),E&&l.jsx("div",{className:"text-sm text-destructive",children:E.message}),l.jsxs(l6,{className:"flex justify-between",children:[l.jsx("div",{children:!n&&(r==null?void 0:r.id)&&l.jsxs(ie,{type:"button",variant:"destructive",onClick:()=>f(!0),disabled:j,className:"mr-auto",children:[l.jsx(E5,{className:"h-4 w-4 mr-2"}),"Delete Staff Member"]})}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(ie,{type:"button",variant:"outline",onClick:()=>t(!1),disabled:j,children:"Cancel"}),l.jsx(ie,{type:"submit",disabled:j,children:j?"Saving...":n?"Add Staff Member":"Save Changes"})]})]})]})]}),l.jsx(mLe,{open:d,onOpenChange:f,children:l.jsxs(MH,{children:[l.jsxs(DH,{children:[l.jsx(FH,{children:"Delete Staff Member"}),l.jsxs(BH,{children:["Are you sure you want to delete ",l.jsx("strong",{children:r==null?void 0:r.name})," from the staff directory? This action cannot be undone and will permanently remove all their information."]})]}
621),l.jsxs(LH,{children:[l.jsx(UH,{disabled:m.isPending,children:"Cancel"}),l.jsx(zH,{onClick:()=>m.mutate(),disabled:m.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:m.isPending?"Deleting...":"Delete Staff Member"})]})]})})]})}function bLe(){const[e,t]=b.useState(""),[r,n]=b.useState("all"),[i,s]=b.useState(!1),[a,o]=b.useState(null),[c,u]=b.useState(!1),{data:d=[],isLoading:f,error:h}=Ke({queryKey:["/api/staff"],refetchInterval:3e4}),p=d.filter(v=>{const y=v.name.toLowerCase().includes(e.toLowerCase())||v.department.toLowerCase().includes(e.toLowerCase())||v.title.toLowerCase().includes(e.toLowerCase())||v.email.toLowerCase().includes(e.toLowerCase()),x=r==="all"||v.department.toLowerCase().replace(/\s+/g,"-")===r;return y&&x}),g=v=>{o(v),u(!1),s(!0)},m=()=>{o(null),u(!0),s(!0)};return h?l.jsx("div",{className:"space-y-6",children:l.jsx("div",{className:"flex items-center justify-center h-64",children:l.jsx("p",{className:"text-muted-foreground",children:"Failed to load staff directory"})})}):l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-3xl font-bold",children:"Staff Directory"}),l.jsxs("p",{className:"text-muted-foreground",children:["View and manage staff information (",d.length," members)"]})]}),l.jsxs(ie,{onClick:m,"data-testid":"button-add-staff",children:[l.jsx(lc,{className:"h-4 w-4 mr-2"}),"Add Staff Member"]})]}),l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{className:"relative flex-1 max-w-md",children:[l.jsx(lc,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx(Je,{placeholder:"Search by name, department, or role...",value:e,onChange:v=>t(v.target.value),className:"pl-9","data-testid":"input-search-staff"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(Zt,{value:r,onValueChange:n,children:[l.jsx(qt,{className:"w-[180px]","data-testid":"select-department",children:l.jsx(Jt,{placeholder:"Department"})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"all",children:"All Departments"}),l.jsx(te,{value:"customer-success",children:"Customer Success"}),l.jsx(te,{value:"engineering",children:"Engineering"}),l.jsx(te,{value:"content-team",children:"Content Team"}),l.jsx(te,{value:"sales",children:"Sales"}),l.jsx(te,{value:"quality-assurance",children:"Quality Assurance"}),l.jsx(te,{value:"marketing",children:"Marketing"}),l.jsx(te,{value:"operations",children:"Operations"}),l.jsx(te,{value:"human-resources",children:"Human Resources"})]})]}),l.jsxs(ie,{variant:"outline","data-testid":"button-more-filters",children:[l.jsx(Zm,{className:"h-4 w-4 mr-2"}),"More Filters"]})]})]}),f?l.jsx("div",{className:"flex items-center justify-center h-64",children:l.jsx("p",{className:"text-muted-foreground",children:"Loading staff directory..."})}):l.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:p.length>0?p.map(v=>l.jsx(rLe,{...v,onEdit:()=>g(v)},v.id)):l.jsx("div",{className:"col-span-full flex items-center justify-center h-64 border-2 border-dashed rounded-lg",children:l.jsxs("div",{className:"text-center",children:[l.jsx("p",{className:"text-muted-foreground mb-2",children:d.length===0?"No staff members found":"No staff members match your search"}),d.length===0&&l.jsxs(ie,{onClick:m,children:[l.jsx(lc,{className:"h-4 w-4 mr-2"}),"Add First Staff Member"]})]})})}),l.jsx(xLe,{open:i,onOpenChange:s,staffMember:a,isCreating:c})]})}function ko({title:e,value:t,change:r,changeType:n="neutral",icon:i}){return l.jsxs(ue,{children:[l.jsxs(ye,{className:"flex flex-row items-center justify-between gap-2 space-y-0 pb-2",children:[l.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:e}),l.jsx(i,{className:"h-4 w-4 text-muted-foreground"})]}),l.jsxs(de,{children:[l.jsx("div",{className:"text-3xl font-bold","data-testid":`metric-${e.toLowerCase().replace(/\s+/g,"-")}`,children:t}),r&&l.jsx("p",{className:se("text-xs mt-1",n==="positive"&&"text-chart-2",n==="negative"&&"text-destructive",n==="neutral"&&"text-muted-foreground"),children:r})]})]})}function wLe(){var f,h,p,g;const{session:e}=ol(),{data:t}=Ke({queryKey:["analytics"],queryFn:async()=>{const m=await fetch("/api/admin/analytics",{headers:{Authorization:`Bearer ${e==null?void 0:e.access_token}`}});if(!m.ok)throw new Error("Failed to fetch analytics");return m.json()},enabled:!!(e!=null&&e.access_token)}),{data:r=[]}=Ke({queryKey:["callVolume"],queryFn:async()=>{const m=await fetch("/api/analytics/call-volume",{headers:{Authorization:`Bearer ${e==null?void 0:e.access_token}`}});if(!m.ok)throw new Error("Failed to fetch call volume");return m.json()},enabled:!!(e!=null&&e.access_token)}),{data:n=[]}=Ke({queryKey:["resolutionRate"],queryFn:async()=>{const m=await fetch("/api/analytics/resolution-rate",{headers:{Authorization:`Bearer ${e==null?void 0:e.access_token}`}});if(!m.ok)throw new Error("Failed to fetch resolution rate");return m.json()},enabled:!!(e!=null&&e.access_token)}),i=((f=t==null?void 0:t.call_stats)==null?void 0:f.total_calls)||0,s=Math.round((1-(((h=t==null?void 0:t.call_stats)==null?void 0:h.transfer_rate)||0))*100),a=((p=t==null?void 0:t.call_stats)==null?void 0:p.avg_duration)||0,o=`${Math.floor(a/60)}:${(a%60).toString().padStart(2,"0")}`,c=Math.round((((g=t==null?void 0:t.call_stats)==null?void 0:g.transfer_rate)||0)*100),{data:u=[]}=Ke({queryKey:["/api/interactions"],enabled:!!(e!=null&&e.access_token)}),d=u.reduce((m,v)=>{const y=m.find(x=>x.name===v.type);return y?y.value+=1:m.push({name:v.type,value:1}),m},[]);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"Analytics & Reports"}),l.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"View performance metrics and generate reports"})]}),l.jsxs("div",{className:"flex gap-2 flex-wrap",children:[l.jsxs(Zt,{defaultValue:"7days",children:[l.jsx(qt,{className:"w-[150px]","data-testid":"select-date-range",children:l.jsx(Jt,{})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"7days",children:"Last 7 Days"}),l.jsx(te,{value:"30days",children:"Last 30 Days"}),l.jsx(te,{value:"90days",children:"Last 90 Days"}),l.jsx(te,{value:"custom",children:"Custom Range"})]})]}),l.jsxs(ie,{variant:"outline","data-testid":"button-export-report",children:[l.jsx(Ef,{className:"h-4 w-4 mr-2"}),"Export Report"]})]})]}),l.jsxs(ul,{defaultValue:"overview",className:"space-y-6",children:[l.jsxs(Ha,{children:[l.jsx(yt,{value:"overview","data-testid":"tab-overview",children:"Overview"}),l.jsx(yt,{value:"performance","data-testid":"tab-performance",children:"Performance"}),l.jsx(yt,{value:"custom","data-testid":"tab-custom",children:"Custom Reports"})]}),l.jsxs(xt,{value:"overview",className:"space-y-6",children:[l.jsxs("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-4",children:[l.jsx(ko,{title:"Total Calls",value:i.toLocaleStr
621ing(),change:"Real-time data",changeType:"neutral",icon:Dp}),l.jsx(ko,{title:"Avg Resolution Rate",value:`${s}%`,change:"Auto-resolved calls",changeType:"positive",icon:ac}),l.jsx(ko,{title:"Avg Handle Time",value:o,change:"Per conversation",changeType:"neutral",icon:Vc}),l.jsx(ko,{title:"Transfer Rate",value:`${c}%`,change:"Escalated to human",changeType:c<20?"positive":"negative",icon:Dp})]}),l.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[l.jsx(p0,{title:"Call Volume Trend",data:r,type:"area"}),l.jsx(p0,{title:"Resolution Rate Trend",data:n,type:"line"})]}),l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsx("h3",{className:"font-semibold",children:"Channel Distribution"})}),l.jsx(de,{children:l.jsx("div",{className:"space-y-4",children:d.map(m=>{const v=d.reduce((x,w)=>x+w.value,0),y=v>0?Math.round(m.value/v*100):0;return l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx("span",{className:"text-sm font-medium w-20 capitalize",children:m.name}),l.jsx("div",{className:"flex-1 bg-muted rounded-full h-2 overflow-hidden",children:l.jsx("div",{className:"bg-primary h-full",style:{width:`${y}%`}})}),l.jsxs("span",{className:"text-sm text-muted-foreground w-16 text-right",children:[m.value," (",y,"%)"]})]},m.name)})})})]})]}),l.jsx(xt,{value:"performance",className:"space-y-6",children:l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsx("h3",{className:"font-semibold",children:"Performance Metrics"})}),l.jsx(de,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-md",children:[l.jsxs("div",{children:[l.jsx("p",{className:"font-medium",children:"AI Success Rate"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Resolved without transfer"})]}),l.jsxs("span",{className:"text-2xl font-bold text-chart-2",children:[s,"%"]})]}),l.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-md",children:[l.jsxs("div",{children:[l.jsx("p",{className:"font-medium",children:"Total Interactions"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"All conversation records"})]}),l.jsx("span",{className:"text-2xl font-bold text-chart-1",children:u.length})]}),l.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-md",children:[l.jsxs("div",{children:[l.jsx("p",{className:"font-medium",children:"Avg Handle Time"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Per conversation"})]}),l.jsx("span",{className:"text-2xl font-bold",children:o})]})]})})]})}),l.jsx(xt,{value:"custom",className:"space-y-6",children:l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsx("h3",{className:"font-semibold",children:"Custom Report Builder"})}),l.jsxs(de,{className:"space-y-4",children:[l.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Report Type"}),l.jsxs(Zt,{children:[l.jsx(qt,{"data-testid":"select-report-type",children:l.jsx(Jt,{placeholder:"Select report type"})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"daily",children:"Daily Summary"}),l.jsx(te,{value:"weekly",children:"Weekly Report"}),l.jsx(te,{value:"monthly",children:"Monthly Analysis"}),l.jsx(te,{value:"custom",children:"Custom"})]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Export Format"}),l.jsxs(Zt,{children:[l.jsx(qt,{"data-testid":"select-export-format",children:l.jsx(Jt,{placeholder:"Select format"})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"pdf",children:"PDF"}),l.jsx(te,{value:"csv",children:"CSV"}),l.jsx(te,{value:"excel",children:"Excel"}),l.jsx(te,{value:"json",children:"JSON"})]})]})]})]}),l.jsxs("div",{className:"flex gap-2 pt-4",children:[l.jsx(ie,{className:"flex-1","data-testid":"button-generate-report",children:"Generate Report"}),l.jsx(ie,{variant:"outline",className:"flex-1","data-testid":"button-schedule-report",children:"Schedule Report"})]})]})]})})]})]})}var vw="Switch",[SLe]=Zr(vw),[jLe,_Le]=SLe(vw),VH=b.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:s,required:a,disabled:o,value:c="on",onCheckedChange:u,form:d,...f}=e,[h,p]=b.useState(null),g=Ye(t,w=>p(w)),m=b.useRef(!1),v=h?d||!!h.closest("form"):!0,[y,x]=Ra({prop:i,defaultProp:s??!1,onChange:u,caller:vw});return l.jsxs(jLe,{scope:r,checked:y,disabled:o,children:[l.jsx(ke.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":KH(y),"data-disabled":o?"":void 0,disabled:o,value:c,...f,ref:g,onClick:fe(e.onClick,w=>{x(S=>!S),v&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),v&&l.jsx(qH,{control:h,bubbles:!m.current,name:n,value:c,checked:y,required:a,disabled:o,form:d,style:{transform:"translateX(-100%)"}})]})});VH.displayName=vw;var WH="SwitchThumb",HH=b.forwardRef((e,t)=>
621{const{__scopeSwitch:r,...n}=e,i=_Le(WH,r);return l.jsx(ke.span,{"data-state":KH(i.checked),"data-disabled":i.disabled?"":void 0,...n,ref:t})});HH.displayName=WH;var ELe="SwitchBubbleInput",qH=b.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...i},s)=>{const a=b.useRef(null),o=Ye(a,s),c=jA(r),u=LO(t);return b.useEffect(()=>{const d=a.current;if(!d)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(c!==r&&p){const g=new Event("click",{bubbles:n});p.call(d,r),d.dispatchEvent(g)}},[c,r,n]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:o,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});qH.displayName=ELe;function KH(e){return e?"checked":"unchecked"}var GH=VH,NLe=HH;const Uh=b.forwardRef(({className:e,...t},r)=>l.jsx(GH,{className:se("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r,children:l.jsx(NLe,{className:se("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Uh.displayName=GH.displayName;var YH=["PageUp","PageDown"],XH=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],QH={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Xf="Slider",[WE,OLe,ALe]=Ym(Xf),[ZH]=Zr(Xf,[ALe]),[CLe,yw]=ZH(Xf),JH=b.forwardRef((e,t)=>{const{name:r,min:n=0,max:i=100,step:s=1,orientation:a="horizontal",disabled:o=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[n],value:d,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:p=!1,form:g,...m}=e,v=b.useRef(new Set),y=b.useRef(0),w=a==="horizontal"?PLe:TLe,[S=[],j]=Ra({prop:d,defaultProp:u,onChange:k=>{var D;(D=[...v.current][y.current])==null||D.focus(),f(k)}}),E=b.useRef(S);function _(k){const $=MLe(S,k);C(k,$)}function N(k){C(k,y.current)}function O(){const k=E.current[y.current];S[y.current]!==k&&h(S)}function C(k,$,{commit:D}={commit:!1}){const A=BLe(s),R=zLe(Math.round((k-n)/s)*s+n,A),T=Xp(R,[n,i]);j((L=[])=>{const M=$Le(L,T,$);if(FLe(M,c*s)){y.current=M.indexOf(T);const I=String(M)!==String(L);return I&&D&&h(M),I?M:L}else return L})}return l.jsx(CLe,{scope:e.__scopeSlider,name:r,disabled:o,min:n,max:i,valueIndexToChangeRef:y,thumbs:v.current,values:S,orientation:a,form:g,children:l.jsx(WE.Provider,{scope:e.__scopeSlider,children:l.jsx(WE.Slot,{scope:e.__scopeSlider,children:l.jsx(w,{"aria-disabled":o,"data-disabled":o?"":void 0,...m,ref:t,onPointerDown:fe(m.onPointerDown,()=>{o||(E.current=S)}),min:n,max:i,inverted:p,onSlideStart:o?void 0:_,onSlideMove:o?void 0:N,onSlideEnd:o?void 0:O,onHomeKeyDown:()=>!o&&C(n,0,{commit:!0}),onEndKeyDown:()=>!o&&C(i,S.length-1,{commit:!0}),onStepKeyDown:({event:k,direction:$})=>{if(!o){const R=YH.includes(k.key)||k.shiftKey&&XH.includes(k.key)?10:1,T=y.current,L=S[T],M=s*R*$;C(L+M,T,{commit:!0})}}})})})})});JH.displayName=Xf;var[e7,t7]=ZH(Xf,{startEdge:"left",endEdge:"right",size:"width",direction:1}),PLe=b.forwardRef((e,t)=>{const{min:r,max:n,dir:i,inverted:s,onSlideStart:a,onSlideMove:o,onSlideEnd:c,onStepKeyDown:u,...d}=e,[f,h]=b.useState(null),p=Ye(t,w=>h(w)),g=b.useRef(void 0),m=If(i),v=m==="ltr",y=v&&!s||!v&&s;function x(w){const S=g.current||f.getBoundingClientRect(),j=[0,S.width],_=DC(j,y?[r,n]:[n,r]);return g.current=S,_(w-S.left)}return l.jsx(e7,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:l.jsx(r7,{dir:m,"data-orientation":"horizontal",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=x(w.clientX);a==null||a(S)},onSlideMove:w=>{const S=x(w.clientX);o==null||o(S)},onSlideEnd:()=>{g.current=void 0,c==null||c()},onStepKeyDown:w=>{const j=QH[y?"from-left":"from-right"].includes(w.key);u==null||u({event:w,direction:j?-1:1})}})})}),TLe=b.forwardRef((e,t)=>
621{const{min:r,max:n,inverted:i,onSlideStart:s,onSlideMove:a,onSlideEnd:o,onStepKeyDown:c,...u}=e,d=b.useRef(null),f=Ye(t,d),h=b.useRef(void 0),p=!i;function g(m){const v=h.current||d.current.getBoundingClientRect(),y=[0,v.height],w=DC(y,p?[n,r]:[r,n]);return h.current=v,w(m-v.top)}return l.jsx(e7,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:l.jsx(r7,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const v=g(m.clientY);s==null||s(v)},onSlideMove:m=>{const v=g(m.clientY);a==null||a(v)},onSlideEnd:()=>{h.current=void 0,o==null||o()},onStepKeyDown:m=>{const y=QH[p?"from-bottom":"from-top"].includes(m.key);c==null||c({event:m,direction:y?-1:1})}})})}),r7=b.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:i,onSlideEnd:s,onHomeKeyDown:a,onEndKeyDown:o,onStepKeyDown:c,...u}=e,d=yw(Xf,r);return l.jsx(ke.span,{...u,ref:t,onKeyDown:fe(e.onKeyDown,f=>{f.key==="Home"?(a(f),f.preventDefault()):f.key==="End"?(o(f),f.preventDefault()):YH.concat(XH).includes(f.key)&&(c(f),f.preventDefault())}),onPointerDown:fe(e.onPointerDown,f=>{const h=f.target;h.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(h)?h.focus():n(f)}),onPointerMove:fe(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&i(f)}),onPointerUp:fe(e.onPointerUp,f=>{const h=f.target;h.hasPointerCapture(f.pointerId)&&(h.releasePointerCapture(f.pointerId),s(f))})})}),n7="SliderTrack",i7=b.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,i=yw(n7,r);return l.jsx(ke.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...n,ref:t})});i7.displayName=n7;var HE="SliderRange",s7=b.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,i=yw(HE,r),s=t7(HE,r),a=b.useRef(null),o=Ye(t,a),c=i.values.length,u=i.values.map(h=>l7(h,i.min,i.max)),d=c>1?Math.min(...u):0,f=100-Math.max(...u);return l.jsx(ke.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...n,ref:o,style:{...e.style,[s.startEdge]:d+"%",[s.endEdge]:f+"%"}})});s7.displayName=HE;var qE="SliderThumb",a7=b.forwardRef((e,t)=>{const r=OLe(e.__scopeSlider),[n,i]=b.useState(null),s=Ye(t,o=>i(o)),a=b.useMemo(()=>n?r().findIndex(o=>o.ref.current===n):-1,[r,n]);return l.jsx(kLe,{...e,ref:s,index:a})}),kLe=b.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:i,...s}=e,a=yw(qE,r),o=t7(qE,r),[c,u]=b.useState(null),d=Ye(t,x=>u(x)),f=c?a.form||!!c.closest("form"):!0,h=LO(c),p=a.values[n],g=p===void 0?0:l7(p,a.min,a.max),m=ILe(n,a.values.length),v=h==null?void 0:h[o.size],y=v?DLe(v,g,o.direction):0;return b.useEffect(()=>{if(c)return a.thumbs.add(c),()=>{a.thumbs.delete(c)}},[c,a.thumbs]),l.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[o.startEdge]:`calc(${g}% + ${y}px)`},children:[l.jsx(WE.ItemSlot,{scope:e.__scopeSlider,children:l.jsx(ke.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":a.min,"aria-valuenow":p,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...s,ref:d,style:p===void 0?{display:"none"}:e.style,onFocus:fe(e.onFocus,()=>{a.valueIndexToChangeRef.current=n})})}),f&&l.jsx(o7,{name:i??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:p},n)]})});a7.displayName=qE;var RLe="RadioBubbleInput",o7=b.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const i=b.useRef(null),s=Ye(i,n),a=jA(t);return b.useEffect(()=>{const o=i.current;if(!o)return;const c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&d){const f=new Event("input",{bubbles:!0});d.call(o,t),o.dispatchEvent(f)}},[a,t]),l.jsx(ke.input,{style:{display:"none"},...r,ref:s,defaultValue:t})});o7.displayName=RLe;function $Le(e=[],t,r){const n=[...e];return n[r]=t,n.sort((i,s)=>i-s)}function l7(e,t,r){const s=100/(r-t)*(e-t);return Xp(s,[0,100])}function ILe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function MLe(e,t){if(e.length===1)return 0;const r=e.map(i=>Math.abs(i-t)),n=Math.min(...r);return r.indexOf(n)}function DLe(e,t,r){const n=e/2,s=DC([0,50],[0,n]);return(n-s(t)*r)*r}function LLe(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function FLe(e,t){if(t>0){const r=LLe(e);return Math.min(...r)>=t}return!0}function DC(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function BLe(e){return(String(e).split(".")[1]||"").length}function zLe(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var c7=JH,ULe=i7,VLe=s7,WLe=a7;const KE=b.forwardRef(({className:e,...t},r)=>l.jsxs(c7,{ref:r,className:se("relative flex w-full touch-none select-none items-center",e),...t,children:[l.jsx(ULe,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:l.jsx(VLe,{className:"absolute h-full bg-primary"})}),l.jsx(WLe,{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"})]}));KE.displayName=c7.displayName;function HLe(){const{toast:e}=kn(),{session:t}=ol(),[r,n]=b.useState(""),[i,s]=b.useState([80]),[a,o]=b.useState(!0),[c,u]=b.useState(!1),[d,f]=b.useState(!1),h="agent_8601k9akbg9xfdd9773wp4z4r233",{data:p=[],refetch:g}=Ke({queryKey:[`/api/elevenlabs/agent/${h}/versions`],queryFn:async()=>
621{if(!(t!=null&&t.access_token))throw new Error("Not authenticated");const _=await fetch(`/api/elevenlabs/agent/${h}/versions`,{headers:{Authorization:`Bearer ${t.access_token}`}});if(!_.ok)throw new Error("Failed to fetch version history");return _.json()},refetchInterval:3e4,enabled:!!(t!=null&&t.access_token)}),{data:m,isLoading:v}=Ke({queryKey:["/api/elevenlabs/agent",h],queryFn:async()=>{if(!(t!=null&&t.access_token))throw new Error("Not authenticated");const _=await fetch(`/api/elevenlabs/agent/${h}`,{headers:{Authorization:`Bearer ${t.access_token}`}});if(!_.ok)throw new Error("Failed to fetch from ElevenLabs");return _.json()},enabled:!!(t!=null&&t.access_token)});b.useEffect(()=>{var _,N,O;(O=(N=(_=m==null?void 0:m.conversation_config)==null?void 0:_.agent)==null?void 0:N.prompt)!=null&&O.prompt&&n(m.conversation_config.agent.prompt.prompt)},[m]);const y=fr({mutationFn:async _=>{var O;if(!(t!=null&&t.access_token))throw new Error("Not authenticated");const N=await fetch(`/api/elevenlabs/agent/${h}/update`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.access_token}`},body:JSON.stringify({prompt:_.systemPrompt,updatedBy:((O=t.user)==null?void 0:O.email)||"Admin"})});if(!N.ok){const C=await N.json();throw new Error(C.error||"Failed to sync with ElevenLabs")}return N.json()},onSuccess:_=>{_.unchanged?e({title:"No changes detected",description:"The prompt is already up to date with ElevenLabs"}):(e({title:"Prompt saved and synced",description:`System prompt updated successfully (v${_.version})`}),g())},onError:_=>{e({title:"Sync failed",description:_.message,variant:"destructive"})}}),x=fr({mutationFn:async()=>{if(!(t!=null&&t.access_token))throw new Error("Not authenticated");const _=await fetch(`/api/elevenlabs/agent/${h}`,{headers:{Authorization:`Bearer ${t.access_token}`}});if(!_.ok){const N=await _.json();throw new Error(N.error||"Failed to fetch from ElevenLabs")}return _.json()},onSuccess:_=>{var N,O,C;(C=(O=(N=_.conversation_config)==null?void 0:N.agent)==null?void 0:O.prompt)!=null&&C.prompt&&(n(_.conversation_config.agent.prompt.prompt),e({title:"Synced from ElevenLabs",description:"Successfully loaded current prompt from ElevenLabs agent"}),g())},onError:_=>{e({title:"Sync failed",description:_.message,variant:"destructive"})}}),w=()=>{y.mutate({systemPrompt:r})},S=()=>{x.mutate()},j=fr({mutationFn:async _=>{var O;if(!(t!=null&&t.access_token))throw new Error("Not authenticated");const N=await fetch(`/api/elevenlabs/agent/${h}/restore/${_}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.access_token}`},body:JSON.stringify({updatedBy:((O=t.user)==null?void 0:O.email)||"Admin"})});if(!N.ok){const C=await N.json();throw new Error(C.error||"Failed to restore version")}return N.json()},onSuccess:_=>{e({title:"Version restored",description:`Successfully restored prompt (new version: v${_.newVersion})`}),g(),x.mutate()},onError:_=>{e({title:"Restore failed",description:_.message,variant:"destructive"})}}),E=_=>{confirm("Are you sure you want to restore this version? This will create a new version with the restored prompt.")&&j.mutate(_)};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"AI Configuration"}),l.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"Configure AI behavior and settings"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(ie,{variant:"outline",size:"sm",className:"sm:size-default",onClick:S,disabled:x.isPending,"data-testid":"button-sync-elevenlabs",children:[l.jsx(sc,{className:"h-4 w-4 mr-2"}),x.isPending?"Syncing...":"Sync"]}),l.jsxs(ie,{variant:"outline",size:"sm",className:"sm:size-default","data-testid":"button-view-history",children:[l.jsx(Eee,{className:"h-4 w-4 mr-2"}),l.jsx("span",{className:"hidden sm:inline",children:"Version History"}),l.jsx("span",{className:"sm:hidden",children:"History"})]})]})]}),l.jsxs(ul,{defaultValue:"prompt",className:"space-y-6",children:[l.jsxs(Ha,{children:[l.jsx(yt,{value:"prompt","data-testid":"tab-prompt",children:"System Prompt"}),l.jsx(yt,{value:"functions","data-testid":"tab-functions",disabled:!0,className:"opacity-50",children:"Functions (Coming Soon)"}),l.jsx(yt,{value:"transfer","data-testid":"tab-transfer",disabled:!0,className:"opacity-50",children:"Transfer Rules (Coming Soon)"}),l.jsx(yt,{value:"greetings","data-testid":"tab-greetings",children:"Greetings"})]}),l.jsxs(xt,{value:"prompt",className:"space-y-6",children:[l.jsxs(ue,{children:[l.jsxs(ye,{className:"flex flex-row items-center justify-between gap-2 space-y-0",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-semibold",children:"Current System Prompt"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Define how the ElevenLabs AI agent should behave"})]}),l.jsx("div",{className:"flex gap-2 items-center",children:p.length>0&&l.jsx(Ee,{variant:"secondary",children:p[0].version})})]}),l.jsxs(de,{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"system-prompt",children:"Prompt"}),l.jsx(un,{id:"system-prompt",value:r,onChange:_=>n(_.target.value),rows:12,disabled:v,placeholder:v?"Loading current prompt from ElevenLabs...":"","data-testid":"textarea-system-prompt"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(ie,{onClick:w,disabled:y.isPending||v,"data-testid":"button-save-prompt",children:[l.jsx(Vy,{className:"h-4 w-4 mr-2"}),y.isPending?"Saving & Syncing...":"Save & Sync to ElevenLabs"]}),l.jsxs(ie,{variant:"outline","data-testid":"button-reset-prompt",children:[l.jsx(kee,{className:"h-4 w-4 mr-2"}),"Reset to Default"]})]})]})]}),l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsx("h3",{className:"font-semibold",children:"Version History"})}),l.jsx(de,{children:l.jsx("div",{className:"space-y-3",children:p.map(_=>l.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-md hover-elevate","data-testid":`version-${_.version}`,children:[l.jsxs("div",{children:[l.jsx("p",{className:"font-medium",children:_.version}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:[_.date," by ",_.author]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ee,{variant:_.status==="Current"?"default":"secondary",children:_.status}),_.status!=="Current"&&l.jsx(ie,{variant:"outline",size:"sm",onClick:()=>E(_.id),disabled:j.isPending,children:j.isPending?"Restoring...":"Restore"})]})]}
621,_.version))})})]})]}),l.jsx(xt,{value:"functions",className:"space-y-6",children:l.jsxs(ue,{children:[l.jsxs(ye,{children:[l.jsx("h3",{className:"font-semibold",children:"Function Settings"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Control AI capabilities and confidence thresholds"})]}),l.jsxs(de,{className:"space-y-6",children:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(Xe,{children:"Member Lookup"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Search member database"})]}),l.jsx(Uh,{defaultChecked:!0,"data-testid":"switch-member-lookup"})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(Xe,{children:"Event Information"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Provide event details"})]}),l.jsx(Uh,{defaultChecked:!0,"data-testid":"switch-event-info"})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(Xe,{children:"Shipping Tracking"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Track shipments"})]}),l.jsx(Uh,{defaultChecked:!0,"data-testid":"switch-shipping"})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs(Xe,{children:["Confidence Threshold: ",i[0],"%"]}),l.jsx(KE,{value:i,onValueChange:s,max:100,step:5,"data-testid":"slider-confidence"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Minimum confidence required for AI to provide an answer"})]})]})]})}),l.jsx(xt,{value:"transfer",className:"space-y-6",children:l.jsxs(ue,{children:[l.jsxs(ye,{children:[l.jsx("h3",{className:"font-semibold",children:"Transfer Rules"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure when to transfer to human agents"})]}),l.jsxs(de,{className:"space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(Xe,{children:"Enable Transfers"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Allow AI to transfer calls"})]}),l.jsx(Uh,{checked:a,onCheckedChange:o,"data-testid":"switch-transfer"})]}),a&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"transfer-keywords",children:"Transfer Keywords"}),l.jsx(Je,{id:"transfer-keywords",placeholder:"speak to human, manager, complaint","data-testid":"input-transfer-keywords"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Comma-separated keywords that trigger immediate transfer"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"frustration-threshold",children:"Frustration Detection Sensitivity"}),l.jsx(KE,{defaultValue:[70],max:100,step:10,"data-testid":"slider-frustration"})]})]})]})]})}),l.jsx(xt,{value:"greetings",className:"space-y-6",children:l.jsxs(ue,{children:[l.jsxs(ye,{children:[l.jsx("h3",{className:"font-semibold",children:"Greeting Templates"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Customize AI greetings for different scenarios"})]}),l.jsxs(de,{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"default-greeting",children:"Default Greeting"}),l.jsx(un,{id:"default-greeting",placeholder:"Hello! I'm the AAOE AI assistant. How can I help you today?",rows:3,"data-testid":"textarea-default-greeting"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"phone-greeting",children:"Phone Greeting"}),l.jsx(un,{id:"phone-greeting",placeholder:"Thank you for calling AAOE. I'm your AI assistant. How may I assist you?",rows:3,"data-testid":"textarea-phone-greeting"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"chat-greeting",children:"Chat Greeting"}),l.jsx(un,{id:"chat-greeting",placeholder:"Hi there! Welcome to AAOE. I'm here to help. What can I do for you?",rows:3,"data-testid":"textarea-chat-greeting"})]}),l.jsxs(ie,{"data-testid":"button-save-greetings",children:[l.jsx(Vy,{className:"h-4 w-4 mr-2"}),"Save Greetings"]})]})]})})]})]})}function bn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,n;r<e.length;r++)(n=bn(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}var u7={exports:{}},d7={};/**
622 * @license React
623 * use-sync-external-store-shim/with-selector.production.js
624 *
625 * Copyright (c) Meta Platforms, Inc. and affiliates.
626 *
627 * This source code is licensed under the MIT license found in the
628 * LICENSE file in the root directory of this source tree.
629 */var xw=b,qLe=nO;function KLe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var GLe=typeof Object.is=="function"?Object.is:KLe,YLe=qLe.useSyncExternalStore,XLe=xw.useRef,QLe=xw.useEffect,ZLe=xw.useMemo,JLe=xw.useDebugValue;d7.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var s=XLe(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=ZLe(function(){function c(p){if(!u){if(u=!0,d=p,p=n(p),i!==void 0&&a.hasValue){var g=a.value;if(i(g,p))return f=g}return f=p}if(g=f,GLe(d,p))return g;var m=n(p);return i!==void 0&&i(g,m)?(d=p,g):(d=p,f=m)}var u=!1,d,f,h=r===void 0?null:r;return[function(){return c(t())},h===null?void 0:function(){return c(h())}]},[t,r,n,i]);var o=YLe(e,s[0],s[1]);return QLe(function(){a.hasValue=!0,a.value=o},[o]),JLe(o),o};u7.exports=d7;var e4e=u7.exports;const t4e=pt(e4e),r4e={},nD=e=>{let t;const r=new Set,n=(d,f)=>{const h=typeof d=="function"?d(t):d;if(!Object.is(h,t)){const p=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),r.forEach(g=>g(t,p))}},i=()=>t,c={setState:n,getState:i,getInitialState:()=>u,subscribe:d=>(r.add(d),()=>r.delete(d)),destroy:()=>{(r4e?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},u=t=e(n,i,c);return c},n4e=e=>e?nD(e):nD,{useDebugValue:i4e}=P,{useSyncExternalStoreWithSelector:s4e}=t4e,a4e=e=>e;function f7(e,t=a4e,r){const n=s4e(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return i4e(n),n}const iD=(e,t)=>{const r=n4e(e),n=(i,s=t)=>f7(r,i,s);return Object.assign(n,r),n},o4e=(e,t)=>
vendor: 5,149 bytes, line 629
629e?iD(e,t):iD;function Qr(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,i]of e)if(!Object.is(i,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(const n of r)if(!Object.prototype.hasOwnProperty.call(t,n)||!Object.is(e[n],t[n]))return!1;return!0}var l4e={value:()=>{}};function bw(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new oy(r)}function oy(e){this._=e}function c4e(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}oy.prototype=bw.prototype={constructor:oy,on:function(e,t){var r=this._,n=c4e(e+"",r),i,s=-1,a=n.length;if(arguments.length<2){for(;++s<a;)if((i=(e=n[s]).type)&&(i=u4e(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=n[s]).type)r[i]=sD(r[i],e.name,t);else if(t==null)for(i in r)r[i]=sD(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new oy(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,s;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],n=0,i=s.length;n<i;++n)s[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,s=n.length;i<s;++i)n[i].value.apply(t,r)}};function u4e(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function sD(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=l4e,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var GE="http://www.w3.org/1999/xhtml";const aD={svg:"http://www.w3.org/2000/svg",xhtml:GE,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ww(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),aD.hasOwnProperty(t)?{space:aD[t],local:e}:e}function d4e(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===GE&&t.documentElement.namespaceURI===GE?t.createElement(e):t.createElementNS(r,e)}}function f4e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function h7(e){var t=ww(e);return(t.local?f4e:d4e)(t)}function h4e(){}function LC(e){return e==null?h4e:function(){return this.querySelector(e)}}function p4e(e){typeof e!="function"&&(e=LC(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var s=t[i],a=s.length,o=n[i]=new Array(a),c,u,d=0;d<a;++d)(c=s[d])&&(u=e.call(c,c.__data__,d,s))&&("__data__"in c&&(u.__data__=c.__data__),o[d]=u);return new ri(n,this._parents)}function m4e(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function g4e(){return[]}function p7(e){return e==null?g4e:function(){return this.querySelectorAll(e)}}function v4e(e){return function(){return m4e(e.apply(this,arguments))}}function y4e(e){typeof e=="function"?e=v4e(e):e=p7(e);for(var t=this._groups,r=t.length,n=[],i=[],s=0;s<r;++s)for(var a=t[s],o=a.length,c,u=0;u<o;++u)(c=a[u])&&(n.push(e.call(c,c.__data__,u,a)),i.push(c));return new ri(n,i)}function m7(e){return function(){return this.matches(e)}}function g7(e){return function(t){return t.matches(e)}}var x4e=Array.prototype.find;function b4e(e){return function(){return x4e.call(this.children,e)}}function w4e(){return this.firstElementChild}function S4e(e){return this.select(e==null?w4e:b4e(typeof e=="function"?e:g7(e)))}var j4e=Array.prototype.filter;function _4e(){return Array.from(this.children)}function E4e(e){return function(){return j4e.call(this.children,e)}}function N4e(e){return this.selectAll(e==null?_4e:E4e(typeof e=="function"?e:g7(e)))}function O4e(e){typeof e!="function"&&(e=m7(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var s=t[i],a=s.length,o=n[i]=[],c,u=0;u<a;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&o.push(c);return new ri(n,this._parents)}function v7(e){return new Array(e.length)}function A4e(){return new ri(this._enter||this._groups.map(v7),this._parents)}function v0(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}v0.prototype={constructor:v0,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function C4e(e){return function(){return e}}function P4e(e,t,r,n,i,s){for(var a=0,o,c=t.length,u=s.length;a<u;++a)(o=t[a])?(o.__data__=s[a],n[a]=o):r[a]=new v0(e,s[a]);for(;a<c;
vendor: 16,254 bytes, line 629
629++a)(o=t[a])&&(i[a]=o)}function T4e(e,t,r,n,i,s,a){var o,c,u=new Map,d=t.length,f=s.length,h=new Array(d),p;for(o=0;o<d;++o)(c=t[o])&&(h[o]=p=a.call(c,c.__data__,o,t)+"",u.has(p)?i[o]=c:u.set(p,c));for(o=0;o<f;++o)p=a.call(e,s[o],o,s)+"",(c=u.get(p))?(n[o]=c,c.__data__=s[o],u.delete(p)):r[o]=new v0(e,s[o]);for(o=0;o<d;++o)(c=t[o])&&u.get(h[o])===c&&(i[o]=c)}function k4e(e){return e.__data__}function R4e(e,t){if(!arguments.length)return Array.from(this,k4e);var r=t?T4e:P4e,n=this._parents,i=this._groups;typeof e!="function"&&(e=C4e(e));for(var s=i.length,a=new Array(s),o=new Array(s),c=new Array(s),u=0;u<s;++u){var d=n[u],f=i[u],h=f.length,p=$4e(e.call(d,d&&d.__data__,u,n)),g=p.length,m=o[u]=new Array(g),v=a[u]=new Array(g),y=c[u]=new Array(h);r(d,f,m,v,y,p,t);for(var x=0,w=0,S,j;x<g;++x)if(S=m[x]){for(x>=w&&(w=x+1);!(j=v[w])&&++w<g;);S._next=j||null}}return a=new ri(a,n),a._enter=o,a._exit=c,a}function $4e(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function I4e(){return new ri(this._exit||this._groups.map(v7),this._parents)}function M4e(e,t,r){var n=this.enter(),i=this,s=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?s.remove():r(s),n&&i?n.merge(i).order():i}function D4e(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,s=n.length,a=Math.min(i,s),o=new Array(i),c=0;c<a;++c)for(var u=r[c],d=n[c],f=u.length,h=o[c]=new Array(f),p,g=0;g<f;++g)(p=u[g]||d[g])&&(h[g]=p);for(;c<i;++c)o[c]=r[c];return new ri(o,this._parents)}function L4e(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,s=n[i],a;--i>=0;)(a=n[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function F4e(e){e||(e=B4e);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}for(var r=this._groups,n=r.length,i=new Array(n),s=0;s<n;++s){for(var a=r[s],o=a.length,c=i[s]=new Array(o),u,d=0;d<o;++d)(u=a[d])&&(c[d]=u);c.sort(t)}return new ri(i,this._parents).order()}function B4e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function z4e(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function U4e(){return Array.from(this)}function V4e(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,s=n.length;i<s;++i){var a=n[i];if(a)return a}return null}function W4e(){let e=0;for(const t of this)++e;return e}function H4e(){return!this.node()}function q4e(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],s=0,a=i.length,o;s<a;++s)(o=i[s])&&e.call(o,o.__data__,s,i);return this}function K4e(e){return function(){this.removeAttribute(e)}}function G4e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Y4e(e,t){return function(){this.setAttribute(e,t)}}function X4e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Q4e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Z4e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function J4e(e,t){var r=ww(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?G4e:K4e:typeof t=="function"?r.local?Z4e:Q4e:r.local?X4e:Y4e)(r,t))}function y7(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function e3e(e){return function(){this.style.removeProperty(e)}}function t3e(e,t,r){return function(){this.style.setProperty(e,t,r)}}function r3e(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function n3e(e,t,r){return arguments.length>1?this.each((t==null?e3e:typeof t=="function"?r3e:t3e)(e,t,r??"")):hf(this.node(),e)}function hf(e,t){return e.style.getPropertyValue(t)||y7(e).getComputedStyle(e,null).getPropertyValue(t)}function i3e(e){return function(){delete this[e]}}function s3e(e,t){return function(){this[e]=t}}function a3e(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function o3e(e,t){return arguments.length>1?this.each((t==null?i3e:typeof t=="function"?a3e:s3e)(e,t)):this.node()[e]}function x7(e){return e.trim().split(/^|\s+/)}function FC(e){return e.classList||new b7(e)}function b7(e){this._node=e,this._names=x7(e.getAttribute("class")||"")}b7.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function w7(e,t){for(var r=FC(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function S7(e,t){for(var r=FC(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function l3e(e){return function(){w7(this,e)}}function c3e(e){return function(){S7(this,e)}}function u3e(e,t){return function(){(t.apply(this,arguments)?w7:S7)(this,e)}}function d3e(e,t){var r=x7(e+"");if(arguments.length<2){for(var n=FC(this.node()),i=-1,s=r.length;++i<s;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?u3e:t?l3e:c3e)(r,t))}function f3e(){this.textContent=""}function h3e(e){return function(){this.textContent=e}}function p3e(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function m3e(e){return arguments.length?this.each(e==null?f3e:(typeof e=="function"?p3e:h3e)(e)):this.node().textContent}function g3e(){this.innerHTML=""}function v3e(e){return function(){this.innerHTML=e}}function y3e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function x3e(e){return arguments.length?this.each(e==null?g3e:(typeof e=="function"?y3e:v3e)(e)):this.node().innerHTML}function b3e(){this.nextSibling&&this.parentNode.appendChild(this)}function w3e(){return this.each(b3e)}function S3e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function j3e(){return this.each(S3e)}function _3e(e){var t=typeof e=="function"?e:h7(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function E3e(){return null}function N3e(e,t){var r=typeof e=="function"?e:h7(e),n=t==null?E3e:typeof t=="function"?t:LC(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function O3e(){var e=this.parentNode;e&&e.removeChild(this)}function A3e(){return this.each(O3e)}function C3e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function P3e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function T3e(e){return this.select(e?P3e:C3e)}function k3e(e){return arguments.length?this.property("__data__",e):this.node().__data__}function R3e(e){return function(t){e.call(this,t,this.__data__)}}function $3e(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function I3e(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,s;r<i;++r)s=t[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++n]=s;++n?t.length=n:delete this.__on}}}function M3e(e,t,r){return function(){var n=this.__on,i,s=R3e(t);if(n){for(var a=0,o=n.length;a<o;++a)if((i=n[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=r),i.value=t;return}}this.addEventListener(e.type,s,r),i={type:e.type,name:e.name,value:t,listener:s,options:r},n?n.push(i):this.__on=[i]}}function D3e(e,t,r){var n=$3e(e+""),i,s=n.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var c=0,u=o.length,d;c<u;++c)for(i=0,d=o[c];i<s;++i)if((a=n[i]).type===d.type&&a.name===d.name)return d.value}return}for(o=t?M3e:I3e,i=0;i<s;++i)this.each(o(n[i],t,r));return this}function j7(e,t,r){var n=y7(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function L3e(e,t){return function(){return j7(this,e,t)}}function F3e(e,t){return function(){return j7(this,e,t.apply(this,arguments))}}function B3e(e,t){return this.each((typeof t=="function"?F3e:L3e)(e,t))}function*z3e(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,s=n.length,a;i<s;++i)(a=n[i])&&(yield a)}var _7=[null];function ri(e,t){this._groups=e,this._parents=t}function Cg(){return new ri([[document.documentElement]],_7)}function U3e(){return this}ri.prototype=Cg.prototype={constructor:ri,select:p4e,selectAll:y4e,selectChild:S4e,selectChildren:N4e,filter:O4e,data:R4e,enter:A4e,exit:I4e,join:M4e,merge:D4e,selection:U3e,order:L4e,sort:F4e,call:z4e,nodes:U4e,node:V4e,size:W4e,empty:H4e,each:q4e,attr:J4e,style:n3e,property:o3e,classed:d3e,text:m3e,html:x3e,raise:w3e,lower:j3e,append:_3e,insert:N3e,remove:A3e,clone:T3e,datum:k3e,on:D3e,dispatch:B3e,[Symbol.iterator]:z3e};function ts(e){return typeof e=="string"?new ri([[document.querySelector(e)]],[document.documentElement]):new ri([[e]],_7)}function V3e(e){let t;for(;t=e.sourceEvent;)e=t;return e}function js(e,t){if(e=V3e(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const W3e={passive:!1},Rm={capture:!0,passive:!1};function uS(e){e.stopImmediatePropagation()}function rd(e){e.preventDefault(),e.stopImmediatePropagation()}function E7(e){var t=e.document.documentElement,r=ts(e).on("dragstart.drag",rd,Rm);"onselectstart"in t?r.on("selectstart.drag",rd,Rm):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function N7(e,t){var r=e.document.documentElement,n=ts(e).on("dragstart.drag",null);t&&(n.on("click.drag",rd,Rm),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Tv=e=>()=>e;function YE(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:s,x:a,y:o,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}YE.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function H3e(e){return!e.ctrlKey&&!e.button}function q3e(){return this.parentNode}function K3e(e,t){return t??{x:e.x,y:e.y}}function G3e(){return navigator.maxTouchPoints||"ontouchstart"in this}function Y3e(){var e=H3e,t=q3e,r=K3e,n=G3e,i={},s=bw("start","drag","end"),a=0,o,c,u,d,f=0;function h(S){S.on("mousedown.drag",p).filter(n).on("touchstart.drag",v).on("touchmove.drag",y,W3e).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(S,j){if(!(d||!e.call(this,S,j))){var E=w(this,t.call(this,S,j),S,j,"mouse");E&&(ts(S.view).on("mousemove.drag",g,Rm).on("mouseup.drag",m,Rm),E7(S.view),uS(S),u=!1,o=S.clientX,c=S.clientY,E("start",S))}}function g(S){if(rd(S),!u){var j=S.clientX-o,E=S.clientY-c;u=j*j+E*E>f}i.mouse("drag",S)}function m(S){ts(S.view).on("mousemove.drag mouseup.drag",null),N7(S.view,u),rd(S),i.mouse("end",S)}function v(S,j){if(e.call(this,S,j)){var E=S.changedTouches,_=t.call(this,S,j),N=E.length,O,C;for(O=0;O<N;++O)(C=w(this,_,S,j,E[O].identifier,E[O]))&&(uS(S),C("start",S,E[O]))}}function y(S){var j=S.changedTouches,E=j.length,_,N;for(_=0;_<E;++_)(N=i[j[_].identifier])&&(rd(S),N("drag",S,j[_]))}function x(S){var j=S.changedTouches,E=j.length,_,N;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),_=0;_<E;++_)(N=i[j[_].identifier])&&(uS(S),N("end",S,j[_]))}function w(S,j,E,_,N,O){var C=s.copy(),k=js(O||E,j),$,D,A;if((A=r.call(S,new YE("beforestart",{sourceEvent:E,target:h,identifier:N,active:a,x:k[0],y:k[1],dx:0,dy:0,dispatch:C}),_))!=null)return $=A.x-k[0]||0,D=A.y-k[1]||0,function R(T,L,M){var I=k,F;switch(T){case"start":i[N]=R,F=a++;break;case"end":delete i[N],--a;case"drag":k=js(M||L,j),F=a;break}C.call(T,S,new YE(T,{sourceEvent:L,subject:A,target:h,identifier:N,active:F,x:k[0]+$,y:k[1]+D,dx:k[0]-I[0],dy:k[1]-I[1],dispatch:C}),_)}}return h.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Tv(!!S),h):e},h.container=function(S){return arguments.length?(t=typeof S=="function"?S:Tv(S),h):t},h.subject=function(S){return arguments.length?(r=typeof S=="function"?S:Tv(S),h):r},h.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:Tv(!!S),h):n},h.on=function(){var S=s.on.apply(s,arguments);return S===s?h:S},h.clickDistance=function(S){return arguments.length?(f=(S=+S)*S,h):Math.sqrt(f)},h}var pf=0,Vh=0,Nh=0,O7=1e3,y0,Wh,x0=0,Dc=0,Sw=0,$m=typeof performance=="object"&&performance.now?performance:Date,A7=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function BC(){return Dc||(A7(X3e),Dc=$m.now()+Sw)}function X3e(){Dc=0}function b0(){this._call=this._time=this._next=null}b0.prototype=C7.prototype={constructor:b0,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?BC():+r)+(t==null?0:+t),!this._next&&Wh!==this&&(Wh?Wh._next=this:y0=this,Wh=this),this._call=e,this._time=r,XE()},stop:function(){this._call&&(this._call=null,this._time=1/0,XE())}};function C7(e,t,r){var n=new b0;return n.restart(e,t,r),n}function Q3e(){BC(),++pf;for(var e=y0,t;e;)(t=Dc-e._time)>=0&&e._call.call(void 0,t),e=e._next;--pf}function oD(){Dc=(x0=$m.now())+Sw,pf=Vh=0;try{Q3e()}finally{pf=0,J3e(),Dc=0}}function Z3e(){var e=$m.now(),t=e-x0;t>O7&&(Sw-=t,x0=e)}function J3e(){for(var e,t=y0,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:y0=r);Wh=e,XE(n)}function XE(e){if(!pf){Vh&&(Vh=clearTimeout(Vh));var t=e-Dc;t>24?(e<1/0&&(Vh=setTimeout(oD,e-$m.now()-Sw)),Nh&&(Nh=clearInterval(Nh))):(Nh||(x0=$m.now(),Nh=setInterval(Z3e,O7)),pf=1,A7(oD))}}function lD(e,t,r){var n=new b0;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var eFe=bw("start","end","cancel","interrupt"),tFe=[],P7=0,cD=1,QE=2,ly=3,uD=4,ZE=5,cy=6;function jw(e,t,r,n,i,s){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;rFe(e,r,{name:t,index:n,group:i,on:eFe,tween:tFe,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:P7})}function zC(e,t){var r=ys(e,t);if(r.state>P7)throw new Error("too late; already scheduled");return r}function ea(e,t){var r=ys(e,t);if(r.state>ly)throw new Error("too late; already running");return r}function ys(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function rFe(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=C7(s,0,r.time);function s(u){r.state=cD,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var d,f,h,p;if(r.state!==cD)return c();for(d in n)if(p=n[d],p.name===r.name){if(p.state===ly)return lD(a);p.state===uD?(p.state=cy,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[d]):+d<t&&(p.state=cy,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete n[d])}if(lD(function(){r.state===ly&&(r.state=uD,r.timer.restart(o,r.delay,r.time),o(u))}),r.state=QE,r.on.call("start",e,e.__data__,r.index,r.group),r.state===QE){for(r.state=ly,i=new Array(h=r.tween.length),d=0,f=-1;d<h;++d)(p=r.tween[d].value.call(e,e.__data__,r.index,r.group))&&(i[
vendor: 8,032 bytes, line 629
629++f]=p);i.length=f+1}}function o(u){for(var d=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(c),r.state=ZE,1),f=-1,h=i.length;++f<h;)i[f].call(e,d);r.state===ZE&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=cy,r.timer.stop(),delete n[t];for(var u in n)return;delete e.__transition}}function uy(e,t){var r=e.__transition,n,i,s=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){s=!1;continue}i=n.state>QE&&n.state<ZE,n.state=cy,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}s&&delete e.__transition}}function nFe(e){return this.each(function(){uy(this,e)})}function iFe(e,t){var r,n;return function(){var i=ea(this,e),s=i.tween;if(s!==r){n=r=s;for(var a=0,o=n.length;a<o;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function sFe(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var s=ea(this,e),a=s.tween;if(a!==n){i=(n=a).slice();for(var o={name:t,value:r},c=0,u=i.length;c<u;++c)if(i[c].name===t){i[c]=o;break}c===u&&i.push(o)}s.tween=i}}function aFe(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=ys(this.node(),r).tween,i=0,s=n.length,a;i<s;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?iFe:sFe)(r,e,t))}function UC(e,t,r){var n=e._id;return e.each(function(){var i=ea(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return ys(i,n).value[t]}}function T7(e,t){var r;return(typeof t=="number"?Xi:t instanceof kc?Cx:(r=kc(t))?(t=r,Cx):LV)(e,t)}function oFe(e){return function(){this.removeAttribute(e)}}function lFe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function cFe(e,t,r){var n,i=r+"",s;return function(){var a=this.getAttribute(e);return a===i?null:a===n?s:s=t(n=a,r)}}function uFe(e,t,r){var n,i=r+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===n?s:s=t(n=a,r)}}function dFe(e,t,r){var n,i,s;return function(){var a,o=r(this),c;return o==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=o+"",a===c?null:a===n&&c===i?s:(i=c,s=t(n=a,o)))}}function fFe(e,t,r){var n,i,s;return function(){var a,o=r(this),c;return o==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=o+"",a===c?null:a===n&&c===i?s:(i=c,s=t(n=a,o)))}}function hFe(e,t){var r=ww(e),n=r==="transform"?vEe:T7;return this.attrTween(e,typeof t=="function"?(r.local?fFe:dFe)(r,n,UC(this,"attr."+e,t)):t==null?(r.local?lFe:oFe)(r):(r.local?uFe:cFe)(r,n,t))}function pFe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function mFe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function gFe(e,t){var r,n;function i(){var s=t.apply(this,arguments);return s!==n&&(r=(n=s)&&mFe(e,s)),r}return i._value=t,i}function vFe(e,t){var r,n;function i(){var s=t.apply(this,arguments);return s!==n&&(r=(n=s)&&pFe(e,s)),r}return i._value=t,i}function yFe(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=ww(e);return this.tween(r,(n.local?gFe:vFe)(n,t))}function xFe(e,t){return function(){zC(this,e).delay=+t.apply(this,arguments)}}function bFe(e,t){return t=+t,function(){zC(this,e).delay=t}}function wFe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?xFe:bFe)(t,e)):ys(this.node(),t).delay}function SFe(e,t){return function(){ea(this,e).duration=+t.apply(this,arguments)}}function jFe(e,t){return t=+t,function(){ea(this,e).duration=t}}function _Fe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?SFe:jFe)(t,e)):ys(this.node(),t).duration}function EFe(e,t){if(typeof t!="function")throw new Error;return function(){ea(this,e).ease=t}}function NFe(e){var t=this._id;return arguments.length?this.each(EFe(t,e)):ys(this.node(),t).ease}function OFe(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;ea(this,e).ease=r}}function AFe(e){if(typeof e!="function")throw new Error;return this.each(OFe(this._id,e))}function CFe(e){typeof e!="function"&&(e=m7(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var s=t[i],a=s.length,o=n[i]=[],c,u=0;u<a;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&o.push(c);return new Ua(n,this._parents,this._name,this._id)}function PFe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,s=Math.min(n,i),a=new Array(n),o=0;o<s;++o)for(var c=t[o],u=r[o],d=c.length,f=a[o]=new Array(d),h,p=0;p<d;++p)(h=c[p]||u[p])&&(f[p]=h);for(;o<n;++o)a[o]=t[o];return new Ua(a,this._parents,this._name,this._id)}function TFe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function kFe(e,t,r){var n,i,s=TFe(t)?zC:ea;return function(){var a=s(this,e),o=a.on;o!==n&&(i=(n=o).copy()).on(t,r),a.on=i}}function RFe(e,t){var r=this._id;return arguments.length<2?ys(this.node(),r).on.on(e):this.each(kFe(r,e,t))}function $Fe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function IFe(){return this.on("end.remove",$Fe(this._id))}function MFe(e){var t=this._name,r=this._id;typeof e!="function"&&(e=LC(e));for(var n=this._groups,i=n.length,s=new Array(i),a=0;a<i;++a)for(var o=n[a],c=o.length,u=s[a]=new Array(c),d,f,h=0;h<c;++h)(d=o[h])&&(f=e.call(d,d.__data__,h,o))&&("__data__"in d&&(f.__data__=d.__data__),u[h]=f,jw(u[h],t,r,h,u,ys(d,r)));return new Ua(s,this._parents,t,r)}function DFe(e){var t=this._name,r=this._id;typeof e!="function"&&(e=p7(e));for(var n=this._groups,i=n.length,s=[],a=[],o=0;o<i;++o)for(var c=n[o],u=c.length,d,f=0;f<u;++f)if(d=c[f]){for(var h=e.call(d,d.__data__,f,c),p,g=ys(d,r),m=0,v=h.length;m<v;++m)(p=h[m])&&jw(p,t,r,m,h,g);s.push(h),a.push(d)}return new Ua(s,a,t,r)}var LFe=Cg.prototype.constructor;function FFe(){return new LFe(this._groups,this._parents)}function BFe(e,t){var r,n,i;return function(){var s=hf(this,e),a=(this.style.removeProperty(e),hf(this,e));return s===a?null:s===r&&a===n?i:i=t(r=s,n=a)}}function k7(e){return function(){this.style.removeProperty(e)}}function zFe(e,t,r){var n,i=r+"",s;return function(){var a=hf(this,e);return a===i?null:a===n?s:s=t(n=a,r)}}function UFe(e,t,r){var n,i,s;return function(){var a=hf(this,e),o=r(this),c=o+"";return o==null&&(c=o=(this.style.removeProperty(e),hf(this,e))),a===c?null:a===n&&c===i?s:(i=c,s=t(n=a,o))}}function VFe(e,t){var r,n,i,s="style."+t,a="end."+s,o;return function(){var c=ea(this,e),u=c.on,d=c.value[s]==null?o||(o=k7(t)):void 0;(u!==r||i!==d)&&(n=(r=u).copy()).on(a,i=d),c.on=n}}function WFe(e,t,r){var n=(e+="")=="transform"?gEe:T7;return t==null?this.styleTween(e,BFe(e,n)).on("end.style."+e,k7(e)):typeof t=="function"?this.styleTween(e,UFe(e,n,UC(this,"style."+e,t))).each(VFe(this._id,e)):this.styleTween(e,zFe(e,n,t),r).on("end.style."+e,null)}function HFe(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function qFe(e,t,r){var n,i;function s(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&HFe(e,a,r)),n}return s._value=t,s}function KFe(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,qFe(e,t,r??""))}function GFe(e){return function(){this.textContent=e}}function YFe(e){return function(){var t=e(this);this.textContent=t??""}}function XFe(e){return this.tween("text",typeof e=="function"?YFe(UC(this,"text",e)):GFe(e==null?"":e+""))}function QFe(e){return function(t){this.textContent=e.call(this,t)}}function ZFe(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&QFe(i)),t}return n._value=e,n}function JFe(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,ZFe(e))}
vendor: 11,977 bytes, line 629
629function e5e(){for(var e=this._name,t=this._id,r=R7(),n=this._groups,i=n.length,s=0;s<i;++s)for(var a=n[s],o=a.length,c,u=0;u<o;++u)if(c=a[u]){var d=ys(c,t);jw(c,e,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Ua(n,this._parents,e,r)}function t5e(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(s,a){var o={value:a},c={value:function(){--i===0&&s()}};r.each(function(){var u=ea(this,n),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(c)),u.on=t}),i===0&&s()})}var r5e=0;function Ua(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function R7(){return++r5e}var ia=Cg.prototype;Ua.prototype={constructor:Ua,select:MFe,selectAll:DFe,selectChild:ia.selectChild,selectChildren:ia.selectChildren,filter:CFe,merge:PFe,selection:FFe,transition:e5e,call:ia.call,nodes:ia.nodes,node:ia.node,size:ia.size,empty:ia.empty,each:ia.each,on:RFe,attr:hFe,attrTween:yFe,style:WFe,styleTween:KFe,text:XFe,textTween:JFe,remove:IFe,tween:aFe,delay:wFe,duration:_Fe,ease:NFe,easeVarying:AFe,end:t5e,[Symbol.iterator]:ia[Symbol.iterator]};function n5e(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var i5e={time:null,delay:0,duration:250,ease:n5e};function s5e(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function a5e(e){var t,r;e instanceof Ua?(t=e._id,e=e._name):(t=R7(),(r=i5e).time=BC(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,s=0;s<i;++s)for(var a=n[s],o=a.length,c,u=0;u<o;++u)(c=a[u])&&jw(c,e,t,u,a,r||s5e(c,t));return new Ua(n,this._parents,e,t)}Cg.prototype.interrupt=nFe;Cg.prototype.transition=a5e;const kv=e=>()=>e;function o5e(e,{sourceEvent:t,target:r,transform:n,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:i}})}function _a(e,t,r){this.k=e,this.x=t,this.y=r}_a.prototype={constructor:_a,scale:function(e){return e===1?this:new _a(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new _a(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ho=new _a(1,0,0);_a.prototype;function dS(e){e.stopImmediatePropagation()}function Oh(e){e.preventDefault(),e.stopImmediatePropagation()}function l5e(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function c5e(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function dD(){return this.__zoom||Ho}function u5e(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function d5e(){return navigator.maxTouchPoints||"ontouchstart"in this}function f5e(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],s=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a))}function h5e(){var e=l5e,t=c5e,r=f5e,n=u5e,i=d5e,s=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,c=wEe,u=bw("start","zoom","end"),d,f,h,p=500,g=150,m=0,v=10;function y(A){A.property("__zoom",dD).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",O).on("dblclick.zoom",C).filter(i).on("touchstart.zoom",k).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",D).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(A,R,T,L){var M=A.selection?A.selection():A;M.property("__zoom",dD),A!==M?j(A,R,T,L):M.interrupt().each(function(){E(this,arguments).event(L).start().zoom(null,typeof R=="function"?R.apply(this,arguments):R).end()})},y.scaleBy=function(A,R,T,L){y.scaleTo(A,function(){var M=this.__zoom.k,I=typeof R=="function"?R.apply(this,arguments):R;return M*I},T,L)},y.scaleTo=function(A,R,T,L){y.transform(A,function(){var M=t.apply(this,arguments),I=this.__zoom,F=T==null?S(M):typeof T=="function"?T.apply(this,arguments):T,U=I.invert(F),V=typeof R=="function"?R.apply(this,arguments):R;return r(w(x(I,V),F,U),M,a)},T,L)},y.translateBy=function(A,R,T,L){y.transform(A,function(){return r(this.__zoom.translate(typeof R=="function"?R.apply(this,arguments):R,typeof T=="function"?T.apply(this,arguments):T),t.apply(this,arguments),a)},null,L)},y.translateTo=function(A,R,T,L,M){y.transform(A,function(){var I=t.apply(this,arguments),F=this.__zoom,U=L==null?S(I):typeof L=="function"?L.apply(this,arguments):L;return r(Ho.translate(U[0],U[1]).scale(F.k).translate(typeof R=="function"?-R.apply(this,arguments):-R,typeof T=="function"?-T.apply(this,arguments):-T),I,a)},L,M)};function x(A,R){return R=Math.max(s[0],Math.min(s[1],R)),R===A.k?A:new _a(R,A.x,A.y)}function w(A,R,T){var L=R[0]-T[0]*A.k,M=R[1]-T[1]*A.k;return L===A.x&&M===A.y?A:new _a(A.k,L,M)}function S(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function j(A,R,T,L){A.on("start.zoom",function(){E(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(L).end()}).tween("zoom",function(){var M=this,I=arguments,F=E(M,I).event(L),U=t.apply(M,I),V=T==null?S(U):typeof T=="function"?T.apply(M,I):T,G=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),Z=M.__zoom,he=typeof R=="function"?R.apply(M,I):R,ve=c(Z.invert(V).concat(G/Z.k),he.invert(V).concat(G/he.k));return function(re){if(re===1)re=he;else{var ge=ve(re),Y=G/ge[2];re=new _a(Y,V[0]-ge[0]*Y,V[1]-ge[1]*Y)}F.zoom(null,re)}})}function E(A,R,T){return!T&&A.__zooming||new _(A,R)}function _(A,R){this.that=A,this.args=R,this.active=0,this.sourceEvent=null,this.extent=t.apply(A,R),this.taps=0}_.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,R){return this.mouse&&A!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var R=ts(this.that).datum();u.call(A,this.that,new o5e(A,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:u}),R)}};function N(A,...R){if(!e.apply(this,arguments))return;var T=E(this,R).event(A),L=this.__zoom,M=Math.max(s[0],Math.min(s[1],L.k*Math.pow(2,n.apply(this,arguments)))),I=js(A);if(T.wheel)(T.mouse[0][0]!==I[0]||T.mouse[0][1]!==I[1])&&(T.mouse[1]=L.invert(T.mouse[0]=I)),clearTimeout(T.wheel);else{if(L.k===M)return;T.mouse=[I,L.invert(I)],uy(this),T.start()}Oh(A),T.wheel=setTimeout(F,g),T.zoom("mouse",r(w(x(L,M),T.mouse[0],T.mouse[1]),T.extent,a));function F(){T.wheel=null,T.end()}}function O(A,...R){if(h||!e.apply(this,arguments))return;var T=A.currentTarget,L=E(this,R,!0).event(A),M=ts(A.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",G,!0),I=js(A,T),F=A.clientX,U=A.clientY;E7(A.view),dS(A),L.mouse=[I,this.__zoom.invert(I)],uy(this),L.start();function V(Z){if(Oh(Z),!L.moved){var he=Z.clientX-F,ve=Z.clientY-U;L.moved=he*he+ve*ve>m}L.event(Z).zoom("mouse",r(w(L.that.__zoom,L.mouse[0]=js(Z,T),L.mouse[1]),L.extent,a))}function G(Z){M.on("mousemove.zoom mouseup.zoom",null),N7(Z.view,L.moved),Oh(Z),L.event(Z).end()}}function C(A,...R){if(e.apply(this,arguments)){var T=this.__zoom,L=js(A.changedTouches?A.changedTouches[0]:A,this),M=T.invert(L),I=T.k*(A.shiftKey?.5:2),F=r(w(x(T,I),L,M),t.apply(this,R),a);Oh(A),o>0?ts(this).transition().duration(o).call(j,F,L,A):ts(this).call(y.transform,F,L,A)}}function k(A,...R){if(e.apply(this,arguments)){var T=A.touches,L=T.length,M=E(this,R,A.changedTouches.length===L).event(A),I,F,U,V;for(dS(A),F=0;F<L;++F)U=T[F],V=js(U,this),V=[V,this.__zoom.invert(V),U.identifier],M.touch0?!M.touch1&&M.touch0[2]!==V[2]&&(M.touch1=V,M.taps=0):(M.touch0=V,I=!0,M.taps=1+!!d);d&&(d=clearTimeout(d)),I&&(M.taps<2&&(f=V[0],d=setTimeout(function(){d=null},p)),uy(this),M.start())}}function $(A,...R){if(this.__zooming){var T=E(this,R).event(A),L=A.changedTouches,M=L.length,I,F,U,V;for(Oh(A),I=0;I<M;++I)F=L[I],U=js(F,this),T.touch0&&T.touch0[2]===F.identifier?T.touch0[0]=U:T.touch1&&T.touch1[2]===F.identifier&&(T.touch1[0]=U);if(F=T.that.__zoom,T.touch1){var G=T.touch0[0],Z=T.touch0[1],he=T.touch1[0],ve=T.touch1[1],re=(re=he[0]-G[0])*re+(re=he[1]-G[1])*re,ge=(ge=ve[0]-Z[0])*ge+(ge=ve[1]-Z[1])*ge;F=x(F,Math.sqrt(re/ge)),U=[(G[0]+he[0])/2,(G[1]+he[1])/2],V=[(Z[0]+ve[0])/2,(Z[1]+ve[1])/2]}else if(T.touch0)U=T.touch0[0],V=T.touch0[1];else return;T.zoom("touch",r(w(F,U,V),T.extent,a))}}function D(A,...R){if(this.__zooming){var T=E(this,R).event(A),L=A.changedTouches,M=L.length,I,F;for(dS(A),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),I=0;I<M;++I)F=L[I],T.touch0&&T.touch0[2]===F.identifier?delete T.touch0:T.touch1&&T.touch1[2]===F.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),T.taps===2&&(F=js(F,this),Math.hypot(f[0]-F[0],f[1]-F[1])<v)){var U=ts(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return y.wheelDelta=function(A){return arguments.length?(n=typeof A=="function"?A:kv(+A),y):n},y.filter=function(A){return arguments.length?(e=typeof A=="function"?A:kv(!!A),y):e},y.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:kv(!!A),y):i},y.extent=function(A){return arguments.length?(t=typeof A=="function"?A:kv([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),y):t},y.scaleExtent=function(A){return arguments.length?(s[0]=+A[0],s[1]=+A[1],y):[s[0],s[1]]},y.translateExtent=function(A){return arguments.length?(a[0][0]=+A[0][0],a[1][0]=+A[1][0],a[0][1]=+A[0][1],a[1][1]=+A[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(A){return arguments.length?(r=A,y):r},y.duration=function(A){return arguments.length?(o=+A,y):o},y.interpolate=function(A){return arguments.length?(c=A,y):c},y.on=function(){var A=u.on.apply(u,arguments);return A===u?y:A},y.clickDistance=function(A){return arguments.length?(m=(A=+A)*A,y):Math.sqrt(m)},y.tapDistance=function(A){return arguments.length?(v=+A,y):v},y}const _w=b.createContext(null),p5e=_w.Provider,Va={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>
629`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},$7=Va.error001();function tr(e,t){const r=b.useContext(_w);if(r===null)throw new Error($7);return f7(r,e,t)}const Dr=()=>{const e=b.useContext(_w);if(e===null)throw new Error($7);return b.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},m5e=e=>e.userSelectionActive?"none":"all";function I7({position:e,children:t,className:r,style:n,...i}){const s=tr(m5e),a=`${e}`.split("-");return P.createElement("div",{className:bn(["react-flow__panel",r,...a]),style:{...n,pointerEvents:s},...i},t)}function g5e({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:P.createElement(I7,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},P.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const v5e=({x:e,y:t,label:r,labelStyle:n={},labelShowBg:i=!0,labelBgStyle:s={},labelBgPadding:a=[2,4],labelBgBorderRadius:o=2,children:c,className:u,...d})=>{const f=b.useRef(null),[h,p]=b.useState({x:0,y:0,width:0,height:0}),g=bn(["react-flow__edge-textwrapper",u]);return b.useEffect(()=>{if(f.current){const m=f.current.getBBox();p({x:m.x,y:m.y,width:m.width,height:m.height})}},[r]),typeof r>"u"||!r?null:P.createElement("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:g,visibility:h.width?"visible":"hidden",...d},i&&P.createElement("rect",{width:h.width+2*a[0],x:-a[0],y:-a[1],height:h.height+2*a[1],className:"react-flow__edge-textbg",style:s,rx:o,ry:o}),P.createElement("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:f,style:n},r),c)};var y5e=b.memo(v5e);const VC=e=>({width:e.offsetWidth,height:e.offsetHeight}),mf=(e,t=0,r=1)=>Math.min(Math.max(e,t),r),WC=(e={x:0,y:0},t)=>({x:mf(e.x,t[0][0],t[1][0]),y:mf(e.y,t[0][1],t[1][1])}),fD=(e,t,r)=>e<t?mf(Math.abs(e-t),1,50)/50:e>r?-mf(Math.abs(e-r),1,50)/50:0,M7=(e,t)=>{const r=fD(e.x,35,t.width-35)*20,n=fD(e.y,35,t.height-35)*20;return[r,n]},D7=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},x5e=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),HC=({x:e,y:t,width:r,height:n})=>({x:e,y:t,x2:e+r,y2:t+n}),b5e=({x:e,y:t,x2:r,y2:n})=>({x:e,y:t,width:r-e,height:n-t}),hD=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),JE=(e,t)=>{const r=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),n=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(r*n)},w5e=e=>wi(e.width)&&wi(e.height)&&wi(e.x)&&wi(e.y),wi=e=>!isNaN(e)&&isFinite(e),cr=Symbol.for("internals"),L7=["Enter"," ","Escape"],S5e=(e,t)=>{},j5e=e=>"nativeEvent"in e;function eN(e){var i,s;const t=j5e(e)?e.nativeEvent:e,r=((s=(i=t.composedPath)==null?void 0:i.call(t))==null?void 0:s[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(r==null?void 0:r.nodeName)||(r==null?void 0:r.hasAttribute("contenteditable"))||!!(r!=null&&r.closest(".nokey"))}const F7=e=>"clientX"in e,qo=(e,t)=>{var s,a;const r=F7(e),n=r?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,i=r?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:n-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},w0=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0},Pg=({id:e,path:t,labelX:r,labelY:n,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:o,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:h,interactionWidth:p=20})=>P.createElement(P.Fragment,null,P.createElement("path",{id:e,style:d,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:h}),p&&P.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}),i&&wi(r)&&wi(n)?P.createElement(y5e,{x:r,y:n,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:o,labelBgPadding:c,labelBgBorderRadius:u}):null);Pg.displayName="BaseEdge";function Ah(e,t,r){return r===void 0?r:n=>{const i=t().edges.find(s=>s.id===e);i&&r(n,{...i})}}function B7({sourceX:e,sourceY:t,targetX:r,targetY:n}){const i=Math.abs(r-e)/2,s=r<e?r+i:r-i,a=Math.abs(n-t)/2,o=n<t?n+a:n-a;return[s,o,i,a]}function z7({sourceX:e,sourceY:t,targetX:r,targetY:n,sourceControlX:i,sourceControlY:s,targetControlX:a,targetControlY:o}){const c=e*.125+i*.375+a*.375+r*.125,u=t*.125+s*.375+o*.375+n*.125,d=Math.abs(c-e),f=Math.abs(u-t);return[c,u,d,f]}var Lc;(function(e){e.Strict="strict",e.Loose="loose"})(Lc||(Lc={}));var Kl;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Kl||(Kl={}));var Im;(function(e){e.Partial="partial",e.Full="full"})(Im||(Im={}));var vo;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(vo||(vo={}));var S0;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(S0||(S0={}));var De;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(De||(De={}));function pD({pos:e,x1:t,y1:r,x2:n,y2:i}){return e===De.Left||e===De.Right?[.5*(t+n),r]:[t,.5*(r+i)]}function U7({sourceX:e,sourceY:t,sourcePosition:r=De.Bottom,targetX:n,targetY:i,targetPosition:s=De.Top}){const[a,o]=pD({pos:r,x1:e,y1:t,x2:n,y2:i}
629),[c,u]=pD({pos:s,x1:n,y1:i,x2:e,y2:t}),[d,f,h,p]=z7({sourceX:e,sourceY:t,targetX:n,targetY:i,sourceControlX:a,sourceControlY:o,targetControlX:c,targetControlY:u});return[`M${e},${t} C${a},${o} ${c},${u} ${n},${i}`,d,f,h,p]}const qC=b.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,sourcePosition:i=De.Bottom,targetPosition:s=De.Top,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:g,interactionWidth:m})=>{const[v,y,x]=U7({sourceX:e,sourceY:t,sourcePosition:i,targetX:r,targetY:n,targetPosition:s});return P.createElement(Pg,{path:v,labelX:y,labelY:x,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:g,interactionWidth:m})});qC.displayName="SimpleBezierEdge";const mD={[De.Left]:{x:-1,y:0},[De.Right]:{x:1,y:0},[De.Top]:{x:0,y:-1},[De.Bottom]:{x:0,y:1}},_5e=({source:e,sourcePosition:t=De.Bottom,target:r})=>t===De.Left||t===De.Right?e.x<r.x?{x:1,y:0}:{x:-1,y:0}:e.y<r.y?{x:0,y:1}:{x:0,y:-1},gD=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function E5e({source:e,sourcePosition:t=De.Bottom,target:r,targetPosition:n=De.Top,center:i,offset:s}){const a=mD[t],o=mD[n],c={x:e.x+a.x*s,y:e.y+a.y*s},u={x:r.x+o.x*s,y:r.y+o.y*s},d=_5e({source:c,sourcePosition:t,target:u}),f=d.x!==0?"x":"y",h=d[f];let p=[],g,m;const v={x:0,y:0},y={x:0,y:0},[x,w,S,j]=B7({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(a[f]*o[f]===-1){g=i.x??x,m=i.y??w;const _=[{x:g,y:c.y},{x:g,y:u.y}],N=[{x:c.x,y:m},{x:u.x,y:m}];a[f]===h?p=f==="x"?_:N:p=f==="x"?N:_}else{const _=[{x:c.x,y:u.y}],N=[{x:u.x,y:c.y}];if(f==="x"?p=a.x===h?N:_:p=a.y===h?_:N,t===n){const D=Math.abs(e[f]-r[f]);if(D<=s){const A=Math.min(s-1,s-D);a[f]===h?v[f]=(c[f]>e[f]?-1:1)*A:y[f]=(u[f]>r[f]?-1:1)*A}}if(t!==n){const D=f==="x"?"y":"x",A=a[f]===o[D],R=c[D]>u[D],T=c[D]<u[D];(a[f]===1&&(!A&&R||A&&T)||a[f]!==1&&(!A&&T||A&&R))&&(p=f==="x"?_:N)}const O={x:c.x+v.x,y:c.y+v.y},C={x:u.x+y.x,y:u.y+y.y},k=Math.max(Math.abs(O.x-p[0].x),Math.abs(C.x-p[0].x)),$=Math.max(Math.abs(O.y-p[0].y),Math.abs(C.y-p[0].y));k>=$?(g=(O.x+C.x)/2,m=p[0].y):(g=p[0].x,m=(O.y+C.y)/2)}return[[e,{x:c.x+v.x,y:c.y+v.y},...p,{x:u.x+y.x,y:u.y+y.y},r],g,m,S,j]}function N5e(e,t,r,n){const i=Math.min(gD(e,t)/2,gD(t,r)/2,n),{x:s,y:a}=t;if(e.x===s&&s===r.x||e.y===a&&a===r.y)return`L${s} ${a}`;if(e.y===a){const u=e.x<r.x?-1:1,d=e.y<r.y?1:-1;return`L ${s+i*u},${a}Q ${s},${a} ${s},${a+i*d}`}const o=e.x<r.x?1:-1,c=e.y<r.y?-1:1;return`L ${s},${a+i*c}Q ${s},${a} ${s+i*o},${a}`}function tN({sourceX:e,sourceY:t,sourcePosition:r=De.Bottom,targetX:n,targetY:i,targetPosition:s=De.Top,borderRadius:a=5,centerX:o,centerY:c,offset:u=20}){const[d,f,h,p,g]=E5e({source:{x:e,y:t},sourcePosition:r,target:{x:n,y:i},targetPosition:s,center:{x:o,y:c},offset:u});return[d.reduce((v,y,x)=>{let w="";return x>0&&x<d.length-1?w=N5e(d[x-1],y,d[x+1],a):w=`${x===0?"M":"L"}${y.x} ${y.y}`,v+=w,v},""),f,h,p,g]}const Ew=b.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:o,labelBgPadding:c,labelBgBorderRadius:u,style:d,sourcePosition:f=De.Bottom,targetPosition:h=De.Top,markerEnd:p,markerStart:g,pathOptions:m,interactionWidth:v})=>{const[y,x,w]=tN({sourceX:e,sourceY:t,sourcePosition:f,targetX:r,targetY:n,targetPosition:h,borderRadius:m==null?void 0:m.borderRadius,offset:m==null?void 0:m.offset});return P.createElement(Pg,{path:y,labelX:x,labelY:w,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:o,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:p,markerStart:g,interactionWidth:v})});Ew.displayName="SmoothStepEdge";const KC=b.memo(e=>{var t;return P.createElement(Ew,{...e,pathOptions:b.useMemo(()=>{var r;return{borderRadius:0,offset:(r=e.pathOptions)==null?void 0:r.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});KC.displayName="StepEdge";function O5e({sourceX:e,sourceY:t,targetX:r,targetY:n}){const[i,s,a,o]=B7({sourceX:e,sourceY:t,targetX:r,targetY:n});return[`M ${e},${t}L ${r},${n}`,i,s,a,o]}const GC=b.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:o,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:h,interactionWidth:p})=>{const[g,m,v]=O5e({sourceX:e,sourceY:t,targetX:r,targetY:n});return P.createElement(Pg,{path:g,labelX:m,labelY:v,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:o,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:h,interactionWidth:p})});GC.displayName="StraightEdge";function Rv(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function vD({pos:e,x1:t,y1:r,x2:n,y2:i,c:s}){switch(e){case De.Left:return[t-Rv(t-n,s),r];case De.Right:return[t+Rv(n-t,s),r];case De.Top:return[t,r-Rv(r-i,s)];case De.Bottom:return[t,r+Rv(i-r,s)]}}function V7({sourceX:e,sourceY:t,sourcePosition:r=De.Bottom,targetX:n,targetY:i,targetPosition:s=De.Top,curvature:a=.25}){const[o,c]=vD({pos:r,x1:e,y1:t,x2:n,y2:i,c:a}),[u,d]=vD({pos:s,x1:n,y1:i,x2:e,y2:t,c:a}),[f,h,p,g]=z7({sourceX:e,sourceY:t,targetX:n,targetY:i,sourceControlX:o,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${e},${t} C${o},${c} ${u},${d} ${n},${i}`,f,h,p,g]}const j0=b.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,sourcePosition:i=De.Bottom,targetPosition:s=De.Top,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:g,pathOptions:m,interactionWidth:v})=>{const[y,x,w]=V7({sourceX:e,sourceY:t,sourcePosition:i,targetX:r,targetY:n,targetPosition:s,curvature:m==null?void 0:m.curvature});return P.createElement(Pg,{path:y,labelX:x,labelY:w,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:g,interactionWidth:v})});j0.displayName="BezierEdge";const YC=b.createContext(null),A5e=YC.Provider;YC.Consumer;const C5e=()=>b.useContext(YC),P5e=e=>"id"in e&&"source"in e&&"target"in e,T5e=({source:e,sourceHandle:t,target:r,targetHandle:n})=>`reactflow__edge-${e}${t||""}-${r}${n||""}`,rN=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(n=>`${n}=${e[n]}`).join("&")}`,k5e=(e,t)=>t.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),W7=(e,t)=>{if(!e.source||!e.target)return t;let r;return P5e(e)?r={...e}:r={...e,id:T5e(e)},k5e(r,t)?t:t.concat(r)},nN=({x:e,y:t},[r,n,i],s,[a,o])=>{const c={x:(e-r)/i,y:(t-n)/i};return s?{x:a*Math.round(c.x/a),y:o*Math.round(c.y/o)}:c},H7=({x:e,y:t},[r,n,i])=>({x:e*i+r,y:t*i+n}),nd=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const r=(e.width??0)*t[0],n=(e.height??0)*t[1],i={x:e.position.x-r,y:e.position.y-n};return{...i,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-r,y:e.positionAbsolute.y-n}:i}},XC=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((n,i)=>{const{x:s,y:a}=nd(i,t).positionAbsolute;return x5e(n,HC({x:s,y:a,width:i.width||0,height:i.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return b5e(r)},q7=(e,t,[r,n,i]=[0,0,1],s=!1,a=!1,o=[0,0])=>{const c={x:(t.x-r)/i,y:(t.y-n)/i,width:t.width/i,height:t.height/i},u=[];return e.forEach(d=>{const{width:f,height:h,selectable:p=!0,hidden:g=!1}=d;if(a&&!p||g)return!1;const{positionAbsolute:m}
629=nd(d,o),v={x:m.x,y:m.y,width:f||0,height:h||0},y=JE(c,v),x=typeof f>"u"||typeof h>"u"||f===null||h===null,w=s&&y>0,S=(f||0)*(h||0);(x||w||y>=S||d.dragging)&&u.push(d)}),u},K7=(e,t)=>{const r=e.map(n=>n.id);return t.filter(n=>r.includes(n.source)||r.includes(n.target))},G7=(e,t,r,n,i,s=.1)=>{const a=t/(e.width*(1+s)),o=r/(e.height*(1+s)),c=Math.min(a,o),u=mf(c,n,i),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*u,p=r/2-f*u;return{x:h,y:p,zoom:u}},Tl=(e,t=0)=>e.transition().duration(t);function yD(e,t,r,n){return(t[r]||[]).reduce((i,s)=>{var a,o;return`${e.id}-${s.id}-${r}`!==n&&i.push({id:s.id||null,type:r,nodeId:e.id,x:(((a=e.positionAbsolute)==null?void 0:a.x)??0)+s.x+s.width/2,y:(((o=e.positionAbsolute)==null?void 0:o.y)??0)+s.y+s.height/2}),i},[])}function R5e(e,t,r,n,i,s){const{x:a,y:o}=qo(e),u=t.elementsFromPoint(a,o).find(g=>g.classList.contains("react-flow__handle"));if(u){const g=u.getAttribute("data-nodeid");if(g){const m=QC(void 0,u),v=u.getAttribute("data-handleid"),y=s({nodeId:g,id:v,type:m});if(y){const x=i.find(w=>w.nodeId===g&&w.type===m&&w.id===v);return{handle:{id:v,type:m,nodeId:g,x:(x==null?void 0:x.x)||r.x,y:(x==null?void 0:x.y)||r.y},validHandleResult:y}}}}let d=[],f=1/0;if(i.forEach(g=>{const m=Math.sqrt((g.x-r.x)**2+(g.y-r.y)**2);if(m<=n){const v=s(g);m<=f&&(m<f?d=[{handle:g,validHandleResult:v}]:m===f&&d.push({handle:g,validHandleResult:v}),f=m)}}),!d.length)return{handle:null,validHandleResult:Y7()};if(d.length===1)return d[0];const h=d.some(({validHandleResult:g})=>g.isValid),p=d.some(({handle:g})=>g.type==="target");return d.find(({handle:g,validHandleResult:m})=>p?g.type==="target":h?m.isValid:!0)||d[0]}const $5e={source:null,target:null,sourceHandle:null,targetHandle:null},Y7=()=>({handleDomNode:null,isValid:!1,connection:$5e,endHandle:null});function X7(e,t,r,n,i,s,a){const o=i==="target",c=a.querySelector(`.react-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),u={...Y7(),handleDomNode:c};if(c){const d=QC(void 0,c),f=c.getAttribute("data-nodeid"),h=c.getAttribute("data-handleid"),p=c.classList.contains("connectable"),g=c.classList.contains("connectableend"),m={source:o?f:r,sourceHandle:o?h:n,target:o?r:f,targetHandle:o?n:h};u.connection=m,p&&g&&(t===Lc.Strict?o&&d==="source"||!o&&d==="target":f!==r||h!==n)&&(u.endHandle={nodeId:f,handleId:h,type:d},u.isValid=s(m))}return u}function I5e({nodes:e,nodeId:t,handleId:r,handleType:n}){return e.reduce((i,s)=>{if(s[cr]){const{handleBounds:a}=s[cr];let o=[],c=[];a&&(o=yD(s,a,"source",`${t}-${r}-${n}`),c=yD(s,a,"target",`${t}-${r}-${n}`)),i.push(...o,...c)}return i},[])}function QC(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function fS(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function M5e(e,t){let r=null;return t?r="valid":e&&!t&&(r="invalid"),r}function Q7({event:e,handleId:t,nodeId:r,onConnect:n,isTarget:i,getState:s,setState:a,isValidConnection:o,edgeUpdaterType:c,onReconnectEnd:u}){const d=D7(e.target),{connectionMode:f,domNode:h,autoPanOnConnect:p,connectionRadius:g,onConnectStart:m,panBy:v,getNodes:y,cancelConnection:x}=s();let w=0,S;const{x:j,y:E}=qo(e),_=d==null?void 0:d.elementFromPoint(j,E),N=QC(c,_),O=h==null?void 0:h.getBoundingClientRect();if(!O||!N)return;let C,k=qo(e,O),$=!1,D=null,A=!1,R=null;const T=I5e({nodes:y(),nodeId:r,handleId:t,handleType:N}),L=()=>{if(!p)return;const[F,U]=M7(k,O);v({x:F,y:U}),w=requestAnimationFrame(L)};a({connectionPosition:k,connectionStatus:null,connectionNodeId:r,connectionHandleId:t,connectionHandleType:N,connectionStartHandle:{nodeId:r,handleId:t,type:N},connectionEndHandle:null}),m==null||m(e,{nodeId:r,handleId:t,handleType:N});function M(F){const{transform:U}=s();k=qo(F,O);const{handle:V,validHandleResult:G}=R5e(F,d,nN(k,U,!1,[1,1]),g,T,Z=>X7(Z,f,r,t,i?"target":"source",o,d));if(S=V,$||(L(),$=!0),R=G.handleDomNode,D=G.connection,A=G.isValid,a({connectionPosition:S&&A?H7({x:S.x,y:S.y},U):k,connectionStatus:M5e(!!S,A),connectionEndHandle:G.endHandle}),!S&&!A&&!R)return fS(C);D.source!==D.target&&R&&(fS(C),C=R,R.classList.add("connecting","react-flow__handle-connecting"),R.classList.toggle("valid",A),R.classList.toggle("react-flow__handle-valid",A))}function I(F){var U,V;(S||R)&&D&&A&&(n==null||n(D)),(V=(U=s()).onConnectEnd)==null||V.call(U,F),c&&(u==null||u(F)),fS(C),x(),cancelAnimationFrame(w),$=!1,A=!1,D=null,R=null,d.removeEventListener("mousemove",M),d.removeEventListener("mouseup",I),d.removeEventListener("touchmove",M),d.removeEventListener("touchend",I)}d.addEventListener("mousemove",M),d.addEventListener("mouseup",I),d.addEventListener("touchmove",M),d.addEventListener("touchend",I)}const xD=()=>!0,D5e=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),L5e=(e,t,r)=>n=>{const{connectionStartHandle:i,connectionEndHandle:s,connectionClickStartHandle:a}=n;return{connecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.handleId)===t&&(i==null?void 0:i.type)===r||(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.handleId)===t&&(s==null?void 0:s.type)===r,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.handleId)===t&&(a==null?void 0:a.type)===r}},Z7=b.forwardRef(({type:e="source",position:t=De.Top,isValidConnection:r,isConnectable:n=!0,isConnectableStart:i=!0,isConnectableEnd:s=!0,id:a,onConnect:o,children:c,className:u,onMouseDown:d,onTouchStart:f,...h},p)=>{var O,C;const g=a||null,m=e==="target",v=Dr(),y=C5e(),{connectOnClick:x,noPanClassName:w}=tr(D5e,Qr),{connecting:S,clickConnecting:j}=tr(L5e(y,g,e),Qr);
629y||(C=(O=v.getState()).onError)==null||C.call(O,"010",Va.error010());const E=k=>{const{defaultEdgeOptions:$,onConnect:D,hasDefaultEdges:A}=v.getState(),R={...$,...k};if(A){const{edges:T,setEdges:L}=v.getState();L(W7(R,T))}D==null||D(R),o==null||o(R)},_=k=>{if(!y)return;const $=F7(k);i&&($&&k.button===0||!$)&&Q7({event:k,handleId:g,nodeId:y,onConnect:E,isTarget:m,getState:v.getState,setState:v.setState,isValidConnection:r||v.getState().isValidConnection||xD}),$?d==null||d(k):f==null||f(k)},N=k=>{const{onClickConnectStart:$,onClickConnectEnd:D,connectionClickStartHandle:A,connectionMode:R,isValidConnection:T}=v.getState();if(!y||!A&&!i)return;if(!A){$==null||$(k,{nodeId:y,handleId:g,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:y,type:e,handleId:g}});return}const L=D7(k.target),M=r||T||xD,{connection:I,isValid:F}=X7({nodeId:y,id:g,type:e},R,A.nodeId,A.handleId||null,A.type,M,L);F&&E(I),D==null||D(k),v.setState({connectionClickStartHandle:null})};return P.createElement("div",{"data-handleid":g,"data-nodeid":y,"data-handlepos":t,"data-id":`${y}-${g}-${e}`,className:bn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",w,u,{source:!m,target:m,connectable:n,connectablestart:i,connectableend:s,connecting:j,connectionindicator:n&&(i&&!S||s&&S)}]),onMouseDown:_,onTouchStart:_,onClick:x?N:void 0,ref:p,...h},c)});Z7.displayName="Handle";var Gs=b.memo(Z7);const J7=({data:e,isConnectable:t,targetPosition:r=De.Top,sourcePosition:n=De.Bottom})=>P.createElement(P.Fragment,null,P.createElement(Gs,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label,P.createElement(Gs,{type:"source",position:n,isConnectable:t}));J7.displayName="DefaultNode";var iN=b.memo(J7);const eq=({data:e,isConnectable:t,sourcePosition:r=De.Bottom})=>P.createElement(P.Fragment,null,e==null?void 0:e.label,P.createElement(Gs,{type:"source",position:r,isConnectable:t}));eq.displayName="InputNode";var tq=b.memo(eq);const rq=({data:e,isConnectable:t,targetPosition:r=De.Top})=>P.createElement(P.Fragment,null,P.createElement(Gs,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label);rq.displayName="OutputNode";var nq=b.memo(rq);const ZC=()=>null;ZC.displayName="GroupNode";const F5e=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected).map(t=>({...t}))}),$v=e=>e.id;function B5e(e,t){return Qr(e.selectedNodes.map($v),t.selectedNodes.map($v))&&Qr(e.selectedEdges.map($v),t.selectedEdges.map($v))}const iq=b.memo(({onSelectionChange:e})=>{const t=Dr(),{selectedNodes:r,selectedEdges:n}=tr(F5e,B5e);return b.useEffect(()=>{const i={nodes:r,edges:n};e==null||e(i),t.getState().onSelectionChange.forEach(s=>s(i))},[r,n,e]),null});iq.displayName="SelectionListener";const z5e=e=>!!e.onSelectionChange;function U5e({onSelectionChange:e}){const t=tr(z5e);return e||t?P.createElement(iq,{onSelectionChange:e}):null}const V5e=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function hu(e,t){b.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function ot(e,t,r){b.useEffect(()=>{typeof t<"u"&&r({[e]:t})},[t])}const W5e=({nodes:e,edges:t,defaultNodes:r,defaultEdges:n,onConnect:i,onConnectStart:s,onConnectEnd:a,onClickConnectStart:o,onClickConnectEnd:c,nodesDraggable:u,nodesConnectable:d,nodesFocusable:f,edgesFocusable:h,edgesUpdatable:p,elevateNodesOnSelect:g,minZoom:m,maxZoom:v,nodeExtent:y,onNodesChange:x,onEdgesChange:w,elementsSelectable:S,connectionMode:j,snapGrid:E,snapToGri
629d:_,translateExtent:N,connectOnClick:O,defaultEdgeOptions:C,fitView:k,fitViewOptions:$,onNodesDelete:D,onEdgesDelete:A,onNodeDrag:R,onNodeDragStart:T,onNodeDragStop:L,onSelectionDrag:M,onSelectionDragStart:I,onSelectionDragStop:F,noPanClassName:U,nodeOrigin:V,rfId:G,autoPanOnConnect:Z,autoPanOnNodeDrag:he,onError:ve,connectionRadius:re,isValidConnection:ge,nodeDragThreshold:Y})=>{const{setNodes:ee,setEdges:q,setDefaultNodesAndEdges:W,setMinZoom:Fe,setMaxZoom:Ae,setTranslateExtent:Ue,setNodeExtent:nt,reset:We}=tr(V5e,Qr),_e=Dr();return b.useEffect(()=>{const St=n==null?void 0:n.map(B=>({...B,...C}));return W(r,St),()=>{We()}},[]),ot("defaultEdgeOptions",C,_e.setState),ot("connectionMode",j,_e.setState),ot("onConnect",i,_e.setState),ot("onConnectStart",s,_e.setState),ot("onConnectEnd",a,_e.setState),ot("onClickConnectStart",o,_e.setState),ot("onClickConnectEnd",c,_e.setState),ot("nodesDraggable",u,_e.setState),ot("nodesConnectable",d,_e.setState),ot("nodesFocusable",f,_e.setState),ot("edgesFocusable",h,_e.setState),ot("edgesUpdatable",p,_e.setState),ot("elementsSelectable",S,_e.setState),ot("elevateNodesOnSelect",g,_e.setState),ot("snapToGri
629d",_,_e.setState),ot("snapGrid",E,_e.setState),ot("onNodesChange",x,_e.setState),ot("onEdgesChange",w,_e.setState),ot("connectOnClick",O,_e.setState),ot("fitViewOnInit",k,_e.setState),ot("fitViewOnInitOptions",$,_e.setState),ot("onNodesDelete",D,_e.setState),ot("onEdgesDelete",A,_e.setState),ot("onNodeDrag",R,_e.setState),ot("onNodeDragStart",T,_e.setState),ot("onNodeDragStop",L,_e.setState),ot("onSelectionDrag",M,_e.setState),ot("onSelectionDragStart",I,_e.setState),ot("onSelectionDragStop",F,_e.setState),ot("noPanClassName",U,_e.setState),ot("nodeOrigin",V,_e.setState),ot("rfId",G,_e.setState),ot("autoPanOnConnect",Z,_e.setState),ot("autoPanOnNodeDrag",he,_e.setState),ot("onError",ve,_e.setState),ot("connectionRadius",re,_e.setState),ot("isValidConnection",ge,_e.setState),ot("nodeDragThreshold",Y,_e.setState),hu(e,ee),hu(t,q),hu(m,Fe),hu(v,Ae),hu(N,Ue),hu(y,nt),null},bD={display:"none"},H5e={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},sq="react-flow__node-desc",aq="react-flow__edge-desc",q5e="react-flow__aria-live",K5e=e=>e.ariaLiveMessage;function G5e({rfId:e}){const t=tr(K5e);return P.createElement("div",{id:`${q5e}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:H5e},t)}function Y5e({rfId:e,disableKeyboardA11y:t}){return P.createElement(P.Fragment,null,P.createElement("div",{id:`${sq}-${e}`,style:bD},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),P.createElement("div",{id:`${aq}-${e}`,style:bD},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&P.createElement(G5e,{rfId:e}))}var Mm=(e=null,t={actInsideInputWithModifier:!0})=>{const[r,n]=b.useState(!1),i=b.useRef(!1),s=b.useRef(new Set([])),[a,o]=b.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.split("+")),d=u.reduce((f,h)=>f.concat(...h),[]);return[u,d]}return[[],[]]},[e]);return b.useEffect(()=>{const c=typeof document<"u"?document:null,u=(t==null?void 0:t.target)||c;if(e!==null){const d=p=>{if(i.current=p.ctrlKey||p.metaKey||p.shiftKey,(!i.current||i.current&&!t.actInsideInputWithModifier)&&eN(p))return!1;const m=SD(p.code,o);s.current.add(p[m]),wD(a,s.current,!1)&&(p.preventDefault(),n(!0))},f=p=>{if((!i.current||i.current&&!t.actInsideInputWithModifier)&&eN(p))return!1;const m=SD(p.code,o);wD(a,s.current,!0)?(n(!1),s.current.clear()):s.current.delete(p[m]),p.key==="Meta"&&s.current.clear(),i.current=!1},h=()=>{s.current.clear(),n(!1)};return u==null||u.addEventListener("keydown",d),u==null||u.addEventListener("keyup",f),window.addEventListener("blur",h),()=>{u==null||u.removeEventListener("keydown",d),u==null||u.removeEventListener("keyup",f),window.removeEventListener("blur",h)}}},[e,n]),r};function wD(e,t,r){return e.filter(n=>r||n.length===t.size).some(n=>n.every(i=>t.has(i)))}function SD(e,t){return t.includes(e)?"code":"key"}function oq(e,t,r,n){var o,c;const i=e.parentNode||e.parentId;if(!i)return r;const s=t.get(i),a=nd(s,n);return oq(s,t,{x:(r.x??0)+a.x,y:(r.y??0)+a.y,z:(((o=s[cr])==null?void 0:o.z)??0)>(r.z??0)?((c=s[cr])==null?void 0:c.z)??0:r.z??0},n)}function lq(e,t,r){e.forEach(n=>{var s;const i=n.parentNode||n.parentId;if(i&&!e.has(i))throw new Error(`Parent node ${i} not found`);if(i||r!=null&&r[n.id]){const{x:a,y:o,z:c}=oq(n,e,{...n.position,z:((s=n[cr])==null?void 0:s.z)??0},t);n.positionAbsolute={x:a,y:o},n[cr].z=c,r!=null&&r[n.id]&&(n[cr].isParent=!0)}})}function hS(e,t,r,n){const i=new Map,s={},a=n?1e3:0;return e.forEach(o=>{var p;const c=(wi(o.zIndex)?o.zIndex:0)+(o.selected?a:0),u=t.get(o.id),d={...o,positionAbsolute:{x:o.position.x,y:o.position.y}},f=o.parentNode||o.parentId;f&&(s[f]=!0);const h=(u==null?void 0:u.type)&&(u==null?void 0:u.type)!==o.type;Object.defineProperty(d,cr,{enumerable:!1,value:{handleBounds:h||(p=u==null?void 0:u[cr])==null?void 0:p.handleBounds,z:c}}),i.set(o.id,d)}),lq(i,r,s),i}function cq(e,t={}){const{getNodes:r,width:n,height:i,minZoom:s,maxZoom:a,d3Zoom:o,d3Selection:c,fitViewOnInitDone:u,fitViewOnInit:d,nodeOrigin:f}=e(),h=t.initial&&!u&&d;
629if(o&&c&&(h||!t.initial)){const g=r().filter(v=>{var x;const y=t.includeHiddenNodes?v.width&&v.height:!v.hidden;return(x=t.nodes)!=null&&x.length?y&&t.nodes.some(w=>w.id===v.id):y}),m=g.every(v=>v.width&&v.height);if(g.length>0&&m){const v=XC(g,f),{x:y,y:x,zoom:w}=G7(v,n,i,t.minZoom??s,t.maxZoom??a,t.padding??.1),S=Ho.translate(y,x).scale(w);return typeof t.duration=="number"&&t.duration>0?o.transform(Tl(c,t.duration),S):o.transform(c,S),!0}}return!1}function X5e(e,t){return e.forEach(r=>{const n=t.get(r.id);n&&t.set(n.id,{...n,[cr]:n[cr],selected:r.selected})}),new Map(t)}function Q5e(e,t){return t.map(r=>{const n=e.find(i=>i.id===r.id);return n&&(r.selected=n.selected),r})}function Iv({changedNodes:e,changedEdges:t,get:r,set:n}){const{nodeInternals:i,edges:s,onNodesChange:a,onEdgesChange:o,hasDefaultNodes:c,hasDefaultEdges:u}=r();e!=null&&e.length&&(c&&n({nodeInternals:X5e(e,i)}),a==null||a(e)),t!=null&&t.length&&(u&&n({edges:Q5e(t,s)}),o==null||o(t))}const pu=()=>{},Z5e={zoomIn:pu,zoomOut:pu,zoomTo:pu,getZoom:()=>1,setViewport:pu,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:pu,fitBounds:pu,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},J5e=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),eBe=()=>{const e=Dr(),{d3Zoom:t,d3Selection:r}=tr(J5e,Qr);return b.useMemo(()=>r&&t?{zoomIn:i=>t.scaleBy(Tl(r,i==null?void 0:i.duration),1.2),zoomOut:i=>t.scaleBy(Tl(r,i==null?void 0:i.duration),1/1.2),zoomTo:(i,s)=>t.scaleTo(Tl(r,s==null?void 0:s.duration),i),getZoom:()=>e.getState().transform[2],setViewport:(i,s)=>{const[a,o,c]=e.getState().transform,u=Ho.translate(i.x??a,i.y??o).scale(i.zoom??c);t.transform(Tl(r,s==null?void 0:s.duration),u)},getViewport:()=>{const[i,s,a]=e.getState().transform;return{x:i,y:s,zoom:a}},fitView:i=>cq(e.getState,i),setCenter:(i,s,a)=>{const{width:o,height:c,maxZoom:u}=e.getState(),d=typeof(a==null?void 0:a.zoom)<"u"?a.zoom:u,f=o/2-i*d,h=c/2-s*d,p=Ho.translate(f,h).scale(d);t.transform(Tl(r,a==null?void 0:a.duration),p)},fitBounds:(i,s)=>{const{width:a,height:o,minZoom:c,maxZoom:u}=e.getState(),{x:d,y:f,zoom:h}=G7(i,a,o,c,u,(s==null?void 0:s.padding)??.1),p=Ho.translate(d,f).scale(h);t.transform(Tl(r,s==null?void 0:s.duration),p)},project:i=>{const{transform:s,snapToGrid:a,snapGrid:o}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),nN(i,s,a,o)},screenToFlowPosition:i=>{const{transform:s,snapToGrid:a,snapGrid:o,domNode:c}=e.getState();if(!c)return i;const{x:u,y:d}=c.getBoundingClientRect(),f={x:i.x-u,y:i.y-d};return nN(f,s,a,o)},flowToScreenPosition:i=>{const{transform:s,domNode:a}=e.getState();if(!a)return i;const{x:o,y:c}=a.getBoundingClientRect(),u=H7(i,s);return{x:u.x+o,y:u.y+c}},viewportInitialized:!0}:Z5e,[t,r])};function JC(){const e=eBe(),t=Dr(),r=b.useCallback(()=>t.getState().getNodes().map(m=>({...m})),[]),n=b.useCallback(m=>t.getState().nodeInternals.get(m),[]),i=b.useCallback(()=>{const{edges:m=[]}=t.getState();return m.map(v=>({...v}))},[]),s=b.useCallback(m=>{const{edges:v=[]}=t.getState();return v.find(y=>y.id===m)},[]),a=b.useCallback(m=>{const{getNodes:v,setNodes:y,hasDefaultNodes:x,onNodesChange:w}=t.getState(),S=v(),j=typeof m=="function"?m(S):m;if(x)y(j);else if(w){const E=j.length===0?S.map(_=>({type:"remove",id:_.id})):j.map(_=>({item:_,type:"reset"}));w(E)}},[]),o=b.useCallback(m=>{const{edges:v=[],setEdges:y,hasDefaultEdges:x,onEdgesChange:w}=t.getState(),S=typeof m=="function"?m(v):m;if(x)y(S);else if(w){const j=S.length===0?v.map(E=>({type:"remove",id:E.id})):S.map(E=>({item:E,type:"reset"}));w(j)}},[]),c=b.useCallback(m=>{const v=Array.isArray(m)?m:[m],{getNodes:y,setNodes:x,hasDefaultNodes:w,onNodesChange:S}=t.getState();if(w){const E=[...y(),...v];x(E)}else if(S){const j=v.map(E=>({item:E,type:"add"}));S(j)}},[]),u=b.useCallback(m=>{const v=Array.isArray(m)?m:[m],{edges:y=[],setEdges:x,hasDefaultEdges:w,onEdgesChange:S}=t.getState();if(w)x([...y,...v]);else if(S){const j=v.map(E=>
629({item:E,type:"add"}));S(j)}},[]),d=b.useCallback(()=>{const{getNodes:m,edges:v=[],transform:y}=t.getState(),[x,w,S]=y;return{nodes:m().map(j=>({...j})),edges:v.map(j=>({...j})),viewport:{x,y:w,zoom:S}}},[]),f=b.useCallback(({nodes:m,edges:v})=>{const{nodeInternals:y,getNodes:x,edges:w,hasDefaultNodes:S,hasDefaultEdges:j,onNodesDelete:E,onEdgesDelete:_,onNodesChange:N,onEdgesChange:O}=t.getState(),C=(m||[]).map(R=>R.id),k=(v||[]).map(R=>R.id),$=x().reduce((R,T)=>{const L=T.parentNode||T.parentId,M=!C.includes(T.id)&&L&&R.find(F=>F.id===L);return(typeof T.deletable=="boolean"?T.deletable:!0)&&(C.includes(T.id)||M)&&R.push(T),R},[]),D=w.filter(R=>typeof R.deletable=="boolean"?R.deletable:!0),A=D.filter(R=>k.includes(R.id));if($||A){const R=K7($,D),T=[...A,...R],L=T.reduce((M,I)=>(M.includes(I.id)||M.push(I.id),M),[]);if((j||S)&&(j&&t.setState({edges:w.filter(M=>!L.includes(M.id))}),S&&($.forEach(M=>{y.delete(M.id)}),t.setState({nodeInternals:new Map(y)}))),L.length>0&&(_==null||_(T),O&&O(L.map(M=>({id:M,type:"remove"})))),$.length>0&&(E==null||E($),N)){const M=$.map(I=>({id:I.id,type:"remove"}));N(M)}}},[]),h=b.useCallback(m=>{const v=w5e(m),y=v?null:t.getState().nodeInternals.get(m.id);return!v&&!y?[null,null,v]:[v?m:hD(y),y,v]},[]),p=b.useCallback((m,v=!0,y)=>{const[x,w,S]=h(m);return x?(y||t.getState().getNodes()).filter(j=>{if(!S&&(j.id===w.id||!j.positionAbsolute))return!1;const E=hD(j),_=JE(E,x);return v&&_>0||_>=x.width*x.height}):[]},[]),g=b.useCallback((m,v,y=!0)=>{const[x]=h(m);if(!x)return!1;const w=JE(x,v);return y&&w>0||w>=x.width*x.height},[]);return b.useMemo(()=>({...e,getNodes:r,getNode:n,getEdges:i,getEdge:s,setNodes:a,setEdges:o,addNodes:c,addEdges:u,toObject:d,deleteElements:f,getIntersectingNodes:p,isNodeIntersecting:g}),[e,r,n,i,s,a,o,c,u,d,f,p,g])}const tBe={actInsideInputWithModifier:!1};var rBe=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const r=Dr(),{deleteElements:n}=JC(),i=Mm(e,tBe),s=Mm(t);b.useEffect(()=>{if(i){const{edges:a,getNodes:o}=r.getState(),c=o().filter(d=>d.selected),u=a.filter(d=>d.selected);n({nodes:c,edges:u}),r.setState({nodesSelectionActive:!1})}},[i]),b.useEffect(()=>{r.setState({multiSelectionActive:s})},[s])};function nBe(e){const t=Dr();b.useEffect(()=>{let r;const n=()=>{var s,a;if(!e.current)return;const i=VC(e.current);(i.height===0||i.width===0)&&((a=(s=t.getState()).onError)==null||a.call(s,"004",Va.error004())),t.setState({width:i.width||500,height:i.height||500})};return n(),window.addEventListener("resize",n),e.current&&(r=new ResizeObserver(()=>n()),r.observe(e.current)),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}},[])}const eP={position:"absolute",width:"100%",height:"100%",top:0,left:0},iBe=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Mv=e=>({x:e.x,y:e.y,zoom:e.k}),mu=(e,t)=>e.target.closest(`.${t}`),jD=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),_D=e=>{const t=e.ctrlKey&&w0()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},sBe=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),aBe=({onMove:e,onMoveStart:t,onMoveEnd:r,onPaneContextMenu:n,zoomOnScroll:i=!0,zoomOnPinch:s=!0,panOnScroll:a=!1,panOnScrollSpeed:o=.5,panOnScrollMode:c=Kl.Free,zoomOnDoubleClick:u=!0,elementsSelectable:d,panOnDrag:f=!0,defaultViewport:h,translateExtent:p,minZoom:g,maxZoom:m,zoomActivationKeyCode:v,preventScrolling:y=!0,children:x,noWheelClassName:w,noPanClassName:S})=>{const j=b.useRef(),E=Dr(),_=b.useRef(!1),N=b.useRef(!1),O=b.useRef(null),C=b.useRef({x:0,y:0,zoom:0}),{d3Zoom:k,d3Selection:$,d3ZoomHandler:D,userSelectionActive:A}=tr(sBe,Qr),R=Mm(v),T=b.useRef(0),L=b.useRef(!1),M=b.useRef();return nBe(O),b.useEffect(()=>{if(O.current){const I=O.current.getBoundingClientRect(),F=h5e().scaleExtent([g,m]).translateExtent(p),U=ts(O.current).call(F),V=Ho.translate(h.x,h.y).scale(mf(h.zoom,g,m)),G=[[0,0],[I.width,I.height]],Z=F.constrain()(V,G,p);F.transform(U,Z),F.wheelDelta(_D),E.setState({d3Zoom:F,d3Selection:U,d3ZoomHandler:U.on("wheel.zoom"),transform:[Z.x,Z.y,Z.k],domNode:O.current.closest(".react-flow")})}},[]),b.useEffect(()=>{$&&k&&(a&&!R&&!A?$.on("wheel.zoom",I=>{if(mu(I,w))return!1;I.preventDefault(),I.stopImmediatePropagation();const F=$.property("__zoom").k||1;if(I.ctrlKey&&s){const ge=js(I),Y=_D(I),ee=F*Math.pow(2,Y);k.scaleTo($,ee,ge,I);return}const U=I.deltaMode===1?20:1;let V=c===Kl.Vertical?0:I.deltaX*U,G=c===Kl.Horizontal?0:I.deltaY*U;!w0()&&I.shiftKey&&c!==Kl.Vertical&&(V=I.deltaY*U,G=0),k.translateBy($,-(V/F)*o,-(G/F)*o,{internal:!0});const Z=Mv($.property("__zoom")),{onViewportChangeStart:he,onViewportChange:ve,onViewportChangeEnd:re}
629=E.getState();clearTimeout(M.current),L.current||(L.current=!0,t==null||t(I,Z),he==null||he(Z)),L.current&&(e==null||e(I,Z),ve==null||ve(Z),M.current=setTimeout(()=>{r==null||r(I,Z),re==null||re(Z),L.current=!1},150))},{passive:!1}):typeof D<"u"&&$.on("wheel.zoom",function(I,F){if(!y&&I.type==="wheel"&&!I.ctrlKey||mu(I,w))return null;I.preventDefault(),D.call(this,I,F)},{passive:!1}))},[A,a,c,$,k,D,R,s,y,w,t,e,r]),b.useEffect(()=>{k&&k.on("start",I=>{var V,G;if(!I.sourceEvent||I.sourceEvent.internal)return null;T.current=(V=I.sourceEvent)==null?void 0:V.button;const{onViewportChangeStart:F}=E.getState(),U=Mv(I.transform);_.current=!0,C.current=U,((G=I.sourceEvent)==null?void 0:G.type)==="mousedown"&&E.setState({paneDragging:!0}),F==null||F(U),t==null||t(I.sourceEvent,U)})},[k,t]),b.useEffect(()=>{k&&(A&&!_.current?k.on("zoom",null):A||k.on("zoom",I=>{var U;const{onViewportChange:F}=E.getState();if(E.setState({transform:[I.transform.x,I.transform.y,I.transform.k]}),N.current=!!(n&&jD(f,T.current??0)),(e||F)&&!((U=I.sourceEvent)!=null&&U.internal)){const V=Mv(I.transform);F==null||F(V),e==null||e(I.sourceEvent,V)}}))},[A,k,e,f,n]),b.useEffect(()=>{k&&k.on("end",I=>{if(!I.sourceEvent||I.sourceEvent.internal)return null;const{onViewportChangeEnd:F}=E.getState();if(_.current=!1,E.setState({paneDragging:!1}),n&&jD(f,T.current??0)&&!N.current&&n(I.sourceEvent),N.current=!1,(r||F)&&iBe(C.current,I.transform)){const U=Mv(I.transform);C.current=U,clearTimeout(j.current),j.current=setTimeout(()=>{F==null||F(U),r==null||r(I.sourceEvent,U)},a?150:0)}})},[k,a,f,r,n]),b.useEffect(()=>{k&&k.filter(I=>{const F=R||i,U=s&&I.ctrlKey;if((f===!0||Array.isArray(f)&&f.includes(1))&&I.button===1&&I.type==="mousedown"&&(mu(I,"react-flow__node")||mu(I,"react-flow__edge")))return!0;if(!f&&!F&&!a&&!u&&!s||A||!u&&I.type==="dblclick"||mu(I,w)&&I.type==="wheel"||mu(I,S)&&(I.type!=="wheel"||a&&I.type==="wheel"&&!R)||!s&&I.ctrlKey&&I.type==="wheel"||!F&&!a&&!U&&I.type==="wheel"||!f&&(I.type==="mousedown"||I.type==="touchstart")||Array.isArray(f)&&!f.includes(I.button)&&I.type==="mousedown")return!1;const V=Array.isArray(f)&&f.includes(I.button)||!I.button||I.button<=1;return(!I.ctrlKey||I.type==="wheel")&&V})},[A,k,i,s,a,u,f,d,R]),P.createElement("div",{className:"react-flow__renderer",ref:O,style:eP},x)},oBe=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function lBe(){const{userSelectionActive:e,userSelectionRect:t}=tr(oBe,Qr);return e&&t?P.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function ED(e,t){const r=t.parentNode||t.parentId,n=e.find(i=>i.id===r);if(n){const i=t.position.x+t.width-n.width,s=t.position.y+t.height-n.height;if(i>0||s>0||t.position.x<0||t.position.y<0){if(n.style={...n.style},n.style.width=n.style.width??n.width,n.style.height=n.style.height??n.height,i>0&&(n.style.width+=i),s>0&&(n.style.height+=s),t.position.x<0){const a=Math.abs(t.position.x);n.position.x=n.position.x-a,n.style.width+=a,t.position.x=0}if(t.position.y<0){const a=Math.abs(t.position.y);n.position.y=n.position.y-a,n.style.height+=a,t.position.y=0}n.width=n.style.width,n.height=n.style.height}}}function uq(e,t){if(e.some(n=>n.type==="reset"))return e.filter(n=>n.type==="reset").map(n=>n.item);const r=e.filter(n=>n.type==="add").map(n=>n.item);return t.reduce((n,i)=>{const s=e.filter(o=>o.id===i.id);if(s.length===0)return n.push(i),n;const a={...i};for(const o of s)if(o)switch(o.type){case"select":{a.selected=o.selected;break}case"position":{typeof o.position<"u"&&(a.position=o.position),typeof o.positionAbsolute<"u"&&(a.positionAbsolute=o.positionAbsolute),typeof o.dragging<"u"&&(a.dragging=o.dragging),a.expandParent&&ED(n,a);break}case"dimensions":{typeof o.dimensions<"u"&&(a.width=o.dimensions.width,a.height=o.dimensions.height),typeof o.updateStyle<"u"&&(a.style={...a.style||{},...o.dimensions}),typeof o.resizing=="boolean"&&(a.resizing=o.resizing),a.expandParent&&ED(n,a);break}case"remove":return n}return n.push(a),n},r)}function dq(e,t){return uq(e,t)}function cBe(e,t){return uq(e,t)}const uo=(e,t)=>({id:e,type:"select",selected:t});function Bu(e,t){return e.reduce((r,n)=>
629{const i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(uo(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(uo(n.id,!1))),r},[])}const pS=(e,t)=>r=>{r.target===t.current&&(e==null||e(r))},uBe=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),fq=b.memo(({isSelecting:e,selectionMode:t=Im.Full,panOnDrag:r,onSelectionStart:n,onSelectionEnd:i,onPaneClick:s,onPaneContextMenu:a,onPaneScroll:o,onPaneMouseEnter:c,onPaneMouseMove:u,onPaneMouseLeave:d,children:f})=>{const h=b.useRef(null),p=Dr(),g=b.useRef(0),m=b.useRef(0),v=b.useRef(),{userSelectionActive:y,elementsSelectable:x,dragging:w}=tr(uBe,Qr),S=()=>{p.setState({userSelectionActive:!1,userSelectionRect:null}),g.current=0,m.current=0},j=D=>{s==null||s(D),p.getState().resetSelectedElements(),p.setState({nodesSelectionActive:!1})},E=D=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){D.preventDefault();return}a==null||a(D)},_=o?D=>o(D):void 0,N=D=>{const{resetSelectedElements:A,domNode:R}=p.getState();if(v.current=R==null?void 0:R.getBoundingClientRect(),!x||!e||D.button!==0||D.target!==h.current||!v.current)return;const{x:T,y:L}=qo(D,v.current);A(),p.setState({userSelectionRect:{width:0,height:0,startX:T,startY:L,x:T,y:L}}),n==null||n(D)},O=D=>{const{userSelectionRect:A,nodeInternals:R,edges:T,transform:L,onNodesChange:M,onEdgesChange:I,nodeOrigin:F,getNodes:U}=p.getState();if(!e||!v.current||!A)return;p.setState({userSelectionActive:!0,nodesSelectionActive:!1});const V=qo(D,v.current),G=A.startX??0,Z=A.startY??0,he={...A,x:V.x<G?V.x:G,y:V.y<Z?V.y:Z,width:Math.abs(V.x-G),height:Math.abs(V.y-Z)},ve=U(),re=q7(R,he,L,t===Im.Partial,!0,F),ge=K7(re,T).map(ee=>ee.id),Y=re.map(ee=>ee.id);if(g.current!==Y.length){g.current=Y.length;const ee=Bu(ve,Y);ee.length&&(M==null||M(ee))}if(m.current!==ge.length){m.current=ge.length;const ee=Bu(T,ge);ee.length&&(I==null||I(ee))}p.setState({userSelectionRect:he})},C=D=>{if(D.button!==0)return;const{userSelectionRect:A}=p.getState();!y&&A&&D.target===h.current&&(j==null||j(D)),p.setState({nodesSelectionActive:g.current>0}),S(),i==null||i(D)},k=D=>{y&&(p.setState({nodesSelectionActive:g.current>0}),i==null||i(D)),S()},$=x&&(e||y);return P.createElement("div",{className:bn(["react-flow__pane",{dragging:w,selection:e}]),onClick:$?void 0:pS(j,h),onContextMenu:pS(E,h),onWheel:pS(_,h),onMouseEnter:$?void 0:c,onMouseDown:$?N:void 0,onMouseMove:$?O:u,onMouseUp:$?C:void 0,onMouseLeave:$?k:d,ref:h,style:eP},f,P.createElement(lBe,null))});fq.displayName="Pane";function hq(e,t){const r=e.parentNode||e.parentId;if(!r)return!1;const n=t.get(r);return n?n.selected?!0:hq(n,t):!1}function ND(e,t,r){let n=e;do{if(n!=null&&n.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function dBe(e,t,r,n){return Array.from(e.values()).filter(i=>(i.selected||i.id===n)&&(!i.parentNode||i.parentId||!hq(i,e))&&(i.draggable||t&&typeof i.draggable>"u")).map(i=>{var s,a;return{id:i.id,position:i.position||{x:0,y:0},positionAbsolute:i.positionAbsolute||{x:0,y:0},distance:{x:r.x-(((s=i.positionAbsolute)==null?void 0:s.x)??0),y:r.y-(((a=i.positionAbsolute)==null?void 0:a.y)??0)},delta:{x:0,y:0},extent:i.extent,parentNode:i.parentNode||i.parentId,parentId:i.parentNode||i.parentId,width:i.width,height:i.height,expandParent:i.expandParent}})}function fBe(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function pq(e,t,r,n,i=[0,0],s){const a=fBe(e,e.extent||n);let o=a;const c=e.parentNode||e.parentId;if(e.extent==="parent"&&!e.expandParent)if(c&&e.width&&e.height){const f=r.get(c),{x:h,y:p}=nd(f,i).positionAbsolute;o=f&&wi(h)&&wi(p)&&wi(f.width)&&wi(f.height)?[[h+e.width*i[0],p+e.height*i[1]],[h+f.width-e.width+e.width*i[0],p+f.height-e.height+e.height*i[1]]]:o}else s==null||s("005",Va.error005()),o=a;else if(e.extent&&c&&e.extent!=="parent"){const f=r.get(c),{x:h,y:p}=nd(f,i).positionAbsolute;o=[[e.extent[0][0]+h,e.extent[0][1]+p],[e.extent[1][0]+h,e.extent[1][1]+p]]}let u={x:0,y:0};if(c){const f=r.get(c);u=nd(f,i).positionAbsolute}const d=o&&o!=="parent"?WC(t,o):t;return{position:{x:d.x-u.x,y:d.y-u.y},positionAbsolute:d}}function mS({nodeId:e,dragItems:t,nodeInternals:r}){const n=t.map(i=>({...r.get(i.id),position:i.position,positionAbsolute:i.positionAbsolute}));return[e?n.find(i=>i.id===e):n[0],n]}const OD=(e,t,r,n)=>{const i=t.querySelectorAll(e);if(!i||!i.length)return null;const s=Array.from(i),a=t.getBoundingClientRect(),o={x:a.width*n[0],y:a.height*n[1]};return s.map(c=>{const u=c.getBoundingClientRect();return{id:c.getAttribute("data-handleid"),position:c.getAttribute("data-handlepos"),x:(u.left-a.left-o.x)/r,y:(u.top-a.top-o.y)/r,...VC(c)}})};function Ch(e,t,r){return r===void 0?r:n=>{const i=t().nodeInternals.get(e);i&&r(n,{...i})}}function sN({id:e,store:t,unselect:r=!1,nodeRef:n}){const{addSelectedNodes:i,unselectNodesAndEdges:s,multiSelectionActive:a,nodeInternals:o,onError:c}=t.getState(),u=o.get(e);if(!u){c==null||c("012",Va.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(r||u.selected&&a)&&(s({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var d;return(d=n==null?void 0:n.current)==null?void 0:d.blur()})):i([e])}function hBe(){const e=Dr();return b.useCallback(({sourceEvent:r})=>
629{const{transform:n,snapGrid:i,snapToGrid:s}=e.getState(),a=r.touches?r.touches[0].clientX:r.clientX,o=r.touches?r.touches[0].clientY:r.clientY,c={x:(a-n[0])/n[2],y:(o-n[1])/n[2]};return{xSnapped:s?i[0]*Math.round(c.x/i[0]):c.x,ySnapped:s?i[1]*Math.round(c.y/i[1]):c.y,...c}},[])}function gS(e){return(t,r,n)=>e==null?void 0:e(t,n)}function mq({nodeRef:e,disabled:t=!1,noDragClassName:r,handleSelector:n,nodeId:i,isSelectable:s,selectNodesOnDrag:a}){const o=Dr(),[c,u]=b.useState(!1),d=b.useRef([]),f=b.useRef({x:null,y:null}),h=b.useRef(0),p=b.useRef(null),g=b.useRef({x:0,y:0}),m=b.useRef(null),v=b.useRef(!1),y=b.useRef(!1),x=b.useRef(!1),w=hBe();return b.useEffect(()=>{if(e!=null&&e.current){const S=ts(e.current),j=({x:N,y:O})=>{const{nodeInternals:C,onNodeDrag:k,onSelectionDrag:$,updateNodePositions:D,nodeExtent:A,snapGrid:R,snapToGrid:T,nodeOrigin:L,onError:M}=o.getState();f.current={x:N,y:O};let I=!1,F={x:0,y:0,x2:0,y2:0};if(d.current.length>1&&A){const V=XC(d.current,L);F=HC(V)}if(d.current=d.current.map(V=>{const G={x:N-V.distance.x,y:O-V.distance.y};T&&(G.x=R[0]*Math.round(G.x/R[0]),G.y=R[1]*Math.round(G.y/R[1]));const Z=[[A[0][0],A[0][1]],[A[1][0],A[1][1]]];d.current.length>1&&A&&!V.extent&&(Z[0][0]=V.positionAbsolute.x-F.x+A[0][0],Z[1][0]=V.positionAbsolute.x+(V.width??0)-F.x2+A[1][0],Z[0][1]=V.positionAbsolute.y-F.y+A[0][1],Z[1][1]=V.positionAbsolute.y+(V.height??0)-F.y2+A[1][1]);const he=pq(V,G,C,Z,L,M);return I=I||V.position.x!==he.position.x||V.position.y!==he.position.y,V.position=he.position,V.positionAbsolute=he.positionAbsolute,V}),!I)return;D(d.current,!0,!0),u(!0);const U=i?k:gS($);if(U&&m.current){const[V,G]=mS({nodeId:i,dragItems:d.current,nodeInternals:C});U(m.current,V,G)}},E=()=>{if(!p.current)return;const[N,O]=M7(g.current,p.current);if(N!==0||O!==0){const{transform:C,panBy:k}=o.getState();f.current.x=(f.current.x??0)-N/C[2],f.current.y=(f.current.y??0)-O/C[2],k({x:N,y:O})&&j(f.current)}h.current=requestAnimationFrame(E)},_=N=>{var L;const{nodeInternals:O,multiSelectionActive:C,nodesDraggable:k,unselectNodesAndEdges:$,onNodeDragStart:D,onSelectionDragStart:A}=o.getState();y.current=!0;const R=i?D:gS(A);(!a||!s)&&!C&&i&&((L=O.get(i))!=null&&L.selected||$()),i&&s&&a&&sN({id:i,store:o,nodeRef:e});const T=w(N);if(f.current=T,d.current=dBe(O,k,T,i),R&&d.current){const[M,I]=mS({nodeId:i,dragItems:d.current,nodeInternals:O});R(N.sourceEvent,M,I)}};if(t)S.on(".drag",null);else{const N=Y3e().on("start",O=>{const{domNode:C,nodeDragThreshold:k}=o.getState();k===0&&_(O),x.current=!1;const $=w(O);f.current=$,p.current=(C==null?void 0:C.getBoundingClientRect())||null,g.current=qo(O.sourceEvent,p.current)}).on("drag",O=>{var D,A;const C=w(O),{autoPanOnNodeDrag:k,nodeDragThreshold:$}=o.getState();if(O.sourceEvent.type==="touchmove"&&O.sourceEvent.touches.length>1&&(x.current=!0),!x.current){if(!v.current&&y.current&&k&&(v.current=!0,E()),!y.current){const R=C.xSnapped-(((D=f==null?void 0:f.current)==null?void 0:D.x)??0),T=C.ySnapped-(((A=f==null?void 0:f.current)==null?void 0:A.y)??0);Math.sqrt(R*R+T*T)>$&&_(O)}(f.current.x!==C.xSnapped||f.current.y!==C.ySnapped)&&d.current&&y.current&&(m.current=O.sourceEvent,g.current=qo(O.sourceEvent,p.current),j(C))}}).on("end",O=>{if(!(!y.current||x.current)&&(u(!1),v.current=!1,y.current=!1,cancelAnimationFrame(h.current),d.current)){const{updateNodePositions:C,nodeInternals:k,onNodeDragStop:$,onSelectionDragStop:D}=o.getState(),A=i?$:gS(D);if(C(d.current,!1,!1),A){const[R,T]=mS({nodeId:i,dragItems:d.current,nodeInternals:k});A(O.sourceEvent,R,T)}}}).filter(O=>{const C=O.target;return!O.button&&(!r||!ND(C,`.${r}`,e))&&(!n||ND(C,n,e))});return S.call(N),()=>{S.on(".drag",null)}}}},[e,t,r,n,s,o,i,a,w]),c}function gq(){const e=Dr();return b.useCallback(r=>{const{nodeInternals:n,nodeExtent:i,updateNodePositions:s,getNodes:a,snapToGrid:o,snapGrid:c,onError:u,nodesDraggable:d}=e.getState(),f=a().filter(x=>x.selected&&(x.draggable||d&&typeof x.draggable>"u")),h=o?c[0]:5,p=o?c[1]:5,g=r.isShiftPressed?4:1,m=r.x*h*g,v=r.y*p*g,y=f.map(x=>{if(x.positionAbsolute){const w={x:x.positionAbsolute.x+m,y:x.positionAbsolute.y+v};o&&(w.x=c[0]*Math.round(w.x/c[0]),w.y=c[1]*Math.round(w.y/c[1]));const{positionAbsolute:S,position:j}=pq(x,w,n,i,void 0,u);x.position=j,x.positionAbsolute=S}return x});s(y,!0,!1)},[])}const id={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Ph=e=>{const t=({id:r,type:n,data:i,xPos:s,yPos:a,xPosOrigin:o,yPosOrigin:c,selected:u,onClick:d,onMouseEnter:f,onMouseMove:h,onMouseLeave:p,onContextMenu:g,onDoubleClick:m,style:v,className:y,isDraggable:x,isSelectable:w,isConnectable:S,isFocusable:j,selectNodesOnDrag:E,sourcePosition:_,targetPosition:N,hidden:O,resizeObserver:C,dragHandle:k,zIndex:$,isParent:D,noDragClassName:A,noPanClassName:R,initialized:T,disableKeyboardA11y:L,ariaLabel:M,rfId:I,hasHandleBounds:F})=>{const U=Dr(),V=b.useRef(null),G=b.useRef(null),Z=b.useRef(_),he=b.useRef(N),ve=b.useRef(n),re=w||x||d||f||h||p,ge=gq(),Y=Ch(r,U.getState,f),ee=Ch(r,U.getState,h),q=Ch(r,U.getState,p),W=Ch(r,U.getState,g),Fe=Ch(r,U.getState,m),Ae=We=>{const{nodeDragThreshold:_e}=U.getState();if(w&&(!E||!x||_e>0)&&sN({id:r,store:U,nodeRef:V}),d){const St=U.getState().nodeInternals.get(r);St&&d(We,{...St})}},Ue=We=>{if(!eN(We)&&!L)if(L7.includes(We.key)&&w){const _e=We.key==="Escape";sN({id:r,store:U,unselect:_e,nodeRef:V})}else x&&u&&Object.prototype.hasOwnProperty.call(id,We.key)&&(U.setState({ariaLiveMessage:`Moved selected node ${We.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~s}, y: ${~~a}`}),ge({x:id[We.key].x,y:id[We.key].y,isShiftPressed:We.shiftKey}
629))};b.useEffect(()=>()=>{G.current&&(C==null||C.unobserve(G.current),G.current=null)},[]),b.useEffect(()=>{if(V.current&&!O){const We=V.current;(!T||!F||G.current!==We)&&(G.current&&(C==null||C.unobserve(G.current)),C==null||C.observe(We),G.current=We)}},[O,T,F]),b.useEffect(()=>{const We=ve.current!==n,_e=Z.current!==_,St=he.current!==N;V.current&&(We||_e||St)&&(We&&(ve.current=n),_e&&(Z.current=_),St&&(he.current=N),U.getState().updateNodeDimensions([{id:r,nodeElement:V.current,forceUpdate:!0}]))},[r,n,_,N]);const nt=mq({nodeRef:V,disabled:O||!x,noDragClassName:A,handleSelector:k,nodeId:r,isSelectable:w,selectNodesOnDrag:E});return O?null:P.createElement("div",{className:bn(["react-flow__node",`react-flow__node-${n}`,{[R]:x},y,{selected:u,selectable:w,parent:D,dragging:nt}]),ref:V,style:{zIndex:$,transform:`translate(${o}px,${c}px)`,pointerEvents:re?"all":"none",visibility:T?"visible":"hidden",...v},"data-id":r,"data-testid":`rf__node-${r}`,onMouseEnter:Y,onMouseMove:ee,onMouseLeave:q,onContextMenu:W,onClick:Ae,onDoubleClick:Fe,onKeyDown:j?Ue:void 0,tabIndex:j?0:void 0,role:j?"button":void 0,"aria-describedby":L?void 0:`${sq}-${I}`,"aria-label":M},P.createElement(A5e,{value:r},P.createElement(e,{id:r,data:i,type:n,xPos:s,yPos:a,selected:u,isConnectable:S,sourcePosition:_,targetPosition:N,dragging:nt,dragHandle:k,zIndex:$})))};return t.displayName="NodeWrapper",b.memo(t)};const pBe=e=>{const t=e.getNodes().filter(r=>r.selected);return{...XC(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function mBe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:r}){const n=Dr(),{width:i,height:s,x:a,y:o,transformString:c,userSelectionActive:u}=tr(pBe,Qr),d=gq(),f=b.useRef(null);if(b.useEffect(()=>{var g;r||(g=f.current)==null||g.focus({preventScroll:!0})},[r]),mq({nodeRef:f}),u||!i||!s)return null;const h=e?g=>{const m=n.getState().getNodes().filter(v=>v.selected);e(g,m)}:void 0,p=g=>{Object.prototype.hasOwnProperty.call(id,g.key)&&d({x:id[g.key].x,y:id[g.key].y,isShiftPressed:g.shiftKey})};return P.createElement("div",{className:bn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:c}},P.createElement("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:r?void 0:-1,onKeyDown:r?void 0:p,style:{width:i,height:s,top:o,left:a}}))}var gBe=b.memo(mBe);const vBe=e=>e.nodesSelectionActive,vq=({children:e,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:n,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:a,deleteKeyCode:o,onMove:c,onMoveStart:u,onMoveEnd:d,selectionKeyCode:f,selectionOnDrag:h,selectionMode:p,onSelectionStart:g,onSelectionEnd:m,multiSelectionKeyCode:v,panActivationKeyCode:y,zoomActivationKeyCode:x,elementsSelectable:w,zoomOnScroll:S,zoomOnPinch:j,panOnScroll:E,panOnScrollSpeed:_,panOnScrollMode:N,zoomOnDoubleClick:O,panOnDrag:C,defaultViewport:k,translateExtent:$,minZoom:D,maxZoom:A,preventScrolling:R,onSelectionContextMenu:T,noWheelClassName:L,noPanClassName:M,disableKeyboardA11y:I})=>{const F=tr(vBe),U=Mm(f),V=Mm(y),G=V||C,Z=V||E,he=U||h&&G!==!0;return rBe({deleteKeyCode:o,multiSelectionKeyCode:v}),P.createElement(aBe,{onMove:c,onMoveStart:u,onMoveEnd:d,onPaneContextMenu:s,elementsSelectable:w,zoomOnScroll:S,zoomOnPinch:j,panOnScroll:Z,panOnScrollSpeed:_,panOnScrollMode:N,zoomOnDoubleClick:O,panOnDrag:!U&&G,defaultViewport:k,translateExtent:$,minZoom:D,maxZoom:A,zoomActivationKeyCode:x,preventScrolling:R,noWheelClassName:L,noPanClassName:M},P.createElement(fq,{onSelectionStart:g,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:n,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:a,panOnDrag:G,isSelecting:!!he,selectionMode:p},e,F&&P.createElement(gBe,{onSelectionContextMenu:T,noPanClassName:M,disableKeyboardA11y:I})))};vq.displayName="FlowRenderer";var yBe=b.memo(vq);function xBe(e){return tr(b.useCallback(r=>e?q7(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):r.getNodes(),[e]))}function bBe(e){const t={input:Ph(e.input||tq),default:Ph(e.default||iN),output:Ph(e.output||nq),group:Ph(e.group||ZC)},r={},n=Object.keys(e).filter(i=>!["input","default","output","group"].includes(i)).reduce((i,s)=>(i[s]=Ph(e[s]||iN),i),r);return{...t,...n}}const wBe=({x:e,y:t,width:r,height:n,origin:i})=>!r||!n?{x:e,y:t}:i[0]<0||i[1]<0||i[0]>1||i[1]>1?{x:e,y:t}:{x:e-r*i[0],y:t-n*i[1]},SBe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,no
629desFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),yq=e=>{const{nodesDraggable:t,nodesConnectable:r,nodesFocusable:n,elementsSelectable:i,updateNodeDimensions:s,onError:a}=tr(SBe,Qr),o=xBe(e.onlyRenderVisibleElements),c=b.useRef(),u=b.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const d=new ResizeObserver(f=>{const h=f.map(p=>({id:p.target.getAttribute("data-id"),nodeElement:p.target,forceUpdate:!0}));s(h)});return c.current=d,d},[]);return b.useEffect(()=>()=>{var d;(d=c==null?void 0:c.current)==null||d.disconnect()},[]),P.createElement("div",{className:"react-flow__nodes",style:eP},o.map(d=>{var j,E,_;let f=d.type||"default";e.nodeTypes[f]||(a==null||a("003",Va.error003(f)),f="default");const h=e.nodeTypes[f]||e.nodeTypes.default,p=!!(d.draggable||t&&typeof d.draggable>"u"),g=!!(d.selectable||i&&typeof d.selectable>"u"),m=!!(d.connectable||r&&typeof d.connectable>"u"),v=!!(d.focusable||n&&typeof d.focusable>"u"),y=e.nodeExtent?WC(d.positionAbsolute,e.nodeExtent):d.positionAbsolute,x=(y==null?void 0:y.x)??0,w=(y==null?void 0:y.y)??0,S=wBe({x,y:w,width:d.width??0,height:d.height??0,origin:e.nodeOrigin});return P.createElement(h,{key:d.id,id:d.id,className:d.className,style:d.style,type:f,data:d.data,sourcePosition:d.sourcePosition||De.Bottom,targetPosition:d.targetPosition||De.Top,hidden:d.hidden,xPos:x,yPos:w,xPosOrigin:S.x,yPosOrigin:S.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!d.selected,isDraggable:p,isSelectable:g,isConnectable:m,isFocusable:v,resizeObserver:u,dragHandle:d.dragHandle,zIndex:((j=d[cr])==null?void 0:j.z)??0,isParent:!!((E=d[cr])!=null&&E.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!d.width&&!!d.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:d.ariaLabel,hasHandleBounds:!!((_=d[cr])!=null&&_.handleBounds)})}))};yq.displayName="NodeRenderer";var jBe=b.memo(yq);const _Be=(e,t,r)=>r===De.Left?e-t:r===De.Right?e+t:e,EBe=(e,t,r)=>r===De.Top?e-t:r===De.Bottom?e+t:e,AD="react-flow__edgeupdater",CD=({position:e,centerX:t,centerY:r,radius:n=10,onMouseDown:i,onMouseEnter:s,onMouseOut:a,type:o})=>P.createElement("circle",{onMouseDown:i,onMouseEnter:s,onMouseOut:a,className:bn([AD,`${AD}-${o}`]),cx:_Be(t,n,e),cy:EBe(r,n,e),r:n,stroke:"transparent",fill:"transparent"}),NBe=()=>!0;var gu=e=>{const t=({id:r,className:n,type:i,data:s,onClick:a,onEdgeDoubleClick:o,selected:c,animated:u,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:m,style:v,source:y,target:x,sourceX:w,sourceY:S,targetX:j,targetY:E,sourcePosition:_,targetPosition:N,elementsSelectable:O,hidden:C,sourceHandleId:k,targetHandleId:$,onContextMenu:D,onMouseEnter:A,onMouseMove:R,onMouseLeave:T,reconnectRadius:L,onReconnect:M,onReconnectStart:I,onReconnectEnd:F,markerEnd:U,markerStart:V,rfId:G,ariaLabel:Z,isFocusable:he,isReconnectable:ve,pathOptions:re,interactionWidth:ge,disableKeyboardA11y:Y})=>{const ee=b.useRef(null),[q,W]=b.useState(!1),[Fe,Ae]=b.useState(!1),Ue=Dr(),nt=b.useMemo(()=>`url('#${rN(V,G)}')`,[V,G]),We=b.useMemo(()=>`url('#${rN(U,G)}')`,[U,G]);if(C)return null;const _e=Ct=>{var ai;const{edges:ne,addSelectedEdges:Pe,unselectNodesAndEdges:Gt,multiSelectionActive:$i}=Ue.getState(),si=ne.find(Xa=>Xa.id===r);si&&(O&&(Ue.setState({nodesSelectionActive:!1}),si.selected&&$i?(Gt({nodes:[],edges:[si]}),(ai=ee.current)==null||ai.blur()):Pe([r])),a&&a(Ct,si))},St=Ah(r,Ue.getState,o),B=Ah(r,Ue.getState,D),H=Ah(r,Ue.getState,A),K=Ah(r,Ue.getState,R),me=Ah(r,Ue.getState,T),oe=(Ct,ne)=>{if(Ct.button!==0)return;const{edges:Pe,isValidConnection:Gt}=Ue.getState(),$i=ne?x:y,si=(ne?$:k)||null,ai=ne?"target":"source",Xa=Gt||NBe,Aw=ne,Qf=Pe.find(yl=>yl.id===r);Ae(!0),I==null||I(Ct,Qf,ai);const Cw=yl=>{Ae(!1),F==null||F(yl,Qf,ai)};Q7({event:Ct,handleId:si,nodeId:$i,onConnect:yl=>M==null?void 0:M(Qf,yl),isTarget:Aw,getState:Ue.getState,setState:Ue.setState,isValidConnection:Xa,edgeUpdaterType:ai,onReconnectEnd:Cw})},ae=Ct=>oe(Ct,!0),Ce=Ct=>oe(Ct,!1),st=()=>W(!0),ft=()=>W(!1),rr=!O&&!a,$n=Ct=>{var ne;if(!Y&&L7.includes(Ct.key)&&O){const{unselectNodesAndEdges:Pe,addSelectedEdges:Gt,edges:$i}=Ue.getState();Ct.key==="Escape"?((ne=ee.current)==null||ne.blur(),Pe({edges:[$i.find(ai=>ai.id===r)]})):Gt([r])}};return P.createElement("g",{className:bn(["react-flow__edge",`react-flow__edge-${i}`,n,{selected:c,animated:u,inactive:rr,updating:q}]),onClick:_e,onDoubleClick:St,onContextMenu:B,onMouseEnter:H,onMouseMove:K,onMouseLeave:me,onKeyDown:he?$n:void 0,tabIndex:he?0:void 0,role:he?"button":"img","data-testid":`rf__edge-${r}`,"aria-label":Z===null?void 0:Z||`Edge from ${y} to ${x}`,"aria-describedby":he?`${aq}-${G}`:void 0,ref:ee},!Fe&&P.createElement(e,{id:r,source:y,target:x,selected:c,animated:u,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:m,data:s,style:v,sourceX:w,sourceY:S,targetX:j,targetY:E,sourcePosition:_,targetPosition:N,sourceHandleId:k,targetHandleId:$,markerStart:nt,markerEnd:We,pathOptions:re,interactionWidth:ge}),ve&&P.createElement(P.Fragment,null,(ve==="source"||ve===!0)&&P.createElement(CD,{position:_,centerX:w,centerY:S,radius:L,onMouseDown:ae,onMouseEnter:st,onMouseOut:ft,type:"source"}),(ve==="target"||ve===!0)&&P.createElement(CD,{position:N,centerX:j,centerY:E,radius:L,onMouseDown:Ce,onMouseEnter:st,onMouseOut:ft,type:"target"})))};return t.displayName="EdgeWrapper",b.memo(t)};function OBe(e){const t={default:gu(e.default||j0),straight:gu(e.bezier||GC),step:gu(e.step||KC),smoothstep:gu(e.step||Ew),simplebezier:gu(e.simplebezier||qC)},r={},n=Object.keys(e).filter(i=>!["default","bezier"].includes(i)).reduce((i,s)=>(i[s]=gu(e[s]||j0),i),r);return{...t,...n}}function PD(e,t,r=null){const n=((r==null?void 0:r.x)||0)+t.x,i=((r==null?void 0:r.y
629)||0)+t.y,s=(r==null?void 0:r.width)||t.width,a=(r==null?void 0:r.height)||t.height;switch(e){case De.Top:return{x:n+s/2,y:i};case De.Right:return{x:n+s,y:i+a/2};case De.Bottom:return{x:n+s/2,y:i+a};case De.Left:return{x:n,y:i+a/2}}}function TD(e,t){return e?e.length===1||!t?e[0]:t&&e.find(r=>r.id===t)||null:null}const ABe=(e,t,r,n,i,s)=>{const a=PD(r,e,t),o=PD(s,n,i);return{sourceX:a.x,sourceY:a.y,targetX:o.x,targetY:o.y}};function CBe({sourcePos:e,targetPos:t,sourceWidth:r,sourceHeight:n,targetWidth:i,targetHeight:s,width:a,height:o,transform:c}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+r,t.x+i),y2:Math.max(e.y+n,t.y+s)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const d=HC({x:(0-c[0])/c[2],y:(0-c[1])/c[2],width:a/c[2],height:o/c[2]}),f=Math.max(0,Math.min(d.x2,u.x2)-Math.max(d.x,u.x)),h=Math.max(0,Math.min(d.y2,u.y2)-Math.max(d.y,u.y));return Math.ceil(f*h)>0}function kD(e){var n,i,s,a,o;const t=((n=e==null?void 0:e[cr])==null?void 0:n.handleBounds)||null,r=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.x)<"u"&&typeof((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.y)<"u";return[{x:((a=e==null?void 0:e.positionAbsolute)==null?void 0:a.x)||0,y:((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!r]}const PBe=[{level:0,isMaxLevel:!0,edges:[]}];function TBe(e,t,r=!1){let n=-1;const i=e.reduce((a,o)=>{var d,f;const c=wi(o.zIndex);let u=c?o.zIndex:0;if(r){const h=t.get(o.target),p=t.get(o.source),g=o.selected||(h==null?void 0:h.selected)||(p==null?void 0:p.selected),m=Math.max(((d=p==null?void 0:p[cr])==null?void 0:d.z)||0,((f=h==null?void 0:h[cr])==null?void 0:f.z)||0,1e3);u=(c?o.zIndex:0)+(g?m:0)}return a[u]?a[u].push(o):a[u]=[o],n=u>n?u:n,a},{}),s=Object.entries(i).map(([a,o])=>{const c=+a;return{edges:o,level:c,isMaxLevel:c===n}});return s.length===0?PBe:s}function kBe(e,t,r){const n=tr(b.useCallback(i=>e?i.edges.filter(s=>{const a=t.get(s.source),o=t.get(s.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(o==null?void 0:o.width)&&(o==null?void 0:o.height)&&CBe({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:o.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:o.width,targetHeight:o.height,width:i.width,height:i.height,transform:i.transform})}):i.edges,[e,t]));return TBe(n,t,r)}const RBe=({color:e="none",strokeWidth:t=1})=>P.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),$Be=({color:e="none",strokeWidth:t=1})=>P.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),RD={[S0.Arrow]:RBe,[S0.ArrowClosed]:$Be};function IBe(e){const t=Dr();return b.useMemo(()=>{var i,s;return Object.prototype.hasOwnProperty.call(RD,e)?RD[e]:((s=(i=t.getState()).onError)==null||s.call(i,"009",Va.error009(e)),null)},[e])}const MBe=({id:e,type:t,color:r,width:n=12.5,height:i=12.5,markerUnits:s="strokeWidth",strokeWidth:a,orient:o="auto-start-reverse"})=>{const c=IBe(t);return c?P.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${n}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:o,refX:"0",refY:"0"},P.createElement(c,{color:r,strokeWidth:a})):null},DBe=({defaultColor:e,rfId:t})=>r=>{const n=[];return r.edges.reduce((i,s)=>
629([s.markerStart,s.markerEnd].forEach(a=>{if(a&&typeof a=="object"){const o=rN(a,t);n.includes(o)||(i.push({id:o,color:a.color||e,...a}),n.push(o))}}),i),[]).sort((i,s)=>i.id.localeCompare(s.id))},xq=({defaultColor:e,rfId:t})=>{const r=tr(b.useCallback(DBe({defaultColor:e,rfId:t}),[e,t]),(n,i)=>!(n.length!==i.length||n.some((s,a)=>s.id!==i[a].id)));return P.createElement("defs",null,r.map(n=>P.createElement(MBe,{id:n.id,key:n.id,type:n.type,color:n.color,width:n.width,height:n.height,markerUnits:n.markerUnits,strokeWidth:n.strokeWidth,orient:n.orient})))};xq.displayName="MarkerDefinitions";var LBe=b.memo(xq);const FBe=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),bq=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:r,rfId:n,edgeTypes:i,noPanClassName:s,onEdgeContextMenu:a,onEdgeMouseEnter:o,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,onEdgeDoubleClick:f,onReconnect:h,onReconnectStart:p,onReconnectEnd:g,reconnectRadius:m,children:v,disableKeyboardA11y:y})=>{const{edgesFocusable:x,edgesUpdatable:w,elementsSelectable:S,width:j,height:E,connectionMode:_,nodeInternals:N,onError:O}=tr(FBe,Qr),C=kBe(t,N,r);return j?P.createElement(P.Fragment,null,C.map(({level:k,edges:$,isMaxLevel:D})=>P.createElement("svg",{key:k,style:{zIndex:k},width:j,height:E,className:"react-flow__edges react-flow__container"},D&&P.createElement(LBe,{defaultColor:e,rfId:n}),P.createElement("g",null,$.map(A=>{const[R,T,L]=kD(N.get(A.source)),[M,I,F]=kD(N.get(A.target));if(!L||!F)return null;let U=A.type||"default";i[U]||(O==null||O("011",Va.error011(U)),U="default");const V=i[U]||i.default,G=_===Lc.Strict?I.target:(I.target??[]).concat(I.source??[]),Z=TD(T.source,A.sourceHandle),he=TD(G,A.targetHandle),ve=(Z==null?void 0:Z.position)||De.Bottom,re=(he==null?void 0:he.position)||De.Top,ge=!!(A.focusable||x&&typeof A.focusable>"u"),Y=A.reconnectable||A.updatable,ee=typeof h<"u"&&(Y||w&&typeof Y>"u");if(!Z||!he)return O==null||O("008",Va.error008(Z,A)),null;const{sourceX:q,sourceY:W,targetX:Fe,targetY:Ae}=ABe(R,Z,ve,M,he,re);return P.createElement(V,{key:A.id,id:A.id,className:bn([A.className,s]),type:U,data:A.data,selected:!!A.selected,animated:!!A.animated,hidden:!!A.hidden,label:A.label,labelStyle:A.labelStyle,labelShowBg:A.labelShowBg,labelBgStyle:A.labelBgStyle,labelBgPadding:A.labelBgPadding,labelBgBorderRadius:A.labelBgBorderRadius,style:A.style,source:A.source,target:A.target,sourceHandleId:A.sourceHandle,targetHandleId:A.targetHandle,markerEnd:A.markerEnd,markerStart:A.markerStart,sourceX:q,s
629ourceY:W,targetX:Fe,targetY:Ae,sourcePosition:ve,targetPosition:re,elementsSelectable:S,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,onClick:d,onEdgeDoubleClick:f,onReconnect:h,onReconnectStart:p,onReconnectEnd:g,reconnectRadius:m,rfId:n,ariaLabel:A.ariaLabel,isFocusable:ge,isReconnectable:ee,pathOptions:"pathOptions"in A?A.pathOptions:void 0,interactionWidth:A.interactionWidth,disableKeyboardA11y:y})})))),v):null};bq.displayName="EdgeRenderer";var BBe=b.memo(bq);const zBe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function UBe({children:e}){const t=tr(zBe);return P.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function VBe(e){const t=JC(),r=b.useRef(!1);b.useEffect(()=>{!r.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),r.current=!0)},[e,t.viewportInitialized])}const WBe={[De.Left]:De.Right,[De.Right]:De.Left,[De.Top]:De.Bottom,[De.Bottom]:De.Top},wq=({nodeId:e,handleType:t,style:r,type:n=vo.Bezier,CustomComponent:i,connectionStatus:s})=>{var E,_,N;const{fromNode:a,handleId:o,toX:c,toY:u,connectionMode:d}=tr(b.useCallback(O=>({fromNode:O.nodeInternals.get(e),handleId:O.connectionHandleId,toX:(O.connectionPosition.x-O.transform[0])/O.transform[2],toY:(O.connectionPosition.y-O.transform[1])/O.transform[2],connectionMode:O.connectionMode}),[e]),Qr),f=(E=a==null?void 0:a[cr])==null?void 0:E.handleBounds;let h=f==null?void 0:f[t];if(d===Lc.Loose&&(h=h||(f==null?void 0:f[t==="source"?"target":"source"])),!a||!h)return null;const p=o?h.find(O=>O.id===o):h[0],g=p?p.x+p.width/2:(a.width??0)/2,m=p?p.y+p.height/2:a.height??0,v=(((_=a.positionAbsolute)==null?void 0:_.x)??0)+g,y=(((N=a.positionAbsolute)==null?void 0:N.y)??0)+m,x=p==null?void 0:p.position,w=x?WBe[x]:null;if(!x||!w)return null;if(i)return P.createElement(i,{connectionLineType:n,connectionLineStyle:r,fromNode:a,fromHandle:p,fromX:v,fromY:y,toX:c,toY:u,fromPosition:x,toPosition:w,connectionStatus:s});let S="";const j={sourceX:v,sourceY:y,sourcePosition:x,targetX:c,targetY:u,targetPosition:w};return n===vo.Bezier?[S]=V7(j):n===vo.Step?[S]=tN({...j,borderRadius:0}):n===vo.SmoothStep?[S]=tN(j):n===vo.SimpleBezier?[S]=U7(j):S=`M${v},${y} ${c},${u}`,P.createElement("path",{d:S,fill:"none",className:"react-flow__connection-path",style:r})};wq.displayName="ConnectionLine";const HBe=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function qBe({containerStyle:e,style:t,type:r,component:n}){const{nodeId:i,handleType:s,nodesConnectable:a,width:o,height:c,connectionStatus:u}=tr(HBe,Qr);return!(i&&s&&o&&a)?null:P.createElement("svg",{style:e,width:o,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},P.createElement("g",{className:bn(["react-flow__connection",u])},P.createElement(wq,{nodeId:i,handleType:s,style:t,type:r,CustomComponent:n,connectionStatus:u})))}function $D(e,t){return b.useRef(null),Dr(),b.useMemo(()=>t(e),[e])}const Sq=({nodeTypes:e,edgeTypes:t,onMove:r,onMoveStart:n,onMoveEnd:i,onInit:s,onNodeClick:a,onEdgeClick:o,onNodeDoubleClick:c,onEdgeDoubleClick:u,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:p,onSelectionContextMenu:g,onSelectionStart:m,onSelectionEnd:v,connectionLineType:y,connectionLineStyle:x,connectionLineComponent:w,connectionLineContainerStyle:S,selectionKeyCode:j,selectionOnDrag:E,selectionMode:_,multiSelectionKeyCode:N,panActivationKeyCode:O,zoomActivationKeyCode:C,deleteKeyCode:k,onlyRenderVisibleElements:$,elementsSelectable:D,selectNodesOnDrag:A,defaultViewport:R,translateExtent:T,minZoom:L,maxZoom:M,preventScrolling:I,defaultMarkerColor:F,zoomOnScroll:U,zoomOnPinch:V,panOnScroll:G,panOnScrollSpeed:Z,panOnScrollMode:he,zoomOnDoubleClick:ve,panOnDrag:re,onPaneClick:ge,onPaneMouseEnter:Y,onPaneMouseMove:ee,onPaneMouseLeave:q,onPaneScroll:W,onPaneContextMenu:Fe,onEdgeContextMenu:Ae,onEdgeMouseEnter:Ue,onEdgeMouseMove:nt,onEdgeMouseLeave:We,onReconnect:_e,onReconnectStart:St,onReconnectEnd:B,reconnectRadius:H,noDragClassName:K,noWheelClassName:me,noPanClassName:oe,elevateEdgesOnSelect:ae,disableKeyboardA11y:Ce,nodeOrigin:st,nodeExtent:ft,rfId:rr})=>{const $n=$D(e,bBe),Ct=$D(t,OBe);return VBe(s),P.createElement(yBe,{onPaneClick:ge,onPaneMouseEnter:Y,onPaneMouseMove:ee,onPaneMouseLeave:q,onPaneContextMenu:Fe,onPaneScroll:W,deleteKeyCode:k,selectionKeyCode:j,selectionOnDrag:E,selectionMode:_,onSelectionStart:m,onSelectionEnd:v,multiSelectionKeyCode:N,panActivationKeyCode:O,zoomActivationKeyCode:C,elementsSelectable:D,onMove:r,onMoveStart:n,onMoveEnd:i,zoomOnScroll:U,zoomOnPinch:V,zoomOnDoubleClick:ve,panOnScroll:G,panOnScrollSpeed:Z,panOnScrollMode:he,panOnDrag:re,defaultViewport:R,translateExtent:T,minZoom:L,maxZoom:M,onSelectionContextMenu:g,preventScrolling:I,noDragClassName:K,noWheelClassName:me,noPanClassName:oe,disableKeyboardA11y:Ce},P.createElement(UBe,null,P.createElement(BBe,{edgeTypes:Ct,onEdgeClick:o,onEdgeDoubleClick:u,onlyRenderVisibleElements:$,onEdgeContextMenu:Ae,onEdgeMouseEnter:Ue,onEdgeMouseMove:nt,onEdgeMouseLeave:We,onReconnect:_e,onReconnectStart:St,onReconnectEnd:B,reconnectRadius:H,defaultMarkerColor:F,noPanClassName:oe,elevateEdgesOnSelect:!!ae,disableKeyboardA11y:Ce,rfId:rr},P.createElement(qBe,{style:x,type:y,component:w,containerStyle:S})),P.createElement("div",{className:"react-flow__edgelabel-renderer"}),P.createElement(jBe,{nodeTypes:$n,onNodeClick:a,onNodeDoubleClick:c,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:p,selectNodesOnDrag:A,onlyRenderVisibleElements:$,noPanClassName:oe,noDragClassName:K,disableKeyboardA11y:Ce,nodeOrigin:st,nodeExtent:ft,rfId:rr})))};Sq.displayName="GraphView";var KBe=b.memo(Sq);const aN=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],to={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:aN,nodeExtent:aN,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Lc.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGri
629d:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:S5e,isValidConnection:void 0},GBe=()=>o4e((e,t)=>({...to,setNodes:r=>{const{nodeInternals:n,nodeOrigin:i,elevateNodesOnSelect:s}=t();e({nodeInternals:hS(r,n,i,s)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:r=>{const{defaultEdgeOptions:n={}}=t();e({edges:r.map(i=>({...n,...i}))})},setDefaultNodesAndEdges:(r,n)=>{const i=typeof r<"u",s=typeof n<"u",a=i?hS(r,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:a,edges:s?n:[],hasDefaultNodes:i,hasDefaultEdges:s})},updateNodeDimensions:r=>{const{onNodesChange:n,nodeInternals:i,fitViewOnInit:s,fitViewOnInitDone:a,fitViewOnInitOptions:o,domNode:c,nodeOrigin:u}=t(),d=c==null?void 0:c.querySelector(".react-flow__viewport");if(!d)return;const f=window.getComputedStyle(d),{m22:h}=new window.DOMMatrixReadOnly(f.transform),p=r.reduce((m,v)=>{const y=i.get(v.id);if(y!=null&&y.hidden)i.set(y.id,{...y,[cr]:{...y[cr],handleBounds:void 0}});else if(y){const x=VC(v.nodeElement);!!(x.width&&x.height&&(y.width!==x.width||y.height!==x.height||v.forceUpdate))&&(i.set(y.id,{...y,[cr]:{...y[cr],handleBounds:{source:OD(".source",v.nodeElement,h,u),target:OD(".target",v.nodeElement,h,u)}},...x}),m.push({id:y.id,type:"dimensions",dimensions:x}))}return m},[]);lq(i,u);const g=a||s&&!a&&cq(t,{initial:!0,...o});e({nodeInternals:new Map(i),fitViewOnInitDone:g}),(p==null?void 0:p.length)>0&&(n==null||n(p))},updateNodePositions:(r,n=!0,i=!1)=>{const{triggerNodeChanges:s}=t(),a=r.map(o=>{const c={id:o.id,type:"position",dragging:i};return n&&(c.positionAbsolute=o.positionAbsolute,c.position=o.position),c});s(a)},triggerNodeChanges:r=>{const{onNodesChange:n,nodeInternals:i,hasDefaultNodes:s,nodeOrigin:a,getNodes:o,elevateNodesOnSelect:c}=t();if(r!=null&&r.length){if(s){const u=dq(r,o()),d=hS(u,i,a,c);e({nodeInternals:d})}n==null||n(r)}},addSelectedNodes:r=>{const{multiSelectionActive:n,edges:i,getNodes:s}=t();let a,o=null;n?a=r.map(c=>uo(c,!0)):(a=Bu(s(),r),o=Bu(i,[])),Iv({changedNodes:a,changedEdges:o,get:t,set:e})},addSelectedEdges:r=>{const{multiSelectionActive:n,edges:i,getNodes:s}=t();let a,o=null;n?a=r.map(c=>uo(c,!0)):(a=Bu(i,r),o=Bu(s(),[])),Iv({changedNodes:o,changedEdges:a,get:t,set:e})},unselectNodesAndEdges:({nodes:r,edges:n}={})=>{const{edges:i,getNodes:s}=t(),a=r||s(),o=n||i,c=a.map(d=>(d.selected=!1,uo(d.id,!1))),u=o.map(d=>uo(d.id,!1));Iv({changedNodes:c,changedEdges:u,get:t,set:e})},setMinZoom:r=>{const{d3Zoom:n,maxZoom:i}=t();n==null||n.scaleExtent([r,i]),e({minZoom:r})},setMaxZoom:r=>{const{d3Zoom:n,minZoom:i}=t();n==null||n.scaleExtent([i,r]),e({maxZoom:r})},setTranslateExtent:r=>{var n;(n=t().d3Zoom)==null||n.translateExtent(r),e({translateExtent:r})},resetSelectedElements:()=>{const{edges:r,getNodes:n}=t(),s=n().filter(o=>o.selected).map(o=>uo(o.id,!1)),a=r.filter(o=>o.selected).map(o=>uo(o.id,!1));Iv({changedNodes:s,changedEdges:a,get:t,set:e})},setNodeExtent:r=>{const{nodeInternals:n}=t();n.forEach(i=>{i.positionAbsolute=WC(i.position,r)}),e({nodeExtent:r,nodeInternals:new Map(n)})},panBy:r=>{const{transform:n,width:i,height:s,d3Zoom:a,d3Selection:o,translateExtent:c}=t();if(!a||!o||!r.x&&!r.y)return!1;const u=Ho.translate(n[0]+r.x,n[1]+r.y).scale(n[2]),d=[[0,0],[i,s]],f=a==null?void 0:a.constrain()(u,d,c);return a.transform(o,f),n[0]!==f.x||n[1]!==f.y||n[2]!==f.k},cancelConnection:()=>e({connectionNodeId:to.connectionNodeId,connectionHandleId:to.connectionHandleId,connectionHandleType:to.connectionHandleType,connectionStatus:to.connectionStatus,connectionStartHandle:to.connectionStartHandle,connectionEndHandle:to.connectionEndHandle}),reset:()=>e({...to})}),Object.is),jq=({children:e})=>{const t=b.useRef(null);return t.current||(t.current=GBe()),P.createElement(p5e,{value:t.current},e)};jq.displayName="ReactFlowProvider";const _q=({children:e})=>b.useContext(_w)?P.createElement(P.Fragment,null,e):P.createElement(jq,null,e);_q.displayName="ReactFlowWrapper";const YBe={input:tq,default:iN,output:nq,group:ZC},XBe={default:j0,straight:GC,step:KC,smoothstep:Ew,simplebezier:qC},QBe=[0,0],ZBe=[15,15],JBe={x:0,y:0,zoom:1},eze={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Eq=b.forwardRef(({nodes:e,edges:t,defaultNodes:r,defaultEdges:n,className:i,nodeTypes:s=YBe,edgeTypes:a=XBe,onNodeClick:o,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:h,onConnect:p,onConnectStart:g,onConnectEnd:m,onClickConnectStart:v,onClickConnectEnd:y,onNodeMouseEnter:x,onNodeMouseMove:w,onNodeMouseLeave:S,onNodeContextMenu:j,onNodeDoubleClick:E,onNodeDragStart:_,onNodeDrag:N,onNodeDragStop:O,onNodesDelete:C,onEdgesDelete:k,onSelectionChange:$,onSelectionDragStart:D,onSelectionDrag:A,onSelectionDragStop:R,onSelectionContextMenu:T,onSelectionStart:L,onSelectionEnd:M,connectionMode:I=Lc.Strict,connectionLineType:F=vo.Bezier,connectionLineStyle:U,connectionLineComponent:V,connectionLineContainerStyle:G,deleteKeyCode:Z="Backspace",selectionKeyCode:he="Shift",selectionOnDrag:ve=!1,selectionMode:re=Im.Full,panActivationKeyCode:ge="Space",multiSelectionKeyCode:Y=w0()?"Meta":"Control",zoomActivationKeyCode:ee=w0()?"Meta":"Control",snapToGri
vendor: 2,068 bytes, line 629
629d:q=!1,snapGrid:W=ZBe,onlyRenderVisibleElements:Fe=!1,selectNodesOnDrag:Ae=!0,nodesDraggable:Ue,nodesConnectable:nt,nodesFocusable:We,nodeOrigin:_e=QBe,edgesFocusable:St,edgesUpdatable:B,elementsSelectable:H,defaultViewport:K=JBe,minZoom:me=.5,maxZoom:oe=2,translateExtent:ae=aN,preventScrolling:Ce=!0,nodeExtent:st,defaultMarkerColor:ft="#b1b1b7",zoomOnScroll:rr=!0,zoomOnPinch:$n=!0,panOnScroll:Ct=!1,panOnScrollSpeed:ne=.5,panOnScrollMode:Pe=Kl.Free,zoomOnDoubleClick:Gt=!0,panOnDrag:$i=!0,onPaneClick:si,onPaneMouseEnter:ai,onPaneMouseMove:Xa,onPaneMouseLeave:Aw,onPaneScroll:Qf,onPaneContextMenu:Cw,children:nP,onEdgeContextMenu:yl,onEdgeDoubleClick:$q,onEdgeMouseEnter:Iq,onEdgeMouseMove:Mq,onEdgeMouseLeave:Dq,onEdgeUpdate:Lq,onEdgeUpdateStart:Fq,onEdgeUpdateEnd:Bq,onReconnect:zq,onReconnectStart:Uq,onReconnectEnd:Vq,reconnectRadius:Wq=10,edgeUpdaterRadius:Hq=10,onNodesChange:qq,onEdgesChange:Kq,noDragClassName:Gq="nodrag",noWheelClassName:Yq="nowheel",noPanClassName:iP="nopan",fitView:Xq=!1,fitViewOptions:Qq,connectOnClick:Zq=!0,attributionPosition:Jq,proOptions:eK,defaultEdgeOptions:tK,elevateNodesOnSelect:rK=!0,elevateEdgesOnSelect:nK=!1,disableKeyboardA11y:sP=!1,autoPanOnConnect:iK=!0,autoPanOnNodeDrag:sK=!0,connectionRadius:aK=20,isValidConnection:oK,onError:lK,style:cK,id:aP,nodeDragThreshold:uK,...dK},fK)=>{const Pw=aP||"1";return P.createElement("div",{...dK,style:{...cK,...eze},ref:fK,className:bn(["react-flow",i]),"data-testid":"rf__wrapper",id:aP},P.createElement(_q,null,P.createElement(KBe,{onInit:u,onMove:d,onMoveStart:f,onMoveEnd:h,onNodeClick:o,onEdgeClick:c,onNodeMouseEnter:x,onNodeMouseMove:w,onNodeMouseLeave:S,onNodeContextMenu:j,onNodeDoubleClick:E,nodeTypes:s,edgeTypes:a,connectionLineType:F,connectionLineStyle:U,connectionLineComponent:V,connectionLineContainerStyle:G,selectionKeyCode:he,selectionOnDrag:ve,selectionMode:re,deleteKeyCode:Z,multiSelectionKeyCode:Y,panActivationKeyCode:ge,zoomActivationKeyCode:ee,onlyRenderVisibleElements:Fe,selectNodesOnDrag:Ae,defaultViewport:K,translateExtent:ae,minZoom:me,maxZoom:
629oe,preventScrolling:Ce,zoomOnScroll:rr,zoomOnPinch:$n,zoomOnDoubleClick:Gt,panOnScroll:Ct,panOnScrollSpeed:ne,panOnScrollMode:Pe,panOnDrag:$i,onPaneClick:si,onPaneMouseEnter:ai,onPaneMouseMove:Xa,onPaneMouseLeave:Aw,onPaneScroll:Qf,onPaneContextMenu:Cw,onSelectionContextMenu:T,onSelectionStart:L,onSelectionEnd:M,onEdgeContextMenu:yl,onEdgeDoubleClick:$q,onEdgeMouseEnter:Iq,onEdgeMouseMove:Mq,onEdgeMouseLeave:Dq,onReconnect:zq??Lq,onReconnectStart:Uq??Fq,onReconnectEnd:Vq??Bq,reconnectRadius:Wq??Hq,defaultMarkerColor:ft,noDragClassName:Gq,noWheelClassName:Yq,noPanClassName:iP,elevateEdgesOnSelect:nK,rfId:Pw,disableKeyboardA11y:sP,nodeOrigin:_e,nodeExtent:st}),P.createElement(W5e,{nodes:e,edges:t,defaultNodes:r,defaultEdges:n,onConnect:p,onConnectStart:g,onConnectEnd:m,onClickConnectStart:v,onClickConnectEnd:y,nodesDraggable:Ue,nodesConnectable:nt,nodesFocusable:We,edgesFocusable:St,edgesUpdatable:B,elementsSelectable:H,elevateNodesOnSelect:rK,minZoom:me,maxZoom:oe,nodeExtent:st,onNodesChange:qq,onEdgesChange:Kq,snapToGrid:q,snapGrid:W,connectionMode:I,translateExtent:ae,connectOnClick:Zq,defaultEdgeOptions:tK,fitView:Xq,fitViewOptions:Qq,onNodesDelete:C,onEdgesDelete:k,onNodeDragStart:_,onNodeDrag:N,onNodeDragStop:O,onSelectionDrag:A,onSelectionDragStart:D,onSelectionDragStop:R,noPanClassName:iP,nodeOrigin:_e,rfId:Pw,autoPanOnConnect:iK,autoPanOnNodeDrag:sK,onError:lK,connectionRadius:aK,isValidConnection:oK,nodeDragThreshold:uK}),P.createElement(U5e,{onSelectionChange:$}),nP,P.createElement(g5e,{proOptions:eK,position:Jq}),P.createElement(Y5e,{rfId:Pw,disableKeyboardA11y:sP})))});Eq.displayName="ReactFlow";function Nq(e){return t=>{const[r,n]=b.useState(t),i=b.useCallback(s=>n(a=>e(s,a)),[]);return[r,n,i]}}const tze=Nq(dq),rze=Nq(cBe);function nze(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},P.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function ize(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},P.createElement("path",{d:"M0 0h32v4.2H0z"}))}function sze(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},P.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function aze(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},P.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function oze(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},P.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const Hh=({children:e,className:t,...r})=>P.createElement("button",{type:"button",className:bn(["react-flow__controls-button",t]),...r},e);Hh.displayName="ControlButton";const lze=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),Oq=({style:e,showZoom:t=!0,showFitView:r=!0,showInteractive:n=!0,fitViewOptions:i,onZoomIn:s,onZoomOut:a,onFitView:o,onInteractiveChange:c,className:u,children:d,position:f="bottom-left"})=>{const h=Dr(),[p,g]=b.useState(!1),{isInteractive:m,minZoomReached:v,maxZoomReached:y}=tr(lze,Qr),{zoomIn:x,zoomOut:w,fitView:S}=JC();if(b.useEffect(()=>{g(!0)},[]),!p)return null;const j=()=>{x(),s==null||s()},E=()=>{w(),a==null||a()},_=()=>{S(i),o==null||o()},N=()=>{h.setState({nodesDraggable:!m,nodesConnectable:!m,elementsSelectable:!m}),c==null||c(!m)};return P.createElement(I7,{className:bn(["react-flow__controls",u]),position:f,style:e,"data-testid":"rf__controls"},t&&P.createElement(P.Fragment,null,P.createElement(Hh,{onClick:j,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:y},P.createElement(nze,null)),P.createElement(Hh,{onClick:E,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:v},P.createElement(ize,null))),r&&P.createElement(Hh,{className:"react-flow__controls-fitview",onClick:_,title:"fit view","aria-label":"fit view"},P.createElement(sze,null)),n&&P.createElement(Hh,{className:"react-flow__controls-interactive",onClick:N,title:"toggle interactivity","aria-label":"toggle interactivity"},m?P.createElement(oze,null):P.createElement(aze,null)),d)};Oq.displayName="Controls";var cze=b.memo(Oq),_i;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(_i||(_i={}));function uze({color:e,dimensions:t,lineWidth:r}){return P.createElement("path",{stroke:e,strokeWidth:r,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function dze({color:e,radius:t}){return P.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const fze={[_i.Dots]:"#91919a",[_i.Lines]:"#eee",[_i.Cross]:"#e2e2e2"},hze={[_i.Dots]:1,[_i.Lines]:1,[_i.Cross]:6},pze=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});
629function Aq({id:e,variant:t=_i.Dots,gap:r=20,size:n,lineWidth:i=1,offset:s=2,color:a,style:o,className:c}){const u=b.useRef(null),{transform:d,patternId:f}=tr(pze,Qr),h=a||fze[t],p=n||hze[t],g=t===_i.Dots,m=t===_i.Cross,v=Array.isArray(r)?r:[r,r],y=[v[0]*d[2]||1,v[1]*d[2]||1],x=p*d[2],w=m?[x,x]:y,S=g?[x/s,x/s]:[w[0]/s,w[1]/s];return P.createElement("svg",{className:bn(["react-flow__background",c]),style:{...o,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:u,"data-testid":"rf__background"},P.createElement("pattern",{id:f+e,x:d[0]%y[0],y:d[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`},g?P.createElement(dze,{color:h,radius:x/s}):P.createElement(uze,{dimensions:w,color:h,lineWidth:i})),P.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${f+e})`}))}Aq.displayName="Background";var mze=b.memo(Aq);function gze({data:e}){return l.jsxs("div",{className:"bg-card border-2 border-chart-2 rounded-lg p-4 min-w-[200px] shadow-lg",children:[l.jsx(Gs,{type:"target",position:De.Left,className:"!bg-chart-2"}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Fee,{className:"h-4 w-4 text-chart-2"}),l.jsx("span",{className:"font-semibold text-sm",children:"Trigger"})]}),l.jsx("h3",{className:"font-bold",children:e.title||"New Trigger"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:e.description||"No description"}),e.tag&&l.jsx(Ee,{className:"bg-chart-2/20 text-chart-2",children:e.tag})]}),l.jsx(Gs,{type:"source",position:De.Right,className:"!bg-chart-2"})]})}function vze({data:e}){return l.jsxs("div",{className:"bg-card border-2 border-chart-3 rounded-lg p-4 min-w-[200px] shadow-lg",children:[l.jsx(Gs,{type:"target",position:De.Left,className:"!bg-chart-3"}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"h-4 w-4 rounded-full bg-chart-3"}),l.jsx("span",{className:"font-semibold text-sm",children:"Redirect"})]}),l.jsx("h3",{className:"font-bold",children:e.target||"New Redirect"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Transfer to specialist"})]}),l.jsx(Gs,{type:"source",position:De.Right,className:"!bg-chart-3"})]})}function yze({data:e}){return l.jsxs("div",{className:"bg-card border-2 border-chart-1 rounded-lg p-4 min-w-[200px] shadow-lg",children:[l.jsx(Gs,{type:"target",position:De.Left,className:"!bg-chart-1"}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Of,{className:"h-4 w-4 text-chart-1"}),l.jsx("span",{className:"font-semibold text-sm",children:"Staff Member"})]}),l.jsx("h3",{className:"font-bold",children:e.name||"New Staff Member"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:e.role||"Role"}),e.department&&l.jsx(Ee,{className:"bg-chart-1/20 text-chart-1",children:e.department})]}),l.jsx(Gs,{type:"source",position:De.Right,className:"!bg-chart-1"})]})}const xze={trigger:gze,redirect:vze,staff:yze},vu=[{id:"1",name:"John Anderson",role:"Senior Support Manager",department:"Customer Success"},{id:"2",name:"Sarah Chen",role:"Technical Support Lead",department:"Technical Support"},{id:"3",name:"Michael Roberts",role:"Billing Specialist",department:"Finance"},{id:"4",name:"Emily Davis",role:"Product Support Engineer",department:"Technical Support"},{id:"5",name:"David Kim",role:"Account Manager",department:"Customer Success"}];function bze(){var $,D,A;const[e,t,r]=tze([]),[n,i,s]=rze([]),[a,o]=b.useState(null),[c,u]=b.useState(""),[d,f]=b.useState(""),[h,p]=b.useState(""),[g,m]=b.useState(""),[v,y]=b.useState(""),{toast:x}=kn(),{data:w}=Ke({queryKey:["/api/transfer-routing"]}),S=fr({mutationFn:async R=>(await Ws("POST","/api/transfer-routing",R)).json(),onSuccess:()=>{UF.invalidateQueries({queryKey:["/api/transfer-routing"]})}});b.useEffect(()=>{w&&(t(w.nodes||[]),i(w.edges||[]))},[w,t,i]),b.useEffect(()=>{if(e.length>0||n.length>0){const R=setTimeout(()=>{S.mutate({nodes:e,edges:n})},1e3);return()=>clearTimeout(R)}},[e,n]);const j=b.useCallback(R=>{i(T=>W7({...R,animated:!0,style:{stroke:"#888"}},T)),x({title:"Nodes connected",description:"Connection created successfully"})},[i,x]),E=()=>{const R={id:`trigger-${Date.now()}`,type:"trigger",position:{x:100,y:100},data:{title:"I need help with...",description:"Customer request",tag:"support"}};t(T=>[...T,R]),x({title:"Trigger node added",description:"Drag to position and connect to other nodes"})},_=()=>{const R={id:`redirect-${Date.now()}`,type:"redirect",position:{x:400,y:100},data:{target:"Sam Smith - Shipping Manager"}};t(T=>[...T,R]),x({title:"Redirect node added",description:"Drag to position and connect from trigger"})},N=()=>{const R={id:`staff-${Date.now()}`,type:"staff",position:{x:250,y:250},data:{name:"John Doe",role:"Support Specialist",department:"Customer Service"}};t(T=>[...T,R]),x({title:"Staff node added",description:"Click to edit staff member details"})}
629,O=b.useCallback((R,T)=>{if(o(T),T.type==="trigger")u(T.data.title||""),f(T.data.description||""),p(T.data.tag||"");else if(T.type==="redirect")m(T.data.target||"");else if(T.type==="staff"){const L=vu.find(M=>M.name===T.data.name&&M.role===T.data.role);y((L==null?void 0:L.id)||"")}},[]),C=()=>{a&&(t(R=>R.map(T=>{if(T.id===a.id){if(T.type==="trigger")return{...T,data:{...T.data,title:c,description:d,tag:h}};if(T.type==="redirect")return{...T,data:{...T.data,target:g}};if(T.type==="staff"){const L=vu.find(M=>M.id===v);if(L)return{...T,data:{name:L.name,role:L.role,department:L.department}}}}return T})),x({title:"Node updated",description:"Changes saved successfully"}))},k=()=>{a&&(t(R=>R.filter(T=>T.id!==a.id)),i(R=>R.filter(T=>T.source!==a.id&&T.target!==a.id)),o(null),x({title:"Node deleted",description:"Node and its connections removed"}))};return l.jsxs("div",{className:"flex h-[calc(100vh-8rem)] gap-4",children:[l.jsxs(ue,{className:"w-80 p-4 space-y-4 overflow-auto",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-xl font-bold mb-2",children:"Transfer Routing"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Build visual call transfer flows with triggers and redirects"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("h3",{className:"font-semibold text-sm",children:"Add Nodes"}),l.jsxs(ie,{variant:"outline",className:"w-full justify-start",onClick:E,"data-testid":"button-add-trigger",children:[l.jsx(Gu,{className:"h-4 w-4 mr-2"}),"Add Trigger Node"]}),l.jsxs(ie,{variant:"outline",className:"w-full justify-start",onClick:_,"data-testid":"button-add-redirect",children:[l.jsx(Gu,{className:"h-4 w-4 mr-2"}),"Add Redirect Node"]}),l.jsxs(ie,{variant:"outline",className:"w-full justify-start",onClick:N,"data-testid":"button-add-staff",children:[l.jsx(Gu,{className:"h-4 w-4 mr-2"}),"Add Staff Node"]})]}),a&&l.jsxs("div",{className:"space-y-4 pt-4 border-t",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"font-semibold text-sm",children:"Edit Node"}),l.jsx(ie,{variant:"destructive",size:"sm",onClick:k,"data-testid":"button-delete-node",children:"Delete"})]}),a.type==="trigger"&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Title"}),l.jsx(Je,{value:c,onChange:R=>u(R.target.value),placeholder:"e.g., I need shipping help","data-testid":"input-node-title"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Description"}),l.jsx(un,{value:d,onChange:R=>f(R.target.value),placeholder:"Short description",rows:2,"data-testid":"textarea-node-description"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Tag"}),l.jsx(Je,{value:h,onChange:R=>p(R.target.value),placeholder:"e.g., shipping","data-testid":"input-node-tag"})]})]}),a.type==="redirect"&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Redirect Target"}),l.jsx(Je,{value:g,onChange:R=>m(R.target.value),placeholder:"e.g., Sam Smith - Shipping Manager","data-testid":"input-node-target"})]}),a.type==="staff"&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-sm font-medium",children:"Select Staff Member"}),l.jsxs(Zt,{value:v,onValueChange:y,children:[l.jsx(qt,{"data-testid":"select-staff-member",children:l.jsx(Jt,{placeholder:"Choose a staff member"})}),l.jsx(Kt,{children:vu.map(R=>l.jsx(te,{value:R.id,"data-testid":`select-item-staff-${R.id}`,children:l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"font-medium",children:R.name}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:[R.role," - ",R.department]})]})},R.id))})]})]}),v&&l.jsxs("div",{className:"p-3 rounded-lg bg-muted/50 space-y-1","data-testid":"preview-selected-staff",children:[l.jsx("p",{className:"text-sm font-medium","data-testid":"text-staff-name",children:($=vu.find(R=>R.id===v))==null?void 0:$.name}),l.jsx("p",{className:"text-xs text-muted-foreground","data-testid":"text-staff-role",children:(D=vu.find(R=>R.id===v))==null?void 0:D.role}),l.jsx(Ee,{className:"bg-chart-1/20 text-chart-1","data-testid":"badge-staff-department",children:(A=vu.find(R=>R.id===v))==null?void 0:A.department})]})]}),l.jsx(ie,{className:"w-full",onClick:C,"data-testid":"button-update-node",children:"Update Node"})]}),!a&&l.jsx("div",{className:"pt-4 border-t text-sm text-muted-foreground",children:"Click on a node to edit its properties"})]}),l.jsx("div",{className:"flex-1 border rounded-lg bg-muted/20","data-testid":"flow-canvas",children:l.jsxs(Eq,{nodes:e,edges:n,onNodesChange:r,onEdgesChange:s,onConnect:j,onNodeClick:O,nodeTypes:xze,fitView:!0,children:[l.jsx(mze,{variant:_i.Dots}),l.jsx(cze,{})]})})]})}function wze(){const[e,t]=b.useState(""),[r,n]=b.useState(!1),[i,s]=b.useState(!1),[a,o]=b.useState(null),[c,u]=b.useState({email:"",password:"",full_name:"",role:"Admin"}),{toast:d}=kn(),f=vn(),{data:h=[],isLoading:p,error:g}=Ke({queryKey:["/api/admin/users"]}),m=fr({mutationFn:async N=>(await Ws("POST","/api/admin/users",N)).json(),onSuccess:()=>{f.invalidateQueries({queryKey:["/api/admin/users"]}),n(!1),u({email:"",password:"",full_name:"",role:"Admin"}),d({title:"Success",description:"Admin user created successfully"})},onError:N=>{d({title:"Error",description:N.message||"Failed to create admin user",variant:"destructive"})}}),v=fr({mutationFn:async N=>(await Ws("PUT",`/api/admin/users/${N.userId}`,{full_name:N.full_name,role:N.role})).json(),onSuccess:()=>{f.invalidateQueries({queryKey:["/api/admin/users"]}),s(!1),o(null),d({title:"Success",description:"User updated successfully"})},onError:N=>{d({title:"Error",description:N.message||"Failed to update user",variant:"destructive"})}}),y=h.filter(N=>{const O=e.toLowerCase();return N.full_name.toLowerCase().includes(O)||N.email.toLowerCase().includes(O)||N.role.toLowerCase().includes(O)}),x=N=>{if(!N)return"Never";const O=new Date,C=new Date(N),k=O.getTime()-C.getTime(),$=Math.floor(k/(1e3*60)),D=Math.floor(k/(1e3*60*60)),A=Math.floor(k/(1e3*60*60*24));return $<60?`${$} minutes ago`:D<24?`${D} hours ago`:`${A} days ago`},w=()=>
629{if(!c.email||!c.password||!c.full_name){d({title:"Error",description:"Please fill in all required fields",variant:"destructive"});return}m.mutate(c)},S=N=>{o(N),s(!0)},j=()=>{a&&v.mutate({userId:a.id,full_name:a.full_name,role:a.role})},E=[{id:1,user:"John Anderson",action:"Updated system prompt",timestamp:"2 minutes ago"},{id:2,user:"Emily Chen",action:"Uploaded knowledge document",timestamp:"1 hour ago"},{id:3,user:"Michael Torres",action:"Resolved issue ISS-1847",timestamp:"2 hours ago"},{id:4,user:"John Anderson",action:"Created new admin user",timestamp:"5 hours ago"}],_={"Super Admin":"bg-destructive/20 text-destructive","Content Manager":"bg-chart-1/20 text-chart-1","Support Manager":"bg-chart-2/20 text-chart-2","Analytics Viewer":"bg-muted text-muted-foreground","QA Specialist":"bg-chart-3/20 text-chart-3"};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"Admin Users"}),l.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"Manage admin access and permissions"})]}),l.jsxs(Ai,{open:r,onOpenChange:n,children:[l.jsx(yb,{asChild:!0,children:l.jsxs(ie,{size:"sm",className:"sm:size-default","data-testid":"button-add-admin",children:[l.jsx(N5,{className:"h-4 w-4 mr-2"}),"Add Admin"]})}),l.jsxs(Jn,{children:[l.jsxs(ei,{children:[l.jsx(ti,{children:"Add New Admin User"}),l.jsx(el,{children:"Create a new admin account with specific role permissions"})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"admin-name",children:"Full Name"}),l.jsx(Je,{id:"admin-name",placeholder:"Enter full name",value:c.full_name,onChange:N=>u(O=>({...O,full_name:N.target.value})),"data-testid":"input-admin-name"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"admin-email",children:"Email"}),l.jsx(Je,{id:"admin-email",type:"email",placeholder:"[email protected]",value:c.email,onChange:N=>u(O=>({...O,email:N.target.value})),"data-testid":"input-admin-email"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"admin-password",children:"Password"}),l.jsx(Je,{id:"admin-password",type:"password",placeholder:"Enter password",value:c.password,onChange:N=>u(O=>({...O,password:N.target.value})),"data-testid":"input-admin-password"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"admin-role",children:"Role"}),l.jsxs(Zt,{value:c.role,onValueChange:N=>u(O=>({...O,role:N})),children:[l.jsx(qt,{id:"admin-role","data-testid":"select-admin-role",children:l.jsx(Jt,{placeholder:"Select role"})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"Super Admin",children:"Super Admin"}),l.jsx(te,{value:"Content Manager",children:"Content Manager"}),l.jsx(te,{value:"Support Manager",children:"Support Manager"}
629),l.jsx(te,{value:"Analytics Viewer",children:"Analytics Viewer"}),l.jsx(te,{value:"QA Specialist",children:"QA Specialist"}),l.jsx(te,{value:"Admin",children:"Admin"})]})]})]}),l.jsxs("div",{className:"flex gap-2 pt-4",children:[l.jsx(ie,{className:"flex-1",onClick:w,disabled:m.isPending,"data-testid":"button-create-admin",children:m.isPending?"Creating...":"Create Admin"}),l.jsx(ie,{variant:"outline",className:"flex-1",onClick:()=>n(!1),children:"Cancel"})]})]})]})]}),l.jsx(Ai,{open:i,onOpenChange:s,children:l.jsxs(Jn,{children:[l.jsxs(ei,{children:[l.jsx(ti,{children:"Edit Admin User"}),l.jsx(el,{children:"Update user role and information"})]}),a&&l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"edit-name",children:"Full Name"}),l.jsx(Je,{id:"edit-name",value:a.full_name,onChange:N=>o(O=>O?{...O,full_name:N.target.value}:null),"data-testid":"input-edit-name"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"edit-email",children:"Email"}),l.jsx(Je,{id:"edit-email",type:"email",value:a.email,disabled:!0,className:"bg-muted","data-testid":"input-edit-email"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Email cannot be changed"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"edit-role",children:"Role"}),l.jsxs(Zt,{value:a.role,onValueChange:N=>o(O=>O?{...O,role:N}:null),children:[l.jsx(qt,{id:"edit-role","data-testid":"select-edit-role",children:l.jsx(Jt,{placeholder:"Select role"})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"Super Admin",children:"Super Admin"}),l.jsx(te,{value:"Content Manager",children:"Content Manager"}),l.jsx(te,{value:"Support Manager",children:"Support Manager"}
629),l.jsx(te,{value:"Analytics Viewer",children:"Analytics Viewer"}),l.jsx(te,{value:"QA Specialist",children:"QA Specialist"}),l.jsx(te,{value:"Admin",children:"Admin"})]})]})]}),l.jsxs("div",{className:"flex gap-2 pt-4",children:[l.jsx(ie,{className:"flex-1",onClick:j,disabled:v.isPending,"data-testid":"button-update-user",children:v.isPending?"Updating...":"Update User"}),l.jsx(ie,{variant:"outline",className:"flex-1",onClick:()=>s(!1),children:"Cancel"})]})]})]})})]}),l.jsxs(ul,{defaultValue:"users",className:"space-y-6",children:[l.jsxs(Ha,{children:[l.jsx(yt,{value:"users","data-testid":"tab-users",children:"Admin Users"}),l.jsx(yt,{value:"audit","data-testid":"tab-audit",children:"Audit Log"}),l.jsx(yt,{value:"permissions","data-testid":"tab-permissions",children:"Permissions"})]}),l.jsxs(xt,{value:"users",className:"space-y-4",children:[l.jsxs("div",{className:"relative max-w-md",children:[l.jsx(eg,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx(Je,{placeholder:"Search admin users...",value:e,onChange:N=>t(N.target.value),className:"pl-9","data-testid":"input-search-admins"})]}),l.jsx("div",{className:"hidden md:block border rounded-lg",children:l.jsxs(vg,{children:[l.jsx(yg,{children:l.jsxs(ns,{children:[l.jsx(or,{children:"User"}),l.jsx(or,{children:"Email"}),l.jsx(or,{children:"Role"}),l.jsx(or,{children:"Last Active"}),l.jsx(or,{children:"Status"}),l.jsx(or,{children:"Actions"})]})}),l.jsx(xg,{children:p?l.jsx(ns,{children:l.jsx(Vt,{colSpan:6,className:"text-center text-muted-foreground h-32",children:"Loading admin users..."})}):y.length>0?y.map(N=>l.jsxs(ns,{className:"hover-elevate","data-testid":`admin-row-${N.id}`,children:[l.jsx(Vt,{children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(jc,{className:"h-8 w-8",children:l.jsx(_c,{className:"text-xs",children:N.full_name.split(" ").map(O=>O[0]).join("")})}),l.jsx("span",{className:"font-medium",children:N.full_name})]})}),l.jsx(Vt,{className:"text-sm",children:N.email}),l.jsx(Vt,{children:l.jsx(Ee,{className:_[N.role]||"bg-muted text-muted-foreground",children:N.role})}),l.jsx(Vt,{className:"text-sm text-muted-foreground",children:x(N.last_sign_in_at)}),l.jsx(Vt,{children:l.jsxs(Ee,{variant:"secondary",className:"gap-1",children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-chart-2"}),N.email_confirmed_at?"Active":"Pending"]})}),l.jsx(Vt,{children:l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>S(N),"data-testid":`button-edit-${N.id}`,children:"Edit"})})]},N.id)):l.jsx(ns,{children:l.jsx(Vt,{colSpan:6,className:"text-center text-muted-foreground h-32",children:g?"Failed to load admin users":"No admin users found"})})})]})}),l.jsx("div",{className:"md:hidden space-y-3",children:p?l.jsx("div",{className:"text-center text-muted-foreground py-12 border rounded-lg",children:"Loading admin users..."}):y.length>0?y.map(N=>l.jsx(ue,{className:"hover-elevate active-elevate-2","data-testid":`admin-card-${N.id}`,children:l.jsxs(de,{className:"p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[l.jsx(jc,{className:"h-10 w-10 shrink-0",children:l.jsx(_c,{className:"text-xs",children:N.full_name.split(" ").map(O=>O[0]).join("")})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("h3",{className:"font-semibold truncate",children:N.full_name}),l.jsx("p",{className:"text-sm text-muted-foreground truncate",children:N.email})]})]}),l.jsxs(Ee,{variant:"secondary",className:"gap-1 shrink-0",children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-chart-2"}),N.email_confirmed_at?"Active":"Pending"]})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(Ee,{className:_[N.role]||"bg-muted text-muted-foreground",children:N.role}),l.jsx("span",{className:"text-xs text-muted-foreground",children:x(N.last_sign_in_at)})]}),l.jsx(ie,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>S(N),"data-testid":`button-edit-mobile-${N.id}`,children:"Edit User"})]})},N.id)):l.jsx("div",{className:"text-center text-muted-foreground py-12 border rounded-lg",children:g?"Failed to load admin users":"No admin users found"})})]}),l.jsx(xt,{value:"audit",className:"space-y-4",children:l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsx("h3",{className:"font-semibold",children:"Recent Activity"})}),l.jsx(de,{children:l.jsx("div",{className:"space-y-3",children:E.map(N=>l.jsxs("div",{className:"flex items-start justify-between p-3 border rounded-md","data-testid":`audit-log-${N.id}`,children:[l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(Fp,{className:"h-4 w-4 mt-0.5 text-muted-foreground"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium",children:N.user}),l.jsx("p",{className:"text-sm text-muted-foreground",children:N.action})]})]}),l.jsx("span",{className:"text-xs text-muted-foreground",children:N.timestamp})]},N.id))})})]})}),l.jsx(xt,{value:"permissions",className:"space-y-4",children:l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsx("h3",{className:"font-semibold",children:"Role Permissions"})}),l.jsx(de,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"p-4 border rounded-md",children:[l.jsx("h4",{className:"font-medium mb-2",children:"Super Admin"}),l.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Full system access and control"}),l.jsx("div",{className:"flex flex-wrap gap-2",children:l.jsx(Ee,{variant:"secondary",children:"All Access"})})]}),l.jsxs("div",{className:"p-4 border rounded-md",children:[l.jsx("h4",{className:"font-medium mb-2",children:"Content Manager"}),l.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Knowledge base and content management"}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx(Ee,{variant:"secondary",children:"Knowledge Base"}),l.jsx(Ee,{variant:"secondary",children:"Documents"}),l.jsx(Ee,{variant:"secondary",children:"Content Review"})]})]}),l.jsxs("div",{className:"p-4 border rounded-md",children:[l.jsx("h4",{className:"font-medium mb-2",children:"Support Manager"}),l.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Call monitoring and issue management"}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx(Ee,{variant:"secondary",children:"Calls"}),l.jsx(Ee,{variant:"secondary",children:"Issues"}),l.jsx(Ee,{variant:"secondary",children:"Live Monitoring"})]})]})]})})]})})]})]})}const Sze=_f("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Nw=b.forwardRef(({className:e,variant:t,...r},n)=>l.jsx("div",{ref:n,role:"alert",className:se(Sze({variant:t}),e),...r}));Nw.displayName="Alert";const jze=b.forwardRef(({className:e,...t},r)=>l.jsx("h5",{ref:r,className:se("mb-1 font-medium leading-none tracking-tight",e),...t}));jze.displayName="AlertTitle";const Ow=b.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:se("text-sm [&_p]:leading-relaxed",e),...t}));Ow.displayName="AlertDescription";const _ze=vb({fullName:zn().min(2,"Name must be at least 2 characters"),email:zn().email("Invalid email address")});function Eze({onToggleMode:e}){const[t,r]=b.useState(!1),[n,i]=b.useState(null),{signIn:s}=ol(),{register:a,handleSubmit:o,formState:{errors:c}}=mb({resolver:gb(_ze)}),u=async d=>{r(!0),i(null);const{error:f}=await s(d.email,d.fullName);f&&(i(f.message),r(!1))};return l.jsxs(ue,{className:"w-full max-w-md mx-auto",children:[l.jsxs(ye,{className:"space-y-1",children:[l.jsx(Ve,{className:"text-2xl text-center",children:"Welcome to AAOE"}),l.jsx(jn,{className:"text-center",children:"Enter your name and email to get started"})]}),l.jsxs(de,{children:[l.jsxs("form",{onSubmit:o(u),className:"space-y-4",children:[n&&l.jsx(Nw,{variant:"destructive",children:l.jsx(Ow,{children:n})}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"fullName",children:"Full Name"}),l.jsx(Je,{id:"fullName",type:"text",placeholder:"John Doe",...a("fullName"),disabled:t}),c.fullName&&l.jsx("p",{className:"text-sm text-destructive",children:c.fullName.message})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"email",children:"Email"}),l.jsx(Je,{id:"email",type:"email",placeholder:"[email protected]",...a("email"),disabled:t}),c.email&&l.jsx("p",{className:"text-sm text-destructive",children:c.email.message})]}),l.jsxs(ie,{type:"submit",className:"w-full",disabled:t,children:[t&&l.jsx(Jm,{className:"mr-2 h-4 w-4 animate-spin"}),!t&&l.jsx(Aee,{className:"mr-2 h-4 w-4"}),"Get Started"]})]}),l.jsx("div",{className:"mt-4 p-3 bg-muted rounded-lg",children:l.jsxs("p",{className:"text-xs text-muted-foreground",children:[l.jsx("strong",{children:"No password needed!"})," Just enter your name and email to access the AAOE AI assistant."]})})]})]})}function Nze(){return l.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:l.jsx("div",{className:"w-full max-w-md",children:l.jsx(Eze,{})})})}const Oze="agent_8601k9akbg9xfdd9773wp4z4r233";function Aze(){const[e,t]=b.useState([{id:"1",type:"assistant",content:"Hi! I'm Paige, your AAOE assistant. I can help you with information about the 2026 Annual Conference in Louisville, KY (April 20-22). What would you like to know?",timestamp:new Date}]),[r,n]=b.useState(""),[i,s]=b.useState(!1),[a,o]=b.useState(""),c=b.useRef(null),u=b.useRef(null),[d,f]=b.useState(!1);b.useEffect(()=>{const v="web-"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);o(v),console.log("New chat session:",v);const y=()=>{console.log("Loading ElevenLabs widget...");const w=document.createElement("script");w.src="https://elevenlabs.io/convai-widget/index.js",w.async=!0,w.onload=()=>{console.log("ElevenLabs widget loaded successfully"),f(!0),x()},w.onerror=S=>{console.error("Failed to load ElevenLabs widget:",S),g("Voice assistant unavailable")},document.head.appendChild(w)},x=()=>{try{const w=document.createElement("elevenlabs-convai");w.setAttribute("agent-id",Oze),document.body.appendChild(w),console.log("ElevenLabs widget initialized")}catch(w){console.error("Failed to initialize ElevenLabs widget:",w)}};return y(),()=>{const w=document.querySelector("elevenlabs-convai");w&&w.remove()}},[]);const h=async()=>
629{if(!r.trim()||i)return;const v=r;p("user",v),n(""),s(!0);try{const y=await fetch("/api/chat/message",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session_id:a,message:v})});if(y.ok){const x=await y.json();console.log("RAG Chat response:",x),x.success&&x.response?(p("assistant",x.response,x.confidence),x.sources&&x.sources.length>0&&console.log("📚 Sources:",x.sources)):p("system","Sorry, I encountered an error. Please try again or call us.")}else console.error("Chat API error:",y.status,await y.text()),p("system","Sorry, there was an error sending your message. Please try again or use voice chat.")}catch(y){console.error("Failed to send chat message:",y),p("system","Sorry, there was an error connecting to the chat service. Please try again.")}finally{s(!1)}},p=(v,y,x)=>{const w={id:Date.now().toString(),type:v,content:y,timestamp:new Date,confidence:x};t(S=>[...S,w])},g=v=>{p("system",v)},m=async()=>{if(a)try{await fetch("/api/chat/clear-conversation",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session_id:a})}),t([{id:Date.now().toString(),type:"assistant",content:"Hi! I'm Paige, your AAOE assistant. I can help you with information about the 2026 Annual Conference in Louisville, KY (April 20-22). What would you like to know?",timestamp:new Date}]),g("Conversation cleared")}catch(v){console.error("Failed to clear conversation:",v),g("Failed to clear conversation")}};return b.useEffect(()=>{if(c.current&&u.current){const v=u.current.querySelector("[data-radix-scroll-area-viewport]");v&&(v.scrollTop=v.scrollHeight)}},[e]),l.jsx("div",{className:"space-y-6",children:l.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx(zc,{href:"/",children:l.jsxs(ie,{variant:"ghost",size:"sm",children:[l.jsx(K0,{className:"h-4 w-4 mr-2"}),"Back"]})}),l.jsxs("div",{children:[l.jsx("h1",{className:"text-3xl font-bold",children:"Web Chat"}),l.jsx("p",{className:"text-muted-foreground",children:"Chat with Paige, your AAOE AI assistant"})]})]}),l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{children:l.jsxs(Ve,{className:"flex items-center gap-2",children:[l.jsx(Oi,{className:"h-5 w-5"}),"Live Chat Assistant - Paige"]})}),l.jsx(ie,{onClick:m,variant:"outline",size:"sm",children:"Clear Chat"})]})}),l.jsxs(de,{className:"space-y-4",children:[l.jsx("div",{className:"h-[450px] border rounded-lg bg-background overflow-hidden",children:l.jsx(tl,{ref:u,className:"h-full",children:l.jsxs("div",{className:"space-y-4 p-4",children:[e.map(v=>l.jsx("div",{className:`flex ${v.type==="user"?"justify-end":"justify-start"}`,children:l.jsxs("div",{className:`max-w-[70%] rounded-lg px-3 py-2 text-sm break-words ${v.type==="user"?"bg-primary text-primary-foreground":v.type==="system"?"bg-muted text-muted-foreground text-xs":"bg-muted"}`,children:[l.jsx("p",{className:"whitespace-pre-wrap",children:v.content}),l.jsxs("div",{className:"flex items-center justify-between mt-1 gap-2",children:[l.jsx("p",{className:"text-xs opacity-70",children:v.timestamp.toLocaleTimeString()}),v.confidence!==void 0&&l.jsxs("p",{className:"text-xs opacity-70",children:[Math.round(v.confidence*100),"% confidence"]})]})]})},v.id)),l.jsx("div",{ref:c})]})})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Je,{value:r,onChange:v=>n(v.target.value),placeholder:i?"Sending message...":"Type a message...",onKeyDown:v=>v.key==="Enter"&&!i&&h(),disabled:i,className:"flex-1",maxLength:500}),l.jsx(ie,{onClick:h,size:"sm",disabled:!r.trim()||i,children:i?l.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"}):l.jsx(_5,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex items-center gap-2 p-3 border rounded-lg bg-blue-50 dark:bg-blue-950/20",children:[l.jsx(Oi,{className:"h-4 w-4 text-blue-600"}),l.jsx("span",{className:"text-sm text-blue-700 dark:text-blue-300",children:"Type messages above or use the voice widget (bottom right) for voice conversation."})]}),l.jsx("div",{className:"text-sm text-muted-foreground",children:l.jsxs("p",{children:[l.jsx("strong",{children:"Note:"})," This widget connects to the live AAOE AI assistant. Test conversations will be logged in your call analytics and transcripts."]})})]})]})]})})}const Cze="1414",ID="aaoe_admin_auth";function Pze(){const[e,t]=b.useState(""),[r,n]=b.useState(null),[,i]=aO();b.useEffect(()=>{sessionStorage.getItem(ID)==="true"&&i("/admin/dashboard")},[i]);const s=a=>{a.preventDefault(),n(null),e===Cze?(sessionStorage.setItem(ID,"true"),i("/admin/dashboard")):(n("Incorrect password"),t(""))};return l.jsx("div",{className:"min-h-[80vh] flex items-center justify-center p-4",children:l.jsxs("div",{className:"w-full max-w-md",children:[l.jsx("div",{className:"mb-6",children:l.jsx(zc,{href:"/",children:l.jsxs(ie,{variant:"ghost",size:"sm",children:[l.jsx(K0,{className:"h-4 w-4 mr-2"}),"Back to Dashboard"]})})}),l.jsxs(ue,{children:[l.jsxs(ye,{className:"space-y-1 text-center",children:[l.jsx("div",{className:"flex justify-center mb-2",children:l.jsx("div",{className:"h-12 w-12 rounded-full bg-primary/10 flex items-center justify-center",children:l.jsx(Fp,{className:"h-6 w-6 text-primary"})})}),l.jsx(Ve,{className:"text-2xl",children:"Admin Access"}),l.jsx(jn,{children:"Enter the admin password to continue"})]}),l.jsx(de,{children:l.jsxs("form",{onSubmit:s,className:"space-y-4",children:[r&&l.jsx(Nw,{variant:"destructive",children:l.jsx(Ow,{children:r})}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"password",children:"Password"}),l.jsxs("div",{className:"relative",children:[l.jsx(Oee,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),l.jsx(Je,{id:"password",type:"password",placeholder:"Enter admin password",value:e,onCh
629ange:a=>t(a.target.value),className:"pl-10",autoFocus:!0})]})]}),l.jsxs(ie,{type:"submit",className:"w-full",children:[l.jsx(Fp,{className:"h-4 w-4 mr-2"}),"Access Admin Panel"]})]})})]})]})})}const Dv=["#3b82f6","#10b981","#f59e0b"];function Tze(){var i;const{data:e,isLoading:t,error:r}=Ke({queryKey:["admin-analytics"],queryFn:async()=>{const s=await fetch("/api/admin/dashboard-analytics");if(!s.ok)throw new Error("Failed to fetch analytics");return s.json()},refetchInterval:3e4});if(t)return l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[...Array(4)].map((s,a)=>l.jsxs(ue,{children:[l.jsxs(ye,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l.jsx(jt,{className:"h-4 w-24"}),l.jsx(jt,{className:"h-4 w-4"})]}),l.jsx(de,{children:l.jsx(jt,{className:"h-8 w-16"})})]},a))}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsx(jt,{className:"h-6 w-48"})}),l.jsx(de,{children:l.jsx(jt,{className:"h-64 w-full"})})]}),l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsx(jt,{className:"h-6 w-48"})}),l.jsx(de,{children:l.jsx(jt,{className:"h-64 w-full"})})]})]})]});if(r)return l.jsx(ue,{children:l.jsx(de,{className:"pt-6",children:l.jsx("p",{className:"text-center text-muted-foreground",children:"Failed to load analytics data. Please try again later."})})});const n=(e==null?void 0:e.interactionDistribution)||[{type:"Web Chat",count:0},{type:"SMS",count:0},{type:"Calling",count:0}];return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[l.jsxs(ue,{children:[l.jsxs(ye,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l.jsx(Ve,{className:"text-sm font-medium",children:"Total Conversations"}),l.jsx(Oi,{className:"h-4 w-4 text-muted-foreground"})]}),l.jsxs(de,{children:[l.jsx("div",{className:"text-2xl font-bold",children:(e==null?void 0:e.totalConversations)||0}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"All time conversations"})]})]}),l.jsxs(ue,{children:[l.jsxs(ye,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l.jsx(Ve,{className:"text-sm font-medium",children:"Avg Session Duration"}),l.jsx(Hs,{className:"h-4 w-4 text-muted-foreground"})]}),l.jsxs(de,{children:[l.jsxs("div",{className:"text-2xl font-bold",children:[(e==null?void 0:e.avgSessionDuration)||0,"s"]}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Average duration in seconds"})]})]}),l.jsxs(ue,{children:[l.jsxs(ye,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l.jsx(Ve,{className:"text-sm font-medium",children:"Total Messages"}),l.jsx(_ee,{className:"h-4 w-4 text-muted-foreground"})]}),l.jsxs(de,{children:[l.jsx("div",{className:"text-2xl font-bold",children:(e==null?void 0:e.totalMessages)||0}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Across all sessions"})]})]}),l.jsxs(ue,{children:[l.jsxs(ye,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l.jsx(Ve,{className:"text-sm font-medium",children:"Avg Messages / Session"}),l.jsx(ac,{className:"h-4 w-4 text-muted-foreground"})]}),l.jsxs(de,{children:[l.jsx("div",{className:"text-2xl font-bold",children:((i=e==null?void 0:e.avgMessagesPerSession)==null?void 0:i.toFixed(1))||0}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Messages per conversation"})]})]})]}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsx(Ve,{children:"Interaction Type Distribution"})}),l.jsx(de,{children:l.jsx("div",{className:"h-64",children:l.jsx(nm,{width:"100%",height:"100%",children:l.jsxs(rH,{children:[l.jsx(Zs,{data:n,cx:"50%",cy:"50%",labelLine:!1,label:({type:s,percent:a})=>`${s}: ${(a*100).toFixed(0)}%`,outerRadius:80,fill:"#8884d8",dataKey:"count",nameKey:"type",children:n.map((s,a)=>l.jsx(Pc,{fill:Dv[a%Dv.length]},`cell-${a}`))}),l.jsx(on,{}),l.jsx(Vo,{})]})})})})]}),l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsx(Ve,{children:"Interaction Volume"})}),l.jsx(de,{children:l.jsx("div",{className:"h-64",children:l.jsx(nm,{width:"100%",height:"100%",children:l.jsxs(tH,{data:n,children:[l.jsx(Ba,{dataKey:"type"}),l.jsx(za,{}),l.jsx(on,{}),l.jsx(gl,{dataKey:"count",fill:"#3b82f6",children:n.map((s,a)=>l.jsx(Pc,{fill:Dv[a%Dv.length]},`cell-${a}`))})]})})})})]})]})]})}function ui({label:e,value:t,subtext:r,trend:n,trendValue:i,icon:s,variant:a="default"}){const o={default:"bg-zinc-50 dark:bg-zinc-900/50",success:"bg-emerald-50 dark:bg-emerald-950/30",warning:"bg-amber-50 dark:bg-amber-950/30",info:"bg-blue-50 dark:bg-blue-950/30",purple:"bg-violet-50 dark:bg-violet-950/30"},c={default:"text-zinc-400",success:"text-emerald-500",warning:"text-amber-500",info:"text-blue-500",purple:"text-violet-500"},u={default:"text-zinc-900 dark:text-zinc-100",success:"text-emerald-600 dark:text-emerald-400",warning:"text-amber-600 dar
629k:text-amber-400",info:"text-blue-600 dark:text-blue-400",purple:"text-violet-600 dark:text-violet-400"};return l.jsxs("div",{className:se("rounded-2xl p-5 transition-all",o[a]),children:[l.jsxs("div",{className:"flex items-start justify-between mb-3",children:[l.jsx("span",{className:"text-[13px] font-medium text-zinc-500 dark:text-zinc-400",children:e}),s&&l.jsx(s,{className:se("h-4 w-4",c[a])})]}),l.jsxs("div",{className:"flex items-end justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:se("text-[28px] font-semibold tracking-tight leading-none",u[a]),children:t}),r&&l.jsx("p",{className:"text-[12px] text-zinc-400 dark:text-zinc-500 mt-1.5",children:r})]}),n&&i&&l.jsxs("div",{className:se("flex items-center gap-0.5 text-[12px] font-medium px-2 py-1 rounded-full",n==="up"&&"bg-emerald-100 text-emerald-600 dark:bg-emerald-900/50 dark:text-emerald-400",n==="down"&&"bg-red-100 text-red-600 dark:bg-red-900/50 dark:text-red-400",n==="neutral"&&"bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400"),children:[n==="up"?l.jsx(bee,{className:"h-3 w-3"}):n==="down"?l.jsx(xee,{className:"h-3 w-3"}):null,i]})]})]})}function Lv({rank:e,text:t,value:r,maxValue:n,showBar:i=!0,variant:s="default"}){const a=n?Number(r)/n*100:0;return l.jsx("div",{className:"group py-3 border-b border-zinc-100 dark:border-zinc-800 last:border-0",children:l.jsxs("div",{className:"flex items-center gap-3",children:[e!==void 0&&l.jsx("span",{className:"text-[12px] font-medium text-zinc-400 w-5 text-center",children:e}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-[14px] text-zinc-700 dark:text-zinc-300 truncate",children:t}),i&&n&&l.jsx("div",{className:"mt-2 h-1 bg-zinc-100 dark:bg-zinc-800 rounded-full overflow-hidden",children:l.jsx("div",{className:se("h-full rounded-full transition-all",s==="warning"?"bg-amber-400":s==="success"?"bg-emerald-400":"bg-zinc-300 dark:bg-zinc-600"),style:{width:`${Math.min(a,100)}%`}})})]}),l.jsx("span",{className:se("text-[13px] font-medium tabular-nums",s==="warning"?"text-amber-600":s==="success"?"text-emerald-600":"text-zinc-500"),children:r})]})})}function di({title:e,subtitle:t}){return l.jsxs("div",{className:"mb-4",children:[l.jsx("h3",{className:"text-[15px] font-semibold text-zinc-900 dark:text-zinc-100",children:e}),t&&l.jsx("p",{className:"text-[13px] text-zinc-500 mt-0.5",children:t})]})}function Jr({children:e,className:t}){return l.jsx("div",{className:se("bg-white dark:bg-zinc-900 rounded-2xl border border-zinc-200 dark:border-zinc-800 p-5",t),children:e})}function _l({type:e,text:t}){const n={trending:{bg:"bg-emerald-50 dark:bg-emerald-950/40 border-emerald-100 dark:border-emerald-900",icon:ac,iconColor:"text-emerald-500"},warning:{bg:"bg-amber-50 dark:bg-amber-950/40 border-amber-100 dark:border-amber-900",icon:Ds,iconColor:"text-amber-500"},info:{bg:"bg-blue-50 dark:bg-blue-950/40 border-blue-100 dark:border-blue-900",icon:CO,iconColor:"text-blue-500"},recommendation:{bg:"bg-violet-50 dark:bg-violet-950/40 border-violet-100 dark:border-violet-900",icon:$u,iconColor:"text-violet-500"}}[e],i=n.icon;return l.jsxs("div",{className:se("rounded-xl border p-4 flex gap-3",n.bg),children:[l.jsx(i,{className:se("h-5 w-5 shrink-0 mt-0.5",n.iconColor)}),l.jsx("p",{className:"text-[14px] text-zinc-700 dark:text-zinc-300 leading-relaxed",children:t})]})}function Fv({value:e,size:t=120,strokeWidth:r=8,color:n="emerald"}){const i=(t-r)/2,s=i*2*Math.PI,a=s-e/100*s,o={emerald:"stroke-emerald-500",blue:"stroke-blue-500",amber:"stroke-amber-500",violet:"stroke-violet-500"};return l.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[l.jsxs("svg",{width:t,height:t,className:"-rotate-90",children:[l.jsx("circle",{cx:t/2,cy:t/2,r:i,fill:"none",stroke:"currentColor",strokeWidth:r,className:"text-zinc-100 dark:text-zinc-800"}),l.jsx("circle",{cx:t/2,cy:t/2,r:i,fill:"none",strokeWidth:r,strokeDasharray:s,strokeDashoffset:a,strokeLinecap:"round",className:se("transition-all duration-500",o[n])})]}),l.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:l.jsxs("span",{className:"text-2xl font-semibold text-zinc-900 dark:text-zinc-100",children:[e,"%"]})})]})}function bs({message:e,submessage:t}){return l.jsxs("div",{className:"py-8 text-center",children:[l.jsx("div",{className:"w-12 h-12 rounded-full bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center mx-auto mb-3",children:l.jsx(Uy,{className:"h-6 w-6 text-zinc-400"})}),l.jsx("p",{className:"text-[14px] text-zinc-500",children:e}),t&&l.jsx("p",{className:"text-[12px] text-zinc-400 mt-1",children:t})]})}function kze(){var j,E,_,N,O,C,k,$,D,A,R,T,L,M,I,F,U,V,G,Z,he,ve,re,ge,Y,ee,q,W,Fe,Ae,Ue,nt,We,_e,St,B,H,K,me,oe,ae,Ce,st,ft,rr,$n,Ct;const[e,t]=b.useState("90"),[r,n]=b.useState("overview"),[i,s]=b.useState(!1),a=vn(),{data:o,isLoading:c}=Ke({queryKey:["enhanced-summary",e],queryFn:async()=>{const ne=await fetch(`/api/analytics/enhanced-summary?days=${e}`);if(!ne.ok)throw new Error("Failed to fetch summary");return ne.json()}}),{data:u,isLoading:d}=Ke({queryKey:["top-questions",e],queryFn:async()=>{const ne=await fetch(`/api/analytics/top-questions?days=${e}`);if(!ne.ok)throw new Error("Failed to fetch top questions");return ne.json()}}),{data:f}=Ke({queryKey:["emerging-topics",e],queryFn:async()=>{const ne=await fetch(`/api/analytics/emerging-topics?days=${e}`);if(!ne.ok)throw new Error("Failed to fetch emerging topics");return ne.json()}}),{data:h}=Ke({queryKey:["confidence-distribution",e],queryFn:async()=>{const ne=await fetch(`/api/analytics/confidence-distribution?days=${e}`);if(!ne.ok)throw new Error("Failed to fetch confidence distribution");return ne.json()}}),{data:p}=Ke({queryKey:["escalation-reasons",e],queryFn:async()=>{const ne=await fetch(`/api/analytics/escalation-reasons?days=${e}`);if(!ne.ok)throw new Error("Failed to fetch escalation reasons");return ne.json()}}),{data:g}=Ke({queryKey:["knowledge-gap-rate",e],queryFn:async()=>{const ne=await fetch(`/api/analytics/knowledge-gap-rate?days=${e}`);if(!ne.ok)throw new Error("Failed to fetch knowledge gap rate");return ne.json()}}),{data:m}=Ke({queryKey:["dead-ends",e],queryFn:async()=>{const ne=await fetch(`/api/analytics/dead-ends?days=${e}`);if(!ne.ok)throw new Error("Failed to fetch dead ends");return ne.json()}}),{data:v}=Ke({queryKey:["business-impact",e],queryFn:async()=>{const ne=await fetch(`/api/analytics/business-impact?days=${e}`);if(!ne.ok)throw new Error("Failed to fetch business impact");return ne.json()}}),{data:y,isLoading:x}=Ke({queryKey:["weekly-insights"],queryFn:async()=>{const ne=await fetch("/api/analytics/weekly-insights");if(!ne.ok)throw new Error("Failed to fetch weekly insights");return ne.json()}}),w=fr({mutationFn:async()=>{const ne=await fetch("/api/analytics/generate-insights",{method:"POST",headers:{"Content-Type":"application/json"}});if(!ne.ok)throw new Error("Failed to generate insights");return ne.json()},onSuccess:()=>{a.invalidateQueries({queryKey:["weekly-insights"]})}});if(c)return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx(jt,{className:"h-8 w-48"}),l.jsx(jt,{className:"h-10 w-32"})]}),l.jsx("div",{className:"grid gap-4 grid-cols-2 lg:grid-cols-4",children:[...Array(4)].map((ne,Pe)=>l.jsx(jt,{className:"h-32 rounded-2xl"},Pe))}),l.jsx(jt,{className:"h-96 rounded-2xl"})]});const S=[{id:"overview",label:"Overview"},{id:"topics",label:"Topics"},{id:"performance",label:"Performance"},{id:"impact",label:"Impact"},{id:"insights",label:"Insights"}];return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-[22px] font-semibold text-zinc-900 dark:text-zinc-100 tracking-tight",children:"Conversation Analytics"}),l.jsx("p",{className:"text-[14px] text-zinc-500 mt-0.5",children:"AI-powered insights from your customer interactions"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(Zt,{value:e,onValueChange:t,children:[l.jsx(qt,{className:"w-[140px] h-9 text-[13px] rounded-lg border-zinc-200 dark:border-zinc-800",children:l.jsx(Jt,{})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"7",children:"Last 7 days"}),l.jsx(te,{value:"14",children:"Last 14 days"}),l.jsx(te,{value:"30",children:"Last 30 days"}),l.jsx(te,{value:"90",children:"Last 90 days"}),l.jsx(te,{value:"365",children:"Last year"}),l.jsx(te,{value:"9999",children:"All time"})]})]}),l.jsx(zc,{href:"/analytics-report",children:l.jsxs(ie,{variant:"outline",size:"sm",className:"h-9 gap-2",children:[l.jsx(jee,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:"Download Report"})]})})]})]}),l.jsx("div",{className:"overflow-x-auto -mx-4 px-4 sm:mx-0 sm:px-0",children:l.jsx("div",{className:"flex gap-1 p-1 bg-zinc-100 dark:bg-zinc-800/50 rounded-xl w-fit min-w-max",children:S.map(ne=>l.jsx("button",{onClick:()=>n(ne.id),className:se("px-4 py-2 text-[13px] font-medium rounded-lg transition-all whitespace-nowrap",r===ne.id?"bg-white dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 shadow-sm":"text-zinc-500 hover:text-zinc-700 dark:hover:text-zinc-300"),children:ne.label},ne.id))})}),r==="overview"&&l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"grid gap-4 grid-cols-2 lg:grid-cols-4",children:[l.jsx(ui,{label:"Total Conversations",value:((E=(j=o==null?void 0:o.overview)==null?void 0:j.totalConversations)==null?void 0:E.toLocaleStr
629ing())||"0",subtext:e==="9999"?"All time":e==="365"?"Last year":`Last ${e} days`,icon:G0}),l.jsx(ui,{label:"AI Confidence",value:`${Math.round((((_=o==null?void 0:o.overview)==null?void 0:_.rawAvgConfidence)||0)*100)}%`,subtext:"How well AI matched answers to questions",icon:O5,variant:"success"}),l.jsx(ui,{label:"Escalation Rate",value:`${((N=o==null?void 0:o.overview)==null?void 0:N.escalationRate)||0}%`,subtext:"Transferred to human",icon:lc,variant:Number((O=o==null?void 0:o.overview)==null?void 0:O.escalationRate)>20?"warning":"default"}),l.jsx(ui,{label:"Knowledge Gaps",value:((k=(C=o==null?void 0:o.overview)==null?void 0:C.knowledgeGapsCount)==null?void 0:k.toLocaleString())||"0",subtext:"Questions AI struggled with",icon:Uy,variant:Number(($=o==null?void 0:o.overview)==null?void 0:$.knowledgeGapsCount)>10?"warning":"default"})]}),l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsxs(Jr,{children:[l.jsx(di,{title:"Top Questions",subtitle:"Most frequently asked"}),((D=u==null?void 0:u.topQuestions)==null?void 0:D.length)>0?l.jsx("div",{children:u.topQuestions.slice(0,5).map((ne,Pe)=>{var Gt;return l.jsx(Lv,{rank:Pe+1,text:ne.question,value:ne.count,maxValue:(Gt=u.topQuestions[0])==null?void 0:Gt.count},Pe)})}):l.jsx(bs,{message:"No questions analyzed yet"})]}),l.jsxs(Jr,{children:[l.jsx(di,{title:"AI-Generated Insights",subtitle:"This week's highlights"}),x?l.jsx("div",{className:"space-y-3",children:[...Array(3)].map((ne,Pe)=>l.jsx(jt,{className:"h-16 rounded-xl"},Pe))}):y!=null&&y.insights&&(((A=y.insights.trending_topic)==null?void 0:A.length)>0||((R=y.insights.recommendation)==null?void 0:R.length)>0||((T=y.insights.ai_struggle)==null?void 0:T.length)>0)?l.jsxs("div",{className:"space-y-3",children:[(L=y.insights.trending_topic)==null?void 0:L.slice(0,1).map((ne,Pe)=>l.jsx(_l,{type:"trending",text:ne.insight_text},`t-${Pe}`)),(M=y.insights.ai_struggle)==null?void 0:M.slice(0,1).map((ne,Pe)=>l.jsx(_l,{type:"warning",text:ne.insight_text},`w-${Pe}`)),(I=y.insights.recommendation)==null?void 0:I.slice(0,1).map((ne,Pe)=>l.jsx(_l,{type:"recommendation",text:ne.insight_text},`r-${Pe}`))]}):l.jsx(bs,{message:"Not enough data yet",submessage:"Insights will appear as conversations are recorded"})]})]})]}),r==="topics"&&l.jsx("div",{className:"space-y-6",children:l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsxs(Jr,{children:[l.jsx(di,{title:"Top Questions",subtitle:"What customers are asking most"}),d?l.jsx("div",{className:"space-y-3",children:[...Array(6)].map((ne,Pe)=>l.jsx(jt,{className:"h-12"},Pe))}):((F=u==null?void 0:u.topQuestions)==null?void 0:F.length)>0?l.jsx("div",{children:u.topQuestions.slice(0,8).map((ne,Pe)=>{var Gt;return l.jsx(Lv,{rank:Pe+1,text:ne.question,value:ne.count,maxValue:(Gt=u.topQuestions[0])==null?void 0:Gt.count},Pe)})}):l.jsx(bs,{message:"No questions analyzed yet"})]}),l.jsxs(Jr,{children:[l.jsx(di,{title:"Topic Distribution",subtitle:"Topics by conversation volume"}),((U=u==null?void 0:u.topTopics)==null?void 0:U.length)>0?l.jsx("div",{children:u.topTopics.slice(0,6).map((ne,Pe)=>{var Gt;return l.jsx(Lv,{text:ne.topic.charAt(0).toUpperCase()+ne.topic.slice(1),value:ne.count,maxValue:(Gt=u.topTopics[0])==null?void 0:Gt.count,variant:parseFloat(ne.avgFrustration)>.5?"warning":"default"},Pe)})}):l.jsx(bs,{message:"No topics analyzed yet"})]}),l.jsxs(Jr,{children:[l.jsx(di,{title:"Emerging Topics",subtitle:"Topics with increasing question volume compared to previous period"}),((V=f==null?void 0:f.emergingTopics)==null?void 0:V.length)>0?l.jsx("div",{children:f.emergingTopics.slice(0,5).map((ne,Pe)=>l.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-zinc-100 dark:border-zinc-800 last:border-0",children:[l.jsx("span",{className:"text-[14px] text-zinc-700 dark:text-zinc-300 capitalize",children:ne.topic}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-[13px] text-zinc-500",children:ne.currentCount}),l.jsxs("span",{className:"text-[12px] font-medium text-emerald-600 bg-emerald-50 dark:bg-emerald-950/50 px-2 py-0.5 rounded-full",children:["+",ne.growthRate,"%"]})]})]},Pe))}):l.jsx(bs,{message:"No emerging topics detected"})]}),l.jsxs(Jr,{children:[l.jsx(di,{title:"Unresolved Topics",subtitle:"Topics with high escalation or low confidence - consider adding KB content"}),((G=u==null?void 0:u.unresolvedTopics)==null?void 0:G.length)>0?l.jsx("div",{children:u.unresolvedTopics.slice(0,5).map((ne,Pe)=>l.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-zinc-100 dark:border-zinc-800 last:border-0",children:[l.jsx("span",{className:"text-[14px] text-zinc-700 dark:text-zinc-300 capitalize",children:ne.topic}),l.jsxs("span",{className:"text-[12px] font-medium text-amber-600 bg-amber-50 dark:bg-amber-950/50 px-2 py-0.5 rounded-full",children:[ne.count," unresolved"]})]},Pe))}):l.jsx(bs,{message:"All topics well handled!",submessage:"No unresolved topics detected"})]})]})}),r==="performance"&&l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"grid gap-4 grid-cols-2 lg:grid-cols-4",children:[l.jsx(ui,{label:"Avg Confidence",value:`${Math.round(((h==null?void 0:h.rawAvgConfidence)||0)*100)}%`,subtext:"How accurately AI matched KB content",variant:"success"}),l.jsx(ui,{label:"High Confidence",value:`${((Z=h==null?void 0:h.distribution)==null?void 0:Z.high)||0}`,subtext:"Strong KB match (≥70%)",variant:"success"}),l.jsx(ui,{label:"Low Confidence",value:`${(((he=h==null?void 0:h.distribution)==null?void 0:he.low)||0)+(((ve=h==null?void 0:h.distribution)==null?void 0:ve.very_low)||0)}`,subtext:"Weak KB match (<50%) - review needed",variant:"warning"}),l.jsx(ui,{label:"Total Escalations",value:(p==null?void 0:p.totalEscalations)||0,subtext:"Requested human assistance",variant:"info"})]}),l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsxs(Jr,{children:[l.jsx(di,{title:"Confidence Distribution",subtitle:"Breakdown of how well AI responses matched knowledge base content"}),l.jsx("div",{className:"flex items-center justify-center py-6",children:l.jsx(Fv,{value:Math.round((((re=o==null?void 0:o.overview)==null?void 0:re.avgConfidence)||0)*100),color:"emerald"})}),l.jsx("div",{className:"grid grid-cols-2 gap-3 mt-4",children:[{label:"High (≥70%)",value:((ge=h==null?void 0:h.distribution)==null?void 0:ge.high)||0,color:"bg-emerald-500"},{label:"Medium (50-70%)",value:((Y=h==null?void 0:h.distribution)==null?void 0:Y.medium)||0,color:"bg-blue-500"},{label:"Low (30-50%)",value:((ee=h==null?void 0:h.distribution)==null?void 0:ee.low)||0,color:"bg-
629amber-500"},{label:"Very Low (<30%)",value:((q=h==null?void 0:h.distribution)==null?void 0:q.very_low)||0,color:"bg-red-500"}].map((ne,Pe)=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:se("w-2 h-2 rounded-full",ne.color)}),l.jsx("span",{className:"text-[12px] text-zinc-500",children:ne.label}),l.jsx("span",{className:"text-[12px] font-medium text-zinc-700 dark:text-zinc-300 ml-auto",children:ne.value})]},Pe))})]}),l.jsxs(Jr,{children:[l.jsx(di,{title:"Confidence by Channel",subtitle:"AI performance by communication type"}),h!=null&&h.byChannel&&Object.keys(h.byChannel).length>0?l.jsx("div",{className:"space-y-4",children:Object.entries(h.byChannel).sort((ne,Pe)=>Pe[1].avgConfidencePercent-ne[1].avgConfidencePercent).map(([ne,Pe])=>l.jsxs("div",{className:"py-1",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-[13px] font-medium text-zinc-700 dark:text-zinc-300",children:Pe.label}),l.jsxs("span",{className:"text-[11px] text-zinc-400",children:["(",Pe.count,")"]})]}),l.jsxs("span",{className:se("text-[14px] font-semibold",Pe.avgConfidencePercent>=70?"text-emerald-600":Pe.avgConfidencePercent>=50?"text-blue-600":"text-amber-600"),children:[Pe.avgConfidencePercent,"%"]})]}),l.jsx("div",{className:"h-2 bg-zinc-100 dark:bg-zinc-800 rounded-full overflow-hidden",children:l.jsx("div",{className:se("h-full rounded-full transition-all",Pe.avgConfidencePercent>=70?"bg-emerald-500":Pe.avgConfidencePercent>=50?"bg-blue-500":"bg-amber-500"),style:{width:`${Pe.avgConfidencePercent}%`}})})]},ne))}):l.jsx(bs,{message:"No channel data available"})]}),l.jsxs(Jr,{children:[l.jsx(di,{title:"Escalation Reasons",subtitle:"Categories of requests the AI transferred to human agents"}),((W=p==null?void 0:p.escalationReasons)==null?void 0:W.length)>0?l.jsx("div",{children:p.escalationReasons.map((ne,Pe)=>{var Gt;return l.jsx(Lv,{text:ne.category.replace(/_/g," ").replace(/\b\w/g,$i=>$i.toUpperCase()),value:ne.count,maxValue:(Gt=p.escalationReasons[0])==null?void 0:Gt.count,showBar:!0},Pe)})}):l.jsx(bs,{message:"No escalations recorded"})]}),l.jsxs(Jr,{children:[l.jsx(di,{title:"Knowledge Gap Rate",subtitle:"Questions where no matching content was found in the knowledge base"}),l.jsxs("div",{className:"flex items-center justify-between py-4",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"text-[42px] font-semibold text-zinc-900 dark:text-zinc-100 tracking-tight",children:[(g==null?void 0:g.gapRate)||0,"%"]}),l.jsxs("p",{className:"text-[13px] text-zinc-500",children:[(g==null?void 0:g.gapCount)||0," gaps of ",(g==null?void 0:g.totalSearches)||0," searches"]})]}),l.jsx(Fv,{value:100-((g==null?void 0:g.gapRate)||0),size:80,strokeWidth:6,color:Number(g==null?void 0:g.gapRate)>15?"amber":"emerald"})]}),(((Fe=g==null?void 0:g.recentGaps)==null?void 0:Fe.length)>0||((Ae=g==null?void 0:g.allGaps)==null?void 0:Ae.length)>0)&&l.jsxs("div",{className:"mt-4 pt-4 border-t border-zinc-100 dark:border-zinc-800",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("p",{className:"text-[12px] font-medium text-zinc-500",children:i?"All knowledge gaps:":"Recent gaps:"}),((Ue=g==null?void 0:g.allGaps)==null?void 0:Ue.length)>3&&l.jsx("button",{onClick:()=>s(!i),className:"text-[12px] text-blue-600 dark:text-blue-400 hover:underline",children:i?"Show less":`View all ${g.allGaps.length}`})]}),l.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:(nt=i?g.allGaps:g.recentGaps)==null?void 0:nt.map((ne,Pe)=>l.jsxs("div",{className:"text-[13px] text-zinc-600 dark:text-zinc-400 bg-zinc-50 dark:bg-zinc-800/50 rounded-lg px-3 py-2",children:[l.jsxs("span",{className:"block truncate",children:['"',ne.query,'"']}),ne.category&&l.jsx("span",{className:"text-[11px] text-zinc-400 capitalize",children:ne.category})]},Pe))})]})]}),l.jsxs(Jr,{children:[l.jsx(di,{title:"Conversation Dead-Ends",subtitle:"Conversations that ended abruptly without resolution"}),l.jsxs("div",{className:"flex items-center justify-between py-4",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"text-[42px] font-semibold text-zinc-900 dark:text-zinc-100 tracking-tight",children:[(m==null?void 0:m.deadEndRate)||0,"%"]}),l.jsxs("p",{className:"text-[13px] text-zinc-500",children:[(m==null?void 0:m.deadEndCount)||0," of ",(m==null?void 0:m.totalConversations)||0," conversations"]})]}),l.jsx(Fv,{value:100-((m==null?void 0:m.deadEndRate)||0),size:80,strokeWidth:6,color:Number(m==null?void 0:m.deadEndRate)>20?"amber":"emerald"})]}),((We=m==null?void 0:m.topDeadEndTopics)==null?void 0:We.length)>0&&l.jsxs("div",{className:"mt-4 pt-4 border-t border-zinc-100 dark:border-zinc-800",children:[l.jsx("p",{className:"text-[12px] font-medium text-zinc-500 mb-2",children:"Top dead-end topics:"}),l.jsx("div",{className:"space-y-1",children:m.topDeadEndTopics.slice(0,3).map((ne,Pe)=>l.jsxs("div",{className:"flex items-center justify-between text-[13px]",children:[l.jsx("span",{className:"text-zinc-600 dark:text-zinc-400 capitalize",children:ne.topic}),l.jsx("span",{className:"text-amber-600 font-medium",children:ne.count})]},Pe))})]})]})]})]}),r==="impact"&&l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"grid gap-4 grid-cols-2 lg:grid-cols-4",children:[l.jsx(ui,{label:"Cost Savings",value:`$${((_e=v==null?void 0:v.estimatedCostSavings)==null?void 0:_e.toLocaleStr
629ing())||"0"}`,subtext:`Est. savings vs human agents at $${((St=v==null?void 0:v.summary)==null?void 0:St.avgHumanCallCost)||15}/call`,icon:Bj,variant:"success"}),l.jsx(ui,{label:"Hours Saved",value:(v==null?void 0:v.hoursSaved)||"0",subtext:"Agent time freed for complex tasks",icon:Hs,variant:"info"}),l.jsx(ui,{label:"After-Hours Coverage",value:`${((B=v==null?void 0:v.afterHoursCoverage)==null?void 0:B.percentage)||0}%`,subtext:`${((H=v==null?void 0:v.afterHoursCoverage)==null?void 0:H.count)||0} outside business hours`,variant:"purple"}),l.jsx(ui,{label:"Repeat Contact Rate",value:`${(v==null?void 0:v.repeatContactRate)||0}%`,subtext:"Customers returning within 7 days (lower is better)",variant:Number(v==null?void 0:v.repeatContactRate)>15?"warning":"default"})]}),l.jsxs(Jr,{children:[l.jsx(di,{title:"AI Resolution Summary",subtitle:"Conversations fully handled by AI without needing human escalation"}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-3 py-4",children:[l.jsxs("div",{className:"text-center",children:[l.jsx("p",{className:"text-[48px] font-semibold text-zinc-900 dark:text-zinc-100 tracking-tight",children:((K=v==null?void 0:v.summary)==null?void 0:K.totalCalls)||0}),l.jsx("p",{className:"text-[14px] text-zinc-500",children:"Total Calls"})]}),l.jsxs("div",{className:"text-center",children:[l.jsx("p",{className:"text-[48px] font-semibold text-emerald-600 tracking-tight",children:((me=v==null?void 0:v.summary)==null?void 0:me.aiHandledCalls)||0}),l.jsx("p",{className:"text-[14px] text-zinc-500",children:"AI Resolved"})]}),l.jsxs("div",{className:"text-center",children:[l.jsx(Fv,{value:((oe=v==null?void 0:v.summary)==null?void 0:oe.aiHandledPercentage)||0,size:100,strokeWidth:8,color:"emerald"}),l.jsx("p",{className:"text-[14px] text-zinc-500 mt-2",children:"Success Rate"})]})]})]}),l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsx(Jr,{className:"bg-gradient-to-br from-emerald-50 to-emerald-100/50 dark:from-emerald-950/30 dark:to-emerald-900/20 border-emerald-200 dark:border-emerald-900",children:l.jsxs("div",{className:"flex items-start justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-[13px] font-medium text-emerald-700 dark:text-emerald-400",children:"Total Value Generated"}),l.jsxs("p",{className:"text-[36px] font-semibold text-emerald-600 dark:text-emerald-400 tracking-tight mt-1",children:["$",((ae=v==null?void 0:v.estimatedCostSavings)==null?void 0:ae.toLocaleString())||"0"]}),l.jsxs("p",{className:"text-[13px] text-emerald-600/70 dark:text-emerald-400/70 mt-2",children:[((Ce=v==null?void 0:v.summary)==null?void 0:Ce.aiHandledCalls)||0," calls × $",((st=v==null?void 0:v.summary)==null?void 0:st.avgHumanCallCost)||15," per call"]})]}),l.jsx("div",{className:"w-12 h-12 rounded-full bg-emerald-500/10 flex items-center justify-center",children:l.jsx(NO,{className:"h-6 w-6 text-emerald-500"})})]})}),l.jsx(Jr,{className:"bg-gradient-to-br from-blue-50 to-blue-100/50 dark:from-blue-950/30 dark:to-blue-900/20 border-blue-200 dark:border-blue-900",children:l.jsxs("div",{className:"flex items-start justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-[13px] font-medium text-blue-700 dark:text-blue-400",children:"Time Saved"}),l.jsxs("p",{className:"text-[36px] font-semibold text-blue-600 dark:text-blue-400 tracking-tight mt-1",children:[(v==null?void 0:v.hoursSaved)||0," hours"]}),l.jsxs("p",{className:"text-[13px] text-blue-600/70 dark:text-blue-400/70 mt-2",children:["Equivalent to ",Math.round(((v==null?void 0:v.hoursSaved)||0)/8)," full work days"]})]}),l.jsx("div",{className:"w-12 h-12 rounded-full bg-blue-500/10 flex items-center justify-center",children:l.jsx(Hs,{className:"h-6 w-6 text-blue-500"})})]})})]})]}),r==="insights"&&l.jsx("div",{className:"space-y-6",children:l.jsxs(Jr,{children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-full bg-violet-100 dark:bg-violet-900/50 flex items-center justify-center",children:l.jsx(Wy,{className:"h-5 w-5 text-violet-500"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-[15px] font-semibold text-zinc-900 dark:text-zinc-100",children:"Weekly AI Summary"}),l.jsx("p",{className:"text-[13px] text-zinc-500",children:"Automatically generated from your conversation data"})]})]}),l.jsxs("button",{onClick:()=>w.mutate(),disabled:w.isPending,className:se("flex items-center gap-2 px-4 py-2 rounded-lg text-[13px] font-medium transition-all","bg-violet-100 text-violet-700 hover:bg-violet-200","dark:bg-violet-900/50 dark:text-violet-300 dark:hover:bg-violet-900",w.isPending&&"opacity-50 cursor-not-allowed"),children:[l.jsx(sc,{className:se("h-4 w-4",w.isPending&&"animate-spin")}),w.isPending?"Generating...":"Generate Insights"]})]}),x?l.jsx("div",{className:"space-y-4",children:[...Array(4)].map((ne,Pe)=>l.jsx(jt,{className:"h-20 rounded-xl"},Pe))}):y!=null&&y.insights?l.jsxs("div",{className:"space-y-6",children:[((ft=y.insights.trending_topic)==null?void 0:ft.length)>0&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("h4",{className:"text-[13px] font-semibold text-zinc-700 dark:text-zinc-300 flex items-center gap-2",children:[l.jsx(ac,{className:"h-4 w-4 text-emerald-500"}),"Trending Topics"]}),y.insights.trending_topic.map((ne,Pe)=>l.jsx(_l,{type:"trending",text:ne.insight_text},Pe))]}),((rr=y.insights.ai_struggle)==null?void 0:rr.length)>0&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("h4",{className:"text-[13px] font-semibold text-zinc-700 dark:text-zinc-300 flex items-center gap-2",children:[l.jsx(Ds,{className:"h-4 w-4 text-amber-500"}),"Areas for Improvement"]}),y.insights.ai_struggle.map((ne,Pe)=>l.jsx(_l,{type:"warning",text:ne.insight_text},Pe))]}),(($n=y.insights.sentiment_change)==null?void 0:$n.length)>0&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("h4",{className:"text-[13px] font-semibold text-zinc-700 dark:text-zinc-300 flex items-center gap-2",children:[l.jsx(CO,{className:"h-4 w-4 text-blue-500"}
629),"Sentiment Changes"]}),y.insights.sentiment_change.map((ne,Pe)=>l.jsx(_l,{type:"info",text:ne.insight_text},Pe))]}),((Ct=y.insights.recommendation)==null?void 0:Ct.length)>0&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("h4",{className:"text-[13px] font-semibold text-zinc-700 dark:text-zinc-300 flex items-center gap-2",children:[l.jsx($u,{className:"h-4 w-4 text-violet-500"}),"Recommendations"]}),y.insights.recommendation.map((ne,Pe)=>l.jsx(_l,{type:"recommendation",text:ne.insight_text},Pe))]}),Object.values(y.insights).every(ne=>ne.length===0)&&l.jsx(bs,{message:"Not enough conversation data yet",submessage:"Insights will appear automatically once more conversations are recorded"})]}):l.jsx(bs,{message:"Loading insights..."}),(y==null?void 0:y.generatedAt)&&l.jsxs("p",{className:"text-[12px] text-zinc-400 mt-6 pt-4 border-t border-zinc-100 dark:border-zinc-800",children:["Last updated: ",new Date(y.generatedAt).toLocaleString()]})]})})]})}function Rze(){const[e,t]=b.useState(""),[r,n]=b.useState("all"),[i,s]=b.useState(null),{data:a,isLoading:o,error:c,refetch:u,isFetching:d}=Ke({queryKey:["admin-transcripts",r,e],queryFn:async()=>{const g=new URLSearchParams;r!=="all"&&g.append("type",r),e&&g.append("search",e);const m=await fetch(`/api/admin/transcripts?${g}`);if(!m.ok)throw new Error("Failed to fetch transcripts");return m.json()},refetchInterval:3e4,refetchOnWindowFocus:!0}),f=()=>{if(!a||a.length===0)return;const m=[["ID","Type","Timestamp","Duration","Contact","Message Count","Summary","Transcript"].join(","),...a.map(x=>[x.id,x.type,x.timestamp,x.duration||"",x.phoneNumber||x.userEmail||"",x.messageCount,`"${(x.summary||"").replace(/"/g,'""')}"`,`"${x.transcript.replace(/"/g,'""').substring(0,500)}..."`].join(","))].join(`
630`),v=new Blob([m],{type:"text/csv;charset=utf-8;"}),y=document.createElement("a");y.href=URL.createObjectURL(v),y.download=`transcripts_${new Date().toISOString().split("T")[0]}.csv`,y.click()},h=g=>{switch(g){case"call":case"voice":return l.jsx(os,{className:"h-4 w-4"});case"sms":return l.jsx(G0,{className:"h-4 w-4"});case"chat":return l.jsx(Oi,{className:"h-4 w-4"});default:return l.jsx(Oi,{className:"h-4 w-4"})}},p=g=>{switch(g){case"call":case"voice":return"default";case"sms":return"secondary";case"chat":return"outline";default:return"outline"}};return o?l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between",children:[l.jsx(jt,{className:"h-10 w-64"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(jt,{className:"h-10 w-32"}),l.jsx(jt,{className:"h-10 w-32"})]})]})}),l.jsx(de,{children:l.jsx("div",{className:"space-y-4",children:[...Array(5)].map((g,m)=>l.jsx(jt,{className:"h-24 w-full"},m))})})]}):c?l.jsx(ue,{children:l.jsx(de,{className:"pt-6",children:l.jsx("p",{className:"text-center text-muted-foreground",children:"Failed to load transcripts. Please try again later."})})}):l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between",children:[l.jsx(Ve,{children:"Conversation Transcripts"}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[l.jsxs("div",{className:"relative",children:[l.jsx(eg,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),l.jsx(Je,{placeholder:"Search transcripts...",value:e,onChange:g=>t(g.target.value),className:"pl-9 w-full sm:w-64"})]}),l.jsxs(Zt,{value:r,onValueChange:g=>n(g),children:[l.jsx(qt,{className:"w-full sm:w-32",children:l.jsx(Jt,{placeholder:"Filter"})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"all",children:"All Types"}),l.jsx(te,{value:"voice",children:"Voice Calls"}),l.jsx(te,{value:"sms",children:"SMS"}),l.jsx(te,{value:"chat",children:"Web Chat"})]})]}),l.jsxs(ie,{variant:"outline",onClick:()=>u(),disabled:d,children:[l.jsx(sc,{className:`h-4 w-4 mr-2 ${d?"animate-spin":""}`}),"Refresh"]}),l.jsxs(ie,{variant:"outline",onClick:f,disabled:!(a!=null&&a.length),children:[l.jsx(Ef,{className:"h-4 w-4 mr-2"}),"Export CSV"]})]})]})}),l.jsx(de,{children:(a==null?void 0:a.length)===0?l.jsx("p",{className:"text-center text-muted-foreground py-8",children:"No transcripts found"}):l.jsx(tl,{className:"h-[500px]",children:l.jsx("div",{className:"space-y-4",children:a==null?void 0:a.map(g=>l.jsx(ue,{className:"cursor-pointer",onClick:()=>s(i===g.id?null:g.id),children:l.jsxs(de,{className:"pt-4",children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"mt-1",children:h(g.type)}),l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ee,{variant:p(g.type),children:g.type.toUpperCase()}),l.jsx("span",{className:"text-sm text-muted-foreground",children:new Date(g.timestamp).toLocaleStr
630ing()})]}),l.jsx("p",{className:"text-sm",children:g.phoneNumber||g.userEmail||g.userName||"Unknown"}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:[g.messageCount," messages",g.duration&&` | ${g.duration}s`]}),g.summary&&l.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:g.summary})]})]}),l.jsx(ie,{variant:"ghost",size:"sm",children:i===g.id?l.jsx(x5,{className:"h-4 w-4"}):l.jsx(EO,{className:"h-4 w-4"})})]}),i===g.id&&l.jsxs("div",{className:"mt-4 pt-4 border-t",children:[l.jsx("h4",{className:"text-sm font-medium mb-2",children:"Full Transcript"}),l.jsx("div",{className:"bg-muted/30 p-4 rounded-lg max-h-80 overflow-y-auto space-y-3",children:g.messages&&g.messages.length>0?g.messages.map((m,v)=>l.jsx("div",{className:`flex ${m.role==="user"?"justify-start":"justify-end"}`,children:l.jsxs("div",{className:`max-w-[80%] rounded-2xl px-4 py-2 ${m.role==="user"?"bg-white dark:bg-zinc-800 border border-border rounded-bl-md":"bg-primary text-primary-foreground rounded-br-md"}`,children:[l.jsx("p",{className:"text-xs font-semibold mb-1 opacity-70",children:m.role==="user"?"User":"Paige"}),l.jsx("p",{className:"text-sm whitespace-pre-wrap",children:m.content})]})},v)):l.jsx("pre",{className:"text-sm whitespace-pre-wrap font-mono",children:g.transcript})})]})]})},g.id))})})})]})}function $ze(){const[e,t]=b.useState("all"),r=vn(),{data:n,isLoading:i,error:s}=Ke({queryKey:["admin-issues",e],queryFn:async()=>{const d=await fetch("/api/issues");if(!d.ok)throw new Error("Failed to fetch issues");const f=await d.json();return e==="all"?f:f.filter(h=>h.status===e)},refetchInterval:3e4}),a=fr({mutationFn:async({id:d,status:f})=>{if(!(n==null?void 0:n.find(g=>g.id===d)))throw new Error("Issue not found");const p=await fetch(`/api/issues/${d}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:f})});if(!p.ok)throw new Error("Failed to update issue");return p.json()},onSuccess:()=>{r.invalidateQueries({queryKey:["admin-issues"]})}}),o=d=>{switch(d){case"new":return l.jsx(oc,{className:"h-4 w-4 text-yellow-500"});case"in-progress":return l.jsx(Hs,{className:"h-4 w-4 text-blue-500"});case"resolved":return l.jsx(b5,{className:"h-4 w-4 text-green-500"});case"closed":return l.jsx(w5,{className:"h-4 w-4 text-gray-500"});default:return l.jsx(oc,{className:"h-4 w-4"})}},c=d=>{switch(d==null?void 0:d.toLowerCase()){case"critical":return l.jsx(Ee,{variant:"destructive",children:"Critical"});case"high":return l.jsx(Ee,{className:"bg-orange-500",children:"High"});case"medium":return l.jsx(Ee,{className:"bg-yellow-500",children:"Medium"});case"low":return l.jsx(Ee,{variant:"secondary",children:"Low"});default:return l.jsx(Ee,{variant:"outline",children:d||"Unknown"})}},u=d=>{switch(d){case"new":return l.jsx(Ee,{variant:"outline",className:"border-yellow-500 text-yellow-500",children:"New"});case"in-progress":return l.jsx(Ee,{variant:"outline",className:"border-blue-500 text-blue-500",children:"In Progress"});case"resolved":return l.jsx(Ee,{variant:"outline",className:"border-green-500 text-green-500",children:"Resolved"});case"closed":return l.jsx(Ee,{variant:"outline",className:"border-gray-500 text-gray-500",children:"Closed"});default:return l.jsx(Ee,{variant:"outline",children:d})}};return i?l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx(jt,{className:"h-6 w-32"}),l.jsx(jt,{className:"h-10 w-32"})]})}),l.jsx(de,{children:l.jsx("div",{className:"space-y-4",children:[...Array(5)].map((d,f)=>l.jsx(jt,{className:"h-32 w-full"},f))})})]}):s?l.jsx(ue,{children:l.jsx(de,{className:"pt-6",children:l.jsx("p",{className:"text-center text-muted-foreground",children:"Failed to load issues. Please try again later."})})}):l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between items-start sm:items-center",children:[l.jsx(Ve,{children:"Reported Issues"}),l.jsxs(Zt,{value:e,onValueChange:d=>t(d),children:[l.jsx(qt,{className:"w-full sm:w-40",children:l.jsx(Jt,{placeholder:"Filter by status"})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"all",children:"All Status"}),l.jsx(te,{value:"new",children:"New"}),l.jsx(te,{value:"in-progress",children:"In Progress"}),l.jsx(te,{value:"resolved",children:"Resolved"}),l.jsx(te,{value:"closed",children:"Closed"})]})]})]})}),l.jsx(de,{children:(n==null?void 0:n.length)===0?l.jsx("p",{className:"text-center text-muted-foreground py-8",children:"No issues found"}):l.jsx(tl,{className:"h-[500px]",children:l.jsx("div",{className:"space-y-4",children:n==null?void 0:n.map(d=>{var f;return l.jsx(ue,{children:l.jsx(de,{className:"pt-4",children:l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsx("div",{className:"flex items-start justify-between gap-4",children:l.jsxs("div",{className:"flex items-start gap-3",children:[o(d.status),l.jsxs("div",{className:"space-y-1",children:[l.jsx("h3",{className:"font-medium",children:d.title}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c(d.severity),u(d.status),d.type&&l.jsx(Ee,{variant:"outline",children:d.type})]})]})]})}),l.jsx("p",{className:"text-sm text-muted-foreground",children:d.description}),l.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-2 pt-2 border-t",children:[l.jsxs("div",{className:"text-xs text-muted-foreground",children:[l.jsxs("span",{children:["Reported by: ",d.reporter||"Anonymous"]}),l.jsx("span",{className:"mx-2",children:"|"}),l.jsx("span",{children:d.createdAt}),((f=d.details)==null?void 0:f.source)&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"mx-2",children:"|"}),l.jsxs("span",{children:["Source: ",d.details.source]})]})]}),l.jsxs("div",{className:"flex gap-2",children:[d.status==="new"&&l.jsx(ie,{size:"sm",variant:"outline",onClick:()=>a.mutate({id:d.id,status:"in-progress"}),disabled:a.isPending,children:a.isPending?l.jsx(sc,{className:"h-4 w-4 animate-spin"}):"Start Working"}),d.status==="in-progress"&&l.jsx(ie,{size:"sm",variant:"outline",onClick:()=>a.mutate({id:d.id,status:"resolved"}),disabled:a.isPending,children:a.isPending?l.jsx(sc,{className:"h-4 w-4 animate-spin"}):"Mark Resolved"}),d.status==="resolved"&&l.jsx(ie,{size:"sm",variant:"outline",onClick:()=>a.mutate({id:d.id,status:"closed"}),disabled:a.isPending,children:a.isPending?l.jsx(sc,{className:"h-4 w-4 animate-spin"}):"Close Issue"})]})]})]})})},d.id)})})})})]})}function Ize(){const[e,t]=b.useState(""),{data:r,isLoading:n,error:i}=Ke({queryKey:["admin-public-users"],queryFn:async()=>{const a=await fetch("/api/admin/public-users");if(!a.ok)throw new Error("Failed to fetch users");return a.json()},refetchInterval:3e4}),s=r==null?void 0:r.filter(a=>{var o,c;return((o=a.name)==null?void 0:o.toLowerCase().includes(e.toLowerCase()))||((c=a.email)==null?void 0:c.toLowerCase().includes(e.toLowerCase()))});return n?l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between",children:[l.jsx(jt,{className:"h-6 w-32"}),l.jsx(jt,{className:"h-10 w-64"})]})}),l.jsx(de,{children:l.jsx("div",{className:"space-y-2",children:[...Array(5)].map((a,o)=>l.jsx(jt,{className:"h-12 w-full"},o))})})]}):i?l.jsx(ue,{children:l.jsx(de,{className:"pt-6",children:l.jsx("p",{className:"text-center text-muted-foreground",children:"Failed to load users. Please try again later."})})}):l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between items-start sm:items-center",children:[l.jsxs("div",{children:[l.jsx(Ve,{children:"Registered Users"}),l.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[(r==null?void 0:r.length)||0," total users"]})]}),l.jsxs("div",{className:"relative w-full sm:w-64",children:[l.jsx(eg,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}
630),l.jsx(Je,{placeholder:"Search users...",value:e,onChange:a=>t(a.target.value),className:"pl-9"})]})]})}),l.jsx(de,{children:(s==null?void 0:s.length)===0?l.jsx("p",{className:"text-center text-muted-foreground py-8",children:"No users found"}):l.jsx("div",{className:"rounded-md border",children:l.jsxs(vg,{children:[l.jsx(yg,{children:l.jsxs(ns,{children:[l.jsx(or,{className:"w-[50px]",children:"#"}),l.jsx(or,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Of,{className:"h-4 w-4"}),"Name"]})}),l.jsx(or,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(OO,{className:"h-4 w-4"}),"Email"]})}),l.jsx(or,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Vc,{className:"h-4 w-4"}),"Signed Up"]})})]})}),l.jsx(xg,{children:s==null?void 0:s.map((a,o)=>l.jsxs(ns,{children:[l.jsx(Vt,{className:"font-medium text-muted-foreground",children:o+1}),l.jsx(Vt,{className:"font-medium",children:a.name||"-"}),l.jsx(Vt,{children:a.email}),l.jsx(Vt,{children:new Date(a.created_at).toLocaleDateString()})]},a.id))})]})})})]})}function MD({rating:e}){return l.jsx("div",{className:"flex items-center gap-0.5",children:[1,2,3,4,5].map(t=>l.jsx(Nf,{className:`h-4 w-4 ${t<=e?"fill-yellow-400 text-yellow-400":"text-gray-300"}`},t))})}function Mze(){const{data:e,isLoading:t,error:r}=Ke({queryKey:["admin-feedback"],queryFn:async()=>{const s=await fetch("/api/admin/feedback");if(!s.ok)throw new Error("Failed to fetch feedback");return s.json()},refetchInterval:3e4}),n=e&&e.length>0?e.reduce((s,a)=>s+a.rating,0)/e.length:0,i=[5,4,3,2,1].map(s=>({rating:s,count:(e==null?void 0:e.filter(a=>a.rating===s).length)||0}));return t?l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[l.jsx(jt,{className:"h-32"}),l.jsx(jt,{className:"h-32"})]}),l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsx(jt,{className:"h-6 w-32"})}),l.jsx(de,{children:l.jsx("div",{className:"space-y-4",children:[...Array(5)].map((s,a)=>l.jsx(jt,{className:"h-24 w-full"},a))})})]})]}):r?l.jsx(ue,{children:l.jsx(de,{className:"pt-6",children:l.jsx("p",{className:"text-center text-muted-foreground",children:"Failed to load feedback. Please try again later."})})}):l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-2",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Average Rating"})}),l.jsx(de,{children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"text-4xl font-bold",children:n.toFixed(1)}),l.jsxs("div",{className:"space-y-1",children:[l.jsx(MD,{rating:Math.round(n)}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Based on ",(e==null?void 0:e.length)||0," reviews"]})]})]})})]}),l.jsxs(ue,{children:[l.jsx(ye,{className:"pb-2",children:l.jsx(Ve,{className:"text-sm font-medium",children:"Rating Distribution"})}),l.jsx(de,{children:l.jsx("div",{className:"space-y-2",children:i.map(({rating:s,count:a})=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm w-3",children:s}),l.jsx(Nf,{className:"h-3 w-3 fill-yellow-400 text-yellow-400"}),l.jsx("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden",children:l.jsx("div",{className:"h-full bg-yellow-400 rounded-full",style:{width:`${e!=null&&e.length?a/e.length*100:0}%`}})}),l.jsx("span",{className:"text-sm text-muted-foreground w-8",children:a})]},s))})})]})]}),l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsx(Ve,{children:"All Feedback"})}),l.jsx(de,{children:(e==null?void 0:e.length)===0?l.jsx("p",{className:"text-center text-muted-foreground py-8",children:"No feedback yet"}):l.jsx(tl,{className:"h-[400px]",children:l.jsx("div",{className:"space-y-4",children:e==null?void 0:e.map(s=>l.jsx(ue,{children:l.jsx(de,{className:"pt-4",children:l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsxs("div",{className:"flex items-start justify-between",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"h-8 w-8 rounded-full bg-muted flex items-center justify-center",children:l.jsx(Of,{className:"h-4 w-4 text-muted-foreground"})}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-sm",children:s.user_name||"Anonymous"}),s.user_email&&l.jsx("p",{className:"text-xs text-muted-foreground",children:s.user_email})]})]}),l.jsx(MD,{rating:s.rating})]}),s.comment&&l.jsx("p",{className:"text-sm",children:s.comment}),l.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[l.jsx(Vc,{className:"h-3 w-3"}
630),new Date(s.created_at).toLocaleString()]})]})})},s.id))})})})]})]})}function Dze(){const[e,t]=b.useState(!1),[r,n]=b.useState(""),[i,s]=b.useState(""),[a,o]=b.useState(null),{toast:c}=kn(),u=vn(),{data:d,isLoading:f,error:h}=Ke({queryKey:["admin-users-list"],queryFn:async()=>{const v=await fetch("/api/admin/admin-users");if(!v.ok)throw new Error("Failed to fetch admin users");return v.json()},refetchInterval:3e4}),p=fr({mutationFn:async({email:v,password:y})=>{const x=await fetch("/api/admin/admin-users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:v,password:y})});if(!x.ok){const w=await x.json();throw new Error(w.error||"Failed to add admin user")}return x.json()},onSuccess:()=>{u.invalidateQueries({queryKey:["admin-users-list"]}),c({title:"Admin user added",description:`${r} has been added as an admin.`}),t(!1),n(""),s(""),o(null)},onError:v=>{o(v.message)}}),g=fr({mutationFn:async v=>{const y=await fetch(`/api/admin/admin-users/${v}`,{method:"DELETE"});if(!y.ok)throw new Error("Failed to delete admin user");return y.json()},onSuccess:()=>{u.invalidateQueries({queryKey:["admin-users-list"]}),c({title:"Admin user removed",description:"The admin user has been removed."})},onError:()=>{c({title:"Error",description:"Failed to remove admin user",variant:"destructive"})}}),m=v=>{if(v.preventDefault(),o(null),!r||!i){o("Email and password are required");return}if(i.length<6){o("Password must be at least 6 characters");return}p.mutate({email:r,password:i})};return f?l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx(jt,{className:"h-6 w-32"}),l.jsx(jt,{className:"h-10 w-32"})]})}),l.jsx(de,{children:l.jsx("div",{className:"space-y-2",children:[...Array(3)].map((v,y)=>l.jsx(jt,{className:"h-12 w-full"},y))})})]}):h?l.jsx(ue,{children:l.jsx(de,{className:"pt-6",children:l.jsx("p",{className:"text-center text-muted-foreground",children:"Failed to load admin users. Please try again later."})})}):l.jsxs(ue,{children:[l.jsx(ye,{children:l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between items-start sm:items-center",children:[l.jsxs("div",{children:[l.jsx(Ve,{children:"Admin Users"}),l.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[(d==null?void 0:d.length)||0," admin users"]})]}),l.jsxs(Ai,{open:e,onOpenChange:t,children:[l.jsx(yb,{asChild:!0,children:l.jsxs(ie,{children:[l.jsx(N5,{className:"h-4 w-4 mr-2"}),"Add Admin User"]})}),l.jsxs(Jn,{children:[l.jsxs(ei,{children:[l.jsx(ti,{children:"Add Admin User"}),l.jsx(el,{children:"Create a new admin account with email and password."})]}),l.jsxs("form",{onSubmit:m,className:"space-y-4",children:[a&&l.jsx(Nw,{variant:"destructive",children:l.jsx(Ow,{children:a})}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"admin-email",children:"Email"}),l.jsx(Je,{id:"admin-email",type:"email",placeholder:"[email protected]",value:r,onChange:v=>n(v.target.value)})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Xe,{htmlFor:"admin-password",children:"Password"}),l.jsx(Je,{id:"admin-password",type:"password",placeholder:"Enter password (min 6 characters)",value:i,onChange:v=>s(v.target.value)})]}),l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx(ie,{type:"button",variant:"outline",onClick:()=>{t(!1),o(null)},children:"Cancel"}),l.jsxs(ie,{type:"submit",disabled:p.isPending,children:[p.isPending&&l.jsx(Jm,{className:"h-4 w-4 mr-2 animate-spin"}),"Add Admin"]})]})]})]})]})]})}),l.jsx(de,{children:(d==null?void 0:d.length)===0?l.jsx("p",{className:"text-center text-muted-foreground py-8",children:"No admin users found"}):l.jsx("div",{className:"rounded-md border",children:l.jsxs(vg,{children:[l.jsx(yg,{children:l.jsxs(ns,{children:[l.jsx(or,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(OO,{className:"h-4 w-4"}),"Email"]})}),l.jsx(or,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Fp,{className:"h-4 w-4"}),"Role"]})}),l.jsx(or,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Vc,{className:"h-4 w-4"}),"Created"]})}),l.jsx(or,{className:"w-[100px]",children:"Actions"})]})}),l.jsx(xg,{children:d==null?void 0:d.map(v=>l.jsxs(ns,{children:[l.jsx(Vt,{className:"font-medium",children:v.email}),l.jsx(Vt,{className:"capitalize",children:v.role||"admin"}),l.jsx(Vt,{children:new Date(v.created_at).toLocaleDateString()}),l.jsx(Vt,{children:l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>{confirm("Are you sure you want to remove this admin user?")&&g.mutate(v.id)},disabled:g.isPending,children:l.jsx(E5,{className:"h-4 w-4 text-destructive"})})})]},v.id))})]})})})]})}const DD="aaoe_admin_auth";function Lze(){const[,e]=aO();b.useEffect(()=>{sessionStorage.getItem(DD)!=="true"&&e("/admin")},[e]);const t=()=>{sessionStorage.removeItem(DD),e("/admin")};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx(zc,{href:"/",children:l.jsxs(ie,{variant:"ghost",size:"sm",children:[l.jsx(K0,{className:"h-4 w-4 mr-2"}),"Back"]})}),l.jsxs("div",{children:[l.jsx("h1",{className:"text-3xl font-bold",children:"Admin Dashboard"}),l.jsx("p",{className:"text-muted-foreground",children:"Manage analytics, transcripts, users, and feedback"})]})]}),l.jsxs(ie,{variant:"outline",size:"sm",onClick:t,children:[l.jsx(Cee,{className:"h-4 w-4 mr-2"}),"Logout"]})]}),l.jsxs(ul,{defaultValue:"enhanced-analytics",className:"w-full",children:[l.jsxs(Ha,{className:"grid w-full grid-cols-4 lg:grid-cols-7 h-auto",children:[l.jsxs(yt,{value:"enhanced-analytics",className:"flex items-center gap-2 py-2",children:[l.jsx(Wy,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:"Insights"})]}),l.jsxs(yt,{value:"analytics",className:"flex items-center gap-2 py-2",children:[l.jsx(Dp,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:"Analytics"})]}),l.jsxs(yt,{value:"transcripts",className:"flex items-center gap-2 py-2",children:[l.jsx(Lp,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:"Transcripts"})]}),l.jsxs(yt,{value:"issues",className:"flex items-center gap-2 py-2",children:[l.jsx(oc,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:"Issues"})]}),l.jsxs(yt,{value:"users",className:"flex items-center gap-2 py-2",children:[l.jsx(lc,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:"Users"})]}),l.jsxs(yt,{value:"feedback",className:"flex items-center gap-2 py-2",children:[l.jsx(Nf,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:"Feedback"})]}),l.jsxs(yt,{value:"admin-users",className:"flex items-center gap-2 py-2",children:[l.jsx(Lee,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:"Admin Users"})]})]}),l.jsx(xt,{value:"enhanced-analytics",className:"mt-6",children:l.jsx(kze,{})}),l.jsx(xt,{value:"analytics",className:"mt-6",children:l.jsx(Tze,{})}),l.jsx(xt,{value:"transcripts",className:"mt-6",children:l.jsx(Rze,{})}),l.jsx(xt,{value:"issues",className:"mt-6",children:l.jsx($ze,{})}),l.jsx(xt,{value:"users",className:"mt-6",children:l.jsx(Ize,{})}),l.jsx(xt,{value:"feedback",className:"mt-6",children:l.jsx(Mze,{})}),l.jsx(xt,{value:"admin-users",className:"mt-6",children:l.jsx(Dze,{})})]})]})}var tP="Progress",rP=100,[Fze]=Zr(tP),[Bze,zze]=Fze(tP),Cq=b.forwardRef((e,t)=>
630{const{__scopeProgress:r,value:n=null,max:i,getValueLabel:s=Uze,...a}=e;(i||i===0)&&!LD(i)&&console.error(Vze(`${i}`,"Progress"));const o=LD(i)?i:rP;n!==null&&!FD(n,o)&&console.error(Wze(`${n}`,"Progress"));const c=FD(n,o)?n:null,u=_0(c)?s(c,o):void 0;return l.jsx(Bze,{scope:r,value:c,max:o,children:l.jsx(ke.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":_0(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":kq(c,o),"data-value":c??void 0,"data-max":o,...a,ref:t})})});Cq.displayName=tP;var Pq="ProgressIndicator",Tq=b.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,i=zze(Pq,r);return l.jsx(ke.div,{"data-state":kq(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...n,ref:t})});Tq.displayName=Pq;function Uze(e,t){return`${Math.round(e/t*100)}%`}function kq(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function _0(e){return typeof e=="number"}function LD(e){return _0(e)&&!isNaN(e)&&e>0}function FD(e,t){return _0(e)&&!isNaN(e)&&e<=t&&e>=0}function Vze(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${rP}\`.`}function Wze(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
631  - a positive number
632  - less than the value passed to \`max\` (or ${rP} if no \`max\` prop is set)
633  - \`null\` or \`undefined\` if the progress is indeterminate.
634
635Defaulting to \`null\`.`}var Rq=Cq,Hze=Tq;const dy=b.forwardRef(({className:e,value:t,...r},n)=>l.jsx(Rq,{ref:n,className:se("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:l.jsx(Hze,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));dy.displayName=Rq.displayName;const BD=["hsl(var(--chart-1))","hsl(var(--chart-2))","hsl(var(--chart-3))","hsl(var(--chart-4))","hsl(var(--chart-5))"];function qze(){var S,j,E,_,N,O,C,k,$,D,A,R,T,L,M,I,F,U,V,G,Z,he,ve,re,ge,Y,ee;const{session:e}=ol(),{toast:t}=kn(),r=vn(),[n,i]=b.useState("30"),s={Authorization:`Bearer ${e==null?void 0:e.access_token}`,"Content-Type":"application/json"},{data:a,isLoading:o}=Ke({queryKey:["enhanced-summary",n],queryFn:async()=>{const q=await fetch(`/api/analytics/enhanced-summary?days=${n}`,{headers:s});if(!q.ok)throw new Error("Failed to fetch summary");return q.json()},enabled:!!(e!=null&&e.access_token)}),{data:c}=Ke({queryKey:["top-questions",n],queryFn:async()=>{const q=await fetch(`/api/analytics/top-questions?days=${n}`,{headers:s});if(!q.ok)throw new Error("Failed to fetch top questions");return q.json()},enabled:!!(e!=null&&e.access_token)}),{data:u}=Ke({queryKey:["emerging-topics",n],queryFn:async()=>{const q=await fetch(`/api/analytics/emerging-topics?days=${n}`,{headers:s});if(!q.ok)throw new Error("Failed to fetch emerging topics");return q.json()},enabled:!!(e!=null&&e.access_token)}),{data:d}=Ke({queryKey:["confidence-distribution",n],queryFn:async()=>{const q=await fetch(`/api/analytics/confidence-distribution?days=${n}`,{headers:s});if(!q.ok)throw new Error("Failed to fetch confidence distribution");return q.json()},enabled:!!(e!=null&&e.access_token)}),{data:f}=Ke({queryKey:["escalation-reasons",n],queryFn:async()=>{const q=await fetch(`/api/analytics/escalation-reasons?days=${n}`,{headers:s});if(!q.ok)throw new Error("Failed to fetch escalation reasons");return q.json()},enabled:!!(e!=null&&e.access_token)}),{data:h}=Ke({queryKey:["knowledge-gap-rate",n],queryFn:async()=>{const q=await fetch(`/api/analytics/knowledge-gap-rate?days=${n}`,{headers:s});if(!q.ok)throw new Error("Failed to fetch knowledge gap rate");return q.json()},enabled:!!(e!=null&&e.access_token)}),{data:p}=Ke({queryKey:["dead-ends",n],queryFn:async()=>{const q=await fetch(`/api/analytics/dead-ends?days=${n}`,{headers:s});if(!q.ok)throw new Error("Failed to fetch dead ends");return q.json()},enabled:!!(e!=null&&e.access_token)}),{data:g}=Ke({queryKey:["business-impact",n],queryFn:async()=>{const q=await fetch(`/api/analytics/business-impact?days=${n}`,{headers:s});if(!q.ok)throw new Error("Failed to fetch business impact");return q.json()},enabled:!!(e!=null&&e.access_token)}),{data:m,isLoading:v}=Ke({queryKey:["weekly-insights"],queryFn:async()=>{const q=await fetch("/api/analytics/weekly-insights",{headers:s});if(!q.ok)throw new Error("Failed to fetch weekly insights");return q.json()},enabled:!!(e!=null&&e.access_token)}),y=fr({mutationFn:async()=>{const q=await fetch("/api/analytics/generate-insights",{method:"POST",headers:s});if(!q.ok)throw new Error("Failed to generate insights");return q.json()},onSuccess:()=>{r.invalidateQueries({queryKey:["weekly-insights"]}),t({title:"Insights Generated",description:"New weekly insights have been generated successfully."})},onError:()=>{t({title:"Error",description:"Failed to generate insights. Please try again.",variant:"destructive"})}}),x=d?[{name:"High (75-100%)",value:d.distribution.high,fill:"hsl(var(--chart-2))"},{name:"Medium (60-75%)",value:d.distribution.medium,fill:"hsl(var(--chart-1))"},{name:"Low (45-60%)",value:d.distribution.low,fill:"hsl(var(--chart-4))"},{name:"Very Low (0-45%)",value:d.distribution.very_low,fill:"hsl(var(--chart-5))"}]:[],w=((S=f==null?void 0:f.escalationReasons)==null?void 0:S.map((q,W)=>({name:q.category.replace(/_/g," ").replace(/\b\w/g,Fe=>
635Fe.toUpperCase()),value:q.count,fill:BD[W%BD.length]})))||[];return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("div",{children:[l.jsxs("h1",{className:"text-2xl sm:text-3xl font-bold flex items-center gap-2",children:[l.jsx(Wy,{className:"h-7 w-7 text-primary"}),"Enhanced Analytics"]}),l.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"AI-powered insights and business intelligence"})]}),l.jsxs("div",{className:"flex gap-2 flex-wrap",children:[l.jsxs(Zt,{value:n,onValueChange:i,children:[l.jsx(qt,{className:"w-[150px]",children:l.jsx(Jt,{})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"7",children:"Last 7 Days"}),l.jsx(te,{value:"14",children:"Last 14 Days"}),l.jsx(te,{value:"30",children:"Last 30 Days"}),l.jsx(te,{value:"90",children:"Last 90 Days"}),l.jsx(te,{value:"365",children:"Last Year"}),l.jsx(te,{value:"all",children:"All Time"})]})]}),l.jsxs(ie,{variant:"outline",children:[l.jsx(Ef,{className:"h-4 w-4 mr-2"}),"Export"]})]})]}),l.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[l.jsx(ko,{title:"Total Conversations",value:((E=(j=a==null?void 0:a.overview)==null?void 0:j.totalConversations)==null?void 0:E.toLocaleString())||"0",change:`Last ${n} days`,changeType:"neutral",icon:v1}),l.jsx(ko,{title:"Response Quality",value:`${Math.round((((_=a==null?void 0:a.overview)==null?void 0:_.avgConfidence)||0)*100)}%`,change:"Average match quality (normalized)",changeType:((N=a==null?void 0:a.overview)==null?void 0:N.avgConfidence)>.7?"positive":"negative",icon:pk}),l.jsx(ko,{title:"Escalation Rate",value:`${((O=a==null?void 0:a.overview)==null?void 0:O.escalationRate)||0}%`,change:"Transferred to human",changeType:parseFloat(((C=a==null?void 0:a.overview)==null?void 0:C.escalationRate)||0)<20?"positive":"negative",icon:lc}),l.jsx(ko,{title:"Knowledge Gaps",value:(($=(k=a==null?void 0:a.overview)==null?void 0:k.knowledgeGapsCount)==null?void 0:$.toLocaleString())||"0",change:"Questions AI struggled with",changeType:((D=a==null?void 0:a.overview)==null?void 0:D.knowledgeGapsCount)>10?"negative":"positive",icon:Uy})]}),l.jsxs(ul,{defaultValue:"topics",className:"space-y-6",children:[l.jsxs(Ha,{className:"grid w-full grid-cols-4",children:[l.jsxs(yt,{value:"topics",className:"flex items-center gap-2",children:[l.jsx(v1,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:"Topics"})]}),l.jsxs(yt,{value:"performance",className:"flex items-center gap-2",children:[l.jsx(Iee,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:"AI Performance"})]}),l.jsxs(yt,{value:"business",className:"flex items-center gap-2",children:[l.jsx(Bj,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:"Business Impact"})]}),l.jsxs(yt,{value:"insights",className:"flex items-center gap-2",children:[l.jsx($u,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:"AI Insights"})]})]}),l.jsx(xt,{value:"topics",className:"space-y-6",children:l.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[l.jsxs(ue,{children:[l.jsxs(ye,{children:[l.jsxs(Ve,{className:"flex items-center gap-2",children:[l.jsx(v1,{className:"h-5 w-5"}),"Top Questions This Week"]}),l.jsx(jn,{children:"What customers are asking most"})]}),l.jsx(de,{children:l.jsx("div",{className:"space-y-3",children:((A=c==null?void 0:c.topQuestions)==null?void 0:A.slice(0,8).map((q,W)=>l.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg bg-muted/50",children:[l.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[l.jsx("span",{className:"text-lg font-bold text-muted-foreground w-6",children:W+1}),l.jsx("span",{className:"text-sm truncate",children:q.question})]}),l.jsx(Ee,{variant:"secondary",children:q.count})]},W)))||l.jsx("p",{className:"text-muted-foreground text-sm",children:"No questions analyzed yet"})})})]}),l.jsxs(ue,{children:[l.jsxs(ye,{children:[l.jsxs(Ve,{className:"flex items-center gap-2",children:[l.jsx(Dp,{className:"h-5 w-5"}),"Topic Distribution"]}),l.jsx(jn,{children:"Topics by conversation volume"})]}),l.jsx(de,{children:l.jsx("div",{className:"space-y-4",children:((R=c==null?void 0:c.topTopics)==null?void 0:R.slice(0,6).map((q,W)=>{var Ue;const Fe=((Ue=c.topTopics[0])==null?void 0:Ue.count)||1,Ae=Math.round(q.count/Fe*100);return l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between text-sm",children:[l.jsx("span",{className:"font-medium capitalize",children:q.topic}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("span",{className:"text-muted-foreground",children:[q.count," calls"]}),parseFloat(q.avgFrustration)>.5&&l.jsxs(Ee,{variant:"destructive",className:"text-xs",children:[l.jsx(Mee,{className:"h-3 w-3 mr-1"}),"Frustrated"]})]})]}),l.jsx(dy,{value:Ae,className:"h-2"})]},W)}))||l.jsx("p",{className:"text-muted-foreground text-sm",children:"No topics analyzed yet"})})})]}),l.jsxs(ue,{children:[l.jsxs(ye,{children:[l.jsxs(Ve,{className:"flex items-center gap-2",children:[l.jsx(ac,{className:"h-5 w-5 text-green-500"}),"Emerging Topics"]}),l.jsx(jn,{children:"Topics trending up vs. previous period"})]}),l.jsx(de,{children:l.jsx("div",{className:"space-y-3",children:((T=u==null?void 0:u.emergingTopics)==null?void 0:T.slice(0,5).map((q,W)=>l.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg border",children:[l.jsx("span",{className:"font-medium capitalize",children:q.topic}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(Ee,{variant:"outline",children:[q.currentCount," calls"]}),l.jsxs(Ee,{className:"bg-green-500/10 text-green-500 border-green-500/20",children:[l.jsx(ac,{className:"h-3 w-3 mr-1"}),"+",q.growthRate,"%"]})]})]},W)))||l.jsx("p",{className:"text-muted-foreground text-sm",children:"No emerging topics detected"})})})]}),l.jsxs(ue,{children:[l.jsxs(ye,{children:[l.jsxs(Ve,{className:"flex items-center gap-2",children:[l.jsx(oc,{className:"h-5 w-5 text-amber-500"}),"Unresolved Topics"]}),l.jsx(jn,{children:"Topics the AI struggles to answer"})]}),l.jsx(de,{children:l.jsx("div",{className:"space-y-3",children:((L=c==null?void 0:c.unresolvedTopics)==null?void 0:L.slice(0,5).map((q,W)=>l.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg bg-amber-500/10 border border-amber-500/20",children:[l.jsx("span",{className:"font-medium capitalize",children:q.topic}),l.jsxs(Ee,{variant:"outline",className:"border-amber-500/50 text-amber-600",children:[q.count," unresolved"]})]},W)))||l.jsx("p",{className:"text-muted-foreground text-sm",children:"All topics well handled!"})})})]})]})}),l.jsx(xt,{value:"performance",className:"space-y-6",children:l.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[l.jsxs(ue,{children:[l.jsxs(ye,{children:[l.jsxs(Ve,{className:"flex items-center gap-2",children:[l.jsx(pk,{className:"h-5 w-5"}),"Response Quality Distribution"]}),l.jsx(jn,{children:"Quality of AI responses (normalized for text-embedding-3-small)"})]}),l.jsxs(de,{children:[l.jsx("div",{className:"h-[250px]",children:l.jsx(nm,{width:"100%",height:"100%",children:l.jsxs(rH,{children:[l.jsx(Zs,{data:x,cx:"50%",cy:"50%",innerRadius:60,outerRadius:100,paddingAngle:2,dataKey:"value",label:({name:q,percent:W})=>`${(W*100).toFixed(0)}%`,children:x.map((q,W)=>
635l.jsx(Pc,{fill:q.fill},`cell-${W}`))}),l.jsx(on,{}),l.jsx(Vo,{})]})})}),l.jsxs("div",{className:"mt-4 text-center",children:[l.jsxs("p",{className:"text-2xl font-bold",children:[Math.round(((d==null?void 0:d.avgConfidence)||0)*100),"%"]}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Average Response Quality (Normalized)"})]})]})]}),l.jsxs(ue,{children:[l.jsxs(ye,{children:[l.jsxs(Ve,{className:"flex items-center gap-2",children:[l.jsx(lc,{className:"h-5 w-5"}),"Escalation Reasons"]}),l.jsx(jn,{children:"Why calls transfer to humans"})]}),l.jsxs(de,{children:[l.jsx("div",{className:"h-[250px]",children:l.jsx(nm,{width:"100%",height:"100%",children:l.jsxs(tH,{data:w,layout:"vertical",children:[l.jsx(l0,{strokeDasharray:"3 3",className:"stroke-border"}),l.jsx(Ba,{type:"number"}),l.jsx(za,{dataKey:"name",type:"category",width:120,tick:{fontSize:12}}),l.jsx(on,{}),l.jsx(gl,{dataKey:"value",radius:[0,4,4,0],children:w.map((q,W)=>l.jsx(Pc,{fill:q.fill},`cell-${W}`))})]})})}),l.jsx("div",{className:"mt-4 text-center",children:l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Total Escalations: ",l.jsx("span",{className:"font-bold",children:(f==null?void 0:f.totalEscalations)||0})]})})]})]}),l.jsxs(ue,{children:[l.jsxs(ye,{children:[l.jsxs(Ve,{className:"flex items-center gap-2",children:[l.jsx(Uy,{className:"h-5 w-5"}),`"I Don't Know" Rate`]}),l.jsx(jn,{children:"How often the AI can't answer"})]}),l.jsx(de,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"text-4xl font-bold",children:[(h==null?void 0:h.gapRate)||0,"%"]}),l.jsxs("div",{className:"text-right text-sm text-muted-foreground",children:[l.jsxs("p",{children:[(h==null?void 0:h.gapCount)||0," gaps"]}),l.jsxs("p",{children:["of ",(h==null?void 0:h.totalSearches)||0," searches"]})]})]}),l.jsx(dy,{value:(h==null?void 0:h.gapRate)||0,className:"h-3"}),l.jsxs("div",{className:"space-y-2 mt-4",children:[l.jsx("p",{className:"text-sm font-medium",children:"Recent Knowledge Gaps:"}),((M=h==null?void 0:h.recentGaps)==null?void 0:M.slice(0,4).map((q,W)=>l.jsxs("div",{className:"text-sm p-2 rounded bg-muted/50 truncate",children:['"',q.query,'"']},W)))||l.jsx("p",{className:"text-sm text-muted-foreground",children:"No gaps recorded"})]})]})})]}),l.jsxs(ue,{children:[l.jsxs(ye,{children:[l.jsxs(Ve,{className:"flex items-center gap-2",children:[l.jsx(oc,{className:"h-5 w-5 text-red-500"}),"Conversation Dead-Ends"]}),l.jsx(jn,{children:"Where users abandon or get stuck"})]}),l.jsx(de,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"text-4xl font-bold",children:[(p==null?void 0:p.deadEndRate)||0,"%"]}),l.jsxs("div",{className:"text-right text-sm text-muted-foreground",children:[l.jsxs("p",{children:[(p==null?void 0:p.deadEndCount)||0," dead-ends"]}),l.jsxs("p",{children:["of ",(p==null?void 0:p.totalConversations)||0," conversations"]})]})]}),l.jsx(dy,{value:(p==null?void 0:p.deadEndRate)||0,className:"h-3"}),l.jsxs("div",{className:"space-y-2 mt-4",children:[l.jsx("p",{className:"text-sm font-medium",children:"Top Dead-End Topics:"}),((I=p==null?void 0:p.topDeadEndTopics)==null?void 0:I.slice(0,4).map((q,W)=>l.jsxs("div",{className:"flex items-center justify-between text-sm p-2 rounded bg-red-500/10",children:[l.jsx("span",{className:"capitalize",children:q.topic}),l.jsx(Ee,{variant:"outline",className:"border-red-500/50",children:q.count})]},W)))||l.jsx("p",{className:"text-sm text-muted-foreground",children:"No dead-ends detected"})]})]})})]})]})}),l.jsxs(xt,{value:"business",className:"space-y-6",children:[l.jsxs("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-4",children:[l.jsxs(ue,{className:"bg-gradient-to-br from-green-500/10 to-green-500/5 border-green-500/20",children:[l.jsx(ye,{className:"pb-2",children:l.jsxs(Ve,{className:"text-sm font-medium flex items-center gap-2",children:[l.jsx(Bj,{className:"h-4 w-4 text-green-500"}),"Estimated Cost Savings"]})}),l.jsxs(de,{children:[l.jsxs("p",{className:"text-3xl font-bold text-green-600",children:["$",((F=g==null?void 0:g.estimatedCostSavings)==null?void 0:F.toLocaleStr
635ing())||"0"]}),l.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Based on $",((U=g==null?void 0:g.summary)==null?void 0:U.avgHumanCallCost)||15,"/call"]})]})]}),l.jsxs(ue,{className:"bg-gradient-to-br from-blue-500/10 to-blue-500/5 border-blue-500/20",children:[l.jsx(ye,{className:"pb-2",children:l.jsxs(Ve,{className:"text-sm font-medium flex items-center gap-2",children:[l.jsx(Hs,{className:"h-4 w-4 text-blue-500"}),"Hours Saved"]})}),l.jsxs(de,{children:[l.jsx("p",{className:"text-3xl font-bold text-blue-600",children:(g==null?void 0:g.hoursSaved)||0}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Human agent time saved"})]})]}),l.jsxs(ue,{className:"bg-gradient-to-br from-purple-500/10 to-purple-500/5 border-purple-500/20",children:[l.jsx(ye,{className:"pb-2",children:l.jsxs(Ve,{className:"text-sm font-medium flex items-center gap-2",children:[l.jsx(j5,{className:"h-4 w-4 text-purple-500"}),"After-Hours Coverage"]})}),l.jsxs(de,{children:[l.jsxs("p",{className:"text-3xl font-bold text-purple-600",children:[((V=g==null?void 0:g.afterHoursCoverage)==null?void 0:V.percentage)||0,"%"]}),l.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[((G=g==null?void 0:g.afterHoursCoverage)==null?void 0:G.count)||0," calls outside business hours"]})]})]}),l.jsxs(ue,{className:"bg-gradient-to-br from-amber-500/10 to-amber-500/5 border-amber-500/20",children:[l.jsx(ye,{className:"pb-2",children:l.jsxs(Ve,{className:"text-sm font-medium flex items-center gap-2",children:[l.jsx(Tee,{className:"h-4 w-4 text-amber-500"}),"Repeat Contact Rate"]})}),l.jsxs(de,{children:[l.jsxs("p",{className:"text-3xl font-bold text-amber-600",children:[(g==null?void 0:g.repeatContactRate)||0,"%"]}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Same customer within 7 days"})]})]})]}),l.jsxs(ue,{children:[l.jsxs(ye,{children:[l.jsx(Ve,{children:"AI Resolution Summary"}),l.jsx(jn,{children:"How many calls the AI handles without human intervention"})]}),l.jsx(de,{children:l.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[l.jsxs("div",{className:"text-center p-4 rounded-lg bg-muted/50",children:[l.jsx("p",{className:"text-4xl font-bold",children:((Z=g==null?void 0:g.summary)==null?void 0:Z.totalCalls)||0}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Total Calls"})]}),l.jsxs("div",{className:"text-center p-4 rounded-lg bg-green-500/10",children:[l.jsx("p",{className:"text-4xl font-bold text-green-600",children:((he=g==null?void 0:g.summary)==null?void 0:he.aiHandledCalls)||0}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"AI Resolved"})]}),l.jsxs("div",{className:"text-center p-4 rounded-lg bg-muted/50",children:[l.jsxs("p",{className:"text-4xl font-bold",children:[((ve=g==null?void 0:g.summary)==null?void 0:ve.aiHandledPercentage)||0,"%"]}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"AI Success Rate"})]})]})})]})]}),l.jsx(xt,{value:"insights",className:"space-y-6",children:l.jsxs(ue,{children:[l.jsxs(ye,{className:"flex flex-row items-center justify-between",children:[l.jsxs("div",{children:[l.jsxs(Ve,{className:"flex items-center gap-2",children:[l.jsx(Wy,{className:"h-5 w-5 text-primary"}),"Weekly AI-Generated Summary"]}),l.jsx(jn,{children:"Automatically generated insights from your data"})]}),l.jsxs(ie,{onClick:()=>y.mutate(),disabled:y.isPending,children:[l.jsx(O5,{className:"h-4 w-4 mr-2"}),y.isPending?"Generating...":"Generate New Insights"]})]}),l.jsxs(de,{children:[v?l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):m!=null&&m.insights?l.jsxs("div",{className:"space-y-6",children:[((re=m.insights.trending_topic)==null?void 0:re.length)>0&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("h4",{className:"font-semibold flex items-center gap-2",children:[l.jsx(ac,{className:"h-4 w-4 text-green-500"}),"Trending Topics"]}),m.insights.trending_topic.map((q,W)=>l.jsx("div",{className:"p-3 rounded-lg bg-green-500/10 border border-green-500/20",children:l.jsx("p",{className:"text-sm",children:q.insight_text})},W))]}),((ge=m.insights.ai_struggle)==null?void 0:ge.length)>0&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("h4",{className:"font-semibold flex items-center gap-2",children:[l.jsx(oc,{className:"h-4 w-4 text-amber-500"}),"Areas for Improvement"]}),m.insights.ai_struggle.map((q,W)=>l.jsx("div",{className:"p-3 rounded-lg bg-amber-500/10 border border-amber-500/20",children:l.jsx("p",{className:"text-sm",children:q.insight_text})},W))]}),((Y=m.insights.sentiment_change)==null?void 0:Y.length)>0&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("h4",{className:"font-semibold flex items-center gap-2",children:[l.jsx(CO,{className:"h-4 w-4 text-blue-500"}
635),"Sentiment Changes"]}),m.insights.sentiment_change.map((q,W)=>l.jsx("div",{className:"p-3 rounded-lg bg-blue-500/10 border border-blue-500/20",children:l.jsx("p",{className:"text-sm",children:q.insight_text})},W))]}),((ee=m.insights.recommendation)==null?void 0:ee.length)>0&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("h4",{className:"font-semibold flex items-center gap-2",children:[l.jsx($u,{className:"h-4 w-4 text-primary"}),"Recommendations"]}),m.insights.recommendation.map((q,W)=>l.jsx("div",{className:"p-3 rounded-lg bg-primary/10 border border-primary/20",children:l.jsx("p",{className:"text-sm",children:q.insight_text})},W))]}),Object.values(m.insights).every(q=>q.length===0)&&l.jsxs("div",{className:"text-center py-8",children:[l.jsx($u,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),l.jsx("p",{className:"text-muted-foreground",children:'No insights generated yet. Click "Generate New Insights" to analyze your data.'})]})]}):l.jsxs("div",{className:"text-center py-8",children:[l.jsx($u,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),l.jsx("p",{className:"text-muted-foreground",children:'No insights available. Click "Generate New Insights" to analyze your data.'})]}),(m==null?void 0:m.generatedAt)&&l.jsxs("p",{className:"text-xs text-muted-foreground mt-4 text-right",children:["Last generated: ",new Date(m.generatedAt).toLocaleString()]})]})]})})]})]})}function Kze(){var p,g,m,v,y,x,w,S,j,E;const[e,t]=b.useState("30"),{data:r,isLoading:n}=Ke({queryKey:["report-summary",e],queryFn:async()=>{const _=await fetch(`/api/analytics/enhanced-summary?days=${e}`);if(!_.ok)throw new Error("Failed to fetch");return _.json()}}),{data:i}=Ke({queryKey:["report-confidence",e],queryFn:async()=>{const _=await fetch(`/api/analytics/confidence-distribution?days=${e}`);if(!_.ok)throw new Error("Failed to fetch");return _.json()}}),{data:s}=Ke({queryKey:["report-questions",e],queryFn:async()=>{const _=await fetch(`/api/analytics/top-questions?days=${e}`);if(!_.ok)throw new Error("Failed to fetch");return _.json()}}),{data:a}=Ke({queryKey:["report-gaps"],queryFn:async()=>{const _=await fetch("/api/analytics/knowledge-gap-rate?days=365");if(!_.ok)throw new Error("Failed to fetch");return _.json()}}),{data:o}=Ke({queryKey:["report-impact",e],queryFn:async()=>{const _=await fetch(`/api/analytics/business-impact?days=${e}`);if(!_.ok)throw new Error("Failed to fetch");return _.json()}}),{data:c}=Ke({queryKey:["report-insights"],queryFn:async()=>{const _=await fetch("/api/analytics/weekly-insights");if(!_.ok)throw new Error("Failed to fetch");return _.json()}}),u=()=>window.print(),d=()=>e==="9999"?"All Time":e==="365"?"Last 12 Months":`Last ${e} Days`,f=_=>_.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),h=(r==null?void 0:r.topTopics)||[];return n?l.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:l.jsxs("div",{className:"text-center",children:[l.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-blue-600 border-t-transparent mx-auto mb-4"}),l.jsx("p",{className:"text-gray-500",children:"Loading report..."})]})}):l.jsxs(l.Fragment,{children:[l.jsx("style",{children:`
636        @media print {
637          @page {
638            size: letter;
639            margin: 0.4in;
640          }
641          html, body {
642            margin: 0 !important;
643            padding: 0 !important;
644            -webkit-print-color-adjust: exact !important;
645            print-color-adjust: exact !important;
646          }
647          .no-print { display: none !important; }
648          .print-page {
649            width: 100% !important;
650            max-width: 100% !important;
651            padding: 0 !important;
652            margin: 0 !important;
653            box-sizing: border-box !important;
654            background: white !important;
655          }
656          .print-section {
657            page-break-inside: avoid;
658            break-inside: avoid;
659          }
660          * {
661            box-shadow: none !important;
662          }
663        }
664        @media screen {
665          .print-page {
666            max-width: 8.5in;
667            margin: 0 auto;
668            background: white;
669            min-height: 11in;
670            padding: 0.4in;
671            box-sizing: border-box;
672          }
673        }
674      `}),l.jsx("div",{className:"no-print bg-gray-800 py-4",children:l.jsxs("div",{className:"max-w-[8.5in] mx-auto px-4 flex items-center justify-between",children:[l.jsx(zc,{href:"/",children:l.jsxs(ie,{variant:"ghost",size:"sm",className:"text-white hover:bg-gray-700",children:[l.jsx(K0,{className:"h-4 w-4 mr-2"}),"Back"]})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs(Zt,{value:e,onValueChange:t,children:[l.jsx(qt,{className:"w-40 bg-white border-gray-300 text-gray-900",children:l.jsx(Jt,{})}),l.jsxs(Kt,{children:[l.jsx(te,{value:"7",children:"Last 7 Days"}),l.jsx(te,{value:"30",children:"Last 30 Days"}),l.jsx(te,{value:"90",children:"Last 90 Days"}),l.jsx(te,{value:"365",children:"Last 12 Months"}),l.jsx(te,{value:"9999",children:"All Time"})]})]}),l.jsxs(ie,{onClick:u,className:"bg-blue-600 hover:bg-blue-700",children:[l.jsx(Ef,{className:"h-4 w-4 mr-2"}),"Download PDF"]})]})]})}),l.jsx("div",{className:"bg-gray-100 py-6 print:py-0 print:bg-white",children:l.jsxs("div",{className:"print-page bg-white shadow-lg print:shadow-none",children:[l.jsx("div",{className:"print-section bg-blue-600 text-white px-4 py-3 rounded-t-lg print:rounded-none mb-3",children:l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-lg font-bold",children:"AI Customer Service Report"}),l.jsx("p",{className:"text-blue-200 text-xs",children:"AAOE Analytics Summary"})]}),l.jsxs("div",{className:"text-right text-xs text-blue-200",children:[l.jsx("div",{children:d()}),l.jsx("div",{children:f(new Date)})]})]})}),l.jsx("div",{className:"print-section mb-3",children:l.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[l.jsxs("div",{className:"bg-gray-50 rounded p-2 text-center border border-gray-200",children:[l.jsx("p",{className:"text-xl font-bold text-gray-900",children:((g=(p=r==null?void 0:r.overview)==null?void 0:p.totalConversations)==null?void 0:g.toLocaleStr
674ing())||0}),l.jsx("p",{className:"text-[10px] text-gray-500",children:"Conversations"})]}),l.jsxs("div",{className:"bg-emerald-50 rounded p-2 text-center border border-emerald-200",children:[l.jsxs("p",{className:"text-xl font-bold text-emerald-600",children:[Math.round((((m=r==null?void 0:r.overview)==null?void 0:m.rawAvgConfidence)||0)*100),"%"]}),l.jsx("p",{className:"text-[10px] text-emerald-600",children:"AI Confidence"})]}),l.jsxs("div",{className:"bg-blue-50 rounded p-2 text-center border border-blue-200",children:[l.jsxs("p",{className:"text-xl font-bold text-blue-600",children:[((v=o==null?void 0:o.summary)==null?void 0:v.aiHandledPercentage)||0,"%"]}),l.jsx("p",{className:"text-[10px] text-blue-600",children:"AI Resolution"})]}),l.jsxs("div",{className:"bg-amber-50 rounded p-2 text-center border border-amber-200",children:[l.jsxs("p",{className:"text-xl font-bold text-amber-600",children:[((y=r==null?void 0:r.overview)==null?void 0:y.escalationRate)||0,"%"]}),l.jsx("p",{className:"text-[10px] text-amber-600",children:"Escalation Rate"})]})]})}),l.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-3",children:[l.jsxs("div",{className:"space-y-3",children:[h.length>0&&l.jsxs("div",{className:"print-section",children:[l.jsx("h2",{className:"text-xs font-semibold text-gray-700 uppercase tracking-wide mb-2",children:"What Customers Ask About"}),l.jsx("div",{className:"space-y-1",children:h.slice(0,5).map((_,N)=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"w-20 text-[10px] text-gray-600 capitalize",children:_.topic}),l.jsx("div",{className:"flex-1 bg-gray-100 rounded-full h-2 overflow-hidden",children:l.jsx("div",{className:"h-full bg-blue-500 rounded-full",style:{width:`${_.count/h[0].count*100}%`}})}),l.jsx("span",{className:"text-[10px] text-gray-500 w-8 text-right",children:_.count})]},N))})]}),(i==null?void 0:i.byChannel)&&Object.keys(i.byChannel).length>0&&l.jsxs("div",{className:"print-section",children:[l.jsx("h2",{className:"text-xs font-semibold text-gray-700 uppercase tracking-wide mb-2",children:"Performance by Channel"}),l.jsx("div",{className:"space-y-1",children:Object.entries(i.byChannel).sort((_,N)=>N[1].avgConfidencePercent-_[1].avgConfidencePercent).map(([_,N])=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"w-20 text-[10px] text-gray-600",children:N.label}),l.jsx("div",{className:"flex-1 bg-gray-100 rounded-full h-2 overflow-hidden",children:l.jsx("div",{className:`h-full rounded-full ${N.avgConfidencePercent>=70?"bg-emerald-500":N.avgConfidencePercent>=50?"bg-blue-500":"bg-amber-500"}`,style:{width:`${N.avgConfidencePercent}%`}})}),l.jsxs("span",{className:"text-[10px] font-medium text-gray-700 w-12 text-right",children:[N.avgConfidencePercent,"%"]})]},_))})]}),l.jsxs("div",{className:"print-section",children:[l.jsx("h2",{className:"text-xs font-semibold text-gray-700 uppercase tracking-wide mb-2",children:"Business Impact"}),l.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[l.jsxs("div",{className:"bg-emerald-500 rounded p-2 text-white",children:[l.jsx("p",{className:"text-[10px] text-emerald-100",children:"AI-Handled"}),l.jsx("p",{className:"text-lg font-bold",children:((x=o==null?void 0:o.summary)==null?void 0:x.aiHandledCalls)||0})]}),l.jsxs("div",{className:"bg-blue-500 rounded p-2 text-white",children:[l.jsx("p",{className:"text-[10px] text-blue-100",children:"Time Saved"}),l.jsxs("p",{className:"text-lg font-bold",children:[(o==null?void 0:o.hoursSaved)||0,"h"]})]})]})]})]}),l.jsxs("div",{className:"space-y-3",children:[((w=s==null?void 0:s.topQuestions)==null?void 0:w.length)>0&&l.jsxs("div",{className:"print-section",children:[l.jsx("h2",{className:"text-xs font-semibold text-gray-700 uppercase tracking-wide mb-2",children:"Top Customer Questions"}),l.jsx("div",{className:"space-y-1",children:s.topQuestions.slice(0,6).map((_,N)=>l.jsxs("div",{className:"flex items-start gap-2 bg-gray-50 rounded px-2 py-1.5 border border-gray-100",children:[l.jsx("span",{className:"w-4 h-4 rounded-full bg-blue-100 text-blue-600 text-[10px] font-medium flex items-center justify-center shrink-0 mt-0.5",children:N+1}),l.jsx("span",{className:"text-[11px] text-gray-700 flex-1 leading-tight",children:_.question}),l.jsxs("span",{className:"text-[10px] text-gray-400 shrink-0",children:[_.count,"×"]})]},N))})]}),((S=a==null?void 0:a.allGaps)==null?void 0:S.length)>0&&l.jsxs("div",{className:"print-section",children:[l.jsxs("h2",{className:"text-xs font-semibold text-gray-700 uppercase tracking-wide mb-2",children:["Knowledge Gaps ",l.jsxs("span",{className:"text-amber-600 font-normal",children:["(",a.gapCount," unresolved)"]})]}),l.jsx("div",{className:"space-y-1",children:a.allGaps.slice(0,4).map((_,N)=>l.jsxs("div",{className:"flex items-start gap-2 bg-amber-50 rounded px-2 py-1.5 border border-amber-100",children:[l.jsxs("span",{className:"text-amber-600 text-[10px] font-semibold mt-0.5",children:[N+1,"."]}),l.jsx("span",{className:"text-[11px] text-amber-900 leading-tight",children:_.query})]},N))})]})]})]}),(c==null?void 0:c.insights)&&l.jsxs("div",{className:"print-section mb-3",children:[l.jsx("h2",{className:"text-xs font-semibold text-gray-700 uppercase tracking-wide mb-2",children:"AI-Generated Insights & Recommendations"}),l.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[(j=c.insights.trending_topic)==null?void 0:j.slice(0,1).map((_,N)=>l.jsxs("div",{className:"flex items-start gap-2 bg-emerald-50 rounded px-2 py-2 border border-emerald-100",children:[l.jsx("span",{className:"text-emerald-500 text-sm",children:"↑"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-[9px] font-medium text-emerald-600 uppercase",children:"Trending"}),l.jsx("p",{className:"text-[10px] text-gray-700 leading-tight",children:_.insight_text})]})]},`t-${N}`)),(E=c.insights.recommendation)==null?void 0:E.slice(0,1).map((_,N)=>l.jsxs("div",{className:"flex items-start gap-2 bg-violet-50 rounded px-2 py-2 border border-violet-100",children:[l.jsx("span",{className:"text-violet-500 text-sm",children:"★"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-[9px] font-medium text-violet-600 uppercase",children:"Recommendation"}),l.jsx("p",{className:"text-[10px] text-gray-700 leading-tight",children:_.insight_text})]})]},`r-${N}`))]})]}),l.jsx("div",{className:"print-section border-t border-gray-200 pt-2",children:l.jsxs("p",{className:"text-[9px] text-gray-400 text-center",children:["AAOE AI Customer Service Report • ",f(new Date)," • ",d()]})})]})})]})}function Gze(){return l.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:l.jsx(ue,{className:"w-full max-w-md mx-4",children:l.jsxs(de,{className:"pt-6",children:[l.jsxs("div",{className:"flex mb-4 gap-2",children:[l.jsx(Ds,{className:"h-8 w-8 text-red-500"}),l.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),l.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}function Yze(){return l.jsxs(fX,{children:[l.jsx(Lr,{path:"/",component:Mue}),l.jsx(Lr,{path:"/knowledge-base",component:zde}),l.jsx(Lr,{path:"/calls",component:MDe}),l.jsx(Lr,{path:"/issues",component:FDe}),l.jsx(Lr,{path:"/communication",component:JDe}),l.jsx(Lr,{path:"/transcripts",component:eLe}),l.jsx(Lr,{path:"/staff",component:bLe}),l.jsx(Lr,{path:"/analytics",component:wLe}),l.jsx(Lr,{path:"/enhanced-analytics",component:qze}),l.jsx(Lr,{path:"/analytics-report",component:Kze}),l.jsx(Lr,{path:"/ai-config",component:HLe}),l.jsx(Lr,{path:"/transfer-routing",component:bze}),l.jsx(Lr,{path:"/admin-users",component:wze}),l.jsx(Lr,{path:"/chat-widget",component:Aze}),l.jsx(Lr,{path:"/admin",component:Pze}),l.jsx(Lr,{path:"/admin/dashboard",component:Lze}),l.jsx(Lr,{component:Gze})]})}
674function Xze(){var u,d,f;const[e,t]=b.useState(!1),{user:r,signOut:n}=ol(),[i]=aO();b.useEffect(()=>{if(!localStorage.getItem("onboarding-tour-completed")){const p=setTimeout(()=>t(!0),1e3);return()=>clearTimeout(p)}},[]);const s=()=>{localStorage.setItem("onboarding-tour-completed","true"),t(!1)},a=async()=>{await n()},o=()=>{window.dispatchEvent(new CustomEvent("show-overview-instructions"))},c={"--sidebar-width":"16rem","--sidebar-width-icon":"4rem"};return l.jsxs(Sie,{style:c,children:[l.jsx("div",{className:"flex h-screen w-full",children:l.jsxs("div",{className:"flex flex-col flex-1 overflow-hidden",children:[l.jsxs("header",{className:"flex items-center justify-between gap-2 sm:gap-4 border-b px-3 sm:px-6 py-3",children:[l.jsx("div",{className:"flex items-center gap-2 sm:gap-4 flex-1 min-w-0"}),l.jsxs("div",{className:"flex items-center gap-1 sm:gap-2",children:[i==="/"&&l.jsxs(ie,{variant:"ghost",size:"sm",onClick:o,"data-testid":"button-instructions",children:[l.jsx(ap,{className:"h-4 w-4 mr-2"}),l.jsx("span",{className:"hidden sm:inline",children:"Instructions"})]}),l.jsx(zc,{href:"/admin",children:l.jsxs(ie,{variant:"ghost",size:"sm","data-testid":"button-admin",children:[l.jsx(Fp,{className:"h-4 w-4 mr-2"}),l.jsx("span",{className:"hidden sm:inline",children:"Admin"})]})}),l.jsx(Eie,{}),l.jsxs(Hle,{children:[l.jsx(qle,{"data-testid":"button-user-menu",children:l.jsx(jc,{className:"h-8 w-8",children:l.jsx(_c,{className:"text-sm",children:(u=r==null?void 0:r.user_metadata)!=null&&u.full_name?r.user_metadata.full_name.split(" ").map(h=>h[0]).join("").toUpperCase():((d=r==null?void 0:r.email)==null?void 0:d.charAt(0).toUpperCase())||"U"})})}),l.jsxs(zU,{align:"end",children:[l.jsx(VU,{children:((f=r==null?void 0:r.user_metadata)==null?void 0:f.full_name)||(r==null?void 0:r.email)||"User"}),l.jsx(WU,{}),l.jsx(UU,{onClick:a,"data-testid":"menu-logout",children:"Logout"})]})]})]})]}),l.jsx("main",{className:"flex-1 overflow-auto p-4 sm:p-6",children:l.jsx(Yze,{})})]})}),l.jsx(yoe,{run:e,onComplete:s})]})}function Qze(){const{user:e,loading:t}=ol();return t?l.jsx("div",{className:"min-h-screen flex items-center justify-center",children:l.jsxs("div",{className:"text-center",children:[l.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent mx-auto mb-4"}),l.jsx("p",{className:"text-muted-foreground",children:"Loading..."})]})}):e?l.jsx(Xze,{}):l.jsx(Nze,{})}function Zze(){return l.jsx(MX,{client:UF,children:l.jsx(jie,{defaultTheme:"dark",children:l.jsx(pB,{children:l.jsxs(Qle,{children:[l.jsx(Qze,{}),l.jsx(wte,{})]})})})})}f3(document.getElementById("root")).render(l.jsx(Zze,{}));

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.