ultisuite-client/out/_next/static/chunks/6958-1074bf08efdc5be4.js
R3D347HR4Y d6d18f911b
Some checks failed
E2E / Playwright e2e (push) Has been cancelled
Lots of stuff and mobile app
2026-06-17 00:13:28 +02:00

6 lines
8.8 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6958],{17745:(t,e,s)=>{s.d(e,{n:()=>c});var i=s(91356),r=s(67730),a=s(42811),n=s(17652),o=s(20838),u=class extends n.Q{#t;#e=void 0;#s;#i;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,o.f8)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,o.EN)(e.mutationKey)!==(0,o.EN)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#a(t)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#r(),this.#a()}mutate(t,e){return this.#i=e,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(t)}#r(){let t=this.#s?.state??(0,r.$)();this.#e={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#a(t){a.jG.batch(()=>{if(this.#i&&this.hasListeners()){let e=this.#e.variables,s=this.#e.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,e,s,i)}catch(t){Promise.reject(t)}try{this.#i.onSettled?.(t.data,null,e,s,i)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,e,s,i)}catch(t){Promise.reject(t)}try{this.#i.onSettled?.(void 0,t.error,e,s,i)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#e)})})}},h=s(39927);function c(t,e){let s=(0,h.jE)(e),[r]=i.useState(()=>new u(s,t));i.useEffect(()=>{r.setOptions(t)},[r,t]);let n=i.useSyncExternalStore(i.useCallback(t=>r.subscribe(a.jG.batchCalls(t)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),c=i.useCallback((t,e)=>{r.mutate(t,e).catch(o.lQ)},[r]);if(n.error&&(0,o.GU)(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:c,mutateAsync:n.mutate}}},19984:(t,e,s)=>{var i=s(28704);s.o(i,"useParams")&&s.d(e,{useParams:function(){return i.useParams}}),s.o(i,"usePathname")&&s.d(e,{usePathname:function(){return i.usePathname}}),s.o(i,"useRouter")&&s.d(e,{useRouter:function(){return i.useRouter}}),s.o(i,"useSearchParams")&&s.d(e,{useSearchParams:function(){return i.useSearchParams}})},29168:(t,e,s)=>{s.d(e,{A:()=>a});var i=s(91356),r=s(4208);function a(t,e=[]){let s=[],n=()=>{let e=s.map(t=>i.createContext(t));return function(s){let r=s?.[t]||e;return i.useMemo(()=>({[`__scope${t}`]:{...s,[t]:r}}),[s,r])}};return n.scopeName=t,[function(e,a){let n=i.createContext(a);n.displayName=e+"Context";let o=s.length;s=[...s,a];let u=e=>{let{scope:s,children:a,...u}=e,h=s?.[t]?.[o]||n,c=i.useMemo(()=>u,Object.values(u));return(0,r.jsx)(h.Provider,{value:c,children:a})};return u.displayName=e+"Provider",[u,function(s,r){let u=r?.[t]?.[o]||n,h=i.useContext(u);if(h)return h;if(void 0!==a)return a;throw Error(`\`${s}\` must be used within \`${e}\``)}]},function(...t){let e=t[0];if(1===t.length)return e;let s=()=>{let s=t.map(t=>({useScope:t(),scopeName:t.scopeName}));return function(t){let r=s.reduce((e,{useScope:s,scopeName:i})=>{let r=s(t)[`__scope${i}`];return{...e,...r}},{});return i.useMemo(()=>({[`__scope${e.scopeName}`]:r}),[r])}};return s.scopeName=e.scopeName,s}(n,...e)]}},67730:(t,e,s)=>{s.d(e,{$:()=>o,s:()=>n});var i=s(42811),r=s(80034),a=s(4554),n=class extends r.k{#t;#n;#o;#u;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#o=t.mutationCache,this.#n=[],this.state=t.state||o(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#n.includes(t)||(this.#n.push(t),this.clearGcTimeout(),this.#o.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#n=this.#n.filter(e=>e!==t),this.scheduleGc(),this.#o.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#n.length||("pending"===this.state.status?this.scheduleGc():this.#o.remove(this))}continue(){return this.#u?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#h({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#u=(0,a.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#h({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#h({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#o.canRun(this)});let i="pending"===this.state.status,r=!this.#u.canStart();try{if(i)e();else{this.#h({type:"pending",variables:t,isPaused:r}),this.#o.config.onMutate&&await this.#o.config.onMutate(t,this,s);let e=await this.options.onMutate?.(t,s);e!==this.state.context&&this.#h({type:"pending",context:e,variables:t,isPaused:r})}let a=await this.#u.start();return await this.#o.config.onSuccess?.(a,t,this.state.context,this,s),await this.options.onSuccess?.(a,t,this.state.context,s),await this.#o.config.onSettled?.(a,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(a,null,t,this.state.context,s),this.#h({type:"success",data:a}),a}catch(e){try{await this.#o.config.onError?.(e,t,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,s)}catch(t){Promise.reject(t)}try{await this.#o.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,s)}catch(t){Promise.reject(t)}throw this.#h({type:"error",error:e}),e}finally{this.#o.runNext(this)}}#h(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),i.jG.batch(()=>{this.#n.forEach(e=>{e.onMutationUpdate(t)}),this.#o.notify({mutation:this,type:"updated",action:t})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},70799:(t,e,s)=>{s.d(e,{sG:()=>n});var i=s(91356);s(86669);var r=s(49402),a=s(4208),n=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,e)=>{let s=(0,r.TL)(`Primitive.${e}`),n=i.forwardRef((t,i)=>{let{asChild:r,...n}=t;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a.jsx)(r?s:e,{...n,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{})},84687:(t,e,s)=>{s.d(e,{C1:()=>C,bL:()=>g});var i=s(91356),r=s(29168),a=s(70799),n=s(4208),o="Progress",[u,h]=(0,r.A)(o),[c,l]=u(o),d=i.forwardRef((t,e)=>{var s,i;let{__scopeProgress:r,value:o=null,max:u,getValueLabel:h=v,...l}=t;(u||0===u)&&!b(u)&&console.error((s=`${u}`,`Invalid prop \`max\` of value \`${s}\` supplied to \`Progress\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`));let d=b(u)?u:100;null===o||x(o,d)||console.error((i=`${o}`,`Invalid prop \`value\` of value \`${i}\` supplied to \`Progress\`. The \`value\` prop must be:
- a positive number
- less than the value passed to \`max\` (or 100 if no \`max\` prop is set)
- \`null\` or \`undefined\` if the progress is indeterminate.
Defaulting to \`null\`.`));let p=x(o,d)?o:null,m=y(p)?h(p,d):void 0;return(0,n.jsx)(c,{scope:r,value:p,max:d,children:(0,n.jsx)(a.sG.div,{"aria-valuemax":d,"aria-valuemin":0,"aria-valuenow":y(p)?p:void 0,"aria-valuetext":m,role:"progressbar","data-state":f(p,d),"data-value":p??void 0,"data-max":d,...l,ref:e})})});d.displayName=o;var p="ProgressIndicator",m=i.forwardRef((t,e)=>{let{__scopeProgress:s,...i}=t,r=l(p,s);return(0,n.jsx)(a.sG.div,{"data-state":f(r.value,r.max),"data-value":r.value??void 0,"data-max":r.max,...i,ref:e})});function v(t,e){return`${Math.round(t/e*100)}%`}function f(t,e){return null==t?"indeterminate":t===e?"complete":"loading"}function y(t){return"number"==typeof t}function b(t){return y(t)&&!isNaN(t)&&t>0}function x(t,e){return y(t)&&!isNaN(t)&&t<=e&&t>=0}m.displayName=p;var g=d,C=m}}]);