@espresso-lab/mantine-data-table 1.9.37 → 1.9.39

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/index.umd.js CHANGED
@@ -1,24 +1,24 @@
1
- (function(_e,Q){typeof exports=="object"&&typeof module<"u"?Q(exports,require("react"),require("@mantine/core"),require("@mantine/form"),require("@tabler/icons-react"),require("@mantine/hooks")):typeof define=="function"&&define.amd?define(["exports","react","@mantine/core","@mantine/form","@tabler/icons-react","@mantine/hooks"],Q):(_e=typeof globalThis<"u"?globalThis:_e||self,Q(_e.MantineDataTable={},_e.React,_e.MantineCore,_e.MantineForm,_e.TablerIconsReact,_e.MantineHooks))})(this,(function(_e,Q,A,Mn,Mt,$e){"use strict";function Ls(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const je=Ls(Q);function On(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Vt={exports:{}},Or={};var En;function Bs(){if(En)return Or;En=1;var t=Q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Or.c=function(e){return t.H.useMemoCache(e)},Or}var Er={};var An;function Is(){return An||(An=1,process.env.NODE_ENV!=="production"&&(function(){var t=Q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;Er.c=function(e){var r=t.H;return r===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1
+ (function(we,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("react"),require("@mantine/core"),require("@mantine/form"),require("@tabler/icons-react"),require("@mantine/hooks")):typeof define=="function"&&define.amd?define(["exports","react","@mantine/core","@mantine/form","@tabler/icons-react","@mantine/hooks"],G):(we=typeof globalThis<"u"?globalThis:we||self,G(we.MantineDataTable={},we.React,we.MantineCore,we.MantineForm,we.TablerIconsReact,we.MantineHooks))})(this,(function(we,G,E,On,Et,Le){"use strict";function Bs(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const Re=Bs(G);function An(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gt={exports:{}},Er={};var En;function Is(){if(En)return Er;En=1;var t=G.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Er.c=function(e){return t.H.useMemoCache(e)},Er}var Tr={};var Tn;function Ys(){return Tn||(Tn=1,process.env.NODE_ENV!=="production"&&(function(){var t=G.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;Tr.c=function(e){var r=t.H;return r===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
2
2
  1. You might have mismatching versions of React and the renderer (such as React DOM)
3
3
  2. You might be breaking the Rules of Hooks
4
4
  3. You might have more than one copy of React in the same app
5
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r.useMemoCache(e)}})()),Er}var Tn;function Ys(){return Tn||(Tn=1,process.env.NODE_ENV==="production"?Vt.exports=Bs():Vt.exports=Is()),Vt.exports}var Ve=Ys(),Ht=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},zs={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Fs=class{#t=zs;#e=!1;setTimeoutProvider(t){process.env.NODE_ENV!=="production"&&this.#e&&t!==this.#t&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#t,provider:t}),this.#t=t,process.env.NODE_ENV!=="production"&&(this.#e=!1)}setTimeout(t,e){return process.env.NODE_ENV!=="production"&&(this.#e=!0),this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return process.env.NODE_ENV!=="production"&&(this.#e=!0),this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}},Gt=new Fs;function Ws(t){setTimeout(t,0)}var Ot=typeof window>"u"||"Deno"in globalThis;function Qt(){}function jn(t){return typeof t=="number"&&t>=0&&t!==1/0}function Us(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Et(t,e){return typeof t=="function"?t(e):t}function He(t,e){return typeof t=="function"?t(e):t}function $n(t){return JSON.stringify(t,(e,r)=>Tr(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}var qs=Object.prototype.hasOwnProperty;function Ar(t,e){if(t===e)return t;const r=Rn(t)&&Rn(e);if(!r&&!(Tr(t)&&Tr(e)))return e;const s=(r?t:Object.keys(t)).length,d=r?e:Object.keys(e),h=d.length,a=r?new Array(h):{};let g=0;for(let y=0;y<h;y++){const _=r?y:d[y],P=t[_],C=e[_];if(P===C){a[_]=P,(r?y<s:qs.call(t,_))&&g++;continue}if(P===null||C===null||typeof P!="object"||typeof C!="object"){a[_]=C;continue}const S=Ar(P,C);a[_]=S,S===P&&g++}return s===h&&g===s?t:a}function Zt(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function Rn(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Tr(t){if(!Nn(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!Nn(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Nn(t){return Object.prototype.toString.call(t)==="[object Object]"}function Ln(t,e,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(t,e);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Ar(t,e)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return Ar(t,e)}return e}function Bn(t,e){return typeof t=="function"?t(...e):!!t}var Vs=class extends Ht{#t;#e;#r;constructor(){super(),this.#r=t=>{if(!Ot&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#r=t,this.#e?.(),this.#e=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Hs=new Vs;function In(){let t,e;const r=new Promise((s,d)=>{t=s,e=d});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),t(s)},r.reject=s=>{n({status:"rejected",reason:s}),e(s)},r}var Gs=Ws;function Qs(){let t=[],e=0,r=a=>{a()},n=a=>{a()},s=Gs;const d=a=>{e?t.push(a):s(()=>{r(a)})},h=()=>{const a=t;t=[],a.length&&s(()=>{n(()=>{a.forEach(g=>{r(g)})})})};return{batch:a=>{let g;e++;try{g=a()}finally{e--,e||h()}return g},batchCalls:a=>(...g)=>{d(()=>{a(...g)})},schedule:d,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var Kt=Qs(),Zs=class extends Ht{#t=!0;#e;#r;constructor(){super(),this.#r=t=>{if(!Ot&&window.addEventListener){const e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#r=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#t}},Ks=new Zs;function Js(t){return(t??"online")==="online"?Ks.isOnline():!0}function Xs(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Js(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}var ei=class extends Ht{constructor(t,e){super(),this.options=e,this.#t=t,this.#a=null,this.#i=In(),this.bindMethods(),this.setOptions(e)}#t;#e=void 0;#r=void 0;#n=void 0;#o;#s;#i;#a;#g;#h;#f;#u;#c;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),Yn(this.#e,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jr(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jr(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#_(),this.#e.removeObserver(this)}setOptions(t){const e=this.options,r=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof He(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#e.setOptions(this.options),e._defaulted&&!Zt(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&zn(this.#e,r,this.options,e)&&this.#d(),this.updateResult(),n&&(this.#e!==r||He(this.options.enabled,this.#e)!==He(e.enabled,this.#e)||Et(this.options.staleTime,this.#e)!==Et(e.staleTime,this.#e))&&this.#m();const s=this.#y();n&&(this.#e!==r||He(this.options.enabled,this.#e)!==He(e.enabled,this.#e)||s!==this.#l)&&this.#v(s)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),r=this.createResult(e,t);return ri(this,r)&&(this.#n=r,this.#s=this.options,this.#o=this.#e.state),r}getCurrentResult(){return this.#n}trackResult(t,e){return new Proxy(t,{get:(r,n)=>(this.trackProp(n),e?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,n))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),r=this.#t.getQueryCache().build(this.#t,e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#d(t){this.#x();let e=this.#e.fetch(this.options,t);return t?.throwOnError||(e=e.catch(Qt)),e}#m(){this.#w();const t=Et(this.options.staleTime,this.#e);if(Ot||this.#n.isStale||!jn(t))return;const r=Us(this.#n.dataUpdatedAt,t)+1;this.#u=Gt.setTimeout(()=>{this.#n.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(t){this.#_(),this.#l=t,!(Ot||He(this.options.enabled,this.#e)===!1||!jn(this.#l)||this.#l===0)&&(this.#c=Gt.setInterval(()=>{(this.options.refetchIntervalInBackground||Hs.isFocused())&&this.#d()},this.#l))}#b(){this.#m(),this.#v(this.#y())}#w(){this.#u&&(Gt.clearTimeout(this.#u),this.#u=void 0)}#_(){this.#c&&(Gt.clearInterval(this.#c),this.#c=void 0)}createResult(t,e){const r=this.#e,n=this.options,s=this.#n,d=this.#o,h=this.#s,g=t!==r?t.state:this.#r,{state:y}=t;let _={...y},P=!1,C;if(e._optimisticResults){const Z=this.hasListeners(),U=!Z&&Yn(t,e),G=Z&&zn(t,r,e,n);(U||G)&&(_={..._,...Xs(y.data,t.options)}),e._optimisticResults==="isRestoring"&&(_.fetchStatus="idle")}let{error:S,errorUpdatedAt:D,status:O}=_;C=_.data;let N=!1;if(e.placeholderData!==void 0&&C===void 0&&O==="pending"){let Z;s?.isPlaceholderData&&e.placeholderData===h?.placeholderData?(Z=s.data,N=!0):Z=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,Z!==void 0&&(O="success",C=Ln(s?.data,Z,e),P=!0)}if(e.select&&C!==void 0&&!N)if(s&&C===d?.data&&e.select===this.#g)C=this.#h;else try{this.#g=e.select,C=e.select(C),C=Ln(s?.data,C,e),this.#h=C,this.#a=null}catch(Z){this.#a=Z}this.#a&&(S=this.#a,C=this.#h,D=Date.now(),O="error");const F=_.fetchStatus==="fetching",Y=O==="pending",V=O==="error",q=Y&&F,ee=C!==void 0,X={status:O,fetchStatus:_.fetchStatus,isPending:Y,isSuccess:O==="success",isError:V,isInitialLoading:q,isLoading:q,data:C,dataUpdatedAt:_.dataUpdatedAt,error:S,errorUpdatedAt:D,failureCount:_.fetchFailureCount,failureReason:_.fetchFailureReason,errorUpdateCount:_.errorUpdateCount,isFetched:_.dataUpdateCount>0||_.errorUpdateCount>0,isFetchedAfterMount:_.dataUpdateCount>g.dataUpdateCount||_.errorUpdateCount>g.errorUpdateCount,isFetching:F,isRefetching:F&&!Y,isLoadingError:V&&!ee,isPaused:_.fetchStatus==="paused",isPlaceholderData:P,isRefetchError:V&&ee,isStale:$r(t,e),refetch:this.refetch,promise:this.#i,isEnabled:He(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const Z=W=>{X.status==="error"?W.reject(X.error):X.data!==void 0&&W.resolve(X.data)},U=()=>{const W=this.#i=X.promise=In();Z(W)},G=this.#i;switch(G.status){case"pending":t.queryHash===r.queryHash&&Z(G);break;case"fulfilled":(X.status==="error"||X.data!==G.value)&&U();break;case"rejected":(X.status!=="error"||X.error!==G.reason)&&U();break}}return X}updateResult(){const t=this.#n,e=this.createResult(this.#e,this.options);if(this.#o=this.#e.state,this.#s=this.options,this.#o.data!==void 0&&(this.#f=this.#e),Zt(e,t))return;this.#n=e;const r=()=>{if(!t)return!0;const{notifyOnChangeProps:n}=this.options,s=typeof n=="function"?n():n;if(s==="all"||!s&&!this.#p.size)return!0;const d=new Set(s??this.#p);return this.options.throwOnError&&d.add("error"),Object.keys(this.#n).some(h=>{const a=h;return this.#n[a]!==t[a]&&d.has(a)})};this.#C({listeners:r()})}#x(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const e=this.#e;this.#e=t,this.#r=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#C(t){Kt.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function ti(t,e){return He(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Yn(t,e){return ti(t,e)||t.state.data!==void 0&&jr(t,e,e.refetchOnMount)}function jr(t,e,r){if(He(e.enabled,t)!==!1&&Et(e.staleTime,t)!=="static"){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&$r(t,e)}return!1}function zn(t,e,r,n){return(t!==e||He(n.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&$r(t,r)}function $r(t,e){return He(e.enabled,t)!==!1&&t.isStaleByTime(Et(e.staleTime,t))}function ri(t,e){return!Zt(t.getCurrentResult(),e)}function ni(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var oi=class extends Ht{#t;#e=void 0;#r;#n;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#t.defaultMutationOptions(t),Zt(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),e?.mutationKey&&this.options.mutationKey&&$n(e.mutationKey)!==$n(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#o(),this.#s(t)}getCurrentResult(){return this.#e}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#o(),this.#s()}mutate(t,e){return this.#n=e,this.#r?.removeObserver(this),this.#r=this.#t.getMutationCache().build(this.#t,this.options),this.#r.addObserver(this),this.#r.execute(t)}#o(){const t=this.#r?.state??ni();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){Kt.batch(()=>{if(this.#n&&this.hasListeners()){const e=this.#e.variables,r=this.#e.context,n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#n.onSuccess?.(t.data,e,r,n),this.#n.onSettled?.(t.data,null,e,r,n)):t?.type==="error"&&(this.#n.onError?.(t.error,e,r,n),this.#n.onSettled?.(void 0,t.error,e,r,n))}this.listeners.forEach(e=>{e(this.#e)})})}},Jt={exports:{}},At={};var Fn;function si(){if(Fn)return At;Fn=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,s,d){var h=null;if(d!==void 0&&(h=""+d),s.key!==void 0&&(h=""+s.key),"key"in s){d={};for(var a in s)a!=="key"&&(d[a]=s[a])}else d=s;return s=d.ref,{$$typeof:t,type:n,key:h,ref:s!==void 0?s:null,props:d}}return At.Fragment=e,At.jsx=r,At.jsxs=r,At}var Tt={};var Wn;function ii(){return Wn||(Wn=1,process.env.NODE_ENV!=="production"&&(function(){function t(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===W?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case N:return"Fragment";case Y:return"Profiler";case F:return"StrictMode";case re:return"Suspense";case X:return"SuspenseList";case G:return"Activity"}if(typeof i=="object")switch(typeof i.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),i.$$typeof){case O:return"Portal";case q:return i.displayName||"Context";case V:return(i._context.displayName||"Context")+".Consumer";case ee:var v=i.render;return i=i.displayName,i||(i=v.displayName||v.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case Z:return v=i.displayName||null,v!==null?v:t(i.type)||"Memo";case U:v=i._payload,i=i._init;try{return t(i(v))}catch{}}return null}function e(i){return""+i}function r(i){try{e(i);var v=!1}catch{v=!0}if(v){v=console;var T=v.error,j=typeof Symbol=="function"&&Symbol.toStringTag&&i[Symbol.toStringTag]||i.constructor.name||"Object";return T.call(v,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",j),e(i)}}function n(i){if(i===N)return"<>";if(typeof i=="object"&&i!==null&&i.$$typeof===U)return"<...>";try{var v=t(i);return v?"<"+v+">":"<...>"}catch{return"<...>"}}function s(){var i=ae.A;return i===null?null:i.getOwner()}function d(){return Error("react-stack-top-frame")}function h(i){if(oe.call(i,"key")){var v=Object.getOwnPropertyDescriptor(i,"key").get;if(v&&v.isReactWarning)return!1}return i.key!==void 0}function a(i,v){function T(){b||(b=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",v))}T.isReactWarning=!0,Object.defineProperty(i,"key",{get:T,configurable:!0})}function g(){var i=t(this.type);return u[i]||(u[i]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),i=this.props.ref,i!==void 0?i:null}function y(i,v,T,j,K,J){var te=T.ref;return i={$$typeof:D,type:i,key:v,props:T,_owner:j},(te!==void 0?te:null)!==null?Object.defineProperty(i,"ref",{enumerable:!1,get:g}):Object.defineProperty(i,"ref",{enumerable:!1,value:null}),i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(i,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(i,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:K}),Object.defineProperty(i,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i}function _(i,v,T,j,K,J){var te=v.children;if(te!==void 0)if(j)if(k(te)){for(j=0;j<te.length;j++)P(te[j]);Object.freeze&&Object.freeze(te)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else P(te);if(oe.call(v,"key")){te=t(i);var H=Object.keys(v).filter(function(se){return se!=="key"});j=0<H.length?"{key: someKey, "+H.join(": ..., ")+": ...}":"{key: someKey}",f[te+j]||(H=0<H.length?"{"+H.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
5
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r.useMemoCache(e)}})()),Tr}var jn;function zs(){return jn||(jn=1,process.env.NODE_ENV==="production"?Gt.exports=Is():Gt.exports=Ys()),Gt.exports}var Ze=zs(),Qt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Fs={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Ws=class{#t=Fs;#e=!1;setTimeoutProvider(t){process.env.NODE_ENV!=="production"&&this.#e&&t!==this.#t&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#t,provider:t}),this.#t=t,process.env.NODE_ENV!=="production"&&(this.#e=!1)}setTimeout(t,e){return process.env.NODE_ENV!=="production"&&(this.#e=!0),this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return process.env.NODE_ENV!=="production"&&(this.#e=!0),this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}},Zt=new Ws;function Us(t){setTimeout(t,0)}var Tt=typeof window>"u"||"Deno"in globalThis;function Kt(){}function $n(t){return typeof t=="number"&&t>=0&&t!==1/0}function qs(t,e){return Math.max(t+(e||0)-Date.now(),0)}function jt(t,e){return typeof t=="function"?t(e):t}function Ke(t,e){return typeof t=="function"?t(e):t}function Rn(t){return JSON.stringify(t,(e,r)=>$r(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}var Vs=Object.prototype.hasOwnProperty;function jr(t,e){if(t===e)return t;const r=Nn(t)&&Nn(e);if(!r&&!($r(t)&&$r(e)))return e;const s=(r?t:Object.keys(t)).length,c=r?e:Object.keys(e),h=c.length,a=r?new Array(h):{};let g=0;for(let y=0;y<h;y++){const _=r?y:c[y],M=t[_],x=e[_];if(M===x){a[_]=M,(r?y<s:Vs.call(t,_))&&g++;continue}if(M===null||x===null||typeof M!="object"||typeof x!="object"){a[_]=x;continue}const S=jr(M,x);a[_]=S,S===M&&g++}return s===h&&g===s?t:a}function Jt(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function Nn(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function $r(t){if(!Ln(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!Ln(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Ln(t){return Object.prototype.toString.call(t)==="[object Object]"}function Bn(t,e,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(t,e);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return jr(t,e)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return jr(t,e)}return e}function In(t,e){return typeof t=="function"?t(...e):!!t}var Hs=class extends Qt{#t;#e;#r;constructor(){super(),this.#r=t=>{if(!Tt&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#r=t,this.#e?.(),this.#e=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Gs=new Hs;function Yn(){let t,e;const r=new Promise((s,c)=>{t=s,e=c});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),t(s)},r.reject=s=>{n({status:"rejected",reason:s}),e(s)},r}var Qs=Us;function Zs(){let t=[],e=0,r=a=>{a()},n=a=>{a()},s=Qs;const c=a=>{e?t.push(a):s(()=>{r(a)})},h=()=>{const a=t;t=[],a.length&&s(()=>{n(()=>{a.forEach(g=>{r(g)})})})};return{batch:a=>{let g;e++;try{g=a()}finally{e--,e||h()}return g},batchCalls:a=>(...g)=>{c(()=>{a(...g)})},schedule:c,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var Xt=Zs(),Ks=class extends Qt{#t=!0;#e;#r;constructor(){super(),this.#r=t=>{if(!Tt&&window.addEventListener){const e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#r=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#t}},Js=new Ks;function Xs(t){return(t??"online")==="online"?Js.isOnline():!0}function ei(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Xs(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}var ti=class extends Qt{constructor(t,e){super(),this.options=e,this.#t=t,this.#a=null,this.#i=Yn(),this.bindMethods(),this.setOptions(e)}#t;#e=void 0;#r=void 0;#n=void 0;#o;#s;#i;#a;#g;#h;#f;#u;#c;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),zn(this.#e,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Rr(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Rr(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#_(),this.#e.removeObserver(this)}setOptions(t){const e=this.options,r=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ke(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#C(),this.#e.setOptions(this.options),e._defaulted&&!Jt(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&Fn(this.#e,r,this.options,e)&&this.#d(),this.updateResult(),n&&(this.#e!==r||Ke(this.options.enabled,this.#e)!==Ke(e.enabled,this.#e)||jt(this.options.staleTime,this.#e)!==jt(e.staleTime,this.#e))&&this.#m();const s=this.#y();n&&(this.#e!==r||Ke(this.options.enabled,this.#e)!==Ke(e.enabled,this.#e)||s!==this.#l)&&this.#v(s)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),r=this.createResult(e,t);return ni(this,r)&&(this.#n=r,this.#s=this.options,this.#o=this.#e.state),r}getCurrentResult(){return this.#n}trackResult(t,e){return new Proxy(t,{get:(r,n)=>(this.trackProp(n),e?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,n))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),r=this.#t.getQueryCache().build(this.#t,e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#d(t){this.#C();let e=this.#e.fetch(this.options,t);return t?.throwOnError||(e=e.catch(Kt)),e}#m(){this.#w();const t=jt(this.options.staleTime,this.#e);if(Tt||this.#n.isStale||!$n(t))return;const r=qs(this.#n.dataUpdatedAt,t)+1;this.#u=Zt.setTimeout(()=>{this.#n.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(t){this.#_(),this.#l=t,!(Tt||Ke(this.options.enabled,this.#e)===!1||!$n(this.#l)||this.#l===0)&&(this.#c=Zt.setInterval(()=>{(this.options.refetchIntervalInBackground||Gs.isFocused())&&this.#d()},this.#l))}#b(){this.#m(),this.#v(this.#y())}#w(){this.#u&&(Zt.clearTimeout(this.#u),this.#u=void 0)}#_(){this.#c&&(Zt.clearInterval(this.#c),this.#c=void 0)}createResult(t,e){const r=this.#e,n=this.options,s=this.#n,c=this.#o,h=this.#s,g=t!==r?t.state:this.#r,{state:y}=t;let _={...y},M=!1,x;if(e._optimisticResults){const J=this.hasListeners(),Z=!J&&zn(t,e),U=J&&Fn(t,r,e,n);(Z||U)&&(_={..._,...ei(y.data,t.options)}),e._optimisticResults==="isRestoring"&&(_.fetchStatus="idle")}let{error:S,errorUpdatedAt:D,status:O}=_;x=_.data;let L=!1;if(e.placeholderData!==void 0&&x===void 0&&O==="pending"){let J;s?.isPlaceholderData&&e.placeholderData===h?.placeholderData?(J=s.data,L=!0):J=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,J!==void 0&&(O="success",x=Bn(s?.data,J,e),M=!0)}if(e.select&&x!==void 0&&!L)if(s&&x===c?.data&&e.select===this.#g)x=this.#h;else try{this.#g=e.select,x=e.select(x),x=Bn(s?.data,x,e),this.#h=x,this.#a=null}catch(J){this.#a=J}this.#a&&(S=this.#a,x=this.#h,D=Date.now(),O="error");const I=_.fetchStatus==="fetching",z=O==="pending",V=O==="error",q=z&&I,X=x!==void 0,Q={status:O,fetchStatus:_.fetchStatus,isPending:z,isSuccess:O==="success",isError:V,isInitialLoading:q,isLoading:q,data:x,dataUpdatedAt:_.dataUpdatedAt,error:S,errorUpdatedAt:D,failureCount:_.fetchFailureCount,failureReason:_.fetchFailureReason,errorUpdateCount:_.errorUpdateCount,isFetched:_.dataUpdateCount>0||_.errorUpdateCount>0,isFetchedAfterMount:_.dataUpdateCount>g.dataUpdateCount||_.errorUpdateCount>g.errorUpdateCount,isFetching:I,isRefetching:I&&!z,isLoadingError:V&&!X,isPaused:_.fetchStatus==="paused",isPlaceholderData:M,isRefetchError:V&&X,isStale:Nr(t,e),refetch:this.refetch,promise:this.#i,isEnabled:Ke(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const J=W=>{Q.status==="error"?W.reject(Q.error):Q.data!==void 0&&W.resolve(Q.data)},Z=()=>{const W=this.#i=Q.promise=Yn();J(W)},U=this.#i;switch(U.status){case"pending":t.queryHash===r.queryHash&&J(U);break;case"fulfilled":(Q.status==="error"||Q.data!==U.value)&&Z();break;case"rejected":(Q.status!=="error"||Q.error!==U.reason)&&Z();break}}return Q}updateResult(){const t=this.#n,e=this.createResult(this.#e,this.options);if(this.#o=this.#e.state,this.#s=this.options,this.#o.data!==void 0&&(this.#f=this.#e),Jt(e,t))return;this.#n=e;const r=()=>{if(!t)return!0;const{notifyOnChangeProps:n}=this.options,s=typeof n=="function"?n():n;if(s==="all"||!s&&!this.#p.size)return!0;const c=new Set(s??this.#p);return this.options.throwOnError&&c.add("error"),Object.keys(this.#n).some(h=>{const a=h;return this.#n[a]!==t[a]&&c.has(a)})};this.#x({listeners:r()})}#C(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const e=this.#e;this.#e=t,this.#r=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#x(t){Xt.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function ri(t,e){return Ke(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function zn(t,e){return ri(t,e)||t.state.data!==void 0&&Rr(t,e,e.refetchOnMount)}function Rr(t,e,r){if(Ke(e.enabled,t)!==!1&&jt(e.staleTime,t)!=="static"){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&Nr(t,e)}return!1}function Fn(t,e,r,n){return(t!==e||Ke(n.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&Nr(t,r)}function Nr(t,e){return Ke(e.enabled,t)!==!1&&t.isStaleByTime(jt(e.staleTime,t))}function ni(t,e){return!Jt(t.getCurrentResult(),e)}function oi(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var si=class extends Qt{#t;#e=void 0;#r;#n;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#t.defaultMutationOptions(t),Jt(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),e?.mutationKey&&this.options.mutationKey&&Rn(e.mutationKey)!==Rn(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#o(),this.#s(t)}getCurrentResult(){return this.#e}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#o(),this.#s()}mutate(t,e){return this.#n=e,this.#r?.removeObserver(this),this.#r=this.#t.getMutationCache().build(this.#t,this.options),this.#r.addObserver(this),this.#r.execute(t)}#o(){const t=this.#r?.state??oi();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){Xt.batch(()=>{if(this.#n&&this.hasListeners()){const e=this.#e.variables,r=this.#e.context,n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#n.onSuccess?.(t.data,e,r,n),this.#n.onSettled?.(t.data,null,e,r,n)):t?.type==="error"&&(this.#n.onError?.(t.error,e,r,n),this.#n.onSettled?.(void 0,t.error,e,r,n))}this.listeners.forEach(e=>{e(this.#e)})})}},er={exports:{}},$t={};var Wn;function ii(){if(Wn)return $t;Wn=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,s,c){var h=null;if(c!==void 0&&(h=""+c),s.key!==void 0&&(h=""+s.key),"key"in s){c={};for(var a in s)a!=="key"&&(c[a]=s[a])}else c=s;return s=c.ref,{$$typeof:t,type:n,key:h,ref:s!==void 0?s:null,props:c}}return $t.Fragment=e,$t.jsx=r,$t.jsxs=r,$t}var Rt={};var Un;function ai(){return Un||(Un=1,process.env.NODE_ENV!=="production"&&(function(){function t(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===W?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case L:return"Fragment";case z:return"Profiler";case I:return"StrictMode";case re:return"Suspense";case Q:return"SuspenseList";case U:return"Activity"}if(typeof i=="object")switch(typeof i.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),i.$$typeof){case O:return"Portal";case q:return i.displayName||"Context";case V:return(i._context.displayName||"Context")+".Consumer";case X:var b=i.render;return i=i.displayName,i||(i=b.displayName||b.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case J:return b=i.displayName||null,b!==null?b:t(i.type)||"Memo";case Z:b=i._payload,i=i._init;try{return t(i(b))}catch{}}return null}function e(i){return""+i}function r(i){try{e(i);var b=!1}catch{b=!0}if(b){b=console;var T=b.error,j=typeof Symbol=="function"&&Symbol.toStringTag&&i[Symbol.toStringTag]||i.constructor.name||"Object";return T.call(b,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",j),e(i)}}function n(i){if(i===L)return"<>";if(typeof i=="object"&&i!==null&&i.$$typeof===Z)return"<...>";try{var b=t(i);return b?"<"+b+">":"<...>"}catch{return"<...>"}}function s(){var i=ae.A;return i===null?null:i.getOwner()}function c(){return Error("react-stack-top-frame")}function h(i){if(se.call(i,"key")){var b=Object.getOwnPropertyDescriptor(i,"key").get;if(b&&b.isReactWarning)return!1}return i.key!==void 0}function a(i,b){function T(){v||(v=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",b))}T.isReactWarning=!0,Object.defineProperty(i,"key",{get:T,configurable:!0})}function g(){var i=t(this.type);return d[i]||(d[i]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),i=this.props.ref,i!==void 0?i:null}function y(i,b,T,j,K,ee){var te=T.ref;return i={$$typeof:D,type:i,key:b,props:T,_owner:j},(te!==void 0?te:null)!==null?Object.defineProperty(i,"ref",{enumerable:!1,get:g}):Object.defineProperty(i,"ref",{enumerable:!1,value:null}),i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(i,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(i,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:K}),Object.defineProperty(i,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i}function _(i,b,T,j,K,ee){var te=b.children;if(te!==void 0)if(j)if(k(te)){for(j=0;j<te.length;j++)M(te[j]);Object.freeze&&Object.freeze(te)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else M(te);if(se.call(b,"key")){te=t(i);var H=Object.keys(b).filter(function(oe){return oe!=="key"});j=0<H.length?"{key: someKey, "+H.join(": ..., ")+": ...}":"{key: someKey}",f[te+j]||(H=0<H.length?"{"+H.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
6
6
  let props = %s;
7
7
  <%s {...props} />
8
8
  React keys must be passed directly to JSX without using spread:
9
9
  let props = %s;
10
- <%s key={someKey} {...props} />`,j,te,H,te),f[te+j]=!0)}if(te=null,T!==void 0&&(r(T),te=""+T),h(v)&&(r(v.key),te=""+v.key),"key"in v){T={};for(var ie in v)ie!=="key"&&(T[ie]=v[ie])}else T=v;return te&&a(T,typeof i=="function"?i.displayName||i.name||"Unknown":i),y(i,te,T,s(),K,J)}function P(i){C(i)?i._store&&(i._store.validated=1):typeof i=="object"&&i!==null&&i.$$typeof===U&&(i._payload.status==="fulfilled"?C(i._payload.value)&&i._payload.value._store&&(i._payload.value._store.validated=1):i._store&&(i._store.validated=1))}function C(i){return typeof i=="object"&&i!==null&&i.$$typeof===D}var S=Q,D=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),q=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),W=Symbol.for("react.client.reference"),ae=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe=Object.prototype.hasOwnProperty,k=Array.isArray,x=console.createTask?console.createTask:function(){return null};S={react_stack_bottom_frame:function(i){return i()}};var b,u={},c=S.react_stack_bottom_frame.bind(S,d)(),m=x(n(d)),f={};Tt.Fragment=N,Tt.jsx=function(i,v,T){var j=1e4>ae.recentlyCreatedOwnerStacks++;return _(i,v,T,!1,j?Error("react-stack-top-frame"):c,j?x(n(i)):m)},Tt.jsxs=function(i,v,T){var j=1e4>ae.recentlyCreatedOwnerStacks++;return _(i,v,T,!0,j?Error("react-stack-top-frame"):c,j?x(n(i)):m)}})()),Tt}var Un;function ai(){return Un||(Un=1,process.env.NODE_ENV==="production"?Jt.exports=si():Jt.exports=ii()),Jt.exports}var w=ai(),qn=je.createContext(void 0),Vn=t=>{const e=je.useContext(qn);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Hn=({client:t,children:e})=>(je.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),w.jsx(qn.Provider,{value:t,children:e})),Gn=je.createContext(!1),li=()=>je.useContext(Gn);Gn.Provider;function ui(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var ci=je.createContext(ui()),di=()=>je.useContext(ci),hi=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},fi=t=>{je.useEffect(()=>{t.clearReset()},[t])},pi=({result:t,errorResetBoundary:e,throwOnError:r,query:n,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&n&&(s&&t.data===void 0||Bn(r,[t.error,n])),gi=t=>{if(t.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=t.staleTime;t.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},mi=(t,e)=>t.isLoading&&t.isFetching&&!e,yi=(t,e)=>t?.suspense&&e.isPending,Qn=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function vi(t,e,r){if(process.env.NODE_ENV!=="production"&&(typeof t!="object"||Array.isArray(t)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=li(),s=di(),d=Vn(),h=d.defaultQueryOptions(t);d.getDefaultOptions().queries?._experimental_beforeQuery?.(h),process.env.NODE_ENV!=="production"&&(h.queryFn||console.error(`[${h.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),h._optimisticResults=n?"isRestoring":"optimistic",gi(h),hi(h,s),fi(s);const a=!d.getQueryCache().get(h.queryHash),[g]=je.useState(()=>new e(d,h)),y=g.getOptimisticResult(h),_=!n&&t.subscribed!==!1;if(je.useSyncExternalStore(je.useCallback(P=>{const C=_?g.subscribe(Kt.batchCalls(P)):Qt;return g.updateResult(),C},[g,_]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),je.useEffect(()=>{g.setOptions(h)},[h,g]),yi(h,y))throw Qn(h,g,s);if(pi({result:y,errorResetBoundary:s,throwOnError:h.throwOnError,query:d.getQueryCache().get(h.queryHash),suspense:h.suspense}))throw y.error;return d.getDefaultOptions().queries?._experimental_afterQuery?.(h,y),h.experimental_prefetchInRender&&!Ot&&mi(y,n)&&(a?Qn(h,g,s):d.getQueryCache().get(h.queryHash)?.promise)?.catch(Qt).finally(()=>{g.updateResult()}),h.notifyOnChangeProps?y:g.trackResult(y)}function Zn(t,e){return vi(t,ei)}function Rr(t,e){const r=Vn(),[n]=je.useState(()=>new oi(r,t));je.useEffect(()=>{n.setOptions(t)},[n,t]);const s=je.useSyncExternalStore(je.useCallback(h=>n.subscribe(Kt.batchCalls(h)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),d=je.useCallback((h,a)=>{n.mutate(h,a).catch(Qt)},[n]);if(s.error&&Bn(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:d,mutateAsync:s.mutate}}var Kn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nr(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var Lr={exports:{}},jt={};var Jn;function bi(){if(Jn)return jt;Jn=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,s,d){var h=null;if(d!==void 0&&(h=""+d),s.key!==void 0&&(h=""+s.key),"key"in s){d={};for(var a in s)a!=="key"&&(d[a]=s[a])}else d=s;return s=d.ref,{$$typeof:t,type:n,key:h,ref:s!==void 0?s:null,props:d}}return jt.Fragment=e,jt.jsx=r,jt.jsxs=r,jt}var Xt={};var Xn;function wi(){return Xn||(Xn=1,process.env.NODE_ENV!=="production"&&(function(){function t(f){if(f==null)return null;if(typeof f=="function")return f.$$typeof===G?null:f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case O:return"Fragment";case F:return"Profiler";case N:return"StrictMode";case ee:return"Suspense";case re:return"SuspenseList";case U:return"Activity"}if(typeof f=="object")switch(typeof f.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),f.$$typeof){case D:return"Portal";case V:return(f.displayName||"Context")+".Provider";case Y:return(f._context.displayName||"Context")+".Consumer";case q:var i=f.render;return f=f.displayName,f||(f=i.displayName||i.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case X:return i=f.displayName||null,i!==null?i:t(f.type)||"Memo";case Z:i=f._payload,f=f._init;try{return t(f(i))}catch{}}return null}function e(f){return""+f}function r(f){try{e(f);var i=!1}catch{i=!0}if(i){i=console;var v=i.error,T=typeof Symbol=="function"&&Symbol.toStringTag&&f[Symbol.toStringTag]||f.constructor.name||"Object";return v.call(i,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",T),e(f)}}function n(f){if(f===O)return"<>";if(typeof f=="object"&&f!==null&&f.$$typeof===Z)return"<...>";try{var i=t(f);return i?"<"+i+">":"<...>"}catch{return"<...>"}}function s(){var f=W.A;return f===null?null:f.getOwner()}function d(){return Error("react-stack-top-frame")}function h(f){if(ae.call(f,"key")){var i=Object.getOwnPropertyDescriptor(f,"key").get;if(i&&i.isReactWarning)return!1}return f.key!==void 0}function a(f,i){function v(){x||(x=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",i))}v.isReactWarning=!0,Object.defineProperty(f,"key",{get:v,configurable:!0})}function g(){var f=t(this.type);return b[f]||(b[f]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),f=this.props.ref,f!==void 0?f:null}function y(f,i,v,T,j,K,J,te){return v=K.ref,f={$$typeof:S,type:f,key:i,props:K,_owner:j},(v!==void 0?v:null)!==null?Object.defineProperty(f,"ref",{enumerable:!1,get:g}):Object.defineProperty(f,"ref",{enumerable:!1,value:null}),f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(f,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(f,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(f,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:te}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f}function _(f,i,v,T,j,K,J,te){var H=i.children;if(H!==void 0)if(T)if(oe(H)){for(T=0;T<H.length;T++)P(H[T]);Object.freeze&&Object.freeze(H)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else P(H);if(ae.call(i,"key")){H=t(f);var ie=Object.keys(i).filter(function(le){return le!=="key"});T=0<ie.length?"{key: someKey, "+ie.join(": ..., ")+": ...}":"{key: someKey}",m[H+T]||(ie=0<ie.length?"{"+ie.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
10
+ <%s key={someKey} {...props} />`,j,te,H,te),f[te+j]=!0)}if(te=null,T!==void 0&&(r(T),te=""+T),h(b)&&(r(b.key),te=""+b.key),"key"in b){T={};for(var ie in b)ie!=="key"&&(T[ie]=b[ie])}else T=b;return te&&a(T,typeof i=="function"?i.displayName||i.name||"Unknown":i),y(i,te,T,s(),K,ee)}function M(i){x(i)?i._store&&(i._store.validated=1):typeof i=="object"&&i!==null&&i.$$typeof===Z&&(i._payload.status==="fulfilled"?x(i._payload.value)&&i._payload.value._store&&(i._payload.value._store.validated=1):i._store&&(i._store.validated=1))}function x(i){return typeof i=="object"&&i!==null&&i.$$typeof===D}var S=G,D=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),q=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),W=Symbol.for("react.client.reference"),ae=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=Object.prototype.hasOwnProperty,k=Array.isArray,C=console.createTask?console.createTask:function(){return null};S={react_stack_bottom_frame:function(i){return i()}};var v,d={},u=S.react_stack_bottom_frame.bind(S,c)(),m=C(n(c)),f={};Rt.Fragment=L,Rt.jsx=function(i,b,T){var j=1e4>ae.recentlyCreatedOwnerStacks++;return _(i,b,T,!1,j?Error("react-stack-top-frame"):u,j?C(n(i)):m)},Rt.jsxs=function(i,b,T){var j=1e4>ae.recentlyCreatedOwnerStacks++;return _(i,b,T,!0,j?Error("react-stack-top-frame"):u,j?C(n(i)):m)}})()),Rt}var qn;function li(){return qn||(qn=1,process.env.NODE_ENV==="production"?er.exports=ii():er.exports=ai()),er.exports}var w=li(),Vn=Re.createContext(void 0),Hn=t=>{const e=Re.useContext(Vn);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Gn=({client:t,children:e})=>(Re.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),w.jsx(Vn.Provider,{value:t,children:e})),Qn=Re.createContext(!1),ui=()=>Re.useContext(Qn);Qn.Provider;function ci(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var di=Re.createContext(ci()),hi=()=>Re.useContext(di),fi=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},pi=t=>{Re.useEffect(()=>{t.clearReset()},[t])},gi=({result:t,errorResetBoundary:e,throwOnError:r,query:n,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&n&&(s&&t.data===void 0||In(r,[t.error,n])),mi=t=>{if(t.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=t.staleTime;t.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},yi=(t,e)=>t.isLoading&&t.isFetching&&!e,vi=(t,e)=>t?.suspense&&e.isPending,Zn=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function bi(t,e,r){if(process.env.NODE_ENV!=="production"&&(typeof t!="object"||Array.isArray(t)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=ui(),s=hi(),c=Hn(),h=c.defaultQueryOptions(t);c.getDefaultOptions().queries?._experimental_beforeQuery?.(h),process.env.NODE_ENV!=="production"&&(h.queryFn||console.error(`[${h.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),h._optimisticResults=n?"isRestoring":"optimistic",mi(h),fi(h,s),pi(s);const a=!c.getQueryCache().get(h.queryHash),[g]=Re.useState(()=>new e(c,h)),y=g.getOptimisticResult(h),_=!n&&t.subscribed!==!1;if(Re.useSyncExternalStore(Re.useCallback(M=>{const x=_?g.subscribe(Xt.batchCalls(M)):Kt;return g.updateResult(),x},[g,_]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),Re.useEffect(()=>{g.setOptions(h)},[h,g]),vi(h,y))throw Zn(h,g,s);if(gi({result:y,errorResetBoundary:s,throwOnError:h.throwOnError,query:c.getQueryCache().get(h.queryHash),suspense:h.suspense}))throw y.error;return c.getDefaultOptions().queries?._experimental_afterQuery?.(h,y),h.experimental_prefetchInRender&&!Tt&&yi(y,n)&&(a?Zn(h,g,s):c.getQueryCache().get(h.queryHash)?.promise)?.catch(Kt).finally(()=>{g.updateResult()}),h.notifyOnChangeProps?y:g.trackResult(y)}function Kn(t,e){return bi(t,ti)}function Lr(t,e){const r=Hn(),[n]=Re.useState(()=>new si(r,t));Re.useEffect(()=>{n.setOptions(t)},[n,t]);const s=Re.useSyncExternalStore(Re.useCallback(h=>n.subscribe(Xt.batchCalls(h)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),c=Re.useCallback((h,a)=>{n.mutate(h,a).catch(Kt)},[n]);if(s.error&&In(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:c,mutateAsync:s.mutate}}var Jn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Br(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var Ir={exports:{}},Nt={};var Xn;function wi(){if(Xn)return Nt;Xn=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,s,c){var h=null;if(c!==void 0&&(h=""+c),s.key!==void 0&&(h=""+s.key),"key"in s){c={};for(var a in s)a!=="key"&&(c[a]=s[a])}else c=s;return s=c.ref,{$$typeof:t,type:n,key:h,ref:s!==void 0?s:null,props:c}}return Nt.Fragment=e,Nt.jsx=r,Nt.jsxs=r,Nt}var tr={};var eo;function _i(){return eo||(eo=1,process.env.NODE_ENV!=="production"&&(function(){function t(f){if(f==null)return null;if(typeof f=="function")return f.$$typeof===U?null:f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case O:return"Fragment";case I:return"Profiler";case L:return"StrictMode";case X:return"Suspense";case re:return"SuspenseList";case Z:return"Activity"}if(typeof f=="object")switch(typeof f.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),f.$$typeof){case D:return"Portal";case V:return(f.displayName||"Context")+".Provider";case z:return(f._context.displayName||"Context")+".Consumer";case q:var i=f.render;return f=f.displayName,f||(f=i.displayName||i.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case Q:return i=f.displayName||null,i!==null?i:t(f.type)||"Memo";case J:i=f._payload,f=f._init;try{return t(f(i))}catch{}}return null}function e(f){return""+f}function r(f){try{e(f);var i=!1}catch{i=!0}if(i){i=console;var b=i.error,T=typeof Symbol=="function"&&Symbol.toStringTag&&f[Symbol.toStringTag]||f.constructor.name||"Object";return b.call(i,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",T),e(f)}}function n(f){if(f===O)return"<>";if(typeof f=="object"&&f!==null&&f.$$typeof===J)return"<...>";try{var i=t(f);return i?"<"+i+">":"<...>"}catch{return"<...>"}}function s(){var f=W.A;return f===null?null:f.getOwner()}function c(){return Error("react-stack-top-frame")}function h(f){if(ae.call(f,"key")){var i=Object.getOwnPropertyDescriptor(f,"key").get;if(i&&i.isReactWarning)return!1}return f.key!==void 0}function a(f,i){function b(){C||(C=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",i))}b.isReactWarning=!0,Object.defineProperty(f,"key",{get:b,configurable:!0})}function g(){var f=t(this.type);return v[f]||(v[f]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),f=this.props.ref,f!==void 0?f:null}function y(f,i,b,T,j,K,ee,te){return b=K.ref,f={$$typeof:S,type:f,key:i,props:K,_owner:j},(b!==void 0?b:null)!==null?Object.defineProperty(f,"ref",{enumerable:!1,get:g}):Object.defineProperty(f,"ref",{enumerable:!1,value:null}),f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(f,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(f,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.defineProperty(f,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:te}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f}function _(f,i,b,T,j,K,ee,te){var H=i.children;if(H!==void 0)if(T)if(se(H)){for(T=0;T<H.length;T++)M(H[T]);Object.freeze&&Object.freeze(H)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else M(H);if(ae.call(i,"key")){H=t(f);var ie=Object.keys(i).filter(function(ue){return ue!=="key"});T=0<ie.length?"{key: someKey, "+ie.join(": ..., ")+": ...}":"{key: someKey}",m[H+T]||(ie=0<ie.length?"{"+ie.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
11
11
  let props = %s;
12
12
  <%s {...props} />
13
13
  React keys must be passed directly to JSX without using spread:
14
14
  let props = %s;
15
- <%s key={someKey} {...props} />`,T,H,ie,H),m[H+T]=!0)}if(H=null,v!==void 0&&(r(v),H=""+v),h(i)&&(r(i.key),H=""+i.key),"key"in i){v={};for(var se in i)se!=="key"&&(v[se]=i[se])}else v=i;return H&&a(v,typeof f=="function"?f.displayName||f.name||"Unknown":f),y(f,H,K,j,s(),v,J,te)}function P(f){typeof f=="object"&&f!==null&&f.$$typeof===S&&f._store&&(f._store.validated=1)}var C=Q,S=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),V=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),G=Symbol.for("react.client.reference"),W=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=Object.prototype.hasOwnProperty,oe=Array.isArray,k=console.createTask?console.createTask:function(){return null};C={react_stack_bottom_frame:function(f){return f()}};var x,b={},u=C.react_stack_bottom_frame.bind(C,d)(),c=k(n(d)),m={};Xt.Fragment=O,Xt.jsx=function(f,i,v,T,j){var K=1e4>W.recentlyCreatedOwnerStacks++;return _(f,i,v,!1,T,j,K?Error("react-stack-top-frame"):u,K?k(n(f)):c)},Xt.jsxs=function(f,i,v,T,j){var K=1e4>W.recentlyCreatedOwnerStacks++;return _(f,i,v,!0,T,j,K?Error("react-stack-top-frame"):u,K?k(n(f)):c)}})()),Xt}var eo;function _i(){return eo||(eo=1,process.env.NODE_ENV==="production"?Lr.exports=bi():Lr.exports=wi()),Lr.exports}_i();var Br={exports:{}},Ir={};var to;function xi(){if(to)return Ir;to=1;var t=Q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Ir.c=function(e){return t.H.useMemoCache(e)},Ir}var ro={};var no;function Ci(){return no||(no=1,process.env.NODE_ENV!=="production"&&(function(){var t=Q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;ro.c=function(e){var r=t.H;return r===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
15
+ <%s key={someKey} {...props} />`,T,H,ie,H),m[H+T]=!0)}if(H=null,b!==void 0&&(r(b),H=""+b),h(i)&&(r(i.key),H=""+i.key),"key"in i){b={};for(var oe in i)oe!=="key"&&(b[oe]=i[oe])}else b=i;return H&&a(b,typeof f=="function"?f.displayName||f.name||"Unknown":f),y(f,H,K,j,s(),b,ee,te)}function M(f){typeof f=="object"&&f!==null&&f.$$typeof===S&&f._store&&(f._store.validated=1)}var x=G,S=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),V=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),U=Symbol.for("react.client.reference"),W=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=Object.prototype.hasOwnProperty,se=Array.isArray,k=console.createTask?console.createTask:function(){return null};x={react_stack_bottom_frame:function(f){return f()}};var C,v={},d=x.react_stack_bottom_frame.bind(x,c)(),u=k(n(c)),m={};tr.Fragment=O,tr.jsx=function(f,i,b,T,j){var K=1e4>W.recentlyCreatedOwnerStacks++;return _(f,i,b,!1,T,j,K?Error("react-stack-top-frame"):d,K?k(n(f)):u)},tr.jsxs=function(f,i,b,T,j){var K=1e4>W.recentlyCreatedOwnerStacks++;return _(f,i,b,!0,T,j,K?Error("react-stack-top-frame"):d,K?k(n(f)):u)}})()),tr}var to;function Ci(){return to||(to=1,process.env.NODE_ENV==="production"?Ir.exports=wi():Ir.exports=_i()),Ir.exports}Ci();var Yr={exports:{}},zr={};var ro;function xi(){if(ro)return zr;ro=1;var t=G.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return zr.c=function(e){return t.H.useMemoCache(e)},zr}var no={};var oo;function Si(){return oo||(oo=1,process.env.NODE_ENV!=="production"&&(function(){var t=G.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;no.c=function(e){var r=t.H;return r===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
16
16
  1. You might have mismatching versions of React and the renderer (such as React DOM)
17
17
  2. You might be breaking the Rules of Hooks
18
18
  3. You might have more than one copy of React in the same app
19
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r.useMemoCache(e)}})()),ro}var oo;function Si(){return oo||(oo=1,process.env.NODE_ENV==="production"?Br.exports=xi():Br.exports=Ci()),Br.exports}Si();var so={},$t={},io;function Di(){if(io)return $t;io=1,$t.byteLength=a,$t.toByteArray=y,$t.fromByteArray=C;for(var t=[],e=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,d=n.length;s<d;++s)t[s]=n[s],e[n.charCodeAt(s)]=s;e[45]=62,e[95]=63;function h(S){var D=S.length;if(D%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var O=S.indexOf("=");O===-1&&(O=D);var N=O===D?0:4-O%4;return[O,N]}function a(S){var D=h(S),O=D[0],N=D[1];return(O+N)*3/4-N}function g(S,D,O){return(D+O)*3/4-O}function y(S){var D,O=h(S),N=O[0],F=O[1],Y=new r(g(S,N,F)),V=0,q=F>0?N-4:N,ee;for(ee=0;ee<q;ee+=4)D=e[S.charCodeAt(ee)]<<18|e[S.charCodeAt(ee+1)]<<12|e[S.charCodeAt(ee+2)]<<6|e[S.charCodeAt(ee+3)],Y[V++]=D>>16&255,Y[V++]=D>>8&255,Y[V++]=D&255;return F===2&&(D=e[S.charCodeAt(ee)]<<2|e[S.charCodeAt(ee+1)]>>4,Y[V++]=D&255),F===1&&(D=e[S.charCodeAt(ee)]<<10|e[S.charCodeAt(ee+1)]<<4|e[S.charCodeAt(ee+2)]>>2,Y[V++]=D>>8&255,Y[V++]=D&255),Y}function _(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function P(S,D,O){for(var N,F=[],Y=D;Y<O;Y+=3)N=(S[Y]<<16&16711680)+(S[Y+1]<<8&65280)+(S[Y+2]&255),F.push(_(N));return F.join("")}function C(S){for(var D,O=S.length,N=O%3,F=[],Y=16383,V=0,q=O-N;V<q;V+=Y)F.push(P(S,V,V+Y>q?q:V+Y));return N===1?(D=S[O-1],F.push(t[D>>2]+t[D<<4&63]+"==")):N===2&&(D=(S[O-2]<<8)+S[O-1],F.push(t[D>>10]+t[D>>4&63]+t[D<<2&63]+"=")),F.join("")}return $t}var Yr={};var ao;function ki(){return ao||(ao=1,Yr.read=function(t,e,r,n,s){var d,h,a=s*8-n-1,g=(1<<a)-1,y=g>>1,_=-7,P=r?s-1:0,C=r?-1:1,S=t[e+P];for(P+=C,d=S&(1<<-_)-1,S>>=-_,_+=a;_>0;d=d*256+t[e+P],P+=C,_-=8);for(h=d&(1<<-_)-1,d>>=-_,_+=n;_>0;h=h*256+t[e+P],P+=C,_-=8);if(d===0)d=1-y;else{if(d===g)return h?NaN:(S?-1:1)*(1/0);h=h+Math.pow(2,n),d=d-y}return(S?-1:1)*h*Math.pow(2,d-n)},Yr.write=function(t,e,r,n,s,d){var h,a,g,y=d*8-s-1,_=(1<<y)-1,P=_>>1,C=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=n?0:d-1,D=n?1:-1,O=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,h=_):(h=Math.floor(Math.log(e)/Math.LN2),e*(g=Math.pow(2,-h))<1&&(h--,g*=2),h+P>=1?e+=C/g:e+=C*Math.pow(2,1-P),e*g>=2&&(h++,g/=2),h+P>=_?(a=0,h=_):h+P>=1?(a=(e*g-1)*Math.pow(2,s),h=h+P):(a=e*Math.pow(2,P-1)*Math.pow(2,s),h=0));s>=8;t[r+S]=a&255,S+=D,a/=256,s-=8);for(h=h<<s|a,y+=s;y>0;t[r+S]=h&255,S+=D,h/=256,y-=8);t[r+S-D]|=O*128}),Yr}var zr,lo;function Pi(){if(lo)return zr;lo=1;var t={}.toString;return zr=Array.isArray||function(e){return t.call(e)=="[object Array]"},zr}var uo;function Mi(){return uo||(uo=1,(function(t){var e=Di(),r=ki(),n=Pi();t.Buffer=a,t.SlowBuffer=F,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=Kn.TYPED_ARRAY_SUPPORT!==void 0?Kn.TYPED_ARRAY_SUPPORT:s(),t.kMaxLength=d();function s(){try{var o=new Uint8Array(1);return o.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},o.foo()===42&&typeof o.subarray=="function"&&o.subarray(1,1).byteLength===0}catch{return!1}}function d(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function h(o,l){if(d()<l)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(o=new Uint8Array(l),o.__proto__=a.prototype):(o===null&&(o=new a(l)),o.length=l),o}function a(o,l,p){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(o,l,p);if(typeof o=="number"){if(typeof l=="string")throw new Error("If encoding is specified then the first argument must be a string");return P(this,o)}return g(this,o,l,p)}a.poolSize=8192,a._augment=function(o){return o.__proto__=a.prototype,o};function g(o,l,p,M){if(typeof l=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&l instanceof ArrayBuffer?D(o,l,p,M):typeof l=="string"?C(o,l,p):O(o,l)}a.from=function(o,l,p){return g(null,o,l,p)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0}));function y(o){if(typeof o!="number")throw new TypeError('"size" argument must be a number');if(o<0)throw new RangeError('"size" argument must not be negative')}function _(o,l,p,M){return y(l),l<=0?h(o,l):p!==void 0?typeof M=="string"?h(o,l).fill(p,M):h(o,l).fill(p):h(o,l)}a.alloc=function(o,l,p){return _(null,o,l,p)};function P(o,l){if(y(l),o=h(o,l<0?0:N(l)|0),!a.TYPED_ARRAY_SUPPORT)for(var p=0;p<l;++p)o[p]=0;return o}a.allocUnsafe=function(o){return P(null,o)},a.allocUnsafeSlow=function(o){return P(null,o)};function C(o,l,p){if((typeof p!="string"||p==="")&&(p="utf8"),!a.isEncoding(p))throw new TypeError('"encoding" must be a valid string encoding');var M=Y(l,p)|0;o=h(o,M);var R=o.write(l,p);return R!==M&&(o=o.slice(0,R)),o}function S(o,l){var p=l.length<0?0:N(l.length)|0;o=h(o,p);for(var M=0;M<p;M+=1)o[M]=l[M]&255;return o}function D(o,l,p,M){if(l.byteLength,p<0||l.byteLength<p)throw new RangeError("'offset' is out of bounds");if(l.byteLength<p+(M||0))throw new RangeError("'length' is out of bounds");return p===void 0&&M===void 0?l=new Uint8Array(l):M===void 0?l=new Uint8Array(l,p):l=new Uint8Array(l,p,M),a.TYPED_ARRAY_SUPPORT?(o=l,o.__proto__=a.prototype):o=S(o,l),o}function O(o,l){if(a.isBuffer(l)){var p=N(l.length)|0;return o=h(o,p),o.length===0||l.copy(o,0,0,p),o}if(l){if(typeof ArrayBuffer<"u"&&l.buffer instanceof ArrayBuffer||"length"in l)return typeof l.length!="number"||ce(l.length)?h(o,0):S(o,l);if(l.type==="Buffer"&&n(l.data))return S(o,l.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function N(o){if(o>=d())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d().toString(16)+" bytes");return o|0}function F(o){return+o!=o&&(o=0),a.alloc(+o)}a.isBuffer=function(o){return!!(o!=null&&o._isBuffer)},a.compare=function(o,l){if(!a.isBuffer(o)||!a.isBuffer(l))throw new TypeError("Arguments must be Buffers");if(o===l)return 0;for(var p=o.length,M=l.length,R=0,z=Math.min(p,M);R<z;++R)if(o[R]!==l[R]){p=o[R],M=l[R];break}return p<M?-1:M<p?1:0},a.isEncoding=function(o){switch(String(o).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(o,l){if(!n(o))throw new TypeError('"list" argument must be an Array of Buffers');if(o.length===0)return a.alloc(0);var p;if(l===void 0)for(l=0,p=0;p<o.length;++p)l+=o[p].length;var M=a.allocUnsafe(l),R=0;for(p=0;p<o.length;++p){var z=o[p];if(!a.isBuffer(z))throw new TypeError('"list" argument must be an Array of Buffers');z.copy(M,R),R+=z.length}return M};function Y(o,l){if(a.isBuffer(o))return o.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(o)||o instanceof ArrayBuffer))return o.byteLength;typeof o!="string"&&(o=""+o);var p=o.length;if(p===0)return 0;for(var M=!1;;)switch(l){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":case void 0:return E(o).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return B(o).length;default:if(M)return E(o).length;l=(""+l).toLowerCase(),M=!0}}a.byteLength=Y;function V(o,l,p){var M=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,l>>>=0,p<=l))return"";for(o||(o="utf8");;)switch(o){case"hex":return m(this,l,p);case"utf8":case"utf-8":return k(this,l,p);case"ascii":return u(this,l,p);case"latin1":case"binary":return c(this,l,p);case"base64":return oe(this,l,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(this,l,p);default:if(M)throw new TypeError("Unknown encoding: "+o);o=(o+"").toLowerCase(),M=!0}}a.prototype._isBuffer=!0;function q(o,l,p){var M=o[l];o[l]=o[p],o[p]=M}a.prototype.swap16=function(){var o=this.length;if(o%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var l=0;l<o;l+=2)q(this,l,l+1);return this},a.prototype.swap32=function(){var o=this.length;if(o%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var l=0;l<o;l+=4)q(this,l,l+3),q(this,l+1,l+2);return this},a.prototype.swap64=function(){var o=this.length;if(o%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var l=0;l<o;l+=8)q(this,l,l+7),q(this,l+1,l+6),q(this,l+2,l+5),q(this,l+3,l+4);return this},a.prototype.toString=function(){var o=this.length|0;return o===0?"":arguments.length===0?k(this,0,o):V.apply(this,arguments)},a.prototype.equals=function(o){if(!a.isBuffer(o))throw new TypeError("Argument must be a Buffer");return this===o?!0:a.compare(this,o)===0},a.prototype.inspect=function(){var o="",l=t.INSPECT_MAX_BYTES;return this.length>0&&(o=this.toString("hex",0,l).match(/.{2}/g).join(" "),this.length>l&&(o+=" ... ")),"<Buffer "+o+">"},a.prototype.compare=function(o,l,p,M,R){if(!a.isBuffer(o))throw new TypeError("Argument must be a Buffer");if(l===void 0&&(l=0),p===void 0&&(p=o?o.length:0),M===void 0&&(M=0),R===void 0&&(R=this.length),l<0||p>o.length||M<0||R>this.length)throw new RangeError("out of range index");if(M>=R&&l>=p)return 0;if(M>=R)return-1;if(l>=p)return 1;if(l>>>=0,p>>>=0,M>>>=0,R>>>=0,this===o)return 0;for(var z=R-M,ue=p-l,he=Math.min(z,ue),pe=this.slice(M,R),ne=o.slice(l,p),fe=0;fe<he;++fe)if(pe[fe]!==ne[fe]){z=pe[fe],ue=ne[fe];break}return z<ue?-1:ue<z?1:0};function ee(o,l,p,M,R){if(o.length===0)return-1;if(typeof p=="string"?(M=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,isNaN(p)&&(p=R?0:o.length-1),p<0&&(p=o.length+p),p>=o.length){if(R)return-1;p=o.length-1}else if(p<0)if(R)p=0;else return-1;if(typeof l=="string"&&(l=a.from(l,M)),a.isBuffer(l))return l.length===0?-1:re(o,l,p,M,R);if(typeof l=="number")return l=l&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(o,l,p):Uint8Array.prototype.lastIndexOf.call(o,l,p):re(o,[l],p,M,R);throw new TypeError("val must be string, number or Buffer")}function re(o,l,p,M,R){var z=1,ue=o.length,he=l.length;if(M!==void 0&&(M=String(M).toLowerCase(),M==="ucs2"||M==="ucs-2"||M==="utf16le"||M==="utf-16le")){if(o.length<2||l.length<2)return-1;z=2,ue/=2,he/=2,p/=2}function pe(De,xe){return z===1?De[xe]:De.readUInt16BE(xe*z)}var ne;if(R){var fe=-1;for(ne=p;ne<ue;ne++)if(pe(o,ne)===pe(l,fe===-1?0:ne-fe)){if(fe===-1&&(fe=ne),ne-fe+1===he)return fe*z}else fe!==-1&&(ne-=ne-fe),fe=-1}else for(p+he>ue&&(p=ue-he),ne=p;ne>=0;ne--){for(var me=!0,ge=0;ge<he;ge++)if(pe(o,ne+ge)!==pe(l,ge)){me=!1;break}if(me)return ne}return-1}a.prototype.includes=function(o,l,p){return this.indexOf(o,l,p)!==-1},a.prototype.indexOf=function(o,l,p){return ee(this,o,l,p,!0)},a.prototype.lastIndexOf=function(o,l,p){return ee(this,o,l,p,!1)};function X(o,l,p,M){p=Number(p)||0;var R=o.length-p;M?(M=Number(M),M>R&&(M=R)):M=R;var z=l.length;if(z%2!==0)throw new TypeError("Invalid hex string");M>z/2&&(M=z/2);for(var ue=0;ue<M;++ue){var he=parseInt(l.substr(ue*2,2),16);if(isNaN(he))return ue;o[p+ue]=he}return ue}function Z(o,l,p,M){return I(E(l,o.length-p),o,p,M)}function U(o,l,p,M){return I(L(l),o,p,M)}function G(o,l,p,M){return U(o,l,p,M)}function W(o,l,p,M){return I(B(l),o,p,M)}function ae(o,l,p,M){return I($(l,o.length-p),o,p,M)}a.prototype.write=function(o,l,p,M){if(l===void 0)M="utf8",p=this.length,l=0;else if(p===void 0&&typeof l=="string")M=l,p=this.length,l=0;else if(isFinite(l))l=l|0,isFinite(p)?(p=p|0,M===void 0&&(M="utf8")):(M=p,p=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var R=this.length-l;if((p===void 0||p>R)&&(p=R),o.length>0&&(p<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");M||(M="utf8");for(var z=!1;;)switch(M){case"hex":return X(this,o,l,p);case"utf8":case"utf-8":return Z(this,o,l,p);case"ascii":return U(this,o,l,p);case"latin1":case"binary":return G(this,o,l,p);case"base64":return W(this,o,l,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae(this,o,l,p);default:if(z)throw new TypeError("Unknown encoding: "+M);M=(""+M).toLowerCase(),z=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(o,l,p){return l===0&&p===o.length?e.fromByteArray(o):e.fromByteArray(o.slice(l,p))}function k(o,l,p){p=Math.min(o.length,p);for(var M=[],R=l;R<p;){var z=o[R],ue=null,he=z>239?4:z>223?3:z>191?2:1;if(R+he<=p){var pe,ne,fe,me;switch(he){case 1:z<128&&(ue=z);break;case 2:pe=o[R+1],(pe&192)===128&&(me=(z&31)<<6|pe&63,me>127&&(ue=me));break;case 3:pe=o[R+1],ne=o[R+2],(pe&192)===128&&(ne&192)===128&&(me=(z&15)<<12|(pe&63)<<6|ne&63,me>2047&&(me<55296||me>57343)&&(ue=me));break;case 4:pe=o[R+1],ne=o[R+2],fe=o[R+3],(pe&192)===128&&(ne&192)===128&&(fe&192)===128&&(me=(z&15)<<18|(pe&63)<<12|(ne&63)<<6|fe&63,me>65535&&me<1114112&&(ue=me))}}ue===null?(ue=65533,he=1):ue>65535&&(ue-=65536,M.push(ue>>>10&1023|55296),ue=56320|ue&1023),M.push(ue),R+=he}return b(M)}var x=4096;function b(o){var l=o.length;if(l<=x)return String.fromCharCode.apply(String,o);for(var p="",M=0;M<l;)p+=String.fromCharCode.apply(String,o.slice(M,M+=x));return p}function u(o,l,p){var M="";p=Math.min(o.length,p);for(var R=l;R<p;++R)M+=String.fromCharCode(o[R]&127);return M}function c(o,l,p){var M="";p=Math.min(o.length,p);for(var R=l;R<p;++R)M+=String.fromCharCode(o[R]);return M}function m(o,l,p){var M=o.length;(!l||l<0)&&(l=0),(!p||p<0||p>M)&&(p=M);for(var R="",z=l;z<p;++z)R+=le(o[z]);return R}function f(o,l,p){for(var M=o.slice(l,p),R="",z=0;z<M.length;z+=2)R+=String.fromCharCode(M[z]+M[z+1]*256);return R}a.prototype.slice=function(o,l){var p=this.length;o=~~o,l=l===void 0?p:~~l,o<0?(o+=p,o<0&&(o=0)):o>p&&(o=p),l<0?(l+=p,l<0&&(l=0)):l>p&&(l=p),l<o&&(l=o);var M;if(a.TYPED_ARRAY_SUPPORT)M=this.subarray(o,l),M.__proto__=a.prototype;else{var R=l-o;M=new a(R,void 0);for(var z=0;z<R;++z)M[z]=this[z+o]}return M};function i(o,l,p){if(o%1!==0||o<0)throw new RangeError("offset is not uint");if(o+l>p)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUIntLE=function(o,l,p){o=o|0,l=l|0,p||i(o,l,this.length);for(var M=this[o],R=1,z=0;++z<l&&(R*=256);)M+=this[o+z]*R;return M},a.prototype.readUIntBE=function(o,l,p){o=o|0,l=l|0,p||i(o,l,this.length);for(var M=this[o+--l],R=1;l>0&&(R*=256);)M+=this[o+--l]*R;return M},a.prototype.readUInt8=function(o,l){return l||i(o,1,this.length),this[o]},a.prototype.readUInt16LE=function(o,l){return l||i(o,2,this.length),this[o]|this[o+1]<<8},a.prototype.readUInt16BE=function(o,l){return l||i(o,2,this.length),this[o]<<8|this[o+1]},a.prototype.readUInt32LE=function(o,l){return l||i(o,4,this.length),(this[o]|this[o+1]<<8|this[o+2]<<16)+this[o+3]*16777216},a.prototype.readUInt32BE=function(o,l){return l||i(o,4,this.length),this[o]*16777216+(this[o+1]<<16|this[o+2]<<8|this[o+3])},a.prototype.readIntLE=function(o,l,p){o=o|0,l=l|0,p||i(o,l,this.length);for(var M=this[o],R=1,z=0;++z<l&&(R*=256);)M+=this[o+z]*R;return R*=128,M>=R&&(M-=Math.pow(2,8*l)),M},a.prototype.readIntBE=function(o,l,p){o=o|0,l=l|0,p||i(o,l,this.length);for(var M=l,R=1,z=this[o+--M];M>0&&(R*=256);)z+=this[o+--M]*R;return R*=128,z>=R&&(z-=Math.pow(2,8*l)),z},a.prototype.readInt8=function(o,l){return l||i(o,1,this.length),this[o]&128?(255-this[o]+1)*-1:this[o]},a.prototype.readInt16LE=function(o,l){l||i(o,2,this.length);var p=this[o]|this[o+1]<<8;return p&32768?p|4294901760:p},a.prototype.readInt16BE=function(o,l){l||i(o,2,this.length);var p=this[o+1]|this[o]<<8;return p&32768?p|4294901760:p},a.prototype.readInt32LE=function(o,l){return l||i(o,4,this.length),this[o]|this[o+1]<<8|this[o+2]<<16|this[o+3]<<24},a.prototype.readInt32BE=function(o,l){return l||i(o,4,this.length),this[o]<<24|this[o+1]<<16|this[o+2]<<8|this[o+3]},a.prototype.readFloatLE=function(o,l){return l||i(o,4,this.length),r.read(this,o,!0,23,4)},a.prototype.readFloatBE=function(o,l){return l||i(o,4,this.length),r.read(this,o,!1,23,4)},a.prototype.readDoubleLE=function(o,l){return l||i(o,8,this.length),r.read(this,o,!0,52,8)},a.prototype.readDoubleBE=function(o,l){return l||i(o,8,this.length),r.read(this,o,!1,52,8)};function v(o,l,p,M,R,z){if(!a.isBuffer(o))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>R||l<z)throw new RangeError('"value" argument is out of bounds');if(p+M>o.length)throw new RangeError("Index out of range")}a.prototype.writeUIntLE=function(o,l,p,M){if(o=+o,l=l|0,p=p|0,!M){var R=Math.pow(2,8*p)-1;v(this,o,l,p,R,0)}var z=1,ue=0;for(this[l]=o&255;++ue<p&&(z*=256);)this[l+ue]=o/z&255;return l+p},a.prototype.writeUIntBE=function(o,l,p,M){if(o=+o,l=l|0,p=p|0,!M){var R=Math.pow(2,8*p)-1;v(this,o,l,p,R,0)}var z=p-1,ue=1;for(this[l+z]=o&255;--z>=0&&(ue*=256);)this[l+z]=o/ue&255;return l+p},a.prototype.writeUInt8=function(o,l,p){return o=+o,l=l|0,p||v(this,o,l,1,255,0),a.TYPED_ARRAY_SUPPORT||(o=Math.floor(o)),this[l]=o&255,l+1};function T(o,l,p,M){l<0&&(l=65535+l+1);for(var R=0,z=Math.min(o.length-p,2);R<z;++R)o[p+R]=(l&255<<8*(M?R:1-R))>>>(M?R:1-R)*8}a.prototype.writeUInt16LE=function(o,l,p){return o=+o,l=l|0,p||v(this,o,l,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[l]=o&255,this[l+1]=o>>>8):T(this,o,l,!0),l+2},a.prototype.writeUInt16BE=function(o,l,p){return o=+o,l=l|0,p||v(this,o,l,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[l]=o>>>8,this[l+1]=o&255):T(this,o,l,!1),l+2};function j(o,l,p,M){l<0&&(l=4294967295+l+1);for(var R=0,z=Math.min(o.length-p,4);R<z;++R)o[p+R]=l>>>(M?R:3-R)*8&255}a.prototype.writeUInt32LE=function(o,l,p){return o=+o,l=l|0,p||v(this,o,l,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[l+3]=o>>>24,this[l+2]=o>>>16,this[l+1]=o>>>8,this[l]=o&255):j(this,o,l,!0),l+4},a.prototype.writeUInt32BE=function(o,l,p){return o=+o,l=l|0,p||v(this,o,l,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[l]=o>>>24,this[l+1]=o>>>16,this[l+2]=o>>>8,this[l+3]=o&255):j(this,o,l,!1),l+4},a.prototype.writeIntLE=function(o,l,p,M){if(o=+o,l=l|0,!M){var R=Math.pow(2,8*p-1);v(this,o,l,p,R-1,-R)}var z=0,ue=1,he=0;for(this[l]=o&255;++z<p&&(ue*=256);)o<0&&he===0&&this[l+z-1]!==0&&(he=1),this[l+z]=(o/ue>>0)-he&255;return l+p},a.prototype.writeIntBE=function(o,l,p,M){if(o=+o,l=l|0,!M){var R=Math.pow(2,8*p-1);v(this,o,l,p,R-1,-R)}var z=p-1,ue=1,he=0;for(this[l+z]=o&255;--z>=0&&(ue*=256);)o<0&&he===0&&this[l+z+1]!==0&&(he=1),this[l+z]=(o/ue>>0)-he&255;return l+p},a.prototype.writeInt8=function(o,l,p){return o=+o,l=l|0,p||v(this,o,l,1,127,-128),a.TYPED_ARRAY_SUPPORT||(o=Math.floor(o)),o<0&&(o=255+o+1),this[l]=o&255,l+1},a.prototype.writeInt16LE=function(o,l,p){return o=+o,l=l|0,p||v(this,o,l,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[l]=o&255,this[l+1]=o>>>8):T(this,o,l,!0),l+2},a.prototype.writeInt16BE=function(o,l,p){return o=+o,l=l|0,p||v(this,o,l,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[l]=o>>>8,this[l+1]=o&255):T(this,o,l,!1),l+2},a.prototype.writeInt32LE=function(o,l,p){return o=+o,l=l|0,p||v(this,o,l,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[l]=o&255,this[l+1]=o>>>8,this[l+2]=o>>>16,this[l+3]=o>>>24):j(this,o,l,!0),l+4},a.prototype.writeInt32BE=function(o,l,p){return o=+o,l=l|0,p||v(this,o,l,4,2147483647,-2147483648),o<0&&(o=4294967295+o+1),a.TYPED_ARRAY_SUPPORT?(this[l]=o>>>24,this[l+1]=o>>>16,this[l+2]=o>>>8,this[l+3]=o&255):j(this,o,l,!1),l+4};function K(o,l,p,M,R,z){if(p+M>o.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function J(o,l,p,M,R){return R||K(o,l,p,4),r.write(o,l,p,M,23,4),p+4}a.prototype.writeFloatLE=function(o,l,p){return J(this,o,l,!0,p)},a.prototype.writeFloatBE=function(o,l,p){return J(this,o,l,!1,p)};function te(o,l,p,M,R){return R||K(o,l,p,8),r.write(o,l,p,M,52,8),p+8}a.prototype.writeDoubleLE=function(o,l,p){return te(this,o,l,!0,p)},a.prototype.writeDoubleBE=function(o,l,p){return te(this,o,l,!1,p)},a.prototype.copy=function(o,l,p,M){if(p||(p=0),!M&&M!==0&&(M=this.length),l>=o.length&&(l=o.length),l||(l=0),M>0&&M<p&&(M=p),M===p||o.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(p<0||p>=this.length)throw new RangeError("sourceStart out of bounds");if(M<0)throw new RangeError("sourceEnd out of bounds");M>this.length&&(M=this.length),o.length-l<M-p&&(M=o.length-l+p);var R=M-p,z;if(this===o&&p<l&&l<M)for(z=R-1;z>=0;--z)o[z+l]=this[z+p];else if(R<1e3||!a.TYPED_ARRAY_SUPPORT)for(z=0;z<R;++z)o[z+l]=this[z+p];else Uint8Array.prototype.set.call(o,this.subarray(p,p+R),l);return R},a.prototype.fill=function(o,l,p,M){if(typeof o=="string"){if(typeof l=="string"?(M=l,l=0,p=this.length):typeof p=="string"&&(M=p,p=this.length),o.length===1){var R=o.charCodeAt(0);R<256&&(o=R)}if(M!==void 0&&typeof M!="string")throw new TypeError("encoding must be a string");if(typeof M=="string"&&!a.isEncoding(M))throw new TypeError("Unknown encoding: "+M)}else typeof o=="number"&&(o=o&255);if(l<0||this.length<l||this.length<p)throw new RangeError("Out of range index");if(p<=l)return this;l=l>>>0,p=p===void 0?this.length:p>>>0,o||(o=0);var z;if(typeof o=="number")for(z=l;z<p;++z)this[z]=o;else{var ue=a.isBuffer(o)?o:E(new a(o,M).toString()),he=ue.length;for(z=0;z<p-l;++z)this[z+l]=ue[z%he]}return this};var H=/[^+\/0-9A-Za-z-_]/g;function ie(o){if(o=se(o).replace(H,""),o.length<2)return"";for(;o.length%4!==0;)o=o+"=";return o}function se(o){return o.trim?o.trim():o.replace(/^\s+|\s+$/g,"")}function le(o){return o<16?"0"+o.toString(16):o.toString(16)}function E(o,l){l=l||1/0;for(var p,M=o.length,R=null,z=[],ue=0;ue<M;++ue){if(p=o.charCodeAt(ue),p>55295&&p<57344){if(!R){if(p>56319){(l-=3)>-1&&z.push(239,191,189);continue}else if(ue+1===M){(l-=3)>-1&&z.push(239,191,189);continue}R=p;continue}if(p<56320){(l-=3)>-1&&z.push(239,191,189),R=p;continue}p=(R-55296<<10|p-56320)+65536}else R&&(l-=3)>-1&&z.push(239,191,189);if(R=null,p<128){if((l-=1)<0)break;z.push(p)}else if(p<2048){if((l-=2)<0)break;z.push(p>>6|192,p&63|128)}else if(p<65536){if((l-=3)<0)break;z.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((l-=4)<0)break;z.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return z}function L(o){for(var l=[],p=0;p<o.length;++p)l.push(o.charCodeAt(p)&255);return l}function $(o,l){for(var p,M,R,z=[],ue=0;ue<o.length&&!((l-=2)<0);++ue)p=o.charCodeAt(ue),M=p>>8,R=p%256,z.push(R),z.push(M);return z}function B(o){return e.toByteArray(ie(o))}function I(o,l,p,M){for(var R=0;R<M&&!(R+p>=l.length||R>=o.length);++R)l[R+p]=o[R];return R}function ce(o){return o!==o}})(so)),so}Mi();var gt;if(typeof window<"u"&&window.crypto&&(gt=window.crypto),!gt&&typeof window<"u"&&window.msCrypto&&(gt=window.msCrypto),!gt&&typeof global<"u"&&global.crypto&&(gt=global.crypto),!gt&&typeof require=="function")try{gt=require("crypto")}catch{}var co={};var Fr=function(t,e){return Fr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)n.hasOwnProperty(s)&&(r[s]=n[s])},Fr(t,e)};function Oi(t,e){Fr(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Wr=function(){return Wr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},Wr.apply(this,arguments)};function Ei(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function Ai(t,e,r,n){var s=arguments.length,d=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(h=t[a])&&(d=(s<3?h(d):s>3?h(e,r,d):h(e,r))||d);return s>3&&d&&Object.defineProperty(e,r,d),d}function Ti(t,e){return function(r,n){e(r,n,t)}}function ji(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function $i(t,e,r,n){function s(d){return d instanceof r?d:new r(function(h){h(d)})}return new(r||(r=Promise))(function(d,h){function a(_){try{y(n.next(_))}catch(P){h(P)}}function g(_){try{y(n.throw(_))}catch(P){h(P)}}function y(_){_.done?d(_.value):s(_.value).then(a,g)}y((n=n.apply(t,e||[])).next())})}function Ri(t,e){var r={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},n,s,d,h;return h={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function a(y){return function(_){return g([y,_])}}function g(y){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(d=y[0]&2?s.return:y[0]?s.throw||((d=s.return)&&d.call(s),0):s.next)&&!(d=d.call(s,y[1])).done)return d;switch(s=0,d&&(y=[y[0]&2,d.value]),y[0]){case 0:case 1:d=y;break;case 4:return r.label++,{value:y[1],done:!1};case 5:r.label++,s=y[1],y=[0];continue;case 7:y=r.ops.pop(),r.trys.pop();continue;default:if(d=r.trys,!(d=d.length>0&&d[d.length-1])&&(y[0]===6||y[0]===2)){r=0;continue}if(y[0]===3&&(!d||y[1]>d[0]&&y[1]<d[3])){r.label=y[1];break}if(y[0]===6&&r.label<d[1]){r.label=d[1],d=y;break}if(d&&r.label<d[2]){r.label=d[2],r.ops.push(y);break}d[2]&&r.ops.pop(),r.trys.pop();continue}y=e.call(t,r)}catch(_){y=[6,_],s=0}finally{n=d=0}if(y[0]&5)throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}}function Ni(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function Li(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function Ur(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ho(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),s,d=[],h;try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)d.push(s.value)}catch(a){h={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(h)throw h.error}}return d}function Bi(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(ho(arguments[e]));return t}function Ii(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),s=0,e=0;e<r;e++)for(var d=arguments[e],h=0,a=d.length;h<a;h++,s++)n[s]=d[h];return n}function Rt(t){return this instanceof Rt?(this.v=t,this):new Rt(t)}function Yi(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),s,d=[];return s={},h("next"),h("throw"),h("return"),s[Symbol.asyncIterator]=function(){return this},s;function h(C){n[C]&&(s[C]=function(S){return new Promise(function(D,O){d.push([C,S,D,O])>1||a(C,S)})})}function a(C,S){try{g(n[C](S))}catch(D){P(d[0][3],D)}}function g(C){C.value instanceof Rt?Promise.resolve(C.value.v).then(y,_):P(d[0][2],C)}function y(C){a("next",C)}function _(C){a("throw",C)}function P(C,S){C(S),d.shift(),d.length&&a(d[0][0],d[0][1])}}function zi(t){var e,r;return e={},n("next"),n("throw",function(s){throw s}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(s,d){e[s]=t[s]?function(h){return(r=!r)?{value:Rt(t[s](h)),done:s==="return"}:d?d(h):h}:d}}function Fi(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Ur=="function"?Ur(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(d){r[d]=t[d]&&function(h){return new Promise(function(a,g){h=t[d](h),s(a,g,h.done,h.value)})}}function s(d,h,a,g){Promise.resolve(g).then(function(y){d({value:y,done:a})},h)}}function Wi(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Ui(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function qi(t){return t&&t.__esModule?t:{default:t}}function Vi(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Hi(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}const Gi=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return Wr},__asyncDelegator:zi,__asyncGenerator:Yi,__asyncValues:Fi,__await:Rt,__awaiter:$i,__classPrivateFieldGet:Vi,__classPrivateFieldSet:Hi,__createBinding:Ni,__decorate:Ai,__exportStar:Li,__extends:Oi,__generator:Ri,__importDefault:qi,__importStar:Ui,__makeTemplateObject:Wi,__metadata:ji,__param:Ti,__read:ho,__rest:Ei,__spread:Bi,__spreadArrays:Ii,__values:Ur},Symbol.toStringTag,{value:"Module"})),fo=Nr(Gi);var Nt={},ze={},po;function go(){return po||(po=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.MAX_HASHABLE_LENGTH=ze.INIT=ze.KEY=ze.DIGEST_LENGTH=ze.BLOCK_SIZE=void 0,ze.BLOCK_SIZE=64,ze.DIGEST_LENGTH=32,ze.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ze.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ze.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1),ze}var Lt={},mo;function Qi(){if(mo)return Lt;mo=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.RawSha256=void 0;var t=go(),e=(function(){function r(){this.state=Int32Array.from(t.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return r.prototype.update=function(n){if(this.finished)throw new Error("Attempted to update an already finished hash.");var s=0,d=n.byteLength;if(this.bytesHashed+=d,this.bytesHashed*8>t.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;d>0;)this.buffer[this.bufferLength++]=n[s++],d--,this.bufferLength===t.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},r.prototype.digest=function(){if(!this.finished){var n=this.bytesHashed*8,s=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),d=this.bufferLength;if(s.setUint8(this.bufferLength++,128),d%t.BLOCK_SIZE>=t.BLOCK_SIZE-8){for(var h=this.bufferLength;h<t.BLOCK_SIZE;h++)s.setUint8(h,0);this.hashBuffer(),this.bufferLength=0}for(var h=this.bufferLength;h<t.BLOCK_SIZE-8;h++)s.setUint8(h,0);s.setUint32(t.BLOCK_SIZE-8,Math.floor(n/4294967296),!0),s.setUint32(t.BLOCK_SIZE-4,n),this.hashBuffer(),this.finished=!0}for(var a=new Uint8Array(t.DIGEST_LENGTH),h=0;h<8;h++)a[h*4]=this.state[h]>>>24&255,a[h*4+1]=this.state[h]>>>16&255,a[h*4+2]=this.state[h]>>>8&255,a[h*4+3]=this.state[h]>>>0&255;return a},r.prototype.hashBuffer=function(){for(var n=this,s=n.buffer,d=n.state,h=d[0],a=d[1],g=d[2],y=d[3],_=d[4],P=d[5],C=d[6],S=d[7],D=0;D<t.BLOCK_SIZE;D++){if(D<16)this.temp[D]=(s[D*4]&255)<<24|(s[D*4+1]&255)<<16|(s[D*4+2]&255)<<8|s[D*4+3]&255;else{var O=this.temp[D-2],N=(O>>>17|O<<15)^(O>>>19|O<<13)^O>>>10;O=this.temp[D-15];var F=(O>>>7|O<<25)^(O>>>18|O<<14)^O>>>3;this.temp[D]=(N+this.temp[D-7]|0)+(F+this.temp[D-16]|0)}var Y=(((_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&P^~_&C)|0)+(S+(t.KEY[D]+this.temp[D]|0)|0)|0,V=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&a^h&g^a&g)|0;S=C,C=P,P=_,_=y+Y|0,y=g,g=a,a=h,h=Y+V|0}d[0]+=h,d[1]+=a,d[2]+=g,d[3]+=y,d[4]+=_,d[5]+=P,d[6]+=C,d[7]+=S},r})();return Lt.RawSha256=e,Lt}var yo={},Bt={};const Zi=t=>{const e=[];for(let r=0,n=t.length;r<n;r++){const s=t.charCodeAt(r);if(s<128)e.push(s);else if(s<2048)e.push(s>>6|192,s&63|128);else if(r+1<t.length&&(s&64512)===55296&&(t.charCodeAt(r+1)&64512)===56320){const d=65536+((s&1023)<<10)+(t.charCodeAt(++r)&1023);e.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else e.push(s>>12|224,s>>6&63|128,s&63|128)}return Uint8Array.from(e)},Ki=t=>{let e="";for(let r=0,n=t.length;r<n;r++){const s=t[r];if(s<128)e+=String.fromCharCode(s);else if(192<=s&&s<224){const d=t[++r];e+=String.fromCharCode((s&31)<<6|d&63)}else if(240<=s&&s<365){const d="%"+[s,t[++r],t[++r],t[++r]].map(h=>h.toString(16)).join("%");e+=decodeURIComponent(d)}else e+=String.fromCharCode((s&15)<<12|(t[++r]&63)<<6|t[++r]&63)}return e};function Ji(t){return new TextEncoder().encode(t)}function Xi(t){return new TextDecoder("utf-8").decode(t)}const ea=t=>typeof TextEncoder=="function"?Ji(t):Zi(t),ta=t=>typeof TextDecoder=="function"?Xi(t):Ki(t),ra=Object.freeze(Object.defineProperty({__proto__:null,fromUtf8:ea,toUtf8:ta},Symbol.toStringTag,{value:"Module"})),na=Nr(ra);var vo;function oa(){if(vo)return Bt;vo=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.convertToBuffer=void 0;var t=na,e=typeof Buffer<"u"&&Buffer.from?function(n){return Buffer.from(n,"utf8")}:t.fromUtf8;function r(n){return n instanceof Uint8Array?n:typeof n=="string"?e(n):ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(n)}return Bt.convertToBuffer=r,Bt}var It={},bo;function sa(){if(bo)return It;bo=1,Object.defineProperty(It,"__esModule",{value:!0}),It.isEmptyData=void 0;function t(e){return typeof e=="string"?e.length===0:e.byteLength===0}return It.isEmptyData=t,It}var Yt={},wo;function ia(){if(wo)return Yt;wo=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.numToUint8=void 0;function t(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}return Yt.numToUint8=t,Yt}var zt={},_o;function aa(){if(_o)return zt;_o=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.uint32ArrayFrom=void 0;function t(e){if(!Array.from){for(var r=new Uint32Array(e.length),n=0;n<e.length;)r[n]=e[n];return r}return Uint32Array.from(e)}return zt.uint32ArrayFrom=t,zt}var xo;function la(){return xo||(xo=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var e=oa();Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return e.convertToBuffer}});var r=sa();Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return r.isEmptyData}});var n=ia();Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return n.numToUint8}});var s=aa();Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return s.uint32ArrayFrom}})})(yo)),yo}var Co;function ua(){if(Co)return Nt;Co=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.Sha256=void 0;var t=fo,e=go(),r=Qi(),n=la(),s=(function(){function h(a){if(this.hash=new r.RawSha256,a){this.outer=new r.RawSha256;var g=d(a),y=new Uint8Array(e.BLOCK_SIZE);y.set(g);for(var _=0;_<e.BLOCK_SIZE;_++)g[_]^=54,y[_]^=92;this.hash.update(g),this.outer.update(y);for(var _=0;_<g.byteLength;_++)g[_]=0}}return h.prototype.update=function(a){if(!((0,n.isEmptyData)(a)||this.error))try{this.hash.update((0,n.convertToBuffer)(a))}catch(g){this.error=g}},h.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},h.prototype.digest=function(){return(0,t.__awaiter)(this,void 0,void 0,function(){return(0,t.__generator)(this,function(a){return[2,this.digestSync()]})})},h})();Nt.Sha256=s;function d(h){var a=(0,n.convertToBuffer)(h);if(a.byteLength>e.BLOCK_SIZE){var g=new r.RawSha256;g.update(a),a=g.digest()}var y=new Uint8Array(e.BLOCK_SIZE);return y.set(a),y}return Nt}var So;function ca(){return So||(So=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=fo;(0,e.__exportStar)(ua(),t)})(co)),co}ca();function ye(t,e){t!=null&&this.fromString(t,e)}function Re(){return new ye(null)}var lt,da=0xdeadbeefcafe,Do=(da&16777215)==15715070;function ha(t,e,r,n,s,d){for(;--d>=0;){var h=e*this[t++]+r[n]+s;s=Math.floor(h/67108864),r[n++]=h&67108863}return s}function fa(t,e,r,n,s,d){for(var h=e&32767,a=e>>15;--d>=0;){var g=this[t]&32767,y=this[t++]>>15,_=a*g+y*h;g=h*g+((_&32767)<<15)+r[n]+(s&1073741823),s=(g>>>30)+(_>>>15)+a*y+(s>>>30),r[n++]=g&1073741823}return s}function pa(t,e,r,n,s,d){for(var h=e&16383,a=e>>14;--d>=0;){var g=this[t]&16383,y=this[t++]>>14,_=a*g+y*h;g=h*g+((_&16383)<<14)+r[n]+s,s=(g>>28)+(_>>14)+a*y,r[n++]=g&268435455}return s}var ko=typeof navigator<"u";ko&&Do&&navigator.appName=="Microsoft Internet Explorer"?(ye.prototype.am=fa,lt=30):ko&&Do&&navigator.appName!="Netscape"?(ye.prototype.am=ha,lt=26):(ye.prototype.am=pa,lt=28),ye.prototype.DB=lt,ye.prototype.DM=(1<<lt)-1,ye.prototype.DV=1<<lt;var qr=52;ye.prototype.FV=Math.pow(2,qr),ye.prototype.F1=qr-lt,ye.prototype.F2=2*lt-qr;var ga="0123456789abcdefghijklmnopqrstuvwxyz",er=new Array,_t,Fe;for(_t=48,Fe=0;Fe<=9;++Fe)er[_t++]=Fe;for(_t=97,Fe=10;Fe<36;++Fe)er[_t++]=Fe;for(_t=65,Fe=10;Fe<36;++Fe)er[_t++]=Fe;function Po(t){return ga.charAt(t)}function ma(t,e){var r=er[t.charCodeAt(e)];return r??-1}function ya(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function va(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0}function Vr(t){var e=Re();return e.fromInt(t),e}function ba(t,e){var r;if(e==16)r=4;else if(e==8)r=3;else if(e==2)r=1;else if(e==32)r=5;else if(e==4)r=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;for(var n=t.length,s=!1,d=0;--n>=0;){var h=ma(t,n);if(h<0){t.charAt(n)=="-"&&(s=!0);continue}s=!1,d==0?this[this.t++]=h:d+r>this.DB?(this[this.t-1]|=(h&(1<<this.DB-d)-1)<<d,this[this.t++]=h>>this.DB-d):this[this.t-1]|=h<<d,d+=r,d>=this.DB&&(d-=this.DB)}this.clamp(),s&&ye.ZERO.subTo(this,this)}function wa(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function _a(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(t==16)e=4;else if(t==8)e=3;else if(t==2)e=1;else if(t==32)e=5;else if(t==4)e=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");var r=(1<<e)-1,n,s=!1,d="",h=this.t,a=this.DB-h*this.DB%e;if(h-- >0)for(a<this.DB&&(n=this[h]>>a)>0&&(s=!0,d=Po(n));h>=0;)a<e?(n=(this[h]&(1<<a)-1)<<e-a,n|=this[--h]>>(a+=this.DB-e)):(n=this[h]>>(a-=e)&r,a<=0&&(a+=this.DB,--h)),n>0&&(s=!0),s&&(d+=Po(n));return s?d:"0"}function xa(){var t=Re();return ye.ZERO.subTo(this,t),t}function Ca(){return this.s<0?this.negate():this}function Sa(t){var e=this.s-t.s;if(e!=0)return e;var r=this.t;if(e=r-t.t,e!=0)return this.s<0?-e:e;for(;--r>=0;)if((e=this[r]-t[r])!=0)return e;return 0}function Hr(t){var e=1,r;return(r=t>>>16)!=0&&(t=r,e+=16),(r=t>>8)!=0&&(t=r,e+=8),(r=t>>4)!=0&&(t=r,e+=4),(r=t>>2)!=0&&(t=r,e+=2),(r=t>>1)!=0&&(t=r,e+=1),e}function Da(){return this.t<=0?0:this.DB*(this.t-1)+Hr(this[this.t-1]^this.s&this.DM)}function ka(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s}function Pa(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s}function Ma(t,e){var r=t%this.DB,n=this.DB-r,s=(1<<n)-1,d=Math.floor(t/this.DB),h=this.s<<r&this.DM,a;for(a=this.t-1;a>=0;--a)e[a+d+1]=this[a]>>n|h,h=(this[a]&s)<<r;for(a=d-1;a>=0;--a)e[a]=0;e[d]=h,e.t=this.t+d+1,e.s=this.s,e.clamp()}function Oa(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t){e.t=0;return}var n=t%this.DB,s=this.DB-n,d=(1<<n)-1;e[0]=this[r]>>n;for(var h=r+1;h<this.t;++h)e[h-r-1]|=(this[h]&d)<<s,e[h-r]=this[h]>>n;n>0&&(e[this.t-r-1]|=(this.s&d)<<s),e.t=this.t-r,e.clamp()}function Ea(t,e){for(var r=0,n=0,s=Math.min(t.t,this.t);r<s;)n+=this[r]-t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],e[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()}function Aa(t,e){var r=this.abs(),n=t.abs(),s=r.t;for(e.t=s+n.t;--s>=0;)e[s]=0;for(s=0;s<n.t;++s)e[s+r.t]=r.am(0,n[s],e,s,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&ye.ZERO.subTo(e,e)}function Ta(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()}function ja(t,e,r){var n=t.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t){e?.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=Re());var d=Re(),h=this.s,a=t.s,g=this.DB-Hr(n[n.t-1]);g>0?(n.lShiftTo(g,d),s.lShiftTo(g,r)):(n.copyTo(d),s.copyTo(r));var y=d.t,_=d[y-1];if(_!=0){var P=_*(1<<this.F1)+(y>1?d[y-2]>>this.F2:0),C=this.FV/P,S=(1<<this.F1)/P,D=1<<this.F2,O=r.t,N=O-y,F=e??Re();for(d.dlShiftTo(N,F),r.compareTo(F)>=0&&(r[r.t++]=1,r.subTo(F,r)),ye.ONE.dlShiftTo(y,F),F.subTo(d,d);d.t<y;)d[d.t++]=0;for(;--N>=0;){var Y=r[--O]==_?this.DM:Math.floor(r[O]*C+(r[O-1]+D)*S);if((r[O]+=d.am(0,Y,r,N,0,y))<Y)for(d.dlShiftTo(N,F),r.subTo(F,r);r[O]<--Y;)r.subTo(F,r)}e!=null&&(r.drShiftTo(y,e),h!=a&&ye.ZERO.subTo(e,e)),r.t=y,r.clamp(),g>0&&r.rShiftTo(g,r),h<0&&ye.ZERO.subTo(r,r)}}}function $a(t){var e=Re();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(ye.ZERO)>0&&t.subTo(e,e),e}function Ra(){if(this.t<1)return 0;var t=this[0];if((t&1)==0)return 0;var e=t&3;return e=e*(2-(t&15)*e)&15,e=e*(2-(t&255)*e)&255,e=e*(2-((t&65535)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function Na(t){return this.compareTo(t)==0}function La(t,e){for(var r=0,n=0,s=Math.min(t.t,this.t);r<s;)n+=this[r]+t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n+=t[r],e[r++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()}function Ba(t){var e=Re();return this.addTo(t,e),e}function Ia(t){var e=Re();return this.subTo(t,e),e}function Ya(t){var e=Re();return this.multiplyTo(t,e),e}function za(t){var e=Re();return this.divRemTo(t,e,null),e}function xt(t){this.m=t,this.mp=t.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function Fa(t){var e=Re();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(ye.ZERO)>0&&this.m.subTo(e,e),e}function Wa(t){var e=Re();return t.copyTo(e),this.reduce(e),e}function Ua(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=t[e]&32767,n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t[r]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function qa(t,e){t.squareTo(e),this.reduce(e)}function Va(t,e,r){t.multiplyTo(e,r),this.reduce(r)}xt.prototype.convert=Fa,xt.prototype.revert=Wa,xt.prototype.reduce=Ua,xt.prototype.mulTo=Va,xt.prototype.sqrTo=qa;function Ha(t,e,r){var n=t.bitLength(),s,d=Vr(1),h=new xt(e);if(n<=0)return d;n<18?s=1:n<48?s=3:n<144?s=4:n<768?s=5:s=6;var a=new Array,g=3,y=s-1,_=(1<<s)-1;if(a[1]=h.convert(this),s>1){var P=Re();for(h.sqrTo(a[1],P);g<=_;)a[g]=Re(),h.mulTo(P,a[g-2],a[g]),g+=2}var C=t.t-1,S,D=!0,O=Re(),N;for(n=Hr(t[C])-1;C>=0;){for(n>=y?S=t[C]>>n-y&_:(S=(t[C]&(1<<n+1)-1)<<y-n,C>0&&(S|=t[C-1]>>this.DB+n-y)),g=s;(S&1)==0;)S>>=1,--g;if((n-=g)<0&&(n+=this.DB,--C),D)a[S].copyTo(d),D=!1;else{for(;g>1;)h.sqrTo(d,O),h.sqrTo(O,d),g-=2;g>0?h.sqrTo(d,O):(N=d,d=O,O=N),h.mulTo(O,a[S],d)}for(;C>=0&&(t[C]&1<<n)==0;)h.sqrTo(d,O),N=d,d=O,O=N,--n<0&&(n=this.DB-1,--C)}var F=h.revert(d);return r(null,F),F}ye.prototype.copyTo=ya,ye.prototype.fromInt=va,ye.prototype.fromString=ba,ye.prototype.clamp=wa,ye.prototype.dlShiftTo=ka,ye.prototype.drShiftTo=Pa,ye.prototype.lShiftTo=Ma,ye.prototype.rShiftTo=Oa,ye.prototype.subTo=Ea,ye.prototype.multiplyTo=Aa,ye.prototype.squareTo=Ta,ye.prototype.divRemTo=ja,ye.prototype.invDigit=Ra,ye.prototype.addTo=La,ye.prototype.toString=_a,ye.prototype.negate=xa,ye.prototype.abs=Ca,ye.prototype.compareTo=Sa,ye.prototype.bitLength=Da,ye.prototype.mod=$a,ye.prototype.equals=Na,ye.prototype.add=Ba,ye.prototype.subtract=Ia,ye.prototype.multiply=Ya,ye.prototype.divide=za,ye.prototype.modPow=Ha,ye.ZERO=Vr(0),ye.ONE=Vr(1);function Ga(t,e){return e=e||{},new Promise(function(r,n){var s=new XMLHttpRequest,d=[],h=[],a={},g=function(){return{ok:(s.status/100|0)==2,statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:g,headers:{keys:function(){return d},entries:function(){return h},get:function(_){return a[_.toLowerCase()]},has:function(_){return _.toLowerCase()in a}}}};for(var y in s.open(e.method||"get",t,!0),s.onload=function(){s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(_,P,C){d.push(P=P.toLowerCase()),h.push([P,C]),a[P]=a[P]?a[P]+","+C:C}),r(g())},s.onerror=n,s.withCredentials=e.credentials=="include",e.headers)s.setRequestHeader(y,e.headers[y]);s.send(e.body||null)})}const Qa=Object.freeze(Object.defineProperty({__proto__:null,default:Ga},Symbol.toStringTag,{value:"Module"})),Mo=Nr(Qa);var Oo,Eo;function Za(){return Eo||(Eo=1,Oo=self.fetch||(self.fetch=Mo.default||Mo)),Oo}Za();var Ao={exports:{}};var To;function Ka(){return To||(To=1,(function(t,e){(function(r){var n;if(t.exports=r(),n=!0,!n){var s=window.Cookies,d=window.Cookies=r();d.noConflict=function(){return window.Cookies=s,d}}})(function(){function r(){for(var d=0,h={};d<arguments.length;d++){var a=arguments[d];for(var g in a)h[g]=a[g]}return h}function n(d){return d.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function s(d){function h(){}function a(y,_,P){if(!(typeof document>"u")){P=r({path:"/"},h.defaults,P),typeof P.expires=="number"&&(P.expires=new Date(new Date*1+P.expires*864e5)),P.expires=P.expires?P.expires.toUTCString():"";try{var C=JSON.stringify(_);/^[\{\[]/.test(C)&&(_=C)}catch{}_=d.write?d.write(_,y):encodeURIComponent(String(_)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),y=encodeURIComponent(String(y)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var S="";for(var D in P)P[D]&&(S+="; "+D,P[D]!==!0&&(S+="="+P[D].split(";")[0]));return document.cookie=y+"="+_+S}}function g(y,_){if(!(typeof document>"u")){for(var P={},C=document.cookie?document.cookie.split("; "):[],S=0;S<C.length;S++){var D=C[S].split("="),O=D.slice(1).join("=");!_&&O.charAt(0)==='"'&&(O=O.slice(1,-1));try{var N=n(D[0]);if(O=(d.read||d)(O,N)||n(O),_)try{O=JSON.parse(O)}catch{}if(P[N]=O,y===N)break}catch{}}return y?P[y]:P}}return h.set=a,h.get=function(y){return g(y,!1)},h.getJSON=function(y){return g(y,!0)},h.remove=function(y,_){a(y,"",r(_,{expires:-1}))},h.defaults={},h.withConverter=s,h}return s(function(){})})})(Ao)),Ao.exports}Ka();function Ja(){if(!window.MantineCognitoUserPool)throw new Error("Cognito Userpool has not been initialized.");return window.MantineCognitoUserPool}function Xa(){return Ja().getCurrentUser()}function el(){return new Promise((t,e)=>{const r=Xa();r===null&&e(null),r?.getSession((n,s)=>{if(n!==null||s===null)return e(null);t({session:s,authenticatedUser:r})})})}async function tl(){const{session:t}=await el();return t?.getIdToken().getJwtToken()}Q.createContext(void 0);var rl="undefined",nl="object",tr="browser",jo="cpu",$o="device",Gr="engine",rr="os",ut="name",nr="type",Qr="vendor",Ge="version",Zr="architecture",Kr="major",Jr="model",ol="console",sl="mobile",il="tablet",al="smarttv",ll="wearable",ul="embedded",cl=typeof window!==rl,Xr=cl&&window.navigator?window.navigator:void 0;Xr&&Xr.userAgentData&&Xr.userAgentData;var or=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},sr=function(t){for(var e in t){var r=t[e];typeof r==nl&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this};(function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return sr.call(t.init,[[tr,[ut,Ge,Kr,nr]],[jo,[Zr]],[$o,[nr,Jr,Qr]],[Gr,[ut,Ge]],[rr,[ut,Ge]]]),sr.call(t.isIgnore,[[tr,[Ge,Kr]],[Gr,[Ge]],[rr,[Ge]]]),sr.call(t.isIgnoreRgx,[[tr,/ ?browser$/i],[rr,/ ?os$/i]]),sr.call(t.toString,[[tr,[ut,Ge]],[jo,[Zr]],[$o,[Qr,Jr]],[Gr,[ut,Ge]],[rr,[ut,Ge]]]),t})(),or([ut,Ge,Kr,nr]),or([Zr]),or([Jr,Qr,nr,ol,sl,al,il,ll,ul]),or([ut,Ge]);var en={exports:{}},dl=en.exports,Ro;function hl(){return Ro||(Ro=1,(function(t,e){(function(r,n){t.exports=n()})(dl,()=>(()=>{var r={873:(h,a)=>{var g,y,_=(function(){var P=function(k,x){var b=k,u=F[x],c=null,m=0,f=null,i=[],v={},T=function(E,L){c=(function($){for(var B=new Array($),I=0;I<$;I+=1){B[I]=new Array($);for(var ce=0;ce<$;ce+=1)B[I][ce]=null}return B})(m=4*b+17),j(0,0),j(m-7,0),j(0,m-7),J(),K(),H(E,L),b>=7&&te(E),f==null&&(f=se(b,u,i)),ie(f,L)},j=function(E,L){for(var $=-1;$<=7;$+=1)if(!(E+$<=-1||m<=E+$))for(var B=-1;B<=7;B+=1)L+B<=-1||m<=L+B||(c[E+$][L+B]=0<=$&&$<=6&&(B==0||B==6)||0<=B&&B<=6&&($==0||$==6)||2<=$&&$<=4&&2<=B&&B<=4)},K=function(){for(var E=8;E<m-8;E+=1)c[E][6]==null&&(c[E][6]=E%2==0);for(var L=8;L<m-8;L+=1)c[6][L]==null&&(c[6][L]=L%2==0)},J=function(){for(var E=Y.getPatternPosition(b),L=0;L<E.length;L+=1)for(var $=0;$<E.length;$+=1){var B=E[L],I=E[$];if(c[B][I]==null)for(var ce=-2;ce<=2;ce+=1)for(var o=-2;o<=2;o+=1)c[B+ce][I+o]=ce==-2||ce==2||o==-2||o==2||ce==0&&o==0}},te=function(E){for(var L=Y.getBCHTypeNumber(b),$=0;$<18;$+=1){var B=!E&&(L>>$&1)==1;c[Math.floor($/3)][$%3+m-8-3]=B}for($=0;$<18;$+=1)B=!E&&(L>>$&1)==1,c[$%3+m-8-3][Math.floor($/3)]=B},H=function(E,L){for(var $=u<<3|L,B=Y.getBCHTypeInfo($),I=0;I<15;I+=1){var ce=!E&&(B>>I&1)==1;I<6?c[I][8]=ce:I<8?c[I+1][8]=ce:c[m-15+I][8]=ce}for(I=0;I<15;I+=1)ce=!E&&(B>>I&1)==1,I<8?c[8][m-I-1]=ce:I<9?c[8][15-I-1+1]=ce:c[8][15-I-1]=ce;c[m-8][8]=!E},ie=function(E,L){for(var $=-1,B=m-1,I=7,ce=0,o=Y.getMaskFunction(L),l=m-1;l>0;l-=2)for(l==6&&(l-=1);;){for(var p=0;p<2;p+=1)if(c[B][l-p]==null){var M=!1;ce<E.length&&(M=(E[ce]>>>I&1)==1),o(B,l-p)&&(M=!M),c[B][l-p]=M,(I-=1)==-1&&(ce+=1,I=7)}if((B+=$)<0||m<=B){B-=$,$=-$;break}}},se=function(E,L,$){for(var B=ee.getRSBlocks(E,L),I=re(),ce=0;ce<$.length;ce+=1){var o=$[ce];I.put(o.getMode(),4),I.put(o.getLength(),Y.getLengthInBits(o.getMode(),E)),o.write(I)}var l=0;for(ce=0;ce<B.length;ce+=1)l+=B[ce].dataCount;if(I.getLengthInBits()>8*l)throw"code length overflow. ("+I.getLengthInBits()+">"+8*l+")";for(I.getLengthInBits()+4<=8*l&&I.put(0,4);I.getLengthInBits()%8!=0;)I.putBit(!1);for(;!(I.getLengthInBits()>=8*l||(I.put(236,8),I.getLengthInBits()>=8*l));)I.put(17,8);return(function(p,M){for(var R=0,z=0,ue=0,he=new Array(M.length),pe=new Array(M.length),ne=0;ne<M.length;ne+=1){var fe=M[ne].dataCount,me=M[ne].totalCount-fe;z=Math.max(z,fe),ue=Math.max(ue,me),he[ne]=new Array(fe);for(var ge=0;ge<he[ne].length;ge+=1)he[ne][ge]=255&p.getBuffer()[ge+R];R+=fe;var De=Y.getErrorCorrectPolynomial(me),xe=q(he[ne],De.getLength()-1).mod(De);for(pe[ne]=new Array(De.getLength()-1),ge=0;ge<pe[ne].length;ge+=1){var Ce=ge+xe.getLength()-pe[ne].length;pe[ne][ge]=Ce>=0?xe.getAt(Ce):0}}var Le=0;for(ge=0;ge<M.length;ge+=1)Le+=M[ge].totalCount;var Oe=new Array(Le),Se=0;for(ge=0;ge<z;ge+=1)for(ne=0;ne<M.length;ne+=1)ge<he[ne].length&&(Oe[Se]=he[ne][ge],Se+=1);for(ge=0;ge<ue;ge+=1)for(ne=0;ne<M.length;ne+=1)ge<pe[ne].length&&(Oe[Se]=pe[ne][ge],Se+=1);return Oe})(I,B)};v.addData=function(E,L){var $=null;switch(L=L||"Byte"){case"Numeric":$=X(E);break;case"Alphanumeric":$=Z(E);break;case"Byte":$=U(E);break;case"Kanji":$=G(E);break;default:throw"mode:"+L}i.push($),f=null},v.isDark=function(E,L){if(E<0||m<=E||L<0||m<=L)throw E+","+L;return c[E][L]},v.getModuleCount=function(){return m},v.make=function(){if(b<1){for(var E=1;E<40;E++){for(var L=ee.getRSBlocks(E,u),$=re(),B=0;B<i.length;B++){var I=i[B];$.put(I.getMode(),4),$.put(I.getLength(),Y.getLengthInBits(I.getMode(),E)),I.write($)}var ce=0;for(B=0;B<L.length;B++)ce+=L[B].dataCount;if($.getLengthInBits()<=8*ce)break}b=E}T(!1,(function(){for(var o=0,l=0,p=0;p<8;p+=1){T(!0,p);var M=Y.getLostPoint(v);(p==0||o>M)&&(o=M,l=p)}return l})())},v.createTableTag=function(E,L){E=E||2;var $="";$+='<table style="',$+=" border-width: 0px; border-style: none;",$+=" border-collapse: collapse;",$+=" padding: 0px; margin: "+(L=L===void 0?4*E:L)+"px;",$+='">',$+="<tbody>";for(var B=0;B<v.getModuleCount();B+=1){$+="<tr>";for(var I=0;I<v.getModuleCount();I+=1)$+='<td style="',$+=" border-width: 0px; border-style: none;",$+=" border-collapse: collapse;",$+=" padding: 0px; margin: 0px;",$+=" width: "+E+"px;",$+=" height: "+E+"px;",$+=" background-color: ",$+=v.isDark(B,I)?"#000000":"#ffffff",$+=";",$+='"/>';$+="</tr>"}return($+="</tbody>")+"</table>"},v.createSvgTag=function(E,L,$,B){var I={};typeof arguments[0]=="object"&&(E=(I=arguments[0]).cellSize,L=I.margin,$=I.alt,B=I.title),E=E||2,L=L===void 0?4*E:L,($=typeof $=="string"?{text:$}:$||{}).text=$.text||null,$.id=$.text?$.id||"qrcode-description":null,(B=typeof B=="string"?{text:B}:B||{}).text=B.text||null,B.id=B.text?B.id||"qrcode-title":null;var ce,o,l,p,M=v.getModuleCount()*E+2*L,R="";for(p="l"+E+",0 0,"+E+" -"+E+",0 0,-"+E+"z ",R+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',R+=I.scalable?"":' width="'+M+'px" height="'+M+'px"',R+=' viewBox="0 0 '+M+" "+M+'" ',R+=' preserveAspectRatio="xMinYMin meet"',R+=B.text||$.text?' role="img" aria-labelledby="'+le([B.id,$.id].join(" ").trim())+'"':"",R+=">",R+=B.text?'<title id="'+le(B.id)+'">'+le(B.text)+"</title>":"",R+=$.text?'<description id="'+le($.id)+'">'+le($.text)+"</description>":"",R+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',R+='<path d="',o=0;o<v.getModuleCount();o+=1)for(l=o*E+L,ce=0;ce<v.getModuleCount();ce+=1)v.isDark(o,ce)&&(R+="M"+(ce*E+L)+","+l+p);return(R+='" stroke="transparent" fill="black"/>')+"</svg>"},v.createDataURL=function(E,L){E=E||2,L=L===void 0?4*E:L;var $=v.getModuleCount()*E+2*L,B=L,I=$-L;return oe($,$,function(ce,o){if(B<=ce&&ce<I&&B<=o&&o<I){var l=Math.floor((ce-B)/E),p=Math.floor((o-B)/E);return v.isDark(p,l)?0:1}return 1})},v.createImgTag=function(E,L,$){E=E||2,L=L===void 0?4*E:L;var B=v.getModuleCount()*E+2*L,I="";return I+="<img",I+=' src="',I+=v.createDataURL(E,L),I+='"',I+=' width="',I+=B,I+='"',I+=' height="',I+=B,I+='"',$&&(I+=' alt="',I+=le($),I+='"'),I+"/>"};var le=function(E){for(var L="",$=0;$<E.length;$+=1){var B=E.charAt($);switch(B){case"<":L+="&lt;";break;case">":L+="&gt;";break;case"&":L+="&amp;";break;case'"':L+="&quot;";break;default:L+=B}}return L};return v.createASCII=function(E,L){if((E=E||1)<2)return(function(he){he=he===void 0?2:he;var pe,ne,fe,me,ge,De=1*v.getModuleCount()+2*he,xe=he,Ce=De-he,Le={"██":"█","█ ":"▀"," █":"▄"," ":" "},Oe={"██":"▀","█ ":"▀"," █":" "," ":" "},Se="";for(pe=0;pe<De;pe+=2){for(fe=Math.floor((pe-xe)/1),me=Math.floor((pe+1-xe)/1),ne=0;ne<De;ne+=1)ge="█",xe<=ne&&ne<Ce&&xe<=pe&&pe<Ce&&v.isDark(fe,Math.floor((ne-xe)/1))&&(ge=" "),xe<=ne&&ne<Ce&&xe<=pe+1&&pe+1<Ce&&v.isDark(me,Math.floor((ne-xe)/1))?ge+=" ":ge+="█",Se+=he<1&&pe+1>=Ce?Oe[ge]:Le[ge];Se+=`
20
- `}return De%2&&he>0?Se.substring(0,Se.length-De-1)+Array(De+1).join("▀"):Se.substring(0,Se.length-1)})(L);E-=1,L=L===void 0?2*E:L;var $,B,I,ce,o=v.getModuleCount()*E+2*L,l=L,p=o-L,M=Array(E+1).join("██"),R=Array(E+1).join(" "),z="",ue="";for($=0;$<o;$+=1){for(I=Math.floor(($-l)/E),ue="",B=0;B<o;B+=1)ce=1,l<=B&&B<p&&l<=$&&$<p&&v.isDark(I,Math.floor((B-l)/E))&&(ce=0),ue+=ce?M:R;for(I=0;I<E;I+=1)z+=ue+`
21
- `}return z.substring(0,z.length-1)},v.renderTo2dContext=function(E,L){L=L||2;for(var $=v.getModuleCount(),B=0;B<$;B++)for(var I=0;I<$;I++)E.fillStyle=v.isDark(B,I)?"black":"white",E.fillRect(B*L,I*L,L,L)},v};P.stringToBytes=(P.stringToBytesFuncs={default:function(k){for(var x=[],b=0;b<k.length;b+=1){var u=k.charCodeAt(b);x.push(255&u)}return x}}).default,P.createStringToBytes=function(k,x){var b=(function(){for(var c=ae(k),m=function(){var K=c.read();if(K==-1)throw"eof";return K},f=0,i={};;){var v=c.read();if(v==-1)break;var T=m(),j=m()<<8|m();i[String.fromCharCode(v<<8|T)]=j,f+=1}if(f!=x)throw f+" != "+x;return i})(),u=63;return function(c){for(var m=[],f=0;f<c.length;f+=1){var i=c.charCodeAt(f);if(i<128)m.push(i);else{var v=b[c.charAt(f)];typeof v=="number"?(255&v)==v?m.push(v):(m.push(v>>>8),m.push(255&v)):m.push(u)}}return m}};var C,S,D,O,N,F={L:1,M:0,Q:3,H:2},Y=(C=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],S=1335,D=7973,N=function(k){for(var x=0;k!=0;)x+=1,k>>>=1;return x},(O={}).getBCHTypeInfo=function(k){for(var x=k<<10;N(x)-N(S)>=0;)x^=S<<N(x)-N(S);return 21522^(k<<10|x)},O.getBCHTypeNumber=function(k){for(var x=k<<12;N(x)-N(D)>=0;)x^=D<<N(x)-N(D);return k<<12|x},O.getPatternPosition=function(k){return C[k-1]},O.getMaskFunction=function(k){switch(k){case 0:return function(x,b){return(x+b)%2==0};case 1:return function(x,b){return x%2==0};case 2:return function(x,b){return b%3==0};case 3:return function(x,b){return(x+b)%3==0};case 4:return function(x,b){return(Math.floor(x/2)+Math.floor(b/3))%2==0};case 5:return function(x,b){return x*b%2+x*b%3==0};case 6:return function(x,b){return(x*b%2+x*b%3)%2==0};case 7:return function(x,b){return(x*b%3+(x+b)%2)%2==0};default:throw"bad maskPattern:"+k}},O.getErrorCorrectPolynomial=function(k){for(var x=q([1],0),b=0;b<k;b+=1)x=x.multiply(q([1,V.gexp(b)],0));return x},O.getLengthInBits=function(k,x){if(1<=x&&x<10)switch(k){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+k}else if(x<27)switch(k){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+k}else{if(!(x<41))throw"type:"+x;switch(k){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+k}}},O.getLostPoint=function(k){for(var x=k.getModuleCount(),b=0,u=0;u<x;u+=1)for(var c=0;c<x;c+=1){for(var m=0,f=k.isDark(u,c),i=-1;i<=1;i+=1)if(!(u+i<0||x<=u+i))for(var v=-1;v<=1;v+=1)c+v<0||x<=c+v||i==0&&v==0||f==k.isDark(u+i,c+v)&&(m+=1);m>5&&(b+=3+m-5)}for(u=0;u<x-1;u+=1)for(c=0;c<x-1;c+=1){var T=0;k.isDark(u,c)&&(T+=1),k.isDark(u+1,c)&&(T+=1),k.isDark(u,c+1)&&(T+=1),k.isDark(u+1,c+1)&&(T+=1),T!=0&&T!=4||(b+=3)}for(u=0;u<x;u+=1)for(c=0;c<x-6;c+=1)k.isDark(u,c)&&!k.isDark(u,c+1)&&k.isDark(u,c+2)&&k.isDark(u,c+3)&&k.isDark(u,c+4)&&!k.isDark(u,c+5)&&k.isDark(u,c+6)&&(b+=40);for(c=0;c<x;c+=1)for(u=0;u<x-6;u+=1)k.isDark(u,c)&&!k.isDark(u+1,c)&&k.isDark(u+2,c)&&k.isDark(u+3,c)&&k.isDark(u+4,c)&&!k.isDark(u+5,c)&&k.isDark(u+6,c)&&(b+=40);var j=0;for(c=0;c<x;c+=1)for(u=0;u<x;u+=1)k.isDark(u,c)&&(j+=1);return b+Math.abs(100*j/x/x-50)/5*10},O),V=(function(){for(var k=new Array(256),x=new Array(256),b=0;b<8;b+=1)k[b]=1<<b;for(b=8;b<256;b+=1)k[b]=k[b-4]^k[b-5]^k[b-6]^k[b-8];for(b=0;b<255;b+=1)x[k[b]]=b;return{glog:function(u){if(u<1)throw"glog("+u+")";return x[u]},gexp:function(u){for(;u<0;)u+=255;for(;u>=256;)u-=255;return k[u]}}})();function q(k,x){if(k.length===void 0)throw k.length+"/"+x;var b=(function(){for(var c=0;c<k.length&&k[c]==0;)c+=1;for(var m=new Array(k.length-c+x),f=0;f<k.length-c;f+=1)m[f]=k[f+c];return m})(),u={getAt:function(c){return b[c]},getLength:function(){return b.length},multiply:function(c){for(var m=new Array(u.getLength()+c.getLength()-1),f=0;f<u.getLength();f+=1)for(var i=0;i<c.getLength();i+=1)m[f+i]^=V.gexp(V.glog(u.getAt(f))+V.glog(c.getAt(i)));return q(m,0)},mod:function(c){if(u.getLength()-c.getLength()<0)return u;for(var m=V.glog(u.getAt(0))-V.glog(c.getAt(0)),f=new Array(u.getLength()),i=0;i<u.getLength();i+=1)f[i]=u.getAt(i);for(i=0;i<c.getLength();i+=1)f[i]^=V.gexp(V.glog(c.getAt(i))+m);return q(f,0).mod(c)}};return u}var ee=(function(){var k=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],x=function(u,c){var m={};return m.totalCount=u,m.dataCount=c,m},b={getRSBlocks:function(u,c){var m=(function(te,H){switch(H){case F.L:return k[4*(te-1)+0];case F.M:return k[4*(te-1)+1];case F.Q:return k[4*(te-1)+2];case F.H:return k[4*(te-1)+3];default:return}})(u,c);if(m===void 0)throw"bad rs block @ typeNumber:"+u+"/errorCorrectionLevel:"+c;for(var f=m.length/3,i=[],v=0;v<f;v+=1)for(var T=m[3*v+0],j=m[3*v+1],K=m[3*v+2],J=0;J<T;J+=1)i.push(x(j,K));return i}};return b})(),re=function(){var k=[],x=0,b={getBuffer:function(){return k},getAt:function(u){var c=Math.floor(u/8);return(k[c]>>>7-u%8&1)==1},put:function(u,c){for(var m=0;m<c;m+=1)b.putBit((u>>>c-m-1&1)==1)},getLengthInBits:function(){return x},putBit:function(u){var c=Math.floor(x/8);k.length<=c&&k.push(0),u&&(k[c]|=128>>>x%8),x+=1}};return b},X=function(k){var x=k,b={getMode:function(){return 1},getLength:function(m){return x.length},write:function(m){for(var f=x,i=0;i+2<f.length;)m.put(u(f.substring(i,i+3)),10),i+=3;i<f.length&&(f.length-i==1?m.put(u(f.substring(i,i+1)),4):f.length-i==2&&m.put(u(f.substring(i,i+2)),7))}},u=function(m){for(var f=0,i=0;i<m.length;i+=1)f=10*f+c(m.charAt(i));return f},c=function(m){if("0"<=m&&m<="9")return m.charCodeAt(0)-48;throw"illegal char :"+m};return b},Z=function(k){var x=k,b={getMode:function(){return 2},getLength:function(c){return x.length},write:function(c){for(var m=x,f=0;f+1<m.length;)c.put(45*u(m.charAt(f))+u(m.charAt(f+1)),11),f+=2;f<m.length&&c.put(u(m.charAt(f)),6)}},u=function(c){if("0"<=c&&c<="9")return c.charCodeAt(0)-48;if("A"<=c&&c<="Z")return c.charCodeAt(0)-65+10;switch(c){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+c}};return b},U=function(k){var x=P.stringToBytes(k);return{getMode:function(){return 4},getLength:function(b){return x.length},write:function(b){for(var u=0;u<x.length;u+=1)b.put(x[u],8)}}},G=function(k){var x=P.stringToBytesFuncs.SJIS;if(!x)throw"sjis not supported.";(function(){var c=x("友");if(c.length!=2||(c[0]<<8|c[1])!=38726)throw"sjis not supported."})();var b=x(k),u={getMode:function(){return 8},getLength:function(c){return~~(b.length/2)},write:function(c){for(var m=b,f=0;f+1<m.length;){var i=(255&m[f])<<8|255&m[f+1];if(33088<=i&&i<=40956)i-=33088;else{if(!(57408<=i&&i<=60351))throw"illegal char at "+(f+1)+"/"+i;i-=49472}i=192*(i>>>8&255)+(255&i),c.put(i,13),f+=2}if(f<m.length)throw"illegal char at "+(f+1)}};return u},W=function(){var k=[],x={writeByte:function(b){k.push(255&b)},writeShort:function(b){x.writeByte(b),x.writeByte(b>>>8)},writeBytes:function(b,u,c){u=u||0,c=c||b.length;for(var m=0;m<c;m+=1)x.writeByte(b[m+u])},writeString:function(b){for(var u=0;u<b.length;u+=1)x.writeByte(b.charCodeAt(u))},toByteArray:function(){return k},toString:function(){var b="";b+="[";for(var u=0;u<k.length;u+=1)u>0&&(b+=","),b+=k[u];return b+"]"}};return x},ae=function(k){var x=k,b=0,u=0,c=0,m={read:function(){for(;c<8;){if(b>=x.length){if(c==0)return-1;throw"unexpected end of file./"+c}var i=x.charAt(b);if(b+=1,i=="=")return c=0,-1;i.match(/^\s$/)||(u=u<<6|f(i.charCodeAt(0)),c+=6)}var v=u>>>c-8&255;return c-=8,v}},f=function(i){if(65<=i&&i<=90)return i-65;if(97<=i&&i<=122)return i-97+26;if(48<=i&&i<=57)return i-48+52;if(i==43)return 62;if(i==47)return 63;throw"c:"+i};return m},oe=function(k,x,b){for(var u=(function(j,K){var J=j,te=K,H=new Array(j*K),ie={setPixel:function(E,L,$){H[L*J+E]=$},write:function(E){E.writeString("GIF87a"),E.writeShort(J),E.writeShort(te),E.writeByte(128),E.writeByte(0),E.writeByte(0),E.writeByte(0),E.writeByte(0),E.writeByte(0),E.writeByte(255),E.writeByte(255),E.writeByte(255),E.writeString(","),E.writeShort(0),E.writeShort(0),E.writeShort(J),E.writeShort(te),E.writeByte(0);var L=se(2);E.writeByte(2);for(var $=0;L.length-$>255;)E.writeByte(255),E.writeBytes(L,$,255),$+=255;E.writeByte(L.length-$),E.writeBytes(L,$,L.length-$),E.writeByte(0),E.writeString(";")}},se=function(E){for(var L=1<<E,$=1+(1<<E),B=E+1,I=le(),ce=0;ce<L;ce+=1)I.add(String.fromCharCode(ce));I.add(String.fromCharCode(L)),I.add(String.fromCharCode($));var o,l,p,M=W(),R=(o=M,l=0,p=0,{write:function(pe,ne){if(pe>>>ne)throw"length over";for(;l+ne>=8;)o.writeByte(255&(pe<<l|p)),ne-=8-l,pe>>>=8-l,p=0,l=0;p|=pe<<l,l+=ne},flush:function(){l>0&&o.writeByte(p)}});R.write(L,B);var z=0,ue=String.fromCharCode(H[z]);for(z+=1;z<H.length;){var he=String.fromCharCode(H[z]);z+=1,I.contains(ue+he)?ue+=he:(R.write(I.indexOf(ue),B),I.size()<4095&&(I.size()==1<<B&&(B+=1),I.add(ue+he)),ue=he)}return R.write(I.indexOf(ue),B),R.write($,B),R.flush(),M.toByteArray()},le=function(){var E={},L=0,$={add:function(B){if($.contains(B))throw"dup key:"+B;E[B]=L,L+=1},size:function(){return L},indexOf:function(B){return E[B]},contains:function(B){return E[B]!==void 0}};return $};return ie})(k,x),c=0;c<x;c+=1)for(var m=0;m<k;m+=1)u.setPixel(m,c,b(m,c));var f=W();u.write(f);for(var i=(function(){var j=0,K=0,J=0,te="",H={},ie=function(le){te+=String.fromCharCode(se(63&le))},se=function(le){if(!(le<0)){if(le<26)return 65+le;if(le<52)return le-26+97;if(le<62)return le-52+48;if(le==62)return 43;if(le==63)return 47}throw"n:"+le};return H.writeByte=function(le){for(j=j<<8|255&le,K+=8,J+=1;K>=6;)ie(j>>>K-6),K-=6},H.flush=function(){if(K>0&&(ie(j<<6-K),j=0,K=0),J%3!=0)for(var le=3-J%3,E=0;E<le;E+=1)te+="="},H.toString=function(){return te},H})(),v=f.toByteArray(),T=0;T<v.length;T+=1)i.writeByte(v[T]);return i.flush(),"data:image/gif;base64,"+i};return P})();_.stringToBytesFuncs["UTF-8"]=function(P){return(function(C){for(var S=[],D=0;D<C.length;D++){var O=C.charCodeAt(D);O<128?S.push(O):O<2048?S.push(192|O>>6,128|63&O):O<55296||O>=57344?S.push(224|O>>12,128|O>>6&63,128|63&O):(D++,O=65536+((1023&O)<<10|1023&C.charCodeAt(D)),S.push(240|O>>18,128|O>>12&63,128|O>>6&63,128|63&O))}return S})(P)},(y=typeof(g=function(){return _})=="function"?g.apply(a,[]):g)===void 0||(h.exports=y)}},n={};function s(h){var a=n[h];if(a!==void 0)return a.exports;var g=n[h]={exports:{}};return r[h](g,g.exports,s),g.exports}s.n=h=>{var a=h&&h.__esModule?()=>h.default:()=>h;return s.d(a,{a}),a},s.d=(h,a)=>{for(var g in a)s.o(a,g)&&!s.o(h,g)&&Object.defineProperty(h,g,{enumerable:!0,get:a[g]})},s.o=(h,a)=>Object.prototype.hasOwnProperty.call(h,a);var d={};return(()=>{s.d(d,{default:()=>x});const h=b=>!!b&&typeof b=="object"&&!Array.isArray(b);function a(b,...u){if(!u.length)return b;const c=u.shift();return c!==void 0&&h(b)&&h(c)?(b=Object.assign({},b),Object.keys(c).forEach(m=>{const f=b[m],i=c[m];Array.isArray(f)&&Array.isArray(i)?b[m]=i:h(f)&&h(i)?b[m]=a(Object.assign({},f),i):b[m]=i}),a(b,...u)):b}function g(b,u){const c=document.createElement("a");c.download=u,c.href=b,document.body.appendChild(c),c.click(),document.body.removeChild(c)}const y={L:.07,M:.15,Q:.25,H:.3};class _{constructor({svg:u,type:c,window:m}){this._svg=u,this._type=c,this._window=m}draw(u,c,m,f){let i;switch(this._type){case"dots":i=this._drawDot;break;case"classy":i=this._drawClassy;break;case"classy-rounded":i=this._drawClassyRounded;break;case"rounded":i=this._drawRounded;break;case"extra-rounded":i=this._drawExtraRounded;break;default:i=this._drawSquare}i.call(this,{x:u,y:c,size:m,getNeighbor:f})}_rotateFigure({x:u,y:c,size:m,rotation:f=0,draw:i}){var v;const T=u+m/2,j=c+m/2;i(),(v=this._element)===null||v===void 0||v.setAttribute("transform",`rotate(${180*f/Math.PI},${T},${j})`)}_basicDot(u){const{size:c,x:m,y:f}=u;this._rotateFigure(Object.assign(Object.assign({},u),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(m+c/2)),this._element.setAttribute("cy",String(f+c/2)),this._element.setAttribute("r",String(c/2))}}))}_basicSquare(u){const{size:c,x:m,y:f}=u;this._rotateFigure(Object.assign(Object.assign({},u),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(m)),this._element.setAttribute("y",String(f)),this._element.setAttribute("width",String(c)),this._element.setAttribute("height",String(c))}}))}_basicSideRounded(u){const{size:c,x:m,y:f}=u;this._rotateFigure(Object.assign(Object.assign({},u),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${m} ${f}v ${c}h `+c/2+`a ${c/2} ${c/2}, 0, 0, 0, 0 ${-c}`)}}))}_basicCornerRounded(u){const{size:c,x:m,y:f}=u;this._rotateFigure(Object.assign(Object.assign({},u),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${m} ${f}v ${c}h ${c}v `+-c/2+`a ${c/2} ${c/2}, 0, 0, 0, ${-c/2} ${-c/2}`)}}))}_basicCornerExtraRounded(u){const{size:c,x:m,y:f}=u;this._rotateFigure(Object.assign(Object.assign({},u),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${m} ${f}v ${c}h ${c}a ${c} ${c}, 0, 0, 0, ${-c} ${-c}`)}}))}_basicCornersRounded(u){const{size:c,x:m,y:f}=u;this._rotateFigure(Object.assign(Object.assign({},u),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${m} ${f}v `+c/2+`a ${c/2} ${c/2}, 0, 0, 0, ${c/2} ${c/2}h `+c/2+"v "+-c/2+`a ${c/2} ${c/2}, 0, 0, 0, ${-c/2} ${-c/2}`)}}))}_drawDot({x:u,y:c,size:m}){this._basicDot({x:u,y:c,size:m,rotation:0})}_drawSquare({x:u,y:c,size:m}){this._basicSquare({x:u,y:c,size:m,rotation:0})}_drawRounded({x:u,y:c,size:m,getNeighbor:f}){const i=f?+f(-1,0):0,v=f?+f(1,0):0,T=f?+f(0,-1):0,j=f?+f(0,1):0,K=i+v+T+j;if(K!==0)if(K>2||i&&v||T&&j)this._basicSquare({x:u,y:c,size:m,rotation:0});else{if(K===2){let J=0;return i&&T?J=Math.PI/2:T&&v?J=Math.PI:v&&j&&(J=-Math.PI/2),void this._basicCornerRounded({x:u,y:c,size:m,rotation:J})}if(K===1){let J=0;return T?J=Math.PI/2:v?J=Math.PI:j&&(J=-Math.PI/2),void this._basicSideRounded({x:u,y:c,size:m,rotation:J})}}else this._basicDot({x:u,y:c,size:m,rotation:0})}_drawExtraRounded({x:u,y:c,size:m,getNeighbor:f}){const i=f?+f(-1,0):0,v=f?+f(1,0):0,T=f?+f(0,-1):0,j=f?+f(0,1):0,K=i+v+T+j;if(K!==0)if(K>2||i&&v||T&&j)this._basicSquare({x:u,y:c,size:m,rotation:0});else{if(K===2){let J=0;return i&&T?J=Math.PI/2:T&&v?J=Math.PI:v&&j&&(J=-Math.PI/2),void this._basicCornerExtraRounded({x:u,y:c,size:m,rotation:J})}if(K===1){let J=0;return T?J=Math.PI/2:v?J=Math.PI:j&&(J=-Math.PI/2),void this._basicSideRounded({x:u,y:c,size:m,rotation:J})}}else this._basicDot({x:u,y:c,size:m,rotation:0})}_drawClassy({x:u,y:c,size:m,getNeighbor:f}){const i=f?+f(-1,0):0,v=f?+f(1,0):0,T=f?+f(0,-1):0,j=f?+f(0,1):0;i+v+T+j!==0?i||T?v||j?this._basicSquare({x:u,y:c,size:m,rotation:0}):this._basicCornerRounded({x:u,y:c,size:m,rotation:Math.PI/2}):this._basicCornerRounded({x:u,y:c,size:m,rotation:-Math.PI/2}):this._basicCornersRounded({x:u,y:c,size:m,rotation:Math.PI/2})}_drawClassyRounded({x:u,y:c,size:m,getNeighbor:f}){const i=f?+f(-1,0):0,v=f?+f(1,0):0,T=f?+f(0,-1):0,j=f?+f(0,1):0;i+v+T+j!==0?i||T?v||j?this._basicSquare({x:u,y:c,size:m,rotation:0}):this._basicCornerExtraRounded({x:u,y:c,size:m,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:u,y:c,size:m,rotation:-Math.PI/2}):this._basicCornersRounded({x:u,y:c,size:m,rotation:Math.PI/2})}}const P={dot:"dot",square:"square",extraRounded:"extra-rounded"},C=Object.values(P);class S{constructor({svg:u,type:c,window:m}){this._svg=u,this._type=c,this._window=m}draw(u,c,m,f){let i;switch(this._type){case P.square:i=this._drawSquare;break;case P.extraRounded:i=this._drawExtraRounded;break;default:i=this._drawDot}i.call(this,{x:u,y:c,size:m,rotation:f})}_rotateFigure({x:u,y:c,size:m,rotation:f=0,draw:i}){var v;const T=u+m/2,j=c+m/2;i(),(v=this._element)===null||v===void 0||v.setAttribute("transform",`rotate(${180*f/Math.PI},${T},${j})`)}_basicDot(u){const{size:c,x:m,y:f}=u,i=c/7;this._rotateFigure(Object.assign(Object.assign({},u),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${m+c/2} ${f}a ${c/2} ${c/2} 0 1 0 0.1 0zm 0 ${i}a ${c/2-i} ${c/2-i} 0 1 1 -0.1 0Z`)}}))}_basicSquare(u){const{size:c,x:m,y:f}=u,i=c/7;this._rotateFigure(Object.assign(Object.assign({},u),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${m} ${f}v ${c}h ${c}v `+-c+`zM ${m+i} ${f+i}h `+(c-2*i)+"v "+(c-2*i)+"h "+(2*i-c)+"z")}}))}_basicExtraRounded(u){const{size:c,x:m,y:f}=u,i=c/7;this._rotateFigure(Object.assign(Object.assign({},u),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${m} ${f+2.5*i}v `+2*i+`a ${2.5*i} ${2.5*i}, 0, 0, 0, ${2.5*i} ${2.5*i}h `+2*i+`a ${2.5*i} ${2.5*i}, 0, 0, 0, ${2.5*i} ${2.5*-i}v `+-2*i+`a ${2.5*i} ${2.5*i}, 0, 0, 0, ${2.5*-i} ${2.5*-i}h `+-2*i+`a ${2.5*i} ${2.5*i}, 0, 0, 0, ${2.5*-i} ${2.5*i}M ${m+2.5*i} ${f+i}h `+2*i+`a ${1.5*i} ${1.5*i}, 0, 0, 1, ${1.5*i} ${1.5*i}v `+2*i+`a ${1.5*i} ${1.5*i}, 0, 0, 1, ${1.5*-i} ${1.5*i}h `+-2*i+`a ${1.5*i} ${1.5*i}, 0, 0, 1, ${1.5*-i} ${1.5*-i}v `+-2*i+`a ${1.5*i} ${1.5*i}, 0, 0, 1, ${1.5*i} ${1.5*-i}`)}}))}_drawDot({x:u,y:c,size:m,rotation:f}){this._basicDot({x:u,y:c,size:m,rotation:f})}_drawSquare({x:u,y:c,size:m,rotation:f}){this._basicSquare({x:u,y:c,size:m,rotation:f})}_drawExtraRounded({x:u,y:c,size:m,rotation:f}){this._basicExtraRounded({x:u,y:c,size:m,rotation:f})}}const D={dot:"dot",square:"square"},O=Object.values(D);class N{constructor({svg:u,type:c,window:m}){this._svg=u,this._type=c,this._window=m}draw(u,c,m,f){let i;i=this._type===D.square?this._drawSquare:this._drawDot,i.call(this,{x:u,y:c,size:m,rotation:f})}_rotateFigure({x:u,y:c,size:m,rotation:f=0,draw:i}){var v;const T=u+m/2,j=c+m/2;i(),(v=this._element)===null||v===void 0||v.setAttribute("transform",`rotate(${180*f/Math.PI},${T},${j})`)}_basicDot(u){const{size:c,x:m,y:f}=u;this._rotateFigure(Object.assign(Object.assign({},u),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(m+c/2)),this._element.setAttribute("cy",String(f+c/2)),this._element.setAttribute("r",String(c/2))}}))}_basicSquare(u){const{size:c,x:m,y:f}=u;this._rotateFigure(Object.assign(Object.assign({},u),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(m)),this._element.setAttribute("y",String(f)),this._element.setAttribute("width",String(c)),this._element.setAttribute("height",String(c))}}))}_drawDot({x:u,y:c,size:m,rotation:f}){this._basicDot({x:u,y:c,size:m,rotation:f})}_drawSquare({x:u,y:c,size:m,rotation:f}){this._basicSquare({x:u,y:c,size:m,rotation:f})}}const F="circle",Y=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],V=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];class q{constructor(u,c){this._roundSize=m=>this._options.dotsOptions.roundSize?Math.floor(m):m,this._window=c,this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(u.width)),this._element.setAttribute("height",String(u.height)),this._element.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),u.dotsOptions.roundSize||this._element.setAttribute("shape-rendering","crispEdges"),this._element.setAttribute("viewBox",`0 0 ${u.width} ${u.height}`),this._defs=this._window.document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._imageUri=u.image,this._instanceId=q.instanceCount++,this._options=u}get width(){return this._options.width}get height(){return this._options.height}getElement(){return this._element}async drawQR(u){const c=u.getModuleCount(),m=Math.min(this._options.width,this._options.height)-2*this._options.margin,f=this._options.shape===F?m/Math.sqrt(2):m,i=this._roundSize(f/c);let v={hideXDots:0,hideYDots:0,width:0,height:0};if(this._qr=u,this._options.image){if(await this.loadImage(),!this._image)return;const{imageOptions:T,qrOptions:j}=this._options,K=T.imageSize*y[j.errorCorrectionLevel],J=Math.floor(K*c*c);v=(function({originalHeight:te,originalWidth:H,maxHiddenDots:ie,maxHiddenAxisDots:se,dotSize:le}){const E={x:0,y:0},L={x:0,y:0};if(te<=0||H<=0||ie<=0||le<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};const $=te/H;return E.x=Math.floor(Math.sqrt(ie/$)),E.x<=0&&(E.x=1),se&&se<E.x&&(E.x=se),E.x%2==0&&E.x--,L.x=E.x*le,E.y=1+2*Math.ceil((E.x*$-1)/2),L.y=Math.round(L.x*$),(E.y*E.x>ie||se&&se<E.y)&&(se&&se<E.y?(E.y=se,E.y%2==0&&E.x--):E.y-=2,L.y=E.y*le,E.x=1+2*Math.ceil((E.y/$-1)/2),L.x=Math.round(L.y/$)),{height:L.y,width:L.x,hideYDots:E.y,hideXDots:E.x}})({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:J,maxHiddenAxisDots:c-14,dotSize:i})}this.drawBackground(),this.drawDots((T,j)=>{var K,J,te,H,ie,se;return!(this._options.imageOptions.hideBackgroundDots&&T>=(c-v.hideYDots)/2&&T<(c+v.hideYDots)/2&&j>=(c-v.hideXDots)/2&&j<(c+v.hideXDots)/2||!((K=Y[T])===null||K===void 0)&&K[j]||!((J=Y[T-c+7])===null||J===void 0)&&J[j]||!((te=Y[T])===null||te===void 0)&&te[j-c+7]||!((H=V[T])===null||H===void 0)&&H[j]||!((ie=V[T-c+7])===null||ie===void 0)&&ie[j]||!((se=V[T])===null||se===void 0)&&se[j-c+7])}),this.drawCorners(),this._options.image&&await this.drawImage({width:v.width,height:v.height,count:c,dotSize:i})}drawBackground(){var u,c,m;const f=this._element,i=this._options;if(f){const v=(u=i.backgroundOptions)===null||u===void 0?void 0:u.gradient,T=(c=i.backgroundOptions)===null||c===void 0?void 0:c.color;let j=i.height,K=i.width;if(v||T){const J=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id",`clip-path-background-color-${this._instanceId}`),this._defs.appendChild(this._backgroundClipPath),!((m=i.backgroundOptions)===null||m===void 0)&&m.round&&(j=K=Math.min(i.width,i.height),J.setAttribute("rx",String(j/2*i.backgroundOptions.round))),J.setAttribute("x",String(this._roundSize((i.width-K)/2))),J.setAttribute("y",String(this._roundSize((i.height-j)/2))),J.setAttribute("width",String(K)),J.setAttribute("height",String(j)),this._backgroundClipPath.appendChild(J),this._createColor({options:v,color:T,additionalRotation:0,x:0,y:0,height:i.height,width:i.width,name:`background-color-${this._instanceId}`})}}}drawDots(u){var c,m;if(!this._qr)throw"QR code is not defined";const f=this._options,i=this._qr.getModuleCount();if(i>f.width||i>f.height)throw"The canvas is too small.";const v=Math.min(f.width,f.height)-2*f.margin,T=f.shape===F?v/Math.sqrt(2):v,j=this._roundSize(T/i),K=this._roundSize((f.width-i*j)/2),J=this._roundSize((f.height-i*j)/2),te=new _({svg:this._element,type:f.dotsOptions.type,window:this._window});this._dotsClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id",`clip-path-dot-color-${this._instanceId}`),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(c=f.dotsOptions)===null||c===void 0?void 0:c.gradient,color:f.dotsOptions.color,additionalRotation:0,x:0,y:0,height:f.height,width:f.width,name:`dot-color-${this._instanceId}`});for(let H=0;H<i;H++)for(let ie=0;ie<i;ie++)u&&!u(H,ie)||!((m=this._qr)===null||m===void 0)&&m.isDark(H,ie)&&(te.draw(K+ie*j,J+H*j,j,(se,le)=>!(ie+se<0||H+le<0||ie+se>=i||H+le>=i)&&!(u&&!u(H+le,ie+se))&&!!this._qr&&this._qr.isDark(H+le,ie+se)),te._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(te._element));if(f.shape===F){const H=this._roundSize((v/j-i)/2),ie=i+2*H,se=K-H*j,le=J-H*j,E=[],L=this._roundSize(ie/2);for(let $=0;$<ie;$++){E[$]=[];for(let B=0;B<ie;B++)$>=H-1&&$<=ie-H&&B>=H-1&&B<=ie-H||Math.sqrt(($-L)*($-L)+(B-L)*(B-L))>L?E[$][B]=0:E[$][B]=this._qr.isDark(B-2*H<0?B:B>=i?B-2*H:B-H,$-2*H<0?$:$>=i?$-2*H:$-H)?1:0}for(let $=0;$<ie;$++)for(let B=0;B<ie;B++)E[$][B]&&(te.draw(se+B*j,le+$*j,j,(I,ce)=>{var o;return!!(!((o=E[$+ce])===null||o===void 0)&&o[B+I])}),te._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(te._element))}}drawCorners(){if(!this._qr)throw"QR code is not defined";const u=this._element,c=this._options;if(!u)throw"Element code is not defined";const m=this._qr.getModuleCount(),f=Math.min(c.width,c.height)-2*c.margin,i=c.shape===F?f/Math.sqrt(2):f,v=this._roundSize(i/m),T=7*v,j=3*v,K=this._roundSize((c.width-m*v)/2),J=this._roundSize((c.height-m*v)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(([te,H,ie])=>{var se,le,E,L,$,B,I,ce,o,l,p,M,R,z;const ue=K+te*v*(m-7),he=J+H*v*(m-7);let pe=this._dotsClipPath,ne=this._dotsClipPath;if((!((se=c.cornersSquareOptions)===null||se===void 0)&&se.gradient||!((le=c.cornersSquareOptions)===null||le===void 0)&&le.color)&&(pe=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),pe.setAttribute("id",`clip-path-corners-square-color-${te}-${H}-${this._instanceId}`),this._defs.appendChild(pe),this._cornersSquareClipPath=this._cornersDotClipPath=ne=pe,this._createColor({options:(E=c.cornersSquareOptions)===null||E===void 0?void 0:E.gradient,color:(L=c.cornersSquareOptions)===null||L===void 0?void 0:L.color,additionalRotation:ie,x:ue,y:he,height:T,width:T,name:`corners-square-color-${te}-${H}-${this._instanceId}`})),(($=c.cornersSquareOptions)===null||$===void 0?void 0:$.type)&&C.includes(c.cornersSquareOptions.type)){const fe=new S({svg:this._element,type:c.cornersSquareOptions.type,window:this._window});fe.draw(ue,he,T,ie),fe._element&&pe&&pe.appendChild(fe._element)}else{const fe=new _({svg:this._element,type:((B=c.cornersSquareOptions)===null||B===void 0?void 0:B.type)||c.dotsOptions.type,window:this._window});for(let me=0;me<Y.length;me++)for(let ge=0;ge<Y[me].length;ge++)!((I=Y[me])===null||I===void 0)&&I[ge]&&(fe.draw(ue+ge*v,he+me*v,v,(De,xe)=>{var Ce;return!!(!((Ce=Y[me+xe])===null||Ce===void 0)&&Ce[ge+De])}),fe._element&&pe&&pe.appendChild(fe._element))}if((!((ce=c.cornersDotOptions)===null||ce===void 0)&&ce.gradient||!((o=c.cornersDotOptions)===null||o===void 0)&&o.color)&&(ne=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),ne.setAttribute("id",`clip-path-corners-dot-color-${te}-${H}-${this._instanceId}`),this._defs.appendChild(ne),this._cornersDotClipPath=ne,this._createColor({options:(l=c.cornersDotOptions)===null||l===void 0?void 0:l.gradient,color:(p=c.cornersDotOptions)===null||p===void 0?void 0:p.color,additionalRotation:ie,x:ue+2*v,y:he+2*v,height:j,width:j,name:`corners-dot-color-${te}-${H}-${this._instanceId}`})),((M=c.cornersDotOptions)===null||M===void 0?void 0:M.type)&&O.includes(c.cornersDotOptions.type)){const fe=new N({svg:this._element,type:c.cornersDotOptions.type,window:this._window});fe.draw(ue+2*v,he+2*v,j,ie),fe._element&&ne&&ne.appendChild(fe._element)}else{const fe=new _({svg:this._element,type:((R=c.cornersDotOptions)===null||R===void 0?void 0:R.type)||c.dotsOptions.type,window:this._window});for(let me=0;me<V.length;me++)for(let ge=0;ge<V[me].length;ge++)!((z=V[me])===null||z===void 0)&&z[ge]&&(fe.draw(ue+ge*v,he+me*v,v,(De,xe)=>{var Ce;return!!(!((Ce=V[me+xe])===null||Ce===void 0)&&Ce[ge+De])}),fe._element&&ne&&ne.appendChild(fe._element))}})}loadImage(){return new Promise((u,c)=>{var m;const f=this._options;if(!f.image)return c("Image is not defined");if(!((m=f.nodeCanvas)===null||m===void 0)&&m.loadImage)f.nodeCanvas.loadImage(f.image).then(i=>{var v,T;if(this._image=i,this._options.imageOptions.saveAsBlob){const j=(v=f.nodeCanvas)===null||v===void 0?void 0:v.createCanvas(this._image.width,this._image.height);(T=j?.getContext("2d"))===null||T===void 0||T.drawImage(i,0,0),this._imageUri=j?.toDataURL()}u()}).catch(c);else{const i=new this._window.Image;typeof f.imageOptions.crossOrigin=="string"&&(i.crossOrigin=f.imageOptions.crossOrigin),this._image=i,i.onload=async()=>{this._options.imageOptions.saveAsBlob&&(this._imageUri=await(async function(v,T){return new Promise(j=>{const K=new T.XMLHttpRequest;K.onload=function(){const J=new T.FileReader;J.onloadend=function(){j(J.result)},J.readAsDataURL(K.response)},K.open("GET",v),K.responseType="blob",K.send()})})(f.image||"",this._window)),u()},i.src=f.image}})}async drawImage({width:u,height:c,count:m,dotSize:f}){const i=this._options,v=this._roundSize((i.width-m*f)/2),T=this._roundSize((i.height-m*f)/2),j=v+this._roundSize(i.imageOptions.margin+(m*f-u)/2),K=T+this._roundSize(i.imageOptions.margin+(m*f-c)/2),J=u-2*i.imageOptions.margin,te=c-2*i.imageOptions.margin,H=this._window.document.createElementNS("http://www.w3.org/2000/svg","image");H.setAttribute("href",this._imageUri||""),H.setAttribute("xlink:href",this._imageUri||""),H.setAttribute("x",String(j)),H.setAttribute("y",String(K)),H.setAttribute("width",`${J}px`),H.setAttribute("height",`${te}px`),this._element.appendChild(H)}_createColor({options:u,color:c,additionalRotation:m,x:f,y:i,height:v,width:T,name:j}){const K=T>v?T:v,J=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");if(J.setAttribute("x",String(f)),J.setAttribute("y",String(i)),J.setAttribute("height",String(v)),J.setAttribute("width",String(T)),J.setAttribute("clip-path",`url('#clip-path-${j}')`),u){let te;if(u.type==="radial")te=this._window.document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),te.setAttribute("id",j),te.setAttribute("gradientUnits","userSpaceOnUse"),te.setAttribute("fx",String(f+T/2)),te.setAttribute("fy",String(i+v/2)),te.setAttribute("cx",String(f+T/2)),te.setAttribute("cy",String(i+v/2)),te.setAttribute("r",String(K/2));else{const H=((u.rotation||0)+m)%(2*Math.PI),ie=(H+2*Math.PI)%(2*Math.PI);let se=f+T/2,le=i+v/2,E=f+T/2,L=i+v/2;ie>=0&&ie<=.25*Math.PI||ie>1.75*Math.PI&&ie<=2*Math.PI?(se-=T/2,le-=v/2*Math.tan(H),E+=T/2,L+=v/2*Math.tan(H)):ie>.25*Math.PI&&ie<=.75*Math.PI?(le-=v/2,se-=T/2/Math.tan(H),L+=v/2,E+=T/2/Math.tan(H)):ie>.75*Math.PI&&ie<=1.25*Math.PI?(se+=T/2,le+=v/2*Math.tan(H),E-=T/2,L-=v/2*Math.tan(H)):ie>1.25*Math.PI&&ie<=1.75*Math.PI&&(le+=v/2,se+=T/2/Math.tan(H),L-=v/2,E-=T/2/Math.tan(H)),te=this._window.document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),te.setAttribute("id",j),te.setAttribute("gradientUnits","userSpaceOnUse"),te.setAttribute("x1",String(Math.round(se))),te.setAttribute("y1",String(Math.round(le))),te.setAttribute("x2",String(Math.round(E))),te.setAttribute("y2",String(Math.round(L)))}u.colorStops.forEach(({offset:H,color:ie})=>{const se=this._window.document.createElementNS("http://www.w3.org/2000/svg","stop");se.setAttribute("offset",100*H+"%"),se.setAttribute("stop-color",ie),te.appendChild(se)}),J.setAttribute("fill",`url('#${j}')`),this._defs.appendChild(te)}else c&&J.setAttribute("fill",c);this._element.appendChild(J)}}q.instanceCount=0;const ee=q,re="canvas",X={};for(let b=0;b<=40;b++)X[b]=b;const Z={type:re,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:X[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{saveAsBlob:!0,hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000",roundSize:!0},backgroundOptions:{round:0,color:"#fff"}};function U(b){const u=Object.assign({},b);if(!u.colorStops||!u.colorStops.length)throw"Field 'colorStops' is required in gradient";return u.rotation?u.rotation=Number(u.rotation):u.rotation=0,u.colorStops=u.colorStops.map(c=>Object.assign(Object.assign({},c),{offset:Number(c.offset)})),u}function G(b){const u=Object.assign({},b);return u.width=Number(u.width),u.height=Number(u.height),u.margin=Number(u.margin),u.imageOptions=Object.assign(Object.assign({},u.imageOptions),{hideBackgroundDots:!!u.imageOptions.hideBackgroundDots,imageSize:Number(u.imageOptions.imageSize),margin:Number(u.imageOptions.margin)}),u.margin>Math.min(u.width,u.height)&&(u.margin=Math.min(u.width,u.height)),u.dotsOptions=Object.assign({},u.dotsOptions),u.dotsOptions.gradient&&(u.dotsOptions.gradient=U(u.dotsOptions.gradient)),u.cornersSquareOptions&&(u.cornersSquareOptions=Object.assign({},u.cornersSquareOptions),u.cornersSquareOptions.gradient&&(u.cornersSquareOptions.gradient=U(u.cornersSquareOptions.gradient))),u.cornersDotOptions&&(u.cornersDotOptions=Object.assign({},u.cornersDotOptions),u.cornersDotOptions.gradient&&(u.cornersDotOptions.gradient=U(u.cornersDotOptions.gradient))),u.backgroundOptions&&(u.backgroundOptions=Object.assign({},u.backgroundOptions),u.backgroundOptions.gradient&&(u.backgroundOptions.gradient=U(u.backgroundOptions.gradient))),u}var W=s(873),ae=s.n(W);function oe(b){if(!b)throw new Error("Extension must be defined");b[0]==="."&&(b=b.substring(1));const u={bmp:"image/bmp",gif:"image/gif",ico:"image/vnd.microsoft.icon",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",webp:"image/webp",pdf:"application/pdf"}[b.toLowerCase()];if(!u)throw new Error(`Extension "${b}" is not supported`);return u}class k{constructor(u){u!=null&&u.jsdom?this._window=new u.jsdom("",{resources:"usable"}).window:this._window=window,this._options=u?G(a(Z,u)):Z,this.update()}static _clearContainer(u){u&&(u.innerHTML="")}_setupSvg(){if(!this._qr)return;const u=new ee(this._options,this._window);this._svg=u.getElement(),this._svgDrawingPromise=u.drawQR(this._qr).then(()=>{var c;this._svg&&((c=this._extension)===null||c===void 0||c.call(this,u.getElement(),this._options))})}_setupCanvas(){var u,c;this._qr&&(!((u=this._options.nodeCanvas)===null||u===void 0)&&u.createCanvas?(this._nodeCanvas=this._options.nodeCanvas.createCanvas(this._options.width,this._options.height),this._nodeCanvas.width=this._options.width,this._nodeCanvas.height=this._options.height):(this._domCanvas=document.createElement("canvas"),this._domCanvas.width=this._options.width,this._domCanvas.height=this._options.height),this._setupSvg(),this._canvasDrawingPromise=(c=this._svgDrawingPromise)===null||c===void 0?void 0:c.then(()=>{var m;if(!this._svg)return;const f=this._svg,i=new this._window.XMLSerializer().serializeToString(f),v=btoa(i),T=`data:${oe("svg")};base64,${v}`;if(!((m=this._options.nodeCanvas)===null||m===void 0)&&m.loadImage)return this._options.nodeCanvas.loadImage(T).then(j=>{var K,J;j.width=this._options.width,j.height=this._options.height,(J=(K=this._nodeCanvas)===null||K===void 0?void 0:K.getContext("2d"))===null||J===void 0||J.drawImage(j,0,0)});{const j=new this._window.Image;return new Promise(K=>{j.onload=()=>{var J,te;(te=(J=this._domCanvas)===null||J===void 0?void 0:J.getContext("2d"))===null||te===void 0||te.drawImage(j,0,0),K()},j.src=T})}}))}async _getElement(u="png"){if(!this._qr)throw"QR code is empty";return u.toLowerCase()==="svg"?(this._svg&&this._svgDrawingPromise||this._setupSvg(),await this._svgDrawingPromise,this._svg):((this._domCanvas||this._nodeCanvas)&&this._canvasDrawingPromise||this._setupCanvas(),await this._canvasDrawingPromise,this._domCanvas||this._nodeCanvas)}update(u){k._clearContainer(this._container),this._options=u?G(a(this._options,u)):this._options,this._options.data&&(this._qr=ae()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||(function(c){switch(!0){case/^[0-9]*$/.test(c):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(c):return"Alphanumeric";default:return"Byte"}})(this._options.data)),this._qr.make(),this._options.type===re?this._setupCanvas():this._setupSvg(),this.append(this._container))}append(u){if(u){if(typeof u.appendChild!="function")throw"Container should be a single DOM node";this._options.type===re?this._domCanvas&&u.appendChild(this._domCanvas):this._svg&&u.appendChild(this._svg),this._container=u}}applyExtension(u){if(!u)throw"Extension function should be defined.";this._extension=u,this.update()}deleteExtension(){this._extension=void 0,this.update()}async getRawData(u="png"){if(!this._qr)throw"QR code is empty";const c=await this._getElement(u),m=oe(u);if(!c)return null;if(u.toLowerCase()==="svg"){const f=`<?xml version="1.0" standalone="no"?>\r
22
- ${new this._window.XMLSerializer().serializeToString(c)}`;return typeof Blob>"u"||this._options.jsdom?Buffer.from(f):new Blob([f],{type:m})}return new Promise(f=>{const i=c;if("toBuffer"in i)if(m==="image/png")f(i.toBuffer(m));else if(m==="image/jpeg")f(i.toBuffer(m));else{if(m!=="application/pdf")throw Error("Unsupported extension");f(i.toBuffer(m))}else"toBlob"in i&&i.toBlob(f,m,1)})}async download(u){if(!this._qr)throw"QR code is empty";if(typeof Blob>"u")throw"Cannot download in Node.js, call getRawData instead.";let c="png",m="qr";typeof u=="string"?(c=u,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof u=="object"&&u!==null&&(u.name&&(m=u.name),u.extension&&(c=u.extension));const f=await this._getElement(c);if(f)if(c.toLowerCase()==="svg"){let i=new XMLSerializer().serializeToString(f);i=`<?xml version="1.0" standalone="no"?>\r
23
- `+i,g(`data:${oe(c)};charset=utf-8,${encodeURIComponent(i)}`,`${m}.svg`)}else g(f.toDataURL(oe(c)),`${m}.${c}`)}}const x=k})(),d.default})())})(en)),en.exports}hl();const No=Q.createContext(void 0);function fl(t){const e=Ve.c(9),{children:r,baseUrl:n,queryClient:s}=t;let d;e[0]!==n||e[1]!==s?(d={baseUrl:n,queryClient:s},e[0]=n,e[1]=s,e[2]=d):d=e[2];let h;e[3]!==r||e[4]!==s?(h=w.jsx(Hn,{client:s,children:r}),e[3]=r,e[4]=s,e[5]=h):h=e[5];let a;return e[6]!==d||e[7]!==h?(a=w.jsx(No.Provider,{value:d,children:h}),e[6]=d,e[7]=h,e[8]=a):a=e[8],a}function ct(){const t=Q.useContext(No);if(!t)throw new Error("useDataTable must be used within a DataTableProvider");return t}function tn(t){if(typeof t=="string")try{const e=JSON.parse(t);return{message:e.message||t,code:e.code,details:e.details}}catch{return{message:t}}return t instanceof Error?{message:t.message}:{message:"Unbekannter Fehler"}}async function Ct(t){const e=await t.text();if(!e)throw new Error(`HTTP ${t.status}: ${t.statusText}`);try{const r=JSON.parse(e);throw r.message?new Error(r.message):r.error?new Error(r.error):new Error(e)}catch{throw new Error(e)}}function pl(){const t=localStorage.getItem("a360.assumed-org");return t?{"X-Assume-Org":t}:{}}async function mt(){return{"Content-Type":"application/json",Authorization:`Bearer ${await tl()??""}`,...pl()}}async function Lo(t){return fetch(t,{method:"GET",headers:await mt()}).then(async e=>(e.status>=400&&await Ct(e),e)).then(e=>e.json()).then(e=>e)}async function Bo(t,e){return fetch(`${t}/${e}`,{method:"GET",headers:await mt()}).then(async r=>(r.status>=400&&await Ct(r),r)).then(r=>r.json()).then(r=>r)}async function Io(t,e){const r=await fetch(`${t}/${e}`,{method:"DELETE",headers:await mt()});r.status>=400&&await Ct(r)}async function Yo(t,e){return fetch(t,{method:"POST",headers:await mt(),body:JSON.stringify(e)}).then(async r=>(r.status>=400&&await Ct(r),r)).then(r=>r.status==204?e:r.json()).then(r=>r)}async function gl(t,e,r){return fetch(e,{method:t,headers:await mt(),body:r?JSON.stringify(r):void 0}).then(async n=>(n.status>=400&&await Ct(n),n)).then(n=>{if(n.status!=204)return n.json()}).then(n=>n)}async function zo(t,e){return fetch(`${t}/${e.id}`,{method:"PUT",headers:await mt(),body:JSON.stringify(e)}).then(async r=>(r.status>=400&&await Ct(r),r)).then(r=>r.status==204?e:r.json()).then(r=>r)}function Fo(t,e,r){const n=Ve.c(13),{baseUrl:s}=ct();let d;if(n[0]!==r||n[1]!==e){let y;n[3]!==r?(y=r?.toString(),n[3]=r,n[4]=y):y=n[4],d=[...e.map(ml),String(y)],n[0]=r,n[1]=e,n[2]=d}else d=n[2];let h;n[5]!==t||n[6]!==s||n[7]!==r?(h=()=>Bo(`${s}${t}`,r),n[5]=t,n[6]=s,n[7]=r,n[8]=h):h=n[8];const a=!!r;let g;return n[9]!==d||n[10]!==h||n[11]!==a?(g={queryKey:d,queryFn:h,enabled:a},n[9]=d,n[10]=h,n[11]=a,n[12]=g):g=n[12],Zn(g)}function ml(t){return t.toString()}function Wo(t,e,r){const n=Ve.c(9),s=r===void 0?!0:r,{baseUrl:d}=ct();let h;n[0]!==e?(h=[...e.map(yl)],n[0]=e,n[1]=h):h=n[1];let a;n[2]!==t||n[3]!==d?(a=()=>Lo(`${d}${t}`),n[2]=t,n[3]=d,n[4]=a):a=n[4];let g;return n[5]!==s||n[6]!==h||n[7]!==a?(g={queryKey:h,queryFn:a,enabled:s},n[5]=s,n[6]=h,n[7]=a,n[8]=g):g=n[8],Zn(g)}function yl(t){return t.toString()}function Uo(t,e){const r=Ve.c(10),{baseUrl:n,queryClient:s}=ct();let d;r[0]!==e?(d=[...e.map(bl)],r[0]=e,r[1]=d):d=r[1];let h;r[2]!==t||r[3]!==n?(h=g=>Yo(`${n}${t}`,g),r[2]=t,r[3]=n,r[4]=h):h=r[4];let a;return r[5]!==s||r[6]!==e||r[7]!==d||r[8]!==h?(a={mutationKey:d,mutationFn:h,onSettled(){return s.invalidateQueries({queryKey:[...e.map(vl)]})},onError(g){tn(g)}},r[5]=s,r[6]=e,r[7]=d,r[8]=h,r[9]=a):a=r[9],Rr(a)}function vl(t){return t.toString()}function bl(t){return t.toString()}function rn(t,e){const r=Ve.c(10),{baseUrl:n,queryClient:s}=ct();let d;r[0]!==e?(d=[...e.map(_l)],r[0]=e,r[1]=d):d=r[1];let h;r[2]!==t||r[3]!==n?(h=g=>zo(`${n}${t}`,g),r[2]=t,r[3]=n,r[4]=h):h=r[4];let a;return r[5]!==s||r[6]!==e||r[7]!==d||r[8]!==h?(a={mutationKey:d,mutationFn:h,onSettled(){return s.invalidateQueries({queryKey:[...e.map(wl)]})},onError(g){tn(g)}},r[5]=s,r[6]=e,r[7]=d,r[8]=h,r[9]=a):a=r[9],Rr(a)}function wl(t){return t.toString()}function _l(t){return t.toString()}function qo(t,e){const r=Ve.c(10),{baseUrl:n,queryClient:s}=ct();let d;r[0]!==e?(d=[...e.map(Cl)],r[0]=e,r[1]=d):d=r[1];let h;r[2]!==t||r[3]!==n?(h=g=>Io(`${n}${t}`,g),r[2]=t,r[3]=n,r[4]=h):h=r[4];let a;return r[5]!==s||r[6]!==e||r[7]!==d||r[8]!==h?(a={mutationKey:d,mutationFn:h,onSettled(){return s.invalidateQueries({queryKey:[...e.map(xl)]})},onError(g){tn(g)}},r[5]=s,r[6]=e,r[7]=d,r[8]=h,r[9]=a):a=r[9],Rr(a)}function xl(t){return t.toString()}function Cl(t){return t.toString()}var ir={exports:{}},Sl=ir.exports,Vo;function Dl(){return Vo||(Vo=1,(function(t,e){(function(r,n){t.exports=n()})(Sl,(function(){var r=1e3,n=6e4,s=36e5,d="millisecond",h="second",a="minute",g="hour",y="day",_="week",P="month",C="quarter",S="year",D="date",O="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,F=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var x=["th","st","nd","rd"],b=k%100;return"["+k+(x[(b-20)%10]||x[b]||x[0])+"]"}},V=function(k,x,b){var u=String(k);return!u||u.length>=x?k:""+Array(x+1-u.length).join(b)+k},q={s:V,z:function(k){var x=-k.utcOffset(),b=Math.abs(x),u=Math.floor(b/60),c=b%60;return(x<=0?"+":"-")+V(u,2,"0")+":"+V(c,2,"0")},m:function k(x,b){if(x.date()<b.date())return-k(b,x);var u=12*(b.year()-x.year())+(b.month()-x.month()),c=x.clone().add(u,P),m=b-c<0,f=x.clone().add(u+(m?-1:1),P);return+(-(u+(b-c)/(m?c-f:f-c))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:P,y:S,w:_,d:y,D,h:g,m:a,s:h,ms:d,Q:C}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},ee="en",re={};re[ee]=Y;var X="$isDayjsObject",Z=function(k){return k instanceof ae||!(!k||!k[X])},U=function k(x,b,u){var c;if(!x)return ee;if(typeof x=="string"){var m=x.toLowerCase();re[m]&&(c=m),b&&(re[m]=b,c=m);var f=x.split("-");if(!c&&f.length>1)return k(f[0])}else{var i=x.name;re[i]=x,c=i}return!u&&c&&(ee=c),c||!u&&ee},G=function(k,x){if(Z(k))return k.clone();var b=typeof x=="object"?x:{};return b.date=k,b.args=arguments,new ae(b)},W=q;W.l=U,W.i=Z,W.w=function(k,x){return G(k,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var ae=(function(){function k(b){this.$L=U(b.locale,null,!0),this.parse(b),this.$x=this.$x||b.x||{},this[X]=!0}var x=k.prototype;return x.parse=function(b){this.$d=(function(u){var c=u.date,m=u.utc;if(c===null)return new Date(NaN);if(W.u(c))return new Date;if(c instanceof Date)return new Date(c);if(typeof c=="string"&&!/Z$/i.test(c)){var f=c.match(N);if(f){var i=f[2]-1||0,v=(f[7]||"0").substring(0,3);return m?new Date(Date.UTC(f[1],i,f[3]||1,f[4]||0,f[5]||0,f[6]||0,v)):new Date(f[1],i,f[3]||1,f[4]||0,f[5]||0,f[6]||0,v)}}return new Date(c)})(b),this.init()},x.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},x.$utils=function(){return W},x.isValid=function(){return this.$d.toString()!==O},x.isSame=function(b,u){var c=G(b);return this.startOf(u)<=c&&c<=this.endOf(u)},x.isAfter=function(b,u){return G(b)<this.startOf(u)},x.isBefore=function(b,u){return this.endOf(u)<G(b)},x.$g=function(b,u,c){return W.u(b)?this[u]:this.set(c,b)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(b,u){var c=this,m=!!W.u(u)||u,f=W.p(b),i=function(ie,se){var le=W.w(c.$u?Date.UTC(c.$y,se,ie):new Date(c.$y,se,ie),c);return m?le:le.endOf(y)},v=function(ie,se){return W.w(c.toDate()[ie].apply(c.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(se)),c)},T=this.$W,j=this.$M,K=this.$D,J="set"+(this.$u?"UTC":"");switch(f){case S:return m?i(1,0):i(31,11);case P:return m?i(1,j):i(0,j+1);case _:var te=this.$locale().weekStart||0,H=(T<te?T+7:T)-te;return i(m?K-H:K+(6-H),j);case y:case D:return v(J+"Hours",0);case g:return v(J+"Minutes",1);case a:return v(J+"Seconds",2);case h:return v(J+"Milliseconds",3);default:return this.clone()}},x.endOf=function(b){return this.startOf(b,!1)},x.$set=function(b,u){var c,m=W.p(b),f="set"+(this.$u?"UTC":""),i=(c={},c[y]=f+"Date",c[D]=f+"Date",c[P]=f+"Month",c[S]=f+"FullYear",c[g]=f+"Hours",c[a]=f+"Minutes",c[h]=f+"Seconds",c[d]=f+"Milliseconds",c)[m],v=m===y?this.$D+(u-this.$W):u;if(m===P||m===S){var T=this.clone().set(D,1);T.$d[i](v),T.init(),this.$d=T.set(D,Math.min(this.$D,T.daysInMonth())).$d}else i&&this.$d[i](v);return this.init(),this},x.set=function(b,u){return this.clone().$set(b,u)},x.get=function(b){return this[W.p(b)]()},x.add=function(b,u){var c,m=this;b=Number(b);var f=W.p(u),i=function(j){var K=G(m);return W.w(K.date(K.date()+Math.round(j*b)),m)};if(f===P)return this.set(P,this.$M+b);if(f===S)return this.set(S,this.$y+b);if(f===y)return i(1);if(f===_)return i(7);var v=(c={},c[a]=n,c[g]=s,c[h]=r,c)[f]||1,T=this.$d.getTime()+b*v;return W.w(T,this)},x.subtract=function(b,u){return this.add(-1*b,u)},x.format=function(b){var u=this,c=this.$locale();if(!this.isValid())return c.invalidDate||O;var m=b||"YYYY-MM-DDTHH:mm:ssZ",f=W.z(this),i=this.$H,v=this.$m,T=this.$M,j=c.weekdays,K=c.months,J=c.meridiem,te=function(se,le,E,L){return se&&(se[le]||se(u,m))||E[le].slice(0,L)},H=function(se){return W.s(i%12||12,se,"0")},ie=J||function(se,le,E){var L=se<12?"AM":"PM";return E?L.toLowerCase():L};return m.replace(F,(function(se,le){return le||(function(E){switch(E){case"YY":return String(u.$y).slice(-2);case"YYYY":return W.s(u.$y,4,"0");case"M":return T+1;case"MM":return W.s(T+1,2,"0");case"MMM":return te(c.monthsShort,T,K,3);case"MMMM":return te(K,T);case"D":return u.$D;case"DD":return W.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return te(c.weekdaysMin,u.$W,j,2);case"ddd":return te(c.weekdaysShort,u.$W,j,3);case"dddd":return j[u.$W];case"H":return String(i);case"HH":return W.s(i,2,"0");case"h":return H(1);case"hh":return H(2);case"a":return ie(i,v,!0);case"A":return ie(i,v,!1);case"m":return String(v);case"mm":return W.s(v,2,"0");case"s":return String(u.$s);case"ss":return W.s(u.$s,2,"0");case"SSS":return W.s(u.$ms,3,"0");case"Z":return f}return null})(se)||f.replace(":","")}))},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(b,u,c){var m,f=this,i=W.p(u),v=G(b),T=(v.utcOffset()-this.utcOffset())*n,j=this-v,K=function(){return W.m(f,v)};switch(i){case S:m=K()/12;break;case P:m=K();break;case C:m=K()/3;break;case _:m=(j-T)/6048e5;break;case y:m=(j-T)/864e5;break;case g:m=j/s;break;case a:m=j/n;break;case h:m=j/r;break;default:m=j}return c?m:W.a(m)},x.daysInMonth=function(){return this.endOf(P).$D},x.$locale=function(){return re[this.$L]},x.locale=function(b,u){if(!b)return this.$L;var c=this.clone(),m=U(b,u,!0);return m&&(c.$L=m),c},x.clone=function(){return W.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},k})(),oe=ae.prototype;return G.prototype=oe,[["$ms",d],["$s",h],["$m",a],["$H",g],["$W",y],["$M",P],["$y",S],["$D",D]].forEach((function(k){oe[k[1]]=function(x){return this.$g(x,k[0],k[1])}})),G.extend=function(k,x){return k.$i||(k(x,ae,G),k.$i=!0),G},G.locale=U,G.isDayjs=Z,G.unix=function(k){return G(1e3*k)},G.en=re[ee],G.Ls=re,G.p={},G}))})(ir)),ir.exports}var kl=Dl();const de=On(kl);function Pl({direction:t,levelIndex:e,rowIndex:r,cellIndex:n,size:s}){switch(t){case"up":return e===0&&r===0?null:r===0?{levelIndex:e-1,rowIndex:n<=s[e-1][s[e-1].length-1]-1?s[e-1].length-1:s[e-1].length-2,cellIndex:n}:{levelIndex:e,rowIndex:r-1,cellIndex:n};case"down":return r===s[e].length-1?{levelIndex:e+1,rowIndex:0,cellIndex:n}:r===s[e].length-2&&n>=s[e][s[e].length-1]?{levelIndex:e+1,rowIndex:0,cellIndex:n}:{levelIndex:e,rowIndex:r+1,cellIndex:n};case"left":return e===0&&r===0&&n===0?null:r===0&&n===0?{levelIndex:e-1,rowIndex:s[e-1].length-1,cellIndex:s[e-1][s[e-1].length-1]-1}:n===0?{levelIndex:e,rowIndex:r-1,cellIndex:s[e][r-1]-1}:{levelIndex:e,rowIndex:r,cellIndex:n-1};case"right":return r===s[e].length-1&&n===s[e][r]-1?{levelIndex:e+1,rowIndex:0,cellIndex:0}:n===s[e][r]-1?{levelIndex:e,rowIndex:r+1,cellIndex:0}:{levelIndex:e,rowIndex:r,cellIndex:n+1};default:return{levelIndex:e,rowIndex:r,cellIndex:n}}}function Ho({controlsRef:t,direction:e,levelIndex:r,rowIndex:n,cellIndex:s,size:d}){const h=Pl({direction:e,size:d,rowIndex:n,cellIndex:s,levelIndex:r});if(!h)return;const a=t.current?.[h.levelIndex]?.[h.rowIndex]?.[h.cellIndex];a&&(a.disabled||a.getAttribute("data-hidden")||a.getAttribute("data-outside")?Ho({controlsRef:t,direction:e,levelIndex:h.levelIndex,cellIndex:h.cellIndex,rowIndex:h.rowIndex,size:d}):a.focus())}function Ml(t){switch(t){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Ol(t){return t.current?.map(e=>e.map(r=>r.length))}function nn({controlsRef:t,levelIndex:e,rowIndex:r,cellIndex:n,event:s}){const d=Ml(s.key);if(d){s.preventDefault();const h=Ol(t);Ho({controlsRef:t,direction:d,levelIndex:e,rowIndex:r,cellIndex:n,size:h})}}function We(t){return t==null||t===""?t:de(t).format("YYYY-MM-DD")}function Go(t){return t==null||t===""?t:de(t).format("YYYY-MM-DD HH:mm:ss")}const El={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},Al=Q.createContext(El);function dt(){const t=Q.useContext(Al),e=Q.useCallback(d=>d||t.locale,[t.locale]),r=Q.useCallback(d=>typeof d=="number"?d:t.firstDayOfWeek,[t.firstDayOfWeek]),n=Q.useCallback(d=>Array.isArray(d)?d:t.weekendDays,[t.weekendDays]),s=Q.useCallback(d=>typeof d=="string"?d:t.labelSeparator,[t.labelSeparator]);return{...t,getLocale:e,getFirstDayOfWeek:r,getWeekendDays:n,getLabelSeparator:s}}function Tl({value:t,type:e,withTime:r}){const n=r?Go:We;if(e==="range"&&Array.isArray(t)){const s=n(t[0]),d=n(t[1]);return s?d?`${s} – ${d}`:`${s} –`:""}return e==="multiple"&&Array.isArray(t)?t.filter(Boolean).join(", "):!Array.isArray(t)&&t?n(t):""}function Qo({value:t,type:e,name:r,form:n,withTime:s=!1}){return w.jsx("input",{type:"hidden",value:Tl({value:t,type:e,withTime:s}),name:r,form:n})}Qo.displayName="@mantine/dates/HiddenDatesInput";function Zo(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=Zo(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Pe(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Zo(t))&&(n&&(n+=" "),n+=e);return n}var Ko={day:"m_396ce5cb"};const jl=A.createVarsResolver((t,{size:e})=>({day:{"--day-size":A.getSize(e,"day-size")}})),on=A.factory((t,e)=>{const r=A.useProps("Day",null,t),{classNames:n,className:s,style:d,styles:h,unstyled:a,vars:g,date:y,disabled:_,__staticSelector:P,weekend:C,outside:S,selected:D,renderDay:O,inRange:N,firstInRange:F,lastInRange:Y,hidden:V,static:q,highlightToday:ee,attributes:re,...X}=r,Z=A.useStyles({name:P||"Day",classes:Ko,props:r,className:s,style:d,classNames:n,styles:h,unstyled:a,attributes:re,vars:g,varsResolver:jl,rootSelector:"day"});return w.jsx(A.UnstyledButton,{...Z("day",{style:V?{display:"none"}:void 0}),component:q?"div":"button",ref:e,disabled:_,"data-today":de(y).isSame(new Date,"day")||void 0,"data-hidden":V||void 0,"data-highlight-today":ee||void 0,"data-disabled":_||void 0,"data-weekend":!_&&!S&&C||void 0,"data-outside":!_&&S||void 0,"data-selected":!_&&D||void 0,"data-in-range":N&&!_||void 0,"data-first-in-range":F&&!_||void 0,"data-last-in-range":Y&&!_||void 0,"data-static":q||void 0,unstyled:a,...X,children:O?.(y)||de(y).date()})});on.classes=Ko,on.displayName="@mantine/dates/Day";function $l({locale:t,format:e="dd",firstDayOfWeek:r=1}){const n=de().day(r),s=[];for(let d=0;d<7;d+=1)typeof e=="string"?s.push(de(n).add(d,"days").locale(t).format(e)):s.push(e(de(n).add(d,"days").format("YYYY-MM-DD")));return s}var Jo={weekday:"m_18a3eca"};const Rl=A.createVarsResolver((t,{size:e})=>({weekdaysRow:{"--wr-fz":A.getFontSize(e),"--wr-spacing":A.getSpacing(e)}})),sn=A.factory((t,e)=>{const r=A.useProps("WeekdaysRow",null,t),{classNames:n,className:s,style:d,styles:h,unstyled:a,vars:g,locale:y,firstDayOfWeek:_,weekdayFormat:P,cellComponent:C="th",__staticSelector:S,withWeekNumbers:D,attributes:O,...N}=r,F=A.useStyles({name:S||"WeekdaysRow",classes:Jo,props:r,className:s,style:d,classNames:n,styles:h,unstyled:a,attributes:O,vars:g,varsResolver:Rl,rootSelector:"weekdaysRow"}),Y=dt(),V=$l({locale:Y.getLocale(y),format:P,firstDayOfWeek:Y.getFirstDayOfWeek(_)}).map((q,ee)=>w.jsx(C,{...F("weekday"),children:q},ee));return w.jsxs(A.Box,{component:"tr",ref:e,...F("weekdaysRow"),...N,children:[D&&w.jsx(C,{...F("weekday"),children:"#"}),V]})});sn.classes=Jo,sn.displayName="@mantine/dates/WeekdaysRow";function Nl(t,e=1){let r=de(t);if(!r.isValid())return r;const n=e===0?6:e-1;for(;r.day()!==n;)r=r.add(1,"day");return r.format("YYYY-MM-DD")}function Ll(t,e=1){let r=de(t);for(;r.day()!==e;)r=r.subtract(1,"day");return r.format("YYYY-MM-DD")}function Bl({month:t,firstDayOfWeek:e=1,consistentWeeks:r}){const n=de(t).subtract(de(t).date()-1,"day"),s=de(n.format("YYYY-M-D")),d=s.format("YYYY-MM-DD"),h=s.add(+s.daysInMonth()-1,"day").format("YYYY-MM-DD"),a=Nl(h,e),g=[];let y=de(Ll(d,e));for(;de(y).isBefore(a,"day");){const _=[];for(let P=0;P<7;P+=1)_.push(y.format("YYYY-MM-DD")),y=y.add(1,"day");g.push(_)}if(r&&g.length<6){const _=g[g.length-1],P=_[_.length-1];let C=de(P).add(1,"day");for(;g.length<6;){const S=[];for(let D=0;D<7;D+=1)S.push(C.format("YYYY-MM-DD")),C=C.add(1,"day");g.push(S)}}return g}function an(t,e){return de(t).format("YYYY-MM")===de(e).format("YYYY-MM")}function Xo(t,e){return e?de(t).isAfter(de(e).subtract(1,"day"),"day"):!0}function es(t,e){return e?de(t).isBefore(de(e).add(1,"day"),"day"):!0}function Il({dates:t,minDate:e,maxDate:r,getDayProps:n,excludeDate:s,hideOutsideDates:d,month:h}){const a=t.flat().filter(_=>es(_,r)&&Xo(_,e)&&!s?.(_)&&!n?.(_)?.disabled&&(!d||an(_,h))),g=a.find(_=>n?.(_)?.selected);if(g)return g;const y=a.find(_=>de().isSame(_,"date"));return y||a[0]}var ar={exports:{}},Yl=ar.exports,ts;function zl(){return ts||(ts=1,(function(t,e){(function(r,n){t.exports=n()})(Yl,(function(){var r="day";return function(n,s,d){var h=function(y){return y.add(4-y.isoWeekday(),r)},a=s.prototype;a.isoWeekYear=function(){return h(this).year()},a.isoWeek=function(y){if(!this.$utils().u(y))return this.add(7*(y-this.isoWeek()),r);var _,P,C,S,D=h(this),O=(_=this.isoWeekYear(),P=this.$u,C=(P?d.utc:d)().year(_).startOf("year"),S=4-C.isoWeekday(),C.isoWeekday()>4&&(S+=7),C.add(S,r));return D.diff(O,"week")+1},a.isoWeekday=function(y){return this.$utils().u(y)?this.day()||7:this.day(this.day()%7?y:y-7)};var g=a.startOf;a.startOf=function(y,_){var P=this.$utils(),C=!!P.u(_)||_;return P.p(y)==="isoweek"?C?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):g.bind(this)(y,_)}}}))})(ar)),ar.exports}var Fl=zl();const Wl=On(Fl);de.extend(Wl);function Ul(t){const e=t.find(r=>de(r).day()===1);return de(e).isoWeek()}var rs={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const ql={withCellSpacing:!0},Vl=A.createVarsResolver((t,{size:e})=>({weekNumber:{"--wn-fz":A.getFontSize(e),"--wn-size":A.getSize(e,"wn-size")}})),lr=A.factory((t,e)=>{const r=A.useProps("Month",ql,t),{classNames:n,className:s,style:d,styles:h,unstyled:a,vars:g,__staticSelector:y,locale:_,firstDayOfWeek:P,weekdayFormat:C,month:S,weekendDays:D,getDayProps:O,excludeDate:N,minDate:F,maxDate:Y,renderDay:V,hideOutsideDates:q,hideWeekdays:ee,getDayAriaLabel:re,static:X,__getDayRef:Z,__onDayKeyDown:U,__onDayClick:G,__onDayMouseEnter:W,__preventFocus:ae,__stopPropagation:oe,withCellSpacing:k,size:x,highlightToday:b,withWeekNumbers:u,attributes:c,...m}=r,f=A.useStyles({name:y||"Month",classes:rs,props:r,className:s,style:d,classNames:n,styles:h,unstyled:a,attributes:c,vars:g,varsResolver:Vl,rootSelector:"month"}),i=dt(),v=Bl({month:S,firstDayOfWeek:i.getFirstDayOfWeek(P),consistentWeeks:i.consistentWeeks}),T=Il({dates:v,minDate:We(F),maxDate:We(Y),getDayProps:O,excludeDate:N,hideOutsideDates:q,month:S}),{resolvedClassNames:j,resolvedStyles:K}=A.useResolvedStylesApi({classNames:n,styles:h,props:r}),J=v.map((te,H)=>{const ie=te.map((se,le)=>{const E=!an(se,S),L=re?.(se)||de(se).locale(_||i.locale).format("D MMMM YYYY"),$=O?.(se),B=de(se).isSame(T,"date");return w.jsx("td",{...f("monthCell"),"data-with-spacing":k||void 0,children:w.jsx(on,{__staticSelector:y||"Month",classNames:j,styles:K,unstyled:a,"data-mantine-stop-propagation":oe||void 0,highlightToday:b,renderDay:V,date:se,size:x,weekend:i.getWeekendDays(D).includes(de(se).get("day")),outside:E,hidden:q?E:!1,"aria-label":L,static:X,disabled:N?.(se)||!es(se,We(Y))||!Xo(se,We(F)),ref:I=>{I&&Z?.(H,le,I)},...$,onKeyDown:I=>{$?.onKeyDown?.(I),U?.(I,{rowIndex:H,cellIndex:le,date:se})},onMouseEnter:I=>{$?.onMouseEnter?.(I),W?.(I,se)},onClick:I=>{$?.onClick?.(I),G?.(I,se)},onMouseDown:I=>{$?.onMouseDown?.(I),ae&&I.preventDefault()},tabIndex:ae||!B?-1:0})},se.toString())});return w.jsxs("tr",{...f("monthRow"),children:[u&&w.jsx("td",{...f("weekNumber"),children:Ul(te)}),ie]},H)});return w.jsxs(A.Box,{component:"table",...f("month"),size:x,ref:e,...m,children:[!ee&&w.jsx("thead",{...f("monthThead"),children:w.jsx(sn,{__staticSelector:y||"Month",locale:_,firstDayOfWeek:P,weekdayFormat:C,size:x,classNames:j,styles:K,unstyled:a,withWeekNumbers:u})}),w.jsx("tbody",{...f("monthTbody"),children:J})]})});lr.classes=rs,lr.displayName="@mantine/dates/Month";var ns={pickerControl:"m_dc6a3c71"};const Hl=A.createVarsResolver((t,{size:e})=>({pickerControl:{"--dpc-fz":A.getFontSize(e),"--dpc-size":A.getSize(e,"dpc-size")}})),ur=A.factory((t,e)=>{const r=A.useProps("PickerControl",null,t),{classNames:n,className:s,style:d,styles:h,unstyled:a,vars:g,firstInRange:y,lastInRange:_,inRange:P,__staticSelector:C,selected:S,disabled:D,attributes:O,...N}=r,F=A.useStyles({name:C||"PickerControl",classes:ns,props:r,className:s,style:d,classNames:n,styles:h,unstyled:a,attributes:O,vars:g,varsResolver:Hl,rootSelector:"pickerControl"});return w.jsx(A.UnstyledButton,{...F("pickerControl"),ref:e,unstyled:a,"data-picker-control":!0,"data-selected":S&&!D||void 0,"data-disabled":D||void 0,"data-in-range":P&&!D&&!S||void 0,"data-first-in-range":y&&!D||void 0,"data-last-in-range":_&&!D||void 0,disabled:D,...N})});ur.classes=ns,ur.displayName="@mantine/dates/PickerControl";function os({year:t,minDate:e,maxDate:r}){return!e&&!r?!1:!!(e&&de(t).isBefore(e,"year")||r&&de(t).isAfter(r,"year"))}function Gl({years:t,minDate:e,maxDate:r,getYearControlProps:n}){const s=t.flat().filter(a=>!os({year:a,minDate:e,maxDate:r})&&!n?.(a)?.disabled),d=s.find(a=>n?.(a)?.selected);if(d)return d;const h=s.find(a=>de().isSame(a,"year"));return h||s[0]}function ss(t){const e=de(t).year(),r=e-e%10;let n=0;const s=[[],[],[],[]];for(let d=0;d<4;d+=1){const h=d===3?1:3;for(let a=0;a<h;a+=1)s[d].push(de(new Date(r+n,0)).format("YYYY-MM-DD")),n+=1}return s}var is={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const Ql={yearsListFormat:"YYYY",withCellSpacing:!0},cr=A.factory((t,e)=>{const r=A.useProps("YearsList",Ql,t),{classNames:n,className:s,style:d,styles:h,unstyled:a,vars:g,decade:y,yearsListFormat:_,locale:P,minDate:C,maxDate:S,getYearControlProps:D,__staticSelector:O,__getControlRef:N,__onControlKeyDown:F,__onControlClick:Y,__onControlMouseEnter:V,__preventFocus:q,__stopPropagation:ee,withCellSpacing:re,size:X,attributes:Z,...U}=r,G=A.useStyles({name:O||"YearsList",classes:is,props:r,className:s,style:d,classNames:n,styles:h,unstyled:a,attributes:Z,vars:g,rootSelector:"yearsList"}),W=dt(),ae=ss(y),oe=Gl({years:ae,minDate:C,maxDate:S,getYearControlProps:D}),k=ae.map((x,b)=>{const u=x.map((c,m)=>{const f=D?.(c),i=de(c).isSame(oe,"year");return w.jsx("td",{...G("yearsListCell"),"data-with-spacing":re||void 0,children:w.jsx(ur,{...G("yearsListControl"),size:X,unstyled:a,"data-mantine-stop-propagation":ee||void 0,disabled:os({year:c,minDate:C,maxDate:S}),ref:v=>{v&&N?.(b,m,v)},...f,onKeyDown:v=>{f?.onKeyDown?.(v),F?.(v,{rowIndex:b,cellIndex:m,date:c})},onClick:v=>{f?.onClick?.(v),Y?.(v,c)},onMouseEnter:v=>{f?.onMouseEnter?.(v),V?.(v,c)},onMouseDown:v=>{f?.onMouseDown?.(v),q&&v.preventDefault()},tabIndex:q||!i?-1:0,children:de(c).locale(W.getLocale(P)).format(_)})},m)});return w.jsx("tr",{...G("yearsListRow"),children:u},b)});return w.jsx(A.Box,{component:"table",ref:e,size:X,...G("yearsList"),...U,children:w.jsx("tbody",{children:k})})});cr.classes=is,cr.displayName="@mantine/dates/YearsList";function as({month:t,minDate:e,maxDate:r}){return!e&&!r?!1:!!(e&&de(t).isBefore(e,"month")||r&&de(t).isAfter(r,"month"))}function Zl({months:t,minDate:e,maxDate:r,getMonthControlProps:n}){const s=t.flat().filter(a=>!as({month:a,minDate:e,maxDate:r})&&!n?.(a)?.disabled),d=s.find(a=>n?.(a)?.selected);if(d)return d;const h=s.find(a=>de().isSame(a,"month"));return h||s[0]}function Kl(t){const e=de(t).startOf("year").toDate(),r=[[],[],[],[]];let n=0;for(let s=0;s<4;s+=1)for(let d=0;d<3;d+=1)r[s].push(de(e).add(n,"months").format("YYYY-MM-DD")),n+=1;return r}var ls={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const Jl={monthsListFormat:"MMM",withCellSpacing:!0},dr=A.factory((t,e)=>{const r=A.useProps("MonthsList",Jl,t),{classNames:n,className:s,style:d,styles:h,unstyled:a,vars:g,__staticSelector:y,year:_,monthsListFormat:P,locale:C,minDate:S,maxDate:D,getMonthControlProps:O,__getControlRef:N,__onControlKeyDown:F,__onControlClick:Y,__onControlMouseEnter:V,__preventFocus:q,__stopPropagation:ee,withCellSpacing:re,size:X,attributes:Z,...U}=r,G=A.useStyles({name:y||"MonthsList",classes:ls,props:r,className:s,style:d,classNames:n,styles:h,unstyled:a,attributes:Z,vars:g,rootSelector:"monthsList"}),W=dt(),ae=Kl(_),oe=Zl({months:ae,minDate:We(S),maxDate:We(D),getMonthControlProps:O}),k=ae.map((x,b)=>{const u=x.map((c,m)=>{const f=O?.(c),i=de(c).isSame(oe,"month");return w.jsx("td",{...G("monthsListCell"),"data-with-spacing":re||void 0,children:w.jsx(ur,{...G("monthsListControl"),size:X,unstyled:a,__staticSelector:y||"MonthsList","data-mantine-stop-propagation":ee||void 0,disabled:as({month:c,minDate:We(S),maxDate:We(D)}),ref:v=>{v&&N?.(b,m,v)},...f,onKeyDown:v=>{f?.onKeyDown?.(v),F?.(v,{rowIndex:b,cellIndex:m,date:c})},onClick:v=>{f?.onClick?.(v),Y?.(v,c)},onMouseEnter:v=>{f?.onMouseEnter?.(v),V?.(v,c)},onMouseDown:v=>{f?.onMouseDown?.(v),q&&v.preventDefault()},tabIndex:q||!i?-1:0,children:de(c).locale(W.getLocale(C)).format(P)})},m)});return w.jsx("tr",{...G("monthsListRow"),children:u},b)});return w.jsx(A.Box,{component:"table",ref:e,size:X,...G("monthsList"),...U,children:w.jsx("tbody",{children:k})})});dr.classes=ls,dr.displayName="@mantine/dates/MonthsList";var us={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const Xl={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},eu=A.createVarsResolver((t,{size:e})=>({calendarHeader:{"--dch-control-size":A.getSize(e,"dch-control-size"),"--dch-fz":A.getFontSize(e)}})),ht=A.factory((t,e)=>{const r=A.useProps("CalendarHeader",Xl,t),{classNames:n,className:s,style:d,styles:h,unstyled:a,vars:g,nextIcon:y,previousIcon:_,nextLabel:P,previousLabel:C,onNext:S,onPrevious:D,onLevelClick:O,label:N,nextDisabled:F,previousDisabled:Y,hasNextLevel:V,levelControlAriaLabel:q,withNext:ee,withPrevious:re,headerControlsOrder:X,__staticSelector:Z,__preventFocus:U,__stopPropagation:G,attributes:W,...ae}=r,oe=A.useStyles({name:Z||"CalendarHeader",classes:us,props:r,className:s,style:d,classNames:n,styles:h,unstyled:a,attributes:W,vars:g,varsResolver:eu,rootSelector:"calendarHeader"}),k=U?m=>m.preventDefault():void 0,x=re&&Q.createElement(A.UnstyledButton,{...oe("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":C,onClick:D,unstyled:a,onMouseDown:k,disabled:Y,"data-disabled":Y||void 0,tabIndex:U||Y?-1:0,"data-mantine-stop-propagation":G||void 0},_||w.jsx(A.AccordionChevron,{...oe("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),b=Q.createElement(A.UnstyledButton,{component:V?"button":"div",...oe("calendarHeaderLevel"),key:"level",onClick:V?O:void 0,unstyled:a,onMouseDown:V?k:void 0,disabled:!V,"data-static":!V||void 0,"aria-label":q,tabIndex:U||!V?-1:0,"data-mantine-stop-propagation":G||void 0},N),u=ee&&Q.createElement(A.UnstyledButton,{...oe("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":P,onClick:S,unstyled:a,onMouseDown:k,disabled:F,"data-disabled":F||void 0,tabIndex:U||F?-1:0,"data-mantine-stop-propagation":G||void 0},y||w.jsx(A.AccordionChevron,{...oe("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),c=X.map(m=>m==="previous"?x:m==="level"?b:m==="next"?u:null);return w.jsx(A.Box,{...oe("calendarHeader"),ref:e,...ae,children:c})});ht.classes=us,ht.displayName="@mantine/dates/CalendarHeader";function tu(t){const e=ss(t);return[e[0][0],e[3][0]]}const ru={decadeLabelFormat:"YYYY"},hr=A.factory((t,e)=>{const r=A.useProps("DecadeLevel",ru,t),{decade:n,locale:s,minDate:d,maxDate:h,yearsListFormat:a,getYearControlProps:g,__getControlRef:y,__onControlKeyDown:_,__onControlClick:P,__onControlMouseEnter:C,withCellSpacing:S,__preventFocus:D,nextIcon:O,previousIcon:N,nextLabel:F,previousLabel:Y,onNext:V,onPrevious:q,nextDisabled:ee,previousDisabled:re,levelControlAriaLabel:X,withNext:Z,withPrevious:U,headerControlsOrder:G,decadeLabelFormat:W,classNames:ae,styles:oe,unstyled:k,__staticSelector:x,__stopPropagation:b,size:u,attributes:c,...m}=r,f=dt(),[i,v]=tu(n),T={__staticSelector:x||"DecadeLevel",classNames:ae,styles:oe,unstyled:k,size:u,attributes:c},j=typeof ee=="boolean"?ee:h?!de(v).endOf("year").isBefore(h):!1,K=typeof re=="boolean"?re:d?!de(i).startOf("year").isAfter(d):!1,J=(te,H)=>de(te).locale(s||f.locale).format(H);return w.jsxs(A.Box,{"data-decade-level":!0,size:u,ref:e,...m,children:[w.jsx(ht,{label:typeof W=="function"?W(i,v):`${J(i,W)} – ${J(v,W)}`,__preventFocus:D,__stopPropagation:b,nextIcon:O,previousIcon:N,nextLabel:F,previousLabel:Y,onNext:V,onPrevious:q,nextDisabled:j,previousDisabled:K,hasNextLevel:!1,levelControlAriaLabel:X,withNext:Z,withPrevious:U,headerControlsOrder:G,...T}),w.jsx(cr,{decade:n,locale:s,minDate:d,maxDate:h,yearsListFormat:a,getYearControlProps:g,__getControlRef:y,__onControlKeyDown:_,__onControlClick:P,__onControlMouseEnter:C,__preventFocus:D,__stopPropagation:b,withCellSpacing:S,...T})]})});hr.classes={...cr.classes,...ht.classes},hr.displayName="@mantine/dates/DecadeLevel";const nu={yearLabelFormat:"YYYY"},fr=A.factory((t,e)=>{const r=A.useProps("YearLevel",nu,t),{year:n,locale:s,minDate:d,maxDate:h,monthsListFormat:a,getMonthControlProps:g,__getControlRef:y,__onControlKeyDown:_,__onControlClick:P,__onControlMouseEnter:C,withCellSpacing:S,__preventFocus:D,nextIcon:O,previousIcon:N,nextLabel:F,previousLabel:Y,onNext:V,onPrevious:q,onLevelClick:ee,nextDisabled:re,previousDisabled:X,hasNextLevel:Z,levelControlAriaLabel:U,withNext:G,withPrevious:W,headerControlsOrder:ae,yearLabelFormat:oe,__staticSelector:k,__stopPropagation:x,size:b,classNames:u,styles:c,unstyled:m,attributes:f,...i}=r,v=dt(),T={__staticSelector:k||"YearLevel",classNames:u,styles:c,unstyled:m,size:b,attributes:f},j=typeof re=="boolean"?re:h?!de(n).endOf("year").isBefore(h):!1,K=typeof X=="boolean"?X:d?!de(n).startOf("year").isAfter(d):!1;return w.jsxs(A.Box,{"data-year-level":!0,size:b,ref:e,...i,children:[w.jsx(ht,{label:typeof oe=="function"?oe(n):de(n).locale(s||v.locale).format(oe),__preventFocus:D,__stopPropagation:x,nextIcon:O,previousIcon:N,nextLabel:F,previousLabel:Y,onNext:V,onPrevious:q,onLevelClick:ee,nextDisabled:j,previousDisabled:K,hasNextLevel:Z,levelControlAriaLabel:U,withNext:G,withPrevious:W,headerControlsOrder:ae,...T}),w.jsx(dr,{year:n,locale:s,minDate:d,maxDate:h,monthsListFormat:a,getMonthControlProps:g,__getControlRef:y,__onControlKeyDown:_,__onControlClick:P,__onControlMouseEnter:C,__preventFocus:D,__stopPropagation:x,withCellSpacing:S,...T})]})});fr.classes={...ht.classes,...dr.classes},fr.displayName="@mantine/dates/YearLevel";const ou={monthLabelFormat:"MMMM YYYY"},pr=A.factory((t,e)=>{const r=A.useProps("MonthLevel",ou,t),{month:n,locale:s,firstDayOfWeek:d,weekdayFormat:h,weekendDays:a,getDayProps:g,excludeDate:y,minDate:_,maxDate:P,renderDay:C,hideOutsideDates:S,hideWeekdays:D,getDayAriaLabel:O,__getDayRef:N,__onDayKeyDown:F,__onDayClick:Y,__onDayMouseEnter:V,withCellSpacing:q,highlightToday:ee,withWeekNumbers:re,__preventFocus:X,__stopPropagation:Z,nextIcon:U,previousIcon:G,nextLabel:W,previousLabel:ae,onNext:oe,onPrevious:k,onLevelClick:x,nextDisabled:b,previousDisabled:u,hasNextLevel:c,levelControlAriaLabel:m,withNext:f,withPrevious:i,headerControlsOrder:v,monthLabelFormat:T,classNames:j,styles:K,unstyled:J,__staticSelector:te,size:H,static:ie,attributes:se,...le}=r,E=dt(),L={__staticSelector:te||"MonthLevel",classNames:j,styles:K,unstyled:J,size:H,attributes:se},$=typeof b=="boolean"?b:P?!de(n).endOf("month").isBefore(P):!1,B=typeof u=="boolean"?u:_?!de(n).startOf("month").isAfter(_):!1;return w.jsxs(A.Box,{"data-month-level":!0,size:H,ref:e,...le,children:[w.jsx(ht,{label:typeof T=="function"?T(n):de(n).locale(s||E.locale).format(T),__preventFocus:X,__stopPropagation:Z,nextIcon:U,previousIcon:G,nextLabel:W,previousLabel:ae,onNext:oe,onPrevious:k,onLevelClick:x,nextDisabled:$,previousDisabled:B,hasNextLevel:c,levelControlAriaLabel:m,withNext:f,withPrevious:i,headerControlsOrder:v,...L}),w.jsx(lr,{month:n,locale:s,firstDayOfWeek:d,weekdayFormat:h,weekendDays:a,getDayProps:g,excludeDate:y,minDate:_,maxDate:P,renderDay:C,hideOutsideDates:S,hideWeekdays:D,getDayAriaLabel:O,__getDayRef:N,__onDayKeyDown:F,__onDayClick:Y,__onDayMouseEnter:V,__preventFocus:X,__stopPropagation:Z,static:ie,withCellSpacing:q,highlightToday:ee,withWeekNumbers:re,...L})]})});pr.classes={...lr.classes,...ht.classes},pr.displayName="@mantine/dates/MonthLevel";var cs={levelsGroup:"m_30b26e33"};const ft=A.factory((t,e)=>{const r=A.useProps("LevelsGroup",null,t),{classNames:n,className:s,style:d,styles:h,unstyled:a,vars:g,__staticSelector:y,attributes:_,...P}=r,C=A.useStyles({name:y||"LevelsGroup",classes:cs,props:r,className:s,style:d,classNames:n,styles:h,unstyled:a,attributes:_,vars:g,rootSelector:"levelsGroup"});return w.jsx(A.Box,{ref:e,...C("levelsGroup"),...P})});ft.classes=cs,ft.displayName="@mantine/dates/LevelsGroup";const su={numberOfColumns:1},gr=A.factory((t,e)=>{const r=A.useProps("DecadeLevelGroup",su,t),{decade:n,locale:s,minDate:d,maxDate:h,yearsListFormat:a,getYearControlProps:g,__onControlClick:y,__onControlMouseEnter:_,withCellSpacing:P,__preventFocus:C,nextIcon:S,previousIcon:D,nextLabel:O,previousLabel:N,onNext:F,onPrevious:Y,nextDisabled:V,previousDisabled:q,headerControlsOrder:ee,classNames:re,styles:X,unstyled:Z,__staticSelector:U,__stopPropagation:G,numberOfColumns:W,levelControlAriaLabel:ae,decadeLabelFormat:oe,size:k,vars:x,attributes:b,...u}=r,c=Q.useRef([]),m=Array(W).fill(0).map((f,i)=>{const v=de(n).add(i*10,"years").format("YYYY-MM-DD");return w.jsx(hr,{size:k,yearsListFormat:a,decade:v,withNext:i===W-1,withPrevious:i===0,decadeLabelFormat:oe,__onControlClick:y,__onControlMouseEnter:_,__onControlKeyDown:(T,j)=>nn({levelIndex:i,rowIndex:j.rowIndex,cellIndex:j.cellIndex,event:T,controlsRef:c}),__getControlRef:(T,j,K)=>{Array.isArray(c.current[i])||(c.current[i]=[]),Array.isArray(c.current[i][T])||(c.current[i][T]=[]),c.current[i][T][j]=K},levelControlAriaLabel:typeof ae=="function"?ae(v):ae,locale:s,minDate:d,maxDate:h,__preventFocus:C,__stopPropagation:G,nextIcon:S,previousIcon:D,nextLabel:O,previousLabel:N,onNext:F,onPrevious:Y,nextDisabled:V,previousDisabled:q,getYearControlProps:g,__staticSelector:U||"DecadeLevelGroup",classNames:re,styles:X,unstyled:Z,withCellSpacing:P,headerControlsOrder:ee,attributes:b},i)});return w.jsx(ft,{classNames:re,styles:X,__staticSelector:U||"DecadeLevelGroup",ref:e,size:k,unstyled:Z,attributes:b,...u,children:m})});gr.classes={...ft.classes,...hr.classes},gr.displayName="@mantine/dates/DecadeLevelGroup";const iu={numberOfColumns:1},mr=A.factory((t,e)=>{const r=A.useProps("YearLevelGroup",iu,t),{year:n,locale:s,minDate:d,maxDate:h,monthsListFormat:a,getMonthControlProps:g,__onControlClick:y,__onControlMouseEnter:_,withCellSpacing:P,__preventFocus:C,nextIcon:S,previousIcon:D,nextLabel:O,previousLabel:N,onNext:F,onPrevious:Y,onLevelClick:V,nextDisabled:q,previousDisabled:ee,hasNextLevel:re,headerControlsOrder:X,classNames:Z,styles:U,unstyled:G,__staticSelector:W,__stopPropagation:ae,numberOfColumns:oe,levelControlAriaLabel:k,yearLabelFormat:x,size:b,vars:u,attributes:c,...m}=r,f=Q.useRef([]),i=Array(oe).fill(0).map((v,T)=>{const j=de(n).add(T,"years").format("YYYY-MM-DD");return w.jsx(fr,{size:b,monthsListFormat:a,year:j,withNext:T===oe-1,withPrevious:T===0,yearLabelFormat:x,__stopPropagation:ae,__onControlClick:y,__onControlMouseEnter:_,__onControlKeyDown:(K,J)=>nn({levelIndex:T,rowIndex:J.rowIndex,cellIndex:J.cellIndex,event:K,controlsRef:f}),__getControlRef:(K,J,te)=>{Array.isArray(f.current[T])||(f.current[T]=[]),Array.isArray(f.current[T][K])||(f.current[T][K]=[]),f.current[T][K][J]=te},levelControlAriaLabel:typeof k=="function"?k(j):k,locale:s,minDate:d,maxDate:h,__preventFocus:C,nextIcon:S,previousIcon:D,nextLabel:O,previousLabel:N,onNext:F,onPrevious:Y,onLevelClick:V,nextDisabled:q,previousDisabled:ee,hasNextLevel:re,getMonthControlProps:g,classNames:Z,styles:U,unstyled:G,__staticSelector:W||"YearLevelGroup",withCellSpacing:P,headerControlsOrder:X,attributes:c},T)});return w.jsx(ft,{classNames:Z,styles:U,__staticSelector:W||"YearLevelGroup",ref:e,size:b,unstyled:G,attributes:c,...m,children:i})});mr.classes={...fr.classes,...ft.classes},mr.displayName="@mantine/dates/YearLevelGroup";const au={numberOfColumns:1},yr=A.factory((t,e)=>{const r=A.useProps("MonthLevelGroup",au,t),{month:n,locale:s,firstDayOfWeek:d,weekdayFormat:h,weekendDays:a,getDayProps:g,excludeDate:y,minDate:_,maxDate:P,renderDay:C,hideOutsideDates:S,hideWeekdays:D,getDayAriaLabel:O,__onDayClick:N,__onDayMouseEnter:F,withCellSpacing:Y,highlightToday:V,withWeekNumbers:q,__preventFocus:ee,nextIcon:re,previousIcon:X,nextLabel:Z,previousLabel:U,onNext:G,onPrevious:W,onLevelClick:ae,nextDisabled:oe,previousDisabled:k,hasNextLevel:x,headerControlsOrder:b,classNames:u,styles:c,unstyled:m,numberOfColumns:f,levelControlAriaLabel:i,monthLabelFormat:v,__staticSelector:T,__stopPropagation:j,size:K,static:J,vars:te,attributes:H,...ie}=r,se=Q.useRef([]),le=Array(f).fill(0).map((E,L)=>{const $=de(n).add(L,"months").format("YYYY-MM-DD");return w.jsx(pr,{month:$,withNext:L===f-1,withPrevious:L===0,monthLabelFormat:v,__stopPropagation:j,__onDayClick:N,__onDayMouseEnter:F,__onDayKeyDown:(B,I)=>nn({levelIndex:L,rowIndex:I.rowIndex,cellIndex:I.cellIndex,event:B,controlsRef:se}),__getDayRef:(B,I,ce)=>{Array.isArray(se.current[L])||(se.current[L]=[]),Array.isArray(se.current[L][B])||(se.current[L][B]=[]),se.current[L][B][I]=ce},levelControlAriaLabel:typeof i=="function"?i($):i,locale:s,firstDayOfWeek:d,weekdayFormat:h,weekendDays:a,getDayProps:g,excludeDate:y,minDate:_,maxDate:P,renderDay:C,hideOutsideDates:S,hideWeekdays:D,getDayAriaLabel:O,__preventFocus:ee,nextIcon:re,previousIcon:X,nextLabel:Z,previousLabel:U,onNext:G,onPrevious:W,onLevelClick:ae,nextDisabled:oe,previousDisabled:k,hasNextLevel:x,classNames:u,styles:c,unstyled:m,__staticSelector:T||"MonthLevelGroup",size:K,static:J,withCellSpacing:Y,highlightToday:V,withWeekNumbers:q,headerControlsOrder:b,attributes:H},L)});return w.jsx(ft,{classNames:u,styles:c,__staticSelector:T||"MonthLevelGroup",ref:e,size:K,attributes:H,...ie,children:le})});yr.classes={...ft.classes,...pr.classes},yr.displayName="@mantine/dates/MonthLevelGroup";const ds=t=>t==="range"?[null,null]:t==="multiple"?[]:null,hs=(t,e)=>{const r=e?Go:We;return Array.isArray(t)?t.map(r):r(t)};function ln({type:t,value:e,defaultValue:r,onChange:n,withTime:s=!1}){const d=Q.useRef(t),[h,a,g]=$e.useUncontrolled({value:hs(e,s),defaultValue:hs(r,s),finalValue:ds(t),onChange:n});let y=h;return d.current!==t&&(d.current=t,e===void 0&&(y=r!==void 0?r:ds(t),a(y))),[y,a,g]}function un(t,e){return t?t==="month"?0:t==="year"?1:2:e||0}function lu(t){return t===0?"month":t===1?"year":"decade"}function Ft(t,e,r){return lu($e.clamp(un(t,0),un(e,0),un(r,2)))}const uu={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},vr=A.factory((t,e)=>{const r=A.useProps("Calendar",uu,t),{vars:n,maxLevel:s,minLevel:d,defaultLevel:h,level:a,onLevelChange:g,date:y,defaultDate:_,onDateChange:P,numberOfColumns:C,columnsToScroll:S,ariaLabels:D,nextLabel:O,previousLabel:N,onYearSelect:F,onMonthSelect:Y,onYearMouseEnter:V,onMonthMouseEnter:q,headerControlsOrder:ee,__updateDateOnYearSelect:re,__updateDateOnMonthSelect:X,__setDateRef:Z,__setLevelRef:U,firstDayOfWeek:G,weekdayFormat:W,weekendDays:ae,getDayProps:oe,excludeDate:k,renderDay:x,hideOutsideDates:b,hideWeekdays:u,getDayAriaLabel:c,monthLabelFormat:m,nextIcon:f,previousIcon:i,__onDayClick:v,__onDayMouseEnter:T,withCellSpacing:j,highlightToday:K,withWeekNumbers:J,monthsListFormat:te,getMonthControlProps:H,yearLabelFormat:ie,yearsListFormat:se,getYearControlProps:le,decadeLabelFormat:E,classNames:L,styles:$,unstyled:B,minDate:I,maxDate:ce,locale:o,__staticSelector:l,size:p,__preventFocus:M,__stopPropagation:R,onNextDecade:z,onPreviousDecade:ue,onNextYear:he,onPreviousYear:pe,onNextMonth:ne,onPreviousMonth:fe,static:me,enableKeyboardNavigation:ge,attributes:De,...xe}=r,{resolvedClassNames:Ce,resolvedStyles:Le}=A.useResolvedStylesApi({classNames:L,styles:$,props:r}),[Oe,Se]=$e.useUncontrolled({value:a?Ft(a,d,s):void 0,defaultValue:h?Ft(h,d,s):void 0,finalValue:Ft(void 0,d,s),onChange:g}),[Je,Ee]=ln({type:"default",value:We(y),defaultValue:We(_),onChange:P});Q.useImperativeHandle(Z,()=>ve=>{Ee(ve)}),Q.useImperativeHandle(U,()=>ve=>{Se(ve)});const Ue={__staticSelector:l||"Calendar",styles:Le,classNames:Ce,unstyled:B,size:p,attributes:De},Be=S||C||1,it=new Date,yt=I&&de(it).isAfter(I)?I:de(it).format("YYYY-MM-DD"),Ae=Je||yt,Xe=()=>{const ve=de(Ae).add(Be,"month").format("YYYY-MM-DD");ne?.(ve),Ee(ve)},et=()=>{const ve=de(Ae).subtract(Be,"month").format("YYYY-MM-DD");fe?.(ve),Ee(ve)},tt=()=>{const ve=de(Ae).add(Be,"year").format("YYYY-MM-DD");he?.(ve),Ee(ve)},at=()=>{const ve=de(Ae).subtract(Be,"year").format("YYYY-MM-DD");pe?.(ve),Ee(ve)},rt=()=>{const ve=de(Ae).add(10*Be,"year").format("YYYY-MM-DD");z?.(ve),Ee(ve)},qe=()=>{const ve=de(Ae).subtract(10*Be,"year").format("YYYY-MM-DD");ue?.(ve),Ee(ve)},Ze=Q.useRef(null);Q.useEffect(()=>{if(!ge||me)return;const ve=be=>{if(!Ze.current?.contains(document.activeElement))return;const ke=be.ctrlKey||be.metaKey,pt=be.shiftKey;switch(be.key){case"ArrowUp":ke&&pt?(be.preventDefault(),qe()):ke&&(be.preventDefault(),at());break;case"ArrowDown":ke&&pt?(be.preventDefault(),rt()):ke&&(be.preventDefault(),tt());break;case"y":case"Y":Oe==="month"&&(be.preventDefault(),Se("year"));break}};return document.addEventListener("keydown",ve),()=>{document.removeEventListener("keydown",ve)}},[ge,me,Oe,tt,at,rt,qe]);const nt=ve=>{Ze.current=ve,typeof e=="function"?e(ve):e&&(e.current=ve)};return w.jsxs(A.Box,{ref:nt,size:p,"data-calendar":!0,...xe,children:[Oe==="month"&&w.jsx(yr,{month:Ae,minDate:I,maxDate:ce,firstDayOfWeek:G,weekdayFormat:W,weekendDays:ae,getDayProps:oe,excludeDate:k,renderDay:x,hideOutsideDates:b,hideWeekdays:u,getDayAriaLabel:c,onNext:Xe,onPrevious:et,hasNextLevel:s!=="month",onLevelClick:()=>Se("year"),numberOfColumns:C,locale:o,levelControlAriaLabel:D?.monthLevelControl,nextLabel:D?.nextMonth??O,nextIcon:f,previousLabel:D?.previousMonth??N,previousIcon:i,monthLabelFormat:m,__onDayClick:v,__onDayMouseEnter:T,__preventFocus:M,__stopPropagation:R,static:me,withCellSpacing:j,highlightToday:K,withWeekNumbers:J,headerControlsOrder:ee,...Ue}),Oe==="year"&&w.jsx(mr,{year:Ae,numberOfColumns:C,minDate:I,maxDate:ce,monthsListFormat:te,getMonthControlProps:H,locale:o,onNext:tt,onPrevious:at,hasNextLevel:s!=="month"&&s!=="year",onLevelClick:()=>Se("decade"),levelControlAriaLabel:D?.yearLevelControl,nextLabel:D?.nextYear??O,nextIcon:f,previousLabel:D?.previousYear??N,previousIcon:i,yearLabelFormat:ie,__onControlMouseEnter:q,__onControlClick:(ve,be)=>{X&&Ee(be),Se(Ft("month",d,s)),Y?.(be)},__preventFocus:M,__stopPropagation:R,withCellSpacing:j,headerControlsOrder:ee,...Ue}),Oe==="decade"&&w.jsx(gr,{decade:Ae,minDate:I,maxDate:ce,yearsListFormat:se,getYearControlProps:le,locale:o,onNext:rt,onPrevious:qe,numberOfColumns:C,nextLabel:D?.nextDecade??O,nextIcon:f,previousLabel:D?.previousDecade??N,previousIcon:i,decadeLabelFormat:E,__onControlMouseEnter:V,__onControlClick:(ve,be)=>{re&&Ee(be),Se(Ft("year",d,s)),F?.(be)},__preventFocus:M,__stopPropagation:R,withCellSpacing:j,headerControlsOrder:ee,...Ue})]})});vr.classes={...gr.classes,...mr.classes,...yr.classes},vr.displayName="@mantine/dates/Calendar";function cu(t){const{maxLevel:e,minLevel:r,defaultLevel:n,level:s,onLevelChange:d,nextIcon:h,previousIcon:a,date:g,defaultDate:y,onDateChange:_,numberOfColumns:P,columnsToScroll:C,ariaLabels:S,nextLabel:D,previousLabel:O,onYearSelect:N,onMonthSelect:F,onYearMouseEnter:Y,onMonthMouseEnter:V,onNextMonth:q,onPreviousMonth:ee,onNextYear:re,onPreviousYear:X,onNextDecade:Z,onPreviousDecade:U,withCellSpacing:G,highlightToday:W,__updateDateOnYearSelect:ae,__updateDateOnMonthSelect:oe,__setDateRef:k,__setLevelRef:x,withWeekNumbers:b,headerControlsOrder:u,firstDayOfWeek:c,weekdayFormat:m,weekendDays:f,getDayProps:i,excludeDate:v,renderDay:T,hideOutsideDates:j,hideWeekdays:K,getDayAriaLabel:J,monthLabelFormat:te,monthsListFormat:H,getMonthControlProps:ie,yearLabelFormat:se,yearsListFormat:le,getYearControlProps:E,decadeLabelFormat:L,allowSingleDateInRange:$,allowDeselect:B,minDate:I,maxDate:ce,locale:o,...l}=t;return{calendarProps:{maxLevel:e,minLevel:r,defaultLevel:n,level:s,onLevelChange:d,nextIcon:h,previousIcon:a,date:g,defaultDate:y,onDateChange:_,numberOfColumns:P,columnsToScroll:C,ariaLabels:S,nextLabel:D,previousLabel:O,onYearSelect:N,onMonthSelect:F,onYearMouseEnter:Y,onMonthMouseEnter:V,onNextMonth:q,onPreviousMonth:ee,onNextYear:re,onPreviousYear:X,onNextDecade:Z,onPreviousDecade:U,withCellSpacing:G,highlightToday:W,__updateDateOnYearSelect:ae,__updateDateOnMonthSelect:oe,__setDateRef:k,withWeekNumbers:b,headerControlsOrder:u,firstDayOfWeek:c,weekdayFormat:m,weekendDays:f,getDayProps:i,excludeDate:v,renderDay:T,hideOutsideDates:j,hideWeekdays:K,getDayAriaLabel:J,monthLabelFormat:te,monthsListFormat:H,getMonthControlProps:ie,yearLabelFormat:se,yearsListFormat:le,getYearControlProps:E,decadeLabelFormat:L,allowSingleDateInRange:$,allowDeselect:B,minDate:I,maxDate:ce,locale:o},others:l}}function du(t){if(t===null)return null;const e=new Date(t);return Number.isNaN(e.getTime())||!t?null:de(e).format("YYYY-MM-DD")}function hu({date:t,maxDate:e,minDate:r}){return!(t==null||Number.isNaN(new Date(t).getTime())||e&&de(t).isAfter(e,"date")||r&&de(t).isBefore(r,"date"))}const fu={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,size:"sm"},br=A.factory((t,e)=>{const r=A.useInputProps("DateInput",fu,t),{inputProps:n,wrapperProps:s,value:d,defaultValue:h,onChange:a,clearable:g,clearButtonProps:y,popoverProps:_,getDayProps:P,locale:C,valueFormat:S,dateParser:D,minDate:O,maxDate:N,fixOnBlur:F,onFocus:Y,onBlur:V,onClick:q,onKeyDown:ee,readOnly:re,name:X,form:Z,rightSection:U,unstyled:G,classNames:W,styles:ae,allowDeselect:oe,date:k,defaultDate:x,onDateChange:b,getMonthControlProps:u,getYearControlProps:c,disabled:m,...f}=r,i=Q.useRef(null),v=Q.useRef(null),[T,j]=Q.useState(!1),{calendarProps:K,others:J}=cu(f),te=dt(),ie=D||(ne=>{const fe=de(ne,S,te.getLocale(C)).toDate();return Number.isNaN(fe.getTime())?du(ne):de(fe).format("YYYY-MM-DD")}),se=oe!==void 0?oe:g,le=ne=>ne?de(ne).locale(te.getLocale(C)).format(S):"",[E,L,$]=ln({type:"default",value:d,defaultValue:h,onChange:a}),[B,I]=ln({type:"default",value:k,defaultValue:h||x,onChange:b});Q.useEffect(()=>{$&&d!==null&&I(d)},[$,d]);const[ce,o]=Q.useState(le(E));Q.useEffect(()=>{o(le(E))},[te.getLocale(C)]);const l=ne=>{const fe=ne.currentTarget.value;if(o(fe),j(!0),fe.trim()===""&&(oe||g))L(null);else{const me=ie(fe);me&&hu({date:me,minDate:O,maxDate:N})&&(L(me),I(me))}},p=ne=>{V?.(ne),j(!1),F&&o(le(E))},M=ne=>{Y?.(ne),j(!0)},R=ne=>{q?.(ne),j(!0)},z=ne=>{ne.key==="Escape"&&j(!1),ee?.(ne)},ue=ne=>({...P?.(ne),selected:de(E).isSame(ne,"day"),onClick:fe=>{P?.(ne).onClick?.(fe);const me=se&&de(E).isSame(ne,"day")?null:ne;L(me),!$&&me&&o(le(me)),j(!1)}}),he=w.jsx(A.Input.ClearButton,{onClick:()=>{L(null),!$&&o(""),j(!1)},unstyled:G,...y}),pe=g&&!!E&&!re&&!m;return $e.useDidUpdate(()=>{E!==void 0&&!T&&o(le(E))},[E]),$e.useClickOutside(()=>j(!1),void 0,[i.current,v.current]),w.jsxs(w.Fragment,{children:[w.jsx(A.Input.Wrapper,{...s,__staticSelector:"DateInput",ref:i,children:w.jsxs(A.Popover,{opened:T,trapFocus:!1,position:"bottom-start",disabled:re||m,withRoles:!1,unstyled:G,..._,children:[w.jsx(A.Popover.Target,{children:w.jsx(A.Input,{"data-dates-input":!0,"data-read-only":re||void 0,autoComplete:"off",ref:e,value:ce,onChange:l,onBlur:p,onFocus:M,onClick:R,onKeyDown:z,readOnly:re,rightSection:U,__clearSection:he,__clearable:pe,...n,...J,disabled:m,__staticSelector:"DateInput"})}),w.jsx(A.Popover.Dropdown,{onMouseDown:ne=>ne.preventDefault(),"data-dates-dropdown":!0,ref:v,children:w.jsx(vr,{__staticSelector:"DateInput",...K,classNames:W,styles:ae,unstyled:G,__preventFocus:!0,minDate:O,maxDate:N,locale:C,getDayProps:ue,size:n.size,date:B,onDateChange:I,getMonthControlProps:ne=>({selected:typeof E=="string"?an(ne,E):!1,...u?.(ne)}),getYearControlProps:ne=>({selected:typeof E=="string"?de(ne).isSame(E,"year"):!1,...c?.(ne)}),attributes:s.attributes})})]})}),w.jsx(Qo,{name:X,form:Z,value:E,type:"default"})]})});br.classes={...A.Input.classes,...vr.classes},br.displayName="@mantine/dates/DateInput";function fs(t){const e=Ve.c(47),{fields:r,onClose:n,queryKey:s,apiPath:d,steps:h,onCreated:a}=t,[g,y]=Q.useState(0),[_,P]=Q.useState(!1),[C,S]=Q.useState(),{mutateAsync:D,isError:O,error:N,isPending:F}=Uo(d,s),{mutateAsync:Y,isPending:V}=rn(d,s),q=F||V;let ee;e[0]!==r?(ee=new Set(r.filter(vu).map(yu)),e[0]=r,e[1]=ee):ee=e[1];let re;e[2]!==ee?(re=[...ee],e[2]=ee,e[3]=re):re=e[3];const X=re;let Z;e[4]!==r?(Z=r.reduce(mu,{}),e[4]=r,e[5]=Z):Z=e[5];let U;e[6]!==r?(U=r.filter(gu).reduce(pu,{}),e[6]=r,e[7]=U):U=e[7];let G;e[8]!==Z||e[9]!==U?(G={mode:"uncontrolled",initialValues:Z,validate:U},e[8]=Z,e[9]=U,e[10]=G):G=e[10];const W=Mn.useForm(G);let ae;e[11]!==W||e[12]!==C?(ae=function(i){const v=W.getValues();return i.conditional&&!i.conditional(v)?null:w.jsxs(Q.Fragment,{children:[(i.type===void 0||i.type=="text")&&w.jsx(A.TextInput,{label:i.column.title,placeholder:i.placeholder??"",...W.getInputProps(i.id),type:i.id.includes("email")?"email":void 0,required:i.required},W.key(i.id)),i.type==="number"&&w.jsx(A.NumberInput,{decimalSeparator:",",label:i.column.title,placeholder:i.placeholder??"",...W.getInputProps(i.id),required:i.required},W.key(i.id)),i.type==="date"&&w.jsx(br,{label:i.column.title,placeholder:i.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...W.getInputProps(i.id),required:i.required},W.key(i.id)),i.type==="boolean"&&w.jsx(A.Checkbox,{mt:"md",label:i.column.title,...W.getInputProps(i.id,{type:"checkbox"}),required:i.required},W.key(i.id)),i.type==="textarea"&&w.jsx(A.Textarea,{label:i.column.title,placeholder:i.placeholder??"",...W.getInputProps(i.id),minRows:3,autosize:!0,required:i.required},W.key(i.id)),i.type==="custom"&&i.render&&i.render({...W.getValues(),...C&&{id:C}},W.setValues,P,{error:W.getInputProps(i.id).error,required:i.required})]},i.id)},e[11]=W,e[12]=C,e[13]=ae):ae=e[13];const oe=ae;let k;e[14]!==N?.message||e[15]!==N?.name||e[16]!==O?(k=O&&w.jsx(A.Alert,{variant:"outline",color:"red",title:N?.name??"Fehler aufgetreten",mb:"lg",children:N?.message??"Fehler aufgetreten"}),e[14]=N?.message,e[15]=N?.name,e[16]=O,e[17]=k):k=e[17];let x;e[18]!==g||e[19]!==D||e[20]!==W||e[21]!==O||e[22]!==n||e[23]!==a||e[24]!==C||e[25]!==X.length||e[26]!==Y?(x=W.onSubmit(async f=>{if(C)await Y({...f,id:C});else{const i=await D(f);S(i.id),a?.(i.id)}X.length&&g<X.length-1?O||y(g+1):O||(W.setInitialValues(f),W.reset(),n())}),e[18]=g,e[19]=D,e[20]=W,e[21]=O,e[22]=n,e[23]=a,e[24]=C,e[25]=X.length,e[26]=Y,e[27]=x):x=e[27];let b;e[28]!==g||e[29]!==r||e[30]!==oe||e[31]!==h||e[32]!==X?(b=X.length?w.jsx(A.Stepper,{active:g,size:"sm",children:X.map(f=>w.jsx(A.Stepper.Step,{...h&&h[f-1]?{label:h[f-1].label}:{},children:r.filter(i=>i.step===f).map(i=>oe(i))},f))}):r.map(f=>oe(f)),e[28]=g,e[29]=r,e[30]=oe,e[31]=h,e[32]=X,e[33]=b):b=e[33];let u;e[34]!==g||e[35]!==_||e[36]!==q||e[37]!==n||e[38]!==X.length?(u=!_&&w.jsxs(A.Group,{mt:"md",justify:"end",children:[w.jsx(A.Button,{onClick:()=>X.length?g===0?n():y(g-1):n(),variant:"outline",children:X.length?g===0?"Abbrechen":"Zurück":"Abbrechen"}),w.jsx(A.Button,{type:"submit",loading:q,children:X.length?g===X.length-1?"Speichern":"Weiter":"Speichern"})]}),e[34]=g,e[35]=_,e[36]=q,e[37]=n,e[38]=X.length,e[39]=u):u=e[39];let c;e[40]!==u||e[41]!==x||e[42]!==b?(c=w.jsxs("form",{onSubmit:x,children:[b,u]}),e[40]=u,e[41]=x,e[42]=b,e[43]=c):c=e[43];let m;return e[44]!==c||e[45]!==k?(m=w.jsxs(w.Fragment,{children:[k,c]}),e[44]=c,e[45]=k,e[46]=m):m=e[46],m}function pu(t,e){return t[e.id]=(r,n)=>e.conditional&&!e.conditional(n)||r?null:"Pflichtfeld",t}function gu(t){return t.required}function mu(t,e){return t[e.id]=e.type==="boolean"?!1:e.defaultValue??"",t}function yu(t){return t.step}function vu(t){return typeof t.step=="number"}var[bu,cn]=A.createSafeContext("useDataTableColumnsContext must be used within DataTableColumnProvider"),ps=t=>{let{children:e,columnsOrder:r,setColumnsOrder:n,columnsToggle:s,setColumnsToggle:d,resetColumnsOrder:h,resetColumnsToggle:a,setColumnWidth:g,setMultipleColumnWidths:y,resetColumnsWidth:_}=t,[P,C]=Q.useState(""),[S,D]=Q.useState("");return w.jsx(bu,{value:{sourceColumn:P,setSourceColumn:C,targetColumn:S,setTargetColumn:D,columnsToggle:s,setColumnsToggle:d,swapColumns:()=>{if(!r||!n||!P||!S)return;let O=r.indexOf(P),N=r.indexOf(S);if(O!==-1&&N!==-1){let F=r.splice(O,1)[0];r.splice(N,0,F),n([...r])}},resetColumnsOrder:h,resetColumnsToggle:a,setColumnWidth:g,setMultipleColumnWidths:y,resetColumnsWidth:_},children:e})};function wu(){return w.jsx("tr",{className:"mantine-datatable-empty-row",children:w.jsx("td",{})})}function _u(){return w.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74"}),w.jsx("path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6"}),w.jsx("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),w.jsx("path",{d:"M3 3l18 18"})]})}function xu({icon:t,text:e,active:r,children:n}){return w.jsx(A.Center,{className:"mantine-datatable-empty-state","data-active":r||void 0,children:n||w.jsxs(w.Fragment,{children:[t||w.jsx("div",{className:"mantine-datatable-empty-state-icon",children:w.jsx(_u,{})}),w.jsx(A.Text,{component:"div",size:"sm",c:"dimmed",children:e})]})})}function Cu({key:t,columns:e=[],getInitialValueInEffect:r=!0}){function n(P,C){let S=[];return P.forEach(D=>{C.find(O=>O.accessor===D)&&S.push(D)}),C.forEach(D=>{S.includes(D.accessor)||S.push(D.accessor)}),S}let s=e&&e.map(P=>P.accessor)||[],[d,h]=$e.useLocalStorage({key:t?`${t}-columns-order`:"",defaultValue:t?s:void 0,getInitialValueInEffect:r});function a(P){t&&h(P)}let g=()=>{a(s)};if(!t)return{columnsOrder:d,setColumnsOrder:a,resetColumnsOrder:g};let y=n(d,e),_=JSON.stringify(d);return JSON.stringify(y)!==_&&a(y),{columnsOrder:y,setColumnsOrder:a,resetColumnsOrder:g}}function Su({key:t,columns:e=[],getInitialValueInEffect:r=!0,headerRef:n,onFixedLayoutChange:s}){let d=Q.useRef(!1),h=Q.useRef({}),[a,g]=Q.useState(!0),y=Q.useMemo(()=>e.some(U=>U.resizable&&!U.hidden&&U.accessor!=="__selection__"),[e]),_=Q.useMemo(()=>e.filter(U=>U.resizable&&!U.hidden&&U.accessor!=="__selection__"),[e]),P=Q.useMemo(()=>_.some(U=>U.width===void 0||U.width===""||U.width==="initial"),[_]),C=Q.useCallback(()=>e.filter(U=>U.accessor!=="__selection__").map(U=>({[U.accessor]:U.width??"auto"})),[e]),[S,D]=$e.useLocalStorage({key:t?`${t}-columns-width`:"",defaultValue:t?C():void 0,getInitialValueInEffect:!1}),[O,N]=Q.useState(()=>C());Q.useEffect(()=>{g(!1)},[]);let F=Q.useCallback(()=>{if(!n?.current||a)return{};let U=n.current,G=Array.from(U.querySelectorAll("th[data-accessor]")),W={};return G.forEach(ae=>{let oe=ae.getAttribute("data-accessor");if(!oe||oe==="__selection__")return;let k=_.find(x=>x.accessor===oe);if(k&&(k.width===void 0||k.width===""||k.width==="initial")){let x=ae.getBoundingClientRect();W[oe]=Math.round(x.width)}}),W},[n,_,a]),Y=Q.useCallback(U=>{let G=U.filter(ae=>ae.accessor!=="__selection__"),W=O.map(ae=>{let oe=Object.keys(ae)[0],k=G.find(x=>x.accessor===oe);return k?{[oe]:k.width}:ae});N(W),t&&D(W)},[O,t,D]),V=Q.useCallback(U=>{Y(U)},[Y]),q=Q.useCallback(()=>{if(!(!n?.current||!s||a))if(P)s(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{let U=F();h.current={...h.current,...U};let G=e.filter(W=>W.accessor!=="__selection__").map(W=>{let ae=W.accessor,oe=S?.find(x=>Object.keys(x)[0]===ae);if(oe&&oe[ae]!=="auto")return{[ae]:oe[ae]};let k=U[ae];return k?{[ae]:`${k}px`}:{[ae]:W.width??"auto"}});N(G),setTimeout(()=>{s(!0),d.current=!0},10)})});else{let U=e.filter(G=>G.accessor!=="__selection__").map(G=>({[G.accessor]:G.width??"auto"}));N(U),s(!0),d.current=!0}},[n,s,a,P,F,e,S]),ee=q;Q.useEffect(()=>{if(!y||!s||a){s?.(!1);return}d.current=!1;let U=setTimeout(()=>{q()},50);return()=>clearTimeout(U)},[y,s,a,q]),Q.useEffect(()=>{a||!t||!r||S&&S.length>0&&N(S)},[a,t,r,S]);let re=Q.useCallback(()=>{t&&D(C()),h.current={},d.current=!1,s&&(s(!1),setTimeout(()=>{q()},10))},[t,D,C,s,q]),X=Q.useCallback((U,G)=>{Y([{accessor:U,width:G}])},[Y]),Z=Q.useMemo(()=>y?O.filter(U=>{let G=Object.keys(U)[0];return _.some(W=>W.accessor===G)}).every(U=>{let G=Object.values(U)[0];return G==="auto"||G==="initial"}):!1,[y,O,_]);return{columnsWidth:O,setColumnsWidth:Y,setColumnWidth:X,setMultipleColumnWidths:V,resetColumnsWidth:re,hasResizableColumns:y,allResizableWidthsInitial:Z,measureAndSetColumnWidths:ee}}function Du({key:t,columns:e=[],getInitialValueInEffect:r=!0}){function n(P,C){let S=[];return P.forEach(D=>{C.find(O=>O.accessor===D.accessor)&&S.push(D)}),C.forEach(D=>{S.find(O=>O.accessor===D.accessor)||S.push({accessor:D.accessor,defaultToggle:D.defaultToggle||!0,toggleable:D.toggleable,toggled:D.defaultToggle===void 0?!0:D.defaultToggle})}),S}let s=e&&e.map(P=>({accessor:P.accessor,defaultToggle:P.defaultToggle||!0,toggleable:P.toggleable,toggled:P.defaultToggle===void 0?!0:P.defaultToggle})),[d,h]=$e.useLocalStorage({key:t?`${t}-columns-toggle`:"",defaultValue:t?s:void 0,getInitialValueInEffect:r});function a(P){t&&h(P)}let g=()=>{a(s)};if(!t)return{columnsToggle:d,setColumnsToggle:a,resetColumnsToggle:g};let y=n(d,e),_=JSON.stringify(d);return JSON.stringify(y)!==_&&a(y),{columnsToggle:y,setColumnsToggle:a,resetColumnsToggle:g}}var ku=({key:t,columns:e=[],getInitialValueInEffect:r=!0,headerRef:n,scrollViewportRef:s,onFixedLayoutChange:d})=>{let{columnsOrder:h,setColumnsOrder:a,resetColumnsOrder:g}=Cu({key:t,columns:e,getInitialValueInEffect:r}),{columnsToggle:y,setColumnsToggle:_,resetColumnsToggle:P}=Du({key:t,columns:e,getInitialValueInEffect:r}),{columnsWidth:C,setColumnsWidth:S,setColumnWidth:D,setMultipleColumnWidths:O,resetColumnsWidth:N,hasResizableColumns:F,allResizableWidthsInitial:Y,measureAndSetColumnWidths:V}=Su({key:t,columns:e,getInitialValueInEffect:r,headerRef:n,onFixedLayoutChange:d});return{effectiveColumns:Q.useMemo(()=>h?h.map(q=>e.find(ee=>ee.accessor===q)).map(q=>({...q,hidden:q?.hidden||!y.find(ee=>ee.accessor===q?.accessor)?.toggled})).map(q=>q?.accessor==="__selection__"?q:{...q,width:C.find(ee=>ee[q?.accessor])?.[q?.accessor]}):e,[e,h,y,C]),setColumnsOrder:a,columnsOrder:h,resetColumnsOrder:g,columnsToggle:y,setColumnsToggle:_,resetColumnsToggle:P,columnsWidth:C,setColumnsWidth:S,setColumnWidth:D,setMultipleColumnWidths:O,resetColumnsWidth:N,hasResizableColumns:F,allResizableWidthsInitial:Y,measureAndSetColumnWidths:V}},gs=typeof window<"u"?Q.useLayoutEffect:Q.useEffect;function ms(t){let e=Q.useRef(t);return e.current=t,e}var ys="--mantine-datatable-header-height",vs="--mantine-datatable-footer-height",bs="--mantine-datatable-selection-column-width",ws="--mantine-datatable-last-row-border-bottom";function Qe(t,e,r){t?.style.setProperty(e,r)}function dn(t){let e=t.borderBoxSize?.[0]||t.contentBoxSize?.[0];return e?{width:e.inlineSize,height:e.blockSize}:{width:t.contentRect.width,height:t.contentRect.height}}function hn(t,e,r){if(t){let n=new ResizeObserver(s=>{let d=s[0];d&&e(dn(d))});return n.observe(t),()=>{n.disconnect(),r()}}}function Pu({scrollCallbacks:t,withRowBorders:e}){let r={root:Q.useRef(null),table:Q.useRef(null),scrollViewport:Q.useRef(null),header:Q.useRef(null),footer:Q.useRef(null),selectionColumnHeader:Q.useRef(null)},{root:n,table:s,scrollViewport:d,header:h,footer:a,selectionColumnHeader:g}=r,y=ms({withRowBorders:e}),_=ms(t),P=Q.useRef(()=>{}),C=Q.useRef(()=>{}),S=Q.useCallback(D=>{_.current.onScroll?.(D),P.current()},[]);return Q.useEffect(()=>hn(h.current,D=>{Qe(n.current,ys,`${D.height}px`)},()=>Qe(n.current,ys,"0")),[h.current]),Q.useEffect(()=>hn(a.current,D=>{Qe(n.current,vs,`${D.height}px`)},()=>Qe(n.current,vs,"0")),[a.current]),Q.useEffect(()=>hn(g.current,D=>{Qe(n.current,bs,`${D.width}px`)},()=>Qe(n.current,bs,"0")),[g.current]),gs(()=>{if(typeof window===void 0)return;let D={top:!0,bottom:!0,left:!0,right:!0},O={width:0,height:0},N={width:0,height:0};function F(re,X){let Z=D[re];return D[re]=X,Qe(n.current,`--mantine-datatable-${re}-shadow-opacity`,X?"0":"1"),Z}function Y(){let re=O.height-N.height,X=re<0;Qe(n.current,"--mantine-datatable-footer-position",X?"relative":"sticky"),Qe(n.current,"--mantine-datatable-footer-bottom",X?`${re}px`:"0")}function V(){y.current.withRowBorders&&O.height<N.height?Qe(n.current,ws,`${A.rem("1px")} solid var(--mantine-datatable-border-color)`):Qe(n.current,ws,"unset")}C.current=V;function q(){let re=_.current,X=d.current,Z=X?.scrollTop??0,U=X?.scrollLeft??0,G=Z===0,W=O.height-Z-N.height<1,ae=F("top",G),oe=F("bottom",W);G&&G!==ae&&re.onScrollToTop?.(),W&&W!==oe&&re.onScrollToBottom?.();let k=X?getComputedStyle(X).direction==="rtl":!1,x=(X?.scrollWidth??0)-N.width,b,u;if(k){let f=Math.abs(U);u=f<1,b=x-f<1}else b=U<1,u=O.width-U-N.width<1;let c=F("left",b),m=F("right",u);b&&b!==c&&re.onScrollToLeft?.(),u&&u!==m&&re.onScrollToRight?.()}P.current=q;let ee=new ResizeObserver(re=>{for(let X of re)switch(X.target.tagName){case"TABLE":{O=dn(X);break}case"DIV":{N=dn(X);break}}q(),Y(),V()});return ee.observe(s.current),ee.observe(d.current),()=>{ee.disconnect()}},[]),gs(()=>{C.current()},[e]),{refs:r,onScroll:S}}function Mu(t){let[e,r]=Q.useState(null),n=t?.join(":")||"";return Q.useEffect(()=>{r(null)},[n]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function Ou(t,e){let r=()=>{e(t.map(s=>s.matches))},n=t.map(s=>{try{return s.addEventListener("change",r),()=>s.removeEventListener("change",r)}catch{return s.addListener(r),()=>s.removeListener(r)}});return()=>{n.forEach(s=>s())}}function Eu(t,e){return e||(typeof window<"u"&&"matchMedia"in window?t.map(r=>window.matchMedia(r).matches):t.map(()=>!1))}function Au(t,e,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[n,s]=Q.useState(r?e:Eu(t,e)),d=Q.useRef(null);return Q.useEffect(()=>{if("matchMedia"in window)return d.current=t.map(h=>window.matchMedia(h)),s(d.current.map(h=>h.matches)),Ou(d.current,h=>{s(h)})},[t]),n}function Tu(t){let e=A.useMantineTheme(),r=Q.useMemo(()=>t.map(s=>(typeof s=="function"?s(e):s)??""),[t,e]),n=Q.useMemo(()=>t.map(()=>!0),[t]);return Au(r,n)}function wr(t){let e=A.useMantineTheme(),r=typeof t=="function"?t(e):t;return $e.useMediaQuery(r||"",!0)}function fn(t){let e=t.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function ju(t,e,r){return t.filter(n=>!e.map(r).includes(r(n)))}function pn(t,e){return t.filter((r,n,s)=>n===s.findIndex(d=>e(r)===e(d)))}function _s(t,e){return e?e.match(/([^[.\]])+/g).reduce((r,n)=>r&&r[n],t):void 0}function Ne(t,e){return typeof e=="string"?_s(t,e):e(t)}function xs(t){return!t||t.length===0?0:Math.max(...t.map(e=>e.groups&&e.groups.length>0?1+xs(e.groups):1))}function gn(t){let e=[];for(let r of t)r.columns&&r.columns.length>0?e.push(...r.columns.filter(n=>n!=null)):r.groups&&r.groups.length>0&&e.push(...gn(r.groups));return e.filter(r=>r!=null)}function mn(t,e){return t.columns&&t.columns.length>0?t.columns.filter((r,n)=>r.hidden?!1:e?e[n]!==!1:!0).length:t.groups&&t.groups.length>0?t.groups.reduce((r,n)=>r+mn(n,e),0):0}function Cs(t,e,r=0){if(r===e)return[...t];let n=[];for(let s of t)s.groups&&s.groups.length>0&&n.push(...Cs(s.groups,e,r+1));return n}function $u(t,e,r){return r?!t||e:!1}function Ru({rowExpansion:t,records:e,idAccessor:r}){let n=[];if(t&&e){let{trigger:a,allowMultiple:g,initiallyExpanded:y}=t;e&&a==="always"?n=e.map(_=>Ne(_,r)):y&&(n=e.filter((_,P)=>y({record:_,index:P})).map(_=>Ne(_,r)),g||(n=[n[0]]))}let s,d,h=Q.useState(n);if(t){let{expandable:a,trigger:g,allowMultiple:y,collapseProps:_,content:P}=t;t.expanded?{recordIds:s,onRecordIdsChange:d}=t.expanded:[s,d]=h;let C=S=>d?.(s.filter(D=>D!==Ne(S,r)));return{expandOnClick:g!=="always"&&g!=="never",isRowExpanded:S=>g==="always"?!0:s.includes(Ne(S,r)),isExpandable:({record:S,index:D})=>a?a({record:S,index:D}):!0,expandRow:S=>{let D=Ne(S,r);d?.(y?[...s,D]:[D])},collapseRow:C,collapseProps:_,content:({record:S,index:D})=>()=>P({record:S,index:D,collapse:()=>C(S)})}}}function Nu(t,e){let[r,n]=Q.useState(t),[s,d]=Q.useState(t),h=$e.useTimeout(()=>n(!0),0),a=$e.useTimeout(()=>d(!1),e||200);return Q.useEffect(()=>{t?(a.clear(),d(!0),h.start()):(h.clear(),n(!1),a.start())},[h,a,t]),{expanded:r,visible:s}}var yn="mantine-datatable-nowrap",vn="mantine-datatable-ellipsis",St="mantine-datatable-pointer-cursor",Ss="mantine-datatable-context-menu-cursor",Lu="mantine-datatable-text-selection-disabled",_r="mantine-datatable-text-align-left",xr="mantine-datatable-text-align-center",Cr="mantine-datatable-text-align-right";function Bu({className:t,style:e,visibleMediaQuery:r,title:n,noWrap:s,ellipsis:d,textAlign:h,width:a}){return wr(r)?w.jsx(A.TableTh,{className:Pe({[yn]:s||d,[vn]:d,[_r]:h==="left",[xr]:h==="center",[Cr]:h==="right"},t),style:[{width:a,minWidth:a,maxWidth:a},e],children:n}):null}function Iu({shadowVisible:t}){return w.jsx(A.TableTh,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":t||void 0})}function Yu({className:t,style:e,columns:r,defaultColumnProps:n,selectionVisible:s,selectorCellShadowVisible:d,ref:h}){return w.jsx(A.TableTfoot,{ref:h,className:Pe("mantine-datatable-footer",t),style:e,children:w.jsxs(A.TableTr,{children:[s&&w.jsx(Iu,{shadowVisible:d}),r.map(({hidden:a,...g})=>{if(a)return null;let{accessor:y,visibleMediaQuery:_,textAlign:P,width:C,footer:S,footerClassName:D,footerStyle:O,noWrap:N,ellipsis:F}={...n,...g};return w.jsx(Bu,{className:D,style:O,visibleMediaQuery:_,textAlign:P,width:C,title:S,noWrap:N,ellipsis:F},y)})]})})}function zu({group:{id:t,columns:e,groups:r,title:n,textAlign:s,className:d,style:h},maxDepth:a,currentDepth:g,previousGroups:y,isLastGroup:_,withColumnBorders:P=!1,totalTableColumns:C}){let S=Q.useMemo(()=>e&&e.length>0?e:r&&r.length>0?gn([{id:t,columns:e,groups:r}]):[],[e,r,t]),D=Q.useMemo(()=>S.map(({visibleMediaQuery:ee})=>ee),[S]),O=Tu(D),N=Q.useMemo(()=>mn({columns:e,groups:r},O),[t,e,r,O]),F=Q.useMemo(()=>y.reduce((ee,re)=>ee+mn(re,O),0),[y,O]),Y=r&&r.length>0?1:a-g,V=F+N<C,q=$u(_,V,P);return N>0?w.jsx(A.TableTh,{colSpan:N,rowSpan:Y>1?Y:void 0,className:Pe("mantine-datatable-column-group-header-cell",{[_r]:s==="left",[xr]:s==="center",[Cr]:s==="right","mantine-datatable-column-group-header-cell--needs-border":q},d),style:h,children:n??fn(t)}):null}function Fu(){return w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"})]})}function Wu(){return w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",strokeWidth:"0",fill:"currentColor"})]})}function Uu({children:t,isActive:e,filterPopoverProps:r,filterPopoverDisableClickOutside:n}){let[s,{close:d,toggle:h}]=$e.useDisclosure(!1),a=e?Wu:Fu,g=$e.useClickOutside(d);return n&&(g=void 0),w.jsxs(A.Popover,{withArrow:!0,shadow:"md",opened:s,onClose:d,trapFocus:!0,...r,children:[w.jsx(A.PopoverTarget,{children:w.jsx(A.ActionIcon,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":e||void 0,size:"sm",variant:"default",onClick:y=>{y.preventDefault(),h()},onKeyDown:y=>y.stopPropagation(),children:w.jsx(a,{})})}),w.jsx(A.PopoverDropdown,{ref:g,onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),children:typeof t=="function"?t({close:d}):t})]})}var qu=t=>{let{accessor:e,columnRef:r}=t,[n,s]=Q.useState(!1),d=Q.useRef(0),h=Q.useRef({current:0,next:0}),{dir:a}=A.useDirection(),g=a==="rtl",{setMultipleColumnWidths:y}=cn(),_=Q.useCallback(C=>{if(C.preventDefault(),C.stopPropagation(),!r.current)return;let S=r.current,D=S.nextElementSibling;for(;D;){let ee=D.getAttribute("data-accessor");if(ee&&ee!=="__selection__")break;D=D.nextElementSibling}if(!D)return;let O=D.getAttribute("data-accessor");if(!O)return;let N=O==="__selection__";s(!0),d.current=C.clientX;let F=S.offsetWidth,Y=D.offsetWidth;h.current={current:F,next:Y};let V=ee=>{if(!r.current)return;let re=r.current,X=re.nextElementSibling;if(!X)return;let Z=ee.clientX-d.current;g&&(Z=-Z);let U=50,G=h.current.current-U,W=h.current.next-U,ae=Math.max(-G,Math.min(Z,W)),oe=h.current.current+ae,k=h.current.next-ae;re.style.width=`${oe}px`,X.style.width=`${k}px`,re.style.minWidth=`${oe}px`,re.style.maxWidth=`${oe}px`,X.style.minWidth=`${k}px`,X.style.maxWidth=`${k}px`},q=()=>{if(!r.current)return;let ee=r.current,re=ee.nextElementSibling;s(!1),document.body.style.cursor="initial",document.body.style.userSelect="initial";let X=parseInt(ee.style.width)||ee.offsetWidth,Z=re?parseInt(re.style.width)||re.offsetWidth:0,U=[{accessor:e,width:`${X}px`}];if(re&&!N){let G=re.getAttribute("data-accessor");G&&U.push({accessor:G,width:`${Z}px`})}setTimeout(()=>{y(U)},0),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",q)};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",V),document.addEventListener("mouseup",q)},[e,r,g,y]),P=Q.useCallback(()=>{if(!r.current)return;let C=r.current,S=C.nextElementSibling;C.style.width="",C.style.minWidth="",C.style.maxWidth="";let D=[{accessor:e,width:"auto"}];if(S){S.style.width="",S.style.minWidth="",S.style.maxWidth="";let O=S.getAttribute("data-accessor");O&&O!=="__selection__"&&D.push({accessor:O,width:"auto"})}setTimeout(()=>{y(D)},0)},[e,r,y]);return w.jsx("div",{className:"mantine-datatable-header-resizable-handle",style:{cursor:n?"col-resize":void 0},onMouseDown:_,onDoubleClick:P,onClick:C=>C.stopPropagation(),title:"Drag to resize column, double-click to reset"})};function Vu(){return w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M12 5l0 14"}),w.jsx("path",{d:"M16 9l-4 -4"}),w.jsx("path",{d:"M8 9l4 -4"})]})}function Hu(){return w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M8 7l4 -4l4 4"}),w.jsx("path",{d:"M8 17l4 4l4 -4"}),w.jsx("path",{d:"M12 3l0 18"})]})}function Gu(){return w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),w.jsx("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),w.jsx("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),w.jsx("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),w.jsx("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),w.jsx("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}function Qu(){return w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M18 6l-12 12"}),w.jsx("path",{d:"M6 6l12 12"})]})}function Zu({className:t,style:e,accessor:r,visibleMediaQuery:n,title:s,sortable:d,draggable:h,toggleable:a,resizable:g,sortIcons:y,textAlign:_,width:P,sortStatus:C,onSortStatusChange:S,filter:D,filterPopoverProps:O,filterPopoverDisableClickOutside:N,filtering:F,sortKey:Y}){let{setSourceColumn:V,setTargetColumn:q,swapColumns:ee,setColumnsToggle:re}=cn(),[X,Z]=Q.useState(!1),U=Q.useRef(null);if(!wr(n))return null;let G=s??fn(r),W=typeof G=="string"?G:void 0,ae=d&&S?m=>{m?.defaultPrevented||S({sortKey:Y,columnAccessor:r,direction:C?.columnAccessor===r?C.direction==="asc"?"desc":"asc":C?.direction??"asc"})}:void 0,oe=m=>{m.stopPropagation(),V(r),Z(!1)},k=m=>{m.preventDefault(),q(r),Z(!0)},x=()=>{q(r),Z(!1),ee()},b=()=>{Z(!0)},u=()=>{Z(!1)},c=m=>{m.stopPropagation(),re(f=>f.map(i=>i.accessor===r?{...i,toggled:!1}:i))};return w.jsxs(A.TableTh,{"data-accessor":r,className:Pe({"mantine-datatable-header-cell-sortable":d,"mantine-datatable-header-cell-toggleable":a,"mantine-datatable-header-cell-resizable":g},t),style:[{width:P,...g?{}:{minWidth:P,maxWidth:P}},e],role:d?"button":void 0,tabIndex:d?0:void 0,onClick:ae,onKeyDown:m=>m.key==="Enter"&&ae?.(),ref:U,children:[w.jsxs(A.Group,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[w.jsxs(A.Flex,{align:"center",w:"100%",className:Pe({"mantine-datatable-header-cell-draggable":h,"mantine-datatable-header-cell-drag-over":X}),draggable:h,onDragStart:h?oe:void 0,onDragEnter:h?b:void 0,onDragOver:h?k:void 0,onDrop:h?x:void 0,onDragLeave:h?u:void 0,children:[h?w.jsx(A.Center,{role:"img","aria-label":"Drag column",children:w.jsx(A.ActionIcon,{className:"mantine-datatable-header-cell-draggable-action-icon",variant:"subtle",size:"xs",onClick:m=>{m.stopPropagation()},children:w.jsx(Gu,{})})}):null,w.jsx(A.Box,{className:Pe("mantine-datatable-header-cell-sortable-text",{[_r]:_==="left",[xr]:_==="center",[Cr]:_==="right"},yn,vn),title:W,children:G})]}),a?w.jsx(A.Center,{className:"mantine-datatable-header-cell-toggleable-icon",role:"img","aria-label":"Toggle column",children:w.jsx(A.ActionIcon,{size:"xs",variant:"light",onClick:c,children:w.jsx(Qu,{})})}):null,d||C?.columnAccessor===r?w.jsx(w.Fragment,{children:C?.columnAccessor===r?w.jsx(A.Center,{className:Pe("mantine-datatable-header-cell-sortable-icon",{"mantine-datatable-header-cell-sortable-icon-reversed":C.direction==="desc"}),role:"img","aria-label":`Sorted ${C.direction==="desc"?"descending":"ascending"}`,children:y?.sorted||w.jsx(Vu,{})}):w.jsx(A.Center,{className:"mantine-datatable-header-cell-sortable-unsorted-icon",role:"img","aria-label":"Not sorted",children:y?.unsorted||w.jsx(Hu,{})})}):null,D?w.jsx(Uu,{filterPopoverProps:O,isActive:!!F,filterPopoverDisableClickOutside:N,children:D}):null]}),g&&r!=="__selection__"?w.jsx(qu,{accessor:r,columnRef:U}):null]})}function Ku({className:t,style:e,trigger:r,shadowVisible:n,checked:s,indeterminate:d,checkboxProps:h,onChange:a,rowSpan:g,ref:y}){let _=!h.disabled;return w.jsx(A.TableTh,{ref:y,className:Pe("mantine-datatable-header-selector-cell",{[St]:r==="cell"&&_},t),style:e,rowSpan:g,"data-shadow-visible":n||void 0,"data-accessor":"__selection__",onClick:r==="cell"&&_?a:void 0,children:w.jsx(A.Checkbox,{classNames:_?{input:St}:void 0,checked:s,indeterminate:d,onChange:a,...h,disabled:!(a||h.onChange)||h.disabled})})}function Ju({selectionColumnHeaderRef:t,className:e,style:r,sortStatus:n,sortIcons:s,onSortStatusChange:d,columns:h,defaultColumnProps:a,groups:g,selectionTrigger:y,selectionVisible:_,selectionChecked:P,selectionIndeterminate:C,onSelectionChange:S,selectionCheckboxProps:D,selectorCellShadowVisible:O,selectionColumnClassName:N,selectionColumnStyle:F,withColumnBorders:Y=!1,ref:V}){let q=g?xs(g):0,ee=q>0?q+1:1,re=_?w.jsx(Ku,{ref:t,className:N,style:F,trigger:y,shadowVisible:O,checked:P,indeterminate:C,checkboxProps:D,onChange:S,rowSpan:g?ee:void 0}):null,{columnsToggle:X,setColumnsToggle:Z}=cn(),[U,G]=Q.useState(!1),W=h.some(k=>k.toggleable),ae=W?Object.fromEntries(h.map(({accessor:k,title:x})=>[k,x??fn(String(k))])):void 0,oe=w.jsxs(A.TableThead,{className:Pe("mantine-datatable-header",e),style:r,ref:V,onContextMenu:W?k=>{k.preventDefault(),G(x=>!x)}:void 0,children:[g&&Array.from({length:q},(k,x)=>{let b=Cs(g,x);return w.jsxs(A.TableTr,{children:[x===0&&re,b.map((u,c)=>w.jsx(zu,{group:u,maxDepth:q,currentDepth:x,previousGroups:b.slice(0,c),isLastGroup:c===b.length-1,withColumnBorders:Y,totalTableColumns:h.length},u.id))]},`group-depth-${x}`)}),w.jsxs(A.TableTr,{children:[!g&&re,h.map(({hidden:k,...x},b)=>{if(k)return null;let{accessor:u,visibleMediaQuery:c,textAlign:m,width:f,title:i,sortable:v,draggable:T,toggleable:j,resizable:K,titleClassName:J,titleStyle:te,filter:H,filterPopoverProps:ie,filterPopoverDisableClickOutside:se,filtering:le,sortKey:E}={...a,...x};return w.jsx(Zu,{accessor:u,className:J,style:te,visibleMediaQuery:c,textAlign:m,width:f,title:i,sortable:v,draggable:T,toggleable:j,resizable:K&&b<h.length-1,sortStatus:n,sortIcons:s,sortKey:E,onSortStatusChange:d,filter:H,filterPopoverProps:ie,filterPopoverDisableClickOutside:se,filtering:le},u)})]})]});return W?w.jsxs(A.Popover,{position:"bottom",withArrow:!0,shadow:"md",opened:U,onChange:G,children:[w.jsx(A.PopoverTarget,{children:oe}),w.jsx(A.PopoverDropdown,{children:w.jsx(A.Stack,{children:X.filter(k=>k.toggleable).map(k=>w.jsx(A.Group,{children:w.jsx(A.Checkbox,{classNames:{label:"mantine-datatable-header-column-toggle-checkbox-label"},size:"xs",label:ae[k.accessor],checked:k.toggled,onChange:x=>{Z(X.map(b=>b.accessor===k.accessor?{...b,toggled:x.currentTarget.checked}:b))}})},k.accessor))})})]}):oe}function Xu({fetching:t,customContent:e,backgroundBlur:r,size:n,type:s,color:d}){return w.jsx(A.Center,{className:Pe("mantine-datatable-loader",{"mantine-datatable-loader-fetching":t}),style:[{backdropFilter:r?`blur(${r}px)`:void 0}],children:t&&(e||w.jsx(A.Loader,{size:n,type:s,color:d}))})}function Me(t,e,r){return t?A.parseThemeColor({color:typeof t=="object"?t[r]:t,theme:e}).value:void 0}function ec({theme:t,c:e,backgroundColor:r,borderColor:n,rowBorderColor:s,stripedColor:d,highlightOnHoverColor:h}){return{"--mantine-datatable-color-light":Me(e,t,"light"),"--mantine-datatable-color-dark":Me(e,t,"dark"),"--mantine-datatable-background-color-light":Me(r,t,"light"),"--mantine-datatable-background-color-dark":Me(r,t,"dark"),"--mantine-datatable-border-color-light":Me(n,t,"light"),"--mantine-datatable-border-color-dark":Me(n,t,"dark"),"--mantine-datatable-row-border-color-light":Me(s,t,"light"),"--mantine-datatable-row-border-color-dark":Me(s,t,"dark"),"--mantine-datatable-striped-color-light":Me(d,t,"light"),"--mantine-datatable-striped-color-dark":Me(d,t,"dark"),"--mantine-datatable-highlight-on-hover-color-light":Me(h,t,"light"),"--mantine-datatable-highlight-on-hover-color-dark":Me(h,t,"dark")}}function Ds({theme:t,paginationActiveTextColor:e,paginationActiveBackgroundColor:r}){return{"--mantine-datatable-pagination-active-text-color-light":Me(e,t,"light"),"--mantine-datatable-pagination-active-text-color-dark":Me(e,t,"dark"),"--mantine-datatable-pagination-active-background-color-light":Me(r,t,"light"),"--mantine-datatable-pagination-active-background-color-dark":Me(r,t,"dark")}}function tc({theme:t,color:e,backgroundColor:r}){return{"--mantine-datatable-row-color-light":Me(e,t,"light"),"--mantine-datatable-row-color-dark":Me(e,t,"dark"),"--mantine-datatable-row-background-color-light":Me(r,t,"light"),"--mantine-datatable-row-background-color-dark":Me(r,t,"dark")}}function rc(){return w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M8 9l4 -4l4 4"}),w.jsx("path",{d:"M16 15l-4 4l-4 -4"})]})}var ks={xs:A.rem(22),sm:A.rem(26),md:A.rem(32),lg:A.rem(38),xl:A.rem(44)};function nc({size:t,label:e,values:r,value:n,activeTextColor:s,activeBackgroundColor:d,onChange:h}){return w.jsxs(A.Group,{gap:"xs",children:[w.jsx(A.Text,{component:"div",size:t,children:e}),w.jsxs(A.Menu,{withinPortal:!0,withArrow:!0,offset:2,classNames:{arrow:"mantine-datatable-page-size-selector-menu-arrow"},children:[w.jsx(A.MenuTarget,{children:w.jsx(A.Button,{size:t,variant:"default",classNames:{section:"mantine-datatable-page-size-selector-button-icon"},rightSection:w.jsx(rc,{}),style:[{fontWeight:"normal"},a=>({height:ks[t],paddingLeft:a.spacing[t],paddingRight:a.spacing[t]})],children:n})}),w.jsx(A.MenuDropdown,{children:r.map(a=>{let g=a===n;return w.jsx(A.MenuItem,{className:Pe({"mantine-datatable-page-size-selector-active":g}),style:[{height:ks[t]},g&&(s||d)?y=>Ds({theme:y,paginationActiveTextColor:s,paginationActiveBackgroundColor:d}):void 0],disabled:g,onClick:()=>h(a),children:w.jsx(A.Text,{component:"div",size:t,children:a})},a)})})]})]})}function oc({className:t,style:e,fetching:r,page:n,onPageChange:s,paginationWithEdges:d,paginationWithControls:h,paginationActiveTextColor:a,paginationActiveBackgroundColor:g,paginationSize:y,loadingText:_,noRecordsText:P,paginationText:C,totalRecords:S,recordsPerPage:D,onRecordsPerPageChange:O,recordsPerPageLabel:N,recordsPerPageOptions:F,recordsLength:Y,horizontalSpacing:V,paginationWrapBreakpoint:q,getPaginationControlProps:ee,getPaginationItemProps:re,renderPagination:X}){let Z;if(S){let x=(n-1)*D+1,b=x+(Y||0)-1;Z=C({from:x,to:b,totalRecords:S})}else Z=r?_:P;let U=S&&D?Math.max(1,Math.ceil(S/D)):1,G=S?(n-1)*(D??0)+1:void 0,W=S?(G??1)+(Y??0)-1:void 0,ae=!wr(({breakpoints:x})=>`(min-width: ${typeof q=="number"?`${A.rem(q)}rem`:x[q]||q})`),oe={Text:x=>w.jsx(A.Text,{component:"div",className:"mantine-datatable-pagination-text",size:y,...x,children:Z}),PageSizeSelector:x=>F?w.jsx(nc,{activeTextColor:a,activeBackgroundColor:g,size:y,label:N,values:F,value:D,onChange:O,...x}):w.jsx(w.Fragment,{}),Pagination:x=>w.jsx(A.Pagination,{classNames:{root:Pe("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":r||!Y}),control:"mantine-datatable-pagination-pages-control"},style:a||g?b=>Ds({theme:b,paginationActiveTextColor:a,paginationActiveBackgroundColor:g}):void 0,withEdges:d,withControls:h,value:n,onChange:s,size:y,total:U,getControlProps:ee,getItemProps:re,...x})},k={state:{paginationSize:y,page:n,totalPages:U,totalRecords:S,recordsPerPage:D,recordsLength:Y,fetching:r,from:G,to:W,isWrapped:ae},actions:{setPage:x=>s?.(x),setRecordsPerPage:O?x=>O(x):void 0},Controls:oe};return w.jsx(A.Box,{px:V??"xs",py:"xs",className:Pe("mantine-datatable-pagination",t),style:[{flexDirection:ae?"column":"row"},e],children:typeof X=="function"?X(k):w.jsxs(w.Fragment,{children:[w.jsx(oe.Text,{}),w.jsx(oe.PageSizeSelector,{}),w.jsx(oe.Pagination,{})]})})}function sc({className:t,style:e,visibleMediaQuery:r,record:n,index:s,onClick:d,onDoubleClick:h,onContextMenu:a,noWrap:g,ellipsis:y,textAlign:_,width:P,accessor:C,render:S,defaultRender:D,customCellAttributes:O}){return wr(r)?w.jsx(A.TableTd,{className:Pe({[yn]:g||y,[vn]:y,[St]:d||h,[Ss]:a,[_r]:_==="left",[xr]:_==="center",[Cr]:_==="right"},t),style:[{width:P,minWidth:P,maxWidth:P},e],onClick:d,onDoubleClick:h,onContextMenu:a,...O?.(n,s),children:S?S(n,s):D?D(n,s,C):_s(n,C)}):null}function ic({open:t,colSpan:e,content:r,collapseProps:n}){let{expanded:s,visible:d}=Nu(t,n?.transitionDuration);return d?w.jsxs(w.Fragment,{children:[w.jsx(A.TableTr,{}),w.jsx(A.TableTr,{children:w.jsx(A.TableTd,{className:"mantine-datatable-row-expansion-cell",colSpan:e,children:w.jsx(A.Collapse,{in:s,...n,children:w.jsx("div",{className:"mantine-datatable-row-expansion-cell-content",children:r()})})})})]}):null}function ac({className:t,style:e,record:r,index:n,trigger:s,onChange:d,withRightShadow:h,checkboxProps:a,getCheckboxProps:g,...y}){let _={...a,...g(r,n)},P=!y.disabled&&!_.disabled,C=S=>{S.stopPropagation(),s==="cell"&&P&&d?.(S)};return w.jsx(A.TableTd,{className:Pe("mantine-datatable-row-selector-cell",{[St]:s==="cell"&&P},t),style:e,"data-shadow-visible":h||void 0,onClick:C,children:w.jsx(A.Checkbox,{classNames:P?{input:St}:void 0,onChange:d,...y,..._})})}function lc({record:t,index:e,columns:r,defaultColumnProps:n,defaultColumnRender:s,selectionTrigger:d,selectionVisible:h,selectionChecked:a,onSelectionChange:g,isRecordSelectable:y,selectionCheckboxProps:_,getSelectionCheckboxProps:P,onClick:C,onDoubleClick:S,onContextMenu:D,onCellClick:O,onCellDoubleClick:N,onCellContextMenu:F,expansion:Y,customAttributes:V,color:q,backgroundColor:ee,className:re,style:X,selectorCellShadowVisible:Z,selectionColumnClassName:U,selectionColumnStyle:G,rowFactory:W}){let ae=w.jsxs(w.Fragment,{children:[h&&w.jsx(ac,{className:U,style:G,record:t,index:e,trigger:d,withRightShadow:Z,checked:a,disabled:!g||(y?!y(t,e):!1),onChange:g,checkboxProps:_,getCheckboxProps:P}),r.map(({hidden:x,hiddenContent:b,...u},c)=>{if(x||b)return null;let{accessor:m,visibleMediaQuery:f,textAlign:i,noWrap:v,ellipsis:T,width:j,render:K,cellsClassName:J,cellsStyle:te,customCellAttributes:H}={...n,...u};return w.jsx(sc,{className:typeof J=="function"?J(t,e):J,style:te?.(t,e),visibleMediaQuery:f,record:t,index:e,onClick:O?ie=>O({event:ie,record:t,index:e,column:u,columnIndex:c}):void 0,onDoubleClick:N?ie=>N({event:ie,record:t,index:e,column:u,columnIndex:c}):void 0,onContextMenu:F?ie=>F({event:ie,record:t,index:e,column:u,columnIndex:c}):void 0,accessor:m,textAlign:i,noWrap:v,ellipsis:T,width:j,render:K,defaultRender:s,customCellAttributes:H},m)})]}),oe=Y&&w.jsx(ic,{colSpan:r.filter(({hidden:x})=>!x).length+(h?1:0),open:Y.isRowExpanded(t),content:Y.content({record:t,index:e}),collapseProps:Y.collapseProps}),k=uc({record:t,index:e,selectionChecked:a,onClick:C,onDoubleClick:S,onContextMenu:D,expansion:Y,customAttributes:V,color:q,backgroundColor:ee,className:re,style:X});return W?W({record:t,index:e,rowProps:k,children:ae,expandedElement:oe}):w.jsxs(w.Fragment,{children:[w.jsx(A.TableTr,{...k,children:ae}),oe]})}function uc({record:t,index:e,selectionChecked:r,onClick:n,onDoubleClick:s,onContextMenu:d,expansion:h,customAttributes:a,color:g,backgroundColor:y,className:_,style:P}){return{className:Pe("mantine-datatable-row",{[St]:n||s||h?.isExpandable({record:t,index:e})&&h?.expandOnClick},{[Ss]:d},typeof _=="function"?_(t,e):_),"data-selected":r||void 0,onClick:C=>{if(h){let{isExpandable:S,isRowExpanded:D,expandOnClick:O,expandRow:N,collapseRow:F}=h;S({record:t,index:e})&&O&&(D(t)?F(t):N(t))}n?.({event:C,record:t,index:e})},onDoubleClick:s?C=>s({event:C,record:t,index:e}):void 0,onContextMenu:d?C=>d({event:C,record:t,index:e}):void 0,style:[g||y?C=>{let S=g?.(t,e),D=y?.(t,e);return tc({theme:C,color:S,backgroundColor:D})}:void 0,P?.(t,e)],...a?.(t,e)??{}}}function cc({leftShadowBehind:t,rightShadowBehind:e,onScrollPositionChange:r,children:n,viewportRef:s,scrollAreaProps:d}){return w.jsxs(A.ScrollArea,{...d,viewportRef:s,classNames:{root:"mantine-datatable-scroll-area",scrollbar:"mantine-datatable-scroll-area-scrollbar",thumb:"mantine-datatable-scroll-area-thumb",corner:"mantine-datatable-scroll-area-corner"},onScrollPositionChange:r,children:[n,w.jsx(A.Box,{className:Pe("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow")}),w.jsx("div",{className:Pe("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-behind":t})}),w.jsx("div",{className:Pe("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-behind":e})}),w.jsx(A.Box,{className:Pe("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow")})]})}function dc({withTableBorder:t,borderRadius:e,textSelectionDisabled:r,height:n="100%",minHeight:s,maxHeight:d,shadow:h,verticalAlign:a="center",fetching:g,columns:y,storeColumnsKey:_,groups:P,pinFirstColumn:C,pinLastColumn:S,defaultColumnProps:D,defaultColumnRender:O,idAccessor:N="id",records:F,selectionTrigger:Y="checkbox",selectedRecords:V,onSelectedRecordsChange:q,selectionColumnClassName:ee,selectionColumnStyle:re,isRecordSelectable:X,selectionCheckboxProps:Z,allRecordsSelectionCheckboxProps:U={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:G=(Ke,Ut)=>({"aria-label":`Select record ${Ut+1}`}),sortStatus:W,sortIcons:ae,onSortStatusChange:oe,horizontalSpacing:k,page:x,onPageChange:b,totalRecords:u,recordsPerPage:c,onRecordsPerPageChange:m,recordsPerPageOptions:f,recordsPerPageLabel:i="Records per page",paginationWithEdges:v,paginationWithControls:T,paginationActiveTextColor:j,paginationActiveBackgroundColor:K,paginationSize:J="sm",paginationText:te=({from:Ke,to:Ut,totalRecords:_n})=>`${Ke} - ${Ut} / ${_n}`,paginationWrapBreakpoint:H="sm",getPaginationControlProps:ie=Ke=>Ke==="previous"?{"aria-label":"Previous page"}:Ke==="next"?{"aria-label":"Next page"}:{},getPaginationItemProps:se,renderPagination:le,loaderBackgroundBlur:E,customLoader:L,loaderSize:$,loaderType:B,loaderColor:I,loadingText:ce="...",emptyState:o,noRecordsText:l="No records",noRecordsIcon:p,highlightOnHover:M,striped:R,noHeader:z,onRowClick:ue,onRowDoubleClick:he,onRowContextMenu:pe,onCellClick:ne,onCellDoubleClick:fe,onCellContextMenu:me,onScroll:ge,onScrollToTop:De,onScrollToBottom:xe,onScrollToLeft:Ce,onScrollToRight:Le,c:Oe,backgroundColor:Se,borderColor:Je,rowBorderColor:Ee,stripedColor:Ue,highlightOnHoverColor:Be,rowColor:it,rowBackgroundColor:yt,rowExpansion:Ae,rowClassName:Xe,rowStyle:et,customRowAttributes:tt,scrollViewportRef:at,scrollAreaProps:rt,tableRef:qe,bodyRef:Ze,m:nt,my:ve,mx:be,mt:ke,mb:pt,ml:Ye,mr:Te,className:ot,classNames:Ie,style:Dt,styles:Wt,rowFactory:Tc,tableWrapper:bn,...wn}){let Ke=Q.useMemo(()=>P?gn(P):y,[y,P]),[Ut,_n]=Q.useState(!1),{refs:st,onScroll:jc}=Pu({scrollCallbacks:{onScroll:ge,onScrollToTop:De,onScrollToBottom:xe,onScrollToLeft:Ce,onScrollToRight:Le},withRowBorders:wn.withRowBorders}),xn=ku({key:_,columns:Ke,headerRef:st.header,scrollViewportRef:st.scrollViewport,onFixedLayoutChange:_n}),$c=$e.useMergedRef(st.table,qe),Rc=$e.useMergedRef(st.scrollViewport,at),Nc=Ru({rowExpansion:Ae,records:F,idAccessor:N}),Sr=Q.useRef(!1),js=Q.useRef(x),Cn=Q.useRef(F),Lc=Q.useCallback(we=>{Sr.current=!0,Cn.current=F,b(we)},[b,F]);Q.useEffect(()=>{js.current!==x&&(Sr.current=!0,Cn.current=F,js.current=x)},[x,F]);let Dr=F?.length;Q.useLayoutEffect(()=>{if(!Sr.current||g||F===Cn.current)return;let we=st.scrollViewport.current;if(!we)return;let vt=requestAnimationFrame(()=>{we.scrollTo({top:0,left:0}),Sr.current=!1});return()=>cancelAnimationFrame(vt)},[g,F,st.scrollViewport]);let $s=F?.map(we=>Ne(we,N)),kt=!!V,qt=V?.map(we=>Ne(we,N)),Rs=$s!==void 0&&qt!==void 0&&qt.length>0,Sn=X?F?.filter(X):F,kr=Sn?.map(we=>Ne(we,N)),Pr=Rs&&kr.every(we=>qt.includes(we)),Bc=Rs&&kr.some(we=>qt.includes(we)),Ic=Q.useCallback(()=>{V&&q&&q(Pr?V.filter(we=>!kr.includes(Ne(we,N))):pn([...V,...Sn],we=>Ne(we,N)))},[Pr,N,q,kr,Sn,V]),{lastSelectionChangeIndex:Mr,setLastSelectionChangeIndex:Yc}=Mu($s),Dn=kt&&!C,zc={m:nt,my:ve,mx:be,mt:ke,mb:pt,ml:Ye,mr:Te},Fc=Q.useCallback(({children:we})=>bn?bn({children:we}):we,[bn]);return w.jsx(ps,{...xn,children:w.jsxs(A.Box,{ref:st.root,...zc,className:Pe("mantine-datatable",{"mantine-datatable-with-border":t},ot,Ie?.root),style:[we=>({...ec({theme:we,c:Oe,backgroundColor:Se,borderColor:Je,rowBorderColor:Ee,stripedColor:Ue,highlightOnHoverColor:Be}),borderRadius:we.radius[e]||e,boxShadow:we.shadows[h]||h,height:n,minHeight:s,maxHeight:d}),Dt,Wt?.root,{position:"relative"}],children:[w.jsx(cc,{viewportRef:Rc,leftShadowBehind:kt||!!C,rightShadowBehind:S,onScrollPositionChange:jc,scrollAreaProps:rt,children:w.jsx(Fc,{children:w.jsxs(A.Table,{ref:$c,horizontalSpacing:k,className:Pe("mantine-datatable-table",{[Lu]:r,"mantine-datatable-vertical-align-top":a==="top","mantine-datatable-vertical-align-bottom":a==="bottom","mantine-datatable-pin-last-column":S,"mantine-datatable-selection-column-visible":kt,"mantine-datatable-pin-first-column":C,"mantine-datatable-resizable-columns":xn.hasResizableColumns&&Ut},Ie?.table),style:{...Wt?.table},"data-striped":Dr&&R||void 0,"data-highlight-on-hover":M||void 0,...wn,children:[z?null:w.jsx(ps,{...xn,children:w.jsx(Ju,{ref:st.header,selectionColumnHeaderRef:st.selectionColumnHeader,className:Ie?.header,style:Wt?.header,columns:Ke,defaultColumnProps:D,groups:P,sortStatus:W,sortIcons:ae,onSortStatusChange:oe,selectionTrigger:Y,selectionVisible:kt,selectionChecked:Pr,selectionIndeterminate:Bc&&!Pr,onSelectionChange:Ic,selectionCheckboxProps:{...Z,...U},selectorCellShadowVisible:Dn,selectionColumnClassName:ee,selectionColumnStyle:re,withColumnBorders:wn.withColumnBorders})}),w.jsx("tbody",{ref:Ze,children:Dr?F.map((we,vt)=>{let kn=Ne(we,N),Pn=qt?.includes(kn)||!1,Ns;return q&&V&&(Ns=Wc=>{if(Wc.nativeEvent.shiftKey&&Mr!==null){let Pt=F.filter(vt>Mr?(bt,wt)=>wt>=Mr&&wt<=vt&&(X?X(bt,wt):!0):(bt,wt)=>wt>=vt&&wt<=Mr&&(X?X(bt,wt):!0));q(Pn?ju(V,Pt,bt=>Ne(bt,N)):pn([...V,...Pt],bt=>Ne(bt,N)))}else q(Pn?V.filter(Pt=>Ne(Pt,N)!==kn):pn([...V,we],Pt=>Ne(Pt,N)));Yc(vt)}),w.jsx(lc,{record:we,index:vt,columns:Ke,defaultColumnProps:D,defaultColumnRender:O,selectionTrigger:Y,selectionVisible:kt,selectionChecked:Pn,onSelectionChange:Ns,isRecordSelectable:X,selectionCheckboxProps:Z,getSelectionCheckboxProps:G,onClick:ue,onDoubleClick:he,onCellClick:ne,onCellDoubleClick:fe,onContextMenu:pe,onCellContextMenu:me,expansion:Nc,color:it,backgroundColor:yt,className:Xe,style:et,customAttributes:tt,selectorCellShadowVisible:Dn,selectionColumnClassName:ee,selectionColumnStyle:re,idAccessor:N,rowFactory:Tc},kn)}):w.jsx(wu,{})}),Ke.some(({footer:we})=>we)&&w.jsx(Yu,{ref:st.footer,className:Ie?.footer,style:Wt?.footer,columns:Ke,defaultColumnProps:D,selectionVisible:kt,selectorCellShadowVisible:Dn})]})})}),x&&w.jsx(oc,{className:Ie?.pagination,style:Wt?.pagination,horizontalSpacing:k,fetching:g,page:x,onPageChange:Lc,totalRecords:u,recordsPerPage:c,onRecordsPerPageChange:m,recordsPerPageOptions:f,recordsPerPageLabel:i,paginationWithEdges:v,paginationWithControls:T,paginationActiveTextColor:j,paginationActiveBackgroundColor:K,paginationSize:J,paginationText:te,paginationWrapBreakpoint:H,getPaginationControlProps:ie,getPaginationItemProps:se,noRecordsText:l,loadingText:ce,recordsLength:Dr,renderPagination:le}),w.jsx(Xu,{fetching:g,backgroundBlur:E,customContent:L,size:$,type:B,color:I}),w.jsx(xu,{icon:p,text:l,active:!g&&!Dr,children:o})]})})}function Ps(t){const e=Ve.c(41),{fields:r,onClose:n,queryKey:s,apiPath:d,id:h,steps:a}=t,[g,y]=Q.useState(0),[_,P]=Q.useState(!1),{data:C,isLoading:S}=Fo(d,s,h),{mutateAsync:D,isError:O,error:N,isPending:F}=rn(d,s);let Y;e[0]!==r?(Y=new Set(r.filter(yc).map(mc)),e[0]=r,e[1]=Y):Y=e[1];let V;e[2]!==Y?(V=[...Y],e[2]=Y,e[3]=V):V=e[3];const q=V;let ee;e[4]!==r?(ee=r.reduce(gc,{}),e[4]=r,e[5]=ee):ee=e[5];let re;e[6]!==r?(re=r.filter(pc).reduce(fc,{}),e[6]=r,e[7]=re):re=e[7];let X;e[8]!==ee||e[9]!==re?(X={mode:"uncontrolled",initialValues:ee,validate:re},e[8]=ee,e[9]=re,e[10]=X):X=e[10];const Z=Mn.useForm(X);let U;e[11]!==C||e[12]!==r||e[13]!==Z?(U=()=>{if(C){const b={...C};r.forEach(u=>{const c=u.id;u.type==="boolean"&&b[c]===null?b[c]=!1:u.type==="date"&&b[c]?b[c]=new Date(b[c]):b[c]===null&&(b[c]="")}),Z.initialize(b),Z.setValues(b)}},e[11]=C,e[12]=r,e[13]=Z,e[14]=U):U=e[14];let G;e[15]!==C?(G=[C],e[15]=C,e[16]=G):G=e[16],Q.useEffect(U,G);let W;e[17]!==Z||e[18]!==h?(W=function(u){const c=Z.getValues();return u.conditional&&!u.conditional(c)?null:w.jsxs(Q.Fragment,{children:[(u.type===void 0||u.type=="text")&&w.jsx(A.TextInput,{label:u.column.title,placeholder:u.placeholder??"",...Z.getInputProps(u.id),type:u.id.includes("email")?"email":void 0,required:u.required},Z.key(u.id)),u.type==="number"&&w.jsx(A.NumberInput,{decimalSeparator:",",label:u.column.title,placeholder:u.placeholder??"",...Z.getInputProps(u.id),required:u.required},Z.key(u.id)),u.type==="date"&&w.jsx(br,{label:u.column.title,placeholder:u.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...Z.getInputProps(u.id),required:u.required},Z.key(u.id)),u.type==="boolean"&&w.jsx(A.Checkbox,{mt:"md",label:u.column.title,...Z.getInputProps(u.id,{type:"checkbox"}),required:u.required},Z.key(u.id)),u.type==="textarea"&&w.jsx(A.Textarea,{label:u.column.title,placeholder:u.placeholder??"",...Z.getInputProps(u.id),minRows:3,autosize:!0,required:u.required},Z.key(u.id)),u.type==="custom"&&u.render&&u.render({...Z.getValues(),id:h},Z.setValues,P,{error:Z.getInputProps(u.id).error,required:u.required})]},u.id)},e[17]=Z,e[18]=h,e[19]=W):W=e[19];const ae=W;let oe;e[20]!==O||e[21]!==N?.message||e[22]!==N?.name?(oe=O&&w.jsx(A.Alert,{variant:"outline",color:"red",title:N?.name??"Fehler aufgetreten",mb:"lg",children:N?.message??"Fehler aufgetreten"}),e[20]=O,e[21]=N?.message,e[22]=N?.name,e[23]=oe):oe=e[23];let k;e[24]!==g||e[25]!==r||e[26]!==Z||e[27]!==_||e[28]!==h||e[29]!==S||e[30]!==F||e[31]!==O||e[32]!==n||e[33]!==ae||e[34]!==a||e[35]!==q||e[36]!==D?(k=S?w.jsxs(A.Stack,{gap:"md",children:[w.jsx(A.Skeleton,{height:40}),Array(r.length).fill(0).map(hc),w.jsxs(A.Group,{mt:"md",justify:"end",children:[w.jsx(A.Skeleton,{width:100,height:36}),w.jsx(A.Skeleton,{width:100,height:36})]})]}):w.jsxs("form",{onSubmit:Z.onSubmit(async b=>{await D({...b,id:h}),q.length&&g<q.length-1?O||y(g+1):O||(Z.setInitialValues(b),Z.reset(),n())}),children:[q.length?w.jsx(A.Stepper,{active:g,size:"sm",children:q.map(b=>w.jsx(A.Stepper.Step,{...a&&a[b-1]?{label:a[b-1].label}:{},children:r.filter(u=>u.step===b).map(u=>ae(u))},b))}):r.map(b=>ae(b)),!_&&w.jsxs(A.Group,{mt:"md",justify:"end",children:[w.jsx(A.Button,{onClick:()=>q.length?g===0?n():y(g-1):n(),variant:"outline",children:q.length?g===0?"Abbrechen":"Zurück":"Abbrechen"}),w.jsx(A.Button,{type:"submit",loading:F,children:q.length?g===q.length-1?"Speichern":"Weiter":"Speichern"})]})]}),e[24]=g,e[25]=r,e[26]=Z,e[27]=_,e[28]=h,e[29]=S,e[30]=F,e[31]=O,e[32]=n,e[33]=ae,e[34]=a,e[35]=q,e[36]=D,e[37]=k):k=e[37];let x;return e[38]!==k||e[39]!==oe?(x=w.jsxs(w.Fragment,{children:[oe,k]}),e[38]=k,e[39]=oe,e[40]=x):x=e[40],x}function hc(t,e){return w.jsx(A.Skeleton,{height:35},`skeleton-field-${e}`)}function fc(t,e){return t[e.id]=(r,n)=>e.conditional&&!e.conditional(n)||r?null:"Pflichtfeld",t}function pc(t){return t.required}function gc(t,e){return t[e.id]=e.type==="boolean"?e.defaultValue??!1:e.defaultValue??"",t}function mc(t){return t.step}function yc(t){return typeof t.step=="number"}function Ms({queryKey:t,apiPath:e,onClose:r,selectedRecords:n}){const{mutateAsync:s,isError:d,error:h,isPending:a}=qo(e,t),[g,y]=Q.useState(n),[_,P]=Q.useState(!1),C=_||a;return Q.useEffect(()=>{g.length||r()},[r,g]),g.length?w.jsxs(w.Fragment,{children:[d&&h.message&&w.jsx(A.Alert,{variant:"outline",color:"red",title:h.name,children:h.message}),w.jsx(A.Text,{children:g.length===1?`Soll ${g.length} Eintrag wirklich gelöscht werden?`:`Sollen ${g.length} Einträge wirklich gelöscht werden?`}),w.jsxs(A.Group,{mt:"md",justify:"end",children:[w.jsx(A.Button,{onClick:r,variant:"outline",disabled:C,children:"Abbrechen"}),w.jsx(A.Button,{color:"red",loading:C,onClick:async()=>{P(!0);try{await Promise.all(g.map(S=>s(S.id))),y([])}finally{P(!1)}},children:"Löschen"})]})]}):w.jsx(w.Fragment,{})}function Os(t,e){const r=Ve.c(8);let n;r[0]!==t||r[1]!==e?(n=()=>{const y=localStorage.getItem(`use_persistent_storage_${e}`);return y?JSON.parse(y):t},r[0]=t,r[1]=e,r[2]=n):n=r[2];const[s,d]=Q.useState(n);let h;r[3]!==e?(h=y=>{d(y),localStorage.setItem(`use_persistent_storage_${e}`,JSON.stringify(y))},r[3]=e,r[4]=h):h=r[4];const a=h;let g;return r[5]!==a||r[6]!==s?(g=[s,a],r[5]=a,r[6]=s,r[7]=g):g=r[7],g}const vc=(t,e)=>{const r=t.map(g=>g[e]).filter(g=>g!=null&&g!=="");if(r.length===0)return"string";const n=Math.min(100,r.length),s=r.slice(0,n),d={string:0,number:0,date:0},h=[/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/,/^\d{4}-\d{2}-\d{2}$/,/^\d{1,2}\/\d{1,2}\/\d{4}$/,/^\d{1,2}\.\d{1,2}\.\d{4}$/];s.forEach(g=>{if(typeof g=="number")d.number++;else if(typeof g=="string"){const y=g.trim();if(y!==""&&!isNaN(Number(y))&&!isNaN(parseFloat(y))){d.number++;return}if(h.some(_=>_.test(y))){const _=new Date(y);if(!isNaN(_.getTime())){d.date++;return}}d.string++}else g instanceof Date?d.date++:d.string++});const a=d.string+d.number+d.date;return d.date/a>=.6?"date":d.number/a>=.6?"number":d.string/a>=.6?"string":"mixed"},Es=new Map,As=(t,e,r="asc")=>{if(!t||t.length===0)return[];const n=`${String(e)}_${t.length}`;let s=Es.get(n);return s||(s=vc(t,e),Es.set(n,s)),[...t].sort((h,a)=>{const g=h[e],y=a[e],_=g==null||g==="",P=y==null||y==="";if(_&&P)return 0;if(_)return r==="asc"?-1:1;if(P)return r==="asc"?1:-1;let C,S;switch(s){case"date":if(typeof g=="string"){const Y=new Date(g.trim());C=isNaN(Y.getTime())?null:Y.getTime()}else g instanceof Date?C=g.getTime():C=null;if(typeof y=="string"){const Y=new Date(y.trim());S=isNaN(Y.getTime())?null:Y.getTime()}else y instanceof Date?S=y.getTime():S=null;break;case"number":if(typeof g=="number")C=g;else{const Y=String(g).trim(),V=parseFloat(Y);C=isNaN(V)?null:V}if(typeof y=="number")S=y;else{const Y=String(y).trim(),V=parseFloat(Y);S=isNaN(V)?null:V}break;case"string":const D=typeof g=="string"?g:String(g),O=typeof y=="string"?y:String(y);C=D.toLowerCase().trim(),S=O.toLowerCase().trim();break;case"mixed":default:const N=String(g),F=String(y);C=N.toLowerCase().trim(),S=F.toLowerCase().trim();break}return C===null&&S===null?0:C===null?r==="asc"?1:-1:S===null||C<S?r==="asc"?-1:1:C>S?r==="asc"?1:-1:0})},Ts=[10,15,20,50,100,500];function bc(t){const e=Ve.c(111),{title:r,queryKey:n,connectedQueryKeys:s,apiPath:d,buttons:h,fields:a,selection:g,pagination:y,filters:_,actions:P,steps:C,defaultSort:S,createButtonText:D,queryParams:O,tabs:N,defaultTab:F,activeTab:Y,onActiveTabChange:V,canUpdate:q,canDelete:ee,rowExpansion:re}=t,[X,Z]=Q.useState(F||(N&&N.length>0?N[0].value:null)),U=Y!==void 0?Y:X;let G;e[0]!==Y||e[1]!==V?(G=be=>{Y===void 0&&Z(be),V&&V(be)},e[0]=Y,e[1]=V,e[2]=G):G=e[2];const W=G,ae=N?.find(be=>be.value===U)?.queryParams||{},oe={...O,...ae},k=oe?"?"+Object.entries(oe).filter(Ec).map(Oc).join("&"):"";let x;e[3]!==U||e[4]!==n?(x=U?[...n,U]:n,e[3]=U,e[4]=n,e[5]=x):x=e[5];const b=x,{data:u,isLoading:c,isError:m,isRefetching:f,refetch:i}=Wo(d+k,b),{queryClient:v}=ct();let T,j;e[6]!==u||e[7]!==s||e[8]!==v?(T=()=>{!u||!Array.isArray(u)||s?.forEach(be=>v.invalidateQueries({queryKey:be}))},j=[u,s,v],e[6]=u,e[7]=s,e[8]=v,e[9]=T,e[10]=j):(T=e[9],j=e[10]),Q.useEffect(T,j);const K=!u||!Array.isArray(u)?[]:!_||_.length===0?u:u.filter(be=>_.every(ke=>{if(ke.value===void 0)return!0;const pt=ke.id;if(ke.type==="query"){const Ye=be[pt];return Array.isArray(ke.value)?Array.isArray(Ye)?Ye.some(Te=>{if(typeof Te=="string"||typeof Te=="number")return ke.value.includes(String(Te));if(Te&&typeof Te=="object"){if("id"in Te&&ke.value.includes(Te.id))return!0;for(const ot in Te){const Ie=Te[ot];if(typeof Ie=="string"&&ke.value.includes(Ie)||Ie&&typeof Ie=="object"&&"id"in Ie&&ke.value.includes(Ie.id))return!0}}return!1}):Ye&&typeof Ye=="object"&&"id"in Ye?ke.value.includes(Ye.id):!1:typeof Ye=="string"&&Ye.includes(ke.value)}else if(ke.type==="date"){const Ye=ke.value;if(!Ye)return!0;const[Te,ot]=Ye;if(!Te&&!ot)return!0;const Ie=be[pt];if(typeof Ie=="string"){const Dt=Ie.split(" ")[0];if(Te&&ot)return Dt>=Te&&Dt<=ot;if(Te&&!ot)return Dt>=Te;if(!Te&&ot)return Dt<=ot}return!0}else if(ke.type==="boolean")return be[pt]===ke.value;return!0})),J=S?.field??a[0].id,te=S?.direction??"desc";let H;e[11]!==J||e[12]!==te?(H={columnAccessor:J,direction:te},e[11]=J,e[12]=te,e[13]=H):H=e[13];const[ie,se]=Q.useState(H),le=As(K,ie.columnAccessor,ie.direction),[E,L]=Os(Ts[1],"mantine-table-page-size"),[$,B]=Q.useState(1),I=y?le.slice(($-1)*E,$*E):le;let ce;e[14]===Symbol.for("react.memo_cache_sentinel")?(ce=[],e[14]=ce):ce=e[14];const[o,l]=Q.useState(ce);let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{l([])},e[15]=p):p=e[15];let M;e[16]!==U?(M=[U],e[16]=U,e[17]=M):M=e[17],Q.useEffect(p,M);const[R,z]=Q.useState(!1),[ue,he]=Q.useState(!1),[pe,ne]=Q.useState(!1),fe=r?"space-between":"end";let me;e[18]!==r?(me=r&&(typeof r=="string"?w.jsx(A.Title,{order:4,children:r}):r),e[18]=r,e[19]=me):me=e[19];let ge;e[20]!==i?(ge=()=>i(),e[20]=i,e[21]=ge):ge=e[21];let De;e[22]===Symbol.for("react.memo_cache_sentinel")?(De=w.jsx(Mt.IconRefresh,{}),e[22]=De):De=e[22];let xe;e[23]!==ge?(xe=w.jsx(A.ActionIcon,{variant:"subtle",onClick:ge,"aria-label":"Neuladen",children:De}),e[23]=ge,e[24]=xe):xe=e[24];let Ce;e[25]!==P||e[26]!==ee||e[27]!==q||e[28]!==a||e[29]!==o||e[30]!==g?(Ce=(a.some(Mc)||g)&&w.jsxs(A.Menu,{shadow:"md",children:[w.jsx(A.Menu.Target,{children:w.jsx(A.Button,{variant:"outline",rightSection:w.jsx(Mt.IconCaretDownFilled,{size:14}),disabled:!o.length,children:"Aktionen"})}),w.jsxs(A.Menu.Dropdown,{children:[a.find(Pc)&&(!q||o.length>0&&q(o[0]))&&w.jsx(A.Menu.Item,{leftSection:w.jsx(Mt.IconPencil,{size:14}),onClick:()=>he(!0),disabled:o.length!==1,children:"Bearbeiten"}),(P??[]).map((be,ke)=>Q.createElement(A.Menu.Item,{...be.icon&&{leftSection:be.icon},key:`custom_action_${ke}`,onClick:()=>be.onClick(o)},be.label)),a.find(kc)&&(!ee||o.length>0&&ee(o[0]))&&w.jsx(A.Menu.Item,{leftSection:w.jsx(Mt.IconTrash,{size:14}),onClick:()=>ne(!0),color:"red",children:"Löschen"})]})]}),e[25]=P,e[26]=ee,e[27]=q,e[28]=a,e[29]=o,e[30]=g,e[31]=Ce):Ce=e[31];let Le;e[32]!==D||e[33]!==a||e[34]!==c?(Le=a.find(Dc)&&w.jsx(A.Button,{onClick:()=>z(!0),disabled:c,children:D??"Erstellen"}),e[32]=D,e[33]=a,e[34]=c,e[35]=Le):Le=e[35];let Oe;e[36]!==h||e[37]!==xe||e[38]!==Ce||e[39]!==Le?(Oe=w.jsxs(A.Group,{align:"center",gap:"xs",children:[xe,Ce,Le,h]}),e[36]=h,e[37]=xe,e[38]=Ce,e[39]=Le,e[40]=Oe):Oe=e[40];let Se;e[41]!==fe||e[42]!==me||e[43]!==Oe?(Se=w.jsxs(A.Group,{gap:"xs",justify:fe,align:"center",children:[me,Oe]}),e[41]=fe,e[42]=me,e[43]=Oe,e[44]=Se):Se=e[44];let Je;e[45]!==U||e[46]!==W||e[47]!==N?(Je=N&&N.length>0&&w.jsx(A.Tabs,{value:U,onChange:W,mt:"md",children:w.jsx(A.Tabs.List,{children:N.map(Sc)})}),e[45]=U,e[46]=W,e[47]=N,e[48]=Je):Je=e[48];let Ee;e[49]!==m?(Ee=m&&w.jsx(A.Alert,{mt:"md",variant:"light",color:"red",title:"Es ist ein Fehler aufgetreten.",icon:w.jsx(Mt.IconInfoCircle,{}),children:"Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."}),e[49]=m,e[50]=Ee):Ee=e[50];let Ue;e[51]!==c||e[52]!==f?(Ue=(c||f)&&w.jsxs(A.Stack,{my:"md",children:[w.jsx(A.Skeleton,{height:40}),Array(5).fill(0).map(Cc)]}),e[51]=c,e[52]=f,e[53]=Ue):Ue=e[53];let Be;e[54]!==a||e[55]!==m||e[56]!==c||e[57]!==f||e[58]!==$||e[59]!==E||e[60]!==y||e[61]!==I||e[62]!==re||e[63]!==o||e[64]!==g||e[65]!==B||e[66]!==L||e[67]!==se||e[68]!==ie||e[69]!==le?(Be=!c&&!f&&w.jsx(dc,{my:"md",striped:!0,minHeight:150,fetching:m,records:I,sortStatus:ie,onSortStatusChange:se,...g&&{selectedRecords:o,onSelectedRecordsChange:l},...y&&I.length&&{totalRecords:le.length,recordsPerPage:E,onPageChange:B,page:$,recordsPerPageOptions:Ts,onRecordsPerPageChange:L,recordsPerPageLabel:"Einträge pro Seite"},...re&&{rowExpansion:{allowMultiple:re.allowMultiple??!1,content:be=>{const{record:ke}=be;return re.content(ke)},...re.expanded&&{expanded:re.expanded}}},columns:a.map(xc),noRecordsText:"Keine Einträge gefunden"}),e[54]=a,e[55]=m,e[56]=c,e[57]=f,e[58]=$,e[59]=E,e[60]=y,e[61]=I,e[62]=re,e[63]=o,e[64]=g,e[65]=B,e[66]=L,e[67]=se,e[68]=ie,e[69]=le,e[70]=Be):Be=e[70];let it;e[71]===Symbol.for("react.memo_cache_sentinel")?(it=()=>{he(!1),l([])},e[71]=it):it=e[71];const yt=r??"Bearbeiten";let Ae;e[72]!==d||e[73]!==a||e[74]!==n||e[75]!==o[0]||e[76]!==o.length||e[77]!==C?(Ae=o.length>0&&w.jsx(Ps,{fields:a.filter(_c),queryKey:n,apiPath:d,id:o[0].id,onClose:()=>{he(!1),l([])},steps:C}),e[72]=d,e[73]=a,e[74]=n,e[75]=o[0],e[76]=o.length,e[77]=C,e[78]=Ae):Ae=e[78];let Xe;e[79]!==yt||e[80]!==Ae||e[81]!==ue?(Xe=w.jsx(A.Modal,{opened:ue,onClose:it,title:yt,children:Ae}),e[79]=yt,e[80]=Ae,e[81]=ue,e[82]=Xe):Xe=e[82];let et;e[83]!==d||e[84]!==pe||e[85]!==n||e[86]!==o||e[87]!==r?(et=o.length>0&&w.jsx(A.Modal,{opened:pe,onClose:()=>{ne(!1),l([])},title:r??"Löschen",children:w.jsx(Ms,{onClose:()=>{ne(!1),l([])},queryKey:n,apiPath:d,selectedRecords:o})}),e[83]=d,e[84]=pe,e[85]=n,e[86]=o,e[87]=r,e[88]=et):et=e[88];let tt;e[89]===Symbol.for("react.memo_cache_sentinel")?(tt=()=>{z(!1)},e[89]=tt):tt=e[89];const at=r??"Anlegen";let rt;e[90]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>{z(!1)},e[90]=rt):rt=e[90];let qe;e[91]!==a?(qe=a.filter(wc),e[91]=a,e[92]=qe):qe=e[92];let Ze;e[93]!==d||e[94]!==n||e[95]!==C||e[96]!==qe?(Ze=w.jsx(fs,{queryKey:n,apiPath:d,onClose:rt,fields:qe,steps:C}),e[93]=d,e[94]=n,e[95]=C,e[96]=qe,e[97]=Ze):Ze=e[97];let nt;e[98]!==R||e[99]!==at||e[100]!==Ze?(nt=w.jsx(A.Modal,{opened:R,onClose:tt,title:at,children:Ze}),e[98]=R,e[99]=at,e[100]=Ze,e[101]=nt):nt=e[101];let ve;return e[102]!==Se||e[103]!==Je||e[104]!==Ee||e[105]!==Ue||e[106]!==Be||e[107]!==Xe||e[108]!==et||e[109]!==nt?(ve=w.jsxs(w.Fragment,{children:[Se,Je,Ee,Ue,Be,Xe,et,nt]}),e[102]=Se,e[103]=Je,e[104]=Ee,e[105]=Ue,e[106]=Be,e[107]=Xe,e[108]=et,e[109]=nt,e[110]=ve):ve=e[110],ve}function wc(t){return t.create}function _c(t){return t.update}function xc(t){return t.column}function Cc(t,e){return w.jsx(A.Skeleton,{height:35},`skeleton-${e}`)}function Sc(t){return w.jsx(A.Tabs.Tab,{value:t.value,leftSection:t.icon,children:t.label},t.value)}function Dc(t){return t.create}function kc(t){return t.delete}function Pc(t){return t.update}function Mc(t){return t.update}function Oc(t){const[e,r]=t;return`${e}=${encodeURIComponent(r??"")}`}function Ec(t){const[,e]=t;return e!=null}function Ac(t){const e=Ve.c(5),{queryClient:r}=ct();let n;e[0]!==t?(n=w.jsx(bc,{...t}),e[0]=t,e[1]=n):n=e[1];let s;return e[2]!==r||e[3]!==n?(s=w.jsx(Hn,{client:r,children:n}),e[2]=r,e[3]=n,e[4]=s):s=e[4],s}_e.CreateModal=fs,_e.DataTable=Ac,_e.DataTableProvider=fl,_e.DeleteModal=Ms,_e.UpdateModal=Ps,_e.api=gl,_e.createOne=Yo,_e.deleteOne=Io,_e.getAll=Lo,_e.getApiHeaders=mt,_e.getOne=Bo,_e.sortData=As,_e.updateOne=zo,_e.useAddOne=Uo,_e.useDataTable=ct,_e.useDeleteOne=qo,_e.useGetAll=Wo,_e.useGetOne=Fo,_e.usePersistentState=Os,_e.useUpdateOne=rn,Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"})}));
19
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r.useMemoCache(e)}})()),no}var so;function Di(){return so||(so=1,process.env.NODE_ENV==="production"?Yr.exports=xi():Yr.exports=Si()),Yr.exports}Di();var io={},Lt={},ao;function ki(){if(ao)return Lt;ao=1,Lt.byteLength=a,Lt.toByteArray=y,Lt.fromByteArray=x;for(var t=[],e=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=n.length;s<c;++s)t[s]=n[s],e[n.charCodeAt(s)]=s;e[45]=62,e[95]=63;function h(S){var D=S.length;if(D%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var O=S.indexOf("=");O===-1&&(O=D);var L=O===D?0:4-O%4;return[O,L]}function a(S){var D=h(S),O=D[0],L=D[1];return(O+L)*3/4-L}function g(S,D,O){return(D+O)*3/4-O}function y(S){var D,O=h(S),L=O[0],I=O[1],z=new r(g(S,L,I)),V=0,q=I>0?L-4:L,X;for(X=0;X<q;X+=4)D=e[S.charCodeAt(X)]<<18|e[S.charCodeAt(X+1)]<<12|e[S.charCodeAt(X+2)]<<6|e[S.charCodeAt(X+3)],z[V++]=D>>16&255,z[V++]=D>>8&255,z[V++]=D&255;return I===2&&(D=e[S.charCodeAt(X)]<<2|e[S.charCodeAt(X+1)]>>4,z[V++]=D&255),I===1&&(D=e[S.charCodeAt(X)]<<10|e[S.charCodeAt(X+1)]<<4|e[S.charCodeAt(X+2)]>>2,z[V++]=D>>8&255,z[V++]=D&255),z}function _(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function M(S,D,O){for(var L,I=[],z=D;z<O;z+=3)L=(S[z]<<16&16711680)+(S[z+1]<<8&65280)+(S[z+2]&255),I.push(_(L));return I.join("")}function x(S){for(var D,O=S.length,L=O%3,I=[],z=16383,V=0,q=O-L;V<q;V+=z)I.push(M(S,V,V+z>q?q:V+z));return L===1?(D=S[O-1],I.push(t[D>>2]+t[D<<4&63]+"==")):L===2&&(D=(S[O-2]<<8)+S[O-1],I.push(t[D>>10]+t[D>>4&63]+t[D<<2&63]+"=")),I.join("")}return Lt}var Fr={};var lo;function Pi(){return lo||(lo=1,Fr.read=function(t,e,r,n,s){var c,h,a=s*8-n-1,g=(1<<a)-1,y=g>>1,_=-7,M=r?s-1:0,x=r?-1:1,S=t[e+M];for(M+=x,c=S&(1<<-_)-1,S>>=-_,_+=a;_>0;c=c*256+t[e+M],M+=x,_-=8);for(h=c&(1<<-_)-1,c>>=-_,_+=n;_>0;h=h*256+t[e+M],M+=x,_-=8);if(c===0)c=1-y;else{if(c===g)return h?NaN:(S?-1:1)*(1/0);h=h+Math.pow(2,n),c=c-y}return(S?-1:1)*h*Math.pow(2,c-n)},Fr.write=function(t,e,r,n,s,c){var h,a,g,y=c*8-s-1,_=(1<<y)-1,M=_>>1,x=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=n?0:c-1,D=n?1:-1,O=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,h=_):(h=Math.floor(Math.log(e)/Math.LN2),e*(g=Math.pow(2,-h))<1&&(h--,g*=2),h+M>=1?e+=x/g:e+=x*Math.pow(2,1-M),e*g>=2&&(h++,g/=2),h+M>=_?(a=0,h=_):h+M>=1?(a=(e*g-1)*Math.pow(2,s),h=h+M):(a=e*Math.pow(2,M-1)*Math.pow(2,s),h=0));s>=8;t[r+S]=a&255,S+=D,a/=256,s-=8);for(h=h<<s|a,y+=s;y>0;t[r+S]=h&255,S+=D,h/=256,y-=8);t[r+S-D]|=O*128}),Fr}var Wr,uo;function Mi(){if(uo)return Wr;uo=1;var t={}.toString;return Wr=Array.isArray||function(e){return t.call(e)=="[object Array]"},Wr}var co;function Oi(){return co||(co=1,(function(t){var e=ki(),r=Pi(),n=Mi();t.Buffer=a,t.SlowBuffer=I,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=Jn.TYPED_ARRAY_SUPPORT!==void 0?Jn.TYPED_ARRAY_SUPPORT:s(),t.kMaxLength=c();function s(){try{var o=new Uint8Array(1);return o.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},o.foo()===42&&typeof o.subarray=="function"&&o.subarray(1,1).byteLength===0}catch{return!1}}function c(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function h(o,l){if(c()<l)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(o=new Uint8Array(l),o.__proto__=a.prototype):(o===null&&(o=new a(l)),o.length=l),o}function a(o,l,p){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(o,l,p);if(typeof o=="number"){if(typeof l=="string")throw new Error("If encoding is specified then the first argument must be a string");return M(this,o)}return g(this,o,l,p)}a.poolSize=8192,a._augment=function(o){return o.__proto__=a.prototype,o};function g(o,l,p,P){if(typeof l=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&l instanceof ArrayBuffer?D(o,l,p,P):typeof l=="string"?x(o,l,p):O(o,l)}a.from=function(o,l,p){return g(null,o,l,p)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0}));function y(o){if(typeof o!="number")throw new TypeError('"size" argument must be a number');if(o<0)throw new RangeError('"size" argument must not be negative')}function _(o,l,p,P){return y(l),l<=0?h(o,l):p!==void 0?typeof P=="string"?h(o,l).fill(p,P):h(o,l).fill(p):h(o,l)}a.alloc=function(o,l,p){return _(null,o,l,p)};function M(o,l){if(y(l),o=h(o,l<0?0:L(l)|0),!a.TYPED_ARRAY_SUPPORT)for(var p=0;p<l;++p)o[p]=0;return o}a.allocUnsafe=function(o){return M(null,o)},a.allocUnsafeSlow=function(o){return M(null,o)};function x(o,l,p){if((typeof p!="string"||p==="")&&(p="utf8"),!a.isEncoding(p))throw new TypeError('"encoding" must be a valid string encoding');var P=z(l,p)|0;o=h(o,P);var R=o.write(l,p);return R!==P&&(o=o.slice(0,R)),o}function S(o,l){var p=l.length<0?0:L(l.length)|0;o=h(o,p);for(var P=0;P<p;P+=1)o[P]=l[P]&255;return o}function D(o,l,p,P){if(l.byteLength,p<0||l.byteLength<p)throw new RangeError("'offset' is out of bounds");if(l.byteLength<p+(P||0))throw new RangeError("'length' is out of bounds");return p===void 0&&P===void 0?l=new Uint8Array(l):P===void 0?l=new Uint8Array(l,p):l=new Uint8Array(l,p,P),a.TYPED_ARRAY_SUPPORT?(o=l,o.__proto__=a.prototype):o=S(o,l),o}function O(o,l){if(a.isBuffer(l)){var p=L(l.length)|0;return o=h(o,p),o.length===0||l.copy(o,0,0,p),o}if(l){if(typeof ArrayBuffer<"u"&&l.buffer instanceof ArrayBuffer||"length"in l)return typeof l.length!="number"||ce(l.length)?h(o,0):S(o,l);if(l.type==="Buffer"&&n(l.data))return S(o,l.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function L(o){if(o>=c())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+c().toString(16)+" bytes");return o|0}function I(o){return+o!=o&&(o=0),a.alloc(+o)}a.isBuffer=function(o){return!!(o!=null&&o._isBuffer)},a.compare=function(o,l){if(!a.isBuffer(o)||!a.isBuffer(l))throw new TypeError("Arguments must be Buffers");if(o===l)return 0;for(var p=o.length,P=l.length,R=0,F=Math.min(p,P);R<F;++R)if(o[R]!==l[R]){p=o[R],P=l[R];break}return p<P?-1:P<p?1:0},a.isEncoding=function(o){switch(String(o).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(o,l){if(!n(o))throw new TypeError('"list" argument must be an Array of Buffers');if(o.length===0)return a.alloc(0);var p;if(l===void 0)for(l=0,p=0;p<o.length;++p)l+=o[p].length;var P=a.allocUnsafe(l),R=0;for(p=0;p<o.length;++p){var F=o[p];if(!a.isBuffer(F))throw new TypeError('"list" argument must be an Array of Buffers');F.copy(P,R),R+=F.length}return P};function z(o,l){if(a.isBuffer(o))return o.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(o)||o instanceof ArrayBuffer))return o.byteLength;typeof o!="string"&&(o=""+o);var p=o.length;if(p===0)return 0;for(var P=!1;;)switch(l){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":case void 0:return A(o).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return B(o).length;default:if(P)return A(o).length;l=(""+l).toLowerCase(),P=!0}}a.byteLength=z;function V(o,l,p){var P=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,l>>>=0,p<=l))return"";for(o||(o="utf8");;)switch(o){case"hex":return m(this,l,p);case"utf8":case"utf-8":return k(this,l,p);case"ascii":return d(this,l,p);case"latin1":case"binary":return u(this,l,p);case"base64":return se(this,l,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(this,l,p);default:if(P)throw new TypeError("Unknown encoding: "+o);o=(o+"").toLowerCase(),P=!0}}a.prototype._isBuffer=!0;function q(o,l,p){var P=o[l];o[l]=o[p],o[p]=P}a.prototype.swap16=function(){var o=this.length;if(o%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var l=0;l<o;l+=2)q(this,l,l+1);return this},a.prototype.swap32=function(){var o=this.length;if(o%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var l=0;l<o;l+=4)q(this,l,l+3),q(this,l+1,l+2);return this},a.prototype.swap64=function(){var o=this.length;if(o%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var l=0;l<o;l+=8)q(this,l,l+7),q(this,l+1,l+6),q(this,l+2,l+5),q(this,l+3,l+4);return this},a.prototype.toString=function(){var o=this.length|0;return o===0?"":arguments.length===0?k(this,0,o):V.apply(this,arguments)},a.prototype.equals=function(o){if(!a.isBuffer(o))throw new TypeError("Argument must be a Buffer");return this===o?!0:a.compare(this,o)===0},a.prototype.inspect=function(){var o="",l=t.INSPECT_MAX_BYTES;return this.length>0&&(o=this.toString("hex",0,l).match(/.{2}/g).join(" "),this.length>l&&(o+=" ... ")),"<Buffer "+o+">"},a.prototype.compare=function(o,l,p,P,R){if(!a.isBuffer(o))throw new TypeError("Argument must be a Buffer");if(l===void 0&&(l=0),p===void 0&&(p=o?o.length:0),P===void 0&&(P=0),R===void 0&&(R=this.length),l<0||p>o.length||P<0||R>this.length)throw new RangeError("out of range index");if(P>=R&&l>=p)return 0;if(P>=R)return-1;if(l>=p)return 1;if(l>>>=0,p>>>=0,P>>>=0,R>>>=0,this===o)return 0;for(var F=R-P,le=p-l,he=Math.min(F,le),pe=this.slice(P,R),ne=o.slice(l,p),fe=0;fe<he;++fe)if(pe[fe]!==ne[fe]){F=pe[fe],le=ne[fe];break}return F<le?-1:le<F?1:0};function X(o,l,p,P,R){if(o.length===0)return-1;if(typeof p=="string"?(P=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,isNaN(p)&&(p=R?0:o.length-1),p<0&&(p=o.length+p),p>=o.length){if(R)return-1;p=o.length-1}else if(p<0)if(R)p=0;else return-1;if(typeof l=="string"&&(l=a.from(l,P)),a.isBuffer(l))return l.length===0?-1:re(o,l,p,P,R);if(typeof l=="number")return l=l&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(o,l,p):Uint8Array.prototype.lastIndexOf.call(o,l,p):re(o,[l],p,P,R);throw new TypeError("val must be string, number or Buffer")}function re(o,l,p,P,R){var F=1,le=o.length,he=l.length;if(P!==void 0&&(P=String(P).toLowerCase(),P==="ucs2"||P==="ucs-2"||P==="utf16le"||P==="utf-16le")){if(o.length<2||l.length<2)return-1;F=2,le/=2,he/=2,p/=2}function pe(Se,_e){return F===1?Se[_e]:Se.readUInt16BE(_e*F)}var ne;if(R){var fe=-1;for(ne=p;ne<le;ne++)if(pe(o,ne)===pe(l,fe===-1?0:ne-fe)){if(fe===-1&&(fe=ne),ne-fe+1===he)return fe*F}else fe!==-1&&(ne-=ne-fe),fe=-1}else for(p+he>le&&(p=le-he),ne=p;ne>=0;ne--){for(var me=!0,ge=0;ge<he;ge++)if(pe(o,ne+ge)!==pe(l,ge)){me=!1;break}if(me)return ne}return-1}a.prototype.includes=function(o,l,p){return this.indexOf(o,l,p)!==-1},a.prototype.indexOf=function(o,l,p){return X(this,o,l,p,!0)},a.prototype.lastIndexOf=function(o,l,p){return X(this,o,l,p,!1)};function Q(o,l,p,P){p=Number(p)||0;var R=o.length-p;P?(P=Number(P),P>R&&(P=R)):P=R;var F=l.length;if(F%2!==0)throw new TypeError("Invalid hex string");P>F/2&&(P=F/2);for(var le=0;le<P;++le){var he=parseInt(l.substr(le*2,2),16);if(isNaN(he))return le;o[p+le]=he}return le}function J(o,l,p,P){return Y(A(l,o.length-p),o,p,P)}function Z(o,l,p,P){return Y(N(l),o,p,P)}function U(o,l,p,P){return Z(o,l,p,P)}function W(o,l,p,P){return Y(B(l),o,p,P)}function ae(o,l,p,P){return Y($(l,o.length-p),o,p,P)}a.prototype.write=function(o,l,p,P){if(l===void 0)P="utf8",p=this.length,l=0;else if(p===void 0&&typeof l=="string")P=l,p=this.length,l=0;else if(isFinite(l))l=l|0,isFinite(p)?(p=p|0,P===void 0&&(P="utf8")):(P=p,p=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var R=this.length-l;if((p===void 0||p>R)&&(p=R),o.length>0&&(p<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");for(var F=!1;;)switch(P){case"hex":return Q(this,o,l,p);case"utf8":case"utf-8":return J(this,o,l,p);case"ascii":return Z(this,o,l,p);case"latin1":case"binary":return U(this,o,l,p);case"base64":return W(this,o,l,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae(this,o,l,p);default:if(F)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),F=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function se(o,l,p){return l===0&&p===o.length?e.fromByteArray(o):e.fromByteArray(o.slice(l,p))}function k(o,l,p){p=Math.min(o.length,p);for(var P=[],R=l;R<p;){var F=o[R],le=null,he=F>239?4:F>223?3:F>191?2:1;if(R+he<=p){var pe,ne,fe,me;switch(he){case 1:F<128&&(le=F);break;case 2:pe=o[R+1],(pe&192)===128&&(me=(F&31)<<6|pe&63,me>127&&(le=me));break;case 3:pe=o[R+1],ne=o[R+2],(pe&192)===128&&(ne&192)===128&&(me=(F&15)<<12|(pe&63)<<6|ne&63,me>2047&&(me<55296||me>57343)&&(le=me));break;case 4:pe=o[R+1],ne=o[R+2],fe=o[R+3],(pe&192)===128&&(ne&192)===128&&(fe&192)===128&&(me=(F&15)<<18|(pe&63)<<12|(ne&63)<<6|fe&63,me>65535&&me<1114112&&(le=me))}}le===null?(le=65533,he=1):le>65535&&(le-=65536,P.push(le>>>10&1023|55296),le=56320|le&1023),P.push(le),R+=he}return v(P)}var C=4096;function v(o){var l=o.length;if(l<=C)return String.fromCharCode.apply(String,o);for(var p="",P=0;P<l;)p+=String.fromCharCode.apply(String,o.slice(P,P+=C));return p}function d(o,l,p){var P="";p=Math.min(o.length,p);for(var R=l;R<p;++R)P+=String.fromCharCode(o[R]&127);return P}function u(o,l,p){var P="";p=Math.min(o.length,p);for(var R=l;R<p;++R)P+=String.fromCharCode(o[R]);return P}function m(o,l,p){var P=o.length;(!l||l<0)&&(l=0),(!p||p<0||p>P)&&(p=P);for(var R="",F=l;F<p;++F)R+=ue(o[F]);return R}function f(o,l,p){for(var P=o.slice(l,p),R="",F=0;F<P.length;F+=2)R+=String.fromCharCode(P[F]+P[F+1]*256);return R}a.prototype.slice=function(o,l){var p=this.length;o=~~o,l=l===void 0?p:~~l,o<0?(o+=p,o<0&&(o=0)):o>p&&(o=p),l<0?(l+=p,l<0&&(l=0)):l>p&&(l=p),l<o&&(l=o);var P;if(a.TYPED_ARRAY_SUPPORT)P=this.subarray(o,l),P.__proto__=a.prototype;else{var R=l-o;P=new a(R,void 0);for(var F=0;F<R;++F)P[F]=this[F+o]}return P};function i(o,l,p){if(o%1!==0||o<0)throw new RangeError("offset is not uint");if(o+l>p)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUIntLE=function(o,l,p){o=o|0,l=l|0,p||i(o,l,this.length);for(var P=this[o],R=1,F=0;++F<l&&(R*=256);)P+=this[o+F]*R;return P},a.prototype.readUIntBE=function(o,l,p){o=o|0,l=l|0,p||i(o,l,this.length);for(var P=this[o+--l],R=1;l>0&&(R*=256);)P+=this[o+--l]*R;return P},a.prototype.readUInt8=function(o,l){return l||i(o,1,this.length),this[o]},a.prototype.readUInt16LE=function(o,l){return l||i(o,2,this.length),this[o]|this[o+1]<<8},a.prototype.readUInt16BE=function(o,l){return l||i(o,2,this.length),this[o]<<8|this[o+1]},a.prototype.readUInt32LE=function(o,l){return l||i(o,4,this.length),(this[o]|this[o+1]<<8|this[o+2]<<16)+this[o+3]*16777216},a.prototype.readUInt32BE=function(o,l){return l||i(o,4,this.length),this[o]*16777216+(this[o+1]<<16|this[o+2]<<8|this[o+3])},a.prototype.readIntLE=function(o,l,p){o=o|0,l=l|0,p||i(o,l,this.length);for(var P=this[o],R=1,F=0;++F<l&&(R*=256);)P+=this[o+F]*R;return R*=128,P>=R&&(P-=Math.pow(2,8*l)),P},a.prototype.readIntBE=function(o,l,p){o=o|0,l=l|0,p||i(o,l,this.length);for(var P=l,R=1,F=this[o+--P];P>0&&(R*=256);)F+=this[o+--P]*R;return R*=128,F>=R&&(F-=Math.pow(2,8*l)),F},a.prototype.readInt8=function(o,l){return l||i(o,1,this.length),this[o]&128?(255-this[o]+1)*-1:this[o]},a.prototype.readInt16LE=function(o,l){l||i(o,2,this.length);var p=this[o]|this[o+1]<<8;return p&32768?p|4294901760:p},a.prototype.readInt16BE=function(o,l){l||i(o,2,this.length);var p=this[o+1]|this[o]<<8;return p&32768?p|4294901760:p},a.prototype.readInt32LE=function(o,l){return l||i(o,4,this.length),this[o]|this[o+1]<<8|this[o+2]<<16|this[o+3]<<24},a.prototype.readInt32BE=function(o,l){return l||i(o,4,this.length),this[o]<<24|this[o+1]<<16|this[o+2]<<8|this[o+3]},a.prototype.readFloatLE=function(o,l){return l||i(o,4,this.length),r.read(this,o,!0,23,4)},a.prototype.readFloatBE=function(o,l){return l||i(o,4,this.length),r.read(this,o,!1,23,4)},a.prototype.readDoubleLE=function(o,l){return l||i(o,8,this.length),r.read(this,o,!0,52,8)},a.prototype.readDoubleBE=function(o,l){return l||i(o,8,this.length),r.read(this,o,!1,52,8)};function b(o,l,p,P,R,F){if(!a.isBuffer(o))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>R||l<F)throw new RangeError('"value" argument is out of bounds');if(p+P>o.length)throw new RangeError("Index out of range")}a.prototype.writeUIntLE=function(o,l,p,P){if(o=+o,l=l|0,p=p|0,!P){var R=Math.pow(2,8*p)-1;b(this,o,l,p,R,0)}var F=1,le=0;for(this[l]=o&255;++le<p&&(F*=256);)this[l+le]=o/F&255;return l+p},a.prototype.writeUIntBE=function(o,l,p,P){if(o=+o,l=l|0,p=p|0,!P){var R=Math.pow(2,8*p)-1;b(this,o,l,p,R,0)}var F=p-1,le=1;for(this[l+F]=o&255;--F>=0&&(le*=256);)this[l+F]=o/le&255;return l+p},a.prototype.writeUInt8=function(o,l,p){return o=+o,l=l|0,p||b(this,o,l,1,255,0),a.TYPED_ARRAY_SUPPORT||(o=Math.floor(o)),this[l]=o&255,l+1};function T(o,l,p,P){l<0&&(l=65535+l+1);for(var R=0,F=Math.min(o.length-p,2);R<F;++R)o[p+R]=(l&255<<8*(P?R:1-R))>>>(P?R:1-R)*8}a.prototype.writeUInt16LE=function(o,l,p){return o=+o,l=l|0,p||b(this,o,l,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[l]=o&255,this[l+1]=o>>>8):T(this,o,l,!0),l+2},a.prototype.writeUInt16BE=function(o,l,p){return o=+o,l=l|0,p||b(this,o,l,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[l]=o>>>8,this[l+1]=o&255):T(this,o,l,!1),l+2};function j(o,l,p,P){l<0&&(l=4294967295+l+1);for(var R=0,F=Math.min(o.length-p,4);R<F;++R)o[p+R]=l>>>(P?R:3-R)*8&255}a.prototype.writeUInt32LE=function(o,l,p){return o=+o,l=l|0,p||b(this,o,l,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[l+3]=o>>>24,this[l+2]=o>>>16,this[l+1]=o>>>8,this[l]=o&255):j(this,o,l,!0),l+4},a.prototype.writeUInt32BE=function(o,l,p){return o=+o,l=l|0,p||b(this,o,l,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[l]=o>>>24,this[l+1]=o>>>16,this[l+2]=o>>>8,this[l+3]=o&255):j(this,o,l,!1),l+4},a.prototype.writeIntLE=function(o,l,p,P){if(o=+o,l=l|0,!P){var R=Math.pow(2,8*p-1);b(this,o,l,p,R-1,-R)}var F=0,le=1,he=0;for(this[l]=o&255;++F<p&&(le*=256);)o<0&&he===0&&this[l+F-1]!==0&&(he=1),this[l+F]=(o/le>>0)-he&255;return l+p},a.prototype.writeIntBE=function(o,l,p,P){if(o=+o,l=l|0,!P){var R=Math.pow(2,8*p-1);b(this,o,l,p,R-1,-R)}var F=p-1,le=1,he=0;for(this[l+F]=o&255;--F>=0&&(le*=256);)o<0&&he===0&&this[l+F+1]!==0&&(he=1),this[l+F]=(o/le>>0)-he&255;return l+p},a.prototype.writeInt8=function(o,l,p){return o=+o,l=l|0,p||b(this,o,l,1,127,-128),a.TYPED_ARRAY_SUPPORT||(o=Math.floor(o)),o<0&&(o=255+o+1),this[l]=o&255,l+1},a.prototype.writeInt16LE=function(o,l,p){return o=+o,l=l|0,p||b(this,o,l,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[l]=o&255,this[l+1]=o>>>8):T(this,o,l,!0),l+2},a.prototype.writeInt16BE=function(o,l,p){return o=+o,l=l|0,p||b(this,o,l,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[l]=o>>>8,this[l+1]=o&255):T(this,o,l,!1),l+2},a.prototype.writeInt32LE=function(o,l,p){return o=+o,l=l|0,p||b(this,o,l,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[l]=o&255,this[l+1]=o>>>8,this[l+2]=o>>>16,this[l+3]=o>>>24):j(this,o,l,!0),l+4},a.prototype.writeInt32BE=function(o,l,p){return o=+o,l=l|0,p||b(this,o,l,4,2147483647,-2147483648),o<0&&(o=4294967295+o+1),a.TYPED_ARRAY_SUPPORT?(this[l]=o>>>24,this[l+1]=o>>>16,this[l+2]=o>>>8,this[l+3]=o&255):j(this,o,l,!1),l+4};function K(o,l,p,P,R,F){if(p+P>o.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function ee(o,l,p,P,R){return R||K(o,l,p,4),r.write(o,l,p,P,23,4),p+4}a.prototype.writeFloatLE=function(o,l,p){return ee(this,o,l,!0,p)},a.prototype.writeFloatBE=function(o,l,p){return ee(this,o,l,!1,p)};function te(o,l,p,P,R){return R||K(o,l,p,8),r.write(o,l,p,P,52,8),p+8}a.prototype.writeDoubleLE=function(o,l,p){return te(this,o,l,!0,p)},a.prototype.writeDoubleBE=function(o,l,p){return te(this,o,l,!1,p)},a.prototype.copy=function(o,l,p,P){if(p||(p=0),!P&&P!==0&&(P=this.length),l>=o.length&&(l=o.length),l||(l=0),P>0&&P<p&&(P=p),P===p||o.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(p<0||p>=this.length)throw new RangeError("sourceStart out of bounds");if(P<0)throw new RangeError("sourceEnd out of bounds");P>this.length&&(P=this.length),o.length-l<P-p&&(P=o.length-l+p);var R=P-p,F;if(this===o&&p<l&&l<P)for(F=R-1;F>=0;--F)o[F+l]=this[F+p];else if(R<1e3||!a.TYPED_ARRAY_SUPPORT)for(F=0;F<R;++F)o[F+l]=this[F+p];else Uint8Array.prototype.set.call(o,this.subarray(p,p+R),l);return R},a.prototype.fill=function(o,l,p,P){if(typeof o=="string"){if(typeof l=="string"?(P=l,l=0,p=this.length):typeof p=="string"&&(P=p,p=this.length),o.length===1){var R=o.charCodeAt(0);R<256&&(o=R)}if(P!==void 0&&typeof P!="string")throw new TypeError("encoding must be a string");if(typeof P=="string"&&!a.isEncoding(P))throw new TypeError("Unknown encoding: "+P)}else typeof o=="number"&&(o=o&255);if(l<0||this.length<l||this.length<p)throw new RangeError("Out of range index");if(p<=l)return this;l=l>>>0,p=p===void 0?this.length:p>>>0,o||(o=0);var F;if(typeof o=="number")for(F=l;F<p;++F)this[F]=o;else{var le=a.isBuffer(o)?o:A(new a(o,P).toString()),he=le.length;for(F=0;F<p-l;++F)this[F+l]=le[F%he]}return this};var H=/[^+\/0-9A-Za-z-_]/g;function ie(o){if(o=oe(o).replace(H,""),o.length<2)return"";for(;o.length%4!==0;)o=o+"=";return o}function oe(o){return o.trim?o.trim():o.replace(/^\s+|\s+$/g,"")}function ue(o){return o<16?"0"+o.toString(16):o.toString(16)}function A(o,l){l=l||1/0;for(var p,P=o.length,R=null,F=[],le=0;le<P;++le){if(p=o.charCodeAt(le),p>55295&&p<57344){if(!R){if(p>56319){(l-=3)>-1&&F.push(239,191,189);continue}else if(le+1===P){(l-=3)>-1&&F.push(239,191,189);continue}R=p;continue}if(p<56320){(l-=3)>-1&&F.push(239,191,189),R=p;continue}p=(R-55296<<10|p-56320)+65536}else R&&(l-=3)>-1&&F.push(239,191,189);if(R=null,p<128){if((l-=1)<0)break;F.push(p)}else if(p<2048){if((l-=2)<0)break;F.push(p>>6|192,p&63|128)}else if(p<65536){if((l-=3)<0)break;F.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((l-=4)<0)break;F.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return F}function N(o){for(var l=[],p=0;p<o.length;++p)l.push(o.charCodeAt(p)&255);return l}function $(o,l){for(var p,P,R,F=[],le=0;le<o.length&&!((l-=2)<0);++le)p=o.charCodeAt(le),P=p>>8,R=p%256,F.push(R),F.push(P);return F}function B(o){return e.toByteArray(ie(o))}function Y(o,l,p,P){for(var R=0;R<P&&!(R+p>=l.length||R>=o.length);++R)l[R+p]=o[R];return R}function ce(o){return o!==o}})(io)),io}Oi();var vt;if(typeof window<"u"&&window.crypto&&(vt=window.crypto),!vt&&typeof window<"u"&&window.msCrypto&&(vt=window.msCrypto),!vt&&typeof global<"u"&&global.crypto&&(vt=global.crypto),!vt&&typeof require=="function")try{vt=require("crypto")}catch{}var ho={};var Ur=function(t,e){return Ur=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)n.hasOwnProperty(s)&&(r[s]=n[s])},Ur(t,e)};function Ai(t,e){Ur(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var qr=function(){return qr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},qr.apply(this,arguments)};function Ei(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function Ti(t,e,r,n){var s=arguments.length,c=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(h=t[a])&&(c=(s<3?h(c):s>3?h(e,r,c):h(e,r))||c);return s>3&&c&&Object.defineProperty(e,r,c),c}function ji(t,e){return function(r,n){e(r,n,t)}}function $i(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Ri(t,e,r,n){function s(c){return c instanceof r?c:new r(function(h){h(c)})}return new(r||(r=Promise))(function(c,h){function a(_){try{y(n.next(_))}catch(M){h(M)}}function g(_){try{y(n.throw(_))}catch(M){h(M)}}function y(_){_.done?c(_.value):s(_.value).then(a,g)}y((n=n.apply(t,e||[])).next())})}function Ni(t,e){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,s,c,h;return h={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function a(y){return function(_){return g([y,_])}}function g(y){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(c=y[0]&2?s.return:y[0]?s.throw||((c=s.return)&&c.call(s),0):s.next)&&!(c=c.call(s,y[1])).done)return c;switch(s=0,c&&(y=[y[0]&2,c.value]),y[0]){case 0:case 1:c=y;break;case 4:return r.label++,{value:y[1],done:!1};case 5:r.label++,s=y[1],y=[0];continue;case 7:y=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(y[0]===6||y[0]===2)){r=0;continue}if(y[0]===3&&(!c||y[1]>c[0]&&y[1]<c[3])){r.label=y[1];break}if(y[0]===6&&r.label<c[1]){r.label=c[1],c=y;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(y);break}c[2]&&r.ops.pop(),r.trys.pop();continue}y=e.call(t,r)}catch(_){y=[6,_],s=0}finally{n=c=0}if(y[0]&5)throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}}function Li(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function Bi(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function Vr(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function fo(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),s,c=[],h;try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)c.push(s.value)}catch(a){h={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(h)throw h.error}}return c}function Ii(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(fo(arguments[e]));return t}function Yi(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),s=0,e=0;e<r;e++)for(var c=arguments[e],h=0,a=c.length;h<a;h++,s++)n[s]=c[h];return n}function Bt(t){return this instanceof Bt?(this.v=t,this):new Bt(t)}function zi(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),s,c=[];return s={},h("next"),h("throw"),h("return"),s[Symbol.asyncIterator]=function(){return this},s;function h(x){n[x]&&(s[x]=function(S){return new Promise(function(D,O){c.push([x,S,D,O])>1||a(x,S)})})}function a(x,S){try{g(n[x](S))}catch(D){M(c[0][3],D)}}function g(x){x.value instanceof Bt?Promise.resolve(x.value.v).then(y,_):M(c[0][2],x)}function y(x){a("next",x)}function _(x){a("throw",x)}function M(x,S){x(S),c.shift(),c.length&&a(c[0][0],c[0][1])}}function Fi(t){var e,r;return e={},n("next"),n("throw",function(s){throw s}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(s,c){e[s]=t[s]?function(h){return(r=!r)?{value:Bt(t[s](h)),done:s==="return"}:c?c(h):h}:c}}function Wi(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Vr=="function"?Vr(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(c){r[c]=t[c]&&function(h){return new Promise(function(a,g){h=t[c](h),s(a,g,h.done,h.value)})}}function s(c,h,a,g){Promise.resolve(g).then(function(y){c({value:y,done:a})},h)}}function Ui(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function qi(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function Vi(t){return t&&t.__esModule?t:{default:t}}function Hi(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Gi(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}const Qi=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return qr},__asyncDelegator:Fi,__asyncGenerator:zi,__asyncValues:Wi,__await:Bt,__awaiter:Ri,__classPrivateFieldGet:Hi,__classPrivateFieldSet:Gi,__createBinding:Li,__decorate:Ti,__exportStar:Bi,__extends:Ai,__generator:Ni,__importDefault:Vi,__importStar:qi,__makeTemplateObject:Ui,__metadata:$i,__param:ji,__read:fo,__rest:Ei,__spread:Ii,__spreadArrays:Yi,__values:Vr},Symbol.toStringTag,{value:"Module"})),po=Br(Qi);var It={},We={},go;function mo(){return go||(go=1,Object.defineProperty(We,"__esModule",{value:!0}),We.MAX_HASHABLE_LENGTH=We.INIT=We.KEY=We.DIGEST_LENGTH=We.BLOCK_SIZE=void 0,We.BLOCK_SIZE=64,We.DIGEST_LENGTH=32,We.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),We.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],We.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1),We}var Yt={},yo;function Zi(){if(yo)return Yt;yo=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.RawSha256=void 0;var t=mo(),e=(function(){function r(){this.state=Int32Array.from(t.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return r.prototype.update=function(n){if(this.finished)throw new Error("Attempted to update an already finished hash.");var s=0,c=n.byteLength;if(this.bytesHashed+=c,this.bytesHashed*8>t.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;c>0;)this.buffer[this.bufferLength++]=n[s++],c--,this.bufferLength===t.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},r.prototype.digest=function(){if(!this.finished){var n=this.bytesHashed*8,s=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),c=this.bufferLength;if(s.setUint8(this.bufferLength++,128),c%t.BLOCK_SIZE>=t.BLOCK_SIZE-8){for(var h=this.bufferLength;h<t.BLOCK_SIZE;h++)s.setUint8(h,0);this.hashBuffer(),this.bufferLength=0}for(var h=this.bufferLength;h<t.BLOCK_SIZE-8;h++)s.setUint8(h,0);s.setUint32(t.BLOCK_SIZE-8,Math.floor(n/4294967296),!0),s.setUint32(t.BLOCK_SIZE-4,n),this.hashBuffer(),this.finished=!0}for(var a=new Uint8Array(t.DIGEST_LENGTH),h=0;h<8;h++)a[h*4]=this.state[h]>>>24&255,a[h*4+1]=this.state[h]>>>16&255,a[h*4+2]=this.state[h]>>>8&255,a[h*4+3]=this.state[h]>>>0&255;return a},r.prototype.hashBuffer=function(){for(var n=this,s=n.buffer,c=n.state,h=c[0],a=c[1],g=c[2],y=c[3],_=c[4],M=c[5],x=c[6],S=c[7],D=0;D<t.BLOCK_SIZE;D++){if(D<16)this.temp[D]=(s[D*4]&255)<<24|(s[D*4+1]&255)<<16|(s[D*4+2]&255)<<8|s[D*4+3]&255;else{var O=this.temp[D-2],L=(O>>>17|O<<15)^(O>>>19|O<<13)^O>>>10;O=this.temp[D-15];var I=(O>>>7|O<<25)^(O>>>18|O<<14)^O>>>3;this.temp[D]=(L+this.temp[D-7]|0)+(I+this.temp[D-16]|0)}var z=(((_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&M^~_&x)|0)+(S+(t.KEY[D]+this.temp[D]|0)|0)|0,V=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&a^h&g^a&g)|0;S=x,x=M,M=_,_=y+z|0,y=g,g=a,a=h,h=z+V|0}c[0]+=h,c[1]+=a,c[2]+=g,c[3]+=y,c[4]+=_,c[5]+=M,c[6]+=x,c[7]+=S},r})();return Yt.RawSha256=e,Yt}var vo={},zt={};const Ki=t=>{const e=[];for(let r=0,n=t.length;r<n;r++){const s=t.charCodeAt(r);if(s<128)e.push(s);else if(s<2048)e.push(s>>6|192,s&63|128);else if(r+1<t.length&&(s&64512)===55296&&(t.charCodeAt(r+1)&64512)===56320){const c=65536+((s&1023)<<10)+(t.charCodeAt(++r)&1023);e.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else e.push(s>>12|224,s>>6&63|128,s&63|128)}return Uint8Array.from(e)},Ji=t=>{let e="";for(let r=0,n=t.length;r<n;r++){const s=t[r];if(s<128)e+=String.fromCharCode(s);else if(192<=s&&s<224){const c=t[++r];e+=String.fromCharCode((s&31)<<6|c&63)}else if(240<=s&&s<365){const c="%"+[s,t[++r],t[++r],t[++r]].map(h=>h.toString(16)).join("%");e+=decodeURIComponent(c)}else e+=String.fromCharCode((s&15)<<12|(t[++r]&63)<<6|t[++r]&63)}return e};function Xi(t){return new TextEncoder().encode(t)}function ea(t){return new TextDecoder("utf-8").decode(t)}const ta=t=>typeof TextEncoder=="function"?Xi(t):Ki(t),ra=t=>typeof TextDecoder=="function"?ea(t):Ji(t),na=Object.freeze(Object.defineProperty({__proto__:null,fromUtf8:ta,toUtf8:ra},Symbol.toStringTag,{value:"Module"})),oa=Br(na);var bo;function sa(){if(bo)return zt;bo=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.convertToBuffer=void 0;var t=oa,e=typeof Buffer<"u"&&Buffer.from?function(n){return Buffer.from(n,"utf8")}:t.fromUtf8;function r(n){return n instanceof Uint8Array?n:typeof n=="string"?e(n):ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(n)}return zt.convertToBuffer=r,zt}var Ft={},wo;function ia(){if(wo)return Ft;wo=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.isEmptyData=void 0;function t(e){return typeof e=="string"?e.length===0:e.byteLength===0}return Ft.isEmptyData=t,Ft}var Wt={},_o;function aa(){if(_o)return Wt;_o=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.numToUint8=void 0;function t(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}return Wt.numToUint8=t,Wt}var Ut={},Co;function la(){if(Co)return Ut;Co=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.uint32ArrayFrom=void 0;function t(e){if(!Array.from){for(var r=new Uint32Array(e.length),n=0;n<e.length;)r[n]=e[n];return r}return Uint32Array.from(e)}return Ut.uint32ArrayFrom=t,Ut}var xo;function ua(){return xo||(xo=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var e=sa();Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return e.convertToBuffer}});var r=ia();Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return r.isEmptyData}});var n=aa();Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return n.numToUint8}});var s=la();Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return s.uint32ArrayFrom}})})(vo)),vo}var So;function ca(){if(So)return It;So=1,Object.defineProperty(It,"__esModule",{value:!0}),It.Sha256=void 0;var t=po,e=mo(),r=Zi(),n=ua(),s=(function(){function h(a){if(this.hash=new r.RawSha256,a){this.outer=new r.RawSha256;var g=c(a),y=new Uint8Array(e.BLOCK_SIZE);y.set(g);for(var _=0;_<e.BLOCK_SIZE;_++)g[_]^=54,y[_]^=92;this.hash.update(g),this.outer.update(y);for(var _=0;_<g.byteLength;_++)g[_]=0}}return h.prototype.update=function(a){if(!((0,n.isEmptyData)(a)||this.error))try{this.hash.update((0,n.convertToBuffer)(a))}catch(g){this.error=g}},h.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},h.prototype.digest=function(){return(0,t.__awaiter)(this,void 0,void 0,function(){return(0,t.__generator)(this,function(a){return[2,this.digestSync()]})})},h})();It.Sha256=s;function c(h){var a=(0,n.convertToBuffer)(h);if(a.byteLength>e.BLOCK_SIZE){var g=new r.RawSha256;g.update(a),a=g.digest()}var y=new Uint8Array(e.BLOCK_SIZE);return y.set(a),y}return It}var Do;function da(){return Do||(Do=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=po;(0,e.__exportStar)(ca(),t)})(ho)),ho}da();function ye(t,e){t!=null&&this.fromString(t,e)}function Be(){return new ye(null)}var lt,ha=0xdeadbeefcafe,ko=(ha&16777215)==15715070;function fa(t,e,r,n,s,c){for(;--c>=0;){var h=e*this[t++]+r[n]+s;s=Math.floor(h/67108864),r[n++]=h&67108863}return s}function pa(t,e,r,n,s,c){for(var h=e&32767,a=e>>15;--c>=0;){var g=this[t]&32767,y=this[t++]>>15,_=a*g+y*h;g=h*g+((_&32767)<<15)+r[n]+(s&1073741823),s=(g>>>30)+(_>>>15)+a*y+(s>>>30),r[n++]=g&1073741823}return s}function ga(t,e,r,n,s,c){for(var h=e&16383,a=e>>14;--c>=0;){var g=this[t]&16383,y=this[t++]>>14,_=a*g+y*h;g=h*g+((_&16383)<<14)+r[n]+s,s=(g>>28)+(_>>14)+a*y,r[n++]=g&268435455}return s}var Po=typeof navigator<"u";Po&&ko&&navigator.appName=="Microsoft Internet Explorer"?(ye.prototype.am=pa,lt=30):Po&&ko&&navigator.appName!="Netscape"?(ye.prototype.am=fa,lt=26):(ye.prototype.am=ga,lt=28),ye.prototype.DB=lt,ye.prototype.DM=(1<<lt)-1,ye.prototype.DV=1<<lt;var Hr=52;ye.prototype.FV=Math.pow(2,Hr),ye.prototype.F1=Hr-lt,ye.prototype.F2=2*lt-Hr;var ma="0123456789abcdefghijklmnopqrstuvwxyz",rr=new Array,Dt,Ue;for(Dt=48,Ue=0;Ue<=9;++Ue)rr[Dt++]=Ue;for(Dt=97,Ue=10;Ue<36;++Ue)rr[Dt++]=Ue;for(Dt=65,Ue=10;Ue<36;++Ue)rr[Dt++]=Ue;function Mo(t){return ma.charAt(t)}function ya(t,e){var r=rr[t.charCodeAt(e)];return r??-1}function va(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function ba(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0}function Gr(t){var e=Be();return e.fromInt(t),e}function wa(t,e){var r;if(e==16)r=4;else if(e==8)r=3;else if(e==2)r=1;else if(e==32)r=5;else if(e==4)r=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;for(var n=t.length,s=!1,c=0;--n>=0;){var h=ya(t,n);if(h<0){t.charAt(n)=="-"&&(s=!0);continue}s=!1,c==0?this[this.t++]=h:c+r>this.DB?(this[this.t-1]|=(h&(1<<this.DB-c)-1)<<c,this[this.t++]=h>>this.DB-c):this[this.t-1]|=h<<c,c+=r,c>=this.DB&&(c-=this.DB)}this.clamp(),s&&ye.ZERO.subTo(this,this)}function _a(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function Ca(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(t==16)e=4;else if(t==8)e=3;else if(t==2)e=1;else if(t==32)e=5;else if(t==4)e=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");var r=(1<<e)-1,n,s=!1,c="",h=this.t,a=this.DB-h*this.DB%e;if(h-- >0)for(a<this.DB&&(n=this[h]>>a)>0&&(s=!0,c=Mo(n));h>=0;)a<e?(n=(this[h]&(1<<a)-1)<<e-a,n|=this[--h]>>(a+=this.DB-e)):(n=this[h]>>(a-=e)&r,a<=0&&(a+=this.DB,--h)),n>0&&(s=!0),s&&(c+=Mo(n));return s?c:"0"}function xa(){var t=Be();return ye.ZERO.subTo(this,t),t}function Sa(){return this.s<0?this.negate():this}function Da(t){var e=this.s-t.s;if(e!=0)return e;var r=this.t;if(e=r-t.t,e!=0)return this.s<0?-e:e;for(;--r>=0;)if((e=this[r]-t[r])!=0)return e;return 0}function Qr(t){var e=1,r;return(r=t>>>16)!=0&&(t=r,e+=16),(r=t>>8)!=0&&(t=r,e+=8),(r=t>>4)!=0&&(t=r,e+=4),(r=t>>2)!=0&&(t=r,e+=2),(r=t>>1)!=0&&(t=r,e+=1),e}function ka(){return this.t<=0?0:this.DB*(this.t-1)+Qr(this[this.t-1]^this.s&this.DM)}function Pa(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s}function Ma(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s}function Oa(t,e){var r=t%this.DB,n=this.DB-r,s=(1<<n)-1,c=Math.floor(t/this.DB),h=this.s<<r&this.DM,a;for(a=this.t-1;a>=0;--a)e[a+c+1]=this[a]>>n|h,h=(this[a]&s)<<r;for(a=c-1;a>=0;--a)e[a]=0;e[c]=h,e.t=this.t+c+1,e.s=this.s,e.clamp()}function Aa(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t){e.t=0;return}var n=t%this.DB,s=this.DB-n,c=(1<<n)-1;e[0]=this[r]>>n;for(var h=r+1;h<this.t;++h)e[h-r-1]|=(this[h]&c)<<s,e[h-r]=this[h]>>n;n>0&&(e[this.t-r-1]|=(this.s&c)<<s),e.t=this.t-r,e.clamp()}function Ea(t,e){for(var r=0,n=0,s=Math.min(t.t,this.t);r<s;)n+=this[r]-t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],e[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()}function Ta(t,e){var r=this.abs(),n=t.abs(),s=r.t;for(e.t=s+n.t;--s>=0;)e[s]=0;for(s=0;s<n.t;++s)e[s+r.t]=r.am(0,n[s],e,s,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&ye.ZERO.subTo(e,e)}function ja(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()}function $a(t,e,r){var n=t.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t){e?.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=Be());var c=Be(),h=this.s,a=t.s,g=this.DB-Qr(n[n.t-1]);g>0?(n.lShiftTo(g,c),s.lShiftTo(g,r)):(n.copyTo(c),s.copyTo(r));var y=c.t,_=c[y-1];if(_!=0){var M=_*(1<<this.F1)+(y>1?c[y-2]>>this.F2:0),x=this.FV/M,S=(1<<this.F1)/M,D=1<<this.F2,O=r.t,L=O-y,I=e??Be();for(c.dlShiftTo(L,I),r.compareTo(I)>=0&&(r[r.t++]=1,r.subTo(I,r)),ye.ONE.dlShiftTo(y,I),I.subTo(c,c);c.t<y;)c[c.t++]=0;for(;--L>=0;){var z=r[--O]==_?this.DM:Math.floor(r[O]*x+(r[O-1]+D)*S);if((r[O]+=c.am(0,z,r,L,0,y))<z)for(c.dlShiftTo(L,I),r.subTo(I,r);r[O]<--z;)r.subTo(I,r)}e!=null&&(r.drShiftTo(y,e),h!=a&&ye.ZERO.subTo(e,e)),r.t=y,r.clamp(),g>0&&r.rShiftTo(g,r),h<0&&ye.ZERO.subTo(r,r)}}}function Ra(t){var e=Be();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(ye.ZERO)>0&&t.subTo(e,e),e}function Na(){if(this.t<1)return 0;var t=this[0];if((t&1)==0)return 0;var e=t&3;return e=e*(2-(t&15)*e)&15,e=e*(2-(t&255)*e)&255,e=e*(2-((t&65535)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function La(t){return this.compareTo(t)==0}function Ba(t,e){for(var r=0,n=0,s=Math.min(t.t,this.t);r<s;)n+=this[r]+t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n+=t[r],e[r++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()}function Ia(t){var e=Be();return this.addTo(t,e),e}function Ya(t){var e=Be();return this.subTo(t,e),e}function za(t){var e=Be();return this.multiplyTo(t,e),e}function Fa(t){var e=Be();return this.divRemTo(t,e,null),e}function kt(t){this.m=t,this.mp=t.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function Wa(t){var e=Be();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(ye.ZERO)>0&&this.m.subTo(e,e),e}function Ua(t){var e=Be();return t.copyTo(e),this.reduce(e),e}function qa(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=t[e]&32767,n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t[r]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function Va(t,e){t.squareTo(e),this.reduce(e)}function Ha(t,e,r){t.multiplyTo(e,r),this.reduce(r)}kt.prototype.convert=Wa,kt.prototype.revert=Ua,kt.prototype.reduce=qa,kt.prototype.mulTo=Ha,kt.prototype.sqrTo=Va;function Ga(t,e,r){var n=t.bitLength(),s,c=Gr(1),h=new kt(e);if(n<=0)return c;n<18?s=1:n<48?s=3:n<144?s=4:n<768?s=5:s=6;var a=new Array,g=3,y=s-1,_=(1<<s)-1;if(a[1]=h.convert(this),s>1){var M=Be();for(h.sqrTo(a[1],M);g<=_;)a[g]=Be(),h.mulTo(M,a[g-2],a[g]),g+=2}var x=t.t-1,S,D=!0,O=Be(),L;for(n=Qr(t[x])-1;x>=0;){for(n>=y?S=t[x]>>n-y&_:(S=(t[x]&(1<<n+1)-1)<<y-n,x>0&&(S|=t[x-1]>>this.DB+n-y)),g=s;(S&1)==0;)S>>=1,--g;if((n-=g)<0&&(n+=this.DB,--x),D)a[S].copyTo(c),D=!1;else{for(;g>1;)h.sqrTo(c,O),h.sqrTo(O,c),g-=2;g>0?h.sqrTo(c,O):(L=c,c=O,O=L),h.mulTo(O,a[S],c)}for(;x>=0&&(t[x]&1<<n)==0;)h.sqrTo(c,O),L=c,c=O,O=L,--n<0&&(n=this.DB-1,--x)}var I=h.revert(c);return r(null,I),I}ye.prototype.copyTo=va,ye.prototype.fromInt=ba,ye.prototype.fromString=wa,ye.prototype.clamp=_a,ye.prototype.dlShiftTo=Pa,ye.prototype.drShiftTo=Ma,ye.prototype.lShiftTo=Oa,ye.prototype.rShiftTo=Aa,ye.prototype.subTo=Ea,ye.prototype.multiplyTo=Ta,ye.prototype.squareTo=ja,ye.prototype.divRemTo=$a,ye.prototype.invDigit=Na,ye.prototype.addTo=Ba,ye.prototype.toString=Ca,ye.prototype.negate=xa,ye.prototype.abs=Sa,ye.prototype.compareTo=Da,ye.prototype.bitLength=ka,ye.prototype.mod=Ra,ye.prototype.equals=La,ye.prototype.add=Ia,ye.prototype.subtract=Ya,ye.prototype.multiply=za,ye.prototype.divide=Fa,ye.prototype.modPow=Ga,ye.ZERO=Gr(0),ye.ONE=Gr(1);function Qa(t,e){return e=e||{},new Promise(function(r,n){var s=new XMLHttpRequest,c=[],h=[],a={},g=function(){return{ok:(s.status/100|0)==2,statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:g,headers:{keys:function(){return c},entries:function(){return h},get:function(_){return a[_.toLowerCase()]},has:function(_){return _.toLowerCase()in a}}}};for(var y in s.open(e.method||"get",t,!0),s.onload=function(){s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(_,M,x){c.push(M=M.toLowerCase()),h.push([M,x]),a[M]=a[M]?a[M]+","+x:x}),r(g())},s.onerror=n,s.withCredentials=e.credentials=="include",e.headers)s.setRequestHeader(y,e.headers[y]);s.send(e.body||null)})}const Za=Object.freeze(Object.defineProperty({__proto__:null,default:Qa},Symbol.toStringTag,{value:"Module"})),Oo=Br(Za);var Ao,Eo;function Ka(){return Eo||(Eo=1,Ao=self.fetch||(self.fetch=Oo.default||Oo)),Ao}Ka();var To={exports:{}};var jo;function Ja(){return jo||(jo=1,(function(t,e){(function(r){var n;if(t.exports=r(),n=!0,!n){var s=window.Cookies,c=window.Cookies=r();c.noConflict=function(){return window.Cookies=s,c}}})(function(){function r(){for(var c=0,h={};c<arguments.length;c++){var a=arguments[c];for(var g in a)h[g]=a[g]}return h}function n(c){return c.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function s(c){function h(){}function a(y,_,M){if(!(typeof document>"u")){M=r({path:"/"},h.defaults,M),typeof M.expires=="number"&&(M.expires=new Date(new Date*1+M.expires*864e5)),M.expires=M.expires?M.expires.toUTCString():"";try{var x=JSON.stringify(_);/^[\{\[]/.test(x)&&(_=x)}catch{}_=c.write?c.write(_,y):encodeURIComponent(String(_)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),y=encodeURIComponent(String(y)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var S="";for(var D in M)M[D]&&(S+="; "+D,M[D]!==!0&&(S+="="+M[D].split(";")[0]));return document.cookie=y+"="+_+S}}function g(y,_){if(!(typeof document>"u")){for(var M={},x=document.cookie?document.cookie.split("; "):[],S=0;S<x.length;S++){var D=x[S].split("="),O=D.slice(1).join("=");!_&&O.charAt(0)==='"'&&(O=O.slice(1,-1));try{var L=n(D[0]);if(O=(c.read||c)(O,L)||n(O),_)try{O=JSON.parse(O)}catch{}if(M[L]=O,y===L)break}catch{}}return y?M[y]:M}}return h.set=a,h.get=function(y){return g(y,!1)},h.getJSON=function(y){return g(y,!0)},h.remove=function(y,_){a(y,"",r(_,{expires:-1}))},h.defaults={},h.withConverter=s,h}return s(function(){})})})(To)),To.exports}Ja();function Xa(){if(!window.MantineCognitoUserPool)throw new Error("Cognito Userpool has not been initialized.");return window.MantineCognitoUserPool}function el(){return Xa().getCurrentUser()}function tl(){return new Promise((t,e)=>{const r=el();r===null&&e(null),r?.getSession((n,s)=>{if(n!==null||s===null)return e(null);t({session:s,authenticatedUser:r})})})}async function rl(){const{session:t}=await tl();return t?.getIdToken().getJwtToken()}G.createContext(void 0);var nl="undefined",ol="object",nr="browser",$o="cpu",Ro="device",Zr="engine",or="os",ut="name",sr="type",Kr="vendor",Je="version",Jr="architecture",Xr="major",en="model",sl="console",il="mobile",al="tablet",ll="smarttv",ul="wearable",cl="embedded",dl=typeof window!==nl,tn=dl&&window.navigator?window.navigator:void 0;tn&&tn.userAgentData&&tn.userAgentData;var ir=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},ar=function(t){for(var e in t){var r=t[e];typeof r==ol&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this};(function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return ar.call(t.init,[[nr,[ut,Je,Xr,sr]],[$o,[Jr]],[Ro,[sr,en,Kr]],[Zr,[ut,Je]],[or,[ut,Je]]]),ar.call(t.isIgnore,[[nr,[Je,Xr]],[Zr,[Je]],[or,[Je]]]),ar.call(t.isIgnoreRgx,[[nr,/ ?browser$/i],[or,/ ?os$/i]]),ar.call(t.toString,[[nr,[ut,Je]],[$o,[Jr]],[Ro,[Kr,en]],[Zr,[ut,Je]],[or,[ut,Je]]]),t})(),ir([ut,Je,Xr,sr]),ir([Jr]),ir([en,Kr,sr,sl,il,ll,al,ul,cl]),ir([ut,Je]);var rn={exports:{}},hl=rn.exports,No;function fl(){return No||(No=1,(function(t,e){(function(r,n){t.exports=n()})(hl,()=>(()=>{var r={873:(h,a)=>{var g,y,_=(function(){var M=function(k,C){var v=k,d=I[C],u=null,m=0,f=null,i=[],b={},T=function(A,N){u=(function($){for(var B=new Array($),Y=0;Y<$;Y+=1){B[Y]=new Array($);for(var ce=0;ce<$;ce+=1)B[Y][ce]=null}return B})(m=4*v+17),j(0,0),j(m-7,0),j(0,m-7),ee(),K(),H(A,N),v>=7&&te(A),f==null&&(f=oe(v,d,i)),ie(f,N)},j=function(A,N){for(var $=-1;$<=7;$+=1)if(!(A+$<=-1||m<=A+$))for(var B=-1;B<=7;B+=1)N+B<=-1||m<=N+B||(u[A+$][N+B]=0<=$&&$<=6&&(B==0||B==6)||0<=B&&B<=6&&($==0||$==6)||2<=$&&$<=4&&2<=B&&B<=4)},K=function(){for(var A=8;A<m-8;A+=1)u[A][6]==null&&(u[A][6]=A%2==0);for(var N=8;N<m-8;N+=1)u[6][N]==null&&(u[6][N]=N%2==0)},ee=function(){for(var A=z.getPatternPosition(v),N=0;N<A.length;N+=1)for(var $=0;$<A.length;$+=1){var B=A[N],Y=A[$];if(u[B][Y]==null)for(var ce=-2;ce<=2;ce+=1)for(var o=-2;o<=2;o+=1)u[B+ce][Y+o]=ce==-2||ce==2||o==-2||o==2||ce==0&&o==0}},te=function(A){for(var N=z.getBCHTypeNumber(v),$=0;$<18;$+=1){var B=!A&&(N>>$&1)==1;u[Math.floor($/3)][$%3+m-8-3]=B}for($=0;$<18;$+=1)B=!A&&(N>>$&1)==1,u[$%3+m-8-3][Math.floor($/3)]=B},H=function(A,N){for(var $=d<<3|N,B=z.getBCHTypeInfo($),Y=0;Y<15;Y+=1){var ce=!A&&(B>>Y&1)==1;Y<6?u[Y][8]=ce:Y<8?u[Y+1][8]=ce:u[m-15+Y][8]=ce}for(Y=0;Y<15;Y+=1)ce=!A&&(B>>Y&1)==1,Y<8?u[8][m-Y-1]=ce:Y<9?u[8][15-Y-1+1]=ce:u[8][15-Y-1]=ce;u[m-8][8]=!A},ie=function(A,N){for(var $=-1,B=m-1,Y=7,ce=0,o=z.getMaskFunction(N),l=m-1;l>0;l-=2)for(l==6&&(l-=1);;){for(var p=0;p<2;p+=1)if(u[B][l-p]==null){var P=!1;ce<A.length&&(P=(A[ce]>>>Y&1)==1),o(B,l-p)&&(P=!P),u[B][l-p]=P,(Y-=1)==-1&&(ce+=1,Y=7)}if((B+=$)<0||m<=B){B-=$,$=-$;break}}},oe=function(A,N,$){for(var B=X.getRSBlocks(A,N),Y=re(),ce=0;ce<$.length;ce+=1){var o=$[ce];Y.put(o.getMode(),4),Y.put(o.getLength(),z.getLengthInBits(o.getMode(),A)),o.write(Y)}var l=0;for(ce=0;ce<B.length;ce+=1)l+=B[ce].dataCount;if(Y.getLengthInBits()>8*l)throw"code length overflow. ("+Y.getLengthInBits()+">"+8*l+")";for(Y.getLengthInBits()+4<=8*l&&Y.put(0,4);Y.getLengthInBits()%8!=0;)Y.putBit(!1);for(;!(Y.getLengthInBits()>=8*l||(Y.put(236,8),Y.getLengthInBits()>=8*l));)Y.put(17,8);return(function(p,P){for(var R=0,F=0,le=0,he=new Array(P.length),pe=new Array(P.length),ne=0;ne<P.length;ne+=1){var fe=P[ne].dataCount,me=P[ne].totalCount-fe;F=Math.max(F,fe),le=Math.max(le,me),he[ne]=new Array(fe);for(var ge=0;ge<he[ne].length;ge+=1)he[ne][ge]=255&p.getBuffer()[ge+R];R+=fe;var Se=z.getErrorCorrectPolynomial(me),_e=q(he[ne],Se.getLength()-1).mod(Se);for(pe[ne]=new Array(Se.getLength()-1),ge=0;ge<pe[ne].length;ge+=1){var Ce=ge+_e.getLength()-pe[ne].length;pe[ne][ge]=Ce>=0?_e.getAt(Ce):0}}var ze=0;for(ge=0;ge<P.length;ge+=1)ze+=P[ge].totalCount;var Ee=new Array(ze),xe=0;for(ge=0;ge<F;ge+=1)for(ne=0;ne<P.length;ne+=1)ge<he[ne].length&&(Ee[xe]=he[ne][ge],xe+=1);for(ge=0;ge<le;ge+=1)for(ne=0;ne<P.length;ne+=1)ge<pe[ne].length&&(Ee[xe]=pe[ne][ge],xe+=1);return Ee})(Y,B)};b.addData=function(A,N){var $=null;switch(N=N||"Byte"){case"Numeric":$=Q(A);break;case"Alphanumeric":$=J(A);break;case"Byte":$=Z(A);break;case"Kanji":$=U(A);break;default:throw"mode:"+N}i.push($),f=null},b.isDark=function(A,N){if(A<0||m<=A||N<0||m<=N)throw A+","+N;return u[A][N]},b.getModuleCount=function(){return m},b.make=function(){if(v<1){for(var A=1;A<40;A++){for(var N=X.getRSBlocks(A,d),$=re(),B=0;B<i.length;B++){var Y=i[B];$.put(Y.getMode(),4),$.put(Y.getLength(),z.getLengthInBits(Y.getMode(),A)),Y.write($)}var ce=0;for(B=0;B<N.length;B++)ce+=N[B].dataCount;if($.getLengthInBits()<=8*ce)break}v=A}T(!1,(function(){for(var o=0,l=0,p=0;p<8;p+=1){T(!0,p);var P=z.getLostPoint(b);(p==0||o>P)&&(o=P,l=p)}return l})())},b.createTableTag=function(A,N){A=A||2;var $="";$+='<table style="',$+=" border-width: 0px; border-style: none;",$+=" border-collapse: collapse;",$+=" padding: 0px; margin: "+(N=N===void 0?4*A:N)+"px;",$+='">',$+="<tbody>";for(var B=0;B<b.getModuleCount();B+=1){$+="<tr>";for(var Y=0;Y<b.getModuleCount();Y+=1)$+='<td style="',$+=" border-width: 0px; border-style: none;",$+=" border-collapse: collapse;",$+=" padding: 0px; margin: 0px;",$+=" width: "+A+"px;",$+=" height: "+A+"px;",$+=" background-color: ",$+=b.isDark(B,Y)?"#000000":"#ffffff",$+=";",$+='"/>';$+="</tr>"}return($+="</tbody>")+"</table>"},b.createSvgTag=function(A,N,$,B){var Y={};typeof arguments[0]=="object"&&(A=(Y=arguments[0]).cellSize,N=Y.margin,$=Y.alt,B=Y.title),A=A||2,N=N===void 0?4*A:N,($=typeof $=="string"?{text:$}:$||{}).text=$.text||null,$.id=$.text?$.id||"qrcode-description":null,(B=typeof B=="string"?{text:B}:B||{}).text=B.text||null,B.id=B.text?B.id||"qrcode-title":null;var ce,o,l,p,P=b.getModuleCount()*A+2*N,R="";for(p="l"+A+",0 0,"+A+" -"+A+",0 0,-"+A+"z ",R+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',R+=Y.scalable?"":' width="'+P+'px" height="'+P+'px"',R+=' viewBox="0 0 '+P+" "+P+'" ',R+=' preserveAspectRatio="xMinYMin meet"',R+=B.text||$.text?' role="img" aria-labelledby="'+ue([B.id,$.id].join(" ").trim())+'"':"",R+=">",R+=B.text?'<title id="'+ue(B.id)+'">'+ue(B.text)+"</title>":"",R+=$.text?'<description id="'+ue($.id)+'">'+ue($.text)+"</description>":"",R+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',R+='<path d="',o=0;o<b.getModuleCount();o+=1)for(l=o*A+N,ce=0;ce<b.getModuleCount();ce+=1)b.isDark(o,ce)&&(R+="M"+(ce*A+N)+","+l+p);return(R+='" stroke="transparent" fill="black"/>')+"</svg>"},b.createDataURL=function(A,N){A=A||2,N=N===void 0?4*A:N;var $=b.getModuleCount()*A+2*N,B=N,Y=$-N;return se($,$,function(ce,o){if(B<=ce&&ce<Y&&B<=o&&o<Y){var l=Math.floor((ce-B)/A),p=Math.floor((o-B)/A);return b.isDark(p,l)?0:1}return 1})},b.createImgTag=function(A,N,$){A=A||2,N=N===void 0?4*A:N;var B=b.getModuleCount()*A+2*N,Y="";return Y+="<img",Y+=' src="',Y+=b.createDataURL(A,N),Y+='"',Y+=' width="',Y+=B,Y+='"',Y+=' height="',Y+=B,Y+='"',$&&(Y+=' alt="',Y+=ue($),Y+='"'),Y+"/>"};var ue=function(A){for(var N="",$=0;$<A.length;$+=1){var B=A.charAt($);switch(B){case"<":N+="&lt;";break;case">":N+="&gt;";break;case"&":N+="&amp;";break;case'"':N+="&quot;";break;default:N+=B}}return N};return b.createASCII=function(A,N){if((A=A||1)<2)return(function(he){he=he===void 0?2:he;var pe,ne,fe,me,ge,Se=1*b.getModuleCount()+2*he,_e=he,Ce=Se-he,ze={"██":"█","█ ":"▀"," █":"▄"," ":" "},Ee={"██":"▀","█ ":"▀"," █":" "," ":" "},xe="";for(pe=0;pe<Se;pe+=2){for(fe=Math.floor((pe-_e)/1),me=Math.floor((pe+1-_e)/1),ne=0;ne<Se;ne+=1)ge="█",_e<=ne&&ne<Ce&&_e<=pe&&pe<Ce&&b.isDark(fe,Math.floor((ne-_e)/1))&&(ge=" "),_e<=ne&&ne<Ce&&_e<=pe+1&&pe+1<Ce&&b.isDark(me,Math.floor((ne-_e)/1))?ge+=" ":ge+="█",xe+=he<1&&pe+1>=Ce?Ee[ge]:ze[ge];xe+=`
20
+ `}return Se%2&&he>0?xe.substring(0,xe.length-Se-1)+Array(Se+1).join("▀"):xe.substring(0,xe.length-1)})(N);A-=1,N=N===void 0?2*A:N;var $,B,Y,ce,o=b.getModuleCount()*A+2*N,l=N,p=o-N,P=Array(A+1).join("██"),R=Array(A+1).join(" "),F="",le="";for($=0;$<o;$+=1){for(Y=Math.floor(($-l)/A),le="",B=0;B<o;B+=1)ce=1,l<=B&&B<p&&l<=$&&$<p&&b.isDark(Y,Math.floor((B-l)/A))&&(ce=0),le+=ce?P:R;for(Y=0;Y<A;Y+=1)F+=le+`
21
+ `}return F.substring(0,F.length-1)},b.renderTo2dContext=function(A,N){N=N||2;for(var $=b.getModuleCount(),B=0;B<$;B++)for(var Y=0;Y<$;Y++)A.fillStyle=b.isDark(B,Y)?"black":"white",A.fillRect(B*N,Y*N,N,N)},b};M.stringToBytes=(M.stringToBytesFuncs={default:function(k){for(var C=[],v=0;v<k.length;v+=1){var d=k.charCodeAt(v);C.push(255&d)}return C}}).default,M.createStringToBytes=function(k,C){var v=(function(){for(var u=ae(k),m=function(){var K=u.read();if(K==-1)throw"eof";return K},f=0,i={};;){var b=u.read();if(b==-1)break;var T=m(),j=m()<<8|m();i[String.fromCharCode(b<<8|T)]=j,f+=1}if(f!=C)throw f+" != "+C;return i})(),d=63;return function(u){for(var m=[],f=0;f<u.length;f+=1){var i=u.charCodeAt(f);if(i<128)m.push(i);else{var b=v[u.charAt(f)];typeof b=="number"?(255&b)==b?m.push(b):(m.push(b>>>8),m.push(255&b)):m.push(d)}}return m}};var x,S,D,O,L,I={L:1,M:0,Q:3,H:2},z=(x=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],S=1335,D=7973,L=function(k){for(var C=0;k!=0;)C+=1,k>>>=1;return C},(O={}).getBCHTypeInfo=function(k){for(var C=k<<10;L(C)-L(S)>=0;)C^=S<<L(C)-L(S);return 21522^(k<<10|C)},O.getBCHTypeNumber=function(k){for(var C=k<<12;L(C)-L(D)>=0;)C^=D<<L(C)-L(D);return k<<12|C},O.getPatternPosition=function(k){return x[k-1]},O.getMaskFunction=function(k){switch(k){case 0:return function(C,v){return(C+v)%2==0};case 1:return function(C,v){return C%2==0};case 2:return function(C,v){return v%3==0};case 3:return function(C,v){return(C+v)%3==0};case 4:return function(C,v){return(Math.floor(C/2)+Math.floor(v/3))%2==0};case 5:return function(C,v){return C*v%2+C*v%3==0};case 6:return function(C,v){return(C*v%2+C*v%3)%2==0};case 7:return function(C,v){return(C*v%3+(C+v)%2)%2==0};default:throw"bad maskPattern:"+k}},O.getErrorCorrectPolynomial=function(k){for(var C=q([1],0),v=0;v<k;v+=1)C=C.multiply(q([1,V.gexp(v)],0));return C},O.getLengthInBits=function(k,C){if(1<=C&&C<10)switch(k){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+k}else if(C<27)switch(k){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+k}else{if(!(C<41))throw"type:"+C;switch(k){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+k}}},O.getLostPoint=function(k){for(var C=k.getModuleCount(),v=0,d=0;d<C;d+=1)for(var u=0;u<C;u+=1){for(var m=0,f=k.isDark(d,u),i=-1;i<=1;i+=1)if(!(d+i<0||C<=d+i))for(var b=-1;b<=1;b+=1)u+b<0||C<=u+b||i==0&&b==0||f==k.isDark(d+i,u+b)&&(m+=1);m>5&&(v+=3+m-5)}for(d=0;d<C-1;d+=1)for(u=0;u<C-1;u+=1){var T=0;k.isDark(d,u)&&(T+=1),k.isDark(d+1,u)&&(T+=1),k.isDark(d,u+1)&&(T+=1),k.isDark(d+1,u+1)&&(T+=1),T!=0&&T!=4||(v+=3)}for(d=0;d<C;d+=1)for(u=0;u<C-6;u+=1)k.isDark(d,u)&&!k.isDark(d,u+1)&&k.isDark(d,u+2)&&k.isDark(d,u+3)&&k.isDark(d,u+4)&&!k.isDark(d,u+5)&&k.isDark(d,u+6)&&(v+=40);for(u=0;u<C;u+=1)for(d=0;d<C-6;d+=1)k.isDark(d,u)&&!k.isDark(d+1,u)&&k.isDark(d+2,u)&&k.isDark(d+3,u)&&k.isDark(d+4,u)&&!k.isDark(d+5,u)&&k.isDark(d+6,u)&&(v+=40);var j=0;for(u=0;u<C;u+=1)for(d=0;d<C;d+=1)k.isDark(d,u)&&(j+=1);return v+Math.abs(100*j/C/C-50)/5*10},O),V=(function(){for(var k=new Array(256),C=new Array(256),v=0;v<8;v+=1)k[v]=1<<v;for(v=8;v<256;v+=1)k[v]=k[v-4]^k[v-5]^k[v-6]^k[v-8];for(v=0;v<255;v+=1)C[k[v]]=v;return{glog:function(d){if(d<1)throw"glog("+d+")";return C[d]},gexp:function(d){for(;d<0;)d+=255;for(;d>=256;)d-=255;return k[d]}}})();function q(k,C){if(k.length===void 0)throw k.length+"/"+C;var v=(function(){for(var u=0;u<k.length&&k[u]==0;)u+=1;for(var m=new Array(k.length-u+C),f=0;f<k.length-u;f+=1)m[f]=k[f+u];return m})(),d={getAt:function(u){return v[u]},getLength:function(){return v.length},multiply:function(u){for(var m=new Array(d.getLength()+u.getLength()-1),f=0;f<d.getLength();f+=1)for(var i=0;i<u.getLength();i+=1)m[f+i]^=V.gexp(V.glog(d.getAt(f))+V.glog(u.getAt(i)));return q(m,0)},mod:function(u){if(d.getLength()-u.getLength()<0)return d;for(var m=V.glog(d.getAt(0))-V.glog(u.getAt(0)),f=new Array(d.getLength()),i=0;i<d.getLength();i+=1)f[i]=d.getAt(i);for(i=0;i<u.getLength();i+=1)f[i]^=V.gexp(V.glog(u.getAt(i))+m);return q(f,0).mod(u)}};return d}var X=(function(){var k=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],C=function(d,u){var m={};return m.totalCount=d,m.dataCount=u,m},v={getRSBlocks:function(d,u){var m=(function(te,H){switch(H){case I.L:return k[4*(te-1)+0];case I.M:return k[4*(te-1)+1];case I.Q:return k[4*(te-1)+2];case I.H:return k[4*(te-1)+3];default:return}})(d,u);if(m===void 0)throw"bad rs block @ typeNumber:"+d+"/errorCorrectionLevel:"+u;for(var f=m.length/3,i=[],b=0;b<f;b+=1)for(var T=m[3*b+0],j=m[3*b+1],K=m[3*b+2],ee=0;ee<T;ee+=1)i.push(C(j,K));return i}};return v})(),re=function(){var k=[],C=0,v={getBuffer:function(){return k},getAt:function(d){var u=Math.floor(d/8);return(k[u]>>>7-d%8&1)==1},put:function(d,u){for(var m=0;m<u;m+=1)v.putBit((d>>>u-m-1&1)==1)},getLengthInBits:function(){return C},putBit:function(d){var u=Math.floor(C/8);k.length<=u&&k.push(0),d&&(k[u]|=128>>>C%8),C+=1}};return v},Q=function(k){var C=k,v={getMode:function(){return 1},getLength:function(m){return C.length},write:function(m){for(var f=C,i=0;i+2<f.length;)m.put(d(f.substring(i,i+3)),10),i+=3;i<f.length&&(f.length-i==1?m.put(d(f.substring(i,i+1)),4):f.length-i==2&&m.put(d(f.substring(i,i+2)),7))}},d=function(m){for(var f=0,i=0;i<m.length;i+=1)f=10*f+u(m.charAt(i));return f},u=function(m){if("0"<=m&&m<="9")return m.charCodeAt(0)-48;throw"illegal char :"+m};return v},J=function(k){var C=k,v={getMode:function(){return 2},getLength:function(u){return C.length},write:function(u){for(var m=C,f=0;f+1<m.length;)u.put(45*d(m.charAt(f))+d(m.charAt(f+1)),11),f+=2;f<m.length&&u.put(d(m.charAt(f)),6)}},d=function(u){if("0"<=u&&u<="9")return u.charCodeAt(0)-48;if("A"<=u&&u<="Z")return u.charCodeAt(0)-65+10;switch(u){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+u}};return v},Z=function(k){var C=M.stringToBytes(k);return{getMode:function(){return 4},getLength:function(v){return C.length},write:function(v){for(var d=0;d<C.length;d+=1)v.put(C[d],8)}}},U=function(k){var C=M.stringToBytesFuncs.SJIS;if(!C)throw"sjis not supported.";(function(){var u=C("友");if(u.length!=2||(u[0]<<8|u[1])!=38726)throw"sjis not supported."})();var v=C(k),d={getMode:function(){return 8},getLength:function(u){return~~(v.length/2)},write:function(u){for(var m=v,f=0;f+1<m.length;){var i=(255&m[f])<<8|255&m[f+1];if(33088<=i&&i<=40956)i-=33088;else{if(!(57408<=i&&i<=60351))throw"illegal char at "+(f+1)+"/"+i;i-=49472}i=192*(i>>>8&255)+(255&i),u.put(i,13),f+=2}if(f<m.length)throw"illegal char at "+(f+1)}};return d},W=function(){var k=[],C={writeByte:function(v){k.push(255&v)},writeShort:function(v){C.writeByte(v),C.writeByte(v>>>8)},writeBytes:function(v,d,u){d=d||0,u=u||v.length;for(var m=0;m<u;m+=1)C.writeByte(v[m+d])},writeString:function(v){for(var d=0;d<v.length;d+=1)C.writeByte(v.charCodeAt(d))},toByteArray:function(){return k},toString:function(){var v="";v+="[";for(var d=0;d<k.length;d+=1)d>0&&(v+=","),v+=k[d];return v+"]"}};return C},ae=function(k){var C=k,v=0,d=0,u=0,m={read:function(){for(;u<8;){if(v>=C.length){if(u==0)return-1;throw"unexpected end of file./"+u}var i=C.charAt(v);if(v+=1,i=="=")return u=0,-1;i.match(/^\s$/)||(d=d<<6|f(i.charCodeAt(0)),u+=6)}var b=d>>>u-8&255;return u-=8,b}},f=function(i){if(65<=i&&i<=90)return i-65;if(97<=i&&i<=122)return i-97+26;if(48<=i&&i<=57)return i-48+52;if(i==43)return 62;if(i==47)return 63;throw"c:"+i};return m},se=function(k,C,v){for(var d=(function(j,K){var ee=j,te=K,H=new Array(j*K),ie={setPixel:function(A,N,$){H[N*ee+A]=$},write:function(A){A.writeString("GIF87a"),A.writeShort(ee),A.writeShort(te),A.writeByte(128),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(255),A.writeByte(255),A.writeByte(255),A.writeString(","),A.writeShort(0),A.writeShort(0),A.writeShort(ee),A.writeShort(te),A.writeByte(0);var N=oe(2);A.writeByte(2);for(var $=0;N.length-$>255;)A.writeByte(255),A.writeBytes(N,$,255),$+=255;A.writeByte(N.length-$),A.writeBytes(N,$,N.length-$),A.writeByte(0),A.writeString(";")}},oe=function(A){for(var N=1<<A,$=1+(1<<A),B=A+1,Y=ue(),ce=0;ce<N;ce+=1)Y.add(String.fromCharCode(ce));Y.add(String.fromCharCode(N)),Y.add(String.fromCharCode($));var o,l,p,P=W(),R=(o=P,l=0,p=0,{write:function(pe,ne){if(pe>>>ne)throw"length over";for(;l+ne>=8;)o.writeByte(255&(pe<<l|p)),ne-=8-l,pe>>>=8-l,p=0,l=0;p|=pe<<l,l+=ne},flush:function(){l>0&&o.writeByte(p)}});R.write(N,B);var F=0,le=String.fromCharCode(H[F]);for(F+=1;F<H.length;){var he=String.fromCharCode(H[F]);F+=1,Y.contains(le+he)?le+=he:(R.write(Y.indexOf(le),B),Y.size()<4095&&(Y.size()==1<<B&&(B+=1),Y.add(le+he)),le=he)}return R.write(Y.indexOf(le),B),R.write($,B),R.flush(),P.toByteArray()},ue=function(){var A={},N=0,$={add:function(B){if($.contains(B))throw"dup key:"+B;A[B]=N,N+=1},size:function(){return N},indexOf:function(B){return A[B]},contains:function(B){return A[B]!==void 0}};return $};return ie})(k,C),u=0;u<C;u+=1)for(var m=0;m<k;m+=1)d.setPixel(m,u,v(m,u));var f=W();d.write(f);for(var i=(function(){var j=0,K=0,ee=0,te="",H={},ie=function(ue){te+=String.fromCharCode(oe(63&ue))},oe=function(ue){if(!(ue<0)){if(ue<26)return 65+ue;if(ue<52)return ue-26+97;if(ue<62)return ue-52+48;if(ue==62)return 43;if(ue==63)return 47}throw"n:"+ue};return H.writeByte=function(ue){for(j=j<<8|255&ue,K+=8,ee+=1;K>=6;)ie(j>>>K-6),K-=6},H.flush=function(){if(K>0&&(ie(j<<6-K),j=0,K=0),ee%3!=0)for(var ue=3-ee%3,A=0;A<ue;A+=1)te+="="},H.toString=function(){return te},H})(),b=f.toByteArray(),T=0;T<b.length;T+=1)i.writeByte(b[T]);return i.flush(),"data:image/gif;base64,"+i};return M})();_.stringToBytesFuncs["UTF-8"]=function(M){return(function(x){for(var S=[],D=0;D<x.length;D++){var O=x.charCodeAt(D);O<128?S.push(O):O<2048?S.push(192|O>>6,128|63&O):O<55296||O>=57344?S.push(224|O>>12,128|O>>6&63,128|63&O):(D++,O=65536+((1023&O)<<10|1023&x.charCodeAt(D)),S.push(240|O>>18,128|O>>12&63,128|O>>6&63,128|63&O))}return S})(M)},(y=typeof(g=function(){return _})=="function"?g.apply(a,[]):g)===void 0||(h.exports=y)}},n={};function s(h){var a=n[h];if(a!==void 0)return a.exports;var g=n[h]={exports:{}};return r[h](g,g.exports,s),g.exports}s.n=h=>{var a=h&&h.__esModule?()=>h.default:()=>h;return s.d(a,{a}),a},s.d=(h,a)=>{for(var g in a)s.o(a,g)&&!s.o(h,g)&&Object.defineProperty(h,g,{enumerable:!0,get:a[g]})},s.o=(h,a)=>Object.prototype.hasOwnProperty.call(h,a);var c={};return(()=>{s.d(c,{default:()=>C});const h=v=>!!v&&typeof v=="object"&&!Array.isArray(v);function a(v,...d){if(!d.length)return v;const u=d.shift();return u!==void 0&&h(v)&&h(u)?(v=Object.assign({},v),Object.keys(u).forEach(m=>{const f=v[m],i=u[m];Array.isArray(f)&&Array.isArray(i)?v[m]=i:h(f)&&h(i)?v[m]=a(Object.assign({},f),i):v[m]=i}),a(v,...d)):v}function g(v,d){const u=document.createElement("a");u.download=d,u.href=v,document.body.appendChild(u),u.click(),document.body.removeChild(u)}const y={L:.07,M:.15,Q:.25,H:.3};class _{constructor({svg:d,type:u,window:m}){this._svg=d,this._type=u,this._window=m}draw(d,u,m,f){let i;switch(this._type){case"dots":i=this._drawDot;break;case"classy":i=this._drawClassy;break;case"classy-rounded":i=this._drawClassyRounded;break;case"rounded":i=this._drawRounded;break;case"extra-rounded":i=this._drawExtraRounded;break;default:i=this._drawSquare}i.call(this,{x:d,y:u,size:m,getNeighbor:f})}_rotateFigure({x:d,y:u,size:m,rotation:f=0,draw:i}){var b;const T=d+m/2,j=u+m/2;i(),(b=this._element)===null||b===void 0||b.setAttribute("transform",`rotate(${180*f/Math.PI},${T},${j})`)}_basicDot(d){const{size:u,x:m,y:f}=d;this._rotateFigure(Object.assign(Object.assign({},d),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(m+u/2)),this._element.setAttribute("cy",String(f+u/2)),this._element.setAttribute("r",String(u/2))}}))}_basicSquare(d){const{size:u,x:m,y:f}=d;this._rotateFigure(Object.assign(Object.assign({},d),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(m)),this._element.setAttribute("y",String(f)),this._element.setAttribute("width",String(u)),this._element.setAttribute("height",String(u))}}))}_basicSideRounded(d){const{size:u,x:m,y:f}=d;this._rotateFigure(Object.assign(Object.assign({},d),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${m} ${f}v ${u}h `+u/2+`a ${u/2} ${u/2}, 0, 0, 0, 0 ${-u}`)}}))}_basicCornerRounded(d){const{size:u,x:m,y:f}=d;this._rotateFigure(Object.assign(Object.assign({},d),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${m} ${f}v ${u}h ${u}v `+-u/2+`a ${u/2} ${u/2}, 0, 0, 0, ${-u/2} ${-u/2}`)}}))}_basicCornerExtraRounded(d){const{size:u,x:m,y:f}=d;this._rotateFigure(Object.assign(Object.assign({},d),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${m} ${f}v ${u}h ${u}a ${u} ${u}, 0, 0, 0, ${-u} ${-u}`)}}))}_basicCornersRounded(d){const{size:u,x:m,y:f}=d;this._rotateFigure(Object.assign(Object.assign({},d),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${m} ${f}v `+u/2+`a ${u/2} ${u/2}, 0, 0, 0, ${u/2} ${u/2}h `+u/2+"v "+-u/2+`a ${u/2} ${u/2}, 0, 0, 0, ${-u/2} ${-u/2}`)}}))}_drawDot({x:d,y:u,size:m}){this._basicDot({x:d,y:u,size:m,rotation:0})}_drawSquare({x:d,y:u,size:m}){this._basicSquare({x:d,y:u,size:m,rotation:0})}_drawRounded({x:d,y:u,size:m,getNeighbor:f}){const i=f?+f(-1,0):0,b=f?+f(1,0):0,T=f?+f(0,-1):0,j=f?+f(0,1):0,K=i+b+T+j;if(K!==0)if(K>2||i&&b||T&&j)this._basicSquare({x:d,y:u,size:m,rotation:0});else{if(K===2){let ee=0;return i&&T?ee=Math.PI/2:T&&b?ee=Math.PI:b&&j&&(ee=-Math.PI/2),void this._basicCornerRounded({x:d,y:u,size:m,rotation:ee})}if(K===1){let ee=0;return T?ee=Math.PI/2:b?ee=Math.PI:j&&(ee=-Math.PI/2),void this._basicSideRounded({x:d,y:u,size:m,rotation:ee})}}else this._basicDot({x:d,y:u,size:m,rotation:0})}_drawExtraRounded({x:d,y:u,size:m,getNeighbor:f}){const i=f?+f(-1,0):0,b=f?+f(1,0):0,T=f?+f(0,-1):0,j=f?+f(0,1):0,K=i+b+T+j;if(K!==0)if(K>2||i&&b||T&&j)this._basicSquare({x:d,y:u,size:m,rotation:0});else{if(K===2){let ee=0;return i&&T?ee=Math.PI/2:T&&b?ee=Math.PI:b&&j&&(ee=-Math.PI/2),void this._basicCornerExtraRounded({x:d,y:u,size:m,rotation:ee})}if(K===1){let ee=0;return T?ee=Math.PI/2:b?ee=Math.PI:j&&(ee=-Math.PI/2),void this._basicSideRounded({x:d,y:u,size:m,rotation:ee})}}else this._basicDot({x:d,y:u,size:m,rotation:0})}_drawClassy({x:d,y:u,size:m,getNeighbor:f}){const i=f?+f(-1,0):0,b=f?+f(1,0):0,T=f?+f(0,-1):0,j=f?+f(0,1):0;i+b+T+j!==0?i||T?b||j?this._basicSquare({x:d,y:u,size:m,rotation:0}):this._basicCornerRounded({x:d,y:u,size:m,rotation:Math.PI/2}):this._basicCornerRounded({x:d,y:u,size:m,rotation:-Math.PI/2}):this._basicCornersRounded({x:d,y:u,size:m,rotation:Math.PI/2})}_drawClassyRounded({x:d,y:u,size:m,getNeighbor:f}){const i=f?+f(-1,0):0,b=f?+f(1,0):0,T=f?+f(0,-1):0,j=f?+f(0,1):0;i+b+T+j!==0?i||T?b||j?this._basicSquare({x:d,y:u,size:m,rotation:0}):this._basicCornerExtraRounded({x:d,y:u,size:m,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:d,y:u,size:m,rotation:-Math.PI/2}):this._basicCornersRounded({x:d,y:u,size:m,rotation:Math.PI/2})}}const M={dot:"dot",square:"square",extraRounded:"extra-rounded"},x=Object.values(M);class S{constructor({svg:d,type:u,window:m}){this._svg=d,this._type=u,this._window=m}draw(d,u,m,f){let i;switch(this._type){case M.square:i=this._drawSquare;break;case M.extraRounded:i=this._drawExtraRounded;break;default:i=this._drawDot}i.call(this,{x:d,y:u,size:m,rotation:f})}_rotateFigure({x:d,y:u,size:m,rotation:f=0,draw:i}){var b;const T=d+m/2,j=u+m/2;i(),(b=this._element)===null||b===void 0||b.setAttribute("transform",`rotate(${180*f/Math.PI},${T},${j})`)}_basicDot(d){const{size:u,x:m,y:f}=d,i=u/7;this._rotateFigure(Object.assign(Object.assign({},d),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${m+u/2} ${f}a ${u/2} ${u/2} 0 1 0 0.1 0zm 0 ${i}a ${u/2-i} ${u/2-i} 0 1 1 -0.1 0Z`)}}))}_basicSquare(d){const{size:u,x:m,y:f}=d,i=u/7;this._rotateFigure(Object.assign(Object.assign({},d),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${m} ${f}v ${u}h ${u}v `+-u+`zM ${m+i} ${f+i}h `+(u-2*i)+"v "+(u-2*i)+"h "+(2*i-u)+"z")}}))}_basicExtraRounded(d){const{size:u,x:m,y:f}=d,i=u/7;this._rotateFigure(Object.assign(Object.assign({},d),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${m} ${f+2.5*i}v `+2*i+`a ${2.5*i} ${2.5*i}, 0, 0, 0, ${2.5*i} ${2.5*i}h `+2*i+`a ${2.5*i} ${2.5*i}, 0, 0, 0, ${2.5*i} ${2.5*-i}v `+-2*i+`a ${2.5*i} ${2.5*i}, 0, 0, 0, ${2.5*-i} ${2.5*-i}h `+-2*i+`a ${2.5*i} ${2.5*i}, 0, 0, 0, ${2.5*-i} ${2.5*i}M ${m+2.5*i} ${f+i}h `+2*i+`a ${1.5*i} ${1.5*i}, 0, 0, 1, ${1.5*i} ${1.5*i}v `+2*i+`a ${1.5*i} ${1.5*i}, 0, 0, 1, ${1.5*-i} ${1.5*i}h `+-2*i+`a ${1.5*i} ${1.5*i}, 0, 0, 1, ${1.5*-i} ${1.5*-i}v `+-2*i+`a ${1.5*i} ${1.5*i}, 0, 0, 1, ${1.5*i} ${1.5*-i}`)}}))}_drawDot({x:d,y:u,size:m,rotation:f}){this._basicDot({x:d,y:u,size:m,rotation:f})}_drawSquare({x:d,y:u,size:m,rotation:f}){this._basicSquare({x:d,y:u,size:m,rotation:f})}_drawExtraRounded({x:d,y:u,size:m,rotation:f}){this._basicExtraRounded({x:d,y:u,size:m,rotation:f})}}const D={dot:"dot",square:"square"},O=Object.values(D);class L{constructor({svg:d,type:u,window:m}){this._svg=d,this._type=u,this._window=m}draw(d,u,m,f){let i;i=this._type===D.square?this._drawSquare:this._drawDot,i.call(this,{x:d,y:u,size:m,rotation:f})}_rotateFigure({x:d,y:u,size:m,rotation:f=0,draw:i}){var b;const T=d+m/2,j=u+m/2;i(),(b=this._element)===null||b===void 0||b.setAttribute("transform",`rotate(${180*f/Math.PI},${T},${j})`)}_basicDot(d){const{size:u,x:m,y:f}=d;this._rotateFigure(Object.assign(Object.assign({},d),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(m+u/2)),this._element.setAttribute("cy",String(f+u/2)),this._element.setAttribute("r",String(u/2))}}))}_basicSquare(d){const{size:u,x:m,y:f}=d;this._rotateFigure(Object.assign(Object.assign({},d),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(m)),this._element.setAttribute("y",String(f)),this._element.setAttribute("width",String(u)),this._element.setAttribute("height",String(u))}}))}_drawDot({x:d,y:u,size:m,rotation:f}){this._basicDot({x:d,y:u,size:m,rotation:f})}_drawSquare({x:d,y:u,size:m,rotation:f}){this._basicSquare({x:d,y:u,size:m,rotation:f})}}const I="circle",z=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],V=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];class q{constructor(d,u){this._roundSize=m=>this._options.dotsOptions.roundSize?Math.floor(m):m,this._window=u,this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(d.width)),this._element.setAttribute("height",String(d.height)),this._element.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),d.dotsOptions.roundSize||this._element.setAttribute("shape-rendering","crispEdges"),this._element.setAttribute("viewBox",`0 0 ${d.width} ${d.height}`),this._defs=this._window.document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._imageUri=d.image,this._instanceId=q.instanceCount++,this._options=d}get width(){return this._options.width}get height(){return this._options.height}getElement(){return this._element}async drawQR(d){const u=d.getModuleCount(),m=Math.min(this._options.width,this._options.height)-2*this._options.margin,f=this._options.shape===I?m/Math.sqrt(2):m,i=this._roundSize(f/u);let b={hideXDots:0,hideYDots:0,width:0,height:0};if(this._qr=d,this._options.image){if(await this.loadImage(),!this._image)return;const{imageOptions:T,qrOptions:j}=this._options,K=T.imageSize*y[j.errorCorrectionLevel],ee=Math.floor(K*u*u);b=(function({originalHeight:te,originalWidth:H,maxHiddenDots:ie,maxHiddenAxisDots:oe,dotSize:ue}){const A={x:0,y:0},N={x:0,y:0};if(te<=0||H<=0||ie<=0||ue<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};const $=te/H;return A.x=Math.floor(Math.sqrt(ie/$)),A.x<=0&&(A.x=1),oe&&oe<A.x&&(A.x=oe),A.x%2==0&&A.x--,N.x=A.x*ue,A.y=1+2*Math.ceil((A.x*$-1)/2),N.y=Math.round(N.x*$),(A.y*A.x>ie||oe&&oe<A.y)&&(oe&&oe<A.y?(A.y=oe,A.y%2==0&&A.x--):A.y-=2,N.y=A.y*ue,A.x=1+2*Math.ceil((A.y/$-1)/2),N.x=Math.round(N.y/$)),{height:N.y,width:N.x,hideYDots:A.y,hideXDots:A.x}})({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:ee,maxHiddenAxisDots:u-14,dotSize:i})}this.drawBackground(),this.drawDots((T,j)=>{var K,ee,te,H,ie,oe;return!(this._options.imageOptions.hideBackgroundDots&&T>=(u-b.hideYDots)/2&&T<(u+b.hideYDots)/2&&j>=(u-b.hideXDots)/2&&j<(u+b.hideXDots)/2||!((K=z[T])===null||K===void 0)&&K[j]||!((ee=z[T-u+7])===null||ee===void 0)&&ee[j]||!((te=z[T])===null||te===void 0)&&te[j-u+7]||!((H=V[T])===null||H===void 0)&&H[j]||!((ie=V[T-u+7])===null||ie===void 0)&&ie[j]||!((oe=V[T])===null||oe===void 0)&&oe[j-u+7])}),this.drawCorners(),this._options.image&&await this.drawImage({width:b.width,height:b.height,count:u,dotSize:i})}drawBackground(){var d,u,m;const f=this._element,i=this._options;if(f){const b=(d=i.backgroundOptions)===null||d===void 0?void 0:d.gradient,T=(u=i.backgroundOptions)===null||u===void 0?void 0:u.color;let j=i.height,K=i.width;if(b||T){const ee=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id",`clip-path-background-color-${this._instanceId}`),this._defs.appendChild(this._backgroundClipPath),!((m=i.backgroundOptions)===null||m===void 0)&&m.round&&(j=K=Math.min(i.width,i.height),ee.setAttribute("rx",String(j/2*i.backgroundOptions.round))),ee.setAttribute("x",String(this._roundSize((i.width-K)/2))),ee.setAttribute("y",String(this._roundSize((i.height-j)/2))),ee.setAttribute("width",String(K)),ee.setAttribute("height",String(j)),this._backgroundClipPath.appendChild(ee),this._createColor({options:b,color:T,additionalRotation:0,x:0,y:0,height:i.height,width:i.width,name:`background-color-${this._instanceId}`})}}}drawDots(d){var u,m;if(!this._qr)throw"QR code is not defined";const f=this._options,i=this._qr.getModuleCount();if(i>f.width||i>f.height)throw"The canvas is too small.";const b=Math.min(f.width,f.height)-2*f.margin,T=f.shape===I?b/Math.sqrt(2):b,j=this._roundSize(T/i),K=this._roundSize((f.width-i*j)/2),ee=this._roundSize((f.height-i*j)/2),te=new _({svg:this._element,type:f.dotsOptions.type,window:this._window});this._dotsClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id",`clip-path-dot-color-${this._instanceId}`),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(u=f.dotsOptions)===null||u===void 0?void 0:u.gradient,color:f.dotsOptions.color,additionalRotation:0,x:0,y:0,height:f.height,width:f.width,name:`dot-color-${this._instanceId}`});for(let H=0;H<i;H++)for(let ie=0;ie<i;ie++)d&&!d(H,ie)||!((m=this._qr)===null||m===void 0)&&m.isDark(H,ie)&&(te.draw(K+ie*j,ee+H*j,j,(oe,ue)=>!(ie+oe<0||H+ue<0||ie+oe>=i||H+ue>=i)&&!(d&&!d(H+ue,ie+oe))&&!!this._qr&&this._qr.isDark(H+ue,ie+oe)),te._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(te._element));if(f.shape===I){const H=this._roundSize((b/j-i)/2),ie=i+2*H,oe=K-H*j,ue=ee-H*j,A=[],N=this._roundSize(ie/2);for(let $=0;$<ie;$++){A[$]=[];for(let B=0;B<ie;B++)$>=H-1&&$<=ie-H&&B>=H-1&&B<=ie-H||Math.sqrt(($-N)*($-N)+(B-N)*(B-N))>N?A[$][B]=0:A[$][B]=this._qr.isDark(B-2*H<0?B:B>=i?B-2*H:B-H,$-2*H<0?$:$>=i?$-2*H:$-H)?1:0}for(let $=0;$<ie;$++)for(let B=0;B<ie;B++)A[$][B]&&(te.draw(oe+B*j,ue+$*j,j,(Y,ce)=>{var o;return!!(!((o=A[$+ce])===null||o===void 0)&&o[B+Y])}),te._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(te._element))}}drawCorners(){if(!this._qr)throw"QR code is not defined";const d=this._element,u=this._options;if(!d)throw"Element code is not defined";const m=this._qr.getModuleCount(),f=Math.min(u.width,u.height)-2*u.margin,i=u.shape===I?f/Math.sqrt(2):f,b=this._roundSize(i/m),T=7*b,j=3*b,K=this._roundSize((u.width-m*b)/2),ee=this._roundSize((u.height-m*b)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(([te,H,ie])=>{var oe,ue,A,N,$,B,Y,ce,o,l,p,P,R,F;const le=K+te*b*(m-7),he=ee+H*b*(m-7);let pe=this._dotsClipPath,ne=this._dotsClipPath;if((!((oe=u.cornersSquareOptions)===null||oe===void 0)&&oe.gradient||!((ue=u.cornersSquareOptions)===null||ue===void 0)&&ue.color)&&(pe=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),pe.setAttribute("id",`clip-path-corners-square-color-${te}-${H}-${this._instanceId}`),this._defs.appendChild(pe),this._cornersSquareClipPath=this._cornersDotClipPath=ne=pe,this._createColor({options:(A=u.cornersSquareOptions)===null||A===void 0?void 0:A.gradient,color:(N=u.cornersSquareOptions)===null||N===void 0?void 0:N.color,additionalRotation:ie,x:le,y:he,height:T,width:T,name:`corners-square-color-${te}-${H}-${this._instanceId}`})),(($=u.cornersSquareOptions)===null||$===void 0?void 0:$.type)&&x.includes(u.cornersSquareOptions.type)){const fe=new S({svg:this._element,type:u.cornersSquareOptions.type,window:this._window});fe.draw(le,he,T,ie),fe._element&&pe&&pe.appendChild(fe._element)}else{const fe=new _({svg:this._element,type:((B=u.cornersSquareOptions)===null||B===void 0?void 0:B.type)||u.dotsOptions.type,window:this._window});for(let me=0;me<z.length;me++)for(let ge=0;ge<z[me].length;ge++)!((Y=z[me])===null||Y===void 0)&&Y[ge]&&(fe.draw(le+ge*b,he+me*b,b,(Se,_e)=>{var Ce;return!!(!((Ce=z[me+_e])===null||Ce===void 0)&&Ce[ge+Se])}),fe._element&&pe&&pe.appendChild(fe._element))}if((!((ce=u.cornersDotOptions)===null||ce===void 0)&&ce.gradient||!((o=u.cornersDotOptions)===null||o===void 0)&&o.color)&&(ne=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),ne.setAttribute("id",`clip-path-corners-dot-color-${te}-${H}-${this._instanceId}`),this._defs.appendChild(ne),this._cornersDotClipPath=ne,this._createColor({options:(l=u.cornersDotOptions)===null||l===void 0?void 0:l.gradient,color:(p=u.cornersDotOptions)===null||p===void 0?void 0:p.color,additionalRotation:ie,x:le+2*b,y:he+2*b,height:j,width:j,name:`corners-dot-color-${te}-${H}-${this._instanceId}`})),((P=u.cornersDotOptions)===null||P===void 0?void 0:P.type)&&O.includes(u.cornersDotOptions.type)){const fe=new L({svg:this._element,type:u.cornersDotOptions.type,window:this._window});fe.draw(le+2*b,he+2*b,j,ie),fe._element&&ne&&ne.appendChild(fe._element)}else{const fe=new _({svg:this._element,type:((R=u.cornersDotOptions)===null||R===void 0?void 0:R.type)||u.dotsOptions.type,window:this._window});for(let me=0;me<V.length;me++)for(let ge=0;ge<V[me].length;ge++)!((F=V[me])===null||F===void 0)&&F[ge]&&(fe.draw(le+ge*b,he+me*b,b,(Se,_e)=>{var Ce;return!!(!((Ce=V[me+_e])===null||Ce===void 0)&&Ce[ge+Se])}),fe._element&&ne&&ne.appendChild(fe._element))}})}loadImage(){return new Promise((d,u)=>{var m;const f=this._options;if(!f.image)return u("Image is not defined");if(!((m=f.nodeCanvas)===null||m===void 0)&&m.loadImage)f.nodeCanvas.loadImage(f.image).then(i=>{var b,T;if(this._image=i,this._options.imageOptions.saveAsBlob){const j=(b=f.nodeCanvas)===null||b===void 0?void 0:b.createCanvas(this._image.width,this._image.height);(T=j?.getContext("2d"))===null||T===void 0||T.drawImage(i,0,0),this._imageUri=j?.toDataURL()}d()}).catch(u);else{const i=new this._window.Image;typeof f.imageOptions.crossOrigin=="string"&&(i.crossOrigin=f.imageOptions.crossOrigin),this._image=i,i.onload=async()=>{this._options.imageOptions.saveAsBlob&&(this._imageUri=await(async function(b,T){return new Promise(j=>{const K=new T.XMLHttpRequest;K.onload=function(){const ee=new T.FileReader;ee.onloadend=function(){j(ee.result)},ee.readAsDataURL(K.response)},K.open("GET",b),K.responseType="blob",K.send()})})(f.image||"",this._window)),d()},i.src=f.image}})}async drawImage({width:d,height:u,count:m,dotSize:f}){const i=this._options,b=this._roundSize((i.width-m*f)/2),T=this._roundSize((i.height-m*f)/2),j=b+this._roundSize(i.imageOptions.margin+(m*f-d)/2),K=T+this._roundSize(i.imageOptions.margin+(m*f-u)/2),ee=d-2*i.imageOptions.margin,te=u-2*i.imageOptions.margin,H=this._window.document.createElementNS("http://www.w3.org/2000/svg","image");H.setAttribute("href",this._imageUri||""),H.setAttribute("xlink:href",this._imageUri||""),H.setAttribute("x",String(j)),H.setAttribute("y",String(K)),H.setAttribute("width",`${ee}px`),H.setAttribute("height",`${te}px`),this._element.appendChild(H)}_createColor({options:d,color:u,additionalRotation:m,x:f,y:i,height:b,width:T,name:j}){const K=T>b?T:b,ee=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");if(ee.setAttribute("x",String(f)),ee.setAttribute("y",String(i)),ee.setAttribute("height",String(b)),ee.setAttribute("width",String(T)),ee.setAttribute("clip-path",`url('#clip-path-${j}')`),d){let te;if(d.type==="radial")te=this._window.document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),te.setAttribute("id",j),te.setAttribute("gradientUnits","userSpaceOnUse"),te.setAttribute("fx",String(f+T/2)),te.setAttribute("fy",String(i+b/2)),te.setAttribute("cx",String(f+T/2)),te.setAttribute("cy",String(i+b/2)),te.setAttribute("r",String(K/2));else{const H=((d.rotation||0)+m)%(2*Math.PI),ie=(H+2*Math.PI)%(2*Math.PI);let oe=f+T/2,ue=i+b/2,A=f+T/2,N=i+b/2;ie>=0&&ie<=.25*Math.PI||ie>1.75*Math.PI&&ie<=2*Math.PI?(oe-=T/2,ue-=b/2*Math.tan(H),A+=T/2,N+=b/2*Math.tan(H)):ie>.25*Math.PI&&ie<=.75*Math.PI?(ue-=b/2,oe-=T/2/Math.tan(H),N+=b/2,A+=T/2/Math.tan(H)):ie>.75*Math.PI&&ie<=1.25*Math.PI?(oe+=T/2,ue+=b/2*Math.tan(H),A-=T/2,N-=b/2*Math.tan(H)):ie>1.25*Math.PI&&ie<=1.75*Math.PI&&(ue+=b/2,oe+=T/2/Math.tan(H),N-=b/2,A-=T/2/Math.tan(H)),te=this._window.document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),te.setAttribute("id",j),te.setAttribute("gradientUnits","userSpaceOnUse"),te.setAttribute("x1",String(Math.round(oe))),te.setAttribute("y1",String(Math.round(ue))),te.setAttribute("x2",String(Math.round(A))),te.setAttribute("y2",String(Math.round(N)))}d.colorStops.forEach(({offset:H,color:ie})=>{const oe=this._window.document.createElementNS("http://www.w3.org/2000/svg","stop");oe.setAttribute("offset",100*H+"%"),oe.setAttribute("stop-color",ie),te.appendChild(oe)}),ee.setAttribute("fill",`url('#${j}')`),this._defs.appendChild(te)}else u&&ee.setAttribute("fill",u);this._element.appendChild(ee)}}q.instanceCount=0;const X=q,re="canvas",Q={};for(let v=0;v<=40;v++)Q[v]=v;const J={type:re,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:Q[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{saveAsBlob:!0,hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000",roundSize:!0},backgroundOptions:{round:0,color:"#fff"}};function Z(v){const d=Object.assign({},v);if(!d.colorStops||!d.colorStops.length)throw"Field 'colorStops' is required in gradient";return d.rotation?d.rotation=Number(d.rotation):d.rotation=0,d.colorStops=d.colorStops.map(u=>Object.assign(Object.assign({},u),{offset:Number(u.offset)})),d}function U(v){const d=Object.assign({},v);return d.width=Number(d.width),d.height=Number(d.height),d.margin=Number(d.margin),d.imageOptions=Object.assign(Object.assign({},d.imageOptions),{hideBackgroundDots:!!d.imageOptions.hideBackgroundDots,imageSize:Number(d.imageOptions.imageSize),margin:Number(d.imageOptions.margin)}),d.margin>Math.min(d.width,d.height)&&(d.margin=Math.min(d.width,d.height)),d.dotsOptions=Object.assign({},d.dotsOptions),d.dotsOptions.gradient&&(d.dotsOptions.gradient=Z(d.dotsOptions.gradient)),d.cornersSquareOptions&&(d.cornersSquareOptions=Object.assign({},d.cornersSquareOptions),d.cornersSquareOptions.gradient&&(d.cornersSquareOptions.gradient=Z(d.cornersSquareOptions.gradient))),d.cornersDotOptions&&(d.cornersDotOptions=Object.assign({},d.cornersDotOptions),d.cornersDotOptions.gradient&&(d.cornersDotOptions.gradient=Z(d.cornersDotOptions.gradient))),d.backgroundOptions&&(d.backgroundOptions=Object.assign({},d.backgroundOptions),d.backgroundOptions.gradient&&(d.backgroundOptions.gradient=Z(d.backgroundOptions.gradient))),d}var W=s(873),ae=s.n(W);function se(v){if(!v)throw new Error("Extension must be defined");v[0]==="."&&(v=v.substring(1));const d={bmp:"image/bmp",gif:"image/gif",ico:"image/vnd.microsoft.icon",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",webp:"image/webp",pdf:"application/pdf"}[v.toLowerCase()];if(!d)throw new Error(`Extension "${v}" is not supported`);return d}class k{constructor(d){d!=null&&d.jsdom?this._window=new d.jsdom("",{resources:"usable"}).window:this._window=window,this._options=d?U(a(J,d)):J,this.update()}static _clearContainer(d){d&&(d.innerHTML="")}_setupSvg(){if(!this._qr)return;const d=new X(this._options,this._window);this._svg=d.getElement(),this._svgDrawingPromise=d.drawQR(this._qr).then(()=>{var u;this._svg&&((u=this._extension)===null||u===void 0||u.call(this,d.getElement(),this._options))})}_setupCanvas(){var d,u;this._qr&&(!((d=this._options.nodeCanvas)===null||d===void 0)&&d.createCanvas?(this._nodeCanvas=this._options.nodeCanvas.createCanvas(this._options.width,this._options.height),this._nodeCanvas.width=this._options.width,this._nodeCanvas.height=this._options.height):(this._domCanvas=document.createElement("canvas"),this._domCanvas.width=this._options.width,this._domCanvas.height=this._options.height),this._setupSvg(),this._canvasDrawingPromise=(u=this._svgDrawingPromise)===null||u===void 0?void 0:u.then(()=>{var m;if(!this._svg)return;const f=this._svg,i=new this._window.XMLSerializer().serializeToString(f),b=btoa(i),T=`data:${se("svg")};base64,${b}`;if(!((m=this._options.nodeCanvas)===null||m===void 0)&&m.loadImage)return this._options.nodeCanvas.loadImage(T).then(j=>{var K,ee;j.width=this._options.width,j.height=this._options.height,(ee=(K=this._nodeCanvas)===null||K===void 0?void 0:K.getContext("2d"))===null||ee===void 0||ee.drawImage(j,0,0)});{const j=new this._window.Image;return new Promise(K=>{j.onload=()=>{var ee,te;(te=(ee=this._domCanvas)===null||ee===void 0?void 0:ee.getContext("2d"))===null||te===void 0||te.drawImage(j,0,0),K()},j.src=T})}}))}async _getElement(d="png"){if(!this._qr)throw"QR code is empty";return d.toLowerCase()==="svg"?(this._svg&&this._svgDrawingPromise||this._setupSvg(),await this._svgDrawingPromise,this._svg):((this._domCanvas||this._nodeCanvas)&&this._canvasDrawingPromise||this._setupCanvas(),await this._canvasDrawingPromise,this._domCanvas||this._nodeCanvas)}update(d){k._clearContainer(this._container),this._options=d?U(a(this._options,d)):this._options,this._options.data&&(this._qr=ae()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||(function(u){switch(!0){case/^[0-9]*$/.test(u):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(u):return"Alphanumeric";default:return"Byte"}})(this._options.data)),this._qr.make(),this._options.type===re?this._setupCanvas():this._setupSvg(),this.append(this._container))}append(d){if(d){if(typeof d.appendChild!="function")throw"Container should be a single DOM node";this._options.type===re?this._domCanvas&&d.appendChild(this._domCanvas):this._svg&&d.appendChild(this._svg),this._container=d}}applyExtension(d){if(!d)throw"Extension function should be defined.";this._extension=d,this.update()}deleteExtension(){this._extension=void 0,this.update()}async getRawData(d="png"){if(!this._qr)throw"QR code is empty";const u=await this._getElement(d),m=se(d);if(!u)return null;if(d.toLowerCase()==="svg"){const f=`<?xml version="1.0" standalone="no"?>\r
22
+ ${new this._window.XMLSerializer().serializeToString(u)}`;return typeof Blob>"u"||this._options.jsdom?Buffer.from(f):new Blob([f],{type:m})}return new Promise(f=>{const i=u;if("toBuffer"in i)if(m==="image/png")f(i.toBuffer(m));else if(m==="image/jpeg")f(i.toBuffer(m));else{if(m!=="application/pdf")throw Error("Unsupported extension");f(i.toBuffer(m))}else"toBlob"in i&&i.toBlob(f,m,1)})}async download(d){if(!this._qr)throw"QR code is empty";if(typeof Blob>"u")throw"Cannot download in Node.js, call getRawData instead.";let u="png",m="qr";typeof d=="string"?(u=d,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof d=="object"&&d!==null&&(d.name&&(m=d.name),d.extension&&(u=d.extension));const f=await this._getElement(u);if(f)if(u.toLowerCase()==="svg"){let i=new XMLSerializer().serializeToString(f);i=`<?xml version="1.0" standalone="no"?>\r
23
+ `+i,g(`data:${se(u)};charset=utf-8,${encodeURIComponent(i)}`,`${m}.svg`)}else g(f.toDataURL(se(u)),`${m}.${u}`)}}const C=k})(),c.default})())})(rn)),rn.exports}fl();const Lo=G.createContext(void 0);function pl(t){const e=Ze.c(9),{children:r,baseUrl:n,queryClient:s}=t;let c;e[0]!==n||e[1]!==s?(c={baseUrl:n,queryClient:s},e[0]=n,e[1]=s,e[2]=c):c=e[2];let h;e[3]!==r||e[4]!==s?(h=w.jsx(Gn,{client:s,children:r}),e[3]=r,e[4]=s,e[5]=h):h=e[5];let a;return e[6]!==c||e[7]!==h?(a=w.jsx(Lo.Provider,{value:c,children:h}),e[6]=c,e[7]=h,e[8]=a):a=e[8],a}function ct(){const t=G.useContext(Lo);if(!t)throw new Error("useDataTable must be used within a DataTableProvider");return t}function nn(t){if(typeof t=="string")try{const e=JSON.parse(t);return{message:e.message||t,code:e.code,details:e.details}}catch{return{message:t}}return t instanceof Error?{message:t.message}:{message:"Unbekannter Fehler"}}async function Pt(t){const e=await t.text();if(!e)throw new Error(`HTTP ${t.status}: ${t.statusText}`);try{const r=JSON.parse(e);throw r.message?new Error(r.message):r.error?new Error(r.error):new Error(e)}catch{throw new Error(e)}}function gl(){const t=localStorage.getItem("a360.assumed-org");return t?{"X-Assume-Org":t}:{}}async function bt(){return{"Content-Type":"application/json",Authorization:`Bearer ${await rl()??""}`,...gl()}}async function Bo(t){return fetch(t,{method:"GET",headers:await bt()}).then(async e=>(e.status>=400&&await Pt(e),e)).then(e=>e.json()).then(e=>e)}async function Io(t,e){return fetch(`${t}/${e}`,{method:"GET",headers:await bt()}).then(async r=>(r.status>=400&&await Pt(r),r)).then(r=>r.json()).then(r=>r)}async function Yo(t,e){const r=await fetch(`${t}/${e}`,{method:"DELETE",headers:await bt()});r.status>=400&&await Pt(r)}async function zo(t,e){return fetch(t,{method:"POST",headers:await bt(),body:JSON.stringify(e)}).then(async r=>(r.status>=400&&await Pt(r),r)).then(r=>r.status==204?e:r.json()).then(r=>r)}async function ml(t,e,r){return fetch(e,{method:t,headers:await bt(),body:r?JSON.stringify(r):void 0}).then(async n=>(n.status>=400&&await Pt(n),n)).then(n=>{if(n.status!=204)return n.json()}).then(n=>n)}async function Fo(t,e){return fetch(`${t}/${e.id}`,{method:"PUT",headers:await bt(),body:JSON.stringify(e)}).then(async r=>(r.status>=400&&await Pt(r),r)).then(r=>r.status==204?e:r.json()).then(r=>r)}function Wo(t,e,r){const n=Ze.c(13),{baseUrl:s}=ct();let c;if(n[0]!==r||n[1]!==e){let y;n[3]!==r?(y=r?.toString(),n[3]=r,n[4]=y):y=n[4],c=[...e.map(yl),String(y)],n[0]=r,n[1]=e,n[2]=c}else c=n[2];let h;n[5]!==t||n[6]!==s||n[7]!==r?(h=()=>Io(`${s}${t}`,r),n[5]=t,n[6]=s,n[7]=r,n[8]=h):h=n[8];const a=!!r;let g;return n[9]!==c||n[10]!==h||n[11]!==a?(g={queryKey:c,queryFn:h,enabled:a},n[9]=c,n[10]=h,n[11]=a,n[12]=g):g=n[12],Kn(g)}function yl(t){return t.toString()}function Uo(t,e,r){const n=Ze.c(9),s=r===void 0?!0:r,{baseUrl:c}=ct();let h;n[0]!==e?(h=[...e.map(vl)],n[0]=e,n[1]=h):h=n[1];let a;n[2]!==t||n[3]!==c?(a=()=>Bo(`${c}${t}`),n[2]=t,n[3]=c,n[4]=a):a=n[4];let g;return n[5]!==s||n[6]!==h||n[7]!==a?(g={queryKey:h,queryFn:a,enabled:s},n[5]=s,n[6]=h,n[7]=a,n[8]=g):g=n[8],Kn(g)}function vl(t){return t.toString()}function qo(t,e){const r=Ze.c(10),{baseUrl:n,queryClient:s}=ct();let c;r[0]!==e?(c=[...e.map(wl)],r[0]=e,r[1]=c):c=r[1];let h;r[2]!==t||r[3]!==n?(h=g=>zo(`${n}${t}`,g),r[2]=t,r[3]=n,r[4]=h):h=r[4];let a;return r[5]!==s||r[6]!==e||r[7]!==c||r[8]!==h?(a={mutationKey:c,mutationFn:h,onSettled(){return s.invalidateQueries({queryKey:[...e.map(bl)]})},onError(g){nn(g)}},r[5]=s,r[6]=e,r[7]=c,r[8]=h,r[9]=a):a=r[9],Lr(a)}function bl(t){return t.toString()}function wl(t){return t.toString()}function on(t,e){const r=Ze.c(10),{baseUrl:n,queryClient:s}=ct();let c;r[0]!==e?(c=[...e.map(Cl)],r[0]=e,r[1]=c):c=r[1];let h;r[2]!==t||r[3]!==n?(h=g=>Fo(`${n}${t}`,g),r[2]=t,r[3]=n,r[4]=h):h=r[4];let a;return r[5]!==s||r[6]!==e||r[7]!==c||r[8]!==h?(a={mutationKey:c,mutationFn:h,onSettled(){return s.invalidateQueries({queryKey:[...e.map(_l)]})},onError(g){nn(g)}},r[5]=s,r[6]=e,r[7]=c,r[8]=h,r[9]=a):a=r[9],Lr(a)}function _l(t){return t.toString()}function Cl(t){return t.toString()}function Vo(t,e){const r=Ze.c(10),{baseUrl:n,queryClient:s}=ct();let c;r[0]!==e?(c=[...e.map(Sl)],r[0]=e,r[1]=c):c=r[1];let h;r[2]!==t||r[3]!==n?(h=g=>Yo(`${n}${t}`,g),r[2]=t,r[3]=n,r[4]=h):h=r[4];let a;return r[5]!==s||r[6]!==e||r[7]!==c||r[8]!==h?(a={mutationKey:c,mutationFn:h,onSettled(){return s.invalidateQueries({queryKey:[...e.map(xl)]})},onError(g){nn(g)}},r[5]=s,r[6]=e,r[7]=c,r[8]=h,r[9]=a):a=r[9],Lr(a)}function xl(t){return t.toString()}function Sl(t){return t.toString()}var lr={exports:{}},Dl=lr.exports,Ho;function kl(){return Ho||(Ho=1,(function(t,e){(function(r,n){t.exports=n()})(Dl,(function(){var r=1e3,n=6e4,s=36e5,c="millisecond",h="second",a="minute",g="hour",y="day",_="week",M="month",x="quarter",S="year",D="date",O="Invalid Date",L=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,I=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,z={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var C=["th","st","nd","rd"],v=k%100;return"["+k+(C[(v-20)%10]||C[v]||C[0])+"]"}},V=function(k,C,v){var d=String(k);return!d||d.length>=C?k:""+Array(C+1-d.length).join(v)+k},q={s:V,z:function(k){var C=-k.utcOffset(),v=Math.abs(C),d=Math.floor(v/60),u=v%60;return(C<=0?"+":"-")+V(d,2,"0")+":"+V(u,2,"0")},m:function k(C,v){if(C.date()<v.date())return-k(v,C);var d=12*(v.year()-C.year())+(v.month()-C.month()),u=C.clone().add(d,M),m=v-u<0,f=C.clone().add(d+(m?-1:1),M);return+(-(d+(v-u)/(m?u-f:f-u))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M,y:S,w:_,d:y,D,h:g,m:a,s:h,ms:c,Q:x}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},X="en",re={};re[X]=z;var Q="$isDayjsObject",J=function(k){return k instanceof ae||!(!k||!k[Q])},Z=function k(C,v,d){var u;if(!C)return X;if(typeof C=="string"){var m=C.toLowerCase();re[m]&&(u=m),v&&(re[m]=v,u=m);var f=C.split("-");if(!u&&f.length>1)return k(f[0])}else{var i=C.name;re[i]=C,u=i}return!d&&u&&(X=u),u||!d&&X},U=function(k,C){if(J(k))return k.clone();var v=typeof C=="object"?C:{};return v.date=k,v.args=arguments,new ae(v)},W=q;W.l=Z,W.i=J,W.w=function(k,C){return U(k,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var ae=(function(){function k(v){this.$L=Z(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[Q]=!0}var C=k.prototype;return C.parse=function(v){this.$d=(function(d){var u=d.date,m=d.utc;if(u===null)return new Date(NaN);if(W.u(u))return new Date;if(u instanceof Date)return new Date(u);if(typeof u=="string"&&!/Z$/i.test(u)){var f=u.match(L);if(f){var i=f[2]-1||0,b=(f[7]||"0").substring(0,3);return m?new Date(Date.UTC(f[1],i,f[3]||1,f[4]||0,f[5]||0,f[6]||0,b)):new Date(f[1],i,f[3]||1,f[4]||0,f[5]||0,f[6]||0,b)}}return new Date(u)})(v),this.init()},C.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},C.$utils=function(){return W},C.isValid=function(){return this.$d.toString()!==O},C.isSame=function(v,d){var u=U(v);return this.startOf(d)<=u&&u<=this.endOf(d)},C.isAfter=function(v,d){return U(v)<this.startOf(d)},C.isBefore=function(v,d){return this.endOf(d)<U(v)},C.$g=function(v,d,u){return W.u(v)?this[d]:this.set(u,v)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function(v,d){var u=this,m=!!W.u(d)||d,f=W.p(v),i=function(ie,oe){var ue=W.w(u.$u?Date.UTC(u.$y,oe,ie):new Date(u.$y,oe,ie),u);return m?ue:ue.endOf(y)},b=function(ie,oe){return W.w(u.toDate()[ie].apply(u.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(oe)),u)},T=this.$W,j=this.$M,K=this.$D,ee="set"+(this.$u?"UTC":"");switch(f){case S:return m?i(1,0):i(31,11);case M:return m?i(1,j):i(0,j+1);case _:var te=this.$locale().weekStart||0,H=(T<te?T+7:T)-te;return i(m?K-H:K+(6-H),j);case y:case D:return b(ee+"Hours",0);case g:return b(ee+"Minutes",1);case a:return b(ee+"Seconds",2);case h:return b(ee+"Milliseconds",3);default:return this.clone()}},C.endOf=function(v){return this.startOf(v,!1)},C.$set=function(v,d){var u,m=W.p(v),f="set"+(this.$u?"UTC":""),i=(u={},u[y]=f+"Date",u[D]=f+"Date",u[M]=f+"Month",u[S]=f+"FullYear",u[g]=f+"Hours",u[a]=f+"Minutes",u[h]=f+"Seconds",u[c]=f+"Milliseconds",u)[m],b=m===y?this.$D+(d-this.$W):d;if(m===M||m===S){var T=this.clone().set(D,1);T.$d[i](b),T.init(),this.$d=T.set(D,Math.min(this.$D,T.daysInMonth())).$d}else i&&this.$d[i](b);return this.init(),this},C.set=function(v,d){return this.clone().$set(v,d)},C.get=function(v){return this[W.p(v)]()},C.add=function(v,d){var u,m=this;v=Number(v);var f=W.p(d),i=function(j){var K=U(m);return W.w(K.date(K.date()+Math.round(j*v)),m)};if(f===M)return this.set(M,this.$M+v);if(f===S)return this.set(S,this.$y+v);if(f===y)return i(1);if(f===_)return i(7);var b=(u={},u[a]=n,u[g]=s,u[h]=r,u)[f]||1,T=this.$d.getTime()+v*b;return W.w(T,this)},C.subtract=function(v,d){return this.add(-1*v,d)},C.format=function(v){var d=this,u=this.$locale();if(!this.isValid())return u.invalidDate||O;var m=v||"YYYY-MM-DDTHH:mm:ssZ",f=W.z(this),i=this.$H,b=this.$m,T=this.$M,j=u.weekdays,K=u.months,ee=u.meridiem,te=function(oe,ue,A,N){return oe&&(oe[ue]||oe(d,m))||A[ue].slice(0,N)},H=function(oe){return W.s(i%12||12,oe,"0")},ie=ee||function(oe,ue,A){var N=oe<12?"AM":"PM";return A?N.toLowerCase():N};return m.replace(I,(function(oe,ue){return ue||(function(A){switch(A){case"YY":return String(d.$y).slice(-2);case"YYYY":return W.s(d.$y,4,"0");case"M":return T+1;case"MM":return W.s(T+1,2,"0");case"MMM":return te(u.monthsShort,T,K,3);case"MMMM":return te(K,T);case"D":return d.$D;case"DD":return W.s(d.$D,2,"0");case"d":return String(d.$W);case"dd":return te(u.weekdaysMin,d.$W,j,2);case"ddd":return te(u.weekdaysShort,d.$W,j,3);case"dddd":return j[d.$W];case"H":return String(i);case"HH":return W.s(i,2,"0");case"h":return H(1);case"hh":return H(2);case"a":return ie(i,b,!0);case"A":return ie(i,b,!1);case"m":return String(b);case"mm":return W.s(b,2,"0");case"s":return String(d.$s);case"ss":return W.s(d.$s,2,"0");case"SSS":return W.s(d.$ms,3,"0");case"Z":return f}return null})(oe)||f.replace(":","")}))},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function(v,d,u){var m,f=this,i=W.p(d),b=U(v),T=(b.utcOffset()-this.utcOffset())*n,j=this-b,K=function(){return W.m(f,b)};switch(i){case S:m=K()/12;break;case M:m=K();break;case x:m=K()/3;break;case _:m=(j-T)/6048e5;break;case y:m=(j-T)/864e5;break;case g:m=j/s;break;case a:m=j/n;break;case h:m=j/r;break;default:m=j}return u?m:W.a(m)},C.daysInMonth=function(){return this.endOf(M).$D},C.$locale=function(){return re[this.$L]},C.locale=function(v,d){if(!v)return this.$L;var u=this.clone(),m=Z(v,d,!0);return m&&(u.$L=m),u},C.clone=function(){return W.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},k})(),se=ae.prototype;return U.prototype=se,[["$ms",c],["$s",h],["$m",a],["$H",g],["$W",y],["$M",M],["$y",S],["$D",D]].forEach((function(k){se[k[1]]=function(C){return this.$g(C,k[0],k[1])}})),U.extend=function(k,C){return k.$i||(k(C,ae,U),k.$i=!0),U},U.locale=Z,U.isDayjs=J,U.unix=function(k){return U(1e3*k)},U.en=re[X],U.Ls=re,U.p={},U}))})(lr)),lr.exports}var Pl=kl();const de=An(Pl);function Ml({direction:t,levelIndex:e,rowIndex:r,cellIndex:n,size:s}){switch(t){case"up":return e===0&&r===0?null:r===0?{levelIndex:e-1,rowIndex:n<=s[e-1][s[e-1].length-1]-1?s[e-1].length-1:s[e-1].length-2,cellIndex:n}:{levelIndex:e,rowIndex:r-1,cellIndex:n};case"down":return r===s[e].length-1?{levelIndex:e+1,rowIndex:0,cellIndex:n}:r===s[e].length-2&&n>=s[e][s[e].length-1]?{levelIndex:e+1,rowIndex:0,cellIndex:n}:{levelIndex:e,rowIndex:r+1,cellIndex:n};case"left":return e===0&&r===0&&n===0?null:r===0&&n===0?{levelIndex:e-1,rowIndex:s[e-1].length-1,cellIndex:s[e-1][s[e-1].length-1]-1}:n===0?{levelIndex:e,rowIndex:r-1,cellIndex:s[e][r-1]-1}:{levelIndex:e,rowIndex:r,cellIndex:n-1};case"right":return r===s[e].length-1&&n===s[e][r]-1?{levelIndex:e+1,rowIndex:0,cellIndex:0}:n===s[e][r]-1?{levelIndex:e,rowIndex:r+1,cellIndex:0}:{levelIndex:e,rowIndex:r,cellIndex:n+1};default:return{levelIndex:e,rowIndex:r,cellIndex:n}}}function Go({controlsRef:t,direction:e,levelIndex:r,rowIndex:n,cellIndex:s,size:c}){const h=Ml({direction:e,size:c,rowIndex:n,cellIndex:s,levelIndex:r});if(!h)return;const a=t.current?.[h.levelIndex]?.[h.rowIndex]?.[h.cellIndex];a&&(a.disabled||a.getAttribute("data-hidden")||a.getAttribute("data-outside")?Go({controlsRef:t,direction:e,levelIndex:h.levelIndex,cellIndex:h.cellIndex,rowIndex:h.rowIndex,size:c}):a.focus())}function Ol(t){switch(t){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Al(t){return t.current?.map(e=>e.map(r=>r.length))}function sn({controlsRef:t,levelIndex:e,rowIndex:r,cellIndex:n,event:s}){const c=Ol(s.key);if(c){s.preventDefault();const h=Al(t);Go({controlsRef:t,direction:c,levelIndex:e,rowIndex:r,cellIndex:n,size:h})}}function qe(t){return t==null||t===""?t:de(t).format("YYYY-MM-DD")}function Qo(t){return t==null||t===""?t:de(t).format("YYYY-MM-DD HH:mm:ss")}const El={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},Tl=G.createContext(El);function dt(){const t=G.useContext(Tl),e=G.useCallback(c=>c||t.locale,[t.locale]),r=G.useCallback(c=>typeof c=="number"?c:t.firstDayOfWeek,[t.firstDayOfWeek]),n=G.useCallback(c=>Array.isArray(c)?c:t.weekendDays,[t.weekendDays]),s=G.useCallback(c=>typeof c=="string"?c:t.labelSeparator,[t.labelSeparator]);return{...t,getLocale:e,getFirstDayOfWeek:r,getWeekendDays:n,getLabelSeparator:s}}function jl({value:t,type:e,withTime:r}){const n=r?Qo:qe;if(e==="range"&&Array.isArray(t)){const s=n(t[0]),c=n(t[1]);return s?c?`${s} – ${c}`:`${s} –`:""}return e==="multiple"&&Array.isArray(t)?t.filter(Boolean).join(", "):!Array.isArray(t)&&t?n(t):""}function Zo({value:t,type:e,name:r,form:n,withTime:s=!1}){return w.jsx("input",{type:"hidden",value:jl({value:t,type:e,withTime:s}),name:r,form:n})}Zo.displayName="@mantine/dates/HiddenDatesInput";function Ko(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=Ko(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Pe(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Ko(t))&&(n&&(n+=" "),n+=e);return n}var Jo={day:"m_396ce5cb"};const $l=E.createVarsResolver((t,{size:e})=>({day:{"--day-size":E.getSize(e,"day-size")}})),an=E.factory((t,e)=>{const r=E.useProps("Day",null,t),{classNames:n,className:s,style:c,styles:h,unstyled:a,vars:g,date:y,disabled:_,__staticSelector:M,weekend:x,outside:S,selected:D,renderDay:O,inRange:L,firstInRange:I,lastInRange:z,hidden:V,static:q,highlightToday:X,attributes:re,...Q}=r,J=E.useStyles({name:M||"Day",classes:Jo,props:r,className:s,style:c,classNames:n,styles:h,unstyled:a,attributes:re,vars:g,varsResolver:$l,rootSelector:"day"});return w.jsx(E.UnstyledButton,{...J("day",{style:V?{display:"none"}:void 0}),component:q?"div":"button",ref:e,disabled:_,"data-today":de(y).isSame(new Date,"day")||void 0,"data-hidden":V||void 0,"data-highlight-today":X||void 0,"data-disabled":_||void 0,"data-weekend":!_&&!S&&x||void 0,"data-outside":!_&&S||void 0,"data-selected":!_&&D||void 0,"data-in-range":L&&!_||void 0,"data-first-in-range":I&&!_||void 0,"data-last-in-range":z&&!_||void 0,"data-static":q||void 0,unstyled:a,...Q,children:O?.(y)||de(y).date()})});an.classes=Jo,an.displayName="@mantine/dates/Day";function Rl({locale:t,format:e="dd",firstDayOfWeek:r=1}){const n=de().day(r),s=[];for(let c=0;c<7;c+=1)typeof e=="string"?s.push(de(n).add(c,"days").locale(t).format(e)):s.push(e(de(n).add(c,"days").format("YYYY-MM-DD")));return s}var Xo={weekday:"m_18a3eca"};const Nl=E.createVarsResolver((t,{size:e})=>({weekdaysRow:{"--wr-fz":E.getFontSize(e),"--wr-spacing":E.getSpacing(e)}})),ln=E.factory((t,e)=>{const r=E.useProps("WeekdaysRow",null,t),{classNames:n,className:s,style:c,styles:h,unstyled:a,vars:g,locale:y,firstDayOfWeek:_,weekdayFormat:M,cellComponent:x="th",__staticSelector:S,withWeekNumbers:D,attributes:O,...L}=r,I=E.useStyles({name:S||"WeekdaysRow",classes:Xo,props:r,className:s,style:c,classNames:n,styles:h,unstyled:a,attributes:O,vars:g,varsResolver:Nl,rootSelector:"weekdaysRow"}),z=dt(),V=Rl({locale:z.getLocale(y),format:M,firstDayOfWeek:z.getFirstDayOfWeek(_)}).map((q,X)=>w.jsx(x,{...I("weekday"),children:q},X));return w.jsxs(E.Box,{component:"tr",ref:e,...I("weekdaysRow"),...L,children:[D&&w.jsx(x,{...I("weekday"),children:"#"}),V]})});ln.classes=Xo,ln.displayName="@mantine/dates/WeekdaysRow";function Ll(t,e=1){let r=de(t);if(!r.isValid())return r;const n=e===0?6:e-1;for(;r.day()!==n;)r=r.add(1,"day");return r.format("YYYY-MM-DD")}function Bl(t,e=1){let r=de(t);for(;r.day()!==e;)r=r.subtract(1,"day");return r.format("YYYY-MM-DD")}function Il({month:t,firstDayOfWeek:e=1,consistentWeeks:r}){const n=de(t).subtract(de(t).date()-1,"day"),s=de(n.format("YYYY-M-D")),c=s.format("YYYY-MM-DD"),h=s.add(+s.daysInMonth()-1,"day").format("YYYY-MM-DD"),a=Ll(h,e),g=[];let y=de(Bl(c,e));for(;de(y).isBefore(a,"day");){const _=[];for(let M=0;M<7;M+=1)_.push(y.format("YYYY-MM-DD")),y=y.add(1,"day");g.push(_)}if(r&&g.length<6){const _=g[g.length-1],M=_[_.length-1];let x=de(M).add(1,"day");for(;g.length<6;){const S=[];for(let D=0;D<7;D+=1)S.push(x.format("YYYY-MM-DD")),x=x.add(1,"day");g.push(S)}}return g}function un(t,e){return de(t).format("YYYY-MM")===de(e).format("YYYY-MM")}function es(t,e){return e?de(t).isAfter(de(e).subtract(1,"day"),"day"):!0}function ts(t,e){return e?de(t).isBefore(de(e).add(1,"day"),"day"):!0}function Yl({dates:t,minDate:e,maxDate:r,getDayProps:n,excludeDate:s,hideOutsideDates:c,month:h}){const a=t.flat().filter(_=>ts(_,r)&&es(_,e)&&!s?.(_)&&!n?.(_)?.disabled&&(!c||un(_,h))),g=a.find(_=>n?.(_)?.selected);if(g)return g;const y=a.find(_=>de().isSame(_,"date"));return y||a[0]}var ur={exports:{}},zl=ur.exports,rs;function Fl(){return rs||(rs=1,(function(t,e){(function(r,n){t.exports=n()})(zl,(function(){var r="day";return function(n,s,c){var h=function(y){return y.add(4-y.isoWeekday(),r)},a=s.prototype;a.isoWeekYear=function(){return h(this).year()},a.isoWeek=function(y){if(!this.$utils().u(y))return this.add(7*(y-this.isoWeek()),r);var _,M,x,S,D=h(this),O=(_=this.isoWeekYear(),M=this.$u,x=(M?c.utc:c)().year(_).startOf("year"),S=4-x.isoWeekday(),x.isoWeekday()>4&&(S+=7),x.add(S,r));return D.diff(O,"week")+1},a.isoWeekday=function(y){return this.$utils().u(y)?this.day()||7:this.day(this.day()%7?y:y-7)};var g=a.startOf;a.startOf=function(y,_){var M=this.$utils(),x=!!M.u(_)||_;return M.p(y)==="isoweek"?x?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):g.bind(this)(y,_)}}}))})(ur)),ur.exports}var Wl=Fl();const Ul=An(Wl);de.extend(Ul);function ql(t){const e=t.find(r=>de(r).day()===1);return de(e).isoWeek()}var ns={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const Vl={withCellSpacing:!0},Hl=E.createVarsResolver((t,{size:e})=>({weekNumber:{"--wn-fz":E.getFontSize(e),"--wn-size":E.getSize(e,"wn-size")}})),cr=E.factory((t,e)=>{const r=E.useProps("Month",Vl,t),{classNames:n,className:s,style:c,styles:h,unstyled:a,vars:g,__staticSelector:y,locale:_,firstDayOfWeek:M,weekdayFormat:x,month:S,weekendDays:D,getDayProps:O,excludeDate:L,minDate:I,maxDate:z,renderDay:V,hideOutsideDates:q,hideWeekdays:X,getDayAriaLabel:re,static:Q,__getDayRef:J,__onDayKeyDown:Z,__onDayClick:U,__onDayMouseEnter:W,__preventFocus:ae,__stopPropagation:se,withCellSpacing:k,size:C,highlightToday:v,withWeekNumbers:d,attributes:u,...m}=r,f=E.useStyles({name:y||"Month",classes:ns,props:r,className:s,style:c,classNames:n,styles:h,unstyled:a,attributes:u,vars:g,varsResolver:Hl,rootSelector:"month"}),i=dt(),b=Il({month:S,firstDayOfWeek:i.getFirstDayOfWeek(M),consistentWeeks:i.consistentWeeks}),T=Yl({dates:b,minDate:qe(I),maxDate:qe(z),getDayProps:O,excludeDate:L,hideOutsideDates:q,month:S}),{resolvedClassNames:j,resolvedStyles:K}=E.useResolvedStylesApi({classNames:n,styles:h,props:r}),ee=b.map((te,H)=>{const ie=te.map((oe,ue)=>{const A=!un(oe,S),N=re?.(oe)||de(oe).locale(_||i.locale).format("D MMMM YYYY"),$=O?.(oe),B=de(oe).isSame(T,"date");return w.jsx("td",{...f("monthCell"),"data-with-spacing":k||void 0,children:w.jsx(an,{__staticSelector:y||"Month",classNames:j,styles:K,unstyled:a,"data-mantine-stop-propagation":se||void 0,highlightToday:v,renderDay:V,date:oe,size:C,weekend:i.getWeekendDays(D).includes(de(oe).get("day")),outside:A,hidden:q?A:!1,"aria-label":N,static:Q,disabled:L?.(oe)||!ts(oe,qe(z))||!es(oe,qe(I)),ref:Y=>{Y&&J?.(H,ue,Y)},...$,onKeyDown:Y=>{$?.onKeyDown?.(Y),Z?.(Y,{rowIndex:H,cellIndex:ue,date:oe})},onMouseEnter:Y=>{$?.onMouseEnter?.(Y),W?.(Y,oe)},onClick:Y=>{$?.onClick?.(Y),U?.(Y,oe)},onMouseDown:Y=>{$?.onMouseDown?.(Y),ae&&Y.preventDefault()},tabIndex:ae||!B?-1:0})},oe.toString())});return w.jsxs("tr",{...f("monthRow"),children:[d&&w.jsx("td",{...f("weekNumber"),children:ql(te)}),ie]},H)});return w.jsxs(E.Box,{component:"table",...f("month"),size:C,ref:e,...m,children:[!X&&w.jsx("thead",{...f("monthThead"),children:w.jsx(ln,{__staticSelector:y||"Month",locale:_,firstDayOfWeek:M,weekdayFormat:x,size:C,classNames:j,styles:K,unstyled:a,withWeekNumbers:d})}),w.jsx("tbody",{...f("monthTbody"),children:ee})]})});cr.classes=ns,cr.displayName="@mantine/dates/Month";var os={pickerControl:"m_dc6a3c71"};const Gl=E.createVarsResolver((t,{size:e})=>({pickerControl:{"--dpc-fz":E.getFontSize(e),"--dpc-size":E.getSize(e,"dpc-size")}})),dr=E.factory((t,e)=>{const r=E.useProps("PickerControl",null,t),{classNames:n,className:s,style:c,styles:h,unstyled:a,vars:g,firstInRange:y,lastInRange:_,inRange:M,__staticSelector:x,selected:S,disabled:D,attributes:O,...L}=r,I=E.useStyles({name:x||"PickerControl",classes:os,props:r,className:s,style:c,classNames:n,styles:h,unstyled:a,attributes:O,vars:g,varsResolver:Gl,rootSelector:"pickerControl"});return w.jsx(E.UnstyledButton,{...I("pickerControl"),ref:e,unstyled:a,"data-picker-control":!0,"data-selected":S&&!D||void 0,"data-disabled":D||void 0,"data-in-range":M&&!D&&!S||void 0,"data-first-in-range":y&&!D||void 0,"data-last-in-range":_&&!D||void 0,disabled:D,...L})});dr.classes=os,dr.displayName="@mantine/dates/PickerControl";function ss({year:t,minDate:e,maxDate:r}){return!e&&!r?!1:!!(e&&de(t).isBefore(e,"year")||r&&de(t).isAfter(r,"year"))}function Ql({years:t,minDate:e,maxDate:r,getYearControlProps:n}){const s=t.flat().filter(a=>!ss({year:a,minDate:e,maxDate:r})&&!n?.(a)?.disabled),c=s.find(a=>n?.(a)?.selected);if(c)return c;const h=s.find(a=>de().isSame(a,"year"));return h||s[0]}function is(t){const e=de(t).year(),r=e-e%10;let n=0;const s=[[],[],[],[]];for(let c=0;c<4;c+=1){const h=c===3?1:3;for(let a=0;a<h;a+=1)s[c].push(de(new Date(r+n,0)).format("YYYY-MM-DD")),n+=1}return s}var as={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const Zl={yearsListFormat:"YYYY",withCellSpacing:!0},hr=E.factory((t,e)=>{const r=E.useProps("YearsList",Zl,t),{classNames:n,className:s,style:c,styles:h,unstyled:a,vars:g,decade:y,yearsListFormat:_,locale:M,minDate:x,maxDate:S,getYearControlProps:D,__staticSelector:O,__getControlRef:L,__onControlKeyDown:I,__onControlClick:z,__onControlMouseEnter:V,__preventFocus:q,__stopPropagation:X,withCellSpacing:re,size:Q,attributes:J,...Z}=r,U=E.useStyles({name:O||"YearsList",classes:as,props:r,className:s,style:c,classNames:n,styles:h,unstyled:a,attributes:J,vars:g,rootSelector:"yearsList"}),W=dt(),ae=is(y),se=Ql({years:ae,minDate:x,maxDate:S,getYearControlProps:D}),k=ae.map((C,v)=>{const d=C.map((u,m)=>{const f=D?.(u),i=de(u).isSame(se,"year");return w.jsx("td",{...U("yearsListCell"),"data-with-spacing":re||void 0,children:w.jsx(dr,{...U("yearsListControl"),size:Q,unstyled:a,"data-mantine-stop-propagation":X||void 0,disabled:ss({year:u,minDate:x,maxDate:S}),ref:b=>{b&&L?.(v,m,b)},...f,onKeyDown:b=>{f?.onKeyDown?.(b),I?.(b,{rowIndex:v,cellIndex:m,date:u})},onClick:b=>{f?.onClick?.(b),z?.(b,u)},onMouseEnter:b=>{f?.onMouseEnter?.(b),V?.(b,u)},onMouseDown:b=>{f?.onMouseDown?.(b),q&&b.preventDefault()},tabIndex:q||!i?-1:0,children:de(u).locale(W.getLocale(M)).format(_)})},m)});return w.jsx("tr",{...U("yearsListRow"),children:d},v)});return w.jsx(E.Box,{component:"table",ref:e,size:Q,...U("yearsList"),...Z,children:w.jsx("tbody",{children:k})})});hr.classes=as,hr.displayName="@mantine/dates/YearsList";function ls({month:t,minDate:e,maxDate:r}){return!e&&!r?!1:!!(e&&de(t).isBefore(e,"month")||r&&de(t).isAfter(r,"month"))}function Kl({months:t,minDate:e,maxDate:r,getMonthControlProps:n}){const s=t.flat().filter(a=>!ls({month:a,minDate:e,maxDate:r})&&!n?.(a)?.disabled),c=s.find(a=>n?.(a)?.selected);if(c)return c;const h=s.find(a=>de().isSame(a,"month"));return h||s[0]}function Jl(t){const e=de(t).startOf("year").toDate(),r=[[],[],[],[]];let n=0;for(let s=0;s<4;s+=1)for(let c=0;c<3;c+=1)r[s].push(de(e).add(n,"months").format("YYYY-MM-DD")),n+=1;return r}var us={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const Xl={monthsListFormat:"MMM",withCellSpacing:!0},fr=E.factory((t,e)=>{const r=E.useProps("MonthsList",Xl,t),{classNames:n,className:s,style:c,styles:h,unstyled:a,vars:g,__staticSelector:y,year:_,monthsListFormat:M,locale:x,minDate:S,maxDate:D,getMonthControlProps:O,__getControlRef:L,__onControlKeyDown:I,__onControlClick:z,__onControlMouseEnter:V,__preventFocus:q,__stopPropagation:X,withCellSpacing:re,size:Q,attributes:J,...Z}=r,U=E.useStyles({name:y||"MonthsList",classes:us,props:r,className:s,style:c,classNames:n,styles:h,unstyled:a,attributes:J,vars:g,rootSelector:"monthsList"}),W=dt(),ae=Jl(_),se=Kl({months:ae,minDate:qe(S),maxDate:qe(D),getMonthControlProps:O}),k=ae.map((C,v)=>{const d=C.map((u,m)=>{const f=O?.(u),i=de(u).isSame(se,"month");return w.jsx("td",{...U("monthsListCell"),"data-with-spacing":re||void 0,children:w.jsx(dr,{...U("monthsListControl"),size:Q,unstyled:a,__staticSelector:y||"MonthsList","data-mantine-stop-propagation":X||void 0,disabled:ls({month:u,minDate:qe(S),maxDate:qe(D)}),ref:b=>{b&&L?.(v,m,b)},...f,onKeyDown:b=>{f?.onKeyDown?.(b),I?.(b,{rowIndex:v,cellIndex:m,date:u})},onClick:b=>{f?.onClick?.(b),z?.(b,u)},onMouseEnter:b=>{f?.onMouseEnter?.(b),V?.(b,u)},onMouseDown:b=>{f?.onMouseDown?.(b),q&&b.preventDefault()},tabIndex:q||!i?-1:0,children:de(u).locale(W.getLocale(x)).format(M)})},m)});return w.jsx("tr",{...U("monthsListRow"),children:d},v)});return w.jsx(E.Box,{component:"table",ref:e,size:Q,...U("monthsList"),...Z,children:w.jsx("tbody",{children:k})})});fr.classes=us,fr.displayName="@mantine/dates/MonthsList";var cs={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const eu={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},tu=E.createVarsResolver((t,{size:e})=>({calendarHeader:{"--dch-control-size":E.getSize(e,"dch-control-size"),"--dch-fz":E.getFontSize(e)}})),ht=E.factory((t,e)=>{const r=E.useProps("CalendarHeader",eu,t),{classNames:n,className:s,style:c,styles:h,unstyled:a,vars:g,nextIcon:y,previousIcon:_,nextLabel:M,previousLabel:x,onNext:S,onPrevious:D,onLevelClick:O,label:L,nextDisabled:I,previousDisabled:z,hasNextLevel:V,levelControlAriaLabel:q,withNext:X,withPrevious:re,headerControlsOrder:Q,__staticSelector:J,__preventFocus:Z,__stopPropagation:U,attributes:W,...ae}=r,se=E.useStyles({name:J||"CalendarHeader",classes:cs,props:r,className:s,style:c,classNames:n,styles:h,unstyled:a,attributes:W,vars:g,varsResolver:tu,rootSelector:"calendarHeader"}),k=Z?m=>m.preventDefault():void 0,C=re&&G.createElement(E.UnstyledButton,{...se("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":x,onClick:D,unstyled:a,onMouseDown:k,disabled:z,"data-disabled":z||void 0,tabIndex:Z||z?-1:0,"data-mantine-stop-propagation":U||void 0},_||w.jsx(E.AccordionChevron,{...se("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),v=G.createElement(E.UnstyledButton,{component:V?"button":"div",...se("calendarHeaderLevel"),key:"level",onClick:V?O:void 0,unstyled:a,onMouseDown:V?k:void 0,disabled:!V,"data-static":!V||void 0,"aria-label":q,tabIndex:Z||!V?-1:0,"data-mantine-stop-propagation":U||void 0},L),d=X&&G.createElement(E.UnstyledButton,{...se("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":M,onClick:S,unstyled:a,onMouseDown:k,disabled:I,"data-disabled":I||void 0,tabIndex:Z||I?-1:0,"data-mantine-stop-propagation":U||void 0},y||w.jsx(E.AccordionChevron,{...se("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),u=Q.map(m=>m==="previous"?C:m==="level"?v:m==="next"?d:null);return w.jsx(E.Box,{...se("calendarHeader"),ref:e,...ae,children:u})});ht.classes=cs,ht.displayName="@mantine/dates/CalendarHeader";function ru(t){const e=is(t);return[e[0][0],e[3][0]]}const nu={decadeLabelFormat:"YYYY"},pr=E.factory((t,e)=>{const r=E.useProps("DecadeLevel",nu,t),{decade:n,locale:s,minDate:c,maxDate:h,yearsListFormat:a,getYearControlProps:g,__getControlRef:y,__onControlKeyDown:_,__onControlClick:M,__onControlMouseEnter:x,withCellSpacing:S,__preventFocus:D,nextIcon:O,previousIcon:L,nextLabel:I,previousLabel:z,onNext:V,onPrevious:q,nextDisabled:X,previousDisabled:re,levelControlAriaLabel:Q,withNext:J,withPrevious:Z,headerControlsOrder:U,decadeLabelFormat:W,classNames:ae,styles:se,unstyled:k,__staticSelector:C,__stopPropagation:v,size:d,attributes:u,...m}=r,f=dt(),[i,b]=ru(n),T={__staticSelector:C||"DecadeLevel",classNames:ae,styles:se,unstyled:k,size:d,attributes:u},j=typeof X=="boolean"?X:h?!de(b).endOf("year").isBefore(h):!1,K=typeof re=="boolean"?re:c?!de(i).startOf("year").isAfter(c):!1,ee=(te,H)=>de(te).locale(s||f.locale).format(H);return w.jsxs(E.Box,{"data-decade-level":!0,size:d,ref:e,...m,children:[w.jsx(ht,{label:typeof W=="function"?W(i,b):`${ee(i,W)} – ${ee(b,W)}`,__preventFocus:D,__stopPropagation:v,nextIcon:O,previousIcon:L,nextLabel:I,previousLabel:z,onNext:V,onPrevious:q,nextDisabled:j,previousDisabled:K,hasNextLevel:!1,levelControlAriaLabel:Q,withNext:J,withPrevious:Z,headerControlsOrder:U,...T}),w.jsx(hr,{decade:n,locale:s,minDate:c,maxDate:h,yearsListFormat:a,getYearControlProps:g,__getControlRef:y,__onControlKeyDown:_,__onControlClick:M,__onControlMouseEnter:x,__preventFocus:D,__stopPropagation:v,withCellSpacing:S,...T})]})});pr.classes={...hr.classes,...ht.classes},pr.displayName="@mantine/dates/DecadeLevel";const ou={yearLabelFormat:"YYYY"},gr=E.factory((t,e)=>{const r=E.useProps("YearLevel",ou,t),{year:n,locale:s,minDate:c,maxDate:h,monthsListFormat:a,getMonthControlProps:g,__getControlRef:y,__onControlKeyDown:_,__onControlClick:M,__onControlMouseEnter:x,withCellSpacing:S,__preventFocus:D,nextIcon:O,previousIcon:L,nextLabel:I,previousLabel:z,onNext:V,onPrevious:q,onLevelClick:X,nextDisabled:re,previousDisabled:Q,hasNextLevel:J,levelControlAriaLabel:Z,withNext:U,withPrevious:W,headerControlsOrder:ae,yearLabelFormat:se,__staticSelector:k,__stopPropagation:C,size:v,classNames:d,styles:u,unstyled:m,attributes:f,...i}=r,b=dt(),T={__staticSelector:k||"YearLevel",classNames:d,styles:u,unstyled:m,size:v,attributes:f},j=typeof re=="boolean"?re:h?!de(n).endOf("year").isBefore(h):!1,K=typeof Q=="boolean"?Q:c?!de(n).startOf("year").isAfter(c):!1;return w.jsxs(E.Box,{"data-year-level":!0,size:v,ref:e,...i,children:[w.jsx(ht,{label:typeof se=="function"?se(n):de(n).locale(s||b.locale).format(se),__preventFocus:D,__stopPropagation:C,nextIcon:O,previousIcon:L,nextLabel:I,previousLabel:z,onNext:V,onPrevious:q,onLevelClick:X,nextDisabled:j,previousDisabled:K,hasNextLevel:J,levelControlAriaLabel:Z,withNext:U,withPrevious:W,headerControlsOrder:ae,...T}),w.jsx(fr,{year:n,locale:s,minDate:c,maxDate:h,monthsListFormat:a,getMonthControlProps:g,__getControlRef:y,__onControlKeyDown:_,__onControlClick:M,__onControlMouseEnter:x,__preventFocus:D,__stopPropagation:C,withCellSpacing:S,...T})]})});gr.classes={...ht.classes,...fr.classes},gr.displayName="@mantine/dates/YearLevel";const su={monthLabelFormat:"MMMM YYYY"},mr=E.factory((t,e)=>{const r=E.useProps("MonthLevel",su,t),{month:n,locale:s,firstDayOfWeek:c,weekdayFormat:h,weekendDays:a,getDayProps:g,excludeDate:y,minDate:_,maxDate:M,renderDay:x,hideOutsideDates:S,hideWeekdays:D,getDayAriaLabel:O,__getDayRef:L,__onDayKeyDown:I,__onDayClick:z,__onDayMouseEnter:V,withCellSpacing:q,highlightToday:X,withWeekNumbers:re,__preventFocus:Q,__stopPropagation:J,nextIcon:Z,previousIcon:U,nextLabel:W,previousLabel:ae,onNext:se,onPrevious:k,onLevelClick:C,nextDisabled:v,previousDisabled:d,hasNextLevel:u,levelControlAriaLabel:m,withNext:f,withPrevious:i,headerControlsOrder:b,monthLabelFormat:T,classNames:j,styles:K,unstyled:ee,__staticSelector:te,size:H,static:ie,attributes:oe,...ue}=r,A=dt(),N={__staticSelector:te||"MonthLevel",classNames:j,styles:K,unstyled:ee,size:H,attributes:oe},$=typeof v=="boolean"?v:M?!de(n).endOf("month").isBefore(M):!1,B=typeof d=="boolean"?d:_?!de(n).startOf("month").isAfter(_):!1;return w.jsxs(E.Box,{"data-month-level":!0,size:H,ref:e,...ue,children:[w.jsx(ht,{label:typeof T=="function"?T(n):de(n).locale(s||A.locale).format(T),__preventFocus:Q,__stopPropagation:J,nextIcon:Z,previousIcon:U,nextLabel:W,previousLabel:ae,onNext:se,onPrevious:k,onLevelClick:C,nextDisabled:$,previousDisabled:B,hasNextLevel:u,levelControlAriaLabel:m,withNext:f,withPrevious:i,headerControlsOrder:b,...N}),w.jsx(cr,{month:n,locale:s,firstDayOfWeek:c,weekdayFormat:h,weekendDays:a,getDayProps:g,excludeDate:y,minDate:_,maxDate:M,renderDay:x,hideOutsideDates:S,hideWeekdays:D,getDayAriaLabel:O,__getDayRef:L,__onDayKeyDown:I,__onDayClick:z,__onDayMouseEnter:V,__preventFocus:Q,__stopPropagation:J,static:ie,withCellSpacing:q,highlightToday:X,withWeekNumbers:re,...N})]})});mr.classes={...cr.classes,...ht.classes},mr.displayName="@mantine/dates/MonthLevel";var ds={levelsGroup:"m_30b26e33"};const ft=E.factory((t,e)=>{const r=E.useProps("LevelsGroup",null,t),{classNames:n,className:s,style:c,styles:h,unstyled:a,vars:g,__staticSelector:y,attributes:_,...M}=r,x=E.useStyles({name:y||"LevelsGroup",classes:ds,props:r,className:s,style:c,classNames:n,styles:h,unstyled:a,attributes:_,vars:g,rootSelector:"levelsGroup"});return w.jsx(E.Box,{ref:e,...x("levelsGroup"),...M})});ft.classes=ds,ft.displayName="@mantine/dates/LevelsGroup";const iu={numberOfColumns:1},yr=E.factory((t,e)=>{const r=E.useProps("DecadeLevelGroup",iu,t),{decade:n,locale:s,minDate:c,maxDate:h,yearsListFormat:a,getYearControlProps:g,__onControlClick:y,__onControlMouseEnter:_,withCellSpacing:M,__preventFocus:x,nextIcon:S,previousIcon:D,nextLabel:O,previousLabel:L,onNext:I,onPrevious:z,nextDisabled:V,previousDisabled:q,headerControlsOrder:X,classNames:re,styles:Q,unstyled:J,__staticSelector:Z,__stopPropagation:U,numberOfColumns:W,levelControlAriaLabel:ae,decadeLabelFormat:se,size:k,vars:C,attributes:v,...d}=r,u=G.useRef([]),m=Array(W).fill(0).map((f,i)=>{const b=de(n).add(i*10,"years").format("YYYY-MM-DD");return w.jsx(pr,{size:k,yearsListFormat:a,decade:b,withNext:i===W-1,withPrevious:i===0,decadeLabelFormat:se,__onControlClick:y,__onControlMouseEnter:_,__onControlKeyDown:(T,j)=>sn({levelIndex:i,rowIndex:j.rowIndex,cellIndex:j.cellIndex,event:T,controlsRef:u}),__getControlRef:(T,j,K)=>{Array.isArray(u.current[i])||(u.current[i]=[]),Array.isArray(u.current[i][T])||(u.current[i][T]=[]),u.current[i][T][j]=K},levelControlAriaLabel:typeof ae=="function"?ae(b):ae,locale:s,minDate:c,maxDate:h,__preventFocus:x,__stopPropagation:U,nextIcon:S,previousIcon:D,nextLabel:O,previousLabel:L,onNext:I,onPrevious:z,nextDisabled:V,previousDisabled:q,getYearControlProps:g,__staticSelector:Z||"DecadeLevelGroup",classNames:re,styles:Q,unstyled:J,withCellSpacing:M,headerControlsOrder:X,attributes:v},i)});return w.jsx(ft,{classNames:re,styles:Q,__staticSelector:Z||"DecadeLevelGroup",ref:e,size:k,unstyled:J,attributes:v,...d,children:m})});yr.classes={...ft.classes,...pr.classes},yr.displayName="@mantine/dates/DecadeLevelGroup";const au={numberOfColumns:1},vr=E.factory((t,e)=>{const r=E.useProps("YearLevelGroup",au,t),{year:n,locale:s,minDate:c,maxDate:h,monthsListFormat:a,getMonthControlProps:g,__onControlClick:y,__onControlMouseEnter:_,withCellSpacing:M,__preventFocus:x,nextIcon:S,previousIcon:D,nextLabel:O,previousLabel:L,onNext:I,onPrevious:z,onLevelClick:V,nextDisabled:q,previousDisabled:X,hasNextLevel:re,headerControlsOrder:Q,classNames:J,styles:Z,unstyled:U,__staticSelector:W,__stopPropagation:ae,numberOfColumns:se,levelControlAriaLabel:k,yearLabelFormat:C,size:v,vars:d,attributes:u,...m}=r,f=G.useRef([]),i=Array(se).fill(0).map((b,T)=>{const j=de(n).add(T,"years").format("YYYY-MM-DD");return w.jsx(gr,{size:v,monthsListFormat:a,year:j,withNext:T===se-1,withPrevious:T===0,yearLabelFormat:C,__stopPropagation:ae,__onControlClick:y,__onControlMouseEnter:_,__onControlKeyDown:(K,ee)=>sn({levelIndex:T,rowIndex:ee.rowIndex,cellIndex:ee.cellIndex,event:K,controlsRef:f}),__getControlRef:(K,ee,te)=>{Array.isArray(f.current[T])||(f.current[T]=[]),Array.isArray(f.current[T][K])||(f.current[T][K]=[]),f.current[T][K][ee]=te},levelControlAriaLabel:typeof k=="function"?k(j):k,locale:s,minDate:c,maxDate:h,__preventFocus:x,nextIcon:S,previousIcon:D,nextLabel:O,previousLabel:L,onNext:I,onPrevious:z,onLevelClick:V,nextDisabled:q,previousDisabled:X,hasNextLevel:re,getMonthControlProps:g,classNames:J,styles:Z,unstyled:U,__staticSelector:W||"YearLevelGroup",withCellSpacing:M,headerControlsOrder:Q,attributes:u},T)});return w.jsx(ft,{classNames:J,styles:Z,__staticSelector:W||"YearLevelGroup",ref:e,size:v,unstyled:U,attributes:u,...m,children:i})});vr.classes={...gr.classes,...ft.classes},vr.displayName="@mantine/dates/YearLevelGroup";const lu={numberOfColumns:1},br=E.factory((t,e)=>{const r=E.useProps("MonthLevelGroup",lu,t),{month:n,locale:s,firstDayOfWeek:c,weekdayFormat:h,weekendDays:a,getDayProps:g,excludeDate:y,minDate:_,maxDate:M,renderDay:x,hideOutsideDates:S,hideWeekdays:D,getDayAriaLabel:O,__onDayClick:L,__onDayMouseEnter:I,withCellSpacing:z,highlightToday:V,withWeekNumbers:q,__preventFocus:X,nextIcon:re,previousIcon:Q,nextLabel:J,previousLabel:Z,onNext:U,onPrevious:W,onLevelClick:ae,nextDisabled:se,previousDisabled:k,hasNextLevel:C,headerControlsOrder:v,classNames:d,styles:u,unstyled:m,numberOfColumns:f,levelControlAriaLabel:i,monthLabelFormat:b,__staticSelector:T,__stopPropagation:j,size:K,static:ee,vars:te,attributes:H,...ie}=r,oe=G.useRef([]),ue=Array(f).fill(0).map((A,N)=>{const $=de(n).add(N,"months").format("YYYY-MM-DD");return w.jsx(mr,{month:$,withNext:N===f-1,withPrevious:N===0,monthLabelFormat:b,__stopPropagation:j,__onDayClick:L,__onDayMouseEnter:I,__onDayKeyDown:(B,Y)=>sn({levelIndex:N,rowIndex:Y.rowIndex,cellIndex:Y.cellIndex,event:B,controlsRef:oe}),__getDayRef:(B,Y,ce)=>{Array.isArray(oe.current[N])||(oe.current[N]=[]),Array.isArray(oe.current[N][B])||(oe.current[N][B]=[]),oe.current[N][B][Y]=ce},levelControlAriaLabel:typeof i=="function"?i($):i,locale:s,firstDayOfWeek:c,weekdayFormat:h,weekendDays:a,getDayProps:g,excludeDate:y,minDate:_,maxDate:M,renderDay:x,hideOutsideDates:S,hideWeekdays:D,getDayAriaLabel:O,__preventFocus:X,nextIcon:re,previousIcon:Q,nextLabel:J,previousLabel:Z,onNext:U,onPrevious:W,onLevelClick:ae,nextDisabled:se,previousDisabled:k,hasNextLevel:C,classNames:d,styles:u,unstyled:m,__staticSelector:T||"MonthLevelGroup",size:K,static:ee,withCellSpacing:z,highlightToday:V,withWeekNumbers:q,headerControlsOrder:v,attributes:H},N)});return w.jsx(ft,{classNames:d,styles:u,__staticSelector:T||"MonthLevelGroup",ref:e,size:K,attributes:H,...ie,children:ue})});br.classes={...ft.classes,...mr.classes},br.displayName="@mantine/dates/MonthLevelGroup";const hs=t=>t==="range"?[null,null]:t==="multiple"?[]:null,fs=(t,e)=>{const r=e?Qo:qe;return Array.isArray(t)?t.map(r):r(t)};function cn({type:t,value:e,defaultValue:r,onChange:n,withTime:s=!1}){const c=G.useRef(t),[h,a,g]=Le.useUncontrolled({value:fs(e,s),defaultValue:fs(r,s),finalValue:hs(t),onChange:n});let y=h;return c.current!==t&&(c.current=t,e===void 0&&(y=r!==void 0?r:hs(t),a(y))),[y,a,g]}function dn(t,e){return t?t==="month"?0:t==="year"?1:2:e||0}function uu(t){return t===0?"month":t===1?"year":"decade"}function qt(t,e,r){return uu(Le.clamp(dn(t,0),dn(e,0),dn(r,2)))}const cu={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},wr=E.factory((t,e)=>{const r=E.useProps("Calendar",cu,t),{vars:n,maxLevel:s,minLevel:c,defaultLevel:h,level:a,onLevelChange:g,date:y,defaultDate:_,onDateChange:M,numberOfColumns:x,columnsToScroll:S,ariaLabels:D,nextLabel:O,previousLabel:L,onYearSelect:I,onMonthSelect:z,onYearMouseEnter:V,onMonthMouseEnter:q,headerControlsOrder:X,__updateDateOnYearSelect:re,__updateDateOnMonthSelect:Q,__setDateRef:J,__setLevelRef:Z,firstDayOfWeek:U,weekdayFormat:W,weekendDays:ae,getDayProps:se,excludeDate:k,renderDay:C,hideOutsideDates:v,hideWeekdays:d,getDayAriaLabel:u,monthLabelFormat:m,nextIcon:f,previousIcon:i,__onDayClick:b,__onDayMouseEnter:T,withCellSpacing:j,highlightToday:K,withWeekNumbers:ee,monthsListFormat:te,getMonthControlProps:H,yearLabelFormat:ie,yearsListFormat:oe,getYearControlProps:ue,decadeLabelFormat:A,classNames:N,styles:$,unstyled:B,minDate:Y,maxDate:ce,locale:o,__staticSelector:l,size:p,__preventFocus:P,__stopPropagation:R,onNextDecade:F,onPreviousDecade:le,onNextYear:he,onPreviousYear:pe,onNextMonth:ne,onPreviousMonth:fe,static:me,enableKeyboardNavigation:ge,attributes:Se,..._e}=r,{resolvedClassNames:Ce,resolvedStyles:ze}=E.useResolvedStylesApi({classNames:N,styles:$,props:r}),[Ee,xe]=Le.useUncontrolled({value:a?qt(a,c,s):void 0,defaultValue:h?qt(h,c,s):void 0,finalValue:qt(void 0,c,s),onChange:g}),[nt,je]=cn({type:"default",value:qe(y),defaultValue:qe(_),onChange:M});G.useImperativeHandle(J,()=>ve=>{je(ve)}),G.useImperativeHandle(Z,()=>ve=>{xe(ve)});const Ve={__staticSelector:l||"Calendar",styles:ze,classNames:Ce,unstyled:B,size:p,attributes:Se},Ye=S||x||1,et=new Date,ot=Y&&de(et).isAfter(Y)?Y:de(et).format("YYYY-MM-DD"),$e=nt||ot,pt=()=>{const ve=de($e).add(Ye,"month").format("YYYY-MM-DD");ne?.(ve),je(ve)},wt=()=>{const ve=de($e).subtract(Ye,"month").format("YYYY-MM-DD");fe?.(ve),je(ve)},He=()=>{const ve=de($e).add(Ye,"year").format("YYYY-MM-DD");he?.(ve),je(ve)},Ge=()=>{const ve=de($e).subtract(Ye,"year").format("YYYY-MM-DD");pe?.(ve),je(ve)},Qe=()=>{const ve=de($e).add(10*Ye,"year").format("YYYY-MM-DD");F?.(ve),je(ve)},st=()=>{const ve=de($e).subtract(10*Ye,"year").format("YYYY-MM-DD");le?.(ve),je(ve)},gt=G.useRef(null);G.useEffect(()=>{if(!ge||me)return;const ve=De=>{if(!gt.current?.contains(document.activeElement))return;const Fe=De.ctrlKey||De.metaKey,at=De.shiftKey;switch(De.key){case"ArrowUp":Fe&&at?(De.preventDefault(),st()):Fe&&(De.preventDefault(),Ge());break;case"ArrowDown":Fe&&at?(De.preventDefault(),Qe()):Fe&&(De.preventDefault(),He());break;case"y":case"Y":Ee==="month"&&(De.preventDefault(),xe("year"));break}};return document.addEventListener("keydown",ve),()=>{document.removeEventListener("keydown",ve)}},[ge,me,Ee,He,Ge,Qe,st]);const mt=ve=>{gt.current=ve,typeof e=="function"?e(ve):e&&(e.current=ve)};return w.jsxs(E.Box,{ref:mt,size:p,"data-calendar":!0,..._e,children:[Ee==="month"&&w.jsx(br,{month:$e,minDate:Y,maxDate:ce,firstDayOfWeek:U,weekdayFormat:W,weekendDays:ae,getDayProps:se,excludeDate:k,renderDay:C,hideOutsideDates:v,hideWeekdays:d,getDayAriaLabel:u,onNext:pt,onPrevious:wt,hasNextLevel:s!=="month",onLevelClick:()=>xe("year"),numberOfColumns:x,locale:o,levelControlAriaLabel:D?.monthLevelControl,nextLabel:D?.nextMonth??O,nextIcon:f,previousLabel:D?.previousMonth??L,previousIcon:i,monthLabelFormat:m,__onDayClick:b,__onDayMouseEnter:T,__preventFocus:P,__stopPropagation:R,static:me,withCellSpacing:j,highlightToday:K,withWeekNumbers:ee,headerControlsOrder:X,...Ve}),Ee==="year"&&w.jsx(vr,{year:$e,numberOfColumns:x,minDate:Y,maxDate:ce,monthsListFormat:te,getMonthControlProps:H,locale:o,onNext:He,onPrevious:Ge,hasNextLevel:s!=="month"&&s!=="year",onLevelClick:()=>xe("decade"),levelControlAriaLabel:D?.yearLevelControl,nextLabel:D?.nextYear??O,nextIcon:f,previousLabel:D?.previousYear??L,previousIcon:i,yearLabelFormat:ie,__onControlMouseEnter:q,__onControlClick:(ve,De)=>{Q&&je(De),xe(qt("month",c,s)),z?.(De)},__preventFocus:P,__stopPropagation:R,withCellSpacing:j,headerControlsOrder:X,...Ve}),Ee==="decade"&&w.jsx(yr,{decade:$e,minDate:Y,maxDate:ce,yearsListFormat:oe,getYearControlProps:ue,locale:o,onNext:Qe,onPrevious:st,numberOfColumns:x,nextLabel:D?.nextDecade??O,nextIcon:f,previousLabel:D?.previousDecade??L,previousIcon:i,decadeLabelFormat:A,__onControlMouseEnter:V,__onControlClick:(ve,De)=>{re&&je(De),xe(qt("year",c,s)),I?.(De)},__preventFocus:P,__stopPropagation:R,withCellSpacing:j,headerControlsOrder:X,...Ve})]})});wr.classes={...yr.classes,...vr.classes,...br.classes},wr.displayName="@mantine/dates/Calendar";function du(t){const{maxLevel:e,minLevel:r,defaultLevel:n,level:s,onLevelChange:c,nextIcon:h,previousIcon:a,date:g,defaultDate:y,onDateChange:_,numberOfColumns:M,columnsToScroll:x,ariaLabels:S,nextLabel:D,previousLabel:O,onYearSelect:L,onMonthSelect:I,onYearMouseEnter:z,onMonthMouseEnter:V,onNextMonth:q,onPreviousMonth:X,onNextYear:re,onPreviousYear:Q,onNextDecade:J,onPreviousDecade:Z,withCellSpacing:U,highlightToday:W,__updateDateOnYearSelect:ae,__updateDateOnMonthSelect:se,__setDateRef:k,__setLevelRef:C,withWeekNumbers:v,headerControlsOrder:d,firstDayOfWeek:u,weekdayFormat:m,weekendDays:f,getDayProps:i,excludeDate:b,renderDay:T,hideOutsideDates:j,hideWeekdays:K,getDayAriaLabel:ee,monthLabelFormat:te,monthsListFormat:H,getMonthControlProps:ie,yearLabelFormat:oe,yearsListFormat:ue,getYearControlProps:A,decadeLabelFormat:N,allowSingleDateInRange:$,allowDeselect:B,minDate:Y,maxDate:ce,locale:o,...l}=t;return{calendarProps:{maxLevel:e,minLevel:r,defaultLevel:n,level:s,onLevelChange:c,nextIcon:h,previousIcon:a,date:g,defaultDate:y,onDateChange:_,numberOfColumns:M,columnsToScroll:x,ariaLabels:S,nextLabel:D,previousLabel:O,onYearSelect:L,onMonthSelect:I,onYearMouseEnter:z,onMonthMouseEnter:V,onNextMonth:q,onPreviousMonth:X,onNextYear:re,onPreviousYear:Q,onNextDecade:J,onPreviousDecade:Z,withCellSpacing:U,highlightToday:W,__updateDateOnYearSelect:ae,__updateDateOnMonthSelect:se,__setDateRef:k,withWeekNumbers:v,headerControlsOrder:d,firstDayOfWeek:u,weekdayFormat:m,weekendDays:f,getDayProps:i,excludeDate:b,renderDay:T,hideOutsideDates:j,hideWeekdays:K,getDayAriaLabel:ee,monthLabelFormat:te,monthsListFormat:H,getMonthControlProps:ie,yearLabelFormat:oe,yearsListFormat:ue,getYearControlProps:A,decadeLabelFormat:N,allowSingleDateInRange:$,allowDeselect:B,minDate:Y,maxDate:ce,locale:o},others:l}}function hu(t){if(t===null)return null;const e=new Date(t);return Number.isNaN(e.getTime())||!t?null:de(e).format("YYYY-MM-DD")}function fu({date:t,maxDate:e,minDate:r}){return!(t==null||Number.isNaN(new Date(t).getTime())||e&&de(t).isAfter(e,"date")||r&&de(t).isBefore(r,"date"))}const pu={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,size:"sm"},_r=E.factory((t,e)=>{const r=E.useInputProps("DateInput",pu,t),{inputProps:n,wrapperProps:s,value:c,defaultValue:h,onChange:a,clearable:g,clearButtonProps:y,popoverProps:_,getDayProps:M,locale:x,valueFormat:S,dateParser:D,minDate:O,maxDate:L,fixOnBlur:I,onFocus:z,onBlur:V,onClick:q,onKeyDown:X,readOnly:re,name:Q,form:J,rightSection:Z,unstyled:U,classNames:W,styles:ae,allowDeselect:se,date:k,defaultDate:C,onDateChange:v,getMonthControlProps:d,getYearControlProps:u,disabled:m,...f}=r,i=G.useRef(null),b=G.useRef(null),[T,j]=G.useState(!1),{calendarProps:K,others:ee}=du(f),te=dt(),ie=D||(ne=>{const fe=de(ne,S,te.getLocale(x)).toDate();return Number.isNaN(fe.getTime())?hu(ne):de(fe).format("YYYY-MM-DD")}),oe=se!==void 0?se:g,ue=ne=>ne?de(ne).locale(te.getLocale(x)).format(S):"",[A,N,$]=cn({type:"default",value:c,defaultValue:h,onChange:a}),[B,Y]=cn({type:"default",value:k,defaultValue:h||C,onChange:v});G.useEffect(()=>{$&&c!==null&&Y(c)},[$,c]);const[ce,o]=G.useState(ue(A));G.useEffect(()=>{o(ue(A))},[te.getLocale(x)]);const l=ne=>{const fe=ne.currentTarget.value;if(o(fe),j(!0),fe.trim()===""&&(se||g))N(null);else{const me=ie(fe);me&&fu({date:me,minDate:O,maxDate:L})&&(N(me),Y(me))}},p=ne=>{V?.(ne),j(!1),I&&o(ue(A))},P=ne=>{z?.(ne),j(!0)},R=ne=>{q?.(ne),j(!0)},F=ne=>{ne.key==="Escape"&&j(!1),X?.(ne)},le=ne=>({...M?.(ne),selected:de(A).isSame(ne,"day"),onClick:fe=>{M?.(ne).onClick?.(fe);const me=oe&&de(A).isSame(ne,"day")?null:ne;N(me),!$&&me&&o(ue(me)),j(!1)}}),he=w.jsx(E.Input.ClearButton,{onClick:()=>{N(null),!$&&o(""),j(!1)},unstyled:U,...y}),pe=g&&!!A&&!re&&!m;return Le.useDidUpdate(()=>{A!==void 0&&!T&&o(ue(A))},[A]),Le.useClickOutside(()=>j(!1),void 0,[i.current,b.current]),w.jsxs(w.Fragment,{children:[w.jsx(E.Input.Wrapper,{...s,__staticSelector:"DateInput",ref:i,children:w.jsxs(E.Popover,{opened:T,trapFocus:!1,position:"bottom-start",disabled:re||m,withRoles:!1,unstyled:U,..._,children:[w.jsx(E.Popover.Target,{children:w.jsx(E.Input,{"data-dates-input":!0,"data-read-only":re||void 0,autoComplete:"off",ref:e,value:ce,onChange:l,onBlur:p,onFocus:P,onClick:R,onKeyDown:F,readOnly:re,rightSection:Z,__clearSection:he,__clearable:pe,...n,...ee,disabled:m,__staticSelector:"DateInput"})}),w.jsx(E.Popover.Dropdown,{onMouseDown:ne=>ne.preventDefault(),"data-dates-dropdown":!0,ref:b,children:w.jsx(wr,{__staticSelector:"DateInput",...K,classNames:W,styles:ae,unstyled:U,__preventFocus:!0,minDate:O,maxDate:L,locale:x,getDayProps:le,size:n.size,date:B,onDateChange:Y,getMonthControlProps:ne=>({selected:typeof A=="string"?un(ne,A):!1,...d?.(ne)}),getYearControlProps:ne=>({selected:typeof A=="string"?de(ne).isSame(A,"year"):!1,...u?.(ne)}),attributes:s.attributes})})]})}),w.jsx(Zo,{name:Q,form:J,value:A,type:"default"})]})});_r.classes={...E.Input.classes,...wr.classes},_r.displayName="@mantine/dates/DateInput";function ps(t){const e=Ze.c(47),{fields:r,onClose:n,queryKey:s,apiPath:c,steps:h,onCreated:a}=t,[g,y]=G.useState(0),[_,M]=G.useState(!1),[x,S]=G.useState(),{mutateAsync:D,isError:O,error:L,isPending:I}=qo(c,s),{mutateAsync:z,isPending:V}=on(c,s),q=I||V;let X;e[0]!==r?(X=new Set(r.filter(bu).map(vu)),e[0]=r,e[1]=X):X=e[1];let re;e[2]!==X?(re=[...X],e[2]=X,e[3]=re):re=e[3];const Q=re;let J;e[4]!==r?(J=r.reduce(yu,{}),e[4]=r,e[5]=J):J=e[5];let Z;e[6]!==r?(Z=r.filter(mu).reduce(gu,{}),e[6]=r,e[7]=Z):Z=e[7];let U;e[8]!==J||e[9]!==Z?(U={mode:"uncontrolled",initialValues:J,validate:Z},e[8]=J,e[9]=Z,e[10]=U):U=e[10];const W=On.useForm(U);let ae;e[11]!==W||e[12]!==x?(ae=function(i){const b=W.getValues();return i.conditional&&!i.conditional(b)?null:w.jsxs(G.Fragment,{children:[(i.type===void 0||i.type=="text")&&w.jsx(E.TextInput,{label:i.column.title,placeholder:i.placeholder??"",...W.getInputProps(i.id),type:i.id.includes("email")?"email":void 0,required:i.required},W.key(i.id)),i.type==="number"&&w.jsx(E.NumberInput,{decimalSeparator:",",label:i.column.title,placeholder:i.placeholder??"",...W.getInputProps(i.id),required:i.required},W.key(i.id)),i.type==="date"&&w.jsx(_r,{label:i.column.title,placeholder:i.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...W.getInputProps(i.id),required:i.required},W.key(i.id)),i.type==="boolean"&&w.jsx(E.Checkbox,{mt:"md",label:i.column.title,...W.getInputProps(i.id,{type:"checkbox"}),required:i.required},W.key(i.id)),i.type==="textarea"&&w.jsx(E.Textarea,{label:i.column.title,placeholder:i.placeholder??"",...W.getInputProps(i.id),minRows:3,autosize:!0,required:i.required},W.key(i.id)),i.type==="custom"&&i.render&&i.render({...W.getValues(),...x&&{id:x}},W.setValues,M,{error:W.getInputProps(i.id).error,required:i.required})]},i.id)},e[11]=W,e[12]=x,e[13]=ae):ae=e[13];const se=ae;let k;e[14]!==L?.message||e[15]!==L?.name||e[16]!==O?(k=O&&w.jsx(E.Alert,{variant:"outline",color:"red",title:L?.name??"Fehler aufgetreten",mb:"lg",children:L?.message??"Fehler aufgetreten"}),e[14]=L?.message,e[15]=L?.name,e[16]=O,e[17]=k):k=e[17];let C;e[18]!==g||e[19]!==D||e[20]!==W||e[21]!==O||e[22]!==n||e[23]!==a||e[24]!==x||e[25]!==Q.length||e[26]!==z?(C=W.onSubmit(async f=>{if(x)await z({...f,id:x});else{const i=await D(f);S(i.id),a?.(i.id)}Q.length&&g<Q.length-1?O||y(g+1):O||(W.setInitialValues(f),W.reset(),n())}),e[18]=g,e[19]=D,e[20]=W,e[21]=O,e[22]=n,e[23]=a,e[24]=x,e[25]=Q.length,e[26]=z,e[27]=C):C=e[27];let v;e[28]!==g||e[29]!==r||e[30]!==se||e[31]!==h||e[32]!==Q?(v=Q.length?w.jsx(E.Stepper,{active:g,size:"sm",children:Q.map(f=>w.jsx(E.Stepper.Step,{...h&&h[f-1]?{label:h[f-1].label}:{},children:r.filter(i=>i.step===f).map(i=>se(i))},f))}):r.map(f=>se(f)),e[28]=g,e[29]=r,e[30]=se,e[31]=h,e[32]=Q,e[33]=v):v=e[33];let d;e[34]!==g||e[35]!==_||e[36]!==q||e[37]!==n||e[38]!==Q.length?(d=!_&&w.jsxs(E.Group,{mt:"md",justify:"end",children:[w.jsx(E.Button,{onClick:()=>Q.length?g===0?n():y(g-1):n(),variant:"outline",children:Q.length?g===0?"Abbrechen":"Zurück":"Abbrechen"}),w.jsx(E.Button,{type:"submit",loading:q,children:Q.length?g===Q.length-1?"Speichern":"Weiter":"Speichern"})]}),e[34]=g,e[35]=_,e[36]=q,e[37]=n,e[38]=Q.length,e[39]=d):d=e[39];let u;e[40]!==d||e[41]!==C||e[42]!==v?(u=w.jsxs("form",{onSubmit:C,children:[v,d]}),e[40]=d,e[41]=C,e[42]=v,e[43]=u):u=e[43];let m;return e[44]!==u||e[45]!==k?(m=w.jsxs(w.Fragment,{children:[k,u]}),e[44]=u,e[45]=k,e[46]=m):m=e[46],m}function gu(t,e){return t[e.id]=(r,n)=>e.conditional&&!e.conditional(n)||r?null:"Pflichtfeld",t}function mu(t){return t.required}function yu(t,e){return t[e.id]=e.type==="boolean"?!1:e.defaultValue??"",t}function vu(t){return t.step}function bu(t){return typeof t.step=="number"}var[wu,hn]=E.createSafeContext("useDataTableColumnsContext must be used within DataTableColumnProvider"),gs=t=>{let{children:e,columnsOrder:r,setColumnsOrder:n,columnsToggle:s,setColumnsToggle:c,resetColumnsOrder:h,resetColumnsToggle:a,setColumnWidth:g,setMultipleColumnWidths:y,resetColumnsWidth:_}=t,[M,x]=G.useState(""),[S,D]=G.useState("");return w.jsx(wu,{value:{sourceColumn:M,setSourceColumn:x,targetColumn:S,setTargetColumn:D,columnsToggle:s,setColumnsToggle:c,swapColumns:()=>{if(!r||!n||!M||!S)return;let O=r.indexOf(M),L=r.indexOf(S);if(O!==-1&&L!==-1){let I=r.splice(O,1)[0];r.splice(L,0,I),n([...r])}},resetColumnsOrder:h,resetColumnsToggle:a,setColumnWidth:g,setMultipleColumnWidths:y,resetColumnsWidth:_},children:e})};function _u(){return w.jsx("tr",{className:"mantine-datatable-empty-row",children:w.jsx("td",{})})}function Cu(){return w.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74"}),w.jsx("path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6"}),w.jsx("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),w.jsx("path",{d:"M3 3l18 18"})]})}function xu({icon:t,text:e,active:r,children:n}){return w.jsx(E.Center,{className:"mantine-datatable-empty-state","data-active":r||void 0,children:n||w.jsxs(w.Fragment,{children:[t||w.jsx("div",{className:"mantine-datatable-empty-state-icon",children:w.jsx(Cu,{})}),w.jsx(E.Text,{component:"div",size:"sm",c:"dimmed",children:e})]})})}function Su({key:t,columns:e=[],getInitialValueInEffect:r=!0}){function n(M,x){let S=[];return M.forEach(D=>{x.find(O=>O.accessor===D)&&S.push(D)}),x.forEach(D=>{S.includes(D.accessor)||S.push(D.accessor)}),S}let s=e&&e.map(M=>M.accessor)||[],[c,h]=Le.useLocalStorage({key:t?`${t}-columns-order`:"",defaultValue:t?s:void 0,getInitialValueInEffect:r});function a(M){t&&h(M)}let g=()=>{a(s)};if(!t)return{columnsOrder:c,setColumnsOrder:a,resetColumnsOrder:g};let y=n(c,e),_=JSON.stringify(c);return JSON.stringify(y)!==_&&a(y),{columnsOrder:y,setColumnsOrder:a,resetColumnsOrder:g}}function Du({key:t,columns:e=[],getInitialValueInEffect:r=!0,headerRef:n,onFixedLayoutChange:s}){let c=G.useRef(!1),h=G.useRef({}),[a,g]=G.useState(!0),y=G.useMemo(()=>e.some(Z=>Z.resizable&&!Z.hidden&&Z.accessor!=="__selection__"),[e]),_=G.useMemo(()=>e.filter(Z=>Z.resizable&&!Z.hidden&&Z.accessor!=="__selection__"),[e]),M=G.useMemo(()=>_.some(Z=>Z.width===void 0||Z.width===""||Z.width==="initial"),[_]),x=G.useCallback(()=>e.filter(Z=>Z.accessor!=="__selection__").map(Z=>({[Z.accessor]:Z.width??"auto"})),[e]),[S,D]=Le.useLocalStorage({key:t?`${t}-columns-width`:"",defaultValue:t?x():void 0,getInitialValueInEffect:!1}),[O,L]=G.useState(()=>x());G.useEffect(()=>{g(!1)},[]);let I=G.useCallback(()=>{if(!n?.current||a)return{};let Z=n.current,U=Array.from(Z.querySelectorAll("th[data-accessor]")),W={};return U.forEach(ae=>{let se=ae.getAttribute("data-accessor");if(!se||se==="__selection__")return;let k=_.find(C=>C.accessor===se);if(k&&(k.width===void 0||k.width===""||k.width==="initial")){let C=ae.getBoundingClientRect();W[se]=Math.round(C.width)}}),W},[n,_,a]),z=G.useCallback(Z=>{let U=Z.filter(ae=>ae.accessor!=="__selection__"),W=O.map(ae=>{let se=Object.keys(ae)[0],k=U.find(C=>C.accessor===se);return k?{[se]:k.width}:ae});L(W),t&&D(W)},[O,t,D]),V=G.useCallback(Z=>{z(Z)},[z]),q=G.useCallback(()=>{if(!(!n?.current||!s||a))if(M)s(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{let Z=I();h.current={...h.current,...Z};let U=e.filter(W=>W.accessor!=="__selection__").map(W=>{let ae=W.accessor,se=S?.find(C=>Object.keys(C)[0]===ae);if(se&&se[ae]!=="auto")return{[ae]:se[ae]};let k=Z[ae];return k?{[ae]:`${k}px`}:{[ae]:W.width??"auto"}});L(U),setTimeout(()=>{s(!0),c.current=!0},10)})});else{let Z=e.filter(U=>U.accessor!=="__selection__").map(U=>({[U.accessor]:U.width??"auto"}));L(Z),s(!0),c.current=!0}},[n,s,a,M,I,e,S]),X=q;G.useEffect(()=>{if(!y||!s||a){s?.(!1);return}c.current=!1;let Z=setTimeout(()=>{q()},50);return()=>clearTimeout(Z)},[y,s,a,q]),G.useEffect(()=>{a||!t||!r||S&&S.length>0&&L(S)},[a,t,r,S]);let re=G.useCallback(()=>{t&&D(x()),h.current={},c.current=!1,s&&(s(!1),setTimeout(()=>{q()},10))},[t,D,x,s,q]),Q=G.useCallback((Z,U)=>{z([{accessor:Z,width:U}])},[z]),J=G.useMemo(()=>y?O.filter(Z=>{let U=Object.keys(Z)[0];return _.some(W=>W.accessor===U)}).every(Z=>{let U=Object.values(Z)[0];return U==="auto"||U==="initial"}):!1,[y,O,_]);return{columnsWidth:O,setColumnsWidth:z,setColumnWidth:Q,setMultipleColumnWidths:V,resetColumnsWidth:re,hasResizableColumns:y,allResizableWidthsInitial:J,measureAndSetColumnWidths:X}}function ku({key:t,columns:e=[],getInitialValueInEffect:r=!0}){function n(M,x){let S=[];return M.forEach(D=>{x.find(O=>O.accessor===D.accessor)&&S.push(D)}),x.forEach(D=>{S.find(O=>O.accessor===D.accessor)||S.push({accessor:D.accessor,defaultToggle:D.defaultToggle||!0,toggleable:D.toggleable,toggled:D.defaultToggle===void 0?!0:D.defaultToggle})}),S}let s=e&&e.map(M=>({accessor:M.accessor,defaultToggle:M.defaultToggle||!0,toggleable:M.toggleable,toggled:M.defaultToggle===void 0?!0:M.defaultToggle})),[c,h]=Le.useLocalStorage({key:t?`${t}-columns-toggle`:"",defaultValue:t?s:void 0,getInitialValueInEffect:r});function a(M){t&&h(M)}let g=()=>{a(s)};if(!t)return{columnsToggle:c,setColumnsToggle:a,resetColumnsToggle:g};let y=n(c,e),_=JSON.stringify(c);return JSON.stringify(y)!==_&&a(y),{columnsToggle:y,setColumnsToggle:a,resetColumnsToggle:g}}var Pu=({key:t,columns:e=[],getInitialValueInEffect:r=!0,headerRef:n,scrollViewportRef:s,onFixedLayoutChange:c})=>{let{columnsOrder:h,setColumnsOrder:a,resetColumnsOrder:g}=Su({key:t,columns:e,getInitialValueInEffect:r}),{columnsToggle:y,setColumnsToggle:_,resetColumnsToggle:M}=ku({key:t,columns:e,getInitialValueInEffect:r}),{columnsWidth:x,setColumnsWidth:S,setColumnWidth:D,setMultipleColumnWidths:O,resetColumnsWidth:L,hasResizableColumns:I,allResizableWidthsInitial:z,measureAndSetColumnWidths:V}=Du({key:t,columns:e,getInitialValueInEffect:r,headerRef:n,onFixedLayoutChange:c});return{effectiveColumns:G.useMemo(()=>h?h.map(q=>e.find(X=>X.accessor===q)).map(q=>({...q,hidden:q?.hidden||!y.find(X=>X.accessor===q?.accessor)?.toggled})).map(q=>q?.accessor==="__selection__"?q:{...q,width:x.find(X=>X[q?.accessor])?.[q?.accessor]}):e,[e,h,y,x]),setColumnsOrder:a,columnsOrder:h,resetColumnsOrder:g,columnsToggle:y,setColumnsToggle:_,resetColumnsToggle:M,columnsWidth:x,setColumnsWidth:S,setColumnWidth:D,setMultipleColumnWidths:O,resetColumnsWidth:L,hasResizableColumns:I,allResizableWidthsInitial:z,measureAndSetColumnWidths:V}},ms=typeof window<"u"?G.useLayoutEffect:G.useEffect;function ys(t){let e=G.useRef(t);return e.current=t,e}var vs="--mantine-datatable-header-height",bs="--mantine-datatable-footer-height",ws="--mantine-datatable-selection-column-width",_s="--mantine-datatable-last-row-border-bottom";function Xe(t,e,r){t?.style.setProperty(e,r)}function fn(t){let e=t.borderBoxSize?.[0]||t.contentBoxSize?.[0];return e?{width:e.inlineSize,height:e.blockSize}:{width:t.contentRect.width,height:t.contentRect.height}}function pn(t,e,r){if(t){let n=new ResizeObserver(s=>{let c=s[0];c&&e(fn(c))});return n.observe(t),()=>{n.disconnect(),r()}}}function Mu({scrollCallbacks:t,withRowBorders:e}){let r={root:G.useRef(null),table:G.useRef(null),scrollViewport:G.useRef(null),header:G.useRef(null),footer:G.useRef(null),selectionColumnHeader:G.useRef(null)},{root:n,table:s,scrollViewport:c,header:h,footer:a,selectionColumnHeader:g}=r,y=ys({withRowBorders:e}),_=ys(t),M=G.useRef(()=>{}),x=G.useRef(()=>{}),S=G.useCallback(D=>{_.current.onScroll?.(D),M.current()},[]);return G.useEffect(()=>pn(h.current,D=>{Xe(n.current,vs,`${D.height}px`)},()=>Xe(n.current,vs,"0")),[h.current]),G.useEffect(()=>pn(a.current,D=>{Xe(n.current,bs,`${D.height}px`)},()=>Xe(n.current,bs,"0")),[a.current]),G.useEffect(()=>pn(g.current,D=>{Xe(n.current,ws,`${D.width}px`)},()=>Xe(n.current,ws,"0")),[g.current]),ms(()=>{if(typeof window===void 0)return;let D={top:!0,bottom:!0,left:!0,right:!0},O={width:0,height:0},L={width:0,height:0};function I(re,Q){let J=D[re];return D[re]=Q,Xe(n.current,`--mantine-datatable-${re}-shadow-opacity`,Q?"0":"1"),J}function z(){let re=O.height-L.height,Q=re<0;Xe(n.current,"--mantine-datatable-footer-position",Q?"relative":"sticky"),Xe(n.current,"--mantine-datatable-footer-bottom",Q?`${re}px`:"0")}function V(){y.current.withRowBorders&&O.height<L.height?Xe(n.current,_s,`${E.rem("1px")} solid var(--mantine-datatable-border-color)`):Xe(n.current,_s,"unset")}x.current=V;function q(){let re=_.current,Q=c.current,J=Q?.scrollTop??0,Z=Q?.scrollLeft??0,U=J===0,W=O.height-J-L.height<1,ae=I("top",U),se=I("bottom",W);U&&U!==ae&&re.onScrollToTop?.(),W&&W!==se&&re.onScrollToBottom?.();let k=Q?getComputedStyle(Q).direction==="rtl":!1,C=(Q?.scrollWidth??0)-L.width,v,d;if(k){let f=Math.abs(Z);d=f<1,v=C-f<1}else v=Z<1,d=O.width-Z-L.width<1;let u=I("left",v),m=I("right",d);v&&v!==u&&re.onScrollToLeft?.(),d&&d!==m&&re.onScrollToRight?.()}M.current=q;let X=new ResizeObserver(re=>{for(let Q of re)switch(Q.target.tagName){case"TABLE":{O=fn(Q);break}case"DIV":{L=fn(Q);break}}q(),z(),V()});return X.observe(s.current),X.observe(c.current),()=>{X.disconnect()}},[]),ms(()=>{x.current()},[e]),{refs:r,onScroll:S}}function Ou(t){let[e,r]=G.useState(null),n=t?.join(":")||"";return G.useEffect(()=>{r(null)},[n]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function Au(t,e){let r=()=>{e(t.map(s=>s.matches))},n=t.map(s=>{try{return s.addEventListener("change",r),()=>s.removeEventListener("change",r)}catch{return s.addListener(r),()=>s.removeListener(r)}});return()=>{n.forEach(s=>s())}}function Eu(t,e){return e||(typeof window<"u"&&"matchMedia"in window?t.map(r=>window.matchMedia(r).matches):t.map(()=>!1))}function Tu(t,e,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[n,s]=G.useState(r?e:Eu(t,e)),c=G.useRef(null);return G.useEffect(()=>{if("matchMedia"in window)return c.current=t.map(h=>window.matchMedia(h)),s(c.current.map(h=>h.matches)),Au(c.current,h=>{s(h)})},[t]),n}function ju(t){let e=E.useMantineTheme(),r=G.useMemo(()=>t.map(s=>(typeof s=="function"?s(e):s)??""),[t,e]),n=G.useMemo(()=>t.map(()=>!0),[t]);return Tu(r,n)}function Cr(t){let e=E.useMantineTheme(),r=typeof t=="function"?t(e):t;return Le.useMediaQuery(r||"",!0)}function gn(t){let e=t.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function $u(t,e,r){return t.filter(n=>!e.map(r).includes(r(n)))}function mn(t,e){return t.filter((r,n,s)=>n===s.findIndex(c=>e(r)===e(c)))}function Cs(t,e){return e?e.match(/([^[.\]])+/g).reduce((r,n)=>r&&r[n],t):void 0}function Ie(t,e){return typeof e=="string"?Cs(t,e):e(t)}function xs(t){return!t||t.length===0?0:Math.max(...t.map(e=>e.groups&&e.groups.length>0?1+xs(e.groups):1))}function yn(t){let e=[];for(let r of t)r.columns&&r.columns.length>0?e.push(...r.columns.filter(n=>n!=null)):r.groups&&r.groups.length>0&&e.push(...yn(r.groups));return e.filter(r=>r!=null)}function vn(t,e){return t.columns&&t.columns.length>0?t.columns.filter((r,n)=>r.hidden?!1:e?e[n]!==!1:!0).length:t.groups&&t.groups.length>0?t.groups.reduce((r,n)=>r+vn(n,e),0):0}function Ss(t,e,r=0){if(r===e)return[...t];let n=[];for(let s of t)s.groups&&s.groups.length>0&&n.push(...Ss(s.groups,e,r+1));return n}function Ru(t,e,r){return r?!t||e:!1}function Nu({rowExpansion:t,records:e,idAccessor:r}){let n=[];if(t&&e){let{trigger:a,allowMultiple:g,initiallyExpanded:y}=t;e&&a==="always"?n=e.map(_=>Ie(_,r)):y&&(n=e.filter((_,M)=>y({record:_,index:M})).map(_=>Ie(_,r)),g||(n=[n[0]]))}let s,c,h=G.useState(n);if(t){let{expandable:a,trigger:g,allowMultiple:y,collapseProps:_,content:M}=t;t.expanded?{recordIds:s,onRecordIdsChange:c}=t.expanded:[s,c]=h;let x=S=>c?.(s.filter(D=>D!==Ie(S,r)));return{expandOnClick:g!=="always"&&g!=="never",isRowExpanded:S=>g==="always"?!0:s.includes(Ie(S,r)),isExpandable:({record:S,index:D})=>a?a({record:S,index:D}):!0,expandRow:S=>{let D=Ie(S,r);c?.(y?[...s,D]:[D])},collapseRow:x,collapseProps:_,content:({record:S,index:D})=>()=>M({record:S,index:D,collapse:()=>x(S)})}}}function Lu(t,e){let[r,n]=G.useState(t),[s,c]=G.useState(t),h=Le.useTimeout(()=>n(!0),0),a=Le.useTimeout(()=>c(!1),e||200);return G.useEffect(()=>{t?(a.clear(),c(!0),h.start()):(h.clear(),n(!1),a.start())},[h,a,t]),{expanded:r,visible:s}}var bn="mantine-datatable-nowrap",wn="mantine-datatable-ellipsis",Mt="mantine-datatable-pointer-cursor",Ds="mantine-datatable-context-menu-cursor",Bu="mantine-datatable-text-selection-disabled",xr="mantine-datatable-text-align-left",Sr="mantine-datatable-text-align-center",Dr="mantine-datatable-text-align-right";function Iu({className:t,style:e,visibleMediaQuery:r,title:n,noWrap:s,ellipsis:c,textAlign:h,width:a}){return Cr(r)?w.jsx(E.TableTh,{className:Pe({[bn]:s||c,[wn]:c,[xr]:h==="left",[Sr]:h==="center",[Dr]:h==="right"},t),style:[{width:a,minWidth:a,maxWidth:a},e],children:n}):null}function Yu({shadowVisible:t}){return w.jsx(E.TableTh,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":t||void 0})}function zu({className:t,style:e,columns:r,defaultColumnProps:n,selectionVisible:s,selectorCellShadowVisible:c,ref:h}){return w.jsx(E.TableTfoot,{ref:h,className:Pe("mantine-datatable-footer",t),style:e,children:w.jsxs(E.TableTr,{children:[s&&w.jsx(Yu,{shadowVisible:c}),r.map(({hidden:a,...g})=>{if(a)return null;let{accessor:y,visibleMediaQuery:_,textAlign:M,width:x,footer:S,footerClassName:D,footerStyle:O,noWrap:L,ellipsis:I}={...n,...g};return w.jsx(Iu,{className:D,style:O,visibleMediaQuery:_,textAlign:M,width:x,title:S,noWrap:L,ellipsis:I},y)})]})})}function Fu({group:{id:t,columns:e,groups:r,title:n,textAlign:s,className:c,style:h},maxDepth:a,currentDepth:g,previousGroups:y,isLastGroup:_,withColumnBorders:M=!1,totalTableColumns:x}){let S=G.useMemo(()=>e&&e.length>0?e:r&&r.length>0?yn([{id:t,columns:e,groups:r}]):[],[e,r,t]),D=G.useMemo(()=>S.map(({visibleMediaQuery:X})=>X),[S]),O=ju(D),L=G.useMemo(()=>vn({columns:e,groups:r},O),[t,e,r,O]),I=G.useMemo(()=>y.reduce((X,re)=>X+vn(re,O),0),[y,O]),z=r&&r.length>0?1:a-g,V=I+L<x,q=Ru(_,V,M);return L>0?w.jsx(E.TableTh,{colSpan:L,rowSpan:z>1?z:void 0,className:Pe("mantine-datatable-column-group-header-cell",{[xr]:s==="left",[Sr]:s==="center",[Dr]:s==="right","mantine-datatable-column-group-header-cell--needs-border":q},c),style:h,children:n??gn(t)}):null}function Wu(){return w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"})]})}function Uu(){return w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",strokeWidth:"0",fill:"currentColor"})]})}function qu({children:t,isActive:e,filterPopoverProps:r,filterPopoverDisableClickOutside:n}){let[s,{close:c,toggle:h}]=Le.useDisclosure(!1),a=e?Uu:Wu,g=Le.useClickOutside(c);return n&&(g=void 0),w.jsxs(E.Popover,{withArrow:!0,shadow:"md",opened:s,onClose:c,trapFocus:!0,...r,children:[w.jsx(E.PopoverTarget,{children:w.jsx(E.ActionIcon,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":e||void 0,size:"sm",variant:"default",onClick:y=>{y.preventDefault(),h()},onKeyDown:y=>y.stopPropagation(),children:w.jsx(a,{})})}),w.jsx(E.PopoverDropdown,{ref:g,onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),children:typeof t=="function"?t({close:c}):t})]})}var Vu=t=>{let{accessor:e,columnRef:r}=t,[n,s]=G.useState(!1),c=G.useRef(0),h=G.useRef({current:0,next:0}),{dir:a}=E.useDirection(),g=a==="rtl",{setMultipleColumnWidths:y}=hn(),_=G.useCallback(x=>{if(x.preventDefault(),x.stopPropagation(),!r.current)return;let S=r.current,D=S.nextElementSibling;for(;D;){let X=D.getAttribute("data-accessor");if(X&&X!=="__selection__")break;D=D.nextElementSibling}if(!D)return;let O=D.getAttribute("data-accessor");if(!O)return;let L=O==="__selection__";s(!0),c.current=x.clientX;let I=S.offsetWidth,z=D.offsetWidth;h.current={current:I,next:z};let V=X=>{if(!r.current)return;let re=r.current,Q=re.nextElementSibling;if(!Q)return;let J=X.clientX-c.current;g&&(J=-J);let Z=50,U=h.current.current-Z,W=h.current.next-Z,ae=Math.max(-U,Math.min(J,W)),se=h.current.current+ae,k=h.current.next-ae;re.style.width=`${se}px`,Q.style.width=`${k}px`,re.style.minWidth=`${se}px`,re.style.maxWidth=`${se}px`,Q.style.minWidth=`${k}px`,Q.style.maxWidth=`${k}px`},q=()=>{if(!r.current)return;let X=r.current,re=X.nextElementSibling;s(!1),document.body.style.cursor="initial",document.body.style.userSelect="initial";let Q=parseInt(X.style.width)||X.offsetWidth,J=re?parseInt(re.style.width)||re.offsetWidth:0,Z=[{accessor:e,width:`${Q}px`}];if(re&&!L){let U=re.getAttribute("data-accessor");U&&Z.push({accessor:U,width:`${J}px`})}setTimeout(()=>{y(Z)},0),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",q)};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",V),document.addEventListener("mouseup",q)},[e,r,g,y]),M=G.useCallback(()=>{if(!r.current)return;let x=r.current,S=x.nextElementSibling;x.style.width="",x.style.minWidth="",x.style.maxWidth="";let D=[{accessor:e,width:"auto"}];if(S){S.style.width="",S.style.minWidth="",S.style.maxWidth="";let O=S.getAttribute("data-accessor");O&&O!=="__selection__"&&D.push({accessor:O,width:"auto"})}setTimeout(()=>{y(D)},0)},[e,r,y]);return w.jsx("div",{className:"mantine-datatable-header-resizable-handle",style:{cursor:n?"col-resize":void 0},onMouseDown:_,onDoubleClick:M,onClick:x=>x.stopPropagation(),title:"Drag to resize column, double-click to reset"})};function Hu(){return w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M12 5l0 14"}),w.jsx("path",{d:"M16 9l-4 -4"}),w.jsx("path",{d:"M8 9l4 -4"})]})}function Gu(){return w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M8 7l4 -4l4 4"}),w.jsx("path",{d:"M8 17l4 4l4 -4"}),w.jsx("path",{d:"M12 3l0 18"})]})}function Qu(){return w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),w.jsx("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),w.jsx("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),w.jsx("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),w.jsx("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),w.jsx("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}function Zu(){return w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M18 6l-12 12"}),w.jsx("path",{d:"M6 6l12 12"})]})}function Ku({className:t,style:e,accessor:r,visibleMediaQuery:n,title:s,sortable:c,draggable:h,toggleable:a,resizable:g,sortIcons:y,textAlign:_,width:M,sortStatus:x,onSortStatusChange:S,filter:D,filterPopoverProps:O,filterPopoverDisableClickOutside:L,filtering:I,sortKey:z}){let{setSourceColumn:V,setTargetColumn:q,swapColumns:X,setColumnsToggle:re}=hn(),[Q,J]=G.useState(!1),Z=G.useRef(null);if(!Cr(n))return null;let U=s??gn(r),W=typeof U=="string"?U:void 0,ae=c&&S?m=>{m?.defaultPrevented||S({sortKey:z,columnAccessor:r,direction:x?.columnAccessor===r?x.direction==="asc"?"desc":"asc":x?.direction??"asc"})}:void 0,se=m=>{m.stopPropagation(),V(r),J(!1)},k=m=>{m.preventDefault(),q(r),J(!0)},C=()=>{q(r),J(!1),X()},v=()=>{J(!0)},d=()=>{J(!1)},u=m=>{m.stopPropagation(),re(f=>f.map(i=>i.accessor===r?{...i,toggled:!1}:i))};return w.jsxs(E.TableTh,{"data-accessor":r,className:Pe({"mantine-datatable-header-cell-sortable":c,"mantine-datatable-header-cell-toggleable":a,"mantine-datatable-header-cell-resizable":g},t),style:[{width:M,...g?{}:{minWidth:M,maxWidth:M}},e],role:c?"button":void 0,tabIndex:c?0:void 0,onClick:ae,onKeyDown:m=>m.key==="Enter"&&ae?.(),ref:Z,children:[w.jsxs(E.Group,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[w.jsxs(E.Flex,{align:"center",w:"100%",className:Pe({"mantine-datatable-header-cell-draggable":h,"mantine-datatable-header-cell-drag-over":Q}),draggable:h,onDragStart:h?se:void 0,onDragEnter:h?v:void 0,onDragOver:h?k:void 0,onDrop:h?C:void 0,onDragLeave:h?d:void 0,children:[h?w.jsx(E.Center,{role:"img","aria-label":"Drag column",children:w.jsx(E.ActionIcon,{className:"mantine-datatable-header-cell-draggable-action-icon",variant:"subtle",size:"xs",onClick:m=>{m.stopPropagation()},children:w.jsx(Qu,{})})}):null,w.jsx(E.Box,{className:Pe("mantine-datatable-header-cell-sortable-text",{[xr]:_==="left",[Sr]:_==="center",[Dr]:_==="right"},bn,wn),title:W,children:U})]}),a?w.jsx(E.Center,{className:"mantine-datatable-header-cell-toggleable-icon",role:"img","aria-label":"Toggle column",children:w.jsx(E.ActionIcon,{size:"xs",variant:"light",onClick:u,children:w.jsx(Zu,{})})}):null,c||x?.columnAccessor===r?w.jsx(w.Fragment,{children:x?.columnAccessor===r?w.jsx(E.Center,{className:Pe("mantine-datatable-header-cell-sortable-icon",{"mantine-datatable-header-cell-sortable-icon-reversed":x.direction==="desc"}),role:"img","aria-label":`Sorted ${x.direction==="desc"?"descending":"ascending"}`,children:y?.sorted||w.jsx(Hu,{})}):w.jsx(E.Center,{className:"mantine-datatable-header-cell-sortable-unsorted-icon",role:"img","aria-label":"Not sorted",children:y?.unsorted||w.jsx(Gu,{})})}):null,D?w.jsx(qu,{filterPopoverProps:O,isActive:!!I,filterPopoverDisableClickOutside:L,children:D}):null]}),g&&r!=="__selection__"?w.jsx(Vu,{accessor:r,columnRef:Z}):null]})}function Ju({className:t,style:e,trigger:r,shadowVisible:n,checked:s,indeterminate:c,checkboxProps:h,onChange:a,rowSpan:g,ref:y}){let _=!h.disabled;return w.jsx(E.TableTh,{ref:y,className:Pe("mantine-datatable-header-selector-cell",{[Mt]:r==="cell"&&_},t),style:e,rowSpan:g,"data-shadow-visible":n||void 0,"data-accessor":"__selection__",onClick:r==="cell"&&_?a:void 0,children:w.jsx(E.Checkbox,{classNames:_?{input:Mt}:void 0,checked:s,indeterminate:c,onChange:a,...h,disabled:!(a||h.onChange)||h.disabled})})}function Xu({selectionColumnHeaderRef:t,className:e,style:r,sortStatus:n,sortIcons:s,onSortStatusChange:c,columns:h,defaultColumnProps:a,groups:g,selectionTrigger:y,selectionVisible:_,selectionChecked:M,selectionIndeterminate:x,onSelectionChange:S,selectionCheckboxProps:D,selectorCellShadowVisible:O,selectionColumnClassName:L,selectionColumnStyle:I,withColumnBorders:z=!1,ref:V}){let q=g?xs(g):0,X=q>0?q+1:1,re=_?w.jsx(Ju,{ref:t,className:L,style:I,trigger:y,shadowVisible:O,checked:M,indeterminate:x,checkboxProps:D,onChange:S,rowSpan:g?X:void 0}):null,{columnsToggle:Q,setColumnsToggle:J}=hn(),[Z,U]=G.useState(!1),W=h.some(k=>k.toggleable),ae=W?Object.fromEntries(h.map(({accessor:k,title:C})=>[k,C??gn(String(k))])):void 0,se=w.jsxs(E.TableThead,{className:Pe("mantine-datatable-header",e),style:r,ref:V,onContextMenu:W?k=>{k.preventDefault(),U(C=>!C)}:void 0,children:[g&&Array.from({length:q},(k,C)=>{let v=Ss(g,C);return w.jsxs(E.TableTr,{children:[C===0&&re,v.map((d,u)=>w.jsx(Fu,{group:d,maxDepth:q,currentDepth:C,previousGroups:v.slice(0,u),isLastGroup:u===v.length-1,withColumnBorders:z,totalTableColumns:h.length},d.id))]},`group-depth-${C}`)}),w.jsxs(E.TableTr,{children:[!g&&re,h.map(({hidden:k,...C},v)=>{if(k)return null;let{accessor:d,visibleMediaQuery:u,textAlign:m,width:f,title:i,sortable:b,draggable:T,toggleable:j,resizable:K,titleClassName:ee,titleStyle:te,filter:H,filterPopoverProps:ie,filterPopoverDisableClickOutside:oe,filtering:ue,sortKey:A}={...a,...C};return w.jsx(Ku,{accessor:d,className:ee,style:te,visibleMediaQuery:u,textAlign:m,width:f,title:i,sortable:b,draggable:T,toggleable:j,resizable:K&&v<h.length-1,sortStatus:n,sortIcons:s,sortKey:A,onSortStatusChange:c,filter:H,filterPopoverProps:ie,filterPopoverDisableClickOutside:oe,filtering:ue},d)})]})]});return W?w.jsxs(E.Popover,{position:"bottom",withArrow:!0,shadow:"md",opened:Z,onChange:U,children:[w.jsx(E.PopoverTarget,{children:se}),w.jsx(E.PopoverDropdown,{children:w.jsx(E.Stack,{children:Q.filter(k=>k.toggleable).map(k=>w.jsx(E.Group,{children:w.jsx(E.Checkbox,{classNames:{label:"mantine-datatable-header-column-toggle-checkbox-label"},size:"xs",label:ae[k.accessor],checked:k.toggled,onChange:C=>{J(Q.map(v=>v.accessor===k.accessor?{...v,toggled:C.currentTarget.checked}:v))}})},k.accessor))})})]}):se}function ec({fetching:t,customContent:e,backgroundBlur:r,size:n,type:s,color:c}){return w.jsx(E.Center,{className:Pe("mantine-datatable-loader",{"mantine-datatable-loader-fetching":t}),style:[{backdropFilter:r?`blur(${r}px)`:void 0}],children:t&&(e||w.jsx(E.Loader,{size:n,type:s,color:c}))})}function Ae(t,e,r){return t?E.parseThemeColor({color:typeof t=="object"?t[r]:t,theme:e}).value:void 0}function tc({theme:t,c:e,backgroundColor:r,borderColor:n,rowBorderColor:s,stripedColor:c,highlightOnHoverColor:h}){return{"--mantine-datatable-color-light":Ae(e,t,"light"),"--mantine-datatable-color-dark":Ae(e,t,"dark"),"--mantine-datatable-background-color-light":Ae(r,t,"light"),"--mantine-datatable-background-color-dark":Ae(r,t,"dark"),"--mantine-datatable-border-color-light":Ae(n,t,"light"),"--mantine-datatable-border-color-dark":Ae(n,t,"dark"),"--mantine-datatable-row-border-color-light":Ae(s,t,"light"),"--mantine-datatable-row-border-color-dark":Ae(s,t,"dark"),"--mantine-datatable-striped-color-light":Ae(c,t,"light"),"--mantine-datatable-striped-color-dark":Ae(c,t,"dark"),"--mantine-datatable-highlight-on-hover-color-light":Ae(h,t,"light"),"--mantine-datatable-highlight-on-hover-color-dark":Ae(h,t,"dark")}}function ks({theme:t,paginationActiveTextColor:e,paginationActiveBackgroundColor:r}){return{"--mantine-datatable-pagination-active-text-color-light":Ae(e,t,"light"),"--mantine-datatable-pagination-active-text-color-dark":Ae(e,t,"dark"),"--mantine-datatable-pagination-active-background-color-light":Ae(r,t,"light"),"--mantine-datatable-pagination-active-background-color-dark":Ae(r,t,"dark")}}function rc({theme:t,color:e,backgroundColor:r}){return{"--mantine-datatable-row-color-light":Ae(e,t,"light"),"--mantine-datatable-row-color-dark":Ae(e,t,"dark"),"--mantine-datatable-row-background-color-light":Ae(r,t,"light"),"--mantine-datatable-row-background-color-dark":Ae(r,t,"dark")}}function nc(){return w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),w.jsx("path",{d:"M8 9l4 -4l4 4"}),w.jsx("path",{d:"M16 15l-4 4l-4 -4"})]})}var Ps={xs:E.rem(22),sm:E.rem(26),md:E.rem(32),lg:E.rem(38),xl:E.rem(44)};function oc({size:t,label:e,values:r,value:n,activeTextColor:s,activeBackgroundColor:c,onChange:h}){return w.jsxs(E.Group,{gap:"xs",children:[w.jsx(E.Text,{component:"div",size:t,children:e}),w.jsxs(E.Menu,{withinPortal:!0,withArrow:!0,offset:2,classNames:{arrow:"mantine-datatable-page-size-selector-menu-arrow"},children:[w.jsx(E.MenuTarget,{children:w.jsx(E.Button,{size:t,variant:"default",classNames:{section:"mantine-datatable-page-size-selector-button-icon"},rightSection:w.jsx(nc,{}),style:[{fontWeight:"normal"},a=>({height:Ps[t],paddingLeft:a.spacing[t],paddingRight:a.spacing[t]})],children:n})}),w.jsx(E.MenuDropdown,{children:r.map(a=>{let g=a===n;return w.jsx(E.MenuItem,{className:Pe({"mantine-datatable-page-size-selector-active":g}),style:[{height:Ps[t]},g&&(s||c)?y=>ks({theme:y,paginationActiveTextColor:s,paginationActiveBackgroundColor:c}):void 0],disabled:g,onClick:()=>h(a),children:w.jsx(E.Text,{component:"div",size:t,children:a})},a)})})]})]})}function sc({className:t,style:e,fetching:r,page:n,onPageChange:s,paginationWithEdges:c,paginationWithControls:h,paginationActiveTextColor:a,paginationActiveBackgroundColor:g,paginationSize:y,loadingText:_,noRecordsText:M,paginationText:x,totalRecords:S,recordsPerPage:D,onRecordsPerPageChange:O,recordsPerPageLabel:L,recordsPerPageOptions:I,recordsLength:z,horizontalSpacing:V,paginationWrapBreakpoint:q,getPaginationControlProps:X,getPaginationItemProps:re,renderPagination:Q}){let J;if(S){let C=(n-1)*D+1,v=C+(z||0)-1;J=x({from:C,to:v,totalRecords:S})}else J=r?_:M;let Z=S&&D?Math.max(1,Math.ceil(S/D)):1,U=S?(n-1)*(D??0)+1:void 0,W=S?(U??1)+(z??0)-1:void 0,ae=!Cr(({breakpoints:C})=>`(min-width: ${typeof q=="number"?`${E.rem(q)}rem`:C[q]||q})`),se={Text:C=>w.jsx(E.Text,{component:"div",className:"mantine-datatable-pagination-text",size:y,...C,children:J}),PageSizeSelector:C=>I?w.jsx(oc,{activeTextColor:a,activeBackgroundColor:g,size:y,label:L,values:I,value:D,onChange:O,...C}):w.jsx(w.Fragment,{}),Pagination:C=>w.jsx(E.Pagination,{classNames:{root:Pe("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":r||!z}),control:"mantine-datatable-pagination-pages-control"},style:a||g?v=>ks({theme:v,paginationActiveTextColor:a,paginationActiveBackgroundColor:g}):void 0,withEdges:c,withControls:h,value:n,onChange:s,size:y,total:Z,getControlProps:X,getItemProps:re,...C})},k={state:{paginationSize:y,page:n,totalPages:Z,totalRecords:S,recordsPerPage:D,recordsLength:z,fetching:r,from:U,to:W,isWrapped:ae},actions:{setPage:C=>s?.(C),setRecordsPerPage:O?C=>O(C):void 0},Controls:se};return w.jsx(E.Box,{px:V??"xs",py:"xs",className:Pe("mantine-datatable-pagination",t),style:[{flexDirection:ae?"column":"row"},e],children:typeof Q=="function"?Q(k):w.jsxs(w.Fragment,{children:[w.jsx(se.Text,{}),w.jsx(se.PageSizeSelector,{}),w.jsx(se.Pagination,{})]})})}function ic({className:t,style:e,visibleMediaQuery:r,record:n,index:s,onClick:c,onDoubleClick:h,onContextMenu:a,noWrap:g,ellipsis:y,textAlign:_,width:M,accessor:x,render:S,defaultRender:D,customCellAttributes:O}){return Cr(r)?w.jsx(E.TableTd,{className:Pe({[bn]:g||y,[wn]:y,[Mt]:c||h,[Ds]:a,[xr]:_==="left",[Sr]:_==="center",[Dr]:_==="right"},t),style:[{width:M,minWidth:M,maxWidth:M},e],onClick:c,onDoubleClick:h,onContextMenu:a,...O?.(n,s),children:S?S(n,s):D?D(n,s,x):Cs(n,x)}):null}function ac({open:t,colSpan:e,content:r,collapseProps:n}){let{expanded:s,visible:c}=Lu(t,n?.transitionDuration);return c?w.jsxs(w.Fragment,{children:[w.jsx(E.TableTr,{}),w.jsx(E.TableTr,{children:w.jsx(E.TableTd,{className:"mantine-datatable-row-expansion-cell",colSpan:e,children:w.jsx(E.Collapse,{in:s,...n,children:w.jsx("div",{className:"mantine-datatable-row-expansion-cell-content",children:r()})})})})]}):null}function lc({className:t,style:e,record:r,index:n,trigger:s,onChange:c,withRightShadow:h,checkboxProps:a,getCheckboxProps:g,...y}){let _={...a,...g(r,n)},M=!y.disabled&&!_.disabled,x=S=>{S.stopPropagation(),s==="cell"&&M&&c?.(S)};return w.jsx(E.TableTd,{className:Pe("mantine-datatable-row-selector-cell",{[Mt]:s==="cell"&&M},t),style:e,"data-shadow-visible":h||void 0,onClick:x,children:w.jsx(E.Checkbox,{classNames:M?{input:Mt}:void 0,onChange:c,...y,..._})})}function uc({record:t,index:e,columns:r,defaultColumnProps:n,defaultColumnRender:s,selectionTrigger:c,selectionVisible:h,selectionChecked:a,onSelectionChange:g,isRecordSelectable:y,selectionCheckboxProps:_,getSelectionCheckboxProps:M,onClick:x,onDoubleClick:S,onContextMenu:D,onCellClick:O,onCellDoubleClick:L,onCellContextMenu:I,expansion:z,customAttributes:V,color:q,backgroundColor:X,className:re,style:Q,selectorCellShadowVisible:J,selectionColumnClassName:Z,selectionColumnStyle:U,rowFactory:W}){let ae=w.jsxs(w.Fragment,{children:[h&&w.jsx(lc,{className:Z,style:U,record:t,index:e,trigger:c,withRightShadow:J,checked:a,disabled:!g||(y?!y(t,e):!1),onChange:g,checkboxProps:_,getCheckboxProps:M}),r.map(({hidden:C,hiddenContent:v,...d},u)=>{if(C||v)return null;let{accessor:m,visibleMediaQuery:f,textAlign:i,noWrap:b,ellipsis:T,width:j,render:K,cellsClassName:ee,cellsStyle:te,customCellAttributes:H}={...n,...d};return w.jsx(ic,{className:typeof ee=="function"?ee(t,e):ee,style:te?.(t,e),visibleMediaQuery:f,record:t,index:e,onClick:O?ie=>O({event:ie,record:t,index:e,column:d,columnIndex:u}):void 0,onDoubleClick:L?ie=>L({event:ie,record:t,index:e,column:d,columnIndex:u}):void 0,onContextMenu:I?ie=>I({event:ie,record:t,index:e,column:d,columnIndex:u}):void 0,accessor:m,textAlign:i,noWrap:b,ellipsis:T,width:j,render:K,defaultRender:s,customCellAttributes:H},m)})]}),se=z&&w.jsx(ac,{colSpan:r.filter(({hidden:C})=>!C).length+(h?1:0),open:z.isRowExpanded(t),content:z.content({record:t,index:e}),collapseProps:z.collapseProps}),k=cc({record:t,index:e,selectionChecked:a,onClick:x,onDoubleClick:S,onContextMenu:D,expansion:z,customAttributes:V,color:q,backgroundColor:X,className:re,style:Q});return W?W({record:t,index:e,rowProps:k,children:ae,expandedElement:se}):w.jsxs(w.Fragment,{children:[w.jsx(E.TableTr,{...k,children:ae}),se]})}function cc({record:t,index:e,selectionChecked:r,onClick:n,onDoubleClick:s,onContextMenu:c,expansion:h,customAttributes:a,color:g,backgroundColor:y,className:_,style:M}){return{className:Pe("mantine-datatable-row",{[Mt]:n||s||h?.isExpandable({record:t,index:e})&&h?.expandOnClick},{[Ds]:c},typeof _=="function"?_(t,e):_),"data-selected":r||void 0,onClick:x=>{if(h){let{isExpandable:S,isRowExpanded:D,expandOnClick:O,expandRow:L,collapseRow:I}=h;S({record:t,index:e})&&O&&(D(t)?I(t):L(t))}n?.({event:x,record:t,index:e})},onDoubleClick:s?x=>s({event:x,record:t,index:e}):void 0,onContextMenu:c?x=>c({event:x,record:t,index:e}):void 0,style:[g||y?x=>{let S=g?.(t,e),D=y?.(t,e);return rc({theme:x,color:S,backgroundColor:D})}:void 0,M?.(t,e)],...a?.(t,e)??{}}}function dc({leftShadowBehind:t,rightShadowBehind:e,onScrollPositionChange:r,children:n,viewportRef:s,scrollAreaProps:c}){return w.jsxs(E.ScrollArea,{...c,viewportRef:s,classNames:{root:"mantine-datatable-scroll-area",scrollbar:"mantine-datatable-scroll-area-scrollbar",thumb:"mantine-datatable-scroll-area-thumb",corner:"mantine-datatable-scroll-area-corner"},onScrollPositionChange:r,children:[n,w.jsx(E.Box,{className:Pe("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow")}),w.jsx("div",{className:Pe("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-behind":t})}),w.jsx("div",{className:Pe("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-behind":e})}),w.jsx(E.Box,{className:Pe("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow")})]})}function hc({withTableBorder:t,borderRadius:e,textSelectionDisabled:r,height:n="100%",minHeight:s,maxHeight:c,shadow:h,verticalAlign:a="center",fetching:g,columns:y,storeColumnsKey:_,groups:M,pinFirstColumn:x,pinLastColumn:S,defaultColumnProps:D,defaultColumnRender:O,idAccessor:L="id",records:I,selectionTrigger:z="checkbox",selectedRecords:V,onSelectedRecordsChange:q,selectionColumnClassName:X,selectionColumnStyle:re,isRecordSelectable:Q,selectionCheckboxProps:J,allRecordsSelectionCheckboxProps:Z={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:U=(rt,Vt)=>({"aria-label":`Select record ${Vt+1}`}),sortStatus:W,sortIcons:ae,onSortStatusChange:se,horizontalSpacing:k,page:C,onPageChange:v,totalRecords:d,recordsPerPage:u,onRecordsPerPageChange:m,recordsPerPageOptions:f,recordsPerPageLabel:i="Records per page",paginationWithEdges:b,paginationWithControls:T,paginationActiveTextColor:j,paginationActiveBackgroundColor:K,paginationSize:ee="sm",paginationText:te=({from:rt,to:Vt,totalRecords:Cn})=>`${rt} - ${Vt} / ${Cn}`,paginationWrapBreakpoint:H="sm",getPaginationControlProps:ie=rt=>rt==="previous"?{"aria-label":"Previous page"}:rt==="next"?{"aria-label":"Next page"}:{},getPaginationItemProps:oe,renderPagination:ue,loaderBackgroundBlur:A,customLoader:N,loaderSize:$,loaderType:B,loaderColor:Y,loadingText:ce="...",emptyState:o,noRecordsText:l="No records",noRecordsIcon:p,highlightOnHover:P,striped:R,noHeader:F,onRowClick:le,onRowDoubleClick:he,onRowContextMenu:pe,onCellClick:ne,onCellDoubleClick:fe,onCellContextMenu:me,onScroll:ge,onScrollToTop:Se,onScrollToBottom:_e,onScrollToLeft:Ce,onScrollToRight:ze,c:Ee,backgroundColor:xe,borderColor:nt,rowBorderColor:je,stripedColor:Ve,highlightOnHoverColor:Ye,rowColor:et,rowBackgroundColor:ot,rowExpansion:$e,rowClassName:pt,rowStyle:wt,customRowAttributes:He,scrollViewportRef:Ge,scrollAreaProps:Qe,tableRef:st,bodyRef:gt,m:mt,my:ve,mx:De,mt:Fe,mb:at,ml:Me,mr:Oe,className:_t,classNames:Te,style:ke,styles:Ne,rowFactory:tt,tableWrapper:yt,..._n}){let rt=G.useMemo(()=>M?yn(M):y,[y,M]),[Vt,Cn]=G.useState(!1),{refs:it,onScroll:jc}=Mu({scrollCallbacks:{onScroll:ge,onScrollToTop:Se,onScrollToBottom:_e,onScrollToLeft:Ce,onScrollToRight:ze},withRowBorders:_n.withRowBorders}),xn=Pu({key:_,columns:rt,headerRef:it.header,scrollViewportRef:it.scrollViewport,onFixedLayoutChange:Cn}),$c=Le.useMergedRef(it.table,st),Rc=Le.useMergedRef(it.scrollViewport,Ge),Nc=Nu({rowExpansion:$e,records:I,idAccessor:L}),kr=G.useRef(!1),$s=G.useRef(C),Sn=G.useRef(I),Lc=G.useCallback(be=>{kr.current=!0,Sn.current=I,v(be)},[v,I]);G.useEffect(()=>{$s.current!==C&&(kr.current=!0,Sn.current=I,$s.current=C)},[C,I]);let Pr=I?.length;G.useLayoutEffect(()=>{if(!kr.current||g||I===Sn.current)return;let be=it.scrollViewport.current;if(!be)return;let Ct=requestAnimationFrame(()=>{be.scrollTo({top:0,left:0}),kr.current=!1});return()=>cancelAnimationFrame(Ct)},[g,I,it.scrollViewport]);let Rs=I?.map(be=>Ie(be,L)),Ot=!!V,Ht=V?.map(be=>Ie(be,L)),Ns=Rs!==void 0&&Ht!==void 0&&Ht.length>0,Dn=Q?I?.filter(Q):I,Mr=Dn?.map(be=>Ie(be,L)),Or=Ns&&Mr.every(be=>Ht.includes(be)),Bc=Ns&&Mr.some(be=>Ht.includes(be)),Ic=G.useCallback(()=>{V&&q&&q(Or?V.filter(be=>!Mr.includes(Ie(be,L))):mn([...V,...Dn],be=>Ie(be,L)))},[Or,L,q,Mr,Dn,V]),{lastSelectionChangeIndex:Ar,setLastSelectionChangeIndex:Yc}=Ou(Rs),kn=Ot&&!x,zc={m:mt,my:ve,mx:De,mt:Fe,mb:at,ml:Me,mr:Oe},Fc=G.useCallback(({children:be})=>yt?yt({children:be}):be,[yt]);return w.jsx(gs,{...xn,children:w.jsxs(E.Box,{ref:it.root,...zc,className:Pe("mantine-datatable",{"mantine-datatable-with-border":t},_t,Te?.root),style:[be=>({...tc({theme:be,c:Ee,backgroundColor:xe,borderColor:nt,rowBorderColor:je,stripedColor:Ve,highlightOnHoverColor:Ye}),borderRadius:be.radius[e]||e,boxShadow:be.shadows[h]||h,height:n,minHeight:s,maxHeight:c}),ke,Ne?.root,{position:"relative"}],children:[w.jsx(dc,{viewportRef:Rc,leftShadowBehind:Ot||!!x,rightShadowBehind:S,onScrollPositionChange:jc,scrollAreaProps:Qe,children:w.jsx(Fc,{children:w.jsxs(E.Table,{ref:$c,horizontalSpacing:k,className:Pe("mantine-datatable-table",{[Bu]:r,"mantine-datatable-vertical-align-top":a==="top","mantine-datatable-vertical-align-bottom":a==="bottom","mantine-datatable-pin-last-column":S,"mantine-datatable-selection-column-visible":Ot,"mantine-datatable-pin-first-column":x,"mantine-datatable-resizable-columns":xn.hasResizableColumns&&Vt},Te?.table),style:{...Ne?.table},"data-striped":Pr&&R||void 0,"data-highlight-on-hover":P||void 0,..._n,children:[F?null:w.jsx(gs,{...xn,children:w.jsx(Xu,{ref:it.header,selectionColumnHeaderRef:it.selectionColumnHeader,className:Te?.header,style:Ne?.header,columns:rt,defaultColumnProps:D,groups:M,sortStatus:W,sortIcons:ae,onSortStatusChange:se,selectionTrigger:z,selectionVisible:Ot,selectionChecked:Or,selectionIndeterminate:Bc&&!Or,onSelectionChange:Ic,selectionCheckboxProps:{...J,...Z},selectorCellShadowVisible:kn,selectionColumnClassName:X,selectionColumnStyle:re,withColumnBorders:_n.withColumnBorders})}),w.jsx("tbody",{ref:gt,children:Pr?I.map((be,Ct)=>{let Pn=Ie(be,L),Mn=Ht?.includes(Pn)||!1,Ls;return q&&V&&(Ls=Wc=>{if(Wc.nativeEvent.shiftKey&&Ar!==null){let At=I.filter(Ct>Ar?(xt,St)=>St>=Ar&&St<=Ct&&(Q?Q(xt,St):!0):(xt,St)=>St>=Ct&&St<=Ar&&(Q?Q(xt,St):!0));q(Mn?$u(V,At,xt=>Ie(xt,L)):mn([...V,...At],xt=>Ie(xt,L)))}else q(Mn?V.filter(At=>Ie(At,L)!==Pn):mn([...V,be],At=>Ie(At,L)));Yc(Ct)}),w.jsx(uc,{record:be,index:Ct,columns:rt,defaultColumnProps:D,defaultColumnRender:O,selectionTrigger:z,selectionVisible:Ot,selectionChecked:Mn,onSelectionChange:Ls,isRecordSelectable:Q,selectionCheckboxProps:J,getSelectionCheckboxProps:U,onClick:le,onDoubleClick:he,onCellClick:ne,onCellDoubleClick:fe,onContextMenu:pe,onCellContextMenu:me,expansion:Nc,color:et,backgroundColor:ot,className:pt,style:wt,customAttributes:He,selectorCellShadowVisible:kn,selectionColumnClassName:X,selectionColumnStyle:re,idAccessor:L,rowFactory:tt},Pn)}):w.jsx(_u,{})}),rt.some(({footer:be})=>be)&&w.jsx(zu,{ref:it.footer,className:Te?.footer,style:Ne?.footer,columns:rt,defaultColumnProps:D,selectionVisible:Ot,selectorCellShadowVisible:kn})]})})}),C&&w.jsx(sc,{className:Te?.pagination,style:Ne?.pagination,horizontalSpacing:k,fetching:g,page:C,onPageChange:Lc,totalRecords:d,recordsPerPage:u,onRecordsPerPageChange:m,recordsPerPageOptions:f,recordsPerPageLabel:i,paginationWithEdges:b,paginationWithControls:T,paginationActiveTextColor:j,paginationActiveBackgroundColor:K,paginationSize:ee,paginationText:te,paginationWrapBreakpoint:H,getPaginationControlProps:ie,getPaginationItemProps:oe,noRecordsText:l,loadingText:ce,recordsLength:Pr,renderPagination:ue}),w.jsx(ec,{fetching:g,backgroundBlur:A,customContent:N,size:$,type:B,color:Y}),w.jsx(xu,{icon:p,text:l,active:!g&&!Pr,children:o})]})})}function Ms(t){const e=Ze.c(41),{fields:r,onClose:n,queryKey:s,apiPath:c,id:h,steps:a}=t,[g,y]=G.useState(0),[_,M]=G.useState(!1),{data:x,isLoading:S}=Wo(c,s,h),{mutateAsync:D,isError:O,error:L,isPending:I}=on(c,s);let z;e[0]!==r?(z=new Set(r.filter(vc).map(yc)),e[0]=r,e[1]=z):z=e[1];let V;e[2]!==z?(V=[...z],e[2]=z,e[3]=V):V=e[3];const q=V;let X;e[4]!==r?(X=r.reduce(mc,{}),e[4]=r,e[5]=X):X=e[5];let re;e[6]!==r?(re=r.filter(gc).reduce(pc,{}),e[6]=r,e[7]=re):re=e[7];let Q;e[8]!==X||e[9]!==re?(Q={mode:"uncontrolled",initialValues:X,validate:re},e[8]=X,e[9]=re,e[10]=Q):Q=e[10];const J=On.useForm(Q);let Z;e[11]!==x||e[12]!==r||e[13]!==J?(Z=()=>{if(x){const v={...x};r.forEach(d=>{const u=d.id;d.type==="boolean"&&v[u]===null?v[u]=!1:d.type==="date"&&v[u]?v[u]=new Date(v[u]):v[u]===null&&(v[u]="")}),J.initialize(v),J.setValues(v)}},e[11]=x,e[12]=r,e[13]=J,e[14]=Z):Z=e[14];let U;e[15]!==x?(U=[x],e[15]=x,e[16]=U):U=e[16],G.useEffect(Z,U);let W;e[17]!==J||e[18]!==h?(W=function(d){const u=J.getValues();return d.conditional&&!d.conditional(u)?null:w.jsxs(G.Fragment,{children:[(d.type===void 0||d.type=="text")&&w.jsx(E.TextInput,{label:d.column.title,placeholder:d.placeholder??"",...J.getInputProps(d.id),type:d.id.includes("email")?"email":void 0,required:d.required},J.key(d.id)),d.type==="number"&&w.jsx(E.NumberInput,{decimalSeparator:",",label:d.column.title,placeholder:d.placeholder??"",...J.getInputProps(d.id),required:d.required},J.key(d.id)),d.type==="date"&&w.jsx(_r,{label:d.column.title,placeholder:d.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...J.getInputProps(d.id),required:d.required},J.key(d.id)),d.type==="boolean"&&w.jsx(E.Checkbox,{mt:"md",label:d.column.title,...J.getInputProps(d.id,{type:"checkbox"}),required:d.required},J.key(d.id)),d.type==="textarea"&&w.jsx(E.Textarea,{label:d.column.title,placeholder:d.placeholder??"",...J.getInputProps(d.id),minRows:3,autosize:!0,required:d.required},J.key(d.id)),d.type==="custom"&&d.render&&d.render({...J.getValues(),id:h},J.setValues,M,{error:J.getInputProps(d.id).error,required:d.required})]},d.id)},e[17]=J,e[18]=h,e[19]=W):W=e[19];const ae=W;let se;e[20]!==O||e[21]!==L?.message||e[22]!==L?.name?(se=O&&w.jsx(E.Alert,{variant:"outline",color:"red",title:L?.name??"Fehler aufgetreten",mb:"lg",children:L?.message??"Fehler aufgetreten"}),e[20]=O,e[21]=L?.message,e[22]=L?.name,e[23]=se):se=e[23];let k;e[24]!==g||e[25]!==r||e[26]!==J||e[27]!==_||e[28]!==h||e[29]!==S||e[30]!==I||e[31]!==O||e[32]!==n||e[33]!==ae||e[34]!==a||e[35]!==q||e[36]!==D?(k=S?w.jsxs(E.Stack,{gap:"md",children:[w.jsx(E.Skeleton,{height:40}),Array(r.length).fill(0).map(fc),w.jsxs(E.Group,{mt:"md",justify:"end",children:[w.jsx(E.Skeleton,{width:100,height:36}),w.jsx(E.Skeleton,{width:100,height:36})]})]}):w.jsxs("form",{onSubmit:J.onSubmit(async v=>{await D({...v,id:h}),q.length&&g<q.length-1?O||y(g+1):O||(J.setInitialValues(v),J.reset(),n())}),children:[q.length?w.jsx(E.Stepper,{active:g,size:"sm",children:q.map(v=>w.jsx(E.Stepper.Step,{...a&&a[v-1]?{label:a[v-1].label}:{},children:r.filter(d=>d.step===v).map(d=>ae(d))},v))}):r.map(v=>ae(v)),!_&&w.jsxs(E.Group,{mt:"md",justify:"end",children:[w.jsx(E.Button,{onClick:()=>q.length?g===0?n():y(g-1):n(),variant:"outline",children:q.length?g===0?"Abbrechen":"Zurück":"Abbrechen"}),w.jsx(E.Button,{type:"submit",loading:I,children:q.length?g===q.length-1?"Speichern":"Weiter":"Speichern"})]})]}),e[24]=g,e[25]=r,e[26]=J,e[27]=_,e[28]=h,e[29]=S,e[30]=I,e[31]=O,e[32]=n,e[33]=ae,e[34]=a,e[35]=q,e[36]=D,e[37]=k):k=e[37];let C;return e[38]!==k||e[39]!==se?(C=w.jsxs(w.Fragment,{children:[se,k]}),e[38]=k,e[39]=se,e[40]=C):C=e[40],C}function fc(t,e){return w.jsx(E.Skeleton,{height:35},`skeleton-field-${e}`)}function pc(t,e){return t[e.id]=(r,n)=>e.conditional&&!e.conditional(n)||r?null:"Pflichtfeld",t}function gc(t){return t.required}function mc(t,e){return t[e.id]=e.type==="boolean"?e.defaultValue??!1:e.defaultValue??"",t}function yc(t){return t.step}function vc(t){return typeof t.step=="number"}function Os({queryKey:t,apiPath:e,onClose:r,selectedRecords:n}){const{mutateAsync:s,isError:c,error:h,isPending:a}=Vo(e,t),[g,y]=G.useState(n),[_,M]=G.useState(!1),x=_||a;return G.useEffect(()=>{g.length||r()},[r,g]),g.length?w.jsxs(w.Fragment,{children:[c&&h.message&&w.jsx(E.Alert,{variant:"outline",color:"red",title:h.name,children:h.message}),w.jsx(E.Text,{children:g.length===1?`Soll ${g.length} Eintrag wirklich gelöscht werden?`:`Sollen ${g.length} Einträge wirklich gelöscht werden?`}),w.jsxs(E.Group,{mt:"md",justify:"end",children:[w.jsx(E.Button,{onClick:r,variant:"outline",disabled:x,children:"Abbrechen"}),w.jsx(E.Button,{color:"red",loading:x,onClick:async()=>{M(!0);try{await Promise.all(g.map(S=>s(S.id))),y([])}finally{M(!1)}},children:"Löschen"})]})]}):w.jsx(w.Fragment,{})}function As(t,e){const r=Ze.c(8);let n;r[0]!==t||r[1]!==e?(n=()=>{const y=localStorage.getItem(`use_persistent_storage_${e}`);return y?JSON.parse(y):t},r[0]=t,r[1]=e,r[2]=n):n=r[2];const[s,c]=G.useState(n);let h;r[3]!==e?(h=y=>{c(y),localStorage.setItem(`use_persistent_storage_${e}`,JSON.stringify(y))},r[3]=e,r[4]=h):h=r[4];const a=h;let g;return r[5]!==a||r[6]!==s?(g=[s,a],r[5]=a,r[6]=s,r[7]=g):g=r[7],g}const bc=(t,e)=>{const r=t.map(g=>g[e]).filter(g=>g!=null&&g!=="");if(r.length===0)return"string";const n=Math.min(100,r.length),s=r.slice(0,n),c={string:0,number:0,date:0},h=[/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/,/^\d{4}-\d{2}-\d{2}$/,/^\d{1,2}\/\d{1,2}\/\d{4}$/,/^\d{1,2}\.\d{1,2}\.\d{4}$/];s.forEach(g=>{if(typeof g=="number")c.number++;else if(typeof g=="string"){const y=g.trim();if(y!==""&&!isNaN(Number(y))&&!isNaN(parseFloat(y))){c.number++;return}if(h.some(_=>_.test(y))){const _=new Date(y);if(!isNaN(_.getTime())){c.date++;return}}c.string++}else g instanceof Date?c.date++:c.string++});const a=c.string+c.number+c.date;return c.date/a>=.6?"date":c.number/a>=.6?"number":c.string/a>=.6?"string":"mixed"},Es=new Map,Ts=(t,e,r="asc")=>{if(!t||t.length===0)return[];const n=`${String(e)}_${t.length}`;let s=Es.get(n);return s||(s=bc(t,e),Es.set(n,s)),[...t].sort((h,a)=>{const g=h[e],y=a[e],_=g==null||g==="",M=y==null||y==="";if(_&&M)return 0;if(_)return r==="asc"?-1:1;if(M)return r==="asc"?1:-1;let x,S;switch(s){case"date":if(typeof g=="string"){const z=new Date(g.trim());x=isNaN(z.getTime())?null:z.getTime()}else g instanceof Date?x=g.getTime():x=null;if(typeof y=="string"){const z=new Date(y.trim());S=isNaN(z.getTime())?null:z.getTime()}else y instanceof Date?S=y.getTime():S=null;break;case"number":if(typeof g=="number")x=g;else{const z=String(g).trim(),V=parseFloat(z);x=isNaN(V)?null:V}if(typeof y=="number")S=y;else{const z=String(y).trim(),V=parseFloat(z);S=isNaN(V)?null:V}break;case"string":const D=typeof g=="string"?g:String(g),O=typeof y=="string"?y:String(y);x=D.toLowerCase().trim(),S=O.toLowerCase().trim();break;case"mixed":default:const L=String(g),I=String(y);x=L.toLowerCase().trim(),S=I.toLowerCase().trim();break}return x===null&&S===null?0:x===null?r==="asc"?1:-1:S===null||x<S?r==="asc"?-1:1:x>S?r==="asc"?1:-1:0})},js=[10,15,20,50,100,500];function wc(t){const e=Ze.c(113),{title:r,queryKey:n,connectedQueryKeys:s,apiPath:c,buttons:h,fields:a,selection:g,pagination:y,filters:_,actions:M,steps:x,defaultSort:S,onSortChange:D,createButtonText:O,queryParams:L,tabs:I,defaultTab:z,activeTab:V,onActiveTabChange:q,canUpdate:X,canDelete:re,rowExpansion:Q}=t,[J,Z]=G.useState(z||(I&&I.length>0?I[0].value:null)),U=V!==void 0?V:J;let W;e[0]!==V||e[1]!==q?(W=Me=>{V===void 0&&Z(Me),q&&q(Me)},e[0]=V,e[1]=q,e[2]=W):W=e[2];const ae=W,se=I?.find(Me=>Me.value===U)?.queryParams||{},k={...L,...se},C=k?"?"+Object.entries(k).filter(Ec).map(Ac).join("&"):"";let v;e[3]!==U||e[4]!==n?(v=U?[...n,U]:n,e[3]=U,e[4]=n,e[5]=v):v=e[5];const d=v,{data:u,isLoading:m,isError:f,isRefetching:i,refetch:b}=Uo(c+C,d),{queryClient:T}=ct();let j,K;e[6]!==u||e[7]!==s||e[8]!==T?(j=()=>{!u||!Array.isArray(u)||s?.forEach(Me=>T.invalidateQueries({queryKey:Me}))},K=[u,s,T],e[6]=u,e[7]=s,e[8]=T,e[9]=j,e[10]=K):(j=e[9],K=e[10]),G.useEffect(j,K);const ee=!u||!Array.isArray(u)?[]:!_||_.length===0?u:u.filter(Me=>_.every(Oe=>{if(Oe.value===void 0)return!0;const _t=Oe.id;if(Oe.type==="query"){const Te=Me[_t];return Array.isArray(Oe.value)?Array.isArray(Te)?Te.some(ke=>{if(typeof ke=="string"||typeof ke=="number")return Oe.value.includes(String(ke));if(ke&&typeof ke=="object"){if("id"in ke&&Oe.value.includes(ke.id))return!0;for(const Ne in ke){const tt=ke[Ne];if(typeof tt=="string"&&Oe.value.includes(tt)||tt&&typeof tt=="object"&&"id"in tt&&Oe.value.includes(tt.id))return!0}}return!1}):Te&&typeof Te=="object"&&"id"in Te?Oe.value.includes(Te.id):!1:typeof Te=="string"&&Te.includes(Oe.value)}else if(Oe.type==="date"){const Te=Oe.value;if(!Te)return!0;const[ke,Ne]=Te;if(!ke&&!Ne)return!0;const tt=Me[_t];if(typeof tt=="string"){const yt=tt.split(" ")[0];if(ke&&Ne)return yt>=ke&&yt<=Ne;if(ke&&!Ne)return yt>=ke;if(!ke&&Ne)return yt<=Ne}return!0}else if(Oe.type==="boolean")return Me[_t]===Oe.value;return!0})),te=S?.field??a[0].id,H=S?.direction??"desc";let ie;e[11]!==te||e[12]!==H?(ie={columnAccessor:te,direction:H},e[11]=te,e[12]=H,e[13]=ie):ie=e[13];const[oe,ue]=G.useState(ie);let A;e[14]!==D?(A=Me=>{ue(Me),D&&D(String(Me.columnAccessor),Me.direction)},e[14]=D,e[15]=A):A=e[15];const N=A,$=Ts(ee,oe.columnAccessor,oe.direction),[B,Y]=As(js[1],"mantine-table-page-size"),[ce,o]=G.useState(1),l=y?$.slice((ce-1)*B,ce*B):$;let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=[],e[16]=p):p=e[16];const[P,R]=G.useState(p);let F;e[17]===Symbol.for("react.memo_cache_sentinel")?(F=()=>{R([])},e[17]=F):F=e[17];let le;e[18]!==U?(le=[U],e[18]=U,e[19]=le):le=e[19],G.useEffect(F,le);const[he,pe]=G.useState(!1),[ne,fe]=G.useState(!1),[me,ge]=G.useState(!1),Se=r?"space-between":"end";let _e;e[20]!==r?(_e=r&&(typeof r=="string"?w.jsx(E.Title,{order:4,children:r}):r),e[20]=r,e[21]=_e):_e=e[21];let Ce;e[22]!==b?(Ce=()=>b(),e[22]=b,e[23]=Ce):Ce=e[23];let ze;e[24]===Symbol.for("react.memo_cache_sentinel")?(ze=w.jsx(Et.IconRefresh,{}),e[24]=ze):ze=e[24];let Ee;e[25]!==Ce?(Ee=w.jsx(E.ActionIcon,{variant:"subtle",onClick:Ce,"aria-label":"Neuladen",children:ze}),e[25]=Ce,e[26]=Ee):Ee=e[26];let xe;e[27]!==M||e[28]!==re||e[29]!==X||e[30]!==a||e[31]!==P||e[32]!==g?(xe=(a.some(Oc)||g)&&(()=>{const Me=a.find(Mc)&&(!X||P.length>0&&X(P[0])),Oe=a.find(Pc)&&(!re||P.length>0&&re(P[0])),_t=(M??[]).length>0,Te=Me||Oe||_t;return w.jsxs(E.Menu,{shadow:"md",children:[w.jsx(E.Menu.Target,{children:w.jsx(E.Button,{variant:"outline",rightSection:w.jsx(Et.IconCaretDownFilled,{size:14}),disabled:!P.length||!Te,children:"Aktionen"})}),w.jsxs(E.Menu.Dropdown,{children:[Me&&w.jsx(E.Menu.Item,{leftSection:w.jsx(Et.IconPencil,{size:14}),onClick:()=>fe(!0),disabled:P.length!==1,children:"Bearbeiten"}),(M??[]).map((ke,Ne)=>G.createElement(E.Menu.Item,{...ke.icon&&{leftSection:ke.icon},key:`custom_action_${Ne}`,onClick:()=>ke.onClick(P)},ke.label)),Oe&&w.jsx(E.Menu.Item,{leftSection:w.jsx(Et.IconTrash,{size:14}),onClick:()=>ge(!0),color:"red",children:"Löschen"})]})]})})(),e[27]=M,e[28]=re,e[29]=X,e[30]=a,e[31]=P,e[32]=g,e[33]=xe):xe=e[33];let nt;e[34]!==O||e[35]!==a||e[36]!==m?(nt=a.find(kc)&&w.jsx(E.Button,{onClick:()=>pe(!0),disabled:m,children:O??"Erstellen"}),e[34]=O,e[35]=a,e[36]=m,e[37]=nt):nt=e[37];let je;e[38]!==h||e[39]!==Ee||e[40]!==xe||e[41]!==nt?(je=w.jsxs(E.Group,{align:"center",gap:"xs",children:[Ee,xe,nt,h]}),e[38]=h,e[39]=Ee,e[40]=xe,e[41]=nt,e[42]=je):je=e[42];let Ve;e[43]!==Se||e[44]!==_e||e[45]!==je?(Ve=w.jsxs(E.Group,{gap:"xs",justify:Se,align:"center",children:[_e,je]}),e[43]=Se,e[44]=_e,e[45]=je,e[46]=Ve):Ve=e[46];let Ye;e[47]!==U||e[48]!==ae||e[49]!==I?(Ye=I&&I.length>0&&w.jsx(E.Tabs,{value:U,onChange:ae,mt:"md",children:w.jsx(E.Tabs.List,{children:I.map(Dc)})}),e[47]=U,e[48]=ae,e[49]=I,e[50]=Ye):Ye=e[50];let et;e[51]!==f?(et=f&&w.jsx(E.Alert,{mt:"md",variant:"light",color:"red",title:"Es ist ein Fehler aufgetreten.",icon:w.jsx(Et.IconInfoCircle,{}),children:"Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."}),e[51]=f,e[52]=et):et=e[52];let ot;e[53]!==m||e[54]!==i?(ot=(m||i)&&w.jsxs(E.Stack,{my:"md",children:[w.jsx(E.Skeleton,{height:40}),Array(5).fill(0).map(Sc)]}),e[53]=m,e[54]=i,e[55]=ot):ot=e[55];let $e;e[56]!==a||e[57]!==N||e[58]!==f||e[59]!==m||e[60]!==i||e[61]!==ce||e[62]!==B||e[63]!==y||e[64]!==l||e[65]!==Q||e[66]!==P||e[67]!==g||e[68]!==o||e[69]!==Y||e[70]!==oe||e[71]!==$?($e=!m&&!i&&w.jsx(hc,{my:"md",striped:!0,minHeight:150,fetching:f,records:l,sortStatus:oe,onSortStatusChange:N,...g&&{selectedRecords:P,onSelectedRecordsChange:R},...y&&l.length&&{totalRecords:$.length,recordsPerPage:B,onPageChange:o,page:ce,recordsPerPageOptions:js,onRecordsPerPageChange:Y,recordsPerPageLabel:"Einträge pro Seite"},...Q&&{rowExpansion:{allowMultiple:Q.allowMultiple??!1,content:Me=>{const{record:Oe}=Me;return Q.content(Oe)},...Q.expanded&&{expanded:Q.expanded}}},columns:a.map(xc),noRecordsText:"Keine Einträge gefunden"}),e[56]=a,e[57]=N,e[58]=f,e[59]=m,e[60]=i,e[61]=ce,e[62]=B,e[63]=y,e[64]=l,e[65]=Q,e[66]=P,e[67]=g,e[68]=o,e[69]=Y,e[70]=oe,e[71]=$,e[72]=$e):$e=e[72];let pt;e[73]===Symbol.for("react.memo_cache_sentinel")?(pt=()=>{fe(!1),R([])},e[73]=pt):pt=e[73];const wt=r??"Bearbeiten";let He;e[74]!==c||e[75]!==a||e[76]!==n||e[77]!==P[0]||e[78]!==P.length||e[79]!==x?(He=P.length>0&&w.jsx(Ms,{fields:a.filter(Cc),queryKey:n,apiPath:c,id:P[0].id,onClose:()=>{fe(!1),R([])},steps:x}),e[74]=c,e[75]=a,e[76]=n,e[77]=P[0],e[78]=P.length,e[79]=x,e[80]=He):He=e[80];let Ge;e[81]!==wt||e[82]!==He||e[83]!==ne?(Ge=w.jsx(E.Modal,{opened:ne,onClose:pt,title:wt,children:He}),e[81]=wt,e[82]=He,e[83]=ne,e[84]=Ge):Ge=e[84];let Qe;e[85]!==c||e[86]!==me||e[87]!==n||e[88]!==P||e[89]!==r?(Qe=P.length>0&&w.jsx(E.Modal,{opened:me,onClose:()=>{ge(!1),R([])},title:r??"Löschen",children:w.jsx(Os,{onClose:()=>{ge(!1),R([])},queryKey:n,apiPath:c,selectedRecords:P})}),e[85]=c,e[86]=me,e[87]=n,e[88]=P,e[89]=r,e[90]=Qe):Qe=e[90];let st;e[91]===Symbol.for("react.memo_cache_sentinel")?(st=()=>{pe(!1)},e[91]=st):st=e[91];const gt=r??"Anlegen";let mt;e[92]===Symbol.for("react.memo_cache_sentinel")?(mt=()=>{pe(!1)},e[92]=mt):mt=e[92];let ve;e[93]!==a?(ve=a.filter(_c),e[93]=a,e[94]=ve):ve=e[94];let De;e[95]!==c||e[96]!==n||e[97]!==x||e[98]!==ve?(De=w.jsx(ps,{queryKey:n,apiPath:c,onClose:mt,fields:ve,steps:x}),e[95]=c,e[96]=n,e[97]=x,e[98]=ve,e[99]=De):De=e[99];let Fe;e[100]!==he||e[101]!==gt||e[102]!==De?(Fe=w.jsx(E.Modal,{opened:he,onClose:st,title:gt,children:De}),e[100]=he,e[101]=gt,e[102]=De,e[103]=Fe):Fe=e[103];let at;return e[104]!==Ve||e[105]!==Ye||e[106]!==et||e[107]!==ot||e[108]!==$e||e[109]!==Ge||e[110]!==Qe||e[111]!==Fe?(at=w.jsxs(w.Fragment,{children:[Ve,Ye,et,ot,$e,Ge,Qe,Fe]}),e[104]=Ve,e[105]=Ye,e[106]=et,e[107]=ot,e[108]=$e,e[109]=Ge,e[110]=Qe,e[111]=Fe,e[112]=at):at=e[112],at}function _c(t){return t.create}function Cc(t){return t.update}function xc(t){return t.column}function Sc(t,e){return w.jsx(E.Skeleton,{height:35},`skeleton-${e}`)}function Dc(t){return w.jsx(E.Tabs.Tab,{value:t.value,leftSection:t.icon,children:t.label},t.value)}function kc(t){return t.create}function Pc(t){return t.delete}function Mc(t){return t.update}function Oc(t){return t.update}function Ac(t){const[e,r]=t;return`${e}=${encodeURIComponent(r??"")}`}function Ec(t){const[,e]=t;return e!=null}function Tc(t){const e=Ze.c(5),{queryClient:r}=ct();let n;e[0]!==t?(n=w.jsx(wc,{...t}),e[0]=t,e[1]=n):n=e[1];let s;return e[2]!==r||e[3]!==n?(s=w.jsx(Gn,{client:r,children:n}),e[2]=r,e[3]=n,e[4]=s):s=e[4],s}we.CreateModal=ps,we.DataTable=Tc,we.DataTableProvider=pl,we.DeleteModal=Os,we.UpdateModal=Ms,we.api=ml,we.createOne=zo,we.deleteOne=Yo,we.getAll=Bo,we.getApiHeaders=bt,we.getOne=Io,we.sortData=Ts,we.updateOne=Fo,we.useAddOne=qo,we.useDataTable=ct,we.useDeleteOne=Vo,we.useGetAll=Uo,we.useGetOne=Wo,we.usePersistentState=As,we.useUpdateOne=on,Object.defineProperty(we,Symbol.toStringTag,{value:"Module"})}));
24
24
  //# sourceMappingURL=index.umd.js.map