"use strict";(self.webpackChunk_mlflow_mlflow=self.webpackChunk_mlflow_mlflow||[]).push([[3664],{61060:function(t,e,r){r.d(e,{n:function(){return d}});var s=r(46709),n=r(48667),o=r(56606),i=r(78922),u=r(27949),a=r(4200);class l extends a.Q{constructor(t,e){super(),this.client=t,this.setOptions(e),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;const r=this.options;this.options=this.client.defaultMutationOptions(t),(0,o.f8)(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(e=this.currentMutation)||e.setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(null==(t=this.currentMutation)||t.removeObserver(this))}onMutationUpdate(t){this.updateResult();const e={listeners:!0};"success"===t.type?e.onSuccess=!0:"error"===t.type&&(e.onError=!0),this.notify(e)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,e){return this.mutateOptions=e,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:"undefined"!==typeof t?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:(0,i.$)(),e={...t,isLoading:"loading"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset};this.currentResult=e}notify(t){u.j.batch(()=>{var e,r,s,n;if(this.mutateOptions&&this.hasListeners())if(t.onSuccess)null==(e=(r=this.mutateOptions).onSuccess)||e.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(s=(n=this.mutateOptions).onSettled)||s.call(n,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context);else if(t.onError){var o,i,u,a;null==(o=(i=this.mutateOptions).onError)||o.call(i,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(u=(a=this.mutateOptions).onSettled)||u.call(a,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}t.listeners&&this.listeners.forEach(({listener:t})=>{t(this.currentResult)})})}}var c=r(39595),h=r(56154);function d(t,e,r){const i=(0,o.GR)(t,e,r),a=(0,c.jE)({context:i.context}),[d]=s.useState(()=>new l(a,i));s.useEffect(()=>{d.setOptions(i)},[d,i]);const f=(0,n.r)(s.useCallback(t=>d.subscribe(u.j.batchCalls(t)),[d]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),m=s.useCallback((t,e)=>{d.mutate(t,e).catch(p)},[d]);if(f.error&&(0,h.G)(d.options.useErrorBoundary,[f.error]))throw f.error;return{...f,mutate:m,mutateAsync:f.mutate}}function p(){}},89949:function(t,e,r){r.d(e,{tH:function(){return u}});var s=r(46709);function n(t,e,r,s){Object.defineProperty(t,e,{get:r,set:s,enumerable:!0,configurable:!0})}n({},"ErrorBoundary",()=>u);n({},"ErrorBoundaryContext",()=>o);const o=(0,s.createContext)(null),i={didCatch:!1,error:null};class u extends s.Component{state=i;static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary=(...t)=>{const{error:e}=this.state;null!==e&&(this.props.onReset?.({args:t,reason:"imperative-api"}),this.setState(i))};componentDidCatch(t,e){this.props.onError?.(t,e)}componentDidUpdate(t,e){const{didCatch:r}=this.state,{resetKeys:s}=this.props;r&&null!==e.error&&function(t=[],e=[]){return t.length!==e.length||t.some((t,r)=>!Object.is(t,e[r]))}(t.resetKeys,s)&&(this.props.onReset?.({next:s,prev:t.resetKeys,reason:"keys"}),this.setState(i))}render(){const{children:t,fallbackRender:e,FallbackComponent:r,fallback:n}=this.props,{didCatch:i,error:u}=this.state;let a=t;if(i){const t={error:u,resetErrorBoundary:this.resetErrorBoundary};if((0,s.isValidElement)(n))a=n;else if("function"===typeof e)a=e(t);else{if(!r)throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop");a=(0,s.createElement)(r,t)}}return(0,s.createElement)(o.Provider,{value:{didCatch:i,error:u,resetErrorBoundary:this.resetErrorBoundary}},a)}}function a(t){if(null==t||"boolean"!==typeof t.didCatch||"function"!==typeof t.resetErrorBoundary)throw new Error("ErrorBoundaryContext not found");return!0}function l(){const t=(0,s.useContext)(o);a(t);const[e,r]=(0,s.useState)({error:null,hasError:!1}),n=(0,s.useMemo)(()=>({resetBoundary:()=>{t?.resetErrorBoundary(),r({error:null,hasError:!1})},showBoundary:t=>r({error:t,hasError:!0})}),[t?.resetErrorBoundary]);if(e.hasError)throw e.error;return n}n({},"useErrorBoundary",()=>l);function c(t,e){const r=r=>(0,s.createElement)(u,e,(0,s.createElement)(t,r)),n=t.displayName||t.name||"Unknown";return r.displayName=`withErrorBoundary(${n})`,r}n({},"withErrorBoundary",()=>c)}}]);