fastapi-rtk 0.0.97 → 0.0.98

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.
@@ -1,7 +1,7 @@
1
- (function(I,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react"),require("react/jsx-runtime"),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/jsx-runtime","react-router-dom","zustand","@tanstack/react-query","@mantine/hooks","@mantine/core","@mantine/form","@mantine/dates","@jsonforms/core","@jsonforms/react","@emotion/react","mantine-react-table"],v):(I=typeof globalThis<"u"?globalThis:I||self,v(I["fastapi-rtk"]={},I.React,I.jsxRuntime,I.reactRouterDom,I.zustand,I.reactQuery,I.hooks,I.core,I.form,I.dates,I.core$1,I.react,I.react$1,I.mantineReactTable))})(this,function(I,v,l,ds,xu,tt,be,g,er,ct,U,ce,ps,mt){"use strict";var Bx=Object.defineProperty;var Ux=(I,v,l)=>v in I?Bx(I,v,{enumerable:!0,configurable:!0,writable:!0,value:l}):I[v]=l;var Eu=(I,v,l)=>Ux(I,typeof v!="symbol"?v+"":v,l);function Au(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const $e=Au(v),hs=v.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,r)=>({}),deleteEntry:async(e,t)=>({}),download:async e=>null});function re(){const e=v.useContext(hs);if(e===void 0)throw new Error("useApi must be used within a ApiProvider");return e}function Pe({path:e,method:t,body:r=void 0,queryParams:n=void 0}){const o=Object.entries(n||{}).reduce((a,[c,u])=>((Array.isArray(u)||typeof u=="object")&&(u=JSON.stringify(u)),a[c]=u,a),{}),s=new ds.createSearchParams(o);e=e+"?"+s;const i={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:i}}function Ou(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 o=0;o<e.length;o++){let s=e[o];if(typeof s!="string")throw new TypeError("Url must be a string. Received "+s);s!==""&&(o>0&&(s=s.replace(/^[\/]+/,"")),o<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 Te(...e){const t=Array.from(Array.isArray(e[0])?e[0]:e);return Ou(t)}const $u=e=>new Proxy(e,{get(t,r){return t(n=>n[r])}}),Pu=(e,t)=>Object.entries(t).reduce((r,[n,o])=>typeof o=="object"&&JSON.stringify(o)===JSON.stringify(e[n])||o===e[n]?r:{...r,[n]:o},{});function tr(e){const[t]=v.useState(()=>xu.create(()=>({...e}))),[r]=v.useState(()=>$u(t));return v.useEffect(()=>{t.setState(n=>Pu(n,e))},[e,t]),r}const gs=v.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 ms(){return v.useContext(gs)}const ys=v.createContext({baseUrl:"",info:null,loading:!1,error:null});function bs(){return v.useContext(ys)}async function Iu(e,{username:t,password:r}){const n=new FormData;n.append("username",t),n.append("password",r);const{fetchPath:o,options:s}=Pe({path:Te(e,"auth/login"),method:"POST"}),i=await fetch(o,{...s,headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(n)});if(!i.ok)throw i.status===400?new Error("Username or password wrong."):new Error("Failed to sign in.")}async function ku(e){const{fetchPath:t,options:r}=Pe({path:Te(e,"auth/logout"),method:"POST"});if(!(await fetch(t,r)).ok)throw new Error("Failed to sign out.")}async function Du(e,t,{email:r}){const{fetchPath:n,options:o}=Pe({path:Te(e,"auth/forgot-password"),method:"POST",body:{email:r}}),s=await fetch(n,o);if(!s.ok)throw new Error("Couldn't request token to reset password");const i=await s.json(),{token:a}=i,{fetchPath:c,options:u}=Pe({path:Te(e,"auth/reset-password"),method:"POST",body:{token:a,password:t}});if(!(await fetch(c,u)).ok)throw new Error("Couldn't reset password")}async function Mu(e,t,r,n){const o=Te(e,"auth/login",t);if(r){const a=window.screenLeft+window.outerWidth/2-250,c=window.screenTop+window.outerHeight/2-500/2,u=window.open(o+"?popup=true","auth",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=500, height=500, top=${c}, left=${a}`),f=window.setInterval(function(){u.closed!==!1&&(window.clearInterval(f),n==null||n())},200);window.location.href=Te(e,"auth/login",t)}}async function Fu(e,t){const{fetchPath:r,options:n}=Pe({path:Te(e,"info/"),method:"GET"}),o=await fetch(r,{signal:t,...n}),s=await o.json();if(!o.ok){const i=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(i)}return s}async function Nu(e,t){const{fetchPath:r,options:n}=Pe({path:Te(e,"auth/user"),method:"GET"}),o=await fetch(r,{signal:t,...n}),s=await o.json();if(!o.ok){const i=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(i)}return s}async function Lu(e,t){const{fetchPath:r,options:n}=Pe({path:Te(e,"auth/user"),method:"PUT",body:t}),o=await fetch(r,n),s=await o.json();if(!o.ok){const i=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(i)}return s}function ju(e){const t=tt.useQueryClient(),r=tt.useQuery({queryKey:["user"],queryFn:({signal:f})=>Nu(e,f),retry:0}),[n,o]=v.useState(null),s=v.useCallback(({username:f,password:d})=>{o(null),Iu(e,{username:f,password:d}).then(()=>t.invalidateQueries({queryKey:["user"]})).catch(p=>o(p))},[e,t]),i=v.useCallback(()=>{o(null),ku(e).then(()=>t.resetQueries({queryKey:["user"]})).then(()=>t.resetQueries({queryKey:["info"]})).catch(f=>o(f))},[e,t]),a=v.useCallback(f=>{o(null),Lu(e,f).then(()=>t.invalidateQueries({queryKey:["user"]})).catch(d=>o(d))},[e,t]),c=v.useCallback(f=>{o(null),Du(e,f,r.data).catch(d=>o(d))},[e,r.data]),u=v.useCallback((f,d)=>Mu(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:i,update:a,resetPassword:c,oauth_signin:u,refetch:r.refetch}}function zu(e,t){const r=tt.useQuery({queryKey:["info"],queryFn:({signal:n})=>Fu(e,n),enabled:!1});return v.useEffect(()=>{t.user&&!r.data&&r.refetch()},[t.user,r]),{baseUrl:e,info:r.data,loading:r.isFetching,error:r.error}}function Bu(e){const t={baseUrl:new URL(document.baseURI).pathname+"/api/v1",inheritMantineTheme:!1},{baseUrl:r,children:n}={...t,...e},o=ju(r),s=tr(o),i=zu(r,o),a=tr(i);return l.jsx(gs.Provider,{value:s,children:l.jsx(ys.Provider,{value:a,children:n})})}function Uu(e){const[t]=v.useState(()=>new tt.QueryClient);return l.jsx(tt.QueryClientProvider,{client:t,children:l.jsx(Bu,{...e})})}const vs=v.createContext({bulkActions:{selectedIds:[],setSelectedIds:()=>{}},dispatchBulkActions:async(e,t)=>{},error:null});function Vu(){const e=v.useContext(vs);if(e===void 0)throw new Error("useBulkActions must be used within a ApiProvider");return e}const Gu=async(e,t)=>{const{fetchPath:r,options:n}=Pe({path:Te(e,"/"),method:"POST",body:t}),o=await fetch(r,n);let s=null;const i=o.headers.get("content-type");if(i&&i.includes("application/json")?s=await o.json():s=await o.text(),!o.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},Wu=async(e,t)=>{const{fetchPath:r,options:n}=Pe({path:Te(e,t.toString()),method:"DELETE"}),o=await fetch(r,n);let s=null;const i=o.headers.get("content-type");if(i&&i.includes("application/json")?s=await o.json():s=await o.text(),!o.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},Hu=async(e,t)=>{const{fetchPath:r,options:n}=Pe({path:e,method:"GET"}),o=await fetch(r,{signal:t,...n}),s=await o.json();if(!o.ok){const i=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(i)}return s},Yu=async(e,t)=>{const{fetchPath:r,options:n}=Pe({path:Te(e,t.toString()),method:"GET"}),o=await fetch(r,n);let s=null;const i=o.headers.get("content-type");if(i&&i.includes("application/json")?s=await o.json():s=await o.text(),!o.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},qu=async(e,t,r)=>{const{fetchPath:n,options:o}=Pe({path:e,method:"GET",queryParams:t}),s=await fetch(n,{signal:r,...o});let i=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?i=await s.json():i=await s.text(),!s.ok)throw typeof i=="object"?new Error(typeof i.detail=="string"?i.detail:JSON.stringify(i,null,2)):new Error(i);return i},Ku=async(e,t,r)=>{const{fetchPath:n,options:o}=Pe({path:Te(e,t.toString()),method:"PUT",body:r}),s=await fetch(n,o);let i=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?i=await s.json():i=await s.text(),!s.ok)throw typeof i=="object"?new Error(typeof i.detail=="string"?i.detail:JSON.stringify(i,null,2)):new Error(i);return i},je=e=>e&&typeof e=="object"?Array.isArray(e)?e.join(","):JSON.stringify(e):e,Ju={columns:[],filters:[],page:0,page_size:25};function wr(e,t={}){return Object.entries(t).reduce((r,[n,o])=>o==null?(delete r[n],r):{...r,[n]:o},e||Ju)}const Ts=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};var Cr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ut(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function yt(e){this._maxSize=e,this.clear()}yt.prototype.clear=function(){this._size=0,this._values=Object.create(null)},yt.prototype.get=function(e){return this._values[e]},yt.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Zu=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Ss=/^\d+$/,Xu=/^\d/,Qu=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Ru=/^\s*(['"]?)(.*?)(\1)\s*$/,$n=512,_s=new yt($n),ws=new yt($n),Cs=new yt($n),bt={Cache:yt,split:In,normalizePath:Pn,setter:function(e){var t=Pn(e);return ws.get(e)||ws.set(e,function(n,o){for(var s=0,i=t.length,a=n;s<i-1;){var c=t[s];if(c==="__proto__"||c==="constructor"||c==="prototype")return n;a=a[t[s++]]}a[t[s]]=o})},getter:function(e,t){var r=Pn(e);return Cs.get(e)||Cs.set(e,function(o){for(var s=0,i=r.length;s<i;)if(o!=null||!t)o=o[r[s++]];else return;return o})},join:function(e){return e.reduce(function(t,r){return t+(kn(r)||Ss.test(r)?"["+r+"]":(t?".":"")+r)},"")},forEach:function(e,t,r){ef(Array.isArray(e)?e:In(e),t,r)}};function Pn(e){return _s.get(e)||_s.set(e,In(e).map(function(t){return t.replace(Ru,"$2")}))}function In(e){return e.match(Zu)||[""]}function ef(e,t,r){var n=e.length,o,s,i,a;for(s=0;s<n;s++)o=e[s],o&&(nf(o)&&(o='"'+o+'"'),a=kn(o),i=!a&&/^\d+$/.test(o),t.call(r,o,a,i,s,e))}function kn(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function tf(e){return e.match(Xu)&&!e.match(Ss)}function rf(e){return Qu.test(e)}function nf(e){return!kn(e)&&(tf(e)||rf(e))}const of=/[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,Er=e=>e.match(of)||[],xr=e=>e[0].toUpperCase()+e.slice(1),Dn=(e,t)=>Er(e).join(t).toLowerCase(),Es=e=>Er(e).reduce((t,r)=>`${t}${t?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,"");var Mn={words:Er,upperFirst:xr,camelCase:Es,pascalCase:e=>xr(Es(e)),snakeCase:e=>Dn(e,"_"),kebabCase:e=>Dn(e,"-"),sentenceCase:e=>xr(Dn(e," ")),titleCase:e=>Er(e).map(xr).join(" ")},Fn={exports:{}};Fn.exports=function(e){return xs(sf(e),e)},Fn.exports.array=xs;function xs(e,t){var r=e.length,n=new Array(r),o={},s=r,i=af(t),a=lf(e);for(t.forEach(function(u){if(!a.has(u[0])||!a.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)o[s]||c(e[s],s,new Set);return n;function c(u,f,d){if(d.has(u)){var p;try{p=", node was:"+JSON.stringify(u)}catch{p=""}throw new Error("Cyclic dependency"+p)}if(!a.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!o[f]){o[f]=!0;var y=i.get(u)||new Set;if(y=Array.from(y),f=y.length){d.add(u);do{var b=y[--f];c(b,a.get(b),d)}while(f);d.delete(u)}n[--r]=u}}}function sf(e){for(var t=new Set,r=0,n=e.length;r<n;r++){var o=e[r];t.add(o[0]),t.add(o[1])}return Array.from(t)}function af(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var o=e[r];t.has(o[0])||t.set(o[0],new Set),t.has(o[1])||t.set(o[1],new Set),t.get(o[0]).add(o[1])}return t}function lf(e){for(var t=new Map,r=0,n=e.length;r<n;r++)t.set(e[r],r);return t}var cf=Fn.exports;const uf=ut(cf),ff=Object.prototype.toString,df=Error.prototype.toString,pf=RegExp.prototype.toString,hf=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",gf=/^Symbol\((.*)\)(.*)$/;function mf(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function As(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return mf(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return hf.call(e).replace(gf,"Symbol($1)");const n=ff.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+df.call(e)+"]":n==="RegExp"?pf.call(e):null}function Ke(e,t){let r=As(e,t);return r!==null?r:JSON.stringify(e,function(n,o){let s=As(this[n],t);return s!==null?s:o},2)}function Os(e){return e==null?[]:[].concat(e)}let $s,Ps,Is,yf=/\$\{\s*(\w+)\s*\}/g;$s=Symbol.toStringTag;class ks{constructor(t,r,n,o){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[$s]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],Os(t).forEach(s=>{if(_e.isError(s)){this.errors.push(...s.errors);const i=s.inner.length?s.inner:[s];this.inner.push(...i)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Ps=Symbol.hasInstance,Is=Symbol.toStringTag;class _e 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(yf,(o,s)=>Ke(r[s])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,o,s){const i=new ks(t,r,n,o);if(s)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Is]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,_e)}static[Ps](t){return ks[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Je={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 o=n!=null&&n!==r?` (cast from the value \`${Ke(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ke(r,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Ke(r,!0)}\``+o}},Fe={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"},ft={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"},Nn={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Ln={isValue:"${path} field must be ${value}"},Ar={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Or={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"},Ds={notType:e=>{const{path:t,value:r,spec:n}=e,o=n.types.length;if(Array.isArray(r)){if(r.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${r.length} for value: \`${Ke(r,!0)}\``;if(r.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${r.length} for value: \`${Ke(r,!0)}\``}return _e.formatError(Je.notType,e)}};var Ms=Object.assign(Object.create(null),{mixed:Je,string:Fe,number:ft,date:Nn,object:Ar,array:Or,boolean:Ln,tuple:Ds});const vt=e=>e&&e.__isYupSchema__;class $r{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:o,otherwise:s}=r,i=typeof n=="function"?n:(...a)=>a.every(c=>c===n);return new $r(t,(a,c)=>{var u;let f=i(...a)?o:s;return(u=f==null?void 0:f(c))!=null?u:c})}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)),o=this.fn(n,t,r);if(o===void 0||o===t)return t;if(!vt(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}}const Pr={context:"$",value:"."};function bf(e,t){return new dt(e,t)}class dt{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]===Pr.context,this.isValue=this.key[0]===Pr.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Pr.context:this.isValue?Pr.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&bt.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let o=this.isContext?n:this.isValue?t:r;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}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}}dt.prototype.__isYupRef=!0;const He=e=>e==null;function Et(e){function t({value:r,path:n="",options:o,originalValue:s,schema:i},a,c){const{name:u,test:f,params:d,message:p,skipAbsent:y}=e;let{parent:b,context:h,abortEarly:S=i.spec.abortEarly,disableStackTrace:C=i.spec.disableStackTrace}=o;function k($){return dt.isRef($)?$.getValue(r,b,h):$}function O($={}){const N=Object.assign({value:r,originalValue:s,label:i.spec.label,path:$.path||n,spec:i.spec,disableStackTrace:$.disableStackTrace||C},d,$.params);for(const Q of Object.keys(N))N[Q]=k(N[Q]);const K=new _e(_e.formatError($.message||p,N),r,N.path,$.type||u,N.disableStackTrace);return K.params=N,K}const A=S?a:c;let _={path:n,parent:b,type:u,from:o.from,createError:O,resolve:k,options:o,originalValue:s,schema:i};const P=$=>{_e.isError($)?A($):$?c(null):A(O())},L=$=>{_e.isError($)?A($):a($)};if(y&&He(r))return P(!0);let Z;try{var m;if(Z=f.call(_,r,_),typeof((m=Z)==null?void 0:m.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${_.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(Z).then(P,L)}}catch($){L($);return}P(Z)}return t.OPTIONS=e,t}function jn(e,t,r,n=r){let o,s,i;return t?(bt.forEach(t,(a,c,u)=>{let f=c?a.slice(1,a.length-1):a;e=e.resolve({context:n,parent:o,value:r});let d=e.type==="tuple",p=u?parseInt(f,10):0;if(e.innerType||d){if(d&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${i}" must contain an index to the tuple element, e.g. "${i}[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. `);o=r,r=r&&r[p],e=d?e.spec.types[p]:e.innerType}if(!u){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${i} which is a type: "${e.type}")`);o=r,r=r&&r[f],e=e.fields[f]}s=f,i=c?"["+a+"]":"."+a}),{schema:e,parent:o,parentPath:s}):{parent:o,parentPath:t,schema:e}}function vf(e,t,r,n){return jn(e,t,r,n).schema}class Ir extends Set{describe(){const t=[];for(const r of this.values())t.push(dt.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 Ir(this.values())}merge(t,r){const n=this.clone();return t.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}}function xt(e,t=new Map){if(vt(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]=xt(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,o]of e.entries())r.set(n,xt(o,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(xt(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,o]of Object.entries(e))r[n]=xt(o,t)}else throw Error(`Unable to clone ${e}`);return r}class Ae{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 Ir,this._blacklist=new Ir,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Je.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=xt(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 o=Object.assign({},r.spec,n.spec);return n.spec=o,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(i=>{s.test(i.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((o,s)=>s.resolve(o,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,o,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:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),o=r.assert==="ignore-optionality",s=n._cast(t,r);if(r.assert!==!1&&!n.isType(s)){if(o&&He(s))return s;let i=Ke(t),a=Ke(s);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
1
+ (function(I,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react"),require("react/jsx-runtime"),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/jsx-runtime","react-router-dom","zustand","@tanstack/react-query","@mantine/hooks","@mantine/core","@mantine/form","@mantine/dates","@jsonforms/core","@jsonforms/react","@emotion/react","mantine-react-table"],v):(I=typeof globalThis<"u"?globalThis:I||self,v(I["fastapi-rtk"]={},I.React,I.jsxRuntime,I.reactRouterDom,I.zustand,I.reactQuery,I.hooks,I.core,I.form,I.dates,I.core$1,I.react,I.react$1,I.mantineReactTable))})(this,function(I,v,l,ps,xu,tt,be,g,tr,ct,H,ue,hs,mt){"use strict";var Ux=Object.defineProperty;var Vx=(I,v,l)=>v in I?Ux(I,v,{enumerable:!0,configurable:!0,writable:!0,value:l}):I[v]=l;var Eu=(I,v,l)=>Vx(I,typeof v!="symbol"?v+"":v,l);function Au(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const $e=Au(v),gs=v.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,r)=>({}),deleteEntry:async(e,t)=>({}),download:async e=>null});function te(){const e=v.useContext(gs);if(e===void 0)throw new Error("useApi must be used within a ApiProvider");return e}function Pe({path:e,method:t,body:r=void 0,queryParams:n=void 0}){const o=Object.entries(n||{}).reduce((a,[u,c])=>((Array.isArray(c)||typeof c=="object")&&(c=JSON.stringify(c)),a[u]=c,a),{}),s=new ps.createSearchParams(o);e=e+"?"+s;const i={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:i}}function Ou(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 o=0;o<e.length;o++){let s=e[o];if(typeof s!="string")throw new TypeError("Url must be a string. Received "+s);s!==""&&(o>0&&(s=s.replace(/^[\/]+/,"")),o<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 Te(...e){const t=Array.from(Array.isArray(e[0])?e[0]:e);return Ou(t)}const $u=e=>new Proxy(e,{get(t,r){return t(n=>n[r])}}),Pu=(e,t)=>Object.entries(t).reduce((r,[n,o])=>typeof o=="object"&&JSON.stringify(o)===JSON.stringify(e[n])||o===e[n]?r:{...r,[n]:o},{});function rr(e){const[t]=v.useState(()=>xu.create(()=>({...e}))),[r]=v.useState(()=>$u(t));return v.useEffect(()=>{t.setState(n=>Pu(n,e))},[e,t]),r}const ms=v.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 yt(){return v.useContext(ms)}const ys=v.createContext({baseUrl:"",info:null,loading:!1,error:null});function bs(){return v.useContext(ys)}async function Iu(e,{username:t,password:r}){const n=new FormData;n.append("username",t),n.append("password",r);const{fetchPath:o,options:s}=Pe({path:Te(e,"auth/login"),method:"POST"}),i=await fetch(o,{...s,headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(n)});if(!i.ok)throw i.status===400?new Error("Username or password wrong."):new Error("Failed to sign in.")}async function ku(e){const{fetchPath:t,options:r}=Pe({path:Te(e,"auth/logout"),method:"POST"});if(!(await fetch(t,r)).ok)throw new Error("Failed to sign out.")}async function Mu(e,t,{email:r}){const{fetchPath:n,options:o}=Pe({path:Te(e,"auth/forgot-password"),method:"POST",body:{email:r}}),s=await fetch(n,o);if(!s.ok)throw new Error("Couldn't request token to reset password");const i=await s.json(),{token:a}=i,{fetchPath:u,options:c}=Pe({path:Te(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 Du(e,t,r,n){const o=Te(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(o+"?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}`),d=window.setInterval(function(){c.closed!==!1&&(window.clearInterval(d),n==null||n())},200);window.location.href=Te(e,"auth/login",t)}}async function Fu(e,t){const{fetchPath:r,options:n}=Pe({path:Te(e,"info/"),method:"GET"}),o=await fetch(r,{signal:t,...n}),s=await o.json();if(!o.ok){const i=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(i)}return s}async function Nu(e,t){const{fetchPath:r,options:n}=Pe({path:Te(e,"auth/user"),method:"GET"}),o=await fetch(r,{signal:t,...n}),s=await o.json();if(!o.ok){const i=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(i)}return s}async function Lu(e,t){const{fetchPath:r,options:n}=Pe({path:Te(e,"auth/user"),method:"PUT",body:t}),o=await fetch(r,n),s=await o.json();if(!o.ok){const i=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(i)}return s}function ju(e){const t=tt.useQueryClient(),r=tt.useQuery({queryKey:["user"],queryFn:({signal:d})=>Nu(e,d),retry:0}),[n,o]=v.useState(null),s=v.useCallback(({username:d,password:f})=>{o(null),Iu(e,{username:d,password:f}).then(()=>t.invalidateQueries({queryKey:["user"]})).catch(p=>o(p))},[e,t]),i=v.useCallback(()=>{o(null),ku(e).then(()=>t.resetQueries({queryKey:["user"]})).then(()=>t.resetQueries({queryKey:["info"]})).catch(d=>o(d))},[e,t]),a=v.useCallback(d=>{o(null),Lu(e,d).then(()=>t.invalidateQueries({queryKey:["user"]})).catch(f=>o(f))},[e,t]),u=v.useCallback(d=>{o(null),Mu(e,d,r.data).catch(f=>o(f))},[e,r.data]),c=v.useCallback((d,f)=>Du(e,d,f,()=>t.invalidateQueries({queryKey:["user"]})),[e,t]);return{user:r.isError?null:r.data,loading:r.isFetching,error:n?n.message:null,signin:s,signout:i,update:a,resetPassword:u,oauth_signin:c,refetch:r.refetch}}function zu(e,t){const r=tt.useQuery({queryKey:["info"],queryFn:({signal:n})=>Fu(e,n),enabled:!1});return v.useEffect(()=>{t.user&&!r.data&&r.refetch()},[t.user,r]),{baseUrl:e,info:r.data,loading:r.isFetching,error:r.error}}function Bu(e){const t={baseUrl:new URL(document.baseURI).pathname+"/api/v1",inheritMantineTheme:!1},{baseUrl:r,children:n}={...t,...e},o=ju(r),s=rr(o),i=zu(r,o),a=rr(i);return l.jsx(ms.Provider,{value:s,children:l.jsx(ys.Provider,{value:a,children:n})})}function Uu(e){const[t]=v.useState(()=>new tt.QueryClient);return l.jsx(tt.QueryClientProvider,{client:t,children:l.jsx(Bu,{...e})})}const vs=v.createContext({bulkActions:{selectedIds:[],setSelectedIds:()=>{}},dispatchBulkActions:async(e,t)=>{},error:null});function Vu(){const e=v.useContext(vs);if(e===void 0)throw new Error("useBulkActions must be used within a ApiProvider");return e}const Gu=async(e,t)=>{const{fetchPath:r,options:n}=Pe({path:Te(e,"/"),method:"POST",body:t}),o=await fetch(r,n);let s=null;const i=o.headers.get("content-type");if(i&&i.includes("application/json")?s=await o.json():s=await o.text(),!o.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},Wu=async(e,t)=>{const{fetchPath:r,options:n}=Pe({path:Te(e,t.toString()),method:"DELETE"}),o=await fetch(r,n);let s=null;const i=o.headers.get("content-type");if(i&&i.includes("application/json")?s=await o.json():s=await o.text(),!o.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},Hu=async(e,t)=>{const{fetchPath:r,options:n}=Pe({path:e,method:"GET"}),o=await fetch(r,{signal:t,...n}),s=await o.json();if(!o.ok){const i=typeof s.detail=="string"?s.detail:JSON.stringify(s.detail,null,2);throw new Error(i)}return s},Yu=async(e,t)=>{const{fetchPath:r,options:n}=Pe({path:Te(e,t.toString()),method:"GET"}),o=await fetch(r,n);let s=null;const i=o.headers.get("content-type");if(i&&i.includes("application/json")?s=await o.json():s=await o.text(),!o.ok)throw typeof s=="object"?new Error(typeof s.detail=="string"?s.detail:JSON.stringify(s,null,2)):new Error(s);return s},qu=async(e,t,r)=>{const{fetchPath:n,options:o}=Pe({path:e,method:"GET",queryParams:t}),s=await fetch(n,{signal:r,...o});let i=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?i=await s.json():i=await s.text(),!s.ok)throw typeof i=="object"?new Error(typeof i.detail=="string"?i.detail:JSON.stringify(i,null,2)):new Error(i);return i},Ku=async(e,t,r)=>{const{fetchPath:n,options:o}=Pe({path:Te(e,t.toString()),method:"PUT",body:r}),s=await fetch(n,o);let i=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?i=await s.json():i=await s.text(),!s.ok)throw typeof i=="object"?new Error(typeof i.detail=="string"?i.detail:JSON.stringify(i,null,2)):new Error(i);return i},je=e=>e&&typeof e=="object"?Array.isArray(e)?e.join(","):JSON.stringify(e):e,Ju={columns:[],filters:[],page:0,page_size:25};function Cr(e,t={}){return Object.entries(t).reduce((r,[n,o])=>o==null?(delete r[n],r):{...r,[n]:o},e||Ju)}const Ts=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};var Er=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ut(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function bt(e){this._maxSize=e,this.clear()}bt.prototype.clear=function(){this._size=0,this._values=Object.create(null)},bt.prototype.get=function(e){return this._values[e]},bt.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Zu=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Ss=/^\d+$/,Xu=/^\d/,Qu=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Ru=/^\s*(['"]?)(.*?)(\1)\s*$/,In=512,_s=new bt(In),ws=new bt(In),Cs=new bt(In),vt={Cache:bt,split:Mn,normalizePath:kn,setter:function(e){var t=kn(e);return ws.get(e)||ws.set(e,function(n,o){for(var s=0,i=t.length,a=n;s<i-1;){var u=t[s];if(u==="__proto__"||u==="constructor"||u==="prototype")return n;a=a[t[s++]]}a[t[s]]=o})},getter:function(e,t){var r=kn(e);return Cs.get(e)||Cs.set(e,function(o){for(var s=0,i=r.length;s<i;)if(o!=null||!t)o=o[r[s++]];else return;return o})},join:function(e){return e.reduce(function(t,r){return t+(Dn(r)||Ss.test(r)?"["+r+"]":(t?".":"")+r)},"")},forEach:function(e,t,r){ef(Array.isArray(e)?e:Mn(e),t,r)}};function kn(e){return _s.get(e)||_s.set(e,Mn(e).map(function(t){return t.replace(Ru,"$2")}))}function Mn(e){return e.match(Zu)||[""]}function ef(e,t,r){var n=e.length,o,s,i,a;for(s=0;s<n;s++)o=e[s],o&&(nf(o)&&(o='"'+o+'"'),a=Dn(o),i=!a&&/^\d+$/.test(o),t.call(r,o,a,i,s,e))}function Dn(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function tf(e){return e.match(Xu)&&!e.match(Ss)}function rf(e){return Qu.test(e)}function nf(e){return!Dn(e)&&(tf(e)||rf(e))}const of=/[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,xr=e=>e.match(of)||[],Ar=e=>e[0].toUpperCase()+e.slice(1),Fn=(e,t)=>xr(e).join(t).toLowerCase(),Es=e=>xr(e).reduce((t,r)=>`${t}${t?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,"");var Nn={words:xr,upperFirst:Ar,camelCase:Es,pascalCase:e=>Ar(Es(e)),snakeCase:e=>Fn(e,"_"),kebabCase:e=>Fn(e,"-"),sentenceCase:e=>Ar(Fn(e," ")),titleCase:e=>xr(e).map(Ar).join(" ")},Ln={exports:{}};Ln.exports=function(e){return xs(sf(e),e)},Ln.exports.array=xs;function xs(e,t){var r=e.length,n=new Array(r),o={},s=r,i=af(t),a=lf(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--;)o[s]||u(e[s],s,new Set);return n;function u(c,d,f){if(f.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(!o[d]){o[d]=!0;var y=i.get(c)||new Set;if(y=Array.from(y),d=y.length){f.add(c);do{var b=y[--d];u(b,a.get(b),f)}while(d);f.delete(c)}n[--r]=c}}}function sf(e){for(var t=new Set,r=0,n=e.length;r<n;r++){var o=e[r];t.add(o[0]),t.add(o[1])}return Array.from(t)}function af(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var o=e[r];t.has(o[0])||t.set(o[0],new Set),t.has(o[1])||t.set(o[1],new Set),t.get(o[0]).add(o[1])}return t}function lf(e){for(var t=new Map,r=0,n=e.length;r<n;r++)t.set(e[r],r);return t}var cf=Ln.exports;const uf=ut(cf),ff=Object.prototype.toString,df=Error.prototype.toString,pf=RegExp.prototype.toString,hf=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",gf=/^Symbol\((.*)\)(.*)$/;function mf(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function As(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return mf(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return hf.call(e).replace(gf,"Symbol($1)");const n=ff.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+df.call(e)+"]":n==="RegExp"?pf.call(e):null}function Ke(e,t){let r=As(e,t);return r!==null?r:JSON.stringify(e,function(n,o){let s=As(this[n],t);return s!==null?s:o},2)}function Os(e){return e==null?[]:[].concat(e)}let $s,Ps,Is,yf=/\$\{\s*(\w+)\s*\}/g;$s=Symbol.toStringTag;class ks{constructor(t,r,n,o){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[$s]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],Os(t).forEach(s=>{if(we.isError(s)){this.errors.push(...s.errors);const i=s.inner.length?s.inner:[s];this.inner.push(...i)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Ps=Symbol.hasInstance,Is=Symbol.toStringTag;class we 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(yf,(o,s)=>Ke(r[s])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,o,s){const i=new ks(t,r,n,o);if(s)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Is]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,we)}static[Ps](t){return ks[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Je={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 o=n!=null&&n!==r?` (cast from the value \`${Ke(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ke(r,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Ke(r,!0)}\``+o}},Fe={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"},ft={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"},jn={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},zn={isValue:"${path} field must be ${value}"},Or={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},$r={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"},Ms={notType:e=>{const{path:t,value:r,spec:n}=e,o=n.types.length;if(Array.isArray(r)){if(r.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${r.length} for value: \`${Ke(r,!0)}\``;if(r.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${r.length} for value: \`${Ke(r,!0)}\``}return we.formatError(Je.notType,e)}};var Ds=Object.assign(Object.create(null),{mixed:Je,string:Fe,number:ft,date:jn,object:Or,array:$r,boolean:zn,tuple:Ms});const Tt=e=>e&&e.__isYupSchema__;class Pr{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:o,otherwise:s}=r,i=typeof n=="function"?n:(...a)=>a.every(u=>u===n);return new Pr(t,(a,u)=>{var c;let d=i(...a)?o:s;return(c=d==null?void 0:d(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)),o=this.fn(n,t,r);if(o===void 0||o===t)return t;if(!Tt(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}}const Ir={context:"$",value:"."};function bf(e,t){return new dt(e,t)}class dt{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]===Ir.context,this.isValue=this.key[0]===Ir.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Ir.context:this.isValue?Ir.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&vt.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let o=this.isContext?n:this.isValue?t:r;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}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}}dt.prototype.__isYupRef=!0;const He=e=>e==null;function xt(e){function t({value:r,path:n="",options:o,originalValue:s,schema:i},a,u){const{name:c,test:d,params:f,message:p,skipAbsent:y}=e;let{parent:b,context:h,abortEarly:S=i.spec.abortEarly,disableStackTrace:x=i.spec.disableStackTrace}=o;function D(O){return dt.isRef(O)?O.getValue(r,b,h):O}function A(O={}){const z=Object.assign({value:r,originalValue:s,label:i.spec.label,path:O.path||n,spec:i.spec,disableStackTrace:O.disableStackTrace||x},f,O.params);for(const ee of Object.keys(z))z[ee]=D(z[ee]);const q=new we(we.formatError(O.message||p,z),r,z.path,O.type||c,z.disableStackTrace);return q.params=z,q}const _=S?a:u;let w={path:n,parent:b,type:c,from:o.from,createError:A,resolve:D,options:o,originalValue:s,schema:i};const P=O=>{we.isError(O)?_(O):O?u(null):_(A())},F=O=>{we.isError(O)?_(O):a(O)};if(y&&He(r))return P(!0);let j;try{var m;if(j=d.call(w,r,w),typeof((m=j)==null?void 0:m.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${w.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(P,F)}}catch(O){F(O);return}P(j)}return t.OPTIONS=e,t}function Bn(e,t,r,n=r){let o,s,i;return t?(vt.forEach(t,(a,u,c)=>{let d=u?a.slice(1,a.length-1):a;e=e.resolve({context:n,parent:o,value:r});let f=e.type==="tuple",p=c?parseInt(d,10):0;if(e.innerType||f){if(f&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${i}" must contain an index to the tuple element, e.g. "${i}[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. `);o=r,r=r&&r[p],e=f?e.spec.types[p]:e.innerType}if(!c){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${i} which is a type: "${e.type}")`);o=r,r=r&&r[d],e=e.fields[d]}s=d,i=u?"["+a+"]":"."+a}),{schema:e,parent:o,parentPath:s}):{parent:o,parentPath:t,schema:e}}function vf(e,t,r,n){return Bn(e,t,r,n).schema}class kr extends Set{describe(){const t=[];for(const r of this.values())t.push(dt.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 kr(this.values())}merge(t,r){const n=this.clone();return t.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}}function At(e,t=new Map){if(Tt(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]=At(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,o]of e.entries())r.set(n,At(o,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(At(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,o]of Object.entries(e))r[n]=At(o,t)}else throw Error(`Unable to clone ${e}`);return r}class Ae{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 kr,this._blacklist=new kr,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Je.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=At(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 o=Object.assign({},r.spec,n.spec);return n.spec=o,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(i=>{s.test(i.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((o,s)=>s.resolve(o,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,o,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:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),o=r.assert==="ignore-optionality",s=n._cast(t,r);if(r.assert!==!1&&!n.isType(s)){if(o&&He(s))return s;let i=Ke(t),a=Ke(s);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
2
2
 
3
3
  attempted value: ${i}
4
- `+(a!==i?`result of cast: ${a}`:""))}return s}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((o,s)=>s.call(this,o,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,o){let{path:s,originalValue:i=t,strict:a=this.spec.strict}=r,c=t;a||(c=this._cast(c,Object.assign({assert:!1},r)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:s,value:c,originalValue:i,options:r,tests:u},n,f=>{if(f.length)return o(f,c);this.runTests({path:s,value:c,originalValue:i,options:r,tests:this.tests},n,o)})}runTests(t,r,n){let o=!1,{tests:s,value:i,originalValue:a,path:c,options:u}=t,f=h=>{o||(o=!0,r(h,i))},d=h=>{o||(o=!0,n(h,i))},p=s.length,y=[];if(!p)return d([]);let b={value:i,originalValue:a,path:c,options:u,schema:this};for(let h=0;h<s.length;h++){const S=s[h];S(b,f,function(k){k&&(Array.isArray(k)?y.push(...k):y.push(k)),--p<=0&&d(y)})}}asNestedTest({key:t,index:r,parent:n,parentPath:o,originalParent:s,options:i}){const a=t??r;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof a=="number";let u=n[a];const f=Object.assign({},i,{strict:!0,parent:n,value:u,originalValue:s[a],key:void 0,[c?"index":"key"]:a,path:c||a.includes(".")?`${o||""}[${c?a:`"${a}"`}]`:(o?`${o}.`:"")+t});return(d,p,y)=>this.resolve(f)._validate(u,f,p,y)}validate(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),s=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return new Promise((i,a)=>o._validate(t,r,(c,u)=>{_e.isError(c)&&(c.value=u),a(c)},(c,u)=>{c.length?a(new _e(c,u,void 0,void 0,s)):i(u)}))}validateSync(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),s,i=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return o._validate(t,Object.assign({},r,{sync:!0}),(a,c)=>{throw _e.isError(a)&&(a.value=c),a},(a,c)=>{if(a.length)throw new _e(a,t,void 0,void 0,i);s=c}),s}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(_e.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(_e.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):xt(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=Et({message:r,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Et({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Je.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Je.notNull){return this.nullability(!1,t)}required(t=Je.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=Je.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=Et(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(i=>!(i.OPTIONS.name===r.name&&(s||i.OPTIONS.test===o.OPTIONS.test))),n.tests.push(o),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),o=Os(t).map(s=>new dt(s));return o.forEach(s=>{s.isSibling&&n.deps.push(s.key)}),n.conditions.push(typeof r=="function"?new $r(o,r):$r.fromOptions(o,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Et({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=Je.oneOf){let n=this.clone();return t.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=Et({message:r,name:"oneOf",skipAbsent:!0,test(o){let s=this.schema._whitelist,i=s.resolveAll(this.resolve);return i.includes(o)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:i}})}}),n}notOneOf(t,r=Je.notOneOf){let n=this.clone();return t.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=Et({message:r,name:"notOneOf",test(o){let s=this.schema._blacklist,i=s.resolveAll(this.resolve);return i.includes(o)?this.createError({params:{values:Array.from(s).join(", "),resolved:i}}):!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:o,optional:s,nullable:i}=r.spec;return{meta:o,label:n,optional:s,nullable:i,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,u,f)=>f.findIndex(d=>d.name===c.name)===u)}}}Ae.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Ae.prototype[`${e}At`]=function(t,r,n={}){const{parent:o,parentPath:s,schema:i}=jn(this,t,r,n.context);return i[e](o&&o[s],Object.assign({},n,{parent:o,path:t}))};for(const e of["equals","is"])Ae.prototype[e]=Ae.prototype.oneOf;for(const e of["not","nope"])Ae.prototype[e]=Ae.prototype.notOneOf;const Tf=()=>!0;function kr(e){return new zn(e)}class zn extends Ae{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Tf},t))}}kr.prototype=zn.prototype;function Bn(){return new Un}class Un extends Ae{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=Ln.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return He(r)||r===!0}})}isFalse(t=Ln.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return He(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)}}Bn.prototype=Un.prototype;const Sf=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function _f(e){const t=Vn(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 Vn(e){var t,r;const n=Sf.exec(e);return n?{year:rt(n[1]),month:rt(n[2],1)-1,day:rt(n[3],1),hour:rt(n[4]),minute:rt(n[5]),second:rt(n[6]),millisecond:n[7]?rt(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:rt(n[10]),minuteOffset:rt(n[11])}:null}function rt(e,t=0){return Number(e)||t}let wf=/^[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])?)*$/,Cf=/^((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,Ef=/^(?:[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,xf="^\\d{4}-\\d{2}-\\d{2}",Af="\\d{2}:\\d{2}:\\d{2}",Of="(([+-]\\d{2}(:?\\d{2})?)|Z)",$f=new RegExp(`${xf}T${Af}(\\.\\d+)?${Of}$`),Pf=e=>He(e)||e===e.trim(),If={}.toString();function Dr(){return new Gn}class Gn extends Ae{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 o=t!=null&&t.toString?t.toString():t;return o===If?t:o})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Je.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=Fe.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=Fe.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=Fe.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,o,s;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:o,name:s}=r:o=r),this.test({name:s||"matches",message:o||Fe.matches,params:{regex:t},skipAbsent:!0,test:i=>i===""&&n||i.search(t)!==-1})}email(t=Fe.email){return this.matches(wf,{name:"email",message:t,excludeEmptyString:!0})}url(t=Fe.url){return this.matches(Cf,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Fe.uuid){return this.matches(Ef,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,o;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:o=void 0}=t:r=t),this.matches($f,{name:"datetime",message:r||Fe.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Fe.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:s=>{if(!s||n)return!0;const i=Vn(s);return i?!!i.z:!1}}).test({name:"datetime_precision",message:r||Fe.datetime_precision,params:{precision:o},skipAbsent:!0,test:s=>{if(!s||o==null)return!0;const i=Vn(s);return i?i.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Fe.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Pf})}lowercase(t=Fe.lowercase){return this.transform(r=>He(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>He(r)||r===r.toLowerCase()})}uppercase(t=Fe.uppercase){return this.transform(r=>He(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>He(r)||r===r.toUpperCase()})}}Dr.prototype=Gn.prototype;let kf=e=>e!=+e;function Fs(){return new Wn}class Wn extends Ae{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!kf(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return n.isType(o)||o===null?o:parseFloat(o)})})}min(t,r=ft.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=ft.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=ft.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=ft.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=ft.positive){return this.moreThan(0,t)}negative(t=ft.negative){return this.lessThan(0,t)}integer(t=ft.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>He(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(o=>He(o)?o:Math[t](o))}}Fs.prototype=Wn.prototype;let Ns=new Date(""),Df=e=>Object.prototype.toString.call(e)==="[object Date]";function Hn(){return new At}class At extends Ae{constructor(){super({type:"date",check(t){return Df(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=_f(t),isNaN(t)?At.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(dt.isRef(t))n=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=o}return n}min(t,r=Nn.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(n)}})}max(t,r=Nn.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(n)}})}}At.INVALID_DATE=Ns,Hn.prototype=At.prototype,Hn.INVALID_DATE=Ns;function Mf(e,t=[]){let r=[],n=new Set,o=new Set(t.map(([i,a])=>`${i}-${a}`));function s(i,a){let c=bt.split(i)[0];n.add(c),o.has(`${a}-${c}`)||r.push([a,c])}for(const i of Object.keys(e)){let a=e[i];n.add(i),dt.isRef(a)&&a.isSibling?s(a.path,i):vt(a)&&"deps"in a&&a.deps.forEach(c=>s(c,i))}return uf.array(Array.from(n),r).reverse()}function Ls(e,t){let r=1/0;return e.some((n,o)=>{var s;if((s=t.path)!=null&&s.includes(n))return r=o,!0}),r}function js(e){return(t,r)=>Ls(e,t)-Ls(e,r)}const zs=(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 Mr(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Mr(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Mr(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Mr)}):"optional"in e?e.optional():e}const Ff=(e,t)=>{const r=[...bt.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),o=bt.getter(bt.join(r),!0)(e);return!!(o&&n in o)};let Bs=e=>Object.prototype.toString.call(e)==="[object Object]";function Us(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Nf=js([]);function rr(e){return new Yn(e)}class Yn extends Ae{constructor(t){super({type:"object",check(r){return Bs(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Nf,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let o=super._cast(t,r);if(o===void 0)return this.getDefault(r);if(!this._typeCheck(o))return o;let s=this.fields,i=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(o).filter(d=>!this._nodes.includes(d))),c={},u=Object.assign({},r,{parent:c,__validating:r.__validating||!1}),f=!1;for(const d of a){let p=s[d],y=d in o;if(p){let b,h=o[d];u.path=(r.path?`${r.path}.`:"")+d,p=p.resolve({value:h,context:r.context,parent:c});let S=p instanceof Ae?p.spec:void 0,C=S==null?void 0:S.strict;if(S!=null&&S.strip){f=f||d in o;continue}b=!r.__validating||!C?p.cast(o[d],u):o[d],b!==void 0&&(c[d]=b)}else y&&!i&&(c[d]=o[d]);(y!==d in c||c[d]!==o[d])&&(f=!0)}return f?c:o}_validate(t,r={},n,o){let{from:s=[],originalValue:i=t,recursive:a=this.spec.recursive}=r;r.from=[{schema:this,value:i},...s],r.__validating=!0,r.originalValue=i,super._validate(t,r,n,(c,u)=>{if(!a||!Bs(u)){o(c,u);return}i=i||u;let f=[];for(let d of this._nodes){let p=this.fields[d];!p||dt.isRef(p)||f.push(p.asNestedTest({options:r,key:d,parent:u,parentPath:r.path,originalParent:i}))}this.runTests({tests:f,value:u,originalValue:i,options:r},n,d=>{o(d.sort(this._sortErrors).concat(c),u)})})}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[o,s]of Object.entries(this.fields)){const i=n[o];n[o]=i===void 0?s:i}return r.withMutation(o=>o.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 o;const s=this.fields[n];let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[n]})),r[n]=s&&"getDefault"in s?s.getDefault(i):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Mf(t,r),n._sortErrors=js(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let o=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),o=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),o)})}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 Mr(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,o])=>t.includes(n)&&t.includes(o)))}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 o=bt.getter(t,!0);return this.transform(s=>{if(!s)return s;let i=s;return Ff(s,t)&&(i=Object.assign({},s),n||delete i[t],i[r]=o(s)),i})}json(){return this.transform(zs)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Ar.exact,test(r){if(r==null)return!0;const n=Us(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Ar.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(o){if(o==null)return!0;const s=Us(this.schema,o);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Ar.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const o of Object.keys(r))n[t(o)]=r[o];return n})}camelCase(){return this.transformKeys(Mn.camelCase)}snakeCase(){return this.transformKeys(Mn.snakeCase)}constantCase(){return this.transformKeys(t=>Mn.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[s,i]of Object.entries(r.fields)){var o;let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),n.fields[s]=i.describe(a)}return n}}rr.prototype=Yn.prototype;function qn(e){return new Kn(e)}class Kn extends Ae{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 o=!1;const s=n.map((i,a)=>{const c=this.innerType.cast(i,Object.assign({},r,{path:`${r.path||""}[${a}]`}));return c!==i&&(o=!0),c});return o?s:n}_validate(t,r={},n,o){var s;let i=this.innerType,a=(s=r.recursive)!=null?s:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(c,u)=>{var f;if(!a||!i||!this._typeCheck(u)){o(c,u);return}let d=new Array(u.length);for(let y=0;y<u.length;y++){var p;d[y]=i.asNestedTest({options:r,index:y,parent:u,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p:t})}this.runTests({value:u,tests:d,originalValue:(f=r.originalValue)!=null?f:t,options:r},n,y=>o(y.concat(c),u))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(zs)}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(!vt(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Ke(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=Or.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||Or.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||Or.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,o,s)=>!t(n,o,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 o;let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[0]})),n.innerType=r.innerType.describe(s)}return n}}qn.prototype=Kn.prototype;function Vs(e){return new Jn(e)}class Jn extends Ae{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(Ds.notType)})}_cast(t,r){const{types:n}=this.spec,o=super._cast(t,r);if(!this._typeCheck(o))return o;let s=!1;const i=n.map((a,c)=>{const u=a.cast(o[c],Object.assign({},r,{path:`${r.path||""}[${c}]`}));return u!==o[c]&&(s=!0),u});return s?i:o}_validate(t,r={},n,o){let s=this.spec.types;super._validate(t,r,n,(i,a)=>{var c;if(!this._typeCheck(a)){o(i,a);return}let u=[];for(let[d,p]of s.entries()){var f;u[d]=p.asNestedTest({options:r,index:d,parent:a,parentPath:r.path,originalParent:(f=r.originalValue)!=null?f:t})}this.runTests({value:a,tests:u,originalValue:(c=r.originalValue)!=null?c:t,options:r},n,d=>o(d.concat(i),a))})}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);return n.innerType=r.spec.types.map((o,s)=>{var i;let a=t;return(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),o.describe(a)}),n}}Vs.prototype=Jn.prototype;function Lf(e){return new Fr(e)}function Gs(e){try{return e()}catch(t){if(_e.isError(t))return Promise.reject(t);throw t}}class Fr{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(r,n={})=>{let o=this.builder(r,n);if(!vt(o))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(o=o.optional()),o.resolve(n)},this.builder=t,this.spec={meta:void 0,optional:!1}}clone(t){const r=new Fr(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:o,options:s}=t,i=o[n??r];return this._resolve(i,Object.assign({},s,{value:i,parent:o})).asNestedTest(t)}validate(t,r){return Gs(()=>this._resolve(t,r).validate(t,r))}validateSync(t,r){return this._resolve(t,r).validateSync(t,r)}validateAt(t,r,n){return Gs(()=>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(_e.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 jf(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(r=>{Ms[t][r]=e[t][r]})})}function zf(e,t,r){if(!e||!vt(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 Ws=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:Kn,BooleanSchema:Un,DateSchema:At,LazySchema:Fr,MixedSchema:zn,NumberSchema:Wn,ObjectSchema:Yn,Schema:Ae,StringSchema:Gn,TupleSchema:Jn,ValidationError:_e,addMethod:zf,array:qn,bool:Bn,boolean:Bn,date:Hn,defaultLocale:Ms,getIn:jn,isSchema:vt,lazy:Lf,mixed:kr,number:Fs,object:rr,printValue:Ke,reach:vf,ref:bf,setLocale:jf,string:Dr,tuple:Vs},Symbol.toStringTag,{value:"Module"})),Hs=e=>{const t=e.reduce((r,n)=>{let{name:o,required:s,type:i}=n;switch(i){case"RelatedList":i="array";break;case"Integer":case"Float":i="number";break;case"Related":case"Geometry":case"Raw":i="mixed";break;default:i="string"}let a;try{s?a=Ws[i]().typeError(`Field must be of type ${i}`).required("Field is required"):a=Ws[i]().typeError(`Field must be of type ${i}`).nullable(!0)}catch(c){console.log(c)}return r[o]=a,r},{});return rr().shape(t)},Ys=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,Bf=e=>e?{...e,add:{columns:e.add_columns,title:e.add_title,schema:Hs(e.add_columns),defaultValues:Ts(e.add_columns)},edit:{columns:e.edit_columns,title:e.edit_title,schema:Hs(e.edit_columns),defaultValues:Ts(e.edit_columns)}}:null,Uf=async(e,t,r)=>{const{fetchPath:n,options:o}=Pe({path:Te(t,"/download"),method:"POST"}),s=await fetch(n,{...o,body:JSON.stringify(r)});let i=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?i=await s.json():i=await s.blob(),!s.ok)throw typeof i=="object"?new Error(typeof i.detail=="string"?i.detail:JSON.stringify(i,null,2)):new Error(i);const c=document.createElement("a"),u=URL.createObjectURL(i);c.href=u,c.download=e.toLowerCase()+".csv",c.click()};function Vf({path:e,initialQueryParams:t,relation:r,fetchInfo:n=!0,clearInfoOnRefetch:o=!1,clearDataOnRefetch:s=!1,resetQueryParamsOnPathChange:i=!0,infoQueryProps:a,dataQueryProps:c,streaming:u=!1}){const[f,d]=v.useState(t?wr(null,t):null),p=v.useMemo(()=>r?{...f,filters:[...f.filters,{col:r.foreign_key,opr:r.type,value:je(r.id)}]}:f,[r,f]),y=v.useCallback(H=>d(x=>{if(typeof H=="function"&&(H=H(x)),!x)return wr(null,H);const w=wr({...x},H);if((H.filters||H.order_column||H.order_direction)&&!H.page&&(w.page=0),u){if(H.page&&H.page!==x.page&&!H.streaming)throw new Error("You cannot change page in streaming mode, use streaming.fetch() instead");if(H.page_size&&H.page_size!==x.page_size)throw new Error("You cannot change page size in streaming mode, use streaming.fetch() instead")}return w}),[u]),[b,h]=v.useState(null),S=v.useMemo(()=>b,[b]),C=v.useCallback(()=>h(null),[]),{data:k,isFetching:O,refetch:A,error:_}=tt.useQuery({queryKey:[`info-${e}`],queryFn:({signal:H})=>Hu(Te(e,"_info"),H).then(Bf),enabled:n,placeholderData:o?null:tt.keepPreviousData,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,...a}),{data:P,isFetching:L,refetch:W,error:Z}=tt.useQuery({queryKey:[`data-${e}`,JSON.stringify(p)],queryFn:({signal:H})=>p?qu(Te(e,"/"),p,H).then(x=>({...x,result:x.result.map((w,G)=>({...w,id:x.ids[G]}))})):null,placeholderData:s?null:tt.keepPreviousData,staleTime:1/0,refetchOnReconnect:"always",refetchOnWindowFocus:"always",...c});v.useEffect(()=>{p&&W()},[W,p]),v.useEffect(()=>{if(_){h({message:"Couldn't fetch info",originalError:_});return}if(Z){h({message:"Couldn't fetch list",originalError:Z});return}C()},[_,Z,C]);const m=v.useMemo(()=>O||L,[O,L]);be.useDidUpdate(()=>{if(!i)return;const H=wr(null,t);f!=null&&f.page_size&&(H.page_size=f.page_size),y(H)},[e]);const $=v.useCallback(async H=>{try{const x=await Yu(e,je(H));return C(),x}catch(x){h({message:`Couldn't fetch item with id ${H}`,originalError:x})}},[e,C]),N=v.useCallback(async(H,x)=>{try{const w=await Gu(e,H);return x||(A(),W()),C(),w}catch(w){h({message:"Couldn't add item",originalError:w})}},[W,A,e,C]),K=v.useCallback(async(H,x,w)=>{try{const G=await Ku(e,je(H),x);return w||(A(),W()),C(),G}catch(G){h({message:`Couldn't update item with id ${H}`,originalError:G})}},[W,A,e,C]),Q=v.useCallback(async(H,x)=>{try{const w=await Wu(e,je(H));return x||(A(),W()),C(),w}catch(w){h({message:`Couldn't delete item with id ${H}`,originalError:w})}},[W,A,e,C]),fe=v.useCallback(async H=>{try{await Uf(H,e,p)}catch(x){h({message:"Couldn't download",originalError:x})}},[e,p]),[de,ge]=be.useSetState({data:{},isEnd:!1,fetch:()=>null});v.useEffect(()=>{u&&ge({fetch:()=>y({page:0,streaming:!0})})},[y,ge,u]),v.useEffect(()=>{u&&P&&ge(H=>{let x=Object.keys(H.data).length;const w={isEnd:!1};return p.page<x?(x=p.page,w.data={[p.page]:P.result}):w.data={...H.data,[p.page]:P.result},P.result.length<p.page_size?(w.isEnd=!0,w.fetch=()=>null):w.fetch=()=>y({page:x+1,streaming:!0}),w})},[P,y,ge,u]);const Ce=v.useMemo(()=>{const H={all:"all",actions:"actions"};return P==null||P.list_columns.forEach(x=>{H[x]&&(H[x]=`_${x}`)}),H},[P==null?void 0:P.list_columns]);return{path:e,data:P,info:k,queryParams:p,loading:m,error:S,streaming:de,specialKey:Ce,setQueryParams:y,refetch:W,refetchInfo:A,getEntry:$,addEntry:N,updateEntry:K,deleteEntry:Q,download:fe}}const Gf=async(e,t,r)=>{const{fetchPath:n,options:o}=Pe({path:Te(e,"/bulk",t),method:"POST",body:r}),s=await fetch(n,o);let i=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?i=await s.json():i=await s.text(),!s.ok)throw typeof i=="object"?new Error(typeof i.detail=="string"?i.detail:JSON.stringify(i,null,2)):new Error(i);return i},Wf=({Api:e})=>{const[t,r]=v.useState([]),[n,o]=v.useState(null),s=v.useCallback(async(a,c)=>{try{o(null);const u=await Gf(e.path,a,t);return c?void 0:(e.refetch(),u)}catch(u){console.error(u),o({message:"Couldn't perform bulk action",originalError:u})}},[e,t]);return{bulkActions:v.useMemo(()=>({selectedIds:t,setSelectedIds:r}),[t,r]),dispatchBulkActions:s,error:n}};function qs({resource_name:e="",initialQueryParams:t,relation:r,fetchInfo:n,clearInfoOnRefetch:o,clearDataOnRefetch:s,resetQueryParamsOnPathChange:i,infoQueryProps:a,dataQueryProps:c,children:u,streaming:f}){const{baseUrl:d}=bs(),p=Vf({path:Te(d,e),initialQueryParams:t,relation:r,fetchInfo:n,clearInfoOnRefetch:o,clearDataOnRefetch:s,resetQueryParamsOnPathChange:i,infoQueryProps:a,dataQueryProps:c,streaming:f}),y=tr(p),b=Wf({path:Te(d,e),Api:p}),h=tr(b);return l.jsx(hs.Provider,{value:y,children:l.jsx(vs.Provider,{value:h,children:u})})}/**
4
+ `+(a!==i?`result of cast: ${a}`:""))}return s}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((o,s)=>s.call(this,o,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,o){let{path:s,originalValue:i=t,strict:a=this.spec.strict}=r,u=t;a||(u=this._cast(u,Object.assign({assert:!1},r)));let c=[];for(let d of Object.values(this.internalTests))d&&c.push(d);this.runTests({path:s,value:u,originalValue:i,options:r,tests:c},n,d=>{if(d.length)return o(d,u);this.runTests({path:s,value:u,originalValue:i,options:r,tests:this.tests},n,o)})}runTests(t,r,n){let o=!1,{tests:s,value:i,originalValue:a,path:u,options:c}=t,d=h=>{o||(o=!0,r(h,i))},f=h=>{o||(o=!0,n(h,i))},p=s.length,y=[];if(!p)return f([]);let b={value:i,originalValue:a,path:u,options:c,schema:this};for(let h=0;h<s.length;h++){const S=s[h];S(b,d,function(D){D&&(Array.isArray(D)?y.push(...D):y.push(D)),--p<=0&&f(y)})}}asNestedTest({key:t,index:r,parent:n,parentPath:o,originalParent:s,options:i}){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 d=Object.assign({},i,{strict:!0,parent:n,value:c,originalValue:s[a],key:void 0,[u?"index":"key"]:a,path:u||a.includes(".")?`${o||""}[${u?a:`"${a}"`}]`:(o?`${o}.`:"")+t});return(f,p,y)=>this.resolve(d)._validate(c,d,p,y)}validate(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),s=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return new Promise((i,a)=>o._validate(t,r,(u,c)=>{we.isError(u)&&(u.value=c),a(u)},(u,c)=>{u.length?a(new we(u,c,void 0,void 0,s)):i(c)}))}validateSync(t,r){var n;let o=this.resolve(Object.assign({},r,{value:t})),s,i=(n=r==null?void 0:r.disableStackTrace)!=null?n:o.spec.disableStackTrace;return o._validate(t,Object.assign({},r,{sync:!0}),(a,u)=>{throw we.isError(a)&&(a.value=u),a},(a,u)=>{if(a.length)throw new we(a,t,void 0,void 0,i);s=u}),s}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(we.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(we.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):At(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=xt({message:r,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=xt({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Je.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Je.notNull){return this.nullability(!1,t)}required(t=Je.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=Je.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=xt(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(i=>!(i.OPTIONS.name===r.name&&(s||i.OPTIONS.test===o.OPTIONS.test))),n.tests.push(o),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),o=Os(t).map(s=>new dt(s));return o.forEach(s=>{s.isSibling&&n.deps.push(s.key)}),n.conditions.push(typeof r=="function"?new Pr(o,r):Pr.fromOptions(o,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=xt({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=Je.oneOf){let n=this.clone();return t.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=xt({message:r,name:"oneOf",skipAbsent:!0,test(o){let s=this.schema._whitelist,i=s.resolveAll(this.resolve);return i.includes(o)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:i}})}}),n}notOneOf(t,r=Je.notOneOf){let n=this.clone();return t.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=xt({message:r,name:"notOneOf",test(o){let s=this.schema._blacklist,i=s.resolveAll(this.resolve);return i.includes(o)?this.createError({params:{values:Array.from(s).join(", "),resolved:i}}):!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:o,optional:s,nullable:i}=r.spec;return{meta:o,label:n,optional:s,nullable:i,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,d)=>d.findIndex(f=>f.name===u.name)===c)}}}Ae.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Ae.prototype[`${e}At`]=function(t,r,n={}){const{parent:o,parentPath:s,schema:i}=Bn(this,t,r,n.context);return i[e](o&&o[s],Object.assign({},n,{parent:o,path:t}))};for(const e of["equals","is"])Ae.prototype[e]=Ae.prototype.oneOf;for(const e of["not","nope"])Ae.prototype[e]=Ae.prototype.notOneOf;const Tf=()=>!0;function Mr(e){return new Un(e)}class Un extends Ae{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Tf},t))}}Mr.prototype=Un.prototype;function Vn(){return new Gn}class Gn extends Ae{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=zn.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return He(r)||r===!0}})}isFalse(t=zn.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return He(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)}}Vn.prototype=Gn.prototype;const Sf=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function _f(e){const t=Wn(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 Wn(e){var t,r;const n=Sf.exec(e);return n?{year:rt(n[1]),month:rt(n[2],1)-1,day:rt(n[3],1),hour:rt(n[4]),minute:rt(n[5]),second:rt(n[6]),millisecond:n[7]?rt(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:rt(n[10]),minuteOffset:rt(n[11])}:null}function rt(e,t=0){return Number(e)||t}let wf=/^[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])?)*$/,Cf=/^((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,Ef=/^(?:[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,xf="^\\d{4}-\\d{2}-\\d{2}",Af="\\d{2}:\\d{2}:\\d{2}",Of="(([+-]\\d{2}(:?\\d{2})?)|Z)",$f=new RegExp(`${xf}T${Af}(\\.\\d+)?${Of}$`),Pf=e=>He(e)||e===e.trim(),If={}.toString();function Dr(){return new Hn}class Hn extends Ae{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 o=t!=null&&t.toString?t.toString():t;return o===If?t:o})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Je.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=Fe.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=Fe.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=Fe.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,o,s;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:o,name:s}=r:o=r),this.test({name:s||"matches",message:o||Fe.matches,params:{regex:t},skipAbsent:!0,test:i=>i===""&&n||i.search(t)!==-1})}email(t=Fe.email){return this.matches(wf,{name:"email",message:t,excludeEmptyString:!0})}url(t=Fe.url){return this.matches(Cf,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Fe.uuid){return this.matches(Ef,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,o;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:o=void 0}=t:r=t),this.matches($f,{name:"datetime",message:r||Fe.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Fe.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:s=>{if(!s||n)return!0;const i=Wn(s);return i?!!i.z:!1}}).test({name:"datetime_precision",message:r||Fe.datetime_precision,params:{precision:o},skipAbsent:!0,test:s=>{if(!s||o==null)return!0;const i=Wn(s);return i?i.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Fe.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Pf})}lowercase(t=Fe.lowercase){return this.transform(r=>He(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>He(r)||r===r.toLowerCase()})}uppercase(t=Fe.uppercase){return this.transform(r=>He(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>He(r)||r===r.toUpperCase()})}}Dr.prototype=Hn.prototype;let kf=e=>e!=+e;function Fs(){return new Yn}class Yn extends Ae{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!kf(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return n.isType(o)||o===null?o:parseFloat(o)})})}min(t,r=ft.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=ft.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=ft.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=ft.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=ft.positive){return this.moreThan(0,t)}negative(t=ft.negative){return this.lessThan(0,t)}integer(t=ft.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>He(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(o=>He(o)?o:Math[t](o))}}Fs.prototype=Yn.prototype;let Ns=new Date(""),Mf=e=>Object.prototype.toString.call(e)==="[object Date]";function qn(){return new Ot}class Ot extends Ae{constructor(){super({type:"date",check(t){return Mf(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=_f(t),isNaN(t)?Ot.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(dt.isRef(t))n=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=o}return n}min(t,r=jn.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(n)}})}max(t,r=jn.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(n)}})}}Ot.INVALID_DATE=Ns,qn.prototype=Ot.prototype,qn.INVALID_DATE=Ns;function Df(e,t=[]){let r=[],n=new Set,o=new Set(t.map(([i,a])=>`${i}-${a}`));function s(i,a){let u=vt.split(i)[0];n.add(u),o.has(`${a}-${u}`)||r.push([a,u])}for(const i of Object.keys(e)){let a=e[i];n.add(i),dt.isRef(a)&&a.isSibling?s(a.path,i):Tt(a)&&"deps"in a&&a.deps.forEach(u=>s(u,i))}return uf.array(Array.from(n),r).reverse()}function Ls(e,t){let r=1/0;return e.some((n,o)=>{var s;if((s=t.path)!=null&&s.includes(n))return r=o,!0}),r}function js(e){return(t,r)=>Ls(e,t)-Ls(e,r)}const zs=(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 Fr(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Fr(n);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 Ff=(e,t)=>{const r=[...vt.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),o=vt.getter(vt.join(r),!0)(e);return!!(o&&n in o)};let Bs=e=>Object.prototype.toString.call(e)==="[object Object]";function Us(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Nf=js([]);function nr(e){return new Kn(e)}class Kn extends Ae{constructor(t){super({type:"object",check(r){return Bs(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Nf,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let o=super._cast(t,r);if(o===void 0)return this.getDefault(r);if(!this._typeCheck(o))return o;let s=this.fields,i=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(o).filter(f=>!this._nodes.includes(f))),u={},c=Object.assign({},r,{parent:u,__validating:r.__validating||!1}),d=!1;for(const f of a){let p=s[f],y=f in o;if(p){let b,h=o[f];c.path=(r.path?`${r.path}.`:"")+f,p=p.resolve({value:h,context:r.context,parent:u});let S=p instanceof Ae?p.spec:void 0,x=S==null?void 0:S.strict;if(S!=null&&S.strip){d=d||f in o;continue}b=!r.__validating||!x?p.cast(o[f],c):o[f],b!==void 0&&(u[f]=b)}else y&&!i&&(u[f]=o[f]);(y!==f in u||u[f]!==o[f])&&(d=!0)}return d?u:o}_validate(t,r={},n,o){let{from:s=[],originalValue:i=t,recursive:a=this.spec.recursive}=r;r.from=[{schema:this,value:i},...s],r.__validating=!0,r.originalValue=i,super._validate(t,r,n,(u,c)=>{if(!a||!Bs(c)){o(u,c);return}i=i||c;let d=[];for(let f of this._nodes){let p=this.fields[f];!p||dt.isRef(p)||d.push(p.asNestedTest({options:r,key:f,parent:c,parentPath:r.path,originalParent:i}))}this.runTests({tests:d,value:c,originalValue:i,options:r},n,f=>{o(f.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[o,s]of Object.entries(this.fields)){const i=n[o];n[o]=i===void 0?s:i}return r.withMutation(o=>o.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 o;const s=this.fields[n];let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[n]})),r[n]=s&&"getDefault"in s?s.getDefault(i):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Df(t,r),n._sortErrors=js(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let o=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),o=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),o)})}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 Fr(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,o])=>t.includes(n)&&t.includes(o)))}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 o=vt.getter(t,!0);return this.transform(s=>{if(!s)return s;let i=s;return Ff(s,t)&&(i=Object.assign({},s),n||delete i[t],i[r]=o(s)),i})}json(){return this.transform(zs)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Or.exact,test(r){if(r==null)return!0;const n=Us(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Or.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(o){if(o==null)return!0;const s=Us(this.schema,o);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Or.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const o of Object.keys(r))n[t(o)]=r[o];return n})}camelCase(){return this.transformKeys(Nn.camelCase)}snakeCase(){return this.transformKeys(Nn.snakeCase)}constantCase(){return this.transformKeys(t=>Nn.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[s,i]of Object.entries(r.fields)){var o;let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),n.fields[s]=i.describe(a)}return n}}nr.prototype=Kn.prototype;function Jn(e){return new Zn(e)}class Zn extends Ae{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 o=!1;const s=n.map((i,a)=>{const u=this.innerType.cast(i,Object.assign({},r,{path:`${r.path||""}[${a}]`}));return u!==i&&(o=!0),u});return o?s:n}_validate(t,r={},n,o){var s;let i=this.innerType,a=(s=r.recursive)!=null?s:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(u,c)=>{var d;if(!a||!i||!this._typeCheck(c)){o(u,c);return}let f=new Array(c.length);for(let y=0;y<c.length;y++){var p;f[y]=i.asNestedTest({options:r,index:y,parent:c,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p:t})}this.runTests({value:c,tests:f,originalValue:(d=r.originalValue)!=null?d:t,options:r},n,y=>o(y.concat(u),c))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(zs)}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(!Tt(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Ke(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=$r.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||$r.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||$r.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,o,s)=>!t(n,o,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 o;let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[0]})),n.innerType=r.innerType.describe(s)}return n}}Jn.prototype=Zn.prototype;function Vs(e){return new Xn(e)}class Xn extends Ae{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(Ms.notType)})}_cast(t,r){const{types:n}=this.spec,o=super._cast(t,r);if(!this._typeCheck(o))return o;let s=!1;const i=n.map((a,u)=>{const c=a.cast(o[u],Object.assign({},r,{path:`${r.path||""}[${u}]`}));return c!==o[u]&&(s=!0),c});return s?i:o}_validate(t,r={},n,o){let s=this.spec.types;super._validate(t,r,n,(i,a)=>{var u;if(!this._typeCheck(a)){o(i,a);return}let c=[];for(let[f,p]of s.entries()){var d;c[f]=p.asNestedTest({options:r,index:f,parent:a,parentPath:r.path,originalParent:(d=r.originalValue)!=null?d:t})}this.runTests({value:a,tests:c,originalValue:(u=r.originalValue)!=null?u:t,options:r},n,f=>o(f.concat(i),a))})}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);return n.innerType=r.spec.types.map((o,s)=>{var i;let a=t;return(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[s]})),o.describe(a)}),n}}Vs.prototype=Xn.prototype;function Lf(e){return new Nr(e)}function Gs(e){try{return e()}catch(t){if(we.isError(t))return Promise.reject(t);throw t}}class Nr{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(r,n={})=>{let o=this.builder(r,n);if(!Tt(o))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(o=o.optional()),o.resolve(n)},this.builder=t,this.spec={meta:void 0,optional:!1}}clone(t){const r=new Nr(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:o,options:s}=t,i=o[n??r];return this._resolve(i,Object.assign({},s,{value:i,parent:o})).asNestedTest(t)}validate(t,r){return Gs(()=>this._resolve(t,r).validate(t,r))}validateSync(t,r){return this._resolve(t,r).validateSync(t,r)}validateAt(t,r,n){return Gs(()=>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(we.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 jf(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(r=>{Ds[t][r]=e[t][r]})})}function zf(e,t,r){if(!e||!Tt(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 Ws=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:Zn,BooleanSchema:Gn,DateSchema:Ot,LazySchema:Nr,MixedSchema:Un,NumberSchema:Yn,ObjectSchema:Kn,Schema:Ae,StringSchema:Hn,TupleSchema:Xn,ValidationError:we,addMethod:zf,array:Jn,bool:Vn,boolean:Vn,date:qn,defaultLocale:Ds,getIn:Bn,isSchema:Tt,lazy:Lf,mixed:Mr,number:Fs,object:nr,printValue:Ke,reach:vf,ref:bf,setLocale:jf,string:Dr,tuple:Vs},Symbol.toStringTag,{value:"Module"})),Hs=e=>{const t=e.reduce((r,n)=>{let{name:o,required:s,type:i}=n;switch(i){case"RelatedList":i="array";break;case"Integer":case"Float":i="number";break;case"Related":case"Geometry":case"Raw":i="mixed";break;default:i="string"}let a;try{s?a=Ws[i]().typeError(`Field must be of type ${i}`).required("Field is required"):a=Ws[i]().typeError(`Field must be of type ${i}`).nullable(!0)}catch(u){console.log(u)}return r[o]=a,r},{});return nr().shape(t)},Ys=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,Bf=e=>e?{...e,add:{columns:e.add_columns,title:e.add_title,schema:Hs(e.add_columns),defaultValues:Ts(e.add_columns)},edit:{columns:e.edit_columns,title:e.edit_title,schema:Hs(e.edit_columns),defaultValues:Ts(e.edit_columns)}}:null,Uf=async(e,t,r)=>{const{fetchPath:n,options:o}=Pe({path:Te(t,"/download"),method:"POST"}),s=await fetch(n,{...o,body:JSON.stringify(r)});let i=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?i=await s.json():i=await s.blob(),!s.ok)throw typeof i=="object"?new Error(typeof i.detail=="string"?i.detail:JSON.stringify(i,null,2)):new Error(i);const u=document.createElement("a"),c=URL.createObjectURL(i);u.href=c,u.download=e.toLowerCase()+".csv",u.click()};function Vf({path:e,initialQueryParams:t,relation:r,fetchInfo:n=!0,clearInfoOnRefetch:o=!1,clearDataOnRefetch:s=!1,resetQueryParamsOnPathChange:i=!0,infoQueryProps:a,dataQueryProps:u,streaming:c=!1}){const[d,f]=v.useState(t?Cr(null,t):null),p=v.useMemo(()=>r?{...d,filters:[...d.filters,{col:r.foreign_key,opr:r.type,value:je(r.id)}]}:d,[r,d]),y=v.useCallback(W=>f(E=>{if(typeof W=="function"&&(W=W(E)),!E)return Cr(null,W);const $=Cr({...E},W);if((W.filters||W.order_column||W.order_direction)&&!W.page&&($.page=0),c){if(W.page&&W.page!==E.page&&!W.streaming)throw new Error("You cannot change page in streaming mode, use streaming.fetch() instead");if(W.page_size&&W.page_size!==E.page_size)throw new Error("You cannot change page size in streaming mode, use streaming.fetch() instead")}return $}),[c]),[b,h]=v.useState(null),S=v.useMemo(()=>b,[b]),x=v.useCallback(()=>h(null),[]),{data:D,isFetching:A,refetch:_,error:w}=tt.useQuery({queryKey:[`info-${e}`],queryFn:({signal:W})=>Hu(Te(e,"_info"),W).then(Bf),enabled:n,placeholderData:o?null:tt.keepPreviousData,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,...a}),{data:P,isFetching:F,refetch:G,error:j}=tt.useQuery({queryKey:[`data-${e}`,JSON.stringify(p)],queryFn:({signal:W})=>p?qu(Te(e,"/"),p,W).then(E=>({...E,result:E.result.map(($,K)=>({...$,id:E.ids[K]}))})):null,placeholderData:s?null:tt.keepPreviousData,staleTime:1/0,refetchOnReconnect:"always",refetchOnWindowFocus:"always",...u});v.useEffect(()=>{p&&G()},[G,p]),v.useEffect(()=>{if(w){h({message:"Couldn't fetch info",originalError:w});return}if(j){h({message:"Couldn't fetch list",originalError:j});return}x()},[w,j,x]);const m=v.useMemo(()=>A||F,[A,F]);be.useDidUpdate(()=>{if(!i)return;const W=Cr(null,t);d!=null&&d.page_size&&(W.page_size=d.page_size),y(W)},[e]);const O=v.useCallback(async W=>{try{const E=await Yu(e,je(W));return x(),E}catch(E){h({message:`Couldn't fetch item with id ${W}`,originalError:E})}},[e,x]),z=v.useCallback(async(W,E)=>{try{const $=await Gu(e,W);return E||(_(),G()),x(),$}catch($){h({message:"Couldn't add item",originalError:$})}},[G,_,e,x]),q=v.useCallback(async(W,E,$)=>{try{const K=await Ku(e,je(W),E);return $||(_(),G()),x(),K}catch(K){h({message:`Couldn't update item with id ${W}`,originalError:K})}},[G,_,e,x]),ee=v.useCallback(async(W,E)=>{try{const $=await Wu(e,je(W));return E||(_(),G()),x(),$}catch($){h({message:`Couldn't delete item with id ${W}`,originalError:$})}},[G,_,e,x]),fe=v.useCallback(async W=>{try{await Uf(W,e,p)}catch(E){h({message:"Couldn't download",originalError:E})}},[e,p]),[se,ye]=be.useSetState({data:{},isEnd:!1,fetch:()=>null});v.useEffect(()=>{c&&ye({fetch:()=>y({page:0,streaming:!0})})},[y,ye,c]),v.useEffect(()=>{c&&P&&ye(W=>{let E=Object.keys(W.data).length;const $={isEnd:!1};return p.page<E?(E=p.page,$.data={[p.page]:P.result}):$.data={...W.data,[p.page]:P.result},P.result.length<p.page_size?($.isEnd=!0,$.fetch=()=>null):$.fetch=()=>y({page:E+1,streaming:!0}),$})},[P,y,ye,c]);const _e=v.useMemo(()=>{const W={all:"all",actions:"actions"};return P==null||P.list_columns.forEach(E=>{W[E]&&(W[E]=`_${E}`)}),W},[P==null?void 0:P.list_columns]);return{path:e,data:P,info:D,queryParams:p,loading:m,error:S,streaming:se,specialKey:_e,setQueryParams:y,refetch:G,refetchInfo:_,getEntry:O,addEntry:z,updateEntry:q,deleteEntry:ee,download:fe}}const Gf=async(e,t,r)=>{const{fetchPath:n,options:o}=Pe({path:Te(e,"/bulk",t),method:"POST",body:r}),s=await fetch(n,o);let i=null;const a=s.headers.get("content-type");if(a&&a.includes("application/json")?i=await s.json():i=await s.text(),!s.ok)throw typeof i=="object"?new Error(typeof i.detail=="string"?i.detail:JSON.stringify(i,null,2)):new Error(i);return i},Wf=({Api:e})=>{const[t,r]=v.useState([]),[n,o]=v.useState(null),s=v.useCallback(async(a,u)=>{try{o(null);const c=await Gf(e.path,a,t);return u?void 0:(e.refetch(),c)}catch(c){console.error(c),o({message:"Couldn't perform bulk action",originalError:c})}},[e,t]);return{bulkActions:v.useMemo(()=>({selectedIds:t,setSelectedIds:r}),[t,r]),dispatchBulkActions:s,error:n}};function qs({resource_name:e="",initialQueryParams:t,relation:r,fetchInfo:n,clearInfoOnRefetch:o,clearDataOnRefetch:s,resetQueryParamsOnPathChange:i,infoQueryProps:a,dataQueryProps:u,children:c,streaming:d}){const{baseUrl:f}=bs(),p=Vf({path:Te(f,e),initialQueryParams:t,relation:r,fetchInfo:n,clearInfoOnRefetch:o,clearDataOnRefetch:s,resetQueryParamsOnPathChange:i,infoQueryProps:a,dataQueryProps:u,streaming:d}),y=rr(p),b=Wf({path:Te(f,e),Api:p}),h=rr(b);return l.jsx(gs.Provider,{value:y,children:l.jsx(vs.Provider,{value:h,children:c})})}/**
5
5
  * @license @tabler/icons-react v3.29.0 - MIT
6
6
  *
7
7
  * This source code is licensed under the MIT license.
@@ -11,98 +11,98 @@ attempted value: ${i}
11
11
  *
12
12
  * This source code is licensed under the MIT license.
13
13
  * See the LICENSE file in the root directory of this source tree.
14
- */const we=(e,t,r,n)=>{const o=v.forwardRef(({color:s="currentColor",size:i=24,stroke:a=2,title:c,className:u,children:f,...d},p)=>v.createElement("svg",{ref:p,...Hf[e],width:i,height:i,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),strokeWidth:a,stroke:s,...d},[c&&v.createElement("title",{key:"svg-title"},c),...n.map(([y,b])=>v.createElement(y,b)),...Array.isArray(f)?f:[f]]));return o.displayName=`${r}`,o};/**
14
+ */const Ce=(e,t,r,n)=>{const o=v.forwardRef(({color:s="currentColor",size:i=24,stroke:a=2,title:u,className:c,children:d,...f},p)=>v.createElement("svg",{ref:p,...Hf[e],width:i,height:i,className:["tabler-icon",`tabler-icon-${t}`,c].join(" "),strokeWidth:a,stroke:s,...f},[u&&v.createElement("title",{key:"svg-title"},u),...n.map(([y,b])=>v.createElement(y,b)),...Array.isArray(d)?d:[d]]));return o.displayName=`${r}`,o};/**
15
15
  * @license @tabler/icons-react v3.29.0 - MIT
16
16
  *
17
17
  * This source code is licensed under the MIT license.
18
18
  * See the LICENSE file in the root directory of this source tree.
19
- */var Yf=we("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"}]]);/**
19
+ */var Yf=Ce("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"}]]);/**
20
20
  * @license @tabler/icons-react v3.29.0 - MIT
21
21
  *
22
22
  * This source code is licensed under the MIT license.
23
23
  * See the LICENSE file in the root directory of this source tree.
24
- */var qf=we("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"}]]);/**
24
+ */var qf=Ce("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"}]]);/**
25
25
  * @license @tabler/icons-react v3.29.0 - MIT
26
26
  *
27
27
  * This source code is licensed under the MIT license.
28
28
  * See the LICENSE file in the root directory of this source tree.
29
- */var Zn=we("outline","chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
29
+ */var Qn=Ce("outline","chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
30
30
  * @license @tabler/icons-react v3.29.0 - MIT
31
31
  *
32
32
  * This source code is licensed under the MIT license.
33
33
  * See the LICENSE file in the root directory of this source tree.
34
- */var Ks=we("outline","chevron-up","IconChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
34
+ */var Ks=Ce("outline","chevron-up","IconChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
35
35
  * @license @tabler/icons-react v3.29.0 - MIT
36
36
  *
37
37
  * This source code is licensed under the MIT license.
38
38
  * See the LICENSE file in the root directory of this source tree.
39
- */var Js=we("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"}]]);/**
39
+ */var Js=Ce("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"}]]);/**
40
40
  * @license @tabler/icons-react v3.29.0 - MIT
41
41
  *
42
42
  * This source code is licensed under the MIT license.
43
43
  * See the LICENSE file in the root directory of this source tree.
44
- */var Kf=we("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"}]]);/**
44
+ */var Kf=Ce("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"}]]);/**
45
45
  * @license @tabler/icons-react v3.29.0 - MIT
46
46
  *
47
47
  * This source code is licensed under the MIT license.
48
48
  * See the LICENSE file in the root directory of this source tree.
49
- */var Jf=we("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"}]]);/**
49
+ */var Jf=Ce("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"}]]);/**
50
50
  * @license @tabler/icons-react v3.29.0 - MIT
51
51
  *
52
52
  * This source code is licensed under the MIT license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
- */var Zf=we("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"}]]);/**
54
+ */var Zf=Ce("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"}]]);/**
55
55
  * @license @tabler/icons-react v3.29.0 - MIT
56
56
  *
57
57
  * This source code is licensed under the MIT license.
58
58
  * See the LICENSE file in the root directory of this source tree.
59
- */var Zs=we("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"}]]);/**
59
+ */var Zs=Ce("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"}]]);/**
60
60
  * @license @tabler/icons-react v3.29.0 - MIT
61
61
  *
62
62
  * This source code is licensed under the MIT license.
63
63
  * See the LICENSE file in the root directory of this source tree.
64
- */var Xf=we("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"}]]);/**
64
+ */var Xf=Ce("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"}]]);/**
65
65
  * @license @tabler/icons-react v3.29.0 - MIT
66
66
  *
67
67
  * This source code is licensed under the MIT license.
68
68
  * See the LICENSE file in the root directory of this source tree.
69
- */var Xs=we("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"}]]);/**
69
+ */var Xs=Ce("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"}]]);/**
70
70
  * @license @tabler/icons-react v3.29.0 - MIT
71
71
  *
72
72
  * This source code is licensed under the MIT license.
73
73
  * See the LICENSE file in the root directory of this source tree.
74
- */var Qf=we("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"}]]);/**
74
+ */var Qf=Ce("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"}]]);/**
75
75
  * @license @tabler/icons-react v3.29.0 - MIT
76
76
  *
77
77
  * This source code is licensed under the MIT license.
78
78
  * See the LICENSE file in the root directory of this source tree.
79
- */var Rf=we("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"}]]);/**
79
+ */var Rf=Ce("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"}]]);/**
80
80
  * @license @tabler/icons-react v3.29.0 - MIT
81
81
  *
82
82
  * This source code is licensed under the MIT license.
83
83
  * See the LICENSE file in the root directory of this source tree.
84
- */var Nr=we("outline","plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
84
+ */var Lr=Ce("outline","plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
85
85
  * @license @tabler/icons-react v3.29.0 - MIT
86
86
  *
87
87
  * This source code is licensed under the MIT license.
88
88
  * See the LICENSE file in the root directory of this source tree.
89
- */var ed=we("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"}]]);/**
89
+ */var ed=Ce("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"}]]);/**
90
90
  * @license @tabler/icons-react v3.29.0 - MIT
91
91
  *
92
92
  * This source code is licensed under the MIT license.
93
93
  * See the LICENSE file in the root directory of this source tree.
94
- */var Qs=we("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"}]]);/**
94
+ */var Qs=Ce("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"}]]);/**
95
95
  * @license @tabler/icons-react v3.29.0 - MIT
96
96
  *
97
97
  * This source code is licensed under the MIT license.
98
98
  * See the LICENSE file in the root directory of this source tree.
99
- */var td=we("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"}]]);/**
99
+ */var td=Ce("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"}]]);/**
100
100
  * @license @tabler/icons-react v3.29.0 - MIT
101
101
  *
102
102
  * This source code is licensed under the MIT license.
103
103
  * See the LICENSE file in the root directory of this source tree.
104
- */var rd=we("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function Rs(){const{error:e}=re(),[t,r]=v.useState(!1);return v.useEffect(()=>{e&&r(!0)},[e]),l.jsx(g.Modal,{opened:t,onClose:()=>r(!1),title:l.jsxs(g.Group,{children:[l.jsx(Yf,{size:16,color:"red"}),l.jsx(g.Text,{children:e?e.originalError.detail||e.originalError.message:"Error"})]}),centered:!0,children:e?l.jsx(g.Text,{children:e.message}):null})}function nd({opened:e,onClose:t,handleAccept:r,handleReject:n}){return l.jsxs(g.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(g.Group,{align:"right",mt:"xl",justify:"flex-end",children:[l.jsx(g.Button,{onClick:n,variant:"default",children:"Abbrechen"}),l.jsx(g.Button,{onClick:r,color:"red",children:"Löschen"})]})]})}function ei({id:e,...t}){const{deleteEntry:r}=re(),n={bg:"transparent",size:"sm",c:"gray"},o=g.useProps("ActionIcon",n,t),[s,i]=v.useState(!1),a=()=>{i(!1)},c=async()=>{r(e),i(!1)};return l.jsxs(l.Fragment,{children:[l.jsx(g.Tooltip,{label:"Delete",children:l.jsx(g.ActionIcon,{bg:o.bg,size:o.size,c:o.c,onClick:()=>{i(!0)},children:l.jsx(Qs,{})})}),l.jsx(nd,{opened:s,onClose:a,handleAccept:c,handleReject:a})]})}const Xn=(e,t)=>{const r=t.split("."),n=e[r[0]];if(r.length>1&&Array.isArray(n))return n.map(s=>Xn(s,r.slice(1).join("."))).join(", ");const o=t.split(".").reduce((s,i)=>s[i],e);return Ys(o)};function ti(e,t){return e===!0||Array.isArray(e)?t:Object.fromEntries(Object.keys(e).map(r=>[r,ti(e[r],t[r])]))}function ri(e,t){if(!e)return e;const r=t.values;return!r||!r.length||Array.isArray(e.id_)&&(e.id=e.id_),e}function od(e,t){const r={};return t.forEach(n=>{if(n.type==="Related"){r[n.name]=ri(e.result[n.name],n);return}if(n.type==="RelatedList"){r[n.name]=e.result[n.name].map(o=>ri(o,n));return}r[n.name]=typeof e.result[n.name]=="boolean"?String(e.result[n.name]):e.result[n.name]}),r}function Qn(e){return t=>{try{return e.validateSync(t,{abortEarly:!1}),{}}catch(r){const n={};return r instanceof _e&&r.inner.forEach(o=>{n[o.path.replaceAll("[",".").replaceAll("]","")]=o.message}),n}}}function sd({form:e,name:t,...r}){return l.jsx(l.Fragment,{children:l.jsx(ct.DateInput,{...e.getInputProps(t),onChange:n=>{if(n instanceof Date){const o=new Date(n.getTime()-n.getTimezoneOffset()*6e4);e.setFieldValue(t,o.toISOString().substring(0,10))}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...r})})}function id({form:e,name:t,...r}){return l.jsx(l.Fragment,{children:l.jsx(ct.DateTimePicker,{...e.getInputProps(t),onChange:n=>{if(n instanceof Date){const o=new Date(n);e.setFieldValue(t,o.toISOString())}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...r})})}function Lr({form:e,name:t,...r}){const n=e.getInputProps(t).value,o=v.useMemo(()=>n&&typeof n=="object"?JSON.stringify(n):n||"",[n]);return t==="password"?l.jsx(g.PasswordInput,{...e.getInputProps(t),value:o,...r}):l.jsx(g.TextInput,{...e.getInputProps(t),value:o,...r})}function ni({form:e,name:t,filter:r,...n}){const[o,s]=v.useState(""),i=e.getInputProps(t).value,a=v.useMemo(()=>i?typeof i=="object"?JSON.stringify(i,null,2):i:"",[i]);return v.useEffect(()=>{s(a)},[a]),r?l.jsx(Lr,{form:e,name:t,...n}):l.jsx(g.JsonInput,{autosize:!0,minRows:4,maxRows:12,validationError:"Invalid JSON",...e.getInputProps(t),...n,value:o,onChange:c=>{if(s(c),!c){e.getInputProps(t).onChange(null);return}try{const u=JSON.parse(c);e.getInputProps(t).onChange(u)}catch{}}})}function ad({form:e,name:t,filter:r,...n}){const[o,s]=v.useState(!!r);return l.jsxs(g.InputWrapper,{label:n.label,description:n.description,children:[!r&&l.jsxs(g.Group,{align:"center",gap:"xs",py:"0.25rem",children:[l.jsx(g.Checkbox,{checked:o,onChange:i=>s(i.currentTarget.checked)}),l.jsx(g.Text,{size:"xs",children:"WKT"})]}),o?l.jsx(Lr,{form:e,name:t,...n,label:void 0,description:void 0}):l.jsx(ni,{form:e,name:t,...n,label:void 0,description:void 0})]})}function ld({form:e,name:t,items:r,...n}){const o=r.map(i=>({value:String(je(i.id)),label:i.value})),s=Array.isArray(e.getInputProps(t).value)?e.getInputProps(t).value.map(i=>String(typeof i=="object"?je(i.id):i)):[];return l.jsx(g.MultiSelect,{data:o,searchable:!0,...e.getInputProps(t),value:s||[],...n})}function cd({form:e,name:t,items:r,filter:n,...o}){var i;const s=r.map(a=>({value:String(je(a.id)),label:a.value}));return l.jsx(g.Select,{data:s,searchable:!0,...e.getInputProps(t),onChange:a=>{if(n){e.setFieldValue(t,a);return}const c=r.find(u=>String(je(u.id))===a)||null;e.setFieldValue(t,c)},value:n?e.getInputProps(t).value:String(je((i=e.getInputProps(t).value)==null?void 0:i.id))||"",...o})}function oi({form:e,name:t,items:r,...n}){return l.jsx(g.Select,{data:r,searchable:!0,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...n})}function jr({form:e,name:t,schema:r,filter:n,withinPortal:o=!0,...s}){if(!r.type)return null;switch(r.type){case"Boolean":return l.jsx(oi,{form:e,name:t,items:[{label:"true",value:n?"1":"true"},{label:"false",value:n?"0":"false"}],...s});case"RelatedList":return l.jsx(ld,{form:e,name:t,items:r.values,comboboxProps:{withinPortal:o},...s});case"Related":return l.jsx(cd,{form:e,name:t,items:r.values,filter:n,comboboxProps:{withinPortal:o},...s});case"DateTime":return l.jsx(id,{form:e,name:t,valueFormat:"DD.MM.YYYY HH:mm:ss",schema:r,popoverProps:{withinPortal:o},...s});case"Date":return l.jsx(sd,{form:e,name:t,valueFormat:"DD.MM.YYYY",schema:r,popoverProps:{withinPortal:o},...s});case"Geometry":return l.jsx(ad,{form:e,name:t,filter:n,...s});case"Raw":return l.jsx(ni,{form:e,name:t,filter:n,...s});case"Integer":case"Float":return l.jsx(Lr,{form:e,name:t,...s});case"Enum":return l.jsx(oi,{form:e,name:t,items:r.values,comboboxProps:{withinPortal:o},...s});default:return l.jsx(Lr,{form:e,name:t,...s})}}function ud(e,t){return new Promise(r=>{r(od(e,t.edit.columns))})}function si({item:e,info:t,opened:r,onClose:n,...o}){const{updateEntry:s}=re(),i={modal:{},stack:{},saveButton:{}},{modal:a,stack:c,saveButton:u}=g.useProps("EditDialog",i,o),f=er.useForm({initialValues:t.edit.defaultValues,validate:Qn(t.edit.schema)}),d=()=>{const y={};return Object.keys(f.values).forEach(b=>{f.isDirty(b)&&(y[b]=!0)}),y};v.useEffect(()=>{e&&ud(e,t).then(y=>{f.setValues(y),f.resetDirty(y)})},[e,t.edit.columns]);const p=async y=>{y=ti(d(),y),await s(e.id,y),n()};return v.useEffect(()=>{f.setInitialValues(t.edit.defaultValues),f.reset()},[t.edit.defaultValues]),e?l.jsx(g.Modal,{opened:r,onClose:()=>{n()},title:t.edit.title,size:"lg",centered:!0,...a,children:l.jsx(g.Box,{component:"form",onSubmit:f.onSubmit(p),children:l.jsx(g.Stack,{spacing:"md",...c,children:l.jsxs(g.ScrollArea.Autosize,{mah:450,type:"auto",children:[t.edit.columns.map((y,b)=>l.jsx(jr,{form:f,name:y.name,label:y.label,description:y.description,schema:y,withAsterisk:y.required},b)),l.jsx(g.Group,{position:"right",mt:"xl",children:l.jsx(g.Button,{type:"submit",...u,children:"Save"})})]})})})}):null}function ii({id:e,...t}){const{info:r,getEntry:n}=re(),o={bg:"transparent",size:"sm",c:"gray"},s=g.useProps("ActionIcon",o,t),[i,a]=v.useState(null),[c,u]=v.useState(!1),[f,d]=v.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(g.Tooltip,{label:"Edit",children:l.jsx(g.ActionIcon,{bg:s.bg,size:s.size,c:s.c,onClick:async()=>{u(!0);const p=await n(e);p&&(a(p),u(!1),d(!0))},children:l.jsx(Rf,{})})}),l.jsx(si,{item:i,info:r,opened:f,onClose:()=>d(!1)})]})}function fd({relatedPath:e,...t}){const{path:r}=re();return Te(r?r.substring(0,r.lastIndexOf("/")):"",e.substring(0,e.lastIndexOf("/"))),l.jsx(qs,{resource_name:e.replace("/",""),relation:t,children:l.jsx(co,{hideToolbar:!0,hideDownload:!1})})}const dd=v.memo(fd);function pd({item:e,info:t,loading:r,opened:n,onClose:o,...s}){const i={modal:{},tabs:{},tabsList:{},tabsPanel:{}},{modal:a,tabs:c,tabsList:u,tabsPanel:f}=g.useProps("ViewDialog",i,s);return l.jsxs(g.Modal,{opened:n,onClose:o,title:`${e==null?void 0:e.show_title} (#${je(e==null?void 0:e.id)})`,size:"lg",centered:!0,zIndex:1e3,...a,children:[l.jsx(g.LoadingOverlay,{visible:r}),!r&&e?l.jsxs(g.Tabs,{defaultValue:"details",...c,children:[l.jsxs(g.Tabs.List,{...u,children:[l.jsx(g.Tabs.Tab,{value:"details",children:"Details"}),t.relations.map((d,p)=>l.jsx(g.Tabs.Tab,{value:d.name,children:d.name},p))]}),l.jsx(g.Tabs.Panel,{pt:"xs",value:"details",...f,children:l.jsx(g.Paper,{p:"xs",withBorder:!0,children:l.jsx(g.Stack,{spacing:"md",children:l.jsx(g.ScrollArea,{h:450,type:"auto",children:e.show_columns.map((d,p)=>l.jsxs(g.Grid,{maw:500,children:[l.jsx(g.Grid.Col,{span:4,children:l.jsx(g.Text,{size:"md",children:e.label_columns[d]})}),l.jsx(g.Grid.Col,{span:1,children:l.jsx(g.Text,{size:"xs",children:":"})}),l.jsx(g.Grid.Col,{span:6,children:l.jsx(g.Text,{size:"md",children:Xn(e.result,d)})})]},p))})})})}),t.relations.map((d,p)=>l.jsx(g.Tabs.Panel,{pt:"xs",value:d.name,children:l.jsx(g.Paper,{withBorder:!0,children:l.jsx(dd,{relatedPath:d.path,id:je(e.id),foreign_key:d.foreign_key,type:d.type})})},p))]}):null]})}function hd({id:e,...t}){const{info:r,getEntry:n}=re(),o={bg:"transparent",size:"sm",c:"gray"},s=g.useProps("ActionIcon",o,t),[i,a]=v.useState(null),[c,u]=v.useState(!1),[f,d]=v.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(g.Tooltip,{label:"Details",children:l.jsx(g.ActionIcon,{bg:s.bg,size:s.size,c:s.c,onClick:async()=>{u(!0);const p=await n(e);p&&(a(p),u(!1),d(!0))},children:l.jsx(Jf,{})})}),l.jsx(pd,{item:i,info:r,loading:c,opened:f,onClose:()=>d(!1)})]})}function Rn({id:e}){const{info:t}=re();return l.jsxs(g.Flex,{style:{gap:4,whiteSpace:"nowrap"},children:[t!=null&&t.permissions.includes("can_get")?l.jsx(hd,{id:e}):null,t!=null&&t.permissions.includes("can_put")?l.jsx(ii,{id:e}):null,t!=null&&t.permissions.includes("can_delete")?l.jsx(ei,{id:e}):null]})}function eo({opened:e,onClose:t,...r}){const{info:n,addEntry:o}=re(),s={modal:{},stack:{},addButton:{}},{addButton:i,modal:a,stack:c}=g.useProps("AddDialog",s,r),u=er.useForm({initialValues:n.add.defaultValues,validate:Qn(n.add.schema)}),f=async d=>{await o(d),u.reset(),t()};return v.useEffect(()=>{u.setInitialValues(n.add.defaultValues),u.reset()},[n.add.defaultValues]),l.jsx(g.Modal,{opened:e,onClose:()=>{u.reset(),t()},title:n.add.title,size:"lg",centered:!0,...a,children:l.jsx(g.Box,{component:"form",onSubmit:u.onSubmit(f),children:l.jsx(g.Stack,{spacing:"md",...c,children:l.jsxs(g.ScrollArea.Autosize,{mah:450,type:"auto",children:[n.add.columns.map((d,p)=>l.jsx(jr,{form:u,name:d.name,label:d.label,description:d.description,schema:d,withAsterisk:d.required},p)),l.jsx(g.Group,{position:"right",mt:"xl",children:l.jsx(g.Button,{type:"submit",...i,children:"Add"})})]})})})})}function ai(...e){const[t,r]=v.useState(!1),n={bg:"transparent",size:"sm",c:"gray"},o=g.useProps("ActionIcon",n,e);return l.jsxs(l.Fragment,{children:[l.jsx(g.Tooltip,{label:"Add Item",children:l.jsx(g.ActionIcon,{bg:o.bg,size:o.size,c:o.c,onClick:()=>{r(!0)},children:l.jsx(Nr,{})})}),l.jsx(eo,{opened:t,onClose:()=>{r(!1)}})]})}/*! @license DOMPurify 3.2.4 | (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.4/LICENSE */const{entries:li,setPrototypeOf:ci,isFrozen:gd,getPrototypeOf:md,getOwnPropertyDescriptor:yd}=Object;let{freeze:Ie,seal:Ue,create:ui}=Object,{apply:to,construct:ro}=typeof Reflect<"u"&&Reflect;Ie||(Ie=function(t){return t}),Ue||(Ue=function(t){return t}),to||(to=function(t,r,n){return t.apply(r,n)}),ro||(ro=function(t,r){return new t(...r)});const zr=De(Array.prototype.forEach),bd=De(Array.prototype.lastIndexOf),fi=De(Array.prototype.pop),nr=De(Array.prototype.push),vd=De(Array.prototype.splice),Br=De(String.prototype.toLowerCase),no=De(String.prototype.toString),di=De(String.prototype.match),or=De(String.prototype.replace),Td=De(String.prototype.indexOf),Sd=De(String.prototype.trim),Ye=De(Object.prototype.hasOwnProperty),ke=De(RegExp.prototype.test),sr=_d(TypeError);function De(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return to(e,t,n)}}function _d(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ro(e,r)}}function X(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Br;ci&&ci(e,null);let n=t.length;for(;n--;){let o=t[n];if(typeof o=="string"){const s=r(o);s!==o&&(gd(t)||(t[n]=s),o=s)}e[o]=!0}return e}function wd(e){for(let t=0;t<e.length;t++)Ye(e,t)||(e[t]=null);return e}function Tt(e){const t=ui(null);for(const[r,n]of li(e))Ye(e,r)&&(Array.isArray(n)?t[r]=wd(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=Tt(n):t[r]=n);return t}function ir(e,t){for(;e!==null;){const n=yd(e,t);if(n){if(n.get)return De(n.get);if(typeof n.value=="function")return De(n.value)}e=md(e)}function r(){return null}return r}const pi=Ie(["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"]),oo=Ie(["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"]),so=Ie(["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"]),Cd=Ie(["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"]),io=Ie(["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"]),Ed=Ie(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),hi=Ie(["#text"]),gi=Ie(["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"]),ao=Ie(["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"]),mi=Ie(["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"]),Ur=Ie(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),xd=Ue(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ad=Ue(/<%[\w\W]*|[\w\W]*%>/gm),Od=Ue(/\$\{[\w\W]*/gm),$d=Ue(/^data-[\-\w.\u00B7-\uFFFF]+$/),Pd=Ue(/^aria-[\-\w]+$/),yi=Ue(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Id=Ue(/^(?:\w+script|data):/i),kd=Ue(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bi=Ue(/^html$/i),Dd=Ue(/^[a-z][.\w]*(-[.\w]+)+$/i);var vi=Object.freeze({__proto__:null,ARIA_ATTR:Pd,ATTR_WHITESPACE:kd,CUSTOM_ELEMENT:Dd,DATA_ATTR:$d,DOCTYPE_NAME:bi,ERB_EXPR:Ad,IS_ALLOWED_URI:yi,IS_SCRIPT_OR_DATA:Id,MUSTACHE_EXPR:xd,TMPLIT_EXPR:Od});const ar={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Md=function(){return typeof window>"u"?null:window},Fd=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(n=r.getAttribute(o));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Ti=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Si(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Md();const t=V=>Si(V);if(t.version="3.2.4",t.removed=[],!e||!e.document||e.document.nodeType!==ar.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const n=r,o=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:i,Node:a,Element:c,NodeFilter:u,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:y}=e,b=c.prototype,h=ir(b,"cloneNode"),S=ir(b,"remove"),C=ir(b,"nextSibling"),k=ir(b,"childNodes"),O=ir(b,"parentNode");if(typeof i=="function"){const V=r.createElement("template");V.content&&V.content.ownerDocument&&(r=V.content.ownerDocument)}let A,_="";const{implementation:P,createNodeIterator:L,createDocumentFragment:W,getElementsByTagName:Z}=r,{importNode:m}=n;let $=Ti();t.isSupported=typeof li=="function"&&typeof O=="function"&&P&&P.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:N,ERB_EXPR:K,TMPLIT_EXPR:Q,DATA_ATTR:fe,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:ge,ATTR_WHITESPACE:Ce,CUSTOM_ELEMENT:H}=vi;let{IS_ALLOWED_URI:x}=vi,w=null;const G=X({},[...pi,...oo,...so,...io,...hi]);let F=null;const Y=X({},[...gi,...ao,...mi,...Ur]);let j=Object.seal(ui(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}})),q=null,J=null,B=!0,R=!0,ee=!1,Se=!0,M=!1,Ne=!0,We=!1,Kt=!1,ss=!1,Jt=!1,_n=!1,wn=!1,au=!0,lu=!1;const kx="user-content-";let is=!0,Tr=!1,Zt={},Xt=null;const cu=X({},["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 uu=null;const fu=X({},["audio","video","img","source","image","track"]);let as=null;const du=X({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Cn="http://www.w3.org/1998/Math/MathML",En="http://www.w3.org/2000/svg",at="http://www.w3.org/1999/xhtml";let Qt=at,ls=!1,cs=null;const Dx=X({},[Cn,En,at],no);let xn=X({},["mi","mo","mn","ms","mtext"]),An=X({},["annotation-xml"]);const Mx=X({},["title","style","font","a","script"]);let Sr=null;const Fx=["application/xhtml+xml","text/html"],Nx="text/html";let Ee=null,Rt=null;const Lx=r.createElement("form"),pu=function(T){return T instanceof RegExp||T instanceof Function},us=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Rt&&Rt===T)){if((!T||typeof T!="object")&&(T={}),T=Tt(T),Sr=Fx.indexOf(T.PARSER_MEDIA_TYPE)===-1?Nx:T.PARSER_MEDIA_TYPE,Ee=Sr==="application/xhtml+xml"?no:Br,w=Ye(T,"ALLOWED_TAGS")?X({},T.ALLOWED_TAGS,Ee):G,F=Ye(T,"ALLOWED_ATTR")?X({},T.ALLOWED_ATTR,Ee):Y,cs=Ye(T,"ALLOWED_NAMESPACES")?X({},T.ALLOWED_NAMESPACES,no):Dx,as=Ye(T,"ADD_URI_SAFE_ATTR")?X(Tt(du),T.ADD_URI_SAFE_ATTR,Ee):du,uu=Ye(T,"ADD_DATA_URI_TAGS")?X(Tt(fu),T.ADD_DATA_URI_TAGS,Ee):fu,Xt=Ye(T,"FORBID_CONTENTS")?X({},T.FORBID_CONTENTS,Ee):cu,q=Ye(T,"FORBID_TAGS")?X({},T.FORBID_TAGS,Ee):{},J=Ye(T,"FORBID_ATTR")?X({},T.FORBID_ATTR,Ee):{},Zt=Ye(T,"USE_PROFILES")?T.USE_PROFILES:!1,B=T.ALLOW_ARIA_ATTR!==!1,R=T.ALLOW_DATA_ATTR!==!1,ee=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,M=T.SAFE_FOR_TEMPLATES||!1,Ne=T.SAFE_FOR_XML!==!1,We=T.WHOLE_DOCUMENT||!1,Jt=T.RETURN_DOM||!1,_n=T.RETURN_DOM_FRAGMENT||!1,wn=T.RETURN_TRUSTED_TYPE||!1,ss=T.FORCE_BODY||!1,au=T.SANITIZE_DOM!==!1,lu=T.SANITIZE_NAMED_PROPS||!1,is=T.KEEP_CONTENT!==!1,Tr=T.IN_PLACE||!1,x=T.ALLOWED_URI_REGEXP||yi,Qt=T.NAMESPACE||at,xn=T.MATHML_TEXT_INTEGRATION_POINTS||xn,An=T.HTML_INTEGRATION_POINTS||An,j=T.CUSTOM_ELEMENT_HANDLING||{},T.CUSTOM_ELEMENT_HANDLING&&pu(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&pu(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),M&&(R=!1),_n&&(Jt=!0),Zt&&(w=X({},hi),F=[],Zt.html===!0&&(X(w,pi),X(F,gi)),Zt.svg===!0&&(X(w,oo),X(F,ao),X(F,Ur)),Zt.svgFilters===!0&&(X(w,so),X(F,ao),X(F,Ur)),Zt.mathMl===!0&&(X(w,io),X(F,mi),X(F,Ur))),T.ADD_TAGS&&(w===G&&(w=Tt(w)),X(w,T.ADD_TAGS,Ee)),T.ADD_ATTR&&(F===Y&&(F=Tt(F)),X(F,T.ADD_ATTR,Ee)),T.ADD_URI_SAFE_ATTR&&X(as,T.ADD_URI_SAFE_ATTR,Ee),T.FORBID_CONTENTS&&(Xt===cu&&(Xt=Tt(Xt)),X(Xt,T.FORBID_CONTENTS,Ee)),is&&(w["#text"]=!0),We&&X(w,["html","head","body"]),w.table&&(X(w,["tbody"]),delete q.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw sr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw sr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=T.TRUSTED_TYPES_POLICY,_=A.createHTML("")}else A===void 0&&(A=Fd(y,o)),A!==null&&typeof _=="string"&&(_=A.createHTML(""));Ie&&Ie(T),Rt=T}},hu=X({},[...oo,...so,...Cd]),gu=X({},[...io,...Ed]),jx=function(T){let D=O(T);(!D||!D.tagName)&&(D={namespaceURI:Qt,tagName:"template"});const z=Br(T.tagName),he=Br(D.tagName);return cs[T.namespaceURI]?T.namespaceURI===En?D.namespaceURI===at?z==="svg":D.namespaceURI===Cn?z==="svg"&&(he==="annotation-xml"||xn[he]):!!hu[z]:T.namespaceURI===Cn?D.namespaceURI===at?z==="math":D.namespaceURI===En?z==="math"&&An[he]:!!gu[z]:T.namespaceURI===at?D.namespaceURI===En&&!An[he]||D.namespaceURI===Cn&&!xn[he]?!1:!gu[z]&&(Mx[z]||!hu[z]):!!(Sr==="application/xhtml+xml"&&cs[T.namespaceURI]):!1},Re=function(T){nr(t.removed,{element:T});try{O(T).removeChild(T)}catch{S(T)}},On=function(T,D){try{nr(t.removed,{attribute:D.getAttributeNode(T),from:D})}catch{nr(t.removed,{attribute:null,from:D})}if(D.removeAttribute(T),T==="is")if(Jt||_n)try{Re(D)}catch{}else try{D.setAttribute(T,"")}catch{}},mu=function(T){let D=null,z=null;if(ss)T="<remove></remove>"+T;else{const xe=di(T,/^[\r\n\t ]+/);z=xe&&xe[0]}Sr==="application/xhtml+xml"&&Qt===at&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const he=A?A.createHTML(T):T;if(Qt===at)try{D=new p().parseFromString(he,Sr)}catch{}if(!D||!D.documentElement){D=P.createDocument(Qt,"template",null);try{D.documentElement.innerHTML=ls?_:he}catch{}}const Oe=D.body||D.documentElement;return T&&z&&Oe.insertBefore(r.createTextNode(z),Oe.childNodes[0]||null),Qt===at?Z.call(D,We?"html":"body")[0]:We?D.documentElement:Oe},yu=function(T){return L.call(T.ownerDocument||T,T,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},fs=function(T){return T instanceof d&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof f)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},bu=function(T){return typeof a=="function"&&T instanceof a};function lt(V,T,D){zr(V,z=>{z.call(t,T,D,Rt)})}const vu=function(T){let D=null;if(lt($.beforeSanitizeElements,T,null),fs(T))return Re(T),!0;const z=Ee(T.nodeName);if(lt($.uponSanitizeElement,T,{tagName:z,allowedTags:w}),T.hasChildNodes()&&!bu(T.firstElementChild)&&ke(/<[/\w]/g,T.innerHTML)&&ke(/<[/\w]/g,T.textContent)||T.nodeType===ar.progressingInstruction||Ne&&T.nodeType===ar.comment&&ke(/<[/\w]/g,T.data))return Re(T),!0;if(!w[z]||q[z]){if(!q[z]&&Su(z)&&(j.tagNameCheck instanceof RegExp&&ke(j.tagNameCheck,z)||j.tagNameCheck instanceof Function&&j.tagNameCheck(z)))return!1;if(is&&!Xt[z]){const he=O(T)||T.parentNode,Oe=k(T)||T.childNodes;if(Oe&&he){const xe=Oe.length;for(let Le=xe-1;Le>=0;--Le){const et=h(Oe[Le],!0);et.__removalCount=(T.__removalCount||0)+1,he.insertBefore(et,C(T))}}}return Re(T),!0}return T instanceof c&&!jx(T)||(z==="noscript"||z==="noembed"||z==="noframes")&&ke(/<\/no(script|embed|frames)/i,T.innerHTML)?(Re(T),!0):(M&&T.nodeType===ar.text&&(D=T.textContent,zr([N,K,Q],he=>{D=or(D,he," ")}),T.textContent!==D&&(nr(t.removed,{element:T.cloneNode()}),T.textContent=D)),lt($.afterSanitizeElements,T,null),!1)},Tu=function(T,D,z){if(au&&(D==="id"||D==="name")&&(z in r||z in Lx))return!1;if(!(R&&!J[D]&&ke(fe,D))){if(!(B&&ke(de,D))){if(!F[D]||J[D]){if(!(Su(T)&&(j.tagNameCheck instanceof RegExp&&ke(j.tagNameCheck,T)||j.tagNameCheck instanceof Function&&j.tagNameCheck(T))&&(j.attributeNameCheck instanceof RegExp&&ke(j.attributeNameCheck,D)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(D))||D==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&ke(j.tagNameCheck,z)||j.tagNameCheck instanceof Function&&j.tagNameCheck(z))))return!1}else if(!as[D]){if(!ke(x,or(z,Ce,""))){if(!((D==="src"||D==="xlink:href"||D==="href")&&T!=="script"&&Td(z,"data:")===0&&uu[T])){if(!(ee&&!ke(ge,or(z,Ce,"")))){if(z)return!1}}}}}}return!0},Su=function(T){return T!=="annotation-xml"&&di(T,H)},_u=function(T){lt($.beforeSanitizeAttributes,T,null);const{attributes:D}=T;if(!D||fs(T))return;const z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let he=D.length;for(;he--;){const Oe=D[he],{name:xe,namespaceURI:Le,value:et}=Oe,_r=Ee(xe);let Me=xe==="value"?et:Sd(et);if(z.attrName=_r,z.attrValue=Me,z.keepAttr=!0,z.forceKeepAttr=void 0,lt($.uponSanitizeAttribute,T,z),Me=z.attrValue,lu&&(_r==="id"||_r==="name")&&(On(xe,T),Me=kx+Me),Ne&&ke(/((--!?|])>)|<\/(style|title)/i,Me)){On(xe,T);continue}if(z.forceKeepAttr||(On(xe,T),!z.keepAttr))continue;if(!Se&&ke(/\/>/i,Me)){On(xe,T);continue}M&&zr([N,K,Q],Cu=>{Me=or(Me,Cu," ")});const wu=Ee(T.nodeName);if(Tu(wu,_r,Me)){if(A&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Le)switch(y.getAttributeType(wu,_r)){case"TrustedHTML":{Me=A.createHTML(Me);break}case"TrustedScriptURL":{Me=A.createScriptURL(Me);break}}try{Le?T.setAttributeNS(Le,xe,Me):T.setAttribute(xe,Me),fs(T)?Re(T):fi(t.removed)}catch{}}}lt($.afterSanitizeAttributes,T,null)},zx=function V(T){let D=null;const z=yu(T);for(lt($.beforeSanitizeShadowDOM,T,null);D=z.nextNode();)lt($.uponSanitizeShadowNode,D,null),vu(D),_u(D),D.content instanceof s&&V(D.content);lt($.afterSanitizeShadowDOM,T,null)};return t.sanitize=function(V){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=null,z=null,he=null,Oe=null;if(ls=!V,ls&&(V="<!-->"),typeof V!="string"&&!bu(V))if(typeof V.toString=="function"){if(V=V.toString(),typeof V!="string")throw sr("dirty is not a string, aborting")}else throw sr("toString is not a function");if(!t.isSupported)return V;if(Kt||us(T),t.removed=[],typeof V=="string"&&(Tr=!1),Tr){if(V.nodeName){const et=Ee(V.nodeName);if(!w[et]||q[et])throw sr("root node is forbidden and cannot be sanitized in-place")}}else if(V instanceof a)D=mu("<!---->"),z=D.ownerDocument.importNode(V,!0),z.nodeType===ar.element&&z.nodeName==="BODY"||z.nodeName==="HTML"?D=z:D.appendChild(z);else{if(!Jt&&!M&&!We&&V.indexOf("<")===-1)return A&&wn?A.createHTML(V):V;if(D=mu(V),!D)return Jt?null:wn?_:""}D&&ss&&Re(D.firstChild);const xe=yu(Tr?V:D);for(;he=xe.nextNode();)vu(he),_u(he),he.content instanceof s&&zx(he.content);if(Tr)return V;if(Jt){if(_n)for(Oe=W.call(D.ownerDocument);D.firstChild;)Oe.appendChild(D.firstChild);else Oe=D;return(F.shadowroot||F.shadowrootmode)&&(Oe=m.call(n,Oe,!0)),Oe}let Le=We?D.outerHTML:D.innerHTML;return We&&w["!doctype"]&&D.ownerDocument&&D.ownerDocument.doctype&&D.ownerDocument.doctype.name&&ke(bi,D.ownerDocument.doctype.name)&&(Le="<!DOCTYPE "+D.ownerDocument.doctype.name+`>
105
- `+Le),M&&zr([N,K,Q],et=>{Le=or(Le,et," ")}),A&&wn?A.createHTML(Le):Le},t.setConfig=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};us(V),Kt=!0},t.clearConfig=function(){Rt=null,Kt=!1},t.isValidAttribute=function(V,T,D){Rt||us({});const z=Ee(V),he=Ee(T);return Tu(z,he,D)},t.addHook=function(V,T){typeof T=="function"&&nr($[V],T)},t.removeHook=function(V,T){if(T!==void 0){const D=bd($[V],T);return D===-1?void 0:vd($[V],D,1)[0]}return fi($[V])},t.removeHooks=function(V){$[V]=[]},t.removeAllHooks=function(){$=Ti()},t}var _i=Si();const Ze=v.forwardRef(({fallback:e,functionProps:t,children:r},n)=>{if(typeof r=="function"&&(r=r(...t)),r===null)return null;const o=r||e;return v.isValidElement(o)?v.cloneElement(o,{ref:n}):o});Ze.displayName="FallbackWrapper";const Nd={field:"_field_zdaf7_1",rtl:"_rtl_zdaf7_7",borderRight:"_borderRight_zdaf7_12"},Vr=v.memo(({id:e,entry:t,loading:r,rightBorder:n,children:o,onClickEntry:s,customElement:i,sanitize:a,...c})=>{const u={text:{style:{whiteSpace:"nowrap",overflow:"ellipsis"}}},{text:f}=g.useProps("Field",u,c),d={};Object.entries(f).forEach(([y,b])=>{typeof b=="function"&&(d[y]=b(t))});const p=g.useStyles({name:"Field",props:c,classes:Nd});return l.jsx(g.Table.Td,{...p("field"),onClick:s?()=>s(e,t):null,...c,children:l.jsx(g.Box,{w:"100%",children:l.jsx(g.Skeleton,{visible:r,children:l.jsx(Ze,{fallback:Array.isArray(o)?o.map((y,b)=>l.jsx(g.Text,{...f,...d,children:a?_i.sanitize(y):y},b)):v.isValidElement(o)?o:l.jsx(g.Text,{...f,...d,children:a?_i.sanitize(o):o}),functionProps:[t],children:i})})})})});Vr.displayName="Field";const wi={row:"_row_138r2_1",selected:"_selected_138r2_5"};function Ld({entry:e,selected:t,children:r}){const n=g.useStyles({name:"Row",classes:wi}),o=g.useProps("Row",{},{});Object.entries(o).forEach(([a,c])=>{typeof c=="function"&&(o[a]=c(e))});var{className:s,style:i}=n("row");return s=`${s} ${t?wi.selected:""}`,l.jsx(g.Table.Tr,{className:s,style:{...i},...o,children:r})}function jd({bodyCustomizer:e,actionColumn:t,id:r,entry:n}){let o=e==null?void 0:e[t];return typeof o=="function"&&(o=o({id:r,...n})),o===null?null:o||l.jsx(Rn,{id:r})}function zd({data:e,loading:t,hideActions:r,hideCheckbox:n,selection:o,toggleRow:s,onClickEntry:i,bodyCustomizer:a,bodySeparator:c}){const u=e.list_columns.includes("actions")?"_actions":"actions",f=v.useMemo(()=>e!=null&&e.list_columns.includes("all")?"_all":"all",[e==null?void 0:e.list_columns]);return l.jsx(g.Table.Tbody,{children:e.result.length?e.result.map((d,p)=>{const y=e.ids[p];return l.jsxs(Ld,{entry:{...d,id:y},children:[n?null:l.jsx(Vr,{loading:t,children:l.jsx(g.Checkbox,{pl:2,checked:o.includes(y),onChange:b=>{s(y)}})},p),r?null:l.jsx(Vr,{loading:t,children:l.jsx(jd,{bodyCustomizer:a,actionColumn:u,id:je(y),entry:d})}),e.list_columns.map((b,h)=>{let S=a==null?void 0:a[b];typeof S=="function"&&(S=S({id:y,...d}));let C=Xn(d,b);typeof C=="number"?C=C.toLocaleString():C==null&&(C="");const k=(c==null?void 0:c[b])||(c==null?void 0:c[f]);return k&&(C=C.split(k)),S===null?null:l.jsx(Vr,{id:y,entry:d,loading:t,onClickEntry:i,customElement:S,sanitize:!0,children:C},h)})]},je(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(g.Text,{style:{fontStyle:"italic"},size:"sm",c:"dimmed",children:"No data available"})})})})}const Ci={root:"_root_1kmay_1",wrapper:"_wrapper_1kmay_7",icon:"_icon_1kmay_18"};function lo({column:e,label:t,orderColumn:r,related:n,toggleAll:o,allChecked:s,classNames:i,styles:a,customElement:c,...u}){const{queryParams:f,setQueryParams:d,loading:p}=re(),y={fw:700,size:"sm",color:"gray.8",hoverColor:"gray.6",selectedColor:"blue"},b=g.useStyles({name:"FieldTitle",classes:Ci,classNames:i,styles:a,props:u}),h=g.useProps("FieldTitle",y,u),{hovered:S,ref:C}=be.useHover(),k=r&&f.order_column===r,O=b("wrapper");return O.style.cursor=r?O.style.cursor:"auto",l.jsx(g.Table.Th,{className:Ci.fieldTitleRoot,...b("root"),onClick:r&&!p?()=>d({order_column:r,order_direction:f.order_direction==="asc"?"desc":"asc"}):null,children:l.jsx(g.Box,{ref:C,...O,children:e==="Checkbox"?l.jsx(g.Checkbox,{pb:5,pl:2,onChange:o,checked:s}):l.jsxs(l.Fragment,{children:[l.jsx(g.Box,{w:"100%",fw:h.fw,size:"xl",c:S&&r?h.hoverColor:k?h.selectedColor:h.color,children:c||t||e}),n?l.jsx(g.Tooltip,{label:"Related Field",children:l.jsx(g.Indicator,{label:"rel",style:{indicator:{top:"-1px !important",right:"-2px !important",padding:"4px"}},children:l.jsx(g.Box,{...b("icon"),children:k?f.order_direction==="asc"?l.jsx(Zn,{size:14,strokeWidth:1.5}):l.jsx(Ks,{size:14,strokeWidth:1.5}):null})})}):l.jsx(g.Box,{...b("icon"),children:k?f.order_direction==="asc"?l.jsx(Zn,{size:14,strokeWidth:1.5}):l.jsx(Ks,{size:14,strokeWidth:1.5}):null})]})})})}const Ei=v.memo(({data:e,info:t,settings:r,hideActions:n,hideCheckbox:o,allChecked:s,toggleAll:i,headerCustomizer:a})=>{const c=e.list_columns.includes("actions")?"_actions":"actions";let u=a==null?void 0:a[c];return typeof u=="function"&&(u=u()),l.jsx(g.Table.Thead,{children:l.jsxs(g.Table.Tr,{children:[o?null:l.jsx(lo,{data:e,column:"Checkbox",allChecked:s,toggleAll:i}),n?null:l.jsx(lo,{column:"Actions",customElement:u}),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(lo,{column:f,label:e.label_columns[f],orderColumn:e.order_columns.find(b=>b===f)||e.order_columns.find(b=>b.startsWith(`${f}.`)),related:((y=t.filters[f])==null?void 0:y.schema.type)==="Nested",customElement:p},f)})]})})});Ei.displayName="Header";const Bd={scrollbar:"_scrollbar_isyo2_1"};function Ud({bulkActions:e,hideActions:t,loading:r,onSelectCheckbox:n,onClickEntry:o,hideCheckbox:s,hideDownload:i,headerCustomizer:a,bodyCustomizer:c,bodySeparator:u,...f}){const d=g.useMantineTheme(),p=g.Table.extend({highlightOnHover:!0,striped:!0,horizontalSpacing:"md",verticalSpacing:"sm"}),y=g.useProps("DatagridTable",p,f),{data:b,info:h}=re(),[S,C]=v.useState([]),[k,O]=v.useState(!1),A=P=>{C(L=>L.includes(P)?L.filter(W=>W!==P):[...L,P])},_=()=>{C(P=>P.length===b.ids.length?[]:b.ids.map((L,W)=>L))};return v.useEffect(()=>{O(S.length===b.result.length&&S.length>0),n&&n(S),e==null||e.setSelectedIds(S.map(P=>P))},[S]),v.useEffect(()=>{C([]),n&&n([])},[b]),l.jsx(g.ScrollArea,{options:{className:d.colorScheme==="dark"?"os-theme-light":void 0},style:{flex:1,flexDirection:"column"},classNames:Bd,children:l.jsxs(g.Table,{stickyHeader:!0,...y,children:[l.jsx(Ei,{data:b,info:h,hideActions:t,hideCheckbox:s,allChecked:k,setSelection:C,toggleAll:_,headerCustomizer:a}),l.jsx(zd,{data:b,loading:r,hideActions:t,hideCheckbox:s,selection:S,setSelection:C,toggleRow:A,onClickEntry:o,bodyCustomizer:c,bodySeparator:u})]})})}const xi=v.memo(({counter:e,...t})=>{const{data:r,queryParams:n,setQueryParams:o}=re(),s=g.useMantineTheme(),i=[{value:"10",label:"10"},{value:"25",label:"25"},{value:"50",label:"50"}],a=String(n.page_size),[c,u]=v.useState(n.page);v.useEffect(()=>{u(n.page)},[n.page]);const f=p=>{u(p-1),o({page:p-1})},d=p=>{o({page_size:parseInt(p,10),page:0})};return l.jsxs(l.Fragment,{children:[l.jsx(g.Divider,{}),l.jsxs(g.Box,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:54,border:"none",borderTopWidth:"1px",padding:"var(--mantine-spacing-md)"},children:[l.jsxs(g.Box,{style:{display:"flex",alignItems:"center",gap:"var(--mantine-spacing-sm)"},children:[l.jsx(g.Text,{children:"Rows per page:"}),l.jsx(g.Select,{value:a,defaultValue:a,onChange:p=>d(p),data:i,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(g.Pagination,{size:"sm",total:Math.ceil(r.count/a),value:c+1,onChange:f,...t}),e&&r?l.jsxs(l.Fragment,{children:[l.jsx(g.Text,{c:s.primaryColor,size:"xs",fw:400,pl:20,children:"Total Records"}),l.jsx(g.Text,{c:s.primaryColor,size:"md",fw:700,pl:10,children:r.count})]}):null]})]})});xi.displayName="Pagination";const Vd=0,Gd=25,St=250,lr="global",Ot="header:",Ai=Ot+"ctt",Oi=Ot+"between_integer",$i=Ot+"between_date",$t=e=>e!==lr&&!e.startsWith(Ot);function Wd({form:e,name:t,items:r,onChange:n,...o}){return l.jsx(g.Select,{data:r,searchable:!0,...e.getInputProps(t),onChange:n,...o})}function Pi({form:e,name:t,label:r,comboboxProps:n,...o}){const s=g.useCombobox({onDropdownClose:()=>s.resetSelectedOption(),onDropdownOpen:()=>s.updateSelectedOptionIndex("active")}),[i,a]=v.useState([]),[c,u]=v.useState(""),f=y=>{c!==""&&(i.includes(c)||a(b=>[...b,c]),u(""))},d=y=>a(b=>b.filter(h=>h!==y)),p=i.map(y=>l.jsx(g.Pill,{withRemoveButton:!0,onRemove:()=>d(y),children:y},y));return v.useEffect(()=>{const y=e.getInputProps(t).value;if(y)try{a([...y])}catch(b){console.error("Error parsing JSON:",b)}},[]),v.useEffect(()=>{e.getInputProps(t).onChange(i)},[i]),l.jsx(g.InputWrapper,{label:r,children:l.jsxs(g.Combobox,{store:s,onOptionSubmit:f,...n,children:[l.jsx(g.Combobox.DropdownTarget,{children:l.jsx(g.PillsInput,{onClick:()=>s.openDropdown(),children:l.jsxs(g.Pill.Group,{children:[p,l.jsx(g.Combobox.EventsTarget,{children:l.jsx(g.PillsInput.Field,{onFocus:()=>s.openDropdown(),onBlur:()=>s.closeDropdown(),value:c,placeholder:"Search values",onChange:y=>{s.updateSelectedOptionIndex(),u(y.currentTarget.value)},onKeyDown:y=>{y.key==="Backspace"&&c.length===0&&(y.preventDefault(),d(i[i.length-1]))}})})]})})}),l.jsx(g.Combobox.Dropdown,{children:l.jsx(g.Combobox.Options,{children:l.jsxs(g.Combobox.Option,{value:"$create",children:["+ Create ",c]})})})]})})}function Hd({form:e,name:t,items:r,onChange:n,...o}){return l.jsx(g.Select,{data:r,searchable:!0,...e.getInputProps(t),onChange:n,...o})}function Ii({onClose:e,...t}){const{info:r,queryParams:n,setQueryParams:o,path:s}=re(),i=er.useForm({initialValues:{filters:[]},validate:Qn(rr({filters:qn().of(rr({col:Dr().transform(d=>d||void 0).required("Field is required"),opr:Dr().transform(d=>d||void 0).required("col is required"),value:kr().when("col",{is:d=>d&&r.filters[d].schema.required,then:()=>kr().required("Value is required")})}))}))}),a={bg:"transparent",size:"sm",c:"gray"},c=g.useProps("ActionIcon",a,t);v.useEffect(()=>{i.setValues({filters:[]}),i.reset()},[s]),v.useEffect(()=>{if(n.filters&&n.filters.length){const d=n.filters.filter(p=>$t(p.opr)).map(p=>({...p,key:be.randomId()}));i.setFieldValue("filters",d)}},[n.filters]);const u=d=>{const p=d.filters.map(({key:b,...h})=>h),y=JSON.parse(JSON.stringify(p));o({filters:y,page:0}),e()},f=i.values.filters.map((d,p)=>l.jsxs(g.Box,{px:"sm",children:[l.jsxs(g.Flex,{my:"md",gap:"md",style:{whiteSpace:"nowrap"},children:[l.jsx(g.Box,{style:{width:"192px"},children:r&&r.filters&&l.jsx(Wd,{form:i,name:`filters.${p}.col`,items:Object.entries(r.filters).map(([y,b])=>({label:b.label,value:String(y)})),onChange:y=>{i.setFieldValue(`filters.${p}`,{col:y,opr:"",value:"",key:be.randomId()})}})}),l.jsx(g.Box,{style:{width:"192px"},children:d.col?l.jsx(Hd,{form:i,name:`filters.${p}.opr`,items:r.filters[d.col].filters.filter(y=>$t(y.operator)).map(y=>({label:y.name,value:y.operator})),onChange:y=>{i.setFieldValue(`filters.${p}`,{col:i.values.filters[p].col,opr:y,value:"",key:be.randomId()})}}):null}),l.jsx(g.Box,{style:{width:"192px"},children:d.col?d.opr==="in"?l.jsx(Pi,{form:i,name:`filters.${p}.value`}):l.jsx(jr,{form:i,name:`filters.${p}.value`,schema:r.filters[d.col].schema,filter:!0}):null}),l.jsx(g.ActionIcon,{bg:c.bg,size:c.size,c:c.c,onClick:()=>{i.removeListItem("filters",p)},children:l.jsx(Qs,{})})]}),i.values.filters.length>1&&p<i.values.filters.length-1?l.jsx(g.Divider,{my:"md",labelPosition:"center",label:"AND"}):null]},d.key));return l.jsxs(g.Box,{component:"form",onSubmit:i.onSubmit(u),children:[f.length===0&&l.jsx(g.Box,{style:{width:"642px"},children:l.jsx(g.Text,{style:{fontStyle:"italic",padding:"7px"},size:"sm",c:"dimmed",children:"No filters selected..."})}),l.jsx(g.ScrollArea.Autosize,{mah:"40vh",mt:20,children:f}),l.jsx(g.Divider,{my:"sm"}),l.jsxs(g.Box,{style:{display:"flex",justifyContent:"space-between"},children:[l.jsx(g.Button,{variant:"subtle",leftSection:l.jsx(Nr,{}),onClick:()=>{i.insertListItem("filters",{col:"",opr:"",value:"",key:be.randomId()})},children:"Add Filter"}),l.jsx(g.Group,{spacing:"md",children:l.jsx(g.Button,{type:"submit",children:"Apply"})})]})]})}function ki(...e){const{queryParams:t}=re(),r={bg:"transparent",size:"sm",c:"gray"},n=g.useProps("ActionIcon",r,e),[o,s]=v.useState(!1);return l.jsxs(g.Popover,{opened:o,position:"bottom-end",onClose:()=>s(!1),closeOnClickOutside:!1,children:[l.jsx(g.Popover.Target,{children:l.jsx(g.Tooltip,{opened:o?!1:null,label:"Filter",children:(t==null?void 0:t.filters.filter(i=>$t(i.opr)).length)!=0?l.jsx(g.Indicator,{zIndex:20,size:16,label:t==null?void 0:t.filters.length,children:l.jsx(g.ActionIcon,{bg:n.bg,size:n.size,c:n.c,onClick:()=>s(!0),children:l.jsx(Zs,{})})}):l.jsx(g.ActionIcon,{bg:n.bg,size:n.size,c:n.c,onClick:()=>s(!0),children:l.jsx(Zs,{})})})}),l.jsxs(g.Popover.Dropdown,{px:"xs",children:[l.jsx(g.Box,{style:{position:"absolute",top:4,right:4},children:l.jsx(g.CloseButton,{title:"Filters",onClick:()=>s(!1)})}),l.jsx(Ii,{onClose:()=>{s(!1)}})]})]})}function Yd(...e){const[t,r]=v.useState(!1),{download:n}=re(),o={bg:"transparent",size:"sm",c:"gray"},s=g.useProps("ActionIcon",o,e);return t?l.jsx(g.Loader,{color:s.c,size:s.size}):l.jsx(g.Tooltip,{label:"Download",children:l.jsx(g.ActionIcon,{bg:s.bg,size:s.size,c:s.c,onClick:()=>{r(!0),n("download").then(()=>r(!1))},children:l.jsx(Js,{})})})}const Di=v.memo(({hideAdd:e,hideFilter:t,hideDownload:r,toolbarCustomizer:n})=>{const{info:o}=re(),s=v.useMemo(()=>{const a={};return Object.entries(n).forEach(([c,u])=>{a[c]=u,typeof a[c]=="function"&&(a[c]=a[c]())}),a},[n]),i=o.permissions.includes("can_post");return l.jsxs(g.Flex,{justify:"flex-end",p:"md",gap:"sm",children:[!r&&(s.download||l.jsx(Yd,{})),i&&!e?s.add||l.jsx(ai,{}):null,t?null:s.filter||l.jsx(ki,{})]})});Di.displayName="Toolbar";const co=v.forwardRef((e,t)=>{const{path:r,data:n,loading:o,info:s,setQueryParams:i}=re(),{hideToolbar:a=!1,hideFilter:c=!1,hideAdd:u=!1,hideSettings:f=!1,hideActions:d=!1,hidePagination:p=!1,hideError:y=!1,hideDownload:b=!0,onSelectCheckbox:h=null,onClickEntry:S=null,fetchOnMount:C=!0,bulkActions:k=null,styles:O,headerCustomizer:A={},bodyCustomizer:_={},toolbarCustomizer:P={},counter:L=!1,bodySeparator:W}=e;if(v.useEffect(()=>{!n&&C&&i({})},[n]),!s)return;const Z=k===null;return l.jsxs(g.Paper,{ref:t,style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",...O},children:[a?null:l.jsx(Di,{hideFilter:c,hideAdd:u,hideSettings:f,hideDownload:b,toolbarCustomizer:P}),n?l.jsx(Ud,{bulkActions:k,hideActions:d,loading:o,onSelectCheckbox:h,onClickEntry:S,hideCheckbox:Z,hideDownload:b,headerCustomizer:A,bodyCustomizer:_,bodySeparator:W}):null,!p&&n?l.jsx(xi,{counter:L}):null,y?null:l.jsx(Rs,{})]})});co.displayName="DataGrid";function qd({children:e,fetch:t=!0,loading:r=l.jsx(g.Center,{children:l.jsx(g.Loader,{})}),end:n=l.jsx(g.Center,{children:"End of data"}),fetchWrapper:o=g.Center,fetchWrapperProps:s}){const{streaming:i,loading:a}=re(),{ref:c,inViewport:u}=be.useInViewport(),f=v.useMemo(()=>Object.values(i.data).flat(),[i.data]),d=v.useMemo(()=>typeof e=="function"?e(f):e,[e,f]);return v.useEffect(()=>{u&&t&&i.fetch()},[u]),l.jsxs(l.Fragment,{children:[d,a&&r,i.isEnd&&n,l.jsx(o,{ref:c,id:"IS-load-trigger",mih:"1%",...s})]})}var Kd=Object.prototype;function Jd(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Kd;return e===r}var Gr=Jd;function Zd(e,t){return function(r){return e(t(r))}}var Mi=Zd,Xd=Mi,Qd=Xd(Object.keys,Object),Rd=Qd,ep=Gr,tp=Rd,rp=Object.prototype,np=rp.hasOwnProperty;function op(e){if(!ep(e))return tp(e);var t=[];for(var r in Object(e))np.call(e,r)&&r!="constructor"&&t.push(r);return t}var sp=op,ip=typeof Cr=="object"&&Cr&&Cr.Object===Object&&Cr,Fi=ip,ap=Fi,lp=typeof self=="object"&&self&&self.Object===Object&&self,cp=ap||lp||Function("return this")(),qe=cp,up=qe,fp=up.Symbol,Wr=fp,Ni=Wr,Li=Object.prototype,dp=Li.hasOwnProperty,pp=Li.toString,cr=Ni?Ni.toStringTag:void 0;function hp(e){var t=dp.call(e,cr),r=e[cr];try{e[cr]=void 0;var n=!0}catch{}var o=pp.call(e);return n&&(t?e[cr]=r:delete e[cr]),o}var gp=hp,mp=Object.prototype,yp=mp.toString;function bp(e){return yp.call(e)}var vp=bp,ji=Wr,Tp=gp,Sp=vp,_p="[object Null]",wp="[object Undefined]",zi=ji?ji.toStringTag:void 0;function Cp(e){return e==null?e===void 0?wp:_p:zi&&zi in Object(e)?Tp(e):Sp(e)}var Pt=Cp;function Ep(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var nt=Ep,xp=Pt,Ap=nt,Op="[object AsyncFunction]",$p="[object Function]",Pp="[object GeneratorFunction]",Ip="[object Proxy]";function kp(e){if(!Ap(e))return!1;var t=xp(e);return t==$p||t==Pp||t==Op||t==Ip}var uo=kp,Dp=qe,Mp=Dp["__core-js_shared__"],Fp=Mp,fo=Fp,Bi=function(){var e=/[^.]+$/.exec(fo&&fo.keys&&fo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Np(e){return!!Bi&&Bi in e}var Lp=Np,jp=Function.prototype,zp=jp.toString;function Bp(e){if(e!=null){try{return zp.call(e)}catch{}try{return e+""}catch{}}return""}var Ui=Bp,Up=uo,Vp=Lp,Gp=nt,Wp=Ui,Hp=/[\\^$.*+?()[\]{}|]/g,Yp=/^\[object .+?Constructor\]$/,qp=Function.prototype,Kp=Object.prototype,Jp=qp.toString,Zp=Kp.hasOwnProperty,Xp=RegExp("^"+Jp.call(Zp).replace(Hp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qp(e){if(!Gp(e)||Vp(e))return!1;var t=Up(e)?Xp:Yp;return t.test(Wp(e))}var Rp=Qp;function eh(e,t){return e==null?void 0:e[t]}var th=eh,rh=Rp,nh=th;function oh(e,t){var r=nh(e,t);return rh(r)?r:void 0}var _t=oh,sh=_t,ih=qe,ah=sh(ih,"DataView"),lh=ah,ch=_t,uh=qe,fh=ch(uh,"Map"),po=fh,dh=_t,ph=qe,hh=dh(ph,"Promise"),gh=hh,mh=_t,yh=qe,bh=mh(yh,"Set"),Vi=bh,vh=_t,Th=qe,Sh=vh(Th,"WeakMap"),_h=Sh,ho=lh,go=po,mo=gh,yo=Vi,bo=_h,Gi=Pt,It=Ui,Wi="[object Map]",wh="[object Object]",Hi="[object Promise]",Yi="[object Set]",qi="[object WeakMap]",Ki="[object DataView]",Ch=It(ho),Eh=It(go),xh=It(mo),Ah=It(yo),Oh=It(bo),wt=Gi;(ho&&wt(new ho(new ArrayBuffer(1)))!=Ki||go&&wt(new go)!=Wi||mo&&wt(mo.resolve())!=Hi||yo&&wt(new yo)!=Yi||bo&&wt(new bo)!=qi)&&(wt=function(e){var t=Gi(e),r=t==wh?e.constructor:void 0,n=r?It(r):"";if(n)switch(n){case Ch:return Ki;case Eh:return Wi;case xh:return Hi;case Ah:return Yi;case Oh:return qi}return t});var $h=wt;function Ph(e){return e!=null&&typeof e=="object"}var kt=Ph,Ih=Pt,kh=kt,Dh="[object Arguments]";function Mh(e){return kh(e)&&Ih(e)==Dh}var Fh=Mh,Ji=Fh,Nh=kt,Zi=Object.prototype,Lh=Zi.hasOwnProperty,jh=Zi.propertyIsEnumerable,zh=Ji(function(){return arguments}())?Ji:function(e){return Nh(e)&&Lh.call(e,"callee")&&!jh.call(e,"callee")},Hr=zh,Bh=Array.isArray,ur=Bh,Uh=9007199254740991;function Vh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Uh}var Xi=Vh,Gh=uo,Wh=Xi;function Hh(e){return e!=null&&Wh(e.length)&&!Gh(e)}var Yr=Hh,qr={exports:{}};function Yh(){return!1}var qh=Yh;qr.exports,function(e,t){var r=qe,n=qh,o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===o,a=i?r.Buffer:void 0,c=a?a.isBuffer:void 0,u=c||n;e.exports=u}(qr,qr.exports);var vo=qr.exports,Kh=Pt,Jh=Xi,Zh=kt,Xh="[object Arguments]",Qh="[object Array]",Rh="[object Boolean]",eg="[object Date]",tg="[object Error]",rg="[object Function]",ng="[object Map]",og="[object Number]",sg="[object Object]",ig="[object RegExp]",ag="[object Set]",lg="[object String]",cg="[object WeakMap]",ug="[object ArrayBuffer]",fg="[object DataView]",dg="[object Float32Array]",pg="[object Float64Array]",hg="[object Int8Array]",gg="[object Int16Array]",mg="[object Int32Array]",yg="[object Uint8Array]",bg="[object Uint8ClampedArray]",vg="[object Uint16Array]",Tg="[object Uint32Array]",ue={};ue[dg]=ue[pg]=ue[hg]=ue[gg]=ue[mg]=ue[yg]=ue[bg]=ue[vg]=ue[Tg]=!0,ue[Xh]=ue[Qh]=ue[ug]=ue[Rh]=ue[fg]=ue[eg]=ue[tg]=ue[rg]=ue[ng]=ue[og]=ue[sg]=ue[ig]=ue[ag]=ue[lg]=ue[cg]=!1;function Sg(e){return Zh(e)&&Jh(e.length)&&!!ue[Kh(e)]}var _g=Sg;function wg(e){return function(t){return e(t)}}var Cg=wg,Kr={exports:{}};Kr.exports,function(e,t){var r=Fi,n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===n,i=s&&r.process,a=function(){try{var c=o&&o.require&&o.require("util").types;return c||i&&i.binding&&i.binding("util")}catch{}}();e.exports=a}(Kr,Kr.exports);var Eg=Kr.exports,xg=_g,Ag=Cg,Qi=Eg,Ri=Qi&&Qi.isTypedArray,Og=Ri?Ag(Ri):xg,To=Og,$g=sp,Pg=$h,Ig=Hr,kg=ur,Dg=Yr,Mg=vo,Fg=Gr,Ng=To,Lg="[object Map]",jg="[object Set]",zg=Object.prototype,Bg=zg.hasOwnProperty;function Ug(e){if(e==null)return!0;if(Dg(e)&&(kg(e)||typeof e=="string"||typeof e.splice=="function"||Mg(e)||Ng(e)||Ig(e)))return!e.length;var t=Pg(e);if(t==Lg||t==jg)return!e.size;if(Fg(e))return!$g(e).length;for(var r in e)if(Bg.call(e,r))return!1;return!0}var Vg=Ug;const ea=ut(Vg),ta=(e,t,r,n,o,s,i)=>e.map((a,c)=>l.jsx(g.Grid.Col,{span:o==="row"?12/e.length:12,style:{alignContent:"end"},children:l.jsx(ce.JsonFormsDispatch,{uischema:a,schema:t,path:r,enabled:n,renderers:s,cells:i})},`${r}-${c}`)),Gg=({elements:e,schema:t,path:r,enabled:n,direction:o,renderers:s,cells:i})=>ea(e)?null:l.jsx(g.Grid,{spacing:o==="row"?2:0,children:ta(e,t,r,n,o,s,i)}),So=v.memo(Gg),Wg=e=>function(r){const n=ce.useJsonForms(),o=U.getAjv({jsonforms:{...n}});return l.jsx(e,{...r,ajv:o})};var Hg=qe,Yg=function(){return Hg.Date.now()},qg=Yg,Kg=/\s/;function Jg(e){for(var t=e.length;t--&&Kg.test(e.charAt(t)););return t}var Zg=Jg,Xg=Zg,Qg=/^\s+/;function Rg(e){return e&&e.slice(0,Xg(e)+1).replace(Qg,"")}var em=Rg,tm=Pt,rm=kt,nm="[object Symbol]";function om(e){return typeof e=="symbol"||rm(e)&&tm(e)==nm}var ra=om,sm=em,na=nt,im=ra,oa=NaN,am=/^[-+]0x[0-9a-f]+$/i,lm=/^0b[01]+$/i,cm=/^0o[0-7]+$/i,um=parseInt;function fm(e){if(typeof e=="number")return e;if(im(e))return oa;if(na(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=na(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=sm(e);var r=lm.test(e);return r||cm.test(e)?um(e.slice(2),r?2:8):am.test(e)?oa:+e}var sa=fm,dm=nt,_o=qg,ia=sa,pm="Expected a function",hm=Math.max,gm=Math.min;function mm(e,t,r){var n,o,s,i,a,c,u=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(pm);t=ia(t)||0,dm(r)&&(f=!!r.leading,d="maxWait"in r,s=d?hm(ia(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p);function y(P){var L=n,W=o;return n=o=void 0,u=P,i=e.apply(W,L),i}function b(P){return u=P,a=setTimeout(C,t),f?y(P):i}function h(P){var L=P-c,W=P-u,Z=t-L;return d?gm(Z,s-W):Z}function S(P){var L=P-c,W=P-u;return c===void 0||L>=t||L<0||d&&W>=s}function C(){var P=_o();if(S(P))return k(P);a=setTimeout(C,h(P))}function k(P){return a=void 0,p&&n?y(P):(n=o=void 0,i)}function O(){a!==void 0&&clearTimeout(a),u=0,n=c=o=a=void 0}function A(){return a===void 0?i:k(_o())}function _(){var P=_o(),L=S(P);if(n=arguments,o=this,c=P,L){if(a===void 0)return b(c);if(d)return clearTimeout(a),a=setTimeout(C,t),y(c)}return a===void 0&&(a=setTimeout(C,t)),i}return _.cancel=O,_.flush=A,_}var ym=mm;const bm=ut(ym),aa=(e,t,r,n,o,s=300)=>{const[i,a]=v.useState(r??t);v.useEffect(()=>{a(r??t)},[r]);const c=v.useCallback(bm(d=>e(n,d),s),[e,n,s]),u=v.useCallback(d=>{const p=o(d);a(p??t),c(p)},[c,o]),f=v.useCallback(()=>{a(t),e(n,void 0)},[t,e,n]);return[i,u,f]},vm=e=>e===""?void 0:parseFloat(e),Tm=e=>vm(e),Jr=v.memo(function(t){const{allowDecimal:r,className:n,data:o,description:s,errors:i,enabled:a,handleChange:c,label:u,path:f,required:d,hideControls:p}=t,[y,b]=aa(c,"",o,f,Tm),h=g.useProps(f,{},{});return Object.keys(h).forEach(S=>{typeof h[S]=="function"&&(h[S]=h[S](o))}),l.jsx(g.NumberInput,{label:u,description:s,error:i,required:d,value:y,onChange:b,className:n,disabled:!a,allowDecimal:r,hideControls:p,w:"100%",...h})});function Sm(){this.__data__=[],this.size=0}var _m=Sm;function wm(e,t){return e===t||e!==e&&t!==t}var Zr=wm,Cm=Zr;function Em(e,t){for(var r=e.length;r--;)if(Cm(e[r][0],t))return r;return-1}var Xr=Em,xm=Xr,Am=Array.prototype,Om=Am.splice;function $m(e){var t=this.__data__,r=xm(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Om.call(t,r,1),--this.size,!0}var Pm=$m,Im=Xr;function km(e){var t=this.__data__,r=Im(t,e);return r<0?void 0:t[r][1]}var Dm=km,Mm=Xr;function Fm(e){return Mm(this.__data__,e)>-1}var Nm=Fm,Lm=Xr;function jm(e,t){var r=this.__data__,n=Lm(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var zm=jm,Bm=_m,Um=Pm,Vm=Dm,Gm=Nm,Wm=zm;function Dt(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])}}Dt.prototype.clear=Bm,Dt.prototype.delete=Um,Dt.prototype.get=Vm,Dt.prototype.has=Gm,Dt.prototype.set=Wm;var Qr=Dt,Hm=Qr;function Ym(){this.__data__=new Hm,this.size=0}var qm=Ym;function Km(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Jm=Km;function Zm(e){return this.__data__.get(e)}var Xm=Zm;function Qm(e){return this.__data__.has(e)}var Rm=Qm,ey=_t,ty=ey(Object,"create"),Rr=ty,la=Rr;function ry(){this.__data__=la?la(null):{},this.size=0}var ny=ry;function oy(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var sy=oy,iy=Rr,ay="__lodash_hash_undefined__",ly=Object.prototype,cy=ly.hasOwnProperty;function uy(e){var t=this.__data__;if(iy){var r=t[e];return r===ay?void 0:r}return cy.call(t,e)?t[e]:void 0}var fy=uy,dy=Rr,py=Object.prototype,hy=py.hasOwnProperty;function gy(e){var t=this.__data__;return dy?t[e]!==void 0:hy.call(t,e)}var my=gy,yy=Rr,by="__lodash_hash_undefined__";function vy(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=yy&&t===void 0?by:t,this}var Ty=vy,Sy=ny,_y=sy,wy=fy,Cy=my,Ey=Ty;function Mt(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])}}Mt.prototype.clear=Sy,Mt.prototype.delete=_y,Mt.prototype.get=wy,Mt.prototype.has=Cy,Mt.prototype.set=Ey;var xy=Mt,ca=xy,Ay=Qr,Oy=po;function $y(){this.size=0,this.__data__={hash:new ca,map:new(Oy||Ay),string:new ca}}var Py=$y;function Iy(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ky=Iy,Dy=ky;function My(e,t){var r=e.__data__;return Dy(t)?r[typeof t=="string"?"string":"hash"]:r.map}var en=My,Fy=en;function Ny(e){var t=Fy(this,e).delete(e);return this.size-=t?1:0,t}var Ly=Ny,jy=en;function zy(e){return jy(this,e).get(e)}var By=zy,Uy=en;function Vy(e){return Uy(this,e).has(e)}var Gy=Vy,Wy=en;function Hy(e,t){var r=Wy(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Yy=Hy,qy=Py,Ky=Ly,Jy=By,Zy=Gy,Xy=Yy;function Ft(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])}}Ft.prototype.clear=qy,Ft.prototype.delete=Ky,Ft.prototype.get=Jy,Ft.prototype.has=Zy,Ft.prototype.set=Xy;var ua=Ft,Qy=Qr,Ry=po,e0=ua,t0=200;function r0(e,t){var r=this.__data__;if(r instanceof Qy){var n=r.__data__;if(!Ry||n.length<t0-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new e0(n)}return r.set(e,t),this.size=r.size,this}var n0=r0,o0=Qr,s0=qm,i0=Jm,a0=Xm,l0=Rm,c0=n0;function Nt(e){var t=this.__data__=new o0(e);this.size=t.size}Nt.prototype.clear=s0,Nt.prototype.delete=i0,Nt.prototype.get=a0,Nt.prototype.has=l0,Nt.prototype.set=c0;var u0=Nt,f0=_t,d0=function(){try{var e=f0(Object,"defineProperty");return e({},"",{}),e}catch{}}(),fa=d0,da=fa;function p0(e,t,r){t=="__proto__"&&da?da(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var wo=p0,h0=wo,g0=Zr;function m0(e,t,r){(r!==void 0&&!g0(e[t],r)||r===void 0&&!(t in e))&&h0(e,t,r)}var pa=m0;function y0(e){return function(t,r,n){for(var o=-1,s=Object(t),i=n(t),a=i.length;a--;){var c=i[e?a:++o];if(r(s[c],c,s)===!1)break}return t}}var b0=y0,v0=b0,T0=v0(),S0=T0,tn={exports:{}};tn.exports,function(e,t){var r=qe,n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===n,i=s?r.Buffer:void 0,a=i?i.allocUnsafe:void 0;function c(u,f){if(f)return u.slice();var d=u.length,p=a?a(d):new u.constructor(d);return u.copy(p),p}e.exports=c}(tn,tn.exports);var _0=tn.exports,w0=qe,C0=w0.Uint8Array,E0=C0,ha=E0;function x0(e){var t=new e.constructor(e.byteLength);return new ha(t).set(new ha(e)),t}var A0=x0,O0=A0;function $0(e,t){var r=t?O0(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var P0=$0;function I0(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var k0=I0,D0=nt,ga=Object.create,M0=function(){function e(){}return function(t){if(!D0(t))return{};if(ga)return ga(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),F0=M0,N0=Mi,L0=N0(Object.getPrototypeOf,Object),ma=L0,j0=F0,z0=ma,B0=Gr;function U0(e){return typeof e.constructor=="function"&&!B0(e)?j0(z0(e)):{}}var V0=U0,G0=Yr,W0=kt;function H0(e){return W0(e)&&G0(e)}var ya=H0,Y0=Pt,q0=ma,K0=kt,J0="[object Object]",Z0=Function.prototype,X0=Object.prototype,ba=Z0.toString,Q0=X0.hasOwnProperty,R0=ba.call(Object);function eb(e){if(!K0(e)||Y0(e)!=J0)return!1;var t=q0(e);if(t===null)return!0;var r=Q0.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ba.call(r)==R0}var tb=eb;function rb(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var va=rb,nb=wo,ob=Zr,sb=Object.prototype,ib=sb.hasOwnProperty;function ab(e,t,r){var n=e[t];(!(ib.call(e,t)&&ob(n,r))||r===void 0&&!(t in e))&&nb(e,t,r)}var lb=ab,cb=lb,ub=wo;function fb(e,t,r,n){var o=!r;r||(r={});for(var s=-1,i=t.length;++s<i;){var a=t[s],c=n?n(r[a],e[a],a,r,e):void 0;c===void 0&&(c=e[a]),o?ub(r,a,c):cb(r,a,c)}return r}var db=fb;function pb(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var hb=pb,gb=9007199254740991,mb=/^(?:0|[1-9]\d*)$/;function yb(e,t){var r=typeof e;return t=t??gb,!!t&&(r=="number"||r!="symbol"&&mb.test(e))&&e>-1&&e%1==0&&e<t}var Ta=yb,bb=hb,vb=Hr,Tb=ur,Sb=vo,_b=Ta,wb=To,Cb=Object.prototype,Eb=Cb.hasOwnProperty;function xb(e,t){var r=Tb(e),n=!r&&vb(e),o=!r&&!n&&Sb(e),s=!r&&!n&&!o&&wb(e),i=r||n||o||s,a=i?bb(e.length,String):[],c=a.length;for(var u in e)(t||Eb.call(e,u))&&!(i&&(u=="length"||o&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||_b(u,c)))&&a.push(u);return a}var Ab=xb;function Ob(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var $b=Ob,Pb=nt,Ib=Gr,kb=$b,Db=Object.prototype,Mb=Db.hasOwnProperty;function Fb(e){if(!Pb(e))return kb(e);var t=Ib(e),r=[];for(var n in e)n=="constructor"&&(t||!Mb.call(e,n))||r.push(n);return r}var Nb=Fb,Lb=Ab,jb=Nb,zb=Yr;function Bb(e){return zb(e)?Lb(e,!0):jb(e)}var Sa=Bb,Ub=db,Vb=Sa;function Gb(e){return Ub(e,Vb(e))}var Wb=Gb,_a=pa,Hb=_0,Yb=P0,qb=k0,Kb=V0,wa=Hr,Ca=ur,Jb=ya,Zb=vo,Xb=uo,Qb=nt,Rb=tb,ev=To,Ea=va,tv=Wb;function rv(e,t,r,n,o,s,i){var a=Ea(e,r),c=Ea(t,r),u=i.get(c);if(u){_a(e,r,u);return}var f=s?s(a,c,r+"",e,t,i):void 0,d=f===void 0;if(d){var p=Ca(c),y=!p&&Zb(c),b=!p&&!y&&ev(c);f=c,p||y||b?Ca(a)?f=a:Jb(a)?f=qb(a):y?(d=!1,f=Hb(c,!0)):b?(d=!1,f=Yb(c,!0)):f=[]:Rb(c)||wa(c)?(f=a,wa(a)?f=tv(a):(!Qb(a)||Xb(a))&&(f=Kb(c))):d=!1}d&&(i.set(c,f),o(f,c,n,s,i),i.delete(c)),_a(e,r,f)}var nv=rv,ov=u0,sv=pa,iv=S0,av=nv,lv=nt,cv=Sa,uv=va;function xa(e,t,r,n,o){e!==t&&iv(t,function(s,i){if(o||(o=new ov),lv(s))av(e,t,i,r,xa,n,o);else{var a=n?n(uv(e,i),s,i+"",e,t,o):void 0;a===void 0&&(a=s),sv(e,i,a)}},cv)}var fv=xa;function dv(e){return e}var Aa=dv;function pv(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 hv=pv,gv=hv,Oa=Math.max;function mv(e,t,r){return t=Oa(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,s=Oa(n.length-t,0),i=Array(s);++o<s;)i[o]=n[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=n[o];return a[t]=r(i),gv(e,this,a)}}var yv=mv;function bv(e){return function(){return e}}var vv=bv,Tv=vv,$a=fa,Sv=Aa,_v=$a?function(e,t){return $a(e,"toString",{configurable:!0,enumerable:!1,value:Tv(t),writable:!0})}:Sv,wv=_v,Cv=800,Ev=16,xv=Date.now;function Av(e){var t=0,r=0;return function(){var n=xv(),o=Ev-(n-r);if(r=n,o>0){if(++t>=Cv)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Ov=Av,$v=wv,Pv=Ov,Iv=Pv($v),kv=Iv,Dv=Aa,Mv=yv,Fv=kv;function Nv(e,t){return Fv(Mv(e,t,Dv),e+"")}var Pa=Nv,Lv=Zr,jv=Yr,zv=Ta,Bv=nt;function Uv(e,t,r){if(!Bv(r))return!1;var n=typeof t;return(n=="number"?jv(r)&&zv(t,r.length):n=="string"&&t in r)?Lv(r[t],e):!1}var Ia=Uv,Vv=Pa,Gv=Ia;function Wv(e){return Vv(function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(o--,s):void 0,i&&Gv(r[0],r[1],i)&&(s=o<3?void 0:s,o=1),t=Object(t);++n<o;){var a=r[n];a&&e(t,a,n,s)}return t})}var Hv=Wv,Yv=fv,qv=Hv,Kv=qv(function(e,t,r){Yv(e,t,r)}),Jv=Kv;const ka=ut(Jv),Da=v.memo(function(t){const{className:r,config:n,uischema:o,data:s,description:i,errors:a,enabled:c,path:u,handleChange:f,label:d,required:p}=t,y=ka({},n,o.options),b=g.useProps(u,{},{});return Object.keys(b).forEach(h=>{typeof b[h]=="function"&&(b[h]=b[h](s))}),y.format==="password"?l.jsx(g.PasswordInput,{label:d,description:i,error:a,required:p,value:s||"",onChange:h=>{f(u,h.currentTarget.value)},className:r,disabled:!c,w:"100%",...b}):l.jsx(g.TextInput,{label:d,description:i,error:a,required:p,value:s||"",onChange:h=>{f(u,h.currentTarget.value)},className:r,disabled:!c,w:"100%",...b})}),Ma=v.memo(function(t){const{className:r,data:n,description:o,enabled:s,errors:i,handleChange:a,label:c,labelPosition:u,path:f,required:d}=t,p=g.useProps(f,{},{});return Object.keys(p).forEach(y=>{typeof p[y]=="function"&&(p[y]=p[y](n))}),l.jsx(g.Checkbox,{label:c,description:o,error:i,disabled:!s,className:r,labelPosition:u,required:d,data:[{label:"true",value:"true"},{label:"false",value:"false"}],value:String(n)||"",onChange:y=>{a(f,y==="true")},...p})}),Zv=e=>l.jsx(Jr,{...e}),Fa=U.rankWith(4,U.isNumberControl),Na=ce.withJsonFormsCellProps(Zv),Xv=e=>l.jsx(Jr,{...e}),La=U.rankWith(3,U.isIntegerControl),ja=ce.withJsonFormsCellProps(Xv),Qv=e=>l.jsx(Da,{...e}),za=U.rankWith(2,U.isStringControl),Ba=ce.withJsonFormsCellProps(Qv),Rv=e=>l.jsx(Ma,{...e}),Ua=U.rankWith(3,U.isBooleanControl),Va=ce.withJsonFormsCellProps(Rv),e1=e=>{const{data:t,className:r,enabled:n,path:o,handleChange:s,description:i,errors:a,label:c,required:u}=e,f=g.useProps(o,{},{});return Object.keys(f).forEach(d=>{typeof f[d]=="function"&&(f[d]=f[d](t))}),l.jsx(ct.DateInput,{valueFormat:"DD.MM.YYYY",label:c,description:i,error:a,required:u,value:t?new Date(t):null,onChange:d=>{if(d instanceof Date){const p=new Date(d.getTime()-d.getTimezoneOffset()*6e4);s(o,p.toISOString().substring(0,10))}},className:r,disabled:!n,w:"100%",...f})},Ga=U.rankWith(2,U.isDateControl),Wa=ce.withJsonFormsCellProps(e1),t1=e=>{const{description:t,className:r,enabled:n,path:o,handleChange:s,data:i,errors:a,label:c,required:u}=e,f=g.useProps(o,{},{});return Object.keys(f).forEach(d=>{typeof f[d]=="function"&&(f[d]=f[d](i))}),l.jsx(ct.DateInput,{valueFormat:"DD.MM.YYYY",className:r,disabled:!n,label:c,description:t,error:a,required:u,value:i?new Date(i):null,onChange:d=>{if(d instanceof Date){const p=new Date(d.getTime()-d.getTimezoneOffset()*6e4);s(o,p.toISOString().substring(0,10))}},w:"100%",...f})},Ha=U.rankWith(5,U.isDateTimeControl),Ya=ce.withJsonFormsControlProps(t1),r1=e=>{const{description:t,data:r,path:n,options:o,enabled:s,handleChange:i,className:a,errors:c,label:u,required:f}=e,d=g.useProps(n,{},{});return Object.keys(d).forEach(p=>{typeof d[p]=="function"&&(d[p]=d[p](r))}),l.jsx(g.Select,{data:o,defaultValue:r,label:u,description:t,required:f,error:c,disabled:!s,searchable:!0,onChange:p=>{i(n,p)},className:a,w:"100%",...d})},qa=U.rankWith(5,U.isEnumControl),Ka=ce.withJsonFormsEnumProps(ce.withTranslateProps(v.memo(r1)),!1);function n1(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var o1=n1,Ja=Wr,s1=Hr,i1=ur,Za=Ja?Ja.isConcatSpreadable:void 0;function a1(e){return i1(e)||s1(e)||!!(Za&&e&&e[Za])}var l1=a1,c1=o1,u1=l1;function Xa(e,t,r,n,o){var s=-1,i=e.length;for(r||(r=u1),o||(o=[]);++s<i;){var a=e[s];t>0&&r(a)?t>1?Xa(a,t-1,r,n,o):c1(o,a):n||(o[o.length]=a)}return o}var f1=Xa,d1="__lodash_hash_undefined__";function p1(e){return this.__data__.set(e,d1),this}var h1=p1;function g1(e){return this.__data__.has(e)}var m1=g1,y1=ua,b1=h1,v1=m1;function rn(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new y1;++t<r;)this.add(e[t])}rn.prototype.add=rn.prototype.push=b1,rn.prototype.has=v1;var T1=rn;function S1(e,t,r,n){for(var o=e.length,s=r+(n?1:-1);n?s--:++s<o;)if(t(e[s],s,e))return s;return-1}var _1=S1;function w1(e){return e!==e}var C1=w1;function E1(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}var x1=E1,A1=_1,O1=C1,$1=x1;function P1(e,t,r){return t===t?$1(e,t,r):A1(e,O1,r)}var I1=P1,k1=I1;function D1(e,t){var r=e==null?0:e.length;return!!r&&k1(e,t,0)>-1}var M1=D1;function F1(e,t,r){for(var n=-1,o=e==null?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}var N1=F1;function L1(e,t){return e.has(t)}var j1=L1;function z1(){}var B1=z1;function U1(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Qa=U1,Co=Vi,V1=B1,G1=Qa,W1=1/0,H1=Co&&1/G1(new Co([,-0]))[1]==W1?function(e){return new Co(e)}:V1,Y1=H1,q1=T1,K1=M1,J1=N1,Z1=j1,X1=Y1,Q1=Qa,R1=200;function eT(e,t,r){var n=-1,o=K1,s=e.length,i=!0,a=[],c=a;if(r)i=!1,o=J1;else if(s>=R1){var u=t?null:X1(e);if(u)return Q1(u);i=!1,o=Z1,c=new q1}else c=t?[]:a;e:for(;++n<s;){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,i&&d===d){for(var p=c.length;p--;)if(c[p]===d)continue e;t&&c.push(d),a.push(f)}else o(c,d,r)||(c!==a&&c.push(d),a.push(f))}return a}var tT=eT,rT=f1,nT=Pa,oT=tT,sT=ya,iT=nT(function(e){return oT(rT(e,1,sT,!0))}),aT=iT;const lT=ut(aT);function cT(e,t,r,n){var o=-1,s=e==null?0:e.length;for(n&&s&&(r=e[++o]);++o<s;)r=t(r,e[o],o,e);return r}var uT=cT;function fT(e){return function(t){return e==null?void 0:e[t]}}var dT=fT,pT=dT,hT={À:"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"},gT=pT(hT),mT=gT;function yT(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var bT=yT,Ra=Wr,vT=bT,TT=ur,ST=ra,el=Ra?Ra.prototype:void 0,tl=el?el.toString:void 0;function rl(e){if(typeof e=="string")return e;if(TT(e))return vT(e,rl)+"";if(ST(e))return tl?tl.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var _T=rl,wT=_T;function CT(e){return e==null?"":wT(e)}var Eo=CT,ET=mT,xT=Eo,AT=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,OT="\\u0300-\\u036f",$T="\\ufe20-\\ufe2f",PT="\\u20d0-\\u20ff",IT=OT+$T+PT,kT="["+IT+"]",DT=RegExp(kT,"g");function MT(e){return e=xT(e),e&&e.replace(AT,ET).replace(DT,"")}var FT=MT,NT=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function LT(e){return e.match(NT)||[]}var jT=LT,zT=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function BT(e){return zT.test(e)}var UT=BT,nl="\\ud800-\\udfff",VT="\\u0300-\\u036f",GT="\\ufe20-\\ufe2f",WT="\\u20d0-\\u20ff",HT=VT+GT+WT,ol="\\u2700-\\u27bf",sl="a-z\\xdf-\\xf6\\xf8-\\xff",YT="\\xac\\xb1\\xd7\\xf7",qT="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",KT="\\u2000-\\u206f",JT=" \\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",il="A-Z\\xc0-\\xd6\\xd8-\\xde",ZT="\\ufe0e\\ufe0f",al=YT+qT+KT+JT,ll="['’]",cl="["+al+"]",XT="["+HT+"]",ul="\\d+",QT="["+ol+"]",fl="["+sl+"]",dl="[^"+nl+al+ul+ol+sl+il+"]",RT="\\ud83c[\\udffb-\\udfff]",eS="(?:"+XT+"|"+RT+")",tS="[^"+nl+"]",pl="(?:\\ud83c[\\udde6-\\uddff]){2}",hl="[\\ud800-\\udbff][\\udc00-\\udfff]",Lt="["+il+"]",rS="\\u200d",gl="(?:"+fl+"|"+dl+")",nS="(?:"+Lt+"|"+dl+")",ml="(?:"+ll+"(?:d|ll|m|re|s|t|ve))?",yl="(?:"+ll+"(?:D|LL|M|RE|S|T|VE))?",bl=eS+"?",vl="["+ZT+"]?",oS="(?:"+rS+"(?:"+[tS,pl,hl].join("|")+")"+vl+bl+")*",sS="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",iS="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",aS=vl+bl+oS,lS="(?:"+[QT,pl,hl].join("|")+")"+aS,cS=RegExp([Lt+"?"+fl+"+"+ml+"(?="+[cl,Lt,"$"].join("|")+")",nS+"+"+yl+"(?="+[cl,Lt+gl,"$"].join("|")+")",Lt+"?"+gl+"+"+ml,Lt+"+"+yl,iS,sS,ul,lS].join("|"),"g");function uS(e){return e.match(cS)||[]}var fS=uS,dS=jT,pS=UT,hS=Eo,gS=fS;function mS(e,t,r){return e=hS(e),t=r?void 0:t,t===void 0?pS(e)?gS(e):dS(e):e.match(t)||[]}var yS=mS,bS=uT,vS=FT,TS=yS,SS="['’]",_S=RegExp(SS,"g");function wS(e){return function(t){return bS(TS(vS(t).replace(_S,"")),e,"")}}var CS=wS;function ES(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(o);++n<o;)s[n]=e[n+t];return s}var xS=ES,AS=xS;function OS(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:AS(e,t,r)}var $S=OS,PS="\\ud800-\\udfff",IS="\\u0300-\\u036f",kS="\\ufe20-\\ufe2f",DS="\\u20d0-\\u20ff",MS=IS+kS+DS,FS="\\ufe0e\\ufe0f",NS="\\u200d",LS=RegExp("["+NS+PS+MS+FS+"]");function jS(e){return LS.test(e)}var Tl=jS;function zS(e){return e.split("")}var BS=zS,Sl="\\ud800-\\udfff",US="\\u0300-\\u036f",VS="\\ufe20-\\ufe2f",GS="\\u20d0-\\u20ff",WS=US+VS+GS,HS="\\ufe0e\\ufe0f",YS="["+Sl+"]",xo="["+WS+"]",Ao="\\ud83c[\\udffb-\\udfff]",qS="(?:"+xo+"|"+Ao+")",_l="[^"+Sl+"]",wl="(?:\\ud83c[\\udde6-\\uddff]){2}",Cl="[\\ud800-\\udbff][\\udc00-\\udfff]",KS="\\u200d",El=qS+"?",xl="["+HS+"]?",JS="(?:"+KS+"(?:"+[_l,wl,Cl].join("|")+")"+xl+El+")*",ZS=xl+El+JS,XS="(?:"+[_l+xo+"?",xo,wl,Cl,YS].join("|")+")",QS=RegExp(Ao+"(?="+Ao+")|"+XS+ZS,"g");function RS(e){return e.match(QS)||[]}var e_=RS,t_=BS,r_=Tl,n_=e_;function o_(e){return r_(e)?n_(e):t_(e)}var s_=o_,i_=$S,a_=Tl,l_=s_,c_=Eo;function u_(e){return function(t){t=c_(t);var r=a_(t)?l_(t):void 0,n=r?r[0]:t.charAt(0),o=r?i_(r,1).join(""):t.slice(1);return n[e]()+o}}var f_=u_,d_=f_,p_=d_("toUpperCase"),h_=p_,g_=CS,m_=h_,y_=g_(function(e,t,r){return e+(r?" ":"")+m_(t)}),b_=y_;const v_=ut(b_);var T_=Math.ceil,S_=Math.max;function __(e,t,r,n){for(var o=-1,s=S_(T_((t-e)/(r||1)),0),i=Array(s);s--;)i[n?s:++o]=e,e+=r;return i}var w_=__,C_=sa,E_=1/0,x_=17976931348623157e292;function A_(e){if(!e)return e===0?e:0;if(e=C_(e),e===E_||e===-1/0){var t=e<0?-1:1;return t*x_}return e===e?e:0}var O_=A_,$_=w_,P_=Ia,Oo=O_;function I_(e){return function(t,r,n){return n&&typeof n!="number"&&P_(t,r,n)&&(r=n=void 0),t=Oo(t),r===void 0?(r=t,t=0):r=Oo(r),n=n===void 0?t<r?1:-1:Oo(n),$_(t,r,n,e)}}var k_=I_,D_=k_,M_=D_(),F_=M_;const N_=ut(F_);var $o={exports:{}},se={};/**
104
+ */var rd=Ce("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function Rs(){const{error:e}=te(),[t,r]=v.useState(!1);return v.useEffect(()=>{e&&r(!0)},[e]),l.jsx(g.Modal,{opened:t,onClose:()=>r(!1),title:l.jsxs(g.Group,{children:[l.jsx(Yf,{size:16,color:"red"}),l.jsx(g.Text,{children:e?e.originalError.detail||e.originalError.message:"Error"})]}),centered:!0,children:e?l.jsx(g.Text,{children:e.message}):null})}function nd({opened:e,onClose:t,handleAccept:r,handleReject:n}){return l.jsxs(g.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(g.Group,{align:"right",mt:"xl",justify:"flex-end",children:[l.jsx(g.Button,{onClick:n,variant:"default",children:"Abbrechen"}),l.jsx(g.Button,{onClick:r,color:"red",children:"Löschen"})]})]})}function ei({id:e,...t}){const{deleteEntry:r}=te(),n={bg:"transparent",size:"sm",c:"gray"},o=g.useProps("ActionIcon",n,t),[s,i]=v.useState(!1),a=()=>{i(!1)},u=async()=>{r(e),i(!1)};return l.jsxs(l.Fragment,{children:[l.jsx(g.Tooltip,{label:"Delete",children:l.jsx(g.ActionIcon,{bg:o.bg,size:o.size,c:o.c,onClick:()=>{i(!0)},children:l.jsx(Qs,{})})}),l.jsx(nd,{opened:s,onClose:a,handleAccept:u,handleReject:a})]})}const Rn=(e,t)=>{const r=t.split("."),n=e[r[0]];if(r.length>1&&Array.isArray(n))return n.map(s=>Rn(s,r.slice(1).join("."))).join(", ");const o=t.split(".").reduce((s,i)=>s[i],e);return Ys(o)};function ti(e,t){return e===!0||Array.isArray(e)?t:Object.fromEntries(Object.keys(e).map(r=>[r,ti(e[r],t[r])]))}function ri(e,t){if(!e)return e;const r=t.values;return!r||!r.length||Array.isArray(e.id_)&&(e.id=e.id_),e}function od(e,t){const r={};return t.forEach(n=>{if(n.type==="Related"){r[n.name]=ri(e.result[n.name],n);return}if(n.type==="RelatedList"){r[n.name]=e.result[n.name].map(o=>ri(o,n));return}r[n.name]=typeof e.result[n.name]=="boolean"?String(e.result[n.name]):e.result[n.name]}),r}function eo(e){return t=>{try{return e.validateSync(t,{abortEarly:!1}),{}}catch(r){const n={};return r instanceof we&&r.inner.forEach(o=>{n[o.path.replaceAll("[",".").replaceAll("]","")]=o.message}),n}}}function sd({form:e,name:t,...r}){return l.jsx(l.Fragment,{children:l.jsx(ct.DateInput,{...e.getInputProps(t),onChange:n=>{if(n instanceof Date){const o=new Date(n.getTime()-n.getTimezoneOffset()*6e4);e.setFieldValue(t,o.toISOString().substring(0,10))}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...r})})}function id({form:e,name:t,...r}){return l.jsx(l.Fragment,{children:l.jsx(ct.DateTimePicker,{...e.getInputProps(t),onChange:n=>{if(n instanceof Date){const o=new Date(n);e.setFieldValue(t,o.toISOString())}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...r})})}function jr({form:e,name:t,...r}){const n=e.getInputProps(t).value,o=v.useMemo(()=>n&&typeof n=="object"?JSON.stringify(n):n||"",[n]);return t==="password"?l.jsx(g.PasswordInput,{...e.getInputProps(t),value:o,...r}):l.jsx(g.TextInput,{...e.getInputProps(t),value:o,...r})}function ni({form:e,name:t,filter:r,...n}){const[o,s]=v.useState(""),i=e.getInputProps(t).value,a=v.useMemo(()=>i?typeof i=="object"?JSON.stringify(i,null,2):i:"",[i]);return v.useEffect(()=>{s(a)},[a]),r?l.jsx(jr,{form:e,name:t,...n}):l.jsx(g.JsonInput,{autosize:!0,minRows:4,maxRows:12,validationError:"Invalid JSON",...e.getInputProps(t),...n,value:o,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 ad({form:e,name:t,filter:r,...n}){const[o,s]=v.useState(!!r);return l.jsxs(g.InputWrapper,{label:n.label,description:n.description,children:[!r&&l.jsxs(g.Group,{align:"center",gap:"xs",py:"0.25rem",children:[l.jsx(g.Checkbox,{checked:o,onChange:i=>s(i.currentTarget.checked)}),l.jsx(g.Text,{size:"xs",children:"WKT"})]}),o?l.jsx(jr,{form:e,name:t,...n,label:void 0,description:void 0}):l.jsx(ni,{form:e,name:t,...n,label:void 0,description:void 0})]})}function ld({form:e,name:t,items:r,...n}){const o=r.map(i=>({value:String(je(i.id)),label:i.value})),s=Array.isArray(e.getInputProps(t).value)?e.getInputProps(t).value.map(i=>String(typeof i=="object"?je(i.id):i)):[];return l.jsx(g.MultiSelect,{data:o,searchable:!0,...e.getInputProps(t),value:s||[],...n})}function cd({form:e,name:t,items:r,filter:n,...o}){var i;const s=r.map(a=>({value:String(je(a.id)),label:a.value}));return l.jsx(g.Select,{data:s,searchable:!0,...e.getInputProps(t),onChange:a=>{if(n){e.setFieldValue(t,a);return}const u=r.find(c=>String(je(c.id))===a)||null;e.setFieldValue(t,u)},value:n?e.getInputProps(t).value:String(je((i=e.getInputProps(t).value)==null?void 0:i.id))||"",...o})}function oi({form:e,name:t,items:r,...n}){return l.jsx(g.Select,{data:r,searchable:!0,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...n})}function zr({form:e,name:t,schema:r,filter:n,withinPortal:o=!0,...s}){if(!r.type)return null;switch(r.type){case"Boolean":return l.jsx(oi,{form:e,name:t,items:[{label:"true",value:n?"1":"true"},{label:"false",value:n?"0":"false"}],...s});case"RelatedList":return l.jsx(ld,{form:e,name:t,items:r.values,comboboxProps:{withinPortal:o},...s});case"Related":return l.jsx(cd,{form:e,name:t,items:r.values,filter:n,comboboxProps:{withinPortal:o},...s});case"DateTime":return l.jsx(id,{form:e,name:t,valueFormat:"DD.MM.YYYY HH:mm:ss",schema:r,popoverProps:{withinPortal:o},...s});case"Date":return l.jsx(sd,{form:e,name:t,valueFormat:"DD.MM.YYYY",schema:r,popoverProps:{withinPortal:o},...s});case"Geometry":return l.jsx(ad,{form:e,name:t,filter:n,...s});case"Raw":return l.jsx(ni,{form:e,name:t,filter:n,...s});case"Integer":case"Float":return l.jsx(jr,{form:e,name:t,...s});case"Enum":return l.jsx(oi,{form:e,name:t,items:r.values,comboboxProps:{withinPortal:o},...s});default:return l.jsx(jr,{form:e,name:t,...s})}}function ud(e,t){return new Promise(r=>{r(od(e,t.edit.columns))})}function si({item:e,info:t,opened:r,onClose:n,...o}){const{updateEntry:s}=te(),i={modal:{},stack:{},saveButton:{}},{modal:a,stack:u,saveButton:c}=g.useProps("EditDialog",i,o),d=tr.useForm({initialValues:t.edit.defaultValues,validate:eo(t.edit.schema)}),f=()=>{const y={};return Object.keys(d.values).forEach(b=>{d.isDirty(b)&&(y[b]=!0)}),y};v.useEffect(()=>{e&&ud(e,t).then(y=>{d.setValues(y),d.resetDirty(y)})},[e,t.edit.columns]);const p=async y=>{y=ti(f(),y),await s(e.id,y),n()};return v.useEffect(()=>{d.setInitialValues(t.edit.defaultValues),d.reset()},[t.edit.defaultValues]),e?l.jsx(g.Modal,{opened:r,onClose:()=>{n()},title:t.edit.title,size:"lg",centered:!0,...a,children:l.jsx(g.Box,{component:"form",onSubmit:d.onSubmit(p),children:l.jsx(g.Stack,{spacing:"md",...u,children:l.jsxs(g.ScrollArea.Autosize,{mah:450,type:"auto",children:[t.edit.columns.map((y,b)=>l.jsx(zr,{form:d,name:y.name,label:y.label,description:y.description,schema:y,withAsterisk:y.required},b)),l.jsx(g.Group,{position:"right",mt:"xl",children:l.jsx(g.Button,{type:"submit",...c,children:"Save"})})]})})})}):null}function ii({id:e,...t}){const{info:r,getEntry:n}=te(),o={bg:"transparent",size:"sm",c:"gray"},s=g.useProps("ActionIcon",o,t),[i,a]=v.useState(null),[u,c]=v.useState(!1),[d,f]=v.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(g.Tooltip,{label:"Edit",children:l.jsx(g.ActionIcon,{bg:s.bg,size:s.size,c:s.c,onClick:async()=>{c(!0);const p=await n(e);p&&(a(p),c(!1),f(!0))},children:l.jsx(Rf,{})})}),l.jsx(si,{item:i,info:r,opened:d,onClose:()=>f(!1)})]})}function fd({relatedPath:e,...t}){const{path:r}=te();return Te(r?r.substring(0,r.lastIndexOf("/")):"",e.substring(0,e.lastIndexOf("/"))),l.jsx(qs,{resource_name:e.replace("/",""),relation:t,children:l.jsx(fo,{hideToolbar:!0,hideDownload:!1})})}const dd=v.memo(fd);function pd({item:e,info:t,loading:r,opened:n,onClose:o,...s}){const i={modal:{},tabs:{},tabsList:{},tabsPanel:{}},{modal:a,tabs:u,tabsList:c,tabsPanel:d}=g.useProps("ViewDialog",i,s);return l.jsxs(g.Modal,{opened:n,onClose:o,title:`${e==null?void 0:e.show_title} (#${je(e==null?void 0:e.id)})`,size:"lg",centered:!0,zIndex:1e3,...a,children:[l.jsx(g.LoadingOverlay,{visible:r}),!r&&e?l.jsxs(g.Tabs,{defaultValue:"details",...u,children:[l.jsxs(g.Tabs.List,{...c,children:[l.jsx(g.Tabs.Tab,{value:"details",children:"Details"}),t.relations.map((f,p)=>l.jsx(g.Tabs.Tab,{value:f.name,children:f.name},p))]}),l.jsx(g.Tabs.Panel,{pt:"xs",value:"details",...d,children:l.jsx(g.Paper,{p:"xs",withBorder:!0,children:l.jsx(g.Stack,{spacing:"md",children:l.jsx(g.ScrollArea,{h:450,type:"auto",children:e.show_columns.map((f,p)=>l.jsxs(g.Grid,{maw:500,children:[l.jsx(g.Grid.Col,{span:4,children:l.jsx(g.Text,{size:"md",children:e.label_columns[f]})}),l.jsx(g.Grid.Col,{span:1,children:l.jsx(g.Text,{size:"xs",children:":"})}),l.jsx(g.Grid.Col,{span:6,children:l.jsx(g.Text,{size:"md",children:Rn(e.result,f)})})]},p))})})})}),t.relations.map((f,p)=>l.jsx(g.Tabs.Panel,{pt:"xs",value:f.name,children:l.jsx(g.Paper,{withBorder:!0,children:l.jsx(dd,{relatedPath:f.path,id:je(e.id),foreign_key:f.foreign_key,type:f.type})})},p))]}):null]})}function hd({id:e,...t}){const{info:r,getEntry:n}=te(),o={bg:"transparent",size:"sm",c:"gray"},s=g.useProps("ActionIcon",o,t),[i,a]=v.useState(null),[u,c]=v.useState(!1),[d,f]=v.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(g.Tooltip,{label:"Details",children:l.jsx(g.ActionIcon,{bg:s.bg,size:s.size,c:s.c,onClick:async()=>{c(!0);const p=await n(e);p&&(a(p),c(!1),f(!0))},children:l.jsx(Jf,{})})}),l.jsx(pd,{item:i,info:r,loading:u,opened:d,onClose:()=>f(!1)})]})}function to({id:e}){const{info:t}=te();return l.jsxs(g.Flex,{style:{gap:4,whiteSpace:"nowrap"},children:[t!=null&&t.permissions.includes("can_get")?l.jsx(hd,{id:e}):null,t!=null&&t.permissions.includes("can_put")?l.jsx(ii,{id:e}):null,t!=null&&t.permissions.includes("can_delete")?l.jsx(ei,{id:e}):null]})}function ro({opened:e,onClose:t,...r}){const{info:n,addEntry:o}=te(),s={modal:{},stack:{},addButton:{}},{addButton:i,modal:a,stack:u}=g.useProps("AddDialog",s,r),c=tr.useForm({initialValues:n.add.defaultValues,validate:eo(n.add.schema)}),d=async f=>{await o(f),c.reset(),t()};return v.useEffect(()=>{c.setInitialValues(n.add.defaultValues),c.reset()},[n.add.defaultValues]),l.jsx(g.Modal,{opened:e,onClose:()=>{c.reset(),t()},title:n.add.title,size:"lg",centered:!0,...a,children:l.jsx(g.Box,{component:"form",onSubmit:c.onSubmit(d),children:l.jsx(g.Stack,{spacing:"md",...u,children:l.jsxs(g.ScrollArea.Autosize,{mah:450,type:"auto",children:[n.add.columns.map((f,p)=>l.jsx(zr,{form:c,name:f.name,label:f.label,description:f.description,schema:f,withAsterisk:f.required},p)),l.jsx(g.Group,{position:"right",mt:"xl",children:l.jsx(g.Button,{type:"submit",...i,children:"Add"})})]})})})})}function ai(...e){const[t,r]=v.useState(!1),n={bg:"transparent",size:"sm",c:"gray"},o=g.useProps("ActionIcon",n,e);return l.jsxs(l.Fragment,{children:[l.jsx(g.Tooltip,{label:"Add Item",children:l.jsx(g.ActionIcon,{bg:o.bg,size:o.size,c:o.c,onClick:()=>{r(!0)},children:l.jsx(Lr,{})})}),l.jsx(ro,{opened:t,onClose:()=>{r(!1)}})]})}/*! @license DOMPurify 3.2.4 | (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.4/LICENSE */const{entries:li,setPrototypeOf:ci,isFrozen:gd,getPrototypeOf:md,getOwnPropertyDescriptor:yd}=Object;let{freeze:Ie,seal:Ue,create:ui}=Object,{apply:no,construct:oo}=typeof Reflect<"u"&&Reflect;Ie||(Ie=function(t){return t}),Ue||(Ue=function(t){return t}),no||(no=function(t,r,n){return t.apply(r,n)}),oo||(oo=function(t,r){return new t(...r)});const Br=Me(Array.prototype.forEach),bd=Me(Array.prototype.lastIndexOf),fi=Me(Array.prototype.pop),or=Me(Array.prototype.push),vd=Me(Array.prototype.splice),Ur=Me(String.prototype.toLowerCase),so=Me(String.prototype.toString),di=Me(String.prototype.match),sr=Me(String.prototype.replace),Td=Me(String.prototype.indexOf),Sd=Me(String.prototype.trim),Ye=Me(Object.prototype.hasOwnProperty),ke=Me(RegExp.prototype.test),ir=_d(TypeError);function Me(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return no(e,t,n)}}function _d(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return oo(e,r)}}function R(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ur;ci&&ci(e,null);let n=t.length;for(;n--;){let o=t[n];if(typeof o=="string"){const s=r(o);s!==o&&(gd(t)||(t[n]=s),o=s)}e[o]=!0}return e}function wd(e){for(let t=0;t<e.length;t++)Ye(e,t)||(e[t]=null);return e}function St(e){const t=ui(null);for(const[r,n]of li(e))Ye(e,r)&&(Array.isArray(n)?t[r]=wd(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=St(n):t[r]=n);return t}function ar(e,t){for(;e!==null;){const n=yd(e,t);if(n){if(n.get)return Me(n.get);if(typeof n.value=="function")return Me(n.value)}e=md(e)}function r(){return null}return r}const pi=Ie(["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"]),io=Ie(["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"]),ao=Ie(["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"]),Cd=Ie(["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"]),lo=Ie(["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"]),Ed=Ie(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),hi=Ie(["#text"]),gi=Ie(["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"]),co=Ie(["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"]),mi=Ie(["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"]),Vr=Ie(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),xd=Ue(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ad=Ue(/<%[\w\W]*|[\w\W]*%>/gm),Od=Ue(/\$\{[\w\W]*/gm),$d=Ue(/^data-[\-\w.\u00B7-\uFFFF]+$/),Pd=Ue(/^aria-[\-\w]+$/),yi=Ue(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Id=Ue(/^(?:\w+script|data):/i),kd=Ue(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bi=Ue(/^html$/i),Md=Ue(/^[a-z][.\w]*(-[.\w]+)+$/i);var vi=Object.freeze({__proto__:null,ARIA_ATTR:Pd,ATTR_WHITESPACE:kd,CUSTOM_ELEMENT:Md,DATA_ATTR:$d,DOCTYPE_NAME:bi,ERB_EXPR:Ad,IS_ALLOWED_URI:yi,IS_SCRIPT_OR_DATA:Id,MUSTACHE_EXPR:xd,TMPLIT_EXPR:Od});const lr={element:1,text:3,progressingInstruction:7,comment:8,document:9},Dd=function(){return typeof window>"u"?null:window},Fd=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(n=r.getAttribute(o));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Ti=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Si(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dd();const t=Y=>Si(Y);if(t.version="3.2.4",t.removed=[],!e||!e.document||e.document.nodeType!==lr.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const n=r,o=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:i,Node:a,Element:u,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:y}=e,b=u.prototype,h=ar(b,"cloneNode"),S=ar(b,"remove"),x=ar(b,"nextSibling"),D=ar(b,"childNodes"),A=ar(b,"parentNode");if(typeof i=="function"){const Y=r.createElement("template");Y.content&&Y.content.ownerDocument&&(r=Y.content.ownerDocument)}let _,w="";const{implementation:P,createNodeIterator:F,createDocumentFragment:G,getElementsByTagName:j}=r,{importNode:m}=n;let O=Ti();t.isSupported=typeof li=="function"&&typeof A=="function"&&P&&P.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:z,ERB_EXPR:q,TMPLIT_EXPR:ee,DATA_ATTR:fe,ARIA_ATTR:se,IS_SCRIPT_OR_DATA:ye,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:W}=vi;let{IS_ALLOWED_URI:E}=vi,$=null;const K=R({},[...pi,...io,...ao,...lo,...hi]);let V=null;const J=R({},[...gi,...co,...mi,...Vr]);let B=Object.seal(ui(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}})),Z=null,X=null,N=!0,L=!0,Q=!1,Se=!0,M=!1,Ne=!0,We=!1,Jt=!1,is=!1,Zt=!1,Cn=!1,En=!1,au=!0,lu=!1;const Mx="user-content-";let as=!0,Sr=!1,Xt={},Qt=null;const cu=R({},["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 uu=null;const fu=R({},["audio","video","img","source","image","track"]);let ls=null;const du=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xn="http://www.w3.org/1998/Math/MathML",An="http://www.w3.org/2000/svg",at="http://www.w3.org/1999/xhtml";let Rt=at,cs=!1,us=null;const Dx=R({},[xn,An,at],so);let On=R({},["mi","mo","mn","ms","mtext"]),$n=R({},["annotation-xml"]);const Fx=R({},["title","style","font","a","script"]);let _r=null;const Nx=["application/xhtml+xml","text/html"],Lx="text/html";let Ee=null,er=null;const jx=r.createElement("form"),pu=function(T){return T instanceof RegExp||T instanceof Function},fs=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(er&&er===T)){if((!T||typeof T!="object")&&(T={}),T=St(T),_r=Nx.indexOf(T.PARSER_MEDIA_TYPE)===-1?Lx:T.PARSER_MEDIA_TYPE,Ee=_r==="application/xhtml+xml"?so:Ur,$=Ye(T,"ALLOWED_TAGS")?R({},T.ALLOWED_TAGS,Ee):K,V=Ye(T,"ALLOWED_ATTR")?R({},T.ALLOWED_ATTR,Ee):J,us=Ye(T,"ALLOWED_NAMESPACES")?R({},T.ALLOWED_NAMESPACES,so):Dx,ls=Ye(T,"ADD_URI_SAFE_ATTR")?R(St(du),T.ADD_URI_SAFE_ATTR,Ee):du,uu=Ye(T,"ADD_DATA_URI_TAGS")?R(St(fu),T.ADD_DATA_URI_TAGS,Ee):fu,Qt=Ye(T,"FORBID_CONTENTS")?R({},T.FORBID_CONTENTS,Ee):cu,Z=Ye(T,"FORBID_TAGS")?R({},T.FORBID_TAGS,Ee):{},X=Ye(T,"FORBID_ATTR")?R({},T.FORBID_ATTR,Ee):{},Xt=Ye(T,"USE_PROFILES")?T.USE_PROFILES:!1,N=T.ALLOW_ARIA_ATTR!==!1,L=T.ALLOW_DATA_ATTR!==!1,Q=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,M=T.SAFE_FOR_TEMPLATES||!1,Ne=T.SAFE_FOR_XML!==!1,We=T.WHOLE_DOCUMENT||!1,Zt=T.RETURN_DOM||!1,Cn=T.RETURN_DOM_FRAGMENT||!1,En=T.RETURN_TRUSTED_TYPE||!1,is=T.FORCE_BODY||!1,au=T.SANITIZE_DOM!==!1,lu=T.SANITIZE_NAMED_PROPS||!1,as=T.KEEP_CONTENT!==!1,Sr=T.IN_PLACE||!1,E=T.ALLOWED_URI_REGEXP||yi,Rt=T.NAMESPACE||at,On=T.MATHML_TEXT_INTEGRATION_POINTS||On,$n=T.HTML_INTEGRATION_POINTS||$n,B=T.CUSTOM_ELEMENT_HANDLING||{},T.CUSTOM_ELEMENT_HANDLING&&pu(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(B.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&pu(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(B.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(B.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),M&&(L=!1),Cn&&(Zt=!0),Xt&&($=R({},hi),V=[],Xt.html===!0&&(R($,pi),R(V,gi)),Xt.svg===!0&&(R($,io),R(V,co),R(V,Vr)),Xt.svgFilters===!0&&(R($,ao),R(V,co),R(V,Vr)),Xt.mathMl===!0&&(R($,lo),R(V,mi),R(V,Vr))),T.ADD_TAGS&&($===K&&($=St($)),R($,T.ADD_TAGS,Ee)),T.ADD_ATTR&&(V===J&&(V=St(V)),R(V,T.ADD_ATTR,Ee)),T.ADD_URI_SAFE_ATTR&&R(ls,T.ADD_URI_SAFE_ATTR,Ee),T.FORBID_CONTENTS&&(Qt===cu&&(Qt=St(Qt)),R(Qt,T.FORBID_CONTENTS,Ee)),as&&($["#text"]=!0),We&&R($,["html","head","body"]),$.table&&(R($,["tbody"]),delete Z.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw ir('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ir('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=T.TRUSTED_TYPES_POLICY,w=_.createHTML("")}else _===void 0&&(_=Fd(y,o)),_!==null&&typeof w=="string"&&(w=_.createHTML(""));Ie&&Ie(T),er=T}},hu=R({},[...io,...ao,...Cd]),gu=R({},[...lo,...Ed]),zx=function(T){let k=A(T);(!k||!k.tagName)&&(k={namespaceURI:Rt,tagName:"template"});const U=Ur(T.tagName),he=Ur(k.tagName);return us[T.namespaceURI]?T.namespaceURI===An?k.namespaceURI===at?U==="svg":k.namespaceURI===xn?U==="svg"&&(he==="annotation-xml"||On[he]):!!hu[U]:T.namespaceURI===xn?k.namespaceURI===at?U==="math":k.namespaceURI===An?U==="math"&&$n[he]:!!gu[U]:T.namespaceURI===at?k.namespaceURI===An&&!$n[he]||k.namespaceURI===xn&&!On[he]?!1:!gu[U]&&(Fx[U]||!hu[U]):!!(_r==="application/xhtml+xml"&&us[T.namespaceURI]):!1},Re=function(T){or(t.removed,{element:T});try{A(T).removeChild(T)}catch{S(T)}},Pn=function(T,k){try{or(t.removed,{attribute:k.getAttributeNode(T),from:k})}catch{or(t.removed,{attribute:null,from:k})}if(k.removeAttribute(T),T==="is")if(Zt||Cn)try{Re(k)}catch{}else try{k.setAttribute(T,"")}catch{}},mu=function(T){let k=null,U=null;if(is)T="<remove></remove>"+T;else{const xe=di(T,/^[\r\n\t ]+/);U=xe&&xe[0]}_r==="application/xhtml+xml"&&Rt===at&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const he=_?_.createHTML(T):T;if(Rt===at)try{k=new p().parseFromString(he,_r)}catch{}if(!k||!k.documentElement){k=P.createDocument(Rt,"template",null);try{k.documentElement.innerHTML=cs?w:he}catch{}}const Oe=k.body||k.documentElement;return T&&U&&Oe.insertBefore(r.createTextNode(U),Oe.childNodes[0]||null),Rt===at?j.call(k,We?"html":"body")[0]:We?k.documentElement:Oe},yu=function(T){return F.call(T.ownerDocument||T,T,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ds=function(T){return T instanceof f&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof d)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},bu=function(T){return typeof a=="function"&&T instanceof a};function lt(Y,T,k){Br(Y,U=>{U.call(t,T,k,er)})}const vu=function(T){let k=null;if(lt(O.beforeSanitizeElements,T,null),ds(T))return Re(T),!0;const U=Ee(T.nodeName);if(lt(O.uponSanitizeElement,T,{tagName:U,allowedTags:$}),T.hasChildNodes()&&!bu(T.firstElementChild)&&ke(/<[/\w]/g,T.innerHTML)&&ke(/<[/\w]/g,T.textContent)||T.nodeType===lr.progressingInstruction||Ne&&T.nodeType===lr.comment&&ke(/<[/\w]/g,T.data))return Re(T),!0;if(!$[U]||Z[U]){if(!Z[U]&&Su(U)&&(B.tagNameCheck instanceof RegExp&&ke(B.tagNameCheck,U)||B.tagNameCheck instanceof Function&&B.tagNameCheck(U)))return!1;if(as&&!Qt[U]){const he=A(T)||T.parentNode,Oe=D(T)||T.childNodes;if(Oe&&he){const xe=Oe.length;for(let Le=xe-1;Le>=0;--Le){const et=h(Oe[Le],!0);et.__removalCount=(T.__removalCount||0)+1,he.insertBefore(et,x(T))}}}return Re(T),!0}return T instanceof u&&!zx(T)||(U==="noscript"||U==="noembed"||U==="noframes")&&ke(/<\/no(script|embed|frames)/i,T.innerHTML)?(Re(T),!0):(M&&T.nodeType===lr.text&&(k=T.textContent,Br([z,q,ee],he=>{k=sr(k,he," ")}),T.textContent!==k&&(or(t.removed,{element:T.cloneNode()}),T.textContent=k)),lt(O.afterSanitizeElements,T,null),!1)},Tu=function(T,k,U){if(au&&(k==="id"||k==="name")&&(U in r||U in jx))return!1;if(!(L&&!X[k]&&ke(fe,k))){if(!(N&&ke(se,k))){if(!V[k]||X[k]){if(!(Su(T)&&(B.tagNameCheck instanceof RegExp&&ke(B.tagNameCheck,T)||B.tagNameCheck instanceof Function&&B.tagNameCheck(T))&&(B.attributeNameCheck instanceof RegExp&&ke(B.attributeNameCheck,k)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(k))||k==="is"&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&&ke(B.tagNameCheck,U)||B.tagNameCheck instanceof Function&&B.tagNameCheck(U))))return!1}else if(!ls[k]){if(!ke(E,sr(U,_e,""))){if(!((k==="src"||k==="xlink:href"||k==="href")&&T!=="script"&&Td(U,"data:")===0&&uu[T])){if(!(Q&&!ke(ye,sr(U,_e,"")))){if(U)return!1}}}}}}return!0},Su=function(T){return T!=="annotation-xml"&&di(T,W)},_u=function(T){lt(O.beforeSanitizeAttributes,T,null);const{attributes:k}=T;if(!k||ds(T))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let he=k.length;for(;he--;){const Oe=k[he],{name:xe,namespaceURI:Le,value:et}=Oe,wr=Ee(xe);let De=xe==="value"?et:Sd(et);if(U.attrName=wr,U.attrValue=De,U.keepAttr=!0,U.forceKeepAttr=void 0,lt(O.uponSanitizeAttribute,T,U),De=U.attrValue,lu&&(wr==="id"||wr==="name")&&(Pn(xe,T),De=Mx+De),Ne&&ke(/((--!?|])>)|<\/(style|title)/i,De)){Pn(xe,T);continue}if(U.forceKeepAttr||(Pn(xe,T),!U.keepAttr))continue;if(!Se&&ke(/\/>/i,De)){Pn(xe,T);continue}M&&Br([z,q,ee],Cu=>{De=sr(De,Cu," ")});const wu=Ee(T.nodeName);if(Tu(wu,wr,De)){if(_&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Le)switch(y.getAttributeType(wu,wr)){case"TrustedHTML":{De=_.createHTML(De);break}case"TrustedScriptURL":{De=_.createScriptURL(De);break}}try{Le?T.setAttributeNS(Le,xe,De):T.setAttribute(xe,De),ds(T)?Re(T):fi(t.removed)}catch{}}}lt(O.afterSanitizeAttributes,T,null)},Bx=function Y(T){let k=null;const U=yu(T);for(lt(O.beforeSanitizeShadowDOM,T,null);k=U.nextNode();)lt(O.uponSanitizeShadowNode,k,null),vu(k),_u(k),k.content instanceof s&&Y(k.content);lt(O.afterSanitizeShadowDOM,T,null)};return t.sanitize=function(Y){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=null,U=null,he=null,Oe=null;if(cs=!Y,cs&&(Y="<!-->"),typeof Y!="string"&&!bu(Y))if(typeof Y.toString=="function"){if(Y=Y.toString(),typeof Y!="string")throw ir("dirty is not a string, aborting")}else throw ir("toString is not a function");if(!t.isSupported)return Y;if(Jt||fs(T),t.removed=[],typeof Y=="string"&&(Sr=!1),Sr){if(Y.nodeName){const et=Ee(Y.nodeName);if(!$[et]||Z[et])throw ir("root node is forbidden and cannot be sanitized in-place")}}else if(Y instanceof a)k=mu("<!---->"),U=k.ownerDocument.importNode(Y,!0),U.nodeType===lr.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?k=U:k.appendChild(U);else{if(!Zt&&!M&&!We&&Y.indexOf("<")===-1)return _&&En?_.createHTML(Y):Y;if(k=mu(Y),!k)return Zt?null:En?w:""}k&&is&&Re(k.firstChild);const xe=yu(Sr?Y:k);for(;he=xe.nextNode();)vu(he),_u(he),he.content instanceof s&&Bx(he.content);if(Sr)return Y;if(Zt){if(Cn)for(Oe=G.call(k.ownerDocument);k.firstChild;)Oe.appendChild(k.firstChild);else Oe=k;return(V.shadowroot||V.shadowrootmode)&&(Oe=m.call(n,Oe,!0)),Oe}let Le=We?k.outerHTML:k.innerHTML;return We&&$["!doctype"]&&k.ownerDocument&&k.ownerDocument.doctype&&k.ownerDocument.doctype.name&&ke(bi,k.ownerDocument.doctype.name)&&(Le="<!DOCTYPE "+k.ownerDocument.doctype.name+`>
105
+ `+Le),M&&Br([z,q,ee],et=>{Le=sr(Le,et," ")}),_&&En?_.createHTML(Le):Le},t.setConfig=function(){let Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fs(Y),Jt=!0},t.clearConfig=function(){er=null,Jt=!1},t.isValidAttribute=function(Y,T,k){er||fs({});const U=Ee(Y),he=Ee(T);return Tu(U,he,k)},t.addHook=function(Y,T){typeof T=="function"&&or(O[Y],T)},t.removeHook=function(Y,T){if(T!==void 0){const k=bd(O[Y],T);return k===-1?void 0:vd(O[Y],k,1)[0]}return fi(O[Y])},t.removeHooks=function(Y){O[Y]=[]},t.removeAllHooks=function(){O=Ti()},t}var _i=Si();const Ze=v.forwardRef(({fallback:e,functionProps:t,children:r},n)=>{if(typeof r=="function"&&(r=r(...t)),r===null)return null;const o=r||e;return v.isValidElement(o)?v.cloneElement(o,{ref:n}):o});Ze.displayName="FallbackWrapper";const Nd={field:"_field_zdaf7_1",rtl:"_rtl_zdaf7_7",borderRight:"_borderRight_zdaf7_12"},Gr=v.memo(({id:e,entry:t,loading:r,rightBorder:n,children:o,onClickEntry:s,customElement:i,sanitize:a,...u})=>{const c={text:{style:{whiteSpace:"nowrap",overflow:"ellipsis"}}},{text:d}=g.useProps("Field",c,u),f={};Object.entries(d).forEach(([y,b])=>{typeof b=="function"&&(f[y]=b(t))});const p=g.useStyles({name:"Field",props:u,classes:Nd});return l.jsx(g.Table.Td,{...p("field"),onClick:s?()=>s(e,t):null,...u,children:l.jsx(g.Box,{w:"100%",children:l.jsx(g.Skeleton,{visible:r,children:l.jsx(Ze,{fallback:Array.isArray(o)?o.map((y,b)=>l.jsx(g.Text,{...d,...f,children:a?_i.sanitize(y):y},b)):v.isValidElement(o)?o:l.jsx(g.Text,{...d,...f,children:a?_i.sanitize(o):o}),functionProps:[t],children:i})})})})});Gr.displayName="Field";const wi={row:"_row_138r2_1",selected:"_selected_138r2_5"};function Ld({entry:e,selected:t,children:r}){const n=g.useStyles({name:"Row",classes:wi}),o=g.useProps("Row",{},{});Object.entries(o).forEach(([a,u])=>{typeof u=="function"&&(o[a]=u(e))});var{className:s,style:i}=n("row");return s=`${s} ${t?wi.selected:""}`,l.jsx(g.Table.Tr,{className:s,style:{...i},...o,children:r})}function jd({bodyCustomizer:e,actionColumn:t,id:r,entry:n}){let o=e==null?void 0:e[t];return typeof o=="function"&&(o=o({id:r,...n})),o===null?null:o||l.jsx(to,{id:r})}function zd({data:e,loading:t,hideActions:r,hideCheckbox:n,selection:o,toggleRow:s,onClickEntry:i,bodyCustomizer:a,bodySeparator:u}){const c=e.list_columns.includes("actions")?"_actions":"actions",d=v.useMemo(()=>e!=null&&e.list_columns.includes("all")?"_all":"all",[e==null?void 0:e.list_columns]);return l.jsx(g.Table.Tbody,{children:e.result.length?e.result.map((f,p)=>{const y=e.ids[p];return l.jsxs(Ld,{entry:{...f,id:y},children:[n?null:l.jsx(Gr,{loading:t,children:l.jsx(g.Checkbox,{pl:2,checked:o.includes(y),onChange:b=>{s(y)}})},p),r?null:l.jsx(Gr,{loading:t,children:l.jsx(jd,{bodyCustomizer:a,actionColumn:c,id:je(y),entry:f})}),e.list_columns.map((b,h)=>{let S=a==null?void 0:a[b];typeof S=="function"&&(S=S({id:y,...f}));let x=Rn(f,b);typeof x=="number"?x=x.toLocaleString():x==null&&(x="");const D=(u==null?void 0:u[b])||(u==null?void 0:u[d]);return D&&(x=x.split(D)),S===null?null:l.jsx(Gr,{id:y,entry:f,loading:t,onClickEntry:i,customElement:S,sanitize:!0,children:x},h)})]},je(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(g.Text,{style:{fontStyle:"italic"},size:"sm",c:"dimmed",children:"No data available"})})})})}const Ci={root:"_root_1kmay_1",wrapper:"_wrapper_1kmay_7",icon:"_icon_1kmay_18"};function uo({column:e,label:t,orderColumn:r,related:n,toggleAll:o,allChecked:s,classNames:i,styles:a,customElement:u,...c}){const{queryParams:d,setQueryParams:f,loading:p}=te(),y={fw:700,size:"sm",color:"gray.8",hoverColor:"gray.6",selectedColor:"blue"},b=g.useStyles({name:"FieldTitle",classes:Ci,classNames:i,styles:a,props:c}),h=g.useProps("FieldTitle",y,c),{hovered:S,ref:x}=be.useHover(),D=r&&d.order_column===r,A=b("wrapper");return A.style.cursor=r?A.style.cursor:"auto",l.jsx(g.Table.Th,{className:Ci.fieldTitleRoot,...b("root"),onClick:r&&!p?()=>f({order_column:r,order_direction:d.order_direction==="asc"?"desc":"asc"}):null,children:l.jsx(g.Box,{ref:x,...A,children:e==="Checkbox"?l.jsx(g.Checkbox,{pb:5,pl:2,onChange:o,checked:s}):l.jsxs(l.Fragment,{children:[l.jsx(g.Box,{w:"100%",fw:h.fw,size:"xl",c:S&&r?h.hoverColor:D?h.selectedColor:h.color,children:u||t||e}),n?l.jsx(g.Tooltip,{label:"Related Field",children:l.jsx(g.Indicator,{label:"rel",style:{indicator:{top:"-1px !important",right:"-2px !important",padding:"4px"}},children:l.jsx(g.Box,{...b("icon"),children:D?d.order_direction==="asc"?l.jsx(Qn,{size:14,strokeWidth:1.5}):l.jsx(Ks,{size:14,strokeWidth:1.5}):null})})}):l.jsx(g.Box,{...b("icon"),children:D?d.order_direction==="asc"?l.jsx(Qn,{size:14,strokeWidth:1.5}):l.jsx(Ks,{size:14,strokeWidth:1.5}):null})]})})})}const Ei=v.memo(({data:e,info:t,settings:r,hideActions:n,hideCheckbox:o,allChecked:s,toggleAll:i,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(g.Table.Thead,{children:l.jsxs(g.Table.Tr,{children:[o?null:l.jsx(uo,{data:e,column:"Checkbox",allChecked:s,toggleAll:i}),n?null:l.jsx(uo,{column:"Actions",customElement:c}),e.list_columns.map((d,f)=>{var y;let p=a==null?void 0:a[d];return typeof p=="function"&&(p=p(e.label_columns[d])),p===null?null:l.jsx(uo,{column:d,label:e.label_columns[d],orderColumn:e.order_columns.find(b=>b===d)||e.order_columns.find(b=>b.startsWith(`${d}.`)),related:((y=t.filters[d])==null?void 0:y.schema.type)==="Nested",customElement:p},d)})]})})});Ei.displayName="Header";const Bd={scrollbar:"_scrollbar_isyo2_1"};function Ud({bulkActions:e,hideActions:t,loading:r,onSelectCheckbox:n,onClickEntry:o,hideCheckbox:s,hideDownload:i,headerCustomizer:a,bodyCustomizer:u,bodySeparator:c,...d}){const f=g.useMantineTheme(),p=g.Table.extend({highlightOnHover:!0,striped:!0,horizontalSpacing:"md",verticalSpacing:"sm"}),y=g.useProps("DatagridTable",p,d),{data:b,info:h}=te(),[S,x]=v.useState([]),[D,A]=v.useState(!1),_=P=>{x(F=>F.includes(P)?F.filter(G=>G!==P):[...F,P])},w=()=>{x(P=>P.length===b.ids.length?[]:b.ids.map((F,G)=>F))};return v.useEffect(()=>{A(S.length===b.result.length&&S.length>0),n&&n(S),e==null||e.setSelectedIds(S.map(P=>P))},[S]),v.useEffect(()=>{x([]),n&&n([])},[b]),l.jsx(g.ScrollArea,{options:{className:f.colorScheme==="dark"?"os-theme-light":void 0},style:{flex:1,flexDirection:"column"},classNames:Bd,children:l.jsxs(g.Table,{stickyHeader:!0,...y,children:[l.jsx(Ei,{data:b,info:h,hideActions:t,hideCheckbox:s,allChecked:D,setSelection:x,toggleAll:w,headerCustomizer:a}),l.jsx(zd,{data:b,loading:r,hideActions:t,hideCheckbox:s,selection:S,setSelection:x,toggleRow:_,onClickEntry:o,bodyCustomizer:u,bodySeparator:c})]})})}const xi=v.memo(({counter:e,...t})=>{const{data:r,queryParams:n,setQueryParams:o}=te(),s=g.useMantineTheme(),i=[{value:"10",label:"10"},{value:"25",label:"25"},{value:"50",label:"50"}],a=String(n.page_size),[u,c]=v.useState(n.page);v.useEffect(()=>{c(n.page)},[n.page]);const d=p=>{c(p-1),o({page:p-1})},f=p=>{o({page_size:parseInt(p,10),page:0})};return l.jsxs(l.Fragment,{children:[l.jsx(g.Divider,{}),l.jsxs(g.Box,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:54,border:"none",borderTopWidth:"1px",padding:"var(--mantine-spacing-md)"},children:[l.jsxs(g.Box,{style:{display:"flex",alignItems:"center",gap:"var(--mantine-spacing-sm)"},children:[l.jsx(g.Text,{children:"Rows per page:"}),l.jsx(g.Select,{value:a,defaultValue:a,onChange:p=>f(p),data:i,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(g.Pagination,{size:"sm",total:Math.ceil(r.count/a),value:u+1,onChange:d,...t}),e&&r?l.jsxs(l.Fragment,{children:[l.jsx(g.Text,{c:s.primaryColor,size:"xs",fw:400,pl:20,children:"Total Records"}),l.jsx(g.Text,{c:s.primaryColor,size:"md",fw:700,pl:10,children:r.count})]}):null]})]})});xi.displayName="Pagination";const Vd=0,Gd=25,_t=250,cr="global",$t="header:",Ai=$t+"ctt",Oi=$t+"between_integer",$i=$t+"between_date",Pt=e=>e!==cr&&!e.startsWith($t);function Wd({form:e,name:t,items:r,onChange:n,...o}){return l.jsx(g.Select,{data:r,searchable:!0,...e.getInputProps(t),onChange:n,...o})}function Pi({form:e,name:t,label:r,comboboxProps:n,...o}){const s=g.useCombobox({onDropdownClose:()=>s.resetSelectedOption(),onDropdownOpen:()=>s.updateSelectedOptionIndex("active")}),[i,a]=v.useState([]),[u,c]=v.useState(""),d=y=>{u!==""&&(i.includes(u)||a(b=>[...b,u]),c(""))},f=y=>a(b=>b.filter(h=>h!==y)),p=i.map(y=>l.jsx(g.Pill,{withRemoveButton:!0,onRemove:()=>f(y),children:y},y));return v.useEffect(()=>{const y=e.getInputProps(t).value;if(y)try{a([...y])}catch(b){console.error("Error parsing JSON:",b)}},[]),v.useEffect(()=>{e.getInputProps(t).onChange(i)},[i]),l.jsx(g.InputWrapper,{label:r,children:l.jsxs(g.Combobox,{store:s,onOptionSubmit:d,...n,children:[l.jsx(g.Combobox.DropdownTarget,{children:l.jsx(g.PillsInput,{onClick:()=>s.openDropdown(),children:l.jsxs(g.Pill.Group,{children:[p,l.jsx(g.Combobox.EventsTarget,{children:l.jsx(g.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(),f(i[i.length-1]))}})})]})})}),l.jsx(g.Combobox.Dropdown,{children:l.jsx(g.Combobox.Options,{children:l.jsxs(g.Combobox.Option,{value:"$create",children:["+ Create ",u]})})})]})})}function Hd({form:e,name:t,items:r,onChange:n,...o}){return l.jsx(g.Select,{data:r,searchable:!0,...e.getInputProps(t),onChange:n,...o})}function Ii({onClose:e,...t}){const{info:r,queryParams:n,setQueryParams:o,path:s}=te(),i=tr.useForm({initialValues:{filters:[]},validate:eo(nr({filters:Jn().of(nr({col:Dr().transform(f=>f||void 0).required("Field is required"),opr:Dr().transform(f=>f||void 0).required("col is required"),value:Mr().when("col",{is:f=>f&&r.filters[f].schema.required,then:()=>Mr().required("Value is required")})}))}))}),a={bg:"transparent",size:"sm",c:"gray"},u=g.useProps("ActionIcon",a,t);v.useEffect(()=>{i.setValues({filters:[]}),i.reset()},[s]),v.useEffect(()=>{if(n.filters&&n.filters.length){const f=n.filters.filter(p=>Pt(p.opr)).map(p=>({...p,key:be.randomId()}));i.setFieldValue("filters",f)}},[n.filters]);const c=f=>{const p=f.filters.map(({key:b,...h})=>h),y=JSON.parse(JSON.stringify(p));o({filters:y,page:0}),e()},d=i.values.filters.map((f,p)=>l.jsxs(g.Box,{px:"sm",children:[l.jsxs(g.Flex,{my:"md",gap:"md",style:{whiteSpace:"nowrap"},children:[l.jsx(g.Box,{style:{width:"192px"},children:r&&r.filters&&l.jsx(Wd,{form:i,name:`filters.${p}.col`,items:Object.entries(r.filters).map(([y,b])=>({label:b.label,value:String(y)})),onChange:y=>{i.setFieldValue(`filters.${p}`,{col:y,opr:"",value:"",key:be.randomId()})}})}),l.jsx(g.Box,{style:{width:"192px"},children:f.col?l.jsx(Hd,{form:i,name:`filters.${p}.opr`,items:r.filters[f.col].filters.filter(y=>Pt(y.operator)).map(y=>({label:y.name,value:y.operator})),onChange:y=>{i.setFieldValue(`filters.${p}`,{col:i.values.filters[p].col,opr:y,value:"",key:be.randomId()})}}):null}),l.jsx(g.Box,{style:{width:"192px"},children:f.col?f.opr==="in"?l.jsx(Pi,{form:i,name:`filters.${p}.value`}):l.jsx(zr,{form:i,name:`filters.${p}.value`,schema:r.filters[f.col].schema,filter:!0}):null}),l.jsx(g.ActionIcon,{bg:u.bg,size:u.size,c:u.c,onClick:()=>{i.removeListItem("filters",p)},children:l.jsx(Qs,{})})]}),i.values.filters.length>1&&p<i.values.filters.length-1?l.jsx(g.Divider,{my:"md",labelPosition:"center",label:"AND"}):null]},f.key));return l.jsxs(g.Box,{component:"form",onSubmit:i.onSubmit(c),children:[d.length===0&&l.jsx(g.Box,{style:{width:"642px"},children:l.jsx(g.Text,{style:{fontStyle:"italic",padding:"7px"},size:"sm",c:"dimmed",children:"No filters selected..."})}),l.jsx(g.ScrollArea.Autosize,{mah:"40vh",mt:20,children:d}),l.jsx(g.Divider,{my:"sm"}),l.jsxs(g.Box,{style:{display:"flex",justifyContent:"space-between"},children:[l.jsx(g.Button,{variant:"subtle",leftSection:l.jsx(Lr,{}),onClick:()=>{i.insertListItem("filters",{col:"",opr:"",value:"",key:be.randomId()})},children:"Add Filter"}),l.jsx(g.Group,{spacing:"md",children:l.jsx(g.Button,{type:"submit",children:"Apply"})})]})]})}function ki(...e){const{queryParams:t}=te(),r={bg:"transparent",size:"sm",c:"gray"},n=g.useProps("ActionIcon",r,e),[o,s]=v.useState(!1);return l.jsxs(g.Popover,{opened:o,position:"bottom-end",onClose:()=>s(!1),closeOnClickOutside:!1,children:[l.jsx(g.Popover.Target,{children:l.jsx(g.Tooltip,{opened:o?!1:null,label:"Filter",children:(t==null?void 0:t.filters.filter(i=>Pt(i.opr)).length)!=0?l.jsx(g.Indicator,{zIndex:20,size:16,label:t==null?void 0:t.filters.length,children:l.jsx(g.ActionIcon,{bg:n.bg,size:n.size,c:n.c,onClick:()=>s(!0),children:l.jsx(Zs,{})})}):l.jsx(g.ActionIcon,{bg:n.bg,size:n.size,c:n.c,onClick:()=>s(!0),children:l.jsx(Zs,{})})})}),l.jsxs(g.Popover.Dropdown,{px:"xs",children:[l.jsx(g.Box,{style:{position:"absolute",top:4,right:4},children:l.jsx(g.CloseButton,{title:"Filters",onClick:()=>s(!1)})}),l.jsx(Ii,{onClose:()=>{s(!1)}})]})]})}function Yd(...e){const[t,r]=v.useState(!1),{download:n}=te(),o={bg:"transparent",size:"sm",c:"gray"},s=g.useProps("ActionIcon",o,e);return t?l.jsx(g.Loader,{color:s.c,size:s.size}):l.jsx(g.Tooltip,{label:"Download",children:l.jsx(g.ActionIcon,{bg:s.bg,size:s.size,c:s.c,onClick:()=>{r(!0),n("download").then(()=>r(!1))},children:l.jsx(Js,{})})})}const Mi=v.memo(({hideAdd:e,hideFilter:t,hideDownload:r,toolbarCustomizer:n})=>{const{info:o}=te(),s=v.useMemo(()=>{const a={};return Object.entries(n).forEach(([u,c])=>{a[u]=c,typeof a[u]=="function"&&(a[u]=a[u]())}),a},[n]),i=o.permissions.includes("can_post");return l.jsxs(g.Flex,{justify:"flex-end",p:"md",gap:"sm",children:[!r&&(s.download||l.jsx(Yd,{})),i&&!e?s.add||l.jsx(ai,{}):null,t?null:s.filter||l.jsx(ki,{})]})});Mi.displayName="Toolbar";const fo=v.forwardRef((e,t)=>{const{path:r,data:n,loading:o,info:s,setQueryParams:i}=te(),{hideToolbar:a=!1,hideFilter:u=!1,hideAdd:c=!1,hideSettings:d=!1,hideActions:f=!1,hidePagination:p=!1,hideError:y=!1,hideDownload:b=!0,onSelectCheckbox:h=null,onClickEntry:S=null,fetchOnMount:x=!0,bulkActions:D=null,styles:A,headerCustomizer:_={},bodyCustomizer:w={},toolbarCustomizer:P={},counter:F=!1,bodySeparator:G}=e;if(v.useEffect(()=>{!n&&x&&i({})},[n]),!s)return;const j=D===null;return l.jsxs(g.Paper,{ref:t,style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",...A},children:[a?null:l.jsx(Mi,{hideFilter:u,hideAdd:c,hideSettings:d,hideDownload:b,toolbarCustomizer:P}),n?l.jsx(Ud,{bulkActions:D,hideActions:f,loading:o,onSelectCheckbox:h,onClickEntry:S,hideCheckbox:j,hideDownload:b,headerCustomizer:_,bodyCustomizer:w,bodySeparator:G}):null,!p&&n?l.jsx(xi,{counter:F}):null,y?null:l.jsx(Rs,{})]})});fo.displayName="DataGrid";function qd({children:e,fetch:t=!0,loading:r=l.jsx(g.Center,{children:l.jsx(g.Loader,{})}),end:n=l.jsx(g.Center,{children:"End of data"}),fetchWrapper:o=g.Center,fetchWrapperProps:s}){const{streaming:i,loading:a}=te(),{ref:u,inViewport:c}=be.useInViewport(),d=v.useMemo(()=>Object.values(i.data).flat(),[i.data]),f=v.useMemo(()=>typeof e=="function"?e(d):e,[e,d]);return v.useEffect(()=>{c&&t&&i.fetch()},[c]),l.jsxs(l.Fragment,{children:[f,a&&r,i.isEnd&&n,l.jsx(o,{ref:u,id:"IS-load-trigger",mih:"1%",...s})]})}var Kd=Object.prototype;function Jd(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Kd;return e===r}var Wr=Jd;function Zd(e,t){return function(r){return e(t(r))}}var Di=Zd,Xd=Di,Qd=Xd(Object.keys,Object),Rd=Qd,ep=Wr,tp=Rd,rp=Object.prototype,np=rp.hasOwnProperty;function op(e){if(!ep(e))return tp(e);var t=[];for(var r in Object(e))np.call(e,r)&&r!="constructor"&&t.push(r);return t}var sp=op,ip=typeof Er=="object"&&Er&&Er.Object===Object&&Er,Fi=ip,ap=Fi,lp=typeof self=="object"&&self&&self.Object===Object&&self,cp=ap||lp||Function("return this")(),qe=cp,up=qe,fp=up.Symbol,Hr=fp,Ni=Hr,Li=Object.prototype,dp=Li.hasOwnProperty,pp=Li.toString,ur=Ni?Ni.toStringTag:void 0;function hp(e){var t=dp.call(e,ur),r=e[ur];try{e[ur]=void 0;var n=!0}catch{}var o=pp.call(e);return n&&(t?e[ur]=r:delete e[ur]),o}var gp=hp,mp=Object.prototype,yp=mp.toString;function bp(e){return yp.call(e)}var vp=bp,ji=Hr,Tp=gp,Sp=vp,_p="[object Null]",wp="[object Undefined]",zi=ji?ji.toStringTag:void 0;function Cp(e){return e==null?e===void 0?wp:_p:zi&&zi in Object(e)?Tp(e):Sp(e)}var It=Cp;function Ep(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var nt=Ep,xp=It,Ap=nt,Op="[object AsyncFunction]",$p="[object Function]",Pp="[object GeneratorFunction]",Ip="[object Proxy]";function kp(e){if(!Ap(e))return!1;var t=xp(e);return t==$p||t==Pp||t==Op||t==Ip}var po=kp,Mp=qe,Dp=Mp["__core-js_shared__"],Fp=Dp,ho=Fp,Bi=function(){var e=/[^.]+$/.exec(ho&&ho.keys&&ho.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Np(e){return!!Bi&&Bi in e}var Lp=Np,jp=Function.prototype,zp=jp.toString;function Bp(e){if(e!=null){try{return zp.call(e)}catch{}try{return e+""}catch{}}return""}var Ui=Bp,Up=po,Vp=Lp,Gp=nt,Wp=Ui,Hp=/[\\^$.*+?()[\]{}|]/g,Yp=/^\[object .+?Constructor\]$/,qp=Function.prototype,Kp=Object.prototype,Jp=qp.toString,Zp=Kp.hasOwnProperty,Xp=RegExp("^"+Jp.call(Zp).replace(Hp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qp(e){if(!Gp(e)||Vp(e))return!1;var t=Up(e)?Xp:Yp;return t.test(Wp(e))}var Rp=Qp;function eh(e,t){return e==null?void 0:e[t]}var th=eh,rh=Rp,nh=th;function oh(e,t){var r=nh(e,t);return rh(r)?r:void 0}var wt=oh,sh=wt,ih=qe,ah=sh(ih,"DataView"),lh=ah,ch=wt,uh=qe,fh=ch(uh,"Map"),go=fh,dh=wt,ph=qe,hh=dh(ph,"Promise"),gh=hh,mh=wt,yh=qe,bh=mh(yh,"Set"),Vi=bh,vh=wt,Th=qe,Sh=vh(Th,"WeakMap"),_h=Sh,mo=lh,yo=go,bo=gh,vo=Vi,To=_h,Gi=It,kt=Ui,Wi="[object Map]",wh="[object Object]",Hi="[object Promise]",Yi="[object Set]",qi="[object WeakMap]",Ki="[object DataView]",Ch=kt(mo),Eh=kt(yo),xh=kt(bo),Ah=kt(vo),Oh=kt(To),Ct=Gi;(mo&&Ct(new mo(new ArrayBuffer(1)))!=Ki||yo&&Ct(new yo)!=Wi||bo&&Ct(bo.resolve())!=Hi||vo&&Ct(new vo)!=Yi||To&&Ct(new To)!=qi)&&(Ct=function(e){var t=Gi(e),r=t==wh?e.constructor:void 0,n=r?kt(r):"";if(n)switch(n){case Ch:return Ki;case Eh:return Wi;case xh:return Hi;case Ah:return Yi;case Oh:return qi}return t});var $h=Ct;function Ph(e){return e!=null&&typeof e=="object"}var Mt=Ph,Ih=It,kh=Mt,Mh="[object Arguments]";function Dh(e){return kh(e)&&Ih(e)==Mh}var Fh=Dh,Ji=Fh,Nh=Mt,Zi=Object.prototype,Lh=Zi.hasOwnProperty,jh=Zi.propertyIsEnumerable,zh=Ji(function(){return arguments}())?Ji:function(e){return Nh(e)&&Lh.call(e,"callee")&&!jh.call(e,"callee")},Yr=zh,Bh=Array.isArray,fr=Bh,Uh=9007199254740991;function Vh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Uh}var Xi=Vh,Gh=po,Wh=Xi;function Hh(e){return e!=null&&Wh(e.length)&&!Gh(e)}var qr=Hh,Kr={exports:{}};function Yh(){return!1}var qh=Yh;Kr.exports,function(e,t){var r=qe,n=qh,o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===o,a=i?r.Buffer:void 0,u=a?a.isBuffer:void 0,c=u||n;e.exports=c}(Kr,Kr.exports);var So=Kr.exports,Kh=It,Jh=Xi,Zh=Mt,Xh="[object Arguments]",Qh="[object Array]",Rh="[object Boolean]",eg="[object Date]",tg="[object Error]",rg="[object Function]",ng="[object Map]",og="[object Number]",sg="[object Object]",ig="[object RegExp]",ag="[object Set]",lg="[object String]",cg="[object WeakMap]",ug="[object ArrayBuffer]",fg="[object DataView]",dg="[object Float32Array]",pg="[object Float64Array]",hg="[object Int8Array]",gg="[object Int16Array]",mg="[object Int32Array]",yg="[object Uint8Array]",bg="[object Uint8ClampedArray]",vg="[object Uint16Array]",Tg="[object Uint32Array]",de={};de[dg]=de[pg]=de[hg]=de[gg]=de[mg]=de[yg]=de[bg]=de[vg]=de[Tg]=!0,de[Xh]=de[Qh]=de[ug]=de[Rh]=de[fg]=de[eg]=de[tg]=de[rg]=de[ng]=de[og]=de[sg]=de[ig]=de[ag]=de[lg]=de[cg]=!1;function Sg(e){return Zh(e)&&Jh(e.length)&&!!de[Kh(e)]}var _g=Sg;function wg(e){return function(t){return e(t)}}var Cg=wg,Jr={exports:{}};Jr.exports,function(e,t){var r=Fi,n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===n,i=s&&r.process,a=function(){try{var u=o&&o.require&&o.require("util").types;return u||i&&i.binding&&i.binding("util")}catch{}}();e.exports=a}(Jr,Jr.exports);var Eg=Jr.exports,xg=_g,Ag=Cg,Qi=Eg,Ri=Qi&&Qi.isTypedArray,Og=Ri?Ag(Ri):xg,_o=Og,$g=sp,Pg=$h,Ig=Yr,kg=fr,Mg=qr,Dg=So,Fg=Wr,Ng=_o,Lg="[object Map]",jg="[object Set]",zg=Object.prototype,Bg=zg.hasOwnProperty;function Ug(e){if(e==null)return!0;if(Mg(e)&&(kg(e)||typeof e=="string"||typeof e.splice=="function"||Dg(e)||Ng(e)||Ig(e)))return!e.length;var t=Pg(e);if(t==Lg||t==jg)return!e.size;if(Fg(e))return!$g(e).length;for(var r in e)if(Bg.call(e,r))return!1;return!0}var Vg=Ug;const ea=ut(Vg),ta=(e,t,r,n,o,s,i)=>e.map((a,u)=>l.jsx(g.Grid.Col,{span:o==="row"?12/e.length:12,style:{alignContent:"end"},children:l.jsx(ue.JsonFormsDispatch,{uischema:a,schema:t,path:r,enabled:n,renderers:s,cells:i})},`${r}-${u}`)),Gg=({elements:e,schema:t,path:r,enabled:n,direction:o,renderers:s,cells:i})=>ea(e)?null:l.jsx(g.Grid,{spacing:o==="row"?2:0,children:ta(e,t,r,n,o,s,i)}),wo=v.memo(Gg),Wg=e=>function(r){const n=ue.useJsonForms(),o=H.getAjv({jsonforms:{...n}});return l.jsx(e,{...r,ajv:o})};var Hg=qe,Yg=function(){return Hg.Date.now()},qg=Yg,Kg=/\s/;function Jg(e){for(var t=e.length;t--&&Kg.test(e.charAt(t)););return t}var Zg=Jg,Xg=Zg,Qg=/^\s+/;function Rg(e){return e&&e.slice(0,Xg(e)+1).replace(Qg,"")}var em=Rg,tm=It,rm=Mt,nm="[object Symbol]";function om(e){return typeof e=="symbol"||rm(e)&&tm(e)==nm}var ra=om,sm=em,na=nt,im=ra,oa=NaN,am=/^[-+]0x[0-9a-f]+$/i,lm=/^0b[01]+$/i,cm=/^0o[0-7]+$/i,um=parseInt;function fm(e){if(typeof e=="number")return e;if(im(e))return oa;if(na(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=na(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=sm(e);var r=lm.test(e);return r||cm.test(e)?um(e.slice(2),r?2:8):am.test(e)?oa:+e}var sa=fm,dm=nt,Co=qg,ia=sa,pm="Expected a function",hm=Math.max,gm=Math.min;function mm(e,t,r){var n,o,s,i,a,u,c=0,d=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(pm);t=ia(t)||0,dm(r)&&(d=!!r.leading,f="maxWait"in r,s=f?hm(ia(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p);function y(P){var F=n,G=o;return n=o=void 0,c=P,i=e.apply(G,F),i}function b(P){return c=P,a=setTimeout(x,t),d?y(P):i}function h(P){var F=P-u,G=P-c,j=t-F;return f?gm(j,s-G):j}function S(P){var F=P-u,G=P-c;return u===void 0||F>=t||F<0||f&&G>=s}function x(){var P=Co();if(S(P))return D(P);a=setTimeout(x,h(P))}function D(P){return a=void 0,p&&n?y(P):(n=o=void 0,i)}function A(){a!==void 0&&clearTimeout(a),c=0,n=u=o=a=void 0}function _(){return a===void 0?i:D(Co())}function w(){var P=Co(),F=S(P);if(n=arguments,o=this,u=P,F){if(a===void 0)return b(u);if(f)return clearTimeout(a),a=setTimeout(x,t),y(u)}return a===void 0&&(a=setTimeout(x,t)),i}return w.cancel=A,w.flush=_,w}var ym=mm;const bm=ut(ym),aa=(e,t,r,n,o,s=300)=>{const[i,a]=v.useState(r??t);v.useEffect(()=>{a(r??t)},[r]);const u=v.useCallback(bm(f=>e(n,f),s),[e,n,s]),c=v.useCallback(f=>{const p=o(f);a(p??t),u(p)},[u,o]),d=v.useCallback(()=>{a(t),e(n,void 0)},[t,e,n]);return[i,c,d]},vm=e=>e===""?void 0:parseFloat(e),Tm=e=>vm(e),Zr=v.memo(function(t){const{allowDecimal:r,className:n,data:o,description:s,errors:i,enabled:a,handleChange:u,label:c,path:d,required:f,hideControls:p}=t,[y,b]=aa(u,"",o,d,Tm),h=g.useProps(d,{},{});return Object.keys(h).forEach(S=>{typeof h[S]=="function"&&(h[S]=h[S](o))}),l.jsx(g.NumberInput,{label:c,description:s,error:i,required:f,value:y,onChange:b,className:n,disabled:!a,allowDecimal:r,hideControls:p,w:"100%",...h})});function Sm(){this.__data__=[],this.size=0}var _m=Sm;function wm(e,t){return e===t||e!==e&&t!==t}var Xr=wm,Cm=Xr;function Em(e,t){for(var r=e.length;r--;)if(Cm(e[r][0],t))return r;return-1}var Qr=Em,xm=Qr,Am=Array.prototype,Om=Am.splice;function $m(e){var t=this.__data__,r=xm(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Om.call(t,r,1),--this.size,!0}var Pm=$m,Im=Qr;function km(e){var t=this.__data__,r=Im(t,e);return r<0?void 0:t[r][1]}var Mm=km,Dm=Qr;function Fm(e){return Dm(this.__data__,e)>-1}var Nm=Fm,Lm=Qr;function jm(e,t){var r=this.__data__,n=Lm(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var zm=jm,Bm=_m,Um=Pm,Vm=Mm,Gm=Nm,Wm=zm;function Dt(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])}}Dt.prototype.clear=Bm,Dt.prototype.delete=Um,Dt.prototype.get=Vm,Dt.prototype.has=Gm,Dt.prototype.set=Wm;var Rr=Dt,Hm=Rr;function Ym(){this.__data__=new Hm,this.size=0}var qm=Ym;function Km(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Jm=Km;function Zm(e){return this.__data__.get(e)}var Xm=Zm;function Qm(e){return this.__data__.has(e)}var Rm=Qm,ey=wt,ty=ey(Object,"create"),en=ty,la=en;function ry(){this.__data__=la?la(null):{},this.size=0}var ny=ry;function oy(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var sy=oy,iy=en,ay="__lodash_hash_undefined__",ly=Object.prototype,cy=ly.hasOwnProperty;function uy(e){var t=this.__data__;if(iy){var r=t[e];return r===ay?void 0:r}return cy.call(t,e)?t[e]:void 0}var fy=uy,dy=en,py=Object.prototype,hy=py.hasOwnProperty;function gy(e){var t=this.__data__;return dy?t[e]!==void 0:hy.call(t,e)}var my=gy,yy=en,by="__lodash_hash_undefined__";function vy(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=yy&&t===void 0?by:t,this}var Ty=vy,Sy=ny,_y=sy,wy=fy,Cy=my,Ey=Ty;function Ft(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])}}Ft.prototype.clear=Sy,Ft.prototype.delete=_y,Ft.prototype.get=wy,Ft.prototype.has=Cy,Ft.prototype.set=Ey;var xy=Ft,ca=xy,Ay=Rr,Oy=go;function $y(){this.size=0,this.__data__={hash:new ca,map:new(Oy||Ay),string:new ca}}var Py=$y;function Iy(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ky=Iy,My=ky;function Dy(e,t){var r=e.__data__;return My(t)?r[typeof t=="string"?"string":"hash"]:r.map}var tn=Dy,Fy=tn;function Ny(e){var t=Fy(this,e).delete(e);return this.size-=t?1:0,t}var Ly=Ny,jy=tn;function zy(e){return jy(this,e).get(e)}var By=zy,Uy=tn;function Vy(e){return Uy(this,e).has(e)}var Gy=Vy,Wy=tn;function Hy(e,t){var r=Wy(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Yy=Hy,qy=Py,Ky=Ly,Jy=By,Zy=Gy,Xy=Yy;function Nt(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])}}Nt.prototype.clear=qy,Nt.prototype.delete=Ky,Nt.prototype.get=Jy,Nt.prototype.has=Zy,Nt.prototype.set=Xy;var ua=Nt,Qy=Rr,Ry=go,e0=ua,t0=200;function r0(e,t){var r=this.__data__;if(r instanceof Qy){var n=r.__data__;if(!Ry||n.length<t0-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new e0(n)}return r.set(e,t),this.size=r.size,this}var n0=r0,o0=Rr,s0=qm,i0=Jm,a0=Xm,l0=Rm,c0=n0;function Lt(e){var t=this.__data__=new o0(e);this.size=t.size}Lt.prototype.clear=s0,Lt.prototype.delete=i0,Lt.prototype.get=a0,Lt.prototype.has=l0,Lt.prototype.set=c0;var u0=Lt,f0=wt,d0=function(){try{var e=f0(Object,"defineProperty");return e({},"",{}),e}catch{}}(),fa=d0,da=fa;function p0(e,t,r){t=="__proto__"&&da?da(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Eo=p0,h0=Eo,g0=Xr;function m0(e,t,r){(r!==void 0&&!g0(e[t],r)||r===void 0&&!(t in e))&&h0(e,t,r)}var pa=m0;function y0(e){return function(t,r,n){for(var o=-1,s=Object(t),i=n(t),a=i.length;a--;){var u=i[e?a:++o];if(r(s[u],u,s)===!1)break}return t}}var b0=y0,v0=b0,T0=v0(),S0=T0,rn={exports:{}};rn.exports,function(e,t){var r=qe,n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===n,i=s?r.Buffer:void 0,a=i?i.allocUnsafe:void 0;function u(c,d){if(d)return c.slice();var f=c.length,p=a?a(f):new c.constructor(f);return c.copy(p),p}e.exports=u}(rn,rn.exports);var _0=rn.exports,w0=qe,C0=w0.Uint8Array,E0=C0,ha=E0;function x0(e){var t=new e.constructor(e.byteLength);return new ha(t).set(new ha(e)),t}var A0=x0,O0=A0;function $0(e,t){var r=t?O0(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var P0=$0;function I0(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var k0=I0,M0=nt,ga=Object.create,D0=function(){function e(){}return function(t){if(!M0(t))return{};if(ga)return ga(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),F0=D0,N0=Di,L0=N0(Object.getPrototypeOf,Object),ma=L0,j0=F0,z0=ma,B0=Wr;function U0(e){return typeof e.constructor=="function"&&!B0(e)?j0(z0(e)):{}}var V0=U0,G0=qr,W0=Mt;function H0(e){return W0(e)&&G0(e)}var ya=H0,Y0=It,q0=ma,K0=Mt,J0="[object Object]",Z0=Function.prototype,X0=Object.prototype,ba=Z0.toString,Q0=X0.hasOwnProperty,R0=ba.call(Object);function eb(e){if(!K0(e)||Y0(e)!=J0)return!1;var t=q0(e);if(t===null)return!0;var r=Q0.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ba.call(r)==R0}var tb=eb;function rb(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var va=rb,nb=Eo,ob=Xr,sb=Object.prototype,ib=sb.hasOwnProperty;function ab(e,t,r){var n=e[t];(!(ib.call(e,t)&&ob(n,r))||r===void 0&&!(t in e))&&nb(e,t,r)}var lb=ab,cb=lb,ub=Eo;function fb(e,t,r,n){var o=!r;r||(r={});for(var s=-1,i=t.length;++s<i;){var a=t[s],u=n?n(r[a],e[a],a,r,e):void 0;u===void 0&&(u=e[a]),o?ub(r,a,u):cb(r,a,u)}return r}var db=fb;function pb(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var hb=pb,gb=9007199254740991,mb=/^(?:0|[1-9]\d*)$/;function yb(e,t){var r=typeof e;return t=t??gb,!!t&&(r=="number"||r!="symbol"&&mb.test(e))&&e>-1&&e%1==0&&e<t}var Ta=yb,bb=hb,vb=Yr,Tb=fr,Sb=So,_b=Ta,wb=_o,Cb=Object.prototype,Eb=Cb.hasOwnProperty;function xb(e,t){var r=Tb(e),n=!r&&vb(e),o=!r&&!n&&Sb(e),s=!r&&!n&&!o&&wb(e),i=r||n||o||s,a=i?bb(e.length,String):[],u=a.length;for(var c in e)(t||Eb.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||_b(c,u)))&&a.push(c);return a}var Ab=xb;function Ob(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var $b=Ob,Pb=nt,Ib=Wr,kb=$b,Mb=Object.prototype,Db=Mb.hasOwnProperty;function Fb(e){if(!Pb(e))return kb(e);var t=Ib(e),r=[];for(var n in e)n=="constructor"&&(t||!Db.call(e,n))||r.push(n);return r}var Nb=Fb,Lb=Ab,jb=Nb,zb=qr;function Bb(e){return zb(e)?Lb(e,!0):jb(e)}var Sa=Bb,Ub=db,Vb=Sa;function Gb(e){return Ub(e,Vb(e))}var Wb=Gb,_a=pa,Hb=_0,Yb=P0,qb=k0,Kb=V0,wa=Yr,Ca=fr,Jb=ya,Zb=So,Xb=po,Qb=nt,Rb=tb,ev=_o,Ea=va,tv=Wb;function rv(e,t,r,n,o,s,i){var a=Ea(e,r),u=Ea(t,r),c=i.get(u);if(c){_a(e,r,c);return}var d=s?s(a,u,r+"",e,t,i):void 0,f=d===void 0;if(f){var p=Ca(u),y=!p&&Zb(u),b=!p&&!y&&ev(u);d=u,p||y||b?Ca(a)?d=a:Jb(a)?d=qb(a):y?(f=!1,d=Hb(u,!0)):b?(f=!1,d=Yb(u,!0)):d=[]:Rb(u)||wa(u)?(d=a,wa(a)?d=tv(a):(!Qb(a)||Xb(a))&&(d=Kb(u))):f=!1}f&&(i.set(u,d),o(d,u,n,s,i),i.delete(u)),_a(e,r,d)}var nv=rv,ov=u0,sv=pa,iv=S0,av=nv,lv=nt,cv=Sa,uv=va;function xa(e,t,r,n,o){e!==t&&iv(t,function(s,i){if(o||(o=new ov),lv(s))av(e,t,i,r,xa,n,o);else{var a=n?n(uv(e,i),s,i+"",e,t,o):void 0;a===void 0&&(a=s),sv(e,i,a)}},cv)}var fv=xa;function dv(e){return e}var Aa=dv;function pv(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 hv=pv,gv=hv,Oa=Math.max;function mv(e,t,r){return t=Oa(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,s=Oa(n.length-t,0),i=Array(s);++o<s;)i[o]=n[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=n[o];return a[t]=r(i),gv(e,this,a)}}var yv=mv;function bv(e){return function(){return e}}var vv=bv,Tv=vv,$a=fa,Sv=Aa,_v=$a?function(e,t){return $a(e,"toString",{configurable:!0,enumerable:!1,value:Tv(t),writable:!0})}:Sv,wv=_v,Cv=800,Ev=16,xv=Date.now;function Av(e){var t=0,r=0;return function(){var n=xv(),o=Ev-(n-r);if(r=n,o>0){if(++t>=Cv)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Ov=Av,$v=wv,Pv=Ov,Iv=Pv($v),kv=Iv,Mv=Aa,Dv=yv,Fv=kv;function Nv(e,t){return Fv(Dv(e,t,Mv),e+"")}var Pa=Nv,Lv=Xr,jv=qr,zv=Ta,Bv=nt;function Uv(e,t,r){if(!Bv(r))return!1;var n=typeof t;return(n=="number"?jv(r)&&zv(t,r.length):n=="string"&&t in r)?Lv(r[t],e):!1}var Ia=Uv,Vv=Pa,Gv=Ia;function Wv(e){return Vv(function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(o--,s):void 0,i&&Gv(r[0],r[1],i)&&(s=o<3?void 0:s,o=1),t=Object(t);++n<o;){var a=r[n];a&&e(t,a,n,s)}return t})}var Hv=Wv,Yv=fv,qv=Hv,Kv=qv(function(e,t,r){Yv(e,t,r)}),Jv=Kv;const ka=ut(Jv),Ma=v.memo(function(t){const{className:r,config:n,uischema:o,data:s,description:i,errors:a,enabled:u,path:c,handleChange:d,label:f,required:p}=t,y=ka({},n,o.options),b=g.useProps(c,{},{});return Object.keys(b).forEach(h=>{typeof b[h]=="function"&&(b[h]=b[h](s))}),y.format==="password"?l.jsx(g.PasswordInput,{label:f,description:i,error:a,required:p,value:s||"",onChange:h=>{d(c,h.currentTarget.value)},className:r,disabled:!u,w:"100%",...b}):l.jsx(g.TextInput,{label:f,description:i,error:a,required:p,value:s||"",onChange:h=>{d(c,h.currentTarget.value)},className:r,disabled:!u,w:"100%",...b})}),Da=v.memo(function(t){const{className:r,data:n,description:o,enabled:s,errors:i,handleChange:a,label:u,labelPosition:c,path:d,required:f}=t,p=g.useProps(d,{},{});return Object.keys(p).forEach(y=>{typeof p[y]=="function"&&(p[y]=p[y](n))}),l.jsx(g.Checkbox,{label:u,description:o,error:i,disabled:!s,className:r,labelPosition:c,required:f,data:[{label:"true",value:"true"},{label:"false",value:"false"}],value:String(n)||"",onChange:y=>{a(d,y==="true")},...p})}),Zv=e=>l.jsx(Zr,{...e}),Fa=H.rankWith(4,H.isNumberControl),Na=ue.withJsonFormsCellProps(Zv),Xv=e=>l.jsx(Zr,{...e}),La=H.rankWith(3,H.isIntegerControl),ja=ue.withJsonFormsCellProps(Xv),Qv=e=>l.jsx(Ma,{...e}),za=H.rankWith(2,H.isStringControl),Ba=ue.withJsonFormsCellProps(Qv),Rv=e=>l.jsx(Da,{...e}),Ua=H.rankWith(3,H.isBooleanControl),Va=ue.withJsonFormsCellProps(Rv),e1=e=>{const{data:t,className:r,enabled:n,path:o,handleChange:s,description:i,errors:a,label:u,required:c}=e,d=g.useProps(o,{},{});return Object.keys(d).forEach(f=>{typeof d[f]=="function"&&(d[f]=d[f](t))}),l.jsx(ct.DateInput,{valueFormat:"DD.MM.YYYY",label:u,description:i,error:a,required:c,value:t?new Date(t):null,onChange:f=>{if(f instanceof Date){const p=new Date(f.getTime()-f.getTimezoneOffset()*6e4);s(o,p.toISOString().substring(0,10))}},className:r,disabled:!n,w:"100%",...d})},Ga=H.rankWith(2,H.isDateControl),Wa=ue.withJsonFormsCellProps(e1),t1=e=>{const{description:t,className:r,enabled:n,path:o,handleChange:s,data:i,errors:a,label:u,required:c}=e,d=g.useProps(o,{},{});return Object.keys(d).forEach(f=>{typeof d[f]=="function"&&(d[f]=d[f](i))}),l.jsx(ct.DateInput,{valueFormat:"DD.MM.YYYY",className:r,disabled:!n,label:u,description:t,error:a,required:c,value:i?new Date(i):null,onChange:f=>{if(f instanceof Date){const p=new Date(f.getTime()-f.getTimezoneOffset()*6e4);s(o,p.toISOString().substring(0,10))}},w:"100%",...d})},Ha=H.rankWith(5,H.isDateTimeControl),Ya=ue.withJsonFormsControlProps(t1),r1=e=>{const{description:t,data:r,path:n,options:o,enabled:s,handleChange:i,className:a,errors:u,label:c,required:d}=e,f=g.useProps(n,{},{});return Object.keys(f).forEach(p=>{typeof f[p]=="function"&&(f[p]=f[p](r))}),l.jsx(g.Select,{data:o,defaultValue:r,label:c,description:t,required:d,error:u,disabled:!s,searchable:!0,onChange:p=>{i(n,p)},className:a,w:"100%",...f})},qa=H.rankWith(5,H.isEnumControl),Ka=ue.withJsonFormsEnumProps(ue.withTranslateProps(v.memo(r1)),!1);function n1(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var o1=n1,Ja=Hr,s1=Yr,i1=fr,Za=Ja?Ja.isConcatSpreadable:void 0;function a1(e){return i1(e)||s1(e)||!!(Za&&e&&e[Za])}var l1=a1,c1=o1,u1=l1;function Xa(e,t,r,n,o){var s=-1,i=e.length;for(r||(r=u1),o||(o=[]);++s<i;){var a=e[s];t>0&&r(a)?t>1?Xa(a,t-1,r,n,o):c1(o,a):n||(o[o.length]=a)}return o}var f1=Xa,d1="__lodash_hash_undefined__";function p1(e){return this.__data__.set(e,d1),this}var h1=p1;function g1(e){return this.__data__.has(e)}var m1=g1,y1=ua,b1=h1,v1=m1;function nn(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new y1;++t<r;)this.add(e[t])}nn.prototype.add=nn.prototype.push=b1,nn.prototype.has=v1;var T1=nn;function S1(e,t,r,n){for(var o=e.length,s=r+(n?1:-1);n?s--:++s<o;)if(t(e[s],s,e))return s;return-1}var _1=S1;function w1(e){return e!==e}var C1=w1;function E1(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}var x1=E1,A1=_1,O1=C1,$1=x1;function P1(e,t,r){return t===t?$1(e,t,r):A1(e,O1,r)}var I1=P1,k1=I1;function M1(e,t){var r=e==null?0:e.length;return!!r&&k1(e,t,0)>-1}var D1=M1;function F1(e,t,r){for(var n=-1,o=e==null?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}var N1=F1;function L1(e,t){return e.has(t)}var j1=L1;function z1(){}var B1=z1;function U1(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Qa=U1,xo=Vi,V1=B1,G1=Qa,W1=1/0,H1=xo&&1/G1(new xo([,-0]))[1]==W1?function(e){return new xo(e)}:V1,Y1=H1,q1=T1,K1=D1,J1=N1,Z1=j1,X1=Y1,Q1=Qa,R1=200;function eT(e,t,r){var n=-1,o=K1,s=e.length,i=!0,a=[],u=a;if(r)i=!1,o=J1;else if(s>=R1){var c=t?null:X1(e);if(c)return Q1(c);i=!1,o=Z1,u=new q1}else u=t?[]:a;e:for(;++n<s;){var d=e[n],f=t?t(d):d;if(d=r||d!==0?d:0,i&&f===f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),a.push(d)}else o(u,f,r)||(u!==a&&u.push(f),a.push(d))}return a}var tT=eT,rT=f1,nT=Pa,oT=tT,sT=ya,iT=nT(function(e){return oT(rT(e,1,sT,!0))}),aT=iT;const lT=ut(aT);function cT(e,t,r,n){var o=-1,s=e==null?0:e.length;for(n&&s&&(r=e[++o]);++o<s;)r=t(r,e[o],o,e);return r}var uT=cT;function fT(e){return function(t){return e==null?void 0:e[t]}}var dT=fT,pT=dT,hT={À:"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"},gT=pT(hT),mT=gT;function yT(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var bT=yT,Ra=Hr,vT=bT,TT=fr,ST=ra,el=Ra?Ra.prototype:void 0,tl=el?el.toString:void 0;function rl(e){if(typeof e=="string")return e;if(TT(e))return vT(e,rl)+"";if(ST(e))return tl?tl.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var _T=rl,wT=_T;function CT(e){return e==null?"":wT(e)}var Ao=CT,ET=mT,xT=Ao,AT=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,OT="\\u0300-\\u036f",$T="\\ufe20-\\ufe2f",PT="\\u20d0-\\u20ff",IT=OT+$T+PT,kT="["+IT+"]",MT=RegExp(kT,"g");function DT(e){return e=xT(e),e&&e.replace(AT,ET).replace(MT,"")}var FT=DT,NT=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function LT(e){return e.match(NT)||[]}var jT=LT,zT=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function BT(e){return zT.test(e)}var UT=BT,nl="\\ud800-\\udfff",VT="\\u0300-\\u036f",GT="\\ufe20-\\ufe2f",WT="\\u20d0-\\u20ff",HT=VT+GT+WT,ol="\\u2700-\\u27bf",sl="a-z\\xdf-\\xf6\\xf8-\\xff",YT="\\xac\\xb1\\xd7\\xf7",qT="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",KT="\\u2000-\\u206f",JT=" \\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",il="A-Z\\xc0-\\xd6\\xd8-\\xde",ZT="\\ufe0e\\ufe0f",al=YT+qT+KT+JT,ll="['’]",cl="["+al+"]",XT="["+HT+"]",ul="\\d+",QT="["+ol+"]",fl="["+sl+"]",dl="[^"+nl+al+ul+ol+sl+il+"]",RT="\\ud83c[\\udffb-\\udfff]",eS="(?:"+XT+"|"+RT+")",tS="[^"+nl+"]",pl="(?:\\ud83c[\\udde6-\\uddff]){2}",hl="[\\ud800-\\udbff][\\udc00-\\udfff]",jt="["+il+"]",rS="\\u200d",gl="(?:"+fl+"|"+dl+")",nS="(?:"+jt+"|"+dl+")",ml="(?:"+ll+"(?:d|ll|m|re|s|t|ve))?",yl="(?:"+ll+"(?:D|LL|M|RE|S|T|VE))?",bl=eS+"?",vl="["+ZT+"]?",oS="(?:"+rS+"(?:"+[tS,pl,hl].join("|")+")"+vl+bl+")*",sS="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",iS="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",aS=vl+bl+oS,lS="(?:"+[QT,pl,hl].join("|")+")"+aS,cS=RegExp([jt+"?"+fl+"+"+ml+"(?="+[cl,jt,"$"].join("|")+")",nS+"+"+yl+"(?="+[cl,jt+gl,"$"].join("|")+")",jt+"?"+gl+"+"+ml,jt+"+"+yl,iS,sS,ul,lS].join("|"),"g");function uS(e){return e.match(cS)||[]}var fS=uS,dS=jT,pS=UT,hS=Ao,gS=fS;function mS(e,t,r){return e=hS(e),t=r?void 0:t,t===void 0?pS(e)?gS(e):dS(e):e.match(t)||[]}var yS=mS,bS=uT,vS=FT,TS=yS,SS="['’]",_S=RegExp(SS,"g");function wS(e){return function(t){return bS(TS(vS(t).replace(_S,"")),e,"")}}var CS=wS;function ES(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(o);++n<o;)s[n]=e[n+t];return s}var xS=ES,AS=xS;function OS(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:AS(e,t,r)}var $S=OS,PS="\\ud800-\\udfff",IS="\\u0300-\\u036f",kS="\\ufe20-\\ufe2f",MS="\\u20d0-\\u20ff",DS=IS+kS+MS,FS="\\ufe0e\\ufe0f",NS="\\u200d",LS=RegExp("["+NS+PS+DS+FS+"]");function jS(e){return LS.test(e)}var Tl=jS;function zS(e){return e.split("")}var BS=zS,Sl="\\ud800-\\udfff",US="\\u0300-\\u036f",VS="\\ufe20-\\ufe2f",GS="\\u20d0-\\u20ff",WS=US+VS+GS,HS="\\ufe0e\\ufe0f",YS="["+Sl+"]",Oo="["+WS+"]",$o="\\ud83c[\\udffb-\\udfff]",qS="(?:"+Oo+"|"+$o+")",_l="[^"+Sl+"]",wl="(?:\\ud83c[\\udde6-\\uddff]){2}",Cl="[\\ud800-\\udbff][\\udc00-\\udfff]",KS="\\u200d",El=qS+"?",xl="["+HS+"]?",JS="(?:"+KS+"(?:"+[_l,wl,Cl].join("|")+")"+xl+El+")*",ZS=xl+El+JS,XS="(?:"+[_l+Oo+"?",Oo,wl,Cl,YS].join("|")+")",QS=RegExp($o+"(?="+$o+")|"+XS+ZS,"g");function RS(e){return e.match(QS)||[]}var e_=RS,t_=BS,r_=Tl,n_=e_;function o_(e){return r_(e)?n_(e):t_(e)}var s_=o_,i_=$S,a_=Tl,l_=s_,c_=Ao;function u_(e){return function(t){t=c_(t);var r=a_(t)?l_(t):void 0,n=r?r[0]:t.charAt(0),o=r?i_(r,1).join(""):t.slice(1);return n[e]()+o}}var f_=u_,d_=f_,p_=d_("toUpperCase"),h_=p_,g_=CS,m_=h_,y_=g_(function(e,t,r){return e+(r?" ":"")+m_(t)}),b_=y_;const v_=ut(b_);var T_=Math.ceil,S_=Math.max;function __(e,t,r,n){for(var o=-1,s=S_(T_((t-e)/(r||1)),0),i=Array(s);s--;)i[n?s:++o]=e,e+=r;return i}var w_=__,C_=sa,E_=1/0,x_=17976931348623157e292;function A_(e){if(!e)return e===0?e:0;if(e=C_(e),e===E_||e===-1/0){var t=e<0?-1:1;return t*x_}return e===e?e:0}var O_=A_,$_=w_,P_=Ia,Po=O_;function I_(e){return function(t,r,n){return n&&typeof n!="number"&&P_(t,r,n)&&(r=n=void 0),t=Po(t),r===void 0?(r=t,t=0):r=Po(r),n=n===void 0?t<r?1:-1:Po(n),$_(t,r,n,e)}}var k_=I_,M_=k_,D_=M_(),F_=D_;const N_=ut(F_);var Io={exports:{}},ie={};/**
106
106
  * @license React
107
107
  * react-is.production.js
108
108
  *
@@ -110,7 +110,7 @@ attempted value: ${i}
110
110
  *
111
111
  * This source code is licensed under the MIT license found in the
112
112
  * LICENSE file in the root directory of this source tree.
113
- */var Al;function L_(){if(Al)return se;Al=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=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 b(h){if(typeof h=="object"&&h!==null){var S=h.$$typeof;switch(S){case e:switch(h=h.type,h){case r:case o:case n:case c:case u:return h;default:switch(h=h&&h.$$typeof,h){case i:case a:case d:case f:return h;case s:return h;default:return S}}case t:return S}}}return se.ContextConsumer=s,se.ContextProvider=i,se.Element=e,se.ForwardRef=a,se.Fragment=r,se.Lazy=d,se.Memo=f,se.Portal=t,se.Profiler=o,se.StrictMode=n,se.Suspense=c,se.SuspenseList=u,se.isContextConsumer=function(h){return b(h)===s},se.isContextProvider=function(h){return b(h)===i},se.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},se.isForwardRef=function(h){return b(h)===a},se.isFragment=function(h){return b(h)===r},se.isLazy=function(h){return b(h)===d},se.isMemo=function(h){return b(h)===f},se.isPortal=function(h){return b(h)===t},se.isProfiler=function(h){return b(h)===o},se.isStrictMode=function(h){return b(h)===n},se.isSuspense=function(h){return b(h)===c},se.isSuspenseList=function(h){return b(h)===u},se.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===r||h===o||h===n||h===c||h===u||h===p||typeof h=="object"&&h!==null&&(h.$$typeof===d||h.$$typeof===f||h.$$typeof===i||h.$$typeof===s||h.$$typeof===a||h.$$typeof===y||h.getModuleId!==void 0)},se.typeOf=b,se}var ie={};/**
113
+ */var Al;function L_(){if(Al)return ie;Al=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),y=Symbol.for("react.client.reference");function b(h){if(typeof h=="object"&&h!==null){var S=h.$$typeof;switch(S){case e:switch(h=h.type,h){case r:case o:case n:case u:case c:return h;default:switch(h=h&&h.$$typeof,h){case i:case a:case f:case d:return h;case s:return h;default:return S}}case t:return S}}}return ie.ContextConsumer=s,ie.ContextProvider=i,ie.Element=e,ie.ForwardRef=a,ie.Fragment=r,ie.Lazy=f,ie.Memo=d,ie.Portal=t,ie.Profiler=o,ie.StrictMode=n,ie.Suspense=u,ie.SuspenseList=c,ie.isContextConsumer=function(h){return b(h)===s},ie.isContextProvider=function(h){return b(h)===i},ie.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},ie.isForwardRef=function(h){return b(h)===a},ie.isFragment=function(h){return b(h)===r},ie.isLazy=function(h){return b(h)===f},ie.isMemo=function(h){return b(h)===d},ie.isPortal=function(h){return b(h)===t},ie.isProfiler=function(h){return b(h)===o},ie.isStrictMode=function(h){return b(h)===n},ie.isSuspense=function(h){return b(h)===u},ie.isSuspenseList=function(h){return b(h)===c},ie.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===r||h===o||h===n||h===u||h===c||h===p||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===i||h.$$typeof===s||h.$$typeof===a||h.$$typeof===y||h.getModuleId!==void 0)},ie.typeOf=b,ie}var ae={};/**
114
114
  * @license React
115
115
  * react-is.development.js
116
116
  *
@@ -118,41 +118,41 @@ attempted value: ${i}
118
118
  *
119
119
  * This source code is licensed under the MIT license found in the
120
120
  * LICENSE file in the root directory of this source tree.
121
- */var Ol;function j_(){return Ol||(Ol=1,process.env.NODE_ENV!=="production"&&function(){function e(h){if(typeof h=="object"&&h!==null){var S=h.$$typeof;switch(S){case t:switch(h=h.type,h){case n:case s:case o:case u:case f:return h;default:switch(h=h&&h.$$typeof,h){case a:case c:case p:case d:return h;case i:return h;default:return S}}case r:return S}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=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"),b=Symbol.for("react.client.reference");ie.ContextConsumer=i,ie.ContextProvider=a,ie.Element=t,ie.ForwardRef=c,ie.Fragment=n,ie.Lazy=p,ie.Memo=d,ie.Portal=r,ie.Profiler=s,ie.StrictMode=o,ie.Suspense=u,ie.SuspenseList=f,ie.isContextConsumer=function(h){return e(h)===i},ie.isContextProvider=function(h){return e(h)===a},ie.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},ie.isForwardRef=function(h){return e(h)===c},ie.isFragment=function(h){return e(h)===n},ie.isLazy=function(h){return e(h)===p},ie.isMemo=function(h){return e(h)===d},ie.isPortal=function(h){return e(h)===r},ie.isProfiler=function(h){return e(h)===s},ie.isStrictMode=function(h){return e(h)===o},ie.isSuspense=function(h){return e(h)===u},ie.isSuspenseList=function(h){return e(h)===f},ie.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===s||h===o||h===u||h===f||h===y||typeof h=="object"&&h!==null&&(h.$$typeof===p||h.$$typeof===d||h.$$typeof===a||h.$$typeof===i||h.$$typeof===c||h.$$typeof===b||h.getModuleId!==void 0)},ie.typeOf=e}()),ie}process.env.NODE_ENV==="production"?$o.exports=L_():$o.exports=j_();var nn=$o.exports;function ot(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 $l(e){if($e.isValidElement(e)||nn.isValidElementType(e)||!ot(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=$l(e[r])}),t}function ze(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return ot(e)&&ot(t)&&Object.keys(t).forEach(o=>{$e.isValidElement(t[o])||nn.isValidElementType(t[o])?n[o]=t[o]:ot(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&ot(e[o])?n[o]=ze(e[o],t[o],r):r.clone?n[o]=ot(t[o])?$l(t[o]):t[o]:n[o]=t[o]}),n}var Po={exports:{}},on={exports:{}},ne={};/** @license React v16.13.1
121
+ */var Ol;function j_(){return Ol||(Ol=1,process.env.NODE_ENV!=="production"&&function(){function e(h){if(typeof h=="object"&&h!==null){var S=h.$$typeof;switch(S){case t:switch(h=h.type,h){case n:case s:case o:case c:case d:return h;default:switch(h=h&&h.$$typeof,h){case a:case u:case p:case f:return h;case i:return h;default:return S}}case r:return S}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),b=Symbol.for("react.client.reference");ae.ContextConsumer=i,ae.ContextProvider=a,ae.Element=t,ae.ForwardRef=u,ae.Fragment=n,ae.Lazy=p,ae.Memo=f,ae.Portal=r,ae.Profiler=s,ae.StrictMode=o,ae.Suspense=c,ae.SuspenseList=d,ae.isContextConsumer=function(h){return e(h)===i},ae.isContextProvider=function(h){return e(h)===a},ae.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},ae.isForwardRef=function(h){return e(h)===u},ae.isFragment=function(h){return e(h)===n},ae.isLazy=function(h){return e(h)===p},ae.isMemo=function(h){return e(h)===f},ae.isPortal=function(h){return e(h)===r},ae.isProfiler=function(h){return e(h)===s},ae.isStrictMode=function(h){return e(h)===o},ae.isSuspense=function(h){return e(h)===c},ae.isSuspenseList=function(h){return e(h)===d},ae.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===s||h===o||h===c||h===d||h===y||typeof h=="object"&&h!==null&&(h.$$typeof===p||h.$$typeof===f||h.$$typeof===a||h.$$typeof===i||h.$$typeof===u||h.$$typeof===b||h.getModuleId!==void 0)},ae.typeOf=e}()),ae}process.env.NODE_ENV==="production"?Io.exports=L_():Io.exports=j_();var on=Io.exports;function ot(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 $l(e){if($e.isValidElement(e)||on.isValidElementType(e)||!ot(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=$l(e[r])}),t}function ze(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return ot(e)&&ot(t)&&Object.keys(t).forEach(o=>{$e.isValidElement(t[o])||on.isValidElementType(t[o])?n[o]=t[o]:ot(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&ot(e[o])?n[o]=ze(e[o],t[o],r):r.clone?n[o]=ot(t[o])?$l(t[o]):t[o]:n[o]=t[o]}),n}var ko={exports:{}},sn={exports:{}},ne={};/** @license React v16.13.1
122
122
  * react-is.production.min.js
123
123
  *
124
124
  * Copyright (c) Facebook, Inc. and its affiliates.
125
125
  *
126
126
  * This source code is licensed under the MIT license found in the
127
127
  * LICENSE file in the root directory of this source tree.
128
- */var Pl;function z_(){if(Pl)return ne;Pl=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=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,b=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,C=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function O(_){if(typeof _=="object"&&_!==null){var P=_.$$typeof;switch(P){case t:switch(_=_.type,_){case c:case u:case n:case s:case o:case d:return _;default:switch(_=_&&_.$$typeof,_){case a:case f:case b:case y:case i:return _;default:return P}}case r:return P}}}function A(_){return O(_)===u}return ne.AsyncMode=c,ne.ConcurrentMode=u,ne.ContextConsumer=a,ne.ContextProvider=i,ne.Element=t,ne.ForwardRef=f,ne.Fragment=n,ne.Lazy=b,ne.Memo=y,ne.Portal=r,ne.Profiler=s,ne.StrictMode=o,ne.Suspense=d,ne.isAsyncMode=function(_){return A(_)||O(_)===c},ne.isConcurrentMode=A,ne.isContextConsumer=function(_){return O(_)===a},ne.isContextProvider=function(_){return O(_)===i},ne.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},ne.isForwardRef=function(_){return O(_)===f},ne.isFragment=function(_){return O(_)===n},ne.isLazy=function(_){return O(_)===b},ne.isMemo=function(_){return O(_)===y},ne.isPortal=function(_){return O(_)===r},ne.isProfiler=function(_){return O(_)===s},ne.isStrictMode=function(_){return O(_)===o},ne.isSuspense=function(_){return O(_)===d},ne.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===u||_===s||_===o||_===d||_===p||typeof _=="object"&&_!==null&&(_.$$typeof===b||_.$$typeof===y||_.$$typeof===i||_.$$typeof===a||_.$$typeof===f||_.$$typeof===S||_.$$typeof===C||_.$$typeof===k||_.$$typeof===h)},ne.typeOf=O,ne}var oe={};/** @license React v16.13.1
128
+ */var Pl;function z_(){if(Pl)return ne;Pl=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=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,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,D=e?Symbol.for("react.scope"):60119;function A(w){if(typeof w=="object"&&w!==null){var P=w.$$typeof;switch(P){case t:switch(w=w.type,w){case u:case c:case n:case s:case o:case f:return w;default:switch(w=w&&w.$$typeof,w){case a:case d:case b:case y:case i:return w;default:return P}}case r:return P}}}function _(w){return A(w)===c}return ne.AsyncMode=u,ne.ConcurrentMode=c,ne.ContextConsumer=a,ne.ContextProvider=i,ne.Element=t,ne.ForwardRef=d,ne.Fragment=n,ne.Lazy=b,ne.Memo=y,ne.Portal=r,ne.Profiler=s,ne.StrictMode=o,ne.Suspense=f,ne.isAsyncMode=function(w){return _(w)||A(w)===u},ne.isConcurrentMode=_,ne.isContextConsumer=function(w){return A(w)===a},ne.isContextProvider=function(w){return A(w)===i},ne.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},ne.isForwardRef=function(w){return A(w)===d},ne.isFragment=function(w){return A(w)===n},ne.isLazy=function(w){return A(w)===b},ne.isMemo=function(w){return A(w)===y},ne.isPortal=function(w){return A(w)===r},ne.isProfiler=function(w){return A(w)===s},ne.isStrictMode=function(w){return A(w)===o},ne.isSuspense=function(w){return A(w)===f},ne.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===c||w===s||w===o||w===f||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===b||w.$$typeof===y||w.$$typeof===i||w.$$typeof===a||w.$$typeof===d||w.$$typeof===S||w.$$typeof===x||w.$$typeof===D||w.$$typeof===h)},ne.typeOf=A,ne}var oe={};/** @license React v16.13.1
129
129
  * react-is.development.js
130
130
  *
131
131
  * Copyright (c) Facebook, Inc. and its affiliates.
132
132
  *
133
133
  * This source code is licensed under the MIT license found in the
134
134
  * LICENSE file in the root directory of this source tree.
135
- */var Il;function B_(){return Il||(Il=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=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,b=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,C=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function O(M){return typeof M=="string"||typeof M=="function"||M===n||M===u||M===s||M===o||M===d||M===p||typeof M=="object"&&M!==null&&(M.$$typeof===b||M.$$typeof===y||M.$$typeof===i||M.$$typeof===a||M.$$typeof===f||M.$$typeof===S||M.$$typeof===C||M.$$typeof===k||M.$$typeof===h)}function A(M){if(typeof M=="object"&&M!==null){var Ne=M.$$typeof;switch(Ne){case t:var We=M.type;switch(We){case c:case u:case n:case s:case o:case d:return We;default:var Kt=We&&We.$$typeof;switch(Kt){case a:case f:case b:case y:case i:return Kt;default:return Ne}}case r:return Ne}}}var _=c,P=u,L=a,W=i,Z=t,m=f,$=n,N=b,K=y,Q=r,fe=s,de=o,ge=d,Ce=!1;function H(M){return Ce||(Ce=!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.")),x(M)||A(M)===c}function x(M){return A(M)===u}function w(M){return A(M)===a}function G(M){return A(M)===i}function F(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function Y(M){return A(M)===f}function j(M){return A(M)===n}function q(M){return A(M)===b}function J(M){return A(M)===y}function B(M){return A(M)===r}function R(M){return A(M)===s}function ee(M){return A(M)===o}function Se(M){return A(M)===d}oe.AsyncMode=_,oe.ConcurrentMode=P,oe.ContextConsumer=L,oe.ContextProvider=W,oe.Element=Z,oe.ForwardRef=m,oe.Fragment=$,oe.Lazy=N,oe.Memo=K,oe.Portal=Q,oe.Profiler=fe,oe.StrictMode=de,oe.Suspense=ge,oe.isAsyncMode=H,oe.isConcurrentMode=x,oe.isContextConsumer=w,oe.isContextProvider=G,oe.isElement=F,oe.isForwardRef=Y,oe.isFragment=j,oe.isLazy=q,oe.isMemo=J,oe.isPortal=B,oe.isProfiler=R,oe.isStrictMode=ee,oe.isSuspense=Se,oe.isValidElementType=O,oe.typeOf=A}()),oe}var kl;function Dl(){return kl||(kl=1,process.env.NODE_ENV==="production"?on.exports=z_():on.exports=B_()),on.exports}/*
135
+ */var Il;function B_(){return Il||(Il=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,i=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,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,D=e?Symbol.for("react.scope"):60119;function A(M){return typeof M=="string"||typeof M=="function"||M===n||M===c||M===s||M===o||M===f||M===p||typeof M=="object"&&M!==null&&(M.$$typeof===b||M.$$typeof===y||M.$$typeof===i||M.$$typeof===a||M.$$typeof===d||M.$$typeof===S||M.$$typeof===x||M.$$typeof===D||M.$$typeof===h)}function _(M){if(typeof M=="object"&&M!==null){var Ne=M.$$typeof;switch(Ne){case t:var We=M.type;switch(We){case u:case c:case n:case s:case o:case f:return We;default:var Jt=We&&We.$$typeof;switch(Jt){case a:case d:case b:case y:case i:return Jt;default:return Ne}}case r:return Ne}}}var w=u,P=c,F=a,G=i,j=t,m=d,O=n,z=b,q=y,ee=r,fe=s,se=o,ye=f,_e=!1;function W(M){return _e||(_e=!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.")),E(M)||_(M)===u}function E(M){return _(M)===c}function $(M){return _(M)===a}function K(M){return _(M)===i}function V(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function J(M){return _(M)===d}function B(M){return _(M)===n}function Z(M){return _(M)===b}function X(M){return _(M)===y}function N(M){return _(M)===r}function L(M){return _(M)===s}function Q(M){return _(M)===o}function Se(M){return _(M)===f}oe.AsyncMode=w,oe.ConcurrentMode=P,oe.ContextConsumer=F,oe.ContextProvider=G,oe.Element=j,oe.ForwardRef=m,oe.Fragment=O,oe.Lazy=z,oe.Memo=q,oe.Portal=ee,oe.Profiler=fe,oe.StrictMode=se,oe.Suspense=ye,oe.isAsyncMode=W,oe.isConcurrentMode=E,oe.isContextConsumer=$,oe.isContextProvider=K,oe.isElement=V,oe.isForwardRef=J,oe.isFragment=B,oe.isLazy=Z,oe.isMemo=X,oe.isPortal=N,oe.isProfiler=L,oe.isStrictMode=Q,oe.isSuspense=Se,oe.isValidElementType=A,oe.typeOf=_}()),oe}var kl;function Ml(){return kl||(kl=1,process.env.NODE_ENV==="production"?sn.exports=z_():sn.exports=B_()),sn.exports}/*
136
136
  object-assign
137
137
  (c) Sindre Sorhus
138
138
  @license MIT
139
- */var Io,Ml;function U_(){if(Ml)return Io;Ml=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 o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Io=o()?Object.assign:function(s,i){for(var a,c=n(s),u,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var d in a)t.call(a,d)&&(c[d]=a[d]);if(e){u=e(a);for(var p=0;p<u.length;p++)r.call(a,u[p])&&(c[u[p]]=a[u[p]])}}return c},Io}var ko,Fl;function Do(){if(Fl)return ko;Fl=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ko=e,ko}var Mo,Nl;function Ll(){return Nl||(Nl=1,Mo=Function.call.bind(Object.prototype.hasOwnProperty)),Mo}var Fo,jl;function V_(){if(jl)return Fo;jl=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Do(),r={},n=Ll();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,c,u){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((c||"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](i,f,c,a,null,t)}catch(b){d=b}if(d&&!(d instanceof Error)&&e((c||"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=u?u():"";e("Failed "+a+" type: "+d.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Fo=o,Fo}var No,zl;function G_(){if(zl)return No;zl=1;var e=Dl(),t=U_(),r=Do(),n=Ll(),o=V_(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return No=function(a,c){var u=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(x){var w=x&&(u&&x[u]||x[f]);if(typeof w=="function")return w}var p="<<anonymous>>",y={array:C("array"),bigint:C("bigint"),bool:C("boolean"),func:C("function"),number:C("number"),object:C("object"),string:C("string"),symbol:C("symbol"),any:k(),arrayOf:O,element:A(),elementType:_(),instanceOf:P,node:m(),objectOf:W,oneOf:L,oneOfType:Z,shape:N,exact:K};function b(x,w){return x===w?x!==0||1/x===1/w:x!==x&&w!==w}function h(x,w){this.message=x,this.data=w&&typeof w=="object"?w:{},this.stack=""}h.prototype=Error.prototype;function S(x){if(process.env.NODE_ENV!=="production")var w={},G=0;function F(j,q,J,B,R,ee,Se){if(B=B||p,ee=ee||J,Se!==r){if(c){var M=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 M.name="Invariant Violation",M}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ne=B+":"+J;!w[Ne]&&G<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ee+"` prop on `"+B+"`. 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."),w[Ne]=!0,G++)}}return q[J]==null?j?q[J]===null?new h("The "+R+" `"+ee+"` is marked as required "+("in `"+B+"`, but its value is `null`.")):new h("The "+R+" `"+ee+"` is marked as required in "+("`"+B+"`, but its value is `undefined`.")):null:x(q,J,B,R,ee)}var Y=F.bind(null,!1);return Y.isRequired=F.bind(null,!0),Y}function C(x){function w(G,F,Y,j,q,J){var B=G[F],R=de(B);if(R!==x){var ee=ge(B);return new h("Invalid "+j+" `"+q+"` of type "+("`"+ee+"` supplied to `"+Y+"`, expected ")+("`"+x+"`."),{expectedType:x})}return null}return S(w)}function k(){return S(i)}function O(x){function w(G,F,Y,j,q){if(typeof x!="function")return new h("Property `"+q+"` of component `"+Y+"` has invalid PropType notation inside arrayOf.");var J=G[F];if(!Array.isArray(J)){var B=de(J);return new h("Invalid "+j+" `"+q+"` of type "+("`"+B+"` supplied to `"+Y+"`, expected an array."))}for(var R=0;R<J.length;R++){var ee=x(J,R,Y,j,q+"["+R+"]",r);if(ee instanceof Error)return ee}return null}return S(w)}function A(){function x(w,G,F,Y,j){var q=w[G];if(!a(q)){var J=de(q);return new h("Invalid "+Y+" `"+j+"` of type "+("`"+J+"` supplied to `"+F+"`, expected a single ReactElement."))}return null}return S(x)}function _(){function x(w,G,F,Y,j){var q=w[G];if(!e.isValidElementType(q)){var J=de(q);return new h("Invalid "+Y+" `"+j+"` of type "+("`"+J+"` supplied to `"+F+"`, expected a single ReactElement type."))}return null}return S(x)}function P(x){function w(G,F,Y,j,q){if(!(G[F]instanceof x)){var J=x.name||p,B=H(G[F]);return new h("Invalid "+j+" `"+q+"` of type "+("`"+B+"` supplied to `"+Y+"`, expected ")+("instance of `"+J+"`."))}return null}return S(w)}function L(x){if(!Array.isArray(x))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.")),i;function w(G,F,Y,j,q){for(var J=G[F],B=0;B<x.length;B++)if(b(J,x[B]))return null;var R=JSON.stringify(x,function(Se,M){var Ne=ge(M);return Ne==="symbol"?String(M):M});return new h("Invalid "+j+" `"+q+"` of value `"+String(J)+"` "+("supplied to `"+Y+"`, expected one of "+R+"."))}return S(w)}function W(x){function w(G,F,Y,j,q){if(typeof x!="function")return new h("Property `"+q+"` of component `"+Y+"` has invalid PropType notation inside objectOf.");var J=G[F],B=de(J);if(B!=="object")return new h("Invalid "+j+" `"+q+"` of type "+("`"+B+"` supplied to `"+Y+"`, expected an object."));for(var R in J)if(n(J,R)){var ee=x(J,R,Y,j,q+"."+R,r);if(ee instanceof Error)return ee}return null}return S(w)}function Z(x){if(!Array.isArray(x))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var w=0;w<x.length;w++){var G=x[w];if(typeof G!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ce(G)+" at index "+w+"."),i}function F(Y,j,q,J,B){for(var R=[],ee=0;ee<x.length;ee++){var Se=x[ee],M=Se(Y,j,q,J,B,r);if(M==null)return null;M.data&&n(M.data,"expectedType")&&R.push(M.data.expectedType)}var Ne=R.length>0?", expected one of type ["+R.join(", ")+"]":"";return new h("Invalid "+J+" `"+B+"` supplied to "+("`"+q+"`"+Ne+"."))}return S(F)}function m(){function x(w,G,F,Y,j){return Q(w[G])?null:new h("Invalid "+Y+" `"+j+"` supplied to "+("`"+F+"`, expected a ReactNode."))}return S(x)}function $(x,w,G,F,Y){return new h((x||"React class")+": "+w+" type `"+G+"."+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Y+"`.")}function N(x){function w(G,F,Y,j,q){var J=G[F],B=de(J);if(B!=="object")return new h("Invalid "+j+" `"+q+"` of type `"+B+"` "+("supplied to `"+Y+"`, expected `object`."));for(var R in x){var ee=x[R];if(typeof ee!="function")return $(Y,j,q,R,ge(ee));var Se=ee(J,R,Y,j,q+"."+R,r);if(Se)return Se}return null}return S(w)}function K(x){function w(G,F,Y,j,q){var J=G[F],B=de(J);if(B!=="object")return new h("Invalid "+j+" `"+q+"` of type `"+B+"` "+("supplied to `"+Y+"`, expected `object`."));var R=t({},G[F],x);for(var ee in R){var Se=x[ee];if(n(x,ee)&&typeof Se!="function")return $(Y,j,q,ee,ge(Se));if(!Se)return new h("Invalid "+j+" `"+q+"` key `"+ee+"` supplied to `"+Y+"`.\nBad object: "+JSON.stringify(G[F],null," ")+`
140
- Valid keys: `+JSON.stringify(Object.keys(x),null," "));var M=Se(J,ee,Y,j,q+"."+ee,r);if(M)return M}return null}return S(w)}function Q(x){switch(typeof x){case"number":case"string":case"undefined":return!0;case"boolean":return!x;case"object":if(Array.isArray(x))return x.every(Q);if(x===null||a(x))return!0;var w=d(x);if(w){var G=w.call(x),F;if(w!==x.entries){for(;!(F=G.next()).done;)if(!Q(F.value))return!1}else for(;!(F=G.next()).done;){var Y=F.value;if(Y&&!Q(Y[1]))return!1}}else return!1;return!0;default:return!1}}function fe(x,w){return x==="symbol"?!0:w?w["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&w instanceof Symbol:!1}function de(x){var w=typeof x;return Array.isArray(x)?"array":x instanceof RegExp?"object":fe(w,x)?"symbol":w}function ge(x){if(typeof x>"u"||x===null)return""+x;var w=de(x);if(w==="object"){if(x instanceof Date)return"date";if(x instanceof RegExp)return"regexp"}return w}function Ce(x){var w=ge(x);switch(w){case"array":case"object":return"an "+w;case"boolean":case"date":case"regexp":return"a "+w;default:return w}}function H(x){return!x.constructor||!x.constructor.name?p:x.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},No}var Lo,Bl;function W_(){if(Bl)return Lo;Bl=1;var e=Do();function t(){}function r(){}return r.resetWarningCache=t,Lo=function(){function n(i,a,c,u,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 o(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},Lo}if(process.env.NODE_ENV!=="production"){var H_=Dl(),Y_=!0;Po.exports=G_()(H_.isElement,Y_)}else Po.exports=W_()();var q_=Po.exports;const te=ut(q_);function pt(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.`}function Ul(e,t=""){return e.displayName||e.name||t}function Vl(e,t,r){const n=Ul(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function K_(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Ul(e,"Component");if(typeof e=="object")switch(e.$$typeof){case nn.ForwardRef:return Vl(e,e.render,"ForwardRef");case nn.Memo:return Vl(e,e.type,"memo");default:return}}}function Ct(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":pt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function jo(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=n;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const s=e[o],i=t[o];if(!i)r[o]=s||{};else if(!s)r[o]=i;else{r[o]={...i};for(const a in s)if(Object.prototype.hasOwnProperty.call(s,a)){const c=a;r[o][c]=jo(s[c],i[c])}}}else r[o]===void 0&&(r[o]=e[o])}return r}function J_(e,t,r=void 0){const n={};for(const o in e){const s=e[o];let i="",a=!0;for(let c=0;c<s.length;c+=1){const u=s[c];u&&(i+=(a===!0?"":" ")+t(u),a=!1,r&&r[u]&&(i+=" "+r[u]))}n[o]=i}return n}const Gl=e=>e,Z_=(()=>{let e=Gl;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Gl}}})(),X_={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 zo(e,t,r="Mui"){const n=X_[t];return n?`${r}-${n}`:`${Z_.generate(e)}-${t}`}function Q_(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=zo(e,o,r)}),n}function R_(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Wl(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Wl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ew(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Wl(e))&&(n&&(n+=" "),n+=t);return n}function fr(e,t){return t?ze(e,t,{clone:!1}):e}const ht=process.env.NODE_ENV!=="production"?te.oneOfType([te.number,te.string,te.object,te.array]):{};function tw(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,o)=>{var i,a;const s=/min-width:\s*([0-9.]+)/;return+(((i=n.match(s))==null?void 0:i[1])||0)-+(((a=o.match(s))==null?void 0:a[1])||0)});return r.length?r.reduce((n,o)=>{const s=t[o];return delete n[o],n[o]=s,n},{...t}):t}function rw(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function nw(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){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>\`.
141
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:pt(18,`(${t})`));return null}const[,n,o]=r,s=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(s)}function ow(e){const t=(s,i)=>s.replace("@media",i?`@container ${i}`:"@container");function r(s,i){s.up=(...a)=>t(e.breakpoints.up(...a),i),s.down=(...a)=>t(e.breakpoints.down(...a),i),s.between=(...a)=>t(e.breakpoints.between(...a),i),s.only=(...a)=>t(e.breakpoints.only(...a),i),s.not=(...a)=>{const c=t(e.breakpoints.not(...a),i);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const n={},o=s=>(r(n,s),n);return r(o),{...e,containerQueries:o}}const sn={xs:0,sm:600,md:900,lg:1200,xl:1536},Hl={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${sn[e]}px)`},sw={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:sn[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function st(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||Hl;return t.reduce((i,a,c)=>(i[s.up(s.keys[c])]=r(t[c]),i),{})}if(typeof t=="object"){const s=n.breakpoints||Hl;return Object.keys(t).reduce((i,a)=>{if(rw(s.keys,a)){const c=nw(n.containerQueries?n:sw,a);c&&(i[c]=r(t[a],a))}else if(Object.keys(s.values||sn).includes(a)){const c=s.up(a);i[c]=r(t[a],a)}else{const c=a;i[c]=t[c]}return i},{})}return r(t)}function iw(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function aw(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function an(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function ln(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=an(e,r)||n,t&&(o=t(o,n,e)),o}function ve(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,s=i=>{if(i[t]==null)return null;const a=i[t],c=i.theme,u=an(c,n)||{};return st(i,a,d=>{let p=ln(u,o,d);return d===p&&typeof d=="string"&&(p=ln(u,o,`${t}${d==="default"?"":Ct(d)}`,d)),r===!1?p:{[r]:p}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:ht}:{},s.filterProps=[t],s}function lw(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const cw={m:"margin",p:"padding"},uw={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Yl={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},fw=lw(e=>{if(e.length>2)if(Yl[e])e=Yl[e];else return[e];const[t,r]=e.split(""),n=cw[t],o=uw[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),cn=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],un=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],dw=[...cn,...un];function dr(e,t,r,n){const o=an(e,t,!0)??r;return typeof o=="number"||typeof o=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${s}.`),typeof o=="string"?`calc(${s} * ${o})`:o*s):Array.isArray(o)?s=>{if(typeof s=="string")return s;const i=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>o.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${i} > ${o.length-1}, you need to add the missing values.`].join(`
139
+ */var Mo,Dl;function U_(){if(Dl)return Mo;Dl=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 o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var u=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Mo=o()?Object.assign:function(s,i){for(var a,u=n(s),c,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var f in a)t.call(a,f)&&(u[f]=a[f]);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},Mo}var Do,Fl;function Fo(){if(Fl)return Do;Fl=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Do=e,Do}var No,Nl;function Ll(){return Nl||(Nl=1,No=Function.call.bind(Object.prototype.hasOwnProperty)),No}var Lo,jl;function V_(){if(jl)return Lo;jl=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Fo(),r={},n=Ll();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,u,c){if(process.env.NODE_ENV!=="production"){for(var d in s)if(n(s,d)){var f;try{if(typeof s[d]!="function"){var p=Error((u||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=s[d](i,d,u,a,null,t)}catch(b){f=b}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var y=c?c():"";e("Failed "+a+" type: "+f.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Lo=o,Lo}var jo,zl;function G_(){if(zl)return jo;zl=1;var e=Ml(),t=U_(),r=Fo(),n=Ll(),o=V_(),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 i(){return null}return jo=function(a,u){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(E){var $=E&&(c&&E[c]||E[d]);if(typeof $=="function")return $}var p="<<anonymous>>",y={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:D(),arrayOf:A,element:_(),elementType:w(),instanceOf:P,node:m(),objectOf:G,oneOf:F,oneOfType:j,shape:z,exact:q};function b(E,$){return E===$?E!==0||1/E===1/$:E!==E&&$!==$}function h(E,$){this.message=E,this.data=$&&typeof $=="object"?$:{},this.stack=""}h.prototype=Error.prototype;function S(E){if(process.env.NODE_ENV!=="production")var $={},K=0;function V(B,Z,X,N,L,Q,Se){if(N=N||p,Q=Q||X,Se!==r){if(u){var M=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 M.name="Invariant Violation",M}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ne=N+":"+X;!$[Ne]&&K<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Q+"` prop on `"+N+"`. 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."),$[Ne]=!0,K++)}}return Z[X]==null?B?Z[X]===null?new h("The "+L+" `"+Q+"` is marked as required "+("in `"+N+"`, but its value is `null`.")):new h("The "+L+" `"+Q+"` is marked as required in "+("`"+N+"`, but its value is `undefined`.")):null:E(Z,X,N,L,Q)}var J=V.bind(null,!1);return J.isRequired=V.bind(null,!0),J}function x(E){function $(K,V,J,B,Z,X){var N=K[V],L=se(N);if(L!==E){var Q=ye(N);return new h("Invalid "+B+" `"+Z+"` of type "+("`"+Q+"` supplied to `"+J+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return S($)}function D(){return S(i)}function A(E){function $(K,V,J,B,Z){if(typeof E!="function")return new h("Property `"+Z+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var X=K[V];if(!Array.isArray(X)){var N=se(X);return new h("Invalid "+B+" `"+Z+"` of type "+("`"+N+"` supplied to `"+J+"`, expected an array."))}for(var L=0;L<X.length;L++){var Q=E(X,L,J,B,Z+"["+L+"]",r);if(Q instanceof Error)return Q}return null}return S($)}function _(){function E($,K,V,J,B){var Z=$[K];if(!a(Z)){var X=se(Z);return new h("Invalid "+J+" `"+B+"` of type "+("`"+X+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return S(E)}function w(){function E($,K,V,J,B){var Z=$[K];if(!e.isValidElementType(Z)){var X=se(Z);return new h("Invalid "+J+" `"+B+"` of type "+("`"+X+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return S(E)}function P(E){function $(K,V,J,B,Z){if(!(K[V]instanceof E)){var X=E.name||p,N=W(K[V]);return new h("Invalid "+B+" `"+Z+"` of type "+("`"+N+"` supplied to `"+J+"`, expected ")+("instance of `"+X+"`."))}return null}return S($)}function F(E){if(!Array.isArray(E))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.")),i;function $(K,V,J,B,Z){for(var X=K[V],N=0;N<E.length;N++)if(b(X,E[N]))return null;var L=JSON.stringify(E,function(Se,M){var Ne=ye(M);return Ne==="symbol"?String(M):M});return new h("Invalid "+B+" `"+Z+"` of value `"+String(X)+"` "+("supplied to `"+J+"`, expected one of "+L+"."))}return S($)}function G(E){function $(K,V,J,B,Z){if(typeof E!="function")return new h("Property `"+Z+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var X=K[V],N=se(X);if(N!=="object")return new h("Invalid "+B+" `"+Z+"` of type "+("`"+N+"` supplied to `"+J+"`, expected an object."));for(var L in X)if(n(X,L)){var Q=E(X,L,J,B,Z+"."+L,r);if(Q instanceof Error)return Q}return null}return S($)}function j(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var $=0;$<E.length;$++){var K=E[$];if(typeof K!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+_e(K)+" at index "+$+"."),i}function V(J,B,Z,X,N){for(var L=[],Q=0;Q<E.length;Q++){var Se=E[Q],M=Se(J,B,Z,X,N,r);if(M==null)return null;M.data&&n(M.data,"expectedType")&&L.push(M.data.expectedType)}var Ne=L.length>0?", expected one of type ["+L.join(", ")+"]":"";return new h("Invalid "+X+" `"+N+"` supplied to "+("`"+Z+"`"+Ne+"."))}return S(V)}function m(){function E($,K,V,J,B){return ee($[K])?null:new h("Invalid "+J+" `"+B+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return S(E)}function O(E,$,K,V,J){return new h((E||"React class")+": "+$+" type `"+K+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function z(E){function $(K,V,J,B,Z){var X=K[V],N=se(X);if(N!=="object")return new h("Invalid "+B+" `"+Z+"` of type `"+N+"` "+("supplied to `"+J+"`, expected `object`."));for(var L in E){var Q=E[L];if(typeof Q!="function")return O(J,B,Z,L,ye(Q));var Se=Q(X,L,J,B,Z+"."+L,r);if(Se)return Se}return null}return S($)}function q(E){function $(K,V,J,B,Z){var X=K[V],N=se(X);if(N!=="object")return new h("Invalid "+B+" `"+Z+"` of type `"+N+"` "+("supplied to `"+J+"`, expected `object`."));var L=t({},K[V],E);for(var Q in L){var Se=E[Q];if(n(E,Q)&&typeof Se!="function")return O(J,B,Z,Q,ye(Se));if(!Se)return new h("Invalid "+B+" `"+Z+"` key `"+Q+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(K[V],null," ")+`
140
+ Valid keys: `+JSON.stringify(Object.keys(E),null," "));var M=Se(X,Q,J,B,Z+"."+Q,r);if(M)return M}return null}return S($)}function ee(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(ee);if(E===null||a(E))return!0;var $=f(E);if($){var K=$.call(E),V;if($!==E.entries){for(;!(V=K.next()).done;)if(!ee(V.value))return!1}else for(;!(V=K.next()).done;){var J=V.value;if(J&&!ee(J[1]))return!1}}else return!1;return!0;default:return!1}}function fe(E,$){return E==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function se(E){var $=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":fe($,E)?"symbol":$}function ye(E){if(typeof E>"u"||E===null)return""+E;var $=se(E);if($==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return $}function _e(E){var $=ye(E);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function W(E){return!E.constructor||!E.constructor.name?p:E.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},jo}var zo,Bl;function W_(){if(Bl)return zo;Bl=1;var e=Fo();function t(){}function r(){}return r.resetWarningCache=t,zo=function(){function n(i,a,u,c,d,f){if(f!==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 o(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},zo}if(process.env.NODE_ENV!=="production"){var H_=Ml(),Y_=!0;ko.exports=G_()(H_.isElement,Y_)}else ko.exports=W_()();var q_=ko.exports;const re=ut(q_);function pt(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.`}function Ul(e,t=""){return e.displayName||e.name||t}function Vl(e,t,r){const n=Ul(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function K_(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Ul(e,"Component");if(typeof e=="object")switch(e.$$typeof){case on.ForwardRef:return Vl(e,e.render,"ForwardRef");case on.Memo:return Vl(e,e.type,"memo");default:return}}}function Et(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":pt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Bo(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=n;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const s=e[o],i=t[o];if(!i)r[o]=s||{};else if(!s)r[o]=i;else{r[o]={...i};for(const a in s)if(Object.prototype.hasOwnProperty.call(s,a)){const u=a;r[o][u]=Bo(s[u],i[u])}}}else r[o]===void 0&&(r[o]=e[o])}return r}function J_(e,t,r=void 0){const n={};for(const o in e){const s=e[o];let i="",a=!0;for(let u=0;u<s.length;u+=1){const c=s[u];c&&(i+=(a===!0?"":" ")+t(c),a=!1,r&&r[c]&&(i+=" "+r[c]))}n[o]=i}return n}const Gl=e=>e,Z_=(()=>{let e=Gl;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Gl}}})(),X_={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 Uo(e,t,r="Mui"){const n=X_[t];return n?`${r}-${n}`:`${Z_.generate(e)}-${t}`}function Q_(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=Uo(e,o,r)}),n}function R_(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Wl(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Wl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ew(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Wl(e))&&(n&&(n+=" "),n+=t);return n}function dr(e,t){return t?ze(e,t,{clone:!1}):e}const ht=process.env.NODE_ENV!=="production"?re.oneOfType([re.number,re.string,re.object,re.array]):{};function tw(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,o)=>{var i,a;const s=/min-width:\s*([0-9.]+)/;return+(((i=n.match(s))==null?void 0:i[1])||0)-+(((a=o.match(s))==null?void 0:a[1])||0)});return r.length?r.reduce((n,o)=>{const s=t[o];return delete n[o],n[o]=s,n},{...t}):t}function rw(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function nw(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){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>\`.
141
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:pt(18,`(${t})`));return null}const[,n,o]=r,s=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(s)}function ow(e){const t=(s,i)=>s.replace("@media",i?`@container ${i}`:"@container");function r(s,i){s.up=(...a)=>t(e.breakpoints.up(...a),i),s.down=(...a)=>t(e.breakpoints.down(...a),i),s.between=(...a)=>t(e.breakpoints.between(...a),i),s.only=(...a)=>t(e.breakpoints.only(...a),i),s.not=(...a)=>{const u=t(e.breakpoints.not(...a),i);return u.includes("not all and")?u.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):u}}const n={},o=s=>(r(n,s),n);return r(o),{...e,containerQueries:o}}const an={xs:0,sm:600,md:900,lg:1200,xl:1536},Hl={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${an[e]}px)`},sw={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:an[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function st(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||Hl;return t.reduce((i,a,u)=>(i[s.up(s.keys[u])]=r(t[u]),i),{})}if(typeof t=="object"){const s=n.breakpoints||Hl;return Object.keys(t).reduce((i,a)=>{if(rw(s.keys,a)){const u=nw(n.containerQueries?n:sw,a);u&&(i[u]=r(t[a],a))}else if(Object.keys(s.values||an).includes(a)){const u=s.up(a);i[u]=r(t[a],a)}else{const u=a;i[u]=t[u]}return i},{})}return r(t)}function iw(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function aw(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function ln(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function cn(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=ln(e,r)||n,t&&(o=t(o,n,e)),o}function ve(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,s=i=>{if(i[t]==null)return null;const a=i[t],u=i.theme,c=ln(u,n)||{};return st(i,a,f=>{let p=cn(c,o,f);return f===p&&typeof f=="string"&&(p=cn(c,o,`${t}${f==="default"?"":Et(f)}`,f)),r===!1?p:{[r]:p}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:ht}:{},s.filterProps=[t],s}function lw(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const cw={m:"margin",p:"padding"},uw={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Yl={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},fw=lw(e=>{if(e.length>2)if(Yl[e])e=Yl[e];else return[e];const[t,r]=e.split(""),n=cw[t],o=uw[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),un=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],fn=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],dw=[...un,...fn];function pr(e,t,r,n){const o=ln(e,t,!0)??r;return typeof o=="number"||typeof o=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${s}.`),typeof o=="string"?`calc(${s} * ${o})`:o*s):Array.isArray(o)?s=>{if(typeof s=="string")return s;const i=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>o.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${i} > ${o.length-1}, you need to add the missing values.`].join(`
142
142
  `)):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(`
143
143
  `)));const a=o[i];return s>=0?a:typeof a=="number"?-a:`-${a}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
144
- `)),()=>{})}function Bo(e){return dr(e,"spacing",8,"spacing")}function pr(e,t){return typeof t=="string"||t==null?t:e(t)}function pw(e,t){return r=>e.reduce((n,o)=>(n[o]=pr(t,r),n),{})}function hw(e,t,r,n){if(!t.includes(r))return null;const o=fw(r),s=pw(o,n),i=e[r];return st(e,i,s)}function ql(e,t){const r=Bo(e.theme);return Object.keys(e).map(n=>hw(e,t,n,r)).reduce(fr,{})}function me(e){return ql(e,cn)}me.propTypes=process.env.NODE_ENV!=="production"?cn.reduce((e,t)=>(e[t]=ht,e),{}):{},me.filterProps=cn;function ye(e){return ql(e,un)}ye.propTypes=process.env.NODE_ENV!=="production"?un.reduce((e,t)=>(e[t]=ht,e),{}):{},ye.filterProps=un,process.env.NODE_ENV!=="production"&&dw.reduce((e,t)=>(e[t]=ht,e),{});function fn(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(s=>{n[s]=o}),n),{}),r=n=>Object.keys(n).reduce((o,s)=>t[s]?fr(o,t[s](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function Ve(e){return typeof e!="number"?e:`${e}px solid`}function Ge(e,t){return ve({prop:e,themeKey:"borders",transform:t})}const gw=Ge("border",Ve),mw=Ge("borderTop",Ve),yw=Ge("borderRight",Ve),bw=Ge("borderBottom",Ve),vw=Ge("borderLeft",Ve),Tw=Ge("borderColor"),Sw=Ge("borderTopColor"),_w=Ge("borderRightColor"),ww=Ge("borderBottomColor"),Cw=Ge("borderLeftColor"),Ew=Ge("outline",Ve),xw=Ge("outlineColor"),dn=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=dr(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:pr(t,n)});return st(e,e.borderRadius,r)}return null};dn.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:ht}:{},dn.filterProps=["borderRadius"],fn(gw,mw,yw,bw,vw,Tw,Sw,_w,ww,Cw,dn,Ew,xw);const pn=e=>{if(e.gap!==void 0&&e.gap!==null){const t=dr(e.theme,"spacing",8,"gap"),r=n=>({gap:pr(t,n)});return st(e,e.gap,r)}return null};pn.propTypes=process.env.NODE_ENV!=="production"?{gap:ht}:{},pn.filterProps=["gap"];const hn=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=dr(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:pr(t,n)});return st(e,e.columnGap,r)}return null};hn.propTypes=process.env.NODE_ENV!=="production"?{columnGap:ht}:{},hn.filterProps=["columnGap"];const gn=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=dr(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:pr(t,n)});return st(e,e.rowGap,r)}return null};gn.propTypes=process.env.NODE_ENV!=="production"?{rowGap:ht}:{},gn.filterProps=["rowGap"];const Aw=ve({prop:"gridColumn"}),Ow=ve({prop:"gridRow"}),$w=ve({prop:"gridAutoFlow"}),Pw=ve({prop:"gridAutoColumns"}),Iw=ve({prop:"gridAutoRows"}),kw=ve({prop:"gridTemplateColumns"}),Dw=ve({prop:"gridTemplateRows"}),Mw=ve({prop:"gridTemplateAreas"}),Fw=ve({prop:"gridArea"});fn(pn,hn,gn,Aw,Ow,$w,Pw,Iw,kw,Dw,Mw,Fw);function jt(e,t){return t==="grey"?t:e}const Nw=ve({prop:"color",themeKey:"palette",transform:jt}),Lw=ve({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:jt}),jw=ve({prop:"backgroundColor",themeKey:"palette",transform:jt});fn(Nw,Lw,jw);function Be(e){return e<=1&&e!==0?`${e*100}%`:e}const zw=ve({prop:"width",transform:Be}),Uo=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var o,s,i,a,c;const n=((i=(s=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:s.values)==null?void 0:i[r])||sn[r];return n?((c=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:Be(r)}};return st(e,e.maxWidth,t)}return null};Uo.filterProps=["maxWidth"];const Bw=ve({prop:"minWidth",transform:Be}),Uw=ve({prop:"height",transform:Be}),Vw=ve({prop:"maxHeight",transform:Be}),Gw=ve({prop:"minHeight",transform:Be});ve({prop:"size",cssProperty:"width",transform:Be}),ve({prop:"size",cssProperty:"height",transform:Be});const Ww=ve({prop:"boxSizing"});fn(zw,Uo,Bw,Uw,Vw,Gw,Ww);const mn={border:{themeKey:"borders",transform:Ve},borderTop:{themeKey:"borders",transform:Ve},borderRight:{themeKey:"borders",transform:Ve},borderBottom:{themeKey:"borders",transform:Ve},borderLeft:{themeKey:"borders",transform:Ve},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ve},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:dn},color:{themeKey:"palette",transform:jt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:jt},backgroundColor:{themeKey:"palette",transform:jt},p:{style:ye},pt:{style:ye},pr:{style:ye},pb:{style:ye},pl:{style:ye},px:{style:ye},py:{style:ye},padding:{style:ye},paddingTop:{style:ye},paddingRight:{style:ye},paddingBottom:{style:ye},paddingLeft:{style:ye},paddingX:{style:ye},paddingY:{style:ye},paddingInline:{style:ye},paddingInlineStart:{style:ye},paddingInlineEnd:{style:ye},paddingBlock:{style:ye},paddingBlockStart:{style:ye},paddingBlockEnd:{style:ye},m:{style:me},mt:{style:me},mr:{style:me},mb:{style:me},ml:{style:me},mx:{style:me},my:{style:me},margin:{style:me},marginTop:{style:me},marginRight:{style:me},marginBottom:{style:me},marginLeft:{style:me},marginX:{style:me},marginY:{style:me},marginInline:{style:me},marginInlineStart:{style:me},marginInlineEnd:{style:me},marginBlock:{style:me},marginBlockStart:{style:me},marginBlockEnd:{style:me},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:pn},rowGap:{style:gn},columnGap:{style:hn},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Be},maxWidth:{style:Uo},minWidth:{transform:Be},height:{transform:Be},maxHeight:{transform:Be},minHeight:{transform:Be},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 Hw(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Yw(e,t){return typeof e=="function"?e(t):e}function qw(){function e(r,n,o,s){const i={[r]:n,theme:o},a=s[r];if(!a)return{[r]:n};const{cssProperty:c=r,themeKey:u,transform:f,style:d}=a;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};const p=an(o,u)||{};return d?d(i):st(i,n,b=>{let h=ln(p,f,b);return b===h&&typeof b=="string"&&(h=ln(p,f,`${r}${b==="default"?"":Ct(b)}`,b)),c===!1?h:{[c]:h}})}function t(r){const{sx:n,theme:o={}}=r||{};if(!n)return null;const s=o.unstable_sxConfig??mn;function i(a){let c=a;if(typeof a=="function")c=a(o);else if(typeof a!="object")return a;if(!c)return null;const u=iw(o.breakpoints),f=Object.keys(u);let d=u;return Object.keys(c).forEach(p=>{const y=Yw(c[p],o);if(y!=null)if(typeof y=="object")if(s[p])d=fr(d,e(p,y,o,s));else{const b=st({theme:o},y,h=>({[p]:h}));Hw(b,y)?d[p]=t({sx:y,theme:o}):d=fr(d,b)}else d=fr(d,e(p,y,o,s))}),tw(o,aw(f,d))}return Array.isArray(n)?n.map(i):i(n)}return t}const zt=qw();zt.filterProps=["sx"];function Vo(){return Vo=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},Vo.apply(null,arguments)}function Kw(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=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(o){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 Jw={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 Kl(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Zw=/[A-Z]|^ms/g,Xw=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Jl=function(t){return t.charCodeAt(1)===45},Zl=function(t){return t!=null&&typeof t!="boolean"},Go=Kl(function(e){return Jl(e)?e:e.replace(Zw,"-$&").toLowerCase()}),Xl=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Xw,function(n,o,s){return Xe={name:o,styles:s,next:Xe},o})}return Jw[t]!==1&&!Jl(t)&&typeof r=="number"&&r!==0?r+"px":r};function hr(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 o=r;if(o.anim===1)return Xe={name:o.name,styles:o.styles,next:Xe},o.name;var s=r;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)Xe={name:i.name,styles:i.styles,next:Xe},i=i.next;var a=s.styles+";";return a}return Qw(e,t,r)}case"function":{if(e!==void 0){var c=Xe,u=r(e);return Xe=c,hr(e,t,u)}break}}var f=r;if(t==null)return f;var d=t[f];return d!==void 0?d:f}function Qw(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=hr(e,t,r[o])+";";else for(var s in r){var i=r[s];if(typeof i!="object"){var a=i;t!=null&&t[a]!==void 0?n+=s+"{"+t[a]+"}":Zl(a)&&(n+=Go(s)+":"+Xl(s,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var c=0;c<i.length;c++)Zl(i[c])&&(n+=Go(s)+":"+Xl(s,i[c])+";");else{var u=hr(e,t,i);switch(s){case"animation":case"animationName":{n+=Go(s)+":"+u+";";break}default:n+=s+"{"+u+"}"}}}return n}var Ql=/label:\s*([^\s;{]+)\s*(;|$)/g,Xe;function Rl(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,o="";Xe=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,o+=hr(r,t,s);else{var i=s;o+=i[0]}for(var a=1;a<e.length;a++)if(o+=hr(r,t,e[a]),n){var c=s;o+=c[a]}Ql.lastIndex=0;for(var u="",f;(f=Ql.exec(o))!==null;)u+="-"+f[1];var d=Kw(o)+u;return{name:d,styles:o,next:Xe}}var Rw=function(t){return t()},eC=$e.useInsertionEffect?$e.useInsertionEffect:!1,tC=eC||Rw,rC=!0;function nC(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var ec=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||rC===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},oC=function(t,r,n){ec(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var s=r;do t.insert(r===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}},sC=/^((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)-.*))$/,iC=Kl(function(e){return sC.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),aC=iC,lC=function(t){return t!=="theme"},tc=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?aC:lC},rc=function(t,r,n){var o;if(r){var s=r.shouldForwardProp;o=t.__emotion_forwardProp&&s?function(i){return t.__emotion_forwardProp(i)&&s(i)}:s}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},cC=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return ec(r,n,o),tC(function(){return oC(r,n,o)}),null},uC=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,s,i;r!==void 0&&(s=r.label,i=r.target);var a=rc(t,r,n),c=a||tc(o),u=!c("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,b=1;b<y;b++)d.push(f[b],p[b])}var h=ps.withEmotionCache(function(S,C,k){var O=u&&S.as||o,A="",_=[],P=S;if(S.theme==null){P={};for(var L in S)P[L]=S[L];P.theme=$e.useContext(ps.ThemeContext)}typeof S.className=="string"?A=nC(C.registered,_,S.className):S.className!=null&&(A=S.className+" ");var W=Rl(d.concat(_),C.registered,P);A+=C.key+"-"+W.name,i!==void 0&&(A+=" "+i);var Z=u&&a===void 0?tc(O):c,m={};for(var $ in S)u&&$==="as"||Z($)&&(m[$]=S[$]);return m.className=A,k&&(m.ref=k),$e.createElement($e.Fragment,null,$e.createElement(cC,{cache:C,serialized:W,isStringTag:typeof O=="string"}),$e.createElement(O,m))});return h.displayName=s!==void 0?s:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=o,h.__emotion_styles=d,h.__emotion_forwardProp=a,Object.defineProperty(h,"toString",{value:function(){return"."+i}}),h.withComponent=function(S,C){var k=e(S,Vo({},r,C,{shouldForwardProp:rc(h,C,!0)}));return k.apply(void 0,d)},h}},fC=["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"],Wo=uC.bind(null);fC.forEach(function(e){Wo[e]=Wo(e)});/**
144
+ `)),()=>{})}function Vo(e){return pr(e,"spacing",8,"spacing")}function hr(e,t){return typeof t=="string"||t==null?t:e(t)}function pw(e,t){return r=>e.reduce((n,o)=>(n[o]=hr(t,r),n),{})}function hw(e,t,r,n){if(!t.includes(r))return null;const o=fw(r),s=pw(o,n),i=e[r];return st(e,i,s)}function ql(e,t){const r=Vo(e.theme);return Object.keys(e).map(n=>hw(e,t,n,r)).reduce(dr,{})}function ge(e){return ql(e,un)}ge.propTypes=process.env.NODE_ENV!=="production"?un.reduce((e,t)=>(e[t]=ht,e),{}):{},ge.filterProps=un;function me(e){return ql(e,fn)}me.propTypes=process.env.NODE_ENV!=="production"?fn.reduce((e,t)=>(e[t]=ht,e),{}):{},me.filterProps=fn,process.env.NODE_ENV!=="production"&&dw.reduce((e,t)=>(e[t]=ht,e),{});function dn(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(s=>{n[s]=o}),n),{}),r=n=>Object.keys(n).reduce((o,s)=>t[s]?dr(o,t[s](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function Ve(e){return typeof e!="number"?e:`${e}px solid`}function Ge(e,t){return ve({prop:e,themeKey:"borders",transform:t})}const gw=Ge("border",Ve),mw=Ge("borderTop",Ve),yw=Ge("borderRight",Ve),bw=Ge("borderBottom",Ve),vw=Ge("borderLeft",Ve),Tw=Ge("borderColor"),Sw=Ge("borderTopColor"),_w=Ge("borderRightColor"),ww=Ge("borderBottomColor"),Cw=Ge("borderLeftColor"),Ew=Ge("outline",Ve),xw=Ge("outlineColor"),pn=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=pr(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:hr(t,n)});return st(e,e.borderRadius,r)}return null};pn.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:ht}:{},pn.filterProps=["borderRadius"],dn(gw,mw,yw,bw,vw,Tw,Sw,_w,ww,Cw,pn,Ew,xw);const hn=e=>{if(e.gap!==void 0&&e.gap!==null){const t=pr(e.theme,"spacing",8,"gap"),r=n=>({gap:hr(t,n)});return st(e,e.gap,r)}return null};hn.propTypes=process.env.NODE_ENV!=="production"?{gap:ht}:{},hn.filterProps=["gap"];const gn=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=pr(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:hr(t,n)});return st(e,e.columnGap,r)}return null};gn.propTypes=process.env.NODE_ENV!=="production"?{columnGap:ht}:{},gn.filterProps=["columnGap"];const mn=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=pr(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:hr(t,n)});return st(e,e.rowGap,r)}return null};mn.propTypes=process.env.NODE_ENV!=="production"?{rowGap:ht}:{},mn.filterProps=["rowGap"];const Aw=ve({prop:"gridColumn"}),Ow=ve({prop:"gridRow"}),$w=ve({prop:"gridAutoFlow"}),Pw=ve({prop:"gridAutoColumns"}),Iw=ve({prop:"gridAutoRows"}),kw=ve({prop:"gridTemplateColumns"}),Mw=ve({prop:"gridTemplateRows"}),Dw=ve({prop:"gridTemplateAreas"}),Fw=ve({prop:"gridArea"});dn(hn,gn,mn,Aw,Ow,$w,Pw,Iw,kw,Mw,Dw,Fw);function zt(e,t){return t==="grey"?t:e}const Nw=ve({prop:"color",themeKey:"palette",transform:zt}),Lw=ve({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:zt}),jw=ve({prop:"backgroundColor",themeKey:"palette",transform:zt});dn(Nw,Lw,jw);function Be(e){return e<=1&&e!==0?`${e*100}%`:e}const zw=ve({prop:"width",transform:Be}),Go=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var o,s,i,a,u;const n=((i=(s=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:s.values)==null?void 0:i[r])||an[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:Be(r)}};return st(e,e.maxWidth,t)}return null};Go.filterProps=["maxWidth"];const Bw=ve({prop:"minWidth",transform:Be}),Uw=ve({prop:"height",transform:Be}),Vw=ve({prop:"maxHeight",transform:Be}),Gw=ve({prop:"minHeight",transform:Be});ve({prop:"size",cssProperty:"width",transform:Be}),ve({prop:"size",cssProperty:"height",transform:Be});const Ww=ve({prop:"boxSizing"});dn(zw,Go,Bw,Uw,Vw,Gw,Ww);const yn={border:{themeKey:"borders",transform:Ve},borderTop:{themeKey:"borders",transform:Ve},borderRight:{themeKey:"borders",transform:Ve},borderBottom:{themeKey:"borders",transform:Ve},borderLeft:{themeKey:"borders",transform:Ve},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ve},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:pn},color:{themeKey:"palette",transform:zt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:zt},backgroundColor:{themeKey:"palette",transform:zt},p:{style:me},pt:{style:me},pr:{style:me},pb:{style:me},pl:{style:me},px:{style:me},py:{style:me},padding:{style:me},paddingTop:{style:me},paddingRight:{style:me},paddingBottom:{style:me},paddingLeft:{style:me},paddingX:{style:me},paddingY:{style:me},paddingInline:{style:me},paddingInlineStart:{style:me},paddingInlineEnd:{style:me},paddingBlock:{style:me},paddingBlockStart:{style:me},paddingBlockEnd:{style:me},m:{style:ge},mt:{style:ge},mr:{style:ge},mb:{style:ge},ml:{style:ge},mx:{style:ge},my:{style:ge},margin:{style:ge},marginTop:{style:ge},marginRight:{style:ge},marginBottom:{style:ge},marginLeft:{style:ge},marginX:{style:ge},marginY:{style:ge},marginInline:{style:ge},marginInlineStart:{style:ge},marginInlineEnd:{style:ge},marginBlock:{style:ge},marginBlockStart:{style:ge},marginBlockEnd:{style:ge},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:hn},rowGap:{style:mn},columnGap:{style:gn},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Be},maxWidth:{style:Go},minWidth:{transform:Be},height:{transform:Be},maxHeight:{transform:Be},minHeight:{transform:Be},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 Hw(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Yw(e,t){return typeof e=="function"?e(t):e}function qw(){function e(r,n,o,s){const i={[r]:n,theme:o},a=s[r];if(!a)return{[r]:n};const{cssProperty:u=r,themeKey:c,transform:d,style:f}=a;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const p=ln(o,c)||{};return f?f(i):st(i,n,b=>{let h=cn(p,d,b);return b===h&&typeof b=="string"&&(h=cn(p,d,`${r}${b==="default"?"":Et(b)}`,b)),u===!1?h:{[u]:h}})}function t(r){const{sx:n,theme:o={}}=r||{};if(!n)return null;const s=o.unstable_sxConfig??yn;function i(a){let u=a;if(typeof a=="function")u=a(o);else if(typeof a!="object")return a;if(!u)return null;const c=iw(o.breakpoints),d=Object.keys(c);let f=c;return Object.keys(u).forEach(p=>{const y=Yw(u[p],o);if(y!=null)if(typeof y=="object")if(s[p])f=dr(f,e(p,y,o,s));else{const b=st({theme:o},y,h=>({[p]:h}));Hw(b,y)?f[p]=t({sx:y,theme:o}):f=dr(f,b)}else f=dr(f,e(p,y,o,s))}),tw(o,aw(d,f))}return Array.isArray(n)?n.map(i):i(n)}return t}const Bt=qw();Bt.filterProps=["sx"];function Wo(){return Wo=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},Wo.apply(null,arguments)}function Kw(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=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(o){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 Jw={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 Kl(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Zw=/[A-Z]|^ms/g,Xw=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Jl=function(t){return t.charCodeAt(1)===45},Zl=function(t){return t!=null&&typeof t!="boolean"},Ho=Kl(function(e){return Jl(e)?e:e.replace(Zw,"-$&").toLowerCase()}),Xl=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Xw,function(n,o,s){return Xe={name:o,styles:s,next:Xe},o})}return Jw[t]!==1&&!Jl(t)&&typeof r=="number"&&r!==0?r+"px":r};function gr(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 o=r;if(o.anim===1)return Xe={name:o.name,styles:o.styles,next:Xe},o.name;var s=r;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)Xe={name:i.name,styles:i.styles,next:Xe},i=i.next;var a=s.styles+";";return a}return Qw(e,t,r)}case"function":{if(e!==void 0){var u=Xe,c=r(e);return Xe=u,gr(e,t,c)}break}}var d=r;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function Qw(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=gr(e,t,r[o])+";";else for(var s in r){var i=r[s];if(typeof i!="object"){var a=i;t!=null&&t[a]!==void 0?n+=s+"{"+t[a]+"}":Zl(a)&&(n+=Ho(s)+":"+Xl(s,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var u=0;u<i.length;u++)Zl(i[u])&&(n+=Ho(s)+":"+Xl(s,i[u])+";");else{var c=gr(e,t,i);switch(s){case"animation":case"animationName":{n+=Ho(s)+":"+c+";";break}default:n+=s+"{"+c+"}"}}}return n}var Ql=/label:\s*([^\s;{]+)\s*(;|$)/g,Xe;function Rl(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,o="";Xe=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,o+=gr(r,t,s);else{var i=s;o+=i[0]}for(var a=1;a<e.length;a++)if(o+=gr(r,t,e[a]),n){var u=s;o+=u[a]}Ql.lastIndex=0;for(var c="",d;(d=Ql.exec(o))!==null;)c+="-"+d[1];var f=Kw(o)+c;return{name:f,styles:o,next:Xe}}var Rw=function(t){return t()},eC=$e.useInsertionEffect?$e.useInsertionEffect:!1,tC=eC||Rw,rC=!0;function nC(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var ec=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||rC===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},oC=function(t,r,n){ec(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var s=r;do t.insert(r===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}},sC=/^((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)-.*))$/,iC=Kl(function(e){return sC.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),aC=iC,lC=function(t){return t!=="theme"},tc=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?aC:lC},rc=function(t,r,n){var o;if(r){var s=r.shouldForwardProp;o=t.__emotion_forwardProp&&s?function(i){return t.__emotion_forwardProp(i)&&s(i)}:s}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},cC=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return ec(r,n,o),tC(function(){return oC(r,n,o)}),null},uC=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,s,i;r!==void 0&&(s=r.label,i=r.target);var a=rc(t,r,n),u=a||tc(o),c=!u("as");return function(){var d=arguments,f=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&f.push("label:"+s+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var y=d.length,b=1;b<y;b++)f.push(d[b],p[b])}var h=hs.withEmotionCache(function(S,x,D){var A=c&&S.as||o,_="",w=[],P=S;if(S.theme==null){P={};for(var F in S)P[F]=S[F];P.theme=$e.useContext(hs.ThemeContext)}typeof S.className=="string"?_=nC(x.registered,w,S.className):S.className!=null&&(_=S.className+" ");var G=Rl(f.concat(w),x.registered,P);_+=x.key+"-"+G.name,i!==void 0&&(_+=" "+i);var j=c&&a===void 0?tc(A):u,m={};for(var O in S)c&&O==="as"||j(O)&&(m[O]=S[O]);return m.className=_,D&&(m.ref=D),$e.createElement($e.Fragment,null,$e.createElement(cC,{cache:x,serialized:G,isStringTag:typeof A=="string"}),$e.createElement(A,m))});return h.displayName=s!==void 0?s:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=o,h.__emotion_styles=f,h.__emotion_forwardProp=a,Object.defineProperty(h,"toString",{value:function(){return"."+i}}),h.withComponent=function(S,x){var D=e(S,Wo({},r,x,{shouldForwardProp:rc(h,x,!0)}));return D.apply(void 0,f)},h}},fC=["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"],Yo=uC.bind(null);fC.forEach(function(e){Yo[e]=Yo(e)});/**
145
145
  * @mui/styled-engine v6.4.2
146
146
  *
147
147
  * @license MIT
148
148
  * This source code is licensed under the MIT license found in the
149
149
  * LICENSE file in the root directory of this source tree.
150
- */function dC(e,t){const r=Wo(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
151
- `)):n.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}function pC(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const nc=[];function oc(e){return nc[0]=e,Rl(nc)}const hC=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function gC(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...o}=e,s=hC(t),i=Object.keys(s);function a(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-n/100}${r})`}function u(p,y){const b=i.indexOf(y);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r}) and (max-width:${(b!==-1&&typeof t[i[b]]=="number"?t[i[b]]:y)-n/100}${r})`}function f(p){return i.indexOf(p)+1<i.length?u(p,i[i.indexOf(p)+1]):a(p)}function d(p){const y=i.indexOf(p);return y===0?a(i[1]):y===i.length-1?c(i[y]):u(p,i[i.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:i,values:s,up:a,down:c,between:u,only:f,not:d,unit:r,...o}}const mC={borderRadius:4};function sc(e=8,t=Bo({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(s=>{const i=t(s);return typeof i=="number"?`${i}px`:i}).join(" "));return r.mui=!0,r}function yC(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let o=r.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return r.palette.mode===e?t:{}}function ic(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={},...i}=e,a=gC(r),c=sc(o);let u=ze({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:c,shape:{...mC,...s}},i);return u=ow(u),u.applyStyles=yC,u=t.reduce((f,d)=>ze(f,d),u),u.unstable_sxConfig={...mn,...i==null?void 0:i.unstable_sxConfig},u.unstable_sx=function(d){return zt({sx:d,theme:this})},u}function ac(e){const{variants:t,...r}=e,n={variants:t,style:oc(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=oc(o.style))}),n}const bC=ic();function Ho(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function vC(e){return e?(t,r)=>r[e]:null}function TC(e,t,r){e.theme=CC(e.theme)?r:e.theme[t]||e.theme}function yn(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>yn(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:o,...s}=r;n=s}return lc(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function lc(e,t,r=[]){var o;let n;e:for(let s=0;s<t.length;s+=1){const i=t[s];if(typeof i.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!i.props(n))continue}else for(const a in i.props)if(e[a]!==i.props[a]&&((o=e.ownerState)==null?void 0:o[a])!==i.props[a])continue e;typeof i.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(i.style(n))):r.push(i.style)}return r}function SC(e={}){const{themeId:t,defaultTheme:r=bC,rootShouldForwardProp:n=Ho,slotShouldForwardProp:o=Ho}=e;function s(a){TC(a,t,r)}return(a,c={})=>{pC(a,_=>_.filter(P=>P!==zt));const{name:u,slot:f,skipVariantsResolver:d,skipSx:p,overridesResolver:y=vC(cc(f)),...b}=c,h=d!==void 0?d:f&&f!=="Root"&&f!=="root"||!1,S=p||!1;let C=Ho;f==="Root"||f==="root"?C=n:f?C=o:EC(a)&&(C=void 0);const k=dC(a,{shouldForwardProp:C,label:wC(u,f),...b}),O=_=>{if(typeof _=="function"&&_.__emotion_real!==_)return function(L){return yn(L,_)};if(ot(_)){const P=ac(_);return P.variants?function(W){return yn(W,P)}:P.style}return _},A=(..._)=>{const P=[],L=_.map(O),W=[];if(P.push(s),u&&y&&W.push(function(N){var de,ge;const Q=(ge=(de=N.theme.components)==null?void 0:de[u])==null?void 0:ge.styleOverrides;if(!Q)return null;const fe={};for(const Ce in Q)fe[Ce]=yn(N,Q[Ce]);return y(N,fe)}),u&&!h&&W.push(function(N){var fe,de;const K=N.theme,Q=(de=(fe=K==null?void 0:K.components)==null?void 0:fe[u])==null?void 0:de.variants;return Q?lc(N,Q):null}),S||W.push(zt),Array.isArray(L[0])){const $=L.shift(),N=new Array(P.length).fill(""),K=new Array(W.length).fill("");let Q;Q=[...N,...$,...K],Q.raw=[...N,...$.raw,...K],P.unshift(Q)}const Z=[...P,...L,...W],m=k(...Z);return a.muiName&&(m.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(m.displayName=_C(u,f,a)),m};return k.withConfig&&(A.withConfig=k.withConfig),A}}function _C(e,t,r){return e?`${e}${Ct(t||"")}`:`Styled(${K_(r)})`}function wC(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${cc(t||"Root")}`),r}function CC(e){for(const t in e)return!1;return!0}function EC(e){return typeof e=="string"&&e.charCodeAt(0)>96}function cc(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Yo(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),R_(e,t,r)}function xC(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),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.`),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function gt(e){if(e.type)return e;if(e.charAt(0)==="#")return gt(xC(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
150
+ */function dC(e,t){const r=Yo(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
151
+ `)):n.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}function pC(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const nc=[];function oc(e){return nc[0]=e,Rl(nc)}const hC=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function gC(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...o}=e,s=hC(t),i=Object.keys(s);function a(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r})`}function u(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-n/100}${r})`}function c(p,y){const b=i.indexOf(y);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${r}) and (max-width:${(b!==-1&&typeof t[i[b]]=="number"?t[i[b]]:y)-n/100}${r})`}function d(p){return i.indexOf(p)+1<i.length?c(p,i[i.indexOf(p)+1]):a(p)}function f(p){const y=i.indexOf(p);return y===0?a(i[1]):y===i.length-1?u(i[y]):c(p,i[i.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:i,values:s,up:a,down:u,between:c,only:d,not:f,unit:r,...o}}const mC={borderRadius:4};function sc(e=8,t=Vo({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(s=>{const i=t(s);return typeof i=="number"?`${i}px`:i}).join(" "));return r.mui=!0,r}function yC(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let o=r.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return r.palette.mode===e?t:{}}function ic(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={},...i}=e,a=gC(r),u=sc(o);let c=ze({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:u,shape:{...mC,...s}},i);return c=ow(c),c.applyStyles=yC,c=t.reduce((d,f)=>ze(d,f),c),c.unstable_sxConfig={...yn,...i==null?void 0:i.unstable_sxConfig},c.unstable_sx=function(f){return Bt({sx:f,theme:this})},c}function ac(e){const{variants:t,...r}=e,n={variants:t,style:oc(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=oc(o.style))}),n}const bC=ic();function qo(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function vC(e){return e?(t,r)=>r[e]:null}function TC(e,t,r){e.theme=CC(e.theme)?r:e.theme[t]||e.theme}function bn(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>bn(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:o,...s}=r;n=s}return lc(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function lc(e,t,r=[]){var o;let n;e:for(let s=0;s<t.length;s+=1){const i=t[s];if(typeof i.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!i.props(n))continue}else for(const a in i.props)if(e[a]!==i.props[a]&&((o=e.ownerState)==null?void 0:o[a])!==i.props[a])continue e;typeof i.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(i.style(n))):r.push(i.style)}return r}function SC(e={}){const{themeId:t,defaultTheme:r=bC,rootShouldForwardProp:n=qo,slotShouldForwardProp:o=qo}=e;function s(a){TC(a,t,r)}return(a,u={})=>{pC(a,w=>w.filter(P=>P!==Bt));const{name:c,slot:d,skipVariantsResolver:f,skipSx:p,overridesResolver:y=vC(cc(d)),...b}=u,h=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,S=p||!1;let x=qo;d==="Root"||d==="root"?x=n:d?x=o:EC(a)&&(x=void 0);const D=dC(a,{shouldForwardProp:x,label:wC(c,d),...b}),A=w=>{if(typeof w=="function"&&w.__emotion_real!==w)return function(F){return bn(F,w)};if(ot(w)){const P=ac(w);return P.variants?function(G){return bn(G,P)}:P.style}return w},_=(...w)=>{const P=[],F=w.map(A),G=[];if(P.push(s),c&&y&&G.push(function(z){var se,ye;const ee=(ye=(se=z.theme.components)==null?void 0:se[c])==null?void 0:ye.styleOverrides;if(!ee)return null;const fe={};for(const _e in ee)fe[_e]=bn(z,ee[_e]);return y(z,fe)}),c&&!h&&G.push(function(z){var fe,se;const q=z.theme,ee=(se=(fe=q==null?void 0:q.components)==null?void 0:fe[c])==null?void 0:se.variants;return ee?lc(z,ee):null}),S||G.push(Bt),Array.isArray(F[0])){const O=F.shift(),z=new Array(P.length).fill(""),q=new Array(G.length).fill("");let ee;ee=[...z,...O,...q],ee.raw=[...z,...O.raw,...q],P.unshift(ee)}const j=[...P,...F,...G],m=D(...j);return a.muiName&&(m.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(m.displayName=_C(c,d,a)),m};return D.withConfig&&(_.withConfig=D.withConfig),_}}function _C(e,t,r){return e?`${e}${Et(t||"")}`:`Styled(${K_(r)})`}function wC(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${cc(t||"Root")}`),r}function CC(e){for(const t in e)return!1;return!0}function EC(e){return typeof e=="string"&&e.charCodeAt(0)>96}function cc(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Ko(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),R_(e,t,r)}function xC(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),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.`),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function gt(e){if(e.type)return e;if(e.charAt(0)==="#")return gt(xC(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
152
152
  The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:pt(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
153
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:pt(10,o))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:o}}const AC=e=>{const t=gt(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},gr=(e,t)=>{try{return AC(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function bn(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((o,s)=>s<3?parseInt(o,10):o):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function uc(e){e=gt(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,s=n*Math.min(o,1-o),i=(u,f=(u+r/30)%12)=>o-s*Math.max(Math.min(f-3,9-f,1),-1);let a="rgb";const c=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(a+="a",c.push(t[3])),bn({type:a,values:c})}function qo(e){e=gt(e);let t=e.type==="hsl"||e.type==="hsla"?gt(uc(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function fc(e,t){const r=qo(e),n=qo(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function OC(e,t){return e=gt(e),t=Yo(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,bn(e)}function vn(e,t,r){try{return OC(e,t)}catch{return e}}function Ko(e,t){if(e=gt(e),t=Yo(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return bn(e)}function ae(e,t,r){try{return Ko(e,t)}catch{return e}}function Jo(e,t){if(e=gt(e),t=Yo(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return bn(e)}function le(e,t,r){try{return Jo(e,t)}catch{return e}}function $C(e,t=.15){return qo(e)>.5?Ko(e,t):Jo(e,t)}function Tn(e,t,r){try{return $C(e,t)}catch{return e}}const PC=$e.createContext(void 0);process.env.NODE_ENV!=="production"&&(te.node,te.object);function IC(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?jo(o.defaultProps,n):!o.styleOverrides&&!o.variants?jo(o,n):n}function kC({props:e,name:t}){const r=$e.useContext(PC);return IC({props:e,name:t,theme:{components:r}})}const dc={theme:void 0};function DC(e){let t,r;return function(o){let s=t;return(s===void 0||o.theme!==r)&&(dc.theme=o.theme,s=ac(e(dc)),t=s,r=o.theme),s}}function MC(e=""){function t(...n){if(!n.length)return"";const o=n[0];return typeof o=="string"&&!o.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}-`:""}${o}${t(...n.slice(1))})`:`, ${o}`}return(n,...o)=>`var(--${e?`${e}-`:""}${n}${t(...o)})`}const pc=(e,t,r,n=[])=>{let o=e;t.forEach((s,i)=>{i===t.length-1?Array.isArray(o)?o[Number(s)]=r:o&&typeof o=="object"&&(o[s]=r):o&&typeof o=="object"&&(o[s]||(o[s]=n.includes(s)?[]:{}),o=o[s])})},FC=(e,t,r)=>{function n(o,s=[],i=[]){Object.entries(o).forEach(([a,c])=>{(!r||!r([...s,a]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?n(c,[...s,a],Array.isArray(c)?[...i,a]:i):t([...s,a],c,i))})}n(e)},NC=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Zo(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},s={},i={};return FC(e,(a,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!n||!n(a,c))){const f=`--${r?`${r}-`:""}${a.join("-")}`,d=NC(a,c);Object.assign(o,{[f]:d}),pc(s,a,`var(${f})`,u),pc(i,a,`var(${f}, ${d})`,u)}},a=>a[0]==="vars"),{css:o,vars:s,varsWithDefaults:i}}function LC(e,t={}){const{getSelector:r=S,disableCssColorScheme:n,colorSchemeSelector:o}=t,{colorSchemes:s={},components:i,defaultColorScheme:a="light",...c}=e,{vars:u,css:f,varsWithDefaults:d}=Zo(c,t);let p=d;const y={},{[a]:b,...h}=s;if(Object.entries(h||{}).forEach(([O,A])=>{const{vars:_,css:P,varsWithDefaults:L}=Zo(A,t);p=ze(p,L),y[O]={css:P,vars:_}}),b){const{css:O,vars:A,varsWithDefaults:_}=Zo(b,t);p=ze(p,_),y[a]={css:O,vars:A}}function S(O,A){var P,L;let _=o;if(o==="class"&&(_=".%s"),o==="data"&&(_="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(_=`[${o}="%s"]`),O){if(_==="media")return e.defaultColorScheme===O?":root":{[`@media (prefers-color-scheme: ${((L=(P=s[O])==null?void 0:P.palette)==null?void 0:L.mode)||O})`]:{":root":A}};if(_)return e.defaultColorScheme===O?`:root, ${_.replace("%s",String(O))}`:_.replace("%s",String(O))}return":root"}return{vars:p,generateThemeVars:()=>{let O={...u};return Object.entries(y).forEach(([,{vars:A}])=>{O=ze(O,A)}),O},generateStyleSheets:()=>{var W,Z;const O=[],A=e.defaultColorScheme||"light";function _(m,$){Object.keys($).length&&O.push(typeof m=="string"?{[m]:{...$}}:m)}_(r(void 0,{...f}),f);const{[A]:P,...L}=y;if(P){const{css:m}=P,$=(Z=(W=s[A])==null?void 0:W.palette)==null?void 0:Z.mode,N=!n&&$?{colorScheme:$,...m}:{...m};_(r(A,{...N}),N)}return Object.entries(L).forEach(([m,{css:$}])=>{var Q,fe;const N=(fe=(Q=s[m])==null?void 0:Q.palette)==null?void 0:fe.mode,K=!n&&N?{colorScheme:N,...$}:{...$};_(r(m,{...K}),K)}),O}}}function jC(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const mr={black:"#000",white:"#fff"},zC={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"},Bt={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"},Ut={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"},yr={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"},Vt={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"},Gt={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"},Wt={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 hc(){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:mr.white,default:mr.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 BC=hc();function gc(){return{text:{primary:mr.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:mr.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 mc=gc();function yc(e,t,r,n){const o=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Jo(e.main,o):t==="dark"&&(e.dark=Ko(e.main,s)))}function UC(e="light"){return e==="dark"?{main:Vt[200],light:Vt[50],dark:Vt[400]}:{main:Vt[700],light:Vt[400],dark:Vt[800]}}function VC(e="light"){return e==="dark"?{main:Bt[200],light:Bt[50],dark:Bt[400]}:{main:Bt[500],light:Bt[300],dark:Bt[700]}}function GC(e="light"){return e==="dark"?{main:Ut[500],light:Ut[300],dark:Ut[700]}:{main:Ut[700],light:Ut[400],dark:Ut[800]}}function WC(e="light"){return e==="dark"?{main:Gt[400],light:Gt[300],dark:Gt[700]}:{main:Gt[700],light:Gt[500],dark:Gt[900]}}function HC(e="light"){return e==="dark"?{main:Wt[400],light:Wt[300],dark:Wt[700]}:{main:Wt[800],light:Wt[500],dark:Wt[900]}}function YC(e="light"){return e==="dark"?{main:yr[400],light:yr[300],dark:yr[700]}:{main:"#ed6c02",light:yr[500],dark:yr[900]}}function Xo(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...o}=e,s=e.primary||UC(t),i=e.secondary||VC(t),a=e.error||GC(t),c=e.info||WC(t),u=e.success||HC(t),f=e.warning||YC(t);function d(h){const S=fc(h,mc.text.primary)>=r?mc.text.primary:BC.text.primary;if(process.env.NODE_ENV!=="production"){const C=fc(h,S);C<3&&console.error([`MUI: The contrast ratio of ${C}:1 for ${S} 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(`
154
- `))}return S}const p=({color:h,name:S,mainShade:C=500,lightShade:k=300,darkShade:O=700})=>{if(h={...h},!h.main&&h[C]&&(h.main=h[C]),!h.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
155
- The color object needs to have a \`main\` property or a \`${C}\` property.`:pt(11,S?` (${S})`:"",C));if(typeof h.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
153
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:pt(10,o))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:o}}const AC=e=>{const t=gt(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},mr=(e,t)=>{try{return AC(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function vn(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((o,s)=>s<3?parseInt(o,10):o):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function uc(e){e=gt(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,s=n*Math.min(o,1-o),i=(c,d=(c+r/30)%12)=>o-s*Math.max(Math.min(d-3,9-d,1),-1);let a="rgb";const u=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(a+="a",u.push(t[3])),vn({type:a,values:u})}function Jo(e){e=gt(e);let t=e.type==="hsl"||e.type==="hsla"?gt(uc(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function fc(e,t){const r=Jo(e),n=Jo(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function OC(e,t){return e=gt(e),t=Ko(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,vn(e)}function Tn(e,t,r){try{return OC(e,t)}catch{return e}}function Zo(e,t){if(e=gt(e),t=Ko(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return vn(e)}function le(e,t,r){try{return Zo(e,t)}catch{return e}}function Xo(e,t){if(e=gt(e),t=Ko(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return vn(e)}function ce(e,t,r){try{return Xo(e,t)}catch{return e}}function $C(e,t=.15){return Jo(e)>.5?Zo(e,t):Xo(e,t)}function Sn(e,t,r){try{return $C(e,t)}catch{return e}}const PC=$e.createContext(void 0);process.env.NODE_ENV!=="production"&&(re.node,re.object);function IC(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?Bo(o.defaultProps,n):!o.styleOverrides&&!o.variants?Bo(o,n):n}function kC({props:e,name:t}){const r=$e.useContext(PC);return IC({props:e,name:t,theme:{components:r}})}const dc={theme:void 0};function MC(e){let t,r;return function(o){let s=t;return(s===void 0||o.theme!==r)&&(dc.theme=o.theme,s=ac(e(dc)),t=s,r=o.theme),s}}function DC(e=""){function t(...n){if(!n.length)return"";const o=n[0];return typeof o=="string"&&!o.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}-`:""}${o}${t(...n.slice(1))})`:`, ${o}`}return(n,...o)=>`var(--${e?`${e}-`:""}${n}${t(...o)})`}const pc=(e,t,r,n=[])=>{let o=e;t.forEach((s,i)=>{i===t.length-1?Array.isArray(o)?o[Number(s)]=r:o&&typeof o=="object"&&(o[s]=r):o&&typeof o=="object"&&(o[s]||(o[s]=n.includes(s)?[]:{}),o=o[s])})},FC=(e,t,r)=>{function n(o,s=[],i=[]){Object.entries(o).forEach(([a,u])=>{(!r||r&&!r([...s,a]))&&u!=null&&(typeof u=="object"&&Object.keys(u).length>0?n(u,[...s,a],Array.isArray(u)?[...i,a]:i):t([...s,a],u,i))})}n(e)},NC=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Qo(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},s={},i={};return FC(e,(a,u,c)=>{if((typeof u=="string"||typeof u=="number")&&(!n||!n(a,u))){const d=`--${r?`${r}-`:""}${a.join("-")}`,f=NC(a,u);Object.assign(o,{[d]:f}),pc(s,a,`var(${d})`,c),pc(i,a,`var(${d}, ${f})`,c)}},a=>a[0]==="vars"),{css:o,vars:s,varsWithDefaults:i}}function LC(e,t={}){const{getSelector:r=S,disableCssColorScheme:n,colorSchemeSelector:o}=t,{colorSchemes:s={},components:i,defaultColorScheme:a="light",...u}=e,{vars:c,css:d,varsWithDefaults:f}=Qo(u,t);let p=f;const y={},{[a]:b,...h}=s;if(Object.entries(h||{}).forEach(([A,_])=>{const{vars:w,css:P,varsWithDefaults:F}=Qo(_,t);p=ze(p,F),y[A]={css:P,vars:w}}),b){const{css:A,vars:_,varsWithDefaults:w}=Qo(b,t);p=ze(p,w),y[a]={css:A,vars:_}}function S(A,_){var P,F;let w=o;if(o==="class"&&(w=".%s"),o==="data"&&(w="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(w=`[${o}="%s"]`),A){if(w==="media")return e.defaultColorScheme===A?":root":{[`@media (prefers-color-scheme: ${((F=(P=s[A])==null?void 0:P.palette)==null?void 0:F.mode)||A})`]:{":root":_}};if(w)return e.defaultColorScheme===A?`:root, ${w.replace("%s",String(A))}`:w.replace("%s",String(A))}return":root"}return{vars:p,generateThemeVars:()=>{let A={...c};return Object.entries(y).forEach(([,{vars:_}])=>{A=ze(A,_)}),A},generateStyleSheets:()=>{var G,j;const A=[],_=e.defaultColorScheme||"light";function w(m,O){Object.keys(O).length&&A.push(typeof m=="string"?{[m]:{...O}}:m)}w(r(void 0,{...d}),d);const{[_]:P,...F}=y;if(P){const{css:m}=P,O=(j=(G=s[_])==null?void 0:G.palette)==null?void 0:j.mode,z=!n&&O?{colorScheme:O,...m}:{...m};w(r(_,{...z}),z)}return Object.entries(F).forEach(([m,{css:O}])=>{var ee,fe;const z=(fe=(ee=s[m])==null?void 0:ee.palette)==null?void 0:fe.mode,q=!n&&z?{colorScheme:z,...O}:{...O};w(r(m,{...q}),q)}),A}}}function jC(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const yr={black:"#000",white:"#fff"},zC={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"},Ut={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Vt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},br={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Gt={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Wt={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Ht={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function hc(){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:yr.white,default:yr.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 BC=hc();function gc(){return{text:{primary:yr.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:yr.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 mc=gc();function yc(e,t,r,n){const o=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Xo(e.main,o):t==="dark"&&(e.dark=Zo(e.main,s)))}function UC(e="light"){return e==="dark"?{main:Gt[200],light:Gt[50],dark:Gt[400]}:{main:Gt[700],light:Gt[400],dark:Gt[800]}}function VC(e="light"){return e==="dark"?{main:Ut[200],light:Ut[50],dark:Ut[400]}:{main:Ut[500],light:Ut[300],dark:Ut[700]}}function GC(e="light"){return e==="dark"?{main:Vt[500],light:Vt[300],dark:Vt[700]}:{main:Vt[700],light:Vt[400],dark:Vt[800]}}function WC(e="light"){return e==="dark"?{main:Wt[400],light:Wt[300],dark:Wt[700]}:{main:Wt[700],light:Wt[500],dark:Wt[900]}}function HC(e="light"){return e==="dark"?{main:Ht[400],light:Ht[300],dark:Ht[700]}:{main:Ht[800],light:Ht[500],dark:Ht[900]}}function YC(e="light"){return e==="dark"?{main:br[400],light:br[300],dark:br[700]}:{main:"#ed6c02",light:br[500],dark:br[900]}}function Ro(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...o}=e,s=e.primary||UC(t),i=e.secondary||VC(t),a=e.error||GC(t),u=e.info||WC(t),c=e.success||HC(t),d=e.warning||YC(t);function f(h){const S=fc(h,mc.text.primary)>=r?mc.text.primary:BC.text.primary;if(process.env.NODE_ENV!=="production"){const x=fc(h,S);x<3&&console.error([`MUI: The contrast ratio of ${x}:1 for ${S} 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(`
154
+ `))}return S}const p=({color:h,name:S,mainShade:x=500,lightShade:D=300,darkShade:A=700})=>{if(h={...h},!h.main&&h[x]&&(h.main=h[x]),!h.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
155
+ The color object needs to have a \`main\` property or a \`${x}\` property.`:pt(11,S?` (${S})`:"",x));if(typeof h.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
156
156
  \`color.main\` should be a string, but \`${JSON.stringify(h.main)}\` was provided instead.
157
157
 
158
158
  Did you intend to use one of the following approaches?
@@ -165,15 +165,15 @@ const theme1 = createTheme({ palette: {
165
165
 
166
166
  const theme2 = createTheme({ palette: {
167
167
  primary: { main: green[500] },
168
- } });`:pt(12,S?` (${S})`:"",JSON.stringify(h.main)));return yc(h,"light",k,n),yc(h,"dark",O,n),h.contrastText||(h.contrastText=d(h.main)),h};let y;return t==="light"?y=hc():t==="dark"&&(y=gc()),process.env.NODE_ENV!=="production"&&(y||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),ze({common:{...mr},mode:t,primary:p({color:s,name:"primary"}),secondary:p({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:a,name:"error"}),warning:p({color:f,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:u,name:"success"}),grey:zC,contrastThreshold:r,getContrastText:d,augmentColor:p,tonalOffset:n,...y},o)}function qC(e){const t={};return Object.entries(e).forEach(n=>{const[o,s]=n;typeof s=="object"&&(t[o]=`${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 KC(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function JC(e){return Math.round(e*1e5)/1e5}const bc={textTransform:"uppercase"},vc='"Roboto", "Helvetica", "Arial", sans-serif';function ZC(e,t){const{fontFamily:r=vc,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:i=500,fontWeightBold:a=700,htmlFontSize:c=16,allVariants:u,pxToRem:f,...d}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=n/14,y=f||(S=>`${S/c*p}rem`),b=(S,C,k,O,A)=>({fontFamily:r,fontWeight:S,fontSize:y(C),lineHeight:k,...r===vc?{letterSpacing:`${JC(O/C)}em`}:{},...A,...u}),h={h1:b(o,96,1.167,-1.5),h2:b(o,60,1.2,-.5),h3:b(s,48,1.167,0),h4:b(s,34,1.235,.25),h5:b(s,24,1.334,0),h6:b(i,20,1.6,.15),subtitle1:b(s,16,1.75,.15),subtitle2:b(i,14,1.57,.1),body1:b(s,16,1.5,.15),body2:b(s,14,1.43,.15),button:b(i,14,1.75,.4,bc),caption:b(s,12,1.66,.4),overline:b(s,12,2.66,1,bc),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ze({htmlFontSize:c,pxToRem:y,fontFamily:r,fontSize:n,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:i,fontWeightBold:a,...h},d,{clone:!1})}const XC=.2,QC=.14,RC=.12;function pe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${XC})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${QC})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${RC})`].join(",")}const eE=["none",pe(0,2,1,-1,0,1,1,0,0,1,3,0),pe(0,3,1,-2,0,2,2,0,0,1,5,0),pe(0,3,3,-2,0,3,4,0,0,1,8,0),pe(0,2,4,-1,0,4,5,0,0,1,10,0),pe(0,3,5,-1,0,5,8,0,0,1,14,0),pe(0,3,5,-1,0,6,10,0,0,1,18,0),pe(0,4,5,-2,0,7,10,1,0,2,16,1),pe(0,5,5,-3,0,8,10,1,0,3,14,2),pe(0,5,6,-3,0,9,12,1,0,3,16,2),pe(0,6,6,-3,0,10,14,1,0,4,18,3),pe(0,6,7,-4,0,11,15,1,0,4,20,3),pe(0,7,8,-4,0,12,17,2,0,5,22,4),pe(0,7,8,-4,0,13,19,2,0,5,24,4),pe(0,7,9,-4,0,14,21,2,0,5,26,4),pe(0,8,9,-5,0,15,22,2,0,6,28,5),pe(0,8,10,-5,0,16,24,2,0,6,30,5),pe(0,8,11,-5,0,17,26,2,0,6,32,5),pe(0,9,11,-5,0,18,28,2,0,7,34,6),pe(0,9,12,-6,0,19,29,2,0,7,36,6),pe(0,10,13,-6,0,20,31,3,0,8,38,7),pe(0,10,13,-6,0,21,33,3,0,8,40,7),pe(0,10,14,-6,0,22,35,3,0,8,42,7),pe(0,11,14,-7,0,23,36,3,0,9,44,8),pe(0,11,15,-7,0,24,38,3,0,9,46,8)],tE={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)"},rE={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Tc(e){return`${Math.round(e)}ms`}function nE(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function oE(e){const t={...tE,...e.easing},r={...rE,...e.duration};return{getAutoHeightDuration:nE,create:(o=["all"],s={})=>{const{duration:i=r.standard,easing:a=t.easeInOut,delay:c=0,...u}=s;if(process.env.NODE_ENV!=="production"){const f=p=>typeof p=="string",d=p=>!Number.isNaN(parseFloat(p));!f(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(i)&&!f(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),f(a)||console.error('MUI: Argument "easing" must be a string.'),!d(c)&&!f(c)&&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(`
169
- `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(f=>`${f} ${typeof i=="string"?i:Tc(i)} ${a} ${typeof c=="string"?c:Tc(c)}`).join(",")},...e,easing:t,duration:r}}const sE={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function iE(e){return ot(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Sc(e={}){const t={...e};function r(n){const o=Object.entries(n);for(let s=0;s<o.length;s++){const[i,a]=o[s];!iE(a)||i.startsWith("unstable_")?delete n[i]:ot(a)&&(n[i]={...a},r(n[i]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
168
+ } });`:pt(12,S?` (${S})`:"",JSON.stringify(h.main)));return yc(h,"light",D,n),yc(h,"dark",A,n),h.contrastText||(h.contrastText=f(h.main)),h};let y;return t==="light"?y=hc():t==="dark"&&(y=gc()),process.env.NODE_ENV!=="production"&&(y||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),ze({common:{...yr},mode:t,primary:p({color:s,name:"primary"}),secondary:p({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:a,name:"error"}),warning:p({color:d,name:"warning"}),info:p({color:u,name:"info"}),success:p({color:c,name:"success"}),grey:zC,contrastThreshold:r,getContrastText:f,augmentColor:p,tonalOffset:n,...y},o)}function qC(e){const t={};return Object.entries(e).forEach(n=>{const[o,s]=n;typeof s=="object"&&(t[o]=`${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 KC(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function JC(e){return Math.round(e*1e5)/1e5}const bc={textTransform:"uppercase"},vc='"Roboto", "Helvetica", "Arial", sans-serif';function ZC(e,t){const{fontFamily:r=vc,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:i=500,fontWeightBold:a=700,htmlFontSize:u=16,allVariants:c,pxToRem:d,...f}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="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=n/14,y=d||(S=>`${S/u*p}rem`),b=(S,x,D,A,_)=>({fontFamily:r,fontWeight:S,fontSize:y(x),lineHeight:D,...r===vc?{letterSpacing:`${JC(A/x)}em`}:{},..._,...c}),h={h1:b(o,96,1.167,-1.5),h2:b(o,60,1.2,-.5),h3:b(s,48,1.167,0),h4:b(s,34,1.235,.25),h5:b(s,24,1.334,0),h6:b(i,20,1.6,.15),subtitle1:b(s,16,1.75,.15),subtitle2:b(i,14,1.57,.1),body1:b(s,16,1.5,.15),body2:b(s,14,1.43,.15),button:b(i,14,1.75,.4,bc),caption:b(s,12,1.66,.4),overline:b(s,12,2.66,1,bc),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ze({htmlFontSize:u,pxToRem:y,fontFamily:r,fontSize:n,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:i,fontWeightBold:a,...h},f,{clone:!1})}const XC=.2,QC=.14,RC=.12;function pe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${XC})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${QC})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${RC})`].join(",")}const eE=["none",pe(0,2,1,-1,0,1,1,0,0,1,3,0),pe(0,3,1,-2,0,2,2,0,0,1,5,0),pe(0,3,3,-2,0,3,4,0,0,1,8,0),pe(0,2,4,-1,0,4,5,0,0,1,10,0),pe(0,3,5,-1,0,5,8,0,0,1,14,0),pe(0,3,5,-1,0,6,10,0,0,1,18,0),pe(0,4,5,-2,0,7,10,1,0,2,16,1),pe(0,5,5,-3,0,8,10,1,0,3,14,2),pe(0,5,6,-3,0,9,12,1,0,3,16,2),pe(0,6,6,-3,0,10,14,1,0,4,18,3),pe(0,6,7,-4,0,11,15,1,0,4,20,3),pe(0,7,8,-4,0,12,17,2,0,5,22,4),pe(0,7,8,-4,0,13,19,2,0,5,24,4),pe(0,7,9,-4,0,14,21,2,0,5,26,4),pe(0,8,9,-5,0,15,22,2,0,6,28,5),pe(0,8,10,-5,0,16,24,2,0,6,30,5),pe(0,8,11,-5,0,17,26,2,0,6,32,5),pe(0,9,11,-5,0,18,28,2,0,7,34,6),pe(0,9,12,-6,0,19,29,2,0,7,36,6),pe(0,10,13,-6,0,20,31,3,0,8,38,7),pe(0,10,13,-6,0,21,33,3,0,8,40,7),pe(0,10,14,-6,0,22,35,3,0,8,42,7),pe(0,11,14,-7,0,23,36,3,0,9,44,8),pe(0,11,15,-7,0,24,38,3,0,9,46,8)],tE={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)"},rE={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Tc(e){return`${Math.round(e)}ms`}function nE(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function oE(e){const t={...tE,...e.easing},r={...rE,...e.duration};return{getAutoHeightDuration:nE,create:(o=["all"],s={})=>{const{duration:i=r.standard,easing:a=t.easeInOut,delay:u=0,...c}=s;if(process.env.NODE_ENV!=="production"){const d=p=>typeof p=="string",f=p=>!Number.isNaN(parseFloat(p));!d(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(i)&&!d(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),d(a)||console.error('MUI: Argument "easing" must be a string.'),!f(u)&&!d(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(`
169
+ `)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof i=="string"?i:Tc(i)} ${a} ${typeof u=="string"?u:Tc(u)}`).join(",")},...e,easing:t,duration:r}}const sE={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function iE(e){return ot(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Sc(e={}){const t={...e};function r(n){const o=Object.entries(n);for(let s=0;s<o.length;s++){const[i,a]=o[s];!iE(a)||i.startsWith("unstable_")?delete n[i]:ot(a)&&(n[i]={...a},r(n[i]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
170
170
 
171
171
  const theme = ${JSON.stringify(t,null,2)};
172
172
 
173
173
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
174
174
  theme.transitions = createTransitions(theme.transitions || {});
175
175
 
176
- export default theme;`}function Qo(e={},...t){const{breakpoints:r,mixins:n={},spacing:o,palette:s={},transitions:i={},typography:a={},shape:c,...u}=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.":pt(20));const f=Xo(s),d=ic(e);let p=ze(d,{mixins:KC(d.breakpoints,n),palette:f,shadows:eE.slice(),typography:ZC(f,a),transitions:oE(i),zIndex:{...sE}});if(p=ze(p,u),p=t.reduce((y,b)=>ze(y,b),p),process.env.NODE_ENV!=="production"){const y=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],b=(h,S)=>{let C;for(C in h){const k=h[C];if(y.includes(C)&&Object.keys(k).length>0){if(process.env.NODE_ENV!=="production"){const O=zo("",C);console.error([`MUI: The \`${S}\` component increases the CSS specificity of the \`${C}\` internal state.`,"You can not override it like this: ",JSON.stringify(h,null,2),"",`Instead, you need to use the '&.${O}' syntax:`,JSON.stringify({root:{[`&.${O}`]:k}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
177
- `))}h[C]={}}}};Object.keys(p.components).forEach(h=>{const S=p.components[h].styleOverrides;S&&h.startsWith("Mui")&&b(S,h)})}return p.unstable_sxConfig={...mn,...u==null?void 0:u.unstable_sxConfig},p.unstable_sx=function(b){return zt({sx:b,theme:this})},p.toRuntimeSource=Sc,p}function aE(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 lE=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=aE(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function _c(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function wc(e){return e==="dark"?lE:[]}function cE(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...o}=e,s=Xo(t);return{palette:s,opacity:{..._c(s.mode),...r},overlays:n||wc(s.mode),...o}}function uE(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 fE=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],dE=e=>(t,r)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let s=o;if(o==="class"&&(s=".%s"),o==="data"&&(s="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(s=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return fE(e.cssVarPrefix).forEach(a=>{i[a]=r[a],delete r[a]}),s==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:i}}:s?{[s.replace("%s",t)]:i,[`${n}, ${s.replace("%s",t)}`]:r}:{[n]:{...r,...i}}}if(s&&s!=="media")return`${n}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(s)return s.replace("%s",String(t))}return n};function pE(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function E(e,t,r){!e[t]&&r&&(e[t]=r)}function br(e){return typeof e!="string"||!e.startsWith("hsl")?e:uc(e)}function it(e,t){`${t}Channel`in e||(e[`${t}Channel`]=gr(br(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().
178
- 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 hE(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Qe=e=>{try{return e()}catch{}},gE=(e="mui")=>MC(e);function Ro(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=cE({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:s,...i}=Qo({...r,palette:{mode:o,...t==null?void 0:t.palette}});return e[n]={...t,palette:s,opacity:{..._c(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||wc(o)},i}function mE(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:i=uE,colorSchemeSelector:a=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...u}=e,f=Object.keys(r)[0],d=n||(r.light&&f!=="light"?"light":f),p=gE(s),{[d]:y,light:b,dark:h,...S}=r,C={...S};let k=y;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(k=!0),!k)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:pt(21,d));const O=Ro(C,k,u,d);b&&!C.light&&Ro(C,b,void 0,"light"),h&&!C.dark&&Ro(C,h,void 0,"dark");let A={defaultColorScheme:d,...O,cssVarPrefix:s,colorSchemeSelector:a,rootSelector:c,getCssVar:p,colorSchemes:C,font:{...qC(O.typography),...O.font},spacing:hE(u.spacing)};Object.keys(A.colorSchemes).forEach(Z=>{const m=A.colorSchemes[Z].palette,$=N=>{const K=N.split("-"),Q=K[1],fe=K[2];return p(N,m[Q][fe])};if(m.mode==="light"&&(E(m.common,"background","#fff"),E(m.common,"onBackground","#000")),m.mode==="dark"&&(E(m.common,"background","#000"),E(m.common,"onBackground","#fff")),pE(m,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),m.mode==="light"){E(m.Alert,"errorColor",ae(m.error.light,.6)),E(m.Alert,"infoColor",ae(m.info.light,.6)),E(m.Alert,"successColor",ae(m.success.light,.6)),E(m.Alert,"warningColor",ae(m.warning.light,.6)),E(m.Alert,"errorFilledBg",$("palette-error-main")),E(m.Alert,"infoFilledBg",$("palette-info-main")),E(m.Alert,"successFilledBg",$("palette-success-main")),E(m.Alert,"warningFilledBg",$("palette-warning-main")),E(m.Alert,"errorFilledColor",Qe(()=>m.getContrastText(m.error.main))),E(m.Alert,"infoFilledColor",Qe(()=>m.getContrastText(m.info.main))),E(m.Alert,"successFilledColor",Qe(()=>m.getContrastText(m.success.main))),E(m.Alert,"warningFilledColor",Qe(()=>m.getContrastText(m.warning.main))),E(m.Alert,"errorStandardBg",le(m.error.light,.9)),E(m.Alert,"infoStandardBg",le(m.info.light,.9)),E(m.Alert,"successStandardBg",le(m.success.light,.9)),E(m.Alert,"warningStandardBg",le(m.warning.light,.9)),E(m.Alert,"errorIconColor",$("palette-error-main")),E(m.Alert,"infoIconColor",$("palette-info-main")),E(m.Alert,"successIconColor",$("palette-success-main")),E(m.Alert,"warningIconColor",$("palette-warning-main")),E(m.AppBar,"defaultBg",$("palette-grey-100")),E(m.Avatar,"defaultBg",$("palette-grey-400")),E(m.Button,"inheritContainedBg",$("palette-grey-300")),E(m.Button,"inheritContainedHoverBg",$("palette-grey-A100")),E(m.Chip,"defaultBorder",$("palette-grey-400")),E(m.Chip,"defaultAvatarColor",$("palette-grey-700")),E(m.Chip,"defaultIconColor",$("palette-grey-700")),E(m.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),E(m.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),E(m.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),E(m.LinearProgress,"primaryBg",le(m.primary.main,.62)),E(m.LinearProgress,"secondaryBg",le(m.secondary.main,.62)),E(m.LinearProgress,"errorBg",le(m.error.main,.62)),E(m.LinearProgress,"infoBg",le(m.info.main,.62)),E(m.LinearProgress,"successBg",le(m.success.main,.62)),E(m.LinearProgress,"warningBg",le(m.warning.main,.62)),E(m.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.11)`),E(m.Slider,"primaryTrack",le(m.primary.main,.62)),E(m.Slider,"secondaryTrack",le(m.secondary.main,.62)),E(m.Slider,"errorTrack",le(m.error.main,.62)),E(m.Slider,"infoTrack",le(m.info.main,.62)),E(m.Slider,"successTrack",le(m.success.main,.62)),E(m.Slider,"warningTrack",le(m.warning.main,.62));const N=Tn(m.background.default,.8);E(m.SnackbarContent,"bg",N),E(m.SnackbarContent,"color",Qe(()=>m.getContrastText(N))),E(m.SpeedDialAction,"fabHoverBg",Tn(m.background.paper,.15)),E(m.StepConnector,"border",$("palette-grey-400")),E(m.StepContent,"border",$("palette-grey-400")),E(m.Switch,"defaultColor",$("palette-common-white")),E(m.Switch,"defaultDisabledColor",$("palette-grey-100")),E(m.Switch,"primaryDisabledColor",le(m.primary.main,.62)),E(m.Switch,"secondaryDisabledColor",le(m.secondary.main,.62)),E(m.Switch,"errorDisabledColor",le(m.error.main,.62)),E(m.Switch,"infoDisabledColor",le(m.info.main,.62)),E(m.Switch,"successDisabledColor",le(m.success.main,.62)),E(m.Switch,"warningDisabledColor",le(m.warning.main,.62)),E(m.TableCell,"border",le(vn(m.divider,1),.88)),E(m.Tooltip,"bg",vn(m.grey[700],.92))}if(m.mode==="dark"){E(m.Alert,"errorColor",le(m.error.light,.6)),E(m.Alert,"infoColor",le(m.info.light,.6)),E(m.Alert,"successColor",le(m.success.light,.6)),E(m.Alert,"warningColor",le(m.warning.light,.6)),E(m.Alert,"errorFilledBg",$("palette-error-dark")),E(m.Alert,"infoFilledBg",$("palette-info-dark")),E(m.Alert,"successFilledBg",$("palette-success-dark")),E(m.Alert,"warningFilledBg",$("palette-warning-dark")),E(m.Alert,"errorFilledColor",Qe(()=>m.getContrastText(m.error.dark))),E(m.Alert,"infoFilledColor",Qe(()=>m.getContrastText(m.info.dark))),E(m.Alert,"successFilledColor",Qe(()=>m.getContrastText(m.success.dark))),E(m.Alert,"warningFilledColor",Qe(()=>m.getContrastText(m.warning.dark))),E(m.Alert,"errorStandardBg",ae(m.error.light,.9)),E(m.Alert,"infoStandardBg",ae(m.info.light,.9)),E(m.Alert,"successStandardBg",ae(m.success.light,.9)),E(m.Alert,"warningStandardBg",ae(m.warning.light,.9)),E(m.Alert,"errorIconColor",$("palette-error-main")),E(m.Alert,"infoIconColor",$("palette-info-main")),E(m.Alert,"successIconColor",$("palette-success-main")),E(m.Alert,"warningIconColor",$("palette-warning-main")),E(m.AppBar,"defaultBg",$("palette-grey-900")),E(m.AppBar,"darkBg",$("palette-background-paper")),E(m.AppBar,"darkColor",$("palette-text-primary")),E(m.Avatar,"defaultBg",$("palette-grey-600")),E(m.Button,"inheritContainedBg",$("palette-grey-800")),E(m.Button,"inheritContainedHoverBg",$("palette-grey-700")),E(m.Chip,"defaultBorder",$("palette-grey-700")),E(m.Chip,"defaultAvatarColor",$("palette-grey-300")),E(m.Chip,"defaultIconColor",$("palette-grey-300")),E(m.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),E(m.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),E(m.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),E(m.LinearProgress,"primaryBg",ae(m.primary.main,.5)),E(m.LinearProgress,"secondaryBg",ae(m.secondary.main,.5)),E(m.LinearProgress,"errorBg",ae(m.error.main,.5)),E(m.LinearProgress,"infoBg",ae(m.info.main,.5)),E(m.LinearProgress,"successBg",ae(m.success.main,.5)),E(m.LinearProgress,"warningBg",ae(m.warning.main,.5)),E(m.Skeleton,"bg",`rgba(${$("palette-text-primaryChannel")} / 0.13)`),E(m.Slider,"primaryTrack",ae(m.primary.main,.5)),E(m.Slider,"secondaryTrack",ae(m.secondary.main,.5)),E(m.Slider,"errorTrack",ae(m.error.main,.5)),E(m.Slider,"infoTrack",ae(m.info.main,.5)),E(m.Slider,"successTrack",ae(m.success.main,.5)),E(m.Slider,"warningTrack",ae(m.warning.main,.5));const N=Tn(m.background.default,.98);E(m.SnackbarContent,"bg",N),E(m.SnackbarContent,"color",Qe(()=>m.getContrastText(N))),E(m.SpeedDialAction,"fabHoverBg",Tn(m.background.paper,.15)),E(m.StepConnector,"border",$("palette-grey-600")),E(m.StepContent,"border",$("palette-grey-600")),E(m.Switch,"defaultColor",$("palette-grey-300")),E(m.Switch,"defaultDisabledColor",$("palette-grey-600")),E(m.Switch,"primaryDisabledColor",ae(m.primary.main,.55)),E(m.Switch,"secondaryDisabledColor",ae(m.secondary.main,.55)),E(m.Switch,"errorDisabledColor",ae(m.error.main,.55)),E(m.Switch,"infoDisabledColor",ae(m.info.main,.55)),E(m.Switch,"successDisabledColor",ae(m.success.main,.55)),E(m.Switch,"warningDisabledColor",ae(m.warning.main,.55)),E(m.TableCell,"border",ae(vn(m.divider,1),.68)),E(m.Tooltip,"bg",vn(m.grey[700],.92))}it(m.background,"default"),it(m.background,"paper"),it(m.common,"background"),it(m.common,"onBackground"),it(m,"divider"),Object.keys(m).forEach(N=>{const K=m[N];N!=="tonalOffset"&&K&&typeof K=="object"&&(K.main&&E(m[N],"mainChannel",gr(br(K.main))),K.light&&E(m[N],"lightChannel",gr(br(K.light))),K.dark&&E(m[N],"darkChannel",gr(br(K.dark))),K.contrastText&&E(m[N],"contrastTextChannel",gr(br(K.contrastText))),N==="text"&&(it(m[N],"primary"),it(m[N],"secondary")),N==="action"&&(K.active&&it(m[N],"active"),K.selected&&it(m[N],"selected")))})}),A=t.reduce((Z,m)=>ze(Z,m),A);const _={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:i,getSelector:dE(A)},{vars:P,generateThemeVars:L,generateStyleSheets:W}=LC(A,_);return A.vars=P,Object.entries(A.colorSchemes[A.defaultColorScheme]).forEach(([Z,m])=>{A[Z]=m}),A.generateThemeVars=L,A.generateStyleSheets=W,A.generateSpacing=function(){return sc(u.spacing,Bo(this))},A.getColorSchemeSelector=jC(a),A.spacing=A.generateSpacing(),A.shouldSkipGeneratingVar=i,A.unstable_sxConfig={...mn,...u==null?void 0:u.unstable_sxConfig},A.unstable_sx=function(m){return zt({sx:m,theme:this})},A.toRuntimeSource=Sc,A}function Cc(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Xo({...r===!0?{}:r.palette,mode:t})})}function yE(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:o=r?void 0:{light:!0},defaultColorScheme:s=r==null?void 0:r.mode,...i}=e,a=s||"light",c=o==null?void 0:o[a],u={...o,...r?{[a]:{...typeof c!="boolean"&&c,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Qo(e,...t);let f=r;"palette"in e||u[a]&&(u[a]!==!0?f=u[a].palette:a==="dark"&&(f={mode:"dark"}));const d=Qo({...e,palette:f},...t);return d.defaultColorScheme=a,d.colorSchemes=u,d.palette.mode==="light"&&(d.colorSchemes.light={...u.light!==!0&&u.light,palette:d.palette},Cc(d,"dark",u.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:d.palette},Cc(d,"light",u.light)),d}return!r&&!("light"in u)&&a==="light"&&(u.light=!0),mE({...i,colorSchemes:u,defaultColorScheme:a,...typeof n!="boolean"&&n},...t)}const bE=yE(),vE="$$material";function TE(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const SE=SC({themeId:vE,defaultTheme:bE,rootShouldForwardProp:e=>TE(e)&&e!=="classes"}),_E=DC;process.env.NODE_ENV!=="production"&&(te.node,te.object.isRequired);function wE(e){return kC(e)}function CE(e){return zo("MuiSvgIcon",e)}Q_("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const EE=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${Ct(t)}`,`fontSize${Ct(r)}`]};return J_(o,CE,n)},xE=SE("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Ct(r.color)}`],t[`fontSize${Ct(r.fontSize)}`]]}})(_E(({theme:e})=>{var t,r,n,o,s,i,a,c,u,f,d,p,y,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.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:((i=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:i.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:f.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,h])=>h&&h.main).map(([h])=>{var S,C;return{props:{color:h},style:{color:(C=(S=(e.vars??e).palette)==null?void 0:S[h])==null?void 0:C.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:(b=(y=(e.vars??e).palette)==null?void 0:y.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Sn=$e.forwardRef(function(t,r){const n=wE({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:a="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:f=!1,titleAccess:d,viewBox:p="0 0 24 24",...y}=n,b=$e.isValidElement(o)&&o.type==="svg",h={...n,color:i,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:p,hasSvgAsChild:b},S={};f||(S.viewBox=p);const C=EE(h);return l.jsxs(xE,{as:a,className:ew(C.root,s),focusable:"false",color:u,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...S,...y,...b&&o.props,ownerState:h,children:[b?o.props.children:o,d?l.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Sn.propTypes={children:te.node,classes:te.object,className:te.string,color:te.oneOfType([te.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),te.string]),component:te.elementType,fontSize:te.oneOfType([te.oneOf(["inherit","large","medium","small"]),te.string]),htmlColor:te.string,inheritViewBox:te.bool,shapeRendering:te.string,sx:te.oneOfType([te.arrayOf(te.oneOfType([te.func,te.object,te.bool])),te.func,te.object]),titleAccess:te.string,viewBox:te.string}),Sn.muiName="SvgIcon";function es(e,t){function r(n,o){return l.jsx(Sn,{"data-testid":`${t}Icon`,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Sn.muiName,$e.memo($e.forwardRef(r))}const AE=es(l.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),OE=es(l.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward"),$E=es(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"),Ht=({children:e,...t})=>l.jsx(g.Table.Td,{...t,children:e}),PE=({errorMessages:e,id:t})=>l.jsx(g.Tooltip,{id:t,title:e,children:l.jsx(g.Indicator,{label:e.split(`
179
- `).length,children:l.jsx(Kf,{})})}),IE={paddingLeft:0,paddingRight:0},kE=v.memo(function({numColumns:t,errors:r,label:n,description:o,path:s,addItem:i,schema:a,enabled:c,translations:u,rootSchema:f}){const d={bg:"transparent",size:"sm",c:"gray"},p=g.useProps("ActionIcon",d,{});return l.jsxs(g.Table.Tr,{children:[l.jsx(Ht,{colSpan:t,children:l.jsxs(g.Stack,{children:[l.jsxs(g.Grid,{justify:"flex-start",align:"center",gutter:"sm",children:[l.jsx(g.Grid.Col,{span:"content",children:l.jsx(g.Text,{children:n})}),l.jsx(g.Grid.Col,{span:"content",children:r.length!==0?l.jsx(g.Grid.Col,{span:"content",children:l.jsx(PE,{id:"tooltip-validation",errorMessages:r})}):null})]}),o&&l.jsx(g.Text,{size:"sm",children:o})]})}),c?l.jsx(Ht,{align:"right",style:IE,children:l.jsx(g.Tooltip,{id:"tooltip-add",title:u.addTooltip,position:"bottom",children:l.jsx(g.ActionIcon,{bg:p.bg,size:p.size,c:p.c,onClick:i(s,U.createDefaultValue(a,f)),children:l.jsx(Nr,{})})})}):null]})}),Ec={fixedCell:{width:"150px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"},fixedCellSmall:{width:"50px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"}},xc=(e,t,r,n,o)=>{if(t.type==="object")return Ac(t).map(s=>{var c,u;const i=U.Paths.compose(r,s),a={propName:s,schema:t,title:((u=(c=t.properties)==null?void 0:c[s])==null?void 0:u.title)??v_(s),rowPath:r,cellPath:i,enabled:n,cells:o};return l.jsx(e,{...a},i)});{const s={schema:t,rowPath:r,cellPath:r,enabled:n};return l.jsx(e,{...s},r)}},Ac=e=>e.type==="object"&&typeof e.properties=="object"?Object.keys(e.properties).filter(t=>e.properties[t].type!=="array"):[""],DE=({numColumns:e,translations:t})=>l.jsx(g.Table.Tr,{children:l.jsx(Ht,{colSpan:e,children:l.jsx(g.Text,{align:"center",children:t.noDataMessage})})}),ME=v.memo(function({title:t}){return l.jsx(g.Table.Th,{children:t})}),FE=(e,t)=>{const r=t.rowPath+(t.schema.type==="object"?"."+t.propName:""),n=U.formatErrorMessage(lT(U.errorsAt(r,t.schema,o=>o===r)(e.core.errors).map(o=>o.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}},Oc=e=>({type:"Control",scope:e,label:!1}),NE=v.memo(function({path:t,propName:r,schema:n,rootSchema:o,errors:s,enabled:i,renderers:a,cells:c,isValid:u}){return l.jsxs(Ht,{children:[n.properties?l.jsx(ce.DispatchCell,{schema:U.Resolve.schema(n,`#/properties/${U.encode(r)}`,o),uischema:Oc(`#/properties/${U.encode(r)}`),path:t,enabled:i,renderers:a,cells:c}):l.jsx(ce.DispatchCell,{schema:n,uischema:Oc("#"),path:t,enabled:i,renderers:a,cells:c}),l.jsx(g.Text,{size:"xs",children:u?"":s})]})}),LE=e=>{const t=ce.useJsonForms(),r=FE(t,e),n=ea(r.errors);return l.jsx(NE,{...r,isValid:n})},jE=({childPath:e,schema:t,rowIndex:r,openDeleteDialog:n,moveUpCreator:o,moveDownCreator:s,enableUp:i,enableDown:a,showSortButtons:c,enabled:u,cells:f,path:d,translations:p})=>{const y={bg:"transparent",size:"sm",c:"gray"},b=g.useProps("ActionIcon",y,{}),h=v.useMemo(()=>o(d,r),[o,d,r]),S=v.useMemo(()=>s(d,r),[s,d,r]);return l.jsxs(g.Table.Tr,{children:[xc(LE,t,e,u,f),u?l.jsx(Ht,{style:c?Ec.fixedCell:Ec.fixedCellSmall,children:l.jsxs(g.Grid,{justify:"flex-end",align:"center",children:[c?l.jsxs(v.Fragment,{children:[l.jsx(g.Grid.Col,{span:"content",children:l.jsx(g.Tooltip,{id:"tooltip-up",title:p.up,position:"bottom",opened:i?void 0:!1,children:l.jsx(g.ActionIcon,{bg:b.bg,size:b.size,c:b.c,"aria-label":p.upAriaLabel,onClick:h,disabled:!i,children:l.jsx(OE,{})})})}),l.jsx(g.Grid.Col,{span:"content",children:l.jsx(g.Tooltip,{id:"tooltip-down",title:p.down,position:"bottom",opened:a?void 0:!1,children:l.jsx(g.ActionIcon,{bg:b.bg,size:b.size,c:b.c,"aria-label":p.downAriaLabel,onClick:S,disabled:!a,children:l.jsx(AE,{})})})})]}):null,l.jsx(g.Grid.Col,{span:"content",children:l.jsx(g.Tooltip,{id:"tooltip-remove",title:p.removeTooltip,position:"bottom",children:l.jsx(g.ActionIcon,{bg:b.bg,size:b.size,c:b.c,"aria-label":p.removeAriaLabel,onClick:()=>n(e,r),children:l.jsx($E,{})})})})]})}):null]},e)},$c=v.memo(jE),zE=({data:e,path:t,schema:r,openDeleteDialog:n,moveUp:o,moveDown:s,uischema:i,config:a,enabled:c,cells:u,translations:f})=>{if(e===0)return l.jsx(DE,{numColumns:Ac(r).length+1,translations:f});const p=ka({},a,i.options);return l.jsx(v.Fragment,{children:N_(e).map(y=>{const b=U.Paths.compose(t,`${y}`);return l.jsx($c,{childPath:b,rowIndex:y,schema:r,openDeleteDialog:n,moveUpCreator:o,moveDownCreator:s,enableUp:y!==0,enableDown:y!==e-1,showSortButtons:p.showSortButtons||p.showArrayTableSortButtons,enabled:c,cells:u,path:t,translations:f},b)})})};class Pc extends v.Component{constructor(){super(...arguments);Eu(this,"addItem",(r,n)=>this.props.addItem(r,n))}render(){const{label:r,description:n,path:o,schema:s,rootSchema:i,uischema:a,errors:c,openDeleteDialog:u,visible:f,enabled:d,cells:p,translations:y}=this.props,b=a,h=s.type==="object",S=h?xc(ME,s,o,d,p):void 0;return f?l.jsxs(g.Table,{children:[l.jsxs(g.Table.Thead,{children:[l.jsx(kE,{errors:c,label:r,description:n,addItem:this.addItem,numColumns:h?S.length:1,path:o,uischema:b,schema:s,rootSchema:i,enabled:d,translations:y}),h&&l.jsxs(g.Table.Tr,{children:[S,d?l.jsx(g.Table.Th,{}):null]})]}),l.jsx(g.Table.Tbody,{children:l.jsx(zE,{openDeleteDialog:u,translations:y,...this.props})})]}):null}}const Ic=v.memo(function({open:t,onClose:r,onConfirm:n,onCancel:o,title:s,message:i,acceptText:a,declineText:c}){return l.jsxs(g.Modal,{opened:t,withCloseButton:!1,centered:!0,title:s,keepMounted:!0,onClose:r,children:[i,l.jsxs(g.Flex,{justify:"flex-end",align:"center",gap:"sm",children:[l.jsx(g.Button,{onClick:o,children:c}),l.jsx(g.Button,{onClick:n,children:a})]})]})}),BE=e=>{const[t,r]=v.useState(!1),[n,o]=v.useState(void 0),[s,i]=v.useState(void 0),{removeItems:a,visible:c}=e,u=v.useCallback((y,b)=>{r(!0),o(y),i(b)},[r,o,i]),f=v.useCallback(()=>r(!1),[r]),d=v.useCallback(()=>{const y=n.substring(0,n.lastIndexOf("."));a(y,[s])(),r(!1)},[r,n,s]),p=v.useCallback(()=>r(!1),[r]);return c?l.jsxs(l.Fragment,{children:[l.jsx(Pc,{...e,openDeleteDialog:u}),l.jsx(Ic,{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},kc=U.rankWith(3,U.or(U.isObjectArrayControl,U.isPrimitiveArrayControl)),Dc=ce.withJsonFormsArrayLayoutProps(BE),UE=({errors:e,description:t,label:r,required:n,path:o,options:s,data:i,enabled:a,handleChange:c})=>l.jsx(g.MultiSelect,{disabled:!a,data:s,defaultValue:i,label:r,description:t,required:n,error:e,onChange:u=>{c(o,u)}}),VE=e=>e.oneOf!==void 0&&e.oneOf.length>0&&e.oneOf.every(t=>t.const!==void 0),GE=e=>e.type==="string"&&e.enum!==void 0,Mc=U.rankWith(6,U.and(U.uiTypeIs("Control"),U.and(U.schemaMatches(e=>U.hasType(e,"array")&&!Array.isArray(e.items)&&e.uniqueItems===!0),U.schemaSubPathMatches("items",(e,t)=>{const r=e.$ref?U.resolveSchema(t,e.$ref,t):e;return VE(r)||GE(r)})))),Fc=ce.withJsonFormsMultiEnumProps(UE),WE=e=>{const{description:t,errors:r,data:n,handleChange:o,path:s,label:i,required:a,enabled:c}=e,u=g.useProps(s,{},{});return Object.keys(u).forEach(f=>{typeof u[f]=="function"&&(u[f]=u[f](n))}),l.jsx(ct.DateInput,{valueFormat:"DD.MM.YYYY",disabled:!c,label:i,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);o(s,d.toISOString().substring(0,10))}},...u})},Nc=U.rankWith(5,U.isDateControl),Lc=ce.withJsonFormsControlProps(WE),HE=e=>{const{description:t,errors:r,data:n,handleChange:o,path:s,label:i,required:a,enabled:c}=e,u=g.useProps(s,{},{});return Object.keys(u).forEach(f=>{typeof u[f]=="function"&&(u[f]=u[f](n))}),l.jsx(ct.DateTimePicker,{valueFormat:"DD.MM.YYYY HH:mm",disabled:!c,label:i,description:t,error:r,required:a,value:n?new Date(n):null,onChange:f=>{if(f instanceof Date){const d=new Date(f);o(s,d.toISOString())}},...u})},jc=U.rankWith(5,U.isDateTimeControl),zc=ce.withJsonFormsControlProps(HE),YE=e=>l.jsx(Jr,{...e}),Bc=U.rankWith(3,U.isNumberControl),Uc=ce.withJsonFormsControlProps(YE),qE=e=>l.jsx(Jr,{...e}),Vc=U.rankWith(3,U.isIntegerControl),Gc=ce.withJsonFormsControlProps(qE),KE=e=>l.jsx(Da,{...e}),Wc=U.rankWith(3,U.isStringControl),Hc=ce.withJsonFormsControlProps(KE),JE=e=>l.jsx(Ma,{...e}),Yc=U.rankWith(3,U.isBooleanControl),qc=ce.withJsonFormsControlProps(JE),ZE=({data:e,options:t,handleChange:r,path:n,...o})=>{const{description:s,errors:i,label:a,required:c,enabled:u}=o,f=g.useProps(n,{},{});return Object.keys(f).forEach(d=>{typeof f[d]=="function"&&(f[d]=f[d](e))}),l.jsx(g.Select,{disabled:!u,data:t,value:e||null,label:a,description:s,required:c,error:i,searchable:!0,onChange:d=>{r(n,d)},...f})},Kc=U.rankWith(5,U.isEnumControl),Jc=ce.withJsonFormsEnumProps(ce.withTranslateProps(v.memo(ZE)),!1),XE=e=>{const{text:t,visible:r}=e;return r?l.jsx(g.Title,{fw:"bold",size:"xl",children:t}):null},QE=U.rankWith(3,U.isLabelable),RE=ce.withJsonFormsLabelProps(XE),Zc=U.rankWith(5,U.uiTypeIs("HorizontalLayout")),ex=({uischema:e,renderers:t,cells:r,schema:n,path:o,enabled:s})=>{const a={elements:e.elements,schema:n,path:o,enabled:s,direction:"row"};return l.jsx(So,{...a,renderers:t,cells:r})},Xc=ce.withJsonFormsLayoutProps(ex),Qc=U.rankWith(5,U.uiTypeIs("VerticalLayout")),tx=({uischema:e,schema:t,path:r,enabled:n,renderers:o,cells:s})=>{const a={elements:e.elements,schema:t,path:r,enabled:n,direction:"column"};return l.jsx(So,{...a,renderers:o,cells:s})},Rc=ce.withJsonFormsLayoutProps(tx),rx=[{tester:Nc,renderer:Lc},{tester:jc,renderer:zc},{tester:Bc,renderer:Uc},{tester:Vc,renderer:Gc},{tester:Wc,renderer:Hc},{tester:Yc,renderer:qc},{tester:Kc,renderer:Jc},{tester:kc,renderer:Dc},{tester:Mc,renderer:Fc},{tester:Zc,renderer:Xc},{tester:Qc,renderer:Rc},{tester:QE,renderer:RE}],nx=[{tester:za,cell:Ba},{tester:Fa,cell:Na},{tester:La,cell:ja},{tester:Ua,cell:Va},{tester:Ga,cell:Wa},{tester:Ha,cell:Ya},{tester:qa,cell:Ka}];function ox(e,t){const r=v.useCallback(({row:n})=>l.jsx(Ze,{fallback:l.jsx(Rn,{id:n.original.id}),functionProps:[n.original.id],children:t}),[t]);return{enableEditing:!e,editDisplayMode:"modal",renderRowActions:r}}function sx(e,t){return{enableRowSelection:!!e||!!t}}function ix(e){return e&&typeof e=="object"&&!Array.isArray(e)}const ts=(...e)=>{const t={};return e.forEach(r=>{r&&Object.keys(r).forEach(n=>{ix(r[n])&&n!=="ref"&&t[n]?t[n]=ts(t[n],r[n]):t[n]=r[n]})}),t},vr=(e={},...t)=>t.reduce((r,n)=>ts(r,e[n]),{}),ax=(e,t)=>e===void 0?t:e;function lx({col:e,colFilter:t,onClick:r,...n}){return l.jsxs(g.Menu,{shadow:"md",width:"target",...n,children:[l.jsx(g.Menu.Target,{children:l.jsx(g.Button,{children:"Add filter"})}),l.jsx(g.Menu.Dropdown,{children:t.filters.filter(o=>$t(o.operator)).map(o=>l.jsx(g.Menu.Item,{onClick:()=>r({col:e,opr:o.operator,value:""}),children:o.name},`${t.label}-${o.name}`))})]})}function cx({col:e,colFilter:t,filterNameMap:r}){const{queryParams:n,setQueryParams:o}=re(),s=er.useForm({initialValues:{filters:(n==null?void 0:n.filters)||[]}}),[i]=be.useDebouncedValue(s.getValues(),St);be.useDidUpdate(()=>{const u=i.filters.filter(f=>f.value);o({filters:u})},[i]);const a=s.getValues().filters,c=a.map((u,f)=>u.col===e&&$t(u.opr)?l.jsxs(v.Fragment,{children:[l.jsx(g.Grid.Col,{span:1.5,py:0,children:l.jsx(g.Center,{h:"100%",w:"100%",children:l.jsx(g.CloseButton,{onClick:()=>s.removeListItem("filters",f),size:"md",title:"Remove filter",variant:"outline"})})}),l.jsx(g.Grid.Col,{span:10.5,py:0,children:u.opr==="in"?l.jsx(Pi,{form:s,name:`filters.${f}.value`,label:r[u.opr],comboboxProps:{withinPortal:!1}}):l.jsx(jr,{form:s,name:`filters.${f}.value`,label:r[u.opr],schema:t.schema,withinPortal:!1,filter:!0})}),f>=0&&f+1<a.length&&l.jsx(g.Grid.Col,{span:12,py:0,children:l.jsx(g.Divider,{my:"sm",label:"AND",align:"center"})})]},`${u.col}-${f}`):null).filter(Boolean);return l.jsxs(g.Grid,{w:"100%",gap:"md",gutter:"xs",children:[c.length?c:l.jsx(g.Grid.Col,{span:12,children:l.jsx(g.Text,{align:"center",c:"gray",style:{fontStyle:"italic"},children:"No filters"})}),l.jsx(g.Grid.Col,{span:12,children:l.jsx(g.Stack,{children:l.jsx(lx,{col:e,colFilter:t||{filters:[]},onClick:u=>s.insertListItem("filters",u),withinPortal:!1})})})]})}const ux={root:"_root_1navk_1",label:"_label_1navk_21",description:"_description_1navk_29"};function fx({filterNameMap:e,col:t,opr:r,table:n}){return Object.entries(e).filter(([o])=>o.startsWith(Ot)).map(([o,s])=>l.jsx(g.Checkbox.Card,{className:ux.root,radius:"sm",checked:o===r,onClick:()=>n.setColumnFilterFns(i=>({...i,[t]:o})),children:l.jsxs(g.Group,{wrap:"nowrap",align:"flex-start",children:[l.jsx(g.Checkbox.Indicator,{}),l.jsx(g.Text,{children:s})]})},o))}function dx({mode:e,setMode:t,close:r,col:n,colFilter:o,opr:s,table:i,filterNameMap:a}){return l.jsxs(g.Stack,{gap:"sm",children:[l.jsxs(g.Group,{gap:0,justify:"space-between",align:"center",children:[l.jsx(g.Text,{children:"Filter Menu"}),l.jsxs(g.Group,{gap:"0.25rem",style:{flexDirection:"row-reverse"},children:[l.jsx(g.CloseButton,{onClick:r,title:"Close Filter Menu"}),l.jsx(g.SegmentedControl,{size:"sm",data:["Basic","Advanced"],value:e,onChange:t})]})]}),l.jsx(g.Divider,{}),l.jsxs(g.Text,{ta:"center",children:[e," Filters"]}),l.jsxs(g.Stack,{gap:"0.25rem",children:[e==="Basic"&&l.jsx(fx,{filterNameMap:a,col:n,opr:s,table:i}),e==="Advanced"&&l.jsx(cx,{col:n,colFilter:o,filterNameMap:a})]})]})}const Yt=e=>e!=null&&e!=="",eu=v.forwardRef(({clearIcon:e,...t},r)=>{const{value:n,onChange:o,leftInputProps:s,rightInputProps:i,groupProps:a,...c}=t,[u,f]=v.useState([null,null]);v.useEffect(()=>{n||f([null,null])},[n]),v.useEffect(()=>{const S=JSON.stringify(u);let C=null;return u.every(Yt)&&S!==n?C=setTimeout(()=>{o(JSON.stringify(u))},St):u.every(k=>!Yt(k))&&(C=setTimeout(()=>{o(void 0)},St)),()=>clearTimeout(C)},[u]);const d=v.useCallback((S,C)=>{f(k=>{const O=[...k];return O[C]=S,O})},[]);let[p,y]=u;const b=Yt(y)&&!Yt(p),h=Yt(p)&&!Yt(y);return l.jsxs(g.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...a,children:[l.jsx(g.NumberInput,{styles:{wrapper:{marginBottom:0}},...c,value:p,onChange:S=>d(S,0),placeholder:b?"Start value is required":"Start value",error:b&&" ",ref:r,...s}),l.jsx(g.NumberInput,{styles:{wrapper:{marginBottom:0}},...c,value:y,onChange:S=>d(S,1),placeholder:h?"End value is required":"End value",error:h&&" ",...i})]})});eu.displayName="BasicHeaderBetweenInput";const qt=e=>e,tu=v.forwardRef(({clearIcon:e,...t},r)=>{const{value:n,onChange:o,leftInputProps:s,rightInputProps:i,groupProps:a,...c}=t,[u,f]=v.useState([null,null]);v.useEffect(()=>{n||f([null,null])},[n]),v.useEffect(()=>{const S=JSON.stringify(u);let C=null;return u.every(qt)&&S!==n?C=setTimeout(()=>{o(JSON.stringify(u))},St):u.every(k=>!qt(k))&&(C=setTimeout(()=>{o(void 0)},St)),()=>clearTimeout(C)},[u]);const d=v.useCallback((S,C)=>{S&&(S=S.toISOString()),f(k=>{const O=[...k];return O[C]=S,O})},[]);let[p,y]=u;p=p?new Date(p):null,y=y?new Date(y):null;const b=qt(y)&&!qt(p),h=qt(p)&&!qt(y);return l.jsxs(g.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...a,children:[l.jsx(ct.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...c,value:p,onChange:S=>d(S,0),placeholder:b?"Start date is required":"Start date",error:b&&" ",ref:r,...s}),l.jsx(ct.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...c,value:y,onChange:S=>d(S,1),placeholder:h?"End date is required":"End date",error:h&&" ",...i})]})});tu.displayName="BasicHeaderDateBetweenInput";const ru=v.forwardRef(({clearIcon:e,...t},r)=>l.jsx(g.TextInput,{ref:r,rightSection:e,...t}));ru.displayName="BasicHeaderTextInput";const nu=v.forwardRef(({component:e,...t},r)=>l.jsx(Ze,{ref:r,fallback:l.jsx(ru,{...t}),functionProps:[{...t,ref:r}],children:e}));nu.displayName="HeaderInput";const rs={[Oi]:e=>l.jsx(eu,{...e}),[$i]:e=>l.jsx(tu,{...e})},ou=v.forwardRef(({label:e,disabled:t,children:r,...n},o)=>t?v.cloneElement(r,{ref:o}):l.jsx(g.Tooltip,{label:e,...n,children:v.cloneElement(r,{ref:o})}));ou.displayName="FilterIconWrapper";const su=v.forwardRef(({indicator:e,children:t},r)=>e?l.jsx(g.Indicator,{zIndex:20,size:16,label:e,children:v.cloneElement(t,{ref:r})}):v.cloneElement(t,{ref:r}));su.displayName="FilterIndicatorWrapper";const px=(e,t)=>{var n,o,s;const r=(s=(o=(n=e==null?void 0:e.filters)==null?void 0:n[t])==null?void 0:o.schema)==null?void 0:s.type;if(!r)return Ai;switch(r){case"Date":case"DateTime":return $i;case"Integer":case"Float":return Oi;default:return Ai}};function hx({headerConfig:e,column:t,table:r}){var ge,Ce,H,x;const{info:n,data:o,queryParams:s,setQueryParams:i}=re(),{filterComponent:a,filterProps:c,filterModeDescription:u,filterMenu:f,defaultOpr:d=px(n,t.id),configurationMode:p="basic",filterAdvancedFilters:y}=e;v.useEffect(()=>{process.env.NODE_ENV==="development"&&y!==void 0&&console.warn("filterAdvancedFilters is deprecated, please use filterMenu instead")},[]);const[b,h]=v.useState("Basic"),[S,{close:C,toggle:k}]=be.useDisclosure(),O=((ge=r.getState().columnFilterFns)==null?void 0:ge[t.id])||d,A=v.useMemo(()=>O,[O]),_=er.useField({initialValue:""}),P=v.useMemo(()=>(n==null?void 0:n.filters[t.id])||{},[t.id,n==null?void 0:n.filters]),L=v.useMemo(()=>{var w;return((w=P==null?void 0:P.filters)==null?void 0:w.reduce((G,F)=>({...G,[F.operator]:F.name}),{}))||{}},[P==null?void 0:P.filters]),W=v.useMemo(()=>(s==null?void 0:s.filters.filter(w=>w.col===t.id&&$t(w.opr)).map(w=>({...w})))||[],[s,t.id]),Z=v.useMemo(()=>s==null?void 0:s.filters.find(w=>w.col===t.id&&w.opr===A),[t.id,A,s==null?void 0:s.filters]),[m]=be.useDebouncedValue(_.getInputProps().value,St),$=be.useMounted(),N=v.useCallback(()=>{_.reset(),t.setFilterValue(void 0)},[]);v.useEffect(()=>{$&&t.setFilterValue(m??void 0)},[m]),v.useEffect(()=>{if(!$)return;const w=t.getFilterValue();w===void 0?N():_.getInputProps().onChange(w||"")},[t.getFilterValue()]),v.useEffect(()=>{$&&(Z||N())},[Z]),be.useDidUpdate(()=>{_.reset()},[A]),be.useDidUpdate(()=>{let w=!1;const G=s==null?void 0:s.filters.map(j=>{if(j.opr.startsWith(Ot)&&j.col===t.id){if(j.opr===A)w=!0;else return null;return m?{...j,value:m}:null}return j}).filter(Boolean);!w&&m&&G.push({col:t.id,opr:A,value:m});const F=JSON.stringify(G),Y=JSON.stringify(s.filters);F!==Y&&i({filters:G})},[m]);const K=v.useMemo(()=>{var F;const w={variant:"subtle"};return!((F=P==null?void 0:P.filters)!=null&&F.length)&&(w.disabled=!0,w.c="gray"),w},[P==null?void 0:P.filters]),Q=v.useMemo(()=>ax(p==="basic"?a:a==null?void 0:a[A],rs==null?void 0:rs[A]),[p,a,A]),fe=v.useMemo(()=>({...K,size:"sm",onClick:N,title:"Clear filter"}),[K,N]),de=v.useMemo(()=>({...p==="basic"?c:vr(c,A),cleariconprops:fe}),[fe,p,c,A]);return l.jsxs(g.Popover,{opened:S,closeOnClickOutside:!0,onChange:k,shadow:"md",withArrow:!0,position:"bottom-end",width:"target",children:[l.jsx(g.Popover.Target,{children:l.jsxs(g.Stack,{w:"100%",gap:"0.25rem",children:[l.jsxs(g.Group,{gap:"xs",justify:"space-between",wrap:"nowrap",children:[l.jsx(nu,{component:Q,field:_,clearIcon:_.isDirty()&&l.jsx(g.ActionIcon,{...fe,children:l.jsx(rd,{})}),disabled:!L[A],placeholder:`Filter by ${((Ce=o==null?void 0:o.label_columns)==null?void 0:Ce[t.id])||t.id}`,style:{fontWeight:"normal"},w:"100%",ref:w=>{w&&(r.refs.filterInputRefs.current[`${t.id}-0`]=w)},..._.getInputProps(),...de}),l.jsx(Ze,{fallback:l.jsx(ou,{label:"Filter Menu",disabled:!((H=P==null?void 0:P.filters)!=null&&H.length),position:"bottom-start",withArrow:!0,arrowPosition:"side",children:l.jsx(su,{indicator:W.length,children:l.jsx(g.ActionIcon,{...K,onClick:k,children:l.jsx(Zf,{})})})}),functionProps:[{label:"Filter Menu",disabled:!((x=P==null?void 0:P.filters)!=null&&x.length),indicator:W.length,aiProps:K,onClick:k}],children:f===void 0?y:f})]}),l.jsx(Ze,{fallback:l.jsxs(g.Input.Description,{size:"xs",fw:"normal",children:["Filter Mode: ",L==null?void 0:L[A]]}),functionProps:[L==null?void 0:L[A]],children:u})]})}),l.jsx(g.Popover.Dropdown,{children:l.jsx(dx,{mode:b,setMode:h,close:C,col:t.id,colFilter:P,filterNameMap:L,opr:A,table:r})})]})}function gx({highlight:e,truncate:t,children:r}){return Array.isArray(r)?r.map((n,o)=>{var s;return(s=t==null?void 0:t[o])!=null&&s.truncated?l.jsx(g.Tooltip,{label:t[o].original,children:l.jsx(g.Highlight,{highlight:e,children:t[o].truncated},o)},o):l.jsx(g.Highlight,{highlight:e,children:n},o)}):t!=null&&t.truncated?l.jsx(g.Tooltip,{label:t.original,children:l.jsx(g.Highlight,{highlight:e,children:t.truncated})}):l.jsx(g.Highlight,{highlight:e,children:r})}function mx(e,t,r,n){const{data:o,specialKey:s}=re();return{columns:v.useMemo(()=>(o==null?void 0:o.list_columns.map(a=>{var c,u;return{accessorKey:a,header:a.split("_").map(be.upperFirst).join(" "),Header:l.jsx(Ze,{fallback:(c=o==null?void 0:o.label_columns)==null?void 0:c[a],functionProps:[a],children:(u=vr(t,s.all,a))==null?void 0:u.component}),Filter:f=>l.jsx(hx,{headerConfig:vr(t,s.all,a),...f}),enableSorting:(o==null?void 0:o.order_columns.includes(a))||(o==null?void 0:o.order_columns.includes(`${a}.id`)),Cell:({cell:f,table:d,column:p})=>{const y=d.getState().globalFilter,b=p.getFilterValue()||"",{component:h,separator:S,truncate:C}=vr(r,s.all,a);let k=[];y&&k.push(...y.split(n).map(_=>_.trim())),b&&typeof b=="string"&&k.push(...b.split(n).map(_=>_.trim()));let O=Ys(f.getValue());typeof O=="number"?O=O.toLocaleString():O==null&&(O=""),S&&(O=O.split(S));let A={};return C&&(Array.isArray(O)?A=O.map(_=>({original:_,truncated:_.length>C?`${_.slice(0,C)}...`:null})):A={original:O,truncated:O.length>C?`${O.slice(0,C)}...`:null}),l.jsx(Ze,{fallback:l.jsx(gx,{highlight:k,truncate:A,children:O}),functionProps:[f.row.original,k,{cell:f,table:d,column:p,value:O}],children:h})},...e==null?void 0:e[a]}}))||[],[o==null?void 0:o.list_columns,o==null?void 0:o.label_columns,o==null?void 0:o.order_columns,e,t,r,s.all,n]),manualFiltering:!0}}function yx(){const{data:e,loading:t}=re();return{data:(e==null?void 0:e.result)||[],rowCount:(e==null?void 0:e.count)||0,state:{showLoadingOverlay:t}}}function bx(e){const{data:t}=re();return e?{mantineTableBodyRowProps:({row:r})=>({onClick:()=>{const n=t.ids[r.id];e(n,r.original)},style:{cursor:"pointer"}})}:null}function vx(){const{queryParams:e,setQueryParams:t,info:r}=re(),[n,o]=v.useState(""),[s]=be.useDebouncedValue(n,St),i=v.useMemo(()=>{var u,f;return((f=(u=e==null?void 0:e.filters)==null?void 0:u.find(d=>d.opr===lr))==null?void 0:f.value)||""},[e==null?void 0:e.filters]),a=v.useMemo(()=>{var u;return(u=Object.entries((r==null?void 0:r.filters)||{}).find(([,f])=>f.filters.find(d=>d.operator===lr)))==null?void 0:u[0]},[r==null?void 0:r.filters]);be.useDidUpdate(()=>{i!==(s||"")&&o(i)},[i]),be.useDidUpdate(()=>{var y;const u=((y=e==null?void 0:e.filters)==null?void 0:y.filter(b=>b.opr!==lr))||[],f={col:a,opr:lr,value:s};s&&u.push(f);const d=JSON.stringify(u),p=JSON.stringify((e==null?void 0:e.filters)||[]);d!==p&&t({page:0,filters:u})},[s]);const c=v.useMemo(()=>{const u={disabled:!a};return a||(u.placeholder="No global filter available"),u},[a]);return{manualFiltering:!0,onGlobalFilterChange:o,state:{globalFilter:n},mantineSearchTextInputProps:c}}function Tx(e){const{data:t,queryParams:r,setQueryParams:n}=re(),o=v.useMemo(()=>({pageIndex:(r==null?void 0:r.page)||Vd,pageSize:(r==null?void 0:r.page_size)||Gd}),[r==null?void 0:r.page,r==null?void 0:r.page_size]),s=v.useCallback(i=>{const a=i(o);!(t!=null&&t.count)&&a.pageIndex===0||n({page:a.pageIndex,page_size:a.pageSize})},[t==null?void 0:t.count,o,n]);return{enablePagination:!e,manualPagination:!0,state:{pagination:o},onPaginationChange:s}}function Sx(e){const{ref:t,height:r}=be.useElementSize(),{ref:n,height:o}=be.useElementSize(),s=v.useMemo(()=>{const u={h:"100%",withBorder:e};return e||(u.shadow=void 0),u},[e]),i=v.useMemo(()=>({ref:n}),[n]),a=v.useMemo(()=>({ref:t,pos:"sticky",bottom:0}),[t]),c=v.useMemo(()=>({h:`calc(100% - ${o+r}px)`}),[o,r]);return{mantinePaperProps:s,mantineTopToolbarProps:i,mantineBottomToolbarProps:a,mantineTableContainerProps:c}}function _x(){const{queryParams:e,setQueryParams:t,data:r}=re(),n=v.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]),o=v.useCallback(s=>{const i=s(n);if(!i.length){t({order_column:null,order_direction:null});return}const a=i[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:o}}function wx(...e){const[t,r]=v.useState(!1),n={variant:"transparent",size:"md",c:"gray"},o=g.useProps("ActionIcon",n,e);return l.jsxs(l.Fragment,{children:[l.jsx(g.Tooltip,{label:"Add Item",children:l.jsx(g.ActionIcon,{variant:o.variant,size:o.size,c:o.c,className:"filterButton",onClick:()=>{r(!0)},children:l.jsx(Nr,{})})}),l.jsx(eo,{opened:t,onClose:()=>{r(!1)}})]})}function Cx(...e){const[t,r]=v.useState(!1),{download:n}=re(),o={variant:"transparent",size:"md",c:"gray"},s=g.useProps("ActionIcon",o,e);return t?l.jsx(g.ThemeIcon,{variant:"transparent",size:s.size,c:s.c,children:l.jsx(g.Loader,{size:"100%",color:s.c})}):l.jsx(g.Tooltip,{label:"Download",children:l.jsx(g.ActionIcon,{variant:s.variant,size:s.size,c:s.c,className:"filterButton",onClick:()=>{r(!0),n("download").then(()=>r(!1))},children:l.jsx(Js,{})})})}function Ex(...e){const[t,r]=v.useState(!1),{loading:n,refetch:o}=re(),s={variant:"transparent",size:"md",c:"gray"},i=g.useProps("ActionIcon",s,e);return v.useEffect(()=>{n||r(!1)},[n]),t?l.jsx(g.ThemeIcon,{variant:"transparent",size:i.size,c:i.c,children:l.jsx(g.Loader,{size:"100%",color:i.c})}):l.jsx(g.Tooltip,{label:"Refresh",children:l.jsx(g.ActionIcon,{variant:i.variant,size:i.size,c:i.c,className:"filterButton",onClick:()=>{r(!0),o()},children:l.jsx(ed,{})})})}const ns={toggleGlobalFilter:1,filter:2,download:3,add:4,refresh:5,showHideColumns:6,toggleDensePadding:7,toggleFullScreen:8};function xx(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(Cx,{},"basic-3"),4:(t==null?void 0:t["4"])&&l.jsx(wx,{},"basic-4"),5:l.jsx(Ex,{},"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 Ax(e={},t,r){const{info:n,queryParams:o,setQueryParams:s}=re(),{customizer:i,custom:a}=e,c=v.useMemo(()=>t?[{label:"All",value:"[]"},...t.map(p=>({label:p.name,value:JSON.stringify(p.value)}))]:[],[t]),u=v.useMemo(()=>c.length?l.jsx(g.SegmentedControl,{value:JSON.stringify((o==null?void 0:o.filters)||[]),onChange:p=>s({filters:JSON.parse(p)}),data:c}):null,[o==null?void 0:o.filters,c,s]),f=v.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")},b=xx(p,y);Object.entries(i||{}).forEach(([S,C])=>{S in ns&&(b[ns[S]]=l.jsx(Ze,{fallback:b[ns[S]],functionProps:[p],children:C},`custom-${S}`))});let h=Object.values(b);return Object.entries(a||{}).forEach(([S,C])=>{S=Number(S)-1;const k=l.jsx(Ze,{functionProps:[p],children:C},`order-${S}`);S>h.length?h.push(k):h=[...h.slice(0,S),k,...h.slice(S)]}),l.jsx(g.Flex,{gap:"0.125rem",align:"center",children:h})},[a,i,n==null?void 0:n.permissions]),d=v.useMemo(()=>{const p={};return u&&(p.renderTopToolbarCustomActions=()=>l.jsx(g.Group,{justify:"space-between",children:l.jsx(g.Box,{children:u})}),p.positionToolbarAlertBanner="bottom"),p},[u]);return{renderToolbarInternalActions:f,enableTopToolbar:!r,enableFilters:(i==null?void 0:i.filter)!==null,...d}}function Ox(){const{data:e}=re();return v.useMemo(()=>(e==null?void 0:e.result.length)>=1e3,[e])?{enableRowVirtualization:!0,rowVirtualizerOptions:{overscan:5}}:{}}const $x={enableStickyHeader:!0,enableColumnPinning:!0},iu=v.forwardRef((e,t)=>{var J;const{data:r,setQueryParams:n,specialKey:o}=re(),{fetchOnMount:s=!0,hideToolbar:i,hideActions:a,hidePagination:c,hideError:u,onSelectCheckbox:f,onClickEntry:d,bulkActions:p,table:y,quickFilters:b,withBorder:h,columnProps:S,header:C,body:k,toolbar:O={},textFilterSeparator:A=";",bodySeparator:_,bodyTruncate:P,headerCustomizer:L,bodyCustomizer:W,toolbarCustomizer:Z,hideAdd:m,hideDownload:$,hideFilter:N,...K}=e;_&&Object.keys(k).forEach(B=>{k[B]=k[B]||{},k[B].separator=k[B].separator||_}),P&&Object.keys(k).forEach(B=>{k[B]=k[B]||{},k[B].truncate=k[B].truncate||P}),L&&Object.keys(L).forEach(B=>{C[B]=C[B]||{},C[B].component=L[B].component||L[B]}),W&&Object.keys(W).forEach(B=>{k[B]=k[B]||{},k[B].component=W[B].component||W[B]}),Z&&(O.custom=O.custom||Z),m&&(O.customizer=O.customizer||{},O.customizer.add=O.customizer.add||null),$&&(O.customizer=O.customizer||{},O.customizer.download=O.customizer.download||null),N&&(O.customizer=O.customizer||{},O.customizer.filter=O.customizer.filter||null),v.useEffect(()=>{process.env.NODE_ENV==="development"&&(_&&console.warn("bodySeparator is deprecated, please use body.[col].separator instead"),P&&console.warn("bodyTruncate is deprecated, please use body.[col].truncate instead"),L&&console.warn("headerCustomizer is deprecated, please use header.[col].component instead"),W&&console.warn("bodyCustomizer is deprecated, please use body.[col].component instead"),Z&&console.warn("toolbarCustomizer is deprecated, please use toolbar.custom instead"),m&&console.warn("hideAdd is deprecated, please use toolbar.customizer.add instead"),$&&console.warn("hideDownload is deprecated, please use toolbar.customizer.download instead"),N&&console.warn("hideFilter is deprecated, please use toolbar.customizer.filter instead"))},[]);const Q=yx(),fe=_x(),de=Tx(c),ge=mx(S,C,k,A),Ce=Sx(h),H=ox(a,(J=vr(k,o.actions))==null?void 0:J.component),x=vx(),w=Ox(),G=Ax(O,b,i),F=bx(d),Y=sx(f,p),j=v.useMemo(()=>ts($x,{mantinePaperProps:{ref:t}},ge,Q,fe,de,Ce,H,x,w,G,F,Y,y),[t,ge,Q,fe,de,Ce,H,x,w,G,F,Y,y]),q=mt.useMantineReactTable(j);return v.useEffect(()=>{!r&&s&&n({})},[r]),v.useEffect(()=>{const B=Object.keys(q.getState().rowSelection),R=r==null?void 0:r.ids.filter((ee,Se)=>B.includes(Se.toString()));f==null||f(R),p==null||p.setSelectedIds(R)},[p,r==null?void 0:r.ids,q.getState().rowSelection,f]),l.jsxs(l.Fragment,{children:[l.jsx(mt.MantineReactTable,{table:q,...K}),u?null:l.jsx(Rs,{})]})});iu.displayName="NextGenDataGrid";const os={iconSmall:"_iconSmall_sxv3z_1",iconLarge:"_iconLarge_sxv3z_6",btn:"_btn_sxv3z_17"};function Px({basePath:e="/security",Target:t,children:r}){const n=ds.useNavigate(),{user:o,signout:s}=ms(),[i,a]=v.useState(!1),u=[{resource_name:e+"/users",label:"Users",name:"UsersApi",Icon:td},{resource_name:e+"/roles",label:"Roles",name:"RolesApi",Icon:Xf},{resource_name:e+"/permissions",label:"Base Permissions",name:"PermissionsApi",Icon:Xs},{resource_name:e+"/permissionviews",label:"Permission on Views",name:"PermissionViewApi",Icon:Xs},{resource_name:e+"/viewsmenus",label:"Views/Menus",name:"ViewsMenusApi",Icon:qf}].filter(f=>o.permissions.includes(f.name));return l.jsxs(g.Menu,{width:260,position:"bottom-end",transition:"pop-top-right",withinPortal:!0,opened:i,onClose:()=>a(!1),onOpen:()=>a(!0),children:[l.jsx(g.Menu.Target,{children:t||l.jsx(g.UnstyledButton,{className:os.btn,style:{borderRadius:4},p:"xs",children:l.jsxs(g.Group,{style:{flexWrap:"nowrap"},spacing:7,children:[l.jsx(g.Text,{weight:500,size:"sm",style:{lineHeight:1,whiteSpace:"nowrap"},mr:3,children:`${o.first_name} ${o.last_name}`}),l.jsx(Zn,{size:12})]})})}),l.jsxs(g.Menu.Dropdown,{children:[u.length?l.jsxs(l.Fragment,{children:[l.jsx(g.Menu.Label,{children:"Security"}),u.map((f,d)=>l.jsx(g.Menu.Item,{p:12,leftSection:l.jsx(f.Icon,{className:os.iconSmall}),onClick:()=>n(f.resource_name),children:f.label},d)),l.jsx(g.Menu.Divider,{})]}):null,r,l.jsx(g.Menu.Item,{leftSection:l.jsx(Qf,{p:12,className:os.iconSmall}),onClick:s,children:"Logout"})]})]})}function Ix(e,{autoInvoke:t=!0,initialLoading:r=!1,clearDataOnRefetch:n=!1,...o}={}){const[s,i]=v.useState(null),[a,c]=v.useState(r),[u,f]=v.useState(null),d=v.useRef(null),p=v.useCallback(()=>{if(e)return n&&i(null),f(null),d.current&&d.current.abort(),d.current=new AbortController,c(!0),fetch(e,{signal:d.current.signal,...o}).then(async b=>{const h=await b.json();if(!b.ok){const S=typeof h.detail=="string"?h.detail:JSON.stringify(h.detail,null,2);throw new Error(S)}return i(h),c(!1),h}).catch(b=>(b&&b.name!=="AbortError"&&(f(b),c(!1)),b))},[e]),y=v.useCallback(()=>{var b;d.current&&((b=d.current)==null||b.abort(""),c(!1))},[]);return v.useEffect(()=>(t&&p(),()=>{d.current&&d.current.abort("")}),[p,t]),{data:s,loading:a,error:u,refetch:p,abort:y}}I.Actions=Rn,I.Add=ai,I.AddDialog=eo,I.ApiProvider=qs,I.DataGrid=co,I.Delete=ei,I.DeleteDialog=Ic,I.Edit=ii,I.EditDialog=si,I.Filter=ki,I.FilterMenu=Ii,I.InfiniteScroll=qd,I.MantineArrayControlRenderer=Dc,I.MantineBooleanCell=Va,I.MantineBooleanControl=qc,I.MantineDateCell=Wa,I.MantineDateControl=Lc,I.MantineDateTimeCell=Ya,I.MantineDateTimeControl=zc,I.MantineEnumArrayRenderer=Fc,I.MantineEnumCell=Ka,I.MantineEnumControl=Jc,I.MantineHorizontalLayoutRenderer=Xc,I.MantineIntegerCell=ja,I.MantineIntegerControl=Gc,I.MantineLayoutRenderer=So,I.MantineNumberCell=Na,I.MantineNumberControl=Uc,I.MantineTableControl=Pc,I.MantineTextCell=Ba,I.MantineTextControl=Hc,I.MantineVerticalLayoutRenderer=Rc,I.NextGenDataGrid=iu,I.NoBorderTableCell=Ht,I.NonEmptyRow=$c,I.Provider=Uu,I.UserMenu=Px,I.mantineArrayControlTester=kc,I.mantineBooleanCellTester=Ua,I.mantineBooleanControlTester=Yc,I.mantineCells=nx,I.mantineDateCellTester=Ga,I.mantineDateControlTester=Nc,I.mantineDateTimeCellTester=Ha,I.mantineDateTimeControlTester=jc,I.mantineEnumArrayRendererTester=Mc,I.mantineEnumCellTester=qa,I.mantineEnumControlTester=Kc,I.mantineHorizontalLayoutTester=Zc,I.mantineIntegerCellTester=La,I.mantineIntegerControlTester=Vc,I.mantineNumberCellTester=Fa,I.mantineNumberControlTester=Bc,I.mantineRenderers=rx,I.mantineTextCellTester=za,I.mantineTextControlTester=Wc,I.mantineVerticalLayoutTester=Qc,I.renderLayoutElements=ta,I.useApi=re,I.useAuth=ms,I.useBulkActions=Vu,I.useCustomFetch=Ix,I.useDebouncedChange=aa,I.useInfo=bs,I.useProxy=tr,I.withAjvProps=Wg,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});
176
+ export default theme;`}function es(e={},...t){const{breakpoints:r,mixins:n={},spacing:o,palette:s={},transitions:i={},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.":pt(20));const d=Ro(s),f=ic(e);let p=ze(f,{mixins:KC(f.breakpoints,n),palette:d,shadows:eE.slice(),typography:ZC(d,a),transitions:oE(i),zIndex:{...sE}});if(p=ze(p,c),p=t.reduce((y,b)=>ze(y,b),p),process.env.NODE_ENV!=="production"){const y=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],b=(h,S)=>{let x;for(x in h){const D=h[x];if(y.includes(x)&&Object.keys(D).length>0){if(process.env.NODE_ENV!=="production"){const A=Uo("",x);console.error([`MUI: The \`${S}\` component increases the CSS specificity of the \`${x}\` internal state.`,"You can not override it like this: ",JSON.stringify(h,null,2),"",`Instead, you need to use the '&.${A}' syntax:`,JSON.stringify({root:{[`&.${A}`]:D}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
177
+ `))}h[x]={}}}};Object.keys(p.components).forEach(h=>{const S=p.components[h].styleOverrides;S&&h.startsWith("Mui")&&b(S,h)})}return p.unstable_sxConfig={...yn,...c==null?void 0:c.unstable_sxConfig},p.unstable_sx=function(b){return Bt({sx:b,theme:this})},p.toRuntimeSource=Sc,p}function aE(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 lE=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=aE(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function _c(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function wc(e){return e==="dark"?lE:[]}function cE(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...o}=e,s=Ro(t);return{palette:s,opacity:{..._c(s.mode),...r},overlays:n||wc(s.mode),...o}}function uE(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 fE=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],dE=e=>(t,r)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let s=o;if(o==="class"&&(s=".%s"),o==="data"&&(s="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(s=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return fE(e.cssVarPrefix).forEach(a=>{i[a]=r[a],delete r[a]}),s==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:i}}:s?{[s.replace("%s",t)]:i,[`${n}, ${s.replace("%s",t)}`]:r}:{[n]:{...r,...i}}}if(s&&s!=="media")return`${n}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(s)return s.replace("%s",String(t))}return n};function pE(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function C(e,t,r){!e[t]&&r&&(e[t]=r)}function vr(e){return typeof e!="string"||!e.startsWith("hsl")?e:uc(e)}function it(e,t){`${t}Channel`in e||(e[`${t}Channel`]=mr(vr(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().
178
+ 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 hE(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Qe=e=>{try{return e()}catch{}},gE=(e="mui")=>DC(e);function ts(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=cE({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:s,...i}=es({...r,palette:{mode:o,...t==null?void 0:t.palette}});return e[n]={...t,palette:s,opacity:{..._c(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||wc(o)},i}function mE(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:i=uE,colorSchemeSelector:a=r.light&&r.dark?"media":void 0,rootSelector:u=":root",...c}=e,d=Object.keys(r)[0],f=n||(r.light&&d!=="light"?"light":d),p=gE(s),{[f]:y,light:b,dark:h,...S}=r,x={...S};let D=y;if((f==="dark"&&!("dark"in r)||f==="light"&&!("light"in r))&&(D=!0),!D)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:pt(21,f));const A=ts(x,D,c,f);b&&!x.light&&ts(x,b,void 0,"light"),h&&!x.dark&&ts(x,h,void 0,"dark");let _={defaultColorScheme:f,...A,cssVarPrefix:s,colorSchemeSelector:a,rootSelector:u,getCssVar:p,colorSchemes:x,font:{...qC(A.typography),...A.font},spacing:hE(c.spacing)};Object.keys(_.colorSchemes).forEach(j=>{const m=_.colorSchemes[j].palette,O=z=>{const q=z.split("-"),ee=q[1],fe=q[2];return p(z,m[ee][fe])};if(m.mode==="light"&&(C(m.common,"background","#fff"),C(m.common,"onBackground","#000")),m.mode==="dark"&&(C(m.common,"background","#000"),C(m.common,"onBackground","#fff")),pE(m,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),m.mode==="light"){C(m.Alert,"errorColor",le(m.error.light,.6)),C(m.Alert,"infoColor",le(m.info.light,.6)),C(m.Alert,"successColor",le(m.success.light,.6)),C(m.Alert,"warningColor",le(m.warning.light,.6)),C(m.Alert,"errorFilledBg",O("palette-error-main")),C(m.Alert,"infoFilledBg",O("palette-info-main")),C(m.Alert,"successFilledBg",O("palette-success-main")),C(m.Alert,"warningFilledBg",O("palette-warning-main")),C(m.Alert,"errorFilledColor",Qe(()=>m.getContrastText(m.error.main))),C(m.Alert,"infoFilledColor",Qe(()=>m.getContrastText(m.info.main))),C(m.Alert,"successFilledColor",Qe(()=>m.getContrastText(m.success.main))),C(m.Alert,"warningFilledColor",Qe(()=>m.getContrastText(m.warning.main))),C(m.Alert,"errorStandardBg",ce(m.error.light,.9)),C(m.Alert,"infoStandardBg",ce(m.info.light,.9)),C(m.Alert,"successStandardBg",ce(m.success.light,.9)),C(m.Alert,"warningStandardBg",ce(m.warning.light,.9)),C(m.Alert,"errorIconColor",O("palette-error-main")),C(m.Alert,"infoIconColor",O("palette-info-main")),C(m.Alert,"successIconColor",O("palette-success-main")),C(m.Alert,"warningIconColor",O("palette-warning-main")),C(m.AppBar,"defaultBg",O("palette-grey-100")),C(m.Avatar,"defaultBg",O("palette-grey-400")),C(m.Button,"inheritContainedBg",O("palette-grey-300")),C(m.Button,"inheritContainedHoverBg",O("palette-grey-A100")),C(m.Chip,"defaultBorder",O("palette-grey-400")),C(m.Chip,"defaultAvatarColor",O("palette-grey-700")),C(m.Chip,"defaultIconColor",O("palette-grey-700")),C(m.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),C(m.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),C(m.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),C(m.LinearProgress,"primaryBg",ce(m.primary.main,.62)),C(m.LinearProgress,"secondaryBg",ce(m.secondary.main,.62)),C(m.LinearProgress,"errorBg",ce(m.error.main,.62)),C(m.LinearProgress,"infoBg",ce(m.info.main,.62)),C(m.LinearProgress,"successBg",ce(m.success.main,.62)),C(m.LinearProgress,"warningBg",ce(m.warning.main,.62)),C(m.Skeleton,"bg",`rgba(${O("palette-text-primaryChannel")} / 0.11)`),C(m.Slider,"primaryTrack",ce(m.primary.main,.62)),C(m.Slider,"secondaryTrack",ce(m.secondary.main,.62)),C(m.Slider,"errorTrack",ce(m.error.main,.62)),C(m.Slider,"infoTrack",ce(m.info.main,.62)),C(m.Slider,"successTrack",ce(m.success.main,.62)),C(m.Slider,"warningTrack",ce(m.warning.main,.62));const z=Sn(m.background.default,.8);C(m.SnackbarContent,"bg",z),C(m.SnackbarContent,"color",Qe(()=>m.getContrastText(z))),C(m.SpeedDialAction,"fabHoverBg",Sn(m.background.paper,.15)),C(m.StepConnector,"border",O("palette-grey-400")),C(m.StepContent,"border",O("palette-grey-400")),C(m.Switch,"defaultColor",O("palette-common-white")),C(m.Switch,"defaultDisabledColor",O("palette-grey-100")),C(m.Switch,"primaryDisabledColor",ce(m.primary.main,.62)),C(m.Switch,"secondaryDisabledColor",ce(m.secondary.main,.62)),C(m.Switch,"errorDisabledColor",ce(m.error.main,.62)),C(m.Switch,"infoDisabledColor",ce(m.info.main,.62)),C(m.Switch,"successDisabledColor",ce(m.success.main,.62)),C(m.Switch,"warningDisabledColor",ce(m.warning.main,.62)),C(m.TableCell,"border",ce(Tn(m.divider,1),.88)),C(m.Tooltip,"bg",Tn(m.grey[700],.92))}if(m.mode==="dark"){C(m.Alert,"errorColor",ce(m.error.light,.6)),C(m.Alert,"infoColor",ce(m.info.light,.6)),C(m.Alert,"successColor",ce(m.success.light,.6)),C(m.Alert,"warningColor",ce(m.warning.light,.6)),C(m.Alert,"errorFilledBg",O("palette-error-dark")),C(m.Alert,"infoFilledBg",O("palette-info-dark")),C(m.Alert,"successFilledBg",O("palette-success-dark")),C(m.Alert,"warningFilledBg",O("palette-warning-dark")),C(m.Alert,"errorFilledColor",Qe(()=>m.getContrastText(m.error.dark))),C(m.Alert,"infoFilledColor",Qe(()=>m.getContrastText(m.info.dark))),C(m.Alert,"successFilledColor",Qe(()=>m.getContrastText(m.success.dark))),C(m.Alert,"warningFilledColor",Qe(()=>m.getContrastText(m.warning.dark))),C(m.Alert,"errorStandardBg",le(m.error.light,.9)),C(m.Alert,"infoStandardBg",le(m.info.light,.9)),C(m.Alert,"successStandardBg",le(m.success.light,.9)),C(m.Alert,"warningStandardBg",le(m.warning.light,.9)),C(m.Alert,"errorIconColor",O("palette-error-main")),C(m.Alert,"infoIconColor",O("palette-info-main")),C(m.Alert,"successIconColor",O("palette-success-main")),C(m.Alert,"warningIconColor",O("palette-warning-main")),C(m.AppBar,"defaultBg",O("palette-grey-900")),C(m.AppBar,"darkBg",O("palette-background-paper")),C(m.AppBar,"darkColor",O("palette-text-primary")),C(m.Avatar,"defaultBg",O("palette-grey-600")),C(m.Button,"inheritContainedBg",O("palette-grey-800")),C(m.Button,"inheritContainedHoverBg",O("palette-grey-700")),C(m.Chip,"defaultBorder",O("palette-grey-700")),C(m.Chip,"defaultAvatarColor",O("palette-grey-300")),C(m.Chip,"defaultIconColor",O("palette-grey-300")),C(m.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),C(m.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),C(m.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),C(m.LinearProgress,"primaryBg",le(m.primary.main,.5)),C(m.LinearProgress,"secondaryBg",le(m.secondary.main,.5)),C(m.LinearProgress,"errorBg",le(m.error.main,.5)),C(m.LinearProgress,"infoBg",le(m.info.main,.5)),C(m.LinearProgress,"successBg",le(m.success.main,.5)),C(m.LinearProgress,"warningBg",le(m.warning.main,.5)),C(m.Skeleton,"bg",`rgba(${O("palette-text-primaryChannel")} / 0.13)`),C(m.Slider,"primaryTrack",le(m.primary.main,.5)),C(m.Slider,"secondaryTrack",le(m.secondary.main,.5)),C(m.Slider,"errorTrack",le(m.error.main,.5)),C(m.Slider,"infoTrack",le(m.info.main,.5)),C(m.Slider,"successTrack",le(m.success.main,.5)),C(m.Slider,"warningTrack",le(m.warning.main,.5));const z=Sn(m.background.default,.98);C(m.SnackbarContent,"bg",z),C(m.SnackbarContent,"color",Qe(()=>m.getContrastText(z))),C(m.SpeedDialAction,"fabHoverBg",Sn(m.background.paper,.15)),C(m.StepConnector,"border",O("palette-grey-600")),C(m.StepContent,"border",O("palette-grey-600")),C(m.Switch,"defaultColor",O("palette-grey-300")),C(m.Switch,"defaultDisabledColor",O("palette-grey-600")),C(m.Switch,"primaryDisabledColor",le(m.primary.main,.55)),C(m.Switch,"secondaryDisabledColor",le(m.secondary.main,.55)),C(m.Switch,"errorDisabledColor",le(m.error.main,.55)),C(m.Switch,"infoDisabledColor",le(m.info.main,.55)),C(m.Switch,"successDisabledColor",le(m.success.main,.55)),C(m.Switch,"warningDisabledColor",le(m.warning.main,.55)),C(m.TableCell,"border",le(Tn(m.divider,1),.68)),C(m.Tooltip,"bg",Tn(m.grey[700],.92))}it(m.background,"default"),it(m.background,"paper"),it(m.common,"background"),it(m.common,"onBackground"),it(m,"divider"),Object.keys(m).forEach(z=>{const q=m[z];z!=="tonalOffset"&&q&&typeof q=="object"&&(q.main&&C(m[z],"mainChannel",mr(vr(q.main))),q.light&&C(m[z],"lightChannel",mr(vr(q.light))),q.dark&&C(m[z],"darkChannel",mr(vr(q.dark))),q.contrastText&&C(m[z],"contrastTextChannel",mr(vr(q.contrastText))),z==="text"&&(it(m[z],"primary"),it(m[z],"secondary")),z==="action"&&(q.active&&it(m[z],"active"),q.selected&&it(m[z],"selected")))})}),_=t.reduce((j,m)=>ze(j,m),_);const w={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:i,getSelector:dE(_)},{vars:P,generateThemeVars:F,generateStyleSheets:G}=LC(_,w);return _.vars=P,Object.entries(_.colorSchemes[_.defaultColorScheme]).forEach(([j,m])=>{_[j]=m}),_.generateThemeVars=F,_.generateStyleSheets=G,_.generateSpacing=function(){return sc(c.spacing,Vo(this))},_.getColorSchemeSelector=jC(a),_.spacing=_.generateSpacing(),_.shouldSkipGeneratingVar=i,_.unstable_sxConfig={...yn,...c==null?void 0:c.unstable_sxConfig},_.unstable_sx=function(m){return Bt({sx:m,theme:this})},_.toRuntimeSource=Sc,_}function Cc(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Ro({...r===!0?{}:r.palette,mode:t})})}function yE(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:o=r?void 0:{light:!0},defaultColorScheme:s=r==null?void 0:r.mode,...i}=e,a=s||"light",u=o==null?void 0:o[a],c={...o,...r?{[a]:{...typeof u!="boolean"&&u,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return es(e,...t);let d=r;"palette"in e||c[a]&&(c[a]!==!0?d=c[a].palette:a==="dark"&&(d={mode:"dark"}));const f=es({...e,palette:d},...t);return f.defaultColorScheme=a,f.colorSchemes=c,f.palette.mode==="light"&&(f.colorSchemes.light={...c.light!==!0&&c.light,palette:f.palette},Cc(f,"dark",c.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:f.palette},Cc(f,"light",c.light)),f}return!r&&!("light"in c)&&a==="light"&&(c.light=!0),mE({...i,colorSchemes:c,defaultColorScheme:a,...typeof n!="boolean"&&n},...t)}const bE=yE(),vE="$$material";function TE(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const SE=SC({themeId:vE,defaultTheme:bE,rootShouldForwardProp:e=>TE(e)&&e!=="classes"}),_E=MC;process.env.NODE_ENV!=="production"&&(re.node,re.object.isRequired);function wE(e){return kC(e)}function CE(e){return Uo("MuiSvgIcon",e)}Q_("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const EE=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${Et(t)}`,`fontSize${Et(r)}`]};return J_(o,CE,n)},xE=SE("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Et(r.color)}`],t[`fontSize${Et(r.fontSize)}`]]}})(_E(({theme:e})=>{var t,r,n,o,s,i,a,u,c,d,f,p,y,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.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:((i=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:i.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:((d=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:d.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,h])=>h&&h.main).map(([h])=>{var S,x;return{props:{color:h},style:{color:(x=(S=(e.vars??e).palette)==null?void 0:S[h])==null?void 0:x.main}}}),{props:{color:"action"},style:{color:(p=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:p.active}},{props:{color:"disabled"},style:{color:(b=(y=(e.vars??e).palette)==null?void 0:y.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),_n=$e.forwardRef(function(t,r){const n=wE({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:a="svg",fontSize:u="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:f,viewBox:p="0 0 24 24",...y}=n,b=$e.isValidElement(o)&&o.type==="svg",h={...n,color:i,component:a,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:b},S={};d||(S.viewBox=p);const x=EE(h);return l.jsxs(xE,{as:a,className:ew(x.root,s),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r,...S,...y,...b&&o.props,ownerState:h,children:[b?o.props.children:o,f?l.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(_n.propTypes={children:re.node,classes:re.object,className:re.string,color:re.oneOfType([re.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),re.string]),component:re.elementType,fontSize:re.oneOfType([re.oneOf(["inherit","large","medium","small"]),re.string]),htmlColor:re.string,inheritViewBox:re.bool,shapeRendering:re.string,sx:re.oneOfType([re.arrayOf(re.oneOfType([re.func,re.object,re.bool])),re.func,re.object]),titleAccess:re.string,viewBox:re.string}),_n.muiName="SvgIcon";function rs(e,t){function r(n,o){return l.jsx(_n,{"data-testid":`${t}Icon`,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=_n.muiName,$e.memo($e.forwardRef(r))}const AE=rs(l.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),OE=rs(l.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward"),$E=rs(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"),Yt=({children:e,...t})=>l.jsx(g.Table.Td,{...t,children:e}),PE=({errorMessages:e,id:t})=>l.jsx(g.Tooltip,{id:t,title:e,children:l.jsx(g.Indicator,{label:e.split(`
179
+ `).length,children:l.jsx(Kf,{})})}),IE={paddingLeft:0,paddingRight:0},kE=v.memo(function({numColumns:t,errors:r,label:n,description:o,path:s,addItem:i,schema:a,enabled:u,translations:c,rootSchema:d}){const f={bg:"transparent",size:"sm",c:"gray"},p=g.useProps("ActionIcon",f,{});return l.jsxs(g.Table.Tr,{children:[l.jsx(Yt,{colSpan:t,children:l.jsxs(g.Stack,{children:[l.jsxs(g.Grid,{justify:"flex-start",align:"center",gutter:"sm",children:[l.jsx(g.Grid.Col,{span:"content",children:l.jsx(g.Text,{children:n})}),l.jsx(g.Grid.Col,{span:"content",children:r.length!==0?l.jsx(g.Grid.Col,{span:"content",children:l.jsx(PE,{id:"tooltip-validation",errorMessages:r})}):null})]}),o&&l.jsx(g.Text,{size:"sm",children:o})]})}),u?l.jsx(Yt,{align:"right",style:IE,children:l.jsx(g.Tooltip,{id:"tooltip-add",title:c.addTooltip,position:"bottom",children:l.jsx(g.ActionIcon,{bg:p.bg,size:p.size,c:p.c,onClick:i(s,H.createDefaultValue(a,d)),children:l.jsx(Lr,{})})})}):null]})}),Ec={fixedCell:{width:"150px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"},fixedCellSmall:{width:"50px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"}},xc=(e,t,r,n,o)=>{if(t.type==="object")return Ac(t).map(s=>{var u,c;const i=H.Paths.compose(r,s),a={propName:s,schema:t,title:((c=(u=t.properties)==null?void 0:u[s])==null?void 0:c.title)??v_(s),rowPath:r,cellPath:i,enabled:n,cells:o};return l.jsx(e,{...a},i)});{const s={schema:t,rowPath:r,cellPath:r,enabled:n};return l.jsx(e,{...s},r)}},Ac=e=>e.type==="object"&&typeof e.properties=="object"?Object.keys(e.properties).filter(t=>e.properties[t].type!=="array"):[""],ME=({numColumns:e,translations:t})=>l.jsx(g.Table.Tr,{children:l.jsx(Yt,{colSpan:e,children:l.jsx(g.Text,{align:"center",children:t.noDataMessage})})}),DE=v.memo(function({title:t}){return l.jsx(g.Table.Th,{children:t})}),FE=(e,t)=>{const r=t.rowPath+(t.schema.type==="object"?"."+t.propName:""),n=H.formatErrorMessage(lT(H.errorsAt(r,t.schema,o=>o===r)(e.core.errors).map(o=>o.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}},Oc=e=>({type:"Control",scope:e,label:!1}),NE=v.memo(function({path:t,propName:r,schema:n,rootSchema:o,errors:s,enabled:i,renderers:a,cells:u,isValid:c}){return l.jsxs(Yt,{children:[n.properties?l.jsx(ue.DispatchCell,{schema:H.Resolve.schema(n,`#/properties/${H.encode(r)}`,o),uischema:Oc(`#/properties/${H.encode(r)}`),path:t,enabled:i,renderers:a,cells:u}):l.jsx(ue.DispatchCell,{schema:n,uischema:Oc("#"),path:t,enabled:i,renderers:a,cells:u}),l.jsx(g.Text,{size:"xs",children:c?"":s})]})}),LE=e=>{const t=ue.useJsonForms(),r=FE(t,e),n=ea(r.errors);return l.jsx(NE,{...r,isValid:n})},jE=({childPath:e,schema:t,rowIndex:r,openDeleteDialog:n,moveUpCreator:o,moveDownCreator:s,enableUp:i,enableDown:a,showSortButtons:u,enabled:c,cells:d,path:f,translations:p})=>{const y={bg:"transparent",size:"sm",c:"gray"},b=g.useProps("ActionIcon",y,{}),h=v.useMemo(()=>o(f,r),[o,f,r]),S=v.useMemo(()=>s(f,r),[s,f,r]);return l.jsxs(g.Table.Tr,{children:[xc(LE,t,e,c,d),c?l.jsx(Yt,{style:u?Ec.fixedCell:Ec.fixedCellSmall,children:l.jsxs(g.Grid,{justify:"flex-end",align:"center",children:[u?l.jsxs(v.Fragment,{children:[l.jsx(g.Grid.Col,{span:"content",children:l.jsx(g.Tooltip,{id:"tooltip-up",title:p.up,position:"bottom",opened:i?void 0:!1,children:l.jsx(g.ActionIcon,{bg:b.bg,size:b.size,c:b.c,"aria-label":p.upAriaLabel,onClick:h,disabled:!i,children:l.jsx(OE,{})})})}),l.jsx(g.Grid.Col,{span:"content",children:l.jsx(g.Tooltip,{id:"tooltip-down",title:p.down,position:"bottom",opened:a?void 0:!1,children:l.jsx(g.ActionIcon,{bg:b.bg,size:b.size,c:b.c,"aria-label":p.downAriaLabel,onClick:S,disabled:!a,children:l.jsx(AE,{})})})})]}):null,l.jsx(g.Grid.Col,{span:"content",children:l.jsx(g.Tooltip,{id:"tooltip-remove",title:p.removeTooltip,position:"bottom",children:l.jsx(g.ActionIcon,{bg:b.bg,size:b.size,c:b.c,"aria-label":p.removeAriaLabel,onClick:()=>n(e,r),children:l.jsx($E,{})})})})]})}):null]},e)},$c=v.memo(jE),zE=({data:e,path:t,schema:r,openDeleteDialog:n,moveUp:o,moveDown:s,uischema:i,config:a,enabled:u,cells:c,translations:d})=>{if(e===0)return l.jsx(ME,{numColumns:Ac(r).length+1,translations:d});const p=ka({},a,i.options);return l.jsx(v.Fragment,{children:N_(e).map(y=>{const b=H.Paths.compose(t,`${y}`);return l.jsx($c,{childPath:b,rowIndex:y,schema:r,openDeleteDialog:n,moveUpCreator:o,moveDownCreator:s,enableUp:y!==0,enableDown:y!==e-1,showSortButtons:p.showSortButtons||p.showArrayTableSortButtons,enabled:u,cells:c,path:t,translations:d},b)})})};class Pc extends v.Component{constructor(){super(...arguments);Eu(this,"addItem",(r,n)=>this.props.addItem(r,n))}render(){const{label:r,description:n,path:o,schema:s,rootSchema:i,uischema:a,errors:u,openDeleteDialog:c,visible:d,enabled:f,cells:p,translations:y}=this.props,b=a,h=s.type==="object",S=h?xc(DE,s,o,f,p):void 0;return d?l.jsxs(g.Table,{children:[l.jsxs(g.Table.Thead,{children:[l.jsx(kE,{errors:u,label:r,description:n,addItem:this.addItem,numColumns:h?S.length:1,path:o,uischema:b,schema:s,rootSchema:i,enabled:f,translations:y}),h&&l.jsxs(g.Table.Tr,{children:[S,f?l.jsx(g.Table.Th,{}):null]})]}),l.jsx(g.Table.Tbody,{children:l.jsx(zE,{openDeleteDialog:c,translations:y,...this.props})})]}):null}}const Ic=v.memo(function({open:t,onClose:r,onConfirm:n,onCancel:o,title:s,message:i,acceptText:a,declineText:u}){return l.jsxs(g.Modal,{opened:t,withCloseButton:!1,centered:!0,title:s,keepMounted:!0,onClose:r,children:[i,l.jsxs(g.Flex,{justify:"flex-end",align:"center",gap:"sm",children:[l.jsx(g.Button,{onClick:o,children:u}),l.jsx(g.Button,{onClick:n,children:a})]})]})}),BE=e=>{const[t,r]=v.useState(!1),[n,o]=v.useState(void 0),[s,i]=v.useState(void 0),{removeItems:a,visible:u}=e,c=v.useCallback((y,b)=>{r(!0),o(y),i(b)},[r,o,i]),d=v.useCallback(()=>r(!1),[r]),f=v.useCallback(()=>{const y=n.substring(0,n.lastIndexOf("."));a(y,[s])(),r(!1)},[r,n,s]),p=v.useCallback(()=>r(!1),[r]);return u?l.jsxs(l.Fragment,{children:[l.jsx(Pc,{...e,openDeleteDialog:c}),l.jsx(Ic,{open:t,onCancel:d,onConfirm:f,onClose:p,acceptText:e.translations.deleteDialogAccept,declineText:e.translations.deleteDialogDecline,title:e.translations.deleteDialogTitle,message:e.translations.deleteDialogMessage})]}):null},kc=H.rankWith(3,H.or(H.isObjectArrayControl,H.isPrimitiveArrayControl)),Mc=ue.withJsonFormsArrayLayoutProps(BE),UE=({errors:e,description:t,label:r,required:n,path:o,options:s,data:i,enabled:a,handleChange:u})=>l.jsx(g.MultiSelect,{disabled:!a,data:s,defaultValue:i,label:r,description:t,required:n,error:e,onChange:c=>{u(o,c)}}),VE=e=>e.oneOf!==void 0&&e.oneOf.length>0&&e.oneOf.every(t=>t.const!==void 0),GE=e=>e.type==="string"&&e.enum!==void 0,Dc=H.rankWith(6,H.and(H.uiTypeIs("Control"),H.and(H.schemaMatches(e=>H.hasType(e,"array")&&!Array.isArray(e.items)&&e.uniqueItems===!0),H.schemaSubPathMatches("items",(e,t)=>{const r=e.$ref?H.resolveSchema(t,e.$ref,t):e;return VE(r)||GE(r)})))),Fc=ue.withJsonFormsMultiEnumProps(UE),WE=e=>{const{description:t,errors:r,data:n,handleChange:o,path:s,label:i,required:a,enabled:u}=e,c=g.useProps(s,{},{});return Object.keys(c).forEach(d=>{typeof c[d]=="function"&&(c[d]=c[d](n))}),l.jsx(ct.DateInput,{valueFormat:"DD.MM.YYYY",disabled:!u,label:i,description:t,error:r,required:a,value:n?new Date(n):null,onChange:d=>{if(d instanceof Date){const f=new Date(d.getTime()-d.getTimezoneOffset()*6e4);o(s,f.toISOString().substring(0,10))}},...c})},Nc=H.rankWith(5,H.isDateControl),Lc=ue.withJsonFormsControlProps(WE),HE=e=>{const{description:t,errors:r,data:n,handleChange:o,path:s,label:i,required:a,enabled:u}=e,c=g.useProps(s,{},{});return Object.keys(c).forEach(d=>{typeof c[d]=="function"&&(c[d]=c[d](n))}),l.jsx(ct.DateTimePicker,{valueFormat:"DD.MM.YYYY HH:mm",disabled:!u,label:i,description:t,error:r,required:a,value:n?new Date(n):null,onChange:d=>{if(d instanceof Date){const f=new Date(d);o(s,f.toISOString())}},...c})},jc=H.rankWith(5,H.isDateTimeControl),zc=ue.withJsonFormsControlProps(HE),YE=e=>l.jsx(Zr,{...e}),Bc=H.rankWith(3,H.isNumberControl),Uc=ue.withJsonFormsControlProps(YE),qE=e=>l.jsx(Zr,{...e}),Vc=H.rankWith(3,H.isIntegerControl),Gc=ue.withJsonFormsControlProps(qE),KE=e=>l.jsx(Ma,{...e}),Wc=H.rankWith(3,H.isStringControl),Hc=ue.withJsonFormsControlProps(KE),JE=e=>l.jsx(Da,{...e}),Yc=H.rankWith(3,H.isBooleanControl),qc=ue.withJsonFormsControlProps(JE),ZE=({data:e,options:t,handleChange:r,path:n,...o})=>{const{description:s,errors:i,label:a,required:u,enabled:c}=o,d=g.useProps(n,{},{});return Object.keys(d).forEach(f=>{typeof d[f]=="function"&&(d[f]=d[f](e))}),l.jsx(g.Select,{disabled:!c,data:t,value:e||null,label:a,description:s,required:u,error:i,searchable:!0,onChange:f=>{r(n,f)},...d})},Kc=H.rankWith(5,H.isEnumControl),Jc=ue.withJsonFormsEnumProps(ue.withTranslateProps(v.memo(ZE)),!1),XE=e=>{const{text:t,visible:r}=e;return r?l.jsx(g.Title,{fw:"bold",size:"xl",children:t}):null},QE=H.rankWith(3,H.isLabelable),RE=ue.withJsonFormsLabelProps(XE),Zc=H.rankWith(5,H.uiTypeIs("HorizontalLayout")),ex=({uischema:e,renderers:t,cells:r,schema:n,path:o,enabled:s})=>{const a={elements:e.elements,schema:n,path:o,enabled:s,direction:"row"};return l.jsx(wo,{...a,renderers:t,cells:r})},Xc=ue.withJsonFormsLayoutProps(ex),Qc=H.rankWith(5,H.uiTypeIs("VerticalLayout")),tx=({uischema:e,schema:t,path:r,enabled:n,renderers:o,cells:s})=>{const a={elements:e.elements,schema:t,path:r,enabled:n,direction:"column"};return l.jsx(wo,{...a,renderers:o,cells:s})},Rc=ue.withJsonFormsLayoutProps(tx),rx=[{tester:Nc,renderer:Lc},{tester:jc,renderer:zc},{tester:Bc,renderer:Uc},{tester:Vc,renderer:Gc},{tester:Wc,renderer:Hc},{tester:Yc,renderer:qc},{tester:Kc,renderer:Jc},{tester:kc,renderer:Mc},{tester:Dc,renderer:Fc},{tester:Zc,renderer:Xc},{tester:Qc,renderer:Rc},{tester:QE,renderer:RE}],nx=[{tester:za,cell:Ba},{tester:Fa,cell:Na},{tester:La,cell:ja},{tester:Ua,cell:Va},{tester:Ga,cell:Wa},{tester:Ha,cell:Ya},{tester:qa,cell:Ka}];function ox(e,t){const r=te(),n=yt(),o=v.useCallback(({row:s,...i})=>l.jsx(Ze,{fallback:l.jsx(to,{id:s.original.id}),functionProps:[{api:r,auth:n,data:s.original,mrtProps:{row:s,...i}}],children:t}),[r,n,t]);return{enableEditing:!e,editDisplayMode:"modal",renderRowActions:o}}function sx(e,t){return{enableRowSelection:!!e||!!t}}function ix(e){return e&&typeof e=="object"&&!Array.isArray(e)}const wn=(...e)=>{const t={};return e.forEach(r=>{r&&Object.keys(r).forEach(n=>{ix(r[n])&&n!=="ref"&&t[n]?t[n]=wn(t[n],r[n]):t[n]=r[n]})}),t},Tr=(e={},...t)=>t.reduce((r,n)=>wn(r,e[n]),{}),ax=(e,t)=>e===void 0?t:e,lx=(e,t=[])=>typeof e=="function"?e(...t):e;function cx({col:e,colFilter:t,onClick:r,...n}){return l.jsxs(g.Menu,{shadow:"md",width:"target",...n,children:[l.jsx(g.Menu.Target,{children:l.jsx(g.Button,{children:"Add filter"})}),l.jsx(g.Menu.Dropdown,{children:t.filters.filter(o=>Pt(o.operator)).map(o=>l.jsx(g.Menu.Item,{onClick:()=>r({col:e,opr:o.operator,value:""}),children:o.name},`${t.label}-${o.name}`))})]})}function ux({col:e,colFilter:t,filterNameMap:r}){const{queryParams:n,setQueryParams:o}=te(),s=tr.useForm({initialValues:{filters:(n==null?void 0:n.filters)||[]}}),[i]=be.useDebouncedValue(s.getValues(),_t);be.useDidUpdate(()=>{const c=i.filters.filter(d=>d.value);o({filters:c})},[i]);const a=s.getValues().filters,u=a.map((c,d)=>c.col===e&&Pt(c.opr)?l.jsxs(v.Fragment,{children:[l.jsx(g.Grid.Col,{span:1.5,py:0,children:l.jsx(g.Center,{h:"100%",w:"100%",children:l.jsx(g.CloseButton,{onClick:()=>s.removeListItem("filters",d),size:"md",title:"Remove filter",variant:"outline"})})}),l.jsx(g.Grid.Col,{span:10.5,py:0,children:c.opr==="in"?l.jsx(Pi,{form:s,name:`filters.${d}.value`,label:r[c.opr],comboboxProps:{withinPortal:!1}}):l.jsx(zr,{form:s,name:`filters.${d}.value`,label:r[c.opr],schema:t.schema,withinPortal:!1,filter:!0})}),d>=0&&d+1<a.length&&l.jsx(g.Grid.Col,{span:12,py:0,children:l.jsx(g.Divider,{my:"sm",label:"AND",align:"center"})})]},`${c.col}-${d}`):null).filter(Boolean);return l.jsxs(g.Grid,{w:"100%",gap:"md",gutter:"xs",children:[u.length?u:l.jsx(g.Grid.Col,{span:12,children:l.jsx(g.Text,{align:"center",c:"gray",style:{fontStyle:"italic"},children:"No filters"})}),l.jsx(g.Grid.Col,{span:12,children:l.jsx(g.Stack,{children:l.jsx(cx,{col:e,colFilter:t||{filters:[]},onClick:c=>s.insertListItem("filters",c),withinPortal:!1})})})]})}const fx={root:"_root_1navk_1"};function dx({filterNameMap:e,col:t,opr:r,table:n}){return Object.entries(e).filter(([o])=>o.startsWith($t)).map(([o,s])=>l.jsx(g.Checkbox.Card,{className:fx.root,radius:"sm",checked:o===r,onClick:()=>n.setColumnFilterFns(i=>({...i,[t]:o})),children:l.jsxs(g.Group,{wrap:"nowrap",align:"flex-start",children:[l.jsx(g.Checkbox.Indicator,{}),l.jsx(g.Text,{children:s})]})},o))}function px({mode:e,setMode:t,close:r,col:n,colFilter:o,opr:s,table:i,filterNameMap:a}){return l.jsxs(g.Stack,{gap:"sm",children:[l.jsxs(g.Group,{gap:0,justify:"space-between",align:"center",children:[l.jsx(g.Text,{children:"Filter Menu"}),l.jsxs(g.Group,{gap:"0.25rem",style:{flexDirection:"row-reverse"},children:[l.jsx(g.CloseButton,{onClick:r,title:"Close Filter Menu"}),l.jsx(g.SegmentedControl,{size:"sm",data:["Basic","Advanced"],value:e,onChange:t})]})]}),l.jsx(g.Divider,{}),l.jsxs(g.Text,{ta:"center",children:[e," Filters"]}),l.jsxs(g.Stack,{gap:"0.25rem",children:[e==="Basic"&&l.jsx(dx,{filterNameMap:a,col:n,opr:s,table:i}),e==="Advanced"&&l.jsx(ux,{col:n,colFilter:o,filterNameMap:a})]})]})}const qt=e=>e!=null&&e!=="",eu=v.forwardRef(({clearIcon:e,...t},r)=>{const{value:n,onChange:o,leftInputProps:s,rightInputProps:i,groupProps:a,...u}=t,[c,d]=v.useState([null,null]);v.useEffect(()=>{n||d([null,null])},[n]),v.useEffect(()=>{const S=JSON.stringify(c);let x=null;return c.every(qt)&&S!==n?x=setTimeout(()=>{o(JSON.stringify(c))},_t):c.every(D=>!qt(D))&&(x=setTimeout(()=>{o(void 0)},_t)),()=>clearTimeout(x)},[c]);const f=v.useCallback((S,x)=>{d(D=>{const A=[...D];return A[x]=S,A})},[]);let[p,y]=c;const b=qt(y)&&!qt(p),h=qt(p)&&!qt(y);return l.jsxs(g.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...a,children:[l.jsx(g.NumberInput,{styles:{wrapper:{marginBottom:0}},...u,value:p,onChange:S=>f(S,0),placeholder:b?"Start value is required":"Start value",error:b&&" ",ref:r,...s}),l.jsx(g.NumberInput,{styles:{wrapper:{marginBottom:0}},...u,value:y,onChange:S=>f(S,1),placeholder:h?"End value is required":"End value",error:h&&" ",...i})]})});eu.displayName="BasicHeaderBetweenInput";const Kt=e=>e,tu=v.forwardRef(({clearIcon:e,...t},r)=>{const{value:n,onChange:o,leftInputProps:s,rightInputProps:i,groupProps:a,...u}=t,[c,d]=v.useState([null,null]);v.useEffect(()=>{n||d([null,null])},[n]),v.useEffect(()=>{const S=JSON.stringify(c);let x=null;return c.every(Kt)&&S!==n?x=setTimeout(()=>{o(JSON.stringify(c))},_t):c.every(D=>!Kt(D))&&(x=setTimeout(()=>{o(void 0)},_t)),()=>clearTimeout(x)},[c]);const f=v.useCallback((S,x)=>{S&&(S=S.toISOString()),d(D=>{const A=[...D];return A[x]=S,A})},[]);let[p,y]=c;p=p?new Date(p):null,y=y?new Date(y):null;const b=Kt(y)&&!Kt(p),h=Kt(p)&&!Kt(y);return l.jsxs(g.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...a,children:[l.jsx(ct.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...u,value:p,onChange:S=>f(S,0),placeholder:b?"Start date is required":"Start date",error:b&&" ",ref:r,...s}),l.jsx(ct.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...u,value:y,onChange:S=>f(S,1),placeholder:h?"End date is required":"End date",error:h&&" ",...i})]})});tu.displayName="BasicHeaderDateBetweenInput";const ru=v.forwardRef(({clearIcon:e,...t},r)=>l.jsx(g.TextInput,{ref:r,rightSection:e,...t}));ru.displayName="BasicHeaderTextInput";const nu=v.forwardRef(({component:e,...t},r)=>{const n=te(),o=yt(),s=v.useMemo(()=>[{api:n,auth:o,componentProps:{...t,ref:r}}],[n,o,t,r]);return l.jsx(Ze,{ref:r,fallback:l.jsx(ru,{...t}),functionProps:s,children:e})});nu.displayName="HeaderInput";const ns={[Oi]:({componentProps:e})=>l.jsx(eu,{...e}),[$i]:({componentProps:e})=>l.jsx(tu,{...e})},ou=v.forwardRef(({label:e,disabled:t,children:r,...n},o)=>t?v.cloneElement(r,{ref:o}):l.jsx(g.Tooltip,{label:e,...n,children:v.cloneElement(r,{ref:o})}));ou.displayName="FilterIconWrapper";const su=v.forwardRef(({indicator:e,children:t},r)=>e?l.jsx(g.Indicator,{zIndex:20,size:16,label:e,children:v.cloneElement(t,{ref:r})}):v.cloneElement(t,{ref:r}));su.displayName="FilterIndicatorWrapper";const hx=(e,t)=>{var n,o,s;const r=(s=(o=(n=e==null?void 0:e.filters)==null?void 0:n[t])==null?void 0:o.schema)==null?void 0:s.type;if(!r)return Ai;switch(r){case"Date":case"DateTime":return $i;case"Integer":case"Float":return Oi;default:return Ai}};function gx({headerConfig:e,column:t,table:r,...n}){var J,B,Z,X;const{info:o,data:s,queryParams:i,setQueryParams:a}=te(),u=te(),c=yt(),{filterComponent:d,filterProps:f,filterModeDescription:p,filterMenu:y,defaultOpr:b=hx(o,t.id),configurationMode:h="basic",filterAdvancedFilters:S}=e;v.useEffect(()=>{process.env.NODE_ENV==="development"&&S!==void 0&&console.warn("filterAdvancedFilters is deprecated, please use filterMenu instead")},[]);const[x,D]=v.useState("Basic"),[A,{close:_,toggle:w}]=be.useDisclosure(),P=((J=r.getState().columnFilterFns)==null?void 0:J[t.id])||b,F=v.useMemo(()=>P,[P]),G=tr.useField({initialValue:""}),j=v.useMemo(()=>(o==null?void 0:o.filters[t.id])||{},[t.id,o==null?void 0:o.filters]),m=v.useMemo(()=>{var N;return((N=j==null?void 0:j.filters)==null?void 0:N.reduce((L,Q)=>({...L,[Q.operator]:Q.name}),{}))||{}},[j==null?void 0:j.filters]),O=v.useMemo(()=>(i==null?void 0:i.filters.filter(N=>N.col===t.id&&Pt(N.opr)).map(N=>({...N})))||[],[i,t.id]),z=v.useMemo(()=>i==null?void 0:i.filters.find(N=>N.col===t.id&&N.opr===F),[t.id,F,i==null?void 0:i.filters]),[q]=be.useDebouncedValue(G.getInputProps().value,_t),ee=be.useMounted(),fe=v.useCallback(()=>{G.reset(),t.setFilterValue(void 0)},[]);v.useEffect(()=>{ee&&t.setFilterValue(q??void 0)},[q]),v.useEffect(()=>{if(!ee)return;const N=t.getFilterValue();N===void 0?fe():G.getInputProps().onChange(N||"")},[t.getFilterValue()]),v.useEffect(()=>{ee&&(z||fe())},[z]),be.useDidUpdate(()=>{G.reset()},[F]),be.useDidUpdate(()=>{let N=!1;const L=i==null?void 0:i.filters.map(M=>{if(M.opr.startsWith($t)&&M.col===t.id){if(M.opr===F)N=!0;else return null;return q?{...M,value:q}:null}return M}).filter(Boolean);!N&&q&&L.push({col:t.id,opr:F,value:q});const Q=JSON.stringify(L),Se=JSON.stringify(i.filters);Q!==Se&&a({filters:L})},[q]);const se=v.useMemo(()=>{var Q;const N={variant:"subtle"};return!((Q=j==null?void 0:j.filters)!=null&&Q.length)&&(N.disabled=!0,N.c="gray"),N},[j==null?void 0:j.filters]),ye=v.useMemo(()=>ax(h==="basic"?d:d==null?void 0:d[F],ns==null?void 0:ns[F]),[h,d,F]),_e=v.useMemo(()=>({...se,size:"sm",onClick:fe,title:"Clear filter"}),[se,fe]),W=v.useMemo(()=>[{api:u,auth:c,mrtProps:{column:t,table:r,...n}}],[u,c,t,n,r]),E=v.useMemo(()=>{var N;return[{...W[0],componentProps:{label:"Filter Menu",disabled:!((N=j==null?void 0:j.filters)!=null&&N.length),indicator:O.length,aiProps:se,onClick:w}}]},[se,(B=j==null?void 0:j.filters)==null?void 0:B.length,O.length,W,w]),$=v.useMemo(()=>[{...W[0],componentProps:{filterMode:m==null?void 0:m[F]}}],[m,W,F]),K=lx(h==="basic"?f:Tr(f,F),W),V=v.useMemo(()=>({...K,cleariconprops:_e}),[_e,K]);return l.jsxs(g.Popover,{opened:A,closeOnClickOutside:!0,onChange:w,shadow:"md",withArrow:!0,position:"bottom-end",width:"target",children:[l.jsx(g.Popover.Target,{children:l.jsxs(g.Stack,{w:"100%",gap:"0.25rem",children:[l.jsxs(g.Group,{gap:"xs",justify:"space-between",wrap:"nowrap",children:[l.jsx(nu,{component:ye,field:G,clearIcon:G.isDirty()&&l.jsx(g.ActionIcon,{..._e,children:l.jsx(rd,{})}),disabled:!m[F],placeholder:`Filter by ${((Z=s==null?void 0:s.label_columns)==null?void 0:Z[t.id])||t.id}`,style:{fontWeight:"normal"},w:"100%",ref:N=>{N&&(r.refs.filterInputRefs.current[`${t.id}-0`]=N)},...G.getInputProps(),...V}),l.jsx(Ze,{fallback:l.jsx(ou,{label:"Filter Menu",disabled:!((X=j==null?void 0:j.filters)!=null&&X.length),position:"bottom-start",withArrow:!0,arrowPosition:"side",children:l.jsx(su,{indicator:O.length,children:l.jsx(g.ActionIcon,{...se,onClick:w,children:l.jsx(Zf,{})})})}),functionProps:E,children:y===void 0?S:y})]}),l.jsx(Ze,{fallback:l.jsxs(g.Input.Description,{size:"xs",fw:"normal",children:["Filter Mode: ",m==null?void 0:m[F]]}),functionProps:$,children:p})]})}),l.jsx(g.Popover.Dropdown,{children:l.jsx(px,{mode:x,setMode:D,close:_,col:t.id,colFilter:j,filterNameMap:m,opr:F,table:r})})]})}function mx({highlight:e,truncate:t,children:r}){return Array.isArray(r)?r.map((n,o)=>{var s;return(s=t==null?void 0:t[o])!=null&&s.truncated?l.jsx(g.Tooltip,{label:t[o].original,children:l.jsx(g.Highlight,{highlight:e,children:t[o].truncated},o)},o):l.jsx(g.Highlight,{highlight:e,children:n},o)}):t!=null&&t.truncated?l.jsx(g.Tooltip,{label:t.original,children:l.jsx(g.Highlight,{highlight:e,children:t.truncated})}):l.jsx(g.Highlight,{highlight:e,children:r})}function yx(e,t,r,n){const{data:o,specialKey:s}=te(),i=te(),a=yt();return{columns:v.useMemo(()=>(o==null?void 0:o.list_columns.map(c=>({accessorKey:c,header:c.split("_").map(be.upperFirst).join(" "),Header:d=>{var f,p;return l.jsx(Ze,{fallback:(f=o==null?void 0:o.label_columns)==null?void 0:f[c],functionProps:[{api:i,auth:a,mrtProps:d}],children:(p=Tr(t,s.all,c))==null?void 0:p.component})},Filter:d=>l.jsx(gx,{headerConfig:Tr(t,s.all,c),...d}),enableSorting:(o==null?void 0:o.order_columns.includes(c))||(o==null?void 0:o.order_columns.includes(`${c}.id`)),Cell:({cell:d,table:f,column:p,...y})=>{const b=f.getState().globalFilter,h=p.getFilterValue()||"",{component:S,separator:x,truncate:D}=Tr(r,s.all,c);let A=[];b&&A.push(...b.split(n).map(F=>F.trim())),h&&typeof h=="string"&&A.push(...h.split(n).map(F=>F.trim()));let _=Ys(d.getValue());typeof _=="number"?_=_.toLocaleString():_==null&&(_=""),x&&(_=_.split(x));let w={};D&&(Array.isArray(_)?w=_.map(F=>({original:F,truncated:F.length>D?`${F.slice(0,D)}...`:null})):w={original:_,truncated:_.length>D?`${_.slice(0,D)}...`:null});const P=[{api:i,auth:a,data:d.row.original,highlight:A,componentProps:{value:_},mrtProps:{cell:d,table:f,column:p,...y}}];return l.jsx(Ze,{fallback:l.jsx(mx,{highlight:A,truncate:w,children:_}),functionProps:P,children:S})},...e==null?void 0:e[c]})))||[],[o==null?void 0:o.list_columns,o==null?void 0:o.order_columns,o==null?void 0:o.label_columns,e,i,a,t,s.all,r,n]),manualFiltering:!0}}function bx(){const{data:e,loading:t}=te();return{data:(e==null?void 0:e.result)||[],rowCount:(e==null?void 0:e.count)||0,state:{showLoadingOverlay:t}}}function vx(e){const{data:t}=te();return e?{mantineTableBodyRowProps:({row:r})=>({onClick:()=>{const n=t.ids[r.id];e(n,r.original)},style:{cursor:"pointer"}})}:null}function Tx(){const{queryParams:e,setQueryParams:t,info:r}=te(),[n,o]=v.useState(""),[s]=be.useDebouncedValue(n,_t),i=v.useMemo(()=>{var c,d;return((d=(c=e==null?void 0:e.filters)==null?void 0:c.find(f=>f.opr===cr))==null?void 0:d.value)||""},[e==null?void 0:e.filters]),a=v.useMemo(()=>{var c;return(c=Object.entries((r==null?void 0:r.filters)||{}).find(([,d])=>d.filters.find(f=>f.operator===cr)))==null?void 0:c[0]},[r==null?void 0:r.filters]);be.useDidUpdate(()=>{i!==(s||"")&&o(i)},[i]),be.useDidUpdate(()=>{var y;const c=((y=e==null?void 0:e.filters)==null?void 0:y.filter(b=>b.opr!==cr))||[],d={col:a,opr:cr,value:s};s&&c.push(d);const f=JSON.stringify(c),p=JSON.stringify((e==null?void 0:e.filters)||[]);f!==p&&t({page:0,filters:c})},[s]);const u=v.useMemo(()=>{const c={disabled:!a};return a||(c.placeholder="No global filter available"),c},[a]);return{manualFiltering:!0,onGlobalFilterChange:o,state:{globalFilter:n},mantineSearchTextInputProps:u}}function Sx(e){const{data:t,queryParams:r,setQueryParams:n}=te(),o=v.useMemo(()=>({pageIndex:(r==null?void 0:r.page)||Vd,pageSize:(r==null?void 0:r.page_size)||Gd}),[r==null?void 0:r.page,r==null?void 0:r.page_size]),s=v.useCallback(i=>{const a=i(o);!(t!=null&&t.count)&&a.pageIndex===0||n({page:a.pageIndex,page_size:a.pageSize})},[t==null?void 0:t.count,o,n]);return{enablePagination:!e,manualPagination:!0,state:{pagination:o},onPaginationChange:s}}function _x(e){const{ref:t,height:r}=be.useElementSize(),{ref:n,height:o}=be.useElementSize(),s=v.useMemo(()=>{const c={h:"100%",withBorder:e};return e||(c.shadow=void 0),c},[e]),i=v.useMemo(()=>({ref:n}),[n]),a=v.useMemo(()=>({ref:t,pos:"sticky",bottom:0}),[t]),u=v.useMemo(()=>({h:`calc(100% - ${o+r}px)`}),[o,r]);return{mantinePaperProps:s,mantineTopToolbarProps:i,mantineBottomToolbarProps:a,mantineTableContainerProps:u}}function wx(){const{queryParams:e,setQueryParams:t,data:r}=te(),n=v.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]),o=v.useCallback(s=>{const i=s(n);if(!i.length){t({order_column:null,order_direction:null});return}const a=i[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:o}}function Cx(...e){const[t,r]=v.useState(!1),n={variant:"transparent",size:"md",c:"gray"},o=g.useProps("ActionIcon",n,e);return l.jsxs(l.Fragment,{children:[l.jsx(g.Tooltip,{label:"Add Item",children:l.jsx(g.ActionIcon,{variant:o.variant,size:o.size,c:o.c,className:"filterButton",onClick:()=>{r(!0)},children:l.jsx(Lr,{})})}),l.jsx(ro,{opened:t,onClose:()=>{r(!1)}})]})}function Ex(...e){const[t,r]=v.useState(!1),{download:n}=te(),o={variant:"transparent",size:"md",c:"gray"},s=g.useProps("ActionIcon",o,e);return t?l.jsx(g.ThemeIcon,{variant:"transparent",size:s.size,c:s.c,children:l.jsx(g.Loader,{size:"100%",color:s.c})}):l.jsx(g.Tooltip,{label:"Download",children:l.jsx(g.ActionIcon,{variant:s.variant,size:s.size,c:s.c,className:"filterButton",onClick:()=>{r(!0),n("download").then(()=>r(!1))},children:l.jsx(Js,{})})})}function xx(...e){const[t,r]=v.useState(!1),{loading:n,refetch:o}=te(),s={variant:"transparent",size:"md",c:"gray"},i=g.useProps("ActionIcon",s,e);return v.useEffect(()=>{n||r(!1)},[n]),t?l.jsx(g.ThemeIcon,{variant:"transparent",size:i.size,c:i.c,children:l.jsx(g.Loader,{size:"100%",color:i.c})}):l.jsx(g.Tooltip,{label:"Refresh",children:l.jsx(g.ActionIcon,{variant:i.variant,size:i.size,c:i.c,className:"filterButton",onClick:()=>{r(!0),o()},children:l.jsx(ed,{})})})}const os={toggleGlobalFilter:1,filter:2,download:3,add:4,refresh:5,showHideColumns:6,toggleDensePadding:7,toggleFullScreen:8};function Ax(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(Ex,{},"basic-3"),4:(t==null?void 0:t["4"])&&l.jsx(Cx,{},"basic-4"),5:l.jsx(xx,{},"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 Ox(e={},t,r){const{info:n,queryParams:o,setQueryParams:s}=te(),i=te(),a=yt(),{customizer:u,custom:c}=e,d=v.useMemo(()=>t?[{label:"All",value:"[]"},...t.map(b=>({label:b.name,value:JSON.stringify(b.value)}))]:[],[t]),f=v.useMemo(()=>d.length?l.jsx(g.SegmentedControl,{value:JSON.stringify((o==null?void 0:o.filters)||[]),onChange:b=>s({filters:JSON.parse(b)}),data:d}):null,[o==null?void 0:o.filters,d,s]),p=v.useCallback(({table:b})=>{const h=[{api:i,auth:a,mrtProps:{table:b}}],S={3:n==null?void 0:n.permissions.includes("can_download"),4:n==null?void 0:n.permissions.includes("can_post")},x=Ax(b,S);Object.entries(u||{}).forEach(([A,_])=>{A in os&&(x[os[A]]=l.jsx(Ze,{fallback:x[os[A]],functionProps:h,children:_},`custom-${A}`))});let D=Object.values(x);return Object.entries(c||{}).forEach(([A,_])=>{A=Number(A)-1;const w=l.jsx(Ze,{functionProps:h,children:_},`order-${A}`);A>D.length?D.push(w):D=[...D.slice(0,A),w,...D.slice(A)]}),l.jsx(g.Flex,{gap:"0.125rem",align:"center",children:D})},[i,a,c,u,n==null?void 0:n.permissions]),y=v.useMemo(()=>{const b={};return f&&(b.renderTopToolbarCustomActions=()=>l.jsx(g.Group,{justify:"space-between",children:l.jsx(g.Box,{children:f})}),b.positionToolbarAlertBanner="bottom"),b},[f]);return{renderToolbarInternalActions:p,enableTopToolbar:!r,enableFilters:(u==null?void 0:u.filter)!==null,...y}}function $x(){const{data:e}=te();return v.useMemo(()=>(e==null?void 0:e.result.length)>=1e3,[e])?{enableRowVirtualization:!0,rowVirtualizerOptions:{overscan:5}}:{}}const Px={enableStickyHeader:!0,enableColumnPinning:!0},iu=v.forwardRef((e,t)=>{var N;const{data:r,setQueryParams:n,specialKey:o}=te(),s=g.useProps("NextGenDataGrid",{},{}),{fetchOnMount:i=!0,hideToolbar:a,hideActions:u,hidePagination:c,hideError:d,onSelectCheckbox:f,onClickEntry:p,bulkActions:y,table:b,quickFilters:h,withBorder:S,columnProps:x,header:D,body:A,toolbar:_={},textFilterSeparator:w=";",bodySeparator:P,bodyTruncate:F,headerCustomizer:G,bodyCustomizer:j,toolbarCustomizer:m,hideAdd:O,hideDownload:z,hideFilter:q,...ee}=v.useMemo(()=>wn(s,e),[e,s]);P&&Object.keys(A).forEach(L=>{A[L]=A[L]||{},A[L].separator=A[L].separator||P}),F&&Object.keys(A).forEach(L=>{A[L]=A[L]||{},A[L].truncate=A[L].truncate||F}),G&&Object.keys(G).forEach(L=>{D[L]=D[L]||{},D[L].component=G[L].component||G[L]}),j&&Object.keys(j).forEach(L=>{A[L]=A[L]||{},A[L].component=j[L].component||j[L]}),m&&(_.custom=_.custom||m),O&&(_.customizer=_.customizer||{},_.customizer.add=_.customizer.add||null),z&&(_.customizer=_.customizer||{},_.customizer.download=_.customizer.download||null),q&&(_.customizer=_.customizer||{},_.customizer.filter=_.customizer.filter||null),v.useEffect(()=>{process.env.NODE_ENV==="development"&&(P&&console.warn("bodySeparator is deprecated, please use body.[col].separator instead"),F&&console.warn("bodyTruncate is deprecated, please use body.[col].truncate instead"),G&&console.warn("headerCustomizer is deprecated, please use header.[col].component instead"),j&&console.warn("bodyCustomizer is deprecated, please use body.[col].component instead"),m&&console.warn("toolbarCustomizer is deprecated, please use toolbar.custom instead"),O&&console.warn("hideAdd is deprecated, please use toolbar.customizer.add instead"),z&&console.warn("hideDownload is deprecated, please use toolbar.customizer.download instead"),q&&console.warn("hideFilter is deprecated, please use toolbar.customizer.filter instead"))},[]);const fe=bx(),se=wx(),ye=Sx(c),_e=yx(x,D,A,w),W=_x(S),E=ox(u,(N=Tr(A,o.actions))==null?void 0:N.component),$=Tx(),K=$x(),V=Ox(_,h,a),J=vx(p),B=sx(f,y),Z=v.useMemo(()=>wn(Px,{mantinePaperProps:{ref:t}},_e,fe,se,ye,W,E,$,K,V,J,B,b),[t,_e,fe,se,ye,W,E,$,K,V,J,B,b]),X=mt.useMantineReactTable(Z);return v.useEffect(()=>{!r&&i&&n({})},[r]),v.useEffect(()=>{const L=Object.keys(X.getState().rowSelection),Q=r==null?void 0:r.ids.filter((Se,M)=>L.includes(M.toString()));f==null||f(Q),y==null||y.setSelectedIds(Q)},[y,r==null?void 0:r.ids,X.getState().rowSelection,f]),l.jsxs(l.Fragment,{children:[l.jsx(mt.MantineReactTable,{table:X,...ee}),d?null:l.jsx(Rs,{})]})});iu.displayName="NextGenDataGrid";const ss={iconSmall:"_iconSmall_sxv3z_1",btn:"_btn_sxv3z_17"};function Ix({basePath:e="/security",Target:t,children:r}){const n=ps.useNavigate(),{user:o,signout:s}=yt(),[i,a]=v.useState(!1),c=[{resource_name:e+"/users",label:"Users",name:"UsersApi",Icon:td},{resource_name:e+"/roles",label:"Roles",name:"RolesApi",Icon:Xf},{resource_name:e+"/permissions",label:"Base Permissions",name:"PermissionsApi",Icon:Xs},{resource_name:e+"/permissionviews",label:"Permission on Views",name:"PermissionViewApi",Icon:Xs},{resource_name:e+"/viewsmenus",label:"Views/Menus",name:"ViewsMenusApi",Icon:qf}].filter(d=>o.permissions.includes(d.name));return l.jsxs(g.Menu,{width:260,position:"bottom-end",transition:"pop-top-right",withinPortal:!0,opened:i,onClose:()=>a(!1),onOpen:()=>a(!0),children:[l.jsx(g.Menu.Target,{children:t||l.jsx(g.UnstyledButton,{className:ss.btn,style:{borderRadius:4},p:"xs",children:l.jsxs(g.Group,{style:{flexWrap:"nowrap"},spacing:7,children:[l.jsx(g.Text,{weight:500,size:"sm",style:{lineHeight:1,whiteSpace:"nowrap"},mr:3,children:`${o.first_name} ${o.last_name}`}),l.jsx(Qn,{size:12})]})})}),l.jsxs(g.Menu.Dropdown,{children:[c.length?l.jsxs(l.Fragment,{children:[l.jsx(g.Menu.Label,{children:"Security"}),c.map((d,f)=>l.jsx(g.Menu.Item,{p:12,leftSection:l.jsx(d.Icon,{className:ss.iconSmall}),onClick:()=>n(d.resource_name),children:d.label},f)),l.jsx(g.Menu.Divider,{})]}):null,r,l.jsx(g.Menu.Item,{leftSection:l.jsx(Qf,{p:12,className:ss.iconSmall}),onClick:s,children:"Logout"})]})]})}function kx(e,{autoInvoke:t=!0,initialLoading:r=!1,clearDataOnRefetch:n=!1,...o}={}){const[s,i]=v.useState(null),[a,u]=v.useState(r),[c,d]=v.useState(null),f=v.useRef(null),p=v.useCallback(()=>{if(e)return n&&i(null),d(null),f.current&&f.current.abort(),f.current=new AbortController,u(!0),fetch(e,{signal:f.current.signal,...o}).then(async b=>{const h=await b.json();if(!b.ok){const S=typeof h.detail=="string"?h.detail:JSON.stringify(h.detail,null,2);throw new Error(S)}return i(h),u(!1),h}).catch(b=>(b&&b.name!=="AbortError"&&(d(b),u(!1)),b))},[e]),y=v.useCallback(()=>{var b;f.current&&((b=f.current)==null||b.abort(""),u(!1))},[]);return v.useEffect(()=>(t&&p(),()=>{f.current&&f.current.abort("")}),[p,t]),{data:s,loading:a,error:c,refetch:p,abort:y}}I.Actions=to,I.Add=ai,I.AddDialog=ro,I.ApiProvider=qs,I.DataGrid=fo,I.Delete=ei,I.DeleteDialog=Ic,I.Edit=ii,I.EditDialog=si,I.Filter=ki,I.FilterMenu=Ii,I.InfiniteScroll=qd,I.MantineArrayControlRenderer=Mc,I.MantineBooleanCell=Va,I.MantineBooleanControl=qc,I.MantineDateCell=Wa,I.MantineDateControl=Lc,I.MantineDateTimeCell=Ya,I.MantineDateTimeControl=zc,I.MantineEnumArrayRenderer=Fc,I.MantineEnumCell=Ka,I.MantineEnumControl=Jc,I.MantineHorizontalLayoutRenderer=Xc,I.MantineIntegerCell=ja,I.MantineIntegerControl=Gc,I.MantineLayoutRenderer=wo,I.MantineNumberCell=Na,I.MantineNumberControl=Uc,I.MantineTableControl=Pc,I.MantineTextCell=Ba,I.MantineTextControl=Hc,I.MantineVerticalLayoutRenderer=Rc,I.NextGenDataGrid=iu,I.NoBorderTableCell=Yt,I.NonEmptyRow=$c,I.Provider=Uu,I.UserMenu=Ix,I.mantineArrayControlTester=kc,I.mantineBooleanCellTester=Ua,I.mantineBooleanControlTester=Yc,I.mantineCells=nx,I.mantineDateCellTester=Ga,I.mantineDateControlTester=Nc,I.mantineDateTimeCellTester=Ha,I.mantineDateTimeControlTester=jc,I.mantineEnumArrayRendererTester=Dc,I.mantineEnumCellTester=qa,I.mantineEnumControlTester=Kc,I.mantineHorizontalLayoutTester=Zc,I.mantineIntegerCellTester=La,I.mantineIntegerControlTester=Vc,I.mantineNumberCellTester=Fa,I.mantineNumberControlTester=Bc,I.mantineRenderers=rx,I.mantineTextCellTester=za,I.mantineTextControlTester=Wc,I.mantineVerticalLayoutTester=Qc,I.renderLayoutElements=ta,I.useApi=te,I.useAuth=yt,I.useBulkActions=Vu,I.useCustomFetch=kx,I.useDebouncedChange=aa,I.useInfo=bs,I.useProxy=rr,I.withAjvProps=Wg,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});