@estevia/evafusion-agent 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +31 -0
- package/dist/index.mjs +3592 -0
- package/package.json +1 -1
- package/dist/index.es.js +0 -3580
- package/dist/index.umd.js +0 -31
package/dist/index.umd.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
(function(ie,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react"),require("framer-motion"),require("react-dom"),require("@estevia/evafusion-sdk"),require("lucide-react")):typeof define=="function"&&define.amd?define(["exports","react","framer-motion","react-dom","@estevia/evafusion-sdk","lucide-react"],s):(ie=typeof globalThis<"u"?globalThis:ie||self,s(ie.EvaFusionAgent={},ie.React,ie.framerMotion,ie.ReactDOM,ie.EvaFusionSDK,ie.lucideReact))})(this,function(ie,s,Oe,Ft,Lt,me){"use strict";var ut={exports:{}},qe={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.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 jt;function Bt(){if(jt)return qe;jt=1;var t=s,r=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,d=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function m(c,f,h){var v,S={},I=null,n=null;h!==void 0&&(I=""+h),f.key!==void 0&&(I=""+f.key),f.ref!==void 0&&(n=f.ref);for(v in f)o.call(f,v)&&!u.hasOwnProperty(v)&&(S[v]=f[v]);if(c&&c.defaultProps)for(v in f=c.defaultProps,f)S[v]===void 0&&(S[v]=f[v]);return{$$typeof:r,type:c,key:I,ref:n,props:S,_owner:d.current}}return qe.Fragment=a,qe.jsx=m,qe.jsxs=m,qe}var Je={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.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 St;function $t(){return St||(St=1,process.env.NODE_ENV!=="production"&&function(){var t=s,r=Symbol.for("react.element"),a=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),n=Symbol.for("react.offscreen"),$=Symbol.iterator,g="@@iterator";function x(e){if(e===null||typeof e!="object")return null;var l=$&&e[$]||e[g];return typeof l=="function"?l:null}var N=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var l=arguments.length,p=new Array(l>1?l-1:0),w=1;w<l;w++)p[w-1]=arguments[w];b("error",e,p)}}function b(e,l,p){{var w=N.ReactDebugCurrentFrame,P=w.getStackAddendum();P!==""&&(l+="%s",p=p.concat([P]));var D=p.map(function(T){return String(T)});D.unshift("Warning: "+l),Function.prototype.apply.call(console[e],console,D)}}var z=!1,W=!1,H=!1,le=!1,we=!1,ue;ue=Symbol.for("react.module.reference");function Ee(e){return!!(typeof e=="string"||typeof e=="function"||e===o||e===u||we||e===d||e===h||e===v||le||e===n||z||W||H||typeof e=="object"&&e!==null&&(e.$$typeof===I||e.$$typeof===S||e.$$typeof===m||e.$$typeof===c||e.$$typeof===f||e.$$typeof===ue||e.getModuleId!==void 0))}function he(e,l,p){var w=e.displayName;if(w)return w;var P=l.displayName||l.name||"";return P!==""?p+"("+P+")":p}function C(e){return e.displayName||"Context"}function K(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case o:return"Fragment";case a:return"Portal";case u:return"Profiler";case d:return"StrictMode";case h:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c:var l=e;return C(l)+".Consumer";case m:var p=e;return C(p._context)+".Provider";case f:return he(e,e.render,"ForwardRef");case S:var w=e.displayName||null;return w!==null?w:K(e.type)||"Memo";case I:{var P=e,D=P._payload,T=P._init;try{return K(T(D))}catch{return null}}}return null}var G=Object.assign,oe=0,X,Z,fe,k,U,q,_;function O(){}O.__reactDisabledLog=!0;function B(){{if(oe===0){X=console.log,Z=console.info,fe=console.warn,k=console.error,U=console.group,q=console.groupCollapsed,_=console.groupEnd;var e={configurable:!0,enumerable:!0,value:O,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}oe++}}function J(){{if(oe--,oe===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},e,{value:X}),info:G({},e,{value:Z}),warn:G({},e,{value:fe}),error:G({},e,{value:k}),group:G({},e,{value:U}),groupCollapsed:G({},e,{value:q}),groupEnd:G({},e,{value:_})})}oe<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ge=N.ReactCurrentDispatcher,F;function _e(e,l,p){{if(F===void 0)try{throw Error()}catch(P){var w=P.stack.trim().match(/\n( *(at )?)/);F=w&&w[1]||""}return`
|
|
18
|
-
`+F+e}}var ke=!1,je;{var Ie=typeof WeakMap=="function"?WeakMap:Map;je=new Ie}function Ve(e,l){if(!e||ke)return"";{var p=je.get(e);if(p!==void 0)return p}var w;ke=!0;var P=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var D;D=ge.current,ge.current=null,B();try{if(l){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(ne){w=ne}Reflect.construct(e,[],T)}else{try{T.call()}catch(ne){w=ne}e.call(T.prototype)}}else{try{throw Error()}catch(ne){w=ne}e()}}catch(ne){if(ne&&w&&typeof ne.stack=="string"){for(var R=ne.stack.split(`
|
|
19
|
-
`),ee=w.stack.split(`
|
|
20
|
-
`),Y=R.length-1,V=ee.length-1;Y>=1&&V>=0&&R[Y]!==ee[V];)V--;for(;Y>=1&&V>=0;Y--,V--)if(R[Y]!==ee[V]){if(Y!==1||V!==1)do if(Y--,V--,V<0||R[Y]!==ee[V]){var ce=`
|
|
21
|
-
`+R[Y].replace(" at new "," at ");return e.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",e.displayName)),typeof e=="function"&&je.set(e,ce),ce}while(Y>=1&&V>=0);break}}}finally{ke=!1,ge.current=D,J(),Error.prepareStackTrace=P}var Ke=e?e.displayName||e.name:"",Le=Ke?_e(Ke):"";return typeof e=="function"&&je.set(e,Le),Le}function nt(e,l,p){return Ve(e,!1)}function bt(e){var l=e.prototype;return!!(l&&l.isReactComponent)}function We(e,l,p){if(e==null)return"";if(typeof e=="function")return Ve(e,bt(e));if(typeof e=="string")return _e(e);switch(e){case h:return _e("Suspense");case v:return _e("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return nt(e.render);case S:return We(e.type,l,p);case I:{var w=e,P=w._payload,D=w._init;try{return We(D(P),l,p)}catch{}}}return""}var Ae=Object.prototype.hasOwnProperty,ot={},Ge=N.ReactDebugCurrentFrame;function Ue(e){if(e){var l=e._owner,p=We(e.type,e._source,l?l.type:null);Ge.setExtraStackFrame(p)}else Ge.setExtraStackFrame(null)}function st(e,l,p,w,P){{var D=Function.call.bind(Ae);for(var T in e)if(D(e,T)){var R=void 0;try{if(typeof e[T]!="function"){var ee=Error((w||"React class")+": "+p+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ee.name="Invariant Violation",ee}R=e[T](l,T,w,p,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Y){R=Y}R&&!(R instanceof Error)&&(Ue(P),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",w||"React class",p,T,typeof R),Ue(null)),R instanceof Error&&!(R.message in ot)&&(ot[R.message]=!0,Ue(P),E("Failed %s type: %s",p,R.message),Ue(null))}}}var Me=Array.isArray;function He(e){return Me(e)}function Se(e){{var l=typeof Symbol=="function"&&Symbol.toStringTag,p=l&&e[Symbol.toStringTag]||e.constructor.name||"Object";return p}}function vt(e){try{return it(e),!1}catch{return!0}}function it(e){return""+e}function Q(e){if(vt(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Se(e)),it(e)}var Ce=N.ReactCurrentOwner,xt={key:!0,ref:!0,__self:!0,__source:!0},lt,De;function yt(e){if(Ae.call(e,"ref")){var l=Object.getOwnPropertyDescriptor(e,"ref").get;if(l&&l.isReactWarning)return!1}return e.ref!==void 0}function ct(e){if(Ae.call(e,"key")){var l=Object.getOwnPropertyDescriptor(e,"key").get;if(l&&l.isReactWarning)return!1}return e.key!==void 0}function Qe(e,l){typeof e.ref=="string"&&Ce.current}function Pe(e,l){{var p=function(){lt||(lt=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",l))};p.isReactWarning=!0,Object.defineProperty(e,"key",{get:p,configurable:!0})}}function dt(e,l){{var p=function(){De||(De=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",l))};p.isReactWarning=!0,Object.defineProperty(e,"ref",{get:p,configurable:!0})}}var ze=function(e,l,p,w,P,D,T){var R={$$typeof:r,type:e,key:l,ref:p,props:T,_owner:D};return R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(R,"_self",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.defineProperty(R,"_source",{configurable:!1,enumerable:!1,writable:!1,value:P}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R};function wt(e,l,p,w,P){{var D,T={},R=null,ee=null;p!==void 0&&(Q(p),R=""+p),ct(l)&&(Q(l.key),R=""+l.key),yt(l)&&(ee=l.ref,Qe(l,P));for(D in l)Ae.call(l,D)&&!xt.hasOwnProperty(D)&&(T[D]=l[D]);if(e&&e.defaultProps){var Y=e.defaultProps;for(D in Y)T[D]===void 0&&(T[D]=Y[D])}if(R||ee){var V=typeof e=="function"?e.displayName||e.name||"Unknown":e;R&&Pe(T,V),ee&&dt(T,V)}return ze(e,R,ee,P,w,Ce.current,T)}}var et=N.ReactCurrentOwner,tt=N.ReactDebugCurrentFrame;function Ne(e){if(e){var l=e._owner,p=We(e.type,e._source,l?l.type:null);tt.setExtraStackFrame(p)}else tt.setExtraStackFrame(null)}var rt;rt=!1;function Fe(e){return typeof e=="object"&&e!==null&&e.$$typeof===r}function pe(){{if(et.current){var e=K(et.current.type);if(e)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function Et(e){return""}var y={};function A(e){{var l=pe();if(!l){var p=typeof e=="string"?e:e.displayName||e.name;p&&(l=`
|
|
24
|
-
|
|
25
|
-
Check the top-level render call using <`+p+">.")}return l}}function M(e,l){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var p=A(l);if(y[p])return;y[p]=!0;var w="";e&&e._owner&&e._owner!==et.current&&(w=" It was passed a child from "+K(e._owner.type)+"."),Ne(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',p,w),Ne(null)}}function re(e,l){{if(typeof e!="object")return;if(He(e))for(var p=0;p<e.length;p++){var w=e[p];Fe(w)&&M(w,l)}else if(Fe(e))e._store&&(e._store.validated=!0);else if(e){var P=x(e);if(typeof P=="function"&&P!==e.entries)for(var D=P.call(e),T;!(T=D.next()).done;)Fe(T.value)&&M(T.value,l)}}}function se(e){{var l=e.type;if(l==null||typeof l=="string")return;var p;if(typeof l=="function")p=l.propTypes;else if(typeof l=="object"&&(l.$$typeof===f||l.$$typeof===S))p=l.propTypes;else return;if(p){var w=K(l);st(p,e.props,"prop",w,e)}else if(l.PropTypes!==void 0&&!rt){rt=!0;var P=K(l);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",P||"Unknown")}typeof l.getDefaultProps=="function"&&!l.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function be(e){{for(var l=Object.keys(e.props),p=0;p<l.length;p++){var w=l[p];if(w!=="children"&&w!=="key"){Ne(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",w),Ne(null);break}}e.ref!==null&&(Ne(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),Ne(null))}}var ve={};function ae(e,l,p,w,P,D){{var T=Ee(e);if(!T){var R="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(R+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ee=Et();ee?R+=ee:R+=pe();var Y;e===null?Y="null":He(e)?Y="array":e!==void 0&&e.$$typeof===r?(Y="<"+(K(e.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):Y=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Y,R)}var V=wt(e,l,p,P,D);if(V==null)return V;if(T){var ce=l.children;if(ce!==void 0)if(w)if(He(ce)){for(var Ke=0;Ke<ce.length;Ke++)re(ce[Ke],e);Object.freeze&&Object.freeze(ce)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else re(ce,e)}if(Ae.call(l,"key")){var Le=K(e),ne=Object.keys(l).filter(function(ta){return ta!=="key"}),kt=ne.length>0?"{key: someKey, "+ne.join(": ..., ")+": ...}":"{key: someKey}";if(!ve[Le+kt]){var ea=ne.length>0?"{"+ne.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s {...props} />
|
|
28
|
-
React keys must be passed directly to JSX without using spread:
|
|
29
|
-
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,kt,Le,ea,Le),ve[Le+kt]=!0}}return e===o?be(V):se(V),V}}function xe(e,l,p){return ae(e,l,p,!0)}function Xr(e,l,p){return ae(e,l,p,!1)}var Zr=Xr,Qr=xe;Je.Fragment=o,Je.jsx=Zr,Je.jsxs=Qr}()),Je}process.env.NODE_ENV==="production"?ut.exports=Bt():ut.exports=$t();var i=ut.exports,Yt=t=>{switch(t){case"success":return Gt;case"info":return Ht;case"warning":return Ut;case"error":return Kt;default:return null}},Vt=Array(12).fill(0),Wt=({visible:t,className:r})=>s.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":t},s.createElement("div",{className:"sonner-spinner"},Vt.map((a,o)=>s.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),Gt=s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},s.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Ut=s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},s.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Ht=s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},s.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Kt=s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},s.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),qt=s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},s.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Jt=()=>{let[t,r]=s.useState(document.hidden);return s.useEffect(()=>{let a=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",a),()=>window.removeEventListener("visibilitychange",a)},[]),t},ft=1,Xt=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;let{message:a,...o}=t,d=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:ft++,u=this.toasts.find(c=>c.id===d),m=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(d)&&this.dismissedToasts.delete(d),u?this.toasts=this.toasts.map(c=>c.id===d?(this.publish({...c,...t,id:d,title:a}),{...c,...t,id:d,dismissible:m,title:a}):c):this.addToast({title:a,...o,dismissible:m,id:d}),d},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(r=>{this.subscribers.forEach(a=>a({id:r.id,dismiss:!0}))}),this.subscribers.forEach(r=>r({id:t,dismiss:!0})),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let a;r.loading!==void 0&&(a=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));let o=t instanceof Promise?t:t(),d=a!==void 0,u,m=o.then(async f=>{if(u=["resolve",f],s.isValidElement(f))d=!1,this.create({id:a,type:"default",message:f});else if(Qt(f)&&!f.ok){d=!1;let h=typeof r.error=="function"?await r.error(`HTTP error! status: ${f.status}`):r.error,v=typeof r.description=="function"?await r.description(`HTTP error! status: ${f.status}`):r.description;this.create({id:a,type:"error",message:h,description:v})}else if(r.success!==void 0){d=!1;let h=typeof r.success=="function"?await r.success(f):r.success,v=typeof r.description=="function"?await r.description(f):r.description;this.create({id:a,type:"success",message:h,description:v})}}).catch(async f=>{if(u=["reject",f],r.error!==void 0){d=!1;let h=typeof r.error=="function"?await r.error(f):r.error,v=typeof r.description=="function"?await r.description(f):r.description;this.create({id:a,type:"error",message:h,description:v})}}).finally(()=>{var f;d&&(this.dismiss(a),a=void 0),(f=r.finally)==null||f.call(r)}),c=()=>new Promise((f,h)=>m.then(()=>u[0]==="reject"?h(u[1]):f(u[1])).catch(h));return typeof a!="string"&&typeof a!="number"?{unwrap:c}:Object.assign(a,{unwrap:c})},this.custom=(t,r)=>{let a=(r==null?void 0:r.id)||ft++;return this.create({jsx:t(a),id:a,...r}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},te=new Xt,Zt=(t,r)=>{let a=(r==null?void 0:r.id)||ft++;return te.addToast({title:t,...r,id:a}),a},Qt=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",er=Zt,tr=()=>te.toasts,rr=()=>te.getActiveToasts(),Ct=Object.assign(er,{success:te.success,info:te.info,warning:te.warning,error:te.error,custom:te.custom,message:te.message,promise:te.promise,dismiss:te.dismiss,loading:te.loading},{getHistory:tr,getToasts:rr});function ar(t,{insertAt:r}={}){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}ar(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
31
|
-
`);function at(t){return t.label!==void 0}var nr=3,or="32px",sr="16px",Nt=4e3,ir=356,lr=14,cr=20,dr=200;function de(...t){return t.filter(Boolean).join(" ")}function ur(t){let[r,a]=t.split("-"),o=[];return r&&o.push(r),a&&o.push(a),o}var fr=t=>{var r,a,o,d,u,m,c,f,h,v,S;let{invert:I,toast:n,unstyled:$,interacting:g,setHeights:x,visibleToasts:N,heights:E,index:b,toasts:z,expanded:W,removeToast:H,defaultRichColors:le,closeButton:we,style:ue,cancelButtonStyle:Ee,actionButtonStyle:he,className:C="",descriptionClassName:K="",duration:G,position:oe,gap:X,loadingIcon:Z,expandByDefault:fe,classNames:k,icons:U,closeButtonAriaLabel:q="Close toast",pauseWhenPageIsHidden:_}=t,[O,B]=s.useState(null),[J,ge]=s.useState(null),[F,_e]=s.useState(!1),[ke,je]=s.useState(!1),[Ie,Ve]=s.useState(!1),[nt,bt]=s.useState(!1),[We,Ae]=s.useState(!1),[ot,Ge]=s.useState(0),[Ue,st]=s.useState(0),Me=s.useRef(n.duration||G||Nt),He=s.useRef(null),Se=s.useRef(null),vt=b===0,it=b+1<=N,Q=n.type,Ce=n.dismissible!==!1,xt=n.className||"",lt=n.descriptionClassName||"",De=s.useMemo(()=>E.findIndex(y=>y.toastId===n.id)||0,[E,n.id]),yt=s.useMemo(()=>{var y;return(y=n.closeButton)!=null?y:we},[n.closeButton,we]),ct=s.useMemo(()=>n.duration||G||Nt,[n.duration,G]),Qe=s.useRef(0),Pe=s.useRef(0),dt=s.useRef(0),ze=s.useRef(null),[wt,et]=oe.split("-"),tt=s.useMemo(()=>E.reduce((y,A,M)=>M>=De?y:y+A.height,0),[E,De]),Ne=Jt(),rt=n.invert||I,Fe=Q==="loading";Pe.current=s.useMemo(()=>De*X+tt,[De,tt]),s.useEffect(()=>{Me.current=ct},[ct]),s.useEffect(()=>{_e(!0)},[]),s.useEffect(()=>{let y=Se.current;if(y){let A=y.getBoundingClientRect().height;return st(A),x(M=>[{toastId:n.id,height:A,position:n.position},...M]),()=>x(M=>M.filter(re=>re.toastId!==n.id))}},[x,n.id]),s.useLayoutEffect(()=>{if(!F)return;let y=Se.current,A=y.style.height;y.style.height="auto";let M=y.getBoundingClientRect().height;y.style.height=A,st(M),x(re=>re.find(se=>se.toastId===n.id)?re.map(se=>se.toastId===n.id?{...se,height:M}:se):[{toastId:n.id,height:M,position:n.position},...re])},[F,n.title,n.description,x,n.id]);let pe=s.useCallback(()=>{je(!0),Ge(Pe.current),x(y=>y.filter(A=>A.toastId!==n.id)),setTimeout(()=>{H(n)},dr)},[n,H,x,Pe]);s.useEffect(()=>{if(n.promise&&Q==="loading"||n.duration===1/0||n.type==="loading")return;let y;return W||g||_&&Ne?(()=>{if(dt.current<Qe.current){let A=new Date().getTime()-Qe.current;Me.current=Me.current-A}dt.current=new Date().getTime()})():Me.current!==1/0&&(Qe.current=new Date().getTime(),y=setTimeout(()=>{var A;(A=n.onAutoClose)==null||A.call(n,n),pe()},Me.current)),()=>clearTimeout(y)},[W,g,n,Q,_,Ne,pe]),s.useEffect(()=>{n.delete&&pe()},[pe,n.delete]);function Et(){var y,A,M;return U!=null&&U.loading?s.createElement("div",{className:de(k==null?void 0:k.loader,(y=n==null?void 0:n.classNames)==null?void 0:y.loader,"sonner-loader"),"data-visible":Q==="loading"},U.loading):Z?s.createElement("div",{className:de(k==null?void 0:k.loader,(A=n==null?void 0:n.classNames)==null?void 0:A.loader,"sonner-loader"),"data-visible":Q==="loading"},Z):s.createElement(Wt,{className:de(k==null?void 0:k.loader,(M=n==null?void 0:n.classNames)==null?void 0:M.loader),visible:Q==="loading"})}return s.createElement("li",{tabIndex:0,ref:Se,className:de(C,xt,k==null?void 0:k.toast,(r=n==null?void 0:n.classNames)==null?void 0:r.toast,k==null?void 0:k.default,k==null?void 0:k[Q],(a=n==null?void 0:n.classNames)==null?void 0:a[Q]),"data-sonner-toast":"","data-rich-colors":(o=n.richColors)!=null?o:le,"data-styled":!(n.jsx||n.unstyled||$),"data-mounted":F,"data-promise":!!n.promise,"data-swiped":We,"data-removed":ke,"data-visible":it,"data-y-position":wt,"data-x-position":et,"data-index":b,"data-front":vt,"data-swiping":Ie,"data-dismissible":Ce,"data-type":Q,"data-invert":rt,"data-swipe-out":nt,"data-swipe-direction":J,"data-expanded":!!(W||fe&&F),style:{"--index":b,"--toasts-before":b,"--z-index":z.length-b,"--offset":`${ke?ot:Pe.current}px`,"--initial-height":fe?"auto":`${Ue}px`,...ue,...n.style},onDragEnd:()=>{Ve(!1),B(null),ze.current=null},onPointerDown:y=>{Fe||!Ce||(He.current=new Date,Ge(Pe.current),y.target.setPointerCapture(y.pointerId),y.target.tagName!=="BUTTON"&&(Ve(!0),ze.current={x:y.clientX,y:y.clientY}))},onPointerUp:()=>{var y,A,M,re;if(nt||!Ce)return;ze.current=null;let se=Number(((y=Se.current)==null?void 0:y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),be=Number(((A=Se.current)==null?void 0:A.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ve=new Date().getTime()-((M=He.current)==null?void 0:M.getTime()),ae=O==="x"?se:be,xe=Math.abs(ae)/ve;if(Math.abs(ae)>=cr||xe>.11){Ge(Pe.current),(re=n.onDismiss)==null||re.call(n,n),ge(O==="x"?se>0?"right":"left":be>0?"down":"up"),pe(),bt(!0),Ae(!1);return}Ve(!1),B(null)},onPointerMove:y=>{var A,M,re,se;if(!ze.current||!Ce||((A=window.getSelection())==null?void 0:A.toString().length)>0)return;let be=y.clientY-ze.current.y,ve=y.clientX-ze.current.x,ae=(M=t.swipeDirections)!=null?M:ur(oe);!O&&(Math.abs(ve)>1||Math.abs(be)>1)&&B(Math.abs(ve)>Math.abs(be)?"x":"y");let xe={x:0,y:0};O==="y"?(ae.includes("top")||ae.includes("bottom"))&&(ae.includes("top")&&be<0||ae.includes("bottom")&&be>0)&&(xe.y=be):O==="x"&&(ae.includes("left")||ae.includes("right"))&&(ae.includes("left")&&ve<0||ae.includes("right")&&ve>0)&&(xe.x=ve),(Math.abs(xe.x)>0||Math.abs(xe.y)>0)&&Ae(!0),(re=Se.current)==null||re.style.setProperty("--swipe-amount-x",`${xe.x}px`),(se=Se.current)==null||se.style.setProperty("--swipe-amount-y",`${xe.y}px`)}},yt&&!n.jsx?s.createElement("button",{"aria-label":q,"data-disabled":Fe,"data-close-button":!0,onClick:Fe||!Ce?()=>{}:()=>{var y;pe(),(y=n.onDismiss)==null||y.call(n,n)},className:de(k==null?void 0:k.closeButton,(d=n==null?void 0:n.classNames)==null?void 0:d.closeButton)},(u=U==null?void 0:U.close)!=null?u:qt):null,n.jsx||s.isValidElement(n.title)?n.jsx?n.jsx:typeof n.title=="function"?n.title():n.title:s.createElement(s.Fragment,null,Q||n.icon||n.promise?s.createElement("div",{"data-icon":"",className:de(k==null?void 0:k.icon,(m=n==null?void 0:n.classNames)==null?void 0:m.icon)},n.promise||n.type==="loading"&&!n.icon?n.icon||Et():null,n.type!=="loading"?n.icon||(U==null?void 0:U[Q])||Yt(Q):null):null,s.createElement("div",{"data-content":"",className:de(k==null?void 0:k.content,(c=n==null?void 0:n.classNames)==null?void 0:c.content)},s.createElement("div",{"data-title":"",className:de(k==null?void 0:k.title,(f=n==null?void 0:n.classNames)==null?void 0:f.title)},typeof n.title=="function"?n.title():n.title),n.description?s.createElement("div",{"data-description":"",className:de(K,lt,k==null?void 0:k.description,(h=n==null?void 0:n.classNames)==null?void 0:h.description)},typeof n.description=="function"?n.description():n.description):null),s.isValidElement(n.cancel)?n.cancel:n.cancel&&at(n.cancel)?s.createElement("button",{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||Ee,onClick:y=>{var A,M;at(n.cancel)&&Ce&&((M=(A=n.cancel).onClick)==null||M.call(A,y),pe())},className:de(k==null?void 0:k.cancelButton,(v=n==null?void 0:n.classNames)==null?void 0:v.cancelButton)},n.cancel.label):null,s.isValidElement(n.action)?n.action:n.action&&at(n.action)?s.createElement("button",{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||he,onClick:y=>{var A,M;at(n.action)&&((M=(A=n.action).onClick)==null||M.call(A,y),!y.defaultPrevented&&pe())},className:de(k==null?void 0:k.actionButton,(S=n==null?void 0:n.classNames)==null?void 0:S.actionButton)},n.action.label):null))};function Rt(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function pr(t,r){let a={};return[t,r].forEach((o,d)=>{let u=d===1,m=u?"--mobile-offset":"--offset",c=u?sr:or;function f(h){["top","right","bottom","left"].forEach(v=>{a[`${m}-${v}`]=typeof h=="number"?`${h}px`:h})}typeof o=="number"||typeof o=="string"?f(o):typeof o=="object"?["top","right","bottom","left"].forEach(h=>{o[h]===void 0?a[`${m}-${h}`]=c:a[`${m}-${h}`]=typeof o[h]=="number"?`${o[h]}px`:o[h]}):f(c)}),a}var mr=s.forwardRef(function(t,r){let{invert:a,position:o="bottom-right",hotkey:d=["altKey","KeyT"],expand:u,closeButton:m,className:c,offset:f,mobileOffset:h,theme:v="light",richColors:S,duration:I,style:n,visibleToasts:$=nr,toastOptions:g,dir:x=Rt(),gap:N=lr,loadingIcon:E,icons:b,containerAriaLabel:z="Notifications",pauseWhenPageIsHidden:W}=t,[H,le]=s.useState([]),we=s.useMemo(()=>Array.from(new Set([o].concat(H.filter(_=>_.position).map(_=>_.position)))),[H,o]),[ue,Ee]=s.useState([]),[he,C]=s.useState(!1),[K,G]=s.useState(!1),[oe,X]=s.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Z=s.useRef(null),fe=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=s.useRef(null),U=s.useRef(!1),q=s.useCallback(_=>{le(O=>{var B;return(B=O.find(J=>J.id===_.id))!=null&&B.delete||te.dismiss(_.id),O.filter(({id:J})=>J!==_.id)})},[]);return s.useEffect(()=>te.subscribe(_=>{if(_.dismiss){le(O=>O.map(B=>B.id===_.id?{...B,delete:!0}:B));return}setTimeout(()=>{Ft.flushSync(()=>{le(O=>{let B=O.findIndex(J=>J.id===_.id);return B!==-1?[...O.slice(0,B),{...O[B],..._},...O.slice(B+1)]:[_,...O]})})})}),[]),s.useEffect(()=>{if(v!=="system"){X(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window>"u")return;let _=window.matchMedia("(prefers-color-scheme: dark)");try{_.addEventListener("change",({matches:O})=>{X(O?"dark":"light")})}catch{_.addListener(({matches:B})=>{try{X(B?"dark":"light")}catch(J){console.error(J)}})}},[v]),s.useEffect(()=>{H.length<=1&&C(!1)},[H]),s.useEffect(()=>{let _=O=>{var B,J;d.every(ge=>O[ge]||O.code===ge)&&(C(!0),(B=Z.current)==null||B.focus()),O.code==="Escape"&&(document.activeElement===Z.current||(J=Z.current)!=null&&J.contains(document.activeElement))&&C(!1)};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[d]),s.useEffect(()=>{if(Z.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,U.current=!1)}},[Z.current]),s.createElement("section",{ref:r,"aria-label":`${z} ${fe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},we.map((_,O)=>{var B;let[J,ge]=_.split("-");return H.length?s.createElement("ol",{key:_,dir:x==="auto"?Rt():x,tabIndex:-1,ref:Z,className:c,"data-sonner-toaster":!0,"data-theme":oe,"data-y-position":J,"data-lifted":he&&H.length>1&&!u,"data-x-position":ge,style:{"--front-toast-height":`${((B=ue[0])==null?void 0:B.height)||0}px`,"--width":`${ir}px`,"--gap":`${N}px`,...n,...pr(f,h)},onBlur:F=>{U.current&&!F.currentTarget.contains(F.relatedTarget)&&(U.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:F=>{F.target instanceof HTMLElement&&F.target.dataset.dismissible==="false"||U.current||(U.current=!0,k.current=F.relatedTarget)},onMouseEnter:()=>C(!0),onMouseMove:()=>C(!0),onMouseLeave:()=>{K||C(!1)},onDragEnd:()=>C(!1),onPointerDown:F=>{F.target instanceof HTMLElement&&F.target.dataset.dismissible==="false"||G(!0)},onPointerUp:()=>G(!1)},H.filter(F=>!F.position&&O===0||F.position===_).map((F,_e)=>{var ke,je;return s.createElement(fr,{key:F.id,icons:b,index:_e,toast:F,defaultRichColors:S,duration:(ke=g==null?void 0:g.duration)!=null?ke:I,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:a,visibleToasts:$,closeButton:(je=g==null?void 0:g.closeButton)!=null?je:m,interacting:K,position:_,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:q,toasts:H.filter(Ie=>Ie.position==F.position),heights:ue.filter(Ie=>Ie.position==F.position),setHeights:Ee,expandByDefault:u,gap:N,loadingIcon:E,expanded:he,pauseWhenPageIsHidden:W,swipeDirections:t.swipeDirections})})):null}))});const hr=({onClick:t})=>i.jsxs(Oe.motion.div,{initial:{opacity:0,scale:.8,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.5,filter:"blur(10px)"},className:"fixed bottom-8 right-8 z-[9999] group flex items-center justify-center cursor-pointer",onClick:t,children:[i.jsx("div",{className:"absolute w-32 h-32 bg-amber-500/10 rounded-full blur-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-1000 animate-pulse"}),i.jsxs("div",{className:"relative w-20 h-20 rounded-full bg-gradient-to-br from-slate-900 to-black border border-white/10 flex items-center justify-center transition-all duration-500 hover:shadow-[0_0_50px_rgba(212,175,55,0.3)] hover:scale-110 active:scale-95",children:[i.jsx("div",{className:"absolute inset-0 rounded-full border border-amber-500/20 animate-eva-quantum"}),i.jsxs("div",{className:"relative z-10 flex flex-col items-center",children:[i.jsx(me.Sparkles,{className:"w-8 h-8 text-amber-400"}),i.jsx("span",{className:"text-[8px] font-black uppercase tracking-[0.2em] text-amber-500/60 mt-1",children:"EVA"})]}),i.jsx("div",{className:"absolute top-4 right-4 w-2 h-2 bg-amber-400 rounded-full",children:i.jsx("div",{className:"absolute inset-0 bg-amber-400 rounded-full animate-ping opacity-75"})})]})]}),pt=s.createContext(null);function Tt(t){var r,a,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var d=t.length;for(r=0;r<d;r++)t[r]&&(a=Tt(t[r]))&&(o&&(o+=" "),o+=a)}else for(a in t)t[a]&&(o&&(o+=" "),o+=a);return o}function gr(){for(var t,r,a=0,o="",d=arguments.length;a<d;a++)(t=arguments[a])&&(r=Tt(t))&&(o&&(o+=" "),o+=r);return o}const mt="-",br=t=>{const r=xr(t),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=t;return{getClassGroupId:m=>{const c=m.split(mt);return c[0]===""&&c.length!==1&&c.shift(),_t(c,r)||vr(m)},getConflictingClassGroupIds:(m,c)=>{const f=a[m]||[];return c&&o[m]?[...f,...o[m]]:f}}},_t=(t,r)=>{var m;if(t.length===0)return r.classGroupId;const a=t[0],o=r.nextPart.get(a),d=o?_t(t.slice(1),o):void 0;if(d)return d;if(r.validators.length===0)return;const u=t.join(mt);return(m=r.validators.find(({validator:c})=>c(u)))==null?void 0:m.classGroupId},At=/^\[(.+)\]$/,vr=t=>{if(At.test(t)){const r=At.exec(t)[1],a=r==null?void 0:r.substring(0,r.indexOf(":"));if(a)return"arbitrary.."+a}},xr=t=>{const{theme:r,prefix:a}=t,o={nextPart:new Map,validators:[]};return wr(Object.entries(t.classGroups),a).forEach(([u,m])=>{ht(m,o,u,r)}),o},ht=(t,r,a,o)=>{t.forEach(d=>{if(typeof d=="string"){const u=d===""?r:Pt(r,d);u.classGroupId=a;return}if(typeof d=="function"){if(yr(d)){ht(d(o),r,a,o);return}r.validators.push({validator:d,classGroupId:a});return}Object.entries(d).forEach(([u,m])=>{ht(m,Pt(r,u),a,o)})})},Pt=(t,r)=>{let a=t;return r.split(mt).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},yr=t=>t.isThemeGetter,wr=(t,r)=>r?t.map(([a,o])=>{const d=o.map(u=>typeof u=="string"?r+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([m,c])=>[r+m,c])):u);return[a,d]}):t,Er=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,a=new Map,o=new Map;const d=(u,m)=>{a.set(u,m),r++,r>t&&(r=0,o=a,a=new Map)};return{get(u){let m=a.get(u);if(m!==void 0)return m;if((m=o.get(u))!==void 0)return d(u,m),m},set(u,m){a.has(u)?a.set(u,m):d(u,m)}}},zt="!",kr=t=>{const{separator:r,experimentalParseClassName:a}=t,o=r.length===1,d=r[0],u=r.length,m=c=>{const f=[];let h=0,v=0,S;for(let x=0;x<c.length;x++){let N=c[x];if(h===0){if(N===d&&(o||c.slice(x,x+u)===r)){f.push(c.slice(v,x)),v=x+u;continue}if(N==="/"){S=x;continue}}N==="["?h++:N==="]"&&h--}const I=f.length===0?c:c.substring(v),n=I.startsWith(zt),$=n?I.substring(1):I,g=S&&S>v?S-v:void 0;return{modifiers:f,hasImportantModifier:n,baseClassName:$,maybePostfixModifierPosition:g}};return a?c=>a({className:c,parseClassName:m}):m},jr=t=>{if(t.length<=1)return t;const r=[];let a=[];return t.forEach(o=>{o[0]==="["?(r.push(...a.sort(),o),a=[]):a.push(o)}),r.push(...a.sort()),r},Sr=t=>({cache:Er(t.cacheSize),parseClassName:kr(t),...br(t)}),Cr=/\s+/,Nr=(t,r)=>{const{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:d}=r,u=[],m=t.trim().split(Cr);let c="";for(let f=m.length-1;f>=0;f-=1){const h=m[f],{modifiers:v,hasImportantModifier:S,baseClassName:I,maybePostfixModifierPosition:n}=a(h);let $=!!n,g=o($?I.substring(0,n):I);if(!g){if(!$){c=h+(c.length>0?" "+c:c);continue}if(g=o(I),!g){c=h+(c.length>0?" "+c:c);continue}$=!1}const x=jr(v).join(":"),N=S?x+zt:x,E=N+g;if(u.includes(E))continue;u.push(E);const b=d(g,$);for(let z=0;z<b.length;++z){const W=b[z];u.push(N+W)}c=h+(c.length>0?" "+c:c)}return c};function Rr(){let t=0,r,a,o="";for(;t<arguments.length;)(r=arguments[t++])&&(a=Ot(r))&&(o&&(o+=" "),o+=a);return o}const Ot=t=>{if(typeof t=="string")return t;let r,a="";for(let o=0;o<t.length;o++)t[o]&&(r=Ot(t[o]))&&(a&&(a+=" "),a+=r);return a};function Tr(t,...r){let a,o,d,u=m;function m(f){const h=r.reduce((v,S)=>S(v),t());return a=Sr(h),o=a.cache.get,d=a.cache.set,u=c,c(f)}function c(f){const h=o(f);if(h)return h;const v=Nr(f,a);return d(f,v),v}return function(){return u(Rr.apply(null,arguments))}}const L=t=>{const r=a=>a[t]||[];return r.isThemeGetter=!0,r},It=/^\[(?:([a-z-]+):)?(.+)\]$/i,_r=/^\d+\/\d+$/,Ar=new Set(["px","full","screen"]),Pr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zr=/\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$/,Or=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ir=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Mr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ye=t=>Be(t)||Ar.has(t)||_r.test(t),Re=t=>$e(t,"length",Wr),Be=t=>!!t&&!Number.isNaN(Number(t)),gt=t=>$e(t,"number",Be),Xe=t=>!!t&&Number.isInteger(Number(t)),Dr=t=>t.endsWith("%")&&Be(t.slice(0,-1)),j=t=>It.test(t),Te=t=>Pr.test(t),Fr=new Set(["length","size","percentage"]),Lr=t=>$e(t,Fr,Mt),Br=t=>$e(t,"position",Mt),$r=new Set(["image","url"]),Yr=t=>$e(t,$r,Ur),Vr=t=>$e(t,"",Gr),Ze=()=>!0,$e=(t,r,a)=>{const o=It.exec(t);return o?o[1]?typeof r=="string"?o[1]===r:r.has(o[1]):a(o[2]):!1},Wr=t=>zr.test(t)&&!Or.test(t),Mt=()=>!1,Gr=t=>Ir.test(t),Ur=t=>Mr.test(t),Hr=Tr(()=>{const t=L("colors"),r=L("spacing"),a=L("blur"),o=L("brightness"),d=L("borderColor"),u=L("borderRadius"),m=L("borderSpacing"),c=L("borderWidth"),f=L("contrast"),h=L("grayscale"),v=L("hueRotate"),S=L("invert"),I=L("gap"),n=L("gradientColorStops"),$=L("gradientColorStopPositions"),g=L("inset"),x=L("margin"),N=L("opacity"),E=L("padding"),b=L("saturate"),z=L("scale"),W=L("sepia"),H=L("skew"),le=L("space"),we=L("translate"),ue=()=>["auto","contain","none"],Ee=()=>["auto","hidden","clip","visible","scroll"],he=()=>["auto",j,r],C=()=>[j,r],K=()=>["",ye,Re],G=()=>["auto",Be,j],oe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],X=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>["start","end","center","between","around","evenly","stretch"],k=()=>["","0",j],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[Be,j];return{cacheSize:500,separator:":",theme:{colors:[Ze],spacing:[ye,Re],blur:["none","",Te,j],brightness:q(),borderColor:[t],borderRadius:["none","","full",Te,j],borderSpacing:C(),borderWidth:K(),contrast:q(),grayscale:k(),hueRotate:q(),invert:k(),gap:C(),gradientColorStops:[t],gradientColorStopPositions:[Dr,Re],inset:he(),margin:he(),opacity:q(),padding:C(),saturate:q(),scale:q(),sepia:k(),skew:q(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",j]}],container:["container"],columns:[{columns:[Te]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"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:[...oe(),j]}],overflow:[{overflow:Ee()}],"overflow-x":[{"overflow-x":Ee()}],"overflow-y":[{"overflow-y":Ee()}],overscroll:[{overscroll:ue()}],"overscroll-x":[{"overscroll-x":ue()}],"overscroll-y":[{"overscroll-y":ue()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Xe,j]}],basis:[{basis:he()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",j]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",Xe,j]}],"grid-cols":[{"grid-cols":[Ze]}],"col-start-end":[{col:["auto",{span:["full",Xe,j]},j]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[Ze]}],"row-start-end":[{row:["auto",{span:[Xe,j]},j]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",j]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",j]}],gap:[{gap:[I]}],"gap-x":[{"gap-x":[I]}],"gap-y":[{"gap-y":[I]}],"justify-content":[{justify:["normal",...fe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...fe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...fe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[le]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[le]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",j,r]}],"min-w":[{"min-w":[j,r,"min","max","fit"]}],"max-w":[{"max-w":[j,r,"none","full","min","max","fit","prose",{screen:[Te]},Te]}],h:[{h:[j,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[j,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[j,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[j,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Te,Re]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gt]}],"font-family":[{font:[Ze]}],"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",j]}],"line-clamp":[{"line-clamp":["none",Be,gt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ye,j]}],"list-image":[{"list-image":["none",j]}],"list-style-type":[{list:["none","disc","decimal",j]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ye,Re]}],"underline-offset":[{"underline-offset":["auto",ye,j]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j]}],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",j]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...oe(),Br]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Lr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Yr]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[$]}],"gradient-via-pos":[{via:[$]}],"gradient-to-pos":[{to:[$]}],"gradient-from":[{from:[n]}],"gradient-via":[{via:[n]}],"gradient-to":[{to:[n]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...X(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:X()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",...X()]}],"outline-offset":[{"outline-offset":[ye,j]}],"outline-w":[{outline:[ye,Re]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[ye,Re]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Te,Vr]}],"shadow-color":[{shadow:[Ze]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Te,j]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[S]}],saturate:[{saturate:[b]}],sepia:[{sepia:[W]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[S]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[W]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[m]}],"border-spacing-x":[{"border-spacing-x":[m]}],"border-spacing-y":[{"border-spacing-y":[m]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",j]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",j]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",j]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[z]}],"scale-x":[{"scale-x":[z]}],"scale-y":[{"scale-y":[z]}],rotate:[{rotate:[Xe,j]}],"translate-x":[{"translate-x":[we]}],"translate-y":[{"translate-y":[we]}],"skew-x":[{"skew-x":[H]}],"skew-y":[{"skew-y":[H]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",j]}],accent:[{accent:["auto",t]}],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",j]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",j]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ye,Re,gt]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-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"]}}});function Ye(...t){return Hr(gr(t))}const Dt=()=>{const t=s.useContext(pt);if(!t)throw new Error("useEvaAgent must be used within an EvaFusionAgent provider");const{client:r,config:a}=t,[o,d]=s.useState([]),[u,m]=s.useState(""),[c,f]=s.useState(!1),[h,v]=s.useState(a.defaultVariant||"ANALYST"),[S,I]=s.useState({vertical:"SOFTWARE_DEV",focus:"DISCOVERY",data:a.initialData||null});s.useEffect(()=>{if(a.persist){const g=localStorage.getItem(`eva_agent_chat_${a.apiKey}`);if(g)try{d(JSON.parse(g))}catch(x){console.error("Failed to load chat history",x)}}},[a.apiKey,a.persist]),s.useEffect(()=>{a.persist&&o.length>0&&localStorage.setItem(`eva_agent_chat_${a.apiKey}`,JSON.stringify(o))},[o,a.apiKey,a.persist]);const n=s.useCallback(g=>{I(x=>({...x,...g}))},[]),$=s.useCallback(async g=>{const x=g||u;if(!x.trim()||!r||c)return;const N={role:"user",content:x,timestamp:new Date().toISOString()};d(E=>[...E,N]),g||m(""),f(!0);try{const E={prompt:x,vertical:S.vertical,focus:S.focus,data:S.data,ingestionMode:S.data?"DATA":"TEXT"};let b=h;const z=x.toLowerCase();z.includes("security")||z.includes("threat")||z.includes("risk")?b="SENTINEL":z.includes("blueprint")||z.includes("architecture")||z.includes("code")?b="ARCHITECT":(z.includes("roadmap")||z.includes("strategy")||z.includes("future"))&&(b="STRATEGIST");const W=await r.query(b,E);if(W.success){const H={role:"assistant",content:typeof W.data=="string"?W.data:W.data.summary||W.data.response||JSON.stringify(W.data),variant:b,timestamp:new Date().toISOString()};d(le=>[...le,H])}else Ct.error("Neural synthesis failed. Please check payload integrity.")}catch(E){Ct.error(`API Error: ${E.message||"Failed to reach EvaFusion"}`)}finally{f(!1)}},[u,r,c,h,S]);return{messages:o,input:u,setInput:m,isProcessing:c,activeVariant:h,setActiveVariant:v,handleSend:$,payloadConfig:S,updatePayloadConfig:n,isAuthorized:!!r}},Kr=({onClose:t,onMinimize:r})=>{const a=s.useContext(pt),[o,d]=s.useState(!1),[u,m]=s.useState(!1),c=s.useRef(null);if(!a)return null;const{messages:f,input:h,setInput:v,isProcessing:S,activeVariant:I,setActiveVariant:n,handleSend:$,payloadConfig:g,updatePayloadConfig:x,isAuthorized:N}=Dt(),E=()=>{var b;(b=c.current)==null||b.scrollIntoView({behavior:"smooth"})};return s.useEffect(()=>{E()},[f,S]),i.jsxs(i.Fragment,{children:[i.jsx(Oe.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-[9990]"}),i.jsxs(Oe.motion.div,{initial:{x:"100%",opacity:.5},animate:{x:0,opacity:1},exit:{x:"100%",opacity:.5},transition:{type:"spring",damping:25,stiffness:200},className:Ye("fixed top-0 right-0 h-full w-full sm:max-w-[480px] z-[9991] flex flex-col eva-holographic-glass overflow-hidden border-l border-white/10 shadow-2xl",S?"eva-glow-thinking":"eva-glow-listening"),children:[i.jsxs("div",{className:"p-6 flex items-center justify-between shrink-0 bg-[#0a0a20]/90 border-b border-white/5 backdrop-blur-xl",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl bg-amber-500/10 border border-amber-500/20 flex items-center justify-center",children:i.jsx(me.Sparkles,{className:"w-5 h-5 text-amber-500"})}),i.jsxs("div",{children:[i.jsxs("h3",{className:"text-sm font-black text-white uppercase tracking-widest italic eva-agent-gradient-text",children:["Eva Agent ",i.jsx("span",{className:"text-indigo-400 font-normal ml-1",children:"v1.5"})]}),i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("div",{className:Ye("w-1.5 h-1.5 rounded-full animate-pulse",N?"bg-emerald-500":"bg-rose-500")}),i.jsx("span",{className:"text-[9px] font-bold text-slate-400 uppercase tracking-widest",children:N?"Neural Link Active":"Unauthorized Access"})]})]})]}),i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("button",{onClick:()=>d(!o),className:Ye("p-2 rounded-lg transition-all",o?"bg-amber-500/20 text-amber-500":"text-slate-400 hover:text-white hover:bg-white/5"),children:i.jsx(me.Settings2,{size:16})}),i.jsx("button",{onClick:r,className:"p-2 rounded-lg text-slate-400 hover:text-white hover:bg-white/5 transition-all",children:i.jsx(me.Minimize2,{size:16})}),i.jsx("button",{onClick:t,className:"p-2 rounded-lg text-rose-400 hover:text-rose-300 hover:bg-rose-500/10 transition-all",children:i.jsx(me.X,{size:16})})]})]}),i.jsx("div",{className:"px-6 py-2 flex items-center gap-2 overflow-x-auto eva-agent-scrollbar bg-black/20 border-b border-white/5",children:["ANALYST","ARCHITECT","SENTINEL","STRATEGIST","NEXUS"].map(b=>i.jsx("button",{onClick:()=>n(b),className:Ye("px-3 py-1 rounded-full text-[8px] font-black uppercase tracking-widest transition-all whitespace-nowrap border",I===b?"bg-amber-500 text-black border-amber-500 shadow-[0_0_15px_rgba(212,175,55,0.3)]":"text-slate-400 border-white/5 hover:border-white/20 hover:text-white"),children:b},b))}),i.jsx("div",{className:"flex-1 overflow-y-auto eva-agent-scrollbar p-6 space-y-6 relative",children:N?f.length===0?i.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center p-8 space-y-8",children:[i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"absolute inset-0 bg-amber-500/5 rounded-full blur-3xl animate-pulse"}),i.jsx(me.Cpu,{size:64,className:"text-amber-500/20 relative z-10"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("h4",{className:"text-lg font-black text-white uppercase tracking-tighter italic",children:"Awaiting Directives"}),i.jsx("p",{className:"text-[9px] text-slate-500 uppercase tracking-[0.2em] font-bold",children:"Invoke Eva Intelligence to process your neural matrix."})]}),i.jsx("div",{className:"grid grid-cols-1 gap-2 w-full max-w-[280px]",children:["Analyze data for anomalies","Synthesize architecture blueprint","Forecast operational trajectory"].map((b,z)=>i.jsx("button",{onClick:()=>$(b),className:"p-3 rounded-xl bg-white/5 border border-white/5 text-[9px] font-black uppercase tracking-widest text-slate-400 hover:text-amber-500 hover:bg-amber-500/5 hover:border-amber-500/20 transition-all text-left",children:b},z))})]}):i.jsxs(i.Fragment,{children:[f.map((b,z)=>i.jsxs("div",{className:Ye("flex flex-col space-y-2",b.role==="user"?"items-end":"items-start"),children:[i.jsx("div",{className:Ye("max-w-[90%] px-5 py-4 rounded-3xl text-xs font-medium leading-relaxed",b.role==="user"?"bg-amber-500 text-black rounded-tr-none shadow-lg":"bg-slate-900/80 text-indigo-100/90 border border-white/5 rounded-tl-none backdrop-blur-xl"),children:b.content}),i.jsx("span",{className:"text-[7px] font-black text-slate-500 uppercase tracking-widest px-2",children:b.role==="user"?"Direct Input":`Eva ${b.variant||"Neural"}`})]},z)),S&&i.jsx("div",{className:"flex flex-col items-start space-y-2 animate-pulse",children:i.jsxs("div",{className:"bg-slate-900/80 px-5 py-4 rounded-3xl rounded-tl-none border border-white/5 flex gap-1.5 items-center",children:[i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-500 animate-bounce"}),i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-500 animate-bounce [animation-delay:0.2s]"}),i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-500 animate-bounce [animation-delay:0.4s]"}),i.jsx("span",{className:"text-[8px] font-black uppercase tracking-widest text-amber-500/60 ml-2 italic",children:"Neural Synthesis..."})]})}),i.jsx("div",{ref:c})]}):i.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center p-8 space-y-4",children:[i.jsx(me.AlertCircle,{size:48,className:"text-rose-500/40 mb-2"}),i.jsx("h4",{className:"text-sm font-black text-white uppercase tracking-widest",children:"Neural Link Restricted"}),i.jsx("p",{className:"text-[10px] text-slate-500 uppercase tracking-widest leading-relaxed max-w-[240px]",children:"Authentication failed. Please verify your API Key context to re-establish the neural link."})]})}),i.jsx(Oe.AnimatePresence,{children:o&&i.jsxs(Oe.motion.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},className:"absolute inset-0 bg-[#0a0a20] z-50 flex flex-col border-t border-white/10",children:[i.jsxs("div",{className:"p-6 border-b border-white/5 flex items-center justify-between",children:[i.jsxs("h4",{className:"text-xs font-black text-white uppercase tracking-widest flex items-center gap-2",children:[i.jsx(me.Database,{size:14,className:"text-amber-500"}),"Neural Configuration"]}),i.jsx("button",{onClick:()=>d(!1),className:"text-slate-400 hover:text-white",children:i.jsx(me.X,{size:16})})]}),i.jsxs("div",{className:"flex-1 p-6 space-y-6 overflow-y-auto eva-agent-scrollbar",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-[8px] font-black text-slate-500 uppercase tracking-widest ml-1",children:"Focus Mode"}),i.jsxs("select",{value:g.focus,onChange:b=>x({focus:b.target.value}),className:"w-full bg-black/40 border border-white/10 rounded-xl p-3 text-[10px] font-bold text-white outline-none focus:border-amber-500/40 transition-all appearance-none cursor-pointer",children:[i.jsx("option",{value:"DISCOVERY",children:"Discovery & Analysis"}),i.jsx("option",{value:"ANOMALIES",children:"Anomaly Detection"}),i.jsx("option",{value:"FORECAST",children:"Predictive Forecast"})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-[8px] font-black text-slate-500 uppercase tracking-widest ml-1",children:"Vertical Persona"}),i.jsx("input",{type:"text",value:g.vertical,onChange:b=>x({vertical:b.target.value}),placeholder:"e.g. SOFTWARE_DEV",className:"w-full bg-black/40 border border-white/10 rounded-xl p-3 text-[10px] font-bold text-white outline-none focus:border-amber-500/40 transition-all"})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-[8px] font-black text-slate-500 uppercase tracking-widest ml-1",children:"Neural Matrix (JSON Data)"}),i.jsx("textarea",{value:g.data?JSON.stringify(g.data,null,2):"",onChange:b=>{try{const z=JSON.parse(b.target.value);x({data:z})}catch{x({data:b.target.value})}},placeholder:'{"key": "value"}',className:"w-full bg-black/40 border border-white/10 rounded-xl p-4 text-[10px] font-mono text-indigo-200/60 outline-none h-48 resize-none focus:border-amber-500/40 transition-all"})]})]}),i.jsx("div",{className:"p-6",children:i.jsx("button",{onClick:()=>d(!1),className:"w-full h-12 rounded-xl bg-amber-500 hover:bg-amber-600 text-black text-[10px] font-black uppercase tracking-widest shadow-xl shadow-amber-500/20 transition-all active:scale-[0.98]",children:"Confirm Configuration"})})]})}),i.jsxs("div",{className:"p-6 pb-8 bg-[#0a0a20] border-t border-white/5 relative z-40",children:[i.jsxs("form",{onSubmit:b=>{b.preventDefault(),$()},className:"relative flex items-center gap-3 p-2 rounded-2xl bg-white/5 border border-white/10 group focus-within:border-amber-500/40 focus-within:shadow-[0_0_30px_rgba(212,175,55,0.1)] transition-all duration-500",children:[i.jsx("textarea",{value:h,onChange:b=>v(b.target.value),onKeyDown:b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),$())},placeholder:"Invoke neural command...",className:"flex-1 bg-transparent border-none text-white text-[11px] placeholder:text-slate-600 focus:ring-0 min-h-[44px] max-h-[120px] py-3 px-3 resize-none eva-agent-scrollbar outline-none font-medium",disabled:S||!N}),i.jsx("button",{type:"submit",disabled:!h.trim()||S||!N,className:"w-11 h-11 rounded-xl bg-amber-500 text-black flex items-center justify-center shrink-0 shadow-lg shadow-amber-500/20 disabled:opacity-30 disabled:grayscale transition-all hover:scale-105 active:scale-95",children:i.jsx(me.SendHorizontal,{size:18})})]}),i.jsxs("div",{className:"mt-4 flex items-center justify-center gap-4 opacity-30 select-none",children:[i.jsx("div",{className:"h-[1px] flex-1 bg-gradient-to-r from-transparent to-white/20"}),i.jsx("p",{className:"text-[7px] font-black text-white uppercase tracking-[0.4em]",children:"Neural Link v4.2.1"}),i.jsx("div",{className:"h-[1px] flex-1 bg-gradient-to-l from-transparent to-white/20"})]})]})]})]})},qr={PROD:"https://evafusion-live.esteviatech.com",DEV:"https://api-dev.protrack.esteviatech.com",QA:"https://api-qa.protrack.esteviatech.com",LOCAL:"http://localhost:5001"},Jr=t=>{const{apiKey:r,baseUrl:a,environment:o="PROD",persist:d=!0,theme:u="dark"}=t,[m,c]=s.useState(!1),[f,h]=s.useState(!1),v=s.useMemo(()=>{if(!r)return null;const S=a||qr[o];return new Lt.EvaFusionClient({apiKey:r,baseUrl:S,environment:o})},[r,a,o]);return i.jsx(pt.Provider,{value:{client:v,isOpen:m,setIsOpen:c,isMinimized:f,setIsMinimized:h,config:t},children:i.jsxs("div",{className:"eva-fusion-agent-root",children:[i.jsx(mr,{position:"top-center",richColors:!0}),i.jsx(Oe.AnimatePresence,{children:(!m||f)&&i.jsx(hr,{onClick:()=>{c(!0),h(!1)}})}),i.jsx(Oe.AnimatePresence,{children:m&&!f&&i.jsx(Kr,{onClose:()=>c(!1),onMinimize:()=>h(!0)})})]})})};ie.EvaFusionAgent=Jr,ie.useEvaAgent=Dt,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
|