fastapi-rtk 0.0.93 → 0.0.94
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/fastapi-rtk.es.js +3861 -3869
- package/dist/fastapi-rtk.umd.js +81 -81
- package/package.json +1 -1
package/dist/fastapi-rtk.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(M,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react-router-dom"),require("zustand"),require("@tanstack/react-query"),require("@mantine/hooks"),require("@mantine/core"),require("@mantine/form"),require("@mantine/dates"),require("@jsonforms/core"),require("@jsonforms/react"),require("@emotion/react"),require("mantine-react-table")):typeof define=="function"&&define.amd?define(["exports","react","react-router-dom","zustand","@tanstack/react-query","@mantine/hooks","@mantine/core","@mantine/form","@mantine/dates","@jsonforms/core","@jsonforms/react","@emotion/react","mantine-react-table"],T):(M=typeof globalThis<"u"?globalThis:M||self,T(M["fastapi-rtk"]={},M.React,M.reactRouterDom,M.zustand,M.reactQuery,M.hooks,M.core,M.form,M.dates,M.core$1,M.react,M.react$1,M.mantineReactTable))})(this,function(M,T,It,Nc,dt,ke,m,bn,wt,Y,Te,Bs,Dt){"use strict";var UC=Object.defineProperty;var VC=(M,T,It)=>T in M?UC(M,T,{enumerable:!0,configurable:!0,writable:!0,value:It}):M[T]=It;var Rc=(M,T,It)=>VC(M,typeof T!="symbol"?T+"":T,It);function Lc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Le=Lc(T),Us=T.createContext({path:"",data:null,info:null,queryParams:null,loading:!1,error:null,streaming:null,specialKey:null,setQueryParams:e=>null,refetch:()=>null,refetchInfo:()=>null,getEntry:async e=>({}),addEntry:async(e,t)=>({}),updateEntry:async(e,t,n)=>({}),deleteEntry:async(e,t)=>({}),download:async e=>null});function ce(){const e=T.useContext(Us);if(e===void 0)throw new Error("useApi must be used within a ApiProvider");return e}var er=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Et(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var li={exports:{}},vn={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Vs;function zc(){if(Vs)return vn;Vs=1;var e=T,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,u,c){var f,d={},p=null,y=null;c!==void 0&&(p=""+c),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(y=u.ref);for(f in u)r.call(u,f)&&!s.hasOwnProperty(f)&&(d[f]=u[f]);if(a&&a.defaultProps)for(f in u=a.defaultProps,u)d[f]===void 0&&(d[f]=u[f]);return{$$typeof:t,type:a,key:p,ref:y,props:d,_owner:i.current}}return vn.Fragment=n,vn.jsx=o,vn.jsxs=o,vn}var xn={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,169 +14,169 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+ee+b}}var
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var Ws;function Bc(){return Ws||(Ws=1,process.env.NODE_ENV!=="production"&&function(){var e=T,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),v=Symbol.iterator,h="@@iterator";function _(b){if(b===null||typeof b!="object")return null;var D=v&&b[v]||b[h];return typeof D=="function"?D:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O(b){{for(var D=arguments.length,R=new Array(D>1?D-1:0),Z=1;Z<D;Z++)R[Z-1]=arguments[Z];j("error",b,R)}}function j(b,D,R){{var Z=w.ReactDebugCurrentFrame,ae=Z.getStackAddendum();ae!==""&&(D+="%s",R=R.concat([ae]));var he=R.map(function(oe){return String(oe)});he.unshift("Warning: "+D),Function.prototype.apply.call(console[b],console,he)}}var k=!1,E=!1,$=!1,z=!1,q=!1,Q;Q=Symbol.for("react.module.reference");function g(b){return!!(typeof b=="string"||typeof b=="function"||b===r||b===s||q||b===i||b===c||b===f||z||b===y||k||E||$||typeof b=="object"&&b!==null&&(b.$$typeof===p||b.$$typeof===d||b.$$typeof===o||b.$$typeof===a||b.$$typeof===u||b.$$typeof===Q||b.getModuleId!==void 0))}function P(b,D,R){var Z=b.displayName;if(Z)return Z;var ae=D.displayName||D.name||"";return ae!==""?R+"("+ae+")":R}function B(b){return b.displayName||"Context"}function J(b){if(b==null)return null;if(typeof b.tag=="number"&&O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof b=="function")return b.displayName||b.name||null;if(typeof b=="string")return b;switch(b){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case f:return"SuspenseList"}if(typeof b=="object")switch(b.$$typeof){case a:var D=b;return B(D)+".Consumer";case o:var R=b;return B(R._context)+".Provider";case u:return P(b,b.render,"ForwardRef");case d:var Z=b.displayName||null;return Z!==null?Z:J(b.type)||"Memo";case p:{var ae=b,he=ae._payload,oe=ae._init;try{return J(oe(he))}catch{return null}}}return null}var te=Object.assign,me=0,ge,_e,je,H,S,A,V;function W(){}W.__reactDisabledLog=!0;function K(){{if(me===0){ge=console.log,_e=console.info,je=console.warn,H=console.error,S=console.group,A=console.groupCollapsed,V=console.groupEnd;var b={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:b,log:b,warn:b,error:b,group:b,groupCollapsed:b,groupEnd:b})}me++}}function G(){{if(me--,me===0){var b={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},b,{value:ge}),info:te({},b,{value:_e}),warn:te({},b,{value:je}),error:te({},b,{value:H}),group:te({},b,{value:S}),groupCollapsed:te({},b,{value:A}),groupEnd:te({},b,{value:V})})}me<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var X=w.ReactCurrentDispatcher,ee;function U(b,D,R){{if(ee===void 0)try{throw Error()}catch(ae){var Z=ae.stack.trim().match(/\n( *(at )?)/);ee=Z&&Z[1]||""}return`
|
|
18
|
+
`+ee+b}}var re=!1,ne;{var $e=typeof WeakMap=="function"?WeakMap:Map;ne=new $e}function F(b,D){if(!b||re)return"";{var R=ne.get(b);if(R!==void 0)return R}var Z;re=!0;var ae=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var he;he=X.current,X.current=null,K();try{if(D){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ue){Z=ue}Reflect.construct(b,[],oe)}else{try{oe.call()}catch(ue){Z=ue}b.call(oe.prototype)}}else{try{throw Error()}catch(ue){Z=ue}b()}}catch(ue){if(ue&&Z&&typeof ue.stack=="string"){for(var ie=ue.stack.split(`
|
|
19
|
+
`),L=Z.stack.split(`
|
|
20
|
+
`),x=ie.length-1,I=L.length-1;x>=1&&I>=0&&ie[x]!==L[I];)I--;for(;x>=1&&I>=0;x--,I--)if(ie[x]!==L[I]){if(x!==1||I!==1)do if(x--,I--,I<0||ie[x]!==L[I]){var N=`
|
|
21
|
+
`+ie[x].replace(" at new "," at ");return b.displayName&&N.includes("<anonymous>")&&(N=N.replace("<anonymous>",b.displayName)),typeof b=="function"&&ne.set(b,N),N}while(x>=1&&I>=0);break}}}finally{re=!1,X.current=he,G(),Error.prepareStackTrace=ae}var fe=b?b.displayName||b.name:"",Ee=fe?U(fe):"";return typeof b=="function"&&ne.set(b,Ee),Ee}function Ne(b,D,R){return F(b,!1)}function Ge(b){var D=b.prototype;return!!(D&&D.isReactComponent)}function it(b,D,R){if(b==null)return"";if(typeof b=="function")return F(b,Ge(b));if(typeof b=="string")return U(b);switch(b){case c:return U("Suspense");case f:return U("SuspenseList")}if(typeof b=="object")switch(b.$$typeof){case u:return Ne(b.render);case d:return it(b.type,D,R);case p:{var Z=b,ae=Z._payload,he=Z._init;try{return it(he(ae),D,R)}catch{}}}return""}var bt=Object.prototype.hasOwnProperty,vt={},Ut=w.ReactDebugCurrentFrame;function xt(b){if(b){var D=b._owner,R=it(b.type,b._source,D?D.type:null);Ut.setExtraStackFrame(R)}else Ut.setExtraStackFrame(null)}function Zr(b,D,R,Z,ae){{var he=Function.call.bind(bt);for(var oe in b)if(he(b,oe)){var ie=void 0;try{if(typeof b[oe]!="function"){var L=Error((Z||"React class")+": "+R+" type `"+oe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof b[oe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw L.name="Invariant Violation",L}ie=b[oe](D,oe,Z,R,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(x){ie=x}ie&&!(ie instanceof Error)&&(xt(ae),O("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Z||"React class",R,oe,typeof ie),xt(null)),ie instanceof Error&&!(ie.message in vt)&&(vt[ie.message]=!0,xt(ae),O("Failed %s type: %s",R,ie.message),xt(null))}}}var Qr=Array.isArray;function Vn(b){return Qr(b)}function Wn(b){{var D=typeof Symbol=="function"&&Symbol.toStringTag,R=D&&b[Symbol.toStringTag]||b.constructor.name||"Object";return R}}function Vt(b){try{return Tt(b),!1}catch{return!0}}function Tt(b){return""+b}function _t(b){if(Vt(b))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Wn(b)),Tt(b)}var Gn=w.ReactCurrentOwner,ei={key:!0,ref:!0,__self:!0,__source:!0},Hn,hn;function ti(b){if(bt.call(b,"ref")){var D=Object.getOwnPropertyDescriptor(b,"ref").get;if(D&&D.isReactWarning)return!1}return b.ref!==void 0}function mn(b){if(bt.call(b,"key")){var D=Object.getOwnPropertyDescriptor(b,"key").get;if(D&&D.isReactWarning)return!1}return b.key!==void 0}function gn(b,D){typeof b.ref=="string"&&Gn.current}function st(b,D){{var R=function(){Hn||(Hn=!0,O("%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://reactjs.org/link/special-props)",D))};R.isReactWarning=!0,Object.defineProperty(b,"key",{get:R,configurable:!0})}}function Pt(b,D){{var R=function(){hn||(hn=!0,O("%s: `ref` 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://reactjs.org/link/special-props)",D))};R.isReactWarning=!0,Object.defineProperty(b,"ref",{get:R,configurable:!0})}}var Yn=function(b,D,R,Z,ae,he,oe){var ie={$$typeof:t,type:b,key:D,ref:R,props:oe,_owner:he};return ie._store={},Object.defineProperty(ie._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ie,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Z}),Object.defineProperty(ie,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ae}),Object.freeze&&(Object.freeze(ie.props),Object.freeze(ie)),ie};function qn(b,D,R,Z,ae){{var he,oe={},ie=null,L=null;R!==void 0&&(_t(R),ie=""+R),mn(D)&&(_t(D.key),ie=""+D.key),ti(D)&&(L=D.ref,gn(D,ae));for(he in D)bt.call(D,he)&&!ei.hasOwnProperty(he)&&(oe[he]=D[he]);if(b&&b.defaultProps){var x=b.defaultProps;for(he in x)oe[he]===void 0&&(oe[he]=x[he])}if(ie||L){var I=typeof b=="function"?b.displayName||b.name||"Unknown":b;ie&&st(oe,I),L&&Pt(oe,I)}return Yn(b,ie,L,ae,Z,Gn.current,oe)}}var Kn=w.ReactCurrentOwner,Wt=w.ReactDebugCurrentFrame;function ot(b){if(b){var D=b._owner,R=it(b.type,b._source,D?D.type:null);Wt.setExtraStackFrame(R)}else Wt.setExtraStackFrame(null)}var Jn;Jn=!1;function St(b){return typeof b=="object"&&b!==null&&b.$$typeof===t}function ni(){{if(Kn.current){var b=J(Kn.current.type);if(b)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+b+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+b+"`."}return""}}function zs(b){return""}var Pe={};function kt(b){{var D=ni();if(!D){var R=typeof b=="string"?b:b.displayName||b.name;R&&(D=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+R+">.")}return D}}function ri(b,D){{if(!b._store||b._store.validated||b.key!=null)return;b._store.validated=!0;var R=kt(D);if(Pe[R])return;Pe[R]=!0;var Z="";b&&b._owner&&b._owner!==Kn.current&&(Z=" It was passed a child from "+J(b._owner.type)+"."),ot(b),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',R,Z),ot(null)}}function Xn(b,D){{if(typeof b!="object")return;if(Vn(b))for(var R=0;R<b.length;R++){var Z=b[R];St(Z)&&ri(Z,D)}else if(St(b))b._store&&(b._store.validated=!0);else if(b){var ae=_(b);if(typeof ae=="function"&&ae!==b.entries)for(var he=ae.call(b),oe;!(oe=he.next()).done;)St(oe.value)&&ri(oe.value,D)}}}function Zn(b){{var D=b.type;if(D==null||typeof D=="string")return;var R;if(typeof D=="function")R=D.propTypes;else if(typeof D=="object"&&(D.$$typeof===u||D.$$typeof===d))R=D.propTypes;else return;if(R){var Z=J(D);Zr(R,b.props,"prop",Z,b)}else if(D.PropTypes!==void 0&&!Jn){Jn=!0;var ae=J(D);O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ae||"Unknown")}typeof D.getDefaultProps=="function"&&!D.getDefaultProps.isReactClassApproved&&O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ii(b){{for(var D=Object.keys(b.props),R=0;R<D.length;R++){var Z=D[R];if(Z!=="children"&&Z!=="key"){ot(b),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Z),ot(null);break}}b.ref!==null&&(ot(b),O("Invalid attribute `ref` supplied to `React.Fragment`."),ot(null))}}var Qn={};function si(b,D,R,Z,ae,he){{var oe=g(b);if(!oe){var ie="";(b===void 0||typeof b=="object"&&b!==null&&Object.keys(b).length===0)&&(ie+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var L=zs();L?ie+=L:ie+=ni();var x;b===null?x="null":Vn(b)?x="array":b!==void 0&&b.$$typeof===t?(x="<"+(J(b.type)||"Unknown")+" />",ie=" Did you accidentally export a JSX literal instead of a component?"):x=typeof b,O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",x,ie)}var I=qn(b,D,R,ae,he);if(I==null)return I;if(oe){var N=D.children;if(N!==void 0)if(Z)if(Vn(N)){for(var fe=0;fe<N.length;fe++)Xn(N[fe],b);Object.freeze&&Object.freeze(N)}else O("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 Xn(N,b)}if(bt.call(D,"key")){var Ee=J(b),ue=Object.keys(D).filter(function(Gt){return Gt!=="key"}),Me=ue.length>0?"{key: someKey, "+ue.join(": ..., ")+": ...}":"{key: someKey}";if(!Qn[Ee+Me]){var et=ue.length>0?"{"+ue.join(": ..., ")+": ...}":"{}";O(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,Ge,Se,Ht,Se),ni[Se+Ge]=!0}}return b===n?ri(R):ti(R),R}}function vr(b,D,L){return Je(b,D,L,!0)}function ii(b,D,L){return Je(b,D,L,!1)}var si=ii,Qr=vr;_r.Fragment=n,_r.jsx=si,_r.jsxs=Qr}()),_r}process.env.NODE_ENV==="production"?oi.exports=Bc():oi.exports=Uc();var l=oi.exports;function ze({path:e,method:t,body:r=void 0,queryParams:n=void 0}){const i=Object.entries(n||{}).reduce((a,[u,c])=>((Array.isArray(c)||typeof c=="object")&&(c=JSON.stringify(c)),a[u]=c,a),{}),s=new Dt.createSearchParams(i);e=e+"?"+s;const o={method:t,mode:"cors",credentials:"include",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:r?JSON.stringify(r):null};return{fetchPath:e,options:o}}function Vc(e){const t=[];if(e.length===0)return"";if(typeof e[0]!="string")throw new TypeError("Url must be a string. Received "+e[0]);e[0].match(/^[^/:]+:\/*$/)&&e.length>1&&(e[0]=e.shift()+e[0]),e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(let i=0;i<e.length;i++){let s=e[i];if(typeof s!="string")throw new TypeError("Url must be a string. Received "+s);s!==""&&(i>0&&(s=s.replace(/^[\/]+/,"")),i<e.length-1?s=s.replace(/[\/]+$/,""):s=s.replace(/[\/]+$/,"/"),t.push(s))}let r=t.join("/");r=r.replace(/\/(\?|&|#[^!])/g,"$1");const n=r.split("?");return r=n.shift()+(n.length>0?"?":"")+n.join("&"),r}function ke(...e){const t=Array.from(Array.isArray(e[0])?e[0]:e);return Vc(t)}const Wc=e=>new Proxy(e,{get(t,r){return t(n=>n[r])}}),Gc=(e,t)=>Object.entries(t).reduce((r,[n,i])=>typeof i=="object"&&JSON.stringify(i)===JSON.stringify(e[n])||i===e[n]?r:{...r,[n]:i},{});function Sr(e){const[t]=T.useState(()=>Lc.create(()=>({...e}))),[r]=T.useState(()=>Wc(t));return T.useEffect(()=>{t.setState(n=>Gc(n,e))},[e,t]),r}const Ws=T.createContext({user:null,loading:!1,error:null,signin:async(e,t)=>null,signout:async()=>null,update:async e=>null,resetPassword:async e=>null,oauth_signin:(e,t)=>null,refetch:async()=>null});function Gs(){return T.useContext(Ws)}const Hs=T.createContext({baseUrl:"",info:null,loading:!1,error:null});function Ys(){return T.useContext(Hs)}async function Hc(e,{username:t,password:r}){const n=new FormData;n.append("username",t),n.append("password",r);const{fetchPath:i,options:s}=ze({path:ke(e,"auth/login"),method:"POST"}),o=await fetch(i,{...s,headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(n)});if(!o.ok)throw o.status===400?new Error("Username or password wrong."):new Error("Failed to sign in.")}async function Yc(e){const{fetchPath:t,options:r}=ze({path:ke(e,"auth/logout"),method:"POST"});if(!(await fetch(t,r)).ok)throw new Error("Failed to sign out.")}async function qc(e,t,{email:r}){const{fetchPath:n,options:i}=ze({path:ke(e,"auth/forgot-password"),method:"POST",body:{email:r}}),s=await fetch(n,i);if(!s.ok)throw new Error("Couldn't request token to reset password");const o=await s.json(),{token:a}=o,{fetchPath:u,options:c}=ze({path:ke(e,"auth/reset-password"),method:"POST",body:{token:a,password:t}});if(!(await fetch(u,c)).ok)throw new Error("Couldn't reset password")}async function Kc(e,t,r,n){const i=ke(e,"auth/login",t);if(r){const a=window.screenLeft+window.outerWidth/2-250,u=window.screenTop+window.outerHeight/2-500/2,c=window.open(i+"?popup=true","auth",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=500, height=500, top=${u}, left=${a}`),f=window.setInterval(function(){c.closed!==!1&&(window.clearInterval(f),n==null||n())},200);window.location.href=ke(e,"auth/login",t)}}async function Jc(e,t){const{fetchPath:r,options:n}=ze({path:ke(e,"info/"),method:"GET"}),i=await fetch(r,{signal:t,...n}),s=await i.json();if(!i.ok){const o=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(o)}return s}async function Xc(e,t){const{fetchPath:r,options:n}=ze({path:ke(e,"auth/user"),method:"GET"}),i=await fetch(r,{signal:t,...n}),s=await i.json();if(!i.ok){const o=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(o)}return s}async function Zc(e,t){const{fetchPath:r,options:n}=ze({path:ke(e,"auth/user"),method:"PUT",body:t}),i=await fetch(r,n),s=await i.json();if(!i.ok){const o=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(o)}return s}function Qc(e){const t=ct.useQueryClient(),r=ct.useQuery({queryKey:["user"],queryFn:({signal:f})=>Xc(e,f),retry:0}),[n,i]=T.useState(null),s=T.useCallback(({username:f,password:d})=>{i(null),Hc(e,{username:f,password:d}).then(()=>t.invalidateQueries({queryKey:["user"]})).catch(p=>i(p))},[e,t]),o=T.useCallback(()=>{i(null),Yc(e).then(()=>t.resetQueries({queryKey:["user"]})).then(()=>t.resetQueries({queryKey:["info"]})).catch(f=>i(f))},[e,t]),a=T.useCallback(f=>{i(null),Zc(e,f).then(()=>t.invalidateQueries({queryKey:["user"]})).catch(d=>i(d))},[e,t]),u=T.useCallback(f=>{i(null),qc(e,f,r.data).catch(d=>i(d))},[e,r.data]),c=T.useCallback((f,d)=>Kc(e,f,d,()=>t.invalidateQueries({queryKey:["user"]})),[e,t]);return{user:r.isError?null:r.data,loading:r.isFetching,error:n?n.message:null,signin:s,signout:o,update:a,resetPassword:u,oauth_signin:c,refetch:r.refetch}}function ef(e,t){const r=ct.useQuery({queryKey:["info"],queryFn:({signal:n})=>Jc(e,n),enabled:!1});return T.useEffect(()=>{t.user&&!r.data&&r.refetch()},[t.user,r]),{baseUrl:e,info:r.data,loading:r.isFetching,error:r.error}}function tf(e){const t={baseUrl:new URL(document.baseURI).pathname+"/api/v1",inheritMantineTheme:!1},{baseUrl:r,children:n}={...t,...e},i=Qc(r),s=Sr(i),o=ef(r,i),a=Sr(o);return l.jsx(Ws.Provider,{value:s,children:l.jsx(Hs.Provider,{value:a,children:n})})}function rf(e){const[t]=T.useState(()=>new ct.QueryClient);return l.jsx(ct.QueryClientProvider,{client:t,children:l.jsx(tf,{...e})})}const qs=T.createContext({bulkActions:{selectedIds:[],setSelectedIds:()=>{}},dispatchBulkActions:async(e,t)=>{},error:null});function nf(){const e=T.useContext(qs);if(e===void 0)throw new Error("useBulkActions must be used within a ApiProvider");return e}const sf=async(e,t)=>{const{fetchPath:r,options:n}=ze({path:ke(e,"/"),method:"POST",body:t}),i=await fetch(r,n);let s=null;const o=i.headers.get("content-type");if(o&&o.includes("application/json")?s=await i.json():s=await i.text(),!i.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},of=async(e,t)=>{const{fetchPath:r,options:n}=ze({path:ke(e,t.toString()),method:"DELETE"}),i=await fetch(r,n);let s=null;const o=i.headers.get("content-type");if(o&&o.includes("application/json")?s=await i.json():s=await i.text(),!i.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},af=async(e,t)=>{const{fetchPath:r,options:n}=ze({path:e,method:"GET"}),i=await fetch(r,{signal:t,...n}),s=await i.json();if(!i.ok){const o=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(o)}return s},lf=async(e,t)=>{const{fetchPath:r,options:n}=ze({path:ke(e,t.toString()),method:"GET"}),i=await fetch(r,n);let s=null;const o=i.headers.get("content-type");if(o&&o.includes("application/json")?s=await i.json():s=await i.text(),!i.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},uf=async(e,t,r)=>{const{fetchPath:n,options:i}=ze({path:e,method:"GET",queryParams:t}),s=await fetch(n,{signal:r,...i});let o=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?o=await s.json():o=await s.text(),!s.ok)throw typeof o=="object"?new Error(typeof o.detail=="string"?o.detail:JSON.stringify(o,null,2)):new Error(o);return o},cf=async(e,t,r)=>{const{fetchPath:n,options:i}=ze({path:ke(e,t.toString()),method:"PUT",body:r}),s=await fetch(n,i);let o=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?o=await s.json():o=await s.text(),!s.ok)throw typeof o=="object"?new Error(typeof o.detail=="string"?o.detail:JSON.stringify(o,null,2)):new Error(o);return o},He=e=>e&&typeof e=="object"?Array.isArray(e)?e.join(","):JSON.stringify(e):e,ff={columns:[],filters:[],page:0,page_size:25};function tn(e,t={}){return Object.entries(t).reduce((r,[n,i])=>i==null?(delete r[n],r):{...r,[n]:i},e||ff)}const Ks=e=>{const t={};for(const r of e)switch(r.type){case"RelatedList":t[r.name]=[];break;case"Boolean":t[r.name]="false";break;case"Date":case"DateTime":case"Integer":case"Float":case"Geometry":case"Raw":case"Related":t[r.name]=void 0;break;default:t[r.name]=""}return t};function Ft(e){this._maxSize=e,this.clear()}Ft.prototype.clear=function(){this._size=0,this._values=Object.create(null)},Ft.prototype.get=function(e){return this._values[e]},Ft.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var df=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Js=/^\d+$/,pf=/^\d/,hf=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,mf=/^\s*(['"]?)(.*?)(\1)\s*$/,ai=512,Xs=new Ft(ai),Zs=new Ft(ai),Qs=new Ft(ai),Rt={Cache:Ft,split:ui,normalizePath:li,setter:function(e){var t=li(e);return Zs.get(e)||Zs.set(e,function(n,i){for(var s=0,o=t.length,a=n;s<o-1;){var u=t[s];if(u==="__proto__"||u==="constructor"||u==="prototype")return n;a=a[t[s++]]}a[t[s]]=i})},getter:function(e,t){var r=li(e);return Qs.get(e)||Qs.set(e,function(i){for(var s=0,o=r.length;s<o;)if(i!=null||!t)i=i[r[s++]];else return;return i})},join:function(e){return e.reduce(function(t,r){return t+(ci(r)||Js.test(r)?"["+r+"]":(t?".":"")+r)},"")},forEach:function(e,t,r){gf(Array.isArray(e)?e:ui(e),t,r)}};function li(e){return Xs.get(e)||Xs.set(e,ui(e).map(function(t){return t.replace(mf,"$2")}))}function ui(e){return e.match(df)||[""]}function gf(e,t,r){var n=e.length,i,s,o,a;for(s=0;s<n;s++)i=e[s],i&&(vf(i)&&(i='"'+i+'"'),a=ci(i),o=!a&&/^\d+$/.test(i),t.call(r,i,a,o,s,e))}function ci(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function yf(e){return e.match(pf)&&!e.match(Js)}function bf(e){return hf.test(e)}function vf(e){return!ci(e)&&(yf(e)||bf(e))}const xf=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,rn=e=>e.match(xf)||[],nn=e=>e[0].toUpperCase()+e.slice(1),fi=(e,t)=>rn(e).join(t).toLowerCase(),eo=e=>rn(e).reduce((t,r)=>`${t}${t?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,"");var di={words:rn,upperFirst:nn,camelCase:eo,pascalCase:e=>nn(eo(e)),snakeCase:e=>fi(e,"_"),kebabCase:e=>fi(e,"-"),sentenceCase:e=>nn(fi(e," ")),titleCase:e=>rn(e).map(nn).join(" ")},pi={exports:{}};pi.exports=function(e){return to(Tf(e),e)},pi.exports.array=to;function to(e,t){var r=e.length,n=new Array(r),i={},s=r,o=_f(t),a=Sf(e);for(t.forEach(function(c){if(!a.has(c[0])||!a.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||u(e[s],s,new Set);return n;function u(c,f,d){if(d.has(c)){var p;try{p=", node was:"+JSON.stringify(c)}catch{p=""}throw new Error("Cyclic dependency"+p)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!i[f]){i[f]=!0;var y=o.get(c)||new Set;if(y=Array.from(y),f=y.length){d.add(c);do{var v=y[--f];u(v,a.get(v),d)}while(f);d.delete(c)}n[--r]=c}}}function Tf(e){for(var t=new Set,r=0,n=e.length;r<n;r++){var i=e[r];t.add(i[0]),t.add(i[1])}return Array.from(t)}function _f(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function Sf(e){for(var t=new Map,r=0,n=e.length;r<n;r++)t.set(e[r],r);return t}var wf=pi.exports;const Ef=wt(wf),Cf=Object.prototype.toString,Af=Error.prototype.toString,Of=RegExp.prototype.toString,jf=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",$f=/^Symbol\((.*)\)(.*)$/;function Pf(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function ro(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return Pf(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return jf.call(e).replace($f,"Symbol($1)");const n=Cf.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Af.call(e)+"]":n==="RegExp"?Of.call(e):null}function st(e,t){let r=ro(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let s=ro(this[n],t);return s!==null?s:i},2)}function no(e){return e==null?[]:[].concat(e)}let io,so,oo,kf=/\$\{\s*(\w+)\s*\}/g;io=Symbol.toStringTag;class ao{constructor(t,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[io]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],no(t).forEach(s=>{if(De.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}so=Symbol.hasInstance,oo=Symbol.toStringTag;class De extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(kf,(i,s)=>st(r[s])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,s){const o=new ao(t,r,n,i);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[oo]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,De)}static[so](t){return ao[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let ot={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${st(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${st(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${st(r,!0)}\``+i}},Ve={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Et={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},hi={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},mi={isValue:"${path} field must be ${value}"},sn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},on={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},lo={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${st(r,!0)}\``;if(r.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${st(r,!0)}\``}return De.formatError(ot.notType,e)}};var uo=Object.assign(Object.create(null),{mixed:ot,string:Ve,number:Et,date:hi,object:sn,array:on,boolean:mi,tuple:lo});const Nt=e=>e&&e.__isYupSchema__;class an{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:s}=r,o=typeof n=="function"?n:(...a)=>a.every(u=>u===n);return new an(t,(a,u)=>{var c;let f=o(...a)?i:s;return(c=f==null?void 0:f(u))!=null?c:u})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(s=>s.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),i=this.fn(n,t,r);if(i===void 0||i===t)return t;if(!Nt(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const ln={context:"$",value:"."};function If(e,t){return new Ct(e,t)}class Ct{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===ln.context,this.isValue=this.key[0]===ln.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?ln.context:this.isValue?ln.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Rt.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let i=this.isContext?n:this.isValue?t:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Ct.prototype.__isYupRef=!0;const et=e=>e==null;function Yt(e){function t({value:r,path:n="",options:i,originalValue:s,schema:o},a,u){const{name:c,test:f,params:d,message:p,skipAbsent:y}=e;let{parent:v,context:h,abortEarly:_=o.spec.abortEarly,disableStackTrace:w=o.spec.disableStackTrace}=i;function O(P){return Ct.isRef(P)?P.getValue(r,v,h):P}function j(P={}){const B=Object.assign({value:r,originalValue:s,label:o.spec.label,path:P.path||n,spec:o.spec,disableStackTrace:P.disableStackTrace||w},d,P.params);for(const te of Object.keys(B))B[te]=O(B[te]);const K=new De(De.formatError(P.message||p,B),r,B.path,P.type||c,B.disableStackTrace);return K.params=B,K}const k=_?a:u;let E={path:n,parent:v,type:c,from:i.from,createError:j,resolve:O,options:i,originalValue:s,schema:o};const $=P=>{De.isError(P)?k(P):P?u(null):k(j())},z=P=>{De.isError(P)?k(P):a(P)};if(y&&et(r))return $(!0);let Q;try{var g;if(Q=f.call(E,r,E),typeof((g=Q)==null?void 0:g.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${E.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(Q).then($,z)}}catch(P){z(P);return}$(Q)}return t.OPTIONS=e,t}function gi(e,t,r,n=r){let i,s,o;return t?(Rt.forEach(t,(a,u,c)=>{let f=u?a.slice(1,a.length-1):a;e=e.resolve({context:n,parent:i,value:r});let d=e.type==="tuple",p=c?parseInt(f,10):0;if(e.innerType||d){if(d&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&p>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[p],e=d?e.spec.types[p]:e.innerType}if(!c){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=r,r=r&&r[f],e=e.fields[f]}s=f,o=u?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}function Df(e,t,r,n){return gi(e,t,r,n).schema}class un extends Set{describe(){const t=[];for(const r of this.values())t.push(Ct.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new un(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function qt(e,t=new Map){if(Nt(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=qt(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,i]of e.entries())r.set(n,qt(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(qt(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=qt(i,t)}else throw Error(`Unable to clone ${e}`);return r}class Re{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new un,this._blacklist=new un,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(ot.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=qt(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,s)=>s.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,s;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),i=r.assert==="ignore-optionality",s=n._cast(t,r);if(r.assert!==!1&&!n.isType(s)){if(i&&et(s))return s;let o=st(t),a=st(s);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
30
|
+
<%s key={someKey} {...props} />`,Me,Ee,et,Ee),Qn[Ee+Me]=!0}}return b===r?ii(I):Zn(I),I}}function Qe(b,D,R){return si(b,D,R,!0)}function yn(b,D,R){return si(b,D,R,!1)}var oi=yn,ai=Qe;xn.Fragment=r,xn.jsx=oi,xn.jsxs=ai}()),xn}process.env.NODE_ENV==="production"?li.exports=zc():li.exports=Bc();var l=li.exports;function ze({path:e,method:t,body:n=void 0,queryParams:r=void 0}){const i=Object.entries(r||{}).reduce((a,[u,c])=>((Array.isArray(c)||typeof c=="object")&&(c=JSON.stringify(c)),a[u]=c,a),{}),s=new It.createSearchParams(i);e=e+"?"+s;const o={method:t,mode:"cors",credentials:"include",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:n?JSON.stringify(n):null};return{fetchPath:e,options:o}}function Uc(e){const t=[];if(e.length===0)return"";if(typeof e[0]!="string")throw new TypeError("Url must be a string. Received "+e[0]);e[0].match(/^[^/:]+:\/*$/)&&e.length>1&&(e[0]=e.shift()+e[0]),e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(let i=0;i<e.length;i++){let s=e[i];if(typeof s!="string")throw new TypeError("Url must be a string. Received "+s);s!==""&&(i>0&&(s=s.replace(/^[\/]+/,"")),i<e.length-1?s=s.replace(/[\/]+$/,""):s=s.replace(/[\/]+$/,"/"),t.push(s))}let n=t.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");const r=n.split("?");return n=r.shift()+(r.length>0?"?":"")+r.join("&"),n}function Ie(...e){const t=Array.from(Array.isArray(e[0])?e[0]:e);return Uc(t)}const Vc=e=>new Proxy(e,{get(t,n){return t(r=>r[n])}}),Wc=(e,t)=>Object.entries(t).reduce((n,[r,i])=>typeof i=="object"&&JSON.stringify(i)===JSON.stringify(e[r])||i===e[r]?n:{...n,[r]:i},{});function Tn(e){const[t]=T.useState(()=>Nc.create(()=>({...e}))),[n]=T.useState(()=>Vc(t));return T.useEffect(()=>{t.setState(r=>Wc(r,e))},[e,t]),n}const Gs=T.createContext({user:null,loading:!1,error:null,signin:async(e,t)=>null,signout:async()=>null,update:async e=>null,resetPassword:async e=>null,oauth_signin:(e,t)=>null,refetch:async()=>null});function Hs(){return T.useContext(Gs)}const Ys=T.createContext({baseUrl:"",info:null,loading:!1,error:null});function qs(){return T.useContext(Ys)}async function Gc(e,{username:t,password:n}){const r=new FormData;r.append("username",t),r.append("password",n);const{fetchPath:i,options:s}=ze({path:Ie(e,"auth/login"),method:"POST"}),o=await fetch(i,{...s,headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(r)});if(!o.ok)throw o.status===400?new Error("Username or password wrong."):new Error("Failed to sign in.")}async function Hc(e){const{fetchPath:t,options:n}=ze({path:Ie(e,"auth/logout"),method:"POST"});if(!(await fetch(t,n)).ok)throw new Error("Failed to sign out.")}async function Yc(e,t,{email:n}){const{fetchPath:r,options:i}=ze({path:Ie(e,"auth/forgot-password"),method:"POST",body:{email:n}}),s=await fetch(r,i);if(!s.ok)throw new Error("Couldn't request token to reset password");const o=await s.json(),{token:a}=o,{fetchPath:u,options:c}=ze({path:Ie(e,"auth/reset-password"),method:"POST",body:{token:a,password:t}});if(!(await fetch(u,c)).ok)throw new Error("Couldn't reset password")}async function qc(e,t,n,r){const i=Ie(e,"auth/login",t);if(n){const a=window.screenLeft+window.outerWidth/2-250,u=window.screenTop+window.outerHeight/2-500/2,c=window.open(i+"?popup=true","auth",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=500, height=500, top=${u}, left=${a}`),f=window.setInterval(function(){c.closed!==!1&&(window.clearInterval(f),r==null||r())},200);window.location.href=Ie(e,"auth/login",t)}}async function Kc(e,t){const{fetchPath:n,options:r}=ze({path:Ie(e,"info/"),method:"GET"}),i=await fetch(n,{signal:t,...r}),s=await i.json();if(!i.ok){const o=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(o)}return s}async function Jc(e,t){const{fetchPath:n,options:r}=ze({path:Ie(e,"auth/user"),method:"GET"}),i=await fetch(n,{signal:t,...r}),s=await i.json();if(!i.ok){const o=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(o)}return s}async function Xc(e,t){const{fetchPath:n,options:r}=ze({path:Ie(e,"auth/user"),method:"PUT",body:t}),i=await fetch(n,r),s=await i.json();if(!i.ok){const o=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(o)}return s}function Zc(e){const t=dt.useQueryClient(),n=dt.useQuery({queryKey:["user"],queryFn:({signal:f})=>Jc(e,f),retry:0}),[r,i]=T.useState(null),s=T.useCallback(({username:f,password:d})=>{i(null),Gc(e,{username:f,password:d}).then(()=>t.invalidateQueries({queryKey:["user"]})).catch(p=>i(p))},[e,t]),o=T.useCallback(()=>{i(null),Hc(e).then(()=>t.resetQueries({queryKey:["user"]})).then(()=>t.resetQueries({queryKey:["info"]})).catch(f=>i(f))},[e,t]),a=T.useCallback(f=>{i(null),Xc(e,f).then(()=>t.invalidateQueries({queryKey:["user"]})).catch(d=>i(d))},[e,t]),u=T.useCallback(f=>{i(null),Yc(e,f,n.data).catch(d=>i(d))},[e,n.data]),c=T.useCallback((f,d)=>qc(e,f,d,()=>t.invalidateQueries({queryKey:["user"]})),[e,t]);return{user:n.isError?null:n.data,loading:n.isFetching,error:r?r.message:null,signin:s,signout:o,update:a,resetPassword:u,oauth_signin:c,refetch:n.refetch}}function Qc(e,t){const n=dt.useQuery({queryKey:["info"],queryFn:({signal:r})=>Kc(e,r),enabled:!1});return T.useEffect(()=>{t.user&&!n.data&&n.refetch()},[t.user,n]),{baseUrl:e,info:n.data,loading:n.isFetching,error:n.error}}function ef(e){const t={baseUrl:new URL(document.baseURI).pathname+"/api/v1",inheritMantineTheme:!1},{baseUrl:n,children:r}={...t,...e},i=Zc(n),s=Tn(i),o=Qc(n,i),a=Tn(o);return l.jsx(Gs.Provider,{value:s,children:l.jsx(Ys.Provider,{value:a,children:r})})}function tf(e){const[t]=T.useState(()=>new dt.QueryClient);return l.jsx(dt.QueryClientProvider,{client:t,children:l.jsx(ef,{...e})})}const Ks=T.createContext({bulkActions:{selectedIds:[],setSelectedIds:()=>{}},dispatchBulkActions:async(e,t)=>{},error:null});function nf(){const e=T.useContext(Ks);if(e===void 0)throw new Error("useBulkActions must be used within a ApiProvider");return e}const rf=async(e,t)=>{const{fetchPath:n,options:r}=ze({path:Ie(e,"/"),method:"POST",body:t}),i=await fetch(n,r);let s=null;const o=i.headers.get("content-type");if(o&&o.includes("application/json")?s=await i.json():s=await i.text(),!i.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},sf=async(e,t)=>{const{fetchPath:n,options:r}=ze({path:Ie(e,t.toString()),method:"DELETE"}),i=await fetch(n,r);let s=null;const o=i.headers.get("content-type");if(o&&o.includes("application/json")?s=await i.json():s=await i.text(),!i.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},of=async(e,t)=>{const{fetchPath:n,options:r}=ze({path:e,method:"GET"}),i=await fetch(n,{signal:t,...r}),s=await i.json();if(!i.ok){const o=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(o)}return s},af=async(e,t)=>{const{fetchPath:n,options:r}=ze({path:Ie(e,t.toString()),method:"GET"}),i=await fetch(n,r);let s=null;const o=i.headers.get("content-type");if(o&&o.includes("application/json")?s=await i.json():s=await i.text(),!i.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},lf=async(e,t,n)=>{const{fetchPath:r,options:i}=ze({path:e,method:"GET",queryParams:t}),s=await fetch(r,{signal:n,...i});let o=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?o=await s.json():o=await s.text(),!s.ok)throw typeof o=="object"?new Error(typeof o.detail=="string"?o.detail:JSON.stringify(o,null,2)):new Error(o);return o},uf=async(e,t,n)=>{const{fetchPath:r,options:i}=ze({path:Ie(e,t.toString()),method:"PUT",body:n}),s=await fetch(r,i);let o=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?o=await s.json():o=await s.text(),!s.ok)throw typeof o=="object"?new Error(typeof o.detail=="string"?o.detail:JSON.stringify(o,null,2)):new Error(o);return o},He=e=>e&&typeof e=="object"?Array.isArray(e)?e.join(","):JSON.stringify(e):e,cf={columns:[],filters:[],page:0,page_size:25};function tr(e,t={}){return Object.entries(t).reduce((n,[r,i])=>i==null?(delete n[r],n):{...n,[r]:i},e||cf)}const Js=e=>{const t={};for(const n of e)switch(n.type){case"RelatedList":t[n.name]=[];break;case"Boolean":t[n.name]="false";break;case"Date":case"DateTime":case"Integer":case"Float":case"Geometry":case"Raw":case"Related":t[n.name]=void 0;break;default:t[n.name]=""}return t};function Mt(e){this._maxSize=e,this.clear()}Mt.prototype.clear=function(){this._size=0,this._values=Object.create(null)},Mt.prototype.get=function(e){return this._values[e]},Mt.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var ff=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Xs=/^\d+$/,df=/^\d/,pf=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,hf=/^\s*(['"]?)(.*?)(\1)\s*$/,ui=512,Zs=new Mt(ui),Qs=new Mt(ui),eo=new Mt(ui),Ft={Cache:Mt,split:fi,normalizePath:ci,setter:function(e){var t=ci(e);return Qs.get(e)||Qs.set(e,function(r,i){for(var s=0,o=t.length,a=r;s<o-1;){var u=t[s];if(u==="__proto__"||u==="constructor"||u==="prototype")return r;a=a[t[s++]]}a[t[s]]=i})},getter:function(e,t){var n=ci(e);return eo.get(e)||eo.set(e,function(i){for(var s=0,o=n.length;s<o;)if(i!=null||!t)i=i[n[s++]];else return;return i})},join:function(e){return e.reduce(function(t,n){return t+(di(n)||Xs.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){mf(Array.isArray(e)?e:fi(e),t,n)}};function ci(e){return Zs.get(e)||Zs.set(e,fi(e).map(function(t){return t.replace(hf,"$2")}))}function fi(e){return e.match(ff)||[""]}function mf(e,t,n){var r=e.length,i,s,o,a;for(s=0;s<r;s++)i=e[s],i&&(bf(i)&&(i='"'+i+'"'),a=di(i),o=!a&&/^\d+$/.test(i),t.call(n,i,a,o,s,e))}function di(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function gf(e){return e.match(df)&&!e.match(Xs)}function yf(e){return pf.test(e)}function bf(e){return!di(e)&&(gf(e)||yf(e))}const vf=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,nr=e=>e.match(vf)||[],rr=e=>e[0].toUpperCase()+e.slice(1),pi=(e,t)=>nr(e).join(t).toLowerCase(),to=e=>nr(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,"");var hi={words:nr,upperFirst:rr,camelCase:to,pascalCase:e=>rr(to(e)),snakeCase:e=>pi(e,"_"),kebabCase:e=>pi(e,"-"),sentenceCase:e=>rr(pi(e," ")),titleCase:e=>nr(e).map(rr).join(" ")},mi={exports:{}};mi.exports=function(e){return no(xf(e),e)},mi.exports.array=no;function no(e,t){var n=e.length,r=new Array(n),i={},s=n,o=Tf(t),a=_f(e);for(t.forEach(function(c){if(!a.has(c[0])||!a.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||u(e[s],s,new Set);return r;function u(c,f,d){if(d.has(c)){var p;try{p=", node was:"+JSON.stringify(c)}catch{p=""}throw new Error("Cyclic dependency"+p)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!i[f]){i[f]=!0;var y=o.get(c)||new Set;if(y=Array.from(y),f=y.length){d.add(c);do{var v=y[--f];u(v,a.get(v),d)}while(f);d.delete(c)}r[--n]=c}}}function xf(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}function Tf(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function _f(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var Sf=mi.exports;const wf=Et(Sf),Ef=Object.prototype.toString,Cf=Error.prototype.toString,Af=RegExp.prototype.toString,Of=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",jf=/^Symbol\((.*)\)(.*)$/;function $f(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function ro(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return $f(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return Of.call(e).replace(jf,"Symbol($1)");const r=Ef.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+Cf.call(e)+"]":r==="RegExp"?Af.call(e):null}function at(e,t){let n=ro(e,t);return n!==null?n:JSON.stringify(e,function(r,i){let s=ro(this[r],t);return s!==null?s:i},2)}function io(e){return e==null?[]:[].concat(e)}let so,oo,ao,Pf=/\$\{\s*(\w+)\s*\}/g;so=Symbol.toStringTag;class lo{constructor(t,n,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[so]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=i,this.errors=[],this.inner=[],io(t).forEach(s=>{if(De.isError(s)){this.errors.push(...s.errors);const o=s.inner.length?s.inner:[s];this.inner.push(...o)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}oo=Symbol.hasInstance,ao=Symbol.toStringTag;class De extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(Pf,(i,s)=>at(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,i,s){const o=new lo(t,n,r,i);if(s)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[ao]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,De)}static[oo](t){return lo[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let lt={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=r!=null&&r!==n?` (cast from the value \`${at(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${at(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${at(n,!0)}\``+i}},We={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Ct={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},gi={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},yi={isValue:"${path} field must be ${value}"},ir={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},sr={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},uo={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${at(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${at(n,!0)}\``}return De.formatError(lt.notType,e)}};var co=Object.assign(Object.create(null),{mixed:lt,string:We,number:Ct,date:gi,object:ir,array:sr,boolean:yi,tuple:uo});const Rt=e=>e&&e.__isYupSchema__;class or{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:s}=n,o=typeof r=="function"?r:(...a)=>a.every(u=>u===r);return new or(t,(a,u)=>{var c;let f=o(...a)?i:s;return(c=f==null?void 0:f(u))!=null?c:u})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),i=this.fn(r,t,n);if(i===void 0||i===t)return t;if(!Rt(i))throw new TypeError("conditions must return a schema object");return i.resolve(n)}}const ar={context:"$",value:"."};function kf(e,t){return new At(e,t)}class At{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===ar.context,this.isValue=this.key[0]===ar.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?ar.context:this.isValue?ar.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Ft.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let i=this.isContext?r:this.isValue?t:n;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}At.prototype.__isYupRef=!0;const tt=e=>e==null;function Ht(e){function t({value:n,path:r="",options:i,originalValue:s,schema:o},a,u){const{name:c,test:f,params:d,message:p,skipAbsent:y}=e;let{parent:v,context:h,abortEarly:_=o.spec.abortEarly,disableStackTrace:w=o.spec.disableStackTrace}=i;function O(P){return At.isRef(P)?P.getValue(n,v,h):P}function j(P={}){const B=Object.assign({value:n,originalValue:s,label:o.spec.label,path:P.path||r,spec:o.spec,disableStackTrace:P.disableStackTrace||w},d,P.params);for(const te of Object.keys(B))B[te]=O(B[te]);const J=new De(De.formatError(P.message||p,B),n,B.path,P.type||c,B.disableStackTrace);return J.params=B,J}const k=_?a:u;let E={path:r,parent:v,type:c,from:i.from,createError:j,resolve:O,options:i,originalValue:s,schema:o};const $=P=>{De.isError(P)?k(P):P?u(null):k(j())},z=P=>{De.isError(P)?k(P):a(P)};if(y&&tt(n))return $(!0);let Q;try{var g;if(Q=f.call(E,n,E),typeof((g=Q)==null?void 0:g.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${E.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(Q).then($,z)}}catch(P){z(P);return}$(Q)}return t.OPTIONS=e,t}function bi(e,t,n,r=n){let i,s,o;return t?(Ft.forEach(t,(a,u,c)=>{let f=u?a.slice(1,a.length-1):a;e=e.resolve({context:r,parent:i,value:n});let d=e.type==="tuple",p=c?parseInt(f,10):0;if(e.innerType||d){if(d&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(n&&p>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[p],e=d?e.spec.types[p]:e.innerType}if(!c){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=n,n=n&&n[f],e=e.fields[f]}s=f,o=u?"["+a+"]":"."+a}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}function If(e,t,n,r){return bi(e,t,n,r).schema}class lr extends Set{describe(){const t=[];for(const n of this.values())t.push(At.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new lr(this.values())}merge(t,n){const r=this.clone();return t.forEach(i=>r.add(i)),n.forEach(i=>r.delete(i)),r}}function Yt(e,t=new Map){if(Rt(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Yt(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,Yt(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Yt(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Yt(i,t)}else throw Error(`Unable to clone ${e}`);return n}class Re{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new lr,this._blacklist=new lr,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(lt.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Yt(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const i=Object.assign({},n.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(s=>{t.tests.forEach(o=>{s.test(o.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((i,s)=>s.resolve(i,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,i,s;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),i=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(i&&tt(s))return s;let o=at(t),a=at(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
|
|
31
31
|
|
|
32
32
|
attempted value: ${o}
|
|
33
|
-
`+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=r,u=t;a||(u=this._cast(u,Object.assign({assert:!1},r)));let c=[];for(let f of Object.values(this.internalTests))f&&c.push(f);this.runTests({path:s,value:u,originalValue:o,options:r,tests:c},n,f=>{if(f.length)return i(f,u);this.runTests({path:s,value:u,originalValue:o,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:s,value:o,originalValue:a,path:u,options:c}=t,f=h=>{i||(i=!0,r(h,o))},d=h=>{i||(i=!0,n(h,o))},p=s.length,y=[];if(!p)return d([]);let v={value:o,originalValue:a,path:u,options:c,schema:this};for(let h=0;h<s.length;h++){const _=s[h];_(v,f,function(O){O&&(Array.isArray(O)?y.push(...O):y.push(O)),--p<=0&&d(y)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:s,options:o}){const a=t??r;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof a=="number";let c=n[a];const f=Object.assign({},o,{strict:!0,parent:n,value:c,originalValue:s[a],key:void 0,[u?"index":"key"]:a,path:u||a.includes(".")?`${i||""}[${u?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(d,p,y)=>this.resolve(f)._validate(c,f,p,y)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),s=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,r,(u,c)=>{De.isError(u)&&(u.value=c),a(u)},(u,c)=>{u.length?a(new De(u,c,void 0,void 0,s)):o(c)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),s,o=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(a,u)=>{throw De.isError(a)&&(a.value=u),a},(a,u)=>{if(a.length)throw new De(a,t,void 0,void 0,o);s=u}),s}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(De.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(De.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):qt(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Yt({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Yt({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=ot.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=ot.notNull){return this.nullability(!1,t)}required(t=ot.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=ot.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=Yt(r),s=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(o=>!(o.OPTIONS.name===r.name&&(s||o.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=no(t).map(s=>new Ct(s));return i.forEach(s=>{s.isSibling&&n.deps.push(s.key)}),n.conditions.push(typeof r=="function"?new an(i,r):an.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Yt({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=ot.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=Yt({message:r,name:"oneOf",skipAbsent:!0,test(i){let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:o}})}}),n}notOneOf(t,r=ot.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=Yt({message:r,name:"notOneOf",test(i){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:s,nullable:o}=r.spec;return{meta:i,label:n,optional:s,nullable:o,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,c,f)=>f.findIndex(d=>d.name===u.name)===c)}}}Re.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Re.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:s,schema:o}=gi(this,t,r,n.context);return o[e](i&&i[s],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])Re.prototype[e]=Re.prototype.oneOf;for(const e of["not","nope"])Re.prototype[e]=Re.prototype.notOneOf;const Mf=()=>!0;function cn(e){return new yi(e)}class yi extends Re{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Mf},t))}}cn.prototype=yi.prototype;function bi(){return new vi}class vi extends Re{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=mi.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return et(r)||r===!0}})}isFalse(t=mi.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return et(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}bi.prototype=vi.prototype;const Ff=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Rf(e){const t=xi(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function xi(e){var t,r;const n=Ff.exec(e);return n?{year:ft(n[1]),month:ft(n[2],1)-1,day:ft(n[3],1),hour:ft(n[4]),minute:ft(n[5]),second:ft(n[6]),millisecond:n[7]?ft(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:ft(n[10]),minuteOffset:ft(n[11])}:null}function ft(e,t=0){return Number(e)||t}let Nf=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Lf=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,zf=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Bf="^\\d{4}-\\d{2}-\\d{2}",Uf="\\d{2}:\\d{2}:\\d{2}",Vf="(([+-]\\d{2}(:?\\d{2})?)|Z)",Wf=new RegExp(`${Bf}T${Uf}(\\.\\d+)?${Vf}$`),Gf=e=>et(e)||e===e.trim(),Hf={}.toString();function fn(){return new Ti}class Ti extends Re{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===Hf?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||ot.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=Ve.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=Ve.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=Ve.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,i,s;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:s}=r:i=r),this.test({name:s||"matches",message:i||Ve.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=Ve.email){return this.matches(Nf,{name:"email",message:t,excludeEmptyString:!0})}url(t=Ve.url){return this.matches(Lf,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Ve.uuid){return this.matches(zf,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,i;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=t:r=t),this.matches(Wf,{name:"datetime",message:r||Ve.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Ve.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:s=>{if(!s||n)return!0;const o=xi(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:r||Ve.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=xi(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Ve.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Gf})}lowercase(t=Ve.lowercase){return this.transform(r=>et(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>et(r)||r===r.toLowerCase()})}uppercase(t=Ve.uppercase){return this.transform(r=>et(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>et(r)||r===r.toUpperCase()})}}fn.prototype=Ti.prototype;let Yf=e=>e!=+e;function co(){return new _i}class _i extends Re{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Yf(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return n.isType(i)||i===null?i:parseFloat(i)})})}min(t,r=Et.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Et.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Et.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Et.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Et.positive){return this.moreThan(0,t)}negative(t=Et.negative){return this.lessThan(0,t)}integer(t=Et.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>et(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>et(i)?i:Math[t](i))}}co.prototype=_i.prototype;let fo=new Date(""),qf=e=>Object.prototype.toString.call(e)==="[object Date]";function Si(){return new Kt}class Kt extends Re{constructor(){super({type:"date",check(t){return qf(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=Rf(t),isNaN(t)?Kt.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Ct.isRef(t))n=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(t,r=hi.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(t,r=hi.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}Kt.INVALID_DATE=fo,Si.prototype=Kt.prototype,Si.INVALID_DATE=fo;function Kf(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let u=Rt.split(o)[0];n.add(u),i.has(`${a}-${u}`)||r.push([a,u])}for(const o of Object.keys(e)){let a=e[o];n.add(o),Ct.isRef(a)&&a.isSibling?s(a.path,o):Nt(a)&&"deps"in a&&a.deps.forEach(u=>s(u,o))}return Ef.array(Array.from(n),r).reverse()}function po(e,t){let r=1/0;return e.some((n,i)=>{var s;if((s=t.path)!=null&&s.includes(n))return r=i,!0}),r}function ho(e){return(t,r)=>po(e,t)-po(e,r)}const mo=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function dn(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=dn(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=dn(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(dn)}):"optional"in e?e.optional():e}const Jf=(e,t)=>{const r=[...Rt.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=Rt.getter(Rt.join(r),!0)(e);return!!(i&&n in i)};let go=e=>Object.prototype.toString.call(e)==="[object Object]";function yo(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Xf=ho([]);function wr(e){return new wi(e)}class wi extends Re{constructor(t){super({type:"object",check(r){return go(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Xf,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let s=this.fields,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(d=>!this._nodes.includes(d))),u={},c=Object.assign({},r,{parent:u,__validating:r.__validating||!1}),f=!1;for(const d of a){let p=s[d],y=d in i;if(p){let v,h=i[d];c.path=(r.path?`${r.path}.`:"")+d,p=p.resolve({value:h,context:r.context,parent:u});let _=p instanceof Re?p.spec:void 0,w=_==null?void 0:_.strict;if(_!=null&&_.strip){f=f||d in i;continue}v=!r.__validating||!w?p.cast(i[d],c):i[d],v!==void 0&&(u[d]=v)}else y&&!o&&(u[d]=i[d]);(y!==d in u||u[d]!==i[d])&&(f=!0)}return f?u:i}_validate(t,r={},n,i){let{from:s=[],originalValue:o=t,recursive:a=this.spec.recursive}=r;r.from=[{schema:this,value:o},...s],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(u,c)=>{if(!a||!go(c)){i(u,c);return}o=o||c;let f=[];for(let d of this._nodes){let p=this.fields[d];!p||Ct.isRef(p)||f.push(p.asNestedTest({options:r,key:d,parent:c,parentPath:r.path,originalParent:o}))}this.runTests({tests:f,value:c,originalValue:o,options:r},n,d=>{i(d.sort(this._sortErrors).concat(u),c)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,s]of Object.entries(this.fields)){const o=n[i];n[i]=o===void 0?s:o}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const s=this.fields[n];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=s&&"getDefault"in s?s.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Kf(t,r),n._sortErrors=ho(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),i)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return dn(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>t.includes(n)&&t.includes(i)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let i=Rt.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return Jf(s,t)&&(o=Object.assign({},s),n||delete o[t],o[r]=i(s)),o})}json(){return this.transform(mo)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||sn.exact,test(r){if(r==null)return!0;const n=yo(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=sn.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const s=yo(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=sn.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(di.camelCase)}snakeCase(){return this.transformKeys(di.snakeCase)}constantCase(){return this.transformKeys(t=>di.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[s,o]of Object.entries(r.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),n.fields[s]=o.describe(a)}return n}}wr.prototype=wi.prototype;function Ei(e){return new Ci(e)}class Ci extends Re{constructor(t){super({type:"array",spec:{types:t},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=t}_cast(t,r){const n=super._cast(t,r);if(!this._typeCheck(n)||!this.innerType)return n;let i=!1;const s=n.map((o,a)=>{const u=this.innerType.cast(o,Object.assign({},r,{path:`${r.path||""}[${a}]`}));return u!==o&&(i=!0),u});return i?s:n}_validate(t,r={},n,i){var s;let o=this.innerType,a=(s=r.recursive)!=null?s:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(u,c)=>{var f;if(!a||!o||!this._typeCheck(c)){i(u,c);return}let d=new Array(c.length);for(let y=0;y<c.length;y++){var p;d[y]=o.asNestedTest({options:r,index:y,parent:c,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p:t})}this.runTests({value:c,tests:d,originalValue:(f=r.originalValue)!=null?f:t,options:r},n,y=>i(y.concat(u),c))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(mo)}concat(t){let r=super.concat(t);return r.innerType=this.innerType,t.innerType&&(r.innerType=r.innerType?r.innerType.concat(t.innerType):t.innerType),r}of(t){let r=this.clone();if(!Nt(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+st(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=on.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r){return r=r||on.min,this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r){return r=r||on.max,this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,r)=>this._typeCheck(t)?t:r==null?[]:[].concat(r))}compact(t){let r=t?(n,i,s)=>!t(n,i,s):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);if(r.innerType){var i;let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[0]})),n.innerType=r.innerType.describe(s)}return n}}Ei.prototype=Ci.prototype;function bo(e){return new Ai(e)}class Ai extends Re{constructor(t){super({type:"tuple",spec:{types:t},check(r){const n=this.spec.types;return Array.isArray(r)&&r.length===n.length}}),this.withMutation(()=>{this.typeError(lo.notType)})}_cast(t,r){const{types:n}=this.spec,i=super._cast(t,r);if(!this._typeCheck(i))return i;let s=!1;const o=n.map((a,u)=>{const c=a.cast(i[u],Object.assign({},r,{path:`${r.path||""}[${u}]`}));return c!==i[u]&&(s=!0),c});return s?o:i}_validate(t,r={},n,i){let s=this.spec.types;super._validate(t,r,n,(o,a)=>{var u;if(!this._typeCheck(a)){i(o,a);return}let c=[];for(let[d,p]of s.entries()){var f;c[d]=p.asNestedTest({options:r,index:d,parent:a,parentPath:r.path,originalParent:(f=r.originalValue)!=null?f:t})}this.runTests({value:a,tests:c,originalValue:(u=r.originalValue)!=null?u:t,options:r},n,d=>i(d.concat(o),a))})}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);return n.innerType=r.spec.types.map((i,s)=>{var o;let a=t;return(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),i.describe(a)}),n}}bo.prototype=Ai.prototype;function Zf(e){return new pn(e)}function vo(e){try{return e()}catch(t){if(De.isError(t))return Promise.reject(t);throw t}}class pn{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(r,n={})=>{let i=this.builder(r,n);if(!Nt(i))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(i=i.optional()),i.resolve(n)},this.builder=t,this.spec={meta:void 0,optional:!1}}clone(t){const r=new pn(this.builder);return r.spec=Object.assign({},this.spec,t),r}optionality(t){return this.clone({optional:t})}optional(){return this.optionality(!0)}resolve(t){return this._resolve(t.value,t)}cast(t,r){return this._resolve(t,r).cast(t,r)}asNestedTest(t){let{key:r,index:n,parent:i,options:s}=t,o=i[n??r];return this._resolve(o,Object.assign({},s,{value:o,parent:i})).asNestedTest(t)}validate(t,r){return vo(()=>this._resolve(t,r).validate(t,r))}validateSync(t,r){return this._resolve(t,r).validateSync(t,r)}validateAt(t,r,n){return vo(()=>this._resolve(r,n).validateAt(t,r,n))}validateSyncAt(t,r,n){return this._resolve(r,n).validateSyncAt(t,r,n)}isValid(t,r){try{return this._resolve(t,r).isValid(t,r)}catch(n){if(De.isError(n))return Promise.resolve(!1);throw n}}isValidSync(t,r){return this._resolve(t,r).isValidSync(t,r)}describe(t){return t?this.resolve(t).describe(t):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}}function Qf(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(r=>{uo[t][r]=e[t][r]})})}function ed(e,t,r){if(!e||!Nt(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof t!="string")throw new TypeError("A Method name must be provided");if(typeof r!="function")throw new TypeError("Method function must be provided");e.prototype[t]=r}const xo=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:Ci,BooleanSchema:vi,DateSchema:Kt,LazySchema:pn,MixedSchema:yi,NumberSchema:_i,ObjectSchema:wi,Schema:Re,StringSchema:Ti,TupleSchema:Ai,ValidationError:De,addMethod:ed,array:Ei,bool:bi,boolean:bi,date:Si,defaultLocale:uo,getIn:gi,isSchema:Nt,lazy:Zf,mixed:cn,number:co,object:wr,printValue:st,reach:Df,ref:If,setLocale:Qf,string:fn,tuple:bo},Symbol.toStringTag,{value:"Module"})),To=e=>{const t=e.reduce((r,n)=>{let{name:i,required:s,type:o}=n;switch(o){case"RelatedList":o="array";break;case"Integer":case"Float":o="number";break;case"Related":case"Geometry":case"Raw":o="mixed";break;default:o="string"}let a;try{s?a=xo[o]().typeError(`Field must be of type ${o}`).required("Field is required"):a=xo[o]().typeError(`Field must be of type ${o}`).nullable(!0)}catch(u){console.log(u)}return r[i]=a,r},{});return wr().shape(t)},_o=e=>!e&&typeof e!="boolean"&&typeof e!="number"?null:typeof e=="boolean"?e.toString():Array.isArray(e)?e.map(t=>t.name_||JSON.stringify(t,null,2)).join(", "):typeof e=="object"?e.name_||JSON.stringify(e):e,td=e=>e?{...e,add:{columns:e.add_columns,title:e.add_title,schema:To(e.add_columns),defaultValues:Ks(e.add_columns)},edit:{columns:e.edit_columns,title:e.edit_title,schema:To(e.edit_columns),defaultValues:Ks(e.edit_columns)}}:null,rd=async(e,t,r)=>{const{fetchPath:n,options:i}=ze({path:ke(t,"/download"),method:"POST"}),s=await fetch(n,{...i,body:JSON.stringify(r)});let o=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?o=await s.json():o=await s.blob(),!s.ok)throw typeof o=="object"?new Error(typeof o.detail=="string"?o.detail:JSON.stringify(o,null,2)):new Error(o);const u=document.createElement("a"),c=URL.createObjectURL(o);u.href=c,u.download=e.toLowerCase()+".csv",u.click()};function nd({path:e,initialQueryParams:t,relation:r,fetchInfo:n=!0,clearInfoOnRefetch:i=!1,clearDataOnRefetch:s=!1,resetQueryParamsOnPathChange:o=!0,infoQueryProps:a,dataQueryProps:u,streaming:c=!1}){const[f,d]=T.useState(t?tn(null,t):null),p=T.useMemo(()=>r?{...f,filters:[...f.filters,{col:r.foreign_key,opr:r.type,value:He(r.id)}]}:f,[r,f]),y=T.useCallback(H=>d(S=>{if(typeof H=="function"&&(H=H(S)),!S)return tn(null,H);const A=tn({...S},H);if((H.filters||H.order_column||H.order_direction)&&!H.page&&(A.page=0),c){if(H.page&&H.page!==S.page&&!H.streaming)throw new Error("You cannot change page in streaming mode, use streaming.fetch() instead");if(H.page_size&&H.page_size!==S.page_size)throw new Error("You cannot change page size in streaming mode, use streaming.fetch() instead")}return A}),[c]),[v,h]=T.useState(null),_=T.useMemo(()=>v,[v]),w=T.useCallback(()=>h(null),[]),{data:O,isFetching:j,refetch:k,error:E}=ct.useQuery({queryKey:[`info-${e}`],queryFn:({signal:H})=>af(ke(e,"_info"),H).then(td),enabled:n,placeholderData:i?null:ct.keepPreviousData,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,...a}),{data:$,isFetching:z,refetch:q,error:Q}=ct.useQuery({queryKey:[`data-${e}`,JSON.stringify(p)],queryFn:({signal:H})=>p?uf(ke(e,"/"),p,H).then(S=>({...S,result:S.result.map((A,V)=>({...A,id:S.ids[V]}))})):null,placeholderData:s?null:ct.keepPreviousData,staleTime:1/0,refetchOnReconnect:"always",refetchOnWindowFocus:"always",...u});T.useEffect(()=>{p&&q()},[q,p]),T.useEffect(()=>{if(E){h({message:"Couldn't fetch info",originalError:E});return}if(Q){h({message:"Couldn't fetch list",originalError:Q});return}w()},[E,Q,w]);const g=T.useMemo(()=>j||z,[j,z]);Pe.useDidUpdate(()=>{if(!o)return;const H=tn(null,t);f!=null&&f.page_size&&(H.page_size=f.page_size),y(H)},[e]);const P=T.useCallback(async H=>{try{const S=await lf(e,He(H));return w(),S}catch(S){h({message:`Couldn't fetch item with id ${H}`,originalError:S})}},[e,w]),B=T.useCallback(async(H,S)=>{try{const A=await sf(e,H);return S||(k(),q()),w(),A}catch(A){h({message:"Couldn't add item",originalError:A})}},[q,k,e,w]),K=T.useCallback(async(H,S,A)=>{try{const V=await cf(e,He(H),S);return A||(k(),q()),w(),V}catch(V){h({message:`Couldn't update item with id ${H}`,originalError:V})}},[q,k,e,w]),te=T.useCallback(async(H,S)=>{try{const A=await of(e,He(H));return S||(k(),q()),w(),A}catch(A){h({message:`Couldn't delete item with id ${H}`,originalError:A})}},[q,k,e,w]),pe=T.useCallback(async H=>{try{await rd(H,e,p)}catch(S){h({message:"Couldn't download",originalError:S})}},[e,p]),[he,Te]=Pe.useSetState({data:{},isEnd:!1,fetch:()=>null});T.useEffect(()=>{c&&Te({fetch:()=>y({page:0,streaming:!0})})},[y,Te,c]),T.useEffect(()=>{c&&$&&Te(H=>{let S=Object.keys(H.data).length;const A={isEnd:!1};return p.page<S?(S=p.page,A.data={[p.page]:$.result}):A.data={...H.data,[p.page]:$.result},$.result.length<p.page_size?(A.isEnd=!0,A.fetch=()=>null):A.fetch=()=>y({page:S+1,streaming:!0}),A})},[$,y,Te,c]);const je=T.useMemo(()=>{const H={all:"all",actions:"actions"};return $==null||$.list_columns.forEach(S=>{H[S]&&(H[S]=`_${S}`)}),H},[$==null?void 0:$.list_columns]);return{path:e,data:$,info:O,queryParams:p,loading:g,error:_,streaming:he,specialKey:je,setQueryParams:y,refetch:q,refetchInfo:k,getEntry:P,addEntry:B,updateEntry:K,deleteEntry:te,download:pe}}const id=async(e,t,r)=>{const{fetchPath:n,options:i}=ze({path:ke(e,"/bulk",t),method:"POST",body:r}),s=await fetch(n,i);let o=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?o=await s.json():o=await s.text(),!s.ok)throw typeof o=="object"?new Error(typeof o.detail=="string"?o.detail:JSON.stringify(o,null,2)):new Error(o);return o},sd=({Api:e})=>{const[t,r]=T.useState([]),[n,i]=T.useState(null),s=T.useCallback(async(a,u)=>{try{i(null);const c=await id(e.path,a,t);return u?void 0:(e.refetch(),c)}catch(c){console.error(c),i({message:"Couldn't perform bulk action",originalError:c})}},[e,t]);return{bulkActions:T.useMemo(()=>({selectedIds:t,setSelectedIds:r}),[t,r]),dispatchBulkActions:s,error:n}};function So({resource_name:e="",initialQueryParams:t,relation:r,fetchInfo:n,clearInfoOnRefetch:i,clearDataOnRefetch:s,resetQueryParamsOnPathChange:o,infoQueryProps:a,dataQueryProps:u,children:c,streaming:f}){const{baseUrl:d}=Ys(),p=nd({path:ke(d,e),initialQueryParams:t,relation:r,fetchInfo:n,clearInfoOnRefetch:i,clearDataOnRefetch:s,resetQueryParamsOnPathChange:o,infoQueryProps:a,dataQueryProps:u,streaming:f}),y=Sr(p),v=sd({path:ke(d,e),Api:p}),h=Sr(v);return l.jsx(Bs.Provider,{value:y,children:l.jsx(qs.Provider,{value:h,children:c})})}/**
|
|
34
|
-
* @license @tabler/icons-react v3.
|
|
33
|
+
`+(a!==o?`result of cast: ${a}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,i){let{path:s,originalValue:o=t,strict:a=this.spec.strict}=n,u=t;a||(u=this._cast(u,Object.assign({assert:!1},n)));let c=[];for(let f of Object.values(this.internalTests))f&&c.push(f);this.runTests({path:s,value:u,originalValue:o,options:n,tests:c},r,f=>{if(f.length)return i(f,u);this.runTests({path:s,value:u,originalValue:o,options:n,tests:this.tests},r,i)})}runTests(t,n,r){let i=!1,{tests:s,value:o,originalValue:a,path:u,options:c}=t,f=h=>{i||(i=!0,n(h,o))},d=h=>{i||(i=!0,r(h,o))},p=s.length,y=[];if(!p)return d([]);let v={value:o,originalValue:a,path:u,options:c,schema:this};for(let h=0;h<s.length;h++){const _=s[h];_(v,f,function(O){O&&(Array.isArray(O)?y.push(...O):y.push(O)),--p<=0&&d(y)})}}asNestedTest({key:t,index:n,parent:r,parentPath:i,originalParent:s,options:o}){const a=t??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof a=="number";let c=r[a];const f=Object.assign({},o,{strict:!0,parent:r,value:c,originalValue:s[a],key:void 0,[u?"index":"key"]:a,path:u||a.includes(".")?`${i||""}[${u?a:`"${a}"`}]`:(i?`${i}.`:"")+t});return(d,p,y)=>this.resolve(f)._validate(c,f,p,y)}validate(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return new Promise((o,a)=>i._validate(t,n,(u,c)=>{De.isError(u)&&(u.value=c),a(u)},(u,c)=>{u.length?a(new De(u,c,void 0,void 0,s)):o(c)}))}validateSync(t,n){var r;let i=this.resolve(Object.assign({},n,{value:t})),s,o=(r=n==null?void 0:n.disableStackTrace)!=null?r:i.spec.disableStackTrace;return i._validate(t,Object.assign({},n,{sync:!0}),(a,u)=>{throw De.isError(a)&&(a.value=u),a},(a,u)=>{if(a.length)throw new De(a,t,void 0,void 0,o);s=u}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(De.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(De.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Yt(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Ht({message:n,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Ht({message:n,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=lt.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=lt.notNull){return this.nullability(!1,t)}required(t=lt.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=lt.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=Ht(n),s=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(o=>!(o.OPTIONS.name===n.name&&(s||o.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),i=io(t).map(s=>new At(s));return i.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new or(i,n):or.fromOptions(i,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Ht({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=lt.oneOf){let r=this.clone();return t.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r.internalTests.whiteList=Ht({message:n,name:"oneOf",skipAbsent:!0,test(i){let s=this.schema._whitelist,o=s.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:o}})}}),r}notOneOf(t,n=lt.notOneOf){let r=this.clone();return t.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r.internalTests.blacklist=Ht({message:n,name:"notOneOf",test(i){let s=this.schema._blacklist,o=s.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:o}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:s,nullable:o}=n.spec;return{meta:i,label:r,optional:s,nullable:o,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,c,f)=>f.findIndex(d=>d.name===u.name)===c)}}}Re.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Re.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:o}=bi(this,t,n,r.context);return o[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])Re.prototype[e]=Re.prototype.oneOf;for(const e of["not","nope"])Re.prototype[e]=Re.prototype.notOneOf;const Df=()=>!0;function ur(e){return new vi(e)}class vi extends Re{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Df},t))}}ur.prototype=vi.prototype;function xi(){return new Ti}class Ti extends Re{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=yi.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return tt(n)||n===!0}})}isFalse(t=yi.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return tt(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}xi.prototype=Ti.prototype;const Mf=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Ff(e){const t=_i(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function _i(e){var t,n;const r=Mf.exec(e);return r?{year:pt(r[1]),month:pt(r[2],1)-1,day:pt(r[3],1),hour:pt(r[4]),minute:pt(r[5]),second:pt(r[6]),millisecond:r[7]?pt(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:pt(r[10]),minuteOffset:pt(r[11])}:null}function pt(e,t=0){return Number(e)||t}let Rf=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Nf=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Lf=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,zf="^\\d{4}-\\d{2}-\\d{2}",Bf="\\d{2}:\\d{2}:\\d{2}",Uf="(([+-]\\d{2}(:?\\d{2})?)|Z)",Vf=new RegExp(`${zf}T${Bf}(\\.\\d+)?${Uf}$`),Wf=e=>tt(e)||e===e.trim(),Gf={}.toString();function cr(){return new Si}class Si extends Re{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===Gf?t:i})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||lt.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=We.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=We.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=We.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,i,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:i,name:s}=n:i=n),this.test({name:s||"matches",message:i||We.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&r||o.search(t)!==-1})}email(t=We.email){return this.matches(Rf,{name:"email",message:t,excludeEmptyString:!0})}url(t=We.url){return this.matches(Nf,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=We.uuid){return this.matches(Lf,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,i;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:i=void 0}=t:n=t),this.matches(Vf,{name:"datetime",message:n||We.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||We.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const o=_i(s);return o?!!o.z:!1}}).test({name:"datetime_precision",message:n||We.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const o=_i(s);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=We.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Wf})}lowercase(t=We.lowercase){return this.transform(n=>tt(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>tt(n)||n===n.toLowerCase()})}uppercase(t=We.uppercase){return this.transform(n=>tt(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>tt(n)||n===n.toUpperCase()})}}cr.prototype=Si.prototype;let Hf=e=>e!=+e;function fo(){return new wi}class wi extends Re{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Hf(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return r.isType(i)||i===null?i:parseFloat(i)})})}min(t,n=Ct.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=Ct.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=Ct.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=Ct.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=Ct.positive){return this.moreThan(0,t)}negative(t=Ct.negative){return this.lessThan(0,t)}integer(t=Ct.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>tt(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(i=>tt(i)?i:Math[t](i))}}fo.prototype=wi.prototype;let po=new Date(""),Yf=e=>Object.prototype.toString.call(e)==="[object Date]";function Ei(){return new qt}class qt extends Re{constructor(){super({type:"date",check(t){return Yf(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=Ff(t),isNaN(t)?qt.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(At.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,n=gi.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(r)}})}max(t,n=gi.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(r)}})}}qt.INVALID_DATE=po,Ei.prototype=qt.prototype,Ei.INVALID_DATE=po;function qf(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([o,a])=>`${o}-${a}`));function s(o,a){let u=Ft.split(o)[0];r.add(u),i.has(`${a}-${u}`)||n.push([a,u])}for(const o of Object.keys(e)){let a=e[o];r.add(o),At.isRef(a)&&a.isSibling?s(a.path,o):Rt(a)&&"deps"in a&&a.deps.forEach(u=>s(u,o))}return wf.array(Array.from(r),n).reverse()}function ho(e,t){let n=1/0;return e.some((r,i)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=i,!0}),n}function mo(e){return(t,n)=>ho(e,t)-ho(e,n)}const go=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function fr(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=fr(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=fr(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(fr)}):"optional"in e?e.optional():e}const Kf=(e,t)=>{const n=[...Ft.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),i=Ft.getter(Ft.join(n),!0)(e);return!!(i&&r in i)};let yo=e=>Object.prototype.toString.call(e)==="[object Object]";function bo(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const Jf=mo([]);function _n(e){return new Ci(e)}class Ci extends Re{constructor(t){super({type:"object",check(n){return yo(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=Jf,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let i=super._cast(t,n);if(i===void 0)return this.getDefault(n);if(!this._typeCheck(i))return i;let s=this.fields,o=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter(d=>!this._nodes.includes(d))),u={},c=Object.assign({},n,{parent:u,__validating:n.__validating||!1}),f=!1;for(const d of a){let p=s[d],y=d in i;if(p){let v,h=i[d];c.path=(n.path?`${n.path}.`:"")+d,p=p.resolve({value:h,context:n.context,parent:u});let _=p instanceof Re?p.spec:void 0,w=_==null?void 0:_.strict;if(_!=null&&_.strip){f=f||d in i;continue}v=!n.__validating||!w?p.cast(i[d],c):i[d],v!==void 0&&(u[d]=v)}else y&&!o&&(u[d]=i[d]);(y!==d in u||u[d]!==i[d])&&(f=!0)}return f?u:i}_validate(t,n={},r,i){let{from:s=[],originalValue:o=t,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:o},...s],n.__validating=!0,n.originalValue=o,super._validate(t,n,r,(u,c)=>{if(!a||!yo(c)){i(u,c);return}o=o||c;let f=[];for(let d of this._nodes){let p=this.fields[d];!p||At.isRef(p)||f.push(p.asNestedTest({options:n,key:d,parent:c,parentPath:n.path,originalParent:o}))}this.runTests({tests:f,value:c,originalValue:o,options:n},r,d=>{i(d.sort(this._sortErrors).concat(u),c)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[i,s]of Object.entries(this.fields)){const o=r[i];r[i]=o===void 0?s:o}return n.withMutation(i=>i.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var i;const s=this.fields[r];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(o):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=qf(t,n),r._sortErrors=mo(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let i=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),i=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),i)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return fr(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,i])=>t.includes(r)&&t.includes(i)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let i=Ft.getter(t,!0);return this.transform(s=>{if(!s)return s;let o=s;return Kf(s,t)&&(o=Object.assign({},s),r||delete o[t],o[n]=i(s)),o})}json(){return this.transform(go)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||ir.exact,test(n){if(n==null)return!0;const r=bo(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=ir.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(i){if(i==null)return!0;const s=bo(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=ir.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const i of Object.keys(n))r[t(i)]=n[i];return r})}camelCase(){return this.transformKeys(hi.camelCase)}snakeCase(){return this.transformKeys(hi.snakeCase)}constantCase(){return this.transformKeys(t=>hi.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,o]of Object.entries(n.fields)){var i;let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),r.fields[s]=o.describe(a)}return r}}_n.prototype=Ci.prototype;function Ai(e){return new Oi(e)}class Oi extends Re{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const r=super._cast(t,n);if(!this._typeCheck(r)||!this.innerType)return r;let i=!1;const s=r.map((o,a)=>{const u=this.innerType.cast(o,Object.assign({},n,{path:`${n.path||""}[${a}]`}));return u!==o&&(i=!0),u});return i?s:r}_validate(t,n={},r,i){var s;let o=this.innerType,a=(s=n.recursive)!=null?s:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,r,(u,c)=>{var f;if(!a||!o||!this._typeCheck(c)){i(u,c);return}let d=new Array(c.length);for(let y=0;y<c.length;y++){var p;d[y]=o.asNestedTest({options:n,index:y,parent:c,parentPath:n.path,originalParent:(p=n.originalValue)!=null?p:t})}this.runTests({value:c,tests:d,originalValue:(f=n.originalValue)!=null?f:t,options:n},r,y=>i(y.concat(u),c))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(go)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!Rt(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+at(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=sr.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n){return n=n||sr.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n){return n=n||sr.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(r,i,s)=>!t(r,i,s):r=>!!r;return this.transform(r=>r!=null?r.filter(n):r)}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);if(n.innerType){var i;let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[0]})),r.innerType=n.innerType.describe(s)}return r}}Ai.prototype=Oi.prototype;function vo(e){return new ji(e)}class ji extends Re{constructor(t){super({type:"tuple",spec:{types:t},check(n){const r=this.spec.types;return Array.isArray(n)&&n.length===r.length}}),this.withMutation(()=>{this.typeError(uo.notType)})}_cast(t,n){const{types:r}=this.spec,i=super._cast(t,n);if(!this._typeCheck(i))return i;let s=!1;const o=r.map((a,u)=>{const c=a.cast(i[u],Object.assign({},n,{path:`${n.path||""}[${u}]`}));return c!==i[u]&&(s=!0),c});return s?o:i}_validate(t,n={},r,i){let s=this.spec.types;super._validate(t,n,r,(o,a)=>{var u;if(!this._typeCheck(a)){i(o,a);return}let c=[];for(let[d,p]of s.entries()){var f;c[d]=p.asNestedTest({options:n,index:d,parent:a,parentPath:n.path,originalParent:(f=n.originalValue)!=null?f:t})}this.runTests({value:a,tests:c,originalValue:(u=n.originalValue)!=null?u:t,options:n},r,d=>i(d.concat(o),a))})}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);return r.innerType=n.spec.types.map((i,s)=>{var o;let a=t;return(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),i.describe(a)}),r}}vo.prototype=ji.prototype;function Xf(e){return new dr(e)}function xo(e){try{return e()}catch(t){if(De.isError(t))return Promise.reject(t);throw t}}class dr{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(n,r={})=>{let i=this.builder(n,r);if(!Rt(i))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(i=i.optional()),i.resolve(r)},this.builder=t,this.spec={meta:void 0,optional:!1}}clone(t){const n=new dr(this.builder);return n.spec=Object.assign({},this.spec,t),n}optionality(t){return this.clone({optional:t})}optional(){return this.optionality(!0)}resolve(t){return this._resolve(t.value,t)}cast(t,n){return this._resolve(t,n).cast(t,n)}asNestedTest(t){let{key:n,index:r,parent:i,options:s}=t,o=i[r??n];return this._resolve(o,Object.assign({},s,{value:o,parent:i})).asNestedTest(t)}validate(t,n){return xo(()=>this._resolve(t,n).validate(t,n))}validateSync(t,n){return this._resolve(t,n).validateSync(t,n)}validateAt(t,n,r){return xo(()=>this._resolve(n,r).validateAt(t,n,r))}validateSyncAt(t,n,r){return this._resolve(n,r).validateSyncAt(t,n,r)}isValid(t,n){try{return this._resolve(t,n).isValid(t,n)}catch(r){if(De.isError(r))return Promise.resolve(!1);throw r}}isValidSync(t,n){return this._resolve(t,n).isValidSync(t,n)}describe(t){return t?this.resolve(t).describe(t):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}}function Zf(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{co[t][n]=e[t][n]})})}function Qf(e,t,n){if(!e||!Rt(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof t!="string")throw new TypeError("A Method name must be provided");if(typeof n!="function")throw new TypeError("Method function must be provided");e.prototype[t]=n}const To=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:Oi,BooleanSchema:Ti,DateSchema:qt,LazySchema:dr,MixedSchema:vi,NumberSchema:wi,ObjectSchema:Ci,Schema:Re,StringSchema:Si,TupleSchema:ji,ValidationError:De,addMethod:Qf,array:Ai,bool:xi,boolean:xi,date:Ei,defaultLocale:co,getIn:bi,isSchema:Rt,lazy:Xf,mixed:ur,number:fo,object:_n,printValue:at,reach:If,ref:kf,setLocale:Zf,string:cr,tuple:vo},Symbol.toStringTag,{value:"Module"})),_o=e=>{const t=e.reduce((n,r)=>{let{name:i,required:s,type:o}=r;switch(o){case"RelatedList":o="array";break;case"Integer":case"Float":o="number";break;case"Related":case"Geometry":case"Raw":o="mixed";break;default:o="string"}let a;try{s?a=To[o]().typeError(`Field must be of type ${o}`).required("Field is required"):a=To[o]().typeError(`Field must be of type ${o}`).nullable(!0)}catch(u){console.log(u)}return n[i]=a,n},{});return _n().shape(t)},So=e=>!e&&typeof e!="boolean"&&typeof e!="number"?null:typeof e=="boolean"?e.toString():Array.isArray(e)?e.map(t=>t.name_||JSON.stringify(t,null,2)).join(", "):typeof e=="object"?e.name_||JSON.stringify(e):e,ed=e=>e?{...e,add:{columns:e.add_columns,title:e.add_title,schema:_o(e.add_columns),defaultValues:Js(e.add_columns)},edit:{columns:e.edit_columns,title:e.edit_title,schema:_o(e.edit_columns),defaultValues:Js(e.edit_columns)}}:null,td=async(e,t,n)=>{const{fetchPath:r,options:i}=ze({path:Ie(t,"/download"),method:"POST"}),s=await fetch(r,{...i,body:JSON.stringify(n)});let o=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?o=await s.json():o=await s.blob(),!s.ok)throw typeof o=="object"?new Error(typeof o.detail=="string"?o.detail:JSON.stringify(o,null,2)):new Error(o);const u=document.createElement("a"),c=URL.createObjectURL(o);u.href=c,u.download=e.toLowerCase()+".csv",u.click()};function nd({path:e,initialQueryParams:t,relation:n,fetchInfo:r=!0,clearInfoOnRefetch:i=!1,clearDataOnRefetch:s=!1,resetQueryParamsOnPathChange:o=!0,infoQueryProps:a,dataQueryProps:u,streaming:c=!1}){const[f,d]=T.useState(t?tr(null,t):null),p=T.useMemo(()=>n?{...f,filters:[...f.filters,{col:n.foreign_key,opr:n.type,value:He(n.id)}]}:f,[n,f]),y=T.useCallback(H=>d(S=>{if(typeof H=="function"&&(H=H(S)),!S)return tr(null,H);const A=tr({...S},H);if((H.filters||H.order_column||H.order_direction)&&!H.page&&(A.page=0),c){if(H.page&&H.page!==S.page&&!H.streaming)throw new Error("You cannot change page in streaming mode, use streaming.fetch() instead");if(H.page_size&&H.page_size!==S.page_size)throw new Error("You cannot change page size in streaming mode, use streaming.fetch() instead")}return A}),[c]),[v,h]=T.useState(null),_=T.useMemo(()=>v,[v]),w=T.useCallback(()=>h(null),[]),{data:O,isFetching:j,refetch:k,error:E}=dt.useQuery({queryKey:[`info-${e}`],queryFn:({signal:H})=>of(Ie(e,"_info"),H).then(ed),enabled:r,placeholderData:i?null:dt.keepPreviousData,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,...a}),{data:$,isFetching:z,refetch:q,error:Q}=dt.useQuery({queryKey:[`data-${e}`,JSON.stringify(p)],queryFn:({signal:H})=>p?lf(Ie(e,"/"),p,H).then(S=>({...S,result:S.result.map((A,V)=>({...A,id:S.ids[V]}))})):null,placeholderData:s?null:dt.keepPreviousData,staleTime:1/0,refetchOnReconnect:"always",refetchOnWindowFocus:"always",...u});T.useEffect(()=>{p&&q()},[q,p]),T.useEffect(()=>{if(E){h({message:"Couldn't fetch info",originalError:E});return}if(Q){h({message:"Couldn't fetch list",originalError:Q});return}w()},[E,Q,w]);const g=T.useMemo(()=>j||z,[j,z]);ke.useDidUpdate(()=>{if(!o)return;const H=tr(null,t);f!=null&&f.page_size&&(H.page_size=f.page_size),y(H)},[e]);const P=T.useCallback(async H=>{try{const S=await af(e,He(H));return w(),S}catch(S){h({message:`Couldn't fetch item with id ${H}`,originalError:S})}},[e,w]),B=T.useCallback(async(H,S)=>{try{const A=await rf(e,H);return S||(k(),q()),w(),A}catch(A){h({message:"Couldn't add item",originalError:A})}},[q,k,e,w]),J=T.useCallback(async(H,S,A)=>{try{const V=await uf(e,He(H),S);return A||(k(),q()),w(),V}catch(V){h({message:`Couldn't update item with id ${H}`,originalError:V})}},[q,k,e,w]),te=T.useCallback(async(H,S)=>{try{const A=await sf(e,He(H));return S||(k(),q()),w(),A}catch(A){h({message:`Couldn't delete item with id ${H}`,originalError:A})}},[q,k,e,w]),me=T.useCallback(async H=>{try{await td(H,e,p)}catch(S){h({message:"Couldn't download",originalError:S})}},[e,p]),[ge,_e]=ke.useSetState({data:{},isEnd:!1,fetch:()=>null});T.useEffect(()=>{c&&_e({fetch:()=>y({page:0,streaming:!0})})},[y,_e,c]),T.useEffect(()=>{c&&$&&_e(H=>{let S=Object.keys(H.data).length;const A={isEnd:!1};return p.page<S?(S=p.page,A.data={[p.page]:$.result}):A.data={...H.data,[p.page]:$.result},$.result.length<p.page_size?(A.isEnd=!0,A.fetch=()=>null):A.fetch=()=>y({page:S+1,streaming:!0}),A})},[$,y,_e,c]);const je=T.useMemo(()=>{const H={all:"all",actions:"actions"};return $==null||$.list_columns.forEach(S=>{H[S]&&(H[S]=`_${S}`)}),H},[$==null?void 0:$.list_columns]);return{path:e,data:$,info:O,queryParams:p,loading:g,error:_,streaming:ge,specialKey:je,setQueryParams:y,refetch:q,refetchInfo:k,getEntry:P,addEntry:B,updateEntry:J,deleteEntry:te,download:me}}const rd=async(e,t,n)=>{const{fetchPath:r,options:i}=ze({path:Ie(e,"/bulk",t),method:"POST",body:n}),s=await fetch(r,i);let o=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?o=await s.json():o=await s.text(),!s.ok)throw typeof o=="object"?new Error(typeof o.detail=="string"?o.detail:JSON.stringify(o,null,2)):new Error(o);return o},id=({Api:e})=>{const[t,n]=T.useState([]),[r,i]=T.useState(null),s=T.useCallback(async(a,u)=>{try{i(null);const c=await rd(e.path,a,t);return u?void 0:(e.refetch(),c)}catch(c){console.error(c),i({message:"Couldn't perform bulk action",originalError:c})}},[e,t]);return{bulkActions:T.useMemo(()=>({selectedIds:t,setSelectedIds:n}),[t,n]),dispatchBulkActions:s,error:r}};function wo({resource_name:e="",initialQueryParams:t,relation:n,fetchInfo:r,clearInfoOnRefetch:i,clearDataOnRefetch:s,resetQueryParamsOnPathChange:o,infoQueryProps:a,dataQueryProps:u,children:c,streaming:f}){const{baseUrl:d}=qs(),p=nd({path:Ie(d,e),initialQueryParams:t,relation:n,fetchInfo:r,clearInfoOnRefetch:i,clearDataOnRefetch:s,resetQueryParamsOnPathChange:o,infoQueryProps:a,dataQueryProps:u,streaming:f}),y=Tn(p),v=id({path:Ie(d,e),Api:p}),h=Tn(v);return l.jsx(Us.Provider,{value:y,children:l.jsx(Ks.Provider,{value:h,children:c})})}/**
|
|
34
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
35
35
|
*
|
|
36
36
|
* This source code is licensed under the MIT license.
|
|
37
37
|
* See the LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/var
|
|
39
|
-
* @license @tabler/icons-react v3.
|
|
38
|
+
*/var sd={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
|
|
39
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
40
40
|
*
|
|
41
41
|
* This source code is licensed under the MIT license.
|
|
42
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/const
|
|
44
|
-
* @license @tabler/icons-react v3.
|
|
43
|
+
*/const Fe=(e,t,n,r)=>{const i=T.forwardRef(({color:s="currentColor",size:o=24,stroke:a=2,title:u,className:c,children:f,...d},p)=>T.createElement("svg",{ref:p,...sd[e],width:o,height:o,className:["tabler-icon",`tabler-icon-${t}`,c].join(" "),strokeWidth:a,stroke:s,...d},[u&&T.createElement("title",{key:"svg-title"},u),...r.map(([y,v])=>T.createElement(y,v)),...Array.isArray(f)?f:[f]]));return i.displayName=`${n}`,i};/**
|
|
44
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the MIT license.
|
|
47
47
|
* See the LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var
|
|
49
|
-
* @license @tabler/icons-react v3.
|
|
48
|
+
*/var od=Fe("outline","alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]);/**
|
|
49
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
50
50
|
*
|
|
51
51
|
* This source code is licensed under the MIT license.
|
|
52
52
|
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
-
*/var
|
|
54
|
-
* @license @tabler/icons-react v3.
|
|
53
|
+
*/var ad=Fe("outline","app-window","IconAppWindow",[["path",{d:"M3 5m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M6 8h.01",key:"svg-1"}],["path",{d:"M9 8h.01",key:"svg-2"}]]);/**
|
|
54
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
55
55
|
*
|
|
56
56
|
* This source code is licensed under the MIT license.
|
|
57
57
|
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/var
|
|
59
|
-
* @license @tabler/icons-react v3.
|
|
58
|
+
*/var $i=Fe("outline","chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
|
|
59
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
60
60
|
*
|
|
61
61
|
* This source code is licensed under the MIT license.
|
|
62
62
|
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
-
*/var
|
|
64
|
-
* @license @tabler/icons-react v3.
|
|
63
|
+
*/var Eo=Fe("outline","chevron-up","IconChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
|
|
64
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
65
65
|
*
|
|
66
66
|
* This source code is licensed under the MIT license.
|
|
67
67
|
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
-
*/var
|
|
69
|
-
* @license @tabler/icons-react v3.
|
|
68
|
+
*/var Co=Fe("outline","download","IconDownload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]);/**
|
|
69
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
70
70
|
*
|
|
71
71
|
* This source code is licensed under the MIT license.
|
|
72
72
|
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/var
|
|
74
|
-
* @license @tabler/icons-react v3.
|
|
73
|
+
*/var ld=Fe("outline","exclamation-circle","IconExclamationCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 9v4",key:"svg-1"}],["path",{d:"M12 16v.01",key:"svg-2"}]]);/**
|
|
74
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
75
75
|
*
|
|
76
76
|
* This source code is licensed under the MIT license.
|
|
77
77
|
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/var
|
|
79
|
-
* @license @tabler/icons-react v3.
|
|
78
|
+
*/var ud=Fe("outline","eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]);/**
|
|
79
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
80
80
|
*
|
|
81
81
|
* This source code is licensed under the MIT license.
|
|
82
82
|
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/var
|
|
84
|
-
* @license @tabler/icons-react v3.
|
|
83
|
+
*/var cd=Fe("outline","filter-cog","IconFilterCog",[["path",{d:"M12 20l-3 1v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v1.5",key:"svg-0"}],["path",{d:"M19.001 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M19.001 15.5v1.5",key:"svg-2"}],["path",{d:"M19.001 21v1.5",key:"svg-3"}],["path",{d:"M22.032 17.25l-1.299 .75",key:"svg-4"}],["path",{d:"M17.27 20l-1.3 .75",key:"svg-5"}],["path",{d:"M15.97 17.25l1.3 .75",key:"svg-6"}],["path",{d:"M20.733 20l1.3 .75",key:"svg-7"}]]);/**
|
|
84
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
85
85
|
*
|
|
86
86
|
* This source code is licensed under the MIT license.
|
|
87
87
|
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/var
|
|
89
|
-
* @license @tabler/icons-react v3.
|
|
88
|
+
*/var Pi=Fe("outline","filter","IconFilter",[["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",key:"svg-0"}]]);/**
|
|
89
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
90
90
|
*
|
|
91
91
|
* This source code is licensed under the MIT license.
|
|
92
92
|
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/var
|
|
94
|
-
* @license @tabler/icons-react v3.
|
|
93
|
+
*/var fd=Fe("outline","id-badge-2","IconIdBadge2",[["path",{d:"M7 12h3v4h-3z",key:"svg-0"}],["path",{d:"M10 6h-6a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h16a1 1 0 0 0 1 -1v-12a1 1 0 0 0 -1 -1h-6",key:"svg-1"}],["path",{d:"M10 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M14 16h2",key:"svg-3"}],["path",{d:"M14 12h4",key:"svg-4"}]]);/**
|
|
94
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
95
95
|
*
|
|
96
96
|
* This source code is licensed under the MIT license.
|
|
97
97
|
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/var
|
|
99
|
-
* @license @tabler/icons-react v3.
|
|
98
|
+
*/var Ao=Fe("outline","lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]);/**
|
|
99
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
100
100
|
*
|
|
101
101
|
* This source code is licensed under the MIT license.
|
|
102
102
|
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/var
|
|
104
|
-
* @license @tabler/icons-react v3.
|
|
103
|
+
*/var dd=Fe("outline","logout","IconLogout",[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]]);/**
|
|
104
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
105
105
|
*
|
|
106
106
|
* This source code is licensed under the MIT license.
|
|
107
107
|
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/var
|
|
109
|
-
* @license @tabler/icons-react v3.
|
|
108
|
+
*/var pd=Fe("outline","pencil","IconPencil",[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]]);/**
|
|
109
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
110
110
|
*
|
|
111
111
|
* This source code is licensed under the MIT license.
|
|
112
112
|
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/var
|
|
114
|
-
* @license @tabler/icons-react v3.
|
|
113
|
+
*/var pr=Fe("outline","plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
|
|
114
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
115
115
|
*
|
|
116
116
|
* This source code is licensed under the MIT license.
|
|
117
117
|
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/var
|
|
119
|
-
* @license @tabler/icons-react v3.
|
|
118
|
+
*/var hd=Fe("outline","refresh","IconRefresh",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]]);/**
|
|
119
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
120
120
|
*
|
|
121
121
|
* This source code is licensed under the MIT license.
|
|
122
122
|
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/var
|
|
124
|
-
* @license @tabler/icons-react v3.
|
|
123
|
+
*/var Oo=Fe("outline","trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]);/**
|
|
124
|
+
* @license @tabler/icons-react v3.29.0 - MIT
|
|
125
125
|
*
|
|
126
126
|
* This source code is licensed under the MIT license.
|
|
127
127
|
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/var gd=Me("outline","users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]);function Oo(){const{error:e}=ue(),[t,r]=T.useState(!1);return T.useEffect(()=>{e&&r(!0)},[e]),l.jsx(m.Modal,{opened:t,onClose:()=>r(!1),title:l.jsxs(m.Group,{children:[l.jsx(ad,{size:16,color:"red"}),l.jsx(m.Text,{children:e?e.originalError.detail||e.originalError.message:"Error"})]}),centered:!0,children:e?l.jsx(m.Text,{children:e.message}):null})}function yd({opened:e,onClose:t,handleAccept:r,handleReject:n}){return l.jsxs(m.Modal,{opened:e,onClose:t,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",title:"Item löschen?",centered:!0,children:["Sind Sie Sicher, dass Sie das Item löschen wollen?",l.jsxs(m.Group,{align:"right",mt:"xl",justify:"flex-end",children:[l.jsx(m.Button,{onClick:n,variant:"default",children:"Abbrechen"}),l.jsx(m.Button,{onClick:r,color:"red",children:"Löschen"})]})]})}function jo({id:e,...t}){const{deleteEntry:r}=ue(),n={bg:"transparent",size:"sm",c:"gray"},i=m.useProps("ActionIcon",n,t),[s,o]=T.useState(!1),a=()=>{o(!1)},u=async()=>{r(e),o(!1)};return l.jsxs(l.Fragment,{children:[l.jsx(m.Tooltip,{label:"Delete",children:l.jsx(m.ActionIcon,{bg:i.bg,size:i.size,c:i.c,onClick:()=>{o(!0)},children:l.jsx(Ao,{})})}),l.jsx(yd,{opened:s,onClose:a,handleAccept:u,handleReject:a})]})}const $i=(e,t)=>{const r=t.split("."),n=e[r[0]];if(r.length>1&&Array.isArray(n))return n.map(s=>$i(s,r.slice(1).join("."))).join(", ");const i=t.split(".").reduce((s,o)=>s[o],e);return _o(i)};function $o(e,t){return e===!0||Array.isArray(e)?t:Object.fromEntries(Object.keys(e).map(r=>[r,$o(e[r],t[r])]))}function Po(e,t){if(!e)return e;const r=t.values;return!r||!r.length||Array.isArray(e.id_)&&(e.id=e.id_),e}function bd(e,t){const r={};return t.forEach(n=>{if(n.type==="Related"){r[n.name]=Po(e.result[n.name],n);return}if(n.type==="RelatedList"){r[n.name]=e.result[n.name].map(i=>Po(i,n));return}r[n.name]=typeof e.result[n.name]=="boolean"?String(e.result[n.name]):e.result[n.name]}),r}function Pi(e){return t=>{try{return e.validateSync(t,{abortEarly:!1}),{}}catch(r){const n={};return r instanceof De&&r.inner.forEach(i=>{n[i.path.replaceAll("[",".").replaceAll("]","")]=i.message}),n}}}function vd({form:e,name:t,...r}){return l.jsx(l.Fragment,{children:l.jsx(St.DateInput,{...e.getInputProps(t),onChange:n=>{if(n instanceof Date){const i=new Date(n.getTime()-n.getTimezoneOffset()*6e4);e.setFieldValue(t,i.toISOString().substring(0,10))}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...r})})}function xd({form:e,name:t,...r}){return l.jsx(l.Fragment,{children:l.jsx(St.DateTimePicker,{...e.getInputProps(t),onChange:n=>{if(n instanceof Date){const i=new Date(n);e.setFieldValue(t,i.toISOString())}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...r})})}function mn({form:e,name:t,...r}){const n=e.getInputProps(t).value,i=T.useMemo(()=>n&&typeof n=="object"?JSON.stringify(n):n||"",[n]);return t==="password"?l.jsx(m.PasswordInput,{...e.getInputProps(t),value:i,...r}):l.jsx(m.TextInput,{...e.getInputProps(t),value:i,...r})}function ko({form:e,name:t,filter:r,...n}){const[i,s]=T.useState(""),o=e.getInputProps(t).value,a=T.useMemo(()=>o?typeof o=="object"?JSON.stringify(o,null,2):o:"",[o]);return T.useEffect(()=>{s(a)},[a]),r?l.jsx(mn,{form:e,name:t,...n}):l.jsx(m.JsonInput,{autosize:!0,minRows:4,maxRows:12,validationError:"Invalid JSON",...e.getInputProps(t),...n,value:i,onChange:u=>{if(s(u),!u){e.getInputProps(t).onChange(null);return}try{const c=JSON.parse(u);e.getInputProps(t).onChange(c)}catch{}}})}function Td({form:e,name:t,filter:r,...n}){const[i,s]=T.useState(!!r);return l.jsxs(m.InputWrapper,{label:n.label,description:n.description,children:[!r&&l.jsxs(m.Group,{align:"center",gap:"xs",py:"0.25rem",children:[l.jsx(m.Checkbox,{checked:i,onChange:o=>s(o.currentTarget.checked)}),l.jsx(m.Text,{size:"xs",children:"WKT"})]}),i?l.jsx(mn,{form:e,name:t,...n,label:void 0,description:void 0}):l.jsx(ko,{form:e,name:t,...n,label:void 0,description:void 0})]})}function _d({form:e,name:t,items:r,...n}){const i=r.map(o=>({value:String(He(o.id)),label:o.value})),s=Array.isArray(e.getInputProps(t).value)?e.getInputProps(t).value.map(o=>String(typeof o=="object"?He(o.id):o)):[];return l.jsx(m.MultiSelect,{data:i,searchable:!0,...e.getInputProps(t),value:s||[],...n})}function Sd({form:e,name:t,items:r,filter:n,...i}){var o;const s=r.map(a=>({value:String(He(a.id)),label:a.value}));return l.jsx(m.Select,{data:s,searchable:!0,...e.getInputProps(t),onChange:a=>{if(n){e.setFieldValue(t,a);return}const u=r.find(c=>String(He(c.id))===a)||null;e.setFieldValue(t,u)},value:n?e.getInputProps(t).value:String(He((o=e.getInputProps(t).value)==null?void 0:o.id))||"",...i})}function Io({form:e,name:t,items:r,...n}){return l.jsx(m.Select,{data:r,searchable:!0,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...n})}function gn({form:e,name:t,schema:r,filter:n,withinPortal:i=!0,...s}){if(!r.type)return null;switch(r.type){case"Boolean":return l.jsx(Io,{form:e,name:t,items:[{label:"true",value:n?"1":"true"},{label:"false",value:n?"0":"false"}],...s});case"RelatedList":return l.jsx(_d,{form:e,name:t,items:r.values,comboboxProps:{withinPortal:i},...s});case"Related":return l.jsx(Sd,{form:e,name:t,items:r.values,filter:n,comboboxProps:{withinPortal:i},...s});case"DateTime":return l.jsx(xd,{form:e,name:t,valueFormat:"DD.MM.YYYY HH:mm:ss",schema:r,popoverProps:{withinPortal:i},...s});case"Date":return l.jsx(vd,{form:e,name:t,valueFormat:"DD.MM.YYYY",schema:r,popoverProps:{withinPortal:i},...s});case"Geometry":return l.jsx(Td,{form:e,name:t,filter:n,...s});case"Raw":return l.jsx(ko,{form:e,name:t,filter:n,...s});case"Integer":case"Float":return l.jsx(mn,{form:e,name:t,...s});case"Enum":return l.jsx(Io,{form:e,name:t,items:r.values,comboboxProps:{withinPortal:i},...s});default:return l.jsx(mn,{form:e,name:t,...s})}}function wd(e,t){return new Promise(r=>{r(bd(e,t.edit.columns))})}function Do({item:e,info:t,opened:r,onClose:n,...i}){const{updateEntry:s}=ue(),o={modal:{},stack:{},saveButton:{}},{modal:a,stack:u,saveButton:c}=m.useProps("EditDialog",o,i),f=xr.useForm({initialValues:t.edit.defaultValues,validate:Pi(t.edit.schema)}),d=()=>{const y={};return Object.keys(f.values).forEach(v=>{f.isDirty(v)&&(y[v]=!0)}),y};T.useEffect(()=>{e&&wd(e,t).then(y=>{f.setValues(y),f.resetDirty(y)})},[e,t.edit.columns]);const p=async y=>{y=$o(d(),y),await s(e.id,y),n()};return T.useEffect(()=>{f.setInitialValues(t.edit.defaultValues),f.reset()},[t.edit.defaultValues]),e?l.jsx(m.Modal,{opened:r,onClose:()=>{n()},title:t.edit.title,size:"lg",centered:!0,...a,children:l.jsx(m.Box,{component:"form",onSubmit:f.onSubmit(p),children:l.jsx(m.Stack,{spacing:"md",...u,children:l.jsxs(m.ScrollArea.Autosize,{mah:450,type:"auto",children:[t.edit.columns.map((y,v)=>l.jsx(gn,{form:f,name:y.name,label:y.label,description:y.description,schema:y,withAsterisk:y.required},v)),l.jsx(m.Group,{position:"right",mt:"xl",children:l.jsx(m.Button,{type:"submit",...c,children:"Save"})})]})})})}):null}function Mo({id:e,...t}){const{info:r,getEntry:n}=ue(),i={bg:"transparent",size:"sm",c:"gray"},s=m.useProps("ActionIcon",i,t),[o,a]=T.useState(null),[u,c]=T.useState(!1),[f,d]=T.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(m.Tooltip,{label:"Edit",children:l.jsx(m.ActionIcon,{bg:s.bg,size:s.size,c:s.c,onClick:async()=>{c(!0);const p=await n(e);p&&(a(p),c(!1),d(!0))},children:l.jsx(hd,{})})}),l.jsx(Do,{item:o,info:r,opened:f,onClose:()=>d(!1)})]})}function Ed({relatedPath:e,...t}){const{path:r}=ue();return ke(r?r.substring(0,r.lastIndexOf("/")):"",e.substring(0,e.lastIndexOf("/"))),l.jsx(So,{resource_name:e.replace("/",""),relation:t,children:l.jsx(Ui,{hideToolbar:!0,hideDownload:!1})})}const Cd=T.memo(Ed);function Ad({item:e,info:t,loading:r,opened:n,onClose:i,...s}){const o={modal:{},tabs:{},tabsList:{},tabsPanel:{}},{modal:a,tabs:u,tabsList:c,tabsPanel:f}=m.useProps("ViewDialog",o,s);return l.jsxs(m.Modal,{opened:n,onClose:i,title:`${e==null?void 0:e.show_title} (#${He(e==null?void 0:e.id)})`,size:"lg",centered:!0,zIndex:1e3,...a,children:[l.jsx(m.LoadingOverlay,{visible:r}),!r&&e?l.jsxs(m.Tabs,{defaultValue:"details",...u,children:[l.jsxs(m.Tabs.List,{...c,children:[l.jsx(m.Tabs.Tab,{value:"details",children:"Details"}),t.relations.map((d,p)=>l.jsx(m.Tabs.Tab,{value:d.name,children:d.name},p))]}),l.jsx(m.Tabs.Panel,{pt:"xs",value:"details",...f,children:l.jsx(m.Paper,{p:"xs",withBorder:!0,children:l.jsx(m.Stack,{spacing:"md",children:l.jsx(m.ScrollArea,{h:450,type:"auto",children:e.show_columns.map((d,p)=>l.jsxs(m.Grid,{maw:500,children:[l.jsx(m.Grid.Col,{span:4,children:l.jsx(m.Text,{size:"md",children:e.label_columns[d]})}),l.jsx(m.Grid.Col,{span:1,children:l.jsx(m.Text,{size:"xs",children:":"})}),l.jsx(m.Grid.Col,{span:6,children:l.jsx(m.Text,{size:"md",children:$i(e.result,d)})})]},p))})})})}),t.relations.map((d,p)=>l.jsx(m.Tabs.Panel,{pt:"xs",value:d.name,children:l.jsx(m.Paper,{withBorder:!0,children:l.jsx(Cd,{relatedPath:d.path,id:He(e.id),foreign_key:d.foreign_key,type:d.type})})},p))]}):null]})}function Od({id:e,...t}){const{info:r,getEntry:n}=ue(),i={bg:"transparent",size:"sm",c:"gray"},s=m.useProps("ActionIcon",i,t),[o,a]=T.useState(null),[u,c]=T.useState(!1),[f,d]=T.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(m.Tooltip,{label:"Details",children:l.jsx(m.ActionIcon,{bg:s.bg,size:s.size,c:s.c,onClick:async()=>{c(!0);const p=await n(e);p&&(a(p),c(!1),d(!0))},children:l.jsx(cd,{})})}),l.jsx(Ad,{item:o,info:r,loading:u,opened:f,onClose:()=>d(!1)})]})}function ki({id:e}){const{info:t}=ue();return l.jsxs(m.Flex,{style:{gap:4,whiteSpace:"nowrap"},children:[t!=null&&t.permissions.includes("can_get")?l.jsx(Od,{id:e}):null,t!=null&&t.permissions.includes("can_put")?l.jsx(Mo,{id:e}):null,t!=null&&t.permissions.includes("can_delete")?l.jsx(jo,{id:e}):null]})}function Ii({opened:e,onClose:t,...r}){const{info:n,addEntry:i}=ue(),s={modal:{},stack:{},addButton:{}},{addButton:o,modal:a,stack:u}=m.useProps("AddDialog",s,r),c=xr.useForm({initialValues:n.add.defaultValues,validate:Pi(n.add.schema)}),f=async d=>{await i(d),c.reset(),t()};return T.useEffect(()=>{c.setInitialValues(n.add.defaultValues),c.reset()},[n.add.defaultValues]),l.jsx(m.Modal,{opened:e,onClose:()=>{c.reset(),t()},title:n.add.title,size:"lg",centered:!0,...a,children:l.jsx(m.Box,{component:"form",onSubmit:c.onSubmit(f),children:l.jsx(m.Stack,{spacing:"md",...u,children:l.jsxs(m.ScrollArea.Autosize,{mah:450,type:"auto",children:[n.add.columns.map((d,p)=>l.jsx(gn,{form:c,name:d.name,label:d.label,description:d.description,schema:d,withAsterisk:d.required},p)),l.jsx(m.Group,{position:"right",mt:"xl",children:l.jsx(m.Button,{type:"submit",...o,children:"Add"})})]})})})})}function Fo(...e){const[t,r]=T.useState(!1),n={bg:"transparent",size:"sm",c:"gray"},i=m.useProps("ActionIcon",n,e);return l.jsxs(l.Fragment,{children:[l.jsx(m.Tooltip,{label:"Add Item",children:l.jsx(m.ActionIcon,{bg:i.bg,size:i.size,c:i.c,onClick:()=>{r(!0)},children:l.jsx(hn,{})})}),l.jsx(Ii,{opened:t,onClose:()=>{r(!1)}})]})}/*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */const{entries:Ro,setPrototypeOf:No,isFrozen:jd,getPrototypeOf:$d,getOwnPropertyDescriptor:Pd}=Object;let{freeze:Be,seal:Xe,create:Lo}=Object,{apply:Di,construct:Mi}=typeof Reflect<"u"&&Reflect;Be||(Be=function(t){return t}),Xe||(Xe=function(t){return t}),Di||(Di=function(t,r,n){return t.apply(r,n)}),Mi||(Mi=function(t,r){return new t(...r)});const yn=Ye(Array.prototype.forEach),zo=Ye(Array.prototype.pop),Er=Ye(Array.prototype.push),bn=Ye(String.prototype.toLowerCase),Fi=Ye(String.prototype.toString),Bo=Ye(String.prototype.match),Cr=Ye(String.prototype.replace),kd=Ye(String.prototype.indexOf),Id=Ye(String.prototype.trim),tt=Ye(Object.prototype.hasOwnProperty),Ue=Ye(RegExp.prototype.test),Ar=Dd(TypeError);function Ye(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Di(e,t,n)}}function Dd(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Mi(e,r)}}function ie(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bn;No&&No(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(jd(t)||(t[n]=s),i=s)}e[i]=!0}return e}function Md(e){for(let t=0;t<e.length;t++)tt(e,t)||(e[t]=null);return e}function Lt(e){const t=Lo(null);for(const[r,n]of Ro(e))tt(e,r)&&(Array.isArray(n)?t[r]=Md(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=Lt(n):t[r]=n);return t}function Or(e,t){for(;e!==null;){const n=Pd(e,t);if(n){if(n.get)return Ye(n.get);if(typeof n.value=="function")return Ye(n.value)}e=$d(e)}function r(){return null}return r}const Uo=Be(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ri=Be(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ni=Be(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Fd=Be(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Li=Be(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Rd=Be(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Vo=Be(["#text"]),Wo=Be(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),zi=Be(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Go=Be(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),vn=Be(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Nd=Xe(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ld=Xe(/<%[\w\W]*|[\w\W]*%>/gm),zd=Xe(/\$\{[\w\W]*}/gm),Bd=Xe(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ud=Xe(/^aria-[\-\w]+$/),Ho=Xe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vd=Xe(/^(?:\w+script|data):/i),Wd=Xe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Yo=Xe(/^html$/i),Gd=Xe(/^[a-z][.\w]*(-[.\w]+)+$/i);var qo=Object.freeze({__proto__:null,ARIA_ATTR:Ud,ATTR_WHITESPACE:Wd,CUSTOM_ELEMENT:Gd,DATA_ATTR:Bd,DOCTYPE_NAME:Yo,ERB_EXPR:Ld,IS_ALLOWED_URI:Ho,IS_SCRIPT_OR_DATA:Vd,MUSTACHE_EXPR:Nd,TMPLIT_EXPR:zd});const jr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Hd=function(){return typeof window>"u"?null:window},Yd=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Ko=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Jo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hd();const t=M=>Jo(M);if(t.version="3.2.3",t.removed=[],!e||!e.document||e.document.nodeType!==jr.document)return t.isSupported=!1,t;let{document:r}=e;const n=r,i=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:a,Element:u,NodeFilter:c,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:y}=e,v=u.prototype,h=Or(v,"cloneNode"),_=Or(v,"remove"),w=Or(v,"nextSibling"),O=Or(v,"childNodes"),j=Or(v,"parentNode");if(typeof o=="function"){const M=r.createElement("template");M.content&&M.content.ownerDocument&&(r=M.content.ownerDocument)}let k,E="";const{implementation:$,createNodeIterator:z,createDocumentFragment:q,getElementsByTagName:Q}=r,{importNode:g}=n;let P=Ko();t.isSupported=typeof Ro=="function"&&typeof j=="function"&&$&&$.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:B,ERB_EXPR:K,TMPLIT_EXPR:te,DATA_ATTR:pe,ARIA_ATTR:he,IS_SCRIPT_OR_DATA:Te,ATTR_WHITESPACE:je,CUSTOM_ELEMENT:H}=qo;let{IS_ALLOWED_URI:S}=qo,A=null;const V=ie({},[...Uo,...Ri,...Ni,...Li,...Vo]);let W=null;const J=ie({},[...Wo,...zi,...Go,...vn]);let G=Object.seal(Lo(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,ee=null,U=!0,ne=!0,re=!1,$e=!0,N=!1,Ne=!0,We=!1,nt=!1,gt=!1,yt=!1,Vt=!1,bt=!1,Xn=!0,Zn=!1;const Hr="user-content-";let Yr=!0,Wt=!1,vt={},xt=null;const $t=ie({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Qn=null;const qr=ie({},["audio","video","img","source","image","track"]);let hr=null;const mr=ie({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gr="http://www.w3.org/1998/Math/MathML",yr="http://www.w3.org/2000/svg",it="http://www.w3.org/1999/xhtml";let Pt=it,Kr=!1,Jr=null;const Ns=ie({},[gr,yr,it],Fi);let kt=ie({},["mi","mo","mn","ms","mtext"]),Gt=ie({},["annotation-xml"]);const It=ie({},["title","style","font","a","script"]);let Tt=null;const Xr=["application/xhtml+xml","text/html"],ei="text/html";let Ie=null,_t=null;const Ls=r.createElement("form"),Zr=function(x){return x instanceof RegExp||x instanceof Function},br=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(_t&&_t===x)){if((!x||typeof x!="object")&&(x={}),x=Lt(x),Tt=Xr.indexOf(x.PARSER_MEDIA_TYPE)===-1?ei:x.PARSER_MEDIA_TYPE,Ie=Tt==="application/xhtml+xml"?Fi:bn,A=tt(x,"ALLOWED_TAGS")?ie({},x.ALLOWED_TAGS,Ie):V,W=tt(x,"ALLOWED_ATTR")?ie({},x.ALLOWED_ATTR,Ie):J,Jr=tt(x,"ALLOWED_NAMESPACES")?ie({},x.ALLOWED_NAMESPACES,Fi):Ns,hr=tt(x,"ADD_URI_SAFE_ATTR")?ie(Lt(mr),x.ADD_URI_SAFE_ATTR,Ie):mr,Qn=tt(x,"ADD_DATA_URI_TAGS")?ie(Lt(qr),x.ADD_DATA_URI_TAGS,Ie):qr,xt=tt(x,"FORBID_CONTENTS")?ie({},x.FORBID_CONTENTS,Ie):$t,X=tt(x,"FORBID_TAGS")?ie({},x.FORBID_TAGS,Ie):{},ee=tt(x,"FORBID_ATTR")?ie({},x.FORBID_ATTR,Ie):{},vt=tt(x,"USE_PROFILES")?x.USE_PROFILES:!1,U=x.ALLOW_ARIA_ATTR!==!1,ne=x.ALLOW_DATA_ATTR!==!1,re=x.ALLOW_UNKNOWN_PROTOCOLS||!1,$e=x.ALLOW_SELF_CLOSE_IN_ATTR!==!1,N=x.SAFE_FOR_TEMPLATES||!1,Ne=x.SAFE_FOR_XML!==!1,We=x.WHOLE_DOCUMENT||!1,yt=x.RETURN_DOM||!1,Vt=x.RETURN_DOM_FRAGMENT||!1,bt=x.RETURN_TRUSTED_TYPE||!1,gt=x.FORCE_BODY||!1,Xn=x.SANITIZE_DOM!==!1,Zn=x.SANITIZE_NAMED_PROPS||!1,Yr=x.KEEP_CONTENT!==!1,Wt=x.IN_PLACE||!1,S=x.ALLOWED_URI_REGEXP||Ho,Pt=x.NAMESPACE||it,kt=x.MATHML_TEXT_INTEGRATION_POINTS||kt,Gt=x.HTML_INTEGRATION_POINTS||Gt,G=x.CUSTOM_ELEMENT_HANDLING||{},x.CUSTOM_ELEMENT_HANDLING&&Zr(x.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=x.CUSTOM_ELEMENT_HANDLING.tagNameCheck),x.CUSTOM_ELEMENT_HANDLING&&Zr(x.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=x.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),x.CUSTOM_ELEMENT_HANDLING&&typeof x.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=x.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),N&&(ne=!1),Vt&&(yt=!0),vt&&(A=ie({},Vo),W=[],vt.html===!0&&(ie(A,Uo),ie(W,Wo)),vt.svg===!0&&(ie(A,Ri),ie(W,zi),ie(W,vn)),vt.svgFilters===!0&&(ie(A,Ni),ie(W,zi),ie(W,vn)),vt.mathMl===!0&&(ie(A,Li),ie(W,Go),ie(W,vn))),x.ADD_TAGS&&(A===V&&(A=Lt(A)),ie(A,x.ADD_TAGS,Ie)),x.ADD_ATTR&&(W===J&&(W=Lt(W)),ie(W,x.ADD_ATTR,Ie)),x.ADD_URI_SAFE_ATTR&&ie(hr,x.ADD_URI_SAFE_ATTR,Ie),x.FORBID_CONTENTS&&(xt===$t&&(xt=Lt(xt)),ie(xt,x.FORBID_CONTENTS,Ie)),Yr&&(A["#text"]=!0),We&&ie(A,["html","head","body"]),A.table&&(ie(A,["tbody"]),delete X.tbody),x.TRUSTED_TYPES_POLICY){if(typeof x.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ar('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof x.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ar('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=x.TRUSTED_TYPES_POLICY,E=k.createHTML("")}else k===void 0&&(k=Yd(y,i)),k!==null&&typeof E=="string"&&(E=k.createHTML(""));Be&&Be(x),_t=x}},ti=ie({},[...Ri,...Ni,...Fd]),ri=ie({},[...Li,...Rd]),ni=function(x){let I=j(x);(!I||!I.tagName)&&(I={namespaceURI:Pt,tagName:"template"});const R=bn(x.tagName),se=bn(I.tagName);return Jr[x.namespaceURI]?x.namespaceURI===yr?I.namespaceURI===it?R==="svg":I.namespaceURI===gr?R==="svg"&&(se==="annotation-xml"||kt[se]):!!ti[R]:x.namespaceURI===gr?I.namespaceURI===it?R==="math":I.namespaceURI===yr?R==="math"&&Gt[se]:!!ri[R]:x.namespaceURI===it?I.namespaceURI===yr&&!Gt[se]||I.namespaceURI===gr&&!kt[se]?!1:!ri[R]&&(It[R]||!ti[R]):!!(Tt==="application/xhtml+xml"&&Jr[x.namespaceURI]):!1},Je=function(x){Er(t.removed,{element:x});try{j(x).removeChild(x)}catch{_(x)}},vr=function(x,I){try{Er(t.removed,{attribute:I.getAttributeNode(x),from:I})}catch{Er(t.removed,{attribute:null,from:I})}if(I.removeAttribute(x),x==="is")if(yt||Vt)try{Je(I)}catch{}else try{I.setAttribute(x,"")}catch{}},ii=function(x){let I=null,R=null;if(gt)x="<remove></remove>"+x;else{const Se=Bo(x,/^[\r\n\t ]+/);R=Se&&Se[0]}Tt==="application/xhtml+xml"&&Pt===it&&(x='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+x+"</body></html>");const se=k?k.createHTML(x):x;if(Pt===it)try{I=new p().parseFromString(se,Tt)}catch{}if(!I||!I.documentElement){I=$.createDocument(Pt,"template",null);try{I.documentElement.innerHTML=Kr?E:se}catch{}}const Ee=I.body||I.documentElement;return x&&R&&Ee.insertBefore(r.createTextNode(R),Ee.childNodes[0]||null),Pt===it?Q.call(I,We?"html":"body")[0]:We?I.documentElement:Ee},si=function(x){return z.call(x.ownerDocument||x,x,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Qr=function(x){return x instanceof d&&(typeof x.nodeName!="string"||typeof x.textContent!="string"||typeof x.removeChild!="function"||!(x.attributes instanceof f)||typeof x.removeAttribute!="function"||typeof x.setAttribute!="function"||typeof x.namespaceURI!="string"||typeof x.insertBefore!="function"||typeof x.hasChildNodes!="function")},b=function(x){return typeof a=="function"&&x instanceof a};function D(M,x,I){yn(M,R=>{R.call(t,x,I,_t)})}const L=function(x){let I=null;if(D(P.beforeSanitizeElements,x,null),Qr(x))return Je(x),!0;const R=Ie(x.nodeName);if(D(P.uponSanitizeElement,x,{tagName:R,allowedTags:A}),x.hasChildNodes()&&!b(x.firstElementChild)&&Ue(/<[/\w]/g,x.innerHTML)&&Ue(/<[/\w]/g,x.textContent)||x.nodeType===jr.progressingInstruction||Ne&&x.nodeType===jr.comment&&Ue(/<[/\w]/g,x.data))return Je(x),!0;if(!A[R]||X[R]){if(!X[R]&&ae(R)&&(G.tagNameCheck instanceof RegExp&&Ue(G.tagNameCheck,R)||G.tagNameCheck instanceof Function&&G.tagNameCheck(R)))return!1;if(Yr&&!xt[R]){const se=j(x)||x.parentNode,Ee=O(x)||x.childNodes;if(Ee&&se){const Se=Ee.length;for(let me=Se-1;me>=0;--me){const Ge=h(Ee[me],!0);Ge.__removalCount=(x.__removalCount||0)+1,se.insertBefore(Ge,w(x))}}}return Je(x),!0}return x instanceof u&&!ni(x)||(R==="noscript"||R==="noembed"||R==="noframes")&&Ue(/<\/no(script|embed|frames)/i,x.innerHTML)?(Je(x),!0):(N&&x.nodeType===jr.text&&(I=x.textContent,yn([B,K,te],se=>{I=Cr(I,se," ")}),x.textContent!==I&&(Er(t.removed,{element:x.cloneNode()}),x.textContent=I)),D(P.afterSanitizeElements,x,null),!1)},Z=function(x,I,R){if(Xn&&(I==="id"||I==="name")&&(R in r||R in Ls))return!1;if(!(ne&&!ee[I]&&Ue(pe,I))){if(!(U&&Ue(he,I))){if(!W[I]||ee[I]){if(!(ae(x)&&(G.tagNameCheck instanceof RegExp&&Ue(G.tagNameCheck,x)||G.tagNameCheck instanceof Function&&G.tagNameCheck(x))&&(G.attributeNameCheck instanceof RegExp&&Ue(G.attributeNameCheck,I)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(I))||I==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&Ue(G.tagNameCheck,R)||G.tagNameCheck instanceof Function&&G.tagNameCheck(R))))return!1}else if(!hr[I]){if(!Ue(S,Cr(R,je,""))){if(!((I==="src"||I==="xlink:href"||I==="href")&&x!=="script"&&kd(R,"data:")===0&&Qn[x])){if(!(re&&!Ue(Te,Cr(R,je,"")))){if(R)return!1}}}}}}return!0},ae=function(x){return x!=="annotation-xml"&&Bo(x,H)},de=function(x){D(P.beforeSanitizeAttributes,x,null);const{attributes:I}=x;if(!I||Qr(x))return;const R={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let se=I.length;for(;se--;){const Ee=I[se],{name:Se,namespaceURI:me,value:Ge}=Ee,Ht=Ie(Se);let Fe=Se==="value"?Ge:Id(Ge);if(R.attrName=Ht,R.attrValue=Fe,R.keepAttr=!0,R.forceKeepAttr=void 0,D(P.uponSanitizeAttribute,x,R),Fe=R.attrValue,Zn&&(Ht==="id"||Ht==="name")&&(vr(Se,x),Fe=Hr+Fe),Ne&&Ue(/((--!?|])>)|<\/(style|title)/i,Fe)){vr(Se,x);continue}if(R.forceKeepAttr||(vr(Se,x),!R.keepAttr))continue;if(!$e&&Ue(/\/>/i,Fe)){vr(Se,x);continue}N&&yn([B,K,te],Rc=>{Fe=Cr(Fe,Rc," ")});const Fc=Ie(x.nodeName);if(Z(Fc,Ht,Fe)){if(k&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!me)switch(y.getAttributeType(Fc,Ht)){case"TrustedHTML":{Fe=k.createHTML(Fe);break}case"TrustedScriptURL":{Fe=k.createScriptURL(Fe);break}}try{me?x.setAttributeNS(me,Se,Fe):x.setAttribute(Se,Fe),Qr(x)?Je(x):zo(t.removed)}catch{}}}D(P.afterSanitizeAttributes,x,null)},oe=function M(x){let I=null;const R=si(x);for(D(P.beforeSanitizeShadowDOM,x,null);I=R.nextNode();)D(P.uponSanitizeShadowNode,I,null),L(I),de(I),I.content instanceof s&&M(I.content);D(P.afterSanitizeShadowDOM,x,null)};return t.sanitize=function(M){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,R=null,se=null,Ee=null;if(Kr=!M,Kr&&(M="<!-->"),typeof M!="string"&&!b(M))if(typeof M.toString=="function"){if(M=M.toString(),typeof M!="string")throw Ar("dirty is not a string, aborting")}else throw Ar("toString is not a function");if(!t.isSupported)return M;if(nt||br(x),t.removed=[],typeof M=="string"&&(Wt=!1),Wt){if(M.nodeName){const Ge=Ie(M.nodeName);if(!A[Ge]||X[Ge])throw Ar("root node is forbidden and cannot be sanitized in-place")}}else if(M instanceof a)I=ii("<!---->"),R=I.ownerDocument.importNode(M,!0),R.nodeType===jr.element&&R.nodeName==="BODY"||R.nodeName==="HTML"?I=R:I.appendChild(R);else{if(!yt&&!N&&!We&&M.indexOf("<")===-1)return k&&bt?k.createHTML(M):M;if(I=ii(M),!I)return yt?null:bt?E:""}I&>&&Je(I.firstChild);const Se=si(Wt?M:I);for(;se=Se.nextNode();)L(se),de(se),se.content instanceof s&&oe(se.content);if(Wt)return M;if(yt){if(Vt)for(Ee=q.call(I.ownerDocument);I.firstChild;)Ee.appendChild(I.firstChild);else Ee=I;return(W.shadowroot||W.shadowrootmode)&&(Ee=g.call(n,Ee,!0)),Ee}let me=We?I.outerHTML:I.innerHTML;return We&&A["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&Ue(Yo,I.ownerDocument.doctype.name)&&(me="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
|
|
129
|
-
`+me),N&&yn([B,K,te],Ge=>{me=Cr(me,Ge," ")}),k&&bt?k.createHTML(me):me},t.setConfig=function(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};br(M),nt=!0},t.clearConfig=function(){_t=null,nt=!1},t.isValidAttribute=function(M,x,I){_t||br({});const R=Ie(M),se=Ie(x);return Z(R,se,I)},t.addHook=function(M,x){typeof x=="function"&&Er(P[M],x)},t.removeHook=function(M){return zo(P[M])},t.removeHooks=function(M){P[M]=[]},t.removeAllHooks=function(){P=Ko()},t}var Xo=Jo();const at=T.forwardRef(({fallback:e,functionProps:t,children:r},n)=>{if(typeof r=="function"&&(r=r(...t)),r===null)return null;const i=r||e;return T.isValidElement(i)?T.cloneElement(i,{ref:n}):i});at.displayName="FallbackWrapper";const qd={field:"_field_zdaf7_1",rtl:"_rtl_zdaf7_7",borderRight:"_borderRight_zdaf7_12"},xn=T.memo(({id:e,entry:t,loading:r,rightBorder:n,children:i,onClickEntry:s,customElement:o,sanitize:a,...u})=>{const c={text:{style:{whiteSpace:"nowrap",overflow:"ellipsis"}}},{text:f}=m.useProps("Field",c,u),d={};Object.entries(f).forEach(([y,v])=>{typeof v=="function"&&(d[y]=v(t))});const p=m.useStyles({name:"Field",props:u,classes:qd});return l.jsx(m.Table.Td,{...p("field"),onClick:s?()=>s(e,t):null,...u,children:l.jsx(m.Box,{w:"100%",children:l.jsx(m.Skeleton,{visible:r,children:l.jsx(at,{fallback:Array.isArray(i)?i.map((y,v)=>l.jsx(m.Text,{...f,...d,children:a?Xo.sanitize(y):y},v)):T.isValidElement(i)?i:l.jsx(m.Text,{...f,...d,children:a?Xo.sanitize(i):i}),functionProps:[t],children:o})})})})});xn.displayName="Field";const Zo={row:"_row_138r2_1",selected:"_selected_138r2_5"};function Kd({entry:e,selected:t,children:r}){const n=m.useStyles({name:"Row",classes:Zo}),i=m.useProps("Row",{},{});Object.entries(i).forEach(([a,u])=>{typeof u=="function"&&(i[a]=u(e))});var{className:s,style:o}=n("row");return s=`${s} ${t?Zo.selected:""}`,l.jsx(m.Table.Tr,{className:s,style:{...o},...i,children:r})}function Jd({bodyCustomizer:e,actionColumn:t,id:r,entry:n}){let i=e==null?void 0:e[t];return typeof i=="function"&&(i=i({id:r,...n})),i===null?null:i||l.jsx(ki,{id:r})}function Xd({data:e,loading:t,hideActions:r,hideCheckbox:n,selection:i,toggleRow:s,onClickEntry:o,bodyCustomizer:a,bodySeparator:u}){const c=e.list_columns.includes("actions")?"_actions":"actions",f=T.useMemo(()=>e!=null&&e.list_columns.includes("all")?"_all":"all",[e==null?void 0:e.list_columns]);return l.jsx(m.Table.Tbody,{children:e.result.length?e.result.map((d,p)=>{const y=e.ids[p];return l.jsxs(Kd,{entry:{...d,id:y},children:[n?null:l.jsx(xn,{loading:t,children:l.jsx(m.Checkbox,{pl:2,checked:i.includes(y),onChange:v=>{s(y)}})},p),r?null:l.jsx(xn,{loading:t,children:l.jsx(Jd,{bodyCustomizer:a,actionColumn:c,id:He(y),entry:d})}),e.list_columns.map((v,h)=>{let _=a==null?void 0:a[v];typeof _=="function"&&(_=_({id:y,...d}));let w=$i(d,v);typeof w=="number"?w=w.toLocaleString():w==null&&(w="");const O=(u==null?void 0:u[v])||(u==null?void 0:u[f]);return O&&(w=w.split(O)),_===null?null:l.jsx(xn,{id:y,entry:d,loading:t,onClickEntry:o,customElement:_,sanitize:!0,children:w},h)})]},He(y))}):l.jsx("tr",{children:l.jsx("td",{style:{padding:"8px"},colSpan:r?e.list_columns.length:e.list_columns.length+1,children:l.jsx(m.Text,{style:{fontStyle:"italic"},size:"sm",c:"dimmed",children:"No data available"})})})})}const Qo={root:"_root_1kmay_1",wrapper:"_wrapper_1kmay_7",icon:"_icon_1kmay_18"};function Bi({column:e,label:t,orderColumn:r,related:n,toggleAll:i,allChecked:s,classNames:o,styles:a,customElement:u,...c}){const{queryParams:f,setQueryParams:d,loading:p}=ue(),y={fw:700,size:"sm",color:"gray.8",hoverColor:"gray.6",selectedColor:"blue"},v=m.useStyles({name:"FieldTitle",classes:Qo,classNames:o,styles:a,props:c}),h=m.useProps("FieldTitle",y,c),{hovered:_,ref:w}=Pe.useHover(),O=r&&f.order_column===r,j=v("wrapper");return j.style.cursor=r?j.style.cursor:"auto",l.jsx(m.Table.Th,{className:Qo.fieldTitleRoot,...v("root"),onClick:r&&!p?()=>d({order_column:r,order_direction:f.order_direction==="asc"?"desc":"asc"}):null,children:l.jsx(m.Box,{ref:w,...j,children:e==="Checkbox"?l.jsx(m.Checkbox,{pb:5,pl:2,onChange:i,checked:s}):l.jsxs(l.Fragment,{children:[l.jsx(m.Box,{w:"100%",fw:h.fw,size:"xl",c:_&&r?h.hoverColor:O?h.selectedColor:h.color,children:u||t||e}),n?l.jsx(m.Tooltip,{label:"Related Field",children:l.jsx(m.Indicator,{label:"rel",style:{indicator:{top:"-1px !important",right:"-2px !important",padding:"4px"}},children:l.jsx(m.Box,{...v("icon"),children:O?f.order_direction==="asc"?l.jsx(Oi,{size:14,strokeWidth:1.5}):l.jsx(wo,{size:14,strokeWidth:1.5}):null})})}):l.jsx(m.Box,{...v("icon"),children:O?f.order_direction==="asc"?l.jsx(Oi,{size:14,strokeWidth:1.5}):l.jsx(wo,{size:14,strokeWidth:1.5}):null})]})})})}const ea=T.memo(({data:e,info:t,settings:r,hideActions:n,hideCheckbox:i,allChecked:s,toggleAll:o,headerCustomizer:a})=>{const u=e.list_columns.includes("actions")?"_actions":"actions";let c=a==null?void 0:a[u];return typeof c=="function"&&(c=c()),l.jsx(m.Table.Thead,{children:l.jsxs(m.Table.Tr,{children:[i?null:l.jsx(Bi,{data:e,column:"Checkbox",allChecked:s,toggleAll:o}),n?null:l.jsx(Bi,{column:"Actions",customElement:c}),e.list_columns.map((f,d)=>{var y;let p=a==null?void 0:a[f];return typeof p=="function"&&(p=p(e.label_columns[f])),p===null?null:l.jsx(Bi,{column:f,label:e.label_columns[f],orderColumn:e.order_columns.find(v=>v===f)||e.order_columns.find(v=>v.startsWith(`${f}.`)),related:((y=t.filters[f])==null?void 0:y.schema.type)==="Nested",customElement:p},f)})]})})});ea.displayName="Header";const Zd={scrollbar:"_scrollbar_isyo2_1"};function Qd({bulkActions:e,hideActions:t,loading:r,onSelectCheckbox:n,onClickEntry:i,hideCheckbox:s,hideDownload:o,headerCustomizer:a,bodyCustomizer:u,bodySeparator:c,...f}){const d=m.useMantineTheme(),p=m.Table.extend({highlightOnHover:!0,striped:!0,horizontalSpacing:"md",verticalSpacing:"sm"}),y=m.useProps("DatagridTable",p,f),{data:v,info:h}=ue(),[_,w]=T.useState([]),[O,j]=T.useState(!1),k=$=>{w(z=>z.includes($)?z.filter(q=>q!==$):[...z,$])},E=()=>{w($=>$.length===v.ids.length?[]:v.ids.map((z,q)=>z))};return T.useEffect(()=>{j(_.length===v.result.length&&_.length>0),n&&n(_),e==null||e.setSelectedIds(_.map($=>$))},[_]),T.useEffect(()=>{w([]),n&&n([])},[v]),l.jsx(m.ScrollArea,{options:{className:d.colorScheme==="dark"?"os-theme-light":void 0},style:{flex:1,flexDirection:"column"},classNames:Zd,children:l.jsxs(m.Table,{stickyHeader:!0,...y,children:[l.jsx(ea,{data:v,info:h,hideActions:t,hideCheckbox:s,allChecked:O,setSelection:w,toggleAll:E,headerCustomizer:a}),l.jsx(Xd,{data:v,loading:r,hideActions:t,hideCheckbox:s,selection:_,setSelection:w,toggleRow:k,onClickEntry:i,bodyCustomizer:u,bodySeparator:c})]})})}const ta=T.memo(({counter:e,...t})=>{const{data:r,queryParams:n,setQueryParams:i}=ue(),s=m.useMantineTheme(),o=[{value:"10",label:"10"},{value:"25",label:"25"},{value:"50",label:"50"}],a=String(n.page_size),[u,c]=T.useState(n.page);T.useEffect(()=>{c(n.page)},[n.page]);const f=p=>{c(p-1),i({page:p-1})},d=p=>{i({page_size:parseInt(p,10),page:0})};return l.jsxs(l.Fragment,{children:[l.jsx(m.Divider,{}),l.jsxs(m.Box,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:54,border:"none",borderTopWidth:"1px",padding:"var(--mantine-spacing-md)"},children:[l.jsxs(m.Box,{style:{display:"flex",alignItems:"center",gap:"var(--mantine-spacing-sm)"},children:[l.jsx(m.Text,{children:"Rows per page:"}),l.jsx(m.Select,{value:a,defaultValue:a,onChange:p=>d(p),data:o,allowDeselect:!1,w:80,size:"xs",styles:()=>({input:{fontSize:"14px",fontWeight:"250",lineHeight:"52px",border:"1px solid #E6E8ED"},item:{"&[data-selected]":{"&, &:hover":{outline:"none !important"}}}})})]}),l.jsx(m.Pagination,{size:"sm",total:Math.ceil(r.count/a),value:u+1,onChange:f,...t}),e&&r?l.jsxs(l.Fragment,{children:[l.jsx(m.Text,{c:s.primaryColor,size:"xs",fw:400,pl:20,children:"Total Records"}),l.jsx(m.Text,{c:s.primaryColor,size:"md",fw:700,pl:10,children:r.count})]}):null]})]})});ta.displayName="Pagination";const ep=0,tp=25,$r=250,Pr="global",Jt="header:",ra=Jt+"ctt",na=Jt+"between_integer",ia=Jt+"between_date",Xt=e=>e!==Pr&&!e.startsWith(Jt);function rp({form:e,name:t,items:r,onChange:n,...i}){return l.jsx(m.Select,{data:r,searchable:!0,...e.getInputProps(t),onChange:n,...i})}function sa({form:e,name:t,label:r,comboboxProps:n,...i}){const s=m.useCombobox({onDropdownClose:()=>s.resetSelectedOption(),onDropdownOpen:()=>s.updateSelectedOptionIndex("active")}),[o,a]=T.useState([]),[u,c]=T.useState(""),f=y=>{u!==""&&(o.includes(u)||a(v=>[...v,u]),c(""))},d=y=>a(v=>v.filter(h=>h!==y)),p=o.map(y=>l.jsx(m.Pill,{withRemoveButton:!0,onRemove:()=>d(y),children:y},y));return T.useEffect(()=>{const y=e.getInputProps(t).value;if(y)try{a([...y])}catch(v){console.error("Error parsing JSON:",v)}},[]),T.useEffect(()=>{e.getInputProps(t).onChange(o)},[o]),l.jsx(m.InputWrapper,{label:r,children:l.jsxs(m.Combobox,{store:s,onOptionSubmit:f,...n,children:[l.jsx(m.Combobox.DropdownTarget,{children:l.jsx(m.PillsInput,{onClick:()=>s.openDropdown(),children:l.jsxs(m.Pill.Group,{children:[p,l.jsx(m.Combobox.EventsTarget,{children:l.jsx(m.PillsInput.Field,{onFocus:()=>s.openDropdown(),onBlur:()=>s.closeDropdown(),value:u,placeholder:"Search values",onChange:y=>{s.updateSelectedOptionIndex(),c(y.currentTarget.value)},onKeyDown:y=>{y.key==="Backspace"&&u.length===0&&(y.preventDefault(),d(o[o.length-1]))}})})]})})}),l.jsx(m.Combobox.Dropdown,{children:l.jsx(m.Combobox.Options,{children:l.jsxs(m.Combobox.Option,{value:"$create",children:["+ Create ",u]})})})]})})}function np({form:e,name:t,items:r,onChange:n,...i}){return l.jsx(m.Select,{data:r,searchable:!0,...e.getInputProps(t),onChange:n,...i})}function oa({onClose:e,...t}){const{info:r,queryParams:n,setQueryParams:i,path:s}=ue(),o=xr.useForm({initialValues:{filters:[]},validate:Pi(wr({filters:Ei().of(wr({col:fn().transform(d=>d||void 0).required("Field is required"),opr:fn().transform(d=>d||void 0).required("col is required"),value:cn().when("col",{is:d=>d&&r.filters[d].schema.required,then:()=>cn().required("Value is required")})}))}))}),a={bg:"transparent",size:"sm",c:"gray"},u=m.useProps("ActionIcon",a,t);T.useEffect(()=>{o.setValues({filters:[]}),o.reset()},[s]),T.useEffect(()=>{if(n.filters&&n.filters.length){const d=n.filters.filter(p=>Xt(p.opr)).map(p=>({...p,key:Pe.randomId()}));o.setFieldValue("filters",d)}},[n.filters]);const c=d=>{const p=d.filters.map(({key:v,...h})=>h),y=JSON.parse(JSON.stringify(p));i({filters:y,page:0}),e()},f=o.values.filters.map((d,p)=>l.jsxs(m.Box,{px:"sm",children:[l.jsxs(m.Flex,{my:"md",gap:"md",style:{whiteSpace:"nowrap"},children:[l.jsx(m.Box,{style:{width:"192px"},children:r&&r.filters&&l.jsx(rp,{form:o,name:`filters.${p}.col`,items:Object.entries(r.filters).map(([y,v])=>({label:v.label,value:String(y)})),onChange:y=>{o.setFieldValue(`filters.${p}`,{col:y,opr:"",value:"",key:Pe.randomId()})}})}),l.jsx(m.Box,{style:{width:"192px"},children:d.col?l.jsx(np,{form:o,name:`filters.${p}.opr`,items:r.filters[d.col].filters.filter(y=>Xt(y.operator)).map(y=>({label:y.name,value:y.operator})),onChange:y=>{o.setFieldValue(`filters.${p}`,{col:o.values.filters[p].col,opr:y,value:"",key:Pe.randomId()})}}):null}),l.jsx(m.Box,{style:{width:"192px"},children:d.col?d.opr==="in"?l.jsx(sa,{form:o,name:`filters.${p}.value`}):l.jsx(gn,{form:o,name:`filters.${p}.value`,schema:r.filters[d.col].schema,filter:!0}):null}),l.jsx(m.ActionIcon,{bg:u.bg,size:u.size,c:u.c,onClick:()=>{o.removeListItem("filters",p)},children:l.jsx(Ao,{})})]}),o.values.filters.length>1&&p<o.values.filters.length-1?l.jsx(m.Divider,{my:"md",labelPosition:"center",label:"AND"}):null]},d.key));return l.jsxs(m.Box,{component:"form",onSubmit:o.onSubmit(c),children:[f.length===0&&l.jsx(m.Box,{style:{width:"642px"},children:l.jsx(m.Text,{style:{fontStyle:"italic",padding:"7px"},size:"sm",c:"dimmed",children:"No filters selected..."})}),l.jsx(m.ScrollArea.Autosize,{mah:"40vh",mt:20,children:f}),l.jsx(m.Divider,{my:"sm"}),l.jsxs(m.Box,{style:{display:"flex",justifyContent:"space-between"},children:[l.jsx(m.Button,{variant:"subtle",leftSection:l.jsx(hn,{}),onClick:()=>{o.insertListItem("filters",{col:"",opr:"",value:"",key:Pe.randomId()})},children:"Add Filter"}),l.jsx(m.Group,{spacing:"md",children:l.jsx(m.Button,{type:"submit",children:"Apply"})})]})]})}function aa(...e){const{queryParams:t}=ue(),r={bg:"transparent",size:"sm",c:"gray"},n=m.useProps("ActionIcon",r,e),[i,s]=T.useState(!1);return l.jsxs(m.Popover,{opened:i,position:"bottom-end",onClose:()=>s(!1),closeOnClickOutside:!1,children:[l.jsx(m.Popover.Target,{children:l.jsx(m.Tooltip,{opened:i?!1:null,label:"Filter",children:(t==null?void 0:t.filters.filter(o=>Xt(o.opr)).length)!=0?l.jsx(m.Indicator,{zIndex:20,size:16,label:t==null?void 0:t.filters.length,children:l.jsx(m.ActionIcon,{bg:n.bg,size:n.size,c:n.c,onClick:()=>s(!0),children:l.jsx(ji,{})})}):l.jsx(m.ActionIcon,{bg:n.bg,size:n.size,c:n.c,onClick:()=>s(!0),children:l.jsx(ji,{})})})}),l.jsxs(m.Popover.Dropdown,{px:"xs",children:[l.jsx(m.Box,{style:{position:"absolute",top:4,right:4},children:l.jsx(m.CloseButton,{title:"Filters",onClick:()=>s(!1)})}),l.jsx(oa,{onClose:()=>{s(!1)}})]})]})}function ip(...e){const[t,r]=T.useState(!1),{download:n}=ue(),i={bg:"transparent",size:"sm",c:"gray"},s=m.useProps("ActionIcon",i,e);return t?l.jsx(m.Loader,{color:s.c,size:s.size}):l.jsx(m.Tooltip,{label:"Download",children:l.jsx(m.ActionIcon,{bg:s.bg,size:s.size,c:s.c,onClick:()=>{r(!0),n("download").then(()=>r(!1))},children:l.jsx(Eo,{})})})}const la=T.memo(({hideAdd:e,hideFilter:t,hideDownload:r,toolbarCustomizer:n})=>{const{info:i}=ue(),s=T.useMemo(()=>{const a={};return Object.entries(n).forEach(([u,c])=>{a[u]=c,typeof a[u]=="function"&&(a[u]=a[u]())}),a},[n]),o=i.permissions.includes("can_post");return l.jsxs(m.Flex,{justify:"flex-end",p:"md",gap:"sm",children:[!r&&(s.download||l.jsx(ip,{})),o&&!e?s.add||l.jsx(Fo,{}):null,t?null:s.filter||l.jsx(aa,{})]})});la.displayName="Toolbar";const Ui=T.forwardRef((e,t)=>{const{path:r,data:n,loading:i,info:s,setQueryParams:o}=ue(),{hideToolbar:a=!1,hideFilter:u=!1,hideAdd:c=!1,hideSettings:f=!1,hideActions:d=!1,hidePagination:p=!1,hideError:y=!1,hideDownload:v=!0,onSelectCheckbox:h=null,onClickEntry:_=null,fetchOnMount:w=!0,bulkActions:O=null,styles:j,headerCustomizer:k={},bodyCustomizer:E={},toolbarCustomizer:$={},counter:z=!1,bodySeparator:q}=e;if(T.useEffect(()=>{!n&&w&&o({})},[n]),!s)return;const Q=O===null;return l.jsxs(m.Paper,{ref:t,style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",...j},children:[a?null:l.jsx(la,{hideFilter:u,hideAdd:c,hideSettings:f,hideDownload:v,toolbarCustomizer:$}),n?l.jsx(Qd,{bulkActions:O,hideActions:d,loading:i,onSelectCheckbox:h,onClickEntry:_,hideCheckbox:Q,hideDownload:v,headerCustomizer:k,bodyCustomizer:E,bodySeparator:q}):null,!p&&n?l.jsx(ta,{counter:z}):null,y?null:l.jsx(Oo,{})]})});Ui.displayName="DataGrid";function sp({children:e,fetch:t=!0,loading:r=l.jsx(m.Center,{children:l.jsx(m.Loader,{})}),end:n=l.jsx(m.Center,{children:"End of data"}),fetchWrapper:i=m.Center,fetchWrapperProps:s}){const{streaming:o,loading:a}=ue(),{ref:u,inViewport:c}=Pe.useInViewport(),f=T.useMemo(()=>Object.values(o.data).flat(),[o.data]),d=T.useMemo(()=>typeof e=="function"?e(f):e,[e,f]);return T.useEffect(()=>{c&&t&&o.fetch()},[c]),l.jsxs(l.Fragment,{children:[d,a&&r,o.isEnd&&n,l.jsx(i,{ref:u,id:"IS-load-trigger",mih:"1%",...s})]})}var op=Object.prototype;function ap(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||op;return e===r}var Tn=ap;function lp(e,t){return function(r){return e(t(r))}}var ua=lp,up=ua,cp=up(Object.keys,Object),fp=cp,dp=Tn,pp=fp,hp=Object.prototype,mp=hp.hasOwnProperty;function gp(e){if(!dp(e))return pp(e);var t=[];for(var r in Object(e))mp.call(e,r)&&r!="constructor"&&t.push(r);return t}var yp=gp,bp=typeof en=="object"&&en&&en.Object===Object&&en,ca=bp,vp=ca,xp=typeof self=="object"&&self&&self.Object===Object&&self,Tp=vp||xp||Function("return this")(),rt=Tp,_p=rt,Sp=_p.Symbol,_n=Sp,fa=_n,da=Object.prototype,wp=da.hasOwnProperty,Ep=da.toString,kr=fa?fa.toStringTag:void 0;function Cp(e){var t=wp.call(e,kr),r=e[kr];try{e[kr]=void 0;var n=!0}catch{}var i=Ep.call(e);return n&&(t?e[kr]=r:delete e[kr]),i}var Ap=Cp,Op=Object.prototype,jp=Op.toString;function $p(e){return jp.call(e)}var Pp=$p,pa=_n,kp=Ap,Ip=Pp,Dp="[object Null]",Mp="[object Undefined]",ha=pa?pa.toStringTag:void 0;function Fp(e){return e==null?e===void 0?Mp:Dp:ha&&ha in Object(e)?kp(e):Ip(e)}var Zt=Fp;function Rp(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var dt=Rp,Np=Zt,Lp=dt,zp="[object AsyncFunction]",Bp="[object Function]",Up="[object GeneratorFunction]",Vp="[object Proxy]";function Wp(e){if(!Lp(e))return!1;var t=Np(e);return t==Bp||t==Up||t==zp||t==Vp}var Vi=Wp,Gp=rt,Hp=Gp["__core-js_shared__"],Yp=Hp,Wi=Yp,ma=function(){var e=/[^.]+$/.exec(Wi&&Wi.keys&&Wi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function qp(e){return!!ma&&ma in e}var Kp=qp,Jp=Function.prototype,Xp=Jp.toString;function Zp(e){if(e!=null){try{return Xp.call(e)}catch{}try{return e+""}catch{}}return""}var ga=Zp,Qp=Vi,eh=Kp,th=dt,rh=ga,nh=/[\\^$.*+?()[\]{}|]/g,ih=/^\[object .+?Constructor\]$/,sh=Function.prototype,oh=Object.prototype,ah=sh.toString,lh=oh.hasOwnProperty,uh=RegExp("^"+ah.call(lh).replace(nh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ch(e){if(!th(e)||eh(e))return!1;var t=Qp(e)?uh:ih;return t.test(rh(e))}var fh=ch;function dh(e,t){return e==null?void 0:e[t]}var ph=dh,hh=fh,mh=ph;function gh(e,t){var r=mh(e,t);return hh(r)?r:void 0}var zt=gh,yh=zt,bh=rt,vh=yh(bh,"DataView"),xh=vh,Th=zt,_h=rt,Sh=Th(_h,"Map"),Gi=Sh,wh=zt,Eh=rt,Ch=wh(Eh,"Promise"),Ah=Ch,Oh=zt,jh=rt,$h=Oh(jh,"Set"),ya=$h,Ph=zt,kh=rt,Ih=Ph(kh,"WeakMap"),Dh=Ih,Hi=xh,Yi=Gi,qi=Ah,Ki=ya,Ji=Dh,ba=Zt,Qt=ga,va="[object Map]",Mh="[object Object]",xa="[object Promise]",Ta="[object Set]",_a="[object WeakMap]",Sa="[object DataView]",Fh=Qt(Hi),Rh=Qt(Yi),Nh=Qt(qi),Lh=Qt(Ki),zh=Qt(Ji),Bt=ba;(Hi&&Bt(new Hi(new ArrayBuffer(1)))!=Sa||Yi&&Bt(new Yi)!=va||qi&&Bt(qi.resolve())!=xa||Ki&&Bt(new Ki)!=Ta||Ji&&Bt(new Ji)!=_a)&&(Bt=function(e){var t=ba(e),r=t==Mh?e.constructor:void 0,n=r?Qt(r):"";if(n)switch(n){case Fh:return Sa;case Rh:return va;case Nh:return xa;case Lh:return Ta;case zh:return _a}return t});var Bh=Bt;function Uh(e){return e!=null&&typeof e=="object"}var er=Uh,Vh=Zt,Wh=er,Gh="[object Arguments]";function Hh(e){return Wh(e)&&Vh(e)==Gh}var Yh=Hh,wa=Yh,qh=er,Ea=Object.prototype,Kh=Ea.hasOwnProperty,Jh=Ea.propertyIsEnumerable,Xh=wa(function(){return arguments}())?wa:function(e){return qh(e)&&Kh.call(e,"callee")&&!Jh.call(e,"callee")},Sn=Xh,Zh=Array.isArray,Ir=Zh,Qh=9007199254740991;function em(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Qh}var Ca=em,tm=Vi,rm=Ca;function nm(e){return e!=null&&rm(e.length)&&!tm(e)}var wn=nm,En={exports:{}};function im(){return!1}var sm=im;En.exports,function(e,t){var r=rt,n=sm,i=t&&!t.nodeType&&t,s=i&&!0&&e&&!e.nodeType&&e,o=s&&s.exports===i,a=o?r.Buffer:void 0,u=a?a.isBuffer:void 0,c=u||n;e.exports=c}(En,En.exports);var Xi=En.exports,om=Zt,am=Ca,lm=er,um="[object Arguments]",cm="[object Array]",fm="[object Boolean]",dm="[object Date]",pm="[object Error]",hm="[object Function]",mm="[object Map]",gm="[object Number]",ym="[object Object]",bm="[object RegExp]",vm="[object Set]",xm="[object String]",Tm="[object WeakMap]",_m="[object ArrayBuffer]",Sm="[object DataView]",wm="[object Float32Array]",Em="[object Float64Array]",Cm="[object Int8Array]",Am="[object Int16Array]",Om="[object Int32Array]",jm="[object Uint8Array]",$m="[object Uint8ClampedArray]",Pm="[object Uint16Array]",km="[object Uint32Array]",_e={};_e[wm]=_e[Em]=_e[Cm]=_e[Am]=_e[Om]=_e[jm]=_e[$m]=_e[Pm]=_e[km]=!0,_e[um]=_e[cm]=_e[_m]=_e[fm]=_e[Sm]=_e[dm]=_e[pm]=_e[hm]=_e[mm]=_e[gm]=_e[ym]=_e[bm]=_e[vm]=_e[xm]=_e[Tm]=!1;function Im(e){return lm(e)&&am(e.length)&&!!_e[om(e)]}var Dm=Im;function Mm(e){return function(t){return e(t)}}var Fm=Mm,Cn={exports:{}};Cn.exports,function(e,t){var r=ca,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,o=s&&r.process,a=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();e.exports=a}(Cn,Cn.exports);var Rm=Cn.exports,Nm=Dm,Lm=Fm,Aa=Rm,Oa=Aa&&Aa.isTypedArray,zm=Oa?Lm(Oa):Nm,Zi=zm,Bm=yp,Um=Bh,Vm=Sn,Wm=Ir,Gm=wn,Hm=Xi,Ym=Tn,qm=Zi,Km="[object Map]",Jm="[object Set]",Xm=Object.prototype,Zm=Xm.hasOwnProperty;function Qm(e){if(e==null)return!0;if(Gm(e)&&(Wm(e)||typeof e=="string"||typeof e.splice=="function"||Hm(e)||qm(e)||Vm(e)))return!e.length;var t=Um(e);if(t==Km||t==Jm)return!e.size;if(Ym(e))return!Bm(e).length;for(var r in e)if(Zm.call(e,r))return!1;return!0}var eg=Qm;const ja=wt(eg),$a=(e,t,r,n,i,s,o)=>e.map((a,u)=>l.jsx(m.Grid.Col,{span:i==="row"?12/e.length:12,style:{alignContent:"end"},children:l.jsx(xe.JsonFormsDispatch,{uischema:a,schema:t,path:r,enabled:n,renderers:s,cells:o})},`${r}-${u}`)),tg=({elements:e,schema:t,path:r,enabled:n,direction:i,renderers:s,cells:o})=>ja(e)?null:l.jsx(m.Grid,{spacing:i==="row"?2:0,children:$a(e,t,r,n,i,s,o)}),Qi=T.memo(tg),rg=e=>function(r){const n=xe.useJsonForms(),i=Y.getAjv({jsonforms:{...n}});return l.jsx(e,{...r,ajv:i})};var ng=rt,ig=function(){return ng.Date.now()},sg=ig,og=/\s/;function ag(e){for(var t=e.length;t--&&og.test(e.charAt(t)););return t}var lg=ag,ug=lg,cg=/^\s+/;function fg(e){return e&&e.slice(0,ug(e)+1).replace(cg,"")}var dg=fg,pg=Zt,hg=er,mg="[object Symbol]";function gg(e){return typeof e=="symbol"||hg(e)&&pg(e)==mg}var Pa=gg,yg=dg,ka=dt,bg=Pa,Ia=NaN,vg=/^[-+]0x[0-9a-f]+$/i,xg=/^0b[01]+$/i,Tg=/^0o[0-7]+$/i,_g=parseInt;function Sg(e){if(typeof e=="number")return e;if(bg(e))return Ia;if(ka(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ka(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=yg(e);var r=xg.test(e);return r||Tg.test(e)?_g(e.slice(2),r?2:8):vg.test(e)?Ia:+e}var Da=Sg,wg=dt,es=sg,Ma=Da,Eg="Expected a function",Cg=Math.max,Ag=Math.min;function Og(e,t,r){var n,i,s,o,a,u,c=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(Eg);t=Ma(t)||0,wg(r)&&(f=!!r.leading,d="maxWait"in r,s=d?Cg(Ma(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p);function y($){var z=n,q=i;return n=i=void 0,c=$,o=e.apply(q,z),o}function v($){return c=$,a=setTimeout(w,t),f?y($):o}function h($){var z=$-u,q=$-c,Q=t-z;return d?Ag(Q,s-q):Q}function _($){var z=$-u,q=$-c;return u===void 0||z>=t||z<0||d&&q>=s}function w(){var $=es();if(_($))return O($);a=setTimeout(w,h($))}function O($){return a=void 0,p&&n?y($):(n=i=void 0,o)}function j(){a!==void 0&&clearTimeout(a),c=0,n=u=i=a=void 0}function k(){return a===void 0?o:O(es())}function E(){var $=es(),z=_($);if(n=arguments,i=this,u=$,z){if(a===void 0)return v(u);if(d)return clearTimeout(a),a=setTimeout(w,t),y(u)}return a===void 0&&(a=setTimeout(w,t)),o}return E.cancel=j,E.flush=k,E}var jg=Og;const $g=wt(jg),Fa=(e,t,r,n,i,s=300)=>{const[o,a]=T.useState(r??t);T.useEffect(()=>{a(r??t)},[r]);const u=T.useCallback($g(d=>e(n,d),s),[e,n,s]),c=T.useCallback(d=>{const p=i(d);a(p??t),u(p)},[u,i]),f=T.useCallback(()=>{a(t),e(n,void 0)},[t,e,n]);return[o,c,f]},Pg=e=>e===""?void 0:parseFloat(e),kg=e=>Pg(e),An=T.memo(function(t){const{allowDecimal:r,className:n,data:i,description:s,errors:o,enabled:a,handleChange:u,label:c,path:f,required:d,hideControls:p}=t,[y,v]=Fa(u,"",i,f,kg),h=m.useProps(f,{},{});return Object.keys(h).forEach(_=>{typeof h[_]=="function"&&(h[_]=h[_](i))}),l.jsx(m.NumberInput,{label:c,description:s,error:o,required:d,value:y,onChange:v,className:n,disabled:!a,allowDecimal:r,hideControls:p,w:"100%",...h})});function Ig(){this.__data__=[],this.size=0}var Dg=Ig;function Mg(e,t){return e===t||e!==e&&t!==t}var On=Mg,Fg=On;function Rg(e,t){for(var r=e.length;r--;)if(Fg(e[r][0],t))return r;return-1}var jn=Rg,Ng=jn,Lg=Array.prototype,zg=Lg.splice;function Bg(e){var t=this.__data__,r=Ng(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():zg.call(t,r,1),--this.size,!0}var Ug=Bg,Vg=jn;function Wg(e){var t=this.__data__,r=Vg(t,e);return r<0?void 0:t[r][1]}var Gg=Wg,Hg=jn;function Yg(e){return Hg(this.__data__,e)>-1}var qg=Yg,Kg=jn;function Jg(e,t){var r=this.__data__,n=Kg(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Xg=Jg,Zg=Dg,Qg=Ug,ey=Gg,ty=qg,ry=Xg;function tr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}tr.prototype.clear=Zg,tr.prototype.delete=Qg,tr.prototype.get=ey,tr.prototype.has=ty,tr.prototype.set=ry;var $n=tr,ny=$n;function iy(){this.__data__=new ny,this.size=0}var sy=iy;function oy(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var ay=oy;function ly(e){return this.__data__.get(e)}var uy=ly;function cy(e){return this.__data__.has(e)}var fy=cy,dy=zt,py=dy(Object,"create"),Pn=py,Ra=Pn;function hy(){this.__data__=Ra?Ra(null):{},this.size=0}var my=hy;function gy(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var yy=gy,by=Pn,vy="__lodash_hash_undefined__",xy=Object.prototype,Ty=xy.hasOwnProperty;function _y(e){var t=this.__data__;if(by){var r=t[e];return r===vy?void 0:r}return Ty.call(t,e)?t[e]:void 0}var Sy=_y,wy=Pn,Ey=Object.prototype,Cy=Ey.hasOwnProperty;function Ay(e){var t=this.__data__;return wy?t[e]!==void 0:Cy.call(t,e)}var Oy=Ay,jy=Pn,$y="__lodash_hash_undefined__";function Py(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=jy&&t===void 0?$y:t,this}var ky=Py,Iy=my,Dy=yy,My=Sy,Fy=Oy,Ry=ky;function rr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}rr.prototype.clear=Iy,rr.prototype.delete=Dy,rr.prototype.get=My,rr.prototype.has=Fy,rr.prototype.set=Ry;var Ny=rr,Na=Ny,Ly=$n,zy=Gi;function By(){this.size=0,this.__data__={hash:new Na,map:new(zy||Ly),string:new Na}}var Uy=By;function Vy(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Wy=Vy,Gy=Wy;function Hy(e,t){var r=e.__data__;return Gy(t)?r[typeof t=="string"?"string":"hash"]:r.map}var kn=Hy,Yy=kn;function qy(e){var t=Yy(this,e).delete(e);return this.size-=t?1:0,t}var Ky=qy,Jy=kn;function Xy(e){return Jy(this,e).get(e)}var Zy=Xy,Qy=kn;function e0(e){return Qy(this,e).has(e)}var t0=e0,r0=kn;function n0(e,t){var r=r0(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var i0=n0,s0=Uy,o0=Ky,a0=Zy,l0=t0,u0=i0;function nr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}nr.prototype.clear=s0,nr.prototype.delete=o0,nr.prototype.get=a0,nr.prototype.has=l0,nr.prototype.set=u0;var La=nr,c0=$n,f0=Gi,d0=La,p0=200;function h0(e,t){var r=this.__data__;if(r instanceof c0){var n=r.__data__;if(!f0||n.length<p0-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new d0(n)}return r.set(e,t),this.size=r.size,this}var m0=h0,g0=$n,y0=sy,b0=ay,v0=uy,x0=fy,T0=m0;function ir(e){var t=this.__data__=new g0(e);this.size=t.size}ir.prototype.clear=y0,ir.prototype.delete=b0,ir.prototype.get=v0,ir.prototype.has=x0,ir.prototype.set=T0;var _0=ir,S0=zt,w0=function(){try{var e=S0(Object,"defineProperty");return e({},"",{}),e}catch{}}(),za=w0,Ba=za;function E0(e,t,r){t=="__proto__"&&Ba?Ba(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var ts=E0,C0=ts,A0=On;function O0(e,t,r){(r!==void 0&&!A0(e[t],r)||r===void 0&&!(t in e))&&C0(e,t,r)}var Ua=O0;function j0(e){return function(t,r,n){for(var i=-1,s=Object(t),o=n(t),a=o.length;a--;){var u=o[e?a:++i];if(r(s[u],u,s)===!1)break}return t}}var $0=j0,P0=$0,k0=P0(),I0=k0,In={exports:{}};In.exports,function(e,t){var r=rt,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,o=s?r.Buffer:void 0,a=o?o.allocUnsafe:void 0;function u(c,f){if(f)return c.slice();var d=c.length,p=a?a(d):new c.constructor(d);return c.copy(p),p}e.exports=u}(In,In.exports);var D0=In.exports,M0=rt,F0=M0.Uint8Array,R0=F0,Va=R0;function N0(e){var t=new e.constructor(e.byteLength);return new Va(t).set(new Va(e)),t}var L0=N0,z0=L0;function B0(e,t){var r=t?z0(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var U0=B0;function V0(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var W0=V0,G0=dt,Wa=Object.create,H0=function(){function e(){}return function(t){if(!G0(t))return{};if(Wa)return Wa(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Y0=H0,q0=ua,K0=q0(Object.getPrototypeOf,Object),Ga=K0,J0=Y0,X0=Ga,Z0=Tn;function Q0(e){return typeof e.constructor=="function"&&!Z0(e)?J0(X0(e)):{}}var eb=Q0,tb=wn,rb=er;function nb(e){return rb(e)&&tb(e)}var Ha=nb,ib=Zt,sb=Ga,ob=er,ab="[object Object]",lb=Function.prototype,ub=Object.prototype,Ya=lb.toString,cb=ub.hasOwnProperty,fb=Ya.call(Object);function db(e){if(!ob(e)||ib(e)!=ab)return!1;var t=sb(e);if(t===null)return!0;var r=cb.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ya.call(r)==fb}var pb=db;function hb(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var qa=hb,mb=ts,gb=On,yb=Object.prototype,bb=yb.hasOwnProperty;function vb(e,t,r){var n=e[t];(!(bb.call(e,t)&&gb(n,r))||r===void 0&&!(t in e))&&mb(e,t,r)}var xb=vb,Tb=xb,_b=ts;function Sb(e,t,r,n){var i=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var a=t[s],u=n?n(r[a],e[a],a,r,e):void 0;u===void 0&&(u=e[a]),i?_b(r,a,u):Tb(r,a,u)}return r}var wb=Sb;function Eb(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Cb=Eb,Ab=9007199254740991,Ob=/^(?:0|[1-9]\d*)$/;function jb(e,t){var r=typeof e;return t=t??Ab,!!t&&(r=="number"||r!="symbol"&&Ob.test(e))&&e>-1&&e%1==0&&e<t}var Ka=jb,$b=Cb,Pb=Sn,kb=Ir,Ib=Xi,Db=Ka,Mb=Zi,Fb=Object.prototype,Rb=Fb.hasOwnProperty;function Nb(e,t){var r=kb(e),n=!r&&Pb(e),i=!r&&!n&&Ib(e),s=!r&&!n&&!i&&Mb(e),o=r||n||i||s,a=o?$b(e.length,String):[],u=a.length;for(var c in e)(t||Rb.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Db(c,u)))&&a.push(c);return a}var Lb=Nb;function zb(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Bb=zb,Ub=dt,Vb=Tn,Wb=Bb,Gb=Object.prototype,Hb=Gb.hasOwnProperty;function Yb(e){if(!Ub(e))return Wb(e);var t=Vb(e),r=[];for(var n in e)n=="constructor"&&(t||!Hb.call(e,n))||r.push(n);return r}var qb=Yb,Kb=Lb,Jb=qb,Xb=wn;function Zb(e){return Xb(e)?Kb(e,!0):Jb(e)}var Ja=Zb,Qb=wb,ev=Ja;function tv(e){return Qb(e,ev(e))}var rv=tv,Xa=Ua,nv=D0,iv=U0,sv=W0,ov=eb,Za=Sn,Qa=Ir,av=Ha,lv=Xi,uv=Vi,cv=dt,fv=pb,dv=Zi,el=qa,pv=rv;function hv(e,t,r,n,i,s,o){var a=el(e,r),u=el(t,r),c=o.get(u);if(c){Xa(e,r,c);return}var f=s?s(a,u,r+"",e,t,o):void 0,d=f===void 0;if(d){var p=Qa(u),y=!p&&lv(u),v=!p&&!y&&dv(u);f=u,p||y||v?Qa(a)?f=a:av(a)?f=sv(a):y?(d=!1,f=nv(u,!0)):v?(d=!1,f=iv(u,!0)):f=[]:fv(u)||Za(u)?(f=a,Za(a)?f=pv(a):(!cv(a)||uv(a))&&(f=ov(u))):d=!1}d&&(o.set(u,f),i(f,u,n,s,o),o.delete(u)),Xa(e,r,f)}var mv=hv,gv=_0,yv=Ua,bv=I0,vv=mv,xv=dt,Tv=Ja,_v=qa;function tl(e,t,r,n,i){e!==t&&bv(t,function(s,o){if(i||(i=new gv),xv(s))vv(e,t,o,r,tl,n,i);else{var a=n?n(_v(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),yv(e,o,a)}},Tv)}var Sv=tl;function wv(e){return e}var rl=wv;function Ev(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Cv=Ev,Av=Cv,nl=Math.max;function Ov(e,t,r){return t=nl(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=nl(n.length-t,0),o=Array(s);++i<s;)o[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=r(o),Av(e,this,a)}}var jv=Ov;function $v(e){return function(){return e}}var Pv=$v,kv=Pv,il=za,Iv=rl,Dv=il?function(e,t){return il(e,"toString",{configurable:!0,enumerable:!1,value:kv(t),writable:!0})}:Iv,Mv=Dv,Fv=800,Rv=16,Nv=Date.now;function Lv(e){var t=0,r=0;return function(){var n=Nv(),i=Rv-(n-r);if(r=n,i>0){if(++t>=Fv)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var zv=Lv,Bv=Mv,Uv=zv,Vv=Uv(Bv),Wv=Vv,Gv=rl,Hv=jv,Yv=Wv;function qv(e,t){return Yv(Hv(e,t,Gv),e+"")}var sl=qv,Kv=On,Jv=wn,Xv=Ka,Zv=dt;function Qv(e,t,r){if(!Zv(r))return!1;var n=typeof t;return(n=="number"?Jv(r)&&Xv(t,r.length):n=="string"&&t in r)?Kv(r[t],e):!1}var ol=Qv,ex=sl,tx=ol;function rx(e){return ex(function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&tx(r[0],r[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++n<i;){var a=r[n];a&&e(t,a,n,s)}return t})}var nx=rx,ix=Sv,sx=nx,ox=sx(function(e,t,r){ix(e,t,r)}),ax=ox;const al=wt(ax),ll=T.memo(function(t){const{className:r,config:n,uischema:i,data:s,description:o,errors:a,enabled:u,path:c,handleChange:f,label:d,required:p}=t,y=al({},n,i.options),v=m.useProps(c,{},{});return Object.keys(v).forEach(h=>{typeof v[h]=="function"&&(v[h]=v[h](s))}),y.format==="password"?l.jsx(m.PasswordInput,{label:d,description:o,error:a,required:p,value:s||"",onChange:h=>{f(c,h.currentTarget.value)},className:r,disabled:!u,w:"100%",...v}):l.jsx(m.TextInput,{label:d,description:o,error:a,required:p,value:s||"",onChange:h=>{f(c,h.currentTarget.value)},className:r,disabled:!u,w:"100%",...v})}),ul=T.memo(function(t){const{className:r,data:n,description:i,enabled:s,errors:o,handleChange:a,label:u,labelPosition:c,path:f,required:d}=t,p=m.useProps(f,{},{});return Object.keys(p).forEach(y=>{typeof p[y]=="function"&&(p[y]=p[y](n))}),l.jsx(m.Checkbox,{label:u,description:i,error:o,disabled:!s,className:r,labelPosition:c,required:d,data:[{label:"true",value:"true"},{label:"false",value:"false"}],value:String(n)||"",onChange:y=>{a(f,y==="true")},...p})}),lx=e=>l.jsx(An,{...e}),cl=Y.rankWith(4,Y.isNumberControl),fl=xe.withJsonFormsCellProps(lx),ux=e=>l.jsx(An,{...e}),dl=Y.rankWith(3,Y.isIntegerControl),pl=xe.withJsonFormsCellProps(ux),cx=e=>l.jsx(ll,{...e}),hl=Y.rankWith(2,Y.isStringControl),ml=xe.withJsonFormsCellProps(cx),fx=e=>l.jsx(ul,{...e}),gl=Y.rankWith(3,Y.isBooleanControl),yl=xe.withJsonFormsCellProps(fx),dx=e=>{const{data:t,className:r,enabled:n,path:i,handleChange:s,description:o,errors:a,label:u,required:c}=e,f=m.useProps(i,{},{});return Object.keys(f).forEach(d=>{typeof f[d]=="function"&&(f[d]=f[d](t))}),l.jsx(St.DateInput,{valueFormat:"DD.MM.YYYY",label:u,description:o,error:a,required:c,value:t?new Date(t):null,onChange:d=>{if(d instanceof Date){const p=new Date(d.getTime()-d.getTimezoneOffset()*6e4);s(i,p.toISOString().substring(0,10))}},className:r,disabled:!n,w:"100%",...f})},bl=Y.rankWith(2,Y.isDateControl),vl=xe.withJsonFormsCellProps(dx),px=e=>{const{description:t,className:r,enabled:n,path:i,handleChange:s,data:o,errors:a,label:u,required:c}=e,f=m.useProps(i,{},{});return Object.keys(f).forEach(d=>{typeof f[d]=="function"&&(f[d]=f[d](o))}),l.jsx(St.DateInput,{valueFormat:"DD.MM.YYYY",className:r,disabled:!n,label:u,description:t,error:a,required:c,value:o?new Date(o):null,onChange:d=>{if(d instanceof Date){const p=new Date(d.getTime()-d.getTimezoneOffset()*6e4);s(i,p.toISOString().substring(0,10))}},w:"100%",...f})},xl=Y.rankWith(5,Y.isDateTimeControl),Tl=xe.withJsonFormsControlProps(px),hx=e=>{const{description:t,data:r,path:n,options:i,enabled:s,handleChange:o,className:a,errors:u,label:c,required:f}=e,d=m.useProps(n,{},{});return Object.keys(d).forEach(p=>{typeof d[p]=="function"&&(d[p]=d[p](r))}),l.jsx(m.Select,{data:i,defaultValue:r,label:c,description:t,required:f,error:u,disabled:!s,searchable:!0,onChange:p=>{o(n,p)},className:a,w:"100%",...d})},_l=Y.rankWith(5,Y.isEnumControl),Sl=xe.withJsonFormsEnumProps(xe.withTranslateProps(T.memo(hx)),!1);function mx(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var gx=mx,wl=_n,yx=Sn,bx=Ir,El=wl?wl.isConcatSpreadable:void 0;function vx(e){return bx(e)||yx(e)||!!(El&&e&&e[El])}var xx=vx,Tx=gx,_x=xx;function Cl(e,t,r,n,i){var s=-1,o=e.length;for(r||(r=_x),i||(i=[]);++s<o;){var a=e[s];t>0&&r(a)?t>1?Cl(a,t-1,r,n,i):Tx(i,a):n||(i[i.length]=a)}return i}var Sx=Cl,wx="__lodash_hash_undefined__";function Ex(e){return this.__data__.set(e,wx),this}var Cx=Ex;function Ax(e){return this.__data__.has(e)}var Ox=Ax,jx=La,$x=Cx,Px=Ox;function Dn(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new jx;++t<r;)this.add(e[t])}Dn.prototype.add=Dn.prototype.push=$x,Dn.prototype.has=Px;var kx=Dn;function Ix(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return-1}var Dx=Ix;function Mx(e){return e!==e}var Fx=Mx;function Rx(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var Nx=Rx,Lx=Dx,zx=Fx,Bx=Nx;function Ux(e,t,r){return t===t?Bx(e,t,r):Lx(e,zx,r)}var Vx=Ux,Wx=Vx;function Gx(e,t){var r=e==null?0:e.length;return!!r&&Wx(e,t,0)>-1}var Hx=Gx;function Yx(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var qx=Yx;function Kx(e,t){return e.has(t)}var Jx=Kx;function Xx(){}var Zx=Xx;function Qx(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Al=Qx,rs=ya,e1=Zx,t1=Al,r1=1/0,n1=rs&&1/t1(new rs([,-0]))[1]==r1?function(e){return new rs(e)}:e1,i1=n1,s1=kx,o1=Hx,a1=qx,l1=Jx,u1=i1,c1=Al,f1=200;function d1(e,t,r){var n=-1,i=o1,s=e.length,o=!0,a=[],u=a;if(r)o=!1,i=a1;else if(s>=f1){var c=t?null:u1(e);if(c)return c1(c);o=!1,i=l1,u=new s1}else u=t?[]:a;e:for(;++n<s;){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,o&&d===d){for(var p=u.length;p--;)if(u[p]===d)continue e;t&&u.push(d),a.push(f)}else i(u,d,r)||(u!==a&&u.push(d),a.push(f))}return a}var p1=d1,h1=Sx,m1=sl,g1=p1,y1=Ha,b1=m1(function(e){return g1(h1(e,1,y1,!0))}),v1=b1;const x1=wt(v1);function T1(e,t,r,n){var i=-1,s=e==null?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}var _1=T1;function S1(e){return function(t){return e==null?void 0:e[t]}}var w1=S1,E1=w1,C1={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},A1=E1(C1),O1=A1;function j1(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var $1=j1,Ol=_n,P1=$1,k1=Ir,I1=Pa,D1=1/0,jl=Ol?Ol.prototype:void 0,$l=jl?jl.toString:void 0;function Pl(e){if(typeof e=="string")return e;if(k1(e))return P1(e,Pl)+"";if(I1(e))return $l?$l.call(e):"";var t=e+"";return t=="0"&&1/e==-D1?"-0":t}var M1=Pl,F1=M1;function R1(e){return e==null?"":F1(e)}var ns=R1,N1=O1,L1=ns,z1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,B1="\\u0300-\\u036f",U1="\\ufe20-\\ufe2f",V1="\\u20d0-\\u20ff",W1=B1+U1+V1,G1="["+W1+"]",H1=RegExp(G1,"g");function Y1(e){return e=L1(e),e&&e.replace(z1,N1).replace(H1,"")}var q1=Y1,K1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function J1(e){return e.match(K1)||[]}var X1=J1,Z1=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Q1(e){return Z1.test(e)}var eT=Q1,kl="\\ud800-\\udfff",tT="\\u0300-\\u036f",rT="\\ufe20-\\ufe2f",nT="\\u20d0-\\u20ff",iT=tT+rT+nT,Il="\\u2700-\\u27bf",Dl="a-z\\xdf-\\xf6\\xf8-\\xff",sT="\\xac\\xb1\\xd7\\xf7",oT="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",aT="\\u2000-\\u206f",lT=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ml="A-Z\\xc0-\\xd6\\xd8-\\xde",uT="\\ufe0e\\ufe0f",Fl=sT+oT+aT+lT,Rl="['’]",Nl="["+Fl+"]",cT="["+iT+"]",Ll="\\d+",fT="["+Il+"]",zl="["+Dl+"]",Bl="[^"+kl+Fl+Ll+Il+Dl+Ml+"]",dT="\\ud83c[\\udffb-\\udfff]",pT="(?:"+cT+"|"+dT+")",hT="[^"+kl+"]",Ul="(?:\\ud83c[\\udde6-\\uddff]){2}",Vl="[\\ud800-\\udbff][\\udc00-\\udfff]",sr="["+Ml+"]",mT="\\u200d",Wl="(?:"+zl+"|"+Bl+")",gT="(?:"+sr+"|"+Bl+")",Gl="(?:"+Rl+"(?:d|ll|m|re|s|t|ve))?",Hl="(?:"+Rl+"(?:D|LL|M|RE|S|T|VE))?",Yl=pT+"?",ql="["+uT+"]?",yT="(?:"+mT+"(?:"+[hT,Ul,Vl].join("|")+")"+ql+Yl+")*",bT="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vT="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",xT=ql+Yl+yT,TT="(?:"+[fT,Ul,Vl].join("|")+")"+xT,_T=RegExp([sr+"?"+zl+"+"+Gl+"(?="+[Nl,sr,"$"].join("|")+")",gT+"+"+Hl+"(?="+[Nl,sr+Wl,"$"].join("|")+")",sr+"?"+Wl+"+"+Gl,sr+"+"+Hl,vT,bT,Ll,TT].join("|"),"g");function ST(e){return e.match(_T)||[]}var wT=ST,ET=X1,CT=eT,AT=ns,OT=wT;function jT(e,t,r){return e=AT(e),t=r?void 0:t,t===void 0?CT(e)?OT(e):ET(e):e.match(t)||[]}var $T=jT,PT=_1,kT=q1,IT=$T,DT="['’]",MT=RegExp(DT,"g");function FT(e){return function(t){return PT(IT(kT(t).replace(MT,"")),e,"")}}var RT=FT;function NT(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n<i;)s[n]=e[n+t];return s}var LT=NT,zT=LT;function BT(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:zT(e,t,r)}var UT=BT,VT="\\ud800-\\udfff",WT="\\u0300-\\u036f",GT="\\ufe20-\\ufe2f",HT="\\u20d0-\\u20ff",YT=WT+GT+HT,qT="\\ufe0e\\ufe0f",KT="\\u200d",JT=RegExp("["+KT+VT+YT+qT+"]");function XT(e){return JT.test(e)}var Kl=XT;function ZT(e){return e.split("")}var QT=ZT,Jl="\\ud800-\\udfff",e_="\\u0300-\\u036f",t_="\\ufe20-\\ufe2f",r_="\\u20d0-\\u20ff",n_=e_+t_+r_,i_="\\ufe0e\\ufe0f",s_="["+Jl+"]",is="["+n_+"]",ss="\\ud83c[\\udffb-\\udfff]",o_="(?:"+is+"|"+ss+")",Xl="[^"+Jl+"]",Zl="(?:\\ud83c[\\udde6-\\uddff]){2}",Ql="[\\ud800-\\udbff][\\udc00-\\udfff]",a_="\\u200d",eu=o_+"?",tu="["+i_+"]?",l_="(?:"+a_+"(?:"+[Xl,Zl,Ql].join("|")+")"+tu+eu+")*",u_=tu+eu+l_,c_="(?:"+[Xl+is+"?",is,Zl,Ql,s_].join("|")+")",f_=RegExp(ss+"(?="+ss+")|"+c_+u_,"g");function d_(e){return e.match(f_)||[]}var p_=d_,h_=QT,m_=Kl,g_=p_;function y_(e){return m_(e)?g_(e):h_(e)}var b_=y_,v_=UT,x_=Kl,T_=b_,__=ns;function S_(e){return function(t){t=__(t);var r=x_(t)?T_(t):void 0,n=r?r[0]:t.charAt(0),i=r?v_(r,1).join(""):t.slice(1);return n[e]()+i}}var w_=S_,E_=w_,C_=E_("toUpperCase"),A_=C_,O_=RT,j_=A_,$_=O_(function(e,t,r){return e+(r?" ":"")+j_(t)}),P_=$_;const k_=wt(P_);var I_=Math.ceil,D_=Math.max;function M_(e,t,r,n){for(var i=-1,s=D_(I_((t-e)/(r||1)),0),o=Array(s);s--;)o[n?s:++i]=e,e+=r;return o}var F_=M_,R_=Da,ru=1/0,N_=17976931348623157e292;function L_(e){if(!e)return e===0?e:0;if(e=R_(e),e===ru||e===-ru){var t=e<0?-1:1;return t*N_}return e===e?e:0}var z_=L_,B_=F_,U_=ol,os=z_;function V_(e){return function(t,r,n){return n&&typeof n!="number"&&U_(t,r,n)&&(r=n=void 0),t=os(t),r===void 0?(r=t,t=0):r=os(r),n=n===void 0?t<r?1:-1:os(n),B_(t,r,n,e)}}var W_=V_,G_=W_,H_=G_(),Y_=H_;const q_=wt(Y_);function pt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function nu(e){if(Le.isValidElement(e)||!pt(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=nu(e[r])}),t}function qe(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return pt(e)&&pt(t)&&Object.keys(t).forEach(i=>{Le.isValidElement(t[i])?n[i]=t[i]:pt(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&pt(e[i])?n[i]=qe(e[i],t[i],r):r.clone?n[i]=pt(t[i])?nu(t[i]):t[i]:n[i]=t[i]}),n}var as={exports:{}},Mn={exports:{}},ce={};/** @license React v16.13.1
|
|
130
|
-
*
|
|
128
|
+
*/var md=Fe("outline","users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]);function jo(){const{error:e}=ce(),[t,n]=T.useState(!1);return T.useEffect(()=>{e&&n(!0)},[e]),l.jsx(m.Modal,{opened:t,onClose:()=>n(!1),title:l.jsxs(m.Group,{children:[l.jsx(od,{size:16,color:"red"}),l.jsx(m.Text,{children:e?e.originalError.detail||e.originalError.message:"Error"})]}),centered:!0,children:e?l.jsx(m.Text,{children:e.message}):null})}function gd({opened:e,onClose:t,handleAccept:n,handleReject:r}){return l.jsxs(m.Modal,{opened:e,onClose:t,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",title:"Item löschen?",centered:!0,children:["Sind Sie Sicher, dass Sie das Item löschen wollen?",l.jsxs(m.Group,{align:"right",mt:"xl",justify:"flex-end",children:[l.jsx(m.Button,{onClick:r,variant:"default",children:"Abbrechen"}),l.jsx(m.Button,{onClick:n,color:"red",children:"Löschen"})]})]})}function $o({id:e,...t}){const{deleteEntry:n}=ce(),r={bg:"transparent",size:"sm",c:"gray"},i=m.useProps("ActionIcon",r,t),[s,o]=T.useState(!1),a=()=>{o(!1)},u=async()=>{n(e),o(!1)};return l.jsxs(l.Fragment,{children:[l.jsx(m.Tooltip,{label:"Delete",children:l.jsx(m.ActionIcon,{bg:i.bg,size:i.size,c:i.c,onClick:()=>{o(!0)},children:l.jsx(Oo,{})})}),l.jsx(gd,{opened:s,onClose:a,handleAccept:u,handleReject:a})]})}const ki=(e,t)=>{const n=t.split("."),r=e[n[0]];if(n.length>1&&Array.isArray(r))return r.map(s=>ki(s,n.slice(1).join("."))).join(", ");const i=t.split(".").reduce((s,o)=>s[o],e);return So(i)};function Po(e,t){return e===!0||Array.isArray(e)?t:Object.fromEntries(Object.keys(e).map(n=>[n,Po(e[n],t[n])]))}function ko(e,t){if(!e)return e;const n=t.values;return!n||!n.length||Array.isArray(e.id_)&&(e.id=e.id_),e}function yd(e,t){const n={};return t.forEach(r=>{if(r.type==="Related"){n[r.name]=ko(e.result[r.name],r);return}if(r.type==="RelatedList"){n[r.name]=e.result[r.name].map(i=>ko(i,r));return}n[r.name]=typeof e.result[r.name]=="boolean"?String(e.result[r.name]):e.result[r.name]}),n}function Ii(e){return t=>{try{return e.validateSync(t,{abortEarly:!1}),{}}catch(n){const r={};return n instanceof De&&n.inner.forEach(i=>{r[i.path.replaceAll("[",".").replaceAll("]","")]=i.message}),r}}}function bd({form:e,name:t,...n}){return l.jsx(l.Fragment,{children:l.jsx(wt.DateInput,{...e.getInputProps(t),onChange:r=>{if(r instanceof Date){const i=new Date(r.getTime()-r.getTimezoneOffset()*6e4);e.setFieldValue(t,i.toISOString().substring(0,10))}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...n})})}function vd({form:e,name:t,...n}){return l.jsx(l.Fragment,{children:l.jsx(wt.DateTimePicker,{...e.getInputProps(t),onChange:r=>{if(r instanceof Date){const i=new Date(r);e.setFieldValue(t,i.toISOString())}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...n})})}function hr({form:e,name:t,...n}){const r=e.getInputProps(t).value,i=T.useMemo(()=>r&&typeof r=="object"?JSON.stringify(r):r||"",[r]);return t==="password"?l.jsx(m.PasswordInput,{...e.getInputProps(t),value:i,...n}):l.jsx(m.TextInput,{...e.getInputProps(t),value:i,...n})}function Io({form:e,name:t,filter:n,...r}){const[i,s]=T.useState(""),o=e.getInputProps(t).value,a=T.useMemo(()=>o?typeof o=="object"?JSON.stringify(o,null,2):o:"",[o]);return T.useEffect(()=>{s(a)},[a]),n?l.jsx(hr,{form:e,name:t,...r}):l.jsx(m.JsonInput,{autosize:!0,minRows:4,maxRows:12,validationError:"Invalid JSON",...e.getInputProps(t),...r,value:i,onChange:u=>{if(s(u),!u){e.getInputProps(t).onChange(null);return}try{const c=JSON.parse(u);e.getInputProps(t).onChange(c)}catch{}}})}function xd({form:e,name:t,filter:n,...r}){const[i,s]=T.useState(!!n);return l.jsxs(m.InputWrapper,{label:r.label,description:r.description,children:[!n&&l.jsxs(m.Group,{align:"center",gap:"xs",py:"0.25rem",children:[l.jsx(m.Checkbox,{checked:i,onChange:o=>s(o.currentTarget.checked)}),l.jsx(m.Text,{size:"xs",children:"WKT"})]}),i?l.jsx(hr,{form:e,name:t,...r,label:void 0,description:void 0}):l.jsx(Io,{form:e,name:t,...r,label:void 0,description:void 0})]})}function Td({form:e,name:t,items:n,...r}){const i=n.map(o=>({value:String(He(o.id)),label:o.value})),s=Array.isArray(e.getInputProps(t).value)?e.getInputProps(t).value.map(o=>String(typeof o=="object"?He(o.id):o)):[];return l.jsx(m.MultiSelect,{data:i,searchable:!0,...e.getInputProps(t),value:s||[],...r})}function _d({form:e,name:t,items:n,filter:r,...i}){var o;const s=n.map(a=>({value:String(He(a.id)),label:a.value}));return l.jsx(m.Select,{data:s,searchable:!0,...e.getInputProps(t),onChange:a=>{if(r){e.setFieldValue(t,a);return}const u=n.find(c=>String(He(c.id))===a)||null;e.setFieldValue(t,u)},value:r?e.getInputProps(t).value:String(He((o=e.getInputProps(t).value)==null?void 0:o.id))||"",...i})}function Do({form:e,name:t,items:n,...r}){return l.jsx(m.Select,{data:n,searchable:!0,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...r})}function mr({form:e,name:t,schema:n,filter:r,withinPortal:i=!0,...s}){if(!n.type)return null;switch(n.type){case"Boolean":return l.jsx(Do,{form:e,name:t,items:[{label:"true",value:r?"1":"true"},{label:"false",value:r?"0":"false"}],...s});case"RelatedList":return l.jsx(Td,{form:e,name:t,items:n.values,comboboxProps:{withinPortal:i},...s});case"Related":return l.jsx(_d,{form:e,name:t,items:n.values,filter:r,comboboxProps:{withinPortal:i},...s});case"DateTime":return l.jsx(vd,{form:e,name:t,valueFormat:"DD.MM.YYYY HH:mm:ss",schema:n,popoverProps:{withinPortal:i},...s});case"Date":return l.jsx(bd,{form:e,name:t,valueFormat:"DD.MM.YYYY",schema:n,popoverProps:{withinPortal:i},...s});case"Geometry":return l.jsx(xd,{form:e,name:t,filter:r,...s});case"Raw":return l.jsx(Io,{form:e,name:t,filter:r,...s});case"Integer":case"Float":return l.jsx(hr,{form:e,name:t,...s});case"Enum":return l.jsx(Do,{form:e,name:t,items:n.values,comboboxProps:{withinPortal:i},...s});default:return l.jsx(hr,{form:e,name:t,...s})}}function Sd(e,t){return new Promise(n=>{n(yd(e,t.edit.columns))})}function Mo({item:e,info:t,opened:n,onClose:r,...i}){const{updateEntry:s}=ce(),o={modal:{},stack:{},saveButton:{}},{modal:a,stack:u,saveButton:c}=m.useProps("EditDialog",o,i),f=bn.useForm({initialValues:t.edit.defaultValues,validate:Ii(t.edit.schema)}),d=()=>{const y={};return Object.keys(f.values).forEach(v=>{f.isDirty(v)&&(y[v]=!0)}),y};T.useEffect(()=>{e&&Sd(e,t).then(y=>{f.setValues(y),f.resetDirty(y)})},[e,t.edit.columns]);const p=async y=>{y=Po(d(),y),await s(e.id,y),r()};return T.useEffect(()=>{f.setInitialValues(t.edit.defaultValues),f.reset()},[t.edit.defaultValues]),e?l.jsx(m.Modal,{opened:n,onClose:()=>{r()},title:t.edit.title,size:"lg",centered:!0,...a,children:l.jsx(m.Box,{component:"form",onSubmit:f.onSubmit(p),children:l.jsx(m.Stack,{spacing:"md",...u,children:l.jsxs(m.ScrollArea.Autosize,{mah:450,type:"auto",children:[t.edit.columns.map((y,v)=>l.jsx(mr,{form:f,name:y.name,label:y.label,description:y.description,schema:y,withAsterisk:y.required},v)),l.jsx(m.Group,{position:"right",mt:"xl",children:l.jsx(m.Button,{type:"submit",...c,children:"Save"})})]})})})}):null}function Fo({id:e,...t}){const{info:n,getEntry:r}=ce(),i={bg:"transparent",size:"sm",c:"gray"},s=m.useProps("ActionIcon",i,t),[o,a]=T.useState(null),[u,c]=T.useState(!1),[f,d]=T.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(m.Tooltip,{label:"Edit",children:l.jsx(m.ActionIcon,{bg:s.bg,size:s.size,c:s.c,onClick:async()=>{c(!0);const p=await r(e);p&&(a(p),c(!1),d(!0))},children:l.jsx(pd,{})})}),l.jsx(Mo,{item:o,info:n,opened:f,onClose:()=>d(!1)})]})}function wd({relatedPath:e,...t}){const{path:n}=ce();return Ie(n?n.substring(0,n.lastIndexOf("/")):"",e.substring(0,e.lastIndexOf("/"))),l.jsx(wo,{resource_name:e.replace("/",""),relation:t,children:l.jsx(Wi,{hideToolbar:!0,hideDownload:!1})})}const Ed=T.memo(wd);function Cd({item:e,info:t,loading:n,opened:r,onClose:i,...s}){const o={modal:{},tabs:{},tabsList:{},tabsPanel:{}},{modal:a,tabs:u,tabsList:c,tabsPanel:f}=m.useProps("ViewDialog",o,s);return l.jsxs(m.Modal,{opened:r,onClose:i,title:`${e==null?void 0:e.show_title} (#${He(e==null?void 0:e.id)})`,size:"lg",centered:!0,zIndex:1e3,...a,children:[l.jsx(m.LoadingOverlay,{visible:n}),!n&&e?l.jsxs(m.Tabs,{defaultValue:"details",...u,children:[l.jsxs(m.Tabs.List,{...c,children:[l.jsx(m.Tabs.Tab,{value:"details",children:"Details"}),t.relations.map((d,p)=>l.jsx(m.Tabs.Tab,{value:d.name,children:d.name},p))]}),l.jsx(m.Tabs.Panel,{pt:"xs",value:"details",...f,children:l.jsx(m.Paper,{p:"xs",withBorder:!0,children:l.jsx(m.Stack,{spacing:"md",children:l.jsx(m.ScrollArea,{h:450,type:"auto",children:e.show_columns.map((d,p)=>l.jsxs(m.Grid,{maw:500,children:[l.jsx(m.Grid.Col,{span:4,children:l.jsx(m.Text,{size:"md",children:e.label_columns[d]})}),l.jsx(m.Grid.Col,{span:1,children:l.jsx(m.Text,{size:"xs",children:":"})}),l.jsx(m.Grid.Col,{span:6,children:l.jsx(m.Text,{size:"md",children:ki(e.result,d)})})]},p))})})})}),t.relations.map((d,p)=>l.jsx(m.Tabs.Panel,{pt:"xs",value:d.name,children:l.jsx(m.Paper,{withBorder:!0,children:l.jsx(Ed,{relatedPath:d.path,id:He(e.id),foreign_key:d.foreign_key,type:d.type})})},p))]}):null]})}function Ad({id:e,...t}){const{info:n,getEntry:r}=ce(),i={bg:"transparent",size:"sm",c:"gray"},s=m.useProps("ActionIcon",i,t),[o,a]=T.useState(null),[u,c]=T.useState(!1),[f,d]=T.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(m.Tooltip,{label:"Details",children:l.jsx(m.ActionIcon,{bg:s.bg,size:s.size,c:s.c,onClick:async()=>{c(!0);const p=await r(e);p&&(a(p),c(!1),d(!0))},children:l.jsx(ud,{})})}),l.jsx(Cd,{item:o,info:n,loading:u,opened:f,onClose:()=>d(!1)})]})}function Di({id:e}){const{info:t}=ce();return l.jsxs(m.Flex,{style:{gap:4,whiteSpace:"nowrap"},children:[t!=null&&t.permissions.includes("can_get")?l.jsx(Ad,{id:e}):null,t!=null&&t.permissions.includes("can_put")?l.jsx(Fo,{id:e}):null,t!=null&&t.permissions.includes("can_delete")?l.jsx($o,{id:e}):null]})}function Mi({opened:e,onClose:t,...n}){const{info:r,addEntry:i}=ce(),s={modal:{},stack:{},addButton:{}},{addButton:o,modal:a,stack:u}=m.useProps("AddDialog",s,n),c=bn.useForm({initialValues:r.add.defaultValues,validate:Ii(r.add.schema)}),f=async d=>{await i(d),c.reset(),t()};return T.useEffect(()=>{c.setInitialValues(r.add.defaultValues),c.reset()},[r.add.defaultValues]),l.jsx(m.Modal,{opened:e,onClose:()=>{c.reset(),t()},title:r.add.title,size:"lg",centered:!0,...a,children:l.jsx(m.Box,{component:"form",onSubmit:c.onSubmit(f),children:l.jsx(m.Stack,{spacing:"md",...u,children:l.jsxs(m.ScrollArea.Autosize,{mah:450,type:"auto",children:[r.add.columns.map((d,p)=>l.jsx(mr,{form:c,name:d.name,label:d.label,description:d.description,schema:d,withAsterisk:d.required},p)),l.jsx(m.Group,{position:"right",mt:"xl",children:l.jsx(m.Button,{type:"submit",...o,children:"Add"})})]})})})})}function Ro(...e){const[t,n]=T.useState(!1),r={bg:"transparent",size:"sm",c:"gray"},i=m.useProps("ActionIcon",r,e);return l.jsxs(l.Fragment,{children:[l.jsx(m.Tooltip,{label:"Add Item",children:l.jsx(m.ActionIcon,{bg:i.bg,size:i.size,c:i.c,onClick:()=>{n(!0)},children:l.jsx(pr,{})})}),l.jsx(Mi,{opened:t,onClose:()=>{n(!1)}})]})}/*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */const{entries:No,setPrototypeOf:Lo,isFrozen:Od,getPrototypeOf:jd,getOwnPropertyDescriptor:$d}=Object;let{freeze:Be,seal:Je,create:zo}=Object,{apply:Fi,construct:Ri}=typeof Reflect<"u"&&Reflect;Be||(Be=function(t){return t}),Je||(Je=function(t){return t}),Fi||(Fi=function(t,n,r){return t.apply(n,r)}),Ri||(Ri=function(t,n){return new t(...n)});const gr=Ye(Array.prototype.forEach),Bo=Ye(Array.prototype.pop),Sn=Ye(Array.prototype.push),yr=Ye(String.prototype.toLowerCase),Ni=Ye(String.prototype.toString),Uo=Ye(String.prototype.match),wn=Ye(String.prototype.replace),Pd=Ye(String.prototype.indexOf),kd=Ye(String.prototype.trim),nt=Ye(Object.prototype.hasOwnProperty),Ue=Ye(RegExp.prototype.test),En=Id(TypeError);function Ye(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Fi(e,t,r)}}function Id(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ri(e,n)}}function se(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yr;Lo&&Lo(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=n(i);s!==i&&(Od(t)||(t[r]=s),i=s)}e[i]=!0}return e}function Dd(e){for(let t=0;t<e.length;t++)nt(e,t)||(e[t]=null);return e}function Nt(e){const t=zo(null);for(const[n,r]of No(e))nt(e,n)&&(Array.isArray(r)?t[n]=Dd(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Nt(r):t[n]=r);return t}function Cn(e,t){for(;e!==null;){const r=$d(e,t);if(r){if(r.get)return Ye(r.get);if(typeof r.value=="function")return Ye(r.value)}e=jd(e)}function n(){return null}return n}const Vo=Be(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Li=Be(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),zi=Be(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Md=Be(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Bi=Be(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Fd=Be(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Wo=Be(["#text"]),Go=Be(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ui=Be(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ho=Be(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),br=Be(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Rd=Je(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Nd=Je(/<%[\w\W]*|[\w\W]*%>/gm),Ld=Je(/\$\{[\w\W]*}/gm),zd=Je(/^data-[\-\w.\u00B7-\uFFFF]+$/),Bd=Je(/^aria-[\-\w]+$/),Yo=Je(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ud=Je(/^(?:\w+script|data):/i),Vd=Je(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qo=Je(/^html$/i),Wd=Je(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ko=Object.freeze({__proto__:null,ARIA_ATTR:Bd,ATTR_WHITESPACE:Vd,CUSTOM_ELEMENT:Wd,DATA_ATTR:zd,DOCTYPE_NAME:qo,ERB_EXPR:Nd,IS_ALLOWED_URI:Yo,IS_SCRIPT_OR_DATA:Ud,MUSTACHE_EXPR:Rd,TMPLIT_EXPR:Ld});const An={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Gd=function(){return typeof window>"u"?null:window},Hd=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Jo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Xo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Gd();const t=L=>Xo(L);if(t.version="3.2.3",t.removed=[],!e||!e.document||e.document.nodeType!==An.document)return t.isSupported=!1,t;let{document:n}=e;const r=n,i=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:a,Element:u,NodeFilter:c,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:y}=e,v=u.prototype,h=Cn(v,"cloneNode"),_=Cn(v,"remove"),w=Cn(v,"nextSibling"),O=Cn(v,"childNodes"),j=Cn(v,"parentNode");if(typeof o=="function"){const L=n.createElement("template");L.content&&L.content.ownerDocument&&(n=L.content.ownerDocument)}let k,E="";const{implementation:$,createNodeIterator:z,createDocumentFragment:q,getElementsByTagName:Q}=n,{importNode:g}=r;let P=Jo();t.isSupported=typeof No=="function"&&typeof j=="function"&&$&&$.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:B,ERB_EXPR:J,TMPLIT_EXPR:te,DATA_ATTR:me,ARIA_ATTR:ge,IS_SCRIPT_OR_DATA:_e,ATTR_WHITESPACE:je,CUSTOM_ELEMENT:H}=Ko;let{IS_ALLOWED_URI:S}=Ko,A=null;const V=se({},[...Vo,...Li,...zi,...Bi,...Wo]);let W=null;const K=se({},[...Go,...Ui,...Ho,...br]);let G=Object.seal(zo(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,ee=null,U=!0,re=!0,ne=!1,$e=!0,F=!1,Ne=!0,Ge=!1,it=!1,bt=!1,vt=!1,Ut=!1,xt=!1,Zr=!0,Qr=!1;const Vn="user-content-";let Wn=!0,Vt=!1,Tt={},_t=null;const Gn=se({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ei=null;const Hn=se({},["audio","video","img","source","image","track"]);let hn=null;const ti=se({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mn="http://www.w3.org/1998/Math/MathML",gn="http://www.w3.org/2000/svg",st="http://www.w3.org/1999/xhtml";let Pt=st,Yn=!1,qn=null;const Kn=se({},[mn,gn,st],Ni);let Wt=se({},["mi","mo","mn","ms","mtext"]),ot=se({},["annotation-xml"]);const Jn=se({},["title","style","font","a","script"]);let St=null;const ni=["application/xhtml+xml","text/html"],zs="text/html";let Pe=null,kt=null;const ri=n.createElement("form"),Xn=function(x){return x instanceof RegExp||x instanceof Function},Zn=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(kt&&kt===x)){if((!x||typeof x!="object")&&(x={}),x=Nt(x),St=ni.indexOf(x.PARSER_MEDIA_TYPE)===-1?zs:x.PARSER_MEDIA_TYPE,Pe=St==="application/xhtml+xml"?Ni:yr,A=nt(x,"ALLOWED_TAGS")?se({},x.ALLOWED_TAGS,Pe):V,W=nt(x,"ALLOWED_ATTR")?se({},x.ALLOWED_ATTR,Pe):K,qn=nt(x,"ALLOWED_NAMESPACES")?se({},x.ALLOWED_NAMESPACES,Ni):Kn,hn=nt(x,"ADD_URI_SAFE_ATTR")?se(Nt(ti),x.ADD_URI_SAFE_ATTR,Pe):ti,ei=nt(x,"ADD_DATA_URI_TAGS")?se(Nt(Hn),x.ADD_DATA_URI_TAGS,Pe):Hn,_t=nt(x,"FORBID_CONTENTS")?se({},x.FORBID_CONTENTS,Pe):Gn,X=nt(x,"FORBID_TAGS")?se({},x.FORBID_TAGS,Pe):{},ee=nt(x,"FORBID_ATTR")?se({},x.FORBID_ATTR,Pe):{},Tt=nt(x,"USE_PROFILES")?x.USE_PROFILES:!1,U=x.ALLOW_ARIA_ATTR!==!1,re=x.ALLOW_DATA_ATTR!==!1,ne=x.ALLOW_UNKNOWN_PROTOCOLS||!1,$e=x.ALLOW_SELF_CLOSE_IN_ATTR!==!1,F=x.SAFE_FOR_TEMPLATES||!1,Ne=x.SAFE_FOR_XML!==!1,Ge=x.WHOLE_DOCUMENT||!1,vt=x.RETURN_DOM||!1,Ut=x.RETURN_DOM_FRAGMENT||!1,xt=x.RETURN_TRUSTED_TYPE||!1,bt=x.FORCE_BODY||!1,Zr=x.SANITIZE_DOM!==!1,Qr=x.SANITIZE_NAMED_PROPS||!1,Wn=x.KEEP_CONTENT!==!1,Vt=x.IN_PLACE||!1,S=x.ALLOWED_URI_REGEXP||Yo,Pt=x.NAMESPACE||st,Wt=x.MATHML_TEXT_INTEGRATION_POINTS||Wt,ot=x.HTML_INTEGRATION_POINTS||ot,G=x.CUSTOM_ELEMENT_HANDLING||{},x.CUSTOM_ELEMENT_HANDLING&&Xn(x.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=x.CUSTOM_ELEMENT_HANDLING.tagNameCheck),x.CUSTOM_ELEMENT_HANDLING&&Xn(x.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=x.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),x.CUSTOM_ELEMENT_HANDLING&&typeof x.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=x.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),F&&(re=!1),Ut&&(vt=!0),Tt&&(A=se({},Wo),W=[],Tt.html===!0&&(se(A,Vo),se(W,Go)),Tt.svg===!0&&(se(A,Li),se(W,Ui),se(W,br)),Tt.svgFilters===!0&&(se(A,zi),se(W,Ui),se(W,br)),Tt.mathMl===!0&&(se(A,Bi),se(W,Ho),se(W,br))),x.ADD_TAGS&&(A===V&&(A=Nt(A)),se(A,x.ADD_TAGS,Pe)),x.ADD_ATTR&&(W===K&&(W=Nt(W)),se(W,x.ADD_ATTR,Pe)),x.ADD_URI_SAFE_ATTR&&se(hn,x.ADD_URI_SAFE_ATTR,Pe),x.FORBID_CONTENTS&&(_t===Gn&&(_t=Nt(_t)),se(_t,x.FORBID_CONTENTS,Pe)),Wn&&(A["#text"]=!0),Ge&&se(A,["html","head","body"]),A.table&&(se(A,["tbody"]),delete X.tbody),x.TRUSTED_TYPES_POLICY){if(typeof x.TRUSTED_TYPES_POLICY.createHTML!="function")throw En('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof x.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw En('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=x.TRUSTED_TYPES_POLICY,E=k.createHTML("")}else k===void 0&&(k=Hd(y,i)),k!==null&&typeof E=="string"&&(E=k.createHTML(""));Be&&Be(x),kt=x}},ii=se({},[...Li,...zi,...Md]),Qn=se({},[...Bi,...Fd]),si=function(x){let I=j(x);(!I||!I.tagName)&&(I={namespaceURI:Pt,tagName:"template"});const N=yr(x.tagName),fe=yr(I.tagName);return qn[x.namespaceURI]?x.namespaceURI===gn?I.namespaceURI===st?N==="svg":I.namespaceURI===mn?N==="svg"&&(fe==="annotation-xml"||Wt[fe]):!!ii[N]:x.namespaceURI===mn?I.namespaceURI===st?N==="math":I.namespaceURI===gn?N==="math"&&ot[fe]:!!Qn[N]:x.namespaceURI===st?I.namespaceURI===gn&&!ot[fe]||I.namespaceURI===mn&&!Wt[fe]?!1:!Qn[N]&&(Jn[N]||!ii[N]):!!(St==="application/xhtml+xml"&&qn[x.namespaceURI]):!1},Qe=function(x){Sn(t.removed,{element:x});try{j(x).removeChild(x)}catch{_(x)}},yn=function(x,I){try{Sn(t.removed,{attribute:I.getAttributeNode(x),from:I})}catch{Sn(t.removed,{attribute:null,from:I})}if(I.removeAttribute(x),x==="is")if(vt||Ut)try{Qe(I)}catch{}else try{I.setAttribute(x,"")}catch{}},oi=function(x){let I=null,N=null;if(bt)x="<remove></remove>"+x;else{const ue=Uo(x,/^[\r\n\t ]+/);N=ue&&ue[0]}St==="application/xhtml+xml"&&Pt===st&&(x='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+x+"</body></html>");const fe=k?k.createHTML(x):x;if(Pt===st)try{I=new p().parseFromString(fe,St)}catch{}if(!I||!I.documentElement){I=$.createDocument(Pt,"template",null);try{I.documentElement.innerHTML=Yn?E:fe}catch{}}const Ee=I.body||I.documentElement;return x&&N&&Ee.insertBefore(n.createTextNode(N),Ee.childNodes[0]||null),Pt===st?Q.call(I,Ge?"html":"body")[0]:Ge?I.documentElement:Ee},ai=function(x){return z.call(x.ownerDocument||x,x,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},b=function(x){return x instanceof d&&(typeof x.nodeName!="string"||typeof x.textContent!="string"||typeof x.removeChild!="function"||!(x.attributes instanceof f)||typeof x.removeAttribute!="function"||typeof x.setAttribute!="function"||typeof x.namespaceURI!="string"||typeof x.insertBefore!="function"||typeof x.hasChildNodes!="function")},D=function(x){return typeof a=="function"&&x instanceof a};function R(L,x,I){gr(L,N=>{N.call(t,x,I,kt)})}const Z=function(x){let I=null;if(R(P.beforeSanitizeElements,x,null),b(x))return Qe(x),!0;const N=Pe(x.nodeName);if(R(P.uponSanitizeElement,x,{tagName:N,allowedTags:A}),x.hasChildNodes()&&!D(x.firstElementChild)&&Ue(/<[/\w]/g,x.innerHTML)&&Ue(/<[/\w]/g,x.textContent)||x.nodeType===An.progressingInstruction||Ne&&x.nodeType===An.comment&&Ue(/<[/\w]/g,x.data))return Qe(x),!0;if(!A[N]||X[N]){if(!X[N]&&he(N)&&(G.tagNameCheck instanceof RegExp&&Ue(G.tagNameCheck,N)||G.tagNameCheck instanceof Function&&G.tagNameCheck(N)))return!1;if(Wn&&!_t[N]){const fe=j(x)||x.parentNode,Ee=O(x)||x.childNodes;if(Ee&&fe){const ue=Ee.length;for(let Me=ue-1;Me>=0;--Me){const et=h(Ee[Me],!0);et.__removalCount=(x.__removalCount||0)+1,fe.insertBefore(et,w(x))}}}return Qe(x),!0}return x instanceof u&&!si(x)||(N==="noscript"||N==="noembed"||N==="noframes")&&Ue(/<\/no(script|embed|frames)/i,x.innerHTML)?(Qe(x),!0):(F&&x.nodeType===An.text&&(I=x.textContent,gr([B,J,te],fe=>{I=wn(I,fe," ")}),x.textContent!==I&&(Sn(t.removed,{element:x.cloneNode()}),x.textContent=I)),R(P.afterSanitizeElements,x,null),!1)},ae=function(x,I,N){if(Zr&&(I==="id"||I==="name")&&(N in n||N in ri))return!1;if(!(re&&!ee[I]&&Ue(me,I))){if(!(U&&Ue(ge,I))){if(!W[I]||ee[I]){if(!(he(x)&&(G.tagNameCheck instanceof RegExp&&Ue(G.tagNameCheck,x)||G.tagNameCheck instanceof Function&&G.tagNameCheck(x))&&(G.attributeNameCheck instanceof RegExp&&Ue(G.attributeNameCheck,I)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(I))||I==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&Ue(G.tagNameCheck,N)||G.tagNameCheck instanceof Function&&G.tagNameCheck(N))))return!1}else if(!hn[I]){if(!Ue(S,wn(N,je,""))){if(!((I==="src"||I==="xlink:href"||I==="href")&&x!=="script"&&Pd(N,"data:")===0&&ei[x])){if(!(ne&&!Ue(_e,wn(N,je,"")))){if(N)return!1}}}}}}return!0},he=function(x){return x!=="annotation-xml"&&Uo(x,H)},oe=function(x){R(P.beforeSanitizeAttributes,x,null);const{attributes:I}=x;if(!I||b(x))return;const N={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let fe=I.length;for(;fe--;){const Ee=I[fe],{name:ue,namespaceURI:Me,value:et}=Ee,Gt=Pe(ue);let Ve=ue==="value"?et:kd(et);if(N.attrName=Gt,N.attrValue=Ve,N.keepAttr=!0,N.forceKeepAttr=void 0,R(P.uponSanitizeAttribute,x,N),Ve=N.attrValue,Qr&&(Gt==="id"||Gt==="name")&&(yn(ue,x),Ve=Vn+Ve),Ne&&Ue(/((--!?|])>)|<\/(style|title)/i,Ve)){yn(ue,x);continue}if(N.forceKeepAttr||(yn(ue,x),!N.keepAttr))continue;if(!$e&&Ue(/\/>/i,Ve)){yn(ue,x);continue}F&&gr([B,J,te],Fc=>{Ve=wn(Ve,Fc," ")});const Mc=Pe(x.nodeName);if(ae(Mc,Gt,Ve)){if(k&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Me)switch(y.getAttributeType(Mc,Gt)){case"TrustedHTML":{Ve=k.createHTML(Ve);break}case"TrustedScriptURL":{Ve=k.createScriptURL(Ve);break}}try{Me?x.setAttributeNS(Me,ue,Ve):x.setAttribute(ue,Ve),b(x)?Qe(x):Bo(t.removed)}catch{}}}R(P.afterSanitizeAttributes,x,null)},ie=function L(x){let I=null;const N=ai(x);for(R(P.beforeSanitizeShadowDOM,x,null);I=N.nextNode();)R(P.uponSanitizeShadowNode,I,null),Z(I),oe(I),I.content instanceof s&&L(I.content);R(P.afterSanitizeShadowDOM,x,null)};return t.sanitize=function(L){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,N=null,fe=null,Ee=null;if(Yn=!L,Yn&&(L="<!-->"),typeof L!="string"&&!D(L))if(typeof L.toString=="function"){if(L=L.toString(),typeof L!="string")throw En("dirty is not a string, aborting")}else throw En("toString is not a function");if(!t.isSupported)return L;if(it||Zn(x),t.removed=[],typeof L=="string"&&(Vt=!1),Vt){if(L.nodeName){const et=Pe(L.nodeName);if(!A[et]||X[et])throw En("root node is forbidden and cannot be sanitized in-place")}}else if(L instanceof a)I=oi("<!---->"),N=I.ownerDocument.importNode(L,!0),N.nodeType===An.element&&N.nodeName==="BODY"||N.nodeName==="HTML"?I=N:I.appendChild(N);else{if(!vt&&!F&&!Ge&&L.indexOf("<")===-1)return k&&xt?k.createHTML(L):L;if(I=oi(L),!I)return vt?null:xt?E:""}I&&bt&&Qe(I.firstChild);const ue=ai(Vt?L:I);for(;fe=ue.nextNode();)Z(fe),oe(fe),fe.content instanceof s&&ie(fe.content);if(Vt)return L;if(vt){if(Ut)for(Ee=q.call(I.ownerDocument);I.firstChild;)Ee.appendChild(I.firstChild);else Ee=I;return(W.shadowroot||W.shadowrootmode)&&(Ee=g.call(r,Ee,!0)),Ee}let Me=Ge?I.outerHTML:I.innerHTML;return Ge&&A["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&Ue(qo,I.ownerDocument.doctype.name)&&(Me="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
|
|
129
|
+
`+Me),F&&gr([B,J,te],et=>{Me=wn(Me,et," ")}),k&&xt?k.createHTML(Me):Me},t.setConfig=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zn(L),it=!0},t.clearConfig=function(){kt=null,it=!1},t.isValidAttribute=function(L,x,I){kt||Zn({});const N=Pe(L),fe=Pe(x);return ae(N,fe,I)},t.addHook=function(L,x){typeof x=="function"&&Sn(P[L],x)},t.removeHook=function(L){return Bo(P[L])},t.removeHooks=function(L){P[L]=[]},t.removeAllHooks=function(){P=Jo()},t}var Zo=Xo();const ut=T.forwardRef(({fallback:e,functionProps:t,children:n},r)=>{if(typeof n=="function"&&(n=n(...t)),n===null)return null;const i=n||e;return T.isValidElement(i)?T.cloneElement(i,{ref:r}):i});ut.displayName="FallbackWrapper";const Yd={field:"_field_zdaf7_1",rtl:"_rtl_zdaf7_7",borderRight:"_borderRight_zdaf7_12"},vr=T.memo(({id:e,entry:t,loading:n,rightBorder:r,children:i,onClickEntry:s,customElement:o,sanitize:a,...u})=>{const c={text:{style:{whiteSpace:"nowrap",overflow:"ellipsis"}}},{text:f}=m.useProps("Field",c,u),d={};Object.entries(f).forEach(([y,v])=>{typeof v=="function"&&(d[y]=v(t))});const p=m.useStyles({name:"Field",props:u,classes:Yd});return l.jsx(m.Table.Td,{...p("field"),onClick:s?()=>s(e,t):null,...u,children:l.jsx(m.Box,{w:"100%",children:l.jsx(m.Skeleton,{visible:n,children:l.jsx(ut,{fallback:Array.isArray(i)?i.map((y,v)=>l.jsx(m.Text,{...f,...d,children:a?Zo.sanitize(y):y},v)):T.isValidElement(i)?i:l.jsx(m.Text,{...f,...d,children:a?Zo.sanitize(i):i}),functionProps:[t],children:o})})})})});vr.displayName="Field";const Qo={row:"_row_138r2_1",selected:"_selected_138r2_5"};function qd({entry:e,selected:t,children:n}){const r=m.useStyles({name:"Row",classes:Qo}),i=m.useProps("Row",{},{});Object.entries(i).forEach(([a,u])=>{typeof u=="function"&&(i[a]=u(e))});var{className:s,style:o}=r("row");return s=`${s} ${t?Qo.selected:""}`,l.jsx(m.Table.Tr,{className:s,style:{...o},...i,children:n})}function Kd({bodyCustomizer:e,actionColumn:t,id:n,entry:r}){let i=e==null?void 0:e[t];return typeof i=="function"&&(i=i({id:n,...r})),i===null?null:i||l.jsx(Di,{id:n})}function Jd({data:e,loading:t,hideActions:n,hideCheckbox:r,selection:i,toggleRow:s,onClickEntry:o,bodyCustomizer:a,bodySeparator:u}){const c=e.list_columns.includes("actions")?"_actions":"actions",f=T.useMemo(()=>e!=null&&e.list_columns.includes("all")?"_all":"all",[e==null?void 0:e.list_columns]);return l.jsx(m.Table.Tbody,{children:e.result.length?e.result.map((d,p)=>{const y=e.ids[p];return l.jsxs(qd,{entry:{...d,id:y},children:[r?null:l.jsx(vr,{loading:t,children:l.jsx(m.Checkbox,{pl:2,checked:i.includes(y),onChange:v=>{s(y)}})},p),n?null:l.jsx(vr,{loading:t,children:l.jsx(Kd,{bodyCustomizer:a,actionColumn:c,id:He(y),entry:d})}),e.list_columns.map((v,h)=>{let _=a==null?void 0:a[v];typeof _=="function"&&(_=_({id:y,...d}));let w=ki(d,v);typeof w=="number"?w=w.toLocaleString():w==null&&(w="");const O=(u==null?void 0:u[v])||(u==null?void 0:u[f]);return O&&(w=w.split(O)),_===null?null:l.jsx(vr,{id:y,entry:d,loading:t,onClickEntry:o,customElement:_,sanitize:!0,children:w},h)})]},He(y))}):l.jsx("tr",{children:l.jsx("td",{style:{padding:"8px"},colSpan:n?e.list_columns.length:e.list_columns.length+1,children:l.jsx(m.Text,{style:{fontStyle:"italic"},size:"sm",c:"dimmed",children:"No data available"})})})})}const ea={root:"_root_1kmay_1",wrapper:"_wrapper_1kmay_7",icon:"_icon_1kmay_18"};function Vi({column:e,label:t,orderColumn:n,related:r,toggleAll:i,allChecked:s,classNames:o,styles:a,customElement:u,...c}){const{queryParams:f,setQueryParams:d,loading:p}=ce(),y={fw:700,size:"sm",color:"gray.8",hoverColor:"gray.6",selectedColor:"blue"},v=m.useStyles({name:"FieldTitle",classes:ea,classNames:o,styles:a,props:c}),h=m.useProps("FieldTitle",y,c),{hovered:_,ref:w}=ke.useHover(),O=n&&f.order_column===n,j=v("wrapper");return j.style.cursor=n?j.style.cursor:"auto",l.jsx(m.Table.Th,{className:ea.fieldTitleRoot,...v("root"),onClick:n&&!p?()=>d({order_column:n,order_direction:f.order_direction==="asc"?"desc":"asc"}):null,children:l.jsx(m.Box,{ref:w,...j,children:e==="Checkbox"?l.jsx(m.Checkbox,{pb:5,pl:2,onChange:i,checked:s}):l.jsxs(l.Fragment,{children:[l.jsx(m.Box,{w:"100%",fw:h.fw,size:"xl",c:_&&n?h.hoverColor:O?h.selectedColor:h.color,children:u||t||e}),r?l.jsx(m.Tooltip,{label:"Related Field",children:l.jsx(m.Indicator,{label:"rel",style:{indicator:{top:"-1px !important",right:"-2px !important",padding:"4px"}},children:l.jsx(m.Box,{...v("icon"),children:O?f.order_direction==="asc"?l.jsx($i,{size:14,strokeWidth:1.5}):l.jsx(Eo,{size:14,strokeWidth:1.5}):null})})}):l.jsx(m.Box,{...v("icon"),children:O?f.order_direction==="asc"?l.jsx($i,{size:14,strokeWidth:1.5}):l.jsx(Eo,{size:14,strokeWidth:1.5}):null})]})})})}const ta=T.memo(({data:e,info:t,settings:n,hideActions:r,hideCheckbox:i,allChecked:s,toggleAll:o,headerCustomizer:a})=>{const u=e.list_columns.includes("actions")?"_actions":"actions";let c=a==null?void 0:a[u];return typeof c=="function"&&(c=c()),l.jsx(m.Table.Thead,{children:l.jsxs(m.Table.Tr,{children:[i?null:l.jsx(Vi,{data:e,column:"Checkbox",allChecked:s,toggleAll:o}),r?null:l.jsx(Vi,{column:"Actions",customElement:c}),e.list_columns.map((f,d)=>{var y;let p=a==null?void 0:a[f];return typeof p=="function"&&(p=p(e.label_columns[f])),p===null?null:l.jsx(Vi,{column:f,label:e.label_columns[f],orderColumn:e.order_columns.find(v=>v===f)||e.order_columns.find(v=>v.startsWith(`${f}.`)),related:((y=t.filters[f])==null?void 0:y.schema.type)==="Nested",customElement:p},f)})]})})});ta.displayName="Header";const Xd={scrollbar:"_scrollbar_isyo2_1"};function Zd({bulkActions:e,hideActions:t,loading:n,onSelectCheckbox:r,onClickEntry:i,hideCheckbox:s,hideDownload:o,headerCustomizer:a,bodyCustomizer:u,bodySeparator:c,...f}){const d=m.useMantineTheme(),p=m.Table.extend({highlightOnHover:!0,striped:!0,horizontalSpacing:"md",verticalSpacing:"sm"}),y=m.useProps("DatagridTable",p,f),{data:v,info:h}=ce(),[_,w]=T.useState([]),[O,j]=T.useState(!1),k=$=>{w(z=>z.includes($)?z.filter(q=>q!==$):[...z,$])},E=()=>{w($=>$.length===v.ids.length?[]:v.ids.map((z,q)=>z))};return T.useEffect(()=>{j(_.length===v.result.length&&_.length>0),r&&r(_),e==null||e.setSelectedIds(_.map($=>$))},[_]),T.useEffect(()=>{w([]),r&&r([])},[v]),l.jsx(m.ScrollArea,{options:{className:d.colorScheme==="dark"?"os-theme-light":void 0},style:{flex:1,flexDirection:"column"},classNames:Xd,children:l.jsxs(m.Table,{stickyHeader:!0,...y,children:[l.jsx(ta,{data:v,info:h,hideActions:t,hideCheckbox:s,allChecked:O,setSelection:w,toggleAll:E,headerCustomizer:a}),l.jsx(Jd,{data:v,loading:n,hideActions:t,hideCheckbox:s,selection:_,setSelection:w,toggleRow:k,onClickEntry:i,bodyCustomizer:u,bodySeparator:c})]})})}const na=T.memo(({counter:e,...t})=>{const{data:n,queryParams:r,setQueryParams:i}=ce(),s=m.useMantineTheme(),o=[{value:"10",label:"10"},{value:"25",label:"25"},{value:"50",label:"50"}],a=String(r.page_size),[u,c]=T.useState(r.page);T.useEffect(()=>{c(r.page)},[r.page]);const f=p=>{c(p-1),i({page:p-1})},d=p=>{i({page_size:parseInt(p,10),page:0})};return l.jsxs(l.Fragment,{children:[l.jsx(m.Divider,{}),l.jsxs(m.Box,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:54,border:"none",borderTopWidth:"1px",padding:"var(--mantine-spacing-md)"},children:[l.jsxs(m.Box,{style:{display:"flex",alignItems:"center",gap:"var(--mantine-spacing-sm)"},children:[l.jsx(m.Text,{children:"Rows per page:"}),l.jsx(m.Select,{value:a,defaultValue:a,onChange:p=>d(p),data:o,allowDeselect:!1,w:80,size:"xs",styles:()=>({input:{fontSize:"14px",fontWeight:"250",lineHeight:"52px",border:"1px solid #E6E8ED"},item:{"&[data-selected]":{"&, &:hover":{outline:"none !important"}}}})})]}),l.jsx(m.Pagination,{size:"sm",total:Math.ceil(n.count/a),value:u+1,onChange:f,...t}),e&&n?l.jsxs(l.Fragment,{children:[l.jsx(m.Text,{c:s.primaryColor,size:"xs",fw:400,pl:20,children:"Total Records"}),l.jsx(m.Text,{c:s.primaryColor,size:"md",fw:700,pl:10,children:n.count})]}):null]})]})});na.displayName="Pagination";const Qd=0,ep=25,On=250,jn="global",Kt="header:",ra=Kt+"ctt",ia=Kt+"between_integer",sa=Kt+"between_date",Jt=e=>e!==jn&&!e.startsWith(Kt);function tp({form:e,name:t,items:n,onChange:r,...i}){return l.jsx(m.Select,{data:n,searchable:!0,...e.getInputProps(t),onChange:r,...i})}function oa({form:e,name:t,label:n,comboboxProps:r,...i}){const s=m.useCombobox({onDropdownClose:()=>s.resetSelectedOption(),onDropdownOpen:()=>s.updateSelectedOptionIndex("active")}),[o,a]=T.useState([]),[u,c]=T.useState(""),f=y=>{u!==""&&(o.includes(u)||a(v=>[...v,u]),c(""))},d=y=>a(v=>v.filter(h=>h!==y)),p=o.map(y=>l.jsx(m.Pill,{withRemoveButton:!0,onRemove:()=>d(y),children:y},y));return T.useEffect(()=>{const y=e.getInputProps(t).value;if(y)try{a([...y])}catch(v){console.error("Error parsing JSON:",v)}},[]),T.useEffect(()=>{e.getInputProps(t).onChange(o)},[o]),l.jsx(m.InputWrapper,{label:n,children:l.jsxs(m.Combobox,{store:s,onOptionSubmit:f,...r,children:[l.jsx(m.Combobox.DropdownTarget,{children:l.jsx(m.PillsInput,{onClick:()=>s.openDropdown(),children:l.jsxs(m.Pill.Group,{children:[p,l.jsx(m.Combobox.EventsTarget,{children:l.jsx(m.PillsInput.Field,{onFocus:()=>s.openDropdown(),onBlur:()=>s.closeDropdown(),value:u,placeholder:"Search values",onChange:y=>{s.updateSelectedOptionIndex(),c(y.currentTarget.value)},onKeyDown:y=>{y.key==="Backspace"&&u.length===0&&(y.preventDefault(),d(o[o.length-1]))}})})]})})}),l.jsx(m.Combobox.Dropdown,{children:l.jsx(m.Combobox.Options,{children:l.jsxs(m.Combobox.Option,{value:"$create",children:["+ Create ",u]})})})]})})}function np({form:e,name:t,items:n,onChange:r,...i}){return l.jsx(m.Select,{data:n,searchable:!0,...e.getInputProps(t),onChange:r,...i})}function aa({onClose:e,...t}){const{info:n,queryParams:r,setQueryParams:i,path:s}=ce(),o=bn.useForm({initialValues:{filters:[]},validate:Ii(_n({filters:Ai().of(_n({col:cr().transform(d=>d||void 0).required("Field is required"),opr:cr().transform(d=>d||void 0).required("col is required"),value:ur().when("col",{is:d=>d&&n.filters[d].schema.required,then:()=>ur().required("Value is required")})}))}))}),a={bg:"transparent",size:"sm",c:"gray"},u=m.useProps("ActionIcon",a,t);T.useEffect(()=>{o.setValues({filters:[]}),o.reset()},[s]),T.useEffect(()=>{if(r.filters&&r.filters.length){const d=r.filters.filter(p=>Jt(p.opr)).map(p=>({...p,key:ke.randomId()}));o.setFieldValue("filters",d)}},[r.filters]);const c=d=>{const p=d.filters.map(({key:v,...h})=>h),y=JSON.parse(JSON.stringify(p));i({filters:y,page:0}),e()},f=o.values.filters.map((d,p)=>l.jsxs(m.Box,{px:"sm",children:[l.jsxs(m.Flex,{my:"md",gap:"md",style:{whiteSpace:"nowrap"},children:[l.jsx(m.Box,{style:{width:"192px"},children:n&&n.filters&&l.jsx(tp,{form:o,name:`filters.${p}.col`,items:Object.entries(n.filters).map(([y,v])=>({label:v.label,value:String(y)})),onChange:y=>{o.setFieldValue(`filters.${p}`,{col:y,opr:"",value:"",key:ke.randomId()})}})}),l.jsx(m.Box,{style:{width:"192px"},children:d.col?l.jsx(np,{form:o,name:`filters.${p}.opr`,items:n.filters[d.col].filters.filter(y=>Jt(y.operator)).map(y=>({label:y.name,value:y.operator})),onChange:y=>{o.setFieldValue(`filters.${p}`,{col:o.values.filters[p].col,opr:y,value:"",key:ke.randomId()})}}):null}),l.jsx(m.Box,{style:{width:"192px"},children:d.col?d.opr==="in"?l.jsx(oa,{form:o,name:`filters.${p}.value`}):l.jsx(mr,{form:o,name:`filters.${p}.value`,schema:n.filters[d.col].schema,filter:!0}):null}),l.jsx(m.ActionIcon,{bg:u.bg,size:u.size,c:u.c,onClick:()=>{o.removeListItem("filters",p)},children:l.jsx(Oo,{})})]}),o.values.filters.length>1&&p<o.values.filters.length-1?l.jsx(m.Divider,{my:"md",labelPosition:"center",label:"AND"}):null]},d.key));return l.jsxs(m.Box,{component:"form",onSubmit:o.onSubmit(c),children:[f.length===0&&l.jsx(m.Box,{style:{width:"642px"},children:l.jsx(m.Text,{style:{fontStyle:"italic",padding:"7px"},size:"sm",c:"dimmed",children:"No filters selected..."})}),l.jsx(m.ScrollArea.Autosize,{mah:"40vh",mt:20,children:f}),l.jsx(m.Divider,{my:"sm"}),l.jsxs(m.Box,{style:{display:"flex",justifyContent:"space-between"},children:[l.jsx(m.Button,{variant:"subtle",leftSection:l.jsx(pr,{}),onClick:()=>{o.insertListItem("filters",{col:"",opr:"",value:"",key:ke.randomId()})},children:"Add Filter"}),l.jsx(m.Group,{spacing:"md",children:l.jsx(m.Button,{type:"submit",children:"Apply"})})]})]})}function la(...e){const{queryParams:t}=ce(),n={bg:"transparent",size:"sm",c:"gray"},r=m.useProps("ActionIcon",n,e),[i,s]=T.useState(!1);return l.jsxs(m.Popover,{opened:i,position:"bottom-end",onClose:()=>s(!1),closeOnClickOutside:!1,children:[l.jsx(m.Popover.Target,{children:l.jsx(m.Tooltip,{opened:i?!1:null,label:"Filter",children:(t==null?void 0:t.filters.filter(o=>Jt(o.opr)).length)!=0?l.jsx(m.Indicator,{zIndex:20,size:16,label:t==null?void 0:t.filters.length,children:l.jsx(m.ActionIcon,{bg:r.bg,size:r.size,c:r.c,onClick:()=>s(!0),children:l.jsx(Pi,{})})}):l.jsx(m.ActionIcon,{bg:r.bg,size:r.size,c:r.c,onClick:()=>s(!0),children:l.jsx(Pi,{})})})}),l.jsxs(m.Popover.Dropdown,{px:"xs",children:[l.jsx(m.Box,{style:{position:"absolute",top:4,right:4},children:l.jsx(m.CloseButton,{title:"Filters",onClick:()=>s(!1)})}),l.jsx(aa,{onClose:()=>{s(!1)}})]})]})}function rp(...e){const[t,n]=T.useState(!1),{download:r}=ce(),i={bg:"transparent",size:"sm",c:"gray"},s=m.useProps("ActionIcon",i,e);return t?l.jsx(m.Loader,{color:s.c,size:s.size}):l.jsx(m.Tooltip,{label:"Download",children:l.jsx(m.ActionIcon,{bg:s.bg,size:s.size,c:s.c,onClick:()=>{n(!0),r("download").then(()=>n(!1))},children:l.jsx(Co,{})})})}const ua=T.memo(({hideAdd:e,hideFilter:t,hideDownload:n,toolbarCustomizer:r})=>{const{info:i}=ce(),s=T.useMemo(()=>{const a={};return Object.entries(r).forEach(([u,c])=>{a[u]=c,typeof a[u]=="function"&&(a[u]=a[u]())}),a},[r]),o=i.permissions.includes("can_post");return l.jsxs(m.Flex,{justify:"flex-end",p:"md",gap:"sm",children:[!n&&(s.download||l.jsx(rp,{})),o&&!e?s.add||l.jsx(Ro,{}):null,t?null:s.filter||l.jsx(la,{})]})});ua.displayName="Toolbar";const Wi=T.forwardRef((e,t)=>{const{path:n,data:r,loading:i,info:s,setQueryParams:o}=ce(),{hideToolbar:a=!1,hideFilter:u=!1,hideAdd:c=!1,hideSettings:f=!1,hideActions:d=!1,hidePagination:p=!1,hideError:y=!1,hideDownload:v=!0,onSelectCheckbox:h=null,onClickEntry:_=null,fetchOnMount:w=!0,bulkActions:O=null,styles:j,headerCustomizer:k={},bodyCustomizer:E={},toolbarCustomizer:$={},counter:z=!1,bodySeparator:q}=e;if(T.useEffect(()=>{!r&&w&&o({})},[r]),!s)return;const Q=O===null;return l.jsxs(m.Paper,{ref:t,style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",...j},children:[a?null:l.jsx(ua,{hideFilter:u,hideAdd:c,hideSettings:f,hideDownload:v,toolbarCustomizer:$}),r?l.jsx(Zd,{bulkActions:O,hideActions:d,loading:i,onSelectCheckbox:h,onClickEntry:_,hideCheckbox:Q,hideDownload:v,headerCustomizer:k,bodyCustomizer:E,bodySeparator:q}):null,!p&&r?l.jsx(na,{counter:z}):null,y?null:l.jsx(jo,{})]})});Wi.displayName="DataGrid";function ip({children:e,fetch:t=!0,loading:n=l.jsx(m.Center,{children:l.jsx(m.Loader,{})}),end:r=l.jsx(m.Center,{children:"End of data"}),fetchWrapper:i=m.Center,fetchWrapperProps:s}){const{streaming:o,loading:a}=ce(),{ref:u,inViewport:c}=ke.useInViewport(),f=T.useMemo(()=>Object.values(o.data).flat(),[o.data]),d=T.useMemo(()=>typeof e=="function"?e(f):e,[e,f]);return T.useEffect(()=>{c&&t&&o.fetch()},[c]),l.jsxs(l.Fragment,{children:[d,a&&n,o.isEnd&&r,l.jsx(i,{ref:u,id:"IS-load-trigger",mih:"1%",...s})]})}var sp=Object.prototype;function op(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||sp;return e===n}var xr=op;function ap(e,t){return function(n){return e(t(n))}}var ca=ap,lp=ca,up=lp(Object.keys,Object),cp=up,fp=xr,dp=cp,pp=Object.prototype,hp=pp.hasOwnProperty;function mp(e){if(!fp(e))return dp(e);var t=[];for(var n in Object(e))hp.call(e,n)&&n!="constructor"&&t.push(n);return t}var gp=mp,yp=typeof er=="object"&&er&&er.Object===Object&&er,fa=yp,bp=fa,vp=typeof self=="object"&&self&&self.Object===Object&&self,xp=bp||vp||Function("return this")(),rt=xp,Tp=rt,_p=Tp.Symbol,Tr=_p,da=Tr,pa=Object.prototype,Sp=pa.hasOwnProperty,wp=pa.toString,$n=da?da.toStringTag:void 0;function Ep(e){var t=Sp.call(e,$n),n=e[$n];try{e[$n]=void 0;var r=!0}catch{}var i=wp.call(e);return r&&(t?e[$n]=n:delete e[$n]),i}var Cp=Ep,Ap=Object.prototype,Op=Ap.toString;function jp(e){return Op.call(e)}var $p=jp,ha=Tr,Pp=Cp,kp=$p,Ip="[object Null]",Dp="[object Undefined]",ma=ha?ha.toStringTag:void 0;function Mp(e){return e==null?e===void 0?Dp:Ip:ma&&ma in Object(e)?Pp(e):kp(e)}var Xt=Mp;function Fp(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ht=Fp,Rp=Xt,Np=ht,Lp="[object AsyncFunction]",zp="[object Function]",Bp="[object GeneratorFunction]",Up="[object Proxy]";function Vp(e){if(!Np(e))return!1;var t=Rp(e);return t==zp||t==Bp||t==Lp||t==Up}var Gi=Vp,Wp=rt,Gp=Wp["__core-js_shared__"],Hp=Gp,Hi=Hp,ga=function(){var e=/[^.]+$/.exec(Hi&&Hi.keys&&Hi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Yp(e){return!!ga&&ga in e}var qp=Yp,Kp=Function.prototype,Jp=Kp.toString;function Xp(e){if(e!=null){try{return Jp.call(e)}catch{}try{return e+""}catch{}}return""}var ya=Xp,Zp=Gi,Qp=qp,eh=ht,th=ya,nh=/[\\^$.*+?()[\]{}|]/g,rh=/^\[object .+?Constructor\]$/,ih=Function.prototype,sh=Object.prototype,oh=ih.toString,ah=sh.hasOwnProperty,lh=RegExp("^"+oh.call(ah).replace(nh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function uh(e){if(!eh(e)||Qp(e))return!1;var t=Zp(e)?lh:rh;return t.test(th(e))}var ch=uh;function fh(e,t){return e==null?void 0:e[t]}var dh=fh,ph=ch,hh=dh;function mh(e,t){var n=hh(e,t);return ph(n)?n:void 0}var Lt=mh,gh=Lt,yh=rt,bh=gh(yh,"DataView"),vh=bh,xh=Lt,Th=rt,_h=xh(Th,"Map"),Yi=_h,Sh=Lt,wh=rt,Eh=Sh(wh,"Promise"),Ch=Eh,Ah=Lt,Oh=rt,jh=Ah(Oh,"Set"),ba=jh,$h=Lt,Ph=rt,kh=$h(Ph,"WeakMap"),Ih=kh,qi=vh,Ki=Yi,Ji=Ch,Xi=ba,Zi=Ih,va=Xt,Zt=ya,xa="[object Map]",Dh="[object Object]",Ta="[object Promise]",_a="[object Set]",Sa="[object WeakMap]",wa="[object DataView]",Mh=Zt(qi),Fh=Zt(Ki),Rh=Zt(Ji),Nh=Zt(Xi),Lh=Zt(Zi),zt=va;(qi&&zt(new qi(new ArrayBuffer(1)))!=wa||Ki&&zt(new Ki)!=xa||Ji&&zt(Ji.resolve())!=Ta||Xi&&zt(new Xi)!=_a||Zi&&zt(new Zi)!=Sa)&&(zt=function(e){var t=va(e),n=t==Dh?e.constructor:void 0,r=n?Zt(n):"";if(r)switch(r){case Mh:return wa;case Fh:return xa;case Rh:return Ta;case Nh:return _a;case Lh:return Sa}return t});var zh=zt;function Bh(e){return e!=null&&typeof e=="object"}var Qt=Bh,Uh=Xt,Vh=Qt,Wh="[object Arguments]";function Gh(e){return Vh(e)&&Uh(e)==Wh}var Hh=Gh,Ea=Hh,Yh=Qt,Ca=Object.prototype,qh=Ca.hasOwnProperty,Kh=Ca.propertyIsEnumerable,Jh=Ea(function(){return arguments}())?Ea:function(e){return Yh(e)&&qh.call(e,"callee")&&!Kh.call(e,"callee")},_r=Jh,Xh=Array.isArray,Pn=Xh,Zh=9007199254740991;function Qh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Zh}var Aa=Qh,em=Gi,tm=Aa;function nm(e){return e!=null&&tm(e.length)&&!em(e)}var Sr=nm,wr={exports:{}};function rm(){return!1}var im=rm;wr.exports,function(e,t){var n=rt,r=im,i=t&&!t.nodeType&&t,s=i&&!0&&e&&!e.nodeType&&e,o=s&&s.exports===i,a=o?n.Buffer:void 0,u=a?a.isBuffer:void 0,c=u||r;e.exports=c}(wr,wr.exports);var Qi=wr.exports,sm=Xt,om=Aa,am=Qt,lm="[object Arguments]",um="[object Array]",cm="[object Boolean]",fm="[object Date]",dm="[object Error]",pm="[object Function]",hm="[object Map]",mm="[object Number]",gm="[object Object]",ym="[object RegExp]",bm="[object Set]",vm="[object String]",xm="[object WeakMap]",Tm="[object ArrayBuffer]",_m="[object DataView]",Sm="[object Float32Array]",wm="[object Float64Array]",Em="[object Int8Array]",Cm="[object Int16Array]",Am="[object Int32Array]",Om="[object Uint8Array]",jm="[object Uint8ClampedArray]",$m="[object Uint16Array]",Pm="[object Uint32Array]",Se={};Se[Sm]=Se[wm]=Se[Em]=Se[Cm]=Se[Am]=Se[Om]=Se[jm]=Se[$m]=Se[Pm]=!0,Se[lm]=Se[um]=Se[Tm]=Se[cm]=Se[_m]=Se[fm]=Se[dm]=Se[pm]=Se[hm]=Se[mm]=Se[gm]=Se[ym]=Se[bm]=Se[vm]=Se[xm]=!1;function km(e){return am(e)&&om(e.length)&&!!Se[sm(e)]}var Im=km;function Dm(e){return function(t){return e(t)}}var Mm=Dm,Er={exports:{}};Er.exports,function(e,t){var n=fa,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===r,o=s&&n.process,a=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();e.exports=a}(Er,Er.exports);var Fm=Er.exports,Rm=Im,Nm=Mm,Oa=Fm,ja=Oa&&Oa.isTypedArray,Lm=ja?Nm(ja):Rm,es=Lm,zm=gp,Bm=zh,Um=_r,Vm=Pn,Wm=Sr,Gm=Qi,Hm=xr,Ym=es,qm="[object Map]",Km="[object Set]",Jm=Object.prototype,Xm=Jm.hasOwnProperty;function Zm(e){if(e==null)return!0;if(Wm(e)&&(Vm(e)||typeof e=="string"||typeof e.splice=="function"||Gm(e)||Ym(e)||Um(e)))return!e.length;var t=Bm(e);if(t==qm||t==Km)return!e.size;if(Hm(e))return!zm(e).length;for(var n in e)if(Xm.call(e,n))return!1;return!0}var Qm=Zm;const $a=Et(Qm),Pa=(e,t,n,r,i,s,o)=>e.map((a,u)=>l.jsx(m.Grid.Col,{span:i==="row"?12/e.length:12,style:{alignContent:"end"},children:l.jsx(Te.JsonFormsDispatch,{uischema:a,schema:t,path:n,enabled:r,renderers:s,cells:o})},`${n}-${u}`)),eg=({elements:e,schema:t,path:n,enabled:r,direction:i,renderers:s,cells:o})=>$a(e)?null:l.jsx(m.Grid,{spacing:i==="row"?2:0,children:Pa(e,t,n,r,i,s,o)}),ts=T.memo(eg),tg=e=>function(n){const r=Te.useJsonForms(),i=Y.getAjv({jsonforms:{...r}});return l.jsx(e,{...n,ajv:i})};var ng=rt,rg=function(){return ng.Date.now()},ig=rg,sg=/\s/;function og(e){for(var t=e.length;t--&&sg.test(e.charAt(t)););return t}var ag=og,lg=ag,ug=/^\s+/;function cg(e){return e&&e.slice(0,lg(e)+1).replace(ug,"")}var fg=cg,dg=Xt,pg=Qt,hg="[object Symbol]";function mg(e){return typeof e=="symbol"||pg(e)&&dg(e)==hg}var ka=mg,gg=fg,Ia=ht,yg=ka,Da=NaN,bg=/^[-+]0x[0-9a-f]+$/i,vg=/^0b[01]+$/i,xg=/^0o[0-7]+$/i,Tg=parseInt;function _g(e){if(typeof e=="number")return e;if(yg(e))return Da;if(Ia(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ia(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=gg(e);var n=vg.test(e);return n||xg.test(e)?Tg(e.slice(2),n?2:8):bg.test(e)?Da:+e}var Ma=_g,Sg=ht,ns=ig,Fa=Ma,wg="Expected a function",Eg=Math.max,Cg=Math.min;function Ag(e,t,n){var r,i,s,o,a,u,c=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(wg);t=Fa(t)||0,Sg(n)&&(f=!!n.leading,d="maxWait"in n,s=d?Eg(Fa(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p);function y($){var z=r,q=i;return r=i=void 0,c=$,o=e.apply(q,z),o}function v($){return c=$,a=setTimeout(w,t),f?y($):o}function h($){var z=$-u,q=$-c,Q=t-z;return d?Cg(Q,s-q):Q}function _($){var z=$-u,q=$-c;return u===void 0||z>=t||z<0||d&&q>=s}function w(){var $=ns();if(_($))return O($);a=setTimeout(w,h($))}function O($){return a=void 0,p&&r?y($):(r=i=void 0,o)}function j(){a!==void 0&&clearTimeout(a),c=0,r=u=i=a=void 0}function k(){return a===void 0?o:O(ns())}function E(){var $=ns(),z=_($);if(r=arguments,i=this,u=$,z){if(a===void 0)return v(u);if(d)return clearTimeout(a),a=setTimeout(w,t),y(u)}return a===void 0&&(a=setTimeout(w,t)),o}return E.cancel=j,E.flush=k,E}var Og=Ag;const jg=Et(Og),Ra=(e,t,n,r,i,s=300)=>{const[o,a]=T.useState(n??t);T.useEffect(()=>{a(n??t)},[n]);const u=T.useCallback(jg(d=>e(r,d),s),[e,r,s]),c=T.useCallback(d=>{const p=i(d);a(p??t),u(p)},[u,i]),f=T.useCallback(()=>{a(t),e(r,void 0)},[t,e,r]);return[o,c,f]},$g=e=>e===""?void 0:parseFloat(e),Pg=e=>$g(e),Cr=T.memo(function(t){const{allowDecimal:n,className:r,data:i,description:s,errors:o,enabled:a,handleChange:u,label:c,path:f,required:d,hideControls:p}=t,[y,v]=Ra(u,"",i,f,Pg),h=m.useProps(f,{},{});return Object.keys(h).forEach(_=>{typeof h[_]=="function"&&(h[_]=h[_](i))}),l.jsx(m.NumberInput,{label:c,description:s,error:o,required:d,value:y,onChange:v,className:r,disabled:!a,allowDecimal:n,hideControls:p,w:"100%",...h})});function kg(){this.__data__=[],this.size=0}var Ig=kg;function Dg(e,t){return e===t||e!==e&&t!==t}var Ar=Dg,Mg=Ar;function Fg(e,t){for(var n=e.length;n--;)if(Mg(e[n][0],t))return n;return-1}var Or=Fg,Rg=Or,Ng=Array.prototype,Lg=Ng.splice;function zg(e){var t=this.__data__,n=Rg(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Lg.call(t,n,1),--this.size,!0}var Bg=zg,Ug=Or;function Vg(e){var t=this.__data__,n=Ug(t,e);return n<0?void 0:t[n][1]}var Wg=Vg,Gg=Or;function Hg(e){return Gg(this.__data__,e)>-1}var Yg=Hg,qg=Or;function Kg(e,t){var n=this.__data__,r=qg(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Jg=Kg,Xg=Ig,Zg=Bg,Qg=Wg,ey=Yg,ty=Jg;function en(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}en.prototype.clear=Xg,en.prototype.delete=Zg,en.prototype.get=Qg,en.prototype.has=ey,en.prototype.set=ty;var jr=en,ny=jr;function ry(){this.__data__=new ny,this.size=0}var iy=ry;function sy(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var oy=sy;function ay(e){return this.__data__.get(e)}var ly=ay;function uy(e){return this.__data__.has(e)}var cy=uy,fy=Lt,dy=fy(Object,"create"),$r=dy,Na=$r;function py(){this.__data__=Na?Na(null):{},this.size=0}var hy=py;function my(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gy=my,yy=$r,by="__lodash_hash_undefined__",vy=Object.prototype,xy=vy.hasOwnProperty;function Ty(e){var t=this.__data__;if(yy){var n=t[e];return n===by?void 0:n}return xy.call(t,e)?t[e]:void 0}var _y=Ty,Sy=$r,wy=Object.prototype,Ey=wy.hasOwnProperty;function Cy(e){var t=this.__data__;return Sy?t[e]!==void 0:Ey.call(t,e)}var Ay=Cy,Oy=$r,jy="__lodash_hash_undefined__";function $y(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Oy&&t===void 0?jy:t,this}var Py=$y,ky=hy,Iy=gy,Dy=_y,My=Ay,Fy=Py;function tn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}tn.prototype.clear=ky,tn.prototype.delete=Iy,tn.prototype.get=Dy,tn.prototype.has=My,tn.prototype.set=Fy;var Ry=tn,La=Ry,Ny=jr,Ly=Yi;function zy(){this.size=0,this.__data__={hash:new La,map:new(Ly||Ny),string:new La}}var By=zy;function Uy(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Vy=Uy,Wy=Vy;function Gy(e,t){var n=e.__data__;return Wy(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Pr=Gy,Hy=Pr;function Yy(e){var t=Hy(this,e).delete(e);return this.size-=t?1:0,t}var qy=Yy,Ky=Pr;function Jy(e){return Ky(this,e).get(e)}var Xy=Jy,Zy=Pr;function Qy(e){return Zy(this,e).has(e)}var e0=Qy,t0=Pr;function n0(e,t){var n=t0(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var r0=n0,i0=By,s0=qy,o0=Xy,a0=e0,l0=r0;function nn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nn.prototype.clear=i0,nn.prototype.delete=s0,nn.prototype.get=o0,nn.prototype.has=a0,nn.prototype.set=l0;var za=nn,u0=jr,c0=Yi,f0=za,d0=200;function p0(e,t){var n=this.__data__;if(n instanceof u0){var r=n.__data__;if(!c0||r.length<d0-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new f0(r)}return n.set(e,t),this.size=n.size,this}var h0=p0,m0=jr,g0=iy,y0=oy,b0=ly,v0=cy,x0=h0;function rn(e){var t=this.__data__=new m0(e);this.size=t.size}rn.prototype.clear=g0,rn.prototype.delete=y0,rn.prototype.get=b0,rn.prototype.has=v0,rn.prototype.set=x0;var T0=rn,_0=Lt,S0=function(){try{var e=_0(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Ba=S0,Ua=Ba;function w0(e,t,n){t=="__proto__"&&Ua?Ua(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var rs=w0,E0=rs,C0=Ar;function A0(e,t,n){(n!==void 0&&!C0(e[t],n)||n===void 0&&!(t in e))&&E0(e,t,n)}var Va=A0;function O0(e){return function(t,n,r){for(var i=-1,s=Object(t),o=r(t),a=o.length;a--;){var u=o[e?a:++i];if(n(s[u],u,s)===!1)break}return t}}var j0=O0,$0=j0,P0=$0(),k0=P0,kr={exports:{}};kr.exports,function(e,t){var n=rt,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===r,o=s?n.Buffer:void 0,a=o?o.allocUnsafe:void 0;function u(c,f){if(f)return c.slice();var d=c.length,p=a?a(d):new c.constructor(d);return c.copy(p),p}e.exports=u}(kr,kr.exports);var I0=kr.exports,D0=rt,M0=D0.Uint8Array,F0=M0,Wa=F0;function R0(e){var t=new e.constructor(e.byteLength);return new Wa(t).set(new Wa(e)),t}var N0=R0,L0=N0;function z0(e,t){var n=t?L0(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var B0=z0;function U0(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var V0=U0,W0=ht,Ga=Object.create,G0=function(){function e(){}return function(t){if(!W0(t))return{};if(Ga)return Ga(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),H0=G0,Y0=ca,q0=Y0(Object.getPrototypeOf,Object),Ha=q0,K0=H0,J0=Ha,X0=xr;function Z0(e){return typeof e.constructor=="function"&&!X0(e)?K0(J0(e)):{}}var Q0=Z0,eb=Sr,tb=Qt;function nb(e){return tb(e)&&eb(e)}var Ya=nb,rb=Xt,ib=Ha,sb=Qt,ob="[object Object]",ab=Function.prototype,lb=Object.prototype,qa=ab.toString,ub=lb.hasOwnProperty,cb=qa.call(Object);function fb(e){if(!sb(e)||rb(e)!=ob)return!1;var t=ib(e);if(t===null)return!0;var n=ub.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&qa.call(n)==cb}var db=fb;function pb(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Ka=pb,hb=rs,mb=Ar,gb=Object.prototype,yb=gb.hasOwnProperty;function bb(e,t,n){var r=e[t];(!(yb.call(e,t)&&mb(r,n))||n===void 0&&!(t in e))&&hb(e,t,n)}var vb=bb,xb=vb,Tb=rs;function _b(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],u=r?r(n[a],e[a],a,n,e):void 0;u===void 0&&(u=e[a]),i?Tb(n,a,u):xb(n,a,u)}return n}var Sb=_b;function wb(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Eb=wb,Cb=9007199254740991,Ab=/^(?:0|[1-9]\d*)$/;function Ob(e,t){var n=typeof e;return t=t??Cb,!!t&&(n=="number"||n!="symbol"&&Ab.test(e))&&e>-1&&e%1==0&&e<t}var Ja=Ob,jb=Eb,$b=_r,Pb=Pn,kb=Qi,Ib=Ja,Db=es,Mb=Object.prototype,Fb=Mb.hasOwnProperty;function Rb(e,t){var n=Pb(e),r=!n&&$b(e),i=!n&&!r&&kb(e),s=!n&&!r&&!i&&Db(e),o=n||r||i||s,a=o?jb(e.length,String):[],u=a.length;for(var c in e)(t||Fb.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ib(c,u)))&&a.push(c);return a}var Nb=Rb;function Lb(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var zb=Lb,Bb=ht,Ub=xr,Vb=zb,Wb=Object.prototype,Gb=Wb.hasOwnProperty;function Hb(e){if(!Bb(e))return Vb(e);var t=Ub(e),n=[];for(var r in e)r=="constructor"&&(t||!Gb.call(e,r))||n.push(r);return n}var Yb=Hb,qb=Nb,Kb=Yb,Jb=Sr;function Xb(e){return Jb(e)?qb(e,!0):Kb(e)}var Xa=Xb,Zb=Sb,Qb=Xa;function ev(e){return Zb(e,Qb(e))}var tv=ev,Za=Va,nv=I0,rv=B0,iv=V0,sv=Q0,Qa=_r,el=Pn,ov=Ya,av=Qi,lv=Gi,uv=ht,cv=db,fv=es,tl=Ka,dv=tv;function pv(e,t,n,r,i,s,o){var a=tl(e,n),u=tl(t,n),c=o.get(u);if(c){Za(e,n,c);return}var f=s?s(a,u,n+"",e,t,o):void 0,d=f===void 0;if(d){var p=el(u),y=!p&&av(u),v=!p&&!y&&fv(u);f=u,p||y||v?el(a)?f=a:ov(a)?f=iv(a):y?(d=!1,f=nv(u,!0)):v?(d=!1,f=rv(u,!0)):f=[]:cv(u)||Qa(u)?(f=a,Qa(a)?f=dv(a):(!uv(a)||lv(a))&&(f=sv(u))):d=!1}d&&(o.set(u,f),i(f,u,r,s,o),o.delete(u)),Za(e,n,f)}var hv=pv,mv=T0,gv=Va,yv=k0,bv=hv,vv=ht,xv=Xa,Tv=Ka;function nl(e,t,n,r,i){e!==t&&yv(t,function(s,o){if(i||(i=new mv),vv(s))bv(e,t,o,n,nl,r,i);else{var a=r?r(Tv(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),gv(e,o,a)}},xv)}var _v=nl;function Sv(e){return e}var rl=Sv;function wv(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Ev=wv,Cv=Ev,il=Math.max;function Av(e,t,n){return t=il(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=il(r.length-t,0),o=Array(s);++i<s;)o[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(o),Cv(e,this,a)}}var Ov=Av;function jv(e){return function(){return e}}var $v=jv,Pv=$v,sl=Ba,kv=rl,Iv=sl?function(e,t){return sl(e,"toString",{configurable:!0,enumerable:!1,value:Pv(t),writable:!0})}:kv,Dv=Iv,Mv=800,Fv=16,Rv=Date.now;function Nv(e){var t=0,n=0;return function(){var r=Rv(),i=Fv-(r-n);if(n=r,i>0){if(++t>=Mv)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Lv=Nv,zv=Dv,Bv=Lv,Uv=Bv(zv),Vv=Uv,Wv=rl,Gv=Ov,Hv=Vv;function Yv(e,t){return Hv(Gv(e,t,Wv),e+"")}var ol=Yv,qv=Ar,Kv=Sr,Jv=Ja,Xv=ht;function Zv(e,t,n){if(!Xv(n))return!1;var r=typeof t;return(r=="number"?Kv(n)&&Jv(t,n.length):r=="string"&&t in n)?qv(n[t],e):!1}var al=Zv,Qv=ol,ex=al;function tx(e){return Qv(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&ex(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,s)}return t})}var nx=tx,rx=_v,ix=nx,sx=ix(function(e,t,n){rx(e,t,n)}),ox=sx;const ll=Et(ox),ul=T.memo(function(t){const{className:n,config:r,uischema:i,data:s,description:o,errors:a,enabled:u,path:c,handleChange:f,label:d,required:p}=t,y=ll({},r,i.options),v=m.useProps(c,{},{});return Object.keys(v).forEach(h=>{typeof v[h]=="function"&&(v[h]=v[h](s))}),y.format==="password"?l.jsx(m.PasswordInput,{label:d,description:o,error:a,required:p,value:s||"",onChange:h=>{f(c,h.currentTarget.value)},className:n,disabled:!u,w:"100%",...v}):l.jsx(m.TextInput,{label:d,description:o,error:a,required:p,value:s||"",onChange:h=>{f(c,h.currentTarget.value)},className:n,disabled:!u,w:"100%",...v})}),cl=T.memo(function(t){const{className:n,data:r,description:i,enabled:s,errors:o,handleChange:a,label:u,labelPosition:c,path:f,required:d}=t,p=m.useProps(f,{},{});return Object.keys(p).forEach(y=>{typeof p[y]=="function"&&(p[y]=p[y](r))}),l.jsx(m.Checkbox,{label:u,description:i,error:o,disabled:!s,className:n,labelPosition:c,required:d,data:[{label:"true",value:"true"},{label:"false",value:"false"}],value:String(r)||"",onChange:y=>{a(f,y==="true")},...p})}),ax=e=>l.jsx(Cr,{...e}),fl=Y.rankWith(4,Y.isNumberControl),dl=Te.withJsonFormsCellProps(ax),lx=e=>l.jsx(Cr,{...e}),pl=Y.rankWith(3,Y.isIntegerControl),hl=Te.withJsonFormsCellProps(lx),ux=e=>l.jsx(ul,{...e}),ml=Y.rankWith(2,Y.isStringControl),gl=Te.withJsonFormsCellProps(ux),cx=e=>l.jsx(cl,{...e}),yl=Y.rankWith(3,Y.isBooleanControl),bl=Te.withJsonFormsCellProps(cx),fx=e=>{const{data:t,className:n,enabled:r,path:i,handleChange:s,description:o,errors:a,label:u,required:c}=e,f=m.useProps(i,{},{});return Object.keys(f).forEach(d=>{typeof f[d]=="function"&&(f[d]=f[d](t))}),l.jsx(wt.DateInput,{valueFormat:"DD.MM.YYYY",label:u,description:o,error:a,required:c,value:t?new Date(t):null,onChange:d=>{if(d instanceof Date){const p=new Date(d.getTime()-d.getTimezoneOffset()*6e4);s(i,p.toISOString().substring(0,10))}},className:n,disabled:!r,w:"100%",...f})},vl=Y.rankWith(2,Y.isDateControl),xl=Te.withJsonFormsCellProps(fx),dx=e=>{const{description:t,className:n,enabled:r,path:i,handleChange:s,data:o,errors:a,label:u,required:c}=e,f=m.useProps(i,{},{});return Object.keys(f).forEach(d=>{typeof f[d]=="function"&&(f[d]=f[d](o))}),l.jsx(wt.DateInput,{valueFormat:"DD.MM.YYYY",className:n,disabled:!r,label:u,description:t,error:a,required:c,value:o?new Date(o):null,onChange:d=>{if(d instanceof Date){const p=new Date(d.getTime()-d.getTimezoneOffset()*6e4);s(i,p.toISOString().substring(0,10))}},w:"100%",...f})},Tl=Y.rankWith(5,Y.isDateTimeControl),_l=Te.withJsonFormsControlProps(dx),px=e=>{const{description:t,data:n,path:r,options:i,enabled:s,handleChange:o,className:a,errors:u,label:c,required:f}=e,d=m.useProps(r,{},{});return Object.keys(d).forEach(p=>{typeof d[p]=="function"&&(d[p]=d[p](n))}),l.jsx(m.Select,{data:i,defaultValue:n,label:c,description:t,required:f,error:u,disabled:!s,searchable:!0,onChange:p=>{o(r,p)},className:a,w:"100%",...d})},Sl=Y.rankWith(5,Y.isEnumControl),wl=Te.withJsonFormsEnumProps(Te.withTranslateProps(T.memo(px)),!1);function hx(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var mx=hx,El=Tr,gx=_r,yx=Pn,Cl=El?El.isConcatSpreadable:void 0;function bx(e){return yx(e)||gx(e)||!!(Cl&&e&&e[Cl])}var vx=bx,xx=mx,Tx=vx;function Al(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=Tx),i||(i=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?Al(a,t-1,n,r,i):xx(i,a):r||(i[i.length]=a)}return i}var _x=Al,Sx="__lodash_hash_undefined__";function wx(e){return this.__data__.set(e,Sx),this}var Ex=wx;function Cx(e){return this.__data__.has(e)}var Ax=Cx,Ox=za,jx=Ex,$x=Ax;function Ir(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ox;++t<n;)this.add(e[t])}Ir.prototype.add=Ir.prototype.push=jx,Ir.prototype.has=$x;var Px=Ir;function kx(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}var Ix=kx;function Dx(e){return e!==e}var Mx=Dx;function Fx(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var Rx=Fx,Nx=Ix,Lx=Mx,zx=Rx;function Bx(e,t,n){return t===t?zx(e,t,n):Nx(e,Lx,n)}var Ux=Bx,Vx=Ux;function Wx(e,t){var n=e==null?0:e.length;return!!n&&Vx(e,t,0)>-1}var Gx=Wx;function Hx(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var Yx=Hx;function qx(e,t){return e.has(t)}var Kx=qx;function Jx(){}var Xx=Jx;function Zx(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Ol=Zx,is=ba,Qx=Xx,e1=Ol,t1=1/0,n1=is&&1/e1(new is([,-0]))[1]==t1?function(e){return new is(e)}:Qx,r1=n1,i1=Px,s1=Gx,o1=Yx,a1=Kx,l1=r1,u1=Ol,c1=200;function f1(e,t,n){var r=-1,i=s1,s=e.length,o=!0,a=[],u=a;if(n)o=!1,i=o1;else if(s>=c1){var c=t?null:l1(e);if(c)return u1(c);o=!1,i=a1,u=new i1}else u=t?[]:a;e:for(;++r<s;){var f=e[r],d=t?t(f):f;if(f=n||f!==0?f:0,o&&d===d){for(var p=u.length;p--;)if(u[p]===d)continue e;t&&u.push(d),a.push(f)}else i(u,d,n)||(u!==a&&u.push(d),a.push(f))}return a}var d1=f1,p1=_x,h1=ol,m1=d1,g1=Ya,y1=h1(function(e){return m1(p1(e,1,g1,!0))}),b1=y1;const v1=Et(b1);function x1(e,t,n,r){var i=-1,s=e==null?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}var T1=x1;function _1(e){return function(t){return e==null?void 0:e[t]}}var S1=_1,w1=S1,E1={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},C1=w1(E1),A1=C1;function O1(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var j1=O1,jl=Tr,$1=j1,P1=Pn,k1=ka,$l=jl?jl.prototype:void 0,Pl=$l?$l.toString:void 0;function kl(e){if(typeof e=="string")return e;if(P1(e))return $1(e,kl)+"";if(k1(e))return Pl?Pl.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var I1=kl,D1=I1;function M1(e){return e==null?"":D1(e)}var ss=M1,F1=A1,R1=ss,N1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,L1="\\u0300-\\u036f",z1="\\ufe20-\\ufe2f",B1="\\u20d0-\\u20ff",U1=L1+z1+B1,V1="["+U1+"]",W1=RegExp(V1,"g");function G1(e){return e=R1(e),e&&e.replace(N1,F1).replace(W1,"")}var H1=G1,Y1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function q1(e){return e.match(Y1)||[]}var K1=q1,J1=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function X1(e){return J1.test(e)}var Z1=X1,Il="\\ud800-\\udfff",Q1="\\u0300-\\u036f",eT="\\ufe20-\\ufe2f",tT="\\u20d0-\\u20ff",nT=Q1+eT+tT,Dl="\\u2700-\\u27bf",Ml="a-z\\xdf-\\xf6\\xf8-\\xff",rT="\\xac\\xb1\\xd7\\xf7",iT="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",sT="\\u2000-\\u206f",oT=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Fl="A-Z\\xc0-\\xd6\\xd8-\\xde",aT="\\ufe0e\\ufe0f",Rl=rT+iT+sT+oT,Nl="['’]",Ll="["+Rl+"]",lT="["+nT+"]",zl="\\d+",uT="["+Dl+"]",Bl="["+Ml+"]",Ul="[^"+Il+Rl+zl+Dl+Ml+Fl+"]",cT="\\ud83c[\\udffb-\\udfff]",fT="(?:"+lT+"|"+cT+")",dT="[^"+Il+"]",Vl="(?:\\ud83c[\\udde6-\\uddff]){2}",Wl="[\\ud800-\\udbff][\\udc00-\\udfff]",sn="["+Fl+"]",pT="\\u200d",Gl="(?:"+Bl+"|"+Ul+")",hT="(?:"+sn+"|"+Ul+")",Hl="(?:"+Nl+"(?:d|ll|m|re|s|t|ve))?",Yl="(?:"+Nl+"(?:D|LL|M|RE|S|T|VE))?",ql=fT+"?",Kl="["+aT+"]?",mT="(?:"+pT+"(?:"+[dT,Vl,Wl].join("|")+")"+Kl+ql+")*",gT="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",yT="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",bT=Kl+ql+mT,vT="(?:"+[uT,Vl,Wl].join("|")+")"+bT,xT=RegExp([sn+"?"+Bl+"+"+Hl+"(?="+[Ll,sn,"$"].join("|")+")",hT+"+"+Yl+"(?="+[Ll,sn+Gl,"$"].join("|")+")",sn+"?"+Gl+"+"+Hl,sn+"+"+Yl,yT,gT,zl,vT].join("|"),"g");function TT(e){return e.match(xT)||[]}var _T=TT,ST=K1,wT=Z1,ET=ss,CT=_T;function AT(e,t,n){return e=ET(e),t=n?void 0:t,t===void 0?wT(e)?CT(e):ST(e):e.match(t)||[]}var OT=AT,jT=T1,$T=H1,PT=OT,kT="['’]",IT=RegExp(kT,"g");function DT(e){return function(t){return jT(PT($T(t).replace(IT,"")),e,"")}}var MT=DT;function FT(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}var RT=FT,NT=RT;function LT(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:NT(e,t,n)}var zT=LT,BT="\\ud800-\\udfff",UT="\\u0300-\\u036f",VT="\\ufe20-\\ufe2f",WT="\\u20d0-\\u20ff",GT=UT+VT+WT,HT="\\ufe0e\\ufe0f",YT="\\u200d",qT=RegExp("["+YT+BT+GT+HT+"]");function KT(e){return qT.test(e)}var Jl=KT;function JT(e){return e.split("")}var XT=JT,Xl="\\ud800-\\udfff",ZT="\\u0300-\\u036f",QT="\\ufe20-\\ufe2f",e_="\\u20d0-\\u20ff",t_=ZT+QT+e_,n_="\\ufe0e\\ufe0f",r_="["+Xl+"]",os="["+t_+"]",as="\\ud83c[\\udffb-\\udfff]",i_="(?:"+os+"|"+as+")",Zl="[^"+Xl+"]",Ql="(?:\\ud83c[\\udde6-\\uddff]){2}",eu="[\\ud800-\\udbff][\\udc00-\\udfff]",s_="\\u200d",tu=i_+"?",nu="["+n_+"]?",o_="(?:"+s_+"(?:"+[Zl,Ql,eu].join("|")+")"+nu+tu+")*",a_=nu+tu+o_,l_="(?:"+[Zl+os+"?",os,Ql,eu,r_].join("|")+")",u_=RegExp(as+"(?="+as+")|"+l_+a_,"g");function c_(e){return e.match(u_)||[]}var f_=c_,d_=XT,p_=Jl,h_=f_;function m_(e){return p_(e)?h_(e):d_(e)}var g_=m_,y_=zT,b_=Jl,v_=g_,x_=ss;function T_(e){return function(t){t=x_(t);var n=b_(t)?v_(t):void 0,r=n?n[0]:t.charAt(0),i=n?y_(n,1).join(""):t.slice(1);return r[e]()+i}}var __=T_,S_=__,w_=S_("toUpperCase"),E_=w_,C_=MT,A_=E_,O_=C_(function(e,t,n){return e+(n?" ":"")+A_(t)}),j_=O_;const $_=Et(j_);var P_=Math.ceil,k_=Math.max;function I_(e,t,n,r){for(var i=-1,s=k_(P_((t-e)/(n||1)),0),o=Array(s);s--;)o[r?s:++i]=e,e+=n;return o}var D_=I_,M_=Ma,F_=1/0,R_=17976931348623157e292;function N_(e){if(!e)return e===0?e:0;if(e=M_(e),e===F_||e===-1/0){var t=e<0?-1:1;return t*R_}return e===e?e:0}var L_=N_,z_=D_,B_=al,ls=L_;function U_(e){return function(t,n,r){return r&&typeof r!="number"&&B_(t,n,r)&&(n=r=void 0),t=ls(t),n===void 0?(n=t,t=0):n=ls(n),r=r===void 0?t<n?1:-1:ls(r),z_(t,n,r,e)}}var V_=U_,W_=V_,G_=W_(),H_=G_;const Y_=Et(H_);var us={exports:{}},ye={};/**
|
|
130
|
+
* @license React
|
|
131
|
+
* react-is.production.js
|
|
131
132
|
*
|
|
132
|
-
* Copyright (c)
|
|
133
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
133
134
|
*
|
|
134
135
|
* This source code is licensed under the MIT license found in the
|
|
135
136
|
* LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/var
|
|
137
|
+
*/var ru;function q_(){if(ru)return ye;ru=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),y=Symbol.for("react.client.reference");function v(h){if(typeof h=="object"&&h!==null){var _=h.$$typeof;switch(_){case e:switch(h=h.type,h){case n:case i:case r:case u:case c:return h;default:switch(h=h&&h.$$typeof,h){case o:case a:case d:case f:return h;case s:return h;default:return _}}case t:return _}}}return ye.ContextConsumer=s,ye.ContextProvider=o,ye.Element=e,ye.ForwardRef=a,ye.Fragment=n,ye.Lazy=d,ye.Memo=f,ye.Portal=t,ye.Profiler=i,ye.StrictMode=r,ye.Suspense=u,ye.SuspenseList=c,ye.isContextConsumer=function(h){return v(h)===s},ye.isContextProvider=function(h){return v(h)===o},ye.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},ye.isForwardRef=function(h){return v(h)===a},ye.isFragment=function(h){return v(h)===n},ye.isLazy=function(h){return v(h)===d},ye.isMemo=function(h){return v(h)===f},ye.isPortal=function(h){return v(h)===t},ye.isProfiler=function(h){return v(h)===i},ye.isStrictMode=function(h){return v(h)===r},ye.isSuspense=function(h){return v(h)===u},ye.isSuspenseList=function(h){return v(h)===c},ye.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===i||h===r||h===u||h===c||h===p||typeof h=="object"&&h!==null&&(h.$$typeof===d||h.$$typeof===f||h.$$typeof===o||h.$$typeof===s||h.$$typeof===a||h.$$typeof===y||h.getModuleId!==void 0)},ye.typeOf=v,ye}var be={};/**
|
|
138
|
+
* @license React
|
|
137
139
|
* react-is.development.js
|
|
138
140
|
*
|
|
139
|
-
* Copyright (c)
|
|
141
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
140
142
|
*
|
|
141
143
|
* This source code is licensed under the MIT license found in the
|
|
142
144
|
* LICENSE file in the root directory of this source tree.
|
|
143
|
-
*/var
|
|
144
|
-
|
|
145
|
-
(c) Sindre Sorhus
|
|
146
|
-
@license MIT
|
|
147
|
-
*/var ls,lu;function X_(){if(lu)return ls;lu=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var u=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ls=i()?Object.assign:function(s,o){for(var a,u=n(s),c,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var d in a)t.call(a,d)&&(u[d]=a[d]);if(e){c=e(a);for(var p=0;p<c.length;p++)r.call(a,c[p])&&(u[c[p]]=a[c[p]])}}return u},ls}var us,uu;function cs(){if(uu)return us;uu=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return us=e,us}var fs,cu;function fu(){return cu||(cu=1,fs=Function.call.bind(Object.prototype.hasOwnProperty)),fs}var ds,du;function Z_(){if(du)return ds;du=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=cs(),r={},n=fu();e=function(s){var o="Warning: "+s;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(s,o,a,u,c){if(process.env.NODE_ENV!=="production"){for(var f in s)if(n(s,f)){var d;try{if(typeof s[f]!="function"){var p=Error((u||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=s[f](o,f,u,a,null,t)}catch(v){d=v}if(d&&!(d instanceof Error)&&e((u||"React class")+": type specification of "+a+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in r)){r[d.message]=!0;var y=c?c():"";e("Failed "+a+" type: "+d.message+(y??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},ds=i,ds}var ps,pu;function Q_(){if(pu)return ps;pu=1;var e=au(),t=X_(),r=cs(),n=fu(),i=Z_(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var u="Warning: "+a;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return ps=function(a,u){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(S){var A=S&&(c&&S[c]||S[f]);if(typeof A=="function")return A}var p="<<anonymous>>",y={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:O(),arrayOf:j,element:k(),elementType:E(),instanceOf:$,node:g(),objectOf:q,oneOf:z,oneOfType:Q,shape:B,exact:K};function v(S,A){return S===A?S!==0||1/S===1/A:S!==S&&A!==A}function h(S,A){this.message=S,this.data=A&&typeof A=="object"?A:{},this.stack=""}h.prototype=Error.prototype;function _(S){if(process.env.NODE_ENV!=="production")var A={},V=0;function W(G,X,ee,U,ne,re,$e){if(U=U||p,re=re||ee,$e!==r){if(u){var N=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw N.name="Invariant Violation",N}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ne=U+":"+ee;!A[Ne]&&V<3&&(s("You are manually calling a React.PropTypes validation function for the `"+re+"` prop on `"+U+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),A[Ne]=!0,V++)}}return X[ee]==null?G?X[ee]===null?new h("The "+ne+" `"+re+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new h("The "+ne+" `"+re+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:S(X,ee,U,ne,re)}var J=W.bind(null,!1);return J.isRequired=W.bind(null,!0),J}function w(S){function A(V,W,J,G,X,ee){var U=V[W],ne=he(U);if(ne!==S){var re=Te(U);return new h("Invalid "+G+" `"+X+"` of type "+("`"+re+"` supplied to `"+J+"`, expected ")+("`"+S+"`."),{expectedType:S})}return null}return _(A)}function O(){return _(o)}function j(S){function A(V,W,J,G,X){if(typeof S!="function")return new h("Property `"+X+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var ee=V[W];if(!Array.isArray(ee)){var U=he(ee);return new h("Invalid "+G+" `"+X+"` of type "+("`"+U+"` supplied to `"+J+"`, expected an array."))}for(var ne=0;ne<ee.length;ne++){var re=S(ee,ne,J,G,X+"["+ne+"]",r);if(re instanceof Error)return re}return null}return _(A)}function k(){function S(A,V,W,J,G){var X=A[V];if(!a(X)){var ee=he(X);return new h("Invalid "+J+" `"+G+"` of type "+("`"+ee+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return _(S)}function E(){function S(A,V,W,J,G){var X=A[V];if(!e.isValidElementType(X)){var ee=he(X);return new h("Invalid "+J+" `"+G+"` of type "+("`"+ee+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return _(S)}function $(S){function A(V,W,J,G,X){if(!(V[W]instanceof S)){var ee=S.name||p,U=H(V[W]);return new h("Invalid "+G+" `"+X+"` of type "+("`"+U+"` supplied to `"+J+"`, expected ")+("instance of `"+ee+"`."))}return null}return _(A)}function z(S){if(!Array.isArray(S))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),o;function A(V,W,J,G,X){for(var ee=V[W],U=0;U<S.length;U++)if(v(ee,S[U]))return null;var ne=JSON.stringify(S,function($e,N){var Ne=Te(N);return Ne==="symbol"?String(N):N});return new h("Invalid "+G+" `"+X+"` of value `"+String(ee)+"` "+("supplied to `"+J+"`, expected one of "+ne+"."))}return _(A)}function q(S){function A(V,W,J,G,X){if(typeof S!="function")return new h("Property `"+X+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var ee=V[W],U=he(ee);if(U!=="object")return new h("Invalid "+G+" `"+X+"` of type "+("`"+U+"` supplied to `"+J+"`, expected an object."));for(var ne in ee)if(n(ee,ne)){var re=S(ee,ne,J,G,X+"."+ne,r);if(re instanceof Error)return re}return null}return _(A)}function Q(S){if(!Array.isArray(S))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var A=0;A<S.length;A++){var V=S[A];if(typeof V!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+je(V)+" at index "+A+"."),o}function W(J,G,X,ee,U){for(var ne=[],re=0;re<S.length;re++){var $e=S[re],N=$e(J,G,X,ee,U,r);if(N==null)return null;N.data&&n(N.data,"expectedType")&&ne.push(N.data.expectedType)}var Ne=ne.length>0?", expected one of type ["+ne.join(", ")+"]":"";return new h("Invalid "+ee+" `"+U+"` supplied to "+("`"+X+"`"+Ne+"."))}return _(W)}function g(){function S(A,V,W,J,G){return te(A[V])?null:new h("Invalid "+J+" `"+G+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return _(S)}function P(S,A,V,W,J){return new h((S||"React class")+": "+A+" type `"+V+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function B(S){function A(V,W,J,G,X){var ee=V[W],U=he(ee);if(U!=="object")return new h("Invalid "+G+" `"+X+"` of type `"+U+"` "+("supplied to `"+J+"`, expected `object`."));for(var ne in S){var re=S[ne];if(typeof re!="function")return P(J,G,X,ne,Te(re));var $e=re(ee,ne,J,G,X+"."+ne,r);if($e)return $e}return null}return _(A)}function K(S){function A(V,W,J,G,X){var ee=V[W],U=he(ee);if(U!=="object")return new h("Invalid "+G+" `"+X+"` of type `"+U+"` "+("supplied to `"+J+"`, expected `object`."));var ne=t({},V[W],S);for(var re in ne){var $e=S[re];if(n(S,re)&&typeof $e!="function")return P(J,G,X,re,Te($e));if(!$e)return new h("Invalid "+G+" `"+X+"` key `"+re+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(V[W],null," ")+`
|
|
148
|
-
Valid keys: `+JSON.stringify(Object.keys(S),null," "));var N=$e(ee,re,J,G,X+"."+re,r);if(N)return N}return null}return _(A)}function te(S){switch(typeof S){case"number":case"string":case"undefined":return!0;case"boolean":return!S;case"object":if(Array.isArray(S))return S.every(te);if(S===null||a(S))return!0;var A=d(S);if(A){var V=A.call(S),W;if(A!==S.entries){for(;!(W=V.next()).done;)if(!te(W.value))return!1}else for(;!(W=V.next()).done;){var J=W.value;if(J&&!te(J[1]))return!1}}else return!1;return!0;default:return!1}}function pe(S,A){return S==="symbol"?!0:A?A["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&A instanceof Symbol:!1}function he(S){var A=typeof S;return Array.isArray(S)?"array":S instanceof RegExp?"object":pe(A,S)?"symbol":A}function Te(S){if(typeof S>"u"||S===null)return""+S;var A=he(S);if(A==="object"){if(S instanceof Date)return"date";if(S instanceof RegExp)return"regexp"}return A}function je(S){var A=Te(S);switch(A){case"array":case"object":return"an "+A;case"boolean":case"date":case"regexp":return"a "+A;default:return A}}function H(S){return!S.constructor||!S.constructor.name?p:S.constructor.name}return y.checkPropTypes=i,y.resetWarningCache=i.resetWarningCache,y.PropTypes=y,y},ps}var hs,hu;function eS(){if(hu)return hs;hu=1;var e=cs();function t(){}function r(){}return r.resetWarningCache=t,hs=function(){function n(o,a,u,c,f,d){if(d!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function i(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},hs}if(process.env.NODE_ENV!=="production"){var tS=au(),rS=!0;as.exports=Q_()(tS.isElement,rS)}else as.exports=eS()();var nS=as.exports;const le=wt(nS);function At(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}var ms={exports:{}},ge={};/**
|
|
149
|
-
* @license React
|
|
150
|
-
* react-is.production.js
|
|
145
|
+
*/var iu;function K_(){return iu||(iu=1,process.env.NODE_ENV!=="production"&&function(){function e(h){if(typeof h=="object"&&h!==null){var _=h.$$typeof;switch(_){case t:switch(h=h.type,h){case r:case s:case i:case c:case f:return h;default:switch(h=h&&h.$$typeof,h){case a:case u:case p:case d:return h;case o:return h;default:return _}}case n:return _}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),v=Symbol.for("react.client.reference");be.ContextConsumer=o,be.ContextProvider=a,be.Element=t,be.ForwardRef=u,be.Fragment=r,be.Lazy=p,be.Memo=d,be.Portal=n,be.Profiler=s,be.StrictMode=i,be.Suspense=c,be.SuspenseList=f,be.isContextConsumer=function(h){return e(h)===o},be.isContextProvider=function(h){return e(h)===a},be.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},be.isForwardRef=function(h){return e(h)===u},be.isFragment=function(h){return e(h)===r},be.isLazy=function(h){return e(h)===p},be.isMemo=function(h){return e(h)===d},be.isPortal=function(h){return e(h)===n},be.isProfiler=function(h){return e(h)===s},be.isStrictMode=function(h){return e(h)===i},be.isSuspense=function(h){return e(h)===c},be.isSuspenseList=function(h){return e(h)===f},be.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===r||h===s||h===i||h===c||h===f||h===y||typeof h=="object"&&h!==null&&(h.$$typeof===p||h.$$typeof===d||h.$$typeof===a||h.$$typeof===o||h.$$typeof===u||h.$$typeof===v||h.getModuleId!==void 0)},be.typeOf=e}()),be}process.env.NODE_ENV==="production"?us.exports=q_():us.exports=K_();var Dr=us.exports;function mt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function su(e){if(Le.isValidElement(e)||Dr.isValidElementType(e)||!mt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=su(e[n])}),t}function qe(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return mt(e)&&mt(t)&&Object.keys(t).forEach(i=>{Le.isValidElement(t[i])||Dr.isValidElementType(t[i])?r[i]=t[i]:mt(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&mt(e[i])?r[i]=qe(e[i],t[i],n):n.clone?r[i]=mt(t[i])?su(t[i]):t[i]:r[i]=t[i]}),r}var cs={exports:{}},Mr={exports:{}},de={};/** @license React v16.13.1
|
|
146
|
+
* react-is.production.min.js
|
|
151
147
|
*
|
|
152
|
-
* Copyright (c)
|
|
148
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
153
149
|
*
|
|
154
150
|
* This source code is licensed under the MIT license found in the
|
|
155
151
|
* LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/var
|
|
157
|
-
* @license React
|
|
152
|
+
*/var ou;function J_(){if(ou)return de;ou=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function j(E){if(typeof E=="object"&&E!==null){var $=E.$$typeof;switch($){case t:switch(E=E.type,E){case u:case c:case r:case s:case i:case d:return E;default:switch(E=E&&E.$$typeof,E){case a:case f:case v:case y:case o:return E;default:return $}}case n:return $}}}function k(E){return j(E)===c}return de.AsyncMode=u,de.ConcurrentMode=c,de.ContextConsumer=a,de.ContextProvider=o,de.Element=t,de.ForwardRef=f,de.Fragment=r,de.Lazy=v,de.Memo=y,de.Portal=n,de.Profiler=s,de.StrictMode=i,de.Suspense=d,de.isAsyncMode=function(E){return k(E)||j(E)===u},de.isConcurrentMode=k,de.isContextConsumer=function(E){return j(E)===a},de.isContextProvider=function(E){return j(E)===o},de.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},de.isForwardRef=function(E){return j(E)===f},de.isFragment=function(E){return j(E)===r},de.isLazy=function(E){return j(E)===v},de.isMemo=function(E){return j(E)===y},de.isPortal=function(E){return j(E)===n},de.isProfiler=function(E){return j(E)===s},de.isStrictMode=function(E){return j(E)===i},de.isSuspense=function(E){return j(E)===d},de.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===c||E===s||E===i||E===d||E===p||typeof E=="object"&&E!==null&&(E.$$typeof===v||E.$$typeof===y||E.$$typeof===o||E.$$typeof===a||E.$$typeof===f||E.$$typeof===_||E.$$typeof===w||E.$$typeof===O||E.$$typeof===h)},de.typeOf=j,de}var pe={};/** @license React v16.13.1
|
|
158
153
|
* react-is.development.js
|
|
159
154
|
*
|
|
160
|
-
* Copyright (c)
|
|
155
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
161
156
|
*
|
|
162
157
|
* This source code is licensed under the MIT license found in the
|
|
163
158
|
* LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/var
|
|
165
|
-
|
|
159
|
+
*/var au;function X_(){return au||(au=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function j(F){return typeof F=="string"||typeof F=="function"||F===r||F===c||F===s||F===i||F===d||F===p||typeof F=="object"&&F!==null&&(F.$$typeof===v||F.$$typeof===y||F.$$typeof===o||F.$$typeof===a||F.$$typeof===f||F.$$typeof===_||F.$$typeof===w||F.$$typeof===O||F.$$typeof===h)}function k(F){if(typeof F=="object"&&F!==null){var Ne=F.$$typeof;switch(Ne){case t:var Ge=F.type;switch(Ge){case u:case c:case r:case s:case i:case d:return Ge;default:var it=Ge&&Ge.$$typeof;switch(it){case a:case f:case v:case y:case o:return it;default:return Ne}}case n:return Ne}}}var E=u,$=c,z=a,q=o,Q=t,g=f,P=r,B=v,J=y,te=n,me=s,ge=i,_e=d,je=!1;function H(F){return je||(je=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),S(F)||k(F)===u}function S(F){return k(F)===c}function A(F){return k(F)===a}function V(F){return k(F)===o}function W(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function K(F){return k(F)===f}function G(F){return k(F)===r}function X(F){return k(F)===v}function ee(F){return k(F)===y}function U(F){return k(F)===n}function re(F){return k(F)===s}function ne(F){return k(F)===i}function $e(F){return k(F)===d}pe.AsyncMode=E,pe.ConcurrentMode=$,pe.ContextConsumer=z,pe.ContextProvider=q,pe.Element=Q,pe.ForwardRef=g,pe.Fragment=P,pe.Lazy=B,pe.Memo=J,pe.Portal=te,pe.Profiler=me,pe.StrictMode=ge,pe.Suspense=_e,pe.isAsyncMode=H,pe.isConcurrentMode=S,pe.isContextConsumer=A,pe.isContextProvider=V,pe.isElement=W,pe.isForwardRef=K,pe.isFragment=G,pe.isLazy=X,pe.isMemo=ee,pe.isPortal=U,pe.isProfiler=re,pe.isStrictMode=ne,pe.isSuspense=$e,pe.isValidElementType=j,pe.typeOf=k}()),pe}var lu;function uu(){return lu||(lu=1,process.env.NODE_ENV==="production"?Mr.exports=J_():Mr.exports=X_()),Mr.exports}/*
|
|
160
|
+
object-assign
|
|
161
|
+
(c) Sindre Sorhus
|
|
162
|
+
@license MIT
|
|
163
|
+
*/var fs,cu;function Z_(){if(cu)return fs;cu=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var u=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return fs=i()?Object.assign:function(s,o){for(var a,u=r(s),c,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var d in a)t.call(a,d)&&(u[d]=a[d]);if(e){c=e(a);for(var p=0;p<c.length;p++)n.call(a,c[p])&&(u[c[p]]=a[c[p]])}}return u},fs}var ds,fu;function ps(){if(fu)return ds;fu=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ds=e,ds}var hs,du;function pu(){return du||(du=1,hs=Function.call.bind(Object.prototype.hasOwnProperty)),hs}var ms,hu;function Q_(){if(hu)return ms;hu=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ps(),n={},r=pu();e=function(s){var o="Warning: "+s;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(s,o,a,u,c){if(process.env.NODE_ENV!=="production"){for(var f in s)if(r(s,f)){var d;try{if(typeof s[f]!="function"){var p=Error((u||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=s[f](o,f,u,a,null,t)}catch(v){d=v}if(d&&!(d instanceof Error)&&e((u||"React class")+": type specification of "+a+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var y=c?c():"";e("Failed "+a+" type: "+d.message+(y??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ms=i,ms}var gs,mu;function eS(){if(mu)return gs;mu=1;var e=uu(),t=Z_(),n=ps(),r=pu(),i=Q_(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var u="Warning: "+a;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return gs=function(a,u){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(S){var A=S&&(c&&S[c]||S[f]);if(typeof A=="function")return A}var p="<<anonymous>>",y={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:O(),arrayOf:j,element:k(),elementType:E(),instanceOf:$,node:g(),objectOf:q,oneOf:z,oneOfType:Q,shape:B,exact:J};function v(S,A){return S===A?S!==0||1/S===1/A:S!==S&&A!==A}function h(S,A){this.message=S,this.data=A&&typeof A=="object"?A:{},this.stack=""}h.prototype=Error.prototype;function _(S){if(process.env.NODE_ENV!=="production")var A={},V=0;function W(G,X,ee,U,re,ne,$e){if(U=U||p,ne=ne||ee,$e!==n){if(u){var F=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw F.name="Invariant Violation",F}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ne=U+":"+ee;!A[Ne]&&V<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ne+"` prop on `"+U+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),A[Ne]=!0,V++)}}return X[ee]==null?G?X[ee]===null?new h("The "+re+" `"+ne+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new h("The "+re+" `"+ne+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:S(X,ee,U,re,ne)}var K=W.bind(null,!1);return K.isRequired=W.bind(null,!0),K}function w(S){function A(V,W,K,G,X,ee){var U=V[W],re=ge(U);if(re!==S){var ne=_e(U);return new h("Invalid "+G+" `"+X+"` of type "+("`"+ne+"` supplied to `"+K+"`, expected ")+("`"+S+"`."),{expectedType:S})}return null}return _(A)}function O(){return _(o)}function j(S){function A(V,W,K,G,X){if(typeof S!="function")return new h("Property `"+X+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var ee=V[W];if(!Array.isArray(ee)){var U=ge(ee);return new h("Invalid "+G+" `"+X+"` of type "+("`"+U+"` supplied to `"+K+"`, expected an array."))}for(var re=0;re<ee.length;re++){var ne=S(ee,re,K,G,X+"["+re+"]",n);if(ne instanceof Error)return ne}return null}return _(A)}function k(){function S(A,V,W,K,G){var X=A[V];if(!a(X)){var ee=ge(X);return new h("Invalid "+K+" `"+G+"` of type "+("`"+ee+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return _(S)}function E(){function S(A,V,W,K,G){var X=A[V];if(!e.isValidElementType(X)){var ee=ge(X);return new h("Invalid "+K+" `"+G+"` of type "+("`"+ee+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return _(S)}function $(S){function A(V,W,K,G,X){if(!(V[W]instanceof S)){var ee=S.name||p,U=H(V[W]);return new h("Invalid "+G+" `"+X+"` of type "+("`"+U+"` supplied to `"+K+"`, expected ")+("instance of `"+ee+"`."))}return null}return _(A)}function z(S){if(!Array.isArray(S))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),o;function A(V,W,K,G,X){for(var ee=V[W],U=0;U<S.length;U++)if(v(ee,S[U]))return null;var re=JSON.stringify(S,function($e,F){var Ne=_e(F);return Ne==="symbol"?String(F):F});return new h("Invalid "+G+" `"+X+"` of value `"+String(ee)+"` "+("supplied to `"+K+"`, expected one of "+re+"."))}return _(A)}function q(S){function A(V,W,K,G,X){if(typeof S!="function")return new h("Property `"+X+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var ee=V[W],U=ge(ee);if(U!=="object")return new h("Invalid "+G+" `"+X+"` of type "+("`"+U+"` supplied to `"+K+"`, expected an object."));for(var re in ee)if(r(ee,re)){var ne=S(ee,re,K,G,X+"."+re,n);if(ne instanceof Error)return ne}return null}return _(A)}function Q(S){if(!Array.isArray(S))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var A=0;A<S.length;A++){var V=S[A];if(typeof V!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+je(V)+" at index "+A+"."),o}function W(K,G,X,ee,U){for(var re=[],ne=0;ne<S.length;ne++){var $e=S[ne],F=$e(K,G,X,ee,U,n);if(F==null)return null;F.data&&r(F.data,"expectedType")&&re.push(F.data.expectedType)}var Ne=re.length>0?", expected one of type ["+re.join(", ")+"]":"";return new h("Invalid "+ee+" `"+U+"` supplied to "+("`"+X+"`"+Ne+"."))}return _(W)}function g(){function S(A,V,W,K,G){return te(A[V])?null:new h("Invalid "+K+" `"+G+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return _(S)}function P(S,A,V,W,K){return new h((S||"React class")+": "+A+" type `"+V+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function B(S){function A(V,W,K,G,X){var ee=V[W],U=ge(ee);if(U!=="object")return new h("Invalid "+G+" `"+X+"` of type `"+U+"` "+("supplied to `"+K+"`, expected `object`."));for(var re in S){var ne=S[re];if(typeof ne!="function")return P(K,G,X,re,_e(ne));var $e=ne(ee,re,K,G,X+"."+re,n);if($e)return $e}return null}return _(A)}function J(S){function A(V,W,K,G,X){var ee=V[W],U=ge(ee);if(U!=="object")return new h("Invalid "+G+" `"+X+"` of type `"+U+"` "+("supplied to `"+K+"`, expected `object`."));var re=t({},V[W],S);for(var ne in re){var $e=S[ne];if(r(S,ne)&&typeof $e!="function")return P(K,G,X,ne,_e($e));if(!$e)return new h("Invalid "+G+" `"+X+"` key `"+ne+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(V[W],null," ")+`
|
|
164
|
+
Valid keys: `+JSON.stringify(Object.keys(S),null," "));var F=$e(ee,ne,K,G,X+"."+ne,n);if(F)return F}return null}return _(A)}function te(S){switch(typeof S){case"number":case"string":case"undefined":return!0;case"boolean":return!S;case"object":if(Array.isArray(S))return S.every(te);if(S===null||a(S))return!0;var A=d(S);if(A){var V=A.call(S),W;if(A!==S.entries){for(;!(W=V.next()).done;)if(!te(W.value))return!1}else for(;!(W=V.next()).done;){var K=W.value;if(K&&!te(K[1]))return!1}}else return!1;return!0;default:return!1}}function me(S,A){return S==="symbol"?!0:A?A["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&A instanceof Symbol:!1}function ge(S){var A=typeof S;return Array.isArray(S)?"array":S instanceof RegExp?"object":me(A,S)?"symbol":A}function _e(S){if(typeof S>"u"||S===null)return""+S;var A=ge(S);if(A==="object"){if(S instanceof Date)return"date";if(S instanceof RegExp)return"regexp"}return A}function je(S){var A=_e(S);switch(A){case"array":case"object":return"an "+A;case"boolean":case"date":case"regexp":return"a "+A;default:return A}}function H(S){return!S.constructor||!S.constructor.name?p:S.constructor.name}return y.checkPropTypes=i,y.resetWarningCache=i.resetWarningCache,y.PropTypes=y,y},gs}var ys,gu;function tS(){if(gu)return ys;gu=1;var e=ps();function t(){}function n(){}return n.resetWarningCache=t,ys=function(){function r(o,a,u,c,f,d){if(d!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},ys}if(process.env.NODE_ENV!=="production"){var nS=uu(),rS=!0;cs.exports=eS()(nS.isElement,rS)}else cs.exports=tS()();var iS=cs.exports;const le=Et(iS);function Ot(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function yu(e,t=""){return e.displayName||e.name||t}function bu(e,t,n){const r=yu(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function sS(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return yu(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Dr.ForwardRef:return bu(e,e.render,"ForwardRef");case Dr.Memo:return bu(e,e.type,"memo");default:return}}}function Bt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Ot(7));return e.charAt(0).toUpperCase()+e.slice(1)}function bs(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]={...e[i],...n[i]};else if(i==="componentsProps"||i==="slotProps"){const s=e[i],o=t[i];if(!o)n[i]=s||{};else if(!s)n[i]=o;else{n[i]={...o};for(const a in s)if(Object.prototype.hasOwnProperty.call(s,a)){const u=a;n[i][u]=bs(s[u],o[u])}}}else n[i]===void 0&&(n[i]=e[i])}return n}function oS(e,t,n=void 0){const r={};for(const i in e){const s=e[i];let o="",a=!0;for(let u=0;u<s.length;u+=1){const c=s[u];c&&(o+=(a===!0?"":" ")+t(c),a=!1,n&&n[c]&&(o+=" "+n[c]))}r[i]=o}return r}const vu=e=>e,aS=(()=>{let e=vu;return{configure(t){e=t},generate(t){return e(t)},reset(){e=vu}}})(),lS={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function vs(e,t,n="Mui"){const r=lS[t];return r?`${n}-${r}`:`${aS.generate(e)}-${t}`}function uS(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=vs(e,i,n)}),r}function cS(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function xu(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=xu(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fS(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=xu(e))&&(r&&(r+=" "),r+=t);return r}function kn(e,t){return t?qe(e,t,{clone:!1}):e}const jt=process.env.NODE_ENV!=="production"?le.oneOfType([le.number,le.string,le.object,le.array]):{};function dS(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var o,a;const s=/min-width:\s*([0-9.]+)/;return+(((o=r.match(s))==null?void 0:o[1])||0)-+(((a=i.match(s))==null?void 0:a[1])||0)});return n.length?n.reduce((r,i)=>{const s=t[i];return delete r[i],r[i]=s,r},{...t}):t}function pS(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function hS(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
165
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Ot(18,`(${t})`));return null}const[,r,i]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(s)}function mS(e){const t=(s,o)=>s.replace("@media",o?`@container ${o}`:"@container");function n(s,o){s.up=(...a)=>t(e.breakpoints.up(...a),o),s.down=(...a)=>t(e.breakpoints.down(...a),o),s.between=(...a)=>t(e.breakpoints.between(...a),o),s.only=(...a)=>t(e.breakpoints.only(...a),o),s.not=(...a)=>{const u=t(e.breakpoints.not(...a),o);return u.includes("not all and")?u.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):u}}const r={},i=s=>(n(r,s),r);return n(i),{...e,containerQueries:i}}const Fr={xs:0,sm:600,md:900,lg:1200,xl:1536},Tu={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Fr[e]}px)`},gS={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Fr[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function gt(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||Tu;return t.reduce((o,a,u)=>(o[s.up(s.keys[u])]=n(t[u]),o),{})}if(typeof t=="object"){const s=r.breakpoints||Tu;return Object.keys(t).reduce((o,a)=>{if(pS(s.keys,a)){const u=hS(r.containerQueries?r:gS,a);u&&(o[u]=n(t[a],a))}else if(Object.keys(s.values||Fr).includes(a)){const u=s.up(a);o[u]=n(t[a],a)}else{const u=a;o[u]=t[u]}return o},{})}return n(t)}function yS(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const s=e.up(i);return r[s]={},r},{}))||{}}function bS(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Rr(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Nr(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Rr(e,n)||r,t&&(i=t(i,r,e)),i}function Oe(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,s=o=>{if(o[t]==null)return null;const a=o[t],u=o.theme,c=Rr(u,r)||{};return gt(o,a,d=>{let p=Nr(c,i,d);return d===p&&typeof d=="string"&&(p=Nr(c,i,`${t}${d==="default"?"":Bt(d)}`,d)),n===!1?p:{[n]:p}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:jt}:{},s.filterProps=[t],s}function vS(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const xS={m:"margin",p:"padding"},TS={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},_u={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},_S=vS(e=>{if(e.length>2)if(_u[e])e=_u[e];else return[e];const[t,n]=e.split(""),r=xS[t],i=TS[n]||"";return Array.isArray(i)?i.map(s=>r+s):[r+i]}),Lr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],zr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],SS=[...Lr,...zr];function In(e,t,n,r){const i=Rr(e,t,!0)??n;return typeof i=="number"||typeof i=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${s}.`),typeof i=="string"?`calc(${s} * ${i})`:i*s):Array.isArray(i)?s=>{if(typeof s=="string")return s;const o=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(o)?o>i.length-1&&console.error([`MUI: The value provided (${o}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${o} > ${i.length-1}, you need to add the missing values.`].join(`
|
|
166
166
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
167
167
|
`)));const a=i[o];return s>=0?a:typeof a=="number"?-a:`-${a}`}:typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
168
|
-
`)),()=>{})}function bs(e){return Mr(e,"spacing",8,"spacing")}function Fr(e,t){return typeof t=="string"||t==null?t:e(t)}function ES(e,t){return r=>e.reduce((n,i)=>(n[i]=Fr(t,r),n),{})}function CS(e,t,r,n){if(!t.includes(r))return null;const i=SS(r),s=ES(i,n),o=e[r];return ht(e,o,s)}function wu(e,t){const r=bs(e.theme);return Object.keys(e).map(n=>CS(e,t,n,r)).reduce(Dr,{})}function Ce(e){return wu(e,Ln)}Ce.propTypes=process.env.NODE_ENV!=="production"?Ln.reduce((e,t)=>(e[t]=Ot,e),{}):{},Ce.filterProps=Ln;function Ae(e){return wu(e,zn)}Ae.propTypes=process.env.NODE_ENV!=="production"?zn.reduce((e,t)=>(e[t]=Ot,e),{}):{},Ae.filterProps=zn,process.env.NODE_ENV!=="production"&&wS.reduce((e,t)=>(e[t]=Ot,e),{});function Bn(...e){const t=e.reduce((n,i)=>(i.filterProps.forEach(s=>{n[s]=i}),n),{}),r=n=>Object.keys(n).reduce((i,s)=>t[s]?Dr(i,t[s](n)):i,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,i)=>Object.assign(n,i.propTypes),{}):{},r.filterProps=e.reduce((n,i)=>n.concat(i.filterProps),[]),r}function Ze(e){return typeof e!="number"?e:`${e}px solid`}function Qe(e,t){return Oe({prop:e,themeKey:"borders",transform:t})}const AS=Qe("border",Ze),OS=Qe("borderTop",Ze),jS=Qe("borderRight",Ze),$S=Qe("borderBottom",Ze),PS=Qe("borderLeft",Ze),kS=Qe("borderColor"),IS=Qe("borderTopColor"),DS=Qe("borderRightColor"),MS=Qe("borderBottomColor"),FS=Qe("borderLeftColor"),RS=Qe("outline",Ze),NS=Qe("outlineColor"),Un=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Mr(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Fr(t,n)});return ht(e,e.borderRadius,r)}return null};Un.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Ot}:{},Un.filterProps=["borderRadius"],Bn(AS,OS,jS,$S,PS,kS,IS,DS,MS,FS,Un,RS,NS);const Vn=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Mr(e.theme,"spacing",8,"gap"),r=n=>({gap:Fr(t,n)});return ht(e,e.gap,r)}return null};Vn.propTypes=process.env.NODE_ENV!=="production"?{gap:Ot}:{},Vn.filterProps=["gap"];const Wn=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Mr(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Fr(t,n)});return ht(e,e.columnGap,r)}return null};Wn.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Ot}:{},Wn.filterProps=["columnGap"];const Gn=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Mr(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Fr(t,n)});return ht(e,e.rowGap,r)}return null};Gn.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Ot}:{},Gn.filterProps=["rowGap"];const LS=Oe({prop:"gridColumn"}),zS=Oe({prop:"gridRow"}),BS=Oe({prop:"gridAutoFlow"}),US=Oe({prop:"gridAutoColumns"}),VS=Oe({prop:"gridAutoRows"}),WS=Oe({prop:"gridTemplateColumns"}),GS=Oe({prop:"gridTemplateRows"}),HS=Oe({prop:"gridTemplateAreas"}),YS=Oe({prop:"gridArea"});Bn(Vn,Wn,Gn,LS,zS,BS,US,VS,WS,GS,HS,YS);function or(e,t){return t==="grey"?t:e}const qS=Oe({prop:"color",themeKey:"palette",transform:or}),KS=Oe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:or}),JS=Oe({prop:"backgroundColor",themeKey:"palette",transform:or});Bn(qS,KS,JS);function Ke(e){return e<=1&&e!==0?`${e*100}%`:e}const XS=Oe({prop:"width",transform:Ke}),vs=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,s,o,a,u;const n=((o=(s=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:s.values)==null?void 0:o[r])||Fn[r];return n?((u=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:u.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:Ke(r)}};return ht(e,e.maxWidth,t)}return null};vs.filterProps=["maxWidth"];const ZS=Oe({prop:"minWidth",transform:Ke}),QS=Oe({prop:"height",transform:Ke}),ew=Oe({prop:"maxHeight",transform:Ke}),tw=Oe({prop:"minHeight",transform:Ke});Oe({prop:"size",cssProperty:"width",transform:Ke}),Oe({prop:"size",cssProperty:"height",transform:Ke});const rw=Oe({prop:"boxSizing"});Bn(XS,vs,ZS,QS,ew,tw,rw);const Hn={border:{themeKey:"borders",transform:Ze},borderTop:{themeKey:"borders",transform:Ze},borderRight:{themeKey:"borders",transform:Ze},borderBottom:{themeKey:"borders",transform:Ze},borderLeft:{themeKey:"borders",transform:Ze},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ze},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Un},color:{themeKey:"palette",transform:or},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:or},backgroundColor:{themeKey:"palette",transform:or},p:{style:Ae},pt:{style:Ae},pr:{style:Ae},pb:{style:Ae},pl:{style:Ae},px:{style:Ae},py:{style:Ae},padding:{style:Ae},paddingTop:{style:Ae},paddingRight:{style:Ae},paddingBottom:{style:Ae},paddingLeft:{style:Ae},paddingX:{style:Ae},paddingY:{style:Ae},paddingInline:{style:Ae},paddingInlineStart:{style:Ae},paddingInlineEnd:{style:Ae},paddingBlock:{style:Ae},paddingBlockStart:{style:Ae},paddingBlockEnd:{style:Ae},m:{style:Ce},mt:{style:Ce},mr:{style:Ce},mb:{style:Ce},ml:{style:Ce},mx:{style:Ce},my:{style:Ce},margin:{style:Ce},marginTop:{style:Ce},marginRight:{style:Ce},marginBottom:{style:Ce},marginLeft:{style:Ce},marginX:{style:Ce},marginY:{style:Ce},marginInline:{style:Ce},marginInlineStart:{style:Ce},marginInlineEnd:{style:Ce},marginBlock:{style:Ce},marginBlockStart:{style:Ce},marginBlockEnd:{style:Ce},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Vn},rowGap:{style:Gn},columnGap:{style:Wn},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ke},maxWidth:{style:vs},minWidth:{transform:Ke},height:{transform:Ke},maxHeight:{transform:Ke},minHeight:{transform:Ke},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function nw(...e){const t=e.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function iw(e,t){return typeof e=="function"?e(t):e}function sw(){function e(r,n,i,s){const o={[r]:n,theme:i},a=s[r];if(!a)return{[r]:n};const{cssProperty:u=r,themeKey:c,transform:f,style:d}=a;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const p=Rn(i,c)||{};return d?d(o):ht(o,n,v=>{let h=Nn(p,f,v);return v===h&&typeof v=="string"&&(h=Nn(p,f,`${r}${v==="default"?"":Ut(v)}`,v)),u===!1?h:{[u]:h}})}function t(r){const{sx:n,theme:i={}}=r||{};if(!n)return null;const s=i.unstable_sxConfig??Hn;function o(a){let u=a;if(typeof a=="function")u=a(i);else if(typeof a!="object")return a;if(!u)return null;const c=bS(i.breakpoints),f=Object.keys(c);let d=c;return Object.keys(u).forEach(p=>{const y=iw(u[p],i);if(y!=null)if(typeof y=="object")if(s[p])d=Dr(d,e(p,y,i,s));else{const v=ht({theme:i},y,h=>({[p]:h}));nw(v,y)?d[p]=t({sx:y,theme:i}):d=Dr(d,v)}else d=Dr(d,e(p,y,i,s))}),pS(i,vS(f,d))}return Array.isArray(n)?n.map(o):o(n)}return t}const ar=sw();ar.filterProps=["sx"];function xs(){return xs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xs.apply(null,arguments)}function ow(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var aw={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Eu(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var lw=!1,uw=/[A-Z]|^ms/g,cw=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Cu=function(t){return t.charCodeAt(1)===45},Au=function(t){return t!=null&&typeof t!="boolean"},Ts=Eu(function(e){return Cu(e)?e:e.replace(uw,"-$&").toLowerCase()}),Ou=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(cw,function(n,i,s){return lt={name:i,styles:s,next:lt},i})}return aw[t]!==1&&!Cu(t)&&typeof r=="number"&&r!==0?r+"px":r},fw="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Rr(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return lt={name:i.name,styles:i.styles,next:lt},i.name;var s=r;if(s.styles!==void 0){var o=s.next;if(o!==void 0)for(;o!==void 0;)lt={name:o.name,styles:o.styles,next:lt},o=o.next;var a=s.styles+";";return a}return dw(e,t,r)}case"function":{if(e!==void 0){var u=lt,c=r(e);return lt=u,Rr(e,t,c)}break}}var f=r;if(t==null)return f;var d=t[f];return d!==void 0?d:f}function dw(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Rr(e,t,r[i])+";";else for(var s in r){var o=r[s];if(typeof o!="object"){var a=o;t!=null&&t[a]!==void 0?n+=s+"{"+t[a]+"}":Au(a)&&(n+=Ts(s)+":"+Ou(s,a)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&lw)throw new Error(fw);if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var u=0;u<o.length;u++)Au(o[u])&&(n+=Ts(s)+":"+Ou(s,o[u])+";");else{var c=Rr(e,t,o);switch(s){case"animation":case"animationName":{n+=Ts(s)+":"+c+";";break}default:n+=s+"{"+c+"}"}}}}return n}var ju=/label:\s*([^\s;{]+)\s*(;|$)/g,lt;function $u(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";lt=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,i+=Rr(r,t,s);else{var o=s;i+=o[0]}for(var a=1;a<e.length;a++)if(i+=Rr(r,t,e[a]),n){var u=s;i+=u[a]}ju.lastIndex=0;for(var c="",f;(f=ju.exec(i))!==null;)c+="-"+f[1];var d=ow(i)+c;return{name:d,styles:i,next:lt}}var pw=function(t){return t()},hw=Le.useInsertionEffect?Le.useInsertionEffect:!1,mw=hw||pw,gw=!0;function yw(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}var Pu=function(t,r,n){var i=t.key+"-"+r.name;(n===!1||gw===!1)&&t.registered[i]===void 0&&(t.registered[i]=r.styles)},bw=function(t,r,n){Pu(t,r,n);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var s=r;do t.insert(r===s?"."+i:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}},vw=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,xw=Eu(function(e){return vw.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Tw=!1,_w=xw,Sw=function(t){return t!=="theme"},ku=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?_w:Sw},Iu=function(t,r,n){var i;if(r){var s=r.shouldForwardProp;i=t.__emotion_forwardProp&&s?function(o){return t.__emotion_forwardProp(o)&&s(o)}:s}return typeof i!="function"&&n&&(i=t.__emotion_forwardProp),i},ww=function(t){var r=t.cache,n=t.serialized,i=t.isStringTag;return Pu(r,n,i),mw(function(){return bw(r,n,i)}),null},Ew=function e(t,r){var n=t.__emotion_real===t,i=n&&t.__emotion_base||t,s,o;r!==void 0&&(s=r.label,o=r.target);var a=Iu(t,r,n),u=a||ku(i),c=!u("as");return function(){var f=arguments,d=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&d.push("label:"+s+";"),f[0]==null||f[0].raw===void 0)d.push.apply(d,f);else{var p=f[0];d.push(p[0]);for(var y=f.length,v=1;v<y;v++)d.push(f[v],p[v])}var h=zs.withEmotionCache(function(_,w,O){var j=c&&_.as||i,k="",E=[],$=_;if(_.theme==null){$={};for(var z in _)$[z]=_[z];$.theme=Le.useContext(zs.ThemeContext)}typeof _.className=="string"?k=yw(w.registered,E,_.className):_.className!=null&&(k=_.className+" ");var q=$u(d.concat(E),w.registered,$);k+=w.key+"-"+q.name,o!==void 0&&(k+=" "+o);var Q=c&&a===void 0?ku(j):u,g={};for(var P in _)c&&P==="as"||Q(P)&&(g[P]=_[P]);return g.className=k,O&&(g.ref=O),Le.createElement(Le.Fragment,null,Le.createElement(ww,{cache:w,serialized:q,isStringTag:typeof j=="string"}),Le.createElement(j,g))});return h.displayName=s!==void 0?s:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=i,h.__emotion_styles=d,h.__emotion_forwardProp=a,Object.defineProperty(h,"toString",{value:function(){return o===void 0&&Tw?"NO_COMPONENT_SELECTOR":"."+o}}),h.withComponent=function(_,w){var O=e(_,xs({},r,w,{shouldForwardProp:Iu(h,w,!0)}));return O.apply(void 0,d)},h}},Cw=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],_s=Ew.bind(null);Cw.forEach(function(e){_s[e]=_s(e)});/**
|
|
169
|
-
* @mui/styled-engine v6.
|
|
168
|
+
`)),()=>{})}function xs(e){return In(e,"spacing",8,"spacing")}function Dn(e,t){return typeof t=="string"||t==null?t:e(t)}function wS(e,t){return n=>e.reduce((r,i)=>(r[i]=Dn(t,n),r),{})}function ES(e,t,n,r){if(!t.includes(n))return null;const i=_S(n),s=wS(i,r),o=e[n];return gt(e,o,s)}function Su(e,t){const n=xs(e.theme);return Object.keys(e).map(r=>ES(e,t,r,n)).reduce(kn,{})}function Ce(e){return Su(e,Lr)}Ce.propTypes=process.env.NODE_ENV!=="production"?Lr.reduce((e,t)=>(e[t]=jt,e),{}):{},Ce.filterProps=Lr;function Ae(e){return Su(e,zr)}Ae.propTypes=process.env.NODE_ENV!=="production"?zr.reduce((e,t)=>(e[t]=jt,e),{}):{},Ae.filterProps=zr,process.env.NODE_ENV!=="production"&&SS.reduce((e,t)=>(e[t]=jt,e),{});function Br(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(s=>{r[s]=i}),r),{}),n=r=>Object.keys(r).reduce((i,s)=>t[s]?kn(i,t[s](r)):i,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,i)=>Object.assign(r,i.propTypes),{}):{},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Xe(e){return typeof e!="number"?e:`${e}px solid`}function Ze(e,t){return Oe({prop:e,themeKey:"borders",transform:t})}const CS=Ze("border",Xe),AS=Ze("borderTop",Xe),OS=Ze("borderRight",Xe),jS=Ze("borderBottom",Xe),$S=Ze("borderLeft",Xe),PS=Ze("borderColor"),kS=Ze("borderTopColor"),IS=Ze("borderRightColor"),DS=Ze("borderBottomColor"),MS=Ze("borderLeftColor"),FS=Ze("outline",Xe),RS=Ze("outlineColor"),Ur=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=In(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Dn(t,r)});return gt(e,e.borderRadius,n)}return null};Ur.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:jt}:{},Ur.filterProps=["borderRadius"],Br(CS,AS,OS,jS,$S,PS,kS,IS,DS,MS,Ur,FS,RS);const Vr=e=>{if(e.gap!==void 0&&e.gap!==null){const t=In(e.theme,"spacing",8,"gap"),n=r=>({gap:Dn(t,r)});return gt(e,e.gap,n)}return null};Vr.propTypes=process.env.NODE_ENV!=="production"?{gap:jt}:{},Vr.filterProps=["gap"];const Wr=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=In(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Dn(t,r)});return gt(e,e.columnGap,n)}return null};Wr.propTypes=process.env.NODE_ENV!=="production"?{columnGap:jt}:{},Wr.filterProps=["columnGap"];const Gr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=In(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Dn(t,r)});return gt(e,e.rowGap,n)}return null};Gr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:jt}:{},Gr.filterProps=["rowGap"];const NS=Oe({prop:"gridColumn"}),LS=Oe({prop:"gridRow"}),zS=Oe({prop:"gridAutoFlow"}),BS=Oe({prop:"gridAutoColumns"}),US=Oe({prop:"gridAutoRows"}),VS=Oe({prop:"gridTemplateColumns"}),WS=Oe({prop:"gridTemplateRows"}),GS=Oe({prop:"gridTemplateAreas"}),HS=Oe({prop:"gridArea"});Br(Vr,Wr,Gr,NS,LS,zS,BS,US,VS,WS,GS,HS);function on(e,t){return t==="grey"?t:e}const YS=Oe({prop:"color",themeKey:"palette",transform:on}),qS=Oe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:on}),KS=Oe({prop:"backgroundColor",themeKey:"palette",transform:on});Br(YS,qS,KS);function Ke(e){return e<=1&&e!==0?`${e*100}%`:e}const JS=Oe({prop:"width",transform:Ke}),Ts=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,s,o,a,u;const r=((o=(s=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:s.values)==null?void 0:o[n])||Fr[n];return r?((u=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:u.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Ke(n)}};return gt(e,e.maxWidth,t)}return null};Ts.filterProps=["maxWidth"];const XS=Oe({prop:"minWidth",transform:Ke}),ZS=Oe({prop:"height",transform:Ke}),QS=Oe({prop:"maxHeight",transform:Ke}),ew=Oe({prop:"minHeight",transform:Ke});Oe({prop:"size",cssProperty:"width",transform:Ke}),Oe({prop:"size",cssProperty:"height",transform:Ke});const tw=Oe({prop:"boxSizing"});Br(JS,Ts,XS,ZS,QS,ew,tw);const Hr={border:{themeKey:"borders",transform:Xe},borderTop:{themeKey:"borders",transform:Xe},borderRight:{themeKey:"borders",transform:Xe},borderBottom:{themeKey:"borders",transform:Xe},borderLeft:{themeKey:"borders",transform:Xe},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Xe},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ur},color:{themeKey:"palette",transform:on},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:on},backgroundColor:{themeKey:"palette",transform:on},p:{style:Ae},pt:{style:Ae},pr:{style:Ae},pb:{style:Ae},pl:{style:Ae},px:{style:Ae},py:{style:Ae},padding:{style:Ae},paddingTop:{style:Ae},paddingRight:{style:Ae},paddingBottom:{style:Ae},paddingLeft:{style:Ae},paddingX:{style:Ae},paddingY:{style:Ae},paddingInline:{style:Ae},paddingInlineStart:{style:Ae},paddingInlineEnd:{style:Ae},paddingBlock:{style:Ae},paddingBlockStart:{style:Ae},paddingBlockEnd:{style:Ae},m:{style:Ce},mt:{style:Ce},mr:{style:Ce},mb:{style:Ce},ml:{style:Ce},mx:{style:Ce},my:{style:Ce},margin:{style:Ce},marginTop:{style:Ce},marginRight:{style:Ce},marginBottom:{style:Ce},marginLeft:{style:Ce},marginX:{style:Ce},marginY:{style:Ce},marginInline:{style:Ce},marginInlineStart:{style:Ce},marginInlineEnd:{style:Ce},marginBlock:{style:Ce},marginBlockStart:{style:Ce},marginBlockEnd:{style:Ce},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Vr},rowGap:{style:Gr},columnGap:{style:Wr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ke},maxWidth:{style:Ts},minWidth:{transform:Ke},height:{transform:Ke},maxHeight:{transform:Ke},minHeight:{transform:Ke},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function nw(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function rw(e,t){return typeof e=="function"?e(t):e}function iw(){function e(n,r,i,s){const o={[n]:r,theme:i},a=s[n];if(!a)return{[n]:r};const{cssProperty:u=n,themeKey:c,transform:f,style:d}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const p=Rr(i,c)||{};return d?d(o):gt(o,r,v=>{let h=Nr(p,f,v);return v===h&&typeof v=="string"&&(h=Nr(p,f,`${n}${v==="default"?"":Bt(v)}`,v)),u===!1?h:{[u]:h}})}function t(n){const{sx:r,theme:i={}}=n||{};if(!r)return null;const s=i.unstable_sxConfig??Hr;function o(a){let u=a;if(typeof a=="function")u=a(i);else if(typeof a!="object")return a;if(!u)return null;const c=yS(i.breakpoints),f=Object.keys(c);let d=c;return Object.keys(u).forEach(p=>{const y=rw(u[p],i);if(y!=null)if(typeof y=="object")if(s[p])d=kn(d,e(p,y,i,s));else{const v=gt({theme:i},y,h=>({[p]:h}));nw(v,y)?d[p]=t({sx:y,theme:i}):d=kn(d,v)}else d=kn(d,e(p,y,i,s))}),dS(i,bS(f,d))}return Array.isArray(r)?r.map(o):o(r)}return t}const an=iw();an.filterProps=["sx"];function _s(){return _s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_s.apply(null,arguments)}function sw(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var ow={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function wu(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var aw=/[A-Z]|^ms/g,lw=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Eu=function(t){return t.charCodeAt(1)===45},Cu=function(t){return t!=null&&typeof t!="boolean"},Ss=wu(function(e){return Eu(e)?e:e.replace(aw,"-$&").toLowerCase()}),Au=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(lw,function(r,i,s){return ct={name:i,styles:s,next:ct},i})}return ow[t]!==1&&!Eu(t)&&typeof n=="number"&&n!==0?n+"px":n};function Mn(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return ct={name:i.name,styles:i.styles,next:ct},i.name;var s=n;if(s.styles!==void 0){var o=s.next;if(o!==void 0)for(;o!==void 0;)ct={name:o.name,styles:o.styles,next:ct},o=o.next;var a=s.styles+";";return a}return uw(e,t,n)}case"function":{if(e!==void 0){var u=ct,c=n(e);return ct=u,Mn(e,t,c)}break}}var f=n;if(t==null)return f;var d=t[f];return d!==void 0?d:f}function uw(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Mn(e,t,n[i])+";";else for(var s in n){var o=n[s];if(typeof o!="object"){var a=o;t!=null&&t[a]!==void 0?r+=s+"{"+t[a]+"}":Cu(a)&&(r+=Ss(s)+":"+Au(s,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var u=0;u<o.length;u++)Cu(o[u])&&(r+=Ss(s)+":"+Au(s,o[u])+";");else{var c=Mn(e,t,o);switch(s){case"animation":case"animationName":{r+=Ss(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var Ou=/label:\s*([^\s;{]+)\s*(;|$)/g,ct;function ju(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";ct=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,i+=Mn(n,t,s);else{var o=s;i+=o[0]}for(var a=1;a<e.length;a++)if(i+=Mn(n,t,e[a]),r){var u=s;i+=u[a]}Ou.lastIndex=0;for(var c="",f;(f=Ou.exec(i))!==null;)c+="-"+f[1];var d=sw(i)+c;return{name:d,styles:i,next:ct}}var cw=function(t){return t()},fw=Le.useInsertionEffect?Le.useInsertionEffect:!1,dw=fw||cw,pw=!0;function hw(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var $u=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||pw===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},mw=function(t,n,r){$u(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+i:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}},gw=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,yw=wu(function(e){return gw.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),bw=yw,vw=function(t){return t!=="theme"},Pu=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?bw:vw},ku=function(t,n,r){var i;if(n){var s=n.shouldForwardProp;i=t.__emotion_forwardProp&&s?function(o){return t.__emotion_forwardProp(o)&&s(o)}:s}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},xw=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return $u(n,r,i),dw(function(){return mw(n,r,i)}),null},Tw=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,s,o;n!==void 0&&(s=n.label,o=n.target);var a=ku(t,n,r),u=a||Pu(i),c=!u("as");return function(){var f=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&d.push("label:"+s+";"),f[0]==null||f[0].raw===void 0)d.push.apply(d,f);else{var p=f[0];d.push(p[0]);for(var y=f.length,v=1;v<y;v++)d.push(f[v],p[v])}var h=Bs.withEmotionCache(function(_,w,O){var j=c&&_.as||i,k="",E=[],$=_;if(_.theme==null){$={};for(var z in _)$[z]=_[z];$.theme=Le.useContext(Bs.ThemeContext)}typeof _.className=="string"?k=hw(w.registered,E,_.className):_.className!=null&&(k=_.className+" ");var q=ju(d.concat(E),w.registered,$);k+=w.key+"-"+q.name,o!==void 0&&(k+=" "+o);var Q=c&&a===void 0?Pu(j):u,g={};for(var P in _)c&&P==="as"||Q(P)&&(g[P]=_[P]);return g.className=k,O&&(g.ref=O),Le.createElement(Le.Fragment,null,Le.createElement(xw,{cache:w,serialized:q,isStringTag:typeof j=="string"}),Le.createElement(j,g))});return h.displayName=s!==void 0?s:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=i,h.__emotion_styles=d,h.__emotion_forwardProp=a,Object.defineProperty(h,"toString",{value:function(){return"."+o}}),h.withComponent=function(_,w){var O=e(_,_s({},n,w,{shouldForwardProp:ku(h,w,!0)}));return O.apply(void 0,d)},h}},_w=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],ws=Tw.bind(null);_w.forEach(function(e){ws[e]=ws(e)});/**
|
|
169
|
+
* @mui/styled-engine v6.4.0
|
|
170
170
|
*
|
|
171
171
|
* @license MIT
|
|
172
172
|
* This source code is licensed under the MIT license found in the
|
|
173
173
|
* LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/function
|
|
175
|
-
`)):
|
|
176
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:
|
|
177
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:
|
|
174
|
+
*/function Sw(e,t){const n=ws(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const i=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
175
|
+
`)):r.some(s=>s===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),n(...r)}:n}function ww(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Iu=[];function Du(e){return Iu[0]=e,ju(Iu)}const Ew=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function Cw(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,s=Ew(t),o=Object.keys(s);function a(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function u(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function c(p,y){const v=o.indexOf(y);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(v!==-1&&typeof t[o[v]]=="number"?t[o[v]]:y)-r/100}${n})`}function f(p){return o.indexOf(p)+1<o.length?c(p,o[o.indexOf(p)+1]):a(p)}function d(p){const y=o.indexOf(p);return y===0?a(o[1]):y===o.length-1?u(o[y]):c(p,o[o.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:o,values:s,up:a,down:u,between:c,only:f,not:d,unit:n,...i}}const Aw={borderRadius:4};function Mu(e=8,t=xs({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(s=>{const o=t(s);return typeof o=="number"?`${o}px`:o}).join(" "));return n.mui=!0,n}function Ow(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let i=n.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return n.palette.mode===e?t:{}}function Fu(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:s={},...o}=e,a=Cw(n),u=Mu(i);let c=qe({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:u,shape:{...Aw,...s}},o);return c=mS(c),c.applyStyles=Ow,c=t.reduce((f,d)=>qe(f,d),c),c.unstable_sxConfig={...Hr,...o==null?void 0:o.unstable_sxConfig},c.unstable_sx=function(d){return an({sx:d,theme:this})},c}function Ru(e){const{variants:t,...n}=e,r={variants:t,style:Du(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=Du(i.style))}),r}const jw=Fu();function Es(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function $w(e){return e?(t,n)=>n[e]:null}function Pw(e,t,n){e.theme=Mw(e.theme)?n:e.theme[t]||e.theme}function Yr(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>Yr(e,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:i,...s}=n;r=s}return Nu(e,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function Nu(e,t,n=[]){var i;let r;e:for(let s=0;s<t.length;s+=1){const o=t[s];if(typeof o.props=="function"){if(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),!o.props(r))continue}else for(const a in o.props)if(e[a]!==o.props[a]&&((i=e.ownerState)==null?void 0:i[a])!==o.props[a])continue e;typeof o.style=="function"?(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),n.push(o.style(r))):n.push(o.style)}return n}function kw(e={}){const{themeId:t,defaultTheme:n=jw,rootShouldForwardProp:r=Es,slotShouldForwardProp:i=Es}=e;function s(a){Pw(a,t,n)}return(a,u={})=>{ww(a,E=>E.filter($=>$!==an));const{name:c,slot:f,skipVariantsResolver:d,skipSx:p,overridesResolver:y=$w(Lu(f)),...v}=u,h=d!==void 0?d:f&&f!=="Root"&&f!=="root"||!1,_=p||!1;let w=Es;f==="Root"||f==="root"?w=r:f?w=i:Fw(a)&&(w=void 0);const O=Sw(a,{shouldForwardProp:w,label:Dw(c,f),...v}),j=E=>{if(typeof E=="function"&&E.__emotion_real!==E)return function(z){return Yr(z,E)};if(mt(E)){const $=Ru(E);return $.variants?function(q){return Yr(q,$)}:$.style}return E},k=(...E)=>{const $=[],z=E.map(j),q=[];if($.push(s),c&&y&&q.push(function(B){var ge,_e;const te=(_e=(ge=B.theme.components)==null?void 0:ge[c])==null?void 0:_e.styleOverrides;if(!te)return null;const me={};for(const je in te)me[je]=Yr(B,te[je]);return y(B,me)}),c&&!h&&q.push(function(B){var me,ge;const J=B.theme,te=(ge=(me=J==null?void 0:J.components)==null?void 0:me[c])==null?void 0:ge.variants;return te?Nu(B,te):null}),_||q.push(an),Array.isArray(z[0])){const P=z.shift(),B=new Array($.length).fill(""),J=new Array(q.length).fill("");let te;te=[...B,...P,...J],te.raw=[...B,...P.raw,...J],$.unshift(te)}const Q=[...$,...z,...q],g=O(...Q);return a.muiName&&(g.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(g.displayName=Iw(c,f,a)),g};return O.withConfig&&(k.withConfig=O.withConfig),k}}function Iw(e,t,n){return e?`${e}${Bt(t||"")}`:`Styled(${sS(n)})`}function Dw(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Lu(t||"Root")}`),n}function Mw(e){for(const t in e)return!1;return!0}function Fw(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Lu(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Cs(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),cS(e,t,n)}function Rw(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function $t(e){if(e.type)return e;if(e.charAt(0)==="#")return $t(Rw(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
176
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Ot(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
|
|
177
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Ot(10,i))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:i}}const Nw=e=>{const t=$t(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Fn=(e,t)=>{try{return Nw(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function qr(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,s)=>s<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function zu(e){e=$t(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),o=(c,f=(c+n/30)%12)=>i-s*Math.max(Math.min(f-3,9-f,1),-1);let a="rgb";const u=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(a+="a",u.push(t[3])),qr({type:a,values:u})}function As(e){e=$t(e);let t=e.type==="hsl"||e.type==="hsla"?$t(zu(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Bu(e,t){const n=As(e),r=As(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Lw(e,t){return e=$t(e),t=Cs(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,qr(e)}function Kr(e,t,n){try{return Lw(e,t)}catch{return e}}function Os(e,t){if(e=$t(e),t=Cs(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return qr(e)}function ve(e,t,n){try{return Os(e,t)}catch{return e}}function js(e,t){if(e=$t(e),t=Cs(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return qr(e)}function xe(e,t,n){try{return js(e,t)}catch{return e}}function zw(e,t=.15){return As(e)>.5?Os(e,t):js(e,t)}function Jr(e,t,n){try{return zw(e,t)}catch{return e}}const Bw=Le.createContext(void 0);process.env.NODE_ENV!=="production"&&(le.node,le.object);function Uw(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?bs(i.defaultProps,r):!i.styleOverrides&&!i.variants?bs(i,r):r}function Vw({props:e,name:t}){const n=Le.useContext(Bw);return Uw({props:e,name:t,theme:{components:n}})}const Uu={theme:void 0};function Ww(e){let t,n;return function(i){let s=t;return(s===void 0||i.theme!==n)&&(Uu.theme=i.theme,s=Ru(e(Uu)),t=s,n=i.theme),s}}function Gw(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const Vu=(e,t,n,r=[])=>{let i=e;t.forEach((s,o)=>{o===t.length-1?Array.isArray(i)?i[Number(s)]=n:i&&typeof i=="object"&&(i[s]=n):i&&typeof i=="object"&&(i[s]||(i[s]=r.includes(s)?[]:{}),i=i[s])})},Hw=(e,t,n)=>{function r(i,s=[],o=[]){Object.entries(i).forEach(([a,u])=>{(!n||!n([...s,a]))&&u!=null&&(typeof u=="object"&&Object.keys(u).length>0?r(u,[...s,a],Array.isArray(u)?[...o,a]:o):t([...s,a],u,o))})}r(e)},Yw=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function $s(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},s={},o={};return Hw(e,(a,u,c)=>{if((typeof u=="string"||typeof u=="number")&&(!r||!r(a,u))){const f=`--${n?`${n}-`:""}${a.join("-")}`,d=Yw(a,u);Object.assign(i,{[f]:d}),Vu(s,a,`var(${f})`,c),Vu(o,a,`var(${f}, ${d})`,c)}},a=>a[0]==="vars"),{css:i,vars:s,varsWithDefaults:o}}function qw(e,t={}){const{getSelector:n=_,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:s={},components:o,defaultColorScheme:a="light",...u}=e,{vars:c,css:f,varsWithDefaults:d}=$s(u,t);let p=d;const y={},{[a]:v,...h}=s;if(Object.entries(h||{}).forEach(([j,k])=>{const{vars:E,css:$,varsWithDefaults:z}=$s(k,t);p=qe(p,z),y[j]={css:$,vars:E}}),v){const{css:j,vars:k,varsWithDefaults:E}=$s(v,t);p=qe(p,E),y[a]={css:j,vars:k}}function _(j,k){var $,z;let E=i;if(i==="class"&&(E=".%s"),i==="data"&&(E="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(E=`[${i}="%s"]`),j){if(E==="media")return e.defaultColorScheme===j?":root":{[`@media (prefers-color-scheme: ${((z=($=s[j])==null?void 0:$.palette)==null?void 0:z.mode)||j})`]:{":root":k}};if(E)return e.defaultColorScheme===j?`:root, ${E.replace("%s",String(j))}`:E.replace("%s",String(j))}return":root"}return{vars:p,generateThemeVars:()=>{let j={...c};return Object.entries(y).forEach(([,{vars:k}])=>{j=qe(j,k)}),j},generateStyleSheets:()=>{var q,Q;const j=[],k=e.defaultColorScheme||"light";function E(g,P){Object.keys(P).length&&j.push(typeof g=="string"?{[g]:{...P}}:g)}E(n(void 0,{...f}),f);const{[k]:$,...z}=y;if($){const{css:g}=$,P=(Q=(q=s[k])==null?void 0:q.palette)==null?void 0:Q.mode,B=!r&&P?{colorScheme:P,...g}:{...g};E(n(k,{...B}),B)}return Object.entries(z).forEach(([g,{css:P}])=>{var te,me;const B=(me=(te=s[g])==null?void 0:te.palette)==null?void 0:me.mode,J=!r&&B?{colorScheme:B,...P}:{...P};E(n(g,{...J}),J)}),j}}}function Kw(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Rn={black:"#000",white:"#fff"},Jw={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},ln={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},un={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Nn={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},cn={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},fn={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},dn={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function Wu(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Rn.white,default:Rn.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Xw=Wu();function Gu(){return{text:{primary:Rn.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Rn.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Hu=Gu();function Yu(e,t,n,r){const i=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=js(e.main,i):t==="dark"&&(e.dark=Os(e.main,s)))}function Zw(e="light"){return e==="dark"?{main:cn[200],light:cn[50],dark:cn[400]}:{main:cn[700],light:cn[400],dark:cn[800]}}function Qw(e="light"){return e==="dark"?{main:ln[200],light:ln[50],dark:ln[400]}:{main:ln[500],light:ln[300],dark:ln[700]}}function eE(e="light"){return e==="dark"?{main:un[500],light:un[300],dark:un[700]}:{main:un[700],light:un[400],dark:un[800]}}function tE(e="light"){return e==="dark"?{main:fn[400],light:fn[300],dark:fn[700]}:{main:fn[700],light:fn[500],dark:fn[900]}}function nE(e="light"){return e==="dark"?{main:dn[400],light:dn[300],dark:dn[700]}:{main:dn[800],light:dn[500],dark:dn[900]}}function rE(e="light"){return e==="dark"?{main:Nn[400],light:Nn[300],dark:Nn[700]}:{main:"#ed6c02",light:Nn[500],dark:Nn[900]}}function Ps(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...i}=e,s=e.primary||Zw(t),o=e.secondary||Qw(t),a=e.error||eE(t),u=e.info||tE(t),c=e.success||nE(t),f=e.warning||rE(t);function d(h){const _=Bu(h,Hu.text.primary)>=n?Hu.text.primary:Xw.text.primary;if(process.env.NODE_ENV!=="production"){const w=Bu(h,_);w<3&&console.error([`MUI: The contrast ratio of ${w}:1 for ${_} on ${h}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
178
178
|
`))}return _}const p=({color:h,name:_,mainShade:w=500,lightShade:O=300,darkShade:j=700})=>{if(h={...h},!h.main&&h[w]&&(h.main=h[w]),!h.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${_?` (${_})`:""} provided to augmentColor(color) is invalid.
|
|
179
|
-
The color object needs to have a \`main\` property or a \`${w}\` property.`:
|
|
179
|
+
The color object needs to have a \`main\` property or a \`${w}\` property.`:Ot(11,_?` (${_})`:"",w));if(typeof h.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${_?` (${_})`:""} provided to augmentColor(color) is invalid.
|
|
180
180
|
\`color.main\` should be a string, but \`${JSON.stringify(h.main)}\` was provided instead.
|
|
181
181
|
|
|
182
182
|
Did you intend to use one of the following approaches?
|
|
@@ -189,15 +189,15 @@ const theme1 = createTheme({ palette: {
|
|
|
189
189
|
|
|
190
190
|
const theme2 = createTheme({ palette: {
|
|
191
191
|
primary: { main: green[500] },
|
|
192
|
-
} });`:
|
|
193
|
-
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof o=="string"?o:
|
|
192
|
+
} });`:Ot(12,_?` (${_})`:"",JSON.stringify(h.main)));return Yu(h,"light",O,r),Yu(h,"dark",j,r),h.contrastText||(h.contrastText=d(h.main)),h};let y;return t==="light"?y=Wu():t==="dark"&&(y=Gu()),process.env.NODE_ENV!=="production"&&(y||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),qe({common:{...Rn},mode:t,primary:p({color:s,name:"primary"}),secondary:p({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:a,name:"error"}),warning:p({color:f,name:"warning"}),info:p({color:u,name:"info"}),success:p({color:c,name:"success"}),grey:Jw,contrastThreshold:n,getContrastText:d,augmentColor:p,tonalOffset:r,...y},i)}function iE(e){const t={};return Object.entries(e).forEach(r=>{const[i,s]=r;typeof s=="object"&&(t[i]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function sE(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function oE(e){return Math.round(e*1e5)/1e5}const qu={textTransform:"uppercase"},Ku='"Roboto", "Helvetica", "Arial", sans-serif';function aE(e,t){const{fontFamily:n=Ku,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:o=500,fontWeightBold:a=700,htmlFontSize:u=16,allVariants:c,pxToRem:f,...d}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof u!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=r/14,y=f||(_=>`${_/u*p}rem`),v=(_,w,O,j,k)=>({fontFamily:n,fontWeight:_,fontSize:y(w),lineHeight:O,...n===Ku?{letterSpacing:`${oE(j/w)}em`}:{},...k,...c}),h={h1:v(i,96,1.167,-1.5),h2:v(i,60,1.2,-.5),h3:v(s,48,1.167,0),h4:v(s,34,1.235,.25),h5:v(s,24,1.334,0),h6:v(o,20,1.6,.15),subtitle1:v(s,16,1.75,.15),subtitle2:v(o,14,1.57,.1),body1:v(s,16,1.5,.15),body2:v(s,14,1.43,.15),button:v(o,14,1.75,.4,qu),caption:v(s,12,1.66,.4),overline:v(s,12,2.66,1,qu),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return qe({htmlFontSize:u,pxToRem:y,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:o,fontWeightBold:a,...h},d,{clone:!1})}const lE=.2,uE=.14,cE=.12;function we(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${lE})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${uE})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${cE})`].join(",")}const fE=["none",we(0,2,1,-1,0,1,1,0,0,1,3,0),we(0,3,1,-2,0,2,2,0,0,1,5,0),we(0,3,3,-2,0,3,4,0,0,1,8,0),we(0,2,4,-1,0,4,5,0,0,1,10,0),we(0,3,5,-1,0,5,8,0,0,1,14,0),we(0,3,5,-1,0,6,10,0,0,1,18,0),we(0,4,5,-2,0,7,10,1,0,2,16,1),we(0,5,5,-3,0,8,10,1,0,3,14,2),we(0,5,6,-3,0,9,12,1,0,3,16,2),we(0,6,6,-3,0,10,14,1,0,4,18,3),we(0,6,7,-4,0,11,15,1,0,4,20,3),we(0,7,8,-4,0,12,17,2,0,5,22,4),we(0,7,8,-4,0,13,19,2,0,5,24,4),we(0,7,9,-4,0,14,21,2,0,5,26,4),we(0,8,9,-5,0,15,22,2,0,6,28,5),we(0,8,10,-5,0,16,24,2,0,6,30,5),we(0,8,11,-5,0,17,26,2,0,6,32,5),we(0,9,11,-5,0,18,28,2,0,7,34,6),we(0,9,12,-6,0,19,29,2,0,7,36,6),we(0,10,13,-6,0,20,31,3,0,8,38,7),we(0,10,13,-6,0,21,33,3,0,8,40,7),we(0,10,14,-6,0,22,35,3,0,8,42,7),we(0,11,14,-7,0,23,36,3,0,9,44,8),we(0,11,15,-7,0,24,38,3,0,9,46,8)],dE={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},pE={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ju(e){return`${Math.round(e)}ms`}function hE(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function mE(e){const t={...dE,...e.easing},n={...pE,...e.duration};return{getAutoHeightDuration:hE,create:(i=["all"],s={})=>{const{duration:o=n.standard,easing:a=t.easeInOut,delay:u=0,...c}=s;if(process.env.NODE_ENV!=="production"){const f=p=>typeof p=="string",d=p=>!Number.isNaN(parseFloat(p));!f(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(o)&&!f(o)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${o}.`),f(a)||console.error('MUI: Argument "easing" must be a string.'),!d(u)&&!f(u)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
193
|
+
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof o=="string"?o:Ju(o)} ${a} ${typeof u=="string"?u:Ju(u)}`).join(",")},...e,easing:t,duration:n}}const gE={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function yE(e){return mt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Xu(e={}){const t={...e};function n(r){const i=Object.entries(r);for(let s=0;s<i.length;s++){const[o,a]=i[s];!yE(a)||o.startsWith("unstable_")?delete r[o]:mt(a)&&(r[o]={...a},n(r[o]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
194
194
|
|
|
195
195
|
const theme = ${JSON.stringify(t,null,2)};
|
|
196
196
|
|
|
197
197
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
198
198
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
199
199
|
|
|
200
|
-
export default theme;`}function
|
|
201
|
-
`))}h[w]={}}}};Object.keys(p.components).forEach(h=>{const _=p.components[h].styleOverrides;_&&h.startsWith("Mui")&&v(_,h)})}return p.unstable_sxConfig={...
|
|
202
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function jE(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ut=e=>{try{return e()}catch{}},$E=(e="mui")=>Kw(e);function Ps(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=wE({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:s,...o}=$s({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:s,opacity:{...Qu(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||ec(i)},o}function PE(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:o=EE,colorSchemeSelector:a=r.light&&r.dark?"media":void 0,rootSelector:u=":root",...c}=e,f=Object.keys(r)[0],d=n||(r.light&&f!=="light"?"light":f),p=$E(s),{[d]:y,light:v,dark:h,..._}=r,w={..._};let O=y;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(O=!0),!O)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:At(21,d));const j=Ps(w,O,c,d);v&&!w.light&&Ps(w,v,void 0,"light"),h&&!w.dark&&Ps(w,h,void 0,"dark");let k={defaultColorScheme:d,...j,cssVarPrefix:s,colorSchemeSelector:a,rootSelector:u,getCssVar:p,colorSchemes:w,font:{...lE(j.typography),...j.font},spacing:jE(c.spacing)};Object.keys(k.colorSchemes).forEach(Q=>{const g=k.colorSchemes[Q].palette,P=B=>{const K=B.split("-"),te=K[1],pe=K[2];return p(B,g[te][pe])};if(g.mode==="light"&&(C(g.common,"background","#fff"),C(g.common,"onBackground","#000")),g.mode==="dark"&&(C(g.common,"background","#000"),C(g.common,"onBackground","#fff")),OE(g,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),g.mode==="light"){C(g.Alert,"errorColor",be(g.error.light,.6)),C(g.Alert,"infoColor",be(g.info.light,.6)),C(g.Alert,"successColor",be(g.success.light,.6)),C(g.Alert,"warningColor",be(g.warning.light,.6)),C(g.Alert,"errorFilledBg",P("palette-error-main")),C(g.Alert,"infoFilledBg",P("palette-info-main")),C(g.Alert,"successFilledBg",P("palette-success-main")),C(g.Alert,"warningFilledBg",P("palette-warning-main")),C(g.Alert,"errorFilledColor",ut(()=>g.getContrastText(g.error.main))),C(g.Alert,"infoFilledColor",ut(()=>g.getContrastText(g.info.main))),C(g.Alert,"successFilledColor",ut(()=>g.getContrastText(g.success.main))),C(g.Alert,"warningFilledColor",ut(()=>g.getContrastText(g.warning.main))),C(g.Alert,"errorStandardBg",ve(g.error.light,.9)),C(g.Alert,"infoStandardBg",ve(g.info.light,.9)),C(g.Alert,"successStandardBg",ve(g.success.light,.9)),C(g.Alert,"warningStandardBg",ve(g.warning.light,.9)),C(g.Alert,"errorIconColor",P("palette-error-main")),C(g.Alert,"infoIconColor",P("palette-info-main")),C(g.Alert,"successIconColor",P("palette-success-main")),C(g.Alert,"warningIconColor",P("palette-warning-main")),C(g.AppBar,"defaultBg",P("palette-grey-100")),C(g.Avatar,"defaultBg",P("palette-grey-400")),C(g.Button,"inheritContainedBg",P("palette-grey-300")),C(g.Button,"inheritContainedHoverBg",P("palette-grey-A100")),C(g.Chip,"defaultBorder",P("palette-grey-400")),C(g.Chip,"defaultAvatarColor",P("palette-grey-700")),C(g.Chip,"defaultIconColor",P("palette-grey-700")),C(g.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),C(g.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),C(g.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),C(g.LinearProgress,"primaryBg",ve(g.primary.main,.62)),C(g.LinearProgress,"secondaryBg",ve(g.secondary.main,.62)),C(g.LinearProgress,"errorBg",ve(g.error.main,.62)),C(g.LinearProgress,"infoBg",ve(g.info.main,.62)),C(g.LinearProgress,"successBg",ve(g.success.main,.62)),C(g.LinearProgress,"warningBg",ve(g.warning.main,.62)),C(g.Skeleton,"bg",`rgba(${P("palette-text-primaryChannel")} / 0.11)`),C(g.Slider,"primaryTrack",ve(g.primary.main,.62)),C(g.Slider,"secondaryTrack",ve(g.secondary.main,.62)),C(g.Slider,"errorTrack",ve(g.error.main,.62)),C(g.Slider,"infoTrack",ve(g.info.main,.62)),C(g.Slider,"successTrack",ve(g.success.main,.62)),C(g.Slider,"warningTrack",ve(g.warning.main,.62));const B=Jn(g.background.default,.8);C(g.SnackbarContent,"bg",B),C(g.SnackbarContent,"color",ut(()=>g.getContrastText(B))),C(g.SpeedDialAction,"fabHoverBg",Jn(g.background.paper,.15)),C(g.StepConnector,"border",P("palette-grey-400")),C(g.StepContent,"border",P("palette-grey-400")),C(g.Switch,"defaultColor",P("palette-common-white")),C(g.Switch,"defaultDisabledColor",P("palette-grey-100")),C(g.Switch,"primaryDisabledColor",ve(g.primary.main,.62)),C(g.Switch,"secondaryDisabledColor",ve(g.secondary.main,.62)),C(g.Switch,"errorDisabledColor",ve(g.error.main,.62)),C(g.Switch,"infoDisabledColor",ve(g.info.main,.62)),C(g.Switch,"successDisabledColor",ve(g.success.main,.62)),C(g.Switch,"warningDisabledColor",ve(g.warning.main,.62)),C(g.TableCell,"border",ve(Kn(g.divider,1),.88)),C(g.Tooltip,"bg",Kn(g.grey[700],.92))}if(g.mode==="dark"){C(g.Alert,"errorColor",ve(g.error.light,.6)),C(g.Alert,"infoColor",ve(g.info.light,.6)),C(g.Alert,"successColor",ve(g.success.light,.6)),C(g.Alert,"warningColor",ve(g.warning.light,.6)),C(g.Alert,"errorFilledBg",P("palette-error-dark")),C(g.Alert,"infoFilledBg",P("palette-info-dark")),C(g.Alert,"successFilledBg",P("palette-success-dark")),C(g.Alert,"warningFilledBg",P("palette-warning-dark")),C(g.Alert,"errorFilledColor",ut(()=>g.getContrastText(g.error.dark))),C(g.Alert,"infoFilledColor",ut(()=>g.getContrastText(g.info.dark))),C(g.Alert,"successFilledColor",ut(()=>g.getContrastText(g.success.dark))),C(g.Alert,"warningFilledColor",ut(()=>g.getContrastText(g.warning.dark))),C(g.Alert,"errorStandardBg",be(g.error.light,.9)),C(g.Alert,"infoStandardBg",be(g.info.light,.9)),C(g.Alert,"successStandardBg",be(g.success.light,.9)),C(g.Alert,"warningStandardBg",be(g.warning.light,.9)),C(g.Alert,"errorIconColor",P("palette-error-main")),C(g.Alert,"infoIconColor",P("palette-info-main")),C(g.Alert,"successIconColor",P("palette-success-main")),C(g.Alert,"warningIconColor",P("palette-warning-main")),C(g.AppBar,"defaultBg",P("palette-grey-900")),C(g.AppBar,"darkBg",P("palette-background-paper")),C(g.AppBar,"darkColor",P("palette-text-primary")),C(g.Avatar,"defaultBg",P("palette-grey-600")),C(g.Button,"inheritContainedBg",P("palette-grey-800")),C(g.Button,"inheritContainedHoverBg",P("palette-grey-700")),C(g.Chip,"defaultBorder",P("palette-grey-700")),C(g.Chip,"defaultAvatarColor",P("palette-grey-300")),C(g.Chip,"defaultIconColor",P("palette-grey-300")),C(g.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),C(g.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),C(g.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),C(g.LinearProgress,"primaryBg",be(g.primary.main,.5)),C(g.LinearProgress,"secondaryBg",be(g.secondary.main,.5)),C(g.LinearProgress,"errorBg",be(g.error.main,.5)),C(g.LinearProgress,"infoBg",be(g.info.main,.5)),C(g.LinearProgress,"successBg",be(g.success.main,.5)),C(g.LinearProgress,"warningBg",be(g.warning.main,.5)),C(g.Skeleton,"bg",`rgba(${P("palette-text-primaryChannel")} / 0.13)`),C(g.Slider,"primaryTrack",be(g.primary.main,.5)),C(g.Slider,"secondaryTrack",be(g.secondary.main,.5)),C(g.Slider,"errorTrack",be(g.error.main,.5)),C(g.Slider,"infoTrack",be(g.info.main,.5)),C(g.Slider,"successTrack",be(g.success.main,.5)),C(g.Slider,"warningTrack",be(g.warning.main,.5));const B=Jn(g.background.default,.98);C(g.SnackbarContent,"bg",B),C(g.SnackbarContent,"color",ut(()=>g.getContrastText(B))),C(g.SpeedDialAction,"fabHoverBg",Jn(g.background.paper,.15)),C(g.StepConnector,"border",P("palette-grey-600")),C(g.StepContent,"border",P("palette-grey-600")),C(g.Switch,"defaultColor",P("palette-grey-300")),C(g.Switch,"defaultDisabledColor",P("palette-grey-600")),C(g.Switch,"primaryDisabledColor",be(g.primary.main,.55)),C(g.Switch,"secondaryDisabledColor",be(g.secondary.main,.55)),C(g.Switch,"errorDisabledColor",be(g.error.main,.55)),C(g.Switch,"infoDisabledColor",be(g.info.main,.55)),C(g.Switch,"successDisabledColor",be(g.success.main,.55)),C(g.Switch,"warningDisabledColor",be(g.warning.main,.55)),C(g.TableCell,"border",be(Kn(g.divider,1),.68)),C(g.Tooltip,"bg",Kn(g.grey[700],.92))}mt(g.background,"default"),mt(g.background,"paper"),mt(g.common,"background"),mt(g.common,"onBackground"),mt(g,"divider"),Object.keys(g).forEach(B=>{const K=g[B];B!=="tonalOffset"&&K&&typeof K=="object"&&(K.main&&C(g[B],"mainChannel",Nr(Br(K.main))),K.light&&C(g[B],"lightChannel",Nr(Br(K.light))),K.dark&&C(g[B],"darkChannel",Nr(Br(K.dark))),K.contrastText&&C(g[B],"contrastTextChannel",Nr(Br(K.contrastText))),B==="text"&&(mt(g[B],"primary"),mt(g[B],"secondary")),B==="action"&&(K.active&&mt(g[B],"active"),K.selected&&mt(g[B],"selected")))})}),k=t.reduce((Q,g)=>qe(Q,g),k);const E={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:o,getSelector:AE(k)},{vars:$,generateThemeVars:z,generateStyleSheets:q}=Zw(k,E);return k.vars=$,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([Q,g])=>{k[Q]=g}),k.generateThemeVars=z,k.generateStyleSheets=q,k.generateSpacing=function(){return Fu(c.spacing,bs(this))},k.getColorSchemeSelector=Qw(a),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=o,k.unstable_sxConfig={...Hn,...c==null?void 0:c.unstable_sxConfig},k.unstable_sx=function(g){return ar({sx:g,theme:this})},k.toRuntimeSource=Zu,k}function tc(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:js({...r===!0?{}:r.palette,mode:t})})}function kE(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:s=r==null?void 0:r.mode,...o}=e,a=s||"light",u=i==null?void 0:i[a],c={...i,...r?{[a]:{...typeof u!="boolean"&&u,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return $s(e,...t);let f=r;"palette"in e||c[a]&&(c[a]!==!0?f=c[a].palette:a==="dark"&&(f={mode:"dark"}));const d=$s({...e,palette:f},...t);return d.defaultColorScheme=a,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},tc(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},tc(d,"light",c.light)),d}return!r&&!("light"in c)&&a==="light"&&(c.light=!0),PE({...o,colorSchemes:c,defaultColorScheme:a,...typeof n!="boolean"&&n},...t)}const IE=kE(),DE="$$material";function ME(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const FE=Fw({themeId:DE,defaultTheme:IE,rootShouldForwardProp:e=>ME(e)&&e!=="classes"}),RE=qw;process.env.NODE_ENV!=="production"&&(le.node,le.object.isRequired);function NE(e){return Yw(e)}function LE(e){return ys("MuiSvgIcon",e)}cS("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const zE=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${Ut(t)}`,`fontSize${Ut(r)}`]};return aS(i,LE,n)},BE=FE("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Ut(r.color)}`],t[`fontSize${Ut(r.fontSize)}`]]}})(RE(({theme:e})=>{var t,r,n,i,s,o,a,u,c,f,d,p,y,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(t=e.transitions)==null?void 0:t.create)==null?void 0:i.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:h=>!h.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:o.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((u=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:u.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:f.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,h])=>h&&h.main).map(([h])=>{var _,w;return{props:{color:h},style:{color:(w=(_=(e.vars??e).palette)==null?void 0:_[h])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(p=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:p.active}},{props:{color:"disabled"},style:{color:(v=(y=(e.vars??e).palette)==null?void 0:y.action)==null?void 0:v.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Ur=Le.forwardRef(function(t,r){const n=NE({props:t,name:"MuiSvgIcon"}),{children:i,className:s,color:o="inherit",component:a="svg",fontSize:u="medium",htmlColor:c,inheritViewBox:f=!1,titleAccess:d,viewBox:p="0 0 24 24",...y}=n,v=Le.isValidElement(i)&&i.type==="svg",h={...n,color:o,component:a,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:v},_={};f||(_.viewBox=p);const w=zE(h);return l.jsxs(BE,{as:a,className:dS(w.root,s),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,..._,...y,...v&&i.props,ownerState:h,children:[v?i.props.children:i,d?l.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Ur.propTypes={children:le.node,classes:le.object,className:le.string,color:le.oneOfType([le.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),le.string]),component:le.elementType,fontSize:le.oneOfType([le.oneOf(["inherit","large","medium","small"]),le.string]),htmlColor:le.string,inheritViewBox:le.bool,shapeRendering:le.string,sx:le.oneOfType([le.arrayOf(le.oneOfType([le.func,le.object,le.bool])),le.func,le.object]),titleAccess:le.string,viewBox:le.string}),Ur&&(Ur.muiName="SvgIcon");function ks(e,t){function r(n,i){return l.jsx(Ur,{"data-testid":`${t}Icon`,ref:i,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Ur.muiName,Le.memo(Le.forwardRef(r))}const UE=ks(l.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),VE=ks(l.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward"),WE=ks(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),pr=({children:e,...t})=>l.jsx(m.Table.Td,{...t,children:e}),GE=({errorMessages:e,id:t})=>l.jsx(m.Tooltip,{id:t,title:e,children:l.jsx(m.Indicator,{label:e.split(`
|
|
203
|
-
`).length,children:l.jsx(ud,{})})}),HE={paddingLeft:0,paddingRight:0},YE=T.memo(function({numColumns:t,errors:r,label:n,description:i,path:s,addItem:o,schema:a,enabled:u,translations:c,rootSchema:f}){const d={bg:"transparent",size:"sm",c:"gray"},p=m.useProps("ActionIcon",d,{});return l.jsxs(m.Table.Tr,{children:[l.jsx(pr,{colSpan:t,children:l.jsxs(m.Stack,{children:[l.jsxs(m.Grid,{justify:"flex-start",align:"center",gutter:"sm",children:[l.jsx(m.Grid.Col,{span:"content",children:l.jsx(m.Text,{children:n})}),l.jsx(m.Grid.Col,{span:"content",children:r.length!==0?l.jsx(m.Grid.Col,{span:"content",children:l.jsx(GE,{id:"tooltip-validation",errorMessages:r})}):null})]}),i&&l.jsx(m.Text,{size:"sm",children:i})]})}),u?l.jsx(pr,{align:"right",style:HE,children:l.jsx(m.Tooltip,{id:"tooltip-add",title:c.addTooltip,position:"bottom",children:l.jsx(m.ActionIcon,{bg:p.bg,size:p.size,c:p.c,onClick:o(s,Y.createDefaultValue(a,f)),children:l.jsx(hn,{})})})}):null]})}),rc={fixedCell:{width:"150px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"},fixedCellSmall:{width:"50px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"}},nc=(e,t,r,n,i)=>{if(t.type==="object")return ic(t).map(s=>{var u,c;const o=Y.Paths.compose(r,s),a={propName:s,schema:t,title:((c=(u=t.properties)==null?void 0:u[s])==null?void 0:c.title)??k_(s),rowPath:r,cellPath:o,enabled:n,cells:i};return l.jsx(e,{...a},o)});{const s={schema:t,rowPath:r,cellPath:r,enabled:n};return l.jsx(e,{...s},r)}},ic=e=>e.type==="object"&&typeof e.properties=="object"?Object.keys(e.properties).filter(t=>e.properties[t].type!=="array"):[""],qE=({numColumns:e,translations:t})=>l.jsx(m.Table.Tr,{children:l.jsx(pr,{colSpan:e,children:l.jsx(m.Text,{align:"center",children:t.noDataMessage})})}),KE=T.memo(function({title:t}){return l.jsx(m.Table.Th,{children:t})}),JE=(e,t)=>{const r=t.rowPath+(t.schema.type==="object"?"."+t.propName:""),n=Y.formatErrorMessage(x1(Y.errorsAt(r,t.schema,i=>i===r)(e.core.errors).map(i=>i.message)));return{rowPath:t.rowPath,propName:t.propName,schema:t.schema,rootSchema:e.core.schema,errors:n,path:r,enabled:t.enabled,cells:t.cells||e.cells,renderers:t.renderers||e.renderers}},sc=e=>({type:"Control",scope:e,label:!1}),XE=T.memo(function({path:t,propName:r,schema:n,rootSchema:i,errors:s,enabled:o,renderers:a,cells:u,isValid:c}){return l.jsxs(pr,{children:[n.properties?l.jsx(xe.DispatchCell,{schema:Y.Resolve.schema(n,`#/properties/${Y.encode(r)}`,i),uischema:sc(`#/properties/${Y.encode(r)}`),path:t,enabled:o,renderers:a,cells:u}):l.jsx(xe.DispatchCell,{schema:n,uischema:sc("#"),path:t,enabled:o,renderers:a,cells:u}),l.jsx(m.Text,{size:"xs",children:c?"":s})]})}),ZE=e=>{const t=xe.useJsonForms(),r=JE(t,e),n=ja(r.errors);return l.jsx(XE,{...r,isValid:n})},QE=({childPath:e,schema:t,rowIndex:r,openDeleteDialog:n,moveUpCreator:i,moveDownCreator:s,enableUp:o,enableDown:a,showSortButtons:u,enabled:c,cells:f,path:d,translations:p})=>{const y={bg:"transparent",size:"sm",c:"gray"},v=m.useProps("ActionIcon",y,{}),h=T.useMemo(()=>i(d,r),[i,d,r]),_=T.useMemo(()=>s(d,r),[s,d,r]);return l.jsxs(m.Table.Tr,{children:[nc(ZE,t,e,c,f),c?l.jsx(pr,{style:u?rc.fixedCell:rc.fixedCellSmall,children:l.jsxs(m.Grid,{justify:"flex-end",align:"center",children:[u?l.jsxs(T.Fragment,{children:[l.jsx(m.Grid.Col,{span:"content",children:l.jsx(m.Tooltip,{id:"tooltip-up",title:p.up,position:"bottom",opened:o?void 0:!1,children:l.jsx(m.ActionIcon,{bg:v.bg,size:v.size,c:v.c,"aria-label":p.upAriaLabel,onClick:h,disabled:!o,children:l.jsx(VE,{})})})}),l.jsx(m.Grid.Col,{span:"content",children:l.jsx(m.Tooltip,{id:"tooltip-down",title:p.down,position:"bottom",opened:a?void 0:!1,children:l.jsx(m.ActionIcon,{bg:v.bg,size:v.size,c:v.c,"aria-label":p.downAriaLabel,onClick:_,disabled:!a,children:l.jsx(UE,{})})})})]}):null,l.jsx(m.Grid.Col,{span:"content",children:l.jsx(m.Tooltip,{id:"tooltip-remove",title:p.removeTooltip,position:"bottom",children:l.jsx(m.ActionIcon,{bg:v.bg,size:v.size,c:v.c,"aria-label":p.removeAriaLabel,onClick:()=>n(e,r),children:l.jsx(WE,{})})})})]})}):null]},e)},oc=T.memo(QE),eC=({data:e,path:t,schema:r,openDeleteDialog:n,moveUp:i,moveDown:s,uischema:o,config:a,enabled:u,cells:c,translations:f})=>{if(e===0)return l.jsx(qE,{numColumns:ic(r).length+1,translations:f});const p=al({},a,o.options);return l.jsx(T.Fragment,{children:q_(e).map(y=>{const v=Y.Paths.compose(t,`${y}`);return l.jsx(oc,{childPath:v,rowIndex:y,schema:r,openDeleteDialog:n,moveUpCreator:i,moveDownCreator:s,enableUp:y!==0,enableDown:y!==e-1,showSortButtons:p.showSortButtons||p.showArrayTableSortButtons,enabled:u,cells:c,path:t,translations:f},v)})})};class ac extends T.Component{constructor(){super(...arguments);Nc(this,"addItem",(r,n)=>this.props.addItem(r,n))}render(){const{label:r,description:n,path:i,schema:s,rootSchema:o,uischema:a,errors:u,openDeleteDialog:c,visible:f,enabled:d,cells:p,translations:y}=this.props,v=a,h=s.type==="object",_=h?nc(KE,s,i,d,p):void 0;return f?l.jsxs(m.Table,{children:[l.jsxs(m.Table.Thead,{children:[l.jsx(YE,{errors:u,label:r,description:n,addItem:this.addItem,numColumns:h?_.length:1,path:i,uischema:v,schema:s,rootSchema:o,enabled:d,translations:y}),h&&l.jsxs(m.Table.Tr,{children:[_,d?l.jsx(m.Table.Th,{}):null]})]}),l.jsx(m.Table.Tbody,{children:l.jsx(eC,{openDeleteDialog:c,translations:y,...this.props})})]}):null}}const lc=T.memo(function({open:t,onClose:r,onConfirm:n,onCancel:i,title:s,message:o,acceptText:a,declineText:u}){return l.jsxs(m.Modal,{opened:t,withCloseButton:!1,centered:!0,title:s,keepMounted:!0,onClose:r,children:[o,l.jsxs(m.Flex,{justify:"flex-end",align:"center",gap:"sm",children:[l.jsx(m.Button,{onClick:i,children:u}),l.jsx(m.Button,{onClick:n,children:a})]})]})}),tC=e=>{const[t,r]=T.useState(!1),[n,i]=T.useState(void 0),[s,o]=T.useState(void 0),{removeItems:a,visible:u}=e,c=T.useCallback((y,v)=>{r(!0),i(y),o(v)},[r,i,o]),f=T.useCallback(()=>r(!1),[r]),d=T.useCallback(()=>{const y=n.substring(0,n.lastIndexOf("."));a(y,[s])(),r(!1)},[r,n,s]),p=T.useCallback(()=>r(!1),[r]);return u?l.jsxs(l.Fragment,{children:[l.jsx(ac,{...e,openDeleteDialog:c}),l.jsx(lc,{open:t,onCancel:f,onConfirm:d,onClose:p,acceptText:e.translations.deleteDialogAccept,declineText:e.translations.deleteDialogDecline,title:e.translations.deleteDialogTitle,message:e.translations.deleteDialogMessage})]}):null},uc=Y.rankWith(3,Y.or(Y.isObjectArrayControl,Y.isPrimitiveArrayControl)),cc=xe.withJsonFormsArrayLayoutProps(tC),rC=({errors:e,description:t,label:r,required:n,path:i,options:s,data:o,enabled:a,handleChange:u})=>l.jsx(m.MultiSelect,{disabled:!a,data:s,defaultValue:o,label:r,description:t,required:n,error:e,onChange:c=>{u(i,c)}}),nC=e=>e.oneOf!==void 0&&e.oneOf.length>0&&e.oneOf.every(t=>t.const!==void 0),iC=e=>e.type==="string"&&e.enum!==void 0,fc=Y.rankWith(6,Y.and(Y.uiTypeIs("Control"),Y.and(Y.schemaMatches(e=>Y.hasType(e,"array")&&!Array.isArray(e.items)&&e.uniqueItems===!0),Y.schemaSubPathMatches("items",(e,t)=>{const r=e.$ref?Y.resolveSchema(t,e.$ref,t):e;return nC(r)||iC(r)})))),dc=xe.withJsonFormsMultiEnumProps(rC),sC=e=>{const{description:t,errors:r,data:n,handleChange:i,path:s,label:o,required:a,enabled:u}=e,c=m.useProps(s,{},{});return Object.keys(c).forEach(f=>{typeof c[f]=="function"&&(c[f]=c[f](n))}),l.jsx(St.DateInput,{valueFormat:"DD.MM.YYYY",disabled:!u,label:o,description:t,error:r,required:a,value:n?new Date(n):null,onChange:f=>{if(f instanceof Date){const d=new Date(f.getTime()-f.getTimezoneOffset()*6e4);i(s,d.toISOString().substring(0,10))}},...c})},pc=Y.rankWith(5,Y.isDateControl),hc=xe.withJsonFormsControlProps(sC),oC=e=>{const{description:t,errors:r,data:n,handleChange:i,path:s,label:o,required:a,enabled:u}=e,c=m.useProps(s,{},{});return Object.keys(c).forEach(f=>{typeof c[f]=="function"&&(c[f]=c[f](n))}),l.jsx(St.DateTimePicker,{valueFormat:"DD.MM.YYYY HH:mm",disabled:!u,label:o,description:t,error:r,required:a,value:n?new Date(n):null,onChange:f=>{if(f instanceof Date){const d=new Date(f);i(s,d.toISOString())}},...c})},mc=Y.rankWith(5,Y.isDateTimeControl),gc=xe.withJsonFormsControlProps(oC),aC=e=>l.jsx(An,{...e}),yc=Y.rankWith(3,Y.isNumberControl),bc=xe.withJsonFormsControlProps(aC),lC=e=>l.jsx(An,{...e}),vc=Y.rankWith(3,Y.isIntegerControl),xc=xe.withJsonFormsControlProps(lC),uC=e=>l.jsx(ll,{...e}),Tc=Y.rankWith(3,Y.isStringControl),_c=xe.withJsonFormsControlProps(uC),cC=e=>l.jsx(ul,{...e}),Sc=Y.rankWith(3,Y.isBooleanControl),wc=xe.withJsonFormsControlProps(cC),fC=({data:e,options:t,handleChange:r,path:n,...i})=>{const{description:s,errors:o,label:a,required:u,enabled:c}=i,f=m.useProps(n,{},{});return Object.keys(f).forEach(d=>{typeof f[d]=="function"&&(f[d]=f[d](e))}),l.jsx(m.Select,{disabled:!c,data:t,value:e||null,label:a,description:s,required:u,error:o,searchable:!0,onChange:d=>{r(n,d)},...f})},Ec=Y.rankWith(5,Y.isEnumControl),Cc=xe.withJsonFormsEnumProps(xe.withTranslateProps(T.memo(fC)),!1),dC=e=>{const{text:t,visible:r}=e;return r?l.jsx(m.Title,{fw:"bold",size:"xl",children:t}):null},pC=Y.rankWith(3,Y.isLabelable),hC=xe.withJsonFormsLabelProps(dC),Ac=Y.rankWith(5,Y.uiTypeIs("HorizontalLayout")),mC=({uischema:e,renderers:t,cells:r,schema:n,path:i,enabled:s})=>{const a={elements:e.elements,schema:n,path:i,enabled:s,direction:"row"};return l.jsx(Qi,{...a,renderers:t,cells:r})},Oc=xe.withJsonFormsLayoutProps(mC),jc=Y.rankWith(5,Y.uiTypeIs("VerticalLayout")),gC=({uischema:e,schema:t,path:r,enabled:n,renderers:i,cells:s})=>{const a={elements:e.elements,schema:t,path:r,enabled:n,direction:"column"};return l.jsx(Qi,{...a,renderers:i,cells:s})},$c=xe.withJsonFormsLayoutProps(gC),yC=[{tester:pc,renderer:hc},{tester:mc,renderer:gc},{tester:yc,renderer:bc},{tester:vc,renderer:xc},{tester:Tc,renderer:_c},{tester:Sc,renderer:wc},{tester:Ec,renderer:Cc},{tester:uc,renderer:cc},{tester:fc,renderer:dc},{tester:Ac,renderer:Oc},{tester:jc,renderer:$c},{tester:pC,renderer:hC}],bC=[{tester:hl,cell:ml},{tester:cl,cell:fl},{tester:dl,cell:pl},{tester:gl,cell:yl},{tester:bl,cell:vl},{tester:xl,cell:Tl},{tester:_l,cell:Sl}];function vC(e,t){const r=T.useCallback(({row:n})=>l.jsx(at,{fallback:l.jsx(ki,{id:n.original.id}),functionProps:[n.original.id],children:t}),[t]);return{enableEditing:!e,editDisplayMode:"modal",renderRowActions:r}}function xC(e,t){return{enableRowSelection:!!e||!!t}}function TC(e){return e&&typeof e=="object"&&!Array.isArray(e)}const Is=(...e)=>{const t={};return e.forEach(r=>{r&&Object.keys(r).forEach(n=>{TC(r[n])&&n!=="ref"&&t[n]?t[n]=Is(t[n],r[n]):t[n]=r[n]})}),t},Vr=(e={},...t)=>t.reduce((r,n)=>Is(r,e[n]),{}),_C=(e,t)=>e===void 0?t:e;function SC({col:e,colFilter:t,onClick:r,...n}){return l.jsxs(m.Menu,{shadow:"md",width:"target",...n,children:[l.jsx(m.Menu.Target,{children:l.jsx(m.Button,{children:"Add filter"})}),l.jsx(m.Menu.Dropdown,{children:t.filters.filter(i=>Xt(i.operator)).map(i=>l.jsx(m.Menu.Item,{onClick:()=>r({col:e,opr:i.operator,value:""}),children:i.name},`${t.label}-${i.name}`))})]})}function wC({col:e,colFilter:t,filterNameMap:r}){const{queryParams:n,setQueryParams:i}=ue(),s=xr.useForm({initialValues:{filters:(n==null?void 0:n.filters)||[]}}),[o]=Pe.useDebouncedValue(s.getValues(),$r);Pe.useDidUpdate(()=>{const c=o.filters.filter(f=>f.value);i({filters:c})},[o]);const a=s.getValues().filters,u=a.map((c,f)=>c.col===e&&Xt(c.opr)?l.jsxs(T.Fragment,{children:[l.jsx(m.Grid.Col,{span:1.5,children:l.jsx(m.Center,{h:"100%",w:"100%",children:l.jsx(m.CloseButton,{onClick:()=>s.removeListItem("filters",f),size:"md",title:"Remove filter",variant:"outline"})})}),l.jsx(m.Grid.Col,{span:10.5,children:c.opr==="in"?l.jsx(sa,{form:s,name:`filters.${f}.value`,label:r[c.opr],comboboxProps:{withinPortal:!1}}):l.jsx(gn,{form:s,name:`filters.${f}.value`,label:r[c.opr],schema:t.schema,withinPortal:!1,filter:!0})}),f>=0&&f+1<a.length&&l.jsx(m.Grid.Col,{span:12,pb:0,children:l.jsx(m.Divider,{my:"sm",label:"AND",align:"center"})})]},`${c.col}-${f}`):null).filter(Boolean);return l.jsxs(m.Grid,{w:"100%",gap:"md",gutter:"md",children:[u.length?u:l.jsx(m.Grid.Col,{span:12,children:l.jsx(m.Text,{align:"center",c:"gray",style:{fontStyle:"italic"},children:"No filters"})}),l.jsx(m.Grid.Col,{span:12,children:l.jsx(m.Stack,{children:l.jsx(SC,{col:e,colFilter:t||{filters:[]},onClick:c=>s.insertListItem("filters",c),withinPortal:!1})})})]})}function EC({filterNameMap:e,col:t,opr:r,table:n}){return Object.entries(e).filter(([i])=>i.startsWith(Jt)).map(([i,s])=>l.jsx(m.Checkbox,{checked:i===r,onChange:o=>n.setState(a=>{const u={...a.filterComponent,[t]:i};return o.target.checked||delete u[t],{...a,filterComponent:u}}),label:s},i))}const Wr=e=>e!=null&&e!=="",Pc=T.forwardRef(({selectIcon:e,...t},r)=>{const{value:n,onChange:i,leftInputProps:s,rightInputProps:o,groupProps:a,...u}=t,[c,f]=T.useState([null,null]);T.useEffect(()=>{const _=JSON.stringify(c);let w="",O=null;switch(n&&n!==_&&(w="sync"),c.every(Wr)&&_!==n?w="update":w="clear",w){case"sync":f(JSON.parse(n));break;case"update":O=setTimeout(()=>{i(JSON.stringify(c))},$r);break;case"clear":i("");break}return()=>clearTimeout(O)},[c]);const d=T.useCallback((_,w)=>{f(O=>{const j=[...O];return j[w]=_,j})},[]);let[p,y]=c;const v=Wr(y)&&!Wr(p),h=Wr(p)&&!Wr(y);return l.jsxs(m.Group,{ref:r,w:"100%",wrap:"nowrap",align:"center",gap:"xs",...a,children:[l.jsx(m.NumberInput,{styles:{wrapper:{marginBottom:0}},...u,value:p,onChange:_=>d(_,0),placeholder:v?"Start value is required":"Start value",error:v&&" ",...s}),l.jsx(m.NumberInput,{styles:{wrapper:{marginBottom:0}},...u,value:y,onChange:_=>d(_,1),placeholder:h?"End value is required":"End value",error:h&&" ",...o}),e]})});Pc.displayName="BasicHeaderBetweenInput";const Gr=e=>e,kc=T.forwardRef(({selectIcon:e,...t},r)=>{const{value:n,onChange:i,leftInputProps:s,rightInputProps:o,groupProps:a,...u}=t,[c,f]=T.useState([null,null]);T.useEffect(()=>{const _=JSON.stringify(c);let w="",O=null;switch(n&&n!==_&&(w="sync"),c.every(Gr)&&_!==n?w="update":w="clear",w){case"sync":f(JSON.parse(n));break;case"update":O=setTimeout(()=>{i(JSON.stringify(c))},$r);break;case"clear":i("");break}return()=>clearTimeout(O)},[c]);const d=T.useCallback((_,w)=>{_&&(_=_.toISOString()),f(O=>{const j=[...O];return j[w]=_,j})},[]);let[p,y]=c;p=p?new Date(p):null,y=y?new Date(y):null;const v=Gr(y)&&!Gr(p),h=Gr(p)&&!Gr(y);return l.jsxs(m.Group,{ref:r,w:"100%",wrap:"nowrap",align:"center",gap:"xs",...a,children:[l.jsx(St.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...u,value:p,onChange:_=>d(_,0),placeholder:v?"Start date is required":"Start date",error:v&&" ",...s}),l.jsx(St.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...u,value:y,onChange:_=>d(_,1),placeholder:h?"End date is required":"End date",error:h&&" ",...o}),e]})});kc.displayName="BasicHeaderDateBetweenInput";const Ic=T.forwardRef(({selectIcon:e,...t},r)=>l.jsx(m.TextInput,{ref:r,rightSection:e,...t}));Ic.displayName="BasicHeaderTextInput";function CC({component:e,...t}){return l.jsx(at,{fallback:l.jsx(Ic,{...t}),functionProps:[t],children:e})}const Ds={[na]:e=>l.jsx(Pc,{...e}),[ia]:e=>l.jsx(kc,{...e})},Ms=T.forwardRef(({label:e,disabled:t,children:r},n)=>t?T.cloneElement(r,{ref:n}):l.jsx(m.Tooltip,{label:e,children:T.cloneElement(r,{ref:n})}));Ms.displayName="FilterIconWrapper";const Dc=T.forwardRef(({indicator:e,children:t},r)=>e?l.jsx(m.Indicator,{zIndex:20,size:16,label:e,children:T.cloneElement(t,{ref:r})}):T.cloneElement(t,{ref:r}));Dc.displayName="FilterIndicatorWrapper";const AC=(e,t)=>{var n,i,s;const r=(s=(i=(n=e==null?void 0:e.filters)==null?void 0:n[t])==null?void 0:i.schema)==null?void 0:s.type;if(!r)return ra;switch(r){case"Date":case"DateTime":return ia;case"Integer":case"Float":return na;default:return ra}};function OC({headerConfig:e,column:t,table:r}){var he,Te,je,H;const{info:n,data:i,queryParams:s,setQueryParams:o}=ue(),{filterComponent:a,filterProps:u,filterModeDescription:c,filterAdvancedFilters:f,defaultOpr:d=AC(n,t.id),configurationMode:p="basic"}=e,[y,v]=T.useState("Basic filters"),[h,{close:_,toggle:w}]=Pe.useDisclosure(),O=((he=r.getState().filterComponent)==null?void 0:he[t.id])||d,j=T.useMemo(()=>O,[O]),k=xr.useField({initialValue:""}),E=T.useCallback(S=>{r.setState(A=>{const V=A.columnTextFilter||{};return S?V[t.id]=S:delete V[t.id],{...A,columnTextFilter:V}})},[t.id,r]),$=T.useMemo(()=>(n==null?void 0:n.filters[t.id])||{},[t.id,n==null?void 0:n.filters]),z=T.useMemo(()=>{var S;return((S=$==null?void 0:$.filters)==null?void 0:S.reduce((A,V)=>({...A,[V.operator]:V.name}),{}))||{}},[$==null?void 0:$.filters]),q=T.useMemo(()=>(s==null?void 0:s.filters.filter(S=>S.col===t.id&&Xt(S.opr)).map(S=>({...S})))||[],[s,t.id]),[Q]=Pe.useDebouncedValue(k.getInputProps().value,$r);Pe.useDidUpdate(()=>{k.reset()},[j]),Pe.useDidUpdate(()=>{let S=!1;const A=s==null?void 0:s.filters.map(J=>{if(J.opr.startsWith(Jt)&&J.col===t.id){if(J.opr===j)S=!0;else return null;return Q?{...J,value:Q}:null}return J}).filter(Boolean);!S&&Q&&A.push({col:t.id,opr:j,value:Q});const V=JSON.stringify(A),W=JSON.stringify(s.filters);V!==W&&(E(Q),o({filters:A}))},[Q]);const g=T.useMemo(()=>{var V;const S={variant:"transparent"};return!((V=$==null?void 0:$.filters)!=null&&V.length)&&(S.disabled=!0,S.c="gray"),S},[$==null?void 0:$.filters]),P=T.useCallback(S=>{if(y===S)return w();v(S),h||w()},[y,h,w]);let B=null;y==="Basic filters"?B=l.jsx(EC,{filterNameMap:z,col:t.id,opr:j,table:r}):y==="Advanced filters"&&(B=l.jsx(wC,{col:t.id,colFilter:$,filterNameMap:z}));const K=T.useMemo(()=>y==="Basic filters"?{arrowOffset:"3.25rem"}:y==="Advanced filters"?{width:"target"}:{},[y]),te=T.useMemo(()=>_C(p==="basic"?a:a==null?void 0:a[j],Ds==null?void 0:Ds[j]),[p,a,j]),pe=T.useMemo(()=>p==="basic"?u:Vr(u,j),[p,u,j]);return l.jsxs(m.Popover,{opened:h,closeOnClickOutside:!0,onChange:w,shadow:"md",withArrow:!0,position:"bottom-end",...K,children:[l.jsx(m.Popover.Target,{children:l.jsxs(m.Stack,{w:"100%",gap:"0.25rem",children:[l.jsxs(m.Group,{gap:"xs",justify:"space-between",wrap:"nowrap",children:[l.jsx(CC,{component:te,field:k,selectIcon:l.jsx(Ms,{label:"Select basic filter",children:l.jsx(m.ActionIcon,{...g,onClick:()=>P("Basic filters"),children:l.jsx(ji,{})})}),disabled:!z[j],placeholder:`Filter by ${((Te=i==null?void 0:i.label_columns)==null?void 0:Te[t.id])||t.id}`,style:{fontWeight:"normal"},w:"100%",...k.getInputProps(),...pe}),l.jsx(at,{fallback:l.jsx(Ms,{label:"Advanced Filter",disabled:!((je=$==null?void 0:$.filters)!=null&&je.length),children:l.jsx(Dc,{indicator:q.length,children:l.jsx(m.ActionIcon,{...g,onClick:()=>P("Advanced filters"),children:l.jsx(fd,{})})})}),functionProps:[{label:"Advanced filters",disabled:!((H=$==null?void 0:$.filters)!=null&&H.length),indicator:q.length,aiProps:g,onClick:()=>P("Advanced filters")}],children:f})]}),l.jsx(at,{fallback:l.jsxs(m.Input.Description,{size:"xs",fw:"normal",children:["Filter Mode: ",z==null?void 0:z[j]]}),functionProps:[z==null?void 0:z[j]],children:c})]})}),l.jsx(m.Popover.Dropdown,{children:l.jsxs(m.Stack,{gap:"0.25rem",children:[l.jsxs(m.Group,{pt:"0.25rem",justify:"space-between",align:"center",wrap:"nowrap",children:[l.jsx(m.CloseButton,{style:{visibility:"hidden"}}),l.jsx(m.Text,{children:y}),l.jsx(m.Tooltip,{label:"Close",children:l.jsx(m.CloseButton,{onClick:_})})]}),l.jsx(m.Divider,{}),B]})})]})}function jC({highlight:e,truncate:t,children:r}){return Array.isArray(r)?r.map((n,i)=>{var s;return(s=t==null?void 0:t[i])!=null&&s.truncated?l.jsx(m.Tooltip,{label:t[i].original,children:l.jsx(m.Highlight,{highlight:e,children:t[i].truncated},i)},i):l.jsx(m.Highlight,{highlight:e,children:n},i)}):t!=null&&t.truncated?l.jsx(m.Tooltip,{label:t.original,children:l.jsx(m.Highlight,{highlight:e,children:t.truncated})}):l.jsx(m.Highlight,{highlight:e,children:r})}function $C(e,t,r,n){const{data:i,specialKey:s}=ue();return{columns:T.useMemo(()=>(i==null?void 0:i.list_columns.map(a=>{var u,c;return{accessorKey:a,header:a.split("_").map(Pe.upperFirst).join(" "),Header:l.jsx(at,{fallback:(u=i==null?void 0:i.label_columns)==null?void 0:u[a],functionProps:[a],children:(c=Vr(t,s.all,a))==null?void 0:c.component}),Filter:f=>l.jsx(OC,{headerConfig:Vr(t,s.all,a),...f}),enableSorting:(i==null?void 0:i.order_columns.includes(a))||(i==null?void 0:i.order_columns.includes(`${a}.id`)),Cell:({cell:f,table:d})=>{var k;const p=d.getState().globalFilter,y=(k=d.getState().columnTextFilter)==null?void 0:k[a],{component:v,separator:h,truncate:_}=Vr(r,s.all,a);let w=[];p&&w.push(...p.split(n).map(E=>E.trim())),y&&typeof y=="string"&&w.push(...y.split(n).map(E=>E.trim()));let O=_o(f.getValue());typeof O=="number"?O=O.toLocaleString():O==null&&(O=""),h&&(O=O.split(h));let j={};return _&&(Array.isArray(O)?j=O.map(E=>({original:E,truncated:E.length>_?`${E.slice(0,_)}...`:null})):j={original:O,truncated:O.length>_?`${O.slice(0,_)}...`:null}),l.jsx(at,{fallback:l.jsx(jC,{highlight:w,truncate:j,children:O}),functionProps:[f.row.original,w],children:v})},...e==null?void 0:e[a]}}))||[],[i==null?void 0:i.list_columns,i==null?void 0:i.label_columns,i==null?void 0:i.order_columns,e,t,r,s.all,n]),manualFiltering:!0}}function PC(){const{data:e,loading:t}=ue();return{data:(e==null?void 0:e.result)||[],rowCount:(e==null?void 0:e.count)||0,state:{showLoadingOverlay:t}}}function kC(e){const{data:t}=ue();return e?{mantineTableBodyRowProps:({row:r})=>({onClick:()=>{const n=t.ids[r.id];e(n,r.original)},style:{cursor:"pointer"}})}:null}function IC(){const{queryParams:e,setQueryParams:t,info:r}=ue(),[n,i]=T.useState(""),[s]=Pe.useDebouncedValue(n,$r),o=T.useMemo(()=>{var c,f;return((f=(c=e==null?void 0:e.filters)==null?void 0:c.find(d=>d.opr===Pr))==null?void 0:f.value)||""},[e==null?void 0:e.filters]),a=T.useMemo(()=>{var c;return(c=Object.entries((r==null?void 0:r.filters)||{}).find(([,f])=>f.filters.find(d=>d.operator===Pr)))==null?void 0:c[0]},[r==null?void 0:r.filters]);Pe.useDidUpdate(()=>{o!==(s||"")&&i(o)},[o]),Pe.useDidUpdate(()=>{var y;const c=((y=e==null?void 0:e.filters)==null?void 0:y.filter(v=>v.opr!==Pr))||[],f={col:a,opr:Pr,value:s};s&&c.push(f);const d=JSON.stringify(c),p=JSON.stringify((e==null?void 0:e.filters)||[]);d!==p&&t({page:0,filters:c})},[s]);const u=T.useMemo(()=>{const c={disabled:!a};return a||(c.placeholder="No global filter available"),c},[a]);return{manualFiltering:!0,onGlobalFilterChange:i,state:{globalFilter:n},mantineSearchTextInputProps:u}}function DC(e){const{data:t,queryParams:r,setQueryParams:n}=ue(),i=T.useMemo(()=>({pageIndex:(r==null?void 0:r.page)||ep,pageSize:(r==null?void 0:r.page_size)||tp}),[r==null?void 0:r.page,r==null?void 0:r.page_size]),s=T.useCallback(o=>{const a=o(i);!(t!=null&&t.count)&&a.pageIndex===0||n({page:a.pageIndex,page_size:a.pageSize})},[t==null?void 0:t.count,i,n]);return{enablePagination:!e,manualPagination:!0,state:{pagination:i},onPaginationChange:s}}function MC(e){const{ref:t,height:r}=Pe.useElementSize(),{ref:n,height:i}=Pe.useElementSize(),s=T.useMemo(()=>{const c={h:"100%",withBorder:e};return e||(c.shadow=void 0),c},[e]),o=T.useMemo(()=>({ref:n}),[n]),a=T.useMemo(()=>({ref:t,pos:"sticky",bottom:0}),[t]),u=T.useMemo(()=>({h:`calc(100% - ${i+r}px)`}),[i,r]);return{mantinePaperProps:s,mantineTopToolbarProps:o,mantineBottomToolbarProps:a,mantineTableContainerProps:u}}function FC(){const{queryParams:e,setQueryParams:t,data:r}=ue(),n=T.useMemo(()=>e!=null&&e.order_column?[{id:e.order_column.split(".id")[0],desc:e.order_direction==="desc"}]:[],[e==null?void 0:e.order_column,e==null?void 0:e.order_direction]),i=T.useCallback(s=>{const o=s(n);if(!o.length){t({order_column:null,order_direction:null});return}const a=o[0];t({order_column:r.order_columns.includes(a.id)?a.id:`${a.id}.id`,order_direction:a.desc?"desc":"asc"})},[r==null?void 0:r.order_columns,t,n]);return{manualSorting:!0,state:{sorting:n},onSortingChange:i}}function RC(...e){const[t,r]=T.useState(!1),n={variant:"transparent",size:"md",c:"gray"},i=m.useProps("ActionIcon",n,e);return l.jsxs(l.Fragment,{children:[l.jsx(m.Tooltip,{label:"Add Item",children:l.jsx(m.ActionIcon,{variant:i.variant,size:i.size,c:i.c,className:"filterButton",onClick:()=>{r(!0)},children:l.jsx(hn,{})})}),l.jsx(Ii,{opened:t,onClose:()=>{r(!1)}})]})}function NC(...e){const[t,r]=T.useState(!1),{download:n}=ue(),i={variant:"transparent",size:"md",c:"gray"},s=m.useProps("ActionIcon",i,e);return t?l.jsx(m.ThemeIcon,{variant:"transparent",size:s.size,c:s.c,children:l.jsx(m.Loader,{size:"100%",color:s.c})}):l.jsx(m.Tooltip,{label:"Download",children:l.jsx(m.ActionIcon,{variant:s.variant,size:s.size,c:s.c,className:"filterButton",onClick:()=>{r(!0),n("download").then(()=>r(!1))},children:l.jsx(Eo,{})})})}function LC(...e){const[t,r]=T.useState(!1),{loading:n,refetch:i}=ue(),s={variant:"transparent",size:"md",c:"gray"},o=m.useProps("ActionIcon",s,e);return T.useEffect(()=>{n||r(!1)},[n]),t?l.jsx(m.ThemeIcon,{variant:"transparent",size:o.size,c:o.c,children:l.jsx(m.Loader,{size:"100%",color:o.c})}):l.jsx(m.Tooltip,{label:"Refresh",children:l.jsx(m.ActionIcon,{variant:o.variant,size:o.size,c:o.c,className:"filterButton",onClick:()=>{r(!0),i()},children:l.jsx(md,{})})})}const Fs={toggleGlobalFilter:1,filter:2,download:3,add:4,refresh:5,showHideColumns:6,toggleDensePadding:7,toggleFullScreen:8};function zC(e,t){return{1:l.jsx(Mt.MRT_ToggleGlobalFilterButton,{table:e},"basic-1"),2:l.jsx(Mt.MRT_ToggleFiltersButton,{table:e},"basic-2"),3:(t==null?void 0:t["3"])&&l.jsx(NC,{},"basic-3"),4:(t==null?void 0:t["4"])&&l.jsx(RC,{},"basic-4"),5:l.jsx(LC,{},"basic-5"),6:l.jsx(Mt.MRT_ShowHideColumnsButton,{table:e},"basic-6"),7:l.jsx(Mt.MRT_ToggleDensePaddingButton,{table:e},"basic-7"),8:l.jsx(Mt.MRT_ToggleFullScreenButton,{table:e},"basic-8")}}function BC(e={},t,r){const{info:n,queryParams:i,setQueryParams:s}=ue(),{customizer:o,custom:a}=e,u=T.useMemo(()=>t?[{label:"All",value:"[]"},...t.map(p=>({label:p.name,value:JSON.stringify(p.value)}))]:[],[t]),c=T.useMemo(()=>u.length?l.jsx(m.SegmentedControl,{value:JSON.stringify((i==null?void 0:i.filters)||[]),onChange:p=>s({filters:JSON.parse(p)}),data:u}):null,[i==null?void 0:i.filters,u,s]),f=T.useCallback(({table:p})=>{const y={3:n==null?void 0:n.permissions.includes("can_download"),4:n==null?void 0:n.permissions.includes("can_post")},v=zC(p,y);Object.entries(o||{}).forEach(([_,w])=>{_ in Fs&&(v[Fs[_]]=l.jsx(at,{fallback:v[Fs[_]],functionProps:[p],children:w},`custom-${_}`))});let h=Object.values(v);return Object.entries(a||{}).forEach(([_,w])=>{_=Number(_)-1;const O=l.jsx(at,{functionProps:[p],children:w},`order-${_}`);_>h.length?h.push(O):h=[...h.slice(0,_),O,...h.slice(_)]}),l.jsx(m.Flex,{gap:"0.125rem",align:"center",children:h})},[a,o,n==null?void 0:n.permissions]),d=T.useMemo(()=>{const p={};return c&&(p.renderTopToolbarCustomActions=()=>l.jsx(m.Group,{justify:"space-between",children:l.jsx(m.Box,{children:c})}),p.positionToolbarAlertBanner="bottom"),p},[c]);return{renderToolbarInternalActions:f,enableTopToolbar:!r,enableFilters:(o==null?void 0:o.filter)!==null,...d}}function UC(){const{data:e}=ue();return T.useMemo(()=>(e==null?void 0:e.result.length)>=1e3,[e])?{enableRowVirtualization:!0,rowVirtualizerOptions:{overscan:5}}:{}}const VC={enableStickyHeader:!0,enableColumnPinning:!0},Mc=T.forwardRef((e,t)=>{var ee;const{data:r,setQueryParams:n,specialKey:i}=ue(),{fetchOnMount:s=!0,hideToolbar:o,hideActions:a,hidePagination:u,hideError:c,onSelectCheckbox:f,onClickEntry:d,bulkActions:p,table:y,quickFilters:v,withBorder:h,columnProps:_,header:w,body:O,toolbar:j={},textFilterSeparator:k=";",bodySeparator:E,bodyTruncate:$,headerCustomizer:z,bodyCustomizer:q,toolbarCustomizer:Q,hideAdd:g,hideDownload:P,hideFilter:B,...K}=e;E&&(console.warn("bodySeparator is deprecated, please use body.[col].separator instead"),Object.keys(O).forEach(U=>{O[U]=O[U]||{},O[U].separator=O[U].separator||E})),$&&(console.warn("bodyTruncate is deprecated, please use body.[col].truncate instead"),Object.keys(O).forEach(U=>{O[U]=O[U]||{},O[U].truncate=O[U].truncate||$})),z&&(console.warn("headerCustomizer is deprecated, please use header.[col].component instead"),Object.keys(z).forEach(U=>{w[U]=w[U]||{},w[U].component=z[U].component||z[U]})),q&&(console.warn("bodyCustomizer is deprecated, please use body.[col].component instead"),Object.keys(q).forEach(U=>{O[U]=O[U]||{},O[U].component=q[U].component||q[U]})),Q&&(console.warn("toolbarCustomizer is deprecated, please use toolbar.custom instead"),j.custom=j.custom||Q),g&&(j.customizer=j.customizer||{},console.warn("hideAdd is deprecated, please use toolbar.customizer.add instead"),j.customizer.add=j.customizer.add||null),P&&(j.customizer=j.customizer||{},console.warn("hideDownload is deprecated, please use toolbar.customizer.download instead"),j.customizer.download=j.customizer.download||null),B&&(j.customizer=j.customizer||{},console.warn("hideFilter is deprecated, please use toolbar.customizer.filter instead"),j.customizer.filter=j.customizer.filter||null);const te=PC(),pe=FC(),he=DC(u),Te=$C(_,w,O,k),je=MC(h),H=vC(a,(ee=Vr(O,i.actions))==null?void 0:ee.component),S=IC(),A=UC(),V=BC(j,v,o),W=kC(d),J=xC(f,p),G=T.useMemo(()=>Is(VC,{mantinePaperProps:{ref:t}},Te,te,pe,he,je,H,S,A,V,W,J,y),[t,Te,te,pe,he,je,H,S,A,V,W,J,y]),X=Mt.useMantineReactTable(G);return T.useEffect(()=>{!r&&s&&n({})},[r]),T.useEffect(()=>{const U=Object.keys(X.getState().rowSelection),ne=r==null?void 0:r.ids.filter((re,$e)=>U.includes($e.toString()));f==null||f(ne),p==null||p.setSelectedIds(ne)},[p,r==null?void 0:r.ids,X.getState().rowSelection,f]),l.jsxs(l.Fragment,{children:[l.jsx(Mt.MantineReactTable,{table:X,...K}),c?null:l.jsx(Oo,{})]})});Mc.displayName="NextGenDataGrid";const Rs={iconSmall:"_iconSmall_sxv3z_1",iconLarge:"_iconLarge_sxv3z_6",btn:"_btn_sxv3z_17"};function WC({basePath:e="/security",Target:t,children:r}){const n=Dt.useNavigate(),{user:i,signout:s}=Gs(),[o,a]=T.useState(!1),c=[{resource_name:e+"/users",label:"Users",name:"UsersApi",Icon:gd},{resource_name:e+"/roles",label:"Roles",name:"RolesApi",Icon:dd},{resource_name:e+"/permissions",label:"Base Permissions",name:"PermissionsApi",Icon:Co},{resource_name:e+"/permissionviews",label:"Permission on Views",name:"PermissionViewApi",Icon:Co},{resource_name:e+"/viewsmenus",label:"Views/Menus",name:"ViewsMenusApi",Icon:ld}].filter(f=>i.permissions.includes(f.name));return l.jsxs(m.Menu,{width:260,position:"bottom-end",transition:"pop-top-right",withinPortal:!0,opened:o,onClose:()=>a(!1),onOpen:()=>a(!0),children:[l.jsx(m.Menu.Target,{children:t||l.jsx(m.UnstyledButton,{className:Rs.btn,style:{borderRadius:4},p:"xs",children:l.jsxs(m.Group,{style:{flexWrap:"nowrap"},spacing:7,children:[l.jsx(m.Text,{weight:500,size:"sm",style:{lineHeight:1,whiteSpace:"nowrap"},mr:3,children:`${i.first_name} ${i.last_name}`}),l.jsx(Oi,{size:12})]})})}),l.jsxs(m.Menu.Dropdown,{children:[c.length?l.jsxs(l.Fragment,{children:[l.jsx(m.Menu.Label,{children:"Security"}),c.map((f,d)=>l.jsx(m.Menu.Item,{p:12,leftSection:l.jsx(f.Icon,{className:Rs.iconSmall}),onClick:()=>n(f.resource_name),children:f.label},d)),l.jsx(m.Menu.Divider,{})]}):null,r,l.jsx(m.Menu.Item,{leftSection:l.jsx(pd,{p:12,className:Rs.iconSmall}),onClick:s,children:"Logout"})]})]})}function GC(e,{autoInvoke:t=!0,initialLoading:r=!1,clearDataOnRefetch:n=!1,...i}={}){const[s,o]=T.useState(null),[a,u]=T.useState(r),[c,f]=T.useState(null),d=T.useRef(null),p=T.useCallback(()=>{if(e)return n&&o(null),f(null),d.current&&d.current.abort(),d.current=new AbortController,u(!0),fetch(e,{signal:d.current.signal,...i}).then(async v=>{const h=await v.json();if(!v.ok){const _=typeof h.detail=="string"?h.detail:JSON.stringify(h.detail,null,2);throw new Error(_)}return o(h),u(!1),h}).catch(v=>(v&&v.name!=="AbortError"&&(f(v),u(!1)),v))},[e]),y=T.useCallback(()=>{var v;d.current&&((v=d.current)==null||v.abort(""),u(!1))},[]);return T.useEffect(()=>(t&&p(),()=>{d.current&&d.current.abort("")}),[p,t]),{data:s,loading:a,error:c,refetch:p,abort:y}}F.Actions=ki,F.Add=Fo,F.AddDialog=Ii,F.ApiProvider=So,F.DataGrid=Ui,F.Delete=jo,F.DeleteDialog=lc,F.Edit=Mo,F.EditDialog=Do,F.Filter=aa,F.FilterMenu=oa,F.InfiniteScroll=sp,F.MantineArrayControlRenderer=cc,F.MantineBooleanCell=yl,F.MantineBooleanControl=wc,F.MantineDateCell=vl,F.MantineDateControl=hc,F.MantineDateTimeCell=Tl,F.MantineDateTimeControl=gc,F.MantineEnumArrayRenderer=dc,F.MantineEnumCell=Sl,F.MantineEnumControl=Cc,F.MantineHorizontalLayoutRenderer=Oc,F.MantineIntegerCell=pl,F.MantineIntegerControl=xc,F.MantineLayoutRenderer=Qi,F.MantineNumberCell=fl,F.MantineNumberControl=bc,F.MantineTableControl=ac,F.MantineTextCell=ml,F.MantineTextControl=_c,F.MantineVerticalLayoutRenderer=$c,F.NextGenDataGrid=Mc,F.NoBorderTableCell=pr,F.NonEmptyRow=oc,F.Provider=rf,F.UserMenu=WC,F.mantineArrayControlTester=uc,F.mantineBooleanCellTester=gl,F.mantineBooleanControlTester=Sc,F.mantineCells=bC,F.mantineDateCellTester=bl,F.mantineDateControlTester=pc,F.mantineDateTimeCellTester=xl,F.mantineDateTimeControlTester=mc,F.mantineEnumArrayRendererTester=fc,F.mantineEnumCellTester=_l,F.mantineEnumControlTester=Ec,F.mantineHorizontalLayoutTester=Ac,F.mantineIntegerCellTester=dl,F.mantineIntegerControlTester=vc,F.mantineNumberCellTester=cl,F.mantineNumberControlTester=yc,F.mantineRenderers=yC,F.mantineTextCellTester=hl,F.mantineTextControlTester=Tc,F.mantineVerticalLayoutTester=jc,F.renderLayoutElements=$a,F.useApi=ue,F.useAuth=Gs,F.useBulkActions=nf,F.useCustomFetch=GC,F.useDebouncedChange=Fa,F.useInfo=Ys,F.useProxy=Sr,F.withAjvProps=rg,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
|
|
200
|
+
export default theme;`}function ks(e={},...t){const{breakpoints:n,mixins:r={},spacing:i,palette:s={},transitions:o={},typography:a={},shape:u,...c}=e;if(e.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":Ot(20));const f=Ps(s),d=Fu(e);let p=qe(d,{mixins:sE(d.breakpoints,r),palette:f,shadows:fE.slice(),typography:aE(f,a),transitions:mE(o),zIndex:{...gE}});if(p=qe(p,c),p=t.reduce((y,v)=>qe(y,v),p),process.env.NODE_ENV!=="production"){const y=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],v=(h,_)=>{let w;for(w in h){const O=h[w];if(y.includes(w)&&Object.keys(O).length>0){if(process.env.NODE_ENV!=="production"){const j=vs("",w);console.error([`MUI: The \`${_}\` component increases the CSS specificity of the \`${w}\` internal state.`,"You can not override it like this: ",JSON.stringify(h,null,2),"",`Instead, you need to use the '&.${j}' syntax:`,JSON.stringify({root:{[`&.${j}`]:O}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
201
|
+
`))}h[w]={}}}};Object.keys(p.components).forEach(h=>{const _=p.components[h].styleOverrides;_&&h.startsWith("Mui")&&v(_,h)})}return p.unstable_sxConfig={...Hr,...c==null?void 0:c.unstable_sxConfig},p.unstable_sx=function(v){return an({sx:v,theme:this})},p.toRuntimeSource=Xu,p}function bE(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const vE=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=bE(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Zu(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Qu(e){return e==="dark"?vE:[]}function xE(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...i}=e,s=Ps(t);return{palette:s,opacity:{...Zu(s.mode),...n},overlays:r||Qu(s.mode),...i}}function TE(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const _E=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],SE=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let s=i;if(i==="class"&&(s=".%s"),i==="data"&&(s="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(s=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return _E(e.cssVarPrefix).forEach(a=>{o[a]=n[a],delete n[a]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:s?{[s.replace("%s",t)]:o,[`${r}, ${s.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(s)return s.replace("%s",String(t))}return r};function wE(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function C(e,t,n){!e[t]&&n&&(e[t]=n)}function Ln(e){return typeof e!="string"||!e.startsWith("hsl")?e:zu(e)}function yt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Fn(Ln(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
202
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function EE(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ft=e=>{try{return e()}catch{}},CE=(e="mui")=>Gw(e);function Is(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=xE({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:s,...o}=ks({...n,palette:{mode:i,...t==null?void 0:t.palette}});return e[r]={...t,palette:s,opacity:{...Zu(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Qu(i)},o}function AE(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:o=TE,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...c}=e,f=Object.keys(n)[0],d=r||(n.light&&f!=="light"?"light":f),p=CE(s),{[d]:y,light:v,dark:h,..._}=n,w={..._};let O=y;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(O=!0),!O)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:Ot(21,d));const j=Is(w,O,c,d);v&&!w.light&&Is(w,v,void 0,"light"),h&&!w.dark&&Is(w,h,void 0,"dark");let k={defaultColorScheme:d,...j,cssVarPrefix:s,colorSchemeSelector:a,rootSelector:u,getCssVar:p,colorSchemes:w,font:{...iE(j.typography),...j.font},spacing:EE(c.spacing)};Object.keys(k.colorSchemes).forEach(Q=>{const g=k.colorSchemes[Q].palette,P=B=>{const J=B.split("-"),te=J[1],me=J[2];return p(B,g[te][me])};if(g.mode==="light"&&(C(g.common,"background","#fff"),C(g.common,"onBackground","#000")),g.mode==="dark"&&(C(g.common,"background","#000"),C(g.common,"onBackground","#fff")),wE(g,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),g.mode==="light"){C(g.Alert,"errorColor",ve(g.error.light,.6)),C(g.Alert,"infoColor",ve(g.info.light,.6)),C(g.Alert,"successColor",ve(g.success.light,.6)),C(g.Alert,"warningColor",ve(g.warning.light,.6)),C(g.Alert,"errorFilledBg",P("palette-error-main")),C(g.Alert,"infoFilledBg",P("palette-info-main")),C(g.Alert,"successFilledBg",P("palette-success-main")),C(g.Alert,"warningFilledBg",P("palette-warning-main")),C(g.Alert,"errorFilledColor",ft(()=>g.getContrastText(g.error.main))),C(g.Alert,"infoFilledColor",ft(()=>g.getContrastText(g.info.main))),C(g.Alert,"successFilledColor",ft(()=>g.getContrastText(g.success.main))),C(g.Alert,"warningFilledColor",ft(()=>g.getContrastText(g.warning.main))),C(g.Alert,"errorStandardBg",xe(g.error.light,.9)),C(g.Alert,"infoStandardBg",xe(g.info.light,.9)),C(g.Alert,"successStandardBg",xe(g.success.light,.9)),C(g.Alert,"warningStandardBg",xe(g.warning.light,.9)),C(g.Alert,"errorIconColor",P("palette-error-main")),C(g.Alert,"infoIconColor",P("palette-info-main")),C(g.Alert,"successIconColor",P("palette-success-main")),C(g.Alert,"warningIconColor",P("palette-warning-main")),C(g.AppBar,"defaultBg",P("palette-grey-100")),C(g.Avatar,"defaultBg",P("palette-grey-400")),C(g.Button,"inheritContainedBg",P("palette-grey-300")),C(g.Button,"inheritContainedHoverBg",P("palette-grey-A100")),C(g.Chip,"defaultBorder",P("palette-grey-400")),C(g.Chip,"defaultAvatarColor",P("palette-grey-700")),C(g.Chip,"defaultIconColor",P("palette-grey-700")),C(g.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),C(g.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),C(g.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),C(g.LinearProgress,"primaryBg",xe(g.primary.main,.62)),C(g.LinearProgress,"secondaryBg",xe(g.secondary.main,.62)),C(g.LinearProgress,"errorBg",xe(g.error.main,.62)),C(g.LinearProgress,"infoBg",xe(g.info.main,.62)),C(g.LinearProgress,"successBg",xe(g.success.main,.62)),C(g.LinearProgress,"warningBg",xe(g.warning.main,.62)),C(g.Skeleton,"bg",`rgba(${P("palette-text-primaryChannel")} / 0.11)`),C(g.Slider,"primaryTrack",xe(g.primary.main,.62)),C(g.Slider,"secondaryTrack",xe(g.secondary.main,.62)),C(g.Slider,"errorTrack",xe(g.error.main,.62)),C(g.Slider,"infoTrack",xe(g.info.main,.62)),C(g.Slider,"successTrack",xe(g.success.main,.62)),C(g.Slider,"warningTrack",xe(g.warning.main,.62));const B=Jr(g.background.default,.8);C(g.SnackbarContent,"bg",B),C(g.SnackbarContent,"color",ft(()=>g.getContrastText(B))),C(g.SpeedDialAction,"fabHoverBg",Jr(g.background.paper,.15)),C(g.StepConnector,"border",P("palette-grey-400")),C(g.StepContent,"border",P("palette-grey-400")),C(g.Switch,"defaultColor",P("palette-common-white")),C(g.Switch,"defaultDisabledColor",P("palette-grey-100")),C(g.Switch,"primaryDisabledColor",xe(g.primary.main,.62)),C(g.Switch,"secondaryDisabledColor",xe(g.secondary.main,.62)),C(g.Switch,"errorDisabledColor",xe(g.error.main,.62)),C(g.Switch,"infoDisabledColor",xe(g.info.main,.62)),C(g.Switch,"successDisabledColor",xe(g.success.main,.62)),C(g.Switch,"warningDisabledColor",xe(g.warning.main,.62)),C(g.TableCell,"border",xe(Kr(g.divider,1),.88)),C(g.Tooltip,"bg",Kr(g.grey[700],.92))}if(g.mode==="dark"){C(g.Alert,"errorColor",xe(g.error.light,.6)),C(g.Alert,"infoColor",xe(g.info.light,.6)),C(g.Alert,"successColor",xe(g.success.light,.6)),C(g.Alert,"warningColor",xe(g.warning.light,.6)),C(g.Alert,"errorFilledBg",P("palette-error-dark")),C(g.Alert,"infoFilledBg",P("palette-info-dark")),C(g.Alert,"successFilledBg",P("palette-success-dark")),C(g.Alert,"warningFilledBg",P("palette-warning-dark")),C(g.Alert,"errorFilledColor",ft(()=>g.getContrastText(g.error.dark))),C(g.Alert,"infoFilledColor",ft(()=>g.getContrastText(g.info.dark))),C(g.Alert,"successFilledColor",ft(()=>g.getContrastText(g.success.dark))),C(g.Alert,"warningFilledColor",ft(()=>g.getContrastText(g.warning.dark))),C(g.Alert,"errorStandardBg",ve(g.error.light,.9)),C(g.Alert,"infoStandardBg",ve(g.info.light,.9)),C(g.Alert,"successStandardBg",ve(g.success.light,.9)),C(g.Alert,"warningStandardBg",ve(g.warning.light,.9)),C(g.Alert,"errorIconColor",P("palette-error-main")),C(g.Alert,"infoIconColor",P("palette-info-main")),C(g.Alert,"successIconColor",P("palette-success-main")),C(g.Alert,"warningIconColor",P("palette-warning-main")),C(g.AppBar,"defaultBg",P("palette-grey-900")),C(g.AppBar,"darkBg",P("palette-background-paper")),C(g.AppBar,"darkColor",P("palette-text-primary")),C(g.Avatar,"defaultBg",P("palette-grey-600")),C(g.Button,"inheritContainedBg",P("palette-grey-800")),C(g.Button,"inheritContainedHoverBg",P("palette-grey-700")),C(g.Chip,"defaultBorder",P("palette-grey-700")),C(g.Chip,"defaultAvatarColor",P("palette-grey-300")),C(g.Chip,"defaultIconColor",P("palette-grey-300")),C(g.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),C(g.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),C(g.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),C(g.LinearProgress,"primaryBg",ve(g.primary.main,.5)),C(g.LinearProgress,"secondaryBg",ve(g.secondary.main,.5)),C(g.LinearProgress,"errorBg",ve(g.error.main,.5)),C(g.LinearProgress,"infoBg",ve(g.info.main,.5)),C(g.LinearProgress,"successBg",ve(g.success.main,.5)),C(g.LinearProgress,"warningBg",ve(g.warning.main,.5)),C(g.Skeleton,"bg",`rgba(${P("palette-text-primaryChannel")} / 0.13)`),C(g.Slider,"primaryTrack",ve(g.primary.main,.5)),C(g.Slider,"secondaryTrack",ve(g.secondary.main,.5)),C(g.Slider,"errorTrack",ve(g.error.main,.5)),C(g.Slider,"infoTrack",ve(g.info.main,.5)),C(g.Slider,"successTrack",ve(g.success.main,.5)),C(g.Slider,"warningTrack",ve(g.warning.main,.5));const B=Jr(g.background.default,.98);C(g.SnackbarContent,"bg",B),C(g.SnackbarContent,"color",ft(()=>g.getContrastText(B))),C(g.SpeedDialAction,"fabHoverBg",Jr(g.background.paper,.15)),C(g.StepConnector,"border",P("palette-grey-600")),C(g.StepContent,"border",P("palette-grey-600")),C(g.Switch,"defaultColor",P("palette-grey-300")),C(g.Switch,"defaultDisabledColor",P("palette-grey-600")),C(g.Switch,"primaryDisabledColor",ve(g.primary.main,.55)),C(g.Switch,"secondaryDisabledColor",ve(g.secondary.main,.55)),C(g.Switch,"errorDisabledColor",ve(g.error.main,.55)),C(g.Switch,"infoDisabledColor",ve(g.info.main,.55)),C(g.Switch,"successDisabledColor",ve(g.success.main,.55)),C(g.Switch,"warningDisabledColor",ve(g.warning.main,.55)),C(g.TableCell,"border",ve(Kr(g.divider,1),.68)),C(g.Tooltip,"bg",Kr(g.grey[700],.92))}yt(g.background,"default"),yt(g.background,"paper"),yt(g.common,"background"),yt(g.common,"onBackground"),yt(g,"divider"),Object.keys(g).forEach(B=>{const J=g[B];B!=="tonalOffset"&&J&&typeof J=="object"&&(J.main&&C(g[B],"mainChannel",Fn(Ln(J.main))),J.light&&C(g[B],"lightChannel",Fn(Ln(J.light))),J.dark&&C(g[B],"darkChannel",Fn(Ln(J.dark))),J.contrastText&&C(g[B],"contrastTextChannel",Fn(Ln(J.contrastText))),B==="text"&&(yt(g[B],"primary"),yt(g[B],"secondary")),B==="action"&&(J.active&&yt(g[B],"active"),J.selected&&yt(g[B],"selected")))})}),k=t.reduce((Q,g)=>qe(Q,g),k);const E={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:o,getSelector:SE(k)},{vars:$,generateThemeVars:z,generateStyleSheets:q}=qw(k,E);return k.vars=$,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([Q,g])=>{k[Q]=g}),k.generateThemeVars=z,k.generateStyleSheets=q,k.generateSpacing=function(){return Mu(c.spacing,xs(this))},k.getColorSchemeSelector=Kw(a),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=o,k.unstable_sxConfig={...Hr,...c==null?void 0:c.unstable_sxConfig},k.unstable_sx=function(g){return an({sx:g,theme:this})},k.toRuntimeSource=Xu,k}function ec(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Ps({...n===!0?{}:n.palette,mode:t})})}function OE(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:s=n==null?void 0:n.mode,...o}=e,a=s||"light",u=i==null?void 0:i[a],c={...i,...n?{[a]:{...typeof u!="boolean"&&u,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return ks(e,...t);let f=n;"palette"in e||c[a]&&(c[a]!==!0?f=c[a].palette:a==="dark"&&(f={mode:"dark"}));const d=ks({...e,palette:f},...t);return d.defaultColorScheme=a,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},ec(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},ec(d,"light",c.light)),d}return!n&&!("light"in c)&&a==="light"&&(c.light=!0),AE({...o,colorSchemes:c,defaultColorScheme:a,...typeof r!="boolean"&&r},...t)}const jE=OE(),$E="$$material";function PE(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const kE=kw({themeId:$E,defaultTheme:jE,rootShouldForwardProp:e=>PE(e)&&e!=="classes"}),IE=Ww;process.env.NODE_ENV!=="production"&&(le.node,le.object.isRequired);function DE(e){return Vw(e)}function ME(e){return vs("MuiSvgIcon",e)}uS("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const FE=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Bt(t)}`,`fontSize${Bt(n)}`]};return oS(i,ME,r)},RE=kE("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Bt(n.color)}`],t[`fontSize${Bt(n.fontSize)}`]]}})(IE(({theme:e})=>{var t,n,r,i,s,o,a,u,c,f,d,p,y,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(t=e.transitions)==null?void 0:t.create)==null?void 0:i.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:h=>!h.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:o.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((u=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:u.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:f.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,h])=>h&&h.main).map(([h])=>{var _,w;return{props:{color:h},style:{color:(w=(_=(e.vars??e).palette)==null?void 0:_[h])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(p=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:p.active}},{props:{color:"disabled"},style:{color:(v=(y=(e.vars??e).palette)==null?void 0:y.action)==null?void 0:v.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Xr=Le.forwardRef(function(t,n){const r=DE({props:t,name:"MuiSvgIcon"}),{children:i,className:s,color:o="inherit",component:a="svg",fontSize:u="medium",htmlColor:c,inheritViewBox:f=!1,titleAccess:d,viewBox:p="0 0 24 24",...y}=r,v=Le.isValidElement(i)&&i.type==="svg",h={...r,color:o,component:a,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:v},_={};f||(_.viewBox=p);const w=FE(h);return l.jsxs(RE,{as:a,className:fS(w.root,s),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,..._,...y,...v&&i.props,ownerState:h,children:[v?i.props.children:i,d?l.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Xr.propTypes={children:le.node,classes:le.object,className:le.string,color:le.oneOfType([le.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),le.string]),component:le.elementType,fontSize:le.oneOfType([le.oneOf(["inherit","large","medium","small"]),le.string]),htmlColor:le.string,inheritViewBox:le.bool,shapeRendering:le.string,sx:le.oneOfType([le.arrayOf(le.oneOfType([le.func,le.object,le.bool])),le.func,le.object]),titleAccess:le.string,viewBox:le.string}),Xr.muiName="SvgIcon";function Ds(e,t){function n(r,i){return l.jsx(Xr,{"data-testid":`${t}Icon`,ref:i,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Xr.muiName,Le.memo(Le.forwardRef(n))}const NE=Ds(l.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),LE=Ds(l.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward"),zE=Ds(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),pn=({children:e,...t})=>l.jsx(m.Table.Td,{...t,children:e}),BE=({errorMessages:e,id:t})=>l.jsx(m.Tooltip,{id:t,title:e,children:l.jsx(m.Indicator,{label:e.split(`
|
|
203
|
+
`).length,children:l.jsx(ld,{})})}),UE={paddingLeft:0,paddingRight:0},VE=T.memo(function({numColumns:t,errors:n,label:r,description:i,path:s,addItem:o,schema:a,enabled:u,translations:c,rootSchema:f}){const d={bg:"transparent",size:"sm",c:"gray"},p=m.useProps("ActionIcon",d,{});return l.jsxs(m.Table.Tr,{children:[l.jsx(pn,{colSpan:t,children:l.jsxs(m.Stack,{children:[l.jsxs(m.Grid,{justify:"flex-start",align:"center",gutter:"sm",children:[l.jsx(m.Grid.Col,{span:"content",children:l.jsx(m.Text,{children:r})}),l.jsx(m.Grid.Col,{span:"content",children:n.length!==0?l.jsx(m.Grid.Col,{span:"content",children:l.jsx(BE,{id:"tooltip-validation",errorMessages:n})}):null})]}),i&&l.jsx(m.Text,{size:"sm",children:i})]})}),u?l.jsx(pn,{align:"right",style:UE,children:l.jsx(m.Tooltip,{id:"tooltip-add",title:c.addTooltip,position:"bottom",children:l.jsx(m.ActionIcon,{bg:p.bg,size:p.size,c:p.c,onClick:o(s,Y.createDefaultValue(a,f)),children:l.jsx(pr,{})})})}):null]})}),tc={fixedCell:{width:"150px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"},fixedCellSmall:{width:"50px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"}},nc=(e,t,n,r,i)=>{if(t.type==="object")return rc(t).map(s=>{var u,c;const o=Y.Paths.compose(n,s),a={propName:s,schema:t,title:((c=(u=t.properties)==null?void 0:u[s])==null?void 0:c.title)??$_(s),rowPath:n,cellPath:o,enabled:r,cells:i};return l.jsx(e,{...a},o)});{const s={schema:t,rowPath:n,cellPath:n,enabled:r};return l.jsx(e,{...s},n)}},rc=e=>e.type==="object"&&typeof e.properties=="object"?Object.keys(e.properties).filter(t=>e.properties[t].type!=="array"):[""],WE=({numColumns:e,translations:t})=>l.jsx(m.Table.Tr,{children:l.jsx(pn,{colSpan:e,children:l.jsx(m.Text,{align:"center",children:t.noDataMessage})})}),GE=T.memo(function({title:t}){return l.jsx(m.Table.Th,{children:t})}),HE=(e,t)=>{const n=t.rowPath+(t.schema.type==="object"?"."+t.propName:""),r=Y.formatErrorMessage(v1(Y.errorsAt(n,t.schema,i=>i===n)(e.core.errors).map(i=>i.message)));return{rowPath:t.rowPath,propName:t.propName,schema:t.schema,rootSchema:e.core.schema,errors:r,path:n,enabled:t.enabled,cells:t.cells||e.cells,renderers:t.renderers||e.renderers}},ic=e=>({type:"Control",scope:e,label:!1}),YE=T.memo(function({path:t,propName:n,schema:r,rootSchema:i,errors:s,enabled:o,renderers:a,cells:u,isValid:c}){return l.jsxs(pn,{children:[r.properties?l.jsx(Te.DispatchCell,{schema:Y.Resolve.schema(r,`#/properties/${Y.encode(n)}`,i),uischema:ic(`#/properties/${Y.encode(n)}`),path:t,enabled:o,renderers:a,cells:u}):l.jsx(Te.DispatchCell,{schema:r,uischema:ic("#"),path:t,enabled:o,renderers:a,cells:u}),l.jsx(m.Text,{size:"xs",children:c?"":s})]})}),qE=e=>{const t=Te.useJsonForms(),n=HE(t,e),r=$a(n.errors);return l.jsx(YE,{...n,isValid:r})},KE=({childPath:e,schema:t,rowIndex:n,openDeleteDialog:r,moveUpCreator:i,moveDownCreator:s,enableUp:o,enableDown:a,showSortButtons:u,enabled:c,cells:f,path:d,translations:p})=>{const y={bg:"transparent",size:"sm",c:"gray"},v=m.useProps("ActionIcon",y,{}),h=T.useMemo(()=>i(d,n),[i,d,n]),_=T.useMemo(()=>s(d,n),[s,d,n]);return l.jsxs(m.Table.Tr,{children:[nc(qE,t,e,c,f),c?l.jsx(pn,{style:u?tc.fixedCell:tc.fixedCellSmall,children:l.jsxs(m.Grid,{justify:"flex-end",align:"center",children:[u?l.jsxs(T.Fragment,{children:[l.jsx(m.Grid.Col,{span:"content",children:l.jsx(m.Tooltip,{id:"tooltip-up",title:p.up,position:"bottom",opened:o?void 0:!1,children:l.jsx(m.ActionIcon,{bg:v.bg,size:v.size,c:v.c,"aria-label":p.upAriaLabel,onClick:h,disabled:!o,children:l.jsx(LE,{})})})}),l.jsx(m.Grid.Col,{span:"content",children:l.jsx(m.Tooltip,{id:"tooltip-down",title:p.down,position:"bottom",opened:a?void 0:!1,children:l.jsx(m.ActionIcon,{bg:v.bg,size:v.size,c:v.c,"aria-label":p.downAriaLabel,onClick:_,disabled:!a,children:l.jsx(NE,{})})})})]}):null,l.jsx(m.Grid.Col,{span:"content",children:l.jsx(m.Tooltip,{id:"tooltip-remove",title:p.removeTooltip,position:"bottom",children:l.jsx(m.ActionIcon,{bg:v.bg,size:v.size,c:v.c,"aria-label":p.removeAriaLabel,onClick:()=>r(e,n),children:l.jsx(zE,{})})})})]})}):null]},e)},sc=T.memo(KE),JE=({data:e,path:t,schema:n,openDeleteDialog:r,moveUp:i,moveDown:s,uischema:o,config:a,enabled:u,cells:c,translations:f})=>{if(e===0)return l.jsx(WE,{numColumns:rc(n).length+1,translations:f});const p=ll({},a,o.options);return l.jsx(T.Fragment,{children:Y_(e).map(y=>{const v=Y.Paths.compose(t,`${y}`);return l.jsx(sc,{childPath:v,rowIndex:y,schema:n,openDeleteDialog:r,moveUpCreator:i,moveDownCreator:s,enableUp:y!==0,enableDown:y!==e-1,showSortButtons:p.showSortButtons||p.showArrayTableSortButtons,enabled:u,cells:c,path:t,translations:f},v)})})};class oc extends T.Component{constructor(){super(...arguments);Rc(this,"addItem",(n,r)=>this.props.addItem(n,r))}render(){const{label:n,description:r,path:i,schema:s,rootSchema:o,uischema:a,errors:u,openDeleteDialog:c,visible:f,enabled:d,cells:p,translations:y}=this.props,v=a,h=s.type==="object",_=h?nc(GE,s,i,d,p):void 0;return f?l.jsxs(m.Table,{children:[l.jsxs(m.Table.Thead,{children:[l.jsx(VE,{errors:u,label:n,description:r,addItem:this.addItem,numColumns:h?_.length:1,path:i,uischema:v,schema:s,rootSchema:o,enabled:d,translations:y}),h&&l.jsxs(m.Table.Tr,{children:[_,d?l.jsx(m.Table.Th,{}):null]})]}),l.jsx(m.Table.Tbody,{children:l.jsx(JE,{openDeleteDialog:c,translations:y,...this.props})})]}):null}}const ac=T.memo(function({open:t,onClose:n,onConfirm:r,onCancel:i,title:s,message:o,acceptText:a,declineText:u}){return l.jsxs(m.Modal,{opened:t,withCloseButton:!1,centered:!0,title:s,keepMounted:!0,onClose:n,children:[o,l.jsxs(m.Flex,{justify:"flex-end",align:"center",gap:"sm",children:[l.jsx(m.Button,{onClick:i,children:u}),l.jsx(m.Button,{onClick:r,children:a})]})]})}),XE=e=>{const[t,n]=T.useState(!1),[r,i]=T.useState(void 0),[s,o]=T.useState(void 0),{removeItems:a,visible:u}=e,c=T.useCallback((y,v)=>{n(!0),i(y),o(v)},[n,i,o]),f=T.useCallback(()=>n(!1),[n]),d=T.useCallback(()=>{const y=r.substring(0,r.lastIndexOf("."));a(y,[s])(),n(!1)},[n,r,s]),p=T.useCallback(()=>n(!1),[n]);return u?l.jsxs(l.Fragment,{children:[l.jsx(oc,{...e,openDeleteDialog:c}),l.jsx(ac,{open:t,onCancel:f,onConfirm:d,onClose:p,acceptText:e.translations.deleteDialogAccept,declineText:e.translations.deleteDialogDecline,title:e.translations.deleteDialogTitle,message:e.translations.deleteDialogMessage})]}):null},lc=Y.rankWith(3,Y.or(Y.isObjectArrayControl,Y.isPrimitiveArrayControl)),uc=Te.withJsonFormsArrayLayoutProps(XE),ZE=({errors:e,description:t,label:n,required:r,path:i,options:s,data:o,enabled:a,handleChange:u})=>l.jsx(m.MultiSelect,{disabled:!a,data:s,defaultValue:o,label:n,description:t,required:r,error:e,onChange:c=>{u(i,c)}}),QE=e=>e.oneOf!==void 0&&e.oneOf.length>0&&e.oneOf.every(t=>t.const!==void 0),eC=e=>e.type==="string"&&e.enum!==void 0,cc=Y.rankWith(6,Y.and(Y.uiTypeIs("Control"),Y.and(Y.schemaMatches(e=>Y.hasType(e,"array")&&!Array.isArray(e.items)&&e.uniqueItems===!0),Y.schemaSubPathMatches("items",(e,t)=>{const n=e.$ref?Y.resolveSchema(t,e.$ref,t):e;return QE(n)||eC(n)})))),fc=Te.withJsonFormsMultiEnumProps(ZE),tC=e=>{const{description:t,errors:n,data:r,handleChange:i,path:s,label:o,required:a,enabled:u}=e,c=m.useProps(s,{},{});return Object.keys(c).forEach(f=>{typeof c[f]=="function"&&(c[f]=c[f](r))}),l.jsx(wt.DateInput,{valueFormat:"DD.MM.YYYY",disabled:!u,label:o,description:t,error:n,required:a,value:r?new Date(r):null,onChange:f=>{if(f instanceof Date){const d=new Date(f.getTime()-f.getTimezoneOffset()*6e4);i(s,d.toISOString().substring(0,10))}},...c})},dc=Y.rankWith(5,Y.isDateControl),pc=Te.withJsonFormsControlProps(tC),nC=e=>{const{description:t,errors:n,data:r,handleChange:i,path:s,label:o,required:a,enabled:u}=e,c=m.useProps(s,{},{});return Object.keys(c).forEach(f=>{typeof c[f]=="function"&&(c[f]=c[f](r))}),l.jsx(wt.DateTimePicker,{valueFormat:"DD.MM.YYYY HH:mm",disabled:!u,label:o,description:t,error:n,required:a,value:r?new Date(r):null,onChange:f=>{if(f instanceof Date){const d=new Date(f);i(s,d.toISOString())}},...c})},hc=Y.rankWith(5,Y.isDateTimeControl),mc=Te.withJsonFormsControlProps(nC),rC=e=>l.jsx(Cr,{...e}),gc=Y.rankWith(3,Y.isNumberControl),yc=Te.withJsonFormsControlProps(rC),iC=e=>l.jsx(Cr,{...e}),bc=Y.rankWith(3,Y.isIntegerControl),vc=Te.withJsonFormsControlProps(iC),sC=e=>l.jsx(ul,{...e}),xc=Y.rankWith(3,Y.isStringControl),Tc=Te.withJsonFormsControlProps(sC),oC=e=>l.jsx(cl,{...e}),_c=Y.rankWith(3,Y.isBooleanControl),Sc=Te.withJsonFormsControlProps(oC),aC=({data:e,options:t,handleChange:n,path:r,...i})=>{const{description:s,errors:o,label:a,required:u,enabled:c}=i,f=m.useProps(r,{},{});return Object.keys(f).forEach(d=>{typeof f[d]=="function"&&(f[d]=f[d](e))}),l.jsx(m.Select,{disabled:!c,data:t,value:e||null,label:a,description:s,required:u,error:o,searchable:!0,onChange:d=>{n(r,d)},...f})},wc=Y.rankWith(5,Y.isEnumControl),Ec=Te.withJsonFormsEnumProps(Te.withTranslateProps(T.memo(aC)),!1),lC=e=>{const{text:t,visible:n}=e;return n?l.jsx(m.Title,{fw:"bold",size:"xl",children:t}):null},uC=Y.rankWith(3,Y.isLabelable),cC=Te.withJsonFormsLabelProps(lC),Cc=Y.rankWith(5,Y.uiTypeIs("HorizontalLayout")),fC=({uischema:e,renderers:t,cells:n,schema:r,path:i,enabled:s})=>{const a={elements:e.elements,schema:r,path:i,enabled:s,direction:"row"};return l.jsx(ts,{...a,renderers:t,cells:n})},Ac=Te.withJsonFormsLayoutProps(fC),Oc=Y.rankWith(5,Y.uiTypeIs("VerticalLayout")),dC=({uischema:e,schema:t,path:n,enabled:r,renderers:i,cells:s})=>{const a={elements:e.elements,schema:t,path:n,enabled:r,direction:"column"};return l.jsx(ts,{...a,renderers:i,cells:s})},jc=Te.withJsonFormsLayoutProps(dC),pC=[{tester:dc,renderer:pc},{tester:hc,renderer:mc},{tester:gc,renderer:yc},{tester:bc,renderer:vc},{tester:xc,renderer:Tc},{tester:_c,renderer:Sc},{tester:wc,renderer:Ec},{tester:lc,renderer:uc},{tester:cc,renderer:fc},{tester:Cc,renderer:Ac},{tester:Oc,renderer:jc},{tester:uC,renderer:cC}],hC=[{tester:ml,cell:gl},{tester:fl,cell:dl},{tester:pl,cell:hl},{tester:yl,cell:bl},{tester:vl,cell:xl},{tester:Tl,cell:_l},{tester:Sl,cell:wl}];function mC(e,t){const n=T.useCallback(({row:r})=>l.jsx(ut,{fallback:l.jsx(Di,{id:r.original.id}),functionProps:[r.original.id],children:t}),[t]);return{enableEditing:!e,editDisplayMode:"modal",renderRowActions:n}}function gC(e,t){return{enableRowSelection:!!e||!!t}}function yC(e){return e&&typeof e=="object"&&!Array.isArray(e)}const Ms=(...e)=>{const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{yC(n[r])&&r!=="ref"&&t[r]?t[r]=Ms(t[r],n[r]):t[r]=n[r]})}),t},zn=(e={},...t)=>t.reduce((n,r)=>Ms(n,e[r]),{}),bC=(e,t)=>e===void 0?t:e;function vC({col:e,colFilter:t,onClick:n,...r}){return l.jsxs(m.Menu,{shadow:"md",width:"target",...r,children:[l.jsx(m.Menu.Target,{children:l.jsx(m.Button,{children:"Add filter"})}),l.jsx(m.Menu.Dropdown,{children:t.filters.filter(i=>Jt(i.operator)).map(i=>l.jsx(m.Menu.Item,{onClick:()=>n({col:e,opr:i.operator,value:""}),children:i.name},`${t.label}-${i.name}`))})]})}function xC({col:e,colFilter:t,filterNameMap:n}){const{queryParams:r,setQueryParams:i}=ce(),s=bn.useForm({initialValues:{filters:(r==null?void 0:r.filters)||[]}}),[o]=ke.useDebouncedValue(s.getValues(),On);ke.useDidUpdate(()=>{const c=o.filters.filter(f=>f.value);i({filters:c})},[o]);const a=s.getValues().filters,u=a.map((c,f)=>c.col===e&&Jt(c.opr)?l.jsxs(T.Fragment,{children:[l.jsx(m.Grid.Col,{span:1.5,children:l.jsx(m.Center,{h:"100%",w:"100%",children:l.jsx(m.CloseButton,{onClick:()=>s.removeListItem("filters",f),size:"md",title:"Remove filter",variant:"outline"})})}),l.jsx(m.Grid.Col,{span:10.5,children:c.opr==="in"?l.jsx(oa,{form:s,name:`filters.${f}.value`,label:n[c.opr],comboboxProps:{withinPortal:!1}}):l.jsx(mr,{form:s,name:`filters.${f}.value`,label:n[c.opr],schema:t.schema,withinPortal:!1,filter:!0})}),f>=0&&f+1<a.length&&l.jsx(m.Grid.Col,{span:12,pb:0,children:l.jsx(m.Divider,{my:"sm",label:"AND",align:"center"})})]},`${c.col}-${f}`):null).filter(Boolean);return l.jsxs(m.Grid,{w:"100%",gap:"md",gutter:"md",children:[u.length?u:l.jsx(m.Grid.Col,{span:12,children:l.jsx(m.Text,{align:"center",c:"gray",style:{fontStyle:"italic"},children:"No filters"})}),l.jsx(m.Grid.Col,{span:12,children:l.jsx(m.Stack,{children:l.jsx(vC,{col:e,colFilter:t||{filters:[]},onClick:c=>s.insertListItem("filters",c),withinPortal:!1})})})]})}function TC({filterNameMap:e,col:t,opr:n,table:r}){return Object.entries(e).filter(([i])=>i.startsWith(Kt)).map(([i,s])=>l.jsx(m.Checkbox,{checked:i===n,onChange:o=>r.setState(a=>{const u={...a.filterComponent,[t]:i};return o.target.checked||delete u[t],{...a,filterComponent:u}}),label:s},i))}const Bn=e=>e!=null&&e!=="",$c=T.forwardRef(({selectIcon:e,...t},n)=>{const{value:r,onChange:i,leftInputProps:s,rightInputProps:o,groupProps:a,...u}=t,[c,f]=T.useState([null,null]);T.useEffect(()=>{const _=JSON.stringify(c);let w="",O=null;switch(r&&r!==_&&(w="sync"),c.every(Bn)&&_!==r?w="update":w="clear",w){case"sync":f(JSON.parse(r));break;case"update":O=setTimeout(()=>{i(JSON.stringify(c))},On);break;case"clear":i("");break}return()=>clearTimeout(O)},[c]);const d=T.useCallback((_,w)=>{f(O=>{const j=[...O];return j[w]=_,j})},[]);let[p,y]=c;const v=Bn(y)&&!Bn(p),h=Bn(p)&&!Bn(y);return l.jsxs(m.Group,{ref:n,w:"100%",wrap:"nowrap",align:"center",gap:"xs",...a,children:[l.jsx(m.NumberInput,{styles:{wrapper:{marginBottom:0}},...u,value:p,onChange:_=>d(_,0),placeholder:v?"Start value is required":"Start value",error:v&&" ",...s}),l.jsx(m.NumberInput,{styles:{wrapper:{marginBottom:0}},...u,value:y,onChange:_=>d(_,1),placeholder:h?"End value is required":"End value",error:h&&" ",...o}),e]})});$c.displayName="BasicHeaderBetweenInput";const Un=e=>e,Pc=T.forwardRef(({selectIcon:e,...t},n)=>{const{value:r,onChange:i,leftInputProps:s,rightInputProps:o,groupProps:a,...u}=t,[c,f]=T.useState([null,null]);T.useEffect(()=>{const _=JSON.stringify(c);let w="",O=null;switch(r&&r!==_&&(w="sync"),c.every(Un)&&_!==r?w="update":w="clear",w){case"sync":f(JSON.parse(r));break;case"update":O=setTimeout(()=>{i(JSON.stringify(c))},On);break;case"clear":i("");break}return()=>clearTimeout(O)},[c]);const d=T.useCallback((_,w)=>{_&&(_=_.toISOString()),f(O=>{const j=[...O];return j[w]=_,j})},[]);let[p,y]=c;p=p?new Date(p):null,y=y?new Date(y):null;const v=Un(y)&&!Un(p),h=Un(p)&&!Un(y);return l.jsxs(m.Group,{ref:n,w:"100%",wrap:"nowrap",align:"center",gap:"xs",...a,children:[l.jsx(wt.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...u,value:p,onChange:_=>d(_,0),placeholder:v?"Start date is required":"Start date",error:v&&" ",...s}),l.jsx(wt.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...u,value:y,onChange:_=>d(_,1),placeholder:h?"End date is required":"End date",error:h&&" ",...o}),e]})});Pc.displayName="BasicHeaderDateBetweenInput";const kc=T.forwardRef(({selectIcon:e,...t},n)=>l.jsx(m.TextInput,{ref:n,rightSection:e,...t}));kc.displayName="BasicHeaderTextInput";function _C({component:e,...t}){return l.jsx(ut,{fallback:l.jsx(kc,{...t}),functionProps:[t],children:e})}const Fs={[ia]:e=>l.jsx($c,{...e}),[sa]:e=>l.jsx(Pc,{...e})},Rs=T.forwardRef(({label:e,disabled:t,children:n},r)=>t?T.cloneElement(n,{ref:r}):l.jsx(m.Tooltip,{label:e,children:T.cloneElement(n,{ref:r})}));Rs.displayName="FilterIconWrapper";const Ic=T.forwardRef(({indicator:e,children:t},n)=>e?l.jsx(m.Indicator,{zIndex:20,size:16,label:e,children:T.cloneElement(t,{ref:n})}):T.cloneElement(t,{ref:n}));Ic.displayName="FilterIndicatorWrapper";const SC=(e,t)=>{var r,i,s;const n=(s=(i=(r=e==null?void 0:e.filters)==null?void 0:r[t])==null?void 0:i.schema)==null?void 0:s.type;if(!n)return ra;switch(n){case"Date":case"DateTime":return sa;case"Integer":case"Float":return ia;default:return ra}};function wC({headerConfig:e,column:t,table:n}){var ge,_e,je,H;const{info:r,data:i,queryParams:s,setQueryParams:o}=ce(),{filterComponent:a,filterProps:u,filterModeDescription:c,filterAdvancedFilters:f,defaultOpr:d=SC(r,t.id),configurationMode:p="basic"}=e,[y,v]=T.useState("Basic filters"),[h,{close:_,toggle:w}]=ke.useDisclosure(),O=((ge=n.getState().filterComponent)==null?void 0:ge[t.id])||d,j=T.useMemo(()=>O,[O]),k=bn.useField({initialValue:""}),E=T.useCallback(S=>{n.setState(A=>{const V=A.columnTextFilter||{};return S?V[t.id]=S:delete V[t.id],{...A,columnTextFilter:V}})},[t.id,n]),$=T.useMemo(()=>(r==null?void 0:r.filters[t.id])||{},[t.id,r==null?void 0:r.filters]),z=T.useMemo(()=>{var S;return((S=$==null?void 0:$.filters)==null?void 0:S.reduce((A,V)=>({...A,[V.operator]:V.name}),{}))||{}},[$==null?void 0:$.filters]),q=T.useMemo(()=>(s==null?void 0:s.filters.filter(S=>S.col===t.id&&Jt(S.opr)).map(S=>({...S})))||[],[s,t.id]),[Q]=ke.useDebouncedValue(k.getInputProps().value,On);ke.useDidUpdate(()=>{k.reset()},[j]),ke.useDidUpdate(()=>{let S=!1;const A=s==null?void 0:s.filters.map(K=>{if(K.opr.startsWith(Kt)&&K.col===t.id){if(K.opr===j)S=!0;else return null;return Q?{...K,value:Q}:null}return K}).filter(Boolean);!S&&Q&&A.push({col:t.id,opr:j,value:Q});const V=JSON.stringify(A),W=JSON.stringify(s.filters);V!==W&&(E(Q),o({filters:A}))},[Q]);const g=T.useMemo(()=>{var V;const S={variant:"transparent"};return!((V=$==null?void 0:$.filters)!=null&&V.length)&&(S.disabled=!0,S.c="gray"),S},[$==null?void 0:$.filters]),P=T.useCallback(S=>{if(y===S)return w();v(S),h||w()},[y,h,w]);let B=null;y==="Basic filters"?B=l.jsx(TC,{filterNameMap:z,col:t.id,opr:j,table:n}):y==="Advanced filters"&&(B=l.jsx(xC,{col:t.id,colFilter:$,filterNameMap:z}));const J=T.useMemo(()=>y==="Basic filters"?{arrowOffset:"3.25rem"}:y==="Advanced filters"?{width:"target"}:{},[y]),te=T.useMemo(()=>bC(p==="basic"?a:a==null?void 0:a[j],Fs==null?void 0:Fs[j]),[p,a,j]),me=T.useMemo(()=>p==="basic"?u:zn(u,j),[p,u,j]);return l.jsxs(m.Popover,{opened:h,closeOnClickOutside:!0,onChange:w,shadow:"md",withArrow:!0,position:"bottom-end",...J,children:[l.jsx(m.Popover.Target,{children:l.jsxs(m.Stack,{w:"100%",gap:"0.25rem",children:[l.jsxs(m.Group,{gap:"xs",justify:"space-between",wrap:"nowrap",children:[l.jsx(_C,{component:te,field:k,selectIcon:l.jsx(Rs,{label:"Select basic filter",children:l.jsx(m.ActionIcon,{...g,onClick:()=>P("Basic filters"),children:l.jsx(Pi,{})})}),disabled:!z[j],placeholder:`Filter by ${((_e=i==null?void 0:i.label_columns)==null?void 0:_e[t.id])||t.id}`,style:{fontWeight:"normal"},w:"100%",...k.getInputProps(),...me}),l.jsx(ut,{fallback:l.jsx(Rs,{label:"Advanced Filter",disabled:!((je=$==null?void 0:$.filters)!=null&&je.length),children:l.jsx(Ic,{indicator:q.length,children:l.jsx(m.ActionIcon,{...g,onClick:()=>P("Advanced filters"),children:l.jsx(cd,{})})})}),functionProps:[{label:"Advanced filters",disabled:!((H=$==null?void 0:$.filters)!=null&&H.length),indicator:q.length,aiProps:g,onClick:()=>P("Advanced filters")}],children:f})]}),l.jsx(ut,{fallback:l.jsxs(m.Input.Description,{size:"xs",fw:"normal",children:["Filter Mode: ",z==null?void 0:z[j]]}),functionProps:[z==null?void 0:z[j]],children:c})]})}),l.jsx(m.Popover.Dropdown,{children:l.jsxs(m.Stack,{gap:"0.25rem",children:[l.jsxs(m.Group,{pt:"0.25rem",justify:"space-between",align:"center",wrap:"nowrap",children:[l.jsx(m.CloseButton,{style:{visibility:"hidden"}}),l.jsx(m.Text,{children:y}),l.jsx(m.Tooltip,{label:"Close",children:l.jsx(m.CloseButton,{onClick:_})})]}),l.jsx(m.Divider,{}),B]})})]})}function EC({highlight:e,truncate:t,children:n}){return Array.isArray(n)?n.map((r,i)=>{var s;return(s=t==null?void 0:t[i])!=null&&s.truncated?l.jsx(m.Tooltip,{label:t[i].original,children:l.jsx(m.Highlight,{highlight:e,children:t[i].truncated},i)},i):l.jsx(m.Highlight,{highlight:e,children:r},i)}):t!=null&&t.truncated?l.jsx(m.Tooltip,{label:t.original,children:l.jsx(m.Highlight,{highlight:e,children:t.truncated})}):l.jsx(m.Highlight,{highlight:e,children:n})}function CC(e,t,n,r){const{data:i,specialKey:s}=ce();return{columns:T.useMemo(()=>(i==null?void 0:i.list_columns.map(a=>{var u,c;return{accessorKey:a,header:a.split("_").map(ke.upperFirst).join(" "),Header:l.jsx(ut,{fallback:(u=i==null?void 0:i.label_columns)==null?void 0:u[a],functionProps:[a],children:(c=zn(t,s.all,a))==null?void 0:c.component}),Filter:f=>l.jsx(wC,{headerConfig:zn(t,s.all,a),...f}),enableSorting:(i==null?void 0:i.order_columns.includes(a))||(i==null?void 0:i.order_columns.includes(`${a}.id`)),Cell:({cell:f,table:d})=>{var k;const p=d.getState().globalFilter,y=(k=d.getState().columnTextFilter)==null?void 0:k[a],{component:v,separator:h,truncate:_}=zn(n,s.all,a);let w=[];p&&w.push(...p.split(r).map(E=>E.trim())),y&&typeof y=="string"&&w.push(...y.split(r).map(E=>E.trim()));let O=So(f.getValue());typeof O=="number"?O=O.toLocaleString():O==null&&(O=""),h&&(O=O.split(h));let j={};return _&&(Array.isArray(O)?j=O.map(E=>({original:E,truncated:E.length>_?`${E.slice(0,_)}...`:null})):j={original:O,truncated:O.length>_?`${O.slice(0,_)}...`:null}),l.jsx(ut,{fallback:l.jsx(EC,{highlight:w,truncate:j,children:O}),functionProps:[f.row.original,w],children:v})},...e==null?void 0:e[a]}}))||[],[i==null?void 0:i.list_columns,i==null?void 0:i.label_columns,i==null?void 0:i.order_columns,e,t,n,s.all,r]),manualFiltering:!0}}function AC(){const{data:e,loading:t}=ce();return{data:(e==null?void 0:e.result)||[],rowCount:(e==null?void 0:e.count)||0,state:{showLoadingOverlay:t}}}function OC(e){const{data:t}=ce();return e?{mantineTableBodyRowProps:({row:n})=>({onClick:()=>{const r=t.ids[n.id];e(r,n.original)},style:{cursor:"pointer"}})}:null}function jC(){const{queryParams:e,setQueryParams:t,info:n}=ce(),[r,i]=T.useState(""),[s]=ke.useDebouncedValue(r,On),o=T.useMemo(()=>{var c,f;return((f=(c=e==null?void 0:e.filters)==null?void 0:c.find(d=>d.opr===jn))==null?void 0:f.value)||""},[e==null?void 0:e.filters]),a=T.useMemo(()=>{var c;return(c=Object.entries((n==null?void 0:n.filters)||{}).find(([,f])=>f.filters.find(d=>d.operator===jn)))==null?void 0:c[0]},[n==null?void 0:n.filters]);ke.useDidUpdate(()=>{o!==(s||"")&&i(o)},[o]),ke.useDidUpdate(()=>{var y;const c=((y=e==null?void 0:e.filters)==null?void 0:y.filter(v=>v.opr!==jn))||[],f={col:a,opr:jn,value:s};s&&c.push(f);const d=JSON.stringify(c),p=JSON.stringify((e==null?void 0:e.filters)||[]);d!==p&&t({page:0,filters:c})},[s]);const u=T.useMemo(()=>{const c={disabled:!a};return a||(c.placeholder="No global filter available"),c},[a]);return{manualFiltering:!0,onGlobalFilterChange:i,state:{globalFilter:r},mantineSearchTextInputProps:u}}function $C(e){const{data:t,queryParams:n,setQueryParams:r}=ce(),i=T.useMemo(()=>({pageIndex:(n==null?void 0:n.page)||Qd,pageSize:(n==null?void 0:n.page_size)||ep}),[n==null?void 0:n.page,n==null?void 0:n.page_size]),s=T.useCallback(o=>{const a=o(i);!(t!=null&&t.count)&&a.pageIndex===0||r({page:a.pageIndex,page_size:a.pageSize})},[t==null?void 0:t.count,i,r]);return{enablePagination:!e,manualPagination:!0,state:{pagination:i},onPaginationChange:s}}function PC(e){const{ref:t,height:n}=ke.useElementSize(),{ref:r,height:i}=ke.useElementSize(),s=T.useMemo(()=>{const c={h:"100%",withBorder:e};return e||(c.shadow=void 0),c},[e]),o=T.useMemo(()=>({ref:r}),[r]),a=T.useMemo(()=>({ref:t,pos:"sticky",bottom:0}),[t]),u=T.useMemo(()=>({h:`calc(100% - ${i+n}px)`}),[i,n]);return{mantinePaperProps:s,mantineTopToolbarProps:o,mantineBottomToolbarProps:a,mantineTableContainerProps:u}}function kC(){const{queryParams:e,setQueryParams:t,data:n}=ce(),r=T.useMemo(()=>e!=null&&e.order_column?[{id:e.order_column.split(".id")[0],desc:e.order_direction==="desc"}]:[],[e==null?void 0:e.order_column,e==null?void 0:e.order_direction]),i=T.useCallback(s=>{const o=s(r);if(!o.length){t({order_column:null,order_direction:null});return}const a=o[0];t({order_column:n.order_columns.includes(a.id)?a.id:`${a.id}.id`,order_direction:a.desc?"desc":"asc"})},[n==null?void 0:n.order_columns,t,r]);return{manualSorting:!0,state:{sorting:r},onSortingChange:i}}function IC(...e){const[t,n]=T.useState(!1),r={variant:"transparent",size:"md",c:"gray"},i=m.useProps("ActionIcon",r,e);return l.jsxs(l.Fragment,{children:[l.jsx(m.Tooltip,{label:"Add Item",children:l.jsx(m.ActionIcon,{variant:i.variant,size:i.size,c:i.c,className:"filterButton",onClick:()=>{n(!0)},children:l.jsx(pr,{})})}),l.jsx(Mi,{opened:t,onClose:()=>{n(!1)}})]})}function DC(...e){const[t,n]=T.useState(!1),{download:r}=ce(),i={variant:"transparent",size:"md",c:"gray"},s=m.useProps("ActionIcon",i,e);return t?l.jsx(m.ThemeIcon,{variant:"transparent",size:s.size,c:s.c,children:l.jsx(m.Loader,{size:"100%",color:s.c})}):l.jsx(m.Tooltip,{label:"Download",children:l.jsx(m.ActionIcon,{variant:s.variant,size:s.size,c:s.c,className:"filterButton",onClick:()=>{n(!0),r("download").then(()=>n(!1))},children:l.jsx(Co,{})})})}function MC(...e){const[t,n]=T.useState(!1),{loading:r,refetch:i}=ce(),s={variant:"transparent",size:"md",c:"gray"},o=m.useProps("ActionIcon",s,e);return T.useEffect(()=>{r||n(!1)},[r]),t?l.jsx(m.ThemeIcon,{variant:"transparent",size:o.size,c:o.c,children:l.jsx(m.Loader,{size:"100%",color:o.c})}):l.jsx(m.Tooltip,{label:"Refresh",children:l.jsx(m.ActionIcon,{variant:o.variant,size:o.size,c:o.c,className:"filterButton",onClick:()=>{n(!0),i()},children:l.jsx(hd,{})})})}const Ns={toggleGlobalFilter:1,filter:2,download:3,add:4,refresh:5,showHideColumns:6,toggleDensePadding:7,toggleFullScreen:8};function FC(e,t){return{1:l.jsx(Dt.MRT_ToggleGlobalFilterButton,{table:e},"basic-1"),2:l.jsx(Dt.MRT_ToggleFiltersButton,{table:e},"basic-2"),3:(t==null?void 0:t["3"])&&l.jsx(DC,{},"basic-3"),4:(t==null?void 0:t["4"])&&l.jsx(IC,{},"basic-4"),5:l.jsx(MC,{},"basic-5"),6:l.jsx(Dt.MRT_ShowHideColumnsButton,{table:e},"basic-6"),7:l.jsx(Dt.MRT_ToggleDensePaddingButton,{table:e},"basic-7"),8:l.jsx(Dt.MRT_ToggleFullScreenButton,{table:e},"basic-8")}}function RC(e={},t,n){const{info:r,queryParams:i,setQueryParams:s}=ce(),{customizer:o,custom:a}=e,u=T.useMemo(()=>t?[{label:"All",value:"[]"},...t.map(p=>({label:p.name,value:JSON.stringify(p.value)}))]:[],[t]),c=T.useMemo(()=>u.length?l.jsx(m.SegmentedControl,{value:JSON.stringify((i==null?void 0:i.filters)||[]),onChange:p=>s({filters:JSON.parse(p)}),data:u}):null,[i==null?void 0:i.filters,u,s]),f=T.useCallback(({table:p})=>{const y={3:r==null?void 0:r.permissions.includes("can_download"),4:r==null?void 0:r.permissions.includes("can_post")},v=FC(p,y);Object.entries(o||{}).forEach(([_,w])=>{_ in Ns&&(v[Ns[_]]=l.jsx(ut,{fallback:v[Ns[_]],functionProps:[p],children:w},`custom-${_}`))});let h=Object.values(v);return Object.entries(a||{}).forEach(([_,w])=>{_=Number(_)-1;const O=l.jsx(ut,{functionProps:[p],children:w},`order-${_}`);_>h.length?h.push(O):h=[...h.slice(0,_),O,...h.slice(_)]}),l.jsx(m.Flex,{gap:"0.125rem",align:"center",children:h})},[a,o,r==null?void 0:r.permissions]),d=T.useMemo(()=>{const p={};return c&&(p.renderTopToolbarCustomActions=()=>l.jsx(m.Group,{justify:"space-between",children:l.jsx(m.Box,{children:c})}),p.positionToolbarAlertBanner="bottom"),p},[c]);return{renderToolbarInternalActions:f,enableTopToolbar:!n,enableFilters:(o==null?void 0:o.filter)!==null,...d}}function NC(){const{data:e}=ce();return T.useMemo(()=>(e==null?void 0:e.result.length)>=1e3,[e])?{enableRowVirtualization:!0,rowVirtualizerOptions:{overscan:5}}:{}}const LC={enableStickyHeader:!0,enableColumnPinning:!0},Dc=T.forwardRef((e,t)=>{var ee;const{data:n,setQueryParams:r,specialKey:i}=ce(),{fetchOnMount:s=!0,hideToolbar:o,hideActions:a,hidePagination:u,hideError:c,onSelectCheckbox:f,onClickEntry:d,bulkActions:p,table:y,quickFilters:v,withBorder:h,columnProps:_,header:w,body:O,toolbar:j={},textFilterSeparator:k=";",bodySeparator:E,bodyTruncate:$,headerCustomizer:z,bodyCustomizer:q,toolbarCustomizer:Q,hideAdd:g,hideDownload:P,hideFilter:B,...J}=e;E&&(console.warn("bodySeparator is deprecated, please use body.[col].separator instead"),Object.keys(O).forEach(U=>{O[U]=O[U]||{},O[U].separator=O[U].separator||E})),$&&(console.warn("bodyTruncate is deprecated, please use body.[col].truncate instead"),Object.keys(O).forEach(U=>{O[U]=O[U]||{},O[U].truncate=O[U].truncate||$})),z&&(console.warn("headerCustomizer is deprecated, please use header.[col].component instead"),Object.keys(z).forEach(U=>{w[U]=w[U]||{},w[U].component=z[U].component||z[U]})),q&&(console.warn("bodyCustomizer is deprecated, please use body.[col].component instead"),Object.keys(q).forEach(U=>{O[U]=O[U]||{},O[U].component=q[U].component||q[U]})),Q&&(console.warn("toolbarCustomizer is deprecated, please use toolbar.custom instead"),j.custom=j.custom||Q),g&&(j.customizer=j.customizer||{},console.warn("hideAdd is deprecated, please use toolbar.customizer.add instead"),j.customizer.add=j.customizer.add||null),P&&(j.customizer=j.customizer||{},console.warn("hideDownload is deprecated, please use toolbar.customizer.download instead"),j.customizer.download=j.customizer.download||null),B&&(j.customizer=j.customizer||{},console.warn("hideFilter is deprecated, please use toolbar.customizer.filter instead"),j.customizer.filter=j.customizer.filter||null);const te=AC(),me=kC(),ge=$C(u),_e=CC(_,w,O,k),je=PC(h),H=mC(a,(ee=zn(O,i.actions))==null?void 0:ee.component),S=jC(),A=NC(),V=RC(j,v,o),W=OC(d),K=gC(f,p),G=T.useMemo(()=>Ms(LC,{mantinePaperProps:{ref:t}},_e,te,me,ge,je,H,S,A,V,W,K,y),[t,_e,te,me,ge,je,H,S,A,V,W,K,y]),X=Dt.useMantineReactTable(G);return T.useEffect(()=>{!n&&s&&r({})},[n]),T.useEffect(()=>{const U=Object.keys(X.getState().rowSelection),re=n==null?void 0:n.ids.filter((ne,$e)=>U.includes($e.toString()));f==null||f(re),p==null||p.setSelectedIds(re)},[p,n==null?void 0:n.ids,X.getState().rowSelection,f]),l.jsxs(l.Fragment,{children:[l.jsx(Dt.MantineReactTable,{table:X,...J}),c?null:l.jsx(jo,{})]})});Dc.displayName="NextGenDataGrid";const Ls={iconSmall:"_iconSmall_sxv3z_1",iconLarge:"_iconLarge_sxv3z_6",btn:"_btn_sxv3z_17"};function zC({basePath:e="/security",Target:t,children:n}){const r=It.useNavigate(),{user:i,signout:s}=Hs(),[o,a]=T.useState(!1),c=[{resource_name:e+"/users",label:"Users",name:"UsersApi",Icon:md},{resource_name:e+"/roles",label:"Roles",name:"RolesApi",Icon:fd},{resource_name:e+"/permissions",label:"Base Permissions",name:"PermissionsApi",Icon:Ao},{resource_name:e+"/permissionviews",label:"Permission on Views",name:"PermissionViewApi",Icon:Ao},{resource_name:e+"/viewsmenus",label:"Views/Menus",name:"ViewsMenusApi",Icon:ad}].filter(f=>i.permissions.includes(f.name));return l.jsxs(m.Menu,{width:260,position:"bottom-end",transition:"pop-top-right",withinPortal:!0,opened:o,onClose:()=>a(!1),onOpen:()=>a(!0),children:[l.jsx(m.Menu.Target,{children:t||l.jsx(m.UnstyledButton,{className:Ls.btn,style:{borderRadius:4},p:"xs",children:l.jsxs(m.Group,{style:{flexWrap:"nowrap"},spacing:7,children:[l.jsx(m.Text,{weight:500,size:"sm",style:{lineHeight:1,whiteSpace:"nowrap"},mr:3,children:`${i.first_name} ${i.last_name}`}),l.jsx($i,{size:12})]})})}),l.jsxs(m.Menu.Dropdown,{children:[c.length?l.jsxs(l.Fragment,{children:[l.jsx(m.Menu.Label,{children:"Security"}),c.map((f,d)=>l.jsx(m.Menu.Item,{p:12,leftSection:l.jsx(f.Icon,{className:Ls.iconSmall}),onClick:()=>r(f.resource_name),children:f.label},d)),l.jsx(m.Menu.Divider,{})]}):null,n,l.jsx(m.Menu.Item,{leftSection:l.jsx(dd,{p:12,className:Ls.iconSmall}),onClick:s,children:"Logout"})]})]})}function BC(e,{autoInvoke:t=!0,initialLoading:n=!1,clearDataOnRefetch:r=!1,...i}={}){const[s,o]=T.useState(null),[a,u]=T.useState(n),[c,f]=T.useState(null),d=T.useRef(null),p=T.useCallback(()=>{if(e)return r&&o(null),f(null),d.current&&d.current.abort(),d.current=new AbortController,u(!0),fetch(e,{signal:d.current.signal,...i}).then(async v=>{const h=await v.json();if(!v.ok){const _=typeof h.detail=="string"?h.detail:JSON.stringify(h.detail,null,2);throw new Error(_)}return o(h),u(!1),h}).catch(v=>(v&&v.name!=="AbortError"&&(f(v),u(!1)),v))},[e]),y=T.useCallback(()=>{var v;d.current&&((v=d.current)==null||v.abort(""),u(!1))},[]);return T.useEffect(()=>(t&&p(),()=>{d.current&&d.current.abort("")}),[p,t]),{data:s,loading:a,error:c,refetch:p,abort:y}}M.Actions=Di,M.Add=Ro,M.AddDialog=Mi,M.ApiProvider=wo,M.DataGrid=Wi,M.Delete=$o,M.DeleteDialog=ac,M.Edit=Fo,M.EditDialog=Mo,M.Filter=la,M.FilterMenu=aa,M.InfiniteScroll=ip,M.MantineArrayControlRenderer=uc,M.MantineBooleanCell=bl,M.MantineBooleanControl=Sc,M.MantineDateCell=xl,M.MantineDateControl=pc,M.MantineDateTimeCell=_l,M.MantineDateTimeControl=mc,M.MantineEnumArrayRenderer=fc,M.MantineEnumCell=wl,M.MantineEnumControl=Ec,M.MantineHorizontalLayoutRenderer=Ac,M.MantineIntegerCell=hl,M.MantineIntegerControl=vc,M.MantineLayoutRenderer=ts,M.MantineNumberCell=dl,M.MantineNumberControl=yc,M.MantineTableControl=oc,M.MantineTextCell=gl,M.MantineTextControl=Tc,M.MantineVerticalLayoutRenderer=jc,M.NextGenDataGrid=Dc,M.NoBorderTableCell=pn,M.NonEmptyRow=sc,M.Provider=tf,M.UserMenu=zC,M.mantineArrayControlTester=lc,M.mantineBooleanCellTester=yl,M.mantineBooleanControlTester=_c,M.mantineCells=hC,M.mantineDateCellTester=vl,M.mantineDateControlTester=dc,M.mantineDateTimeCellTester=Tl,M.mantineDateTimeControlTester=hc,M.mantineEnumArrayRendererTester=cc,M.mantineEnumCellTester=Sl,M.mantineEnumControlTester=wc,M.mantineHorizontalLayoutTester=Cc,M.mantineIntegerCellTester=pl,M.mantineIntegerControlTester=bc,M.mantineNumberCellTester=fl,M.mantineNumberControlTester=gc,M.mantineRenderers=pC,M.mantineTextCellTester=ml,M.mantineTextControlTester=xc,M.mantineVerticalLayoutTester=Oc,M.renderLayoutElements=Pa,M.useApi=ce,M.useAuth=Hs,M.useBulkActions=nf,M.useCustomFetch=BC,M.useDebouncedChange=Ra,M.useInfo=qs,M.useProxy=Tn,M.withAjvProps=tg,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});
|