@odigos/ui-kit 0.0.297 → 0.0.298

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.298](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.297...ui-kit-v0.0.298) (2026-09-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * bump @babel/core from 7.29.7 to 8.0.0 ([#1059](https://github.com/odigos-io/ui-kit/issues/1059)) ([273ff21](https://github.com/odigos-io/ui-kit/commit/273ff21c82c0b1edad0c09586e73e64a2e793e99))
9
+
3
10
  ## [0.0.297](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.296...ui-kit-v0.0.297) (2026-09-08)
4
11
 
5
12
 
@@ -1,4 +1,4 @@
1
- import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{Fragment as n,useMemo as o,useContext as a,createContext as s}from"react";import{T as i,t as u,b as l,P as c}from"./ui-components-ChTo9ZLp.js";import p from"styled-components";var d;(e=>{e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"})(d||(d={}));const f=[d.Action,d.Endpoint,d.Scope,d.Duration],h=p.span`
1
+ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{Fragment as n,useMemo as o,useContext as a,createContext as s}from"react";import{T as i,t as u,b as l,P as c}from"./ui-components-mqa1Nv5H.js";import p from"styled-components";var d;(e=>{e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"})(d||(d={}));const f=[d.Action,d.Endpoint,d.Scope,d.Duration],h=p.span`
2
2
  font-family: ${({theme:e,$isMono:t})=>t?e.font_family.secondary:e.font_family.primary};
3
3
  font-size: ${({theme:e})=>e.v2.text.size.xxs}px;
4
4
  line-height: 20px;
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import r,{css as l,useTheme as n}from"styled-components";import i from"elkjs/lib/elk.bundled.js";import o,{useMemo as s,useRef as c,useCallback as d,useState as p,memo as u,useEffect as h,Fragment as g,forwardRef as m,useImperativeHandle as v}from"react";import{Handle as f,Position as b,useReactFlow as y,ReactFlowProvider as x,ReactFlow as $,Background as C,getSmoothStepPath as k,BaseEdge as S,EdgeLabelRenderer as w,MarkerType as T}from"@xyflow/react";import{D as M,c as L,F as A,d as P,e as O,f as E,g as N,h as I,B as R,i as V,j as X,k as z,u as D,l as _,m as H,C as B,N as j,n as F,W as q,o as U,p as G,V as W,q as K,r as Y,s as Z,v as J,w as Q,x as ee,y as te,z as ae,I as re,E as le,G as ne,H as ie,J as oe,K as se,L as ce,M as de,S as pe,O as ue,Q as he,U as ge,X as me,Y as ve,Z as fe,_ as be,$ as ye,a0 as xe,a1 as $e,a2 as Ce,a3 as ke,a4 as Se,a5 as we,a6 as Te,a7 as Me,a8 as Le,a9 as Ae,aa as Pe,T as Oe,ab as Ee,ac as Ne,ad as Ie,ae as Re,af as Ve,ag as Xe,ah as ze,ai as De,aj as _e,ak as He,al as Be,am as je,an as Fe,b as qe,ao as Ue,ap as Ge,aq as We,ar as Ke,as as Ye,at as Ze,au as Je,av as Qe,aw as et,ax as tt,ay as at,az as rt,aA as lt,aB as nt,aC as it,aD as ot,aE as st,aF as ct,aG as dt,aH as pt,aI as ut,aJ as ht,aK as gt,aL as mt,aM as vt,aN as ft,aO as bt,aP as yt,aQ as xt,aR as $t,aS as Ct,aT as kt,aU as St,aV as wt,aW as Tt,aX as Mt,aY as Lt,aZ as At,a_ as Pt,a$ as Ot,b0 as Et,b1 as Nt,b2 as It,b3 as Rt,b4 as Vt,b5 as Xt,b6 as zt,R as Dt,b7 as _t,b8 as Ht,A as Bt,b9 as jt,ba as Ft}from"./ui-components-ChTo9ZLp.js";import{UserIcon as qt,DestinationIcon as Ut,HomeIcon as Gt,VIcon as Wt,TrashIcon as Kt,PlusIcon as Yt,VSquareIcon as Zt,XSquareIcon as Jt,EditIcon as Qt,OdigosLogoTextCentral as ea,OdigosLogoTextEnterprise as ta,OdigosLogoTextCommunity as aa,OdigosLogoTextColoredCentral as ra,OdigosLogoTextColoredEnterprise as la,OdigosLogoTextColoredCommunity as na,ArrowLeftIcon as ia,ArrowRightIcon as oa,CopyIcon as sa,YamlIcon as ca}from"../icons.js";import"@xyflow/react/dist/style.css";import{i as da,m as pa,u as ua,n as ha,a as ga,C as ma,b as va,d as fa,e as ba,f as ya,g as xa,h as $a,j as Ca,k as ka}from"./helpers-BAKrBm6o.js";const Sa=/^[a-zA-Z]$/,wa=new Set(["*","+","?"]),Ta=new Set(["^","$"]),Ma={group:"rgba(102, 242, 102, 0.5)","anchor-quantifier":"rgba(102, 191, 255, 0.5)","class-bracket":"rgba(255, 153, 153, 0.5)","class-content":"rgba(178, 1, 1, 0.5)",alternation:"rgba(255, 153, 153, 0.5)",literal:"transparent"},La=r.div`
1
+ import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import r,{css as l,useTheme as n}from"styled-components";import i from"elkjs/lib/elk.bundled.js";import o,{useMemo as s,useRef as c,useCallback as d,useState as p,memo as u,useEffect as h,Fragment as g,forwardRef as m,useImperativeHandle as v}from"react";import{Handle as f,Position as b,useReactFlow as y,ReactFlowProvider as x,ReactFlow as $,Background as C,getSmoothStepPath as k,BaseEdge as S,EdgeLabelRenderer as w,MarkerType as T}from"@xyflow/react";import{D as M,c as L,F as A,d as P,e as O,f as E,g as N,h as I,B as R,i as V,j as X,k as z,u as D,l as _,m as H,C as B,N as j,n as F,W as q,o as U,p as G,V as W,q as K,r as Y,s as Z,v as J,w as Q,x as ee,y as te,z as ae,I as re,E as le,G as ne,H as ie,J as oe,K as se,L as ce,M as de,S as pe,O as ue,Q as he,U as ge,X as me,Y as ve,Z as fe,_ as be,$ as ye,a0 as xe,a1 as $e,a2 as Ce,a3 as ke,a4 as Se,a5 as we,a6 as Te,a7 as Me,a8 as Le,a9 as Ae,aa as Pe,T as Oe,ab as Ee,ac as Ne,ad as Ie,ae as Re,af as Ve,ag as Xe,ah as ze,ai as De,aj as _e,ak as He,al as Be,am as je,an as Fe,b as qe,ao as Ue,ap as Ge,aq as We,ar as Ke,as as Ye,at as Ze,au as Je,av as Qe,aw as et,ax as tt,ay as at,az as rt,aA as lt,aB as nt,aC as it,aD as ot,aE as st,aF as ct,aG as dt,aH as pt,aI as ut,aJ as ht,aK as gt,aL as mt,aM as vt,aN as ft,aO as bt,aP as yt,aQ as xt,aR as $t,aS as Ct,aT as kt,aU as St,aV as wt,aW as Tt,aX as Mt,aY as Lt,aZ as At,a_ as Pt,a$ as Ot,b0 as Et,b1 as Nt,b2 as It,b3 as Rt,b4 as Vt,b5 as Xt,b6 as zt,R as Dt,b7 as _t,b8 as Ht,A as Bt,b9 as jt,ba as Ft}from"./ui-components-mqa1Nv5H.js";import{UserIcon as qt,DestinationIcon as Ut,HomeIcon as Gt,VIcon as Wt,TrashIcon as Kt,PlusIcon as Yt,VSquareIcon as Zt,XSquareIcon as Jt,EditIcon as Qt,OdigosLogoTextCentral as ea,OdigosLogoTextEnterprise as ta,OdigosLogoTextCommunity as aa,OdigosLogoTextColoredCentral as ra,OdigosLogoTextColoredEnterprise as la,OdigosLogoTextColoredCommunity as na,ArrowLeftIcon as ia,ArrowRightIcon as oa,CopyIcon as sa,YamlIcon as ca}from"../icons.js";import"@xyflow/react/dist/style.css";import{i as da,m as pa,u as ua,n as ha,a as ga,C as ma,b as va,d as fa,e as ba,f as ya,g as xa,h as $a,j as Ca,k as ka}from"./helpers-DIbaWh5d.js";const Sa=/^[a-zA-Z]$/,wa=new Set(["*","+","?"]),Ta=new Set(["^","$"]),Ma={group:"rgba(102, 242, 102, 0.5)","anchor-quantifier":"rgba(102, 191, 255, 0.5)","class-bracket":"rgba(255, 153, 153, 0.5)","class-content":"rgba(178, 1, 1, 0.5)",alternation:"rgba(255, 153, 153, 0.5)",literal:"transparent"},La=r.div`
2
2
  padding: 8px 16px;
3
3
  border-radius: 6px;
4
4
  border: 1px solid ${({theme:e})=>e.v2.colors.silver[500]};
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useMemo as a,useContext as r,createContext as n,useCallback as s,useState as o,useEffect as i,useRef as l}from"react";import{t as c,bb as d,bc as u,p as m,S,bd as p,be as E,bf as I,P as T,bg as f,bh as y,bi as _,bj as h,bk as g,bl as N,bm as v,bn as A,bo as R,bp as O,bq as C,br as G,bs as D,bt as b,bu as L,bv as w,bw as P,b3 as U,bx as F,by as k,q as M,bz as H,bA as x,bB as $,bC as K,bD as V,bE as B,E as Y,bF as W,h as j,Q as q,bG as Q,T as z,bH as J,bI as X,bJ as Z,bK as ee,bL as te,bM as ae,bN as re,bO as ne,bP as se,bQ as oe,bR as ie,bS as le,bT as ce,bU as de,bV as ue,bW as me,bX as Se,bY as pe,bZ as Ee,b_ as Ie,b$ as Te,ak as fe,ag as ye,ai as _e,ah as he,aj as ge,af as Ne,c0 as ve,b as Ae}from"./ui-components-ChTo9ZLp.js";import{i as Re,n as Oe,m as Ce,l as Ge,o as De,p as be,v as Le,q as we,u as Pe}from"./helpers-BAKrBm6o.js";import{ApolloProvider as Ue,useLazyQuery as Fe,useApolloClient as ke,useQuery as Me}from"@apollo/client/react";import{ErrorLink as He}from"@apollo/client/link/error";import{SetContextLink as xe}from"@apollo/client/link/context";import{getMainDefinition as $e}from"@apollo/client/utilities";import{CombinedGraphQLErrors as Ke,ServerError as Ve}from"@apollo/client/errors";import{HttpLink as Be,ApolloLink as Ye,ApolloClient as We,InMemoryCache as je,gql as qe}from"@apollo/client";const Qe=e=>{if(!e)return!1;const t=e.toLowerCase();return t.includes("authentication required")||t.includes("authentication expired")||t.includes("http 401")},ze=n(null),Je=()=>{const e=r(ze);if(!e)throw new Error("[ui-kit] useOdigosApi() / useXxxApi() called outside of <OdigosApiProvider>. Make sure the host app mounts the provider at its layout level.");return e},Xe=({apolloConfig:t,operations:r,context:n,children:s})=>{const o=a(()=>(e=>{const t=new Be({uri:e.httpUrl,credentials:e.credentials??"same-origin"}),a=new He(({error:t})=>{Ke.is(t)?t.errors.some(e=>Qe(e.message))&&e.onAuthError?.():(Ve.is(t)&&401===t.statusCode||Qe(t.message))&&e.onAuthError?.()}),r=new xe(async t=>{const a={...t.headers};if(e.authHeader){const t=await e.authHeader();Object.assign(a,t)}return e.csrfHeader&&Object.assign(a,e.csrfHeader()),{headers:a}}),n=[];e.additionalLinks?.length&&n.push(...e.additionalLinks),n.push(r,a,t);let s=Ye.from(n);e.wsLink&&(s=Ye.split(({query:e})=>{const t=$e(e);return"OperationDefinition"===t.kind&&"subscription"===t.operation},e.wsLink,s));const o=e.defaultFetchPolicies;return new We({link:s,cache:new je({typePolicies:e.cacheTypePolicies}),defaultOptions:{watchQuery:{fetchPolicy:o?.watchQuery??"cache-and-network"},query:{fetchPolicy:o?.query??"cache-first"},mutate:{fetchPolicy:o?.mutate??"network-only"}}})})(t),[t.httpUrl,t.wsLink,t.credentials,t.clientKey]),i=a(()=>({operations:r,context:n,apolloConfig:t}),[r,n,t]);return e(Ue,{client:o,children:e(ze.Provider,{value:i,children:s})})},Ze=ze,et=e=>e.map(e=>`${e.id}:${e.odigosVersion}:${e.type}`).join(","),tt=(e,t,a)=>{const r=t.length?t.map(e=>e.id):a??[],n={...e,connectionIds:r};if(!t.length||c(e.version)>0)return n;const s=t[0];return{...n,version:s.odigosVersion||e.version,platformType:s.type??e.platformType}},at=({connections:t,connectionIds:r,children:n})=>{const s=Je(),o=a(()=>({operations:s.operations,context:tt(s.context,t,r),apolloConfig:s.apolloConfig}),[s.operations,s.context,s.apolloConfig,et(t),r?.join(",")]);return e(Ze.Provider,{value:o,children:n})},rt=(e,t)=>{if(e)return"string"==typeof e?e:p(e,t)},nt=e=>{const{addNotification:t}=d(),a=(a,r,n,s,o)=>t({type:a,title:r,message:n,crdType:e,target:rt(s,e),hideFromHistory:o});return{notify:a,notifyError:(e,t,r)=>a(S.Error,e,t,r),notifySuccess:(e,t,r)=>a(S.Success,e,t,r),notifyPending:(e,t)=>a(S.Default,"Pending",e,t,!0),notifyReadonly:()=>{t({type:S.Warning,title:m.READONLY,message:u.READONLY_WARNING,hideFromHistory:!0})}}},st=e=>{e({type:S.Warning,title:m.READONLY,message:u.READONLY_WARNING,hideFromHistory:!0})},ot=e=>({error:e,results:[],allSucceeded:!1,anySucceeded:!1,successCount:0,failureCount:0}),it=(e,t)=>{if(e)return"function"==typeof e?e(t):e},lt=e=>{if(!e)return"Unknown error";if(e instanceof Error)return e.cause instanceof Error?e.cause.message:e.message;if("object"==typeof e){const t=e;return t.cause?.message||t.message||String(e)}return String(e)},ct=(e,t)=>e.client??t,dt=async(e,t,a,r,n)=>{if(!t)return{error:"Query operation not configured"};if(t.canRun&&!t.canRun(r))return{data:void 0};if(t.run)try{return await t.run(ct(t,e),a,r)}catch(e){return{error:lt(e)}}const s=it(t.document,r);if(!s)return{error:"Query operation not supported in this context"};const o=t.transformVariables?t.transformVariables(a,r):a,i=ct(t,e);try{const e=await i.query({query:s,variables:o,fetchPolicy:n??"network-only"});return{data:t.transformResult?t.transformResult(e.data,r):e.data,error:e.error?lt(e.error):void 0}}catch(e){return{error:lt(e)}}},ut=async(e,t,a,r)=>{if(!t)return{error:"Mutation operation not configured"};if(t.canRun&&!t.canRun(r))return{error:"Mutation operation not supported in this context"};if(t.run)try{return await t.run(ct(t,e),a,r)}catch(e){return{error:lt(e)}}const n=it(t.document,r);if(!n)return{error:"Mutation operation not supported in this context"};const s=t.transformVariables?t.transformVariables(a,r):a,o=ct(t,e);try{const e=await o.mutate({mutation:n,variables:s});return{data:t.transformResult?t.transformResult(e.data,r):e.data,error:void 0}}catch(e){return{error:lt(e)}}},mt=async(e,t,a,r,n)=>{if(!t)return ot("Multi fetch operation not configured");if(!a.length)return ot("No proxy ids supplied for multi fetch");const s=ct(t,e);if(t.transformVariablesMulti&&(t.documentMulti||t.document)){const e=t.transformVariablesMulti(a,r,n),o=[];for(const a of e)try{const e=await s.query({query:a.document,variables:a.variables,fetchPolicy:"network-only"});t.transformMultiResult?t.transformMultiResult(e.data,n).forEach(e=>o.push(e)):a.proxyIDs.forEach(t=>{o.push({proxyID:t,success:!e.error,data:e.data,error:e.error?.message})})}catch(e){const t=lt(e);a.proxyIDs.forEach(e=>o.push({proxyID:e,success:!1,error:t}))}const i=o.filter(e=>e.success).length,l=o.length-i,c=Array.from(new Set(o.filter(e=>!!e.error).map(e=>e.error)));return{results:o,allSucceeded:0===l,anySucceeded:i>0,successCount:i,failureCount:l,error:c.length?c.join(", "):void 0}}const o=await Promise.all(a.map(async a=>{const s={...n,proxyID:a},o=await dt(e,t,r,s);return{proxyID:a,success:!o.error,data:o.data,error:o.error}})),i=o.filter(e=>e.success).length,l=o.length-i,c=Array.from(new Set(o.filter(e=>!!e.error).map(e=>e.error)));return{results:o,allSucceeded:0===l,anySucceeded:i>0,successCount:i,failureCount:l,error:c.length?c.join(", "):void 0}},St=qe`
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useMemo as a,useContext as r,createContext as n,useCallback as s,useState as o,useEffect as i,useRef as l}from"react";import{t as c,bb as d,bc as u,p as m,S,bd as p,be as E,bf as I,P as T,bg as f,bh as y,bi as _,bj as h,bk as g,bl as N,bm as v,bn as A,bo as R,bp as O,bq as C,br as G,bs as D,bt as b,bu as L,bv as w,bw as P,b3 as U,bx as F,by as k,q as M,bz as H,bA as x,bB as $,bC as K,bD as V,bE as B,E as Y,bF as W,h as j,Q as q,bG as Q,T as z,bH as J,bI as X,bJ as Z,bK as ee,bL as te,bM as ae,bN as re,bO as ne,bP as se,bQ as oe,bR as ie,bS as le,bT as ce,bU as de,bV as ue,bW as me,bX as Se,bY as pe,bZ as Ee,b_ as Ie,b$ as Te,ak as fe,ag as ye,ai as _e,ah as he,aj as ge,af as Ne,c0 as ve,b as Ae}from"./ui-components-mqa1Nv5H.js";import{i as Re,n as Oe,m as Ce,l as Ge,o as De,p as be,v as Le,q as we,u as Pe}from"./helpers-DIbaWh5d.js";import{ApolloProvider as Ue,useLazyQuery as Fe,useApolloClient as ke,useQuery as Me}from"@apollo/client/react";import{ErrorLink as He}from"@apollo/client/link/error";import{SetContextLink as xe}from"@apollo/client/link/context";import{getMainDefinition as $e}from"@apollo/client/utilities";import{CombinedGraphQLErrors as Ke,ServerError as Ve}from"@apollo/client/errors";import{HttpLink as Be,ApolloLink as Ye,ApolloClient as We,InMemoryCache as je,gql as qe}from"@apollo/client";const Qe=e=>{if(!e)return!1;const t=e.toLowerCase();return t.includes("authentication required")||t.includes("authentication expired")||t.includes("http 401")},ze=n(null),Je=()=>{const e=r(ze);if(!e)throw new Error("[ui-kit] useOdigosApi() / useXxxApi() called outside of <OdigosApiProvider>. Make sure the host app mounts the provider at its layout level.");return e},Xe=({apolloConfig:t,operations:r,context:n,children:s})=>{const o=a(()=>(e=>{const t=new Be({uri:e.httpUrl,credentials:e.credentials??"same-origin"}),a=new He(({error:t})=>{Ke.is(t)?t.errors.some(e=>Qe(e.message))&&e.onAuthError?.():(Ve.is(t)&&401===t.statusCode||Qe(t.message))&&e.onAuthError?.()}),r=new xe(async t=>{const a={...t.headers};if(e.authHeader){const t=await e.authHeader();Object.assign(a,t)}return e.csrfHeader&&Object.assign(a,e.csrfHeader()),{headers:a}}),n=[];e.additionalLinks?.length&&n.push(...e.additionalLinks),n.push(r,a,t);let s=Ye.from(n);e.wsLink&&(s=Ye.split(({query:e})=>{const t=$e(e);return"OperationDefinition"===t.kind&&"subscription"===t.operation},e.wsLink,s));const o=e.defaultFetchPolicies;return new We({link:s,cache:new je({typePolicies:e.cacheTypePolicies}),defaultOptions:{watchQuery:{fetchPolicy:o?.watchQuery??"cache-and-network"},query:{fetchPolicy:o?.query??"cache-first"},mutate:{fetchPolicy:o?.mutate??"network-only"}}})})(t),[t.httpUrl,t.wsLink,t.credentials,t.clientKey]),i=a(()=>({operations:r,context:n,apolloConfig:t}),[r,n,t]);return e(Ue,{client:o,children:e(ze.Provider,{value:i,children:s})})},Ze=ze,et=e=>e.map(e=>`${e.id}:${e.odigosVersion}:${e.type}`).join(","),tt=(e,t,a)=>{const r=t.length?t.map(e=>e.id):a??[],n={...e,connectionIds:r};if(!t.length||c(e.version)>0)return n;const s=t[0];return{...n,version:s.odigosVersion||e.version,platformType:s.type??e.platformType}},at=({connections:t,connectionIds:r,children:n})=>{const s=Je(),o=a(()=>({operations:s.operations,context:tt(s.context,t,r),apolloConfig:s.apolloConfig}),[s.operations,s.context,s.apolloConfig,et(t),r?.join(",")]);return e(Ze.Provider,{value:o,children:n})},rt=(e,t)=>{if(e)return"string"==typeof e?e:p(e,t)},nt=e=>{const{addNotification:t}=d(),a=(a,r,n,s,o)=>t({type:a,title:r,message:n,crdType:e,target:rt(s,e),hideFromHistory:o});return{notify:a,notifyError:(e,t,r)=>a(S.Error,e,t,r),notifySuccess:(e,t,r)=>a(S.Success,e,t,r),notifyPending:(e,t)=>a(S.Default,"Pending",e,t,!0),notifyReadonly:()=>{t({type:S.Warning,title:m.READONLY,message:u.READONLY_WARNING,hideFromHistory:!0})}}},st=e=>{e({type:S.Warning,title:m.READONLY,message:u.READONLY_WARNING,hideFromHistory:!0})},ot=e=>({error:e,results:[],allSucceeded:!1,anySucceeded:!1,successCount:0,failureCount:0}),it=(e,t)=>{if(e)return"function"==typeof e?e(t):e},lt=e=>{if(!e)return"Unknown error";if(e instanceof Error)return e.cause instanceof Error?e.cause.message:e.message;if("object"==typeof e){const t=e;return t.cause?.message||t.message||String(e)}return String(e)},ct=(e,t)=>e.client??t,dt=async(e,t,a,r,n)=>{if(!t)return{error:"Query operation not configured"};if(t.canRun&&!t.canRun(r))return{data:void 0};if(t.run)try{return await t.run(ct(t,e),a,r)}catch(e){return{error:lt(e)}}const s=it(t.document,r);if(!s)return{error:"Query operation not supported in this context"};const o=t.transformVariables?t.transformVariables(a,r):a,i=ct(t,e);try{const e=await i.query({query:s,variables:o,fetchPolicy:n??"network-only"});return{data:t.transformResult?t.transformResult(e.data,r):e.data,error:e.error?lt(e.error):void 0}}catch(e){return{error:lt(e)}}},ut=async(e,t,a,r)=>{if(!t)return{error:"Mutation operation not configured"};if(t.canRun&&!t.canRun(r))return{error:"Mutation operation not supported in this context"};if(t.run)try{return await t.run(ct(t,e),a,r)}catch(e){return{error:lt(e)}}const n=it(t.document,r);if(!n)return{error:"Mutation operation not supported in this context"};const s=t.transformVariables?t.transformVariables(a,r):a,o=ct(t,e);try{const e=await o.mutate({mutation:n,variables:s});return{data:t.transformResult?t.transformResult(e.data,r):e.data,error:void 0}}catch(e){return{error:lt(e)}}},mt=async(e,t,a,r,n)=>{if(!t)return ot("Multi fetch operation not configured");if(!a.length)return ot("No proxy ids supplied for multi fetch");const s=ct(t,e);if(t.transformVariablesMulti&&(t.documentMulti||t.document)){const e=t.transformVariablesMulti(a,r,n),o=[];for(const a of e)try{const e=await s.query({query:a.document,variables:a.variables,fetchPolicy:"network-only"});t.transformMultiResult?t.transformMultiResult(e.data,n).forEach(e=>o.push(e)):a.proxyIDs.forEach(t=>{o.push({proxyID:t,success:!e.error,data:e.data,error:e.error?.message})})}catch(e){const t=lt(e);a.proxyIDs.forEach(e=>o.push({proxyID:e,success:!1,error:t}))}const i=o.filter(e=>e.success).length,l=o.length-i,c=Array.from(new Set(o.filter(e=>!!e.error).map(e=>e.error)));return{results:o,allSucceeded:0===l,anySucceeded:i>0,successCount:i,failureCount:l,error:c.length?c.join(", "):void 0}}const o=await Promise.all(a.map(async a=>{const s={...n,proxyID:a},o=await dt(e,t,r,s);return{proxyID:a,success:!o.error,data:o.data,error:o.error}})),i=o.filter(e=>e.success).length,l=o.length-i,c=Array.from(new Set(o.filter(e=>!!e.error).map(e=>e.error)));return{results:o,allSucceeded:0===l,anySucceeded:i>0,successCount:i,failureCount:l,error:c.length?c.join(", "):void 0}},St=qe`
2
2
  query OdigosApiNoop {
3
3
  __typename
4
4
  }