@foris/avocado-not-front 5.1.4 → 5.2.1
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/avocado-not-front.es.js +1053 -819
- package/dist/avocado-not-front.umd.js +3 -3
- package/dist/components/chart/chart.constants.d.ts +2 -0
- package/dist/components/chart/chart.types.d.ts +23 -1
- package/dist/components/chart/charts/ComposedChart.d.ts +2 -0
- package/dist/components/chart/charts/DonutChart.d.ts +2 -0
- package/dist/components/chart/charts/index.d.ts +3 -1
- package/dist/components/chart/components/Tooltip.d.ts +8 -1
- package/dist/components/chart/components/YAxis.d.ts +3 -1
- package/dist/types/components.type.d.ts +13 -3
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(v,V){typeof exports=="object"&&typeof module<"u"?V(exports,require("axios"),require("zustand"),require("react"),require("@foris/avocado-suite"),require("@foris/ai-agent"),require("jsonpath"),require("recharts"),require("@uiw/react-codemirror"),require("@codemirror/lang-json"),require("@codemirror/lang-markdown"),require("@codemirror/lang-sql"),require("@codemirror/lang-yaml"),require("@foris/avocado-icons")):typeof define=="function"&&define.amd?define(["exports","axios","zustand","react","@foris/avocado-suite","@foris/ai-agent","jsonpath","recharts","@uiw/react-codemirror","@codemirror/lang-json","@codemirror/lang-markdown","@codemirror/lang-sql","@codemirror/lang-yaml","@foris/avocado-icons"],V):(v=typeof globalThis<"u"?globalThis:v||self,V(v["avocado-not-front"]={},v.axios,v.zustand,v.React,v.AvocadoSuite,v.AiAgent,v.jsonpath,v.Recharts,v.ReactCodeMirror,v.CodeMirrorLangJson,v.CodeMirrorLangMarkdown,v.CodeMirrorLangSql,v.CodeMirrorLangYaml,v.AvocadoIcons))})(this,(function(v,V,le,x,N,ht,G,A,ie,kt,de,_e,ue,Et){"use strict";const T=le.create(()=>({})),dt=(t,e,s,a)=>{const c=s==null?void 0:s.hash,i=a&&Object.keys(a).length>0?{...a}:{};T.setState(l=>{var n;return{...l,[t]:{...l[t],apiConfig:e,currentPageId:c,isLoading:!1,isModalOpen:!0,isDrawerOpen:!1,entries:i,overlay:null,pages:{...(n=l[t])==null?void 0:n.pages,[c]:{page:s}}}}})},Tt=(t,e,s)=>{const a=s&&Object.keys(s).length>0?{...t,...s}:t;return e.length===0?t:Object.fromEntries(Object.entries(a).filter(([c])=>!e.includes(c)))},he=(t,e,s,a,c)=>{sessionStorage.setItem("sessionId",s),T.setState(i=>{const l=i[t]??{},n=l.entries??{},d=Tt(n,a,c);return{...i,[t]:{...l,currentPageId:e.hash,entries:d,isLoading:!1,overlay:null,pages:{...l.pages,[e.hash]:{page:{...e}}}}}})},fe=(t,e,s,a)=>{T.setState(c=>{var o;const i=c[t]??{},l=i.entries??{},n=Tt(l,s,a),d=(o=e.components)==null?void 0:o.some(_=>_.component==="drawer");return{...c,[t]:{...i,entries:n,overlay:e,isLoading:!1,isModalOpen:!d,isDrawerOpen:!!d}}})},ft=t=>{T.setState(e=>({...e,[t]:{...e[t],overlay:null}}))},me=t=>{var s;return((s=T.getState()[t])==null?void 0:s.overlay)??null},B=(t,e)=>{const{content:s,sessionId:a,deprecatedStateKeys:c=[],sessionState:i}=e;s.type!=="page"&&s.type!=="overlay"||(s.type==="page"?he(t,s,a,c,i):fe(t,s,c,i))},I=(t,e)=>{T.setState(s=>{var a;return{...s,[t]:{...s[t],entries:{...(a=s[t])==null?void 0:a.entries,...e}}}})},ye=(t,e)=>{T.setState(s=>{const a=s[t];if(!a)return s;const c=a.entries??{};if(!(e in c))return s;const{[e]:i,...l}=c;return{...s,[t]:{...a,entries:l}}})},Q=(t,e)=>{T.setState(s=>({...s,[t]:{...s[t],isLoading:e}}))},mt=(t,e)=>{T.setState(s=>({...s,[t]:{...s[t],isModalOpen:e}}))},ot=(t,e)=>{T.setState(s=>({...s,[t]:{...s[t],isDrawerOpen:e}}))},At=(t,e)=>{T.setState(s=>{const a=s[t];return a?{...s,[t]:{...a,apiConfig:{...a.apiConfig,headers:e}}}:s})};let yt=!1,_t=[],vt=!1;const ge=t=>t._userFlow||null,St=t=>{_t.forEach(({resolve:e,reject:s})=>{t?s(t):e(void 0)}),_t=[]},xe=async t=>{var a,c;const e=t==null?void 0:t.config;if(((a=t==null?void 0:t.response)==null?void 0:a.status)===401&&!e._retry){const i=ge(e);if(i){const n=(c=T.getState()[i])==null?void 0:c.apiConfig;if(!n)return Promise.reject(t);if(n.onAuthenticationError||typeof n.headers=="function"){if(yt)return new Promise((o,_)=>{_t.push({resolve:o,reject:_})}).then(()=>V(e)).catch(o=>(console.error("[axiosInterceptors] Queued request failed:",o),Promise.reject(o)));e._retry=!0,yt=!0;try{let o;if(n.onAuthenticationError)o=await n.onAuthenticationError();else if(typeof n.headers=="function")o=n.headers();else throw new Error("No refresh handler available");return n.onAuthenticationError&&(typeof n.headers=="string"?At(i,JSON.stringify(o)):At(i,o)),e.headers||(e.headers={}),Object.assign(e.headers,o),St(null),V(e)}catch(o){return console.error("[axiosInterceptors] Token refresh failed:",o),console.error("[axiosInterceptors] Rejecting queued requests:",_t.length),St(o),Promise.reject(o)}finally{yt=!1}}else console.warn("[axiosInterceptors] No refresh handler available, rejecting request")}else console.warn("[axiosInterceptors] No userFlow found in URL:",e.url)}return Promise.reject(t)};(()=>{if(vt){console.debug("[axiosInterceptors] Interceptors already initialized, skipping");return}console.debug("[axiosInterceptors] Initializing interceptors..."),V.interceptors.response.use(void 0,xe),console.debug("[axiosInterceptors] Response error interceptor registered"),vt=!0,console.debug("[axiosInterceptors] Interceptors initialized successfully")})();function pe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gt={exports:{}},rt={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var St;function be(){if(St)return nt;St=1;var t=x,e=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,c=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(n,d,r){var _,u={},h=null,f=null;r!==void 0&&(h=""+r),d.key!==void 0&&(h=""+d.key),d.ref!==void 0&&(f=d.ref);for(_ in d)a.call(d,_)&&!i.hasOwnProperty(_)&&(u[_]=d[_]);if(n&&n.defaultProps)for(_ in d=n.defaultProps,d)u[_]===void 0&&(u[_]=d[_]);return{$$typeof:e,type:n,key:h,ref:f,props:u,_owner:c.current}}return nt.Fragment=s,nt.jsx=l,nt.jsxs=l,nt}var Rt;function pe(){return Rt||(Rt=1,yt.exports=be()),yt.exports}var o=pe();const Dt=t=>{if(!(t!=null&&t.content))return null;const e={...t,children:t.content,type:t.variant};return o.jsx(w.Heading,{...e})},Lt=t=>{if(!t)return null;const e={...t,children:t.content};return o.jsx(w.Text,{...e})},O=(t,e,s,a)=>{var l;const c={accordion:n=>o.jsx(Te,{...n,userFlow:t,pageId:e}),aiChatPanel:n=>o.jsx(Ae,{...n,userFlow:t,pageId:e,onResolveProps:a==null?void 0:a.aiChatPanel}),aiSummaryCard:n=>o.jsx(Re,{...n,userFlow:t,pageId:e,onResolveProps:a==null?void 0:a.aiSummaryCard}),aiPromptCodeEditor:n=>o.jsx(Oe,{...n,userFlow:t,pageId:e}),box:n=>o.jsx(Ie,{...n,userFlow:t,pageId:e}),breadcrumbs:n=>o.jsx(Ue,{...n,userFlow:t,pageId:e}),tooltip:n=>o.jsx(Fn,{...n,userFlow:t,pageId:e}),textarea:n=>o.jsx(qn,{...n,userFlow:t,pageId:e}),card:n=>o.jsx(Je,{...n,userFlow:t,pageId:e}),dropdownButton:n=>o.jsx(bn,{...n,userFlow:t,pageId:e}),menu:n=>o.jsx(jn,{...n,userFlow:t,pageId:e}),radioGroup:n=>o.jsx(Ke,{...n,userFlow:t,pageId:e}),stepper:n=>o.jsx(Ge,{...n,userFlow:t,pageId:e}),progressBar:n=>o.jsx(He,{...n,userFlow:t,pageId:e}),button:n=>o.jsx(Ve,{...n,userFlow:t,pageId:e}),cardAccordion:n=>o.jsx(ze,{...n,userFlow:t,pageId:e}),cardNotification:n=>o.jsx(We,{...n}),chart:n=>o.jsx(Wt,{...n,userFlow:t}),dataCard:n=>o.jsx(mn,{...n,userFlow:t,pageId:e}),checkbox:n=>o.jsx(hn,{...n,userFlow:t,pageId:e}),code:n=>o.jsx(fn,{...n,userFlow:t,pageId:e}),divider:n=>o.jsx(yn,{...n}),drawer:n=>o.jsx(xn,{...n,userFlow:t,pageId:e}),heading:n=>Dt(n),link:n=>o.jsx(Cn,{...n,userFlow:t,pageId:e}),pill:n=>o.jsx(Tn,{...n}),previewerMarkdown:n=>o.jsx(An,{...n}),modal:n=>o.jsx(Nn,{...n,userFlow:t,pageId:e}),roundButton:n=>o.jsx(vn,{...n,userFlow:t,pageId:e}),row:n=>o.jsx(Qt,{...n,userFlow:t,pageId:e}),select:n=>o.jsx(Mn,{...n,userFlow:t,pageId:e}),switch:n=>o.jsx(Kn,{...n,userFlow:t,pageId:e}),spacing:n=>o.jsx(Bn,{...n,userFlow:t,pageId:e}),table:n=>o.jsx(zn,{...n,userFlow:t,pageId:e}),tabs:n=>o.jsx(Wn,{...n,userFlow:t,pageId:e}),text:n=>Lt(n),textField:n=>o.jsx(Qn,{...n,userFlow:t,pageId:e}),toast:n=>o.jsx(Zn,{...n,userFlow:t,pageId:e})};return(l=s==null?void 0:s.filter(Boolean))==null?void 0:l.map(n=>{const d=c[n.component];return d?d({...n,userFlow:t,pageId:e}):null})};function Ce(t){return!!(t==null||typeof t=="string"&&t.trim()===""||Array.isArray(t)&&t.length===0)}function It(t,e){if(!(e!=null&&e.length))return!1;for(const s of e)if(s.when==="empty"){const a=t==null?void 0:t[s.key];if(Ce(a))return!0}return!1}function K(t,e){const s=E(a=>{var c;return(c=a[t])==null?void 0:c.entries});return x.useMemo(()=>({disabled:It(s,e)}),[e,s])}const q=t=>{if(!t)return{"content-type":"application/json"};if(typeof t=="function")return t();if(typeof t=="string")try{return JSON.parse(t)}catch{return{"content-type":"application/json",Authorization:t}}return t},st=()=>new AbortController,je=(t,e={},s={},a=!1,c)=>{const i=st();a&&i.abort();const l=q(e);return{call:V.get(t,{headers:{...l},params:s,signal:i.signal,_userFlow:c}),controller:i}},xt=(t,e={},s={},a={},c=!1,i)=>{const l=st();c&&l.abort();const n=q(e);return{call:V.post(t,s,{headers:{...n},params:a,signal:l.signal,_userFlow:i}),controller:l}},we=(t,e={},s={},a={},c=!1,i)=>{const l=st();c&&l.abort();const n=q(e);return{call:V.put(t,s,{headers:{...n},params:a,signal:l.signal,_userFlow:i}),controller:l}},Ne=(t,e={},s={},a={},c=!1,i)=>{const l=st();c&&l.abort();const n=q(e);return{call:V.patch(t,s,{headers:{...n},params:a,signal:l.signal,_userFlow:i}),controller:l}},ke=(t,e={},s={},a={},c=!1,i)=>{const l=st();c&&l.abort();const n=q(e);return{call:V.delete(t,{headers:{...n},data:s,params:a,signal:l.signal,_userFlow:i}),controller:l}},Mt=()=>{let t;return{callEndpoint:async a=>{a.controller&&(t=a.controller);let c={};try{c=await a.call}catch(i){throw i}return c},cancelEndpoint:()=>{t&&t.abort()}}},Bt=async(t,e,s="",a={},c={})=>{try{const{callEndpoint:i}=Mt(),{api:l,headers:n}=t,d=sessionStorage.getItem("sessionId"),r=new URLSearchParams({session_name:e});s&&r.append("hash_code",s),d&&r.append("sessionId",d);const _=`${l}/not-front/next-ui/?${r.toString()}`,u=q(n),h=xt(_,u,a,c,!1,e);return await i(h)}catch(i){return console.error(i),Promise.reject(i)}},Kt=t=>{const e=t==null?void 0:t.toLowerCase();switch(e){case"post":case"get":case"put":case"patch":case"delete":return e;default:return"get"}},Ee=(t,e,s)=>{const{url:a,paginationKeys:c,params:i}=t,l=[],n=(c==null?void 0:c.page)??"page";if(l.push(`${n}=${e}`),typeof s=="string"){const _=(c==null?void 0:c.text)??"text";l.push(`${_}=${encodeURIComponent(s||"")}`)}if(i&&typeof i=="object"){const _=Object.entries(i).map(([u,h])=>`${encodeURIComponent(u)}=${encodeURIComponent(h)}`);l.push(..._)}const d=l.join("&");return d?`${a}?${d}`:a},bt=(t,e,s,a)=>{const{type:c,url:i,method:l,headers:n}=t;if(c==="rest"){const d=Ee(t,e,s),_={...(t==null?void 0:t.data)??{},...a??{}};return{type:"rest",url:d,method:Kt(l),headers:n,data:_}}else return{type:"graphql",url:i,method:"post",headers:n,query:t==null?void 0:t.query,variables:{...(t==null?void 0:t.variables)||{},...typeof s=="string"?{text:s}:{},page:e}}},U=()=>{const t=E(n=>n),{callEndpoint:e}=Mt(),s=async(n,d,r,_,u=!0)=>{var h;try{const f=(h=t[n])==null?void 0:h.apiConfig,g={state:{...r},triggerKey:_};return u&&W(n,!0),await Bt(f,n,d,g)}catch(f){throw u&&W(n,!1),console.error("[getNextUI] Error fetching next UI:",f),f}},a=(n,d)=>{const{url:r,headers:_,data:u,params:h}=n;switch(Kt(n.method)){case"post":return xt(r,_,u,{},!1,d);case"put":return we(r,_,u,{},!1,d);case"patch":return Ne(r,_,u,{},!1,d);case"delete":return ke(r,_,u,h,!1,d);case"get":default:return je(r,_,h,!1,d)}},c=(n,d)=>{const{url:r,headers:_}=n,u={query:n==null?void 0:n.query,variables:(n==null?void 0:n.variables)||{}};return xt(r,{..._,"Content-Type":"application/json"},u,{},!1,d)},i=async(n,d,r=!0)=>{var _,u;if(!n){console.warn("[fetchDataSource] Invalid or missing dataSource");return}r&&W(d,!0);try{let h;switch(n==null?void 0:n.type){case"rest":h=a(n,d);break;case"graphql":h=c(n,d);break;default:throw new Error("[fetchDataSource] Unsupported data source type")}return await e(h)}catch(h){const f=h;return console.error("[fetchDataSource] Error:",f),{status:((_=f==null?void 0:f.response)==null?void 0:_.status)??0,data:((u=f==null?void 0:f.response)==null?void 0:u.data)??{message:f==null?void 0:f.message,code:f==null?void 0:f.code,config:f==null?void 0:f.config}}}finally{r&&W(d,!1)}};return{getNextUI:s,fetchDataSource:i,fetchAndGetNextUI:async(n,d,r,_,u)=>{try{W(n,!0);const h=await i(u,n,!1);return h&&await s(n,d,r,_)}catch(h){throw W(n,!1),console.error("[fetchAndGetNextUI] Error fetching and navigating:",h),h}}}},Gt={accordion:"_accordion_1ri2t_1",accordionBody:"_accordionBody_1ri2t_8"},Te=t=>{const{userFlow:e,pageId:s,responseKey:a,dependencies:c,customContent:i,actionContent:l,components:n,...d}=t,{getNextUI:r}=U(),[_,u]=x.useState(d.checkboxChecked||!1),{disabled:h}=K(e,c),f=O(e,s,n),g=l?O(e,s,l):void 0,p=i?O(e,s,i):void 0,y=x.useCallback(async C=>{var N;try{const j=C.target.checked;u(j);const k={...(N=E.getState()[e])==null?void 0:N.entries,[a]:j};if(D(e,k),d.actionType==="GO_TO_NEXT_UI"){const T=await r(e,s,k,a);T!=null&&T.data&&M(e,T==null?void 0:T.data)}}catch(j){console.error("Error in accordion checkbox action:",j),alert(JSON.stringify(j))}},[e,s,a,d.actionType,r]),m=d.disabled||h,b={...d,className:Gt.accordion,disabled:m,checkboxChecked:_,onChanceCheckbox:d.hasCheckbox?y:void 0,actionContent:g?o.jsx(o.Fragment,{children:g.map((C,N)=>o.jsx(x.Fragment,{children:C},`accordion-action-${N}`))}):void 0,customContent:p?o.jsx(o.Fragment,{children:p.map((C,N)=>o.jsx(x.Fragment,{children:C},`accordion-custom-${N}`))}):void 0,children:f?o.jsx("section",{className:Gt.accordionBody,children:f.map((C,N)=>o.jsx(x.Fragment,{children:C},`accordion-child-${N}`))}):void 0};return o.jsx(w.Accordion,{...b})},Ae=t=>{const e=w.ThemeStore.useThemeStore(l=>l.theme.mode),s=t.dataSource,a=x.useMemo(()=>({url:t.dataSource.url,method:t.dataSource.method,headers:t.dataSource.headers,params:s==null?void 0:s.data}),[t.dataSource.url,t.dataSource.method,t.dataSource.headers,s==null?void 0:s.data]),c=t.locale??"en",i=x.useMemo(()=>{var n,d,r,_,u;const l={title:(n=t==null?void 0:t.translations)==null?void 0:n.title,welcomeTitle:(d=t==null?void 0:t.translations)==null?void 0:d.welcomeTitle,welcomeDescription:(r=t==null?void 0:t.translations)==null?void 0:r.welcomeDescription,placeholder:(_=t==null?void 0:t.translations)==null?void 0:_.placeholder,disclaimer:(u=t==null?void 0:t.translations)==null?void 0:u.disclaimer};return Object.fromEntries(Object.entries(l).filter(([,h])=>!!h))},[t==null?void 0:t.translations]);return x.useEffect(()=>{t.onResolveProps&&t.onResolveProps({dataSource:a,locale:c,translations:i,initialSuggestions:t.initialSuggestions,theme:e})},[t.onResolveProps,a,c,i,t.initialSuggestions,e]),t.onResolveProps?null:o.jsx(ht.ChatPanel,{dataSource:a,locale:c,translations:i,initialSuggestions:t.initialSuggestions,theme:e})},ve={promptCodeEditor:"_promptCodeEditor_1d57s_1"},Oe=t=>{const{userFlow:e,responseKey:s,codeBlockValue:a,language:c,disabled:i,dependencies:l,dataSource:n,inputLabel:d,inputPlaceholder:r,codeBlockLabel:_}=t,u=w.ThemeStore.useThemeStore(C=>C.theme.mode),[h,f]=x.useState(a||""),{disabled:g}=K(e,l),p=i??g,y=c??"json",m={url:(n==null?void 0:n.url)||"",method:(n==null?void 0:n.method)||"post",headers:n==null?void 0:n.headers,body:n==null?void 0:n.data},b=C=>{f(C);const N={[s]:C};D(e,N)};return x.useEffect(()=>{a!==void 0&&a!==h&&f(a)},[a]),o.jsx("section",{className:ve.promptCodeEditor,children:o.jsx(ht.PromptCodeEditor,{themeMode:u,requestConfig:m,language:y,disabled:p,inputLabel:d,inputPlaceholder:r,codeBlockLabel:_,codeBlockValue:h,onCodeChange:b})})},Se={summaryCard:"_summaryCard_jva4h_1"},Re=t=>{const e=t.dataSource,s=x.useMemo(()=>({url:t.dataSource.url,method:t.dataSource.method,headers:t.dataSource.headers,body:e==null?void 0:e.data}),[t.dataSource.url,t.dataSource.method,t.dataSource.headers,e==null?void 0:e.data]),a=t.locale??"en",c=x.useMemo(()=>{var l,n,d;const i={title:(l=t==null?void 0:t.translations)==null?void 0:l.title,loading:(n=t==null?void 0:t.translations)==null?void 0:n.loading,noData:(d=t==null?void 0:t.translations)==null?void 0:d.noData};return Object.fromEntries(Object.entries(i).filter(([,r])=>!!r))},[t==null?void 0:t.translations]);return x.useEffect(()=>{t.onResolveProps&&t.onResolveProps({dataSource:s,locale:a,translations:c})},[t.onResolveProps,s,a,c]),t.onResolveProps?null:o.jsx("section",{className:Se.summaryCard,children:o.jsx(ht.SummaryCard,{dataSource:s,locale:a,translations:c})})},Ht={body:"_body_14tsv_1",body_content:"_body_content_14tsv_5"},De=({inputs:t})=>o.jsx("section",{className:Ht.body,children:o.jsx("div",{className:Ht.body_content,children:t.map((e,s)=>o.jsx(x.Fragment,{children:e},s))})}),Le={slotStack:"_slotStack_1b4wy_1"},Ie=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,content:l}=t,n=w.ThemeStore.useThemeStore(_=>_.theme.mode)==="dark",d=O(e,s,l!=null&&l.length?l:null),r=d&&d.length>0?o.jsx("div",{className:Le.slotStack,children:d.map((_,u)=>o.jsx(x.Fragment,{children:_},`box-${c}-${u}`))}):null;return o.jsx(w.Box,{darkMode:n,children:r})};var pt={exports:{}};/*!
|
|
9
|
+
*/var Ot;function be(){if(Ot)return rt;Ot=1;var t=x,e=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,c=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(n,d,o){var _,u={},h=null,f=null;o!==void 0&&(h=""+o),d.key!==void 0&&(h=""+d.key),d.ref!==void 0&&(f=d.ref);for(_ in d)a.call(d,_)&&!i.hasOwnProperty(_)&&(u[_]=d[_]);if(n&&n.defaultProps)for(_ in d=n.defaultProps,d)u[_]===void 0&&(u[_]=d[_]);return{$$typeof:e,type:n,key:h,ref:f,props:u,_owner:c.current}}return rt.Fragment=s,rt.jsx=l,rt.jsxs=l,rt}var Rt;function je(){return Rt||(Rt=1,gt.exports=be()),gt.exports}var r=je();const Dt=t=>{if(!(t!=null&&t.content))return null;const e={...t,children:t.content,type:t.variant};return r.jsx(N.Heading,{...e})},Lt=t=>{if(!t)return null;const e={...t,children:t.content};return r.jsx(N.Text,{...e})},S=(t,e,s,a)=>{var l;const c={accordion:n=>r.jsx(Ae,{...n,userFlow:t,pageId:e}),aiChatPanel:n=>r.jsx(ve,{...n,userFlow:t,pageId:e,onResolveProps:a==null?void 0:a.aiChatPanel}),aiSummaryCard:n=>r.jsx(De,{...n,userFlow:t,pageId:e,onResolveProps:a==null?void 0:a.aiSummaryCard}),aiPromptCodeEditor:n=>r.jsx(Oe,{...n,userFlow:t,pageId:e}),box:n=>r.jsx(Me,{...n,userFlow:t,pageId:e}),breadcrumbs:n=>r.jsx(ze,{...n,userFlow:t,pageId:e}),tooltip:n=>r.jsx(os,{...n,userFlow:t,pageId:e}),textarea:n=>r.jsx(es,{...n,userFlow:t,pageId:e}),card:n=>r.jsx(We,{...n,userFlow:t,pageId:e}),dropdownButton:n=>r.jsx(Tn,{...n,userFlow:t,pageId:e}),menu:n=>r.jsx(Sn,{...n,userFlow:t,pageId:e}),radioGroup:n=>r.jsx(Ge,{...n,userFlow:t,pageId:e}),stepper:n=>r.jsx(He,{...n,userFlow:t,pageId:e}),progressBar:n=>r.jsx(Ue,{...n,userFlow:t,pageId:e}),button:n=>r.jsx(Ve,{...n,userFlow:t,pageId:e}),cardAccordion:n=>r.jsx(Xe,{...n,userFlow:t,pageId:e}),cardNotification:n=>r.jsx(qe,{...n}),chart:n=>r.jsx(qt,{...n,userFlow:t}),dataCard:n=>r.jsx(wn,{...n,userFlow:t,pageId:e}),checkbox:n=>r.jsx(jn,{...n,userFlow:t,pageId:e}),code:n=>r.jsx(Cn,{...n,userFlow:t,pageId:e}),divider:n=>r.jsx(kn,{...n}),drawer:n=>r.jsx(En,{...n,userFlow:t,pageId:e}),heading:n=>Dt(n),link:n=>r.jsx(vn,{...n,userFlow:t,pageId:e}),pill:n=>r.jsx(In,{...n}),previewerMarkdown:n=>r.jsx(Mn,{...n}),modal:n=>r.jsx(Rn,{...n,userFlow:t,pageId:e}),roundButton:n=>r.jsx(Kn,{...n,userFlow:t,pageId:e}),row:n=>r.jsx(Zt,{...n,userFlow:t,pageId:e}),select:n=>r.jsx(Xn,{...n,userFlow:t,pageId:e}),switch:n=>r.jsx(Wn,{...n,userFlow:t,pageId:e}),spacing:n=>r.jsx(Jn,{...n,userFlow:t,pageId:e}),table:n=>r.jsx(Fn,{...n,userFlow:t,pageId:e}),tabs:n=>r.jsx(ts,{...n,userFlow:t,pageId:e}),text:n=>Lt(n),textField:n=>r.jsx(ss,{...n,userFlow:t,pageId:e}),toast:n=>r.jsx(as,{...n,userFlow:t,pageId:e})};return(l=s==null?void 0:s.filter(Boolean))==null?void 0:l.map(n=>{const d=c[n.component];return d?d({...n,userFlow:t,pageId:e}):null})};function Ce(t){return!!(t==null||typeof t=="string"&&t.trim()===""||Array.isArray(t)&&t.length===0)}function It(t,e){if(!(e!=null&&e.length))return!1;for(const s of e)if(s.when==="empty"){const a=t==null?void 0:t[s.key];if(Ce(a))return!0}return!1}function H(t,e){const s=T(a=>{var c;return(c=a[t])==null?void 0:c.entries});return x.useMemo(()=>({disabled:It(s,e)}),[e,s])}const Z=t=>{if(!t)return{"content-type":"application/json"};if(typeof t=="function")return t();if(typeof t=="string")try{return JSON.parse(t)}catch{return{"content-type":"application/json",Authorization:t}}return t},ct=()=>new AbortController,we=(t,e={},s={},a=!1,c)=>{const i=ct();a&&i.abort();const l=Z(e);return{call:V.get(t,{headers:{...l},params:s,signal:i.signal,_userFlow:c}),controller:i}},xt=(t,e={},s={},a={},c=!1,i)=>{const l=ct();c&&l.abort();const n=Z(e);return{call:V.post(t,s,{headers:{...n},params:a,signal:l.signal,_userFlow:i}),controller:l}},Ne=(t,e={},s={},a={},c=!1,i)=>{const l=ct();c&&l.abort();const n=Z(e);return{call:V.put(t,s,{headers:{...n},params:a,signal:l.signal,_userFlow:i}),controller:l}},ke=(t,e={},s={},a={},c=!1,i)=>{const l=ct();c&&l.abort();const n=Z(e);return{call:V.patch(t,s,{headers:{...n},params:a,signal:l.signal,_userFlow:i}),controller:l}},Ee=(t,e={},s={},a={},c=!1,i)=>{const l=ct();c&&l.abort();const n=Z(e);return{call:V.delete(t,{headers:{...n},data:s,params:a,signal:l.signal,_userFlow:i}),controller:l}},Mt=()=>{let t;return{callEndpoint:async a=>{a.controller&&(t=a.controller);let c={};try{c=await a.call}catch(i){throw i}return c},cancelEndpoint:()=>{t&&t.abort()}}},Kt=async(t,e,s="",a={},c={})=>{try{const{callEndpoint:i}=Mt(),{api:l,headers:n}=t,d=sessionStorage.getItem("sessionId"),o=new URLSearchParams({session_name:e});s&&o.append("hash_code",s),d&&o.append("sessionId",d);const _=`${l}/not-front/next-ui/?${o.toString()}`,u=Z(n),h=xt(_,u,a,c,!1,e);return await i(h)}catch(i){return console.error(i),Promise.reject(i)}},Bt=t=>{const e=t==null?void 0:t.toLowerCase();switch(e){case"post":case"get":case"put":case"patch":case"delete":return e;default:return"get"}},Te=(t,e,s)=>{const{url:a,paginationKeys:c,params:i}=t,l=[],n=(c==null?void 0:c.page)??"page";if(l.push(`${n}=${e}`),typeof s=="string"){const _=(c==null?void 0:c.text)??"text";l.push(`${_}=${encodeURIComponent(s||"")}`)}if(i&&typeof i=="object"){const _=Object.entries(i).map(([u,h])=>`${encodeURIComponent(u)}=${encodeURIComponent(h)}`);l.push(..._)}const d=l.join("&");return d?`${a}?${d}`:a},pt=(t,e,s,a)=>{const{type:c,url:i,method:l,headers:n}=t;if(c==="rest"){const d=Te(t,e,s),_={...(t==null?void 0:t.data)??{},...a??{}};return{type:"rest",url:d,method:Bt(l),headers:n,data:_}}else return{type:"graphql",url:i,method:"post",headers:n,query:t==null?void 0:t.query,variables:{...(t==null?void 0:t.variables)||{},...typeof s=="string"?{text:s}:{},page:e}}},z=()=>{const t=T(n=>n),{callEndpoint:e}=Mt(),s=async(n,d,o,_,u=!0)=>{var h;try{const f=(h=t[n])==null?void 0:h.apiConfig,y={state:{...o},triggerKey:_};return u&&Q(n,!0),await Kt(f,n,d,y)}catch(f){throw u&&Q(n,!1),console.error("[getNextUI] Error fetching next UI:",f),f}},a=(n,d)=>{const{url:o,headers:_,data:u,params:h}=n;switch(Bt(n.method)){case"post":return xt(o,_,u,{},!1,d);case"put":return Ne(o,_,u,{},!1,d);case"patch":return ke(o,_,u,{},!1,d);case"delete":return Ee(o,_,u,h,!1,d);case"get":default:return we(o,_,h,!1,d)}},c=(n,d)=>{const{url:o,headers:_}=n,u={query:n==null?void 0:n.query,variables:(n==null?void 0:n.variables)||{}};return xt(o,{..._,"Content-Type":"application/json"},u,{},!1,d)},i=async(n,d,o=!0)=>{var _,u;if(!n){console.warn("[fetchDataSource] Invalid or missing dataSource");return}o&&Q(d,!0);try{let h;switch(n==null?void 0:n.type){case"rest":h=a(n,d);break;case"graphql":h=c(n,d);break;default:throw new Error("[fetchDataSource] Unsupported data source type")}return await e(h)}catch(h){const f=h;return console.error("[fetchDataSource] Error:",f),{status:((_=f==null?void 0:f.response)==null?void 0:_.status)??0,data:((u=f==null?void 0:f.response)==null?void 0:u.data)??{message:f==null?void 0:f.message,code:f==null?void 0:f.code,config:f==null?void 0:f.config}}}finally{o&&Q(d,!1)}};return{getNextUI:s,fetchDataSource:i,fetchAndGetNextUI:async(n,d,o,_,u)=>{try{Q(n,!0);const h=await i(u,n,!1);return h&&await s(n,d,o,_)}catch(h){throw Q(n,!1),console.error("[fetchAndGetNextUI] Error fetching and navigating:",h),h}}}},Gt={accordion:"_accordion_1ri2t_1",accordionBody:"_accordionBody_1ri2t_8"},Ae=t=>{const{userFlow:e,pageId:s,responseKey:a,dependencies:c,customContent:i,actionContent:l,components:n,...d}=t,{getNextUI:o}=z(),[_,u]=x.useState(d.checkboxChecked||!1),{disabled:h}=H(e,c),f=S(e,s,n),y=l?S(e,s,l):void 0,p=i?S(e,s,i):void 0,g=x.useCallback(async j=>{var w;try{const C=j.target.checked;u(C);const k={...(w=T.getState()[e])==null?void 0:w.entries,[a]:C};if(I(e,k),d.actionType==="GO_TO_NEXT_UI"){const E=await o(e,s,k,a);E!=null&&E.data&&B(e,E==null?void 0:E.data)}}catch(C){console.error("Error in accordion checkbox action:",C),alert(JSON.stringify(C))}},[e,s,a,d.actionType,o]),m=d.disabled||h,b={...d,className:Gt.accordion,disabled:m,checkboxChecked:_,onChanceCheckbox:d.hasCheckbox?g:void 0,actionContent:y?r.jsx(r.Fragment,{children:y.map((j,w)=>r.jsx(x.Fragment,{children:j},`accordion-action-${w}`))}):void 0,customContent:p?r.jsx(r.Fragment,{children:p.map((j,w)=>r.jsx(x.Fragment,{children:j},`accordion-custom-${w}`))}):void 0,children:f?r.jsx("section",{className:Gt.accordionBody,children:f.map((j,w)=>r.jsx(x.Fragment,{children:j},`accordion-child-${w}`))}):void 0};return r.jsx(N.Accordion,{...b})},ve=t=>{const e=N.ThemeStore.useThemeStore(l=>l.theme.mode),s=t.dataSource,a=x.useMemo(()=>({url:t.dataSource.url,method:t.dataSource.method,headers:t.dataSource.headers,params:s==null?void 0:s.data}),[t.dataSource.url,t.dataSource.method,t.dataSource.headers,s==null?void 0:s.data]),c=t.locale??"en",i=x.useMemo(()=>{var n,d,o,_,u;const l={title:(n=t==null?void 0:t.translations)==null?void 0:n.title,welcomeTitle:(d=t==null?void 0:t.translations)==null?void 0:d.welcomeTitle,welcomeDescription:(o=t==null?void 0:t.translations)==null?void 0:o.welcomeDescription,placeholder:(_=t==null?void 0:t.translations)==null?void 0:_.placeholder,disclaimer:(u=t==null?void 0:t.translations)==null?void 0:u.disclaimer};return Object.fromEntries(Object.entries(l).filter(([,h])=>!!h))},[t==null?void 0:t.translations]);return x.useEffect(()=>{t.onResolveProps&&t.onResolveProps({dataSource:a,locale:c,translations:i,initialSuggestions:t.initialSuggestions,theme:e})},[t.onResolveProps,a,c,i,t.initialSuggestions,e]),t.onResolveProps?null:r.jsx(ht.ChatPanel,{dataSource:a,locale:c,translations:i,initialSuggestions:t.initialSuggestions,theme:e})},Se={promptCodeEditor:"_promptCodeEditor_1d57s_1"},Oe=t=>{const{userFlow:e,responseKey:s,codeBlockValue:a,language:c,disabled:i,dependencies:l,dataSource:n,inputLabel:d,inputPlaceholder:o,codeBlockLabel:_}=t,u=N.ThemeStore.useThemeStore(j=>j.theme.mode),[h,f]=x.useState(a||""),{disabled:y}=H(e,l),p=i??y,g=c??"json",m={url:(n==null?void 0:n.url)||"",method:(n==null?void 0:n.method)||"post",headers:n==null?void 0:n.headers,body:n==null?void 0:n.data},b=j=>{f(j);const w={[s]:j};I(e,w)};return x.useEffect(()=>{a!==void 0&&a!==h&&f(a)},[a]),r.jsx("section",{className:Se.promptCodeEditor,children:r.jsx(ht.PromptCodeEditor,{themeMode:u,requestConfig:m,language:g,disabled:p,inputLabel:d,inputPlaceholder:o,codeBlockLabel:_,codeBlockValue:h,onCodeChange:b})})},Re={summaryCard:"_summaryCard_jva4h_1"},De=t=>{const e=t.dataSource,s=x.useMemo(()=>({url:t.dataSource.url,method:t.dataSource.method,headers:t.dataSource.headers,body:e==null?void 0:e.data}),[t.dataSource.url,t.dataSource.method,t.dataSource.headers,e==null?void 0:e.data]),a=t.locale??"en",c=x.useMemo(()=>{var l,n,d;const i={title:(l=t==null?void 0:t.translations)==null?void 0:l.title,loading:(n=t==null?void 0:t.translations)==null?void 0:n.loading,noData:(d=t==null?void 0:t.translations)==null?void 0:d.noData};return Object.fromEntries(Object.entries(i).filter(([,o])=>!!o))},[t==null?void 0:t.translations]);return x.useEffect(()=>{t.onResolveProps&&t.onResolveProps({dataSource:s,locale:a,translations:c})},[t.onResolveProps,s,a,c]),t.onResolveProps?null:r.jsx("section",{className:Re.summaryCard,children:r.jsx(ht.SummaryCard,{dataSource:s,locale:a,translations:c})})},Ht={body:"_body_14tsv_1",body_content:"_body_content_14tsv_5"},Le=({inputs:t})=>r.jsx("section",{className:Ht.body,children:r.jsx("div",{className:Ht.body_content,children:t.map((e,s)=>r.jsx(x.Fragment,{children:e},s))})}),Ie={slotStack:"_slotStack_1b4wy_1"},Me=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,content:l}=t,n=N.ThemeStore.useThemeStore(_=>_.theme.mode)==="dark",d=S(e,s,l!=null&&l.length?l:null),o=d&&d.length>0?r.jsx("div",{className:Ie.slotStack,children:d.map((_,u)=>r.jsx(x.Fragment,{children:_},`box-${c}-${u}`))}):null;return r.jsx(N.Box,{darkMode:n,children:o})};var bt={exports:{}};/*!
|
|
10
10
|
Copyright (c) 2018 Jed Watson.
|
|
11
11
|
Licensed under the MIT License (MIT), see
|
|
12
12
|
http://jedwatson.github.io/classnames
|
|
13
|
-
*/var Ut;function Me(){return Ut||(Ut=1,(function(t){(function(){var e={}.hasOwnProperty;function s(){for(var a=[],c=0;c<arguments.length;c++){var i=arguments[c];if(i){var l=typeof i;if(l==="string"||l==="number")a.push(i);else if(Array.isArray(i)){if(i.length){var n=s.apply(null,i);n&&a.push(n)}}else if(l==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){a.push(i.toString());continue}for(var d in i)e.call(i,d)&&i[d]&&a.push(d)}}}return a.join(" ")}t.exports?(s.default=s,t.exports=s):window.classNames=s})()})(pt)),pt.exports}var Be=Me();const Y=xe(Be),Q={fieldset:"_fieldset_1xrth_1",fieldsetColumn:"_fieldsetColumn_1xrth_8",legend:"_legend_1xrth_14",options:"_options_1xrth_20",optionsRow:"_optionsRow_1xrth_25",optionsColumn:"_optionsColumn_1xrth_36"},Ke=t=>{const{userFlow:e,pageId:s,responseKey:a,label:c,value:i,required:l,actionType:n,dependencies:d,direction:r,items:_}=t,u=r==="column"?"column":"row",{getNextUI:h}=U(),{disabled:f}=K(e,d),g=E(C=>{var N,j;return(j=(N=C[e])==null?void 0:N.entries)==null?void 0:j[a]}),p=g!=null?String(g):i??"",y=f,m=x.useMemo(()=>c?l?`${c} *`:c:null,[c,l]),b=x.useCallback(async C=>{var N;if(!y)try{const j={...(N=E.getState()[e])==null?void 0:N.entries,[a]:C};if(D(e,j),n==="GO_TO_NEXT_UI"||n==="GO_TO_NEXT_UI_WITHOUT_LOADING"){const R=await h(e,s,j,a,n==="GO_TO_NEXT_UI");R!=null&&R.data&&M(e,R==null?void 0:R.data)}}catch(j){alert(JSON.stringify(j))}},[n,h,y,s,a,e]);return o.jsxs("fieldset",{className:Y(Q.fieldset,u==="column"&&Q.fieldsetColumn),children:[m?o.jsx("legend",{className:Q.legend,children:m}):null,o.jsx("div",{className:Y(Q.options,u==="column"?Q.optionsColumn:Q.optionsRow),children:_.map(C=>o.jsx(w.RadioButton,{name:a,value:C.value,checked:p===C.value,disabled:y||C.disabled,labelRight:C.label,onChange:()=>{b(C.value)}},C.value))})]})},Ge=({userFlow:t,pageId:e,component:s,hash:a,responseKey:c,items:i,itemActive:l,darkMode:n})=>o.jsx(w.Stepper,{items:i,itemActive:l,darkMode:n}),He=({userFlow:t,pageId:e,component:s,hash:a,responseKey:c,total:i,done:l,inProgress:n})=>o.jsx(w.ProgressBar,{total:i,done:l,inProgress:n}),Ue=({userFlow:t,items:e,responseKey:s})=>{const{getNextUI:a}=U(),c=x.useCallback(async({actionType:l,hashCode:n,redirectUrl:d})=>{var r;try{switch(l){case"GO_TO_NEXT_UI":const _=await a(t,n,{...(r=E.getState()[t])==null?void 0:r.entries},s);_!=null&&_.data&&M(t,_==null?void 0:_.data);break;case"REDIRECT":d?window.location.href=d:console.warn("Missing redirectUrl for REDIRECT actionType");break;default:console.warn(`Unhandled actionType: ${l}`);break}}catch(_){alert(JSON.stringify(_))}},[]),i=x.useMemo(()=>e==null?void 0:e.map(l=>({title:l==null?void 0:l.title,component:o.jsx("div",{onClick:()=>c(l)})})),[]);return o.jsx(w.Breadcrumbs,{items:i})};function ut(t,e){const{getNextUI:s,fetchDataSource:a,fetchAndGetNextUI:c}=U();return x.useCallback(async i=>{var h,f,g,p;const{responseKey:l,actionType:n,dataSource:d,redirectUrl:r,dependencies:_}=i,u=(h=E.getState()[t])==null?void 0:h.entries;if(!It(u,_))try{const y={...(f=E.getState()[t])==null?void 0:f.entries,[l]:{status:200}};switch(D(t,y),n){case"CLOSE_MODAL":mt(t,!1);break;case"CLOSE_DRAWER":et(t,!1);break;case"OPEN_DRAWER":et(t,!0);break;case"GO_TO_NEXT_UI":{const m=await s(t,e,y,l);m!=null&&m.data&&M(t,m==null?void 0:m.data);break}case"FETCH_AND_GO_TO_NEXT_UI":{const m=await c(t,e,y,l,d);m!=null&&m.data&&M(t,m==null?void 0:m.data);break}case"FETCH_DATA_SOURCE":{const m=await a(d,t,!1);D(t,{[l]:{status:m==null?void 0:m.status,content:m==null?void 0:m.data}});break}case"GET_DATA_SOURCE":{const m=await s(t,e,y,l),b=(g=m==null?void 0:m.data)==null?void 0:g.content;if((b==null?void 0:b.type)!=="fetch")break;const C=b==null?void 0:b.dataSource,N=await a(C,t,!1),j={...(p=E.getState()[t])==null?void 0:p.entries,[l]:{status:N==null?void 0:N.status,content:N==null?void 0:N.data}};D(t,j);const k=await s(t,e,j,l);k!=null&&k.data&&M(t,k==null?void 0:k.data);break}case"REDIRECT":r?window.location.href=r:console.warn("Missing redirectUrl for REDIRECT actionType");break;default:console.warn(`Unhandled actionType: ${n}`)}}catch(y){alert(JSON.stringify(y))}},[c,a,s,e,t])}const Ve=t=>{const{userFlow:e,pageId:s,responseKey:a,actionType:c,label:i,content:l,dataSource:n,redirectUrl:d,dependencies:r,onClick:_,...u}=t,h=ut(e,s),{disabled:f}=K(e,r),g={...u,children:l??i},p=(g==null?void 0:g.disabled)??f,[y,m]=x.useState(!1),b=x.useRef(!1),C=x.useCallback(async()=>{if(b.current)return;const N=c==="FETCH_DATA_SOURCE";N&&(b.current=!0,m(!0));try{await h({responseKey:a,actionType:c,dataSource:n,redirectUrl:d,dependencies:r})}catch(j){console.error("[ButtonNotFront] Action failed:",j)}finally{N&&(b.current=!1,m(!1))}},[c,n,r,d,a,h]);return o.jsx(w.Button,{...g,loading:g.loading||y,disabled:p,onClick:()=>!p&&!y&&(_??C)()})},Vt={slotStack:"_slotStack_12u4t_5"},ze=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,dependencies:l,content:n,actionContent:d,...r}=t,{disabled:_}=K(e,l),u=O(e,s,n&&n.length>0?n:null),h=O(e,s,d&&d.length>0?d:null),f=u&&u.length>0?o.jsx("div",{className:Vt.slotStack,children:u.map((y,m)=>o.jsx(x.Fragment,{children:y},`card-accordion-body-${c}-${m}`))}):void 0,g=h&&h.length>0?o.jsx("div",{className:Vt.slotStack,children:h.map((y,m)=>o.jsx(x.Fragment,{children:y},`card-accordion-actions-${c}-${m}`))}):void 0,p=r.disabled||_;return o.jsx(w.CardAccordion,{...r,disabled:p,actionContent:g,children:f??null})},Xe={slotStack:"_slotStack_ivk5b_1"},Je=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,content:l,colorId:n,disabled:d,actionType:r,dataSource:_,redirectUrl:u,dependencies:h}=t,{getNextUI:f,fetchDataSource:g,fetchAndGetNextUI:p}=U(),{disabled:y}=K(e,h),m=d??y,b=O(e,s,l&&l.length>0?l:null),C=b&&b.length>0?o.jsx("div",{className:Xe.slotStack,children:b.map((j,k)=>o.jsx(x.Fragment,{children:j},`card-body-${c}-${k}`))}):null,N=x.useCallback(async()=>{var j,k,T;if(!(!r||m))try{const R={...(j=E.getState()[e])==null?void 0:j.entries,[i]:{status:200}};switch(D(e,R),r){case"CLOSE_MODAL":mt(e,!1);break;case"CLOSE_DRAWER":et(e,!1);break;case"OPEN_DRAWER":et(e,!0);break;case"GO_TO_NEXT_UI":case"GO_TO_NEXT_UI_WITHOUT_LOADING":{const I=await f(e,s,R,i,r==="GO_TO_NEXT_UI");I!=null&&I.data&&M(e,I==null?void 0:I.data);break}case"FETCH_AND_GO_TO_NEXT_UI":{const L=await p(e,s,R,i,_);L!=null&&L.data&&M(e,L==null?void 0:L.data);break}case"GET_DATA_SOURCE":{const L=await f(e,s,R,i),I=(k=L==null?void 0:L.data)==null?void 0:k.content;if((I==null?void 0:I.type)!=="fetch")break;const $=I==null?void 0:I.dataSource,X=await g($,e,!1),S={...(T=E.getState()[e])==null?void 0:T.entries,[i]:{status:X==null?void 0:X.status,content:X==null?void 0:X.data}};D(e,S);const H=await f(e,s,S,i);H!=null&&H.data&&M(e,H==null?void 0:H.data);break}case"REDIRECT":u&&(window.location.href=u);break;default:console.warn(`Unhandled card actionType: ${r}`)}}catch(R){alert(JSON.stringify(R))}},[r,_,m,p,g,f,s,u,i,e]);return o.jsx(w.Card,{colorId:n,disabled:m,onClick:r&&!m?()=>void N():void 0,children:C})},We=t=>{const{content:e,description:s,...a}=t,c={...a,children:e??s};return o.jsx(w.CardNotification,{...c})},Ct=t=>Array.isArray(t)?t:typeof t=="object"?JSON.stringify(t):t,qe=(t,e)=>{if(!e||t==null)return null;const{extractionJsonPath:s,injectionJsonPath:a}=e,c=B.value(t,s);if(c==null)return null;try{const i={};return B.value(i,a,c),i}catch(i){return console.warn("[buildCursorPayload] invalid injectionJsonPath:",a,i),null}},zt=(t,e,s,a)=>{const c=B.query(t,e),i=c==null?void 0:c.map(_=>{var u,h;if(s){const f={};for(const[g,p]of Object.entries(s))if(typeof p=="object"&&"path"in p){const y=p,m=(u=B.query(_,y.path))==null?void 0:u[0];y.translations&&String(m)in y.translations?f[g]=Ct(y.translations[String(m)]):f[g]=Ct(m)}else{const y=p;f[g]=Ct((h=B.query(_,y))==null?void 0:h[0])}return f}else return _}),l=B.value(t,(a==null?void 0:a.size)??"$.meta.size")??c.length,n=B.value(t,(a==null?void 0:a.total)??"$.meta.total")??0,d=a!=null&&a.hasMore?!!B.value(t,a.hasMore):void 0,r={size:l,total:n,totalPages:a!=null&&a.totalPages?B.value(t,(a==null?void 0:a.totalPages)??"$.meta.totalPages"):l>0?Math.ceil(n/l):0,...d!==void 0?{hasMore:d}:{}};return{items:i,pagination:r}},at=({width:t,height:e,layout:s,data:a,Chart:c,children:i})=>{const l=e??ct,n=s?{layout:s}:{};return t?o.jsx(c,{width:t,height:l,data:a,...n,children:i}):o.jsx(v.ResponsiveContainer,{width:"100%",height:l,children:o.jsx(c,{data:a,...n,children:i})})},Z=({withPadding:t=!1})=>{const e=s=>o.jsx("span",{style:{color:z.labelColor},children:s});return o.jsx(v.Legend,{formatter:e,wrapperStyle:{fontSize:z.fontSize,fontFamily:z.fontFamily,padding:t?"1rem 0":"0"}})},Ye=({active:t,payload:e,label:s,tooltipKey:a,tooltipCoverage:c})=>{var _,u;if(!t||!e||!e.length)return null;const i={backgroundColor:z.tooltipBg,borderRadius:z.tooltipBorderRadius,color:z.tooltipColor,padding:"8px 12px",border:"1px solid #e5e7eb"};if(a){const h=(_=e[0])==null?void 0:_.payload;if(h&&h[a]!==void 0&&h[a]!==null)return o.jsx("div",{style:i,children:o.jsx("p",{style:{margin:0},children:h[a]})})}const l=(u=e[0])==null?void 0:u.payload,n=(c==null?void 0:c.label)??"Cobertura",d=c?l==null?void 0:l[c.denominatorKey]:void 0,r=c&&d!==void 0&&d!==null&&d>0;return o.jsxs("div",{style:i,children:[o.jsx("p",{style:{margin:"0 0 4px 0",fontWeight:"bold"},children:s}),e.map((h,f)=>o.jsx("p",{style:{margin:"2px 0",color:h.color},children:`${h.name}: ${h.value}`},f)),r&&o.jsx("p",{style:{margin:"2px 0"},children:`${n}: ${Math.round(l[c.numeratorKey]/d*100)}%`})]})},F=({tooltipKey:t,tooltipCoverage:e}={})=>o.jsx(v.Tooltip,{content:o.jsx(Ye,{tooltipKey:t,tooltipCoverage:e})}),rt=({dataKey:t,hide:e=!1,type:s})=>o.jsx(v.XAxis,{...t?{dataKey:t}:{},...s?{type:s}:{},hide:e,tick:{fill:z.labelColor,fontSize:z.fontSize}}),ot=({type:t,dataKey:e,width:s}={})=>o.jsx(v.YAxis,{...t?{type:t}:{},...e?{dataKey:e}:{},...s!==void 0?{width:s}:{},tick:{fill:z.labelColor,fontSize:z.fontSize},tickMargin:4}),Qe=t=>{const{data:e,xKey:s,yKeys:a,tooltipKey:c,width:i}=t;return o.jsxs(at,{width:i,data:e,Chart:v.AreaChart,children:[o.jsx(v.CartesianGrid,{strokeDasharray:"3 3"}),o.jsx(rt,{dataKey:s}),o.jsx(ot,{}),o.jsx(F,{tooltipKey:c}),o.jsx(Z,{}),a.map((l,n)=>o.jsx(v.Area,{type:"monotone",dataKey:l,stroke:G[n%G.length],fill:G[n%G.length]},l))]})},Ze=t=>{const{data:e,yKeys:s,xKey:a,tooltipKey:c,width:i}=t;return o.jsxs(at,{width:i,data:e,Chart:v.BarChart,children:[o.jsx(v.CartesianGrid,{strokeDasharray:"3 3"}),o.jsx(rt,{dataKey:a}),o.jsx(ot,{}),o.jsx(F,{tooltipKey:c}),o.jsx(Z,{}),s.map((l,n)=>o.jsx(v.Bar,{dataKey:l,fill:G[n%G.length]},l))]})};function Fe(t,e,s=Xt){return t<=0?0:e<=0?t:Math.max(t,e*s)}function Pe(t,e=rn,s){return s!==void 0?s:t<=0?ct:Math.max(ct,t*e)}function $e(t,e,s){if(s!==void 0)return s;const a=t.reduce((c,i)=>{const l=String(i[e]??"");return Math.max(c,l.length)},0);return Math.max(on,a*cn)}const tn=t=>{const{data:e,yKeys:s,xKey:a,tooltipKey:c,minCategoryHeight:i,chartHeight:l,tooltipCoverage:n,showLegend:d=!0,yKeyLabels:r,yAxisWidth:_}=t,u=Pe(e.length,i,l),h=$e(e,a,_);return o.jsxs(at,{height:u,layout:"vertical",data:e,Chart:v.BarChart,children:[o.jsx(v.CartesianGrid,{strokeDasharray:"3 3",horizontal:!1}),o.jsx(rt,{type:"number"}),o.jsx(ot,{type:"category",dataKey:a,width:h}),o.jsx(F,{tooltipKey:c,tooltipCoverage:n}),d&&o.jsx(Z,{}),s.map((f,g)=>o.jsx(v.Bar,{dataKey:f,name:(r==null?void 0:r[f])??f,fill:G[g%G.length]},f))]})},en=t=>{const{data:e,xKey:s,yKeys:a,tooltipKey:c,width:i}=t;return o.jsxs(at,{width:i,data:e,Chart:v.LineChart,children:[o.jsx(v.CartesianGrid,{strokeDasharray:"3 3"}),o.jsx(rt,{dataKey:s}),o.jsx(ot,{}),o.jsx(F,{tooltipKey:c}),o.jsx(Z,{}),a.map((l,n)=>o.jsx(v.Line,{type:"monotone",dataKey:l,stroke:G[n%G.length],strokeWidth:2,dot:!1},l))]})};var nn={NODE_ENV:"production"};const sn=t=>{const{data:e,xKey:s,series:a=[],tooltipKey:c,width:i}=t;return!a.length&&nn.NODE_ENV,o.jsxs(at,{width:i,data:e,Chart:v.BarChart,children:[o.jsx(v.CartesianGrid,{strokeDasharray:"3 3"}),o.jsx(rt,{dataKey:s}),o.jsx(ot,{}),o.jsx(F,{tooltipKey:c}),o.jsx(Z,{}),a.map((l,n)=>o.jsx(v.Bar,{dataKey:l.key,name:l.label??l.key,stackId:l.stackId,fill:l.color??G[n%G.length]},l.key))]})},an=t=>{const{data:e,xKey:s,yKeys:a,tooltipKey:c}=t,i=({cx:l,cy:n,midAngle:d,innerRadius:r,outerRadius:_,value:u})=>{const h=Math.PI/180,f=25+r+(_-r),g=l+f*Math.cos(-(d??0)*h),p=n+f*Math.sin(-(d??0)*h);return o.jsx("text",{x:g,y:p,fill:z.labelColor,color:z.labelColor,textAnchor:"middle",dominantBaseline:"central",children:u})};return o.jsx(v.ResponsiveContainer,{width:"100%",height:ct,children:o.jsxs(v.PieChart,{children:[o.jsx(F,{tooltipKey:c}),o.jsx(Z,{}),o.jsx(v.Pie,{data:e,dataKey:a[0],nameKey:s,label:i,outerRadius:120,children:e.map((l,n)=>o.jsx(v.Cell,{fill:G[n%G.length]},`cell-${n}`))})]})})},ct=400,Xt=56,rn=28,on=100,cn=8,ln=new Set(["bar","line","area","mixBar"]),dn={area:Qe,bar:Ze,horizontalBar:tn,line:en,mixBar:sn,pie:an},G=["var(--color-primitive-palette-1-50)","var(--color-primitive-palette-2-50)","var(--color-primitive-palette-3-50)","var(--color-primitive-palette-4-50)","var(--color-primitive-palette-5-50)","var(--color-primitive-palette-6-50)","var(--color-primitive-palette-7-50)","var(--color-primitive-palette-8-50)","var(--color-primitive-palette-9-50)","var(--color-primitive-palette-10-50)","var(--color-primitive-palette-11-50)","var(--color-primitive-palette-12-50)","var(--color-primitive-palette-13-50)","var(--color-primitive-palette-14-50)","var(--color-primitive-palette-15-50)","var(--color-primitive-palette-16-50)","var(--color-primitive-palette-17-50)"],z={fontFamily:"Roboto, sans-serif",fontSize:12,labelColor:"var(--color-neutral-90)",tooltipBg:"#fff",tooltipColor:"#000",tooltipBorderRadius:"4px"},Jt={chartScrollViewport:"_chartScrollViewport_sm5hx_1",chartScrollViewport_track:"_chartScrollViewport_track_sm5hx_29"},_n="Scrollable chart area",un=({dataLength:t,minCategoryWidth:e,children:s})=>{const a=x.useRef(null),[c,i]=x.useState(0),l=e??Xt;x.useEffect(()=>{const _=a.current;if(!_)return;const u=()=>{i(_.clientWidth)};u();const h=new ResizeObserver(u);return h.observe(_),()=>h.disconnect()},[]);const n=Fe(c,t,l),d=c>0&&n>c,r=x.useCallback(_=>{const u=a.current;if(u)switch(_.key){case"ArrowLeft":u.scrollLeft-=l,_.preventDefault();break;case"ArrowRight":u.scrollLeft+=l,_.preventDefault();break;case"Home":u.scrollLeft=0,_.preventDefault();break;case"End":u.scrollLeft=u.scrollWidth-u.clientWidth,_.preventDefault();break}},[l]);return o.jsx("div",{ref:a,className:Jt.chartScrollViewport,role:d?"region":void 0,tabIndex:d?0:void 0,"aria-label":d?_n:void 0,onKeyDown:d?r:void 0,children:o.jsx("div",{className:Jt.chartScrollViewport_track,style:{width:n,height:ct},children:c>0?s(n):null})})},Wt=t=>{const{component:e,userFlow:s,hash:a,responseKey:c,dataSource:i,...l}=t,n=dn[l.type],{fetchDataSource:d}=U(),[r,_]=x.useState(!1),[u,h]=x.useState([]),f=async()=>{var y,m;try{_(!0);const{jsonPathData:b,mapperData:C}=i,N=bt(i,1),j=await d(N,s,!1),k=b?(y=zt(j==null?void 0:j.data,b,C))==null?void 0:y.items:(m=j==null?void 0:j.data)==null?void 0:m.data;h(k),_(!1)}catch(b){alert(JSON.stringify(b)),_(!1)}};if(x.useEffect(()=>{n&&(i?f():h(l.data))},[]),!n)return o.jsx("div",{children:"Not supported chart type"});const g={...l,data:u};return r?o.jsx(w.SkeletonBase,{height:400}):u.length===0?o.jsx(w.CardNotification,{state:"info",title:"Sin registros",children:"No hay datos disponibles para mostrar en este momento"}):ln.has(l.type)?o.jsx(un,{dataLength:u.length,minCategoryWidth:l.minCategoryWidth,children:y=>o.jsx(n,{...g,width:y})}):o.jsx(n,{...g})},hn=t=>{const{userFlow:e,pageId:s,responseKey:a,actionType:c,label:i,value:l,required:n,dependencies:d,...r}=t,_={...r},{getNextUI:u}=U(),[h,f]=x.useState(l||!1),{disabled:g}=K(e,d),p=x.useMemo(()=>n&&i?`${i} *`:i??"",[i,n]),y=x.useCallback(async()=>{var b;try{const C=!h;f(C);const N={...(b=E.getState()[e])==null?void 0:b.entries,[a]:C};switch(D(e,N),c){case"GO_TO_NEXT_UI":case"GO_TO_NEXT_UI_WITHOUT_LOADING":{const k=await u(e,s,N,a,c==="GO_TO_NEXT_UI");k!=null&&k.data&&M(e,k==null?void 0:k.data);break}default:break}}catch(C){console.error("Error in checkbox action:",C),alert(JSON.stringify(C))}},[e,s,a,c,h]),m=(_==null?void 0:_.disabled)??g;return o.jsx(w.Checkbox,{..._,labelRight:p,checked:h,disabled:m,onChange:()=>{!m&&y()}})},P={codeEditor:"_codeEditor_1wi2p_1",codeEditor_label:"_codeEditor_label_1wi2p_4",codeEditor_wrapper:"_codeEditor_wrapper_1wi2p_13",input:"_input_1wi2p_17",preview:"_preview_1wi2p_18",preview_inner:"_preview_inner_1wi2p_33"},fn=t=>{const{userFlow:e,responseKey:s,label:a,language:c,placeholder:i,value:l,required:n,dependencies:d,disabled:r,showPreview:_,height:u="400px"}=t,[h,f]=x.useState(l??""),g=w.ThemeStore.useThemeStore(N=>N.theme.mode),{disabled:p}=K(e,d),y=r??p,m={json:kt.json(),markdown:ie.markdown(),sql:de.sql(),yaml:_e.yaml()},b=x.useMemo(()=>n&&a?`${a} *`:a??"",[a,n]),C=N=>{f(N);const j={[s]:N};D(e,j)};return o.jsxs("div",{className:P.codeEditor,children:[b&&b!==""&&o.jsx("label",{className:P.codeEditor_label,children:b}),o.jsxs("div",{className:P.codeEditor_wrapper,children:[o.jsx(le,{className:P.input,value:h,height:u,placeholder:i,extensions:[m[c]??kt.json()],onChange:N=>C(N),theme:g,editable:!y}),c==="markdown"&&_&&o.jsx("div",{className:P.preview,style:{height:u},children:o.jsx(w.PreviewerMarkdown,{className:P.preview_inner,children:h})})]})]})},qt={slotStack:"_slotStack_6n2wy_5"},mn=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,content:l,topContent:n,icon:d,headerStatusColor:r,..._}=t,u=r?`palette_${r}_50`:void 0,h=O(e,s,l&&l.length>0?l:null),f=O(e,s,n&&n.length>0?n:null),g=h&&h.length>0?o.jsx("div",{className:qt.slotStack,children:h.map((y,m)=>o.jsx(x.Fragment,{children:y},`data-card-body-${c}-${m}`))}):void 0,p=f&&f.length>0?o.jsx("div",{className:qt.slotStack,children:f.map((y,m)=>o.jsx(x.Fragment,{children:y},`data-card-top-${c}-${m}`))}):void 0;return o.jsx(w.DataCard,{..._,icon:d,headerStatusColor:u,topContent:p,children:g})},gn={dividerNotFront:"_dividerNotFront_tze3j_1"},yn=t=>o.jsx(w.Divider,{...t,className:gn.dividerNotFront}),jt={drawer:"_drawer_13pxo_1",drawerBody:"_drawerBody_13pxo_5",drawerFooter:"_drawerFooter_13pxo_11"},xn=({userFlow:t,pageId:e,responseKey:s,header:a,body:c,footer:i,...l})=>{const n=E(y=>{var m;return(m=y[t])==null?void 0:m.isDrawerOpen}),d=E(y=>{var m;return(m=y[t])==null?void 0:m.isLoading}),r=n&&!d,_={...l,isOpen:r,children:null},u=x.useCallback(()=>{ft(t),et(t,!1)},[t]),h=Array.isArray(a)?O(t,e,a):a?o.jsx(w.Heading,{type:"h2",children:a}):void 0,f=O(t,e,c),g=i?O(t,e,i):void 0;return o.jsx(w.Drawer,{..._,className:jt.drawer,isOpen:r,onClose:u,heightGap:50,title:h?o.jsx(o.Fragment,{children:Array.isArray(h)?h.map((y,m)=>o.jsx(x.Fragment,{children:y},`drawer-header-${m}`)):h}):void 0,children:o.jsx("section",{className:jt.drawerBody,children:f.map((y,m)=>o.jsx(x.Fragment,{children:y},`drawer-body-${m}`))}),footer:g?o.jsx("div",{className:jt.drawerFooter,children:g.map((y,m)=>o.jsx(x.Fragment,{children:y},`drawer-footer-${m}`))}):void 0})},bn=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,content:l,items:n,disabled:d,variant:r,leftIcon:_,rightIcon:u}=t,h=ut(e,s),f=x.useMemo(()=>n.map(g=>({label:g.content??g.label??"",onClick:()=>{h({responseKey:g.responseKey,actionType:g.actionType,dataSource:g.dataSource,redirectUrl:g.redirectUrl,dependencies:g.dependencies})}})),[n,h]);return o.jsx(w.DropdownButton,{disabled:d,variant:r,items:f,children:o.jsxs(x.Fragment,{children:[_?o.jsx(Et.Icon,{name:_,size:"md",style:{marginRight:8,verticalAlign:"middle"}}):null,l,u?o.jsx(Et.Icon,{name:u,size:"md",style:{marginLeft:8,verticalAlign:"middle"}}):null]})})},Yt={header:"_header_g1eri_1",header_content:"_header_content_g1eri_5"},pn=({components:t=[]})=>o.jsx("section",{className:Y(Yt.header,"avocado-dark-theme"),children:o.jsx("div",{className:Yt.header_content,children:t.map((e,s)=>o.jsx(x.Fragment,{children:e},s))})}),Cn=t=>{const{userFlow:e,pageId:s,responseKey:a,actionType:c,content:i,redirectUrl:l,target:n,dependencies:d,component:r,hash:_,...u}=t,{getNextUI:h}=U(),{disabled:f}=K(e,d),g=c&&u?(()=>{const{href:m,target:b,download:C,...N}=u;return N})():u,p=x.useCallback(async()=>{var m;if(c)try{const b={...(m=E.getState()[e])==null?void 0:m.entries,[a]:{status:200}};switch(D(e,b),c){case"GO_TO_NEXT_UI":{const C=await h(e,s,b,a);C!=null&&C.data&&M(e,C==null?void 0:C.data);break}case"REDIRECT":if(!l){console.warn("Missing redirectUrl for REDIRECT actionType");break}n==="_blank"?window.open(l,"_blank","noopener,noreferrer"):window.location.assign(l);break;default:console.warn(`Unhandled actionType for link: ${c}`);break}}catch(b){alert(JSON.stringify(b))}},[c,h,s,l,a,n,e]),y=g.disabled??f;return o.jsx(w.Link,{...g,disabled:y,onClick:c?p:void 0,children:i})},jn=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,items:l,closeOnClick:n,disabled:d,listOrigin:r,size:_,variant:u}=t,h=ut(e,s),f=x.useMemo(()=>l.map(g=>({icon:g.leftIcon,label:g.content??g.label??"",onClick:p=>{var y;(y=p==null?void 0:p.preventDefault)==null||y.call(p),h({responseKey:g.responseKey,actionType:g.actionType,dataSource:g.dataSource,redirectUrl:g.redirectUrl,dependencies:g.dependencies})}})),[l,h]);return o.jsx(w.Menu,{items:f,closeOnClick:n,disabled:d,listOrigin:r,size:_,variant:u})},wn={modalContent:"_modalContent_p06ci_1"},Nn=({userFlow:t,pageId:e,responseKey:s,header:a,body:c,footer:i,headerStatusColor:l,...n})=>{const d=E(m=>{var b;return(b=m[t])==null?void 0:b.isModalOpen}),r=E(m=>{var b;return(b=m[t])==null?void 0:b.isLoading}),_=d&&!r,u={...n},h=(u==null?void 0:u.headerStatusColor)??l,f=x.useCallback(()=>{ft(t),mt(t,!1)},[t,s]),g=Array.isArray(a)?O(t,e,a):a,p=O(t,e,c),y=O(t,e,i);return o.jsx(w.Modal,{...u,headerStatusColor:h,header:typeof g=="string"?g:o.jsx(o.Fragment,{children:g.map((m,b)=>o.jsx(x.Fragment,{children:m},`modal-header-${b}`))}),children:o.jsx("section",{className:wn.modalContent,children:p.map((m,b)=>o.jsx(x.Fragment,{children:m},`modal-body-${b}`))}),actions:o.jsx(o.Fragment,{children:y.map((m,b)=>o.jsx(x.Fragment,{children:m},`modal-footer-${b}`))}),open:_,onClose:f})},kn=({userFlow:t,pageId:e})=>{var i,l;const s=fe(t);if(!s)return null;const a=[...(s==null?void 0:s.components)||[],...((i=s==null?void 0:s.header)==null?void 0:i.components)||[],...((l=s==null?void 0:s.body)==null?void 0:l.components)||[]],c=O(t,e,a);return o.jsx(o.Fragment,{children:c==null?void 0:c.map((n,d)=>{const r=`overlay-${d}-${s==null?void 0:s.hash}`;return o.jsx(x.Fragment,{children:n},r)})})},En={success:{color:"success-opacity",textColor:"success-60",iconColor:"success-50"},warning:{color:"warning-opacity",textColor:"warning-60",iconColor:"warning-50"},error:{color:"error-opacity",textColor:"error-60",iconColor:"error-50"},info:{color:"primary-10",textColor:"primary-70",iconColor:"primary-70"},neutral:{color:"neutral-10",textColor:"neutral-70",iconColor:"neutral-70"}},Tn=t=>{const{content:e,variant:s="neutral",...a}=t,c=En[s],i={...a,children:e,color:(a==null?void 0:a.color)??c.color,textColor:(a==null?void 0:a.textColor)??c.textColor,iconColor:(a==null?void 0:a.iconColor)??c.iconColor};return o.jsx(w.Pill,{...i})},An=t=>{const{content:e}=t;return o.jsx(w.PreviewerMarkdown,{children:e})},vn=t=>{const{userFlow:e,pageId:s,responseKey:a,actionType:c,dataSource:i,dependencies:l,onClick:n,...d}=t,r=ut(e,s),{disabled:_}=K(e,l),u={...d},h=(u==null?void 0:u.disabled)??_,[f,g]=x.useState(!1),p=x.useRef(!1),y=x.useCallback(async()=>{if(p.current)return;const m=c==="FETCH_DATA_SOURCE";m&&(p.current=!0,g(!0));try{await r({responseKey:a,actionType:c,dataSource:i,dependencies:l})}catch(b){console.error("[RoundButtonNotFront] Action failed:",b)}finally{m&&(p.current=!1,g(!1))}},[c,i,l,a,r]);return o.jsx(w.RoundButton,{...u,loading:u.loading||f,disabled:h,onClick:()=>!h&&!f&&(n??y)()})},J={row:"_row_1bqj4_1","row__gap-none":"_row__gap-none_1bqj4_5","row__gap-xxs":"_row__gap-xxs_1bqj4_8","row__gap-xs":"_row__gap-xs_1bqj4_11","row__gap-sm":"_row__gap-sm_1bqj4_14","row__gap-md":"_row__gap-md_1bqj4_17","row__gap-lg":"_row__gap-lg_1bqj4_20","row__gap-xl":"_row__gap-xl_1bqj4_23","row__gap-xxl":"_row__gap-xxl_1bqj4_26","row__gap-xxxl":"_row__gap-xxxl_1bqj4_29","row__justify-start":"_row__justify-start_1bqj4_32","row__justify-end":"_row__justify-end_1bqj4_35","row__justify-center":"_row__justify-center_1bqj4_38","row__justify-space-between":"_row__justify-space-between_1bqj4_41","row__justify-space-around":"_row__justify-space-around_1bqj4_44","row__justify-space-evenly":"_row__justify-space-evenly_1bqj4_47","row__align-start":"_row__align-start_1bqj4_50","row__align-end":"_row__align-end_1bqj4_53","row__align-center":"_row__align-center_1bqj4_56","row__align-stretch":"_row__align-stretch_1bqj4_59","row__align-baseline":"_row__align-baseline_1bqj4_62",row_column:"_row_column_1bqj4_65","row_column__gap-none":"_row_column__gap-none_1bqj4_72","row_column__gap-xxs":"_row_column__gap-xxs_1bqj4_75","row_column__gap-xs":"_row_column__gap-xs_1bqj4_78","row_column__gap-sm":"_row_column__gap-sm_1bqj4_81","row_column__gap-md":"_row_column__gap-md_1bqj4_84","row_column__gap-lg":"_row_column__gap-lg_1bqj4_87","row_column__gap-xl":"_row_column__gap-xl_1bqj4_90","row_column__gap-xxl":"_row_column__gap-xxl_1bqj4_93","row_column__gap-xxxl":"_row_column__gap-xxxl_1bqj4_96","row_column__justify-start":"_row_column__justify-start_1bqj4_99","row_column__justify-end":"_row_column__justify-end_1bqj4_102","row_column__justify-center":"_row_column__justify-center_1bqj4_105","row_column__justify-space-between":"_row_column__justify-space-between_1bqj4_108","row_column__justify-space-around":"_row_column__justify-space-around_1bqj4_111","row_column__justify-space-evenly":"_row_column__justify-space-evenly_1bqj4_114","row_column__align-start":"_row_column__align-start_1bqj4_117","row_column__align-end":"_row_column__align-end_1bqj4_120","row_column__align-center":"_row_column__align-center_1bqj4_123","row_column__align-stretch":"_row_column__align-stretch_1bqj4_126","row_column__align-baseline":"_row_column__align-baseline_1bqj4_129"},Qt=t=>{const{userFlow:e,pageId:s,columnWidth:a,columns:c,gap:i="md",justifyContent:l="start",alignItems:n="stretch"}=t,d=Array.isArray(c)?c.map((r,_)=>{const u=`col_${_}`,h=`col_${_}`;if(Array.isArray(r))return{gap:"md",justifyContent:"start",alignItems:"start",items:r,hash:u,responseKey:h};const f=r;return{gap:(f==null?void 0:f.gap)??"md",justifyContent:(f==null?void 0:f.justifyContent)??"start",alignItems:(f==null?void 0:f.alignItems)??"start",items:(f==null?void 0:f.items)??[],hash:(f==null?void 0:f.hash)??u,responseKey:(f==null?void 0:f.responseKey)??h}}):[];return d.length===0?null:o.jsx("div",{className:Y(J.row,J[`row__gap-${i}`],J[`row__justify-${l}`],J[`row__align-${n}`]),children:d==null?void 0:d.map((r,_)=>{const u=(a==null?void 0:a[_])||`${100/d.length}%`,h=O(e,s,r.items);return!h||h.length===0?null:o.jsx("div",{className:Y(J.row_column,J[`row_column__gap-${r.gap}`],J[`row_column__justify-${r.justifyContent}`],J[`row_column__align-${r.alignItems}`]),style:{width:u},children:h},r.hash||_)})})};function Zt({userFlow:t,pageId:e,responseKey:s,actionType:a,getNextUI:c,isMulti:i=!1,debounceMs:l}){const n=x.useRef(null);x.useEffect(()=>()=>{n.current!==null&&(clearTimeout(n.current),n.current=null)},[]);const d=x.useCallback(async _=>{var f;const u={...(f=E.getState()[t])==null?void 0:f.entries};if(_?(u[s]=_,D(t,u)):(delete u[s],me(t,s)),a&&(a==="GO_TO_NEXT_UI"||a==="GO_TO_NEXT_UI_WITHOUT_LOADING"))try{const p=await c(t,e,u,s,a==="GO_TO_NEXT_UI");p!=null&&p.data&&M(t,p.data)}catch(g){console.error("[useSelectChange] Failed to fetch next UI",g)}},[t,e,s,a,c]);return x.useCallback(_=>{if(!i){d(_);return}if(l==null){d(_);return}n.current!==null&&(clearTimeout(n.current),n.current=null),n.current=setTimeout(()=>{d(_),n.current=null},l)},[i,l,d])}const On=/\{([^}]+)\}/g,Sn=(t,e)=>{var s;return e.includes("{")?e.replace(On,(a,c)=>{var l;const i=(l=B.query(t,c.trim()))==null?void 0:l[0];return i!=null?String(i):""}):(s=B.query(t,e))==null?void 0:s[0]},Rn=(t,e,s,a)=>{const c=B.query(t,e);return(c==null?void 0:c.map(i=>{var d;const l=Sn(i,s),n=a?(d=B.query(i,a))==null?void 0:d[0]:i;return{label:l,value:n}}))??[]},Dn=(t,e,s,a=10)=>{var n,d;let c,i;if(s){const r=B.value(t,s.size??"$.meta.size")??a,_=B.value(t,s.total??"$.meta.total")??0;c=r,i=_}else{const r=t==null?void 0:t.meta;c=(r==null?void 0:r.size)??((n=r==null?void 0:r.page)==null?void 0:n.size)??a,i=(r==null?void 0:r.total)??((d=r==null?void 0:r.page)==null?void 0:d.total)??0}const l=i>0?Math.ceil(i/c)>e:!1;return{pageSize:c,total:i,hasMore:l}},Ft={selectNotFront:"_selectNotFront_ch3v5_1"},Ln=({userFlow:t,pageId:e,responseKey:s,required:a,dataSource:c,actionType:i,dependencies:l,debounceMs:n,...d})=>{const r={...d},{getNextUI:_,fetchDataSource:u}=U(),[h,f]=x.useState((r==null?void 0:r.value)??""),{disabled:g}=K(t,l),p=(r==null?void 0:r.disabled)??g,y=x.useMemo(()=>a&&(r!=null&&r.label)?`${r==null?void 0:r.label} *`:(r==null?void 0:r.label)??"",[r==null?void 0:r.label,a]),m=x.useMemo(()=>{const j=r!=null&&r.isMulti?h:[h],k={};return Array.isArray(j)&&j.forEach(T=>{if(!T)return;const R=JSON.stringify(T.value),L=JSON.stringify(T.label);k[R]=T,L in k||(k[L]=T)}),k},[h]),b=Zt({userFlow:t,pageId:e,responseKey:s,actionType:i,getNextUI:_,isMulti:r==null?void 0:r.isMulti,debounceMs:n}),C=j=>{f(j),b(j)},N=async(j,k,{page:T})=>{const{jsonPathLabel:R,jsonPathOptions:L,jsonPathValue:I,jsonPathPagination:$}=c,X=bt(c,T,j),S=await u(X,t,!1),H=S==null?void 0:S.data,lt=H?Rn(H,L,R,I):[],{hasMore:wt}=Dn(H,T,$);return{options:lt,hasMore:wt,additional:{page:T+1}}};return o.jsx(w.SelectPagination,{...r,className:Ft.selectNotFront,label:y,value:h,disabled:p,noOptionsMessage:()=>o.jsx(o.Fragment,{children:"Sin opciones"}),onChange:j=>!p&&C(j),loadOptions:N,additional:{page:1},isOptionDisabled:j=>{const k=JSON.stringify(j==null?void 0:j.value),T=JSON.stringify(j==null?void 0:j.label);return!!(m!=null&&m[k])||!!(m!=null&&m[T])},debounceTimeout:350})},In=({userFlow:t,pageId:e,responseKey:s,dataSource:a,required:c,actionType:i,dependencies:l,debounceMs:n,...d})=>{const r={...d},{getNextUI:_}=U(),[u,h]=x.useState(r.value||""),{disabled:f}=K(t,l),g=(r==null?void 0:r.disabled)??f,p=x.useMemo(()=>c&&(r!=null&&r.label)?`${r==null?void 0:r.label} *`:(r==null?void 0:r.label)??"",[r==null?void 0:r.label,c]),y=Zt({userFlow:t,pageId:e,responseKey:s,actionType:i,getNextUI:_,isMulti:r==null?void 0:r.isMulti,debounceMs:n}),m=b=>{h(b),y(b)};return o.jsx(w.Select,{...r,className:Ft.selectNotFront,label:p,value:u,disabled:g,onChange:b=>!g&&m(b)})},Mn=t=>{const{dataSource:e}=t;return e?o.jsx(Ln,{...t}):o.jsx(In,{...t})},Pt={spacing:"_spacing_19hqa_1",spacing__xxs:"_spacing__xxs_19hqa_1",spacing__xs:"_spacing__xs_19hqa_4",spacing__sm:"_spacing__sm_19hqa_7",spacing__md:"_spacing__md_19hqa_10",spacing__lg:"_spacing__lg_19hqa_13",spacing__xl:"_spacing__xl_19hqa_16",spacing__xxl:"_spacing__xxl_19hqa_19",spacing__xxxl:"_spacing__xxxl_19hqa_22"},Bn=t=>{const{size:e}=t,s=Y(Pt.spacing,Pt[`spacing__${e}`]);return o.jsx("div",{className:s})},Kn=t=>{const{userFlow:e,pageId:s,responseKey:a,actionType:c,label:i,value:l,required:n,dependencies:d,...r}=t,_={...r},{getNextUI:u}=U(),[h,f]=x.useState(l||!1),{disabled:g}=K(e,d),p=(_==null?void 0:_.disabled)??g,y=x.useMemo(()=>n&&i?`${i} *`:i??"",[i,n]),m=x.useCallback(async()=>{var b;try{const C=!h;f(C);const N={...(b=E.getState()[e])==null?void 0:b.entries,[a]:C};switch(D(e,N),c){case"GO_TO_NEXT_UI":case"GO_TO_NEXT_UI_WITHOUT_LOADING":{const k=await u(e,s,N,a,c==="GO_TO_NEXT_UI");k!=null&&k.data&&M(e,k==null?void 0:k.data);break}default:break}}catch(C){console.error("Error in switch action:",C),alert(JSON.stringify(C))}},[e,s,a,c,h]);return o.jsx(w.Switch,{..._,label:y,checked:h,disabled:p,onChange:()=>!p&&m()})},$t={tableSkeleton:"_tableSkeleton_3nr9n_1",tableArrayPills:"_tableArrayPills_3nr9n_7"},Gn=({values:t})=>{const s=t==null?void 0:t.slice(0,4),a=(t==null?void 0:t.length)-4;return o.jsxs("div",{className:$t.tableArrayPills,children:[s.map((c,i)=>o.jsx(w.Pill,{children:String(c)},i)),a>0&&o.jsxs(w.Pill,{outlined:!0,children:["+",a]})]})},Hn=({userFlow:t,pageId:e,tableResponseKey:s,component:a,rowData:c})=>{const{getNextUI:i,fetchAndGetNextUI:l,fetchDataSource:n}=U(),d=O(t,e,[{...a}]),r=(d==null?void 0:d[0])||null;if(!r)return null;const{actionType:_,responseKey:u,dataSource:h}=r.props,f=x.useCallback(async()=>{var g,p,y;try{const m={...(g=E.getState()[t])==null?void 0:g.entries,[u]:{status:200},[s]:[{...c}]};switch(D(t,m),_){case"GO_TO_NEXT_UI":{const b=await i(t,e,m,u);b!=null&&b.data&&M(t,b==null?void 0:b.data);break}case"FETCH_AND_GO_TO_NEXT_UI":{const b=await l(t,e,m,u,h);b!=null&&b.data&&M(t,b==null?void 0:b.data);break}case"GET_DATA_SOURCE":{const b=await i(t,e,m,u),C=(p=b==null?void 0:b.data)==null?void 0:p.content;if((C==null?void 0:C.type)!=="fetch")break;const N=C==null?void 0:C.dataSource,j=await n(N,t,!1),k={...(y=E.getState()[t])==null?void 0:y.entries,[u]:{status:j==null?void 0:j.status,content:j==null?void 0:j.data}};D(t,k);const T=await i(t,e,k,u);T!=null&&T.data&&M(t,T==null?void 0:T.data);break}default:console.warn(`Unhandled actionType: ${_}`);break}}catch(m){alert(JSON.stringify(m))}},[_,h,e,u,t]);return x.cloneElement(r,{onClick:f})},Un=()=>o.jsx("div",{className:$t.tableSkeleton,children:[...Array(10)].map((t,e)=>o.jsx(w.SkeletonBase,{maxWidth:"100%",height:42,radius:8},`tableSkeletonBase${e}`))}),Vn=(t,e)=>!(e!=null&&e.length)||!t?t:t.map(s=>e.some(c=>Array.isArray(s!=null&&s.accessor?c[s==null?void 0:s.accessor]:void 0))?{...s,renderCell:c=>{const i=s.accessor?c[s.accessor]:void 0;return Array.isArray(i)?o.jsx(Gn,{values:i}):i??""}}:s),zn=({userFlow:t,pageId:e,responseKey:s,component:a,dataSource:c,rightActions:i,data:l,pageSize:n,...d})=>{var $,X;const{fetchDataSource:r}=U(),[_,u]=x.useState(!1),[h,f]=x.useState(1),[g,p]=x.useState(null),y=!c&&Array.isArray(l),m=!!(c!=null&&c.jsonPathCursorPagination)&&!!(($=c==null?void 0:c.jsonPathPagination)!=null&&$.hasMore),b=x.useRef(new Map([[1,null]])),C=x.useMemo(()=>{if(i!=null&&i.length)return i.map((S,H)=>({renderContent:lt=>o.jsx(Hn,{userFlow:t,pageId:e,tableResponseKey:s,component:S,rowData:lt},`tableRowAction${H}`)}))},[i,t,e,s]),N=async(S=1)=>{if(!c)return;const{mapperData:H,jsonPathData:lt,jsonPathPagination:wt,jsonPathCursorPagination:it}=c;if(it&&S!==1&&!b.current.has(S)){f(1),N(1);return}it&&S===1&&(b.current=new Map([[1,null]]));try{u(!0);const Nt=it?b.current.get(S)??null:null,es=bt(c,S,void 0,Nt),tt=await r(es,t,!1);if(p(zt(tt==null?void 0:tt.data,lt,H,wt)),it){const oe=qe(tt==null?void 0:tt.data,it);oe&&b.current.set(S+1,oe)}u(!1)}catch(Nt){console.error("[TableNotFront] fetchData:",Nt),u(!1)}},j=S=>{f(S),N(S)};x.useEffect(()=>{y||N()},[]);const k=y?l:g==null?void 0:g.items,T=y&&!!n&&((l==null?void 0:l.length)??0)>n,R=x.useMemo(()=>{if(!T||!l||!n)return k??[];const S=(h-1)*n;return l.slice(S,S+n)},[T,l,n,h,k]),L=x.useMemo(()=>Vn(d.columns,k),[k,d.columns]),I={...d,data:R,columns:L??[],rightActions:C};return y?!k||k.length===0?o.jsx(w.CardNotification,{state:"info",title:"Sin registros",children:"No hay datos disponibles para mostrar en este momento"}):o.jsxs(o.Fragment,{children:[o.jsx(w.Table,{...I}),T&&n&&l&&o.jsx(w.Pager,{classname:{global:"row__end"},page:h,size:n,total:l.length,onChange:f})]}):o.jsx(o.Fragment,{children:_?o.jsx(Un,{}):g&&((X=g==null?void 0:g.items)==null?void 0:X.length)>0?o.jsxs(o.Fragment,{children:[o.jsx(w.Table,{...I}),!m&&(g==null?void 0:g.pagination)&&g.pagination.totalPages>1&&o.jsx(w.Pager,{classname:{global:"row__end"},page:h,size:g.pagination.size,total:g.pagination.total,onChange:j}),m&&(g==null?void 0:g.pagination)&&o.jsx(w.Pager,{variant:"cursor",classname:{global:"row__end"},page:h,hasNextPage:!!g.pagination.hasMore,onChange:j})]}):o.jsx(w.CardNotification,{state:"info",title:"Sin registros",children:"No hay datos disponibles para mostrar en este momento"})})},Xn={tabsPanel:"_tabsPanel_kvslb_1"},Jn=({userFlow:t,pageId:e,components:s})=>{const a=O(t,e,s);return a!=null&&a.length?o.jsx("section",{className:Xn.tabsPanel,children:a.map((c,i)=>o.jsx(x.Fragment,{children:c},`tabs-panel-${i}`))}):null},Wn=({userFlow:t,pageId:e,hash:s,items:a,activeIndex:c,className:i,responseKey:l})=>{const n=a.map((r,_)=>({label:r.label,disabled:r.disabled,children:o.jsx(Jn,{userFlow:t,pageId:e,components:r.components},`${s}-tab-${_}`)})),d=r=>{var u;const _={...(u=E.getState()[t])==null?void 0:u.entries,[l]:r};D(t,_)};return o.jsx(w.Tabs,{className:i,activeIndex:c,items:n,onClick:d})},qn=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,required:l,dependencies:n,...d}=t,r={...d},[_,u]=x.useState((r==null?void 0:r.value)??""),{disabled:h}=K(e,n),f=(r==null?void 0:r.disabled)??h,g=x.useMemo(()=>l&&(r!=null&&r.label)?`${r.label} *`:(r==null?void 0:r.label)??"",[r==null?void 0:r.label,l]),p=y=>{var b;const m=(b=y==null?void 0:y.target)==null?void 0:b.value;u(m),D(e,{[i]:m})};return x.useEffect(()=>{u((r==null?void 0:r.value)??"")},[r==null?void 0:r.value]),o.jsx(w.Textarea,{...r,label:g,value:_,disabled:f,onChange:y=>!f&&p(y)})},Yn={textFieldNotFront:"_textFieldNotFront_1n8fy_1"},Qn=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,required:l,dependencies:n,...d}=t,r={...d},[_,u]=x.useState((r==null?void 0:r.value)??""),{disabled:h}=K(e,n),f=(r==null?void 0:r.disabled)??h,g=x.useMemo(()=>l&&(r!=null&&r.label)?`${r==null?void 0:r.label} *`:(r==null?void 0:r.label)??"",[r==null?void 0:r.label,l]),p=y=>{var C;const m=(C=y==null?void 0:y.target)==null?void 0:C.value;u(m);const b={[i]:m};D(e,b)};return x.useEffect(()=>{u((r==null?void 0:r.value)??"")},[r==null?void 0:r.value]),o.jsx(w.TextField,{...r,className:Yn.textFieldNotFront,allowClear:!1,label:g,value:_,disabled:f,onChange:y=>!f&&p(y)})},Zn=({userFlow:t,pageId:e,responseKey:s,variant:a,content:c,actionType:i,redirectUrl:l})=>{const n=x.useCallback(async()=>{ft(t);try{switch(i){case"AUTOCLOSE_AND_REDIRECT":window.location.href=l;break;default:console.warn(`Unhandled actionType: ${i}`);break}}catch(d){console.error("Error in toast action:",d),alert(JSON.stringify(d))}},[i,e,s,t,l]);return x.useEffect(()=>{({info:w.toast.info,error:w.toast.error,success:w.toast.success,warning:w.toast.warning}[a]||w.toast.info)(c,{autoClose:i?!1:4e3,containerId:t,onClose:n})},[n,t]),null},te={tooltipNotFront:"_tooltipNotFront_106iw_1",tooltipNotFront_content:"_tooltipNotFront_content_106iw_5"},Fn=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,content:l,label:n,placement:d,notShowArrow:r,visible:_}=t,u=O(e,s,l!=null&&l.length?l:null),h=u&&u.length>0?o.jsx("div",{className:te.tooltipNotFront_content,children:u.map((f,g)=>o.jsx(x.Fragment,{children:f},`tooltip-${c}-${g}`))}):null;return o.jsx(w.Tooltip,{className:te.tooltipNotFront,label:n,placement:d,notShowArrow:r,visible:_,children:h})};function Pn({sessionName:t,apiConfig:e,onResolveComponentProps:s,children:a}){const c=re(t,e,null,s);return o.jsxs(o.Fragment,{children:[c,a]})}const $n={api:"",headers:{}},ee=({userFlow:t,components:e,hash:s,apiConfig:a})=>{const c=s??`${t}-page`;x.useState(()=>{var d,r;return(r=(d=E.getState()[t])==null?void 0:d.pages)!=null&&r[c]||dt(t,a??$n,{type:"page",hash:c,body:{components:e}}),null});const i=O(t,c,e);return o.jsx(o.Fragment,{children:i})};function ne(t){if(t==null||typeof t!="object"||!("components"in t)||!Array.isArray(t.components))throw new Error("[renderNotFront] payload.display must be an object with a `components` array");return t.components}const se=({payload:t,userFlow:e})=>{const s=ne(t.display),a=ee({userFlow:e,hash:t.id,components:s});return o.jsx(o.Fragment,{children:a})},ts=se,ae=(t,e,s,a,c)=>{const i=O(t,e,(a==null?void 0:a.components)||null,c);switch(s){case"body":return o.jsx(De,{...a,inputs:i||[]},JSON.stringify(a==null?void 0:a.components));case"header":return o.jsx(pn,{...a,components:i||[]},JSON.stringify(a==null?void 0:a.components));default:return null}},re=(t,e,s,a)=>{var h,f,g;const[c,i]=x.useState(!1),l=E(p=>p),n=(h=l[t])==null?void 0:h.currentPageId;x.useEffect(()=>{if(typeof window>"u")return;const p=new URL(window.location.href),y=p.searchParams.get("sessionId");y&&(sessionStorage.setItem("sessionId",y),p.searchParams.delete("sessionId"),window.history.replaceState({},"",p.toString()))},[]);const d=n?ae(t,n,"header",((f=l[t].pages[n].page)==null?void 0:f.header)||null,a):null,r=n?ae(t,n,"body",((g=l[t].pages[n].page)==null?void 0:g.body)||null,a):null,_=x.useMemo(()=>{var p;return o.jsxs(o.Fragment,{children:[((p=l[t])==null?void 0:p.isLoading)&&o.jsx(w.Loading,{}),d,r,n&&o.jsx(kn,{userFlow:t,pageId:n}),l[t]&&o.jsx(w.Toaster,{})]})},[d,r,n,t]),u=async()=>{try{const p=await Bt(e,t),y=p==null?void 0:p.data,m=y==null?void 0:y.content;(p==null?void 0:p.status)===200?dt(t,e,m,y==null?void 0:y.sessionState):i(!0)}catch(p){console.error("[not-page]: API call failed",p),i(!0)}};return x.useEffect(()=>{e!=null&&e.api&&!s&&t?u():!(e!=null&&e.api)&&s&&t||e!=null&&e.api&&s&&t?dt(t,e,s):(!(e!=null&&e.api)&&!s||!t)&&(i(!0),console.error("[not-page]: API call failed","not api config","not userFlow"));const p="avocado-theme-mode-changed",y=m=>{const b=m.detail;w.ThemeStore.setThemeMode(b)};return window.addEventListener(p,y),()=>{window.removeEventListener(p,y)}},[]),c&&console.error("[not-page]: No render page"),_};A.Chart=Wt,A.NotFrontPage=Pn,A.RenderNotFront=se,A.Row=Qt,A.extractNotFrontComponents=ne,A.heading=Dt,A.renderNotFront=ts,A.text=Lt,A.useNotFrontFragment=ee,A.usePage=re,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})}));
|
|
13
|
+
*/var Ut;function Ke(){return Ut||(Ut=1,(function(t){(function(){var e={}.hasOwnProperty;function s(){for(var a=[],c=0;c<arguments.length;c++){var i=arguments[c];if(i){var l=typeof i;if(l==="string"||l==="number")a.push(i);else if(Array.isArray(i)){if(i.length){var n=s.apply(null,i);n&&a.push(n)}}else if(l==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){a.push(i.toString());continue}for(var d in i)e.call(i,d)&&i[d]&&a.push(d)}}}return a.join(" ")}t.exports?(s.default=s,t.exports=s):window.classNames=s})()})(bt)),bt.exports}var Be=Ke();const F=pe(Be),P={fieldset:"_fieldset_1xrth_1",fieldsetColumn:"_fieldsetColumn_1xrth_8",legend:"_legend_1xrth_14",options:"_options_1xrth_20",optionsRow:"_optionsRow_1xrth_25",optionsColumn:"_optionsColumn_1xrth_36"},Ge=t=>{const{userFlow:e,pageId:s,responseKey:a,label:c,value:i,required:l,actionType:n,dependencies:d,direction:o,items:_}=t,u=o==="column"?"column":"row",{getNextUI:h}=z(),{disabled:f}=H(e,d),y=T(j=>{var w,C;return(C=(w=j[e])==null?void 0:w.entries)==null?void 0:C[a]}),p=y!=null?String(y):i??"",g=f,m=x.useMemo(()=>c?l?`${c} *`:c:null,[c,l]),b=x.useCallback(async j=>{var w;if(!g)try{const C={...(w=T.getState()[e])==null?void 0:w.entries,[a]:j};if(I(e,C),n==="GO_TO_NEXT_UI"||n==="GO_TO_NEXT_UI_WITHOUT_LOADING"){const R=await h(e,s,C,a,n==="GO_TO_NEXT_UI");R!=null&&R.data&&B(e,R==null?void 0:R.data)}}catch(C){alert(JSON.stringify(C))}},[n,h,g,s,a,e]);return r.jsxs("fieldset",{className:F(P.fieldset,u==="column"&&P.fieldsetColumn),children:[m?r.jsx("legend",{className:P.legend,children:m}):null,r.jsx("div",{className:F(P.options,u==="column"?P.optionsColumn:P.optionsRow),children:_.map(j=>r.jsx(N.RadioButton,{name:a,value:j.value,checked:p===j.value,disabled:g||j.disabled,labelRight:j.label,onChange:()=>{b(j.value)}},j.value))})]})},He=({userFlow:t,pageId:e,component:s,hash:a,responseKey:c,items:i,itemActive:l,darkMode:n})=>r.jsx(N.Stepper,{items:i,itemActive:l,darkMode:n}),Ue=({userFlow:t,pageId:e,component:s,hash:a,responseKey:c,total:i,done:l,inProgress:n})=>r.jsx(N.ProgressBar,{total:i,done:l,inProgress:n}),ze=({userFlow:t,items:e,responseKey:s})=>{const{getNextUI:a}=z(),c=x.useCallback(async({actionType:l,hashCode:n,redirectUrl:d})=>{var o;try{switch(l){case"GO_TO_NEXT_UI":const _=await a(t,n,{...(o=T.getState()[t])==null?void 0:o.entries},s);_!=null&&_.data&&B(t,_==null?void 0:_.data);break;case"REDIRECT":d?window.location.href=d:console.warn("Missing redirectUrl for REDIRECT actionType");break;default:console.warn(`Unhandled actionType: ${l}`);break}}catch(_){alert(JSON.stringify(_))}},[]),i=x.useMemo(()=>e==null?void 0:e.map(l=>({title:l==null?void 0:l.title,component:r.jsx("div",{onClick:()=>c(l)})})),[]);return r.jsx(N.Breadcrumbs,{items:i})};function ut(t,e){const{getNextUI:s,fetchDataSource:a,fetchAndGetNextUI:c}=z();return x.useCallback(async i=>{var h,f,y,p;const{responseKey:l,actionType:n,dataSource:d,redirectUrl:o,dependencies:_}=i,u=(h=T.getState()[t])==null?void 0:h.entries;if(!It(u,_))try{const g={...(f=T.getState()[t])==null?void 0:f.entries,[l]:{status:200}};switch(I(t,g),n){case"CLOSE_MODAL":mt(t,!1);break;case"CLOSE_DRAWER":ot(t,!1);break;case"OPEN_DRAWER":ot(t,!0);break;case"GO_TO_NEXT_UI":{const m=await s(t,e,g,l);m!=null&&m.data&&B(t,m==null?void 0:m.data);break}case"FETCH_AND_GO_TO_NEXT_UI":{const m=await c(t,e,g,l,d);m!=null&&m.data&&B(t,m==null?void 0:m.data);break}case"FETCH_DATA_SOURCE":{const m=await a(d,t,!1);I(t,{[l]:{status:m==null?void 0:m.status,content:m==null?void 0:m.data}});break}case"GET_DATA_SOURCE":{const m=await s(t,e,g,l),b=(y=m==null?void 0:m.data)==null?void 0:y.content;if((b==null?void 0:b.type)!=="fetch")break;const j=b==null?void 0:b.dataSource,w=await a(j,t,!1),C={...(p=T.getState()[t])==null?void 0:p.entries,[l]:{status:w==null?void 0:w.status,content:w==null?void 0:w.data}};I(t,C);const k=await s(t,e,C,l);k!=null&&k.data&&B(t,k==null?void 0:k.data);break}case"REDIRECT":o?window.location.href=o:console.warn("Missing redirectUrl for REDIRECT actionType");break;default:console.warn(`Unhandled actionType: ${n}`)}}catch(g){alert(JSON.stringify(g))}},[c,a,s,e,t])}const Ve=t=>{const{userFlow:e,pageId:s,responseKey:a,actionType:c,label:i,content:l,dataSource:n,redirectUrl:d,dependencies:o,onClick:_,...u}=t,h=ut(e,s),{disabled:f}=H(e,o),y={...u,children:l??i},p=(y==null?void 0:y.disabled)??f,[g,m]=x.useState(!1),b=x.useRef(!1),j=x.useCallback(async()=>{if(b.current)return;const w=c==="FETCH_DATA_SOURCE";w&&(b.current=!0,m(!0));try{await h({responseKey:a,actionType:c,dataSource:n,redirectUrl:d,dependencies:o})}catch(C){console.error("[ButtonNotFront] Action failed:",C)}finally{w&&(b.current=!1,m(!1))}},[c,n,o,d,a,h]);return r.jsx(N.Button,{...y,loading:y.loading||g,disabled:p,onClick:()=>!p&&!g&&(_??j)()})},zt={slotStack:"_slotStack_12u4t_5"},Xe=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,dependencies:l,content:n,actionContent:d,...o}=t,{disabled:_}=H(e,l),u=S(e,s,n&&n.length>0?n:null),h=S(e,s,d&&d.length>0?d:null),f=u&&u.length>0?r.jsx("div",{className:zt.slotStack,children:u.map((g,m)=>r.jsx(x.Fragment,{children:g},`card-accordion-body-${c}-${m}`))}):void 0,y=h&&h.length>0?r.jsx("div",{className:zt.slotStack,children:h.map((g,m)=>r.jsx(x.Fragment,{children:g},`card-accordion-actions-${c}-${m}`))}):void 0,p=o.disabled||_;return r.jsx(N.CardAccordion,{...o,disabled:p,actionContent:y,children:f??null})},Je={slotStack:"_slotStack_ivk5b_1"},We=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,content:l,colorId:n,disabled:d,actionType:o,dataSource:_,redirectUrl:u,dependencies:h}=t,{getNextUI:f,fetchDataSource:y,fetchAndGetNextUI:p}=z(),{disabled:g}=H(e,h),m=d??g,b=S(e,s,l&&l.length>0?l:null),j=b&&b.length>0?r.jsx("div",{className:Je.slotStack,children:b.map((C,k)=>r.jsx(x.Fragment,{children:C},`card-body-${c}-${k}`))}):null,w=x.useCallback(async()=>{var C,k,E;if(!(!o||m))try{const R={...(C=T.getState()[e])==null?void 0:C.entries,[i]:{status:200}};switch(I(e,R),o){case"CLOSE_MODAL":mt(e,!1);break;case"CLOSE_DRAWER":ot(e,!1);break;case"OPEN_DRAWER":ot(e,!0);break;case"GO_TO_NEXT_UI":case"GO_TO_NEXT_UI_WITHOUT_LOADING":{const K=await f(e,s,R,i,o==="GO_TO_NEXT_UI");K!=null&&K.data&&B(e,K==null?void 0:K.data);break}case"FETCH_AND_GO_TO_NEXT_UI":{const M=await p(e,s,R,i,_);M!=null&&M.data&&B(e,M==null?void 0:M.data);break}case"GET_DATA_SOURCE":{const M=await f(e,s,R,i),K=(k=M==null?void 0:M.data)==null?void 0:k.content;if((K==null?void 0:K.type)!=="fetch")break;const st=K==null?void 0:K.dataSource,X=await y(st,e,!1),D={...(E=T.getState()[e])==null?void 0:E.entries,[i]:{status:X==null?void 0:X.status,content:X==null?void 0:X.data}};I(e,D);const U=await f(e,s,D,i);U!=null&&U.data&&B(e,U==null?void 0:U.data);break}case"REDIRECT":u&&(window.location.href=u);break;default:console.warn(`Unhandled card actionType: ${o}`)}}catch(R){alert(JSON.stringify(R))}},[o,_,m,p,y,f,s,u,i,e]);return r.jsx(N.Card,{colorId:n,disabled:m,onClick:o&&!m?()=>void w():void 0,children:j})},qe=t=>{const{content:e,description:s,...a}=t,c={...a,children:e??s};return r.jsx(N.CardNotification,{...c})},jt=t=>Array.isArray(t)?t:typeof t=="object"?JSON.stringify(t):t,Ye=(t,e)=>{if(!e||t==null)return null;const{extractionJsonPath:s,injectionJsonPath:a}=e,c=G.value(t,s);if(c==null)return null;try{const i={};return G.value(i,a,c),i}catch(i){return console.warn("[buildCursorPayload] invalid injectionJsonPath:",a,i),null}},Vt=(t,e,s,a)=>{const c=G.query(t,e),i=c==null?void 0:c.map(_=>{var u,h;if(s){const f={};for(const[y,p]of Object.entries(s))if(typeof p=="object"&&"path"in p){const g=p,m=(u=G.query(_,g.path))==null?void 0:u[0];g.translations&&String(m)in g.translations?f[y]=jt(g.translations[String(m)]):f[y]=jt(m)}else{const g=p;f[y]=jt((h=G.query(_,g))==null?void 0:h[0])}return f}else return _}),l=G.value(t,(a==null?void 0:a.size)??"$.meta.size")??c.length,n=G.value(t,(a==null?void 0:a.total)??"$.meta.total")??0,d=a!=null&&a.hasMore?!!G.value(t,a.hasMore):void 0,o={size:l,total:n,totalPages:a!=null&&a.totalPages?G.value(t,(a==null?void 0:a.totalPages)??"$.meta.totalPages"):l>0?Math.ceil(n/l):0,...d!==void 0?{hasMore:d}:{}};return{items:i,pagination:o}},$=({width:t,height:e,layout:s,data:a,Chart:c,children:i})=>{const l=e??et,n=s?{layout:s}:{};return t?r.jsx(c,{width:t,height:l,data:a,...n,children:i}):r.jsx(A.ResponsiveContainer,{width:"100%",height:l,children:r.jsx(c,{data:a,...n,children:i})})},J=({withPadding:t=!1})=>{const e=s=>r.jsx("span",{style:{color:O.labelColor},children:s});return r.jsx(A.Legend,{formatter:e,wrapperStyle:{fontSize:O.fontSize,fontFamily:O.fontFamily,padding:t?"1rem 0":"0"}})},Qe=({active:t,payload:e,label:s,tooltipKey:a,tooltipCoverage:c})=>{var _,u;if(!t||!e||!e.length)return null;const i={backgroundColor:O.tooltipBg,borderRadius:O.tooltipBorderRadius,color:O.tooltipColor,padding:"8px 12px",border:"1px solid #e5e7eb"};if(a){const h=(_=e[0])==null?void 0:_.payload;if(h&&h[a]!==void 0&&h[a]!==null)return r.jsx("div",{style:i,children:r.jsx("p",{style:{margin:0},children:h[a]})})}const l=(u=e[0])==null?void 0:u.payload,n=(c==null?void 0:c.label)??"Cobertura",d=c?l==null?void 0:l[c.denominatorKey]:void 0,o=c&&d!==void 0&&d!==null&&d>0;return r.jsxs("div",{style:i,children:[r.jsx("p",{style:{margin:"0 0 4px 0",fontWeight:"bold"},children:s}),e.map((h,f)=>r.jsx("p",{style:{margin:"2px 0",color:h.color},children:`${h.name}: ${h.value}`},f)),o&&r.jsx("p",{style:{margin:"2px 0"},children:`${n}: ${Math.round(l[c.numeratorKey]/d*100)}%`})]})},W=({tooltipKey:t,tooltipCoverage:e,defaultIndex:s,hideContent:a=!1}={})=>r.jsx(A.Tooltip,{defaultIndex:s,cursor:a?!1:void 0,content:a?()=>null:c=>r.jsx(Qe,{...c,tooltipKey:t,tooltipCoverage:e})}),tt=({dataKey:t,hide:e=!1,type:s})=>r.jsx(A.XAxis,{...t?{dataKey:t}:{},...s?{type:s}:{},hide:e,tick:{fill:O.labelColor,fontSize:O.fontSize}}),Y=({type:t,dataKey:e,width:s,yAxisId:a,orientation:c}={})=>r.jsx(A.YAxis,{...t?{type:t}:{},...e?{dataKey:e}:{},...s!==void 0?{width:s}:{},...a?{yAxisId:a}:{},...c?{orientation:c}:{},tick:{fill:O.labelColor,fontSize:O.fontSize},tickMargin:4}),Ze=t=>{const{data:e,xKey:s,yKeys:a,tooltipKey:c,width:i}=t;return r.jsxs($,{width:i,data:e,Chart:A.AreaChart,children:[r.jsx(A.CartesianGrid,{strokeDasharray:"3 3"}),r.jsx(tt,{dataKey:s}),r.jsx(Y,{}),r.jsx(W,{tooltipKey:c}),r.jsx(J,{}),a.map((l,n)=>r.jsx(A.Area,{type:"monotone",dataKey:l,stroke:L[n%L.length],fill:L[n%L.length]},l))]})},Fe=t=>{const{data:e,yKeys:s,xKey:a,tooltipKey:c,width:i}=t;return r.jsxs($,{width:i,data:e,Chart:A.BarChart,children:[r.jsx(A.CartesianGrid,{strokeDasharray:"3 3"}),r.jsx(tt,{dataKey:a}),r.jsx(Y,{}),r.jsx(W,{tooltipKey:c}),r.jsx(J,{}),s.map((l,n)=>r.jsx(A.Bar,{dataKey:l,fill:L[n%L.length]},l))]})};var Xt={NODE_ENV:"production"};const Pe=(t,e)=>{if(e!=null&&e.length)return e;const s=[...new Set(t.map(a=>a.yAxisId).filter(a=>!!a))];return s.length===0?[]:s.map((a,c)=>({id:a,orientation:c===1?"right":"left"}))},$e=(t,e)=>{!t.type&&Xt.NODE_ENV;const s=t.color??L[e%L.length],a=t.label??t.key,c=t.yAxisId?{yAxisId:t.yAxisId}:{};switch(t.type){case"area":return r.jsx(A.Area,{dataKey:t.key,name:a,type:"monotone",fill:s,stroke:s,fillOpacity:.3,...c},t.key);case"line":return r.jsx(A.Line,{dataKey:t.key,name:a,type:"monotone",stroke:s,strokeWidth:2,dot:!1,...c},t.key);case"bar":return r.jsx(A.Bar,{dataKey:t.key,name:a,fill:s,stackId:t.stackId,barSize:t.barSize,...c},t.key);default:return null}},tn=t=>{const{data:e,xKey:s,series:a=[],tooltipKey:c,width:i,showLegend:l=!0,yAxes:n}=t;!a.length&&Xt.NODE_ENV;const d=Pe(a,n);return r.jsxs($,{width:i,data:e,Chart:A.ComposedChart,children:[r.jsx(A.CartesianGrid,{strokeDasharray:"3 3"}),r.jsx(tt,{dataKey:s}),d.length>0?d.map(o=>r.jsx(Y,{yAxisId:o.id,orientation:o.orientation},o.id)):r.jsx(Y,{}),r.jsx(W,{tooltipKey:c}),l&&r.jsx(J,{}),a.map((o,_)=>$e(o,_))]})},en="55%",nn=120,sn=t=>e=>{const s=Math.PI/180,{cx:a=0,cy:c=0,midAngle:i=0,innerRadius:l=0,outerRadius:n=0,startAngle:d=0,endAngle:o=0,fill:_=L[0],payload:u,percent:h=0,value:f=0}=e,y=Math.sin(-s*i),p=Math.cos(-s*i),g=a+(n+10)*p,m=c+(n+10)*y,b=a+(n+30)*p,j=c+(n+30)*y,w=b+(p>=0?1:-1)*22,C=j,k=p>=0?"start":"end",E=u,R=String((E==null?void 0:E[t])??"");return r.jsxs("g",{children:[r.jsx("text",{x:a,y:c,dy:8,textAnchor:"middle",fill:O.labelColor,fontSize:O.fontSize+2,fontFamily:O.fontFamily,children:R}),r.jsx(A.Sector,{cx:a,cy:c,innerRadius:l,outerRadius:n,startAngle:d,endAngle:o,fill:_}),r.jsx(A.Sector,{cx:a,cy:c,startAngle:d,endAngle:o,innerRadius:n+6,outerRadius:n+10,fill:_}),r.jsx("path",{d:`M${g},${m}L${b},${j}L${w},${C}`,stroke:_,fill:"none"}),r.jsx("circle",{cx:w,cy:C,r:2,fill:_,stroke:"none"}),r.jsx("text",{x:w+(p>=0?1:-1)*12,y:C,textAnchor:k,fill:O.labelColor,fontSize:O.fontSize+2,fontFamily:O.fontFamily,children:f}),r.jsx("text",{x:w+(p>=0?1:-1)*12,y:C,dy:18,textAnchor:k,fill:O.labelColorMuted,fontSize:O.fontSize,fontFamily:O.fontFamily,children:`(${(h*100).toFixed(0)}%)`})]})},an=t=>{const{data:e,xKey:s,yKeys:a,tooltipKey:c,innerRadius:i=en,outerRadius:l=nn,activeShape:n=!0,defaultIndex:d,showLegend:o=!0}=t,_=a[0];return r.jsx(A.ResponsiveContainer,{width:"100%",height:et,children:r.jsxs(A.PieChart,{children:[r.jsx(W,{tooltipKey:n?void 0:c,defaultIndex:d,hideContent:n}),o&&r.jsx(J,{}),r.jsx(A.Pie,{data:e,dataKey:_,nameKey:s,cx:"50%",cy:"50%",innerRadius:i,outerRadius:l,activeShape:n?sn(s):void 0,children:e.map((u,h)=>r.jsx(A.Cell,{fill:L[h%L.length]},`cell-${h}`))})]})})};function on(t,e,s=Jt){return t<=0?0:e<=0?t:Math.max(t,e*s)}function rn(t,e=fn,s){return s!==void 0?s:t<=0?et:Math.max(et,t*e)}function cn(t,e,s){if(s!==void 0)return s;const a=t.reduce((c,i)=>{const l=String(i[e]??"");return Math.max(c,l.length)},0);return Math.max(mn,a*yn)}const ln=t=>{const{data:e,yKeys:s,xKey:a,tooltipKey:c,minCategoryHeight:i,chartHeight:l,tooltipCoverage:n,showLegend:d=!0,yKeyLabels:o,yAxisWidth:_}=t,u=rn(e.length,i,l),h=cn(e,a,_);return r.jsxs($,{height:u,layout:"vertical",data:e,Chart:A.BarChart,children:[r.jsx(A.CartesianGrid,{strokeDasharray:"3 3",horizontal:!1}),r.jsx(tt,{type:"number"}),r.jsx(Y,{type:"category",dataKey:a,width:h}),r.jsx(W,{tooltipKey:c,tooltipCoverage:n}),d&&r.jsx(J,{}),s.map((f,y)=>r.jsx(A.Bar,{dataKey:f,name:(o==null?void 0:o[f])??f,fill:L[y%L.length]},f))]})},dn=t=>{const{data:e,xKey:s,yKeys:a,tooltipKey:c,width:i}=t;return r.jsxs($,{width:i,data:e,Chart:A.LineChart,children:[r.jsx(A.CartesianGrid,{strokeDasharray:"3 3"}),r.jsx(tt,{dataKey:s}),r.jsx(Y,{}),r.jsx(W,{tooltipKey:c}),r.jsx(J,{}),a.map((l,n)=>r.jsx(A.Line,{type:"monotone",dataKey:l,stroke:L[n%L.length],strokeWidth:2,dot:!1},l))]})};var _n={NODE_ENV:"production"};const un=t=>{const{data:e,xKey:s,series:a=[],tooltipKey:c,width:i}=t;return!a.length&&_n.NODE_ENV,r.jsxs($,{width:i,data:e,Chart:A.BarChart,children:[r.jsx(A.CartesianGrid,{strokeDasharray:"3 3"}),r.jsx(tt,{dataKey:s}),r.jsx(Y,{}),r.jsx(W,{tooltipKey:c}),r.jsx(J,{}),a.map((l,n)=>r.jsx(A.Bar,{dataKey:l.key,name:l.label??l.key,stackId:l.stackId,fill:l.color??L[n%L.length]},l.key))]})},hn=t=>{const{data:e,xKey:s,yKeys:a,tooltipKey:c}=t,i=({cx:l,cy:n,midAngle:d,innerRadius:o,outerRadius:_,value:u})=>{const h=Math.PI/180,f=25+o+(_-o),y=l+f*Math.cos(-(d??0)*h),p=n+f*Math.sin(-(d??0)*h);return r.jsx("text",{x:y,y:p,fill:O.labelColor,color:O.labelColor,textAnchor:"middle",dominantBaseline:"central",children:u})};return r.jsx(A.ResponsiveContainer,{width:"100%",height:et,children:r.jsxs(A.PieChart,{children:[r.jsx(W,{tooltipKey:c}),r.jsx(J,{}),r.jsx(A.Pie,{data:e,dataKey:a[0],nameKey:s,label:i,outerRadius:120,children:e.map((l,n)=>r.jsx(A.Cell,{fill:L[n%L.length]},`cell-${n}`))})]})})},et=400,Jt=56,fn=28,mn=100,yn=8,gn=new Set(["bar","line","area","mixBar","composed"]),xn={area:Ze,bar:Fe,composed:tn,donut:an,horizontalBar:ln,line:dn,mixBar:un,pie:hn},L=["var(--color-primitive-palette-1-50)","var(--color-primitive-palette-2-50)","var(--color-primitive-palette-3-50)","var(--color-primitive-palette-4-50)","var(--color-primitive-palette-5-50)","var(--color-primitive-palette-6-50)","var(--color-primitive-palette-7-50)","var(--color-primitive-palette-8-50)","var(--color-primitive-palette-9-50)","var(--color-primitive-palette-10-50)","var(--color-primitive-palette-11-50)","var(--color-primitive-palette-12-50)","var(--color-primitive-palette-13-50)","var(--color-primitive-palette-14-50)","var(--color-primitive-palette-15-50)","var(--color-primitive-palette-16-50)","var(--color-primitive-palette-17-50)"],O={fontFamily:"Roboto, sans-serif",fontSize:12,labelColor:"var(--color-neutral-90)",labelColorMuted:"var(--color-neutral-50)",tooltipBg:"#fff",tooltipColor:"#000",tooltipBorderRadius:"4px"},Wt={chartScrollViewport:"_chartScrollViewport_sm5hx_1",chartScrollViewport_track:"_chartScrollViewport_track_sm5hx_29"},pn="Scrollable chart area",bn=({dataLength:t,minCategoryWidth:e,children:s})=>{const a=x.useRef(null),[c,i]=x.useState(0),l=e??Jt;x.useEffect(()=>{const _=a.current;if(!_)return;const u=()=>{i(_.clientWidth)};u();const h=new ResizeObserver(u);return h.observe(_),()=>h.disconnect()},[]);const n=on(c,t,l),d=c>0&&n>c,o=x.useCallback(_=>{const u=a.current;if(u)switch(_.key){case"ArrowLeft":u.scrollLeft-=l,_.preventDefault();break;case"ArrowRight":u.scrollLeft+=l,_.preventDefault();break;case"Home":u.scrollLeft=0,_.preventDefault();break;case"End":u.scrollLeft=u.scrollWidth-u.clientWidth,_.preventDefault();break}},[l]);return r.jsx("div",{ref:a,className:Wt.chartScrollViewport,role:d?"region":void 0,tabIndex:d?0:void 0,"aria-label":d?pn:void 0,onKeyDown:d?o:void 0,children:r.jsx("div",{className:Wt.chartScrollViewport_track,style:{width:n,height:et},children:c>0?s(n):null})})},qt=t=>{const{component:e,userFlow:s,hash:a,responseKey:c,dataSource:i,...l}=t,n=xn[l.type],{fetchDataSource:d}=z(),[o,_]=x.useState(!1),[u,h]=x.useState([]),f=async()=>{var g,m;try{_(!0);const{jsonPathData:b,mapperData:j}=i,w=pt(i,1),C=await d(w,s,!1),k=b?(g=Vt(C==null?void 0:C.data,b,j))==null?void 0:g.items:(m=C==null?void 0:C.data)==null?void 0:m.data;h(k),_(!1)}catch(b){alert(JSON.stringify(b)),_(!1)}};if(x.useEffect(()=>{n&&(i?f():h(l.data))},[]),!n)return r.jsx("div",{children:"Not supported chart type"});const y={...l,data:u};return o?r.jsx(N.SkeletonBase,{height:400}):u.length===0?r.jsx(N.CardNotification,{state:"info",title:"Sin registros",children:"No hay datos disponibles para mostrar en este momento"}):gn.has(l.type)?r.jsx(bn,{dataLength:u.length,minCategoryWidth:l.minCategoryWidth,children:g=>r.jsx(n,{...y,width:g})}):r.jsx(n,{...y})},jn=t=>{const{userFlow:e,pageId:s,responseKey:a,actionType:c,label:i,value:l,required:n,dependencies:d,...o}=t,_={...o},{getNextUI:u}=z(),[h,f]=x.useState(l||!1),{disabled:y}=H(e,d),p=x.useMemo(()=>n&&i?`${i} *`:i??"",[i,n]),g=x.useCallback(async()=>{var b;try{const j=!h;f(j);const w={...(b=T.getState()[e])==null?void 0:b.entries,[a]:j};switch(I(e,w),c){case"GO_TO_NEXT_UI":case"GO_TO_NEXT_UI_WITHOUT_LOADING":{const k=await u(e,s,w,a,c==="GO_TO_NEXT_UI");k!=null&&k.data&&B(e,k==null?void 0:k.data);break}default:break}}catch(j){console.error("Error in checkbox action:",j),alert(JSON.stringify(j))}},[e,s,a,c,h]),m=(_==null?void 0:_.disabled)??y;return r.jsx(N.Checkbox,{..._,labelRight:p,checked:h,disabled:m,onChange:()=>{!m&&g()}})},nt={codeEditor:"_codeEditor_1wi2p_1",codeEditor_label:"_codeEditor_label_1wi2p_4",codeEditor_wrapper:"_codeEditor_wrapper_1wi2p_13",input:"_input_1wi2p_17",preview:"_preview_1wi2p_18",preview_inner:"_preview_inner_1wi2p_33"},Cn=t=>{const{userFlow:e,responseKey:s,label:a,language:c,placeholder:i,value:l,required:n,dependencies:d,disabled:o,showPreview:_,height:u="400px"}=t,[h,f]=x.useState(l??""),y=N.ThemeStore.useThemeStore(w=>w.theme.mode),{disabled:p}=H(e,d),g=o??p,m={json:kt.json(),markdown:de.markdown(),sql:_e.sql(),yaml:ue.yaml()},b=x.useMemo(()=>n&&a?`${a} *`:a??"",[a,n]),j=w=>{f(w);const C={[s]:w};I(e,C)};return r.jsxs("div",{className:nt.codeEditor,children:[b&&b!==""&&r.jsx("label",{className:nt.codeEditor_label,children:b}),r.jsxs("div",{className:nt.codeEditor_wrapper,children:[r.jsx(ie,{className:nt.input,value:h,height:u,placeholder:i,extensions:[m[c]??kt.json()],onChange:w=>j(w),theme:y,editable:!g}),c==="markdown"&&_&&r.jsx("div",{className:nt.preview,style:{height:u},children:r.jsx(N.PreviewerMarkdown,{className:nt.preview_inner,children:h})})]})]})},Yt={slotStack:"_slotStack_6n2wy_5"},wn=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,content:l,topContent:n,icon:d,headerStatusColor:o,..._}=t,u=o?`palette_${o}_50`:void 0,h=S(e,s,l&&l.length>0?l:null),f=S(e,s,n&&n.length>0?n:null),y=h&&h.length>0?r.jsx("div",{className:Yt.slotStack,children:h.map((g,m)=>r.jsx(x.Fragment,{children:g},`data-card-body-${c}-${m}`))}):void 0,p=f&&f.length>0?r.jsx("div",{className:Yt.slotStack,children:f.map((g,m)=>r.jsx(x.Fragment,{children:g},`data-card-top-${c}-${m}`))}):void 0;return r.jsx(N.DataCard,{..._,icon:d,headerStatusColor:u,topContent:p,children:y})},Nn={dividerNotFront:"_dividerNotFront_tze3j_1"},kn=t=>r.jsx(N.Divider,{...t,className:Nn.dividerNotFront}),Ct={drawer:"_drawer_13pxo_1",drawerBody:"_drawerBody_13pxo_5",drawerFooter:"_drawerFooter_13pxo_11"},En=({userFlow:t,pageId:e,responseKey:s,header:a,body:c,footer:i,...l})=>{const n=T(g=>{var m;return(m=g[t])==null?void 0:m.isDrawerOpen}),d=T(g=>{var m;return(m=g[t])==null?void 0:m.isLoading}),o=n&&!d,_={...l,isOpen:o,children:null},u=x.useCallback(()=>{ft(t),ot(t,!1)},[t]),h=Array.isArray(a)?S(t,e,a):a?r.jsx(N.Heading,{type:"h2",children:a}):void 0,f=S(t,e,c),y=i?S(t,e,i):void 0;return r.jsx(N.Drawer,{..._,className:Ct.drawer,isOpen:o,onClose:u,heightGap:50,title:h?r.jsx(r.Fragment,{children:Array.isArray(h)?h.map((g,m)=>r.jsx(x.Fragment,{children:g},`drawer-header-${m}`)):h}):void 0,children:r.jsx("section",{className:Ct.drawerBody,children:f.map((g,m)=>r.jsx(x.Fragment,{children:g},`drawer-body-${m}`))}),footer:y?r.jsx("div",{className:Ct.drawerFooter,children:y.map((g,m)=>r.jsx(x.Fragment,{children:g},`drawer-footer-${m}`))}):void 0})},Tn=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,content:l,items:n,disabled:d,variant:o,leftIcon:_,rightIcon:u}=t,h=ut(e,s),f=x.useMemo(()=>n.map(y=>({label:y.content??y.label??"",onClick:()=>{h({responseKey:y.responseKey,actionType:y.actionType,dataSource:y.dataSource,redirectUrl:y.redirectUrl,dependencies:y.dependencies})}})),[n,h]);return r.jsx(N.DropdownButton,{disabled:d,variant:o,items:f,children:r.jsxs(x.Fragment,{children:[_?r.jsx(Et.Icon,{name:_,size:"md",style:{marginRight:8,verticalAlign:"middle"}}):null,l,u?r.jsx(Et.Icon,{name:u,size:"md",style:{marginLeft:8,verticalAlign:"middle"}}):null]})})},Qt={header:"_header_g1eri_1",header_content:"_header_content_g1eri_5"},An=({components:t=[]})=>r.jsx("section",{className:F(Qt.header,"avocado-dark-theme"),children:r.jsx("div",{className:Qt.header_content,children:t.map((e,s)=>r.jsx(x.Fragment,{children:e},s))})}),vn=t=>{const{userFlow:e,pageId:s,responseKey:a,actionType:c,content:i,redirectUrl:l,target:n,dependencies:d,component:o,hash:_,...u}=t,{getNextUI:h}=z(),{disabled:f}=H(e,d),y=c&&u?(()=>{const{href:m,target:b,download:j,...w}=u;return w})():u,p=x.useCallback(async()=>{var m;if(c)try{const b={...(m=T.getState()[e])==null?void 0:m.entries,[a]:{status:200}};switch(I(e,b),c){case"GO_TO_NEXT_UI":{const j=await h(e,s,b,a);j!=null&&j.data&&B(e,j==null?void 0:j.data);break}case"REDIRECT":if(!l){console.warn("Missing redirectUrl for REDIRECT actionType");break}n==="_blank"?window.open(l,"_blank","noopener,noreferrer"):window.location.assign(l);break;default:console.warn(`Unhandled actionType for link: ${c}`);break}}catch(b){alert(JSON.stringify(b))}},[c,h,s,l,a,n,e]),g=y.disabled??f;return r.jsx(N.Link,{...y,disabled:g,onClick:c?p:void 0,children:i})},Sn=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,items:l,closeOnClick:n,disabled:d,listOrigin:o,size:_,variant:u}=t,h=ut(e,s),f=x.useMemo(()=>l.map(y=>({icon:y.leftIcon,label:y.content??y.label??"",onClick:p=>{var g;(g=p==null?void 0:p.preventDefault)==null||g.call(p),h({responseKey:y.responseKey,actionType:y.actionType,dataSource:y.dataSource,redirectUrl:y.redirectUrl,dependencies:y.dependencies})}})),[l,h]);return r.jsx(N.Menu,{items:f,closeOnClick:n,disabled:d,listOrigin:o,size:_,variant:u})},On={modalContent:"_modalContent_p06ci_1"},Rn=({userFlow:t,pageId:e,responseKey:s,header:a,body:c,footer:i,headerStatusColor:l,...n})=>{const d=T(m=>{var b;return(b=m[t])==null?void 0:b.isModalOpen}),o=T(m=>{var b;return(b=m[t])==null?void 0:b.isLoading}),_=d&&!o,u={...n},h=(u==null?void 0:u.headerStatusColor)??l,f=x.useCallback(()=>{ft(t),mt(t,!1)},[t,s]),y=Array.isArray(a)?S(t,e,a):a,p=S(t,e,c),g=S(t,e,i);return r.jsx(N.Modal,{...u,headerStatusColor:h,header:typeof y=="string"?y:r.jsx(r.Fragment,{children:y.map((m,b)=>r.jsx(x.Fragment,{children:m},`modal-header-${b}`))}),children:r.jsx("section",{className:On.modalContent,children:p.map((m,b)=>r.jsx(x.Fragment,{children:m},`modal-body-${b}`))}),actions:r.jsx(r.Fragment,{children:g.map((m,b)=>r.jsx(x.Fragment,{children:m},`modal-footer-${b}`))}),open:_,onClose:f})},Dn=({userFlow:t,pageId:e})=>{var i,l;const s=me(t);if(!s)return null;const a=[...(s==null?void 0:s.components)||[],...((i=s==null?void 0:s.header)==null?void 0:i.components)||[],...((l=s==null?void 0:s.body)==null?void 0:l.components)||[]],c=S(t,e,a);return r.jsx(r.Fragment,{children:c==null?void 0:c.map((n,d)=>{const o=`overlay-${d}-${s==null?void 0:s.hash}`;return r.jsx(x.Fragment,{children:n},o)})})},Ln={success:{color:"success-opacity",textColor:"success-60",iconColor:"success-50"},warning:{color:"warning-opacity",textColor:"warning-60",iconColor:"warning-50"},error:{color:"error-opacity",textColor:"error-60",iconColor:"error-50"},info:{color:"primary-10",textColor:"primary-70",iconColor:"primary-70"},neutral:{color:"neutral-10",textColor:"neutral-70",iconColor:"neutral-70"}},In=t=>{const{content:e,variant:s="neutral",...a}=t,c=Ln[s],i={...a,children:e,color:(a==null?void 0:a.color)??c.color,textColor:(a==null?void 0:a.textColor)??c.textColor,iconColor:(a==null?void 0:a.iconColor)??c.iconColor};return r.jsx(N.Pill,{...i})},Mn=t=>{const{content:e}=t;return r.jsx(N.PreviewerMarkdown,{children:e})},Kn=t=>{const{userFlow:e,pageId:s,responseKey:a,actionType:c,dataSource:i,dependencies:l,onClick:n,...d}=t,o=ut(e,s),{disabled:_}=H(e,l),u={...d},h=(u==null?void 0:u.disabled)??_,[f,y]=x.useState(!1),p=x.useRef(!1),g=x.useCallback(async()=>{if(p.current)return;const m=c==="FETCH_DATA_SOURCE";m&&(p.current=!0,y(!0));try{await o({responseKey:a,actionType:c,dataSource:i,dependencies:l})}catch(b){console.error("[RoundButtonNotFront] Action failed:",b)}finally{m&&(p.current=!1,y(!1))}},[c,i,l,a,o]);return r.jsx(N.RoundButton,{...u,loading:u.loading||f,disabled:h,onClick:()=>!h&&!f&&(n??g)()})},q={row:"_row_1bqj4_1","row__gap-none":"_row__gap-none_1bqj4_5","row__gap-xxs":"_row__gap-xxs_1bqj4_8","row__gap-xs":"_row__gap-xs_1bqj4_11","row__gap-sm":"_row__gap-sm_1bqj4_14","row__gap-md":"_row__gap-md_1bqj4_17","row__gap-lg":"_row__gap-lg_1bqj4_20","row__gap-xl":"_row__gap-xl_1bqj4_23","row__gap-xxl":"_row__gap-xxl_1bqj4_26","row__gap-xxxl":"_row__gap-xxxl_1bqj4_29","row__justify-start":"_row__justify-start_1bqj4_32","row__justify-end":"_row__justify-end_1bqj4_35","row__justify-center":"_row__justify-center_1bqj4_38","row__justify-space-between":"_row__justify-space-between_1bqj4_41","row__justify-space-around":"_row__justify-space-around_1bqj4_44","row__justify-space-evenly":"_row__justify-space-evenly_1bqj4_47","row__align-start":"_row__align-start_1bqj4_50","row__align-end":"_row__align-end_1bqj4_53","row__align-center":"_row__align-center_1bqj4_56","row__align-stretch":"_row__align-stretch_1bqj4_59","row__align-baseline":"_row__align-baseline_1bqj4_62",row_column:"_row_column_1bqj4_65","row_column__gap-none":"_row_column__gap-none_1bqj4_72","row_column__gap-xxs":"_row_column__gap-xxs_1bqj4_75","row_column__gap-xs":"_row_column__gap-xs_1bqj4_78","row_column__gap-sm":"_row_column__gap-sm_1bqj4_81","row_column__gap-md":"_row_column__gap-md_1bqj4_84","row_column__gap-lg":"_row_column__gap-lg_1bqj4_87","row_column__gap-xl":"_row_column__gap-xl_1bqj4_90","row_column__gap-xxl":"_row_column__gap-xxl_1bqj4_93","row_column__gap-xxxl":"_row_column__gap-xxxl_1bqj4_96","row_column__justify-start":"_row_column__justify-start_1bqj4_99","row_column__justify-end":"_row_column__justify-end_1bqj4_102","row_column__justify-center":"_row_column__justify-center_1bqj4_105","row_column__justify-space-between":"_row_column__justify-space-between_1bqj4_108","row_column__justify-space-around":"_row_column__justify-space-around_1bqj4_111","row_column__justify-space-evenly":"_row_column__justify-space-evenly_1bqj4_114","row_column__align-start":"_row_column__align-start_1bqj4_117","row_column__align-end":"_row_column__align-end_1bqj4_120","row_column__align-center":"_row_column__align-center_1bqj4_123","row_column__align-stretch":"_row_column__align-stretch_1bqj4_126","row_column__align-baseline":"_row_column__align-baseline_1bqj4_129"},Zt=t=>{const{userFlow:e,pageId:s,columnWidth:a,columns:c,gap:i="md",justifyContent:l="start",alignItems:n="stretch"}=t,d=Array.isArray(c)?c.map((o,_)=>{const u=`col_${_}`,h=`col_${_}`;if(Array.isArray(o))return{gap:"md",justifyContent:"start",alignItems:"start",items:o,hash:u,responseKey:h};const f=o;return{gap:(f==null?void 0:f.gap)??"md",justifyContent:(f==null?void 0:f.justifyContent)??"start",alignItems:(f==null?void 0:f.alignItems)??"start",items:(f==null?void 0:f.items)??[],hash:(f==null?void 0:f.hash)??u,responseKey:(f==null?void 0:f.responseKey)??h}}):[];return d.length===0?null:r.jsx("div",{className:F(q.row,q[`row__gap-${i}`],q[`row__justify-${l}`],q[`row__align-${n}`]),children:d==null?void 0:d.map((o,_)=>{const u=(a==null?void 0:a[_])||`${100/d.length}%`,h=S(e,s,o.items);return!h||h.length===0?null:r.jsx("div",{className:F(q.row_column,q[`row_column__gap-${o.gap}`],q[`row_column__justify-${o.justifyContent}`],q[`row_column__align-${o.alignItems}`]),style:{width:u},children:h},o.hash||_)})})};function Ft({userFlow:t,pageId:e,responseKey:s,actionType:a,getNextUI:c,isMulti:i=!1,debounceMs:l}){const n=x.useRef(null);x.useEffect(()=>()=>{n.current!==null&&(clearTimeout(n.current),n.current=null)},[]);const d=x.useCallback(async _=>{var f;const u={...(f=T.getState()[t])==null?void 0:f.entries};if(_?(u[s]=_,I(t,u)):(delete u[s],ye(t,s)),a&&(a==="GO_TO_NEXT_UI"||a==="GO_TO_NEXT_UI_WITHOUT_LOADING"))try{const p=await c(t,e,u,s,a==="GO_TO_NEXT_UI");p!=null&&p.data&&B(t,p.data)}catch(y){console.error("[useSelectChange] Failed to fetch next UI",y)}},[t,e,s,a,c]);return x.useCallback(_=>{if(!i){d(_);return}if(l==null){d(_);return}n.current!==null&&(clearTimeout(n.current),n.current=null),n.current=setTimeout(()=>{d(_),n.current=null},l)},[i,l,d])}const Bn=/\{([^}]+)\}/g,Gn=(t,e)=>{var s;return e.includes("{")?e.replace(Bn,(a,c)=>{var l;const i=(l=G.query(t,c.trim()))==null?void 0:l[0];return i!=null?String(i):""}):(s=G.query(t,e))==null?void 0:s[0]},Hn=(t,e,s,a)=>{const c=G.query(t,e);return(c==null?void 0:c.map(i=>{var d;const l=Gn(i,s),n=a?(d=G.query(i,a))==null?void 0:d[0]:i;return{label:l,value:n}}))??[]},Un=(t,e,s,a=10)=>{var n,d;let c,i;if(s){const o=G.value(t,s.size??"$.meta.size")??a,_=G.value(t,s.total??"$.meta.total")??0;c=o,i=_}else{const o=t==null?void 0:t.meta;c=(o==null?void 0:o.size)??((n=o==null?void 0:o.page)==null?void 0:n.size)??a,i=(o==null?void 0:o.total)??((d=o==null?void 0:o.page)==null?void 0:d.total)??0}const l=i>0?Math.ceil(i/c)>e:!1;return{pageSize:c,total:i,hasMore:l}},Pt={selectNotFront:"_selectNotFront_ch3v5_1"},zn=({userFlow:t,pageId:e,responseKey:s,required:a,dataSource:c,actionType:i,dependencies:l,debounceMs:n,...d})=>{const o={...d},{getNextUI:_,fetchDataSource:u}=z(),[h,f]=x.useState((o==null?void 0:o.value)??""),{disabled:y}=H(t,l),p=(o==null?void 0:o.disabled)??y,g=x.useMemo(()=>a&&(o!=null&&o.label)?`${o==null?void 0:o.label} *`:(o==null?void 0:o.label)??"",[o==null?void 0:o.label,a]),m=x.useMemo(()=>{const C=o!=null&&o.isMulti?h:[h],k={};return Array.isArray(C)&&C.forEach(E=>{if(!E)return;const R=JSON.stringify(E.value),M=JSON.stringify(E.label);k[R]=E,M in k||(k[M]=E)}),k},[h]),b=Ft({userFlow:t,pageId:e,responseKey:s,actionType:i,getNextUI:_,isMulti:o==null?void 0:o.isMulti,debounceMs:n}),j=C=>{f(C),b(C)},w=async(C,k,{page:E})=>{const{jsonPathLabel:R,jsonPathOptions:M,jsonPathValue:K,jsonPathPagination:st}=c,X=pt(c,E,C),D=await u(X,t,!1),U=D==null?void 0:D.data,lt=U?Hn(U,M,R,K):[],{hasMore:wt}=Un(U,E,st);return{options:lt,hasMore:wt,additional:{page:E+1}}};return r.jsx(N.SelectPagination,{...o,className:Pt.selectNotFront,label:g,value:h,disabled:p,noOptionsMessage:()=>r.jsx(r.Fragment,{children:"Sin opciones"}),onChange:C=>!p&&j(C),loadOptions:w,additional:{page:1},isOptionDisabled:C=>{const k=JSON.stringify(C==null?void 0:C.value),E=JSON.stringify(C==null?void 0:C.label);return!!(m!=null&&m[k])||!!(m!=null&&m[E])},debounceTimeout:350})},Vn=({userFlow:t,pageId:e,responseKey:s,dataSource:a,required:c,actionType:i,dependencies:l,debounceMs:n,...d})=>{const o={...d},{getNextUI:_}=z(),[u,h]=x.useState(o.value||""),{disabled:f}=H(t,l),y=(o==null?void 0:o.disabled)??f,p=x.useMemo(()=>c&&(o!=null&&o.label)?`${o==null?void 0:o.label} *`:(o==null?void 0:o.label)??"",[o==null?void 0:o.label,c]),g=Ft({userFlow:t,pageId:e,responseKey:s,actionType:i,getNextUI:_,isMulti:o==null?void 0:o.isMulti,debounceMs:n}),m=b=>{h(b),g(b)};return r.jsx(N.Select,{...o,className:Pt.selectNotFront,label:p,value:u,disabled:y,onChange:b=>!y&&m(b)})},Xn=t=>{const{dataSource:e}=t;return e?r.jsx(zn,{...t}):r.jsx(Vn,{...t})},$t={spacing:"_spacing_19hqa_1",spacing__xxs:"_spacing__xxs_19hqa_1",spacing__xs:"_spacing__xs_19hqa_4",spacing__sm:"_spacing__sm_19hqa_7",spacing__md:"_spacing__md_19hqa_10",spacing__lg:"_spacing__lg_19hqa_13",spacing__xl:"_spacing__xl_19hqa_16",spacing__xxl:"_spacing__xxl_19hqa_19",spacing__xxxl:"_spacing__xxxl_19hqa_22"},Jn=t=>{const{size:e}=t,s=F($t.spacing,$t[`spacing__${e}`]);return r.jsx("div",{className:s})},Wn=t=>{const{userFlow:e,pageId:s,responseKey:a,actionType:c,label:i,value:l,required:n,dependencies:d,...o}=t,_={...o},{getNextUI:u}=z(),[h,f]=x.useState(l||!1),{disabled:y}=H(e,d),p=(_==null?void 0:_.disabled)??y,g=x.useMemo(()=>n&&i?`${i} *`:i??"",[i,n]),m=x.useCallback(async()=>{var b;try{const j=!h;f(j);const w={...(b=T.getState()[e])==null?void 0:b.entries,[a]:j};switch(I(e,w),c){case"GO_TO_NEXT_UI":case"GO_TO_NEXT_UI_WITHOUT_LOADING":{const k=await u(e,s,w,a,c==="GO_TO_NEXT_UI");k!=null&&k.data&&B(e,k==null?void 0:k.data);break}default:break}}catch(j){console.error("Error in switch action:",j),alert(JSON.stringify(j))}},[e,s,a,c,h]);return r.jsx(N.Switch,{..._,label:g,checked:h,disabled:p,onChange:()=>!p&&m()})},te={tableSkeleton:"_tableSkeleton_3nr9n_1",tableArrayPills:"_tableArrayPills_3nr9n_7"},qn=({values:t})=>{const s=t==null?void 0:t.slice(0,4),a=(t==null?void 0:t.length)-4;return r.jsxs("div",{className:te.tableArrayPills,children:[s.map((c,i)=>r.jsx(N.Pill,{children:String(c)},i)),a>0&&r.jsxs(N.Pill,{outlined:!0,children:["+",a]})]})},Yn=({userFlow:t,pageId:e,tableResponseKey:s,component:a,rowData:c})=>{const{getNextUI:i,fetchAndGetNextUI:l,fetchDataSource:n}=z(),d=S(t,e,[{...a}]),o=(d==null?void 0:d[0])||null;if(!o)return null;const{actionType:_,responseKey:u,dataSource:h}=o.props,f=x.useCallback(async()=>{var y,p,g;try{const m={...(y=T.getState()[t])==null?void 0:y.entries,[u]:{status:200},[s]:[{...c}]};switch(I(t,m),_){case"GO_TO_NEXT_UI":{const b=await i(t,e,m,u);b!=null&&b.data&&B(t,b==null?void 0:b.data);break}case"FETCH_AND_GO_TO_NEXT_UI":{const b=await l(t,e,m,u,h);b!=null&&b.data&&B(t,b==null?void 0:b.data);break}case"GET_DATA_SOURCE":{const b=await i(t,e,m,u),j=(p=b==null?void 0:b.data)==null?void 0:p.content;if((j==null?void 0:j.type)!=="fetch")break;const w=j==null?void 0:j.dataSource,C=await n(w,t,!1),k={...(g=T.getState()[t])==null?void 0:g.entries,[u]:{status:C==null?void 0:C.status,content:C==null?void 0:C.data}};I(t,k);const E=await i(t,e,k,u);E!=null&&E.data&&B(t,E==null?void 0:E.data);break}default:console.warn(`Unhandled actionType: ${_}`);break}}catch(m){alert(JSON.stringify(m))}},[_,h,e,u,t]);return x.cloneElement(o,{onClick:f})},Qn=()=>r.jsx("div",{className:te.tableSkeleton,children:[...Array(10)].map((t,e)=>r.jsx(N.SkeletonBase,{maxWidth:"100%",height:42,radius:8},`tableSkeletonBase${e}`))}),Zn=(t,e)=>!(e!=null&&e.length)||!t?t:t.map(s=>e.some(c=>Array.isArray(s!=null&&s.accessor?c[s==null?void 0:s.accessor]:void 0))?{...s,renderCell:c=>{const i=s.accessor?c[s.accessor]:void 0;return Array.isArray(i)?r.jsx(qn,{values:i}):i??""}}:s),Fn=({userFlow:t,pageId:e,responseKey:s,component:a,dataSource:c,rightActions:i,data:l,pageSize:n,...d})=>{var st,X;const{fetchDataSource:o}=z(),[_,u]=x.useState(!1),[h,f]=x.useState(1),[y,p]=x.useState(null),g=!c&&Array.isArray(l),m=!!(c!=null&&c.jsonPathCursorPagination)&&!!((st=c==null?void 0:c.jsonPathPagination)!=null&&st.hasMore),b=x.useRef(new Map([[1,null]])),j=x.useMemo(()=>{if(i!=null&&i.length)return i.map((D,U)=>({renderContent:lt=>r.jsx(Yn,{userFlow:t,pageId:e,tableResponseKey:s,component:D,rowData:lt},`tableRowAction${U}`)}))},[i,t,e,s]),w=async(D=1)=>{if(!c)return;const{mapperData:U,jsonPathData:lt,jsonPathPagination:wt,jsonPathCursorPagination:it}=c;if(it&&D!==1&&!b.current.has(D)){f(1),w(1);return}it&&D===1&&(b.current=new Map([[1,null]]));try{u(!0);const Nt=it?b.current.get(D)??null:null,is=pt(c,D,void 0,Nt),at=await o(is,t,!1);if(p(Vt(at==null?void 0:at.data,lt,U,wt)),it){const ce=Ye(at==null?void 0:at.data,it);ce&&b.current.set(D+1,ce)}u(!1)}catch(Nt){console.error("[TableNotFront] fetchData:",Nt),u(!1)}},C=D=>{f(D),w(D)};x.useEffect(()=>{g||w()},[]);const k=g?l:y==null?void 0:y.items,E=g&&!!n&&((l==null?void 0:l.length)??0)>n,R=x.useMemo(()=>{if(!E||!l||!n)return k??[];const D=(h-1)*n;return l.slice(D,D+n)},[E,l,n,h,k]),M=x.useMemo(()=>Zn(d.columns,k),[k,d.columns]),K={...d,data:R,columns:M??[],rightActions:j};return g?!k||k.length===0?r.jsx(N.CardNotification,{state:"info",title:"Sin registros",children:"No hay datos disponibles para mostrar en este momento"}):r.jsxs(r.Fragment,{children:[r.jsx(N.Table,{...K}),E&&n&&l&&r.jsx(N.Pager,{classname:{global:"row__end"},page:h,size:n,total:l.length,onChange:f})]}):r.jsx(r.Fragment,{children:_?r.jsx(Qn,{}):y&&((X=y==null?void 0:y.items)==null?void 0:X.length)>0?r.jsxs(r.Fragment,{children:[r.jsx(N.Table,{...K}),!m&&(y==null?void 0:y.pagination)&&y.pagination.totalPages>1&&r.jsx(N.Pager,{classname:{global:"row__end"},page:h,size:y.pagination.size,total:y.pagination.total,onChange:C}),m&&(y==null?void 0:y.pagination)&&r.jsx(N.Pager,{variant:"cursor",classname:{global:"row__end"},page:h,hasNextPage:!!y.pagination.hasMore,onChange:C})]}):r.jsx(N.CardNotification,{state:"info",title:"Sin registros",children:"No hay datos disponibles para mostrar en este momento"})})},Pn={tabsPanel:"_tabsPanel_kvslb_1"},$n=({userFlow:t,pageId:e,components:s})=>{const a=S(t,e,s);return a!=null&&a.length?r.jsx("section",{className:Pn.tabsPanel,children:a.map((c,i)=>r.jsx(x.Fragment,{children:c},`tabs-panel-${i}`))}):null},ts=({userFlow:t,pageId:e,hash:s,items:a,activeIndex:c,className:i,responseKey:l})=>{const n=a.map((o,_)=>({label:o.label,disabled:o.disabled,children:r.jsx($n,{userFlow:t,pageId:e,components:o.components},`${s}-tab-${_}`)})),d=o=>{var u;const _={...(u=T.getState()[t])==null?void 0:u.entries,[l]:o};I(t,_)};return r.jsx(N.Tabs,{className:i,activeIndex:c,items:n,onClick:d})},es=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,required:l,dependencies:n,...d}=t,o={...d},[_,u]=x.useState((o==null?void 0:o.value)??""),{disabled:h}=H(e,n),f=(o==null?void 0:o.disabled)??h,y=x.useMemo(()=>l&&(o!=null&&o.label)?`${o.label} *`:(o==null?void 0:o.label)??"",[o==null?void 0:o.label,l]),p=g=>{var b;const m=(b=g==null?void 0:g.target)==null?void 0:b.value;u(m),I(e,{[i]:m})};return x.useEffect(()=>{u((o==null?void 0:o.value)??"")},[o==null?void 0:o.value]),r.jsx(N.Textarea,{...o,label:y,value:_,disabled:f,onChange:g=>!f&&p(g)})},ns={textFieldNotFront:"_textFieldNotFront_1n8fy_1"},ss=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,required:l,dependencies:n,...d}=t,o={...d},[_,u]=x.useState((o==null?void 0:o.value)??""),{disabled:h}=H(e,n),f=(o==null?void 0:o.disabled)??h,y=x.useMemo(()=>l&&(o!=null&&o.label)?`${o==null?void 0:o.label} *`:(o==null?void 0:o.label)??"",[o==null?void 0:o.label,l]),p=g=>{var j;const m=(j=g==null?void 0:g.target)==null?void 0:j.value;u(m);const b={[i]:m};I(e,b)};return x.useEffect(()=>{u((o==null?void 0:o.value)??"")},[o==null?void 0:o.value]),r.jsx(N.TextField,{...o,className:ns.textFieldNotFront,allowClear:!1,label:y,value:_,disabled:f,onChange:g=>!f&&p(g)})},as=({userFlow:t,pageId:e,responseKey:s,variant:a,content:c,actionType:i,redirectUrl:l})=>{const n=x.useCallback(async()=>{ft(t);try{switch(i){case"AUTOCLOSE_AND_REDIRECT":window.location.href=l;break;default:console.warn(`Unhandled actionType: ${i}`);break}}catch(d){console.error("Error in toast action:",d),alert(JSON.stringify(d))}},[i,e,s,t,l]);return x.useEffect(()=>{({info:N.toast.info,error:N.toast.error,success:N.toast.success,warning:N.toast.warning}[a]||N.toast.info)(c,{autoClose:i?!1:4e3,containerId:t,onClose:n})},[n,t]),null},ee={tooltipNotFront:"_tooltipNotFront_106iw_1",tooltipNotFront_content:"_tooltipNotFront_content_106iw_5"},os=t=>{const{userFlow:e,pageId:s,component:a,hash:c,responseKey:i,content:l,label:n,placement:d,notShowArrow:o,visible:_}=t,u=S(e,s,l!=null&&l.length?l:null),h=u&&u.length>0?r.jsx("div",{className:ee.tooltipNotFront_content,children:u.map((f,y)=>r.jsx(x.Fragment,{children:f},`tooltip-${c}-${y}`))}):null;return r.jsx(N.Tooltip,{className:ee.tooltipNotFront,label:n,placement:d,notShowArrow:o,visible:_,children:h})};function rs({sessionName:t,apiConfig:e,onResolveComponentProps:s,children:a}){const c=re(t,e,null,s);return r.jsxs(r.Fragment,{children:[c,a]})}const cs={api:"",headers:{}},ne=({userFlow:t,components:e,hash:s,apiConfig:a})=>{const c=s??`${t}-page`;x.useState(()=>{var d,o;return(o=(d=T.getState()[t])==null?void 0:d.pages)!=null&&o[c]||dt(t,a??cs,{type:"page",hash:c,body:{components:e}}),null});const i=S(t,c,e);return r.jsx(r.Fragment,{children:i})};function se(t){if(t==null||typeof t!="object"||!("components"in t)||!Array.isArray(t.components))throw new Error("[renderNotFront] payload.display must be an object with a `components` array");return t.components}const ae=({payload:t,userFlow:e})=>{const s=se(t.display),a=ne({userFlow:e,hash:t.id,components:s});return r.jsx(r.Fragment,{children:a})},ls=ae,oe=(t,e,s,a,c)=>{const i=S(t,e,(a==null?void 0:a.components)||null,c);switch(s){case"body":return r.jsx(Le,{...a,inputs:i||[]},JSON.stringify(a==null?void 0:a.components));case"header":return r.jsx(An,{...a,components:i||[]},JSON.stringify(a==null?void 0:a.components));default:return null}},re=(t,e,s,a)=>{var h,f,y;const[c,i]=x.useState(!1),l=T(p=>p),n=(h=l[t])==null?void 0:h.currentPageId;x.useEffect(()=>{if(typeof window>"u")return;const p=new URL(window.location.href),g=p.searchParams.get("sessionId");g&&(sessionStorage.setItem("sessionId",g),p.searchParams.delete("sessionId"),window.history.replaceState({},"",p.toString()))},[]);const d=n?oe(t,n,"header",((f=l[t].pages[n].page)==null?void 0:f.header)||null,a):null,o=n?oe(t,n,"body",((y=l[t].pages[n].page)==null?void 0:y.body)||null,a):null,_=x.useMemo(()=>{var p;return r.jsxs(r.Fragment,{children:[((p=l[t])==null?void 0:p.isLoading)&&r.jsx(N.Loading,{}),d,o,n&&r.jsx(Dn,{userFlow:t,pageId:n}),l[t]&&r.jsx(N.Toaster,{})]})},[d,o,n,t]),u=async()=>{try{const p=await Kt(e,t),g=p==null?void 0:p.data,m=g==null?void 0:g.content;(p==null?void 0:p.status)===200?dt(t,e,m,g==null?void 0:g.sessionState):i(!0)}catch(p){console.error("[not-page]: API call failed",p),i(!0)}};return x.useEffect(()=>{e!=null&&e.api&&!s&&t?u():!(e!=null&&e.api)&&s&&t||e!=null&&e.api&&s&&t?dt(t,e,s):(!(e!=null&&e.api)&&!s||!t)&&(i(!0),console.error("[not-page]: API call failed","not api config","not userFlow"));const p="avocado-theme-mode-changed",g=m=>{const b=m.detail;N.ThemeStore.setThemeMode(b)};return window.addEventListener(p,g),()=>{window.removeEventListener(p,g)}},[]),c&&console.error("[not-page]: No render page"),_};v.Chart=qt,v.NotFrontPage=rs,v.RenderNotFront=ae,v.Row=Zt,v.extractNotFrontComponents=se,v.heading=Dt,v.renderNotFront=ls,v.text=Lt,v.useNotFrontFragment=ne,v.usePage=re,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -8,6 +8,8 @@ export declare const scrollableChartTypes: Set<ChartType>;
|
|
|
8
8
|
export declare const chartRegistry: {
|
|
9
9
|
area: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
bar: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
composed: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
donut: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
horizontalBar: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
line: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
mixBar: (config: import("./chart.types").ChartConfig) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
export type ChartType = 'bar' | 'line' | 'area' | 'pie' | 'horizontalBar' | 'mixBar';
|
|
1
|
+
export type ChartType = 'bar' | 'line' | 'area' | 'pie' | 'donut' | 'horizontalBar' | 'mixBar' | 'composed';
|
|
2
|
+
export type ComposedSeriesType = 'bar' | 'line' | 'area';
|
|
2
3
|
export interface ChartSeriesConfig {
|
|
3
4
|
key: string;
|
|
5
|
+
/** Series geometry (`composed` only). */
|
|
6
|
+
type?: ComposedSeriesType;
|
|
4
7
|
stackId?: string;
|
|
5
8
|
label?: string;
|
|
6
9
|
color?: string;
|
|
10
|
+
/** Links series to a Y axis (`composed` with dual axis). */
|
|
11
|
+
yAxisId?: string;
|
|
12
|
+
/** Bar thickness in px (`composed` bar series). */
|
|
13
|
+
barSize?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ChartYAxisConfig {
|
|
16
|
+
id: string;
|
|
17
|
+
orientation?: 'left' | 'right';
|
|
7
18
|
}
|
|
8
19
|
export interface TooltipCoverageConfig {
|
|
9
20
|
numeratorKey: string;
|
|
@@ -14,6 +25,7 @@ export interface ChartTheme {
|
|
|
14
25
|
fontFamily: string;
|
|
15
26
|
fontSize: number;
|
|
16
27
|
labelColor: string;
|
|
28
|
+
labelColorMuted: string;
|
|
17
29
|
tooltipBg: string;
|
|
18
30
|
tooltipColor: string;
|
|
19
31
|
tooltipBorderRadius: string;
|
|
@@ -41,4 +53,14 @@ export interface ChartConfig {
|
|
|
41
53
|
yKeyLabels?: Record<string, string>;
|
|
42
54
|
/** Width in px for the category Y axis (`horizontalBar` only). Auto-computed when omitted. */
|
|
43
55
|
yAxisWidth?: number;
|
|
56
|
+
/** Y-axis definitions for dual-axis composed charts. */
|
|
57
|
+
yAxes?: ChartYAxisConfig[];
|
|
58
|
+
/** Inner radius of donut (`donut` only). Number in px or percent string (e.g. `"55%"`). */
|
|
59
|
+
innerRadius?: number | string;
|
|
60
|
+
/** Outer radius of donut in px (`donut` only). Default `120`. */
|
|
61
|
+
outerRadius?: number;
|
|
62
|
+
/** Hover-to-highlight active slice with callout labels (`donut` only). Default `true`. */
|
|
63
|
+
activeShape?: boolean;
|
|
64
|
+
/** Initial highlighted slice index (`donut` only). */
|
|
65
|
+
defaultIndex?: number;
|
|
44
66
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { AreaChart } from './AreaChart';
|
|
2
2
|
import { BarChart } from './BarChart';
|
|
3
|
+
import { ComposedChart } from './ComposedChart';
|
|
4
|
+
import { DonutChart } from './DonutChart';
|
|
3
5
|
import { HorizontalBarChart } from './HorizontalBarChart';
|
|
4
6
|
import { LineChart } from './LineChart';
|
|
5
7
|
import { MixBarChart } from './MixBarChart';
|
|
6
8
|
import { PieChart } from './PieChart';
|
|
7
|
-
export { AreaChart, BarChart, HorizontalBarChart, MixBarChart, LineChart, PieChart, };
|
|
9
|
+
export { AreaChart, BarChart, ComposedChart, DonutChart, HorizontalBarChart, MixBarChart, LineChart, PieChart, };
|
|
@@ -2,6 +2,13 @@ import type { TooltipCoverageConfig } from '../chart.types';
|
|
|
2
2
|
interface TooltipProps {
|
|
3
3
|
tooltipKey?: string;
|
|
4
4
|
tooltipCoverage?: TooltipCoverageConfig;
|
|
5
|
+
/** Initial highlighted item index before user interaction. */
|
|
6
|
+
defaultIndex?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Keep Tooltip mounted for slice activation but render no floating box.
|
|
9
|
+
* Use with donut `activeShape` so hover drives the active slice renderer.
|
|
10
|
+
*/
|
|
11
|
+
hideContent?: boolean;
|
|
5
12
|
}
|
|
6
|
-
export declare const Tooltip: ({ tooltipKey, tooltipCoverage, }?: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const Tooltip: ({ tooltipKey, tooltipCoverage, defaultIndex, hideContent, }?: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
14
|
export {};
|
|
@@ -2,6 +2,8 @@ interface YAxisProps {
|
|
|
2
2
|
type?: 'number' | 'category';
|
|
3
3
|
dataKey?: string;
|
|
4
4
|
width?: number;
|
|
5
|
+
yAxisId?: string;
|
|
6
|
+
orientation?: 'left' | 'right';
|
|
5
7
|
}
|
|
6
|
-
export declare const YAxis: ({ type, dataKey, width }?: YAxisProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const YAxis: ({ type, dataKey, width, yAxisId, orientation, }?: YAxisProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AccordionProps, ButtonProps, CardAccordionProps, CardNotificationProps, CheckboxProps, DividerProps, DrawerProps, HeadingProps, LinkProps, ModalProps, PillProps, PreviewerMarkdownProps, RoundButtonProps, SelectProps, SwitchProps, TableProps, TabsProps, TextareaProps, TextFieldProps, TextProps } from '../../../avocado-suite';
|
|
2
2
|
import type { AiAgentTheme, ChatPanelTranslations, SuggestionType, SupportedLocale } from '../../../ai-agent';
|
|
3
3
|
import type { TooltipCoverageConfig } from '../components/chart/chart.types';
|
|
4
|
-
import type { ChartSeriesConfig } from '../components/chart/chart.types';
|
|
4
|
+
import type { ChartSeriesConfig, ChartYAxisConfig } from '../components/chart/chart.types';
|
|
5
5
|
import { NotFrontActionType, NotFrontBaseProps, NotFrontDataSource, NotFrontDataSourceChart, NotFrontDataSourceRest, NotFrontDataSourceSelect, NotFrontDataSourceTable, NotFrontDependency } from './componentsCore.type';
|
|
6
6
|
/**
|
|
7
7
|
* Suite `Box`: single `content` slot; `darkMode` is derived in the wrapper.
|
|
@@ -16,7 +16,7 @@ export interface BoxNotFrontProps extends NotFrontBaseProps {
|
|
|
16
16
|
export interface ChartNotFrontProps extends NotFrontBaseProps {
|
|
17
17
|
component: 'chart';
|
|
18
18
|
/** Chart type */
|
|
19
|
-
type: 'area' | 'bar' | 'line' | 'pie' | 'horizontalBar' | 'mixBar';
|
|
19
|
+
type: 'area' | 'bar' | 'line' | 'pie' | 'donut' | 'horizontalBar' | 'mixBar' | 'composed';
|
|
20
20
|
/** Data source to load data for chart. */
|
|
21
21
|
dataSource: NotFrontDataSourceChart;
|
|
22
22
|
/** Chart data */
|
|
@@ -25,7 +25,7 @@ export interface ChartNotFrontProps extends NotFrontBaseProps {
|
|
|
25
25
|
xKey: string;
|
|
26
26
|
/** Keys for the y-axis */
|
|
27
27
|
yKeys: string[];
|
|
28
|
-
/** Per-series configuration for mixBar
|
|
28
|
+
/** Per-series configuration for `mixBar` and `composed` charts. */
|
|
29
29
|
series?: ChartSeriesConfig[];
|
|
30
30
|
/** Optional field for custom tooltip values. */
|
|
31
31
|
tooltipKey?: string;
|
|
@@ -43,6 +43,16 @@ export interface ChartNotFrontProps extends NotFrontBaseProps {
|
|
|
43
43
|
yKeyLabels?: Record<string, string>;
|
|
44
44
|
/** Width in px for the category Y axis (`horizontalBar` only). Auto-computed when omitted. */
|
|
45
45
|
yAxisWidth?: number;
|
|
46
|
+
/** Y-axis definitions for dual-axis `composed` charts. */
|
|
47
|
+
yAxes?: ChartYAxisConfig[];
|
|
48
|
+
/** Inner radius of donut (`donut` only). Number in px or percent string (e.g. `"55%"`). */
|
|
49
|
+
innerRadius?: number | string;
|
|
50
|
+
/** Outer radius of donut in px (`donut` only). Default `120`. */
|
|
51
|
+
outerRadius?: number;
|
|
52
|
+
/** Hover-to-highlight active slice with callout labels (`donut` only). Default `true`. */
|
|
53
|
+
activeShape?: boolean;
|
|
54
|
+
/** Initial highlighted slice index (`donut` only). */
|
|
55
|
+
defaultIndex?: number;
|
|
46
56
|
}
|
|
47
57
|
/**
|
|
48
58
|
* Represents a single breadcrumb item for the NotFront component
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foris/avocado-not-front",
|
|
3
|
-
"version": "5.1
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"recharts": "3.1.0",
|
|
57
57
|
"zustand": "4.5.4",
|
|
58
58
|
"@uiw/react-codemirror": "4.23.12",
|
|
59
|
-
"@foris/ai-agent": "1.1.2",
|
|
60
59
|
"@foris/avocado-core": "1.3.2",
|
|
60
|
+
"@foris/ai-agent": "1.1.2",
|
|
61
61
|
"@foris/avocado-icons": "1.16.8",
|
|
62
|
-
"@foris/
|
|
63
|
-
"@foris/
|
|
62
|
+
"@foris/tsconfig": "0.0.2",
|
|
63
|
+
"@foris/avocado-suite": "1.8.20"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@codemirror/lang-json": ">=6.0.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@foris/ai-agent": "1.1.2",
|
|
82
82
|
"@foris/avocado-core": "1.3.2",
|
|
83
83
|
"@foris/avocado-icons": "1.16.8",
|
|
84
|
-
"@foris/avocado-suite": "1.8.
|
|
84
|
+
"@foris/avocado-suite": "1.8.20"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"build": "tsc && vite build",
|