fastapi-rtk 0.0.101 → 0.0.102

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,113 +1,108 @@
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("clsx"),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","clsx","@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.clsx,I.react$1,I.mantineReactTable))})(this,function(I,v,l,ys,$u,rt,Te,g,sr,ut,H,ue,At,bs,yt){"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 Ou=(I,v,l)=>Vx(I,typeof v!="symbol"?v+"":v,l);function Pu(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=Pu(v),vs=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(vs);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 ys.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 Iu(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 Se(...e){const t=Array.from(Array.isArray(e[0])?e[0]:e);return Iu(t)}const ku=e=>new Proxy(e,{get(t,r){return t(n=>n[r])}}),Mu=(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 ir(e){const[t]=v.useState(()=>$u.create(()=>({...e}))),[r]=v.useState(()=>ku(t));return v.useEffect(()=>{t.setState(n=>Mu(n,e))},[e,t]),r}const Ts=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 bt(){return v.useContext(Ts)}const Ss=v.createContext({baseUrl:"",info:null,loading:!1,error:null});function _s(){return v.useContext(Ss)}async function Du(e,{username:t,password:r}){const n=new FormData;n.append("username",t),n.append("password",r);const{fetchPath:o,options:s}=Pe({path:Se(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 Fu(e){const{fetchPath:t,options:r}=Pe({path:Se(e,"auth/logout"),method:"POST"});if(!(await fetch(t,r)).ok)throw new Error("Failed to sign out.")}async function Nu(e,t,{email:r}){const{fetchPath:n,options:o}=Pe({path:Se(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:Se(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 Lu(e,t,r,n){const o=Se(e,"auth/login",t);if(!r){window.location.href=Se(e,"auth/login",t);return}const s=500,i=500,a=window.screenLeft+window.outerWidth/2-s/2,c=window.screenTop+window.outerHeight/2-i/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=${s}, height=${i}, top=${c}, left=${a}`),d=window.setInterval(function(){u.closed!==!1&&(window.clearInterval(d),n==null||n())},200)}async function ju(e,t){const{fetchPath:r,options:n}=Pe({path:Se(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 zu(e,t){const{fetchPath:r,options:n}=Pe({path:Se(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 Bu(e,t){const{fetchPath:r,options:n}=Pe({path:Se(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 Uu(e){const t=rt.useQueryClient(),r=rt.useQuery({queryKey:["user"],queryFn:({signal:d})=>zu(e,d),retry:0}),[n,o]=v.useState(null),s=v.useCallback(({username:d,password:f})=>{o(null),Du(e,{username:d,password:f}).then(()=>t.invalidateQueries({queryKey:["user"]})).catch(p=>o(p))},[e,t]),i=v.useCallback(()=>{o(null),Fu(e).then(()=>t.resetQueries({queryKey:["user"]})).then(()=>t.resetQueries({queryKey:["info"]})).catch(d=>o(d))},[e,t]),a=v.useCallback(d=>{o(null),Bu(e,d).then(()=>t.invalidateQueries({queryKey:["user"]})).catch(f=>o(f))},[e,t]),c=v.useCallback(d=>{o(null),Nu(e,d,r.data).catch(f=>o(f))},[e,r.data]),u=v.useCallback((d,f)=>Lu(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:c,oauth_signin:u,refetch:r.refetch}}function Vu(e,t){const r=rt.useQuery({queryKey:["info"],queryFn:({signal:n})=>ju(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 Wu(e){const t={baseUrl:new URL(document.baseURI).pathname+"/api/v1",inheritMantineTheme:!1},{baseUrl:r,children:n}={...t,...e},o=Uu(r),s=ir(o),i=Vu(r,o),a=ir(i);return l.jsx(Ts.Provider,{value:s,children:l.jsx(Ss.Provider,{value:a,children:n})})}function Gu(e){const[t]=v.useState(()=>new rt.QueryClient);return l.jsx(rt.QueryClientProvider,{client:t,children:l.jsx(Wu,{...e})})}const ws=v.createContext({bulkActions:{selectedIds:[],setSelectedIds:()=>{}},dispatchBulkActions:async(e,t)=>{},error:null});function Hu(){const e=v.useContext(ws);if(e===void 0)throw new Error("useBulkActions must be used within a ApiProvider");return e}const Yu=async(e,t)=>{const{fetchPath:r,options:n}=Pe({path:Se(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},qu=async(e,t)=>{const{fetchPath:r,options:n}=Pe({path:Se(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},Ku=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},Ju=async(e,t)=>{const{fetchPath:r,options:n}=Pe({path:Se(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},Zu=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},Xu=async(e,t,r)=>{const{fetchPath:n,options:o}=Pe({path:Se(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,Qu={columns:[],filters:[],page:0,page_size:25};function Ar(e,t={}){return Object.entries(t).reduce((r,[n,o])=>o==null?(delete r[n],r):{...r,[n]:o},e||Qu)}const Cs=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 Or=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ft(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vt(e){this._maxSize=e,this.clear()}vt.prototype.clear=function(){this._size=0,this._values=Object.create(null)},vt.prototype.get=function(e){return this._values[e]},vt.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Ru=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Es=/^\d+$/,ef=/^\d/,tf=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,rf=/^\s*(['"]?)(.*?)(\1)\s*$/,Dn=512,xs=new vt(Dn),As=new vt(Dn),Os=new vt(Dn),Tt={Cache:vt,split:Nn,normalizePath:Fn,setter:function(e){var t=Fn(e);return As.get(e)||As.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=Fn(e);return Os.get(e)||Os.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+(Ln(r)||Es.test(r)?"["+r+"]":(t?".":"")+r)},"")},forEach:function(e,t,r){nf(Array.isArray(e)?e:Nn(e),t,r)}};function Fn(e){return xs.get(e)||xs.set(e,Nn(e).map(function(t){return t.replace(rf,"$2")}))}function Nn(e){return e.match(Ru)||[""]}function nf(e,t,r){var n=e.length,o,s,i,a;for(s=0;s<n;s++)o=e[s],o&&(af(o)&&(o='"'+o+'"'),a=Ln(o),i=!a&&/^\d+$/.test(o),t.call(r,o,a,i,s,e))}function Ln(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function of(e){return e.match(ef)&&!e.match(Es)}function sf(e){return tf.test(e)}function af(e){return!Ln(e)&&(of(e)||sf(e))}const lf=/[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,$r=e=>e.match(lf)||[],Pr=e=>e[0].toUpperCase()+e.slice(1),jn=(e,t)=>$r(e).join(t).toLowerCase(),$s=e=>$r(e).reduce((t,r)=>`${t}${t?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,"");var zn={words:$r,upperFirst:Pr,camelCase:$s,pascalCase:e=>Pr($s(e)),snakeCase:e=>jn(e,"_"),kebabCase:e=>jn(e,"-"),sentenceCase:e=>Pr(jn(e," ")),titleCase:e=>$r(e).map(Pr).join(" ")},Bn={exports:{}};Bn.exports=function(e){return Ps(cf(e),e)},Bn.exports.array=Ps;function Ps(e,t){var r=e.length,n=new Array(r),o={},s=r,i=uf(t),a=ff(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,d,f){if(f.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[d]){o[d]=!0;var y=i.get(u)||new Set;if(y=Array.from(y),d=y.length){f.add(u);do{var b=y[--d];c(b,a.get(b),f)}while(d);f.delete(u)}n[--r]=u}}}function cf(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 uf(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 ff(e){for(var t=new Map,r=0,n=e.length;r<n;r++)t.set(e[r],r);return t}var df=Bn.exports;const pf=ft(df),hf=Object.prototype.toString,gf=Error.prototype.toString,mf=RegExp.prototype.toString,yf=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",bf=/^Symbol\((.*)\)(.*)$/;function vf(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Is(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return vf(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return yf.call(e).replace(bf,"Symbol($1)");const n=hf.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+gf.call(e)+"]":n==="RegExp"?mf.call(e):null}function Je(e,t){let r=Is(e,t);return r!==null?r:JSON.stringify(e,function(n,o){let s=Is(this[n],t);return s!==null?s:o},2)}function ks(e){return e==null?[]:[].concat(e)}let Ms,Ds,Fs,Tf=/\$\{\s*(\w+)\s*\}/g;Ms=Symbol.toStringTag;class Ns{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[Ms]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],ks(t).forEach(s=>{if(Ce.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]}}Ds=Symbol.hasInstance,Fs=Symbol.toStringTag;class Ce 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(Tf,(o,s)=>Je(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 Ns(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[Fs]="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,Ce)}static[Ds](t){return Ns[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Ze={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 \`${Je(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Je(r,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Je(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"},dt={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"},Un={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Vn={isValue:"${path} field must be ${value}"},Ir={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},kr={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"},Ls={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: \`${Je(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: \`${Je(r,!0)}\``}return Ce.formatError(Ze.notType,e)}};var js=Object.assign(Object.create(null),{mixed:Ze,string:Fe,number:dt,date:Un,object:Ir,array:kr,boolean:Vn,tuple:Ls});const St=e=>e&&e.__isYupSchema__;class Mr{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 Mr(t,(a,c)=>{var u;let d=i(...a)?o:s;return(u=d==null?void 0:d(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(!St(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}}const Dr={context:"$",value:"."};function Sf(e,t){return new pt(e,t)}class pt{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]===Dr.context,this.isValue=this.key[0]===Dr.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Dr.context:this.isValue?Dr.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Tt.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}}pt.prototype.__isYupRef=!0;const He=e=>e==null;function Ot(e){function t({value:r,path:n="",options:o,originalValue:s,schema:i},a,c){const{name:u,test:d,params:f,message:p,skipAbsent:y}=e;let{parent:b,context:h,abortEarly:w=i.spec.abortEarly,disableStackTrace:E=i.spec.disableStackTrace}=o;function M(O){return pt.isRef(O)?O.getValue(r,b,h):O}function A(O={}){const B=Object.assign({value:r,originalValue:s,label:i.spec.label,path:O.path||n,spec:i.spec,disableStackTrace:O.disableStackTrace||E},f,O.params);for(const ee of Object.keys(B))B[ee]=M(B[ee]);const q=new Ce(Ce.formatError(O.message||p,B),r,B.path,O.type||u,B.disableStackTrace);return q.params=B,q}const _=w?a:c;let S={path:n,parent:b,type:u,from:o.from,createError:A,resolve:M,options:o,originalValue:s,schema:i};const P=O=>{Ce.isError(O)?_(O):O?c(null):_(A())},F=O=>{Ce.isError(O)?_(O):a(O)};if(y&&He(r))return P(!0);let z;try{var m;if(z=d.call(S,r,S),typeof((m=z)==null?void 0:m.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(z).then(P,F)}}catch(O){F(O);return}P(z)}return t.OPTIONS=e,t}function Wn(e,t,r,n=r){let o,s,i;return t?(Tt.forEach(t,(a,c,u)=>{let d=c?a.slice(1,a.length-1):a;e=e.resolve({context:n,parent:o,value:r});let f=e.type==="tuple",p=u?parseInt(d,10):0;if(e.innerType||f){if(f&&!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=f?e.spec.types[p]:e.innerType}if(!u){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=c?"["+a+"]":"."+a}),{schema:e,parent:o,parentPath:s}):{parent:o,parentPath:t,schema:e}}function _f(e,t,r,n){return Wn(e,t,r,n).schema}class Fr extends Set{describe(){const t=[];for(const r of this.values())t.push(pt.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 Fr(this.values())}merge(t,r){const n=this.clone();return t.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}}function $t(e,t=new Map){if(St(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]=$t(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,$t(o,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add($t(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,o]of Object.entries(e))r[n]=$t(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 Fr,this._blacklist=new Fr,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ze.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=$t(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=Je(t),a=Je(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(k,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("clsx"),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","clsx","@emotion/react","mantine-react-table"],v):(k=typeof globalThis<"u"?globalThis:k||self,v(k["fastapi-rtk"]={},k.React,k.jsxRuntime,k.reactRouterDom,k.zustand,k.reactQuery,k.hooks,k.core,k.form,k.dates,k.core$1,k.react,k.clsx,k.react$1,k.mantineReactTable))})(this,function(k,v,l,bs,Pu,tt,ve,g,or,ft,W,fe,At,vs,rt){"use strict";var Wx=Object.defineProperty;var Gx=(k,v,l)=>v in k?Wx(k,v,{enumerable:!0,configurable:!0,writable:!0,value:l}):k[v]=l;var $u=(k,v,l)=>Gx(k,typeof v!="symbol"?v+"":v,l);function Iu(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 Oe=Iu(v),Ts=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 Q(){const e=v.useContext(Ts);if(e===void 0)throw new Error("useApi must be used within a ApiProvider");return e}function $e({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 bs.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 ku(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 Se(...e){const t=Array.from(Array.isArray(e[0])?e[0]:e);return ku(t)}const Mu=e=>new Proxy(e,{get(t,r){return t(n=>n[r])}}),Du=(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 sr(e){const[t]=v.useState(()=>Pu.create(()=>({...e}))),[r]=v.useState(()=>Mu(t));return v.useEffect(()=>{t.setState(n=>Du(n,e))},[e,t]),r}const Ss=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 bt(){return v.useContext(Ss)}const _s=v.createContext({baseUrl:"",info:null,loading:!1,error:null});function ws(){return v.useContext(_s)}async function Fu(e,{username:t,password:r}){const n=new FormData;n.append("username",t),n.append("password",r);const{fetchPath:o,options:s}=$e({path:Se(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 Nu(e){const{fetchPath:t,options:r}=$e({path:Se(e,"auth/logout"),method:"POST"});if(!(await fetch(t,r)).ok)throw new Error("Failed to sign out.")}async function Lu(e,t,{email:r}){const{fetchPath:n,options:o}=$e({path:Se(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}=$e({path:Se(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 ju(e,t,r,n){const o=Se(e,"auth/login",t);if(!r){window.location.href=Se(e,"auth/login",t);return}const s=500,i=500,a=window.screenLeft+window.outerWidth/2-s/2,c=window.screenTop+window.outerHeight/2-i/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=${s}, height=${i}, top=${c}, left=${a}`),d=window.setInterval(function(){u.closed!==!1&&(window.clearInterval(d),n==null||n())},200)}async function zu(e,t){const{fetchPath:r,options:n}=$e({path:Se(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 Bu(e,t){const{fetchPath:r,options:n}=$e({path:Se(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 Uu(e,t){const{fetchPath:r,options:n}=$e({path:Se(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 Vu(e,t){const r=tt.useQueryClient(),n=tt.useQuery({queryKey:["user"],queryFn:({signal:f})=>Bu(e,f),retry:!1,...t}),[o,s]=v.useState(null),i=v.useCallback(({username:f,password:p})=>{s(null),Fu(e,{username:f,password:p}).then(()=>r.invalidateQueries({queryKey:["user"]})).catch(y=>s(y))},[e,r]),a=v.useCallback(()=>{s(null),Nu(e).then(()=>r.resetQueries({queryKey:["user"]})).then(()=>r.resetQueries({queryKey:["info"]})).catch(f=>s(f))},[e,r]),c=v.useCallback(f=>{s(null),Uu(e,f).then(()=>r.invalidateQueries({queryKey:["user"]})).catch(p=>s(p))},[e,r]),u=v.useCallback(f=>{s(null),Lu(e,f,n.data).catch(p=>s(p))},[e,n.data]),d=v.useCallback((f,p)=>ju(e,f,p,()=>r.invalidateQueries({queryKey:["user"]})),[e,r]);return{user:n.isError?null:n.data,loading:n.isFetching,error:o?o.message:null,signin:i,signout:a,update:c,resetPassword:u,oauth_signin:d,refetch:n.refetch}}function Wu(e,t){const r=tt.useQuery({queryKey:["info"],queryFn:({signal:n})=>zu(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 Gu(e){const t={baseUrl:new URL(document.baseURI).pathname+"/api/v1",inheritMantineTheme:!1},{baseUrl:r,authQueryProps:n,children:o}={...t,...e},s=Vu(r,n),i=sr(s),a=Wu(r,s),c=sr(a);return l.jsx(Ss.Provider,{value:i,children:l.jsx(_s.Provider,{value:c,children:o})})}function Hu(e){const[t]=v.useState(()=>new tt.QueryClient);return l.jsx(tt.QueryClientProvider,{client:t,children:l.jsx(Gu,{...e})})}const Cs=v.createContext({bulkActions:{selectedIds:[],setSelectedIds:()=>{}},dispatchBulkActions:async(e,t)=>{},error:null});function Yu(){const e=v.useContext(Cs);if(e===void 0)throw new Error("useBulkActions must be used within a ApiProvider");return e}const qu=async(e,t)=>{const{fetchPath:r,options:n}=$e({path:Se(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},Ku=async(e,t)=>{const{fetchPath:r,options:n}=$e({path:Se(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},Ju=async(e,t)=>{const{fetchPath:r,options:n}=$e({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},Zu=async(e,t)=>{const{fetchPath:r,options:n}=$e({path:Se(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},Xu=async(e,t,r)=>{const{fetchPath:n,options:o}=$e({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},Qu=async(e,t,r)=>{const{fetchPath:n,options:o}=$e({path:Se(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},ze=e=>e&&typeof e=="object"?Array.isArray(e)?e.join(","):JSON.stringify(e):e,Ru={columns:[],filters:[],page:0,page_size:25};function Ar(e,t={}){return Object.entries(t).reduce((r,[n,o])=>o==null?(delete r[n],r):{...r,[n]:o},e||Ru)}const Es=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 Or=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vt(e){this._maxSize=e,this.clear()}vt.prototype.clear=function(){this._size=0,this._values=Object.create(null)},vt.prototype.get=function(e){return this._values[e]},vt.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var ef=/[^.^\]^[]+|(?=\[\]|\.\.)/g,xs=/^\d+$/,tf=/^\d/,rf=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,nf=/^\s*(['"]?)(.*?)(\1)\s*$/,Fn=512,As=new vt(Fn),Os=new vt(Fn),$s=new vt(Fn),Tt={Cache:vt,split:Ln,normalizePath:Nn,setter:function(e){var t=Nn(e);return Os.get(e)||Os.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=Nn(e);return $s.get(e)||$s.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+(jn(r)||xs.test(r)?"["+r+"]":(t?".":"")+r)},"")},forEach:function(e,t,r){of(Array.isArray(e)?e:Ln(e),t,r)}};function Nn(e){return As.get(e)||As.set(e,Ln(e).map(function(t){return t.replace(nf,"$2")}))}function Ln(e){return e.match(ef)||[""]}function of(e,t,r){var n=e.length,o,s,i,a;for(s=0;s<n;s++)o=e[s],o&&(lf(o)&&(o='"'+o+'"'),a=jn(o),i=!a&&/^\d+$/.test(o),t.call(r,o,a,i,s,e))}function jn(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function sf(e){return e.match(tf)&&!e.match(xs)}function af(e){return rf.test(e)}function lf(e){return!jn(e)&&(sf(e)||af(e))}const cf=/[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,$r=e=>e.match(cf)||[],Pr=e=>e[0].toUpperCase()+e.slice(1),zn=(e,t)=>$r(e).join(t).toLowerCase(),Ps=e=>$r(e).reduce((t,r)=>`${t}${t?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,"");var Bn={words:$r,upperFirst:Pr,camelCase:Ps,pascalCase:e=>Pr(Ps(e)),snakeCase:e=>zn(e,"_"),kebabCase:e=>zn(e,"-"),sentenceCase:e=>Pr(zn(e," ")),titleCase:e=>$r(e).map(Pr).join(" ")},Un={exports:{}};Un.exports=function(e){return Is(uf(e),e)},Un.exports.array=Is;function Is(e,t){var r=e.length,n=new Array(r),o={},s=r,i=ff(t),a=df(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,d,f){if(f.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[d]){o[d]=!0;var y=i.get(u)||new Set;if(y=Array.from(y),d=y.length){f.add(u);do{var b=y[--d];c(b,a.get(b),f)}while(d);f.delete(u)}n[--r]=u}}}function uf(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 ff(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 df(e){for(var t=new Map,r=0,n=e.length;r<n;r++)t.set(e[r],r);return t}var pf=Un.exports;const hf=dt(pf),gf=Object.prototype.toString,mf=Error.prototype.toString,yf=RegExp.prototype.toString,bf=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",vf=/^Symbol\((.*)\)(.*)$/;function Tf(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function ks(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return Tf(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return bf.call(e).replace(vf,"Symbol($1)");const n=gf.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+mf.call(e)+"]":n==="RegExp"?yf.call(e):null}function Je(e,t){let r=ks(e,t);return r!==null?r:JSON.stringify(e,function(n,o){let s=ks(this[n],t);return s!==null?s:o},2)}function Ms(e){return e==null?[]:[].concat(e)}let Ds,Fs,Ns,Sf=/\$\{\s*(\w+)\s*\}/g;Ds=Symbol.toStringTag;class Ls{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[Ds]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=o,this.errors=[],this.inner=[],Ms(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]}}Fs=Symbol.hasInstance,Ns=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(Sf,(o,s)=>Je(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 Ls(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[Ns]="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[Fs](t){return Ls[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Ze={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 \`${Je(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Je(r,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Je(r,!0)}\``+o}},Ne={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"},pt={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"},Vn={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Wn={isValue:"${path} field must be ${value}"},Ir={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},kr={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"},js={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: \`${Je(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: \`${Je(r,!0)}\``}return _e.formatError(Ze.notType,e)}};var zs=Object.assign(Object.create(null),{mixed:Ze,string:Ne,number:pt,date:Vn,object:Ir,array:kr,boolean:Wn,tuple:js});const St=e=>e&&e.__isYupSchema__;class Mr{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 Mr(t,(a,c)=>{var u;let d=i(...a)?o:s;return(u=d==null?void 0:d(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(!St(o))throw new TypeError("conditions must return a schema object");return o.resolve(r)}}const Dr={context:"$",value:"."};function _f(e,t){return new ht(e,t)}class ht{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]===Dr.context,this.isValue=this.key[0]===Dr.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Dr.context:this.isValue?Dr.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Tt.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}}ht.prototype.__isYupRef=!0;const Ye=e=>e==null;function Ot(e){function t({value:r,path:n="",options:o,originalValue:s,schema:i},a,c){const{name:u,test:d,params:f,message:p,skipAbsent:y}=e;let{parent:b,context:h,abortEarly:C=i.spec.abortEarly,disableStackTrace:x=i.spec.disableStackTrace}=o;function F(A){return ht.isRef(A)?A.getValue(r,b,h):A}function $(A={}){const L=Object.assign({value:r,originalValue:s,label:i.spec.label,path:A.path||n,spec:i.spec,disableStackTrace:A.disableStackTrace||x},f,A.params);for(const J of Object.keys(L))L[J]=F(L[J]);const Y=new _e(_e.formatError(A.message||p,L),r,L.path,A.type||u,L.disableStackTrace);return Y.params=L,Y}const w=C?a:c;let S={path:n,parent:b,type:u,from:o.from,createError:$,resolve:F,options:o,originalValue:s,schema:i};const I=A=>{_e.isError(A)?w(A):A?c(null):w($())},j=A=>{_e.isError(A)?w(A):a(A)};if(y&&Ye(r))return I(!0);let U;try{var m;if(U=d.call(S,r,S),typeof((m=U)==null?void 0:m.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(U).then(I,j)}}catch(A){j(A);return}I(U)}return t.OPTIONS=e,t}function Gn(e,t,r,n=r){let o,s,i;return t?(Tt.forEach(t,(a,c,u)=>{let d=c?a.slice(1,a.length-1):a;e=e.resolve({context:n,parent:o,value:r});let f=e.type==="tuple",p=u?parseInt(d,10):0;if(e.innerType||f){if(f&&!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=f?e.spec.types[p]:e.innerType}if(!u){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=c?"["+a+"]":"."+a}),{schema:e,parent:o,parentPath:s}):{parent:o,parentPath:t,schema:e}}function wf(e,t,r,n){return Gn(e,t,r,n).schema}class Fr extends Set{describe(){const t=[];for(const r of this.values())t.push(ht.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 Fr(this.values())}merge(t,r){const n=this.clone();return t.forEach(o=>n.add(o)),r.forEach(o=>n.delete(o)),n}}function $t(e,t=new Map){if(St(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]=$t(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,$t(o,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add($t(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,o]of Object.entries(e))r[n]=$t(o,t)}else throw Error(`Unable to clone ${e}`);return r}class xe{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 Fr,this._blacklist=new Fr,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ze.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=$t(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&&Ye(s))return s;let i=Je(t),a=Je(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 d of Object.values(this.internalTests))d&&u.push(d);this.runTests({path:s,value:c,originalValue:i,options:r,tests:u},n,d=>{if(d.length)return o(d,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,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:c,options:u,schema:this};for(let h=0;h<s.length;h++){const w=s[h];w(b,d,function(M){M&&(Array.isArray(M)?y.push(...M):y.push(M)),--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 c=typeof a=="number";let u=n[a];const d=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(f,p,y)=>this.resolve(d)._validate(u,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,(c,u)=>{Ce.isError(c)&&(c.value=u),a(c)},(c,u)=>{c.length?a(new Ce(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 Ce.isError(a)&&(a.value=c),a},(a,c)=>{if(a.length)throw new Ce(a,t,void 0,void 0,i);s=c}),s}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(Ce.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(Ce.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):$t(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=Ot({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=Ot({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Ze.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Ze.notNull){return this.nullability(!1,t)}required(t=Ze.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=Ze.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=Ot(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=ks(t).map(s=>new pt(s));return o.forEach(s=>{s.isSibling&&n.deps.push(s.key)}),n.conditions.push(typeof r=="function"?new Mr(o,r):Mr.fromOptions(o,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Ot({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=Ze.oneOf){let n=this.clone();return t.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=Ot({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=Ze.notOneOf){let n=this.clone();return t.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=Ot({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,d)=>d.findIndex(f=>f.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}=Wn(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 wf=()=>!0;function Nr(e){return new Gn(e)}class Gn extends Ae{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:wf},t))}}Nr.prototype=Gn.prototype;function Hn(){return new Yn}class Yn 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=Vn.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return He(r)||r===!0}})}isFalse(t=Vn.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)}}Hn.prototype=Yn.prototype;const Cf=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Ef(e){const t=qn(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 qn(e){var t,r;const n=Cf.exec(e);return n?{year:nt(n[1]),month:nt(n[2],1)-1,day:nt(n[3],1),hour:nt(n[4]),minute:nt(n[5]),second:nt(n[6]),millisecond:n[7]?nt(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:nt(n[10]),minuteOffset:nt(n[11])}:null}function nt(e,t=0){return Number(e)||t}let xf=/^[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])?)*$/,Af=/^((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,Of=/^(?:[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,$f="^\\d{4}-\\d{2}-\\d{2}",Pf="\\d{2}:\\d{2}:\\d{2}",If="(([+-]\\d{2}(:?\\d{2})?)|Z)",kf=new RegExp(`${$f}T${Pf}(\\.\\d+)?${If}$`),Mf=e=>He(e)||e===e.trim(),Df={}.toString();function Lr(){return new Kn}class Kn 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===Df?t:o})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Ze.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(xf,{name:"email",message:t,excludeEmptyString:!0})}url(t=Fe.url){return this.matches(Af,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Fe.uuid){return this.matches(Of,{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(kf,{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=qn(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=qn(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:Mf})}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()})}}Lr.prototype=Kn.prototype;let Ff=e=>e!=+e;function zs(){return new Jn}class Jn extends Ae{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Ff(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=dt.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=dt.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=dt.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=dt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=dt.positive){return this.moreThan(0,t)}negative(t=dt.negative){return this.lessThan(0,t)}integer(t=dt.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))}}zs.prototype=Jn.prototype;let Bs=new Date(""),Nf=e=>Object.prototype.toString.call(e)==="[object Date]";function Zn(){return new Pt}class Pt extends Ae{constructor(){super({type:"date",check(t){return Nf(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=Ef(t),isNaN(t)?Pt.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(pt.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=Un.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=Un.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)}})}}Pt.INVALID_DATE=Bs,Zn.prototype=Pt.prototype,Zn.INVALID_DATE=Bs;function Lf(e,t=[]){let r=[],n=new Set,o=new Set(t.map(([i,a])=>`${i}-${a}`));function s(i,a){let c=Tt.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),pt.isRef(a)&&a.isSibling?s(a.path,i):St(a)&&"deps"in a&&a.deps.forEach(c=>s(c,i))}return pf.array(Array.from(n),r).reverse()}function Us(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 Vs(e){return(t,r)=>Us(e,t)-Us(e,r)}const Ws=(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 jr(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=jr(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=jr(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(jr)}):"optional"in e?e.optional():e}const jf=(e,t)=>{const r=[...Tt.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),o=Tt.getter(Tt.join(r),!0)(e);return!!(o&&n in o)};let Gs=e=>Object.prototype.toString.call(e)==="[object Object]";function Hs(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const zf=Vs([]);function ar(e){return new Xn(e)}class Xn extends Ae{constructor(t){super({type:"object",check(r){return Gs(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=zf,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))),c={},u=Object.assign({},r,{parent:c,__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];u.path=(r.path?`${r.path}.`:"")+f,p=p.resolve({value:h,context:r.context,parent:c});let w=p instanceof Ae?p.spec:void 0,E=w==null?void 0:w.strict;if(w!=null&&w.strip){d=d||f in o;continue}b=!r.__validating||!E?p.cast(o[f],u):o[f],b!==void 0&&(c[f]=b)}else y&&!i&&(c[f]=o[f]);(y!==f in c||c[f]!==o[f])&&(d=!0)}return d?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||!Gs(u)){o(c,u);return}i=i||u;let d=[];for(let f of this._nodes){let p=this.fields[f];!p||pt.isRef(p)||d.push(p.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:i}))}this.runTests({tests:d,value:u,originalValue:i,options:r},n,f=>{o(f.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=Lf(t,r),n._sortErrors=Vs(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 jr(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=Tt.getter(t,!0);return this.transform(s=>{if(!s)return s;let i=s;return jf(s,t)&&(i=Object.assign({},s),n||delete i[t],i[r]=o(s)),i})}json(){return this.transform(Ws)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Ir.exact,test(r){if(r==null)return!0;const n=Hs(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Ir.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=Hs(this.schema,o);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Ir.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(zn.camelCase)}snakeCase(){return this.transformKeys(zn.snakeCase)}constantCase(){return this.transformKeys(t=>zn.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}}ar.prototype=Xn.prototype;function Qn(e){return new Rn(e)}class Rn 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 d;if(!a||!i||!this._typeCheck(u)){o(c,u);return}let f=new Array(u.length);for(let y=0;y<u.length;y++){var p;f[y]=i.asNestedTest({options:r,index:y,parent:u,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p:t})}this.runTests({value:u,tests:f,originalValue:(d=r.originalValue)!=null?d: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(Ws)}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(!St(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Je(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=kr.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||kr.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||kr.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=Rn.prototype;function Ys(e){return new eo(e)}class eo 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(Ls.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[f,p]of s.entries()){var d;u[f]=p.asNestedTest({options:r,index:f,parent:a,parentPath:r.path,originalParent:(d=r.originalValue)!=null?d:t})}this.runTests({value:a,tests:u,originalValue:(c=r.originalValue)!=null?c: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}}Ys.prototype=eo.prototype;function Bf(e){return new zr(e)}function qs(e){try{return e()}catch(t){if(Ce.isError(t))return Promise.reject(t);throw t}}class zr{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(r,n={})=>{let o=this.builder(r,n);if(!St(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 zr(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 qs(()=>this._resolve(t,r).validate(t,r))}validateSync(t,r){return this._resolve(t,r).validateSync(t,r)}validateAt(t,r,n){return qs(()=>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(Ce.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 Uf(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(r=>{js[t][r]=e[t][r]})})}function Vf(e,t,r){if(!e||!St(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 Ks=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:Rn,BooleanSchema:Yn,DateSchema:Pt,LazySchema:zr,MixedSchema:Gn,NumberSchema:Jn,ObjectSchema:Xn,Schema:Ae,StringSchema:Kn,TupleSchema:eo,ValidationError:Ce,addMethod:Vf,array:Qn,bool:Hn,boolean:Hn,date:Zn,defaultLocale:js,getIn:Wn,isSchema:St,lazy:Bf,mixed:Nr,number:zs,object:ar,printValue:Je,reach:_f,ref:Sf,setLocale:Uf,string:Lr,tuple:Ys},Symbol.toStringTag,{value:"Module"})),Js=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=Ks[i]().typeError(`Field must be of type ${i}`).required("Field is required"):a=Ks[i]().typeError(`Field must be of type ${i}`).nullable(!0)}catch(c){console.log(c)}return r[o]=a,r},{});return ar().shape(t)},Zs=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,Wf=e=>e?{...e,add:{columns:e.add_columns,title:e.add_title,schema:Js(e.add_columns),defaultValues:Cs(e.add_columns)},edit:{columns:e.edit_columns,title:e.edit_title,schema:Js(e.edit_columns),defaultValues:Cs(e.edit_columns)}}:null,Gf=async(e,t,r)=>{const{fetchPath:n,options:o}=Pe({path:Se(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 Hf({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[d,f]=v.useState(t?Ar(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(G=>f(x=>{if(typeof G=="function"&&(G=G(x)),!x)return Ar(null,G);const $=Ar({...x},G);if((G.filters||G.order_column||G.order_direction)&&!G.page&&($.page=0),u){if(G.page&&G.page!==x.page&&!G.streaming)throw new Error("You cannot change page in streaming mode, use streaming.fetch() instead");if(G.page_size&&G.page_size!==x.page_size)throw new Error("You cannot change page size in streaming mode, use streaming.fetch() instead")}return $}),[u]),[b,h]=v.useState(null),w=v.useMemo(()=>b,[b]),E=v.useCallback(()=>h(null),[]),{data:M,isFetching:A,refetch:_,error:S}=rt.useQuery({queryKey:[`info-${e}`],queryFn:({signal:G})=>Ku(Se(e,"_info"),G).then(Wf),enabled:n,placeholderData:o?null:rt.keepPreviousData,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,...a}),{data:P,isFetching:F,refetch:j,error:z}=rt.useQuery({queryKey:[`data-${e}`,JSON.stringify(p)],queryFn:({signal:G})=>p?Zu(Se(e,"/"),p,G).then(x=>({...x,result:x.result.map(($,K)=>({...$,id:x.ids[K]}))})):null,placeholderData:s?null:rt.keepPreviousData,staleTime:1/0,refetchOnReconnect:"always",refetchOnWindowFocus:"always",...c});v.useEffect(()=>{p&&j()},[j,p]),v.useEffect(()=>{if(S){h({message:"Couldn't fetch info",originalError:S});return}if(z){h({message:"Couldn't fetch list",originalError:z});return}E()},[S,z,E]);const m=v.useMemo(()=>A||F,[A,F]);Te.useDidUpdate(()=>{if(!i)return;const G=Ar(null,t);d!=null&&d.page_size&&(G.page_size=d.page_size),y(G)},[e]);const O=v.useCallback(async G=>{try{const x=await Ju(e,je(G));return E(),x}catch(x){h({message:`Couldn't fetch item with id ${G}`,originalError:x})}},[e,E]),B=v.useCallback(async(G,x)=>{try{const $=await Yu(e,G);return x||(_(),j()),E(),$}catch($){h({message:"Couldn't add item",originalError:$})}},[j,_,e,E]),q=v.useCallback(async(G,x,$)=>{try{const K=await Xu(e,je(G),x);return $||(_(),j()),E(),K}catch(K){h({message:`Couldn't update item with id ${G}`,originalError:K})}},[j,_,e,E]),ee=v.useCallback(async(G,x)=>{try{const $=await qu(e,je(G));return x||(_(),j()),E(),$}catch($){h({message:`Couldn't delete item with id ${G}`,originalError:$})}},[j,_,e,E]),fe=v.useCallback(async G=>{try{await Gf(G,e,p)}catch(x){h({message:"Couldn't download",originalError:x})}},[e,p]),[se,be]=Te.useSetState({data:{},isEnd:!1,fetch:()=>null});v.useEffect(()=>{u&&be({fetch:()=>y({page:0,streaming:!0})})},[y,be,u]),v.useEffect(()=>{u&&P&&be(G=>{let x=Object.keys(G.data).length;const $={isEnd:!1};return p.page<x?(x=p.page,$.data={[p.page]:P.result}):$.data={...G.data,[p.page]:P.result},P.result.length<p.page_size?($.isEnd=!0,$.fetch=()=>null):$.fetch=()=>y({page:x+1,streaming:!0}),$})},[P,y,be,u]);const we=v.useMemo(()=>{const G={all:"all",actions:"actions"};return P==null||P.list_columns.forEach(x=>{G[x]&&(G[x]=`_${x}`)}),G},[P==null?void 0:P.list_columns]);return{path:e,data:P,info:M,queryParams:p,loading:m,error:w,streaming:se,specialKey:we,setQueryParams:y,refetch:j,refetchInfo:_,getEntry:O,addEntry:B,updateEntry:q,deleteEntry:ee,download:fe}}const Yf=async(e,t,r)=>{const{fetchPath:n,options:o}=Pe({path:Se(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},qf=({Api:e})=>{const[t,r]=v.useState([]),[n,o]=v.useState(null),s=v.useCallback(async(a,c)=>{try{o(null);const u=await Yf(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 Xs({resource_name:e="",initialQueryParams:t,relation:r,fetchInfo:n,clearInfoOnRefetch:o,clearDataOnRefetch:s,resetQueryParamsOnPathChange:i,infoQueryProps:a,dataQueryProps:c,children:u,streaming:d}){const{baseUrl:f}=_s(),p=Hf({path:Se(f,e),initialQueryParams:t,relation:r,fetchInfo:n,clearInfoOnRefetch:o,clearDataOnRefetch:s,resetQueryParamsOnPathChange:i,infoQueryProps:a,dataQueryProps:c,streaming:d}),y=ir(p),b=qf({path:Se(f,e),Api:p}),h=ir(b);return l.jsx(vs.Provider,{value:y,children:l.jsx(ws.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,c=t;a||(c=this._cast(c,Object.assign({assert:!1},r)));let u=[];for(let d of Object.values(this.internalTests))d&&u.push(d);this.runTests({path:s,value:c,originalValue:i,options:r,tests:u},n,d=>{if(d.length)return o(d,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,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:c,options:u,schema:this};for(let h=0;h<s.length;h++){const C=s[h];C(b,d,function(F){F&&(Array.isArray(F)?y.push(...F):y.push(F)),--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 c=typeof a=="number";let u=n[a];const d=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(f,p,y)=>this.resolve(d)._validate(u,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,(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):$t(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=Ot({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=Ot({message:r,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Ze.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Ze.notNull){return this.nullability(!1,t)}required(t=Ze.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=Ze.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),o=Ot(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=Ms(t).map(s=>new ht(s));return o.forEach(s=>{s.isSibling&&n.deps.push(s.key)}),n.conditions.push(typeof r=="function"?new Mr(o,r):Mr.fromOptions(o,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Ot({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=Ze.oneOf){let n=this.clone();return t.forEach(o=>{n._whitelist.add(o),n._blacklist.delete(o)}),n.internalTests.whiteList=Ot({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=Ze.notOneOf){let n=this.clone();return t.forEach(o=>{n._blacklist.add(o),n._whitelist.delete(o)}),n.internalTests.blacklist=Ot({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,d)=>d.findIndex(f=>f.name===c.name)===u)}}}xe.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])xe.prototype[`${e}At`]=function(t,r,n={}){const{parent:o,parentPath:s,schema:i}=Gn(this,t,r,n.context);return i[e](o&&o[s],Object.assign({},n,{parent:o,path:t}))};for(const e of["equals","is"])xe.prototype[e]=xe.prototype.oneOf;for(const e of["not","nope"])xe.prototype[e]=xe.prototype.notOneOf;const Cf=()=>!0;function Nr(e){return new Hn(e)}class Hn extends xe{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Cf},t))}}Nr.prototype=Hn.prototype;function Yn(){return new qn}class qn extends xe{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=Wn.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Ye(r)||r===!0}})}isFalse(t=Wn.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Ye(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)}}Yn.prototype=qn.prototype;const Ef=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function xf(e){const t=Kn(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 Kn(e){var t,r;const n=Ef.exec(e);return n?{year:nt(n[1]),month:nt(n[2],1)-1,day:nt(n[3],1),hour:nt(n[4]),minute:nt(n[5]),second:nt(n[6]),millisecond:n[7]?nt(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:nt(n[10]),minuteOffset:nt(n[11])}:null}function nt(e,t=0){return Number(e)||t}let Af=/^[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])?)*$/,Of=/^((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,$f=/^(?:[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,Pf="^\\d{4}-\\d{2}-\\d{2}",If="\\d{2}:\\d{2}:\\d{2}",kf="(([+-]\\d{2}(:?\\d{2})?)|Z)",Mf=new RegExp(`${Pf}T${If}(\\.\\d+)?${kf}$`),Df=e=>Ye(e)||e===e.trim(),Ff={}.toString();function Lr(){return new Jn}class Jn extends xe{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===Ff?t:o})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Ze.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=Ne.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=Ne.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=Ne.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||Ne.matches,params:{regex:t},skipAbsent:!0,test:i=>i===""&&n||i.search(t)!==-1})}email(t=Ne.email){return this.matches(Af,{name:"email",message:t,excludeEmptyString:!0})}url(t=Ne.url){return this.matches(Of,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Ne.uuid){return this.matches($f,{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(Mf,{name:"datetime",message:r||Ne.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Ne.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:s=>{if(!s||n)return!0;const i=Kn(s);return i?!!i.z:!1}}).test({name:"datetime_precision",message:r||Ne.datetime_precision,params:{precision:o},skipAbsent:!0,test:s=>{if(!s||o==null)return!0;const i=Kn(s);return i?i.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Ne.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Df})}lowercase(t=Ne.lowercase){return this.transform(r=>Ye(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ye(r)||r===r.toLowerCase()})}uppercase(t=Ne.uppercase){return this.transform(r=>Ye(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ye(r)||r===r.toUpperCase()})}}Lr.prototype=Jn.prototype;let Nf=e=>e!=+e;function Bs(){return new Zn}class Zn extends xe{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Nf(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=pt.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=pt.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=pt.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=pt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=pt.positive){return this.moreThan(0,t)}negative(t=pt.negative){return this.lessThan(0,t)}integer(t=pt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>Ye(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=>Ye(o)?o:Math[t](o))}}Bs.prototype=Zn.prototype;let Us=new Date(""),Lf=e=>Object.prototype.toString.call(e)==="[object Date]";function Xn(){return new Pt}class Pt extends xe{constructor(){super({type:"date",check(t){return Lf(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=xf(t),isNaN(t)?Pt.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(ht.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=Vn.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=Vn.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)}})}}Pt.INVALID_DATE=Us,Xn.prototype=Pt.prototype,Xn.INVALID_DATE=Us;function jf(e,t=[]){let r=[],n=new Set,o=new Set(t.map(([i,a])=>`${i}-${a}`));function s(i,a){let c=Tt.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),ht.isRef(a)&&a.isSibling?s(a.path,i):St(a)&&"deps"in a&&a.deps.forEach(c=>s(c,i))}return hf.array(Array.from(n),r).reverse()}function Vs(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 Ws(e){return(t,r)=>Vs(e,t)-Vs(e,r)}const Gs=(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 jr(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=jr(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=jr(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(jr)}):"optional"in e?e.optional():e}const zf=(e,t)=>{const r=[...Tt.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),o=Tt.getter(Tt.join(r),!0)(e);return!!(o&&n in o)};let Hs=e=>Object.prototype.toString.call(e)==="[object Object]";function Ys(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Bf=Ws([]);function ir(e){return new Qn(e)}class Qn extends xe{constructor(t){super({type:"object",check(r){return Hs(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Bf,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))),c={},u=Object.assign({},r,{parent:c,__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];u.path=(r.path?`${r.path}.`:"")+f,p=p.resolve({value:h,context:r.context,parent:c});let C=p instanceof xe?p.spec:void 0,x=C==null?void 0:C.strict;if(C!=null&&C.strip){d=d||f in o;continue}b=!r.__validating||!x?p.cast(o[f],u):o[f],b!==void 0&&(c[f]=b)}else y&&!i&&(c[f]=o[f]);(y!==f in c||c[f]!==o[f])&&(d=!0)}return d?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||!Hs(u)){o(c,u);return}i=i||u;let d=[];for(let f of this._nodes){let p=this.fields[f];!p||ht.isRef(p)||d.push(p.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:i}))}this.runTests({tests:d,value:u,originalValue:i,options:r},n,f=>{o(f.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=jf(t,r),n._sortErrors=Ws(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 jr(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=Tt.getter(t,!0);return this.transform(s=>{if(!s)return s;let i=s;return zf(s,t)&&(i=Object.assign({},s),n||delete i[t],i[r]=o(s)),i})}json(){return this.transform(Gs)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Ir.exact,test(r){if(r==null)return!0;const n=Ys(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Ir.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=Ys(this.schema,o);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Ir.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(Bn.camelCase)}snakeCase(){return this.transformKeys(Bn.snakeCase)}constantCase(){return this.transformKeys(t=>Bn.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}}ir.prototype=Qn.prototype;function Rn(e){return new eo(e)}class eo extends xe{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 d;if(!a||!i||!this._typeCheck(u)){o(c,u);return}let f=new Array(u.length);for(let y=0;y<u.length;y++){var p;f[y]=i.asNestedTest({options:r,index:y,parent:u,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p:t})}this.runTests({value:u,tests:f,originalValue:(d=r.originalValue)!=null?d: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(Gs)}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(!St(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Je(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=kr.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||kr.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||kr.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}}Rn.prototype=eo.prototype;function qs(e){return new to(e)}class to extends xe{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(js.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[f,p]of s.entries()){var d;u[f]=p.asNestedTest({options:r,index:f,parent:a,parentPath:r.path,originalParent:(d=r.originalValue)!=null?d:t})}this.runTests({value:a,tests:u,originalValue:(c=r.originalValue)!=null?c: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}}qs.prototype=to.prototype;function Uf(e){return new zr(e)}function Ks(e){try{return e()}catch(t){if(_e.isError(t))return Promise.reject(t);throw t}}class zr{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(r,n={})=>{let o=this.builder(r,n);if(!St(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 zr(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 Ks(()=>this._resolve(t,r).validate(t,r))}validateSync(t,r){return this._resolve(t,r).validateSync(t,r)}validateAt(t,r,n){return Ks(()=>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 Vf(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(r=>{zs[t][r]=e[t][r]})})}function Wf(e,t,r){if(!e||!St(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 Js=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:eo,BooleanSchema:qn,DateSchema:Pt,LazySchema:zr,MixedSchema:Hn,NumberSchema:Zn,ObjectSchema:Qn,Schema:xe,StringSchema:Jn,TupleSchema:to,ValidationError:_e,addMethod:Wf,array:Rn,bool:Yn,boolean:Yn,date:Xn,defaultLocale:zs,getIn:Gn,isSchema:St,lazy:Uf,mixed:Nr,number:Bs,object:ir,printValue:Je,reach:wf,ref:_f,setLocale:Vf,string:Lr,tuple:qs},Symbol.toStringTag,{value:"Module"})),Zs=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=Js[i]().typeError(`Field must be of type ${i}`).required("Field is required"):a=Js[i]().typeError(`Field must be of type ${i}`).nullable(!0)}catch(c){console.log(c)}return r[o]=a,r},{});return ir().shape(t)},Xs=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,Gf=e=>e?{...e,add:{columns:e.add_columns,title:e.add_title,schema:Zs(e.add_columns),defaultValues:Es(e.add_columns)},edit:{columns:e.edit_columns,title:e.edit_title,schema:Zs(e.edit_columns),defaultValues:Es(e.edit_columns)}}:null,Hf=async(e,t,r)=>{const{fetchPath:n,options:o}=$e({path:Se(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 Yf({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[d,f]=v.useState(t?Ar(null,t):null),p=v.useRef(e),y=v.useMemo(()=>(p.current=e,r?{...d,filters:[...d.filters,{col:r.foreign_key,opr:r.type,value:ze(r.id)}]}:d),[r,d]),b=v.useCallback(_=>f(P=>{if(typeof _=="function"&&(_=_(P)),!P)return Ar(null,_);const D=Ar({...P},_);if((_.filters||_.order_column||_.order_direction)&&!_.page&&(D.page=0),u){if(_.page&&_.page!==P.page&&!_.streaming)throw new Error("You cannot change page in streaming mode, use streaming.fetch() instead");if(_.page_size&&_.page_size!==P.page_size)throw new Error("You cannot change page size in streaming mode, use streaming.fetch() instead")}return D}),[u]),[h,C]=v.useState(null),x=v.useMemo(()=>h,[h]),F=v.useCallback(()=>C(null),[]),{data:$,isFetching:w,refetch:S,error:I}=tt.useQuery({queryKey:[`info-${e}`],queryFn:({signal:_})=>Ju(Se(e,"_info"),_).then(P=>({...Gf(P),path:e})),placeholderData:o?null:tt.keepPreviousData,enabled:n,retry:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,...a}),{data:j,isFetching:H,refetch:U,error:m}=tt.useQuery({queryKey:[`data-${p.current}`,JSON.stringify(y)],queryFn:({signal:_})=>y?Xu(Se(p.current,"/"),y,_).then(P=>({...P,result:P.result.map((D,V)=>({...D,id:P.ids[V]})),path:p.current})):null,placeholderData:s?null:tt.keepPreviousData,retry:!1,...c});v.useEffect(()=>{if(I){C({message:"Couldn't fetch info",originalError:I});return}if(m){C({message:"Couldn't fetch list",originalError:m});return}F()},[I,m,F]);const A=v.useMemo(()=>w||H,[w,H]);ve.useDidUpdate(()=>{if(!i)return;const _=Ar(null,t);d!=null&&d.page_size&&(_.page_size=d.page_size),b(_)},[e]);const L=v.useCallback(async _=>{try{const P=await Zu(e,ze(_));return F(),P}catch(P){C({message:`Couldn't fetch item with id ${_}`,originalError:P})}},[e,F]),Y=v.useCallback(async(_,P)=>{try{const D=await qu(e,_);return P||(S(),U()),F(),D}catch(D){C({message:"Couldn't add item",originalError:D})}},[U,S,e,F]),J=v.useCallback(async(_,P,D)=>{try{const V=await Qu(e,ze(_),P);return D||(S(),U()),F(),V}catch(V){C({message:`Couldn't update item with id ${_}`,originalError:V})}},[U,S,e,F]),ae=v.useCallback(async(_,P)=>{try{const D=await Ku(e,ze(_));return P||(S(),U()),F(),D}catch(D){C({message:`Couldn't delete item with id ${_}`,originalError:D})}},[U,S,e,F]),le=v.useCallback(async _=>{try{await Hf(_,e,y)}catch(P){C({message:"Couldn't download",originalError:P})}},[e,y]),[ge,me]=ve.useSetState({data:{},isEnd:!1,fetch:()=>null});v.useEffect(()=>{u&&me({fetch:()=>b({page:0,streaming:!0})})},[b,me,u]),v.useEffect(()=>{u&&j&&me(_=>{let P=Object.keys(_.data).length;const D={isEnd:!1};return y.page<P?(P=y.page,D.data={[y.page]:j.result}):D.data={..._.data,[y.page]:j.result},j.result.length<y.page_size?(D.isEnd=!0,D.fetch=()=>null):D.fetch=()=>b({page:P+1,streaming:!0}),D})},[j,b,me,u]);const Me=v.useMemo(()=>{const _={all:"all",actions:"actions"};return j==null||j.list_columns.forEach(P=>{_[P]&&(_[P]=`_${P}`)}),_},[j==null?void 0:j.list_columns]),O=v.useCallback(()=>y?U():b(),[U,y,b]);return{path:e,data:j,info:$,queryParams:y,loading:A,error:x,streaming:ge,specialKey:Me,setQueryParams:b,refetch:O,refetchInfo:S,getEntry:L,addEntry:Y,updateEntry:J,deleteEntry:ae,download:le}}const qf=async(e,t,r)=>{const{fetchPath:n,options:o}=$e({path:Se(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},Kf=({path:e,refetch:t})=>{const[r,n]=v.useState([]),[o,s]=v.useState(null),i=v.useCallback(async(c,u)=>{try{s(null);const d=await qf(e,c,r);return u||t(),d}catch(d){console.error(d),s({message:"Couldn't perform bulk action",originalError:d})}},[e,t,r]);return{bulkActions:v.useMemo(()=>({selectedIds:r,setSelectedIds:n}),[r,n]),dispatchBulkActions:i,error:o}};function Qs({resource_name:e="",initialQueryParams:t,relation:r,fetchInfo:n,clearInfoOnRefetch:o,clearDataOnRefetch:s,resetQueryParamsOnPathChange:i,infoQueryProps:a,dataQueryProps:c,children:u,streaming:d}){const{baseUrl:f}=ws(),p=Yf({path:Se(f,e),initialQueryParams:t,relation:r,fetchInfo:n,clearInfoOnRefetch:o,clearDataOnRefetch:s,resetQueryParamsOnPathChange:i,infoQueryProps:a,dataQueryProps:c,streaming:d}),y=sr(p),b=Kf(y),h=sr(b);return l.jsx(Ts.Provider,{value:y,children:l.jsx(Cs.Provider,{value:h,children:u})})}/**
5
5
  * @license @tabler/icons-react v3.30.0 - MIT
6
6
  *
7
7
  * This source code is licensed under the MIT license.
8
8
  * See the LICENSE file in the root directory of this source tree.
9
- */var Kf={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
9
+ */var Jf={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
10
10
  * @license @tabler/icons-react v3.30.0 - MIT
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 _e=(e,t,r,n)=>{const o=v.forwardRef(({color:s="currentColor",size:i=24,stroke:a=2,title:c,className:u,children:d,...f},p)=>v.createElement("svg",{ref:p,...Kf[e],width:i,height:i,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),strokeWidth:a,stroke:s,...f},[c&&v.createElement("title",{key:"svg-title"},c),...n.map(([y,b])=>v.createElement(y,b)),...Array.isArray(d)?d:[d]]));return o.displayName=`${r}`,o};/**
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:d,...f},p)=>v.createElement("svg",{ref:p,...Jf[e],width:i,height:i,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),strokeWidth:a,stroke:s,...f},[c&&v.createElement("title",{key:"svg-title"},c),...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.30.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 Jf=_e("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 Zf=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"}]]);/**
20
20
  * @license @tabler/icons-react v3.30.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 Zf=_e("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 Xf=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"}]]);/**
25
25
  * @license @tabler/icons-react v3.30.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 Xf=_e("outline","check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
29
+ */var ro=we("outline","chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
30
30
  * @license @tabler/icons-react v3.30.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 to=_e("outline","chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
34
+ */var Rs=we("outline","chevron-up","IconChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
35
35
  * @license @tabler/icons-react v3.30.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 Qs=_e("outline","chevron-up","IconChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
39
+ */var ei=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"}]]);/**
40
40
  * @license @tabler/icons-react v3.30.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 Rs=_e("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"}]]);/**
44
+ */var Qf=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"}]]);/**
45
45
  * @license @tabler/icons-react v3.30.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 Qf=_e("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"}]]);/**
49
+ */var Rf=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"}]]);/**
50
50
  * @license @tabler/icons-react v3.30.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 Rf=_e("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"}]]);/**
54
+ */var ed=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"}]]);/**
55
55
  * @license @tabler/icons-react v3.30.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 ed=_e("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"}]]);/**
59
+ */var ti=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"}]]);/**
60
60
  * @license @tabler/icons-react v3.30.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 ei=_e("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"}]]);/**
64
+ */var td=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"}]]);/**
65
65
  * @license @tabler/icons-react v3.30.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 td=_e("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"}]]);/**
69
+ */var ri=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"}]]);/**
70
70
  * @license @tabler/icons-react v3.30.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 ti=_e("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"}]]);/**
74
+ */var rd=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"}]]);/**
75
75
  * @license @tabler/icons-react v3.30.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 rd=_e("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"}]]);/**
79
+ */var nd=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"}]]);/**
80
80
  * @license @tabler/icons-react v3.30.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 nd=_e("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"}]]);/**
84
+ */var Br=we("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.30.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 Br=_e("outline","plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
89
+ */var od=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"}]]);/**
90
90
  * @license @tabler/icons-react v3.30.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 od=_e("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"}]]);/**
94
+ */var ni=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"}]]);/**
95
95
  * @license @tabler/icons-react v3.30.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 ri=_e("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"}]]);/**
99
+ */var sd=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"}]]);/**
100
100
  * @license @tabler/icons-react v3.30.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 sd=_e("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"}]]);/**
105
- * @license @tabler/icons-react v3.30.0 - MIT
106
- *
107
- * This source code is licensed under the MIT license.
108
- * See the LICENSE file in the root directory of this source tree.
109
- */var ro=_e("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function ni(){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(Jf,{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 id({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 oi({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)},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(ri,{})})}),l.jsx(id,{opened:s,onClose:a,handleAccept:c,handleReject:a})]})}const no=(e,t)=>{const r=t.split("."),n=e[r[0]];if(r.length>1&&Array.isArray(n))return n.map(s=>no(s,r.slice(1).join("."))).join(", ");const o=t.split(".").reduce((s,i)=>s[i],e);return Zs(o)};function si(e,t){return e===!0||Array.isArray(e)?t:Object.fromEntries(Object.keys(e).map(r=>[r,si(e[r],t[r])]))}function ii(e,t){if(!e)return e;const r=t.values;return!r||!r.length||Array.isArray(e.id_)&&(e.id=e.id_),e}function ad(e,t){const r={};return t.forEach(n=>{if(n.type==="Related"){r[n.name]=ii(e.result[n.name],n);return}if(n.type==="RelatedList"){r[n.name]=e.result[n.name].map(o=>ii(o,n));return}r[n.name]=typeof e.result[n.name]=="boolean"?String(e.result[n.name]):e.result[n.name]}),r}function oo(e){return t=>{try{return e.validateSync(t,{abortEarly:!1}),{}}catch(r){const n={};return r instanceof Ce&&r.inner.forEach(o=>{n[o.path.replaceAll("[",".").replaceAll("]","")]=o.message}),n}}}function ld({form:e,name:t,...r}){return l.jsx(l.Fragment,{children:l.jsx(ut.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 cd({form:e,name:t,...r}){return l.jsx(l.Fragment,{children:l.jsx(ut.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 Ur({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 ai({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(Ur,{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 ud({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(Ur,{form:e,name:t,...n,label:void 0,description:void 0}):l.jsx(ai,{form:e,name:t,...n,label:void 0,description:void 0})]})}function fd({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 dd({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 li({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 Vr({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(li,{form:e,name:t,items:[{label:"true",value:n?"1":"true"},{label:"false",value:n?"0":"false"}],...s});case"RelatedList":return l.jsx(fd,{form:e,name:t,items:r.values,comboboxProps:{withinPortal:o},...s});case"Related":return l.jsx(dd,{form:e,name:t,items:r.values,filter:n,comboboxProps:{withinPortal:o},...s});case"DateTime":return l.jsx(cd,{form:e,name:t,valueFormat:"DD.MM.YYYY HH:mm:ss",schema:r,popoverProps:{withinPortal:o},...s});case"Date":return l.jsx(ld,{form:e,name:t,valueFormat:"DD.MM.YYYY",schema:r,popoverProps:{withinPortal:o},...s});case"Geometry":return l.jsx(ud,{form:e,name:t,filter:n,...s});case"Raw":return l.jsx(ai,{form:e,name:t,filter:n,...s});case"Integer":case"Float":return l.jsx(Ur,{form:e,name:t,...s});case"Enum":return l.jsx(li,{form:e,name:t,items:r.values,comboboxProps:{withinPortal:o},...s});default:return l.jsx(Ur,{form:e,name:t,...s})}}function pd(e,t){return new Promise(r=>{r(ad(e,t.edit.columns))})}function ci({item:e,info:t,opened:r,onClose:n,...o}){const{updateEntry:s}=te(),i={modal:{},stack:{},saveButton:{}},{modal:a,stack:c,saveButton:u}=g.useProps("EditDialog",i,o),d=sr.useForm({initialValues:t.edit.defaultValues,validate:oo(t.edit.schema)}),f=()=>{const y={};return Object.keys(d.values).forEach(b=>{d.isDirty(b)&&(y[b]=!0)}),y};v.useEffect(()=>{e&&pd(e,t).then(y=>{d.setValues(y),d.resetDirty(y)})},[e,t.edit.columns]);const p=async y=>{y=si(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",...c,children:l.jsxs(g.ScrollArea.Autosize,{mah:450,type:"auto",children:[t.edit.columns.map((y,b)=>l.jsx(Vr,{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",...u,children:"Save"})})]})})})}):null}function ui({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),[c,u]=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()=>{u(!0);const p=await n(e);p&&(a(p),u(!1),f(!0))},children:l.jsx(nd,{})})}),l.jsx(ci,{item:i,info:r,opened:d,onClose:()=>f(!1)})]})}function hd({relatedPath:e,...t}){const{path:r}=te();return Se(r?r.substring(0,r.lastIndexOf("/")):"",e.substring(0,e.lastIndexOf("/"))),l.jsx(Xs,{resource_name:e.replace("/",""),relation:t,children:l.jsx(mo,{hideToolbar:!0,hideDownload:!1})})}const gd=v.memo(hd);function md({item:e,info:t,loading:r,opened:n,onClose:o,...s}){const i={modal:{},tabs:{},tabsList:{},tabsPanel:{}},{modal:a,tabs:c,tabsList:u,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",...c,children:[l.jsxs(g.Tabs.List,{...u,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:no(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(gd,{relatedPath:f.path,id:je(e.id),foreign_key:f.foreign_key,type:f.type})})},p))]}):null]})}function yd({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),[c,u]=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()=>{u(!0);const p=await n(e);p&&(a(p),u(!1),f(!0))},children:l.jsx(Rf,{})})}),l.jsx(md,{item:i,info:r,loading:c,opened:d,onClose:()=>f(!1)})]})}function so({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(yd,{id:e}):null,t!=null&&t.permissions.includes("can_put")?l.jsx(ui,{id:e}):null,t!=null&&t.permissions.includes("can_delete")?l.jsx(oi,{id:e}):null]})}function io({opened:e,onClose:t,...r}){const{info:n,addEntry:o}=te(),s={modal:{},stack:{},addButton:{}},{addButton:i,modal:a,stack:c}=g.useProps("AddDialog",s,r),u=sr.useForm({initialValues:n.add.defaultValues,validate:oo(n.add.schema)}),d=async f=>{await o(f),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(d),children:l.jsx(g.Stack,{spacing:"md",...c,children:l.jsxs(g.ScrollArea.Autosize,{mah:450,type:"auto",children:[n.add.columns.map((f,p)=>l.jsx(Vr,{form:u,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 fi(...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(Br,{})})}),l.jsx(io,{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:di,setPrototypeOf:pi,isFrozen:bd,getPrototypeOf:vd,getOwnPropertyDescriptor:Td}=Object;let{freeze:Ie,seal:Ue,create:hi}=Object,{apply:ao,construct:lo}=typeof Reflect<"u"&&Reflect;Ie||(Ie=function(t){return t}),Ue||(Ue=function(t){return t}),ao||(ao=function(t,r,n){return t.apply(r,n)}),lo||(lo=function(t,r){return new t(...r)});const Wr=Me(Array.prototype.forEach),Sd=Me(Array.prototype.lastIndexOf),gi=Me(Array.prototype.pop),lr=Me(Array.prototype.push),_d=Me(Array.prototype.splice),Gr=Me(String.prototype.toLowerCase),co=Me(String.prototype.toString),mi=Me(String.prototype.match),cr=Me(String.prototype.replace),wd=Me(String.prototype.indexOf),Cd=Me(String.prototype.trim),Ye=Me(Object.prototype.hasOwnProperty),ke=Me(RegExp.prototype.test),ur=Ed(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 ao(e,t,n)}}function Ed(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return lo(e,r)}}function R(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Gr;pi&&pi(e,null);let n=t.length;for(;n--;){let o=t[n];if(typeof o=="string"){const s=r(o);s!==o&&(bd(t)||(t[n]=s),o=s)}e[o]=!0}return e}function xd(e){for(let t=0;t<e.length;t++)Ye(e,t)||(e[t]=null);return e}function _t(e){const t=hi(null);for(const[r,n]of di(e))Ye(e,r)&&(Array.isArray(n)?t[r]=xd(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=_t(n):t[r]=n);return t}function fr(e,t){for(;e!==null;){const n=Td(e,t);if(n){if(n.get)return Me(n.get);if(typeof n.value=="function")return Me(n.value)}e=vd(e)}function r(){return null}return r}const yi=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"]),uo=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"]),fo=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"]),Ad=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"]),po=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"]),Od=Ie(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),bi=Ie(["#text"]),vi=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"]),ho=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"]),Ti=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"]),Hr=Ie(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$d=Ue(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Pd=Ue(/<%[\w\W]*|[\w\W]*%>/gm),Id=Ue(/\$\{[\w\W]*/gm),kd=Ue(/^data-[\-\w.\u00B7-\uFFFF]+$/),Md=Ue(/^aria-[\-\w]+$/),Si=Ue(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Dd=Ue(/^(?:\w+script|data):/i),Fd=Ue(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_i=Ue(/^html$/i),Nd=Ue(/^[a-z][.\w]*(-[.\w]+)+$/i);var wi=Object.freeze({__proto__:null,ARIA_ATTR:Md,ATTR_WHITESPACE:Fd,CUSTOM_ELEMENT:Nd,DATA_ATTR:kd,DOCTYPE_NAME:_i,ERB_EXPR:Pd,IS_ALLOWED_URI:Si,IS_SCRIPT_OR_DATA:Dd,MUSTACHE_EXPR:$d,TMPLIT_EXPR:Id});const dr={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ld=function(){return typeof window>"u"?null:window},jd=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}},Ci=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ei(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ld();const t=Y=>Ei(Y);if(t.version="3.2.4",t.removed=[],!e||!e.document||e.document.nodeType!==dr.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:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:y}=e,b=c.prototype,h=fr(b,"cloneNode"),w=fr(b,"remove"),E=fr(b,"nextSibling"),M=fr(b,"childNodes"),A=fr(b,"parentNode");if(typeof i=="function"){const Y=r.createElement("template");Y.content&&Y.content.ownerDocument&&(r=Y.content.ownerDocument)}let _,S="";const{implementation:P,createNodeIterator:F,createDocumentFragment:j,getElementsByTagName:z}=r,{importNode:m}=n;let O=Ci();t.isSupported=typeof di=="function"&&typeof A=="function"&&P&&P.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:B,ERB_EXPR:q,TMPLIT_EXPR:ee,DATA_ATTR:fe,ARIA_ATTR:se,IS_SCRIPT_OR_DATA:be,ATTR_WHITESPACE:we,CUSTOM_ELEMENT:G}=wi;let{IS_ALLOWED_URI:x}=wi,$=null;const K=R({},[...yi,...uo,...fo,...po,...bi]);let W=null;const J=R({},[...vi,...ho,...Ti,...Hr]);let U=Object.seal(hi(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,N=null,X=!0,L=!0,Q=!1,he=!0,D=!1,Ne=!0,Ge=!1,Rt=!1,us=!1,er=!1,An=!1,On=!1,uu=!0,fu=!1;const Mx="user-content-";let fs=!0,Cr=!1,tr={},rr=null;const du=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 pu=null;const hu=R({},["audio","video","img","source","image","track"]);let ds=null;const gu=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$n="http://www.w3.org/1998/Math/MathML",Pn="http://www.w3.org/2000/svg",lt="http://www.w3.org/1999/xhtml";let nr=lt,ps=!1,hs=null;const Dx=R({},[$n,Pn,lt],co);let In=R({},["mi","mo","mn","ms","mtext"]),kn=R({},["annotation-xml"]);const Fx=R({},["title","style","font","a","script"]);let Er=null;const Nx=["application/xhtml+xml","text/html"],Lx="text/html";let Ee=null,or=null;const jx=r.createElement("form"),mu=function(T){return T instanceof RegExp||T instanceof Function},gs=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(or&&or===T)){if((!T||typeof T!="object")&&(T={}),T=_t(T),Er=Nx.indexOf(T.PARSER_MEDIA_TYPE)===-1?Lx:T.PARSER_MEDIA_TYPE,Ee=Er==="application/xhtml+xml"?co:Gr,$=Ye(T,"ALLOWED_TAGS")?R({},T.ALLOWED_TAGS,Ee):K,W=Ye(T,"ALLOWED_ATTR")?R({},T.ALLOWED_ATTR,Ee):J,hs=Ye(T,"ALLOWED_NAMESPACES")?R({},T.ALLOWED_NAMESPACES,co):Dx,ds=Ye(T,"ADD_URI_SAFE_ATTR")?R(_t(gu),T.ADD_URI_SAFE_ATTR,Ee):gu,pu=Ye(T,"ADD_DATA_URI_TAGS")?R(_t(hu),T.ADD_DATA_URI_TAGS,Ee):hu,rr=Ye(T,"FORBID_CONTENTS")?R({},T.FORBID_CONTENTS,Ee):du,Z=Ye(T,"FORBID_TAGS")?R({},T.FORBID_TAGS,Ee):{},N=Ye(T,"FORBID_ATTR")?R({},T.FORBID_ATTR,Ee):{},tr=Ye(T,"USE_PROFILES")?T.USE_PROFILES:!1,X=T.ALLOW_ARIA_ATTR!==!1,L=T.ALLOW_DATA_ATTR!==!1,Q=T.ALLOW_UNKNOWN_PROTOCOLS||!1,he=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,D=T.SAFE_FOR_TEMPLATES||!1,Ne=T.SAFE_FOR_XML!==!1,Ge=T.WHOLE_DOCUMENT||!1,er=T.RETURN_DOM||!1,An=T.RETURN_DOM_FRAGMENT||!1,On=T.RETURN_TRUSTED_TYPE||!1,us=T.FORCE_BODY||!1,uu=T.SANITIZE_DOM!==!1,fu=T.SANITIZE_NAMED_PROPS||!1,fs=T.KEEP_CONTENT!==!1,Cr=T.IN_PLACE||!1,x=T.ALLOWED_URI_REGEXP||Si,nr=T.NAMESPACE||lt,In=T.MATHML_TEXT_INTEGRATION_POINTS||In,kn=T.HTML_INTEGRATION_POINTS||kn,U=T.CUSTOM_ELEMENT_HANDLING||{},T.CUSTOM_ELEMENT_HANDLING&&mu(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&mu(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),D&&(L=!1),An&&(er=!0),tr&&($=R({},bi),W=[],tr.html===!0&&(R($,yi),R(W,vi)),tr.svg===!0&&(R($,uo),R(W,ho),R(W,Hr)),tr.svgFilters===!0&&(R($,fo),R(W,ho),R(W,Hr)),tr.mathMl===!0&&(R($,po),R(W,Ti),R(W,Hr))),T.ADD_TAGS&&($===K&&($=_t($)),R($,T.ADD_TAGS,Ee)),T.ADD_ATTR&&(W===J&&(W=_t(W)),R(W,T.ADD_ATTR,Ee)),T.ADD_URI_SAFE_ATTR&&R(ds,T.ADD_URI_SAFE_ATTR,Ee),T.FORBID_CONTENTS&&(rr===du&&(rr=_t(rr)),R(rr,T.FORBID_CONTENTS,Ee)),fs&&($["#text"]=!0),Ge&&R($,["html","head","body"]),$.table&&(R($,["tbody"]),delete Z.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw ur('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ur('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=T.TRUSTED_TYPES_POLICY,S=_.createHTML("")}else _===void 0&&(_=jd(y,o)),_!==null&&typeof S=="string"&&(S=_.createHTML(""));Ie&&Ie(T),or=T}},yu=R({},[...uo,...fo,...Ad]),bu=R({},[...po,...Od]),zx=function(T){let k=A(T);(!k||!k.tagName)&&(k={namespaceURI:nr,tagName:"template"});const V=Gr(T.tagName),ge=Gr(k.tagName);return hs[T.namespaceURI]?T.namespaceURI===Pn?k.namespaceURI===lt?V==="svg":k.namespaceURI===$n?V==="svg"&&(ge==="annotation-xml"||In[ge]):!!yu[V]:T.namespaceURI===$n?k.namespaceURI===lt?V==="math":k.namespaceURI===Pn?V==="math"&&kn[ge]:!!bu[V]:T.namespaceURI===lt?k.namespaceURI===Pn&&!kn[ge]||k.namespaceURI===$n&&!In[ge]?!1:!bu[V]&&(Fx[V]||!yu[V]):!!(Er==="application/xhtml+xml"&&hs[T.namespaceURI]):!1},et=function(T){lr(t.removed,{element:T});try{A(T).removeChild(T)}catch{w(T)}},Mn=function(T,k){try{lr(t.removed,{attribute:k.getAttributeNode(T),from:k})}catch{lr(t.removed,{attribute:null,from:k})}if(k.removeAttribute(T),T==="is")if(er||An)try{et(k)}catch{}else try{k.setAttribute(T,"")}catch{}},vu=function(T){let k=null,V=null;if(us)T="<remove></remove>"+T;else{const xe=mi(T,/^[\r\n\t ]+/);V=xe&&xe[0]}Er==="application/xhtml+xml"&&nr===lt&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const ge=_?_.createHTML(T):T;if(nr===lt)try{k=new p().parseFromString(ge,Er)}catch{}if(!k||!k.documentElement){k=P.createDocument(nr,"template",null);try{k.documentElement.innerHTML=ps?S:ge}catch{}}const Oe=k.body||k.documentElement;return T&&V&&Oe.insertBefore(r.createTextNode(V),Oe.childNodes[0]||null),nr===lt?z.call(k,Ge?"html":"body")[0]:Ge?k.documentElement:Oe},Tu=function(T){return F.call(T.ownerDocument||T,T,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},ms=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")},Su=function(T){return typeof a=="function"&&T instanceof a};function ct(Y,T,k){Wr(Y,V=>{V.call(t,T,k,or)})}const _u=function(T){let k=null;if(ct(O.beforeSanitizeElements,T,null),ms(T))return et(T),!0;const V=Ee(T.nodeName);if(ct(O.uponSanitizeElement,T,{tagName:V,allowedTags:$}),T.hasChildNodes()&&!Su(T.firstElementChild)&&ke(/<[/\w]/g,T.innerHTML)&&ke(/<[/\w]/g,T.textContent)||T.nodeType===dr.progressingInstruction||Ne&&T.nodeType===dr.comment&&ke(/<[/\w]/g,T.data))return et(T),!0;if(!$[V]||Z[V]){if(!Z[V]&&Cu(V)&&(U.tagNameCheck instanceof RegExp&&ke(U.tagNameCheck,V)||U.tagNameCheck instanceof Function&&U.tagNameCheck(V)))return!1;if(fs&&!rr[V]){const ge=A(T)||T.parentNode,Oe=M(T)||T.childNodes;if(Oe&&ge){const xe=Oe.length;for(let Le=xe-1;Le>=0;--Le){const tt=h(Oe[Le],!0);tt.__removalCount=(T.__removalCount||0)+1,ge.insertBefore(tt,E(T))}}}return et(T),!0}return T instanceof c&&!zx(T)||(V==="noscript"||V==="noembed"||V==="noframes")&&ke(/<\/no(script|embed|frames)/i,T.innerHTML)?(et(T),!0):(D&&T.nodeType===dr.text&&(k=T.textContent,Wr([B,q,ee],ge=>{k=cr(k,ge," ")}),T.textContent!==k&&(lr(t.removed,{element:T.cloneNode()}),T.textContent=k)),ct(O.afterSanitizeElements,T,null),!1)},wu=function(T,k,V){if(uu&&(k==="id"||k==="name")&&(V in r||V in jx))return!1;if(!(L&&!N[k]&&ke(fe,k))){if(!(X&&ke(se,k))){if(!W[k]||N[k]){if(!(Cu(T)&&(U.tagNameCheck instanceof RegExp&&ke(U.tagNameCheck,T)||U.tagNameCheck instanceof Function&&U.tagNameCheck(T))&&(U.attributeNameCheck instanceof RegExp&&ke(U.attributeNameCheck,k)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(k))||k==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&ke(U.tagNameCheck,V)||U.tagNameCheck instanceof Function&&U.tagNameCheck(V))))return!1}else if(!ds[k]){if(!ke(x,cr(V,we,""))){if(!((k==="src"||k==="xlink:href"||k==="href")&&T!=="script"&&wd(V,"data:")===0&&pu[T])){if(!(Q&&!ke(be,cr(V,we,"")))){if(V)return!1}}}}}}return!0},Cu=function(T){return T!=="annotation-xml"&&mi(T,G)},Eu=function(T){ct(O.beforeSanitizeAttributes,T,null);const{attributes:k}=T;if(!k||ms(T))return;const V={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let ge=k.length;for(;ge--;){const Oe=k[ge],{name:xe,namespaceURI:Le,value:tt}=Oe,xr=Ee(xe);let De=xe==="value"?tt:Cd(tt);if(V.attrName=xr,V.attrValue=De,V.keepAttr=!0,V.forceKeepAttr=void 0,ct(O.uponSanitizeAttribute,T,V),De=V.attrValue,fu&&(xr==="id"||xr==="name")&&(Mn(xe,T),De=Mx+De),Ne&&ke(/((--!?|])>)|<\/(style|title)/i,De)){Mn(xe,T);continue}if(V.forceKeepAttr||(Mn(xe,T),!V.keepAttr))continue;if(!he&&ke(/\/>/i,De)){Mn(xe,T);continue}D&&Wr([B,q,ee],Au=>{De=cr(De,Au," ")});const xu=Ee(T.nodeName);if(wu(xu,xr,De)){if(_&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!Le)switch(y.getAttributeType(xu,xr)){case"TrustedHTML":{De=_.createHTML(De);break}case"TrustedScriptURL":{De=_.createScriptURL(De);break}}try{Le?T.setAttributeNS(Le,xe,De):T.setAttribute(xe,De),ms(T)?et(T):gi(t.removed)}catch{}}}ct(O.afterSanitizeAttributes,T,null)},Bx=function Y(T){let k=null;const V=Tu(T);for(ct(O.beforeSanitizeShadowDOM,T,null);k=V.nextNode();)ct(O.uponSanitizeShadowNode,k,null),_u(k),Eu(k),k.content instanceof s&&Y(k.content);ct(O.afterSanitizeShadowDOM,T,null)};return t.sanitize=function(Y){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=null,V=null,ge=null,Oe=null;if(ps=!Y,ps&&(Y="<!-->"),typeof Y!="string"&&!Su(Y))if(typeof Y.toString=="function"){if(Y=Y.toString(),typeof Y!="string")throw ur("dirty is not a string, aborting")}else throw ur("toString is not a function");if(!t.isSupported)return Y;if(Rt||gs(T),t.removed=[],typeof Y=="string"&&(Cr=!1),Cr){if(Y.nodeName){const tt=Ee(Y.nodeName);if(!$[tt]||Z[tt])throw ur("root node is forbidden and cannot be sanitized in-place")}}else if(Y instanceof a)k=vu("<!---->"),V=k.ownerDocument.importNode(Y,!0),V.nodeType===dr.element&&V.nodeName==="BODY"||V.nodeName==="HTML"?k=V:k.appendChild(V);else{if(!er&&!D&&!Ge&&Y.indexOf("<")===-1)return _&&On?_.createHTML(Y):Y;if(k=vu(Y),!k)return er?null:On?S:""}k&&us&&et(k.firstChild);const xe=Tu(Cr?Y:k);for(;ge=xe.nextNode();)_u(ge),Eu(ge),ge.content instanceof s&&Bx(ge.content);if(Cr)return Y;if(er){if(An)for(Oe=j.call(k.ownerDocument);k.firstChild;)Oe.appendChild(k.firstChild);else Oe=k;return(W.shadowroot||W.shadowrootmode)&&(Oe=m.call(n,Oe,!0)),Oe}let Le=Ge?k.outerHTML:k.innerHTML;return Ge&&$["!doctype"]&&k.ownerDocument&&k.ownerDocument.doctype&&k.ownerDocument.doctype.name&&ke(_i,k.ownerDocument.doctype.name)&&(Le="<!DOCTYPE "+k.ownerDocument.doctype.name+`>
110
- `+Le),D&&Wr([B,q,ee],tt=>{Le=cr(Le,tt," ")}),_&&On?_.createHTML(Le):Le},t.setConfig=function(){let Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gs(Y),Rt=!0},t.clearConfig=function(){or=null,Rt=!1},t.isValidAttribute=function(Y,T,k){or||gs({});const V=Ee(Y),ge=Ee(T);return wu(V,ge,k)},t.addHook=function(Y,T){typeof T=="function"&&lr(O[Y],T)},t.removeHook=function(Y,T){if(T!==void 0){const k=Sd(O[Y],T);return k===-1?void 0:_d(O[Y],k,1)[0]}return gi(O[Y])},t.removeHooks=function(Y){O[Y]=[]},t.removeAllHooks=function(){O=Ci()},t}var xi=Ei();const Xe=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});Xe.displayName="FallbackWrapper";const zd={field:"_field_zdaf7_1",rtl:"_rtl_zdaf7_7",borderRight:"_borderRight_zdaf7_12"},Yr=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:d}=g.useProps("Field",u,c),f={};Object.entries(d).forEach(([y,b])=>{typeof b=="function"&&(f[y]=b(t))});const p=g.useStyles({name:"Field",props:c,classes:zd});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(Xe,{fallback:Array.isArray(o)?o.map((y,b)=>l.jsx(g.Text,{...d,...f,children:a?xi.sanitize(y):y},b)):v.isValidElement(o)?o:l.jsx(g.Text,{...d,...f,children:a?xi.sanitize(o):o}),functionProps:[t],children:i})})})})});Yr.displayName="Field";const Ai={row:"_row_138r2_1",selected:"_selected_138r2_5"};function Bd({entry:e,selected:t,children:r}){const n=g.useStyles({name:"Row",classes:Ai}),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?Ai.selected:""}`,l.jsx(g.Table.Tr,{className:s,style:{...i},...o,children:r})}function Ud({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(so,{id:r})}function Vd({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",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(Bd,{entry:{...f,id:y},children:[n?null:l.jsx(Yr,{loading:t,children:l.jsx(g.Checkbox,{pl:2,checked:o.includes(y),onChange:b=>{s(y)}})},p),r?null:l.jsx(Yr,{loading:t,children:l.jsx(Ud,{bodyCustomizer:a,actionColumn:u,id:je(y),entry:f})}),e.list_columns.map((b,h)=>{let w=a==null?void 0:a[b];typeof w=="function"&&(w=w({id:y,...f}));let E=no(f,b);typeof E=="number"?E=E.toLocaleString():E==null&&(E="");const M=(c==null?void 0:c[b])||(c==null?void 0:c[d]);return M&&(E=E.split(M)),w===null?null:l.jsx(Yr,{id:y,entry:f,loading:t,onClickEntry:i,customElement:w,sanitize:!0,children:E},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 Oi={root:"_root_1kmay_1",wrapper:"_wrapper_1kmay_7",icon:"_icon_1kmay_18"};function go({column:e,label:t,orderColumn:r,related:n,toggleAll:o,allChecked:s,classNames:i,styles:a,customElement:c,...u}){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:Oi,classNames:i,styles:a,props:u}),h=g.useProps("FieldTitle",y,u),{hovered:w,ref:E}=Te.useHover(),M=r&&d.order_column===r,A=b("wrapper");return A.style.cursor=r?A.style.cursor:"auto",l.jsx(g.Table.Th,{className:Oi.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:E,...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:w&&r?h.hoverColor:M?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:M?d.order_direction==="asc"?l.jsx(to,{size:14,strokeWidth:1.5}):l.jsx(Qs,{size:14,strokeWidth:1.5}):null})})}):l.jsx(g.Box,{...b("icon"),children:M?d.order_direction==="asc"?l.jsx(to,{size:14,strokeWidth:1.5}):l.jsx(Qs,{size:14,strokeWidth:1.5}):null})]})})})}const $i=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(go,{data:e,column:"Checkbox",allChecked:s,toggleAll:i}),n?null:l.jsx(go,{column:"Actions",customElement:u}),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(go,{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)})]})})});$i.displayName="Header";const Wd={scrollbar:"_scrollbar_isyo2_1"};function Gd({bulkActions:e,hideActions:t,loading:r,onSelectCheckbox:n,onClickEntry:o,hideCheckbox:s,hideDownload:i,headerCustomizer:a,bodyCustomizer:c,bodySeparator:u,...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(),[w,E]=v.useState([]),[M,A]=v.useState(!1),_=P=>{E(F=>F.includes(P)?F.filter(j=>j!==P):[...F,P])},S=()=>{E(P=>P.length===b.ids.length?[]:b.ids.map((F,j)=>F))};return v.useEffect(()=>{A(w.length===b.result.length&&w.length>0),n&&n(w),e==null||e.setSelectedIds(w.map(P=>P))},[w]),v.useEffect(()=>{E([]),n&&n([])},[b]),l.jsx(g.ScrollArea,{options:{className:f.colorScheme==="dark"?"os-theme-light":void 0},style:{flex:1,flexDirection:"column"},classNames:Wd,children:l.jsxs(g.Table,{stickyHeader:!0,...y,children:[l.jsx($i,{data:b,info:h,hideActions:t,hideCheckbox:s,allChecked:M,setSelection:E,toggleAll:S,headerCustomizer:a}),l.jsx(Vd,{data:b,loading:r,hideActions:t,hideCheckbox:s,selection:w,setSelection:E,toggleRow:_,onClickEntry:o,bodyCustomizer:c,bodySeparator:u})]})})}const Pi=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),[c,u]=v.useState(n.page);v.useEffect(()=>{u(n.page)},[n.page]);const d=p=>{u(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:c+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]})]})});Pi.displayName="Pagination";const Hd=0,Yd=25,wt=250,pr="global",It="header:",Ii=It+"ctt",ki=It+"between_integer",Mi=It+"between_date",kt=e=>e!==pr&&!e.startsWith(It);function qd({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 Di({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(""),d=y=>{c!==""&&(i.includes(c)||a(b=>[...b,c]),u(""))},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:c,placeholder:"Search values",onChange:y=>{s.updateSelectedOptionIndex(),u(y.currentTarget.value)},onKeyDown:y=>{y.key==="Backspace"&&c.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 ",c]})})})]})})}function Kd({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 Fi({onClose:e,...t}){const{info:r,queryParams:n,setQueryParams:o,path:s}=te(),i=sr.useForm({initialValues:{filters:[]},validate:oo(ar({filters:Qn().of(ar({col:Lr().transform(f=>f||void 0).required("Field is required"),opr:Lr().transform(f=>f||void 0).required("col is required"),value:Nr().when("col",{is:f=>f&&r.filters[f].schema.required,then:()=>Nr().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 f=n.filters.filter(p=>kt(p.opr)).map(p=>({...p,key:Te.randomId()}));i.setFieldValue("filters",f)}},[n.filters]);const u=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(qd,{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:Te.randomId()})}})}),l.jsx(g.Box,{style:{width:"192px"},children:f.col?l.jsx(Kd,{form:i,name:`filters.${p}.opr`,items:r.filters[f.col].filters.filter(y=>kt(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:Te.randomId()})}}):null}),l.jsx(g.Box,{style:{width:"192px"},children:f.col?f.opr==="in"?l.jsx(Di,{form:i,name:`filters.${p}.value`}):l.jsx(Vr,{form:i,name:`filters.${p}.value`,schema:r.filters[f.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(ri,{})})]}),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(u),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(Br,{}),onClick:()=>{i.insertListItem("filters",{col:"",opr:"",value:"",key:Te.randomId()})},children:"Add Filter"}),l.jsx(g.Group,{spacing:"md",children:l.jsx(g.Button,{type:"submit",children:"Apply"})})]})]})}function Ni(...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=>kt(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(ei,{})})}):l.jsx(g.ActionIcon,{bg:n.bg,size:n.size,c:n.c,onClick:()=>s(!0),children:l.jsx(ei,{})})})}),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(Fi,{onClose:()=>{s(!1)}})]})]})}function Jd(...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(Rs,{})})})}const Li=v.memo(({hideAdd:e,hideFilter:t,hideDownload:r,toolbarCustomizer:n})=>{const{info:o}=te(),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(Jd,{})),i&&!e?s.add||l.jsx(fi,{}):null,t?null:s.filter||l.jsx(Ni,{})]})});Li.displayName="Toolbar";const mo=v.forwardRef((e,t)=>{const{path:r,data:n,loading:o,info:s,setQueryParams:i}=te(),{hideToolbar:a=!1,hideFilter:c=!1,hideAdd:u=!1,hideSettings:d=!1,hideActions:f=!1,hidePagination:p=!1,hideError:y=!1,hideDownload:b=!0,onSelectCheckbox:h=null,onClickEntry:w=null,fetchOnMount:E=!0,bulkActions:M=null,styles:A,headerCustomizer:_={},bodyCustomizer:S={},toolbarCustomizer:P={},counter:F=!1,bodySeparator:j}=e;if(v.useEffect(()=>{!n&&E&&i({})},[n]),!s)return;const z=M===null;return l.jsxs(g.Paper,{ref:t,style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",...A},children:[a?null:l.jsx(Li,{hideFilter:c,hideAdd:u,hideSettings:d,hideDownload:b,toolbarCustomizer:P}),n?l.jsx(Gd,{bulkActions:M,hideActions:f,loading:o,onSelectCheckbox:h,onClickEntry:w,hideCheckbox:z,hideDownload:b,headerCustomizer:_,bodyCustomizer:S,bodySeparator:j}):null,!p&&n?l.jsx(Pi,{counter:F}):null,y?null:l.jsx(ni,{})]})});mo.displayName="DataGrid";function Zd({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:c,inViewport:u}=Te.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(()=>{u&&t&&i.fetch()},[u]),l.jsxs(l.Fragment,{children:[f,a&&r,i.isEnd&&n,l.jsx(o,{ref:c,id:"IS-load-trigger",mih:"1%",...s})]})}var Xd=Object.prototype;function Qd(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Xd;return e===r}var qr=Qd;function Rd(e,t){return function(r){return e(t(r))}}var ji=Rd,ep=ji,tp=ep(Object.keys,Object),rp=tp,np=qr,op=rp,sp=Object.prototype,ip=sp.hasOwnProperty;function ap(e){if(!np(e))return op(e);var t=[];for(var r in Object(e))ip.call(e,r)&&r!="constructor"&&t.push(r);return t}var lp=ap,cp=typeof Or=="object"&&Or&&Or.Object===Object&&Or,zi=cp,up=zi,fp=typeof self=="object"&&self&&self.Object===Object&&self,dp=up||fp||Function("return this")(),qe=dp,pp=qe,hp=pp.Symbol,Kr=hp,Bi=Kr,Ui=Object.prototype,gp=Ui.hasOwnProperty,mp=Ui.toString,hr=Bi?Bi.toStringTag:void 0;function yp(e){var t=gp.call(e,hr),r=e[hr];try{e[hr]=void 0;var n=!0}catch{}var o=mp.call(e);return n&&(t?e[hr]=r:delete e[hr]),o}var bp=yp,vp=Object.prototype,Tp=vp.toString;function Sp(e){return Tp.call(e)}var _p=Sp,Vi=Kr,wp=bp,Cp=_p,Ep="[object Null]",xp="[object Undefined]",Wi=Vi?Vi.toStringTag:void 0;function Ap(e){return e==null?e===void 0?xp:Ep:Wi&&Wi in Object(e)?wp(e):Cp(e)}var Mt=Ap;function Op(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ot=Op,$p=Mt,Pp=ot,Ip="[object AsyncFunction]",kp="[object Function]",Mp="[object GeneratorFunction]",Dp="[object Proxy]";function Fp(e){if(!Pp(e))return!1;var t=$p(e);return t==kp||t==Mp||t==Ip||t==Dp}var yo=Fp,Np=qe,Lp=Np["__core-js_shared__"],jp=Lp,bo=jp,Gi=function(){var e=/[^.]+$/.exec(bo&&bo.keys&&bo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function zp(e){return!!Gi&&Gi in e}var Bp=zp,Up=Function.prototype,Vp=Up.toString;function Wp(e){if(e!=null){try{return Vp.call(e)}catch{}try{return e+""}catch{}}return""}var Hi=Wp,Gp=yo,Hp=Bp,Yp=ot,qp=Hi,Kp=/[\\^$.*+?()[\]{}|]/g,Jp=/^\[object .+?Constructor\]$/,Zp=Function.prototype,Xp=Object.prototype,Qp=Zp.toString,Rp=Xp.hasOwnProperty,eh=RegExp("^"+Qp.call(Rp).replace(Kp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function th(e){if(!Yp(e)||Hp(e))return!1;var t=Gp(e)?eh:Jp;return t.test(qp(e))}var rh=th;function nh(e,t){return e==null?void 0:e[t]}var oh=nh,sh=rh,ih=oh;function ah(e,t){var r=ih(e,t);return sh(r)?r:void 0}var Ct=ah,lh=Ct,ch=qe,uh=lh(ch,"DataView"),fh=uh,dh=Ct,ph=qe,hh=dh(ph,"Map"),vo=hh,gh=Ct,mh=qe,yh=gh(mh,"Promise"),bh=yh,vh=Ct,Th=qe,Sh=vh(Th,"Set"),Yi=Sh,_h=Ct,wh=qe,Ch=_h(wh,"WeakMap"),Eh=Ch,To=fh,So=vo,_o=bh,wo=Yi,Co=Eh,qi=Mt,Dt=Hi,Ki="[object Map]",xh="[object Object]",Ji="[object Promise]",Zi="[object Set]",Xi="[object WeakMap]",Qi="[object DataView]",Ah=Dt(To),Oh=Dt(So),$h=Dt(_o),Ph=Dt(wo),Ih=Dt(Co),Et=qi;(To&&Et(new To(new ArrayBuffer(1)))!=Qi||So&&Et(new So)!=Ki||_o&&Et(_o.resolve())!=Ji||wo&&Et(new wo)!=Zi||Co&&Et(new Co)!=Xi)&&(Et=function(e){var t=qi(e),r=t==xh?e.constructor:void 0,n=r?Dt(r):"";if(n)switch(n){case Ah:return Qi;case Oh:return Ki;case $h:return Ji;case Ph:return Zi;case Ih:return Xi}return t});var kh=Et;function Mh(e){return e!=null&&typeof e=="object"}var Ft=Mh,Dh=Mt,Fh=Ft,Nh="[object Arguments]";function Lh(e){return Fh(e)&&Dh(e)==Nh}var jh=Lh,Ri=jh,zh=Ft,ea=Object.prototype,Bh=ea.hasOwnProperty,Uh=ea.propertyIsEnumerable,Vh=Ri(function(){return arguments}())?Ri:function(e){return zh(e)&&Bh.call(e,"callee")&&!Uh.call(e,"callee")},Jr=Vh,Wh=Array.isArray,gr=Wh,Gh=9007199254740991;function Hh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Gh}var ta=Hh,Yh=yo,qh=ta;function Kh(e){return e!=null&&qh(e.length)&&!Yh(e)}var Zr=Kh,Xr={exports:{}};function Jh(){return!1}var Zh=Jh;Xr.exports,function(e,t){var r=qe,n=Zh,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}(Xr,Xr.exports);var Eo=Xr.exports,Xh=Mt,Qh=ta,Rh=Ft,eg="[object Arguments]",tg="[object Array]",rg="[object Boolean]",ng="[object Date]",og="[object Error]",sg="[object Function]",ig="[object Map]",ag="[object Number]",lg="[object Object]",cg="[object RegExp]",ug="[object Set]",fg="[object String]",dg="[object WeakMap]",pg="[object ArrayBuffer]",hg="[object DataView]",gg="[object Float32Array]",mg="[object Float64Array]",yg="[object Int8Array]",bg="[object Int16Array]",vg="[object Int32Array]",Tg="[object Uint8Array]",Sg="[object Uint8ClampedArray]",_g="[object Uint16Array]",wg="[object Uint32Array]",de={};de[gg]=de[mg]=de[yg]=de[bg]=de[vg]=de[Tg]=de[Sg]=de[_g]=de[wg]=!0,de[eg]=de[tg]=de[pg]=de[rg]=de[hg]=de[ng]=de[og]=de[sg]=de[ig]=de[ag]=de[lg]=de[cg]=de[ug]=de[fg]=de[dg]=!1;function Cg(e){return Rh(e)&&Qh(e.length)&&!!de[Xh(e)]}var Eg=Cg;function xg(e){return function(t){return e(t)}}var Ag=xg,Qr={exports:{}};Qr.exports,function(e,t){var r=zi,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}(Qr,Qr.exports);var Og=Qr.exports,$g=Eg,Pg=Ag,ra=Og,na=ra&&ra.isTypedArray,Ig=na?Pg(na):$g,xo=Ig,kg=lp,Mg=kh,Dg=Jr,Fg=gr,Ng=Zr,Lg=Eo,jg=qr,zg=xo,Bg="[object Map]",Ug="[object Set]",Vg=Object.prototype,Wg=Vg.hasOwnProperty;function Gg(e){if(e==null)return!0;if(Ng(e)&&(Fg(e)||typeof e=="string"||typeof e.splice=="function"||Lg(e)||zg(e)||Dg(e)))return!e.length;var t=Mg(e);if(t==Bg||t==Ug)return!e.size;if(jg(e))return!kg(e).length;for(var r in e)if(Wg.call(e,r))return!1;return!0}var Hg=Gg;const oa=ft(Hg),sa=(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(ue.JsonFormsDispatch,{uischema:a,schema:t,path:r,enabled:n,renderers:s,cells:i})},`${r}-${c}`)),Yg=({elements:e,schema:t,path:r,enabled:n,direction:o,renderers:s,cells:i})=>oa(e)?null:l.jsx(g.Grid,{spacing:o==="row"?2:0,children:sa(e,t,r,n,o,s,i)}),Ao=v.memo(Yg),qg=e=>function(r){const n=ue.useJsonForms(),o=H.getAjv({jsonforms:{...n}});return l.jsx(e,{...r,ajv:o})};var Kg=qe,Jg=function(){return Kg.Date.now()},Zg=Jg,Xg=/\s/;function Qg(e){for(var t=e.length;t--&&Xg.test(e.charAt(t)););return t}var Rg=Qg,em=Rg,tm=/^\s+/;function rm(e){return e&&e.slice(0,em(e)+1).replace(tm,"")}var nm=rm,om=Mt,sm=Ft,im="[object Symbol]";function am(e){return typeof e=="symbol"||sm(e)&&om(e)==im}var ia=am,lm=nm,aa=ot,cm=ia,la=NaN,um=/^[-+]0x[0-9a-f]+$/i,fm=/^0b[01]+$/i,dm=/^0o[0-7]+$/i,pm=parseInt;function hm(e){if(typeof e=="number")return e;if(cm(e))return la;if(aa(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=aa(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=lm(e);var r=fm.test(e);return r||dm.test(e)?pm(e.slice(2),r?2:8):um.test(e)?la:+e}var ca=hm,gm=ot,Oo=Zg,ua=ca,mm="Expected a function",ym=Math.max,bm=Math.min;function vm(e,t,r){var n,o,s,i,a,c,u=0,d=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(mm);t=ua(t)||0,gm(r)&&(d=!!r.leading,f="maxWait"in r,s=f?ym(ua(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p);function y(P){var F=n,j=o;return n=o=void 0,u=P,i=e.apply(j,F),i}function b(P){return u=P,a=setTimeout(E,t),d?y(P):i}function h(P){var F=P-c,j=P-u,z=t-F;return f?bm(z,s-j):z}function w(P){var F=P-c,j=P-u;return c===void 0||F>=t||F<0||f&&j>=s}function E(){var P=Oo();if(w(P))return M(P);a=setTimeout(E,h(P))}function M(P){return a=void 0,p&&n?y(P):(n=o=void 0,i)}function A(){a!==void 0&&clearTimeout(a),u=0,n=c=o=a=void 0}function _(){return a===void 0?i:M(Oo())}function S(){var P=Oo(),F=w(P);if(n=arguments,o=this,c=P,F){if(a===void 0)return b(c);if(f)return clearTimeout(a),a=setTimeout(E,t),y(c)}return a===void 0&&(a=setTimeout(E,t)),i}return S.cancel=A,S.flush=_,S}var Tm=vm;const Sm=ft(Tm),fa=(e,t,r,n,o,s=300)=>{const[i,a]=v.useState(r??t);v.useEffect(()=>{a(r??t)},[r]);const c=v.useCallback(Sm(f=>e(n,f),s),[e,n,s]),u=v.useCallback(f=>{const p=o(f);a(p??t),c(p)},[c,o]),d=v.useCallback(()=>{a(t),e(n,void 0)},[t,e,n]);return[i,u,d]},_m=e=>e===""?void 0:parseFloat(e),wm=e=>_m(e),Rr=v.memo(function(t){const{allowDecimal:r,className:n,data:o,description:s,errors:i,enabled:a,handleChange:c,label:u,path:d,required:f,hideControls:p}=t,[y,b]=fa(c,"",o,d,wm),h=g.useProps(d,{},{});return Object.keys(h).forEach(w=>{typeof h[w]=="function"&&(h[w]=h[w](o))}),l.jsx(g.NumberInput,{label:u,description:s,error:i,required:f,value:y,onChange:b,className:n,disabled:!a,allowDecimal:r,hideControls:p,w:"100%",...h})});function Cm(){this.__data__=[],this.size=0}var Em=Cm;function xm(e,t){return e===t||e!==e&&t!==t}var en=xm,Am=en;function Om(e,t){for(var r=e.length;r--;)if(Am(e[r][0],t))return r;return-1}var tn=Om,$m=tn,Pm=Array.prototype,Im=Pm.splice;function km(e){var t=this.__data__,r=$m(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Im.call(t,r,1),--this.size,!0}var Mm=km,Dm=tn;function Fm(e){var t=this.__data__,r=Dm(t,e);return r<0?void 0:t[r][1]}var Nm=Fm,Lm=tn;function jm(e){return Lm(this.__data__,e)>-1}var zm=jm,Bm=tn;function Um(e,t){var r=this.__data__,n=Bm(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Vm=Um,Wm=Em,Gm=Mm,Hm=Nm,Ym=zm,qm=Vm;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=Wm,Nt.prototype.delete=Gm,Nt.prototype.get=Hm,Nt.prototype.has=Ym,Nt.prototype.set=qm;var rn=Nt,Km=rn;function Jm(){this.__data__=new Km,this.size=0}var Zm=Jm;function Xm(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Qm=Xm;function Rm(e){return this.__data__.get(e)}var ey=Rm;function ty(e){return this.__data__.has(e)}var ry=ty,ny=Ct,oy=ny(Object,"create"),nn=oy,da=nn;function sy(){this.__data__=da?da(null):{},this.size=0}var iy=sy;function ay(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ly=ay,cy=nn,uy="__lodash_hash_undefined__",fy=Object.prototype,dy=fy.hasOwnProperty;function py(e){var t=this.__data__;if(cy){var r=t[e];return r===uy?void 0:r}return dy.call(t,e)?t[e]:void 0}var hy=py,gy=nn,my=Object.prototype,yy=my.hasOwnProperty;function by(e){var t=this.__data__;return gy?t[e]!==void 0:yy.call(t,e)}var vy=by,Ty=nn,Sy="__lodash_hash_undefined__";function _y(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ty&&t===void 0?Sy:t,this}var wy=_y,Cy=iy,Ey=ly,xy=hy,Ay=vy,Oy=wy;function Lt(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])}}Lt.prototype.clear=Cy,Lt.prototype.delete=Ey,Lt.prototype.get=xy,Lt.prototype.has=Ay,Lt.prototype.set=Oy;var $y=Lt,pa=$y,Py=rn,Iy=vo;function ky(){this.size=0,this.__data__={hash:new pa,map:new(Iy||Py),string:new pa}}var My=ky;function Dy(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Fy=Dy,Ny=Fy;function Ly(e,t){var r=e.__data__;return Ny(t)?r[typeof t=="string"?"string":"hash"]:r.map}var on=Ly,jy=on;function zy(e){var t=jy(this,e).delete(e);return this.size-=t?1:0,t}var By=zy,Uy=on;function Vy(e){return Uy(this,e).get(e)}var Wy=Vy,Gy=on;function Hy(e){return Gy(this,e).has(e)}var Yy=Hy,qy=on;function Ky(e,t){var r=qy(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Jy=Ky,Zy=My,Xy=By,Qy=Wy,Ry=Yy,e0=Jy;function jt(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])}}jt.prototype.clear=Zy,jt.prototype.delete=Xy,jt.prototype.get=Qy,jt.prototype.has=Ry,jt.prototype.set=e0;var ha=jt,t0=rn,r0=vo,n0=ha,o0=200;function s0(e,t){var r=this.__data__;if(r instanceof t0){var n=r.__data__;if(!r0||n.length<o0-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new n0(n)}return r.set(e,t),this.size=r.size,this}var i0=s0,a0=rn,l0=Zm,c0=Qm,u0=ey,f0=ry,d0=i0;function zt(e){var t=this.__data__=new a0(e);this.size=t.size}zt.prototype.clear=l0,zt.prototype.delete=c0,zt.prototype.get=u0,zt.prototype.has=f0,zt.prototype.set=d0;var p0=zt,h0=Ct,g0=function(){try{var e=h0(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ga=g0,ma=ga;function m0(e,t,r){t=="__proto__"&&ma?ma(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var $o=m0,y0=$o,b0=en;function v0(e,t,r){(r!==void 0&&!b0(e[t],r)||r===void 0&&!(t in e))&&y0(e,t,r)}var ya=v0;function T0(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 S0=T0,_0=S0,w0=_0(),C0=w0,sn={exports:{}};sn.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,d){if(d)return u.slice();var f=u.length,p=a?a(f):new u.constructor(f);return u.copy(p),p}e.exports=c}(sn,sn.exports);var E0=sn.exports,x0=qe,A0=x0.Uint8Array,O0=A0,ba=O0;function $0(e){var t=new e.constructor(e.byteLength);return new ba(t).set(new ba(e)),t}var P0=$0,I0=P0;function k0(e,t){var r=t?I0(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var M0=k0;function D0(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var F0=D0,N0=ot,va=Object.create,L0=function(){function e(){}return function(t){if(!N0(t))return{};if(va)return va(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),j0=L0,z0=ji,B0=z0(Object.getPrototypeOf,Object),Ta=B0,U0=j0,V0=Ta,W0=qr;function G0(e){return typeof e.constructor=="function"&&!W0(e)?U0(V0(e)):{}}var H0=G0,Y0=Zr,q0=Ft;function K0(e){return q0(e)&&Y0(e)}var Sa=K0,J0=Mt,Z0=Ta,X0=Ft,Q0="[object Object]",R0=Function.prototype,eb=Object.prototype,_a=R0.toString,tb=eb.hasOwnProperty,rb=_a.call(Object);function nb(e){if(!X0(e)||J0(e)!=Q0)return!1;var t=Z0(e);if(t===null)return!0;var r=tb.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&_a.call(r)==rb}var ob=nb;function sb(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var wa=sb,ib=$o,ab=en,lb=Object.prototype,cb=lb.hasOwnProperty;function ub(e,t,r){var n=e[t];(!(cb.call(e,t)&&ab(n,r))||r===void 0&&!(t in e))&&ib(e,t,r)}var fb=ub,db=fb,pb=$o;function hb(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?pb(r,a,c):db(r,a,c)}return r}var gb=hb;function mb(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var yb=mb,bb=9007199254740991,vb=/^(?:0|[1-9]\d*)$/;function Tb(e,t){var r=typeof e;return t=t??bb,!!t&&(r=="number"||r!="symbol"&&vb.test(e))&&e>-1&&e%1==0&&e<t}var Ca=Tb,Sb=yb,_b=Jr,wb=gr,Cb=Eo,Eb=Ca,xb=xo,Ab=Object.prototype,Ob=Ab.hasOwnProperty;function $b(e,t){var r=wb(e),n=!r&&_b(e),o=!r&&!n&&Cb(e),s=!r&&!n&&!o&&xb(e),i=r||n||o||s,a=i?Sb(e.length,String):[],c=a.length;for(var u in e)(t||Ob.call(e,u))&&!(i&&(u=="length"||o&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Eb(u,c)))&&a.push(u);return a}var Pb=$b;function Ib(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var kb=Ib,Mb=ot,Db=qr,Fb=kb,Nb=Object.prototype,Lb=Nb.hasOwnProperty;function jb(e){if(!Mb(e))return Fb(e);var t=Db(e),r=[];for(var n in e)n=="constructor"&&(t||!Lb.call(e,n))||r.push(n);return r}var zb=jb,Bb=Pb,Ub=zb,Vb=Zr;function Wb(e){return Vb(e)?Bb(e,!0):Ub(e)}var Ea=Wb,Gb=gb,Hb=Ea;function Yb(e){return Gb(e,Hb(e))}var qb=Yb,xa=ya,Kb=E0,Jb=M0,Zb=F0,Xb=H0,Aa=Jr,Oa=gr,Qb=Sa,Rb=Eo,ev=yo,tv=ot,rv=ob,nv=xo,$a=wa,ov=qb;function sv(e,t,r,n,o,s,i){var a=$a(e,r),c=$a(t,r),u=i.get(c);if(u){xa(e,r,u);return}var d=s?s(a,c,r+"",e,t,i):void 0,f=d===void 0;if(f){var p=Oa(c),y=!p&&Rb(c),b=!p&&!y&&nv(c);d=c,p||y||b?Oa(a)?d=a:Qb(a)?d=Zb(a):y?(f=!1,d=Kb(c,!0)):b?(f=!1,d=Jb(c,!0)):d=[]:rv(c)||Aa(c)?(d=a,Aa(a)?d=ov(a):(!tv(a)||ev(a))&&(d=Xb(c))):f=!1}f&&(i.set(c,d),o(d,c,n,s,i),i.delete(c)),xa(e,r,d)}var iv=sv,av=p0,lv=ya,cv=C0,uv=iv,fv=ot,dv=Ea,pv=wa;function Pa(e,t,r,n,o){e!==t&&cv(t,function(s,i){if(o||(o=new av),fv(s))uv(e,t,i,r,Pa,n,o);else{var a=n?n(pv(e,i),s,i+"",e,t,o):void 0;a===void 0&&(a=s),lv(e,i,a)}},dv)}var hv=Pa;function gv(e){return e}var Ia=gv;function mv(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 yv=mv,bv=yv,ka=Math.max;function vv(e,t,r){return t=ka(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,s=ka(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),bv(e,this,a)}}var Tv=vv;function Sv(e){return function(){return e}}var _v=Sv,wv=_v,Ma=ga,Cv=Ia,Ev=Ma?function(e,t){return Ma(e,"toString",{configurable:!0,enumerable:!1,value:wv(t),writable:!0})}:Cv,xv=Ev,Av=800,Ov=16,$v=Date.now;function Pv(e){var t=0,r=0;return function(){var n=$v(),o=Ov-(n-r);if(r=n,o>0){if(++t>=Av)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Iv=Pv,kv=xv,Mv=Iv,Dv=Mv(kv),Fv=Dv,Nv=Ia,Lv=Tv,jv=Fv;function zv(e,t){return jv(Lv(e,t,Nv),e+"")}var Da=zv,Bv=en,Uv=Zr,Vv=Ca,Wv=ot;function Gv(e,t,r){if(!Wv(r))return!1;var n=typeof t;return(n=="number"?Uv(r)&&Vv(t,r.length):n=="string"&&t in r)?Bv(r[t],e):!1}var Fa=Gv,Hv=Da,Yv=Fa;function qv(e){return Hv(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&&Yv(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 Kv=qv,Jv=hv,Zv=Kv,Xv=Zv(function(e,t,r){Jv(e,t,r)}),Qv=Xv;const Na=ft(Qv),La=v.memo(function(t){const{className:r,config:n,uischema:o,data:s,description:i,errors:a,enabled:c,path:u,handleChange:d,label:f,required:p}=t,y=Na({},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:f,description:i,error:a,required:p,value:s||"",onChange:h=>{d(u,h.currentTarget.value)},className:r,disabled:!c,w:"100%",...b}):l.jsx(g.TextInput,{label:f,description:i,error:a,required:p,value:s||"",onChange:h=>{d(u,h.currentTarget.value)},className:r,disabled:!c,w:"100%",...b})}),ja=v.memo(function(t){const{className:r,data:n,description:o,enabled:s,errors:i,handleChange:a,label:c,labelPosition:u,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:c,description:o,error:i,disabled:!s,className:r,labelPosition:u,required:f,data:[{label:"true",value:"true"},{label:"false",value:"false"}],value:String(n)||"",onChange:y=>{a(d,y==="true")},...p})}),Rv=e=>l.jsx(Rr,{...e}),za=H.rankWith(4,H.isNumberControl),Ba=ue.withJsonFormsCellProps(Rv),e1=e=>l.jsx(Rr,{...e}),Ua=H.rankWith(3,H.isIntegerControl),Va=ue.withJsonFormsCellProps(e1),t1=e=>l.jsx(La,{...e}),Wa=H.rankWith(2,H.isStringControl),Ga=ue.withJsonFormsCellProps(t1),r1=e=>l.jsx(ja,{...e}),Ha=H.rankWith(3,H.isBooleanControl),Ya=ue.withJsonFormsCellProps(r1),n1=e=>{const{data:t,className:r,enabled:n,path:o,handleChange:s,description:i,errors:a,label:c,required:u}=e,d=g.useProps(o,{},{});return Object.keys(d).forEach(f=>{typeof d[f]=="function"&&(d[f]=d[f](t))}),l.jsx(ut.DateInput,{valueFormat:"DD.MM.YYYY",label:c,description:i,error:a,required:u,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})},qa=H.rankWith(2,H.isDateControl),Ka=ue.withJsonFormsCellProps(n1),o1=e=>{const{description:t,className:r,enabled:n,path:o,handleChange:s,data:i,errors:a,label:c,required:u}=e,d=g.useProps(o,{},{});return Object.keys(d).forEach(f=>{typeof d[f]=="function"&&(d[f]=d[f](i))}),l.jsx(ut.DateInput,{valueFormat:"DD.MM.YYYY",className:r,disabled:!n,label:c,description:t,error:a,required:u,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})},Ja=H.rankWith(5,H.isDateTimeControl),Za=ue.withJsonFormsControlProps(o1),s1=e=>{const{description:t,data:r,path:n,options:o,enabled:s,handleChange:i,className:a,errors:c,label:u,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:u,description:t,required:d,error:c,disabled:!s,searchable:!0,onChange:p=>{i(n,p)},className:a,w:"100%",...f})},Xa=H.rankWith(5,H.isEnumControl),Qa=ue.withJsonFormsEnumProps(ue.withTranslateProps(v.memo(s1)),!1);function i1(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var a1=i1,Ra=Kr,l1=Jr,c1=gr,el=Ra?Ra.isConcatSpreadable:void 0;function u1(e){return c1(e)||l1(e)||!!(el&&e&&e[el])}var f1=u1,d1=a1,p1=f1;function tl(e,t,r,n,o){var s=-1,i=e.length;for(r||(r=p1),o||(o=[]);++s<i;){var a=e[s];t>0&&r(a)?t>1?tl(a,t-1,r,n,o):d1(o,a):n||(o[o.length]=a)}return o}var h1=tl,g1="__lodash_hash_undefined__";function m1(e){return this.__data__.set(e,g1),this}var y1=m1;function b1(e){return this.__data__.has(e)}var v1=b1,T1=ha,S1=y1,_1=v1;function an(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new T1;++t<r;)this.add(e[t])}an.prototype.add=an.prototype.push=S1,an.prototype.has=_1;var w1=an;function C1(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 E1=C1;function x1(e){return e!==e}var A1=x1;function O1(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}var $1=O1,P1=E1,I1=A1,k1=$1;function M1(e,t,r){return t===t?k1(e,t,r):P1(e,I1,r)}var D1=M1,F1=D1;function N1(e,t){var r=e==null?0:e.length;return!!r&&F1(e,t,0)>-1}var L1=N1;function j1(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 z1=j1;function B1(e,t){return e.has(t)}var U1=B1;function V1(){}var W1=V1;function G1(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var rl=G1,Po=Yi,H1=W1,Y1=rl,q1=1/0,K1=Po&&1/Y1(new Po([,-0]))[1]==q1?function(e){return new Po(e)}:H1,J1=K1,Z1=w1,X1=L1,Q1=z1,R1=U1,eT=J1,tT=rl,rT=200;function nT(e,t,r){var n=-1,o=X1,s=e.length,i=!0,a=[],c=a;if(r)i=!1,o=Q1;else if(s>=rT){var u=t?null:eT(e);if(u)return tT(u);i=!1,o=R1,c=new Z1}else c=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=c.length;p--;)if(c[p]===f)continue e;t&&c.push(f),a.push(d)}else o(c,f,r)||(c!==a&&c.push(f),a.push(d))}return a}var oT=nT,sT=h1,iT=Da,aT=oT,lT=Sa,cT=iT(function(e){return aT(sT(e,1,lT,!0))}),uT=cT;const fT=ft(uT);function dT(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 pT=dT;function hT(e){return function(t){return e==null?void 0:e[t]}}var gT=hT,mT=gT,yT={À:"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"},bT=mT(yT),vT=bT;function TT(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 ST=TT,nl=Kr,_T=ST,wT=gr,CT=ia,ol=nl?nl.prototype:void 0,sl=ol?ol.toString:void 0;function il(e){if(typeof e=="string")return e;if(wT(e))return _T(e,il)+"";if(CT(e))return sl?sl.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var ET=il,xT=ET;function AT(e){return e==null?"":xT(e)}var Io=AT,OT=vT,$T=Io,PT=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,IT="\\u0300-\\u036f",kT="\\ufe20-\\ufe2f",MT="\\u20d0-\\u20ff",DT=IT+kT+MT,FT="["+DT+"]",NT=RegExp(FT,"g");function LT(e){return e=$T(e),e&&e.replace(PT,OT).replace(NT,"")}var jT=LT,zT=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function BT(e){return e.match(zT)||[]}var UT=BT,VT=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function WT(e){return VT.test(e)}var GT=WT,al="\\ud800-\\udfff",HT="\\u0300-\\u036f",YT="\\ufe20-\\ufe2f",qT="\\u20d0-\\u20ff",KT=HT+YT+qT,ll="\\u2700-\\u27bf",cl="a-z\\xdf-\\xf6\\xf8-\\xff",JT="\\xac\\xb1\\xd7\\xf7",ZT="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",XT="\\u2000-\\u206f",QT=" \\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",ul="A-Z\\xc0-\\xd6\\xd8-\\xde",RT="\\ufe0e\\ufe0f",fl=JT+ZT+XT+QT,dl="['’]",pl="["+fl+"]",eS="["+KT+"]",hl="\\d+",tS="["+ll+"]",gl="["+cl+"]",ml="[^"+al+fl+hl+ll+cl+ul+"]",rS="\\ud83c[\\udffb-\\udfff]",nS="(?:"+eS+"|"+rS+")",oS="[^"+al+"]",yl="(?:\\ud83c[\\udde6-\\uddff]){2}",bl="[\\ud800-\\udbff][\\udc00-\\udfff]",Bt="["+ul+"]",sS="\\u200d",vl="(?:"+gl+"|"+ml+")",iS="(?:"+Bt+"|"+ml+")",Tl="(?:"+dl+"(?:d|ll|m|re|s|t|ve))?",Sl="(?:"+dl+"(?:D|LL|M|RE|S|T|VE))?",_l=nS+"?",wl="["+RT+"]?",aS="(?:"+sS+"(?:"+[oS,yl,bl].join("|")+")"+wl+_l+")*",lS="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",cS="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",uS=wl+_l+aS,fS="(?:"+[tS,yl,bl].join("|")+")"+uS,dS=RegExp([Bt+"?"+gl+"+"+Tl+"(?="+[pl,Bt,"$"].join("|")+")",iS+"+"+Sl+"(?="+[pl,Bt+vl,"$"].join("|")+")",Bt+"?"+vl+"+"+Tl,Bt+"+"+Sl,cS,lS,hl,fS].join("|"),"g");function pS(e){return e.match(dS)||[]}var hS=pS,gS=UT,mS=GT,yS=Io,bS=hS;function vS(e,t,r){return e=yS(e),t=r?void 0:t,t===void 0?mS(e)?bS(e):gS(e):e.match(t)||[]}var TS=vS,SS=pT,_S=jT,wS=TS,CS="['’]",ES=RegExp(CS,"g");function xS(e){return function(t){return SS(wS(_S(t).replace(ES,"")),e,"")}}var AS=xS;function OS(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 $S=OS,PS=$S;function IS(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:PS(e,t,r)}var kS=IS,MS="\\ud800-\\udfff",DS="\\u0300-\\u036f",FS="\\ufe20-\\ufe2f",NS="\\u20d0-\\u20ff",LS=DS+FS+NS,jS="\\ufe0e\\ufe0f",zS="\\u200d",BS=RegExp("["+zS+MS+LS+jS+"]");function US(e){return BS.test(e)}var Cl=US;function VS(e){return e.split("")}var WS=VS,El="\\ud800-\\udfff",GS="\\u0300-\\u036f",HS="\\ufe20-\\ufe2f",YS="\\u20d0-\\u20ff",qS=GS+HS+YS,KS="\\ufe0e\\ufe0f",JS="["+El+"]",ko="["+qS+"]",Mo="\\ud83c[\\udffb-\\udfff]",ZS="(?:"+ko+"|"+Mo+")",xl="[^"+El+"]",Al="(?:\\ud83c[\\udde6-\\uddff]){2}",Ol="[\\ud800-\\udbff][\\udc00-\\udfff]",XS="\\u200d",$l=ZS+"?",Pl="["+KS+"]?",QS="(?:"+XS+"(?:"+[xl,Al,Ol].join("|")+")"+Pl+$l+")*",RS=Pl+$l+QS,e_="(?:"+[xl+ko+"?",ko,Al,Ol,JS].join("|")+")",t_=RegExp(Mo+"(?="+Mo+")|"+e_+RS,"g");function r_(e){return e.match(t_)||[]}var n_=r_,o_=WS,s_=Cl,i_=n_;function a_(e){return s_(e)?i_(e):o_(e)}var l_=a_,c_=kS,u_=Cl,f_=l_,d_=Io;function p_(e){return function(t){t=d_(t);var r=u_(t)?f_(t):void 0,n=r?r[0]:t.charAt(0),o=r?c_(r,1).join(""):t.slice(1);return n[e]()+o}}var h_=p_,g_=h_,m_=g_("toUpperCase"),y_=m_,b_=AS,v_=y_,T_=b_(function(e,t,r){return e+(r?" ":"")+v_(t)}),S_=T_;const __=ft(S_);var w_=Math.ceil,C_=Math.max;function E_(e,t,r,n){for(var o=-1,s=C_(w_((t-e)/(r||1)),0),i=Array(s);s--;)i[n?s:++o]=e,e+=r;return i}var x_=E_,A_=ca,O_=1/0,$_=17976931348623157e292;function P_(e){if(!e)return e===0?e:0;if(e=A_(e),e===O_||e===-1/0){var t=e<0?-1:1;return t*$_}return e===e?e:0}var I_=P_,k_=x_,M_=Fa,Do=I_;function D_(e){return function(t,r,n){return n&&typeof n!="number"&&M_(t,r,n)&&(r=n=void 0),t=Do(t),r===void 0?(r=t,t=0):r=Do(r),n=n===void 0?t<r?1:-1:Do(n),k_(t,r,n,e)}}var F_=D_,N_=F_,L_=N_(),j_=L_;const z_=ft(j_);var Fo={exports:{}},ie={};/**
104
+ */var no=we("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function oi(){const{error:e}=Q(),[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(Zf,{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 id({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 si({id:e,...t}){const{deleteEntry:r}=Q(),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(ni,{})})}),l.jsx(id,{opened:s,onClose:a,handleAccept:c,handleReject:a})]})}const oo=(e,t)=>{const r=t.split("."),n=e[r[0]];if(r.length>1&&Array.isArray(n))return n.map(s=>oo(s,r.slice(1).join("."))).join(", ");const o=t.split(".").reduce((s,i)=>s[i],e);return Xs(o)};function ii(e,t){return e===!0||Array.isArray(e)?t:Object.fromEntries(Object.keys(e).map(r=>[r,ii(e[r],t[r])]))}function ai(e,t){if(!e)return e;const r=t.values;return!r||!r.length||Array.isArray(e.id_)&&(e.id=e.id_),e}function ad(e,t){const r={};return t.forEach(n=>{if(n.type==="Related"){r[n.name]=ai(e.result[n.name],n);return}if(n.type==="RelatedList"){r[n.name]=e.result[n.name].map(o=>ai(o,n));return}r[n.name]=typeof e.result[n.name]=="boolean"?String(e.result[n.name]):e.result[n.name]}),r}function so(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 ld({form:e,name:t,...r}){return l.jsx(l.Fragment,{children:l.jsx(ft.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 cd({form:e,name:t,...r}){return l.jsx(l.Fragment,{children:l.jsx(ft.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 Ur({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 li({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(Ur,{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 ud({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(Ur,{form:e,name:t,...n,label:void 0,description:void 0}):l.jsx(li,{form:e,name:t,...n,label:void 0,description:void 0})]})}function fd({form:e,name:t,items:r,...n}){const o=r.map(i=>({value:String(ze(i.id)),label:i.value})),s=Array.isArray(e.getInputProps(t).value)?e.getInputProps(t).value.map(i=>String(typeof i=="object"?ze(i.id):i)):[];return l.jsx(g.MultiSelect,{data:o,searchable:!0,...e.getInputProps(t),value:s||[],...n})}function dd({form:e,name:t,items:r,filter:n,...o}){var i;const s=r.map(a=>({value:String(ze(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(ze(u.id))===a)||null;e.setFieldValue(t,c)},value:n?e.getInputProps(t).value:String(ze((i=e.getInputProps(t).value)==null?void 0:i.id))||"",...o})}function ci({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 Vr({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(ci,{form:e,name:t,items:[{label:"true",value:n?"1":"true"},{label:"false",value:n?"0":"false"}],...s});case"RelatedList":return l.jsx(fd,{form:e,name:t,items:r.values,comboboxProps:{withinPortal:o},...s});case"Related":return l.jsx(dd,{form:e,name:t,items:r.values,filter:n,comboboxProps:{withinPortal:o},...s});case"DateTime":return l.jsx(cd,{form:e,name:t,valueFormat:"DD.MM.YYYY HH:mm:ss",schema:r,popoverProps:{withinPortal:o},...s});case"Date":return l.jsx(ld,{form:e,name:t,valueFormat:"DD.MM.YYYY",schema:r,popoverProps:{withinPortal:o},...s});case"Geometry":return l.jsx(ud,{form:e,name:t,filter:n,...s});case"Raw":return l.jsx(li,{form:e,name:t,filter:n,...s});case"Integer":case"Float":return l.jsx(Ur,{form:e,name:t,...s});case"Enum":return l.jsx(ci,{form:e,name:t,items:r.values,comboboxProps:{withinPortal:o},...s});default:return l.jsx(Ur,{form:e,name:t,...s})}}function pd(e,t){return new Promise(r=>{r(ad(e,t.edit.columns))})}function ui({item:e,info:t,opened:r,onClose:n,...o}){const{updateEntry:s}=Q(),i={modal:{},stack:{},saveButton:{}},{modal:a,stack:c,saveButton:u}=g.useProps("EditDialog",i,o),d=or.useForm({initialValues:t.edit.defaultValues,validate:so(t.edit.schema)}),f=()=>{const y={};return Object.keys(d.values).forEach(b=>{d.isDirty(b)&&(y[b]=!0)}),y};v.useEffect(()=>{e&&pd(e,t).then(y=>{d.setValues(y),d.resetDirty(y)})},[e,t.edit.columns]);const p=async y=>{y=ii(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",...c,children:l.jsxs(g.ScrollArea.Autosize,{mah:450,type:"auto",children:[t.edit.columns.map((y,b)=>l.jsx(Vr,{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",...u,children:"Save"})})]})})})}):null}function fi({id:e,...t}){const{info:r,getEntry:n}=Q(),o={bg:"transparent",size:"sm",c:"gray"},s=g.useProps("ActionIcon",o,t),[i,a]=v.useState(null),[c,u]=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()=>{u(!0);const p=await n(e);p&&(a(p),u(!1),f(!0))},children:l.jsx(nd,{})})}),l.jsx(ui,{item:i,info:r,opened:d,onClose:()=>f(!1)})]})}function hd({relatedPath:e,...t}){const{path:r}=Q();return Se(r?r.substring(0,r.lastIndexOf("/")):"",e.substring(0,e.lastIndexOf("/"))),l.jsx(Qs,{resource_name:e.replace("/",""),relation:t,children:l.jsx(yo,{hideToolbar:!0,hideDownload:!1})})}const gd=v.memo(hd);function md({item:e,info:t,loading:r,opened:n,onClose:o,...s}){const i={modal:{},tabs:{},tabsList:{},tabsPanel:{}},{modal:a,tabs:c,tabsList:u,tabsPanel:d}=g.useProps("ViewDialog",i,s);return l.jsxs(g.Modal,{opened:n,onClose:o,title:`${e==null?void 0:e.show_title} (#${ze(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((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:oo(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(gd,{relatedPath:f.path,id:ze(e.id),foreign_key:f.foreign_key,type:f.type})})},p))]}):null]})}function yd({id:e,...t}){const{info:r,getEntry:n}=Q(),o={bg:"transparent",size:"sm",c:"gray"},s=g.useProps("ActionIcon",o,t),[i,a]=v.useState(null),[c,u]=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()=>{u(!0);const p=await n(e);p&&(a(p),u(!1),f(!0))},children:l.jsx(Rf,{})})}),l.jsx(md,{item:i,info:r,loading:c,opened:d,onClose:()=>f(!1)})]})}function io({id:e}){const{info:t}=Q();return l.jsxs(g.Flex,{style:{gap:4,whiteSpace:"nowrap"},children:[t!=null&&t.permissions.includes("can_get")?l.jsx(yd,{id:e}):null,t!=null&&t.permissions.includes("can_put")?l.jsx(fi,{id:e}):null,t!=null&&t.permissions.includes("can_delete")?l.jsx(si,{id:e}):null]})}function ao({opened:e,onClose:t,...r}){const{info:n,addEntry:o}=Q(),s={modal:{},stack:{},addButton:{}},{addButton:i,modal:a,stack:c}=g.useProps("AddDialog",s,r),u=or.useForm({initialValues:n.add.defaultValues,validate:so(n.add.schema)}),d=async f=>{await o(f),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(d),children:l.jsx(g.Stack,{spacing:"md",...c,children:l.jsxs(g.ScrollArea.Autosize,{mah:450,type:"auto",children:[n.add.columns.map((f,p)=>l.jsx(Vr,{form:u,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 di(...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(Br,{})})}),l.jsx(ao,{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:pi,setPrototypeOf:hi,isFrozen:bd,getPrototypeOf:vd,getOwnPropertyDescriptor:Td}=Object;let{freeze:Pe,seal:Ve,create:gi}=Object,{apply:lo,construct:co}=typeof Reflect<"u"&&Reflect;Pe||(Pe=function(t){return t}),Ve||(Ve=function(t){return t}),lo||(lo=function(t,r,n){return t.apply(r,n)}),co||(co=function(t,r){return new t(...r)});const Wr=ke(Array.prototype.forEach),Sd=ke(Array.prototype.lastIndexOf),mi=ke(Array.prototype.pop),ar=ke(Array.prototype.push),_d=ke(Array.prototype.splice),Gr=ke(String.prototype.toLowerCase),uo=ke(String.prototype.toString),yi=ke(String.prototype.match),lr=ke(String.prototype.replace),wd=ke(String.prototype.indexOf),Cd=ke(String.prototype.trim),qe=ke(Object.prototype.hasOwnProperty),Ie=ke(RegExp.prototype.test),cr=Ed(TypeError);function ke(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 lo(e,t,n)}}function Ed(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return co(e,r)}}function R(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Gr;hi&&hi(e,null);let n=t.length;for(;n--;){let o=t[n];if(typeof o=="string"){const s=r(o);s!==o&&(bd(t)||(t[n]=s),o=s)}e[o]=!0}return e}function xd(e){for(let t=0;t<e.length;t++)qe(e,t)||(e[t]=null);return e}function _t(e){const t=gi(null);for(const[r,n]of pi(e))qe(e,r)&&(Array.isArray(n)?t[r]=xd(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=_t(n):t[r]=n);return t}function ur(e,t){for(;e!==null;){const n=Td(e,t);if(n){if(n.get)return ke(n.get);if(typeof n.value=="function")return ke(n.value)}e=vd(e)}function r(){return null}return r}const bi=Pe(["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"]),fo=Pe(["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"]),po=Pe(["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"]),Ad=Pe(["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"]),ho=Pe(["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"]),Od=Pe(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),vi=Pe(["#text"]),Ti=Pe(["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"]),go=Pe(["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"]),Si=Pe(["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"]),Hr=Pe(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$d=Ve(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Pd=Ve(/<%[\w\W]*|[\w\W]*%>/gm),Id=Ve(/\$\{[\w\W]*/gm),kd=Ve(/^data-[\-\w.\u00B7-\uFFFF]+$/),Md=Ve(/^aria-[\-\w]+$/),_i=Ve(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Dd=Ve(/^(?:\w+script|data):/i),Fd=Ve(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wi=Ve(/^html$/i),Nd=Ve(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ci=Object.freeze({__proto__:null,ARIA_ATTR:Md,ATTR_WHITESPACE:Fd,CUSTOM_ELEMENT:Nd,DATA_ATTR:kd,DOCTYPE_NAME:wi,ERB_EXPR:Pd,IS_ALLOWED_URI:_i,IS_SCRIPT_OR_DATA:Dd,MUSTACHE_EXPR:$d,TMPLIT_EXPR:Id});const fr={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ld=function(){return typeof window>"u"?null:window},jd=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}},Ei=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function xi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ld();const t=G=>xi(G);if(t.version="3.2.4",t.removed=[],!e||!e.document||e.document.nodeType!==fr.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:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:y}=e,b=c.prototype,h=ur(b,"cloneNode"),C=ur(b,"remove"),x=ur(b,"nextSibling"),F=ur(b,"childNodes"),$=ur(b,"parentNode");if(typeof i=="function"){const G=r.createElement("template");G.content&&G.content.ownerDocument&&(r=G.content.ownerDocument)}let w,S="";const{implementation:I,createNodeIterator:j,createDocumentFragment:H,getElementsByTagName:U}=r,{importNode:m}=n;let A=Ei();t.isSupported=typeof pi=="function"&&typeof $=="function"&&I&&I.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:L,ERB_EXPR:Y,TMPLIT_EXPR:J,DATA_ATTR:ae,ARIA_ATTR:le,IS_SCRIPT_OR_DATA:ge,ATTR_WHITESPACE:me,CUSTOM_ELEMENT:Me}=Ci;let{IS_ALLOWED_URI:O}=Ci,_=null;const P=R({},[...bi,...fo,...po,...ho,...vi]);let D=null;const V=R({},[...Ti,...go,...Si,...Hr]);let z=Object.seal(gi(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,K=null,ee=!0,te=!0,X=!1,Z=!0,N=!1,De=!0,Le=!1,Qt=!1,fs=!1,Rt=!1,On=!1,$n=!1,fu=!0,du=!1;const Fx="user-content-";let ds=!0,Cr=!1,er={},tr=null;const pu=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 hu=null;const gu=R({},["audio","video","img","source","image","track"]);let ps=null;const mu=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pn="http://www.w3.org/1998/Math/MathML",In="http://www.w3.org/2000/svg",ct="http://www.w3.org/1999/xhtml";let rr=ct,hs=!1,gs=null;const Nx=R({},[Pn,In,ct],uo);let kn=R({},["mi","mo","mn","ms","mtext"]),Mn=R({},["annotation-xml"]);const Lx=R({},["title","style","font","a","script"]);let Er=null;const jx=["application/xhtml+xml","text/html"],zx="text/html";let Ce=null,nr=null;const Bx=r.createElement("form"),yu=function(T){return T instanceof RegExp||T instanceof Function},ms=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(nr&&nr===T)){if((!T||typeof T!="object")&&(T={}),T=_t(T),Er=jx.indexOf(T.PARSER_MEDIA_TYPE)===-1?zx:T.PARSER_MEDIA_TYPE,Ce=Er==="application/xhtml+xml"?uo:Gr,_=qe(T,"ALLOWED_TAGS")?R({},T.ALLOWED_TAGS,Ce):P,D=qe(T,"ALLOWED_ATTR")?R({},T.ALLOWED_ATTR,Ce):V,gs=qe(T,"ALLOWED_NAMESPACES")?R({},T.ALLOWED_NAMESPACES,uo):Nx,ps=qe(T,"ADD_URI_SAFE_ATTR")?R(_t(mu),T.ADD_URI_SAFE_ATTR,Ce):mu,hu=qe(T,"ADD_DATA_URI_TAGS")?R(_t(gu),T.ADD_DATA_URI_TAGS,Ce):gu,tr=qe(T,"FORBID_CONTENTS")?R({},T.FORBID_CONTENTS,Ce):pu,q=qe(T,"FORBID_TAGS")?R({},T.FORBID_TAGS,Ce):{},K=qe(T,"FORBID_ATTR")?R({},T.FORBID_ATTR,Ce):{},er=qe(T,"USE_PROFILES")?T.USE_PROFILES:!1,ee=T.ALLOW_ARIA_ATTR!==!1,te=T.ALLOW_DATA_ATTR!==!1,X=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,N=T.SAFE_FOR_TEMPLATES||!1,De=T.SAFE_FOR_XML!==!1,Le=T.WHOLE_DOCUMENT||!1,Rt=T.RETURN_DOM||!1,On=T.RETURN_DOM_FRAGMENT||!1,$n=T.RETURN_TRUSTED_TYPE||!1,fs=T.FORCE_BODY||!1,fu=T.SANITIZE_DOM!==!1,du=T.SANITIZE_NAMED_PROPS||!1,ds=T.KEEP_CONTENT!==!1,Cr=T.IN_PLACE||!1,O=T.ALLOWED_URI_REGEXP||_i,rr=T.NAMESPACE||ct,kn=T.MATHML_TEXT_INTEGRATION_POINTS||kn,Mn=T.HTML_INTEGRATION_POINTS||Mn,z=T.CUSTOM_ELEMENT_HANDLING||{},T.CUSTOM_ELEMENT_HANDLING&&yu(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(z.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&yu(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(z.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(z.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),N&&(te=!1),On&&(Rt=!0),er&&(_=R({},vi),D=[],er.html===!0&&(R(_,bi),R(D,Ti)),er.svg===!0&&(R(_,fo),R(D,go),R(D,Hr)),er.svgFilters===!0&&(R(_,po),R(D,go),R(D,Hr)),er.mathMl===!0&&(R(_,ho),R(D,Si),R(D,Hr))),T.ADD_TAGS&&(_===P&&(_=_t(_)),R(_,T.ADD_TAGS,Ce)),T.ADD_ATTR&&(D===V&&(D=_t(D)),R(D,T.ADD_ATTR,Ce)),T.ADD_URI_SAFE_ATTR&&R(ps,T.ADD_URI_SAFE_ATTR,Ce),T.FORBID_CONTENTS&&(tr===pu&&(tr=_t(tr)),R(tr,T.FORBID_CONTENTS,Ce)),ds&&(_["#text"]=!0),Le&&R(_,["html","head","body"]),_.table&&(R(_,["tbody"]),delete q.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw cr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw cr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=T.TRUSTED_TYPES_POLICY,S=w.createHTML("")}else w===void 0&&(w=jd(y,o)),w!==null&&typeof S=="string"&&(S=w.createHTML(""));Pe&&Pe(T),nr=T}},bu=R({},[...fo,...po,...Ad]),vu=R({},[...ho,...Od]),Ux=function(T){let M=$(T);(!M||!M.tagName)&&(M={namespaceURI:rr,tagName:"template"});const B=Gr(T.tagName),he=Gr(M.tagName);return gs[T.namespaceURI]?T.namespaceURI===In?M.namespaceURI===ct?B==="svg":M.namespaceURI===Pn?B==="svg"&&(he==="annotation-xml"||kn[he]):!!bu[B]:T.namespaceURI===Pn?M.namespaceURI===ct?B==="math":M.namespaceURI===In?B==="math"&&Mn[he]:!!vu[B]:T.namespaceURI===ct?M.namespaceURI===In&&!Mn[he]||M.namespaceURI===Pn&&!kn[he]?!1:!vu[B]&&(Lx[B]||!bu[B]):!!(Er==="application/xhtml+xml"&&gs[T.namespaceURI]):!1},Re=function(T){ar(t.removed,{element:T});try{$(T).removeChild(T)}catch{C(T)}},Dn=function(T,M){try{ar(t.removed,{attribute:M.getAttributeNode(T),from:M})}catch{ar(t.removed,{attribute:null,from:M})}if(M.removeAttribute(T),T==="is")if(Rt||On)try{Re(M)}catch{}else try{M.setAttribute(T,"")}catch{}},Tu=function(T){let M=null,B=null;if(fs)T="<remove></remove>"+T;else{const Ee=yi(T,/^[\r\n\t ]+/);B=Ee&&Ee[0]}Er==="application/xhtml+xml"&&rr===ct&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const he=w?w.createHTML(T):T;if(rr===ct)try{M=new p().parseFromString(he,Er)}catch{}if(!M||!M.documentElement){M=I.createDocument(rr,"template",null);try{M.documentElement.innerHTML=hs?S:he}catch{}}const Ae=M.body||M.documentElement;return T&&B&&Ae.insertBefore(r.createTextNode(B),Ae.childNodes[0]||null),rr===ct?U.call(M,Le?"html":"body")[0]:Le?M.documentElement:Ae},Su=function(T){return j.call(T.ownerDocument||T,T,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},ys=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")},_u=function(T){return typeof a=="function"&&T instanceof a};function ut(G,T,M){Wr(G,B=>{B.call(t,T,M,nr)})}const wu=function(T){let M=null;if(ut(A.beforeSanitizeElements,T,null),ys(T))return Re(T),!0;const B=Ce(T.nodeName);if(ut(A.uponSanitizeElement,T,{tagName:B,allowedTags:_}),T.hasChildNodes()&&!_u(T.firstElementChild)&&Ie(/<[/\w]/g,T.innerHTML)&&Ie(/<[/\w]/g,T.textContent)||T.nodeType===fr.progressingInstruction||De&&T.nodeType===fr.comment&&Ie(/<[/\w]/g,T.data))return Re(T),!0;if(!_[B]||q[B]){if(!q[B]&&Eu(B)&&(z.tagNameCheck instanceof RegExp&&Ie(z.tagNameCheck,B)||z.tagNameCheck instanceof Function&&z.tagNameCheck(B)))return!1;if(ds&&!tr[B]){const he=$(T)||T.parentNode,Ae=F(T)||T.childNodes;if(Ae&&he){const Ee=Ae.length;for(let je=Ee-1;je>=0;--je){const et=h(Ae[je],!0);et.__removalCount=(T.__removalCount||0)+1,he.insertBefore(et,x(T))}}}return Re(T),!0}return T instanceof c&&!Ux(T)||(B==="noscript"||B==="noembed"||B==="noframes")&&Ie(/<\/no(script|embed|frames)/i,T.innerHTML)?(Re(T),!0):(N&&T.nodeType===fr.text&&(M=T.textContent,Wr([L,Y,J],he=>{M=lr(M,he," ")}),T.textContent!==M&&(ar(t.removed,{element:T.cloneNode()}),T.textContent=M)),ut(A.afterSanitizeElements,T,null),!1)},Cu=function(T,M,B){if(fu&&(M==="id"||M==="name")&&(B in r||B in Bx))return!1;if(!(te&&!K[M]&&Ie(ae,M))){if(!(ee&&Ie(le,M))){if(!D[M]||K[M]){if(!(Eu(T)&&(z.tagNameCheck instanceof RegExp&&Ie(z.tagNameCheck,T)||z.tagNameCheck instanceof Function&&z.tagNameCheck(T))&&(z.attributeNameCheck instanceof RegExp&&Ie(z.attributeNameCheck,M)||z.attributeNameCheck instanceof Function&&z.attributeNameCheck(M))||M==="is"&&z.allowCustomizedBuiltInElements&&(z.tagNameCheck instanceof RegExp&&Ie(z.tagNameCheck,B)||z.tagNameCheck instanceof Function&&z.tagNameCheck(B))))return!1}else if(!ps[M]){if(!Ie(O,lr(B,me,""))){if(!((M==="src"||M==="xlink:href"||M==="href")&&T!=="script"&&wd(B,"data:")===0&&hu[T])){if(!(X&&!Ie(ge,lr(B,me,"")))){if(B)return!1}}}}}}return!0},Eu=function(T){return T!=="annotation-xml"&&yi(T,Me)},xu=function(T){ut(A.beforeSanitizeAttributes,T,null);const{attributes:M}=T;if(!M||ys(T))return;const B={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:D,forceKeepAttr:void 0};let he=M.length;for(;he--;){const Ae=M[he],{name:Ee,namespaceURI:je,value:et}=Ae,xr=Ce(Ee);let Fe=Ee==="value"?et:Cd(et);if(B.attrName=xr,B.attrValue=Fe,B.keepAttr=!0,B.forceKeepAttr=void 0,ut(A.uponSanitizeAttribute,T,B),Fe=B.attrValue,du&&(xr==="id"||xr==="name")&&(Dn(Ee,T),Fe=Fx+Fe),De&&Ie(/((--!?|])>)|<\/(style|title)/i,Fe)){Dn(Ee,T);continue}if(B.forceKeepAttr||(Dn(Ee,T),!B.keepAttr))continue;if(!Z&&Ie(/\/>/i,Fe)){Dn(Ee,T);continue}N&&Wr([L,Y,J],Ou=>{Fe=lr(Fe,Ou," ")});const Au=Ce(T.nodeName);if(Cu(Au,xr,Fe)){if(w&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!je)switch(y.getAttributeType(Au,xr)){case"TrustedHTML":{Fe=w.createHTML(Fe);break}case"TrustedScriptURL":{Fe=w.createScriptURL(Fe);break}}try{je?T.setAttributeNS(je,Ee,Fe):T.setAttribute(Ee,Fe),ys(T)?Re(T):mi(t.removed)}catch{}}}ut(A.afterSanitizeAttributes,T,null)},Vx=function G(T){let M=null;const B=Su(T);for(ut(A.beforeSanitizeShadowDOM,T,null);M=B.nextNode();)ut(A.uponSanitizeShadowNode,M,null),wu(M),xu(M),M.content instanceof s&&G(M.content);ut(A.afterSanitizeShadowDOM,T,null)};return t.sanitize=function(G){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=null,B=null,he=null,Ae=null;if(hs=!G,hs&&(G="<!-->"),typeof G!="string"&&!_u(G))if(typeof G.toString=="function"){if(G=G.toString(),typeof G!="string")throw cr("dirty is not a string, aborting")}else throw cr("toString is not a function");if(!t.isSupported)return G;if(Qt||ms(T),t.removed=[],typeof G=="string"&&(Cr=!1),Cr){if(G.nodeName){const et=Ce(G.nodeName);if(!_[et]||q[et])throw cr("root node is forbidden and cannot be sanitized in-place")}}else if(G instanceof a)M=Tu("<!---->"),B=M.ownerDocument.importNode(G,!0),B.nodeType===fr.element&&B.nodeName==="BODY"||B.nodeName==="HTML"?M=B:M.appendChild(B);else{if(!Rt&&!N&&!Le&&G.indexOf("<")===-1)return w&&$n?w.createHTML(G):G;if(M=Tu(G),!M)return Rt?null:$n?S:""}M&&fs&&Re(M.firstChild);const Ee=Su(Cr?G:M);for(;he=Ee.nextNode();)wu(he),xu(he),he.content instanceof s&&Vx(he.content);if(Cr)return G;if(Rt){if(On)for(Ae=H.call(M.ownerDocument);M.firstChild;)Ae.appendChild(M.firstChild);else Ae=M;return(D.shadowroot||D.shadowrootmode)&&(Ae=m.call(n,Ae,!0)),Ae}let je=Le?M.outerHTML:M.innerHTML;return Le&&_["!doctype"]&&M.ownerDocument&&M.ownerDocument.doctype&&M.ownerDocument.doctype.name&&Ie(wi,M.ownerDocument.doctype.name)&&(je="<!DOCTYPE "+M.ownerDocument.doctype.name+`>
105
+ `+je),N&&Wr([L,Y,J],et=>{je=lr(je,et," ")}),w&&$n?w.createHTML(je):je},t.setConfig=function(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ms(G),Qt=!0},t.clearConfig=function(){nr=null,Qt=!1},t.isValidAttribute=function(G,T,M){nr||ms({});const B=Ce(G),he=Ce(T);return Cu(B,he,M)},t.addHook=function(G,T){typeof T=="function"&&ar(A[G],T)},t.removeHook=function(G,T){if(T!==void 0){const M=Sd(A[G],T);return M===-1?void 0:_d(A[G],M,1)[0]}return mi(A[G])},t.removeHooks=function(G){A[G]=[]},t.removeAllHooks=function(){A=Ei()},t}var Ai=xi();const ot=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});ot.displayName="FallbackWrapper";const zd={field:"_field_zdaf7_1",rtl:"_rtl_zdaf7_7",borderRight:"_borderRight_zdaf7_12"},Yr=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:d}=g.useProps("Field",u,c),f={};Object.entries(d).forEach(([y,b])=>{typeof b=="function"&&(f[y]=b(t))});const p=g.useStyles({name:"Field",props:c,classes:zd});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(ot,{fallback:Array.isArray(o)?o.map((y,b)=>l.jsx(g.Text,{...d,...f,children:a?Ai.sanitize(y):y},b)):v.isValidElement(o)?o:l.jsx(g.Text,{...d,...f,children:a?Ai.sanitize(o):o}),functionProps:[t],children:i})})})})});Yr.displayName="Field";const Oi={row:"_row_138r2_1",selected:"_selected_138r2_5"};function Bd({entry:e,selected:t,children:r}){const n=g.useStyles({name:"Row",classes:Oi}),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?Oi.selected:""}`,l.jsx(g.Table.Tr,{className:s,style:{...i},...o,children:r})}function Ud({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(io,{id:r})}function Vd({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",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(Bd,{entry:{...f,id:y},children:[n?null:l.jsx(Yr,{loading:t,children:l.jsx(g.Checkbox,{pl:2,checked:o.includes(y),onChange:b=>{s(y)}})},p),r?null:l.jsx(Yr,{loading:t,children:l.jsx(Ud,{bodyCustomizer:a,actionColumn:u,id:ze(y),entry:f})}),e.list_columns.map((b,h)=>{let C=a==null?void 0:a[b];typeof C=="function"&&(C=C({id:y,...f}));let x=oo(f,b);typeof x=="number"?x=x.toLocaleString():x==null&&(x="");const F=(c==null?void 0:c[b])||(c==null?void 0:c[d]);return F&&(x=x.split(F)),C===null?null:l.jsx(Yr,{id:y,entry:f,loading:t,onClickEntry:i,customElement:C,sanitize:!0,children:x},h)})]},ze(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 $i={root:"_root_1kmay_1",wrapper:"_wrapper_1kmay_7",icon:"_icon_1kmay_18"};function mo({column:e,label:t,orderColumn:r,related:n,toggleAll:o,allChecked:s,classNames:i,styles:a,customElement:c,...u}){const{queryParams:d,setQueryParams:f,loading:p}=Q(),y={fw:700,size:"sm",color:"gray.8",hoverColor:"gray.6",selectedColor:"blue"},b=g.useStyles({name:"FieldTitle",classes:$i,classNames:i,styles:a,props:u}),h=g.useProps("FieldTitle",y,u),{hovered:C,ref:x}=ve.useHover(),F=r&&d.order_column===r,$=b("wrapper");return $.style.cursor=r?$.style.cursor:"auto",l.jsx(g.Table.Th,{className:$i.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,...$,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:C&&r?h.hoverColor:F?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:F?d.order_direction==="asc"?l.jsx(ro,{size:14,strokeWidth:1.5}):l.jsx(Rs,{size:14,strokeWidth:1.5}):null})})}):l.jsx(g.Box,{...b("icon"),children:F?d.order_direction==="asc"?l.jsx(ro,{size:14,strokeWidth:1.5}):l.jsx(Rs,{size:14,strokeWidth:1.5}):null})]})})})}const Pi=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(mo,{data:e,column:"Checkbox",allChecked:s,toggleAll:i}),n?null:l.jsx(mo,{column:"Actions",customElement:u}),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(mo,{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)})]})})});Pi.displayName="Header";const Wd={scrollbar:"_scrollbar_isyo2_1"};function Gd({bulkActions:e,hideActions:t,loading:r,onSelectCheckbox:n,onClickEntry:o,hideCheckbox:s,hideDownload:i,headerCustomizer:a,bodyCustomizer:c,bodySeparator:u,...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}=Q(),[C,x]=v.useState([]),[F,$]=v.useState(!1),w=I=>{x(j=>j.includes(I)?j.filter(H=>H!==I):[...j,I])},S=()=>{x(I=>I.length===b.ids.length?[]:b.ids.map((j,H)=>j))};return v.useEffect(()=>{$(C.length===b.result.length&&C.length>0),n&&n(C),e==null||e.setSelectedIds(C.map(I=>I))},[C]),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:Wd,children:l.jsxs(g.Table,{stickyHeader:!0,...y,children:[l.jsx(Pi,{data:b,info:h,hideActions:t,hideCheckbox:s,allChecked:F,setSelection:x,toggleAll:S,headerCustomizer:a}),l.jsx(Vd,{data:b,loading:r,hideActions:t,hideCheckbox:s,selection:C,setSelection:x,toggleRow:w,onClickEntry:o,bodyCustomizer:c,bodySeparator:u})]})})}const Ii=v.memo(({counter:e,...t})=>{const{data:r,queryParams:n,setQueryParams:o}=Q(),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 d=p=>{u(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:c+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]})]})});Ii.displayName="Pagination";const Hd=0,Yd=25,wt=250,dr="global",pr="header:",ki=pr+"ctt",Mi=pr+"between_integer",Di=pr+"between_date",It=e=>e!==dr&&!e.startsWith(pr);function qd({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 Fi({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(""),d=y=>{c!==""&&(i.includes(c)||a(b=>[...b,c]),u(""))},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:c,placeholder:"Search values",onChange:y=>{s.updateSelectedOptionIndex(),u(y.currentTarget.value)},onKeyDown:y=>{y.key==="Backspace"&&c.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 ",c]})})})]})})}function Kd({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 Ni({onClose:e,...t}){const{info:r,queryParams:n,setQueryParams:o,path:s}=Q(),i=or.useForm({initialValues:{filters:[]},validate:so(ir({filters:Rn().of(ir({col:Lr().transform(f=>f||void 0).required("Field is required"),opr:Lr().transform(f=>f||void 0).required("col is required"),value:Nr().when("col",{is:f=>f&&r.filters[f].schema.required,then:()=>Nr().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 f=n.filters.filter(p=>It(p.opr)).map(p=>({...p,key:ve.randomId()}));i.setFieldValue("filters",f)}},[n.filters]);const u=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(qd,{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:ve.randomId()})}})}),l.jsx(g.Box,{style:{width:"192px"},children:f.col?l.jsx(Kd,{form:i,name:`filters.${p}.opr`,items:r.filters[f.col].filters.filter(y=>It(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:ve.randomId()})}}):null}),l.jsx(g.Box,{style:{width:"192px"},children:f.col?f.opr==="in"?l.jsx(Fi,{form:i,name:`filters.${p}.value`}):l.jsx(Vr,{form:i,name:`filters.${p}.value`,schema:r.filters[f.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(ni,{})})]}),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(u),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(Br,{}),onClick:()=>{i.insertListItem("filters",{col:"",opr:"",value:"",key:ve.randomId()})},children:"Add Filter"}),l.jsx(g.Group,{spacing:"md",children:l.jsx(g.Button,{type:"submit",children:"Apply"})})]})]})}function Li(...e){const{queryParams:t}=Q(),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=>It(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(ti,{})})}):l.jsx(g.ActionIcon,{bg:n.bg,size:n.size,c:n.c,onClick:()=>s(!0),children:l.jsx(ti,{})})})}),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(Ni,{onClose:()=>{s(!1)}})]})]})}function Jd(...e){const[t,r]=v.useState(!1),{download:n}=Q(),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(ei,{})})})}const ji=v.memo(({hideAdd:e,hideFilter:t,hideDownload:r,toolbarCustomizer:n})=>{const{info:o}=Q(),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(Jd,{})),i&&!e?s.add||l.jsx(di,{}):null,t?null:s.filter||l.jsx(Li,{})]})});ji.displayName="Toolbar";const yo=v.forwardRef((e,t)=>{const{path:r,data:n,loading:o,info:s,setQueryParams:i}=Q(),{hideToolbar:a=!1,hideFilter:c=!1,hideAdd:u=!1,hideSettings:d=!1,hideActions:f=!1,hidePagination:p=!1,hideError:y=!1,hideDownload:b=!0,onSelectCheckbox:h=null,onClickEntry:C=null,fetchOnMount:x=!0,bulkActions:F=null,styles:$,headerCustomizer:w={},bodyCustomizer:S={},toolbarCustomizer:I={},counter:j=!1,bodySeparator:H}=e;if(v.useEffect(()=>{!n&&x&&i({})},[n]),!s)return;const U=F===null;return l.jsxs(g.Paper,{ref:t,style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",...$},children:[a?null:l.jsx(ji,{hideFilter:c,hideAdd:u,hideSettings:d,hideDownload:b,toolbarCustomizer:I}),n?l.jsx(Gd,{bulkActions:F,hideActions:f,loading:o,onSelectCheckbox:h,onClickEntry:C,hideCheckbox:U,hideDownload:b,headerCustomizer:w,bodyCustomizer:S,bodySeparator:H}):null,!p&&n?l.jsx(Ii,{counter:j}):null,y?null:l.jsx(oi,{})]})});yo.displayName="DataGrid";function Zd({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}=Q(),{ref:c,inViewport:u}=ve.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(()=>{u&&t&&i.fetch()},[u]),l.jsxs(l.Fragment,{children:[f,a&&r,i.isEnd&&n,l.jsx(o,{ref:c,id:"IS-load-trigger",mih:"1%",...s})]})}var Xd=Object.prototype;function Qd(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Xd;return e===r}var qr=Qd;function Rd(e,t){return function(r){return e(t(r))}}var zi=Rd,ep=zi,tp=ep(Object.keys,Object),rp=tp,np=qr,op=rp,sp=Object.prototype,ip=sp.hasOwnProperty;function ap(e){if(!np(e))return op(e);var t=[];for(var r in Object(e))ip.call(e,r)&&r!="constructor"&&t.push(r);return t}var lp=ap,cp=typeof Or=="object"&&Or&&Or.Object===Object&&Or,Bi=cp,up=Bi,fp=typeof self=="object"&&self&&self.Object===Object&&self,dp=up||fp||Function("return this")(),Ke=dp,pp=Ke,hp=pp.Symbol,Kr=hp,Ui=Kr,Vi=Object.prototype,gp=Vi.hasOwnProperty,mp=Vi.toString,hr=Ui?Ui.toStringTag:void 0;function yp(e){var t=gp.call(e,hr),r=e[hr];try{e[hr]=void 0;var n=!0}catch{}var o=mp.call(e);return n&&(t?e[hr]=r:delete e[hr]),o}var bp=yp,vp=Object.prototype,Tp=vp.toString;function Sp(e){return Tp.call(e)}var _p=Sp,Wi=Kr,wp=bp,Cp=_p,Ep="[object Null]",xp="[object Undefined]",Gi=Wi?Wi.toStringTag:void 0;function Ap(e){return e==null?e===void 0?xp:Ep:Gi&&Gi in Object(e)?wp(e):Cp(e)}var kt=Ap;function Op(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var st=Op,$p=kt,Pp=st,Ip="[object AsyncFunction]",kp="[object Function]",Mp="[object GeneratorFunction]",Dp="[object Proxy]";function Fp(e){if(!Pp(e))return!1;var t=$p(e);return t==kp||t==Mp||t==Ip||t==Dp}var bo=Fp,Np=Ke,Lp=Np["__core-js_shared__"],jp=Lp,vo=jp,Hi=function(){var e=/[^.]+$/.exec(vo&&vo.keys&&vo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function zp(e){return!!Hi&&Hi in e}var Bp=zp,Up=Function.prototype,Vp=Up.toString;function Wp(e){if(e!=null){try{return Vp.call(e)}catch{}try{return e+""}catch{}}return""}var Yi=Wp,Gp=bo,Hp=Bp,Yp=st,qp=Yi,Kp=/[\\^$.*+?()[\]{}|]/g,Jp=/^\[object .+?Constructor\]$/,Zp=Function.prototype,Xp=Object.prototype,Qp=Zp.toString,Rp=Xp.hasOwnProperty,eh=RegExp("^"+Qp.call(Rp).replace(Kp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function th(e){if(!Yp(e)||Hp(e))return!1;var t=Gp(e)?eh:Jp;return t.test(qp(e))}var rh=th;function nh(e,t){return e==null?void 0:e[t]}var oh=nh,sh=rh,ih=oh;function ah(e,t){var r=ih(e,t);return sh(r)?r:void 0}var Ct=ah,lh=Ct,ch=Ke,uh=lh(ch,"DataView"),fh=uh,dh=Ct,ph=Ke,hh=dh(ph,"Map"),To=hh,gh=Ct,mh=Ke,yh=gh(mh,"Promise"),bh=yh,vh=Ct,Th=Ke,Sh=vh(Th,"Set"),qi=Sh,_h=Ct,wh=Ke,Ch=_h(wh,"WeakMap"),Eh=Ch,So=fh,_o=To,wo=bh,Co=qi,Eo=Eh,Ki=kt,Mt=Yi,Ji="[object Map]",xh="[object Object]",Zi="[object Promise]",Xi="[object Set]",Qi="[object WeakMap]",Ri="[object DataView]",Ah=Mt(So),Oh=Mt(_o),$h=Mt(wo),Ph=Mt(Co),Ih=Mt(Eo),Et=Ki;(So&&Et(new So(new ArrayBuffer(1)))!=Ri||_o&&Et(new _o)!=Ji||wo&&Et(wo.resolve())!=Zi||Co&&Et(new Co)!=Xi||Eo&&Et(new Eo)!=Qi)&&(Et=function(e){var t=Ki(e),r=t==xh?e.constructor:void 0,n=r?Mt(r):"";if(n)switch(n){case Ah:return Ri;case Oh:return Ji;case $h:return Zi;case Ph:return Xi;case Ih:return Qi}return t});var kh=Et;function Mh(e){return e!=null&&typeof e=="object"}var Dt=Mh,Dh=kt,Fh=Dt,Nh="[object Arguments]";function Lh(e){return Fh(e)&&Dh(e)==Nh}var jh=Lh,ea=jh,zh=Dt,ta=Object.prototype,Bh=ta.hasOwnProperty,Uh=ta.propertyIsEnumerable,Vh=ea(function(){return arguments}())?ea:function(e){return zh(e)&&Bh.call(e,"callee")&&!Uh.call(e,"callee")},Jr=Vh,Wh=Array.isArray,gr=Wh,Gh=9007199254740991;function Hh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Gh}var ra=Hh,Yh=bo,qh=ra;function Kh(e){return e!=null&&qh(e.length)&&!Yh(e)}var Zr=Kh,Xr={exports:{}};function Jh(){return!1}var Zh=Jh;Xr.exports,function(e,t){var r=Ke,n=Zh,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}(Xr,Xr.exports);var xo=Xr.exports,Xh=kt,Qh=ra,Rh=Dt,eg="[object Arguments]",tg="[object Array]",rg="[object Boolean]",ng="[object Date]",og="[object Error]",sg="[object Function]",ig="[object Map]",ag="[object Number]",lg="[object Object]",cg="[object RegExp]",ug="[object Set]",fg="[object String]",dg="[object WeakMap]",pg="[object ArrayBuffer]",hg="[object DataView]",gg="[object Float32Array]",mg="[object Float64Array]",yg="[object Int8Array]",bg="[object Int16Array]",vg="[object Int32Array]",Tg="[object Uint8Array]",Sg="[object Uint8ClampedArray]",_g="[object Uint16Array]",wg="[object Uint32Array]",de={};de[gg]=de[mg]=de[yg]=de[bg]=de[vg]=de[Tg]=de[Sg]=de[_g]=de[wg]=!0,de[eg]=de[tg]=de[pg]=de[rg]=de[hg]=de[ng]=de[og]=de[sg]=de[ig]=de[ag]=de[lg]=de[cg]=de[ug]=de[fg]=de[dg]=!1;function Cg(e){return Rh(e)&&Qh(e.length)&&!!de[Xh(e)]}var Eg=Cg;function xg(e){return function(t){return e(t)}}var Ag=xg,Qr={exports:{}};Qr.exports,function(e,t){var r=Bi,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}(Qr,Qr.exports);var Og=Qr.exports,$g=Eg,Pg=Ag,na=Og,oa=na&&na.isTypedArray,Ig=oa?Pg(oa):$g,Ao=Ig,kg=lp,Mg=kh,Dg=Jr,Fg=gr,Ng=Zr,Lg=xo,jg=qr,zg=Ao,Bg="[object Map]",Ug="[object Set]",Vg=Object.prototype,Wg=Vg.hasOwnProperty;function Gg(e){if(e==null)return!0;if(Ng(e)&&(Fg(e)||typeof e=="string"||typeof e.splice=="function"||Lg(e)||zg(e)||Dg(e)))return!e.length;var t=Mg(e);if(t==Bg||t==Ug)return!e.size;if(jg(e))return!kg(e).length;for(var r in e)if(Wg.call(e,r))return!1;return!0}var Hg=Gg;const sa=dt(Hg),ia=(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(fe.JsonFormsDispatch,{uischema:a,schema:t,path:r,enabled:n,renderers:s,cells:i})},`${r}-${c}`)),Yg=({elements:e,schema:t,path:r,enabled:n,direction:o,renderers:s,cells:i})=>sa(e)?null:l.jsx(g.Grid,{spacing:o==="row"?2:0,children:ia(e,t,r,n,o,s,i)}),Oo=v.memo(Yg),qg=e=>function(r){const n=fe.useJsonForms(),o=W.getAjv({jsonforms:{...n}});return l.jsx(e,{...r,ajv:o})};var Kg=Ke,Jg=function(){return Kg.Date.now()},Zg=Jg,Xg=/\s/;function Qg(e){for(var t=e.length;t--&&Xg.test(e.charAt(t)););return t}var Rg=Qg,em=Rg,tm=/^\s+/;function rm(e){return e&&e.slice(0,em(e)+1).replace(tm,"")}var nm=rm,om=kt,sm=Dt,im="[object Symbol]";function am(e){return typeof e=="symbol"||sm(e)&&om(e)==im}var aa=am,lm=nm,la=st,cm=aa,ca=NaN,um=/^[-+]0x[0-9a-f]+$/i,fm=/^0b[01]+$/i,dm=/^0o[0-7]+$/i,pm=parseInt;function hm(e){if(typeof e=="number")return e;if(cm(e))return ca;if(la(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=la(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=lm(e);var r=fm.test(e);return r||dm.test(e)?pm(e.slice(2),r?2:8):um.test(e)?ca:+e}var ua=hm,gm=st,$o=Zg,fa=ua,mm="Expected a function",ym=Math.max,bm=Math.min;function vm(e,t,r){var n,o,s,i,a,c,u=0,d=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(mm);t=fa(t)||0,gm(r)&&(d=!!r.leading,f="maxWait"in r,s=f?ym(fa(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p);function y(I){var j=n,H=o;return n=o=void 0,u=I,i=e.apply(H,j),i}function b(I){return u=I,a=setTimeout(x,t),d?y(I):i}function h(I){var j=I-c,H=I-u,U=t-j;return f?bm(U,s-H):U}function C(I){var j=I-c,H=I-u;return c===void 0||j>=t||j<0||f&&H>=s}function x(){var I=$o();if(C(I))return F(I);a=setTimeout(x,h(I))}function F(I){return a=void 0,p&&n?y(I):(n=o=void 0,i)}function $(){a!==void 0&&clearTimeout(a),u=0,n=c=o=a=void 0}function w(){return a===void 0?i:F($o())}function S(){var I=$o(),j=C(I);if(n=arguments,o=this,c=I,j){if(a===void 0)return b(c);if(f)return clearTimeout(a),a=setTimeout(x,t),y(c)}return a===void 0&&(a=setTimeout(x,t)),i}return S.cancel=$,S.flush=w,S}var Tm=vm;const Sm=dt(Tm),da=(e,t,r,n,o,s=300)=>{const[i,a]=v.useState(r??t);v.useEffect(()=>{a(r??t)},[r]);const c=v.useCallback(Sm(f=>e(n,f),s),[e,n,s]),u=v.useCallback(f=>{const p=o(f);a(p??t),c(p)},[c,o]),d=v.useCallback(()=>{a(t),e(n,void 0)},[t,e,n]);return[i,u,d]},_m=e=>e===""?void 0:parseFloat(e),wm=e=>_m(e),Rr=v.memo(function(t){const{allowDecimal:r,className:n,data:o,description:s,errors:i,enabled:a,handleChange:c,label:u,path:d,required:f,hideControls:p}=t,[y,b]=da(c,"",o,d,wm),h=g.useProps(d,{},{});return Object.keys(h).forEach(C=>{typeof h[C]=="function"&&(h[C]=h[C](o))}),l.jsx(g.NumberInput,{label:u,description:s,error:i,required:f,value:y,onChange:b,className:n,disabled:!a,allowDecimal:r,hideControls:p,w:"100%",...h})});function Cm(){this.__data__=[],this.size=0}var Em=Cm;function xm(e,t){return e===t||e!==e&&t!==t}var en=xm,Am=en;function Om(e,t){for(var r=e.length;r--;)if(Am(e[r][0],t))return r;return-1}var tn=Om,$m=tn,Pm=Array.prototype,Im=Pm.splice;function km(e){var t=this.__data__,r=$m(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Im.call(t,r,1),--this.size,!0}var Mm=km,Dm=tn;function Fm(e){var t=this.__data__,r=Dm(t,e);return r<0?void 0:t[r][1]}var Nm=Fm,Lm=tn;function jm(e){return Lm(this.__data__,e)>-1}var zm=jm,Bm=tn;function Um(e,t){var r=this.__data__,n=Bm(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Vm=Um,Wm=Em,Gm=Mm,Hm=Nm,Ym=zm,qm=Vm;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=Wm,Ft.prototype.delete=Gm,Ft.prototype.get=Hm,Ft.prototype.has=Ym,Ft.prototype.set=qm;var rn=Ft,Km=rn;function Jm(){this.__data__=new Km,this.size=0}var Zm=Jm;function Xm(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Qm=Xm;function Rm(e){return this.__data__.get(e)}var ey=Rm;function ty(e){return this.__data__.has(e)}var ry=ty,ny=Ct,oy=ny(Object,"create"),nn=oy,pa=nn;function sy(){this.__data__=pa?pa(null):{},this.size=0}var iy=sy;function ay(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ly=ay,cy=nn,uy="__lodash_hash_undefined__",fy=Object.prototype,dy=fy.hasOwnProperty;function py(e){var t=this.__data__;if(cy){var r=t[e];return r===uy?void 0:r}return dy.call(t,e)?t[e]:void 0}var hy=py,gy=nn,my=Object.prototype,yy=my.hasOwnProperty;function by(e){var t=this.__data__;return gy?t[e]!==void 0:yy.call(t,e)}var vy=by,Ty=nn,Sy="__lodash_hash_undefined__";function _y(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ty&&t===void 0?Sy:t,this}var wy=_y,Cy=iy,Ey=ly,xy=hy,Ay=vy,Oy=wy;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=Cy,Nt.prototype.delete=Ey,Nt.prototype.get=xy,Nt.prototype.has=Ay,Nt.prototype.set=Oy;var $y=Nt,ha=$y,Py=rn,Iy=To;function ky(){this.size=0,this.__data__={hash:new ha,map:new(Iy||Py),string:new ha}}var My=ky;function Dy(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Fy=Dy,Ny=Fy;function Ly(e,t){var r=e.__data__;return Ny(t)?r[typeof t=="string"?"string":"hash"]:r.map}var on=Ly,jy=on;function zy(e){var t=jy(this,e).delete(e);return this.size-=t?1:0,t}var By=zy,Uy=on;function Vy(e){return Uy(this,e).get(e)}var Wy=Vy,Gy=on;function Hy(e){return Gy(this,e).has(e)}var Yy=Hy,qy=on;function Ky(e,t){var r=qy(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Jy=Ky,Zy=My,Xy=By,Qy=Wy,Ry=Yy,e0=Jy;function Lt(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])}}Lt.prototype.clear=Zy,Lt.prototype.delete=Xy,Lt.prototype.get=Qy,Lt.prototype.has=Ry,Lt.prototype.set=e0;var ga=Lt,t0=rn,r0=To,n0=ga,o0=200;function s0(e,t){var r=this.__data__;if(r instanceof t0){var n=r.__data__;if(!r0||n.length<o0-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new n0(n)}return r.set(e,t),this.size=r.size,this}var i0=s0,a0=rn,l0=Zm,c0=Qm,u0=ey,f0=ry,d0=i0;function jt(e){var t=this.__data__=new a0(e);this.size=t.size}jt.prototype.clear=l0,jt.prototype.delete=c0,jt.prototype.get=u0,jt.prototype.has=f0,jt.prototype.set=d0;var p0=jt,h0=Ct,g0=function(){try{var e=h0(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ma=g0,ya=ma;function m0(e,t,r){t=="__proto__"&&ya?ya(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Po=m0,y0=Po,b0=en;function v0(e,t,r){(r!==void 0&&!b0(e[t],r)||r===void 0&&!(t in e))&&y0(e,t,r)}var ba=v0;function T0(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 S0=T0,_0=S0,w0=_0(),C0=w0,sn={exports:{}};sn.exports,function(e,t){var r=Ke,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,d){if(d)return u.slice();var f=u.length,p=a?a(f):new u.constructor(f);return u.copy(p),p}e.exports=c}(sn,sn.exports);var E0=sn.exports,x0=Ke,A0=x0.Uint8Array,O0=A0,va=O0;function $0(e){var t=new e.constructor(e.byteLength);return new va(t).set(new va(e)),t}var P0=$0,I0=P0;function k0(e,t){var r=t?I0(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var M0=k0;function D0(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var F0=D0,N0=st,Ta=Object.create,L0=function(){function e(){}return function(t){if(!N0(t))return{};if(Ta)return Ta(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),j0=L0,z0=zi,B0=z0(Object.getPrototypeOf,Object),Sa=B0,U0=j0,V0=Sa,W0=qr;function G0(e){return typeof e.constructor=="function"&&!W0(e)?U0(V0(e)):{}}var H0=G0,Y0=Zr,q0=Dt;function K0(e){return q0(e)&&Y0(e)}var _a=K0,J0=kt,Z0=Sa,X0=Dt,Q0="[object Object]",R0=Function.prototype,eb=Object.prototype,wa=R0.toString,tb=eb.hasOwnProperty,rb=wa.call(Object);function nb(e){if(!X0(e)||J0(e)!=Q0)return!1;var t=Z0(e);if(t===null)return!0;var r=tb.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&wa.call(r)==rb}var ob=nb;function sb(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Ca=sb,ib=Po,ab=en,lb=Object.prototype,cb=lb.hasOwnProperty;function ub(e,t,r){var n=e[t];(!(cb.call(e,t)&&ab(n,r))||r===void 0&&!(t in e))&&ib(e,t,r)}var fb=ub,db=fb,pb=Po;function hb(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?pb(r,a,c):db(r,a,c)}return r}var gb=hb;function mb(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var yb=mb,bb=9007199254740991,vb=/^(?:0|[1-9]\d*)$/;function Tb(e,t){var r=typeof e;return t=t??bb,!!t&&(r=="number"||r!="symbol"&&vb.test(e))&&e>-1&&e%1==0&&e<t}var Ea=Tb,Sb=yb,_b=Jr,wb=gr,Cb=xo,Eb=Ea,xb=Ao,Ab=Object.prototype,Ob=Ab.hasOwnProperty;function $b(e,t){var r=wb(e),n=!r&&_b(e),o=!r&&!n&&Cb(e),s=!r&&!n&&!o&&xb(e),i=r||n||o||s,a=i?Sb(e.length,String):[],c=a.length;for(var u in e)(t||Ob.call(e,u))&&!(i&&(u=="length"||o&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Eb(u,c)))&&a.push(u);return a}var Pb=$b;function Ib(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var kb=Ib,Mb=st,Db=qr,Fb=kb,Nb=Object.prototype,Lb=Nb.hasOwnProperty;function jb(e){if(!Mb(e))return Fb(e);var t=Db(e),r=[];for(var n in e)n=="constructor"&&(t||!Lb.call(e,n))||r.push(n);return r}var zb=jb,Bb=Pb,Ub=zb,Vb=Zr;function Wb(e){return Vb(e)?Bb(e,!0):Ub(e)}var xa=Wb,Gb=gb,Hb=xa;function Yb(e){return Gb(e,Hb(e))}var qb=Yb,Aa=ba,Kb=E0,Jb=M0,Zb=F0,Xb=H0,Oa=Jr,$a=gr,Qb=_a,Rb=xo,ev=bo,tv=st,rv=ob,nv=Ao,Pa=Ca,ov=qb;function sv(e,t,r,n,o,s,i){var a=Pa(e,r),c=Pa(t,r),u=i.get(c);if(u){Aa(e,r,u);return}var d=s?s(a,c,r+"",e,t,i):void 0,f=d===void 0;if(f){var p=$a(c),y=!p&&Rb(c),b=!p&&!y&&nv(c);d=c,p||y||b?$a(a)?d=a:Qb(a)?d=Zb(a):y?(f=!1,d=Kb(c,!0)):b?(f=!1,d=Jb(c,!0)):d=[]:rv(c)||Oa(c)?(d=a,Oa(a)?d=ov(a):(!tv(a)||ev(a))&&(d=Xb(c))):f=!1}f&&(i.set(c,d),o(d,c,n,s,i),i.delete(c)),Aa(e,r,d)}var iv=sv,av=p0,lv=ba,cv=C0,uv=iv,fv=st,dv=xa,pv=Ca;function Ia(e,t,r,n,o){e!==t&&cv(t,function(s,i){if(o||(o=new av),fv(s))uv(e,t,i,r,Ia,n,o);else{var a=n?n(pv(e,i),s,i+"",e,t,o):void 0;a===void 0&&(a=s),lv(e,i,a)}},dv)}var hv=Ia;function gv(e){return e}var ka=gv;function mv(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 yv=mv,bv=yv,Ma=Math.max;function vv(e,t,r){return t=Ma(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,s=Ma(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),bv(e,this,a)}}var Tv=vv;function Sv(e){return function(){return e}}var _v=Sv,wv=_v,Da=ma,Cv=ka,Ev=Da?function(e,t){return Da(e,"toString",{configurable:!0,enumerable:!1,value:wv(t),writable:!0})}:Cv,xv=Ev,Av=800,Ov=16,$v=Date.now;function Pv(e){var t=0,r=0;return function(){var n=$v(),o=Ov-(n-r);if(r=n,o>0){if(++t>=Av)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Iv=Pv,kv=xv,Mv=Iv,Dv=Mv(kv),Fv=Dv,Nv=ka,Lv=Tv,jv=Fv;function zv(e,t){return jv(Lv(e,t,Nv),e+"")}var Fa=zv,Bv=en,Uv=Zr,Vv=Ea,Wv=st;function Gv(e,t,r){if(!Wv(r))return!1;var n=typeof t;return(n=="number"?Uv(r)&&Vv(t,r.length):n=="string"&&t in r)?Bv(r[t],e):!1}var Na=Gv,Hv=Fa,Yv=Na;function qv(e){return Hv(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&&Yv(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 Kv=qv,Jv=hv,Zv=Kv,Xv=Zv(function(e,t,r){Jv(e,t,r)}),Qv=Xv;const La=dt(Qv),ja=v.memo(function(t){const{className:r,config:n,uischema:o,data:s,description:i,errors:a,enabled:c,path:u,handleChange:d,label:f,required:p}=t,y=La({},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:f,description:i,error:a,required:p,value:s||"",onChange:h=>{d(u,h.currentTarget.value)},className:r,disabled:!c,w:"100%",...b}):l.jsx(g.TextInput,{label:f,description:i,error:a,required:p,value:s||"",onChange:h=>{d(u,h.currentTarget.value)},className:r,disabled:!c,w:"100%",...b})}),za=v.memo(function(t){const{className:r,data:n,description:o,enabled:s,errors:i,handleChange:a,label:c,labelPosition:u,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:c,description:o,error:i,disabled:!s,className:r,labelPosition:u,required:f,data:[{label:"true",value:"true"},{label:"false",value:"false"}],value:String(n)||"",onChange:y=>{a(d,y==="true")},...p})}),Rv=e=>l.jsx(Rr,{...e}),Ba=W.rankWith(4,W.isNumberControl),Ua=fe.withJsonFormsCellProps(Rv),e1=e=>l.jsx(Rr,{...e}),Va=W.rankWith(3,W.isIntegerControl),Wa=fe.withJsonFormsCellProps(e1),t1=e=>l.jsx(ja,{...e}),Ga=W.rankWith(2,W.isStringControl),Ha=fe.withJsonFormsCellProps(t1),r1=e=>l.jsx(za,{...e}),Ya=W.rankWith(3,W.isBooleanControl),qa=fe.withJsonFormsCellProps(r1),n1=e=>{const{data:t,className:r,enabled:n,path:o,handleChange:s,description:i,errors:a,label:c,required:u}=e,d=g.useProps(o,{},{});return Object.keys(d).forEach(f=>{typeof d[f]=="function"&&(d[f]=d[f](t))}),l.jsx(ft.DateInput,{valueFormat:"DD.MM.YYYY",label:c,description:i,error:a,required:u,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})},Ka=W.rankWith(2,W.isDateControl),Ja=fe.withJsonFormsCellProps(n1),o1=e=>{const{description:t,className:r,enabled:n,path:o,handleChange:s,data:i,errors:a,label:c,required:u}=e,d=g.useProps(o,{},{});return Object.keys(d).forEach(f=>{typeof d[f]=="function"&&(d[f]=d[f](i))}),l.jsx(ft.DateInput,{valueFormat:"DD.MM.YYYY",className:r,disabled:!n,label:c,description:t,error:a,required:u,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})},Za=W.rankWith(5,W.isDateTimeControl),Xa=fe.withJsonFormsControlProps(o1),s1=e=>{const{description:t,data:r,path:n,options:o,enabled:s,handleChange:i,className:a,errors:c,label:u,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:u,description:t,required:d,error:c,disabled:!s,searchable:!0,onChange:p=>{i(n,p)},className:a,w:"100%",...f})},Qa=W.rankWith(5,W.isEnumControl),Ra=fe.withJsonFormsEnumProps(fe.withTranslateProps(v.memo(s1)),!1);function i1(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var a1=i1,el=Kr,l1=Jr,c1=gr,tl=el?el.isConcatSpreadable:void 0;function u1(e){return c1(e)||l1(e)||!!(tl&&e&&e[tl])}var f1=u1,d1=a1,p1=f1;function rl(e,t,r,n,o){var s=-1,i=e.length;for(r||(r=p1),o||(o=[]);++s<i;){var a=e[s];t>0&&r(a)?t>1?rl(a,t-1,r,n,o):d1(o,a):n||(o[o.length]=a)}return o}var h1=rl,g1="__lodash_hash_undefined__";function m1(e){return this.__data__.set(e,g1),this}var y1=m1;function b1(e){return this.__data__.has(e)}var v1=b1,T1=ga,S1=y1,_1=v1;function an(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new T1;++t<r;)this.add(e[t])}an.prototype.add=an.prototype.push=S1,an.prototype.has=_1;var w1=an;function C1(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 E1=C1;function x1(e){return e!==e}var A1=x1;function O1(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}var $1=O1,P1=E1,I1=A1,k1=$1;function M1(e,t,r){return t===t?k1(e,t,r):P1(e,I1,r)}var D1=M1,F1=D1;function N1(e,t){var r=e==null?0:e.length;return!!r&&F1(e,t,0)>-1}var L1=N1;function j1(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 z1=j1;function B1(e,t){return e.has(t)}var U1=B1;function V1(){}var W1=V1;function G1(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var nl=G1,Io=qi,H1=W1,Y1=nl,q1=1/0,K1=Io&&1/Y1(new Io([,-0]))[1]==q1?function(e){return new Io(e)}:H1,J1=K1,Z1=w1,X1=L1,Q1=z1,R1=U1,eT=J1,tT=nl,rT=200;function nT(e,t,r){var n=-1,o=X1,s=e.length,i=!0,a=[],c=a;if(r)i=!1,o=Q1;else if(s>=rT){var u=t?null:eT(e);if(u)return tT(u);i=!1,o=R1,c=new Z1}else c=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=c.length;p--;)if(c[p]===f)continue e;t&&c.push(f),a.push(d)}else o(c,f,r)||(c!==a&&c.push(f),a.push(d))}return a}var oT=nT,sT=h1,iT=Fa,aT=oT,lT=_a,cT=iT(function(e){return aT(sT(e,1,lT,!0))}),uT=cT;const fT=dt(uT);function dT(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 pT=dT;function hT(e){return function(t){return e==null?void 0:e[t]}}var gT=hT,mT=gT,yT={À:"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"},bT=mT(yT),vT=bT;function TT(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 ST=TT,ol=Kr,_T=ST,wT=gr,CT=aa,sl=ol?ol.prototype:void 0,il=sl?sl.toString:void 0;function al(e){if(typeof e=="string")return e;if(wT(e))return _T(e,al)+"";if(CT(e))return il?il.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var ET=al,xT=ET;function AT(e){return e==null?"":xT(e)}var ko=AT,OT=vT,$T=ko,PT=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,IT="\\u0300-\\u036f",kT="\\ufe20-\\ufe2f",MT="\\u20d0-\\u20ff",DT=IT+kT+MT,FT="["+DT+"]",NT=RegExp(FT,"g");function LT(e){return e=$T(e),e&&e.replace(PT,OT).replace(NT,"")}var jT=LT,zT=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function BT(e){return e.match(zT)||[]}var UT=BT,VT=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function WT(e){return VT.test(e)}var GT=WT,ll="\\ud800-\\udfff",HT="\\u0300-\\u036f",YT="\\ufe20-\\ufe2f",qT="\\u20d0-\\u20ff",KT=HT+YT+qT,cl="\\u2700-\\u27bf",ul="a-z\\xdf-\\xf6\\xf8-\\xff",JT="\\xac\\xb1\\xd7\\xf7",ZT="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",XT="\\u2000-\\u206f",QT=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fl="A-Z\\xc0-\\xd6\\xd8-\\xde",RT="\\ufe0e\\ufe0f",dl=JT+ZT+XT+QT,pl="['’]",hl="["+dl+"]",eS="["+KT+"]",gl="\\d+",tS="["+cl+"]",ml="["+ul+"]",yl="[^"+ll+dl+gl+cl+ul+fl+"]",rS="\\ud83c[\\udffb-\\udfff]",nS="(?:"+eS+"|"+rS+")",oS="[^"+ll+"]",bl="(?:\\ud83c[\\udde6-\\uddff]){2}",vl="[\\ud800-\\udbff][\\udc00-\\udfff]",zt="["+fl+"]",sS="\\u200d",Tl="(?:"+ml+"|"+yl+")",iS="(?:"+zt+"|"+yl+")",Sl="(?:"+pl+"(?:d|ll|m|re|s|t|ve))?",_l="(?:"+pl+"(?:D|LL|M|RE|S|T|VE))?",wl=nS+"?",Cl="["+RT+"]?",aS="(?:"+sS+"(?:"+[oS,bl,vl].join("|")+")"+Cl+wl+")*",lS="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",cS="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",uS=Cl+wl+aS,fS="(?:"+[tS,bl,vl].join("|")+")"+uS,dS=RegExp([zt+"?"+ml+"+"+Sl+"(?="+[hl,zt,"$"].join("|")+")",iS+"+"+_l+"(?="+[hl,zt+Tl,"$"].join("|")+")",zt+"?"+Tl+"+"+Sl,zt+"+"+_l,cS,lS,gl,fS].join("|"),"g");function pS(e){return e.match(dS)||[]}var hS=pS,gS=UT,mS=GT,yS=ko,bS=hS;function vS(e,t,r){return e=yS(e),t=r?void 0:t,t===void 0?mS(e)?bS(e):gS(e):e.match(t)||[]}var TS=vS,SS=pT,_S=jT,wS=TS,CS="['’]",ES=RegExp(CS,"g");function xS(e){return function(t){return SS(wS(_S(t).replace(ES,"")),e,"")}}var AS=xS;function OS(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 $S=OS,PS=$S;function IS(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:PS(e,t,r)}var kS=IS,MS="\\ud800-\\udfff",DS="\\u0300-\\u036f",FS="\\ufe20-\\ufe2f",NS="\\u20d0-\\u20ff",LS=DS+FS+NS,jS="\\ufe0e\\ufe0f",zS="\\u200d",BS=RegExp("["+zS+MS+LS+jS+"]");function US(e){return BS.test(e)}var El=US;function VS(e){return e.split("")}var WS=VS,xl="\\ud800-\\udfff",GS="\\u0300-\\u036f",HS="\\ufe20-\\ufe2f",YS="\\u20d0-\\u20ff",qS=GS+HS+YS,KS="\\ufe0e\\ufe0f",JS="["+xl+"]",Mo="["+qS+"]",Do="\\ud83c[\\udffb-\\udfff]",ZS="(?:"+Mo+"|"+Do+")",Al="[^"+xl+"]",Ol="(?:\\ud83c[\\udde6-\\uddff]){2}",$l="[\\ud800-\\udbff][\\udc00-\\udfff]",XS="\\u200d",Pl=ZS+"?",Il="["+KS+"]?",QS="(?:"+XS+"(?:"+[Al,Ol,$l].join("|")+")"+Il+Pl+")*",RS=Il+Pl+QS,e_="(?:"+[Al+Mo+"?",Mo,Ol,$l,JS].join("|")+")",t_=RegExp(Do+"(?="+Do+")|"+e_+RS,"g");function r_(e){return e.match(t_)||[]}var n_=r_,o_=WS,s_=El,i_=n_;function a_(e){return s_(e)?i_(e):o_(e)}var l_=a_,c_=kS,u_=El,f_=l_,d_=ko;function p_(e){return function(t){t=d_(t);var r=u_(t)?f_(t):void 0,n=r?r[0]:t.charAt(0),o=r?c_(r,1).join(""):t.slice(1);return n[e]()+o}}var h_=p_,g_=h_,m_=g_("toUpperCase"),y_=m_,b_=AS,v_=y_,T_=b_(function(e,t,r){return e+(r?" ":"")+v_(t)}),S_=T_;const __=dt(S_);var w_=Math.ceil,C_=Math.max;function E_(e,t,r,n){for(var o=-1,s=C_(w_((t-e)/(r||1)),0),i=Array(s);s--;)i[n?s:++o]=e,e+=r;return i}var x_=E_,A_=ua,O_=1/0,$_=17976931348623157e292;function P_(e){if(!e)return e===0?e:0;if(e=A_(e),e===O_||e===-1/0){var t=e<0?-1:1;return t*$_}return e===e?e:0}var I_=P_,k_=x_,M_=Na,Fo=I_;function D_(e){return function(t,r,n){return n&&typeof n!="number"&&M_(t,r,n)&&(r=n=void 0),t=Fo(t),r===void 0?(r=t,t=0):r=Fo(r),n=n===void 0?t<r?1:-1:Fo(n),k_(t,r,n,e)}}var F_=D_,N_=F_,L_=N_(),j_=L_;const z_=dt(j_);var No={exports:{}},se={};/**
111
106
  * @license React
112
107
  * react-is.production.js
113
108
  *
@@ -115,7 +110,7 @@ attempted value: ${i}
115
110
  *
116
111
  * This source code is licensed under the MIT license found in the
117
112
  * LICENSE file in the root directory of this source tree.
118
- */var Il;function B_(){if(Il)return ie;Il=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"),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 w=h.$$typeof;switch(w){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 f:case d:return h;case s:return h;default:return w}}case t:return w}}}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=c,ie.SuspenseList=u,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)===c},ie.isSuspenseList=function(h){return b(h)===u},ie.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===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={};/**
113
+ */var kl;function B_(){if(kl)return se;kl=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"),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 C=h.$$typeof;switch(C){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 f:case d:return h;case s:return h;default:return C}}case t:return C}}}return se.ContextConsumer=s,se.ContextProvider=i,se.Element=e,se.ForwardRef=a,se.Fragment=r,se.Lazy=f,se.Memo=d,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)===f},se.isMemo=function(h){return b(h)===d},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===f||h.$$typeof===d||h.$$typeof===i||h.$$typeof===s||h.$$typeof===a||h.$$typeof===y||h.getModuleId!==void 0)},se.typeOf=b,se}var ie={};/**
119
114
  * @license React
120
115
  * react-is.development.js
121
116
  *
@@ -123,41 +118,41 @@ attempted value: ${i}
123
118
  *
124
119
  * This source code is licensed under the MIT license found in the
125
120
  * LICENSE file in the root directory of this source tree.
126
- */var kl;function U_(){return kl||(kl=1,process.env.NODE_ENV!=="production"&&function(){function e(h){if(typeof h=="object"&&h!==null){var w=h.$$typeof;switch(w){case t:switch(h=h.type,h){case n:case s:case o:case u:case d:return h;default:switch(h=h&&h.$$typeof,h){case a:case c:case p:case f:return h;case i:return h;default:return w}}case r:return w}}}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"),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=c,ae.Fragment=n,ae.Lazy=p,ae.Memo=f,ae.Portal=r,ae.Profiler=s,ae.StrictMode=o,ae.Suspense=u,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)===c},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)===u},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===u||h===d||h===y||typeof h=="object"&&h!==null&&(h.$$typeof===p||h.$$typeof===f||h.$$typeof===a||h.$$typeof===i||h.$$typeof===c||h.$$typeof===b||h.getModuleId!==void 0)},ae.typeOf=e}()),ae}process.env.NODE_ENV==="production"?Fo.exports=B_():Fo.exports=U_();var ln=Fo.exports;function st(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 Ml(e){if($e.isValidElement(e)||ln.isValidElementType(e)||!st(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Ml(e[r])}),t}function ze(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return st(e)&&st(t)&&Object.keys(t).forEach(o=>{$e.isValidElement(t[o])||ln.isValidElementType(t[o])?n[o]=t[o]:st(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&st(e[o])?n[o]=ze(e[o],t[o],r):r.clone?n[o]=st(t[o])?Ml(t[o]):t[o]:n[o]=t[o]}),n}var No={exports:{}},cn={exports:{}},ne={};/** @license React v16.13.1
121
+ */var Ml;function U_(){return Ml||(Ml=1,process.env.NODE_ENV!=="production"&&function(){function e(h){if(typeof h=="object"&&h!==null){var C=h.$$typeof;switch(C){case t:switch(h=h.type,h){case n:case s:case o:case u:case d:return h;default:switch(h=h&&h.$$typeof,h){case a:case c:case p:case f:return h;case i:return h;default:return C}}case r:return C}}}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"),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");ie.ContextConsumer=i,ie.ContextProvider=a,ie.Element=t,ie.ForwardRef=c,ie.Fragment=n,ie.Lazy=p,ie.Memo=f,ie.Portal=r,ie.Profiler=s,ie.StrictMode=o,ie.Suspense=u,ie.SuspenseList=d,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)===f},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)===d},ie.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===s||h===o||h===u||h===d||h===y||typeof h=="object"&&h!==null&&(h.$$typeof===p||h.$$typeof===f||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"?No.exports=B_():No.exports=U_();var ln=No.exports;function it(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 Dl(e){if(Oe.isValidElement(e)||ln.isValidElementType(e)||!it(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Dl(e[r])}),t}function Be(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return it(e)&&it(t)&&Object.keys(t).forEach(o=>{Oe.isValidElement(t[o])||ln.isValidElementType(t[o])?n[o]=t[o]:it(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&it(e[o])?n[o]=Be(e[o],t[o],r):r.clone?n[o]=it(t[o])?Dl(t[o]):t[o]:n[o]=t[o]}),n}var Lo={exports:{}},cn={exports:{}},ne={};/** @license React v16.13.1
127
122
  * react-is.production.min.js
128
123
  *
129
124
  * Copyright (c) Facebook, Inc. and its affiliates.
130
125
  *
131
126
  * This source code is licensed under the MIT license found in the
132
127
  * LICENSE file in the root directory of this source tree.
133
- */var Dl;function V_(){if(Dl)return ne;Dl=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,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,w=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,M=e?Symbol.for("react.scope"):60119;function A(S){if(typeof S=="object"&&S!==null){var P=S.$$typeof;switch(P){case t:switch(S=S.type,S){case c:case u:case n:case s:case o:case f:return S;default:switch(S=S&&S.$$typeof,S){case a:case d:case b:case y:case i:return S;default:return P}}case r:return P}}}function _(S){return A(S)===u}return ne.AsyncMode=c,ne.ConcurrentMode=u,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(S){return _(S)||A(S)===c},ne.isConcurrentMode=_,ne.isContextConsumer=function(S){return A(S)===a},ne.isContextProvider=function(S){return A(S)===i},ne.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},ne.isForwardRef=function(S){return A(S)===d},ne.isFragment=function(S){return A(S)===n},ne.isLazy=function(S){return A(S)===b},ne.isMemo=function(S){return A(S)===y},ne.isPortal=function(S){return A(S)===r},ne.isProfiler=function(S){return A(S)===s},ne.isStrictMode=function(S){return A(S)===o},ne.isSuspense=function(S){return A(S)===f},ne.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===u||S===s||S===o||S===f||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===b||S.$$typeof===y||S.$$typeof===i||S.$$typeof===a||S.$$typeof===d||S.$$typeof===w||S.$$typeof===E||S.$$typeof===M||S.$$typeof===h)},ne.typeOf=A,ne}var oe={};/** @license React v16.13.1
128
+ */var Fl;function V_(){if(Fl)return ne;Fl=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,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,C=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,F=e?Symbol.for("react.scope"):60119;function $(S){if(typeof S=="object"&&S!==null){var I=S.$$typeof;switch(I){case t:switch(S=S.type,S){case c:case u:case n:case s:case o:case f:return S;default:switch(S=S&&S.$$typeof,S){case a:case d:case b:case y:case i:return S;default:return I}}case r:return I}}}function w(S){return $(S)===u}return ne.AsyncMode=c,ne.ConcurrentMode=u,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(S){return w(S)||$(S)===c},ne.isConcurrentMode=w,ne.isContextConsumer=function(S){return $(S)===a},ne.isContextProvider=function(S){return $(S)===i},ne.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},ne.isForwardRef=function(S){return $(S)===d},ne.isFragment=function(S){return $(S)===n},ne.isLazy=function(S){return $(S)===b},ne.isMemo=function(S){return $(S)===y},ne.isPortal=function(S){return $(S)===r},ne.isProfiler=function(S){return $(S)===s},ne.isStrictMode=function(S){return $(S)===o},ne.isSuspense=function(S){return $(S)===f},ne.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===u||S===s||S===o||S===f||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===b||S.$$typeof===y||S.$$typeof===i||S.$$typeof===a||S.$$typeof===d||S.$$typeof===C||S.$$typeof===x||S.$$typeof===F||S.$$typeof===h)},ne.typeOf=$,ne}var oe={};/** @license React v16.13.1
134
129
  * react-is.development.js
135
130
  *
136
131
  * Copyright (c) Facebook, Inc. and its affiliates.
137
132
  *
138
133
  * This source code is licensed under the MIT license found in the
139
134
  * LICENSE file in the root directory of this source tree.
140
- */var Fl;function W_(){return Fl||(Fl=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,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,w=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,M=e?Symbol.for("react.scope"):60119;function A(D){return typeof D=="string"||typeof D=="function"||D===n||D===u||D===s||D===o||D===f||D===p||typeof D=="object"&&D!==null&&(D.$$typeof===b||D.$$typeof===y||D.$$typeof===i||D.$$typeof===a||D.$$typeof===d||D.$$typeof===w||D.$$typeof===E||D.$$typeof===M||D.$$typeof===h)}function _(D){if(typeof D=="object"&&D!==null){var Ne=D.$$typeof;switch(Ne){case t:var Ge=D.type;switch(Ge){case c:case u:case n:case s:case o:case f:return Ge;default:var Rt=Ge&&Ge.$$typeof;switch(Rt){case a:case d:case b:case y:case i:return Rt;default:return Ne}}case r:return Ne}}}var S=c,P=u,F=a,j=i,z=t,m=d,O=n,B=b,q=y,ee=r,fe=s,se=o,be=f,we=!1;function G(D){return we||(we=!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(D)||_(D)===c}function x(D){return _(D)===u}function $(D){return _(D)===a}function K(D){return _(D)===i}function W(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function J(D){return _(D)===d}function U(D){return _(D)===n}function Z(D){return _(D)===b}function N(D){return _(D)===y}function X(D){return _(D)===r}function L(D){return _(D)===s}function Q(D){return _(D)===o}function he(D){return _(D)===f}oe.AsyncMode=S,oe.ConcurrentMode=P,oe.ContextConsumer=F,oe.ContextProvider=j,oe.Element=z,oe.ForwardRef=m,oe.Fragment=O,oe.Lazy=B,oe.Memo=q,oe.Portal=ee,oe.Profiler=fe,oe.StrictMode=se,oe.Suspense=be,oe.isAsyncMode=G,oe.isConcurrentMode=x,oe.isContextConsumer=$,oe.isContextProvider=K,oe.isElement=W,oe.isForwardRef=J,oe.isFragment=U,oe.isLazy=Z,oe.isMemo=N,oe.isPortal=X,oe.isProfiler=L,oe.isStrictMode=Q,oe.isSuspense=he,oe.isValidElementType=A,oe.typeOf=_}()),oe}var Nl;function Ll(){return Nl||(Nl=1,process.env.NODE_ENV==="production"?cn.exports=V_():cn.exports=W_()),cn.exports}/*
135
+ */var Nl;function W_(){return Nl||(Nl=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,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,C=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,F=e?Symbol.for("react.scope"):60119;function $(N){return typeof N=="string"||typeof N=="function"||N===n||N===u||N===s||N===o||N===f||N===p||typeof N=="object"&&N!==null&&(N.$$typeof===b||N.$$typeof===y||N.$$typeof===i||N.$$typeof===a||N.$$typeof===d||N.$$typeof===C||N.$$typeof===x||N.$$typeof===F||N.$$typeof===h)}function w(N){if(typeof N=="object"&&N!==null){var De=N.$$typeof;switch(De){case t:var Le=N.type;switch(Le){case c:case u:case n:case s:case o:case f:return Le;default:var Qt=Le&&Le.$$typeof;switch(Qt){case a:case d:case b:case y:case i:return Qt;default:return De}}case r:return De}}}var S=c,I=u,j=a,H=i,U=t,m=d,A=n,L=b,Y=y,J=r,ae=s,le=o,ge=f,me=!1;function Me(N){return me||(me=!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.")),O(N)||w(N)===c}function O(N){return w(N)===u}function _(N){return w(N)===a}function P(N){return w(N)===i}function D(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function V(N){return w(N)===d}function z(N){return w(N)===n}function q(N){return w(N)===b}function K(N){return w(N)===y}function ee(N){return w(N)===r}function te(N){return w(N)===s}function X(N){return w(N)===o}function Z(N){return w(N)===f}oe.AsyncMode=S,oe.ConcurrentMode=I,oe.ContextConsumer=j,oe.ContextProvider=H,oe.Element=U,oe.ForwardRef=m,oe.Fragment=A,oe.Lazy=L,oe.Memo=Y,oe.Portal=J,oe.Profiler=ae,oe.StrictMode=le,oe.Suspense=ge,oe.isAsyncMode=Me,oe.isConcurrentMode=O,oe.isContextConsumer=_,oe.isContextProvider=P,oe.isElement=D,oe.isForwardRef=V,oe.isFragment=z,oe.isLazy=q,oe.isMemo=K,oe.isPortal=ee,oe.isProfiler=te,oe.isStrictMode=X,oe.isSuspense=Z,oe.isValidElementType=$,oe.typeOf=w}()),oe}var Ll;function jl(){return Ll||(Ll=1,process.env.NODE_ENV==="production"?cn.exports=V_():cn.exports=W_()),cn.exports}/*
141
136
  object-assign
142
137
  (c) Sindre Sorhus
143
138
  @license MIT
144
- */var Lo,jl;function G_(){if(jl)return Lo;jl=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(d){return i[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Lo=o()?Object.assign:function(s,i){for(var a,c=n(s),u,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var f in a)t.call(a,f)&&(c[f]=a[f]);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},Lo}var jo,zl;function zo(){if(zl)return jo;zl=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return jo=e,jo}var Bo,Bl;function Ul(){return Bl||(Bl=1,Bo=Function.call.bind(Object.prototype.hasOwnProperty)),Bo}var Uo,Vl;function H_(){if(Vl)return Uo;Vl=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=zo(),r={},n=Ul();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 d in s)if(n(s,d)){var f;try{if(typeof s[d]!="function"){var p=Error((c||"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,c,a,null,t)}catch(b){f=b}if(f&&!(f instanceof Error)&&e((c||"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=u?u():"";e("Failed "+a+" type: "+f.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Uo=o,Uo}var Vo,Wl;function Y_(){if(Wl)return Vo;Wl=1;var e=Ll(),t=G_(),r=zo(),n=Ul(),o=H_(),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 Vo=function(a,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(x){var $=x&&(u&&x[u]||x[d]);if(typeof $=="function")return $}var p="<<anonymous>>",y={array:E("array"),bigint:E("bigint"),bool:E("boolean"),func:E("function"),number:E("number"),object:E("object"),string:E("string"),symbol:E("symbol"),any:M(),arrayOf:A,element:_(),elementType:S(),instanceOf:P,node:m(),objectOf:j,oneOf:F,oneOfType:z,shape:B,exact:q};function b(x,$){return x===$?x!==0||1/x===1/$:x!==x&&$!==$}function h(x,$){this.message=x,this.data=$&&typeof $=="object"?$:{},this.stack=""}h.prototype=Error.prototype;function w(x){if(process.env.NODE_ENV!=="production")var $={},K=0;function W(U,Z,N,X,L,Q,he){if(X=X||p,Q=Q||N,he!==r){if(c){var D=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 D.name="Invariant Violation",D}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ne=X+":"+N;!$[Ne]&&K<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Q+"` prop on `"+X+"`. 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[N]==null?U?Z[N]===null?new h("The "+L+" `"+Q+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new h("The "+L+" `"+Q+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:x(Z,N,X,L,Q)}var J=W.bind(null,!1);return J.isRequired=W.bind(null,!0),J}function E(x){function $(K,W,J,U,Z,N){var X=K[W],L=se(X);if(L!==x){var Q=be(X);return new h("Invalid "+U+" `"+Z+"` of type "+("`"+Q+"` supplied to `"+J+"`, expected ")+("`"+x+"`."),{expectedType:x})}return null}return w($)}function M(){return w(i)}function A(x){function $(K,W,J,U,Z){if(typeof x!="function")return new h("Property `"+Z+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var N=K[W];if(!Array.isArray(N)){var X=se(N);return new h("Invalid "+U+" `"+Z+"` of type "+("`"+X+"` supplied to `"+J+"`, expected an array."))}for(var L=0;L<N.length;L++){var Q=x(N,L,J,U,Z+"["+L+"]",r);if(Q instanceof Error)return Q}return null}return w($)}function _(){function x($,K,W,J,U){var Z=$[K];if(!a(Z)){var N=se(Z);return new h("Invalid "+J+" `"+U+"` of type "+("`"+N+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return w(x)}function S(){function x($,K,W,J,U){var Z=$[K];if(!e.isValidElementType(Z)){var N=se(Z);return new h("Invalid "+J+" `"+U+"` of type "+("`"+N+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return w(x)}function P(x){function $(K,W,J,U,Z){if(!(K[W]instanceof x)){var N=x.name||p,X=G(K[W]);return new h("Invalid "+U+" `"+Z+"` of type "+("`"+X+"` supplied to `"+J+"`, expected ")+("instance of `"+N+"`."))}return null}return w($)}function F(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 $(K,W,J,U,Z){for(var N=K[W],X=0;X<x.length;X++)if(b(N,x[X]))return null;var L=JSON.stringify(x,function(he,D){var Ne=be(D);return Ne==="symbol"?String(D):D});return new h("Invalid "+U+" `"+Z+"` of value `"+String(N)+"` "+("supplied to `"+J+"`, expected one of "+L+"."))}return w($)}function j(x){function $(K,W,J,U,Z){if(typeof x!="function")return new h("Property `"+Z+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var N=K[W],X=se(N);if(X!=="object")return new h("Invalid "+U+" `"+Z+"` of type "+("`"+X+"` supplied to `"+J+"`, expected an object."));for(var L in N)if(n(N,L)){var Q=x(N,L,J,U,Z+"."+L,r);if(Q instanceof Error)return Q}return null}return 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 $=0;$<x.length;$++){var K=x[$];if(typeof K!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+we(K)+" at index "+$+"."),i}function W(J,U,Z,N,X){for(var L=[],Q=0;Q<x.length;Q++){var he=x[Q],D=he(J,U,Z,N,X,r);if(D==null)return null;D.data&&n(D.data,"expectedType")&&L.push(D.data.expectedType)}var Ne=L.length>0?", expected one of type ["+L.join(", ")+"]":"";return new h("Invalid "+N+" `"+X+"` supplied to "+("`"+Z+"`"+Ne+"."))}return w(W)}function m(){function x($,K,W,J,U){return ee($[K])?null:new h("Invalid "+J+" `"+U+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return w(x)}function O(x,$,K,W,J){return new h((x||"React class")+": "+$+" type `"+K+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function B(x){function $(K,W,J,U,Z){var N=K[W],X=se(N);if(X!=="object")return new h("Invalid "+U+" `"+Z+"` of type `"+X+"` "+("supplied to `"+J+"`, expected `object`."));for(var L in x){var Q=x[L];if(typeof Q!="function")return O(J,U,Z,L,be(Q));var he=Q(N,L,J,U,Z+"."+L,r);if(he)return he}return null}return w($)}function q(x){function $(K,W,J,U,Z){var N=K[W],X=se(N);if(X!=="object")return new h("Invalid "+U+" `"+Z+"` of type `"+X+"` "+("supplied to `"+J+"`, expected `object`."));var L=t({},K[W],x);for(var Q in L){var he=x[Q];if(n(x,Q)&&typeof he!="function")return O(J,U,Z,Q,be(he));if(!he)return new h("Invalid "+U+" `"+Z+"` key `"+Q+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(K[W],null," ")+`
145
- Valid keys: `+JSON.stringify(Object.keys(x),null," "));var D=he(N,Q,J,U,Z+"."+Q,r);if(D)return D}return null}return w($)}function ee(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(ee);if(x===null||a(x))return!0;var $=f(x);if($){var K=$.call(x),W;if($!==x.entries){for(;!(W=K.next()).done;)if(!ee(W.value))return!1}else for(;!(W=K.next()).done;){var J=W.value;if(J&&!ee(J[1]))return!1}}else return!1;return!0;default:return!1}}function fe(x,$){return x==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function se(x){var $=typeof x;return Array.isArray(x)?"array":x instanceof RegExp?"object":fe($,x)?"symbol":$}function be(x){if(typeof x>"u"||x===null)return""+x;var $=se(x);if($==="object"){if(x instanceof Date)return"date";if(x instanceof RegExp)return"regexp"}return $}function we(x){var $=be(x);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function G(x){return!x.constructor||!x.constructor.name?p:x.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},Vo}var Wo,Gl;function q_(){if(Gl)return Wo;Gl=1;var e=zo();function t(){}function r(){}return r.resetWarningCache=t,Wo=function(){function n(i,a,c,u,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},Wo}if(process.env.NODE_ENV!=="production"){var K_=Ll(),J_=!0;No.exports=Y_()(K_.isElement,J_)}else No.exports=q_()();var Z_=No.exports;const re=ft(Z_);function ht(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 Hl(e,t=""){return e.displayName||e.name||t}function Yl(e,t,r){const n=Hl(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function X_(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Hl(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ln.ForwardRef:return Yl(e,e.render,"ForwardRef");case ln.Memo:return Yl(e,e.type,"memo");default:return}}}function xt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":ht(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Go(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]=Go(s[c],i[c])}}}else r[o]===void 0&&(r[o]=e[o])}return r}function Q_(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 ql=e=>e,R_=(()=>{let e=ql;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ql}}})(),ew={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 Ho(e,t,r="Mui"){const n=ew[t];return n?`${r}-${n}`:`${R_.generate(e)}-${t}`}function tw(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=Ho(e,o,r)}),n}function rw(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function mr(e,t){return t?ze(e,t,{clone:!1}):e}const gt=process.env.NODE_ENV!=="production"?re.oneOfType([re.number,re.string,re.object,re.array]):{};function nw(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 ow(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function sw(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>\`.
146
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:ht(18,`(${t})`));return null}const[,n,o]=r,s=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(s)}function iw(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 un={xs:0,sm:600,md:900,lg:1200,xl:1536},Kl={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${un[e]}px)`},aw={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:un[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function it(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||Kl;return t.reduce((i,a,c)=>(i[s.up(s.keys[c])]=r(t[c]),i),{})}if(typeof t=="object"){const s=n.breakpoints||Kl;return Object.keys(t).reduce((i,a)=>{if(ow(s.keys,a)){const c=sw(n.containerQueries?n:aw,a);c&&(i[c]=r(t[a],a))}else if(Object.keys(s.values||un).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 lw(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function cw(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function fn(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 dn(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=fn(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=fn(c,n)||{};return it(i,a,f=>{let p=dn(u,o,f);return f===p&&typeof f=="string"&&(p=dn(u,o,`${t}${f==="default"?"":xt(f)}`,f)),r===!1?p:{[r]:p}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:gt}:{},s.filterProps=[t],s}function uw(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const fw={m:"margin",p:"padding"},dw={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Jl={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},pw=uw(e=>{if(e.length>2)if(Jl[e])e=Jl[e];else return[e];const[t,r]=e.split(""),n=fw[t],o=dw[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),pn=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],hn=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],hw=[...pn,...hn];function yr(e,t,r,n){const o=fn(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 jo,zl;function G_(){if(zl)return jo;zl=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(d){return i[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return jo=o()?Object.assign:function(s,i){for(var a,c=n(s),u,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var f in a)t.call(a,f)&&(c[f]=a[f]);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},jo}var zo,Bl;function Bo(){if(Bl)return zo;Bl=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return zo=e,zo}var Uo,Ul;function Vl(){return Ul||(Ul=1,Uo=Function.call.bind(Object.prototype.hasOwnProperty)),Uo}var Vo,Wl;function H_(){if(Wl)return Vo;Wl=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Bo(),r={},n=Vl();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 d in s)if(n(s,d)){var f;try{if(typeof s[d]!="function"){var p=Error((c||"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,c,a,null,t)}catch(b){f=b}if(f&&!(f instanceof Error)&&e((c||"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=u?u():"";e("Failed "+a+" type: "+f.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Vo=o,Vo}var Wo,Gl;function Y_(){if(Gl)return Wo;Gl=1;var e=jl(),t=G_(),r=Bo(),n=Vl(),o=H_(),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 Wo=function(a,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(O){var _=O&&(u&&O[u]||O[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:F(),arrayOf:$,element:w(),elementType:S(),instanceOf:I,node:m(),objectOf:H,oneOf:j,oneOfType:U,shape:L,exact:Y};function b(O,_){return O===_?O!==0||1/O===1/_:O!==O&&_!==_}function h(O,_){this.message=O,this.data=_&&typeof _=="object"?_:{},this.stack=""}h.prototype=Error.prototype;function C(O){if(process.env.NODE_ENV!=="production")var _={},P=0;function D(z,q,K,ee,te,X,Z){if(ee=ee||p,X=X||K,Z!==r){if(c){var N=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw N.name="Invariant Violation",N}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var De=ee+":"+K;!_[De]&&P<3&&(s("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+ee+"`. 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."),_[De]=!0,P++)}}return q[K]==null?z?q[K]===null?new h("The "+te+" `"+X+"` is marked as required "+("in `"+ee+"`, but its value is `null`.")):new h("The "+te+" `"+X+"` is marked as required in "+("`"+ee+"`, but its value is `undefined`.")):null:O(q,K,ee,te,X)}var V=D.bind(null,!1);return V.isRequired=D.bind(null,!0),V}function x(O){function _(P,D,V,z,q,K){var ee=P[D],te=le(ee);if(te!==O){var X=ge(ee);return new h("Invalid "+z+" `"+q+"` of type "+("`"+X+"` supplied to `"+V+"`, expected ")+("`"+O+"`."),{expectedType:O})}return null}return C(_)}function F(){return C(i)}function $(O){function _(P,D,V,z,q){if(typeof O!="function")return new h("Property `"+q+"` of component `"+V+"` has invalid PropType notation inside arrayOf.");var K=P[D];if(!Array.isArray(K)){var ee=le(K);return new h("Invalid "+z+" `"+q+"` of type "+("`"+ee+"` supplied to `"+V+"`, expected an array."))}for(var te=0;te<K.length;te++){var X=O(K,te,V,z,q+"["+te+"]",r);if(X instanceof Error)return X}return null}return C(_)}function w(){function O(_,P,D,V,z){var q=_[P];if(!a(q)){var K=le(q);return new h("Invalid "+V+" `"+z+"` of type "+("`"+K+"` supplied to `"+D+"`, expected a single ReactElement."))}return null}return C(O)}function S(){function O(_,P,D,V,z){var q=_[P];if(!e.isValidElementType(q)){var K=le(q);return new h("Invalid "+V+" `"+z+"` of type "+("`"+K+"` supplied to `"+D+"`, expected a single ReactElement type."))}return null}return C(O)}function I(O){function _(P,D,V,z,q){if(!(P[D]instanceof O)){var K=O.name||p,ee=Me(P[D]);return new h("Invalid "+z+" `"+q+"` of type "+("`"+ee+"` supplied to `"+V+"`, expected ")+("instance of `"+K+"`."))}return null}return C(_)}function j(O){if(!Array.isArray(O))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 _(P,D,V,z,q){for(var K=P[D],ee=0;ee<O.length;ee++)if(b(K,O[ee]))return null;var te=JSON.stringify(O,function(Z,N){var De=ge(N);return De==="symbol"?String(N):N});return new h("Invalid "+z+" `"+q+"` of value `"+String(K)+"` "+("supplied to `"+V+"`, expected one of "+te+"."))}return C(_)}function H(O){function _(P,D,V,z,q){if(typeof O!="function")return new h("Property `"+q+"` of component `"+V+"` has invalid PropType notation inside objectOf.");var K=P[D],ee=le(K);if(ee!=="object")return new h("Invalid "+z+" `"+q+"` of type "+("`"+ee+"` supplied to `"+V+"`, expected an object."));for(var te in K)if(n(K,te)){var X=O(K,te,V,z,q+"."+te,r);if(X instanceof Error)return X}return null}return C(_)}function U(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var _=0;_<O.length;_++){var P=O[_];if(typeof P!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+me(P)+" at index "+_+"."),i}function D(V,z,q,K,ee){for(var te=[],X=0;X<O.length;X++){var Z=O[X],N=Z(V,z,q,K,ee,r);if(N==null)return null;N.data&&n(N.data,"expectedType")&&te.push(N.data.expectedType)}var De=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new h("Invalid "+K+" `"+ee+"` supplied to "+("`"+q+"`"+De+"."))}return C(D)}function m(){function O(_,P,D,V,z){return J(_[P])?null:new h("Invalid "+V+" `"+z+"` supplied to "+("`"+D+"`, expected a ReactNode."))}return C(O)}function A(O,_,P,D,V){return new h((O||"React class")+": "+_+" type `"+P+"."+D+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+V+"`.")}function L(O){function _(P,D,V,z,q){var K=P[D],ee=le(K);if(ee!=="object")return new h("Invalid "+z+" `"+q+"` of type `"+ee+"` "+("supplied to `"+V+"`, expected `object`."));for(var te in O){var X=O[te];if(typeof X!="function")return A(V,z,q,te,ge(X));var Z=X(K,te,V,z,q+"."+te,r);if(Z)return Z}return null}return C(_)}function Y(O){function _(P,D,V,z,q){var K=P[D],ee=le(K);if(ee!=="object")return new h("Invalid "+z+" `"+q+"` of type `"+ee+"` "+("supplied to `"+V+"`, expected `object`."));var te=t({},P[D],O);for(var X in te){var Z=O[X];if(n(O,X)&&typeof Z!="function")return A(V,z,q,X,ge(Z));if(!Z)return new h("Invalid "+z+" `"+q+"` key `"+X+"` supplied to `"+V+"`.\nBad object: "+JSON.stringify(P[D],null," ")+`
140
+ Valid keys: `+JSON.stringify(Object.keys(O),null," "));var N=Z(K,X,V,z,q+"."+X,r);if(N)return N}return null}return C(_)}function J(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(J);if(O===null||a(O))return!0;var _=f(O);if(_){var P=_.call(O),D;if(_!==O.entries){for(;!(D=P.next()).done;)if(!J(D.value))return!1}else for(;!(D=P.next()).done;){var V=D.value;if(V&&!J(V[1]))return!1}}else return!1;return!0;default:return!1}}function ae(O,_){return O==="symbol"?!0:_?_["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&_ instanceof Symbol:!1}function le(O){var _=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":ae(_,O)?"symbol":_}function ge(O){if(typeof O>"u"||O===null)return""+O;var _=le(O);if(_==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return _}function me(O){var _=ge(O);switch(_){case"array":case"object":return"an "+_;case"boolean":case"date":case"regexp":return"a "+_;default:return _}}function Me(O){return!O.constructor||!O.constructor.name?p:O.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},Wo}var Go,Hl;function q_(){if(Hl)return Go;Hl=1;var e=Bo();function t(){}function r(){}return r.resetWarningCache=t,Go=function(){function n(i,a,c,u,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},Go}if(process.env.NODE_ENV!=="production"){var K_=jl(),J_=!0;Lo.exports=Y_()(K_.isElement,J_)}else Lo.exports=q_()();var Z_=Lo.exports;const re=dt(Z_);function gt(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 Yl(e,t=""){return e.displayName||e.name||t}function ql(e,t,r){const n=Yl(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function X_(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Yl(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ln.ForwardRef:return ql(e,e.render,"ForwardRef");case ln.Memo:return ql(e,e.type,"memo");default:return}}}function xt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":gt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ho(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]=Ho(s[c],i[c])}}}else r[o]===void 0&&(r[o]=e[o])}return r}function Q_(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 Kl=e=>e,R_=(()=>{let e=Kl;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Kl}}})(),ew={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 Yo(e,t,r="Mui"){const n=ew[t];return n?`${r}-${n}`:`${R_.generate(e)}-${t}`}function tw(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=Yo(e,o,r)}),n}function rw(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function mr(e,t){return t?Be(e,t,{clone:!1}):e}const mt=process.env.NODE_ENV!=="production"?re.oneOfType([re.number,re.string,re.object,re.array]):{};function nw(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 ow(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function sw(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\`.`:gt(18,`(${t})`));return null}const[,n,o]=r,s=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(s)}function iw(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 un={xs:0,sm:600,md:900,lg:1200,xl:1536},Jl={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${un[e]}px)`},aw={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:un[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function at(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||Jl;return t.reduce((i,a,c)=>(i[s.up(s.keys[c])]=r(t[c]),i),{})}if(typeof t=="object"){const s=n.breakpoints||Jl;return Object.keys(t).reduce((i,a)=>{if(ow(s.keys,a)){const c=sw(n.containerQueries?n:aw,a);c&&(i[c]=r(t[a],a))}else if(Object.keys(s.values||un).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 lw(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function cw(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function fn(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 dn(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=fn(e,r)||n,t&&(o=t(o,n,e)),o}function Te(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=fn(c,n)||{};return at(i,a,f=>{let p=dn(u,o,f);return f===p&&typeof f=="string"&&(p=dn(u,o,`${t}${f==="default"?"":xt(f)}`,f)),r===!1?p:{[r]:p}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:mt}:{},s.filterProps=[t],s}function uw(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const fw={m:"margin",p:"padding"},dw={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Zl={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},pw=uw(e=>{if(e.length>2)if(Zl[e])e=Zl[e];else return[e];const[t,r]=e.split(""),n=fw[t],o=dw[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),pn=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],hn=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],hw=[...pn,...hn];function yr(e,t,r,n){const o=fn(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(`
147
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(`
148
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(`
149
- `)),()=>{})}function Yo(e){return yr(e,"spacing",8,"spacing")}function br(e,t){return typeof t=="string"||t==null?t:e(t)}function gw(e,t){return r=>e.reduce((n,o)=>(n[o]=br(t,r),n),{})}function mw(e,t,r,n){if(!t.includes(r))return null;const o=pw(r),s=gw(o,n),i=e[r];return it(e,i,s)}function Zl(e,t){const r=Yo(e.theme);return Object.keys(e).map(n=>mw(e,t,n,r)).reduce(mr,{})}function me(e){return Zl(e,pn)}me.propTypes=process.env.NODE_ENV!=="production"?pn.reduce((e,t)=>(e[t]=gt,e),{}):{},me.filterProps=pn;function ye(e){return Zl(e,hn)}ye.propTypes=process.env.NODE_ENV!=="production"?hn.reduce((e,t)=>(e[t]=gt,e),{}):{},ye.filterProps=hn,process.env.NODE_ENV!=="production"&&hw.reduce((e,t)=>(e[t]=gt,e),{});function gn(...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]?mr(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 We(e,t){return ve({prop:e,themeKey:"borders",transform:t})}const yw=We("border",Ve),bw=We("borderTop",Ve),vw=We("borderRight",Ve),Tw=We("borderBottom",Ve),Sw=We("borderLeft",Ve),_w=We("borderColor"),ww=We("borderTopColor"),Cw=We("borderRightColor"),Ew=We("borderBottomColor"),xw=We("borderLeftColor"),Aw=We("outline",Ve),Ow=We("outlineColor"),mn=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=yr(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:br(t,n)});return it(e,e.borderRadius,r)}return null};mn.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:gt}:{},mn.filterProps=["borderRadius"],gn(yw,bw,vw,Tw,Sw,_w,ww,Cw,Ew,xw,mn,Aw,Ow);const yn=e=>{if(e.gap!==void 0&&e.gap!==null){const t=yr(e.theme,"spacing",8,"gap"),r=n=>({gap:br(t,n)});return it(e,e.gap,r)}return null};yn.propTypes=process.env.NODE_ENV!=="production"?{gap:gt}:{},yn.filterProps=["gap"];const bn=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=yr(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:br(t,n)});return it(e,e.columnGap,r)}return null};bn.propTypes=process.env.NODE_ENV!=="production"?{columnGap:gt}:{},bn.filterProps=["columnGap"];const vn=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=yr(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:br(t,n)});return it(e,e.rowGap,r)}return null};vn.propTypes=process.env.NODE_ENV!=="production"?{rowGap:gt}:{},vn.filterProps=["rowGap"];const $w=ve({prop:"gridColumn"}),Pw=ve({prop:"gridRow"}),Iw=ve({prop:"gridAutoFlow"}),kw=ve({prop:"gridAutoColumns"}),Mw=ve({prop:"gridAutoRows"}),Dw=ve({prop:"gridTemplateColumns"}),Fw=ve({prop:"gridTemplateRows"}),Nw=ve({prop:"gridTemplateAreas"}),Lw=ve({prop:"gridArea"});gn(yn,bn,vn,$w,Pw,Iw,kw,Mw,Dw,Fw,Nw,Lw);function Ut(e,t){return t==="grey"?t:e}const jw=ve({prop:"color",themeKey:"palette",transform:Ut}),zw=ve({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ut}),Bw=ve({prop:"backgroundColor",themeKey:"palette",transform:Ut});gn(jw,zw,Bw);function Be(e){return e<=1&&e!==0?`${e*100}%`:e}const Uw=ve({prop:"width",transform:Be}),qo=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])||un[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 it(e,e.maxWidth,t)}return null};qo.filterProps=["maxWidth"];const Vw=ve({prop:"minWidth",transform:Be}),Ww=ve({prop:"height",transform:Be}),Gw=ve({prop:"maxHeight",transform:Be}),Hw=ve({prop:"minHeight",transform:Be});ve({prop:"size",cssProperty:"width",transform:Be}),ve({prop:"size",cssProperty:"height",transform:Be});const Yw=ve({prop:"boxSizing"});gn(Uw,qo,Vw,Ww,Gw,Hw,Yw);const Tn={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:mn},color:{themeKey:"palette",transform:Ut},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ut},backgroundColor:{themeKey:"palette",transform:Ut},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:yn},rowGap:{style:vn},columnGap:{style:bn},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:qo},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 qw(...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 Kw(e,t){return typeof e=="function"?e(t):e}function Jw(){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:d,style:f}=a;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};const p=fn(o,u)||{};return f?f(i):it(i,n,b=>{let h=dn(p,d,b);return b===h&&typeof b=="string"&&(h=dn(p,d,`${r}${b==="default"?"":xt(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??Tn;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=lw(o.breakpoints),d=Object.keys(u);let f=u;return Object.keys(c).forEach(p=>{const y=Kw(c[p],o);if(y!=null)if(typeof y=="object")if(s[p])f=mr(f,e(p,y,o,s));else{const b=it({theme:o},y,h=>({[p]:h}));qw(b,y)?f[p]=t({sx:y,theme:o}):f=mr(f,b)}else f=mr(f,e(p,y,o,s))}),nw(o,cw(d,f))}return Array.isArray(n)?n.map(i):i(n)}return t}const Vt=Jw();Vt.filterProps=["sx"];function Ko(){return Ko=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},Ko.apply(null,arguments)}function Zw(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 Xw={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 Xl(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Qw=/[A-Z]|^ms/g,Rw=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ql=function(t){return t.charCodeAt(1)===45},Rl=function(t){return t!=null&&typeof t!="boolean"},Jo=Xl(function(e){return Ql(e)?e:e.replace(Qw,"-$&").toLowerCase()}),ec=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Rw,function(n,o,s){return Qe={name:o,styles:s,next:Qe},o})}return Xw[t]!==1&&!Ql(t)&&typeof r=="number"&&r!==0?r+"px":r};function vr(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 Qe={name:o.name,styles:o.styles,next:Qe},o.name;var s=r;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)Qe={name:i.name,styles:i.styles,next:Qe},i=i.next;var a=s.styles+";";return a}return eC(e,t,r)}case"function":{if(e!==void 0){var c=Qe,u=r(e);return Qe=c,vr(e,t,u)}break}}var d=r;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function eC(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=vr(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]+"}":Rl(a)&&(n+=Jo(s)+":"+ec(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++)Rl(i[c])&&(n+=Jo(s)+":"+ec(s,i[c])+";");else{var u=vr(e,t,i);switch(s){case"animation":case"animationName":{n+=Jo(s)+":"+u+";";break}default:n+=s+"{"+u+"}"}}}return n}var tc=/label:\s*([^\s;{]+)\s*(;|$)/g,Qe;function rc(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="";Qe=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,o+=vr(r,t,s);else{var i=s;o+=i[0]}for(var a=1;a<e.length;a++)if(o+=vr(r,t,e[a]),n){var c=s;o+=c[a]}tc.lastIndex=0;for(var u="",d;(d=tc.exec(o))!==null;)u+="-"+d[1];var f=Zw(o)+u;return{name:f,styles:o,next:Qe}}var tC=function(t){return t()},rC=$e.useInsertionEffect?$e.useInsertionEffect:!1,nC=rC||tC,oC=!0;function sC(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var nc=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||oC===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},iC=function(t,r,n){nc(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)}},aC=/^((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)-.*))$/,lC=Xl(function(e){return aC.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),cC=lC,uC=function(t){return t!=="theme"},oc=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?cC:uC},sc=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},fC=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return nc(r,n,o),nC(function(){return iC(r,n,o)}),null},dC=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=sc(t,r,n),c=a||oc(o),u=!c("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=bs.withEmotionCache(function(w,E,M){var A=u&&w.as||o,_="",S=[],P=w;if(w.theme==null){P={};for(var F in w)P[F]=w[F];P.theme=$e.useContext(bs.ThemeContext)}typeof w.className=="string"?_=sC(E.registered,S,w.className):w.className!=null&&(_=w.className+" ");var j=rc(f.concat(S),E.registered,P);_+=E.key+"-"+j.name,i!==void 0&&(_+=" "+i);var z=u&&a===void 0?oc(A):c,m={};for(var O in w)u&&O==="as"||z(O)&&(m[O]=w[O]);return m.className=_,M&&(m.ref=M),$e.createElement($e.Fragment,null,$e.createElement(fC,{cache:E,serialized:j,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(w,E){var M=e(w,Ko({},r,E,{shouldForwardProp:sc(h,E,!0)}));return M.apply(void 0,f)},h}},pC=["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"],Zo=dC.bind(null);pC.forEach(function(e){Zo[e]=Zo(e)});/**
144
+ `)),()=>{})}function qo(e){return yr(e,"spacing",8,"spacing")}function br(e,t){return typeof t=="string"||t==null?t:e(t)}function gw(e,t){return r=>e.reduce((n,o)=>(n[o]=br(t,r),n),{})}function mw(e,t,r,n){if(!t.includes(r))return null;const o=pw(r),s=gw(o,n),i=e[r];return at(e,i,s)}function Xl(e,t){const r=qo(e.theme);return Object.keys(e).map(n=>mw(e,t,n,r)).reduce(mr,{})}function ye(e){return Xl(e,pn)}ye.propTypes=process.env.NODE_ENV!=="production"?pn.reduce((e,t)=>(e[t]=mt,e),{}):{},ye.filterProps=pn;function be(e){return Xl(e,hn)}be.propTypes=process.env.NODE_ENV!=="production"?hn.reduce((e,t)=>(e[t]=mt,e),{}):{},be.filterProps=hn,process.env.NODE_ENV!=="production"&&hw.reduce((e,t)=>(e[t]=mt,e),{});function gn(...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]?mr(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 We(e){return typeof e!="number"?e:`${e}px solid`}function Ge(e,t){return Te({prop:e,themeKey:"borders",transform:t})}const yw=Ge("border",We),bw=Ge("borderTop",We),vw=Ge("borderRight",We),Tw=Ge("borderBottom",We),Sw=Ge("borderLeft",We),_w=Ge("borderColor"),ww=Ge("borderTopColor"),Cw=Ge("borderRightColor"),Ew=Ge("borderBottomColor"),xw=Ge("borderLeftColor"),Aw=Ge("outline",We),Ow=Ge("outlineColor"),mn=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=yr(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:br(t,n)});return at(e,e.borderRadius,r)}return null};mn.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:mt}:{},mn.filterProps=["borderRadius"],gn(yw,bw,vw,Tw,Sw,_w,ww,Cw,Ew,xw,mn,Aw,Ow);const yn=e=>{if(e.gap!==void 0&&e.gap!==null){const t=yr(e.theme,"spacing",8,"gap"),r=n=>({gap:br(t,n)});return at(e,e.gap,r)}return null};yn.propTypes=process.env.NODE_ENV!=="production"?{gap:mt}:{},yn.filterProps=["gap"];const bn=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=yr(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:br(t,n)});return at(e,e.columnGap,r)}return null};bn.propTypes=process.env.NODE_ENV!=="production"?{columnGap:mt}:{},bn.filterProps=["columnGap"];const vn=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=yr(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:br(t,n)});return at(e,e.rowGap,r)}return null};vn.propTypes=process.env.NODE_ENV!=="production"?{rowGap:mt}:{},vn.filterProps=["rowGap"];const $w=Te({prop:"gridColumn"}),Pw=Te({prop:"gridRow"}),Iw=Te({prop:"gridAutoFlow"}),kw=Te({prop:"gridAutoColumns"}),Mw=Te({prop:"gridAutoRows"}),Dw=Te({prop:"gridTemplateColumns"}),Fw=Te({prop:"gridTemplateRows"}),Nw=Te({prop:"gridTemplateAreas"}),Lw=Te({prop:"gridArea"});gn(yn,bn,vn,$w,Pw,Iw,kw,Mw,Dw,Fw,Nw,Lw);function Bt(e,t){return t==="grey"?t:e}const jw=Te({prop:"color",themeKey:"palette",transform:Bt}),zw=Te({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Bt}),Bw=Te({prop:"backgroundColor",themeKey:"palette",transform:Bt});gn(jw,zw,Bw);function Ue(e){return e<=1&&e!==0?`${e*100}%`:e}const Uw=Te({prop:"width",transform:Ue}),Ko=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])||un[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:Ue(r)}};return at(e,e.maxWidth,t)}return null};Ko.filterProps=["maxWidth"];const Vw=Te({prop:"minWidth",transform:Ue}),Ww=Te({prop:"height",transform:Ue}),Gw=Te({prop:"maxHeight",transform:Ue}),Hw=Te({prop:"minHeight",transform:Ue});Te({prop:"size",cssProperty:"width",transform:Ue}),Te({prop:"size",cssProperty:"height",transform:Ue});const Yw=Te({prop:"boxSizing"});gn(Uw,Ko,Vw,Ww,Gw,Hw,Yw);const Tn={border:{themeKey:"borders",transform:We},borderTop:{themeKey:"borders",transform:We},borderRight:{themeKey:"borders",transform:We},borderBottom:{themeKey:"borders",transform:We},borderLeft:{themeKey:"borders",transform:We},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:We},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:mn},color:{themeKey:"palette",transform:Bt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Bt},backgroundColor:{themeKey:"palette",transform:Bt},p:{style:be},pt:{style:be},pr:{style:be},pb:{style:be},pl:{style:be},px:{style:be},py:{style:be},padding:{style:be},paddingTop:{style:be},paddingRight:{style:be},paddingBottom:{style:be},paddingLeft:{style:be},paddingX:{style:be},paddingY:{style:be},paddingInline:{style:be},paddingInlineStart:{style:be},paddingInlineEnd:{style:be},paddingBlock:{style:be},paddingBlockStart:{style:be},paddingBlockEnd:{style:be},m:{style:ye},mt:{style:ye},mr:{style:ye},mb:{style:ye},ml:{style:ye},mx:{style:ye},my:{style:ye},margin:{style:ye},marginTop:{style:ye},marginRight:{style:ye},marginBottom:{style:ye},marginLeft:{style:ye},marginX:{style:ye},marginY:{style:ye},marginInline:{style:ye},marginInlineStart:{style:ye},marginInlineEnd:{style:ye},marginBlock:{style:ye},marginBlockStart:{style:ye},marginBlockEnd:{style:ye},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:yn},rowGap:{style:vn},columnGap:{style:bn},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ue},maxWidth:{style:Ko},minWidth:{transform:Ue},height:{transform:Ue},maxHeight:{transform:Ue},minHeight:{transform:Ue},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 qw(...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 Kw(e,t){return typeof e=="function"?e(t):e}function Jw(){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:d,style:f}=a;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};const p=fn(o,u)||{};return f?f(i):at(i,n,b=>{let h=dn(p,d,b);return b===h&&typeof b=="string"&&(h=dn(p,d,`${r}${b==="default"?"":xt(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??Tn;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=lw(o.breakpoints),d=Object.keys(u);let f=u;return Object.keys(c).forEach(p=>{const y=Kw(c[p],o);if(y!=null)if(typeof y=="object")if(s[p])f=mr(f,e(p,y,o,s));else{const b=at({theme:o},y,h=>({[p]:h}));qw(b,y)?f[p]=t({sx:y,theme:o}):f=mr(f,b)}else f=mr(f,e(p,y,o,s))}),nw(o,cw(d,f))}return Array.isArray(n)?n.map(i):i(n)}return t}const Ut=Jw();Ut.filterProps=["sx"];function Jo(){return Jo=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},Jo.apply(null,arguments)}function Zw(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 Xw={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 Ql(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Qw=/[A-Z]|^ms/g,Rw=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Rl=function(t){return t.charCodeAt(1)===45},ec=function(t){return t!=null&&typeof t!="boolean"},Zo=Ql(function(e){return Rl(e)?e:e.replace(Qw,"-$&").toLowerCase()}),tc=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Rw,function(n,o,s){return Xe={name:o,styles:s,next:Xe},o})}return Xw[t]!==1&&!Rl(t)&&typeof r=="number"&&r!==0?r+"px":r};function vr(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 eC(e,t,r)}case"function":{if(e!==void 0){var c=Xe,u=r(e);return Xe=c,vr(e,t,u)}break}}var d=r;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function eC(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=vr(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]+"}":ec(a)&&(n+=Zo(s)+":"+tc(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++)ec(i[c])&&(n+=Zo(s)+":"+tc(s,i[c])+";");else{var u=vr(e,t,i);switch(s){case"animation":case"animationName":{n+=Zo(s)+":"+u+";";break}default:n+=s+"{"+u+"}"}}}return n}var rc=/label:\s*([^\s;{]+)\s*(;|$)/g,Xe;function nc(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+=vr(r,t,s);else{var i=s;o+=i[0]}for(var a=1;a<e.length;a++)if(o+=vr(r,t,e[a]),n){var c=s;o+=c[a]}rc.lastIndex=0;for(var u="",d;(d=rc.exec(o))!==null;)u+="-"+d[1];var f=Zw(o)+u;return{name:f,styles:o,next:Xe}}var tC=function(t){return t()},rC=Oe.useInsertionEffect?Oe.useInsertionEffect:!1,nC=rC||tC,oC=!0;function sC(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var oc=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||oC===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},iC=function(t,r,n){oc(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)}},aC=/^((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)-.*))$/,lC=Ql(function(e){return aC.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),cC=lC,uC=function(t){return t!=="theme"},sc=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?cC:uC},ic=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},fC=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return oc(r,n,o),nC(function(){return iC(r,n,o)}),null},dC=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=ic(t,r,n),c=a||sc(o),u=!c("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=vs.withEmotionCache(function(C,x,F){var $=u&&C.as||o,w="",S=[],I=C;if(C.theme==null){I={};for(var j in C)I[j]=C[j];I.theme=Oe.useContext(vs.ThemeContext)}typeof C.className=="string"?w=sC(x.registered,S,C.className):C.className!=null&&(w=C.className+" ");var H=nc(f.concat(S),x.registered,I);w+=x.key+"-"+H.name,i!==void 0&&(w+=" "+i);var U=u&&a===void 0?sc($):c,m={};for(var A in C)u&&A==="as"||U(A)&&(m[A]=C[A]);return m.className=w,F&&(m.ref=F),Oe.createElement(Oe.Fragment,null,Oe.createElement(fC,{cache:x,serialized:H,isStringTag:typeof $=="string"}),Oe.createElement($,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(C,x){var F=e(C,Jo({},r,x,{shouldForwardProp:ic(h,x,!0)}));return F.apply(void 0,f)},h}},pC=["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"],Xo=dC.bind(null);pC.forEach(function(e){Xo[e]=Xo(e)});/**
150
145
  * @mui/styled-engine v6.4.3
151
146
  *
152
147
  * @license MIT
153
148
  * This source code is licensed under the MIT license found in the
154
149
  * LICENSE file in the root directory of this source tree.
155
- */function hC(e,t){const r=Zo(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(`
156
- `)):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 gC(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const ic=[];function ac(e){return ic[0]=e,rc(ic)}const mC=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 yC(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...o}=e,s=mC(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 d(p){return i.indexOf(p)+1<i.length?u(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?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:d,not:f,unit:r,...o}}const bC={borderRadius:4};function lc(e=8,t=Yo({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 vC(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 cc(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={},...i}=e,a=yC(r),c=lc(o);let u=ze({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:c,shape:{...bC,...s}},i);return u=iw(u),u.applyStyles=vC,u=t.reduce((d,f)=>ze(d,f),u),u.unstable_sxConfig={...Tn,...i==null?void 0:i.unstable_sxConfig},u.unstable_sx=function(f){return Vt({sx:f,theme:this})},u}function uc(e){const{variants:t,...r}=e,n={variants:t,style:ac(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=ac(o.style))}),n}const TC=cc();function Xo(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function SC(e){return e?(t,r)=>r[e]:null}function _C(e,t,r){e.theme=xC(e.theme)?r:e.theme[t]||e.theme}function Sn(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>Sn(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 fc(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function fc(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 wC(e={}){const{themeId:t,defaultTheme:r=TC,rootShouldForwardProp:n=Xo,slotShouldForwardProp:o=Xo}=e;function s(a){_C(a,t,r)}return(a,c={})=>{gC(a,S=>S.filter(P=>P!==Vt));const{name:u,slot:d,skipVariantsResolver:f,skipSx:p,overridesResolver:y=SC(dc(d)),...b}=c,h=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,w=p||!1;let E=Xo;d==="Root"||d==="root"?E=n:d?E=o:AC(a)&&(E=void 0);const M=hC(a,{shouldForwardProp:E,label:EC(u,d),...b}),A=S=>{if(typeof S=="function"&&S.__emotion_real!==S)return function(F){return Sn(F,S)};if(st(S)){const P=uc(S);return P.variants?function(j){return Sn(j,P)}:P.style}return S},_=(...S)=>{const P=[],F=S.map(A),j=[];if(P.push(s),u&&y&&j.push(function(B){var se,be;const ee=(be=(se=B.theme.components)==null?void 0:se[u])==null?void 0:be.styleOverrides;if(!ee)return null;const fe={};for(const we in ee)fe[we]=Sn(B,ee[we]);return y(B,fe)}),u&&!h&&j.push(function(B){var fe,se;const q=B.theme,ee=(se=(fe=q==null?void 0:q.components)==null?void 0:fe[u])==null?void 0:se.variants;return ee?fc(B,ee):null}),w||j.push(Vt),Array.isArray(F[0])){const O=F.shift(),B=new Array(P.length).fill(""),q=new Array(j.length).fill("");let ee;ee=[...B,...O,...q],ee.raw=[...B,...O.raw,...q],P.unshift(ee)}const z=[...P,...F,...j],m=M(...z);return a.muiName&&(m.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(m.displayName=CC(u,d,a)),m};return M.withConfig&&(_.withConfig=M.withConfig),_}}function CC(e,t,r){return e?`${e}${xt(t||"")}`:`Styled(${X_(r)})`}function EC(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${dc(t||"Root")}`),r}function xC(e){for(const t in e)return!1;return!0}function AC(e){return typeof e=="string"&&e.charCodeAt(0)>96}function dc(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Qo(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}].`),rw(e,t,r)}function OC(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 mt(e){if(e.type)return e;if(e.charAt(0)==="#")return mt(OC(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.
157
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:ht(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.
158
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:ht(10,o))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:o}}const $C=e=>{const t=mt(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Tr=(e,t)=>{try{return $C(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function _n(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 pc(e){e=mt(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,d=(u+r/30)%12)=>o-s*Math.max(Math.min(d-3,9-d,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])),_n({type:a,values:c})}function Ro(e){e=mt(e);let t=e.type==="hsl"||e.type==="hsla"?mt(pc(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 hc(e,t){const r=Ro(e),n=Ro(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function PC(e,t){return e=mt(e),t=Qo(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,_n(e)}function wn(e,t,r){try{return PC(e,t)}catch{return e}}function es(e,t){if(e=mt(e),t=Qo(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 _n(e)}function le(e,t,r){try{return es(e,t)}catch{return e}}function ts(e,t){if(e=mt(e),t=Qo(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 _n(e)}function ce(e,t,r){try{return ts(e,t)}catch{return e}}function IC(e,t=.15){return Ro(e)>.5?es(e,t):ts(e,t)}function Cn(e,t,r){try{return IC(e,t)}catch{return e}}const kC=$e.createContext(void 0);process.env.NODE_ENV!=="production"&&(re.node,re.object);function MC(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?Go(o.defaultProps,n):!o.styleOverrides&&!o.variants?Go(o,n):n}function DC({props:e,name:t}){const r=$e.useContext(kC);return MC({props:e,name:t,theme:{components:r}})}const gc={theme:void 0};function FC(e){let t,r;return function(o){let s=t;return(s===void 0||o.theme!==r)&&(gc.theme=o.theme,s=uc(e(gc)),t=s,r=o.theme),s}}function NC(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 mc=(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])})},LC=(e,t,r)=>{function n(o,s=[],i=[]){Object.entries(o).forEach(([a,c])=>{(!r||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)},jC=(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 rs(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},s={},i={};return LC(e,(a,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!n||!n(a,c))){const d=`--${r?`${r}-`:""}${a.join("-")}`,f=jC(a,c);Object.assign(o,{[d]:f}),mc(s,a,`var(${d})`,u),mc(i,a,`var(${d}, ${f})`,u)}},a=>a[0]==="vars"),{css:o,vars:s,varsWithDefaults:i}}function zC(e,t={}){const{getSelector:r=w,disableCssColorScheme:n,colorSchemeSelector:o}=t,{colorSchemes:s={},components:i,defaultColorScheme:a="light",...c}=e,{vars:u,css:d,varsWithDefaults:f}=rs(c,t);let p=f;const y={},{[a]:b,...h}=s;if(Object.entries(h||{}).forEach(([A,_])=>{const{vars:S,css:P,varsWithDefaults:F}=rs(_,t);p=ze(p,F),y[A]={css:P,vars:S}}),b){const{css:A,vars:_,varsWithDefaults:S}=rs(b,t);p=ze(p,S),y[a]={css:A,vars:_}}function w(A,_){var P,F;let S=o;if(o==="class"&&(S=".%s"),o==="data"&&(S="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(S=`[${o}="%s"]`),A){if(S==="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(S)return e.defaultColorScheme===A?`:root, ${S.replace("%s",String(A))}`:S.replace("%s",String(A))}return":root"}return{vars:p,generateThemeVars:()=>{let A={...u};return Object.entries(y).forEach(([,{vars:_}])=>{A=ze(A,_)}),A},generateStyleSheets:()=>{var j,z;const A=[],_=e.defaultColorScheme||"light";function S(m,O){Object.keys(O).length&&A.push(typeof m=="string"?{[m]:{...O}}:m)}S(r(void 0,{...d}),d);const{[_]:P,...F}=y;if(P){const{css:m}=P,O=(z=(j=s[_])==null?void 0:j.palette)==null?void 0:z.mode,B=!n&&O?{colorScheme:O,...m}:{...m};S(r(_,{...B}),B)}return Object.entries(F).forEach(([m,{css:O}])=>{var ee,fe;const B=(fe=(ee=s[m])==null?void 0:ee.palette)==null?void 0:fe.mode,q=!n&&B?{colorScheme:B,...O}:{...O};S(r(m,{...q}),q)}),A}}}function BC(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 Sr={black:"#000",white:"#fff"},UC={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"},Wt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Gt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},_r={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Ht={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Yt={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},qt={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function yc(){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:Sr.white,default:Sr.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 VC=yc();function bc(){return{text:{primary:Sr.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:Sr.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 vc=bc();function Tc(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=ts(e.main,o):t==="dark"&&(e.dark=es(e.main,s)))}function WC(e="light"){return e==="dark"?{main:Ht[200],light:Ht[50],dark:Ht[400]}:{main:Ht[700],light:Ht[400],dark:Ht[800]}}function GC(e="light"){return e==="dark"?{main:Wt[200],light:Wt[50],dark:Wt[400]}:{main:Wt[500],light:Wt[300],dark:Wt[700]}}function HC(e="light"){return e==="dark"?{main:Gt[500],light:Gt[300],dark:Gt[700]}:{main:Gt[700],light:Gt[400],dark:Gt[800]}}function YC(e="light"){return e==="dark"?{main:Yt[400],light:Yt[300],dark:Yt[700]}:{main:Yt[700],light:Yt[500],dark:Yt[900]}}function qC(e="light"){return e==="dark"?{main:qt[400],light:qt[300],dark:qt[700]}:{main:qt[800],light:qt[500],dark:qt[900]}}function KC(e="light"){return e==="dark"?{main:_r[400],light:_r[300],dark:_r[700]}:{main:"#ed6c02",light:_r[500],dark:_r[900]}}function ns(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...o}=e,s=e.primary||WC(t),i=e.secondary||GC(t),a=e.error||HC(t),c=e.info||YC(t),u=e.success||qC(t),d=e.warning||KC(t);function f(h){const w=hc(h,vc.text.primary)>=r?vc.text.primary:VC.text.primary;if(process.env.NODE_ENV!=="production"){const E=hc(h,w);E<3&&console.error([`MUI: The contrast ratio of ${E}:1 for ${w} 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(`
159
- `))}return w}const p=({color:h,name:w,mainShade:E=500,lightShade:M=300,darkShade:A=700})=>{if(h={...h},!h.main&&h[E]&&(h.main=h[E]),!h.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${w?` (${w})`:""} provided to augmentColor(color) is invalid.
160
- The color object needs to have a \`main\` property or a \`${E}\` property.`:ht(11,w?` (${w})`:"",E));if(typeof h.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${w?` (${w})`:""} provided to augmentColor(color) is invalid.
150
+ */function hC(e,t){const r=Xo(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 gC(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const ac=[];function lc(e){return ac[0]=e,nc(ac)}const mC=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 yC(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...o}=e,s=mC(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 d(p){return i.indexOf(p)+1<i.length?u(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?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:d,not:f,unit:r,...o}}const bC={borderRadius:4};function cc(e=8,t=qo({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 vC(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 uc(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={},...i}=e,a=yC(r),c=cc(o);let u=Be({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:c,shape:{...bC,...s}},i);return u=iw(u),u.applyStyles=vC,u=t.reduce((d,f)=>Be(d,f),u),u.unstable_sxConfig={...Tn,...i==null?void 0:i.unstable_sxConfig},u.unstable_sx=function(f){return Ut({sx:f,theme:this})},u}function fc(e){const{variants:t,...r}=e,n={variants:t,style:lc(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=lc(o.style))}),n}const TC=uc();function Qo(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function SC(e){return e?(t,r)=>r[e]:null}function _C(e,t,r){e.theme=xC(e.theme)?r:e.theme[t]||e.theme}function Sn(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>Sn(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 dc(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function dc(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 wC(e={}){const{themeId:t,defaultTheme:r=TC,rootShouldForwardProp:n=Qo,slotShouldForwardProp:o=Qo}=e;function s(a){_C(a,t,r)}return(a,c={})=>{gC(a,S=>S.filter(I=>I!==Ut));const{name:u,slot:d,skipVariantsResolver:f,skipSx:p,overridesResolver:y=SC(pc(d)),...b}=c,h=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,C=p||!1;let x=Qo;d==="Root"||d==="root"?x=n:d?x=o:AC(a)&&(x=void 0);const F=hC(a,{shouldForwardProp:x,label:EC(u,d),...b}),$=S=>{if(typeof S=="function"&&S.__emotion_real!==S)return function(j){return Sn(j,S)};if(it(S)){const I=fc(S);return I.variants?function(H){return Sn(H,I)}:I.style}return S},w=(...S)=>{const I=[],j=S.map($),H=[];if(I.push(s),u&&y&&H.push(function(L){var le,ge;const J=(ge=(le=L.theme.components)==null?void 0:le[u])==null?void 0:ge.styleOverrides;if(!J)return null;const ae={};for(const me in J)ae[me]=Sn(L,J[me]);return y(L,ae)}),u&&!h&&H.push(function(L){var ae,le;const Y=L.theme,J=(le=(ae=Y==null?void 0:Y.components)==null?void 0:ae[u])==null?void 0:le.variants;return J?dc(L,J):null}),C||H.push(Ut),Array.isArray(j[0])){const A=j.shift(),L=new Array(I.length).fill(""),Y=new Array(H.length).fill("");let J;J=[...L,...A,...Y],J.raw=[...L,...A.raw,...Y],I.unshift(J)}const U=[...I,...j,...H],m=F(...U);return a.muiName&&(m.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(m.displayName=CC(u,d,a)),m};return F.withConfig&&(w.withConfig=F.withConfig),w}}function CC(e,t,r){return e?`${e}${xt(t||"")}`:`Styled(${X_(r)})`}function EC(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${pc(t||"Root")}`),r}function xC(e){for(const t in e)return!1;return!0}function AC(e){return typeof e=="string"&&e.charCodeAt(0)>96}function pc(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Ro(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}].`),rw(e,t,r)}function OC(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 yt(e){if(e.type)return e;if(e.charAt(0)==="#")return yt(OC(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
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:gt(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.`:gt(10,o))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:o}}const $C=e=>{const t=yt(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Tr=(e,t)=>{try{return $C(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function _n(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 hc(e){e=yt(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,d=(u+r/30)%12)=>o-s*Math.max(Math.min(d-3,9-d,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])),_n({type:a,values:c})}function es(e){e=yt(e);let t=e.type==="hsl"||e.type==="hsla"?yt(hc(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 gc(e,t){const r=es(e),n=es(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function PC(e,t){return e=yt(e),t=Ro(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,_n(e)}function wn(e,t,r){try{return PC(e,t)}catch{return e}}function ts(e,t){if(e=yt(e),t=Ro(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 _n(e)}function ce(e,t,r){try{return ts(e,t)}catch{return e}}function rs(e,t){if(e=yt(e),t=Ro(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 _n(e)}function ue(e,t,r){try{return rs(e,t)}catch{return e}}function IC(e,t=.15){return es(e)>.5?ts(e,t):rs(e,t)}function Cn(e,t,r){try{return IC(e,t)}catch{return e}}const kC=Oe.createContext(void 0);process.env.NODE_ENV!=="production"&&(re.node,re.object);function MC(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?Ho(o.defaultProps,n):!o.styleOverrides&&!o.variants?Ho(o,n):n}function DC({props:e,name:t}){const r=Oe.useContext(kC);return MC({props:e,name:t,theme:{components:r}})}const mc={theme:void 0};function FC(e){let t,r;return function(o){let s=t;return(s===void 0||o.theme!==r)&&(mc.theme=o.theme,s=fc(e(mc)),t=s,r=o.theme),s}}function NC(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 yc=(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])})},LC=(e,t,r)=>{function n(o,s=[],i=[]){Object.entries(o).forEach(([a,c])=>{(!r||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)},jC=(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 ns(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},s={},i={};return LC(e,(a,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!n||!n(a,c))){const d=`--${r?`${r}-`:""}${a.join("-")}`,f=jC(a,c);Object.assign(o,{[d]:f}),yc(s,a,`var(${d})`,u),yc(i,a,`var(${d}, ${f})`,u)}},a=>a[0]==="vars"),{css:o,vars:s,varsWithDefaults:i}}function zC(e,t={}){const{getSelector:r=C,disableCssColorScheme:n,colorSchemeSelector:o}=t,{colorSchemes:s={},components:i,defaultColorScheme:a="light",...c}=e,{vars:u,css:d,varsWithDefaults:f}=ns(c,t);let p=f;const y={},{[a]:b,...h}=s;if(Object.entries(h||{}).forEach(([$,w])=>{const{vars:S,css:I,varsWithDefaults:j}=ns(w,t);p=Be(p,j),y[$]={css:I,vars:S}}),b){const{css:$,vars:w,varsWithDefaults:S}=ns(b,t);p=Be(p,S),y[a]={css:$,vars:w}}function C($,w){var I,j;let S=o;if(o==="class"&&(S=".%s"),o==="data"&&(S="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(S=`[${o}="%s"]`),$){if(S==="media")return e.defaultColorScheme===$?":root":{[`@media (prefers-color-scheme: ${((j=(I=s[$])==null?void 0:I.palette)==null?void 0:j.mode)||$})`]:{":root":w}};if(S)return e.defaultColorScheme===$?`:root, ${S.replace("%s",String($))}`:S.replace("%s",String($))}return":root"}return{vars:p,generateThemeVars:()=>{let $={...u};return Object.entries(y).forEach(([,{vars:w}])=>{$=Be($,w)}),$},generateStyleSheets:()=>{var H,U;const $=[],w=e.defaultColorScheme||"light";function S(m,A){Object.keys(A).length&&$.push(typeof m=="string"?{[m]:{...A}}:m)}S(r(void 0,{...d}),d);const{[w]:I,...j}=y;if(I){const{css:m}=I,A=(U=(H=s[w])==null?void 0:H.palette)==null?void 0:U.mode,L=!n&&A?{colorScheme:A,...m}:{...m};S(r(w,{...L}),L)}return Object.entries(j).forEach(([m,{css:A}])=>{var J,ae;const L=(ae=(J=s[m])==null?void 0:J.palette)==null?void 0:ae.mode,Y=!n&&L?{colorScheme:L,...A}:{...A};S(r(m,{...Y}),Y)}),$}}}function BC(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 Sr={black:"#000",white:"#fff"},UC={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"},Vt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Wt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},_r={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Gt={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Ht={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Yt={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function bc(){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:Sr.white,default:Sr.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 VC=bc();function vc(){return{text:{primary:Sr.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:Sr.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 Tc=vc();function Sc(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=rs(e.main,o):t==="dark"&&(e.dark=ts(e.main,s)))}function WC(e="light"){return e==="dark"?{main:Gt[200],light:Gt[50],dark:Gt[400]}:{main:Gt[700],light:Gt[400],dark:Gt[800]}}function GC(e="light"){return e==="dark"?{main:Vt[200],light:Vt[50],dark:Vt[400]}:{main:Vt[500],light:Vt[300],dark:Vt[700]}}function HC(e="light"){return e==="dark"?{main:Wt[500],light:Wt[300],dark:Wt[700]}:{main:Wt[700],light:Wt[400],dark:Wt[800]}}function YC(e="light"){return e==="dark"?{main:Ht[400],light:Ht[300],dark:Ht[700]}:{main:Ht[700],light:Ht[500],dark:Ht[900]}}function qC(e="light"){return e==="dark"?{main:Yt[400],light:Yt[300],dark:Yt[700]}:{main:Yt[800],light:Yt[500],dark:Yt[900]}}function KC(e="light"){return e==="dark"?{main:_r[400],light:_r[300],dark:_r[700]}:{main:"#ed6c02",light:_r[500],dark:_r[900]}}function os(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...o}=e,s=e.primary||WC(t),i=e.secondary||GC(t),a=e.error||HC(t),c=e.info||YC(t),u=e.success||qC(t),d=e.warning||KC(t);function f(h){const C=gc(h,Tc.text.primary)>=r?Tc.text.primary:VC.text.primary;if(process.env.NODE_ENV!=="production"){const x=gc(h,C);x<3&&console.error([`MUI: The contrast ratio of ${x}:1 for ${C} 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 C}const p=({color:h,name:C,mainShade:x=500,lightShade:F=300,darkShade:$=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${C?` (${C})`:""} provided to augmentColor(color) is invalid.
155
+ The color object needs to have a \`main\` property or a \`${x}\` property.`:gt(11,C?` (${C})`:"",x));if(typeof h.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${C?` (${C})`:""} provided to augmentColor(color) is invalid.
161
156
  \`color.main\` should be a string, but \`${JSON.stringify(h.main)}\` was provided instead.
162
157
 
163
158
  Did you intend to use one of the following approaches?
@@ -170,15 +165,15 @@ const theme1 = createTheme({ palette: {
170
165
 
171
166
  const theme2 = createTheme({ palette: {
172
167
  primary: { main: green[500] },
173
- } });`:ht(12,w?` (${w})`:"",JSON.stringify(h.main)));return Tc(h,"light",M,n),Tc(h,"dark",A,n),h.contrastText||(h.contrastText=f(h.main)),h};let y;return t==="light"?y=yc():t==="dark"&&(y=bc()),process.env.NODE_ENV!=="production"&&(y||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),ze({common:{...Sr},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:c,name:"info"}),success:p({color:u,name:"success"}),grey:UC,contrastThreshold:r,getContrastText:f,augmentColor:p,tonalOffset:n,...y},o)}function JC(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 ZC(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function XC(e){return Math.round(e*1e5)/1e5}const Sc={textTransform:"uppercase"},_c='"Roboto", "Helvetica", "Arial", sans-serif';function QC(e,t){const{fontFamily:r=_c,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:i=500,fontWeightBold:a=700,htmlFontSize:c=16,allVariants:u,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 c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=n/14,y=d||(w=>`${w/c*p}rem`),b=(w,E,M,A,_)=>({fontFamily:r,fontWeight:w,fontSize:y(E),lineHeight:M,...r===_c?{letterSpacing:`${XC(A/E)}em`}:{},..._,...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,Sc),caption:b(s,12,1.66,.4),overline:b(s,12,2.66,1,Sc),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},f,{clone:!1})}const RC=.2,eE=.14,tE=.12;function pe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${RC})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${eE})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${tE})`].join(",")}const rE=["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)],nE={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)"},oE={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function wc(e){return`${Math.round(e)}ms`}function sE(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function iE(e){const t={...nE,...e.easing},r={...oE,...e.duration};return{getAutoHeightDuration:sE,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 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(c)&&!d(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(`
174
- `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof i=="string"?i:wc(i)} ${a} ${typeof c=="string"?c:wc(c)}`).join(",")},...e,easing:t,duration:r}}const aE={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function lE(e){return st(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Cc(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];!lE(a)||i.startsWith("unstable_")?delete n[i]:st(a)&&(n[i]={...a},r(n[i]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
168
+ } });`:gt(12,C?` (${C})`:"",JSON.stringify(h.main)));return Sc(h,"light",F,n),Sc(h,"dark",$,n),h.contrastText||(h.contrastText=f(h.main)),h};let y;return t==="light"?y=bc():t==="dark"&&(y=vc()),process.env.NODE_ENV!=="production"&&(y||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Be({common:{...Sr},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:c,name:"info"}),success:p({color:u,name:"success"}),grey:UC,contrastThreshold:r,getContrastText:f,augmentColor:p,tonalOffset:n,...y},o)}function JC(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 ZC(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function XC(e){return Math.round(e*1e5)/1e5}const _c={textTransform:"uppercase"},wc='"Roboto", "Helvetica", "Arial", sans-serif';function QC(e,t){const{fontFamily:r=wc,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:i=500,fontWeightBold:a=700,htmlFontSize:c=16,allVariants:u,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 c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=n/14,y=d||(C=>`${C/c*p}rem`),b=(C,x,F,$,w)=>({fontFamily:r,fontWeight:C,fontSize:y(x),lineHeight:F,...r===wc?{letterSpacing:`${XC($/x)}em`}:{},...w,...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,_c),caption:b(s,12,1.66,.4),overline:b(s,12,2.66,1,_c),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Be({htmlFontSize:c,pxToRem:y,fontFamily:r,fontSize:n,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:i,fontWeightBold:a,...h},f,{clone:!1})}const RC=.2,eE=.14,tE=.12;function pe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${RC})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${eE})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${tE})`].join(",")}const rE=["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)],nE={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)"},oE={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Cc(e){return`${Math.round(e)}ms`}function sE(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function iE(e){const t={...nE,...e.easing},r={...oE,...e.duration};return{getAutoHeightDuration:sE,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 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(c)&&!d(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(d=>`${d} ${typeof i=="string"?i:Cc(i)} ${a} ${typeof c=="string"?c:Cc(c)}`).join(",")},...e,easing:t,duration:r}}const aE={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function lE(e){return it(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Ec(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];!lE(a)||i.startsWith("unstable_")?delete n[i]:it(a)&&(n[i]={...a},r(n[i]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
175
170
 
176
171
  const theme = ${JSON.stringify(t,null,2)};
177
172
 
178
173
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
179
174
  theme.transitions = createTransitions(theme.transitions || {});
180
175
 
181
- export default theme;`}function os(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.":ht(20));const d=ns(s),f=cc(e);let p=ze(f,{mixins:ZC(f.breakpoints,n),palette:d,shadows:rE.slice(),typography:QC(d,a),transitions:iE(i),zIndex:{...aE}});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,w)=>{let E;for(E in h){const M=h[E];if(y.includes(E)&&Object.keys(M).length>0){if(process.env.NODE_ENV!=="production"){const A=Ho("",E);console.error([`MUI: The \`${w}\` component increases the CSS specificity of the \`${E}\` 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}`]:M}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
182
- `))}h[E]={}}}};Object.keys(p.components).forEach(h=>{const w=p.components[h].styleOverrides;w&&h.startsWith("Mui")&&b(w,h)})}return p.unstable_sxConfig={...Tn,...u==null?void 0:u.unstable_sxConfig},p.unstable_sx=function(b){return Vt({sx:b,theme:this})},p.toRuntimeSource=Cc,p}function cE(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 uE=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=cE(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Ec(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function xc(e){return e==="dark"?uE:[]}function fE(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...o}=e,s=ns(t);return{palette:s,opacity:{...Ec(s.mode),...r},overlays:n||xc(s.mode),...o}}function dE(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 pE=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],hE=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 pE(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 gE(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function C(e,t,r){!e[t]&&r&&(e[t]=r)}function wr(e){return typeof e!="string"||!e.startsWith("hsl")?e:pc(e)}function at(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Tr(wr(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().
183
- 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 mE(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Re=e=>{try{return e()}catch{}},yE=(e="mui")=>NC(e);function ss(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=fE({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:s,...i}=os({...r,palette:{mode:o,...t==null?void 0:t.palette}});return e[n]={...t,palette:s,opacity:{...Ec(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||xc(o)},i}function bE(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:i=dE,colorSchemeSelector:a=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...u}=e,d=Object.keys(r)[0],f=n||(r.light&&d!=="light"?"light":d),p=yE(s),{[f]:y,light:b,dark:h,...w}=r,E={...w};let M=y;if((f==="dark"&&!("dark"in r)||f==="light"&&!("light"in r))&&(M=!0),!M)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:ht(21,f));const A=ss(E,M,u,f);b&&!E.light&&ss(E,b,void 0,"light"),h&&!E.dark&&ss(E,h,void 0,"dark");let _={defaultColorScheme:f,...A,cssVarPrefix:s,colorSchemeSelector:a,rootSelector:c,getCssVar:p,colorSchemes:E,font:{...JC(A.typography),...A.font},spacing:mE(u.spacing)};Object.keys(_.colorSchemes).forEach(z=>{const m=_.colorSchemes[z].palette,O=B=>{const q=B.split("-"),ee=q[1],fe=q[2];return p(B,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")),gE(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",Re(()=>m.getContrastText(m.error.main))),C(m.Alert,"infoFilledColor",Re(()=>m.getContrastText(m.info.main))),C(m.Alert,"successFilledColor",Re(()=>m.getContrastText(m.success.main))),C(m.Alert,"warningFilledColor",Re(()=>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 B=Cn(m.background.default,.8);C(m.SnackbarContent,"bg",B),C(m.SnackbarContent,"color",Re(()=>m.getContrastText(B))),C(m.SpeedDialAction,"fabHoverBg",Cn(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(wn(m.divider,1),.88)),C(m.Tooltip,"bg",wn(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",Re(()=>m.getContrastText(m.error.dark))),C(m.Alert,"infoFilledColor",Re(()=>m.getContrastText(m.info.dark))),C(m.Alert,"successFilledColor",Re(()=>m.getContrastText(m.success.dark))),C(m.Alert,"warningFilledColor",Re(()=>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 B=Cn(m.background.default,.98);C(m.SnackbarContent,"bg",B),C(m.SnackbarContent,"color",Re(()=>m.getContrastText(B))),C(m.SpeedDialAction,"fabHoverBg",Cn(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(wn(m.divider,1),.68)),C(m.Tooltip,"bg",wn(m.grey[700],.92))}at(m.background,"default"),at(m.background,"paper"),at(m.common,"background"),at(m.common,"onBackground"),at(m,"divider"),Object.keys(m).forEach(B=>{const q=m[B];B!=="tonalOffset"&&q&&typeof q=="object"&&(q.main&&C(m[B],"mainChannel",Tr(wr(q.main))),q.light&&C(m[B],"lightChannel",Tr(wr(q.light))),q.dark&&C(m[B],"darkChannel",Tr(wr(q.dark))),q.contrastText&&C(m[B],"contrastTextChannel",Tr(wr(q.contrastText))),B==="text"&&(at(m[B],"primary"),at(m[B],"secondary")),B==="action"&&(q.active&&at(m[B],"active"),q.selected&&at(m[B],"selected")))})}),_=t.reduce((z,m)=>ze(z,m),_);const S={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:i,getSelector:hE(_)},{vars:P,generateThemeVars:F,generateStyleSheets:j}=zC(_,S);return _.vars=P,Object.entries(_.colorSchemes[_.defaultColorScheme]).forEach(([z,m])=>{_[z]=m}),_.generateThemeVars=F,_.generateStyleSheets=j,_.generateSpacing=function(){return lc(u.spacing,Yo(this))},_.getColorSchemeSelector=BC(a),_.spacing=_.generateSpacing(),_.shouldSkipGeneratingVar=i,_.unstable_sxConfig={...Tn,...u==null?void 0:u.unstable_sxConfig},_.unstable_sx=function(m){return Vt({sx:m,theme:this})},_.toRuntimeSource=Cc,_}function Ac(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:ns({...r===!0?{}:r.palette,mode:t})})}function vE(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 os(e,...t);let d=r;"palette"in e||u[a]&&(u[a]!==!0?d=u[a].palette:a==="dark"&&(d={mode:"dark"}));const f=os({...e,palette:d},...t);return f.defaultColorScheme=a,f.colorSchemes=u,f.palette.mode==="light"&&(f.colorSchemes.light={...u.light!==!0&&u.light,palette:f.palette},Ac(f,"dark",u.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:f.palette},Ac(f,"light",u.light)),f}return!r&&!("light"in u)&&a==="light"&&(u.light=!0),bE({...i,colorSchemes:u,defaultColorScheme:a,...typeof n!="boolean"&&n},...t)}const TE=vE(),SE="$$material";function _E(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const wE=wC({themeId:SE,defaultTheme:TE,rootShouldForwardProp:e=>_E(e)&&e!=="classes"}),CE=FC;process.env.NODE_ENV!=="production"&&(re.node,re.object.isRequired);function EE(e){return DC(e)}function xE(e){return Ho("MuiSvgIcon",e)}tw("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const AE=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${xt(t)}`,`fontSize${xt(r)}`]};return Q_(o,xE,n)},OE=wE("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${xt(r.color)}`],t[`fontSize${xt(r.fontSize)}`]]}})(CE(({theme:e})=>{var t,r,n,o,s,i,a,c,u,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:((c=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((d=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:d.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,h])=>h&&h.main).map(([h])=>{var w,E;return{props:{color:h},style:{color:(E=(w=(e.vars??e).palette)==null?void 0:w[h])==null?void 0:E.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}}]}})),En=$e.forwardRef(function(t,r){const n=EE({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:a="svg",fontSize:c="medium",htmlColor:u,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:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:b},w={};d||(w.viewBox=p);const E=AE(h);return l.jsxs(OE,{as:a,className:At(E.root,s),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r,...w,...y,...b&&o.props,ownerState:h,children:[b?o.props.children:o,f?l.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(En.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}),En.muiName="SvgIcon";function is(e,t){function r(n,o){return l.jsx(En,{"data-testid":`${t}Icon`,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=En.muiName,$e.memo($e.forwardRef(r))}const $E=is(l.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),PE=is(l.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward"),IE=is(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"),Kt=({children:e,...t})=>l.jsx(g.Table.Td,{...t,children:e}),kE=({errorMessages:e,id:t})=>l.jsx(g.Tooltip,{id:t,title:e,children:l.jsx(g.Indicator,{label:e.split(`
184
- `).length,children:l.jsx(Qf,{})})}),ME={paddingLeft:0,paddingRight:0},DE=v.memo(function({numColumns:t,errors:r,label:n,description:o,path:s,addItem:i,schema:a,enabled:c,translations:u,rootSchema:d}){const f={bg:"transparent",size:"sm",c:"gray"},p=g.useProps("ActionIcon",f,{});return l.jsxs(g.Table.Tr,{children:[l.jsx(Kt,{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(kE,{id:"tooltip-validation",errorMessages:r})}):null})]}),o&&l.jsx(g.Text,{size:"sm",children:o})]})}),c?l.jsx(Kt,{align:"right",style:ME,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,H.createDefaultValue(a,d)),children:l.jsx(Br,{})})})}):null]})}),Oc={fixedCell:{width:"150px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"},fixedCellSmall:{width:"50px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"}},$c=(e,t,r,n,o)=>{if(t.type==="object")return Pc(t).map(s=>{var c,u;const i=H.Paths.compose(r,s),a={propName:s,schema:t,title:((u=(c=t.properties)==null?void 0:c[s])==null?void 0:u.title)??__(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)}},Pc=e=>e.type==="object"&&typeof e.properties=="object"?Object.keys(e.properties).filter(t=>e.properties[t].type!=="array"):[""],FE=({numColumns:e,translations:t})=>l.jsx(g.Table.Tr,{children:l.jsx(Kt,{colSpan:e,children:l.jsx(g.Text,{align:"center",children:t.noDataMessage})})}),NE=v.memo(function({title:t}){return l.jsx(g.Table.Th,{children:t})}),LE=(e,t)=>{const r=t.rowPath+(t.schema.type==="object"?"."+t.propName:""),n=H.formatErrorMessage(fT(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}},Ic=e=>({type:"Control",scope:e,label:!1}),jE=v.memo(function({path:t,propName:r,schema:n,rootSchema:o,errors:s,enabled:i,renderers:a,cells:c,isValid:u}){return l.jsxs(Kt,{children:[n.properties?l.jsx(ue.DispatchCell,{schema:H.Resolve.schema(n,`#/properties/${H.encode(r)}`,o),uischema:Ic(`#/properties/${H.encode(r)}`),path:t,enabled:i,renderers:a,cells:c}):l.jsx(ue.DispatchCell,{schema:n,uischema:Ic("#"),path:t,enabled:i,renderers:a,cells:c}),l.jsx(g.Text,{size:"xs",children:u?"":s})]})}),zE=e=>{const t=ue.useJsonForms(),r=LE(t,e),n=oa(r.errors);return l.jsx(jE,{...r,isValid:n})},BE=({childPath:e,schema:t,rowIndex:r,openDeleteDialog:n,moveUpCreator:o,moveDownCreator:s,enableUp:i,enableDown:a,showSortButtons:c,enabled:u,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]),w=v.useMemo(()=>s(f,r),[s,f,r]);return l.jsxs(g.Table.Tr,{children:[$c(zE,t,e,u,d),u?l.jsx(Kt,{style:c?Oc.fixedCell:Oc.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(PE,{})})})}),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:w,disabled:!a,children:l.jsx($E,{})})})})]}):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(IE,{})})})})]})}):null]},e)},kc=v.memo(BE),UE=({data:e,path:t,schema:r,openDeleteDialog:n,moveUp:o,moveDown:s,uischema:i,config:a,enabled:c,cells:u,translations:d})=>{if(e===0)return l.jsx(FE,{numColumns:Pc(r).length+1,translations:d});const p=Na({},a,i.options);return l.jsx(v.Fragment,{children:z_(e).map(y=>{const b=H.Paths.compose(t,`${y}`);return l.jsx(kc,{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:d},b)})})};class Mc extends v.Component{constructor(){super(...arguments);Ou(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:d,enabled:f,cells:p,translations:y}=this.props,b=a,h=s.type==="object",w=h?$c(NE,s,o,f,p):void 0;return d?l.jsxs(g.Table,{children:[l.jsxs(g.Table.Thead,{children:[l.jsx(DE,{errors:c,label:r,description:n,addItem:this.addItem,numColumns:h?w.length:1,path:o,uischema:b,schema:s,rootSchema:i,enabled:f,translations:y}),h&&l.jsxs(g.Table.Tr,{children:[w,f?l.jsx(g.Table.Th,{}):null]})]}),l.jsx(g.Table.Tbody,{children:l.jsx(UE,{openDeleteDialog:u,translations:y,...this.props})})]}):null}}const Dc=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})]})]})}),VE=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]),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 c?l.jsxs(l.Fragment,{children:[l.jsx(Mc,{...e,openDeleteDialog:u}),l.jsx(Dc,{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},Fc=H.rankWith(3,H.or(H.isObjectArrayControl,H.isPrimitiveArrayControl)),Nc=ue.withJsonFormsArrayLayoutProps(VE),WE=({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)}}),GE=e=>e.oneOf!==void 0&&e.oneOf.length>0&&e.oneOf.every(t=>t.const!==void 0),HE=e=>e.type==="string"&&e.enum!==void 0,Lc=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 GE(r)||HE(r)})))),jc=ue.withJsonFormsMultiEnumProps(WE),YE=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(d=>{typeof u[d]=="function"&&(u[d]=u[d](n))}),l.jsx(ut.DateInput,{valueFormat:"DD.MM.YYYY",disabled:!c,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))}},...u})},zc=H.rankWith(5,H.isDateControl),Bc=ue.withJsonFormsControlProps(YE),qE=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(d=>{typeof u[d]=="function"&&(u[d]=u[d](n))}),l.jsx(ut.DateTimePicker,{valueFormat:"DD.MM.YYYY HH:mm",disabled:!c,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())}},...u})},Uc=H.rankWith(5,H.isDateTimeControl),Vc=ue.withJsonFormsControlProps(qE),KE=e=>l.jsx(Rr,{...e}),Wc=H.rankWith(3,H.isNumberControl),Gc=ue.withJsonFormsControlProps(KE),JE=e=>l.jsx(Rr,{...e}),Hc=H.rankWith(3,H.isIntegerControl),Yc=ue.withJsonFormsControlProps(JE),ZE=e=>l.jsx(La,{...e}),qc=H.rankWith(3,H.isStringControl),Kc=ue.withJsonFormsControlProps(ZE),XE=e=>l.jsx(ja,{...e}),Jc=H.rankWith(3,H.isBooleanControl),Zc=ue.withJsonFormsControlProps(XE),QE=({data:e,options:t,handleChange:r,path:n,...o})=>{const{description:s,errors:i,label:a,required:c,enabled:u}=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:!u,data:t,value:e||null,label:a,description:s,required:c,error:i,searchable:!0,onChange:f=>{r(n,f)},...d})},Xc=H.rankWith(5,H.isEnumControl),Qc=ue.withJsonFormsEnumProps(ue.withTranslateProps(v.memo(QE)),!1),RE=e=>{const{text:t,visible:r}=e;return r?l.jsx(g.Title,{fw:"bold",size:"xl",children:t}):null},ex=H.rankWith(3,H.isLabelable),tx=ue.withJsonFormsLabelProps(RE),Rc=H.rankWith(5,H.uiTypeIs("HorizontalLayout")),rx=({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(Ao,{...a,renderers:t,cells:r})},eu=ue.withJsonFormsLayoutProps(rx),tu=H.rankWith(5,H.uiTypeIs("VerticalLayout")),nx=({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(Ao,{...a,renderers:o,cells:s})},ru=ue.withJsonFormsLayoutProps(nx),ox=[{tester:zc,renderer:Bc},{tester:Uc,renderer:Vc},{tester:Wc,renderer:Gc},{tester:Hc,renderer:Yc},{tester:qc,renderer:Kc},{tester:Jc,renderer:Zc},{tester:Xc,renderer:Qc},{tester:Fc,renderer:Nc},{tester:Lc,renderer:jc},{tester:Rc,renderer:eu},{tester:tu,renderer:ru},{tester:ex,renderer:tx}],sx=[{tester:Wa,cell:Ga},{tester:za,cell:Ba},{tester:Ua,cell:Va},{tester:Ha,cell:Ya},{tester:qa,cell:Ka},{tester:Ja,cell:Za},{tester:Xa,cell:Qa}];function ix(e,t){const r=te(),n=bt(),o=v.useCallback(({row:s,...i})=>l.jsx(Xe,{fallback:l.jsx(so,{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 ax(e,t){return{enableRowSelection:!!e||!!t}}function lx(e){return e&&typeof e=="object"&&!Array.isArray(e)}const xn=(...e)=>{const t={};return e.forEach(r=>{r&&Object.keys(r).forEach(n=>{lx(r[n])&&n!=="ref"&&t[n]?t[n]=xn(t[n],r[n]):t[n]=r[n]})}),t},Jt=(e={},...t)=>t.reduce((r,n)=>xn(r,e[n]),{}),cx=(e,t)=>e===void 0?t:e,Ke=(e,t=[])=>typeof e=="function"?e(...t):e;function ux({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=>kt(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 fx({col:e,colFilter:t,filterNameMap:r}){const{queryParams:n,setQueryParams:o}=te(),s=sr.useForm({initialValues:{filters:(n==null?void 0:n.filters)||[]}}),[i]=Te.useDebouncedValue(s.getValues(),wt);Te.useDidUpdate(()=>{const u=i.filters.filter(d=>d.value);o({filters:u})},[i]);const a=s.getValues().filters,c=a.map((u,d)=>u.col===e&&kt(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",d),size:"md",title:"Remove filter",variant:"outline"})})}),l.jsx(g.Grid.Col,{span:10.5,py:0,children:u.opr==="in"?l.jsx(Di,{form:s,name:`filters.${d}.value`,label:r[u.opr],comboboxProps:{withinPortal:!1}}):l.jsx(Vr,{form:s,name:`filters.${d}.value`,label:r[u.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"})})]},`${u.col}-${d}`):null).filter(Boolean);return l.jsxs(g.Grid,{w:c.length?"25rem":"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(ux,{col:e,colFilter:t||{filters:[]},onClick:u=>s.insertListItem("filters",u),withinPortal:!1})})})]})}function dx({filterNameMap:e,col:t,opr:r,table:n}){return Object.entries(e).filter(([o])=>o.startsWith(It)).map(([o,s])=>{const a=o===r?l.jsx(g.ThemeIcon,{variant:"transparent",size:"sm",children:l.jsx(Xf,{})}):l.jsx(g.ThemeIcon,{variant:"transparent",size:"sm"});return l.jsx(g.Menu.Item,{fw:"normal",leftSection:a,onClick:()=>n.setColumnFilterFns(c=>({...c,[t]:o})),children:s},o)})}function px({configurationMode:e,mode:t,setMode:r,col:n,colFilter:o,opr:s,table:i,filterNameMap:a}){return l.jsxs(l.Fragment,{children:[e!=="basic"&&l.jsxs(l.Fragment,{children:[l.jsx(g.Menu.Item,{component:"div",p:0,children:l.jsx(g.SegmentedControl,{fullWidth:!0,size:"sm",data:["Basic","Advanced"],value:t,onChange:r})}),l.jsx(g.Menu.Divider,{})]}),t==="Basic"&&l.jsx(dx,{filterNameMap:a,col:n,opr:s,table:i}),t==="Advanced"&&l.jsx(fx,{col:n,colFilter:o,filterNameMap:a})]})}const Zt=e=>e!=null&&e!=="",nu=v.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...r},n)=>{const{value:o,onChange:s,leftInputProps:i,rightInputProps:a,groupProps:c,cleariconprops:u,...d}=r,[f,p]=v.useState([null,null]);v.useEffect(()=>{o||p([null,null])},[o]),v.useEffect(()=>{const _=JSON.stringify(f);let S=null;return f.every(Zt)&&_!==o?S=setTimeout(()=>{s(JSON.stringify(f))},wt):f.every(P=>!Zt(P))&&(S=setTimeout(()=>{s(void 0)},wt)),()=>clearTimeout(S)},[f]);const y=v.useCallback((_,S)=>{p(P=>{const F=[...P];return F[S]=_,F})},[]);let[b,h]=f;const w=Zt(h)&&!Zt(b),E=Zt(b)&&!Zt(h),M=typeof b=="number"?l.jsx(g.ActionIcon,{...u,onClick:()=>p(_=>[null,_[1]]),children:l.jsx(ro,{})}):null,A=typeof h=="number"?l.jsx(g.ActionIcon,{...u,onClick:()=>p(_=>[_[0],null]),children:l.jsx(ro,{})}):null;return l.jsxs(g.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...c,children:[l.jsx(g.NumberInput,{styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:M,...d,...t,value:b||"",onChange:_=>y(_,0),placeholder:w?"Start value is required":"Start value",error:w&&" ",ref:n,...i}),l.jsx(g.NumberInput,{styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:A,...d,...t,value:h||"",onChange:_=>y(_,1),placeholder:E?"End value is required":"End value",error:E&&" ",...a})]})});nu.displayName="BasicHeaderBetweenInput";const Xt=e=>e,ou=v.forwardRef(({clearIcon:e,mrtprops:{dateinputprops:t},...r},n)=>{const{value:o,onChange:s,leftInputProps:i,rightInputProps:a,groupProps:c,...u}=r,[d,f]=v.useState([null,null]);v.useEffect(()=>{o||f([null,null])},[o]),v.useEffect(()=>{const E=JSON.stringify(d);let M=null;return d.every(Xt)&&E!==o?M=setTimeout(()=>{s(JSON.stringify(d))},wt):d.every(A=>!Xt(A))&&(M=setTimeout(()=>{s(void 0)},wt)),()=>clearTimeout(M)},[d]);const p=v.useCallback((E,M)=>{E&&(E=E.toISOString()),f(A=>{const _=[...A];return _[M]=E,_})},[]);let[y,b]=d;y=y?new Date(y):null,b=b?new Date(b):null;const h=Xt(b)&&!Xt(y),w=Xt(y)&&!Xt(b);return l.jsxs(g.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...c,children:[l.jsx(ut.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...u,...t,value:y,onChange:E=>p(E,0),placeholder:h?"Start date is required":"Start date",error:h&&" ",ref:n,...i}),l.jsx(ut.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...u,...t,value:b,onChange:E=>p(E,1),placeholder:w?"End date is required":"End date",error:w&&" ",...a})]})});ou.displayName="BasicHeaderDateBetweenInput";const su=v.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...r},n)=>l.jsx(g.TextInput,{ref:n,rightSection:e,...t,...r,value:r.value||""}));su.displayName="BasicHeaderTextInput";const iu=v.forwardRef(({component:e,...t},r)=>{const n=te(),o=bt(),s=v.useMemo(()=>[{api:n,auth:o,componentProps:{...t,ref:r}}],[n,o,t,r]);return l.jsx(Xe,{ref:r,fallback:l.jsx(su,{...t}),functionProps:s,children:e})});iu.displayName="HeaderInput";const Qt={root:"_root_yn5fy_1","date-filter":"_date-filter_yn5fy_5"},as={[ki]:({componentProps:e})=>l.jsx(nu,{...e}),[Mi]:({componentProps:e})=>l.jsx(ou,{...e})},au=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})}));au.displayName="FilterIconWrapper";const lu=v.forwardRef(({indicator:e,children:t,...r},n)=>e?l.jsx(g.Indicator,{zIndex:20,size:16,label:e,...r,children:v.cloneElement(t,{ref:n})}):v.cloneElement(t,{ref:n}));lu.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 Ii;switch(r){case"Date":case"DateTime":return Mi;case"Integer":case"Float":return ki;default:return Ii}};function gx({headerConfig:e,column:t,table:r,...n}){var J,U,Z;const{info:o,data:s,queryParams:i,setQueryParams:a}=te(),c=te(),u=bt(),{enableFilterModes:d,filterComponent:f,filterProps:p,filterModeDescription:y,filterMenu:b,defaultOpr:h=hx(o,t.id),configurationMode:w="basic",filterAdvancedFilters:E}=e;v.useEffect(()=>{process.env.NODE_ENV==="development"&&E!==void 0&&console.warn("filterAdvancedFilters is deprecated, please use filterMenu instead")},[]);const[M,A]=v.useState("Basic"),[_,{toggle:S}]=Te.useDisclosure(),P=((J=r.getState().columnFilterFns)==null?void 0:J[t.id])||h,F=v.useMemo(()=>P,[P]),j=sr.useField({initialValue:""}),z=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=z==null?void 0:z.filters)==null?void 0:N.reduce((X,L)=>({...X,[L.operator]:L.name}),{}))||{}},[z==null?void 0:z.filters]),O=v.useMemo(()=>(i==null?void 0:i.filters.filter(N=>N.col===t.id&&kt(N.opr)).map(N=>({...N})))||[],[i,t.id]),B=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]=Te.useDebouncedValue(j.getInputProps().value,wt),ee=Te.useMounted(),fe=v.useCallback(()=>{j.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():j.getInputProps().onChange(N||"")},[t.getFilterValue()]),v.useEffect(()=>{ee&&(B||fe())},[B]),Te.useDidUpdate(()=>{j.reset()},[F]),Te.useDidUpdate(()=>{let N=!1;const X=i==null?void 0:i.filters.map(he=>{if(he.opr.startsWith(It)&&he.col===t.id){if(he.opr===F)N=!0;else return null;return q?{...he,value:q}:null}return he}).filter(Boolean);!N&&q&&X.push({col:t.id,opr:F,value:q});const L=JSON.stringify(X),Q=JSON.stringify(i.filters);L!==Q&&a({filters:X})},[q]);const se=v.useMemo(()=>{var L;const N={variant:"subtle"};return!((L=z==null?void 0:z.filters)!=null&&L.length)&&(N.disabled=!0,N.c="gray"),N},[z==null?void 0:z.filters]),be=v.useMemo(()=>cx(w==="basic"?f:f==null?void 0:f[F],as==null?void 0:as[F]),[w,f,F]),we=v.useMemo(()=>({...se,size:"sm",onClick:fe,title:"Clear filter"}),[se,fe]),G=v.useMemo(()=>[{api:c,auth:u,mrtProps:{column:t,table:r,...n}}],[c,u,t,n,r]),x=v.useMemo(()=>{var N;return[{...G[0],componentProps:{label:"Filter Menu",disabled:!((N=z==null?void 0:z.filters)!=null&&N.length),indicator:O.length,aiProps:se,onClick:S}}]},[se,(U=z==null?void 0:z.filters)==null?void 0:U.length,O.length,G,S]),$=v.useMemo(()=>[{...G[0],componentProps:{filterMode:m==null?void 0:m[F]}}],[m,G,F]),K=Ke(w==="basic"?p:Jt(p,F),G),W=v.useMemo(()=>{var N,X;return{w:"100%",variant:"unstyled",disabled:!m[F],placeholder:`Filter by ${((N=s==null?void 0:s.label_columns)==null?void 0:N[t.id])||t.id}`,"aria-label":`Filter by ${((X=s==null?void 0:s.label_columns)==null?void 0:X[t.id])||t.id}`,style:{fontWeight:"normal"},mrtprops:{column:t,table:r,...n,textinputprops:{className:At("mrt-filter-text-input",Qt.root),...Ke(r.mantineFilterTextInputProps,[{column:t,table:r,...n}]),...Ke(t.columnDef.mantineFilterTextInputProps,[{column:t,table:r,...n}])},selectprops:{className:At("mrt-filter-text-input",Qt.root),...Ke(r.mantineFilterSelectProps,[{column:t,table:r,...n}]),...Ke(t.columnDef.mantineFilterSelectProps,[{column:t,table:r,...n}])},multiselectprops:{className:At("mrt-filter-text-input",Qt.root),...Ke(r.mantineFilterMultiSelectProps||{clearable:!0},[{column:t,table:r,...n}]),...Ke(t.columnDef.mantineFilterMultiSelectProps,[{column:t,table:r,...n}])},dateinputprops:{className:At("mrt-filter-text-input",Qt.root,Qt["date-filter"]),...Ke(r.mantineFilterDateInputProps,[{column:t,table:r,...n}]),...Ke(t.columnDef.mantineFilterDateInputProps,[{column:t,table:r,...n}])},autocompleteprops:{className:At("mrt-filter-text-input",Qt.root),...Ke(r.mantineFilterAutocompleteProps,[{column:t,table:r,...n}]),...Ke(t.columnDef.mantineFilterAutocompleteProps,[{column:t,table:r,...n}])}},ref:L=>{L&&(r.refs.filterInputRefs.current[`${t.id}-0`]=L)},clearIcon:j.isDirty()&&l.jsx(g.ActionIcon,{...we,children:l.jsx(ro,{})}),...K,cleariconprops:we}},[we,t,K,s==null?void 0:s.label_columns,j,m,F,n,r]);return l.jsxs(g.Menu,{opened:_,closeOnClickOutside:!0,onChange:S,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(iu,{component:be,field:j,...j.getInputProps(),...W}),d&&l.jsx(g.Menu.Target,{children:l.jsx(Xe,{fallback:l.jsx(au,{label:"Filter Menu",disabled:!((Z=z==null?void 0:z.filters)!=null&&Z.length),position:"bottom-start",withArrow:!0,arrowPosition:"side",children:l.jsx(lu,{indicator:O.length,disabled:w==="basic",children:l.jsx(g.ActionIcon,{...se,onClick:S,children:l.jsx(ed,{})})})}),functionProps:x,children:b===void 0?E:b})})]}),d&&l.jsx(Xe,{fallback:l.jsxs(g.Input.Description,{size:"xs",children:["Filter Mode: ",m==null?void 0:m[F]]}),functionProps:$,children:y})]}),l.jsx(g.Menu.Dropdown,{children:l.jsx(px,{configurationMode:w,mode:M,setMode:A,col:t.id,colFilter:z,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=bt();return{columns:v.useMemo(()=>(o==null?void 0:o.list_columns.map(u=>{var d;return{accessorKey:u,header:(d=o==null?void 0:o.label_columns)==null?void 0:d[u],Header:f=>{var p,y;return l.jsx(Xe,{fallback:(p=o==null?void 0:o.label_columns)==null?void 0:p[u],functionProps:[{api:i,auth:a,mrtProps:f}],children:(y=Jt(t,s.all,u))==null?void 0:y.component})},Filter:f=>l.jsx(gx,{headerConfig:Jt(t,s.all,u),...f}),enableSorting:(o==null?void 0:o.order_columns.includes(u))||(o==null?void 0:o.order_columns.includes(`${u}.id`)),Cell:({cell:f,table:p,column:y,...b})=>{const h=p.getState().globalFilter,w=y.getFilterValue()||"",{component:E,separator:M,truncate:A}=Jt(r,s.all,u);let _=[];h&&_.push(...h.split(n).map(j=>j.trim())),w&&typeof w=="string"&&_.push(...w.split(n).map(j=>j.trim()));let S=Zs(f.getValue());typeof S=="number"?S=S.toLocaleString():S==null&&(S=""),M&&(S=S.split(M));let P={};A&&(Array.isArray(S)?P=S.map(j=>({original:j,truncated:j.length>A?`${j.slice(0,A)}...`:null})):P={original:S,truncated:S.length>A?`${S.slice(0,A)}...`:null});const F=[{api:i,auth:a,data:f.row.original,highlight:_,componentProps:{value:S},mrtProps:{cell:f,table:p,column:y,...b}}];return l.jsx(Xe,{fallback:l.jsx(mx,{highlight:_,truncate:P,children:S}),functionProps:F,children:E})},...Jt(e,s.all,u)}}))||[],[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]=Te.useDebouncedValue(n,wt),i=v.useMemo(()=>{var u,d;return((d=(u=e==null?void 0:e.filters)==null?void 0:u.find(f=>f.opr===pr))==null?void 0:d.value)||""},[e==null?void 0:e.filters]),a=v.useMemo(()=>{var u;return(u=Object.entries((r==null?void 0:r.filters)||{}).find(([,d])=>d.filters.find(f=>f.operator===pr)))==null?void 0:u[0]},[r==null?void 0:r.filters]);Te.useDidUpdate(()=>{i!==(s||"")&&o(i)},[i]),Te.useDidUpdate(()=>{var y;const u=((y=e==null?void 0:e.filters)==null?void 0:y.filter(b=>b.opr!==pr))||[],d={col:a,opr:pr,value:s};s&&u.push(d);const f=JSON.stringify(u),p=JSON.stringify((e==null?void 0:e.filters)||[]);f!==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 Sx(e){const{data:t,queryParams:r,setQueryParams:n}=te(),o=v.useMemo(()=>({pageIndex:(r==null?void 0:r.page)||Hd,pageSize:(r==null?void 0:r.page_size)||Yd}),[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}=Te.useElementSize(),{ref:n,height:o}=Te.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 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(Br,{})})}),l.jsx(io,{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(Rs,{})})})}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(od,{})})})}const ls={toggleGlobalFilter:1,filter:2,download:3,add:4,refresh:5,showHideColumns:6,toggleDensePadding:7,toggleFullScreen:8};function Ax(e,t){return{1:l.jsx(yt.MRT_ToggleGlobalFilterButton,{table:e},"basic-1"),2:l.jsx(yt.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(yt.MRT_ShowHideColumnsButton,{table:e},"basic-6"),7:l.jsx(yt.MRT_ToggleDensePaddingButton,{table:e},"basic-7"),8:l.jsx(yt.MRT_ToggleFullScreenButton,{table:e},"basic-8")}}function Ox(e={},t,r){const{info:n,queryParams:o,setQueryParams:s}=te(),i=te(),a=bt(),{customizer:c,custom:u}=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}}],w={3:n==null?void 0:n.permissions.includes("can_download"),4:n==null?void 0:n.permissions.includes("can_post")},E=Ax(b,w);Object.entries(c||{}).forEach(([A,_])=>{A in ls&&(E[ls[A]]=l.jsx(Xe,{fallback:E[ls[A]],functionProps:h,children:_},`custom-${A}`))});let M=Object.values(E);return Object.entries(u||{}).forEach(([A,_])=>{A=Number(A)-1;const S=l.jsx(Xe,{functionProps:h,children:_},`order-${A}`);A>M.length?M.push(S):M=[...M.slice(0,A),S,...M.slice(A)]}),l.jsx(g.Flex,{gap:"0.125rem",align:"center",children:M})},[i,a,u,c,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:(c==null?void 0:c.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},cu=v.forwardRef((e,t)=>{var X;const{data:r,setQueryParams:n,specialKey:o}=te(),s=g.useProps("NextGenDataGrid",{},{}),{fetchOnMount:i=!0,hideToolbar:a,hideActions:c,hidePagination:u,hideError:d,onSelectCheckbox:f,onClickEntry:p,bulkActions:y,table:b,quickFilters:h,withBorder:w,columnProps:E,header:M,body:A,toolbar:_={},textFilterSeparator:S=";",bodySeparator:P,bodyTruncate:F,headerCustomizer:j,bodyCustomizer:z,toolbarCustomizer:m,hideAdd:O,hideDownload:B,hideFilter:q,...ee}=v.useMemo(()=>xn(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}),j&&Object.keys(j).forEach(L=>{M[L]=M[L]||{},M[L].component=j[L].component||j[L]}),z&&Object.keys(z).forEach(L=>{A[L]=A[L]||{},A[L].component=z[L].component||z[L]}),m&&(_.custom=_.custom||m),O&&(_.customizer=_.customizer||{},_.customizer.add=_.customizer.add||null),B&&(_.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"),j&&console.warn("headerCustomizer is deprecated, please use header.[col].component instead"),z&&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"),B&&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(),be=Sx(u),we=yx(E,M,A,S),G=_x(w),x=ix(c,(X=Jt(A,o.actions))==null?void 0:X.component),$=Tx(),K=$x(),W=Ox(_,h,a),J=vx(p),U=ax(f,y),Z=v.useMemo(()=>xn(Px,{mantinePaperProps:{ref:t}},we,fe,se,be,G,x,$,K,W,J,U,b),[t,we,fe,se,be,G,x,$,K,W,J,U,b]),N=yt.useMantineReactTable(Z);return v.useEffect(()=>{!r&&i&&n({})},[r]),v.useEffect(()=>{const L=Object.keys(N.getState().rowSelection),Q=r==null?void 0:r.ids.filter((he,D)=>L.includes(D.toString()));f==null||f(Q),y==null||y.setSelectedIds(Q)},[y,r==null?void 0:r.ids,N.getState().rowSelection,f]),l.jsxs(l.Fragment,{children:[l.jsx(yt.MantineReactTable,{table:N,...ee}),d?null:l.jsx(ni,{})]})});cu.displayName="NextGenDataGrid";const cs={iconSmall:"_iconSmall_sxv3z_1",btn:"_btn_sxv3z_17"};function Ix({basePath:e="/security",Target:t,children:r}){const n=ys.useNavigate(),{user:o,signout:s}=bt(),[i,a]=v.useState(!1),u=[{resource_name:e+"/users",label:"Users",name:"UsersApi",Icon:sd},{resource_name:e+"/roles",label:"Roles",name:"RolesApi",Icon:td},{resource_name:e+"/permissions",label:"Base Permissions",name:"PermissionsApi",Icon:ti},{resource_name:e+"/permissionviews",label:"Permission on Views",name:"PermissionViewApi",Icon:ti},{resource_name:e+"/viewsmenus",label:"Views/Menus",name:"ViewsMenusApi",Icon:Zf}].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:cs.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(to,{size:12})]})})}),l.jsxs(g.Menu.Dropdown,{children:[u.length?l.jsxs(l.Fragment,{children:[l.jsx(g.Menu.Label,{children:"Security"}),u.map((d,f)=>l.jsx(g.Menu.Item,{p:12,leftSection:l.jsx(d.Icon,{className:cs.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(rd,{p:12,className:cs.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,c]=v.useState(r),[u,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,c(!0),fetch(e,{signal:f.current.signal,...o}).then(async b=>{const h=await b.json();if(!b.ok){const w=typeof h.detail=="string"?h.detail:JSON.stringify(h.detail,null,2);throw new Error(w)}return i(h),c(!1),h}).catch(b=>(b&&b.name!=="AbortError"&&(d(b),c(!1)),b))},[e]),y=v.useCallback(()=>{var b;f.current&&((b=f.current)==null||b.abort(""),c(!1))},[]);return v.useEffect(()=>(t&&p(),()=>{f.current&&f.current.abort("")}),[p,t]),{data:s,loading:a,error:u,refetch:p,abort:y}}I.Actions=so,I.Add=fi,I.AddDialog=io,I.ApiProvider=Xs,I.DataGrid=mo,I.Delete=oi,I.DeleteDialog=Dc,I.Edit=ui,I.EditDialog=ci,I.Filter=Ni,I.FilterMenu=Fi,I.InfiniteScroll=Zd,I.MantineArrayControlRenderer=Nc,I.MantineBooleanCell=Ya,I.MantineBooleanControl=Zc,I.MantineDateCell=Ka,I.MantineDateControl=Bc,I.MantineDateTimeCell=Za,I.MantineDateTimeControl=Vc,I.MantineEnumArrayRenderer=jc,I.MantineEnumCell=Qa,I.MantineEnumControl=Qc,I.MantineHorizontalLayoutRenderer=eu,I.MantineIntegerCell=Va,I.MantineIntegerControl=Yc,I.MantineLayoutRenderer=Ao,I.MantineNumberCell=Ba,I.MantineNumberControl=Gc,I.MantineTableControl=Mc,I.MantineTextCell=Ga,I.MantineTextControl=Kc,I.MantineVerticalLayoutRenderer=ru,I.NextGenDataGrid=cu,I.NoBorderTableCell=Kt,I.NonEmptyRow=kc,I.Provider=Gu,I.UserMenu=Ix,I.mantineArrayControlTester=Fc,I.mantineBooleanCellTester=Ha,I.mantineBooleanControlTester=Jc,I.mantineCells=sx,I.mantineDateCellTester=qa,I.mantineDateControlTester=zc,I.mantineDateTimeCellTester=Ja,I.mantineDateTimeControlTester=Uc,I.mantineEnumArrayRendererTester=Lc,I.mantineEnumCellTester=Xa,I.mantineEnumControlTester=Xc,I.mantineHorizontalLayoutTester=Rc,I.mantineIntegerCellTester=Ua,I.mantineIntegerControlTester=Hc,I.mantineNumberCellTester=za,I.mantineNumberControlTester=Wc,I.mantineRenderers=ox,I.mantineTextCellTester=Wa,I.mantineTextControlTester=qc,I.mantineVerticalLayoutTester=tu,I.renderLayoutElements=sa,I.useApi=te,I.useAuth=bt,I.useBulkActions=Hu,I.useCustomFetch=kx,I.useDebouncedChange=fa,I.useInfo=_s,I.useProxy=ir,I.withAjvProps=qg,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});
176
+ export default theme;`}function ss(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.":gt(20));const d=os(s),f=uc(e);let p=Be(f,{mixins:ZC(f.breakpoints,n),palette:d,shadows:rE.slice(),typography:QC(d,a),transitions:iE(i),zIndex:{...aE}});if(p=Be(p,u),p=t.reduce((y,b)=>Be(y,b),p),process.env.NODE_ENV!=="production"){const y=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],b=(h,C)=>{let x;for(x in h){const F=h[x];if(y.includes(x)&&Object.keys(F).length>0){if(process.env.NODE_ENV!=="production"){const $=Yo("",x);console.error([`MUI: The \`${C}\` 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 '&.${$}' syntax:`,JSON.stringify({root:{[`&.${$}`]:F}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
177
+ `))}h[x]={}}}};Object.keys(p.components).forEach(h=>{const C=p.components[h].styleOverrides;C&&h.startsWith("Mui")&&b(C,h)})}return p.unstable_sxConfig={...Tn,...u==null?void 0:u.unstable_sxConfig},p.unstable_sx=function(b){return Ut({sx:b,theme:this})},p.toRuntimeSource=Ec,p}function cE(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 uE=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=cE(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function xc(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Ac(e){return e==="dark"?uE:[]}function fE(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...o}=e,s=os(t);return{palette:s,opacity:{...xc(s.mode),...r},overlays:n||Ac(s.mode),...o}}function dE(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 pE=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],hE=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 pE(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 gE(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function E(e,t,r){!e[t]&&r&&(e[t]=r)}function wr(e){return typeof e!="string"||!e.startsWith("hsl")?e:hc(e)}function lt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Tr(wr(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 mE(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{}},yE=(e="mui")=>NC(e);function is(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=fE({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:s,...i}=ss({...r,palette:{mode:o,...t==null?void 0:t.palette}});return e[n]={...t,palette:s,opacity:{...xc(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Ac(o)},i}function bE(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:i=dE,colorSchemeSelector:a=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...u}=e,d=Object.keys(r)[0],f=n||(r.light&&d!=="light"?"light":d),p=yE(s),{[f]:y,light:b,dark:h,...C}=r,x={...C};let F=y;if((f==="dark"&&!("dark"in r)||f==="light"&&!("light"in r))&&(F=!0),!F)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:gt(21,f));const $=is(x,F,u,f);b&&!x.light&&is(x,b,void 0,"light"),h&&!x.dark&&is(x,h,void 0,"dark");let w={defaultColorScheme:f,...$,cssVarPrefix:s,colorSchemeSelector:a,rootSelector:c,getCssVar:p,colorSchemes:x,font:{...JC($.typography),...$.font},spacing:mE(u.spacing)};Object.keys(w.colorSchemes).forEach(U=>{const m=w.colorSchemes[U].palette,A=L=>{const Y=L.split("-"),J=Y[1],ae=Y[2];return p(L,m[J][ae])};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")),gE(m,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),m.mode==="light"){E(m.Alert,"errorColor",ce(m.error.light,.6)),E(m.Alert,"infoColor",ce(m.info.light,.6)),E(m.Alert,"successColor",ce(m.success.light,.6)),E(m.Alert,"warningColor",ce(m.warning.light,.6)),E(m.Alert,"errorFilledBg",A("palette-error-main")),E(m.Alert,"infoFilledBg",A("palette-info-main")),E(m.Alert,"successFilledBg",A("palette-success-main")),E(m.Alert,"warningFilledBg",A("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",ue(m.error.light,.9)),E(m.Alert,"infoStandardBg",ue(m.info.light,.9)),E(m.Alert,"successStandardBg",ue(m.success.light,.9)),E(m.Alert,"warningStandardBg",ue(m.warning.light,.9)),E(m.Alert,"errorIconColor",A("palette-error-main")),E(m.Alert,"infoIconColor",A("palette-info-main")),E(m.Alert,"successIconColor",A("palette-success-main")),E(m.Alert,"warningIconColor",A("palette-warning-main")),E(m.AppBar,"defaultBg",A("palette-grey-100")),E(m.Avatar,"defaultBg",A("palette-grey-400")),E(m.Button,"inheritContainedBg",A("palette-grey-300")),E(m.Button,"inheritContainedHoverBg",A("palette-grey-A100")),E(m.Chip,"defaultBorder",A("palette-grey-400")),E(m.Chip,"defaultAvatarColor",A("palette-grey-700")),E(m.Chip,"defaultIconColor",A("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",ue(m.primary.main,.62)),E(m.LinearProgress,"secondaryBg",ue(m.secondary.main,.62)),E(m.LinearProgress,"errorBg",ue(m.error.main,.62)),E(m.LinearProgress,"infoBg",ue(m.info.main,.62)),E(m.LinearProgress,"successBg",ue(m.success.main,.62)),E(m.LinearProgress,"warningBg",ue(m.warning.main,.62)),E(m.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.11)`),E(m.Slider,"primaryTrack",ue(m.primary.main,.62)),E(m.Slider,"secondaryTrack",ue(m.secondary.main,.62)),E(m.Slider,"errorTrack",ue(m.error.main,.62)),E(m.Slider,"infoTrack",ue(m.info.main,.62)),E(m.Slider,"successTrack",ue(m.success.main,.62)),E(m.Slider,"warningTrack",ue(m.warning.main,.62));const L=Cn(m.background.default,.8);E(m.SnackbarContent,"bg",L),E(m.SnackbarContent,"color",Qe(()=>m.getContrastText(L))),E(m.SpeedDialAction,"fabHoverBg",Cn(m.background.paper,.15)),E(m.StepConnector,"border",A("palette-grey-400")),E(m.StepContent,"border",A("palette-grey-400")),E(m.Switch,"defaultColor",A("palette-common-white")),E(m.Switch,"defaultDisabledColor",A("palette-grey-100")),E(m.Switch,"primaryDisabledColor",ue(m.primary.main,.62)),E(m.Switch,"secondaryDisabledColor",ue(m.secondary.main,.62)),E(m.Switch,"errorDisabledColor",ue(m.error.main,.62)),E(m.Switch,"infoDisabledColor",ue(m.info.main,.62)),E(m.Switch,"successDisabledColor",ue(m.success.main,.62)),E(m.Switch,"warningDisabledColor",ue(m.warning.main,.62)),E(m.TableCell,"border",ue(wn(m.divider,1),.88)),E(m.Tooltip,"bg",wn(m.grey[700],.92))}if(m.mode==="dark"){E(m.Alert,"errorColor",ue(m.error.light,.6)),E(m.Alert,"infoColor",ue(m.info.light,.6)),E(m.Alert,"successColor",ue(m.success.light,.6)),E(m.Alert,"warningColor",ue(m.warning.light,.6)),E(m.Alert,"errorFilledBg",A("palette-error-dark")),E(m.Alert,"infoFilledBg",A("palette-info-dark")),E(m.Alert,"successFilledBg",A("palette-success-dark")),E(m.Alert,"warningFilledBg",A("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",ce(m.error.light,.9)),E(m.Alert,"infoStandardBg",ce(m.info.light,.9)),E(m.Alert,"successStandardBg",ce(m.success.light,.9)),E(m.Alert,"warningStandardBg",ce(m.warning.light,.9)),E(m.Alert,"errorIconColor",A("palette-error-main")),E(m.Alert,"infoIconColor",A("palette-info-main")),E(m.Alert,"successIconColor",A("palette-success-main")),E(m.Alert,"warningIconColor",A("palette-warning-main")),E(m.AppBar,"defaultBg",A("palette-grey-900")),E(m.AppBar,"darkBg",A("palette-background-paper")),E(m.AppBar,"darkColor",A("palette-text-primary")),E(m.Avatar,"defaultBg",A("palette-grey-600")),E(m.Button,"inheritContainedBg",A("palette-grey-800")),E(m.Button,"inheritContainedHoverBg",A("palette-grey-700")),E(m.Chip,"defaultBorder",A("palette-grey-700")),E(m.Chip,"defaultAvatarColor",A("palette-grey-300")),E(m.Chip,"defaultIconColor",A("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",ce(m.primary.main,.5)),E(m.LinearProgress,"secondaryBg",ce(m.secondary.main,.5)),E(m.LinearProgress,"errorBg",ce(m.error.main,.5)),E(m.LinearProgress,"infoBg",ce(m.info.main,.5)),E(m.LinearProgress,"successBg",ce(m.success.main,.5)),E(m.LinearProgress,"warningBg",ce(m.warning.main,.5)),E(m.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.13)`),E(m.Slider,"primaryTrack",ce(m.primary.main,.5)),E(m.Slider,"secondaryTrack",ce(m.secondary.main,.5)),E(m.Slider,"errorTrack",ce(m.error.main,.5)),E(m.Slider,"infoTrack",ce(m.info.main,.5)),E(m.Slider,"successTrack",ce(m.success.main,.5)),E(m.Slider,"warningTrack",ce(m.warning.main,.5));const L=Cn(m.background.default,.98);E(m.SnackbarContent,"bg",L),E(m.SnackbarContent,"color",Qe(()=>m.getContrastText(L))),E(m.SpeedDialAction,"fabHoverBg",Cn(m.background.paper,.15)),E(m.StepConnector,"border",A("palette-grey-600")),E(m.StepContent,"border",A("palette-grey-600")),E(m.Switch,"defaultColor",A("palette-grey-300")),E(m.Switch,"defaultDisabledColor",A("palette-grey-600")),E(m.Switch,"primaryDisabledColor",ce(m.primary.main,.55)),E(m.Switch,"secondaryDisabledColor",ce(m.secondary.main,.55)),E(m.Switch,"errorDisabledColor",ce(m.error.main,.55)),E(m.Switch,"infoDisabledColor",ce(m.info.main,.55)),E(m.Switch,"successDisabledColor",ce(m.success.main,.55)),E(m.Switch,"warningDisabledColor",ce(m.warning.main,.55)),E(m.TableCell,"border",ce(wn(m.divider,1),.68)),E(m.Tooltip,"bg",wn(m.grey[700],.92))}lt(m.background,"default"),lt(m.background,"paper"),lt(m.common,"background"),lt(m.common,"onBackground"),lt(m,"divider"),Object.keys(m).forEach(L=>{const Y=m[L];L!=="tonalOffset"&&Y&&typeof Y=="object"&&(Y.main&&E(m[L],"mainChannel",Tr(wr(Y.main))),Y.light&&E(m[L],"lightChannel",Tr(wr(Y.light))),Y.dark&&E(m[L],"darkChannel",Tr(wr(Y.dark))),Y.contrastText&&E(m[L],"contrastTextChannel",Tr(wr(Y.contrastText))),L==="text"&&(lt(m[L],"primary"),lt(m[L],"secondary")),L==="action"&&(Y.active&&lt(m[L],"active"),Y.selected&&lt(m[L],"selected")))})}),w=t.reduce((U,m)=>Be(U,m),w);const S={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:i,getSelector:hE(w)},{vars:I,generateThemeVars:j,generateStyleSheets:H}=zC(w,S);return w.vars=I,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([U,m])=>{w[U]=m}),w.generateThemeVars=j,w.generateStyleSheets=H,w.generateSpacing=function(){return cc(u.spacing,qo(this))},w.getColorSchemeSelector=BC(a),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=i,w.unstable_sxConfig={...Tn,...u==null?void 0:u.unstable_sxConfig},w.unstable_sx=function(m){return Ut({sx:m,theme:this})},w.toRuntimeSource=Ec,w}function Oc(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:os({...r===!0?{}:r.palette,mode:t})})}function vE(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 ss(e,...t);let d=r;"palette"in e||u[a]&&(u[a]!==!0?d=u[a].palette:a==="dark"&&(d={mode:"dark"}));const f=ss({...e,palette:d},...t);return f.defaultColorScheme=a,f.colorSchemes=u,f.palette.mode==="light"&&(f.colorSchemes.light={...u.light!==!0&&u.light,palette:f.palette},Oc(f,"dark",u.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:f.palette},Oc(f,"light",u.light)),f}return!r&&!("light"in u)&&a==="light"&&(u.light=!0),bE({...i,colorSchemes:u,defaultColorScheme:a,...typeof n!="boolean"&&n},...t)}const TE=vE(),SE="$$material";function _E(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const wE=wC({themeId:SE,defaultTheme:TE,rootShouldForwardProp:e=>_E(e)&&e!=="classes"}),CE=FC;process.env.NODE_ENV!=="production"&&(re.node,re.object.isRequired);function EE(e){return DC(e)}function xE(e){return Yo("MuiSvgIcon",e)}tw("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const AE=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${xt(t)}`,`fontSize${xt(r)}`]};return Q_(o,xE,n)},OE=wE("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${xt(r.color)}`],t[`fontSize${xt(r.fontSize)}`]]}})(CE(({theme:e})=>{var t,r,n,o,s,i,a,c,u,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:((c=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((d=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:d.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,h])=>h&&h.main).map(([h])=>{var C,x;return{props:{color:h},style:{color:(x=(C=(e.vars??e).palette)==null?void 0:C[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}}]}})),En=Oe.forwardRef(function(t,r){const n=EE({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:a="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:p="0 0 24 24",...y}=n,b=Oe.isValidElement(o)&&o.type==="svg",h={...n,color:i,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:b},C={};d||(C.viewBox=p);const x=AE(h);return l.jsxs(OE,{as:a,className:At(x.root,s),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r,...C,...y,...b&&o.props,ownerState:h,children:[b?o.props.children:o,f?l.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(En.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}),En.muiName="SvgIcon";function as(e,t){function r(n,o){return l.jsx(En,{"data-testid":`${t}Icon`,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=En.muiName,Oe.memo(Oe.forwardRef(r))}const $E=as(l.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),PE=as(l.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward"),IE=as(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"),qt=({children:e,...t})=>l.jsx(g.Table.Td,{...t,children:e}),kE=({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(Qf,{})})}),ME={paddingLeft:0,paddingRight:0},DE=v.memo(function({numColumns:t,errors:r,label:n,description:o,path:s,addItem:i,schema:a,enabled:c,translations:u,rootSchema:d}){const f={bg:"transparent",size:"sm",c:"gray"},p=g.useProps("ActionIcon",f,{});return l.jsxs(g.Table.Tr,{children:[l.jsx(qt,{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(kE,{id:"tooltip-validation",errorMessages:r})}):null})]}),o&&l.jsx(g.Text,{size:"sm",children:o})]})}),c?l.jsx(qt,{align:"right",style:ME,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,W.createDefaultValue(a,d)),children:l.jsx(Br,{})})})}):null]})}),$c={fixedCell:{width:"150px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"},fixedCellSmall:{width:"50px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"}},Pc=(e,t,r,n,o)=>{if(t.type==="object")return Ic(t).map(s=>{var c,u;const i=W.Paths.compose(r,s),a={propName:s,schema:t,title:((u=(c=t.properties)==null?void 0:c[s])==null?void 0:u.title)??__(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)}},Ic=e=>e.type==="object"&&typeof e.properties=="object"?Object.keys(e.properties).filter(t=>e.properties[t].type!=="array"):[""],FE=({numColumns:e,translations:t})=>l.jsx(g.Table.Tr,{children:l.jsx(qt,{colSpan:e,children:l.jsx(g.Text,{align:"center",children:t.noDataMessage})})}),NE=v.memo(function({title:t}){return l.jsx(g.Table.Th,{children:t})}),LE=(e,t)=>{const r=t.rowPath+(t.schema.type==="object"?"."+t.propName:""),n=W.formatErrorMessage(fT(W.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}},kc=e=>({type:"Control",scope:e,label:!1}),jE=v.memo(function({path:t,propName:r,schema:n,rootSchema:o,errors:s,enabled:i,renderers:a,cells:c,isValid:u}){return l.jsxs(qt,{children:[n.properties?l.jsx(fe.DispatchCell,{schema:W.Resolve.schema(n,`#/properties/${W.encode(r)}`,o),uischema:kc(`#/properties/${W.encode(r)}`),path:t,enabled:i,renderers:a,cells:c}):l.jsx(fe.DispatchCell,{schema:n,uischema:kc("#"),path:t,enabled:i,renderers:a,cells:c}),l.jsx(g.Text,{size:"xs",children:u?"":s})]})}),zE=e=>{const t=fe.useJsonForms(),r=LE(t,e),n=sa(r.errors);return l.jsx(jE,{...r,isValid:n})},BE=({childPath:e,schema:t,rowIndex:r,openDeleteDialog:n,moveUpCreator:o,moveDownCreator:s,enableUp:i,enableDown:a,showSortButtons:c,enabled:u,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]),C=v.useMemo(()=>s(f,r),[s,f,r]);return l.jsxs(g.Table.Tr,{children:[Pc(zE,t,e,u,d),u?l.jsx(qt,{style:c?$c.fixedCell:$c.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(PE,{})})})}),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:C,disabled:!a,children:l.jsx($E,{})})})})]}):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(IE,{})})})})]})}):null]},e)},Mc=v.memo(BE),UE=({data:e,path:t,schema:r,openDeleteDialog:n,moveUp:o,moveDown:s,uischema:i,config:a,enabled:c,cells:u,translations:d})=>{if(e===0)return l.jsx(FE,{numColumns:Ic(r).length+1,translations:d});const p=La({},a,i.options);return l.jsx(v.Fragment,{children:z_(e).map(y=>{const b=W.Paths.compose(t,`${y}`);return l.jsx(Mc,{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:d},b)})})};class Dc extends v.Component{constructor(){super(...arguments);$u(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:d,enabled:f,cells:p,translations:y}=this.props,b=a,h=s.type==="object",C=h?Pc(NE,s,o,f,p):void 0;return d?l.jsxs(g.Table,{children:[l.jsxs(g.Table.Thead,{children:[l.jsx(DE,{errors:c,label:r,description:n,addItem:this.addItem,numColumns:h?C.length:1,path:o,uischema:b,schema:s,rootSchema:i,enabled:f,translations:y}),h&&l.jsxs(g.Table.Tr,{children:[C,f?l.jsx(g.Table.Th,{}):null]})]}),l.jsx(g.Table.Tbody,{children:l.jsx(UE,{openDeleteDialog:u,translations:y,...this.props})})]}):null}}const Fc=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})]})]})}),VE=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]),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 c?l.jsxs(l.Fragment,{children:[l.jsx(Dc,{...e,openDeleteDialog:u}),l.jsx(Fc,{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},Nc=W.rankWith(3,W.or(W.isObjectArrayControl,W.isPrimitiveArrayControl)),Lc=fe.withJsonFormsArrayLayoutProps(VE),WE=({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)}}),GE=e=>e.oneOf!==void 0&&e.oneOf.length>0&&e.oneOf.every(t=>t.const!==void 0),HE=e=>e.type==="string"&&e.enum!==void 0,jc=W.rankWith(6,W.and(W.uiTypeIs("Control"),W.and(W.schemaMatches(e=>W.hasType(e,"array")&&!Array.isArray(e.items)&&e.uniqueItems===!0),W.schemaSubPathMatches("items",(e,t)=>{const r=e.$ref?W.resolveSchema(t,e.$ref,t):e;return GE(r)||HE(r)})))),zc=fe.withJsonFormsMultiEnumProps(WE),YE=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(d=>{typeof u[d]=="function"&&(u[d]=u[d](n))}),l.jsx(ft.DateInput,{valueFormat:"DD.MM.YYYY",disabled:!c,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))}},...u})},Bc=W.rankWith(5,W.isDateControl),Uc=fe.withJsonFormsControlProps(YE),qE=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(d=>{typeof u[d]=="function"&&(u[d]=u[d](n))}),l.jsx(ft.DateTimePicker,{valueFormat:"DD.MM.YYYY HH:mm",disabled:!c,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())}},...u})},Vc=W.rankWith(5,W.isDateTimeControl),Wc=fe.withJsonFormsControlProps(qE),KE=e=>l.jsx(Rr,{...e}),Gc=W.rankWith(3,W.isNumberControl),Hc=fe.withJsonFormsControlProps(KE),JE=e=>l.jsx(Rr,{...e}),Yc=W.rankWith(3,W.isIntegerControl),qc=fe.withJsonFormsControlProps(JE),ZE=e=>l.jsx(ja,{...e}),Kc=W.rankWith(3,W.isStringControl),Jc=fe.withJsonFormsControlProps(ZE),XE=e=>l.jsx(za,{...e}),Zc=W.rankWith(3,W.isBooleanControl),Xc=fe.withJsonFormsControlProps(XE),QE=({data:e,options:t,handleChange:r,path:n,...o})=>{const{description:s,errors:i,label:a,required:c,enabled:u}=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:!u,data:t,value:e||null,label:a,description:s,required:c,error:i,searchable:!0,onChange:f=>{r(n,f)},...d})},Qc=W.rankWith(5,W.isEnumControl),Rc=fe.withJsonFormsEnumProps(fe.withTranslateProps(v.memo(QE)),!1),RE=e=>{const{text:t,visible:r}=e;return r?l.jsx(g.Title,{fw:"bold",size:"xl",children:t}):null},ex=W.rankWith(3,W.isLabelable),tx=fe.withJsonFormsLabelProps(RE),eu=W.rankWith(5,W.uiTypeIs("HorizontalLayout")),rx=({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(Oo,{...a,renderers:t,cells:r})},tu=fe.withJsonFormsLayoutProps(rx),ru=W.rankWith(5,W.uiTypeIs("VerticalLayout")),nx=({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(Oo,{...a,renderers:o,cells:s})},nu=fe.withJsonFormsLayoutProps(nx),ox=[{tester:Bc,renderer:Uc},{tester:Vc,renderer:Wc},{tester:Gc,renderer:Hc},{tester:Yc,renderer:qc},{tester:Kc,renderer:Jc},{tester:Zc,renderer:Xc},{tester:Qc,renderer:Rc},{tester:Nc,renderer:Lc},{tester:jc,renderer:zc},{tester:eu,renderer:tu},{tester:ru,renderer:nu},{tester:ex,renderer:tx}],sx=[{tester:Ga,cell:Ha},{tester:Ba,cell:Ua},{tester:Va,cell:Wa},{tester:Ya,cell:qa},{tester:Ka,cell:Ja},{tester:Za,cell:Xa},{tester:Qa,cell:Ra}];function ix(e,t){const r=Q(),n=bt(),o=v.useCallback(({row:s,...i})=>l.jsx(ot,{fallback:l.jsx(io,{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 ax(e,t){return{enableRowSelection:!!e||!!t}}function lx(e){return e&&typeof e=="object"&&!Array.isArray(e)}const xn=(...e)=>{const t={};return e.forEach(r=>{r&&Object.keys(r).forEach(n=>{lx(r[n])&&n!=="ref"&&t[n]?t[n]=xn(t[n],r[n]):t[n]=r[n]})}),t},Kt=(e={},...t)=>t.reduce((r,n)=>xn(r,e[n]),{}),cx=(e,t)=>e===void 0?t:e,He=(e,t=[])=>typeof e=="function"?e(...t):e,An=(e,t,r=!1)=>{let n="";r&&(n+="filter");const o=r?e[0].toUpperCase():e[0].toLowerCase();return n+=o+e.slice(1),`${n}.${t}`},ux=(e="")=>{e.startsWith("filter")&&(e=e.slice(6));const[t="",r=""]=e.split(".");return{col:t,operator:r}};function fx({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=>It(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 dx({col:e}){const{info:t,queryParams:r,setQueryParams:n}=Q(),o=or.useForm({initialValues:{filters:(r==null?void 0:r.filters)||[]}}),s=v.useMemo(()=>(t==null?void 0:t.filters[e])||{},[e,t==null?void 0:t.filters]),i=v.useMemo(()=>{var d;return((d=s==null?void 0:s.filters)==null?void 0:d.reduce((f,p)=>({...f,[p.operator]:p.name}),{}))||{}},[s==null?void 0:s.filters]),[a]=ve.useDebouncedValue(o.getValues(),wt);ve.useDidUpdate(()=>{const d=a.filters.filter(f=>f.value);n({filters:d})},[a]);const c=o.getValues().filters,u=c.map((d,f)=>d.col===e&&It(d.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:()=>o.removeListItem("filters",f),size:"md",title:"Remove filter",variant:"outline"})})}),l.jsx(g.Grid.Col,{span:10.5,py:0,children:d.opr==="in"?l.jsx(Fi,{form:o,name:`filters.${f}.value`,label:i[d.opr],comboboxProps:{withinPortal:!1}}):l.jsx(Vr,{form:o,name:`filters.${f}.value`,label:i[d.opr],schema:s.schema,withinPortal:!1,filter:!0})}),f>=0&&f+1<c.length&&l.jsx(g.Grid.Col,{span:12,py:0,children:l.jsx(g.Divider,{my:"sm",label:"AND",align:"center"})})]},`${d.col}-${f}`):null).filter(Boolean);return l.jsxs(g.Grid,{w:u.length?"25rem":"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(fx,{col:e,colFilter:s||{filters:[]},onClick:d=>o.insertListItem("filters",d),withinPortal:!1})})})]})}function px({filters:e,col:t,opr:r,table:n}){const o=g.useMantineTheme();return e.map(s=>{const i=s.operator===r;return l.jsx(g.Menu.Item,{color:i?o.primaryColor:void 0,leftSection:l.jsx(g.Text,{size:"xl",ta:"center",w:"2ch",style:{transform:"translateY(-0.1em)"},children:s.name[0]}),onClick:()=>n.setColumnFilterFns(a=>({...a,[t]:An(t,s.operator)})),value:s.opr,children:s.name},s.operator)})}function hx({enableAdvancedFilters:e,mode:t,setMode:r,col:n,opr:o,filters:s,table:i}){return l.jsxs(l.Fragment,{children:[e&&l.jsxs(l.Fragment,{children:[l.jsx(g.Menu.Item,{component:"div",p:0,children:l.jsx(g.SegmentedControl,{fullWidth:!0,size:"sm",data:["Basic","Advanced"],value:t,onChange:r})}),l.jsx(g.Menu.Divider,{})]}),t==="Basic"&&l.jsx(px,{filters:s,col:n,opr:o,table:i}),t==="Advanced"&&l.jsx(dx,{col:n})]})}const Jt=e=>e!=null&&e!=="",ou=v.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...r},n)=>{const{value:o,onChange:s,leftInputProps:i,rightInputProps:a,groupProps:c,cleariconprops:u,...d}=r,[f,p]=v.useState([null,null]);v.useEffect(()=>{o||p([null,null])},[o]),v.useEffect(()=>{const w=JSON.stringify(f);let S=null;return f.every(Jt)&&w!==o?S=setTimeout(()=>{s(JSON.stringify(f))},wt):f.every(I=>!Jt(I))&&(S=setTimeout(()=>{s(void 0)},wt)),()=>clearTimeout(S)},[f]);const y=v.useCallback((w,S)=>{p(I=>{const j=[...I];return j[S]=w,j})},[]);let[b,h]=f;const C=Jt(h)&&!Jt(b),x=Jt(b)&&!Jt(h),F=typeof b=="number"?l.jsx(g.ActionIcon,{...u,onClick:()=>p(w=>[null,w[1]]),children:l.jsx(no,{})}):null,$=typeof h=="number"?l.jsx(g.ActionIcon,{...u,onClick:()=>p(w=>[w[0],null]),children:l.jsx(no,{})}):null;return l.jsxs(g.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...c,children:[l.jsx(g.NumberInput,{styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:F,...d,...t,value:b||"",onChange:w=>y(w,0),placeholder:C?"Start value is required":"Start value",error:C&&" ",ref:n,...i}),l.jsx(g.NumberInput,{styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:$,...d,...t,value:h||"",onChange:w=>y(w,1),placeholder:x?"End value is required":"End value",error:x&&" ",...a})]})});ou.displayName="BasicHeaderBetweenInput";const Zt=e=>e,su=v.forwardRef(({clearIcon:e,mrtprops:{dateinputprops:t},...r},n)=>{const{value:o,onChange:s,leftInputProps:i,rightInputProps:a,groupProps:c,...u}=r,[d,f]=v.useState([null,null]);v.useEffect(()=>{o||f([null,null])},[o]),v.useEffect(()=>{const x=JSON.stringify(d);let F=null;return d.every(Zt)&&x!==o?F=setTimeout(()=>{s(JSON.stringify(d))},wt):d.every($=>!Zt($))&&(F=setTimeout(()=>{s(void 0)},wt)),()=>clearTimeout(F)},[d]);const p=v.useCallback((x,F)=>{x&&(x=x.toISOString()),f($=>{const w=[...$];return w[F]=x,w})},[]);let[y,b]=d;y=y?new Date(y):null,b=b?new Date(b):null;const h=Zt(b)&&!Zt(y),C=Zt(y)&&!Zt(b);return l.jsxs(g.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...c,children:[l.jsx(ft.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...u,...t,value:y,onChange:x=>p(x,0),placeholder:h?"Start date is required":"Start date",error:h&&" ",ref:n,...i}),l.jsx(ft.DateInput,{clearable:!0,valueFormat:"DD.MM.YYYY",styles:{wrapper:{marginBottom:0}},...u,...t,value:b,onChange:x=>p(x,1),placeholder:C?"End date is required":"End date",error:C&&" ",...a})]})});su.displayName="BasicHeaderDateBetweenInput";const iu=v.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...r},n)=>l.jsx(g.TextInput,{ref:n,rightSection:e,...t,...r,value:r.value||""}));iu.displayName="BasicHeaderTextInput";const au=v.forwardRef(({component:e,...t},r)=>{const n=Q(),o=bt(),s=v.useMemo(()=>[{api:n,auth:o,componentProps:{...t,ref:r}}],[n,o,t,r]);return l.jsx(ot,{ref:r,fallback:l.jsx(iu,{...t}),functionProps:s,children:e})});au.displayName="HeaderInput";const Xt={root:"_root_yn5fy_1","date-filter":"_date-filter_yn5fy_5"},ls={[Mi]:({componentProps:e})=>l.jsx(ou,{...e}),[Di]:({componentProps:e})=>l.jsx(su,{...e})},lu=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})}));lu.displayName="FilterIconWrapper";const cu=v.forwardRef(({indicator:e,children:t,...r},n)=>e?l.jsx(g.Indicator,{zIndex:20,size:16,label:e,...r,children:v.cloneElement(t,{ref:n})}):v.cloneElement(t,{ref:n}));cu.displayName="FilterIndicatorWrapper";function gx({children:e,enableFilterModes:t,enableAdvancedFilters:r,filterProps:n,filterModeDescription:o,filterMenu:s,filters:i,filterFn:a,mrtProps:{column:c,table:u,...d}}){var O;const{queryParams:f,setQueryParams:p}=Q(),y=Q(),b=bt(),[h,C]=v.useState("Basic"),[x,{toggle:F}]=ve.useDisclosure(),$=((O=u.getState().columnFilterFns)==null?void 0:O[c.id])||a,w=v.useMemo(()=>ux($).operator,[$]),S=v.useMemo(()=>{var _;return(_=i==null?void 0:i.find(P=>P.operator===w))==null?void 0:_.name},[i,w]),I=or.useField({mode:"controlled"}),j=v.useMemo(()=>(f==null?void 0:f.filters.filter(_=>_.col===c.id&&It(_.opr)).map(_=>({..._})))||[],[f,c.id]),H=v.useCallback(()=>{I.reset(),c.setFilterValue(void 0)},[]),[U]=ve.useDebouncedValue(I.getInputProps().value,wt),m=ve.useMounted(),A=v.useMemo(()=>f==null?void 0:f.filters.find(_=>_.col===c.id&&_.opr===w),[c.id,w,f==null?void 0:f.filters]);v.useEffect(()=>{m&&c.setFilterValue(U??void 0)},[U]),v.useEffect(()=>{if(!m)return;const _=c.getFilterValue();_===void 0?H():I.getInputProps().onChange(_)},[c.getFilterValue()]),v.useEffect(()=>{m&&(A||H())},[A]),ve.useDidUpdate(()=>{I.reset()},[w]),ve.useDidUpdate(()=>{let _=!1;const P=f==null?void 0:f.filters.map(z=>{if(z.opr.startsWith(pr)&&z.col===c.id){if(z.opr===w)_=!0;else return null;return U?{...z,value:U}:null}return z}).filter(Boolean);!_&&U&&P.push({col:c.id,opr:w,value:U});const D=JSON.stringify(P),V=JSON.stringify(f.filters);D!==V&&p({filters:P})},[U]);const L=v.useMemo(()=>{const _={variant:"subtle"};return!(i!=null&&i.length)&&(_.disabled=!0,_.c="gray"),_},[i==null?void 0:i.length]),Y=v.useMemo(()=>cx(t?e==null?void 0:e[w]:e,ls==null?void 0:ls[w]),[e,t,w]),J=v.useMemo(()=>({...L,size:"sm",onClick:H,title:"Clear filter"}),[L,H]),ae=v.useMemo(()=>[{api:y,auth:b,mrtProps:{column:c,table:u,...d}}],[y,b,c,d,u]),le=v.useMemo(()=>[{...ae[0],componentProps:{label:u.options.localization.changeFilterMode,disabled:!(i!=null&&i.length),indicator:j.length,aiProps:L,onClick:F}}],[L,j.length,i==null?void 0:i.length,ae,u.options.localization.changeFilterMode,F]),ge=v.useMemo(()=>[{...ae[0],componentProps:{filterMode:S}}],[S,ae]),me=He(t?Kt(n,w):n,ae),Me=v.useMemo(()=>{var _,P;return{w:"100%",variant:"unstyled",disabled:!(i!=null&&i.length),title:i.length?void 0:"No filters",placeholder:(_=u.options.localization.filterByColumn)==null?void 0:_.replace("{column}",String(c.columnDef.header)),"aria-label":(P=u.options.localization.filterByColumn)==null?void 0:P.replace("{column}",String(c.columnDef.header)),style:{fontWeight:"normal"},mrtprops:{column:c,table:u,...d,textinputprops:{className:At("mrt-filter-text-input",Xt.root),...He(u.mantineFilterTextInputProps,[{column:c,table:u,...d}]),...He(c.columnDef.mantineFilterTextInputProps,[{column:c,table:u,...d}])},selectprops:{className:At("mrt-filter-text-input",Xt.root),...He(u.mantineFilterSelectProps,[{column:c,table:u,...d}]),...He(c.columnDef.mantineFilterSelectProps,[{column:c,table:u,...d}])},multiselectprops:{className:At("mrt-filter-text-input",Xt.root),...He(u.mantineFilterMultiSelectProps||{clearable:!0},[{column:c,table:u,...d}]),...He(c.columnDef.mantineFilterMultiSelectProps,[{column:c,table:u,...d}])},dateinputprops:{className:At("mrt-filter-text-input",Xt.root,Xt["date-filter"]),...He(u.mantineFilterDateInputProps,[{column:c,table:u,...d}]),...He(c.columnDef.mantineFilterDateInputProps,[{column:c,table:u,...d}])},autocompleteprops:{className:At("mrt-filter-text-input",Xt.root),...He(u.mantineFilterAutocompleteProps,[{column:c,table:u,...d}]),...He(c.columnDef.mantineFilterAutocompleteProps,[{column:c,table:u,...d}])}},ref:D=>{D&&(u.refs.filterInputRefs.current[`${c.id}-0`]=D)},clearIcon:I.isDirty()&&l.jsx(g.ActionIcon,{...J,children:l.jsx(no,{})}),...me,cleariconprops:J}},[J,c,me,I,i.length,d,u]);return l.jsxs(g.Menu,{opened:x,closeOnClickOutside:!0,onChange:F,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(au,{component:Y,field:I,...I.getInputProps(),...Me}),t&&l.jsx(g.Menu.Target,{children:l.jsx(ot,{fallback:i.length?l.jsx(lu,{label:u.options.localization.changeFilterMode,position:"bottom-start",withArrow:!0,arrowPosition:"side",children:l.jsx(cu,{indicator:j.length,disabled:!r,children:l.jsx(g.ActionIcon,{...L,onClick:F,children:l.jsx(ed,{})})})}):null,functionProps:le,children:s})})]}),t&&l.jsx(ot,{fallback:i.length?l.jsx(g.Input.Description,{size:"xs",children:u.options.localization.filterMode.replace("{filterType}",rt.localizedFilterOption(Kt(u.options.localization,c.id),S)||rt.localizedFilterOption(u.options.localization,S)||S)}):null,functionProps:ge,children:o})]}),l.jsx(g.Menu.Dropdown,{children:l.jsx(hx,{enableAdvancedFilters:r,mode:h,setMode:C,col:c.id,opr:w,filters:i,table:u})})]})}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})}const yx=(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 ki;switch(r){case"Date":case"DateTime":return Di;case"Integer":case"Float":return Mi;default:return ki}};function bx(e,t,r,n){const{path:o,info:s,data:i,specialKey:a}=Q(),c=Q(),u=bt(),d=v.useMemo(()=>(i==null?void 0:i.list_columns.map(y=>{var U,m,A;const{component:b,enableFilterModes:h,enableAdvancedFilters:C,filterComponent:x,filterProps:F,filterModeDescription:$,filterMenu:w,defaultOpr:S=yx(s,y)}=Kt(t,a.all,y),I=An(y,S),j=((m=(U=s==null?void 0:s.filters)==null?void 0:U[y])==null?void 0:m.filters.filter(L=>L.operator.startsWith("header:")))||[],H={};return b!==void 0&&(H.Header=L=>He(b,[{api:c,auth:u,mrtProps:L}])),{accessorKey:y,header:(A=i==null?void 0:i.label_columns)==null?void 0:A[y],Filter:L=>l.jsx(gx,{enableFilterModes:h,enableAdvancedFilters:C,filterProps:F,filterModeDescription:$,filterMenu:w,filters:j,filterFn:I,mrtProps:L,children:x}),enableSorting:(i==null?void 0:i.order_columns.includes(y))||(i==null?void 0:i.order_columns.includes(`${y}.id`)),filterFn:j.length?I:void 0,columnFilterModeOptions:j.map(L=>An(y,L.operator)),Cell:({cell:L,table:Y,column:J,...ae})=>{const le=Y.getState().globalFilter,ge=J.getFilterValue()||"",{component:me,separator:Me,truncate:O}=Kt(r,a.all,y);let _=[];le&&_.push(...le.split(n).map(z=>z.trim())),ge&&typeof ge=="string"&&_.push(...ge.split(n).map(z=>z.trim()));let P=Xs(L.getValue());typeof P=="number"?P=P.toLocaleString():P==null&&(P=""),Me&&(P=P.split(Me));let D={};O&&(Array.isArray(P)?D=P.map(z=>({original:z,truncated:z.length>O?`${z.slice(0,O)}...`:null})):D={original:P,truncated:P.length>O?`${P.slice(0,O)}...`:null});const V=[{api:c,auth:u,data:L.row.original,highlight:_,componentProps:{value:P},mrtProps:{cell:L,table:Y,column:J,...ae}}];return l.jsx(ot,{fallback:l.jsx(mx,{highlight:_,truncate:D,children:P}),functionProps:V,children:me})},...H,...Kt(e,a.all,y)}}))||[],[i==null?void 0:i.list_columns,i==null?void 0:i.label_columns,i==null?void 0:i.order_columns,s,e,a.all,c,u,t,r,n]),[f,p]=ve.useSetState({});return v.useEffect(()=>{d.length&&p({[i.path]:d})},[d]),{columns:d.length?d:(f==null?void 0:f[o])||d,manualFiltering:!0}}function vx(){const{data:e,loading:t}=Q();return{data:(e==null?void 0:e.result)||[],rowCount:(e==null?void 0:e.count)||0,state:{showLoadingOverlay:t}}}function Tx(e){const{data:t}=Q();return e?{mantineTableBodyRowProps:({row:r})=>({onClick:()=>{const n=t.ids[r.id];e(n,r.original)},style:{cursor:"pointer"}})}:null}function Sx(){const{info:e}=Q();return{filterFns:v.useMemo(()=>Object.entries((e==null?void 0:e.filters)||{}).reduce((t,[r,n])=>(n.filters.filter(o=>o.operator.startsWith("header:")).forEach(o=>t[An(r,o.operator)]=null),t),{}),[e==null?void 0:e.filters])}}function _x(){const{queryParams:e,setQueryParams:t,info:r}=Q(),n=v.useMemo(()=>{var u,d;return((d=(u=e==null?void 0:e.filters)==null?void 0:u.find(f=>f.opr===dr))==null?void 0:d.value)||""},[e==null?void 0:e.filters]),[o,s]=v.useState(n),[i]=ve.useDebouncedValue(o,wt),a=v.useMemo(()=>{var u;return(u=Object.entries((r==null?void 0:r.filters)||{}).find(([,d])=>d.filters.find(f=>f.operator===dr)))==null?void 0:u[0]},[r==null?void 0:r.filters]);ve.useDidUpdate(()=>{n!==(i||"")&&s(n)},[n]),ve.useDidUpdate(()=>{var y;const u=((y=e==null?void 0:e.filters)==null?void 0:y.filter(b=>b.opr!==dr))||[],d={col:a,opr:dr,value:i};i&&u.push(d);const f=JSON.stringify(u),p=JSON.stringify((e==null?void 0:e.filters)||[]);f!==p&&t({page:0,filters:u})},[i]);const c=v.useMemo(()=>{const u={disabled:!a};return a||(u.placeholder="No global filter available"),u},[a]);return{manualFiltering:!0,onGlobalFilterChange:s,state:{globalFilter:o},mantineSearchTextInputProps:c}}function wx(e){const{data:t,queryParams:r,setQueryParams:n}=Q(),o=v.useMemo(()=>({pageIndex:(r==null?void 0:r.page)||Hd,pageSize:(r==null?void 0:r.page_size)||Yd}),[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 Cx(e){const{ref:t,height:r}=ve.useElementSize(),{ref:n,height:o}=ve.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 Ex(){const{queryParams:e,setQueryParams:t,data:r}=Q(),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 xx({table:e,...t}){const[r,n]=v.useState(!1),o={variant:"transparent",size:"md",c:"gray"},s=g.useProps("ActionIcon",o,t);return l.jsxs(l.Fragment,{children:[l.jsx(g.Tooltip,{label:e.options.localization.add??"Add Item",children:l.jsx(g.ActionIcon,{variant:s.variant,size:s.size,c:s.c,className:"filterButton",onClick:()=>{n(!0)},children:l.jsx(Br,{})})}),l.jsx(ao,{opened:r,onClose:()=>{n(!1)}})]})}function Ax({table:e,...t}){const[r,n]=v.useState(!1),{download:o}=Q(),s={variant:"transparent",size:"md",c:"gray"},i=g.useProps("ActionIcon",s,t);return r?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:e.options.localization.download??"Download",children:l.jsx(g.ActionIcon,{variant:i.variant,size:i.size,c:i.c,className:"filterButton",onClick:()=>{n(!0),o("download").then(()=>n(!1))},children:l.jsx(ei,{})})})}function Ox({table:e,...t}){const[r,n]=v.useState(!1),{loading:o,refetch:s}=Q(),i={variant:"transparent",size:"md",c:"gray"},a=g.useProps("ActionIcon",i,t);return v.useEffect(()=>{o||n(!1)},[o]),r?l.jsx(g.ThemeIcon,{variant:"transparent",size:a.size,c:a.c,children:l.jsx(g.Loader,{size:"100%",color:a.c})}):l.jsx(g.Tooltip,{label:e.options.localization.refresh??"Refresh",children:l.jsx(g.ActionIcon,{variant:a.variant,size:a.size,c:a.c,className:"filterButton",onClick:()=>{n(!0),s()},children:l.jsx(od,{})})})}const cs={toggleGlobalFilter:1,filter:2,download:3,add:4,refresh:5,showHideColumns:6,toggleDensePadding:7,toggleFullScreen:8};function $x(e,t){return{1:l.jsx(rt.MRT_ToggleGlobalFilterButton,{table:e,disabled:!1},"basic-1"),2:l.jsx(rt.MRT_ToggleFiltersButton,{table:e},"basic-2"),3:(t==null?void 0:t["3"])&&l.jsx(Ax,{table:e},"basic-3"),4:(t==null?void 0:t["4"])&&l.jsx(xx,{table:e},"basic-4"),5:l.jsx(Ox,{table:e},"basic-5"),6:l.jsx(rt.MRT_ShowHideColumnsButton,{table:e},"basic-6"),7:l.jsx(rt.MRT_ToggleDensePaddingButton,{table:e},"basic-7"),8:l.jsx(rt.MRT_ToggleFullScreenButton,{table:e},"basic-8")}}function Px(e={},t,r){const{info:n,queryParams:o,setQueryParams:s}=Q(),i=Q(),a=bt(),{customizer:c,custom:u}=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}}],C={3:n==null?void 0:n.permissions.includes("can_download"),4:n==null?void 0:n.permissions.includes("can_post")},x=$x(b,C);Object.entries(c||{}).forEach(([$,w])=>{$ in cs&&(x[cs[$]]=l.jsx(ot,{fallback:x[cs[$]],functionProps:h,children:w},`custom-${$}`))});let F=Object.values(x);return Object.entries(u||{}).forEach(([$,w])=>{$=Number($)-1;const S=l.jsx(ot,{functionProps:h,children:w},`order-${$}`);$>F.length?F.push(S):F=[...F.slice(0,$),S,...F.slice($)]}),l.jsx(g.Flex,{gap:"0.125rem",align:"center",children:F})},[i,a,u,c,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:(c==null?void 0:c.filter)!==null,...y}}function Ix(){const{data:e}=Q();return v.useMemo(()=>(e==null?void 0:e.result.length)>=1e3,[e])?{enableRowVirtualization:!0,rowVirtualizerOptions:{overscan:5}}:{}}const kx={enableStickyHeader:!0,enableColumnPinning:!0},uu=v.forwardRef((e,t)=>{var X;const{data:r,queryParams:n,refetch:o,specialKey:s}=Q(),i=g.useProps("NextGenDataGrid",{},{}),{fetchOnMount:a=!0,hideToolbar:c,hideActions:u,hidePagination:d,hideError:f,onSelectCheckbox:p,onClickEntry:y,bulkActions:b,table:h,quickFilters:C,withBorder:x,columnProps:F,header:$,body:w,toolbar:S={},textFilterSeparator:I=";",bodySeparator:j,bodyTruncate:H,headerCustomizer:U,bodyCustomizer:m,toolbarCustomizer:A,hideAdd:L,hideDownload:Y,hideFilter:J,...ae}=v.useMemo(()=>xn(i,e),[e,i]);j&&Object.keys(w).forEach(Z=>{w[Z]=w[Z]||{},w[Z].separator=w[Z].separator||j}),H&&Object.keys(w).forEach(Z=>{w[Z]=w[Z]||{},w[Z].truncate=w[Z].truncate||H}),U&&Object.keys(U).forEach(Z=>{$[Z]=$[Z]||{},$[Z].component=U[Z].component||U[Z]}),m&&Object.keys(m).forEach(Z=>{w[Z]=w[Z]||{},w[Z].component=m[Z].component||m[Z]}),A&&(S.custom=S.custom||A),L&&(S.customizer=S.customizer||{},S.customizer.add=S.customizer.add||null),Y&&(S.customizer=S.customizer||{},S.customizer.download=S.customizer.download||null),J&&(S.customizer=S.customizer||{},S.customizer.filter=S.customizer.filter||null),v.useEffect(()=>{process.env.NODE_ENV==="development"&&(j&&console.warn("bodySeparator is deprecated, please use body.[col].separator instead"),H&&console.warn("bodyTruncate is deprecated, please use body.[col].truncate instead"),U&&console.warn("headerCustomizer is deprecated, please use header.[col].component instead"),m&&console.warn("bodyCustomizer is deprecated, please use body.[col].component instead"),A&&console.warn("toolbarCustomizer is deprecated, please use toolbar.custom instead"),L&&console.warn("hideAdd is deprecated, please use toolbar.customizer.add instead"),Y&&console.warn("hideDownload is deprecated, please use toolbar.customizer.download instead"),J&&console.warn("hideFilter is deprecated, please use toolbar.customizer.filter instead"))},[]);const le=vx(),ge=Ex(),me=wx(d),Me=bx(F,$,w,I),O=Cx(x),_=ix(u,(X=Kt(w,s.actions))==null?void 0:X.component),P=_x(),D=Ix(),V=Px(S,C,c),z=Tx(y),q=ax(p,b),K=Sx(),ee=v.useMemo(()=>xn(kx,{mantinePaperProps:{ref:t}},Me,le,ge,me,O,_,P,D,V,z,q,K,h),[t,Me,le,ge,me,O,_,P,D,V,z,q,K,h]),te=rt.useMantineReactTable(ee);return v.useEffect(()=>{!n&&a&&o()},[]),v.useEffect(()=>{const Z=Object.keys(te.getState().rowSelection),N=r==null?void 0:r.ids.filter((De,Le)=>Z.includes(Le.toString()));p==null||p(N),b==null||b.setSelectedIds(N)},[b,r==null?void 0:r.ids,te.getState().rowSelection,p]),l.jsxs(l.Fragment,{children:[l.jsx(rt.MantineReactTable,{table:te,...ae}),f?null:l.jsx(oi,{})]})});uu.displayName="NextGenDataGrid";const us={iconSmall:"_iconSmall_sxv3z_1",btn:"_btn_sxv3z_17"};function Mx({basePath:e="/security",Target:t,children:r}){const n=bs.useNavigate(),{user:o,signout:s}=bt(),[i,a]=v.useState(!1),u=[{resource_name:e+"/users",label:"Users",name:"UsersApi",Icon:sd},{resource_name:e+"/roles",label:"Roles",name:"RolesApi",Icon:td},{resource_name:e+"/permissions",label:"Base Permissions",name:"PermissionsApi",Icon:ri},{resource_name:e+"/permissionviews",label:"Permission on Views",name:"PermissionViewApi",Icon:ri},{resource_name:e+"/viewsmenus",label:"Views/Menus",name:"ViewsMenusApi",Icon:Xf}].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:us.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(ro,{size:12})]})})}),l.jsxs(g.Menu.Dropdown,{children:[u.length?l.jsxs(l.Fragment,{children:[l.jsx(g.Menu.Label,{children:"Security"}),u.map((d,f)=>l.jsx(g.Menu.Item,{p:12,leftSection:l.jsx(d.Icon,{className:us.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(rd,{p:12,className:us.iconSmall}),onClick:s,children:"Logout"})]})]})}function Dx(e,{autoInvoke:t=!0,initialLoading:r=!1,clearDataOnRefetch:n=!1,...o}={}){const[s,i]=v.useState(null),[a,c]=v.useState(r),[u,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,c(!0),fetch(e,{signal:f.current.signal,...o}).then(async b=>{const h=await b.json();if(!b.ok){const C=typeof h.detail=="string"?h.detail:JSON.stringify(h.detail,null,2);throw new Error(C)}return i(h),c(!1),h}).catch(b=>(b&&b.name!=="AbortError"&&(d(b),c(!1)),b))},[e]),y=v.useCallback(()=>{var b;f.current&&((b=f.current)==null||b.abort(""),c(!1))},[]);return v.useEffect(()=>(t&&p(),()=>{f.current&&f.current.abort("")}),[p,t]),{data:s,loading:a,error:u,refetch:p,abort:y}}k.Actions=io,k.Add=di,k.AddDialog=ao,k.ApiProvider=Qs,k.DataGrid=yo,k.Delete=si,k.DeleteDialog=Fc,k.Edit=fi,k.EditDialog=ui,k.Filter=Li,k.FilterMenu=Ni,k.InfiniteScroll=Zd,k.MantineArrayControlRenderer=Lc,k.MantineBooleanCell=qa,k.MantineBooleanControl=Xc,k.MantineDateCell=Ja,k.MantineDateControl=Uc,k.MantineDateTimeCell=Xa,k.MantineDateTimeControl=Wc,k.MantineEnumArrayRenderer=zc,k.MantineEnumCell=Ra,k.MantineEnumControl=Rc,k.MantineHorizontalLayoutRenderer=tu,k.MantineIntegerCell=Wa,k.MantineIntegerControl=qc,k.MantineLayoutRenderer=Oo,k.MantineNumberCell=Ua,k.MantineNumberControl=Hc,k.MantineTableControl=Dc,k.MantineTextCell=Ha,k.MantineTextControl=Jc,k.MantineVerticalLayoutRenderer=nu,k.NextGenDataGrid=uu,k.NoBorderTableCell=qt,k.NonEmptyRow=Mc,k.Provider=Hu,k.UserMenu=Mx,k.mantineArrayControlTester=Nc,k.mantineBooleanCellTester=Ya,k.mantineBooleanControlTester=Zc,k.mantineCells=sx,k.mantineDateCellTester=Ka,k.mantineDateControlTester=Bc,k.mantineDateTimeCellTester=Za,k.mantineDateTimeControlTester=Vc,k.mantineEnumArrayRendererTester=jc,k.mantineEnumCellTester=Qa,k.mantineEnumControlTester=Qc,k.mantineHorizontalLayoutTester=eu,k.mantineIntegerCellTester=Va,k.mantineIntegerControlTester=Yc,k.mantineNumberCellTester=Ba,k.mantineNumberControlTester=Gc,k.mantineRenderers=ox,k.mantineTextCellTester=Ga,k.mantineTextControlTester=Kc,k.mantineVerticalLayoutTester=ru,k.renderLayoutElements=ia,k.useApi=Q,k.useAuth=bt,k.useBulkActions=Yu,k.useCustomFetch=Dx,k.useDebouncedChange=da,k.useInfo=ws,k.useProxy=sr,k.withAjvProps=qg,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});