PageSourceSearch

https://www.veed.io/frontend-assets/dashboard-frontend/dashboard-static/useMutation-BKV8JYnG.js

js veed.io collected 2026-10-02 08:33:15 UTC 2,188 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`29ae0319a6961340fd1207c714d43b4796313dfd`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`0d8d0d0d-9493-43cf-8605-e0877cbc49f8`,e._sentryDebugIdIdentifier=`sentry-dbid-0d8d0d0d-9493-43cf-8605-e0877cbc49f8`)}catch{}})();import{s as e}from"./rolldown-runtime-DLzXii5c.js";import{n as t}from"./jsx-runtime-BZ-f3mTU.js";import{M as n,N as r,l as i}from"./useQuery--lD-wNmA.js";import{t as a}from"./preventUnhandledRejection-CF1l93kf.js";import{h as o}from"./context-C3qquy3y.js";var s=e(t(),1),c=function(e,t){let c=r(t?.client),[u,d]=s.useState(()=>l(c)),f=s.useRef({result:u,mutationId:0,isMounted:!0,client:c,mutation:e,options:t});o(()=>{Object.assign(f.current,{client:c,options:t,mutation:e})});let p=s.useCallback((e={})=>{let{options:t,mutation:r}=f.current,o={...t,mutation:r},s=e.client||f.current.client,c=typeof e.context==`function`?e.context(t?.context):e.context;!f.current.result.loading&&f.current.isMounted&&d(f.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:s});let l=++f.current.mutationId,u=i(o,{...e,context:c});return a(s.mutate(u).then(t=>{let{data:r,error:i}=t,a=e.onError||f.current.options?.onError;if(i&&a&&a(i,u),l===f.current.mutationId){let e={called:!0,loading:!1,data:r,error:i,client:s};f.current.isMounted&&!n(f.current.result,e)&&d(f.current.result=e)}let o=e.onCompleted||f.current.options?.onCompleted;return i||o?.(t.data,u),t},t=>{if(l===f.current.mutationId&&f.current.isMounted){let e={loading:!1,error:t,data:void 0,called:!0,client:s};n(f.current.result,e)||d(f.current.result=e)}let r=e.onError||f.current.options?.onError;throw r&&r(t,u),t}))},[]),m=s.useCallback(()=>{if(f.current.isMounted){let e=l(f.current.client);Object.assign(f.current,{mutationId:0,result:e}),d(e)}},[]);return s.useEffect(()=>{let e=f.current;return e.isMounted=!0,()=>{e.isMounted=!1}},[]),[p,{reset:m,...u}]};function l(e){return{data:void 0,error:void 0,called:!1,loading:!1,client:e}}export{c as t};
2//# sourceMappingURL=useMutation-BKV8JYnG.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.